\r\n });\r\n \r\n im.mask(this.element);\r\n }\r\n}\r\n\r\nexport class CleanInputMaskValueConverter {\r\n fromView(val) {\r\n if (typeof val === 'string' && val.includes('
)) {\r\n \u002F\u002F Strip out $, _ and , as well as whitespace\r\n \u002F\u002F Then parse it as a floating number to account for decimals\r\n const parsedValue = parseFloat(val.replace('
, '').replace(\u002F_\u002Fg, '').replace(\u002F,\u002Fg, '').trim());\r\n\r\n \u002F\u002F The number is valid return it\r\n if (!isNaN(parsedValue)) {\r\n return parsedValue;\r\n }\r\n }\r\n\r\n \u002F\u002F Our parsed value was not a valid number, just return the passed in value\r\n return val;\r\n }\r\n}\r\n\r\nexport class PrecisionValueConverter {\r\n toView(val, prefix = null) {\r\n const parsedValue = parseFloat(val);\r\n\r\n if (!isNaN(parsedValue)) {\r\n if (prefix) {\r\n return `${prefix}${parsedValue.toFixed(2)}`;\r\n } else {\r\n return parsedValue.toFixed(2);\r\n }\r\n }\r\n\r\n return val;\r\n }\r\n}","id":"b5ff4be4-b24f-4147-8ff0-33ca4edff211","is_binary":false,"title":"input-mask.ts","sha":null,"inserted_at":"2019-04-29T10:03:26","updated_at":"2019-04-29T10:04:02","upload_id":null,"shortid":"k8Byx","source_id":"4514069e-1457-4384-90f8-37e0f3b998db","directory_shortid":"GwjlJ"}],"authorization":"read","restrictions":{"free_plan_editing_restricted":false,"live_sessions_restricted":false},"collection":false,"version":12,"like_count":0,"user_liked":false,"view_count":14206,"permissions":{"prevent_sandbox_export":false,"prevent_sandbox_leaving":false},"forked_template_sandbox":null,"team":{"id":"93ee9433-d97f-473c-89cc-6a78503b30c4","name":"Vheissu","settings":{"ai_consent":{"public_sandboxes":false,"private_sandboxes":false}},"subscription_type":"personal_pro","avatar_url":"https:\u002F\u002Favatars4.githubusercontent.com\u002Fu\u002F368330?v=4"},"always_on":false,"feature_flags":{"comments":false,"container_lsp":false},"directories":[{"id":"e0d3362a-d7f7-4e4f-8c1a-3d77c36f66d4","title":"src","inserted_at":"2019-04-29T10:00:37","updated_at":"2019-04-29T10:00:37","shortid":"GwjlJ","source_id":"4514069e-1457-4384-90f8-37e0f3b998db","directory_shortid":null},{"id":"d112dfe9-a76d-4d66-b6c9-a49f00fe84e7","title":"public","inserted_at":"2019-04-29T10:00:37","updated_at":"2019-04-29T10:00:37","shortid":"xzg0l","source_id":"4514069e-1457-4384-90f8-37e0f3b998db","directory_shortid":null}],"alias":null,"npm_dependencies":{"@types\u002Freact":"16.0.7","@types\u002Freact-dom":"15.5.4","react":"16.0.0","react-dom":"16.0.0"},"git":null,"is_frozen":false,"title":"Aurelia Masked Inputs","forked_template":null,"template":"create-react-app-typescript","owned":false,"source_id":"4514069e-1457-4384-90f8-37e0f3b998db","picks":[],"external_resources":[],"inserted_at":"2019-04-29T10:00:37","screenshot_url":"https:\u002F\u002Fscreenshots.codesandbox.io\u002Fl2pk09k137\u002F12.png","room_id":null,"original_git_commit_sha":null,"draft":true,"preview_secret":null,"id":"l2pk09k137","base_git":null,"author":{"id":"559d9f8e-3fa0-4506-94e3-c4dac2e55385","name":"Dwayne Charrington","username":"Vheissu","avatar_url":"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F368330?v=4","personal_workspace_id":"93ee9433-d97f-473c-89cc-6a78503b30c4","subscription_plan":null,"subscription_since":null},"fork_count":31,"pr_number":null,"updated_at":"2020-01-29T16:05:06","free_plan_editing_restricted":false,"privacy":0,"ai_consent":false,"forked_from_sandbox":{"alias":"aurelia-typescript-sandbox-zw9zjy0683","id":"zw9zjy0683","title":"Aurelia TypeScript Sandbox","template":"create-react-app-typescript","inserted_at":"2018-11-04T04:04:42","updated_at":"2020-01-29T16:13:38","git":null,"privacy":0,"custom_template":null},"settings":{"ai_consent":null},"npm_registries":[],"is_sse":false,"restricted":false,"custom_template":null,"original_git":null};