{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm-es5/theme-18cbe2cc.js","webpack:///./node_modules/@ionic/core/dist/esm-es5/ion-checkbox-md.entry.js"],"names":["hostContext","selector","el","closest","createColorClasses","color","_a","length","undefined","getClassList","classes","array","Array","isArray","split","filter","c","map","trim","getClassMap","forEach","SCHEME","openURL","url","ev","direction","router","this","test","document","querySelector","preventDefault","push","Checkbox","hostRef","_this","inputId","checkboxIds","name","checked","indeterminate","disabled","value","onClick","setFocus","onFocus","ionFocus","emit","onBlur","ionBlur","ionChange","ionStyle","prototype","componentWillLoad","emitStyle","checkedChanged","isChecked","disabledChanged","buttonEl","focus","render","_b","labelId","mode","label","id","path","d","role","class","Object","assign","viewBox","type","ref","btnEl","defineProperty","get","enumerable","configurable"],"mappings":"kHAAA,wJACIA,EAAc,SAAUC,EAAUC,GAClC,OAAgC,OAAzBA,EAAGC,QAAQF,IAKlBG,EAAqB,SAAUC,GAC/B,IAAIC,EACJ,MAAyB,kBAAVD,GAAsBA,EAAME,OAAS,GAAMD,EAAK,CACvD,aAAa,GAEjBA,EAAG,aAAeD,IAAS,EAC3BC,QAAME,GAEVC,EAAe,SAAUC,GACzB,QAAgBF,IAAZE,EAAuB,CACvB,IAAIC,EAAQC,MAAMC,QAAQH,GAAWA,EAAUA,EAAQI,MAAM,KAC7D,OAAOH,EACFI,QAAO,SAAUC,GAAK,OAAY,MAALA,KAC7BC,KAAI,SAAUD,GAAK,OAAOA,EAAEE,UAC5BH,QAAO,SAAUC,GAAK,MAAa,KAANA,KAEtC,MAAO,IAEPG,EAAc,SAAUT,GACxB,IAAIO,EAAM,GAEV,OADAR,EAAaC,GAASU,SAAQ,SAAUJ,GAAK,OAAOC,EAAID,IAAK,KACtDC,GAEPI,EAAS,uBACTC,EAAU,SAAUC,EAAKC,EAAIC,GAAa,OAAO,oBAAU,OAAQ,OAAQ,GAAQ,WACnF,IAAIC,EACJ,OAAO,eAAYC,MAAM,SAAUrB,GAC/B,OAAW,M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AAK,WACD,MAAO,CACH,QAAW,CAAC,kBACZ,SAAY,CAAC,qBAGrBC,YAAY,EACZC,cAAc,IAElBT,OAAOM,eAAe3C,EAAU,QAAS,CACrC4C,IAAK,WAAc,MAAO,0oFAC1BC,YAAY,EACZC,cAAc,IAEX9C,EA9GkB,GAgHzBI,EAAc","file":"js/chunk-5ae09e80.d4e24db0.js","sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nvar hostContext = function (selector, el) {\n return el.closest(selector) !== null;\n};\n/**\n * Create the mode and color classes for the component based on the classes passed in\n */\nvar createColorClasses = function (color) {\n var _a;\n return (typeof color === 'string' && color.length > 0) ? (_a = {\n 'ion-color': true\n },\n _a[\"ion-color-\" + color] = true,\n _a) : undefined;\n};\nvar getClassList = function (classes) {\n if (classes !== undefined) {\n var array = Array.isArray(classes) ? classes : classes.split(' ');\n return array\n .filter(function (c) { return c != null; })\n .map(function (c) { return c.trim(); })\n .filter(function (c) { return c !== ''; });\n }\n return [];\n};\nvar getClassMap = function (classes) {\n var map = {};\n getClassList(classes).forEach(function (c) { return map[c] = true; });\n return map;\n};\nvar SCHEME = /^[a-z][a-z0-9+\\-.]*:/;\nvar openURL = function (url, ev, direction) { return __awaiter(void 0, void 0, void 0, function () {\n var router;\n return __generator(this, function (_a) {\n if (url != null && url[0] !== '#' && !SCHEME.test(url)) {\n router = document.querySelector('ion-router');\n if (router) {\n if (ev != null) {\n ev.preventDefault();\n }\n return [2 /*return*/, router.push(url, direction)];\n }\n }\n return [2 /*return*/, false];\n });\n}); };\nexport { createColorClasses as c, getClassMap as g, hostContext as h, openURL as o };\n","import { r as registerInstance, d as createEvent, c as getIonMode, h, H as Host, e as getElement } from './core-feeeff0d.js';\nimport './config-3c7f3790.js';\nimport { f as findItemLabel, a as renderHiddenInput } from './helpers-46f4a262.js';\nimport { c as createColorClasses, h as hostContext } from './theme-18cbe2cc.js';\nvar Checkbox = /** @class */ (function () {\n function Checkbox(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.inputId = \"ion-cb-\" + checkboxIds++;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the checkbox is selected.\n */\n this.checked = false;\n /**\n * If `true`, the checkbox will visually appear as indeterminate.\n */\n this.indeterminate = false;\n /**\n * If `true`, the user cannot interact with the checkbox.\n */\n this.disabled = false;\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a ``,\n * it's only used when the toggle participates in a native `
`.\n */\n this.value = 'on';\n this.onClick = function () {\n _this.setFocus();\n _this.checked = !_this.checked;\n _this.indeterminate = false;\n };\n this.onFocus = function () {\n _this.ionFocus.emit();\n };\n this.onBlur = function () {\n _this.ionBlur.emit();\n };\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n }\n Checkbox.prototype.componentWillLoad = function () {\n this.emitStyle();\n };\n Checkbox.prototype.checkedChanged = function (isChecked) {\n this.ionChange.emit({\n checked: isChecked,\n value: this.value\n });\n this.emitStyle();\n };\n Checkbox.prototype.disabledChanged = function () {\n this.emitStyle();\n };\n Checkbox.prototype.emitStyle = function () {\n this.ionStyle.emit({\n 'checkbox-checked': this.checked,\n 'interactive-disabled': this.disabled,\n });\n };\n Checkbox.prototype.setFocus = function () {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n };\n Checkbox.prototype.render = function () {\n var _a;\n var _this = this;\n var _b = this, inputId = _b.inputId, indeterminate = _b.indeterminate, disabled = _b.disabled, checked = _b.checked, value = _b.value, color = _b.color, el = _b.el;\n var labelId = inputId + '-lbl';\n var mode = getIonMode(this);\n var label = findItemLabel(el);\n if (label) {\n label.id = labelId;\n }\n renderHiddenInput(true, el, this.name, (checked ? value : ''), disabled);\n var path = indeterminate\n ? h(\"path\", { d: \"M6 12L18 12\" })\n : h(\"path\", { d: \"M5.9,12.5l3.8,3.8l8.8-8.8\" });\n if (mode === 'md') {\n path = indeterminate\n ? h(\"path\", { d: \"M2 12H22\" })\n : h(\"path\", { d: \"M1.73,12.91 8.1,19.28 22.79,4.59\" });\n }\n return (h(Host, { onClick: this.onClick, role: \"checkbox\", \"aria-disabled\": disabled ? 'true' : null, \"aria-checked\": \"\" + checked, \"aria-labelledby\": labelId, class: Object.assign(Object.assign({}, createColorClasses(color)), (_a = {}, _a[mode] = true, _a['in-item'] = hostContext('ion-item', el), _a['checkbox-checked'] = checked, _a['checkbox-disabled'] = disabled, _a['checkbox-indeterminate'] = indeterminate, _a['interactive'] = true, _a)) }, h(\"svg\", { class: \"checkbox-icon\", viewBox: \"0 0 24 24\" }, path), h(\"button\", { type: \"button\", onFocus: this.onFocus, onBlur: this.onBlur, disabled: this.disabled, ref: function (btnEl) { return _this.buttonEl = btnEl; } })));\n };\n Object.defineProperty(Checkbox.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Checkbox, \"watchers\", {\n get: function () {\n return {\n \"checked\": [\"checkedChanged\"],\n \"disabled\": [\"disabledChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Checkbox, \"style\", {\n get: function () { return \":host{--background-checked:var(--ion-color-primary,#3880ff);--border-color-checked:var(--ion-color-primary,#3880ff);--checkmark-color:var(--ion-color-primary-contrast,#fff);--transition:none;display:inline-block;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.ion-color){--background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}:host-context([dir=rtl]) button,[dir=rtl] button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.checkbox-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:1;opacity:0}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb,0,0,0),0.51);--background:var(--ion-item-background,var(--ion-background-color,#fff));--transition:background 180ms cubic-bezier(0.4,0,0.2,1);--size:18px;width:var(--size);height:var(--size)}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30;stroke-width:3}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled){opacity:.3}:host(.in-item){margin-left:0;margin-right:0;margin-top:18px;margin-bottom:18px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:18px;margin-bottom:18px}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}\"; },\n enumerable: true,\n configurable: true\n });\n return Checkbox;\n}());\nvar checkboxIds = 0;\nexport { Checkbox as ion_checkbox };\n"],"sourceRoot":""}