@nanoporetech-digital/components 2.15.0 → 2.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/nano-datalist_3.cjs.entry.js +1 -1
  3. package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
  4. package/dist/cjs/nano-field-validator.cjs.entry.js +11 -2
  5. package/dist/cjs/nano-field-validator.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-global-nav.cjs.entry.js +1 -1
  7. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nano-input.cjs.entry.js +1 -1
  9. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nano-nav-item_2.cjs.entry.js +1 -1
  11. package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
  12. package/dist/collection/components/datalist/datalist.js +1 -1
  13. package/dist/collection/components/datalist/datalist.js.map +1 -1
  14. package/dist/collection/components/field-validator/field-validator.js +11 -2
  15. package/dist/collection/components/field-validator/field-validator.js.map +1 -1
  16. package/dist/collection/components/global-nav/global-nav.css +3 -2
  17. package/dist/collection/components/input/input.css +3 -3
  18. package/dist/collection/components/select/select.css +1 -0
  19. package/dist/components/datalist.js +1 -1
  20. package/dist/components/datalist.js.map +1 -1
  21. package/dist/components/input.js +1 -1
  22. package/dist/components/input.js.map +1 -1
  23. package/dist/components/nano-field-validator.js +11 -2
  24. package/dist/components/nano-field-validator.js.map +1 -1
  25. package/dist/components/nano-global-nav.js +1 -1
  26. package/dist/components/nano-global-nav.js.map +1 -1
  27. package/dist/components/select.js +1 -1
  28. package/dist/components/select.js.map +1 -1
  29. package/dist/custom-elements/index.js +15 -6
  30. package/dist/custom-elements/index.js.map +1 -1
  31. package/dist/esm/nano-datalist_3.entry.js +1 -1
  32. package/dist/esm/nano-datalist_3.entry.js.map +1 -1
  33. package/dist/esm/nano-field-validator.entry.js +11 -2
  34. package/dist/esm/nano-field-validator.entry.js.map +1 -1
  35. package/dist/esm/nano-global-nav.entry.js +1 -1
  36. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  37. package/dist/esm/nano-input.entry.js +1 -1
  38. package/dist/esm/nano-input.entry.js.map +1 -1
  39. package/dist/esm/nano-nav-item_2.entry.js +1 -1
  40. package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
  41. package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
  42. package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -1
  43. package/dist/esm-es5/nano-field-validator.entry.js +1 -1
  44. package/dist/esm-es5/nano-field-validator.entry.js.map +1 -1
  45. package/dist/esm-es5/nano-global-nav.entry.js +1 -1
  46. package/dist/esm-es5/nano-global-nav.entry.js.map +1 -1
  47. package/dist/esm-es5/nano-input.entry.js +1 -1
  48. package/dist/esm-es5/nano-input.entry.js.map +1 -1
  49. package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
  50. package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
  51. package/dist/nano-components/nano-components.esm.js +1 -1
  52. package/dist/nano-components/p-1ef47604.entry.js +5 -0
  53. package/dist/nano-components/p-1ef47604.entry.js.map +1 -0
  54. package/dist/nano-components/{p-d187fa1e.entry.js → p-42a77642.entry.js} +2 -2
  55. package/dist/nano-components/{p-d187fa1e.entry.js.map → p-42a77642.entry.js.map} +1 -1
  56. package/dist/nano-components/p-491107e0.system.entry.js +5 -0
  57. package/dist/nano-components/p-491107e0.system.entry.js.map +1 -0
  58. package/dist/nano-components/p-495b3195.system.entry.js +5 -0
  59. package/dist/nano-components/p-495b3195.system.entry.js.map +1 -0
  60. package/dist/nano-components/p-52481e3f.entry.js +5 -0
  61. package/dist/nano-components/p-52481e3f.entry.js.map +1 -0
  62. package/dist/nano-components/{p-d74f4b9d.entry.js → p-65192b9b.entry.js} +2 -2
  63. package/dist/nano-components/p-65192b9b.entry.js.map +1 -0
  64. package/dist/nano-components/p-6b35560c.system.js +1 -1
  65. package/dist/nano-components/{p-ed44eb45.system.entry.js → p-80c6166e.system.entry.js} +2 -2
  66. package/dist/nano-components/{p-ed44eb45.system.entry.js.map → p-80c6166e.system.entry.js.map} +1 -1
  67. package/dist/nano-components/p-c8ff4172.entry.js +5 -0
  68. package/dist/nano-components/p-c8ff4172.entry.js.map +1 -0
  69. package/dist/nano-components/{p-5841bd7a.system.entry.js → p-db8aea7a.system.entry.js} +2 -2
  70. package/dist/nano-components/p-db8aea7a.system.entry.js.map +1 -0
  71. package/dist/nano-components/{p-1137929a.system.entry.js → p-de983c13.system.entry.js} +2 -2
  72. package/dist/nano-components/p-de983c13.system.entry.js.map +1 -0
  73. package/dist/types/components/field-validator/field-validator.d.ts +1 -0
  74. package/dist/types/interface.d.ts +1 -0
  75. package/docs-json.json +1 -1
  76. package/package.json +2 -2
  77. package/dist/nano-components/p-1137929a.system.entry.js.map +0 -1
  78. package/dist/nano-components/p-3d9623ad.entry.js +0 -5
  79. package/dist/nano-components/p-3d9623ad.entry.js.map +0 -1
  80. package/dist/nano-components/p-5841bd7a.system.entry.js.map +0 -1
  81. package/dist/nano-components/p-70a54c01.entry.js +0 -5
  82. package/dist/nano-components/p-70a54c01.entry.js.map +0 -1
  83. package/dist/nano-components/p-7f5e58b5.system.entry.js +0 -5
  84. package/dist/nano-components/p-7f5e58b5.system.entry.js.map +0 -1
  85. package/dist/nano-components/p-b0cd1cc3.system.entry.js +0 -5
  86. package/dist/nano-components/p-b0cd1cc3.system.entry.js.map +0 -1
  87. package/dist/nano-components/p-cbb54972.entry.js +0 -5
  88. package/dist/nano-components/p-cbb54972.entry.js.map +0 -1
  89. package/dist/nano-components/p-d74f4b9d.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@stencil/store/dist/index.mjs","src/components/field-validator/field-validator.tsx"],"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","createObservableMap","defaultState","shouldUpdate","a","b","states","Object","entries","handlers","cb","oldValue","state","Proxy","[object Object]","_","Array","from","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","FieldValidator","hostRef","this","submitted","allFields","nanoFieldSelector","hasSetStore","internalValidate","validateOn","scrollToInvalid","_dirty","extraFieldSelector","handleStoreChange","async","newVal","found","find","field","getName","tagName","type","storeToFields","fileStateEqual","dirty","validateAllFields","_valid","activeForm","checkValidity","nanoPayloadChange","emit","_store","handleFieldChange","ev","nanoFields","target","fieldsToStore","handlePlainFieldChange","plainFields","handleFormInvalid","preventDefault","submitForm","scrollToFirstInvalid","nanoInvalid","handleSubmit","e","userForm","_activeForm","form","removeEventListener","addEventListener","cbg","closest","valid","store","payload","showValidation","validationState","v","name","pf","nf","validationMessage","validityMessage","invalid","fields","f","val","validity","Promise","all","err","setFieldError","mo","MutationObserver","_entries","host","querySelector","setupFields","observe","childList","attributes","attributeFilter","subtree","getAttribute","querySelectorAll","validateOnChange","fieldName","cbs","checked","isArray","ff","_a","files","init","currentArr","JSON","stringify","validation","res","o","validityTarget","msg","memo","validate","undefined","showError","setError","setCustomValidity","invalidField","scrollIntoView","behavior","block","nanoSubmit","defaultPrevented","submit","requestAnimationFrame","attachSlotObserver","disconnect","h","Host","ref"],"mappings":";;;yEAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,SAElB,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,KAGnB,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KAC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4B,OAAOlD,GAAG,MAAOsB,KAAKU,sBAI/BvC,uBACE,GAAI6B,KAAKsE,GAAItE,KAAKsE,GAAG6C,aAErBnH,KAAKyE,KAAK3B,oBAAoB,aAAc9C,KAAK6B,mBACjD7B,KAAKyE,KAAK3B,oBAAoB,QAAS9C,KAAKkC,wBAC5ClC,KAAKyE,KAAK3B,oBAAoB,SAAU9C,KAAKkC,wBAC7ClC,KAAKyE,KAAK3B,oBAAoB,SAAU9C,KAAKyC,cAC7CzC,KAAK4B,OAAOzE,QAEZ,GAAI6C,KAAKwB,WACPxB,KAAKwB,WAAWsB,oBACd,UACA9C,KAAKoC,kBACL,MAINjE,SACE,OACEiJ,EAACC,EAAI,KACFrH,KAAK2C,UAAYyE,EAAA,OAAA,OAChBpH,KAAK2C,UACLyE,EAAA,OAAA,CAAME,IAAMvD,GAAO/D,KAAKwB,WAAauC,GACnCqD,EAAA,OAAA","sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(defaultState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n const unReset = on('reset', () => cb(defaultState[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import {\n Component,\n Prop,\n h,\n Host,\n Element,\n ComponentInterface,\n State,\n Watch,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport { createStore, ObservableMap } from '@stencil/store';\nimport {\n NanoFormEles,\n PlainFormEles,\n NanoFormEvent,\n ValidationState,\n ValidatorValueStore,\n PlainFormEvent,\n} from '../../interface';\n\n/**\n * A toolbox for `nano-...` form fields and form validation.\n * - Easy to add validation accross field dependencies - e.g. \"When Field1 contains '123' Field2 must contain '456'\"\n * - Easy access to whole form and individual field validity states\n * - Easy access to form data payload\n * = Access to 2-way, data bound reactive store\n * - Scroll to invalid field on submit\n */\n@Component({\n tag: 'nano-field-validator',\n})\nexport class FieldValidator implements ComponentInterface {\n // Internal State\n\n @Element() host: HTMLNanoFieldValidatorElement;\n @State() submitted = false;\n @State() userForm: HTMLFormElement;\n @Watch('userForm')\n userFormChange() {\n if (!!this.userForm) this.activeForm = this.userForm;\n }\n\n private get activeForm() {\n return this._activeForm;\n }\n private set activeForm(form: HTMLFormElement) {\n // manages event listners on whatever form is used (slotted on created here)\n if (!form) return;\n\n if (this._activeForm) {\n this._activeForm.removeEventListener(\n 'invalid',\n this.handleFormInvalid,\n true\n );\n }\n form.addEventListener('invalid', this.handleFormInvalid, true);\n this._activeForm = form;\n }\n private _activeForm: HTMLFormElement;\n private mo: MutationObserver;\n private allFields: Array<NanoFormEles | PlainFormEles> = [];\n private nanoFields: NanoFormEles[];\n private plainFields: PlainFormEles[];\n private nanoFieldSelector = `\n nano-input,\n nano-select,\n nano-file-upload,\n nano-date-input,\n nano-checkbox\n `;\n private hasSetStore = false;\n\n // annoyingly, whenever we attempt to `checkValidty()` it fires `invalid` events.\n // this is used to prevent infinite loops / multiple calls\n private internalValidate = false;\n\n // Public API\n\n /** When should the fields perform validation. Will override / sync all nested `nano-...` controls */\n @Prop({ mutable: true }) validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /** Sync up validateOn with all fields */\n @Watch('validateOn')\n validateOnChange() {\n this.nanoFields.forEach((field) => {\n if (field.tagName === 'NANO-CHECKBOX') {\n const cbg = field.closest('nano-checkbox-group');\n if (cbg) cbg.validateOn = this.validateOn;\n } else {\n (field as Exclude<NanoFormEles, HTMLNanoCheckboxElement>).validateOn =\n this.validateOn;\n }\n });\n }\n\n /** Tries to scroll to the first invalid field on submit */\n @Prop() scrollToInvalid = true;\n\n /** Returns true if any nested fields have been changed @readonly */\n @Prop({ reflect: true })\n get dirty() {\n return this._dirty;\n }\n @State() _dirty = false;\n\n /** Returns true if all the nested fields are currently valid @readonly */\n @Prop({ reflect: true })\n get valid() {\n return this._valid;\n }\n @State() _valid: boolean;\n\n /** The current form state as a stencil store. */\n @Prop() get store() {\n return this._store;\n }\n @State() _store: ObservableMap<ValidatorValueStore>;\n\n /** The current form payload as a reactive proxy. @readonly */\n @Prop()\n get payload() {\n return this._store.state;\n }\n\n /** Returns true if validation errors will be displayed to the user. @readonly */\n @Prop()\n get showValidation() {\n return (this.validateOn === 'dirty' && this.dirty) || this.submitted;\n }\n\n /** Get the current validation state of all form fields. @readonly\n * ```\n {\n fields: NanoFormEles[];\n valid: boolean;\n validityMessage: string;\n dirty: boolean;\n name: string | number;\n value: any;\n }[]\n ```\n */\n @Prop()\n get validationState(): ValidationState[] {\n // TODO - migrate nano-fields away from using proprietary methods in a bid to be closer to the spec\n\n // this is big and ugly.\n // why? Cos' it must unify checking validity state for both\n // `nano-...` and plain form fields.\n const validationState: ValidationState[] = [];\n\n this.allFields.forEach(async (field) => {\n const found = validationState.find((v) => v.name === this.getName(field));\n let pf: PlainFormEles;\n let nf: NanoFormEles;\n\n if (found) {\n if ((field as PlainFormEles).validationMessage) {\n pf = field as PlainFormEles;\n found.validityMessage = pf.validationMessage.length\n ? pf.validationMessage\n : found.validityMessage;\n this.internalValidate = true;\n if (found.valid && !pf.checkValidity()) found.valid = false;\n this.internalValidate = false;\n } else if ((field as NanoFormEles).validityMessage) {\n nf = field as NanoFormEles;\n found.validityMessage = nf.validityMessage.length\n ? nf.validityMessage\n : nf.validityMessage;\n if (found.valid && nf.invalid) found.valid = false;\n }\n if (!found.fields.find((f) => f === field)) found.fields.push(field);\n }\n\n let valid: boolean;\n let validityMessage: string;\n\n if ((field as PlainFormEles).checkValidity) {\n pf = field as PlainFormEles;\n this.internalValidate = true;\n valid = pf.checkValidity();\n this.internalValidate = false;\n validityMessage = pf.validationMessage;\n } else {\n nf = field as NanoFormEles;\n valid = !nf.invalid;\n validityMessage = nf.validityMessage;\n }\n\n validationState.push({\n fields: [field],\n name: this.getName(field),\n value: this._store.state[this.getName(field)],\n dirty: false,\n valid,\n validityMessage,\n });\n });\n\n return validationState;\n }\n\n /** By default, `nano-field-validator` will also track all native form field elements.\n * You can add extra web-component form fields to listen to\n * (as long as they match the standard form field spec) by using the `fieldSelector` prop.\n */\n @Prop() extraFieldSelector: string = 'input, select, textarea';\n\n /** A validation callback method.\n * @param field - The field name currently being evaluated\n * @param value - The value of the field currently being evaluated\n * @param fields - an array of all currently observered form fields and values\n * @returns field names mapped to an object of status message and validity e.g.\n * ```js\n * {field1: {msg: `This is invalid!`}, field2: {msg: `This is valid!`, valid: true}}\n * ```\n */\n @Prop() validation: (\n field: string,\n value: string,\n fields: ValidatorValueStore\n ) => { [key: string]: { msg: string; valid?: boolean } };\n\n /**\n * Sets the state of the form using an object of key / value pairs.\n * @param state - the state to load in the store\n */\n @Method()\n async setStore(state: ValidatorValueStore) {\n this.hasSetStore = true;\n Object.entries(state).forEach(([key, val]) => {\n this.store.state[key] = val;\n });\n }\n\n /**\n * Sets custom validity for all / some form fields.\n * @param validity - a validity object of `{fieldName: errorString}` pairs. Set as an empty string to clear the error.\n */\n @Method()\n async setCustomValidity(validity: { [key: string]: string }) {\n return await Promise.all(\n Object.entries(validity).map(async ([key, err]) => {\n const field = this.allFields.find((f) => this.getName(f) === key);\n if (!!field) await this.setFieldError(field, err);\n })\n );\n }\n\n /**\n * Clear all custom validation.\n * @returns a promise, resolved when all errors are cleared\n */\n @Method()\n async resetValidity() {\n return await Promise.all(\n this.allFields.map(async (field) => await this.setFieldError(field, ''))\n );\n }\n\n /** Fired whenever the payload changes */\n @Event() nanoPayloadChange: EventEmitter<ValidatorValueStore>;\n\n /**\n * Fired on valid form submission.\n * Note: if you wish to prevent a form from submitting, instead\n * of using / preventing the native `submit` event, use this event\n * ```js\n * ele.addEventListener('nanoSubmit', (e) => {\n * e.preventDefault()\n * })\n * ```\n */\n @Event() nanoSubmit: EventEmitter;\n\n /** Fire on invalid form submission attempt */\n @Event() nanoInvalid: EventEmitter;\n\n // private methods\n\n @Watch('extraFieldSelector')\n attachSlotObserver() {\n if (!!this.mo) return;\n const mo = (this.mo = new MutationObserver((_entries) => {\n const form = this.host.querySelector('form');\n if (form && form !== this.activeForm) this.activeForm = form;\n this.setupFields();\n }));\n mo.observe(this.host, {\n childList: true,\n attributes: true,\n attributeFilter: ['name'],\n subtree: true,\n });\n }\n\n /**\n * During spec tests, mockelement props aren't set - only attributes.\n * This irons out that kink\n * @param field\n * @returns the fields name prop or attr\n */\n private getName(field: PlainFormEles | NanoFormEles) {\n return field.name || field.getAttribute('name');\n }\n\n /** Checks for new `nano-...` fields and adds them to our watch array and value store */\n private setupFields() {\n let nanoFields = Array.from(\n this.host.querySelectorAll<NanoFormEles>(this.nanoFieldSelector)\n );\n\n let plainFields = Array.from(\n this.host.querySelectorAll<PlainFormEles>(this.extraFieldSelector)\n ).filter((e) => !e.closest(this.nanoFieldSelector));\n\n nanoFields = nanoFields.filter(\n (f) => !!this.getName(f) && !!this.getName(f).length\n );\n plainFields = plainFields.filter(\n (f) => !!this.getName(f) && !!this.getName(f).length\n );\n\n // do we have any currently un-watched fields?\n if (\n ![...nanoFields, ...plainFields].filter(\n (f) => !this.allFields.includes(f)\n ).length\n )\n return;\n\n // setup the initial store state / refresh on new fields\n this.nanoFields = nanoFields;\n this.plainFields = plainFields;\n this.allFields = [...nanoFields, ...plainFields];\n\n this.storeToFields(this.allFields);\n\n this.validateOnChange();\n this.fieldsToStore(this.allFields, true);\n this.nanoPayloadChange.emit(this._store.state);\n }\n\n private storeToFields(fields: Array<NanoFormEles | PlainFormEles>) {\n fields.forEach((field) => {\n const fieldName = this.getName(field);\n if (\n !fieldName.length ||\n typeof this._store.state[fieldName] === 'undefined'\n )\n return;\n\n if (\n field.tagName === 'NANO-CHECKBOX' ||\n ['radio', 'checkbox'].includes((field as HTMLInputElement).type)\n ) {\n const cbs = this.allFields.filter(\n (f) => this.getName(field) === this.getName(f)\n ) as HTMLNanoCheckboxElement[];\n if (\n cbs[0].type === 'radio' ||\n cbs[0].type === 'segment' ||\n cbs[0].type === 'segment-pill'\n ) {\n // single radio type control\n cbs.forEach((cb) => {\n if (this._store.state[fieldName] === cb.value) cb.checked = true;\n else cb.checked = false;\n });\n } else if (Array.isArray(this._store.state[fieldName])) {\n // multiple checkbox like controls\n cbs.forEach((cb) => {\n if (this._store.state[fieldName].includes(cb.value))\n cb.checked = true;\n else cb.checked = false;\n });\n } else {\n // single checkbox like control\n cbs.forEach((cb) => {\n if (this._store.state[fieldName] === cb.value) cb.checked = true;\n else cb.checked = false;\n });\n }\n return;\n }\n\n if (field.tagName === 'NANO-FILE-UPLOAD') {\n const ff = field as HTMLNanoFileUploadElement;\n // this can only work if the field is empty rn... a one-time deal\n if (!ff.files?.length) ff.files = this._store.state[fieldName];\n return;\n }\n\n // default\n field.value = this._store.state[fieldName];\n });\n }\n\n /** Loops through all `nano-...` fields and extracts their values into our store */\n private fieldsToStore(\n fields: Array<NanoFormEles | PlainFormEles>,\n init = false\n ) {\n fields.forEach((field) => {\n const fieldName = this.getName(field);\n if (!fieldName.length) return;\n\n if (!!this._store.state[fieldName] && this.hasSetStore && init) {\n // a new field is being added\n // but we already have a value for it\n // via a store that has been actively set\n // so let's not overwrite it\n return;\n }\n\n if (\n field.tagName === 'NANO-CHECKBOX' ||\n ['radio', 'checkbox'].includes((field as HTMLInputElement).type)\n ) {\n const cb = field as HTMLNanoCheckboxElement;\n\n if (\n cb.type === 'radio' ||\n cb.type === 'segment' ||\n cb.type === 'segment-pill'\n ) {\n // radio type control - only one can be checked\n if (cb.checked) this._store.state[fieldName] = cb.value;\n } else if (\n this.allFields.filter(\n (f) =>\n this.getName(f) === fieldName &&\n (f.tagName === 'NANO-CHECKBOX' ||\n (f as HTMLInputElement).type === 'checkbox')\n ).length > 1\n ) {\n // multiple checkbox type control\n const currentArr = Array.isArray(this._store.state[fieldName])\n ? this._store.state[fieldName]\n : [];\n if (cb.checked) {\n // checked\n if (!this._store.state[fieldName].includes(cb.value)) {\n this._store.state[fieldName] = [...currentArr, cb.value];\n }\n } else {\n // unchecked\n this._store.state[fieldName] = currentArr.filter(\n (v) => v !== cb.value\n );\n }\n } else {\n // single checkbox - on or off\n if (cb.checked) this._store.state[fieldName] = cb.value;\n else this._store.state[fieldName] = '';\n }\n return;\n }\n\n if (field.tagName === 'NANO-FILE-UPLOAD') {\n const ff = field as HTMLNanoFileUploadElement;\n if (!this.fileStateEqual(fieldName, ff))\n this._store.state[fieldName] = ff.files;\n\n return;\n }\n\n // default\n this._store.state[fieldName] = field.value;\n });\n }\n\n /**\n * Tries to ascertain whether the current model\n * value is the same as the `nano-file-upload` value\n * @param fieldName - the key to access from the data store\n * @param field - the nano-file-upload field to assess against\n * @returns true for equal, false for not equal\n */\n private fileStateEqual(\n fieldName: string | number,\n field: HTMLNanoFileUploadElement\n ) {\n return (\n JSON.stringify(this._store.state[fieldName]) ===\n JSON.stringify(field.files) ||\n this._store.state[fieldName] == field.files\n );\n }\n\n /**\n * Checks for user defined validations\n * @param key - current key of the data model to validate\n * @param newVal - the newly set, incoming value to validate\n */\n private async validate(key: string | number, newVal: any) {\n if (!this.validation) return;\n\n const res = this.validation(key as string, newVal, this._store.state);\n\n // no nothing - return\n if (!res) return;\n\n // stencil public methods are async\n // so we must coerce our validation\n // collection loop into a promise\n await Promise.all(\n Object.entries(res).map(async ([key, o]) => {\n // switch on/off validation messages\n const field = this.allFields.find((f) => this.getName(f) === key);\n let validityTarget:\n | PlainFormEles\n | NanoFormEles\n | HTMLNanoCheckboxGroupElement = field;\n\n if (field.tagName === 'NANO-CHECKBOX') {\n // if we have a checkbox-group, set the validation message there\n const cbg = field.closest('nano-checkbox-group');\n validityTarget = cbg || field;\n }\n\n if (\n ((validityTarget as NanoFormEles).validityMessage ||\n (validityTarget as PlainFormEles).validationMessage) === o.msg &&\n o.valid\n ) {\n // status is now valid - clear the error\n await this.setFieldError(validityTarget, '');\n } else if (!o.valid) {\n // status is invalid. Set the error\n await this.setFieldError(validityTarget, o.msg);\n }\n })\n );\n }\n\n /** Loops through all store entries and checks custom validation */\n private async validateAllFields() {\n // This forces our loop to `await` and finish sequentially ... silly async stencil methods\n await Object.entries(this._store.state).reduce(\n async (memo, [key, value]) => {\n await memo;\n await this.validate(key, value);\n },\n undefined as any\n );\n }\n\n /**\n * Utility to smooth out setting error messages\n * (it's a different method on `nano-checkbox` 'cos they don't show errors themselves)\n * @param field\n * @param msg\n */\n private async setFieldError(\n field: NanoFormEles | HTMLNanoCheckboxGroupElement | PlainFormEles,\n msg: string\n ) {\n if (field['showError']) {\n await (field as Exclude<NanoFormEles, HTMLNanoCheckboxElement>).showError(\n msg\n );\n } else if (field['setError'])\n await (field as HTMLNanoCheckboxElement).setError(msg);\n else (field as PlainFormEles).setCustomValidity(msg);\n }\n\n private scrollToFirstInvalid() {\n if (!this.scrollToInvalid) return;\n\n setTimeout(() => {\n const invalidField = this.validationState.find((f) => !f.valid);\n if (!invalidField) return;\n invalidField.fields[0].scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n });\n }, 200);\n }\n\n private submitForm() {\n const nanoSubmit = this.nanoSubmit.emit();\n if (nanoSubmit.defaultPrevented) return;\n this.activeForm.submit();\n }\n\n // Event handlers\n\n /**\n * Fired whenever store values change and potentially checks validity\n * @param key - the key of the store that's just changed\n * @param newVal - the incoming, new value\n */\n private handleStoreChange = async (key: string | number, newVal: any) => {\n const found = this.allFields.find((field) => this.getName(field) === key);\n\n // field update has come programmatically (not from ui),\n // so let's update the underlying ui field\n if (\n found &&\n (found.tagName === 'NANO-CHECKBOX' ||\n ['radio', 'checkbox'].includes((found as HTMLInputElement).type))\n ) {\n // it's a cb - always change\n this.storeToFields([found]);\n } else if (\n found &&\n ((found.tagName === 'NANO-FILE-UPLOAD' &&\n !this.fileStateEqual(key, found as HTMLNanoFileUploadElement)) ||\n (found.tagName !== 'NANO-FILE-UPLOAD' && found.value !== newVal))\n ) {\n // not a cb. Only change if value is different\n this.storeToFields([found]);\n }\n\n if (this.validateOn === 'dirty' && this.dirty) {\n this.internalValidate = true;\n await this.validateAllFields();\n this._valid = this.activeForm.checkValidity();\n this.internalValidate = false;\n }\n this.nanoPayloadChange.emit(this._store.state);\n };\n\n /**\n * Handles nano field value changes and passes to store\n * @param ev - the incoming change event\n */\n private handleFieldChange = (ev: NanoFormEvent) => {\n if (!this.nanoFields.includes(ev.target)) return;\n this._dirty = true;\n this.fieldsToStore([ev.target]);\n };\n\n /**\n * Handles non-nano field value changes and passes to store\n * @param ev - the incoming change event\n */\n private handlePlainFieldChange = (ev: PlainFormEvent) => {\n if (!this.plainFields.includes(ev.target)) return;\n this.fieldsToStore([ev.target]);\n };\n\n /**\n * Handles default field validation events\n * @param ev - the invalid event\n */\n private handleFormInvalid = async (ev: Event & { target: PlainFormEles }) => {\n // if it's a non-nano field, we'll let default html5 validation do it's thing\n if (!this.plainFields.includes(ev.target)) {\n ev.preventDefault();\n }\n\n this._valid = false;\n\n // whenever `checkValidity` is called, this handler is in-turn called.\n // this flag is used to stop infinite loops\n if (this.internalValidate) return;\n\n // a submit must have happened to if 'submitThenDirty' turn on 'dirty' checking now\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n this.submitted = true;\n\n await this.validateAllFields();\n this.internalValidate = true;\n this._valid = this.activeForm.checkValidity();\n this.internalValidate = false;\n\n // kinda insane...but if we're only validating on submit, then if the form is currently\n // in an invalid state, when submitting, it will fire an invalid event and not\n // submit the form. So let's test to make sure it is really invalid, and submit if not\n if (this.validateOn === 'submit') {\n if (this._valid) {\n this.submitForm();\n return;\n }\n }\n\n this.scrollToFirstInvalid();\n this.nanoInvalid.emit();\n };\n\n /**\n * stops default form submission, checks if valid, then submits manually\n * @param e - a submit event from the nested form element\n */\n private handleSubmit = async (e: Event) => {\n e.preventDefault();\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n this.submitted = true;\n await this.validateAllFields();\n\n this.internalValidate = true;\n this._valid = this.activeForm.checkValidity();\n this.internalValidate = false;\n\n if (!this._valid) {\n this.scrollToFirstInvalid();\n return;\n }\n this.submitForm();\n };\n\n connectedCallback(): void {\n this.userForm = this.host.querySelector('form');\n this._store = createStore<ValidatorValueStore>({});\n }\n\n componentDidLoad() {\n requestAnimationFrame(() => {\n this.setupFields();\n this.attachSlotObserver();\n\n this.host.addEventListener('nanoChange', this.handleFieldChange);\n this.host.addEventListener('input', this.handlePlainFieldChange);\n this.host.addEventListener('change', this.handlePlainFieldChange);\n this.host.addEventListener('submit', this.handleSubmit);\n this._store.on('set', this.handleStoreChange);\n });\n }\n\n disconnectedCallback() {\n if (this.mo) this.mo.disconnect();\n\n this.host.removeEventListener('nanoChange', this.handleFieldChange);\n this.host.removeEventListener('input', this.handlePlainFieldChange);\n this.host.removeEventListener('change', this.handlePlainFieldChange);\n this.host.removeEventListener('submit', this.handleSubmit);\n this._store.reset();\n\n if (this.activeForm)\n this.activeForm.removeEventListener(\n 'invalid',\n this.handleFormInvalid,\n true\n );\n }\n\n render() {\n return (\n <Host>\n {this.userForm && <slot />}\n {!this.userForm && (\n <form ref={(f) => (this.activeForm = f)}>\n <slot />\n </form>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- import{r as t,c as n,h as i,e,g as a}from"./p-47982da0.js";import{r as o}from"./p-33798b5f.js";import{F as r,a as s}from"./p-f8c7c20b.js";import{d as l,a as c}from"./p-9746b0a5.js";import{c as p}from"./p-845ae77e.js";import{c as h}from"./p-411bb8f1.js";const d='.sc-nano-input-h{-webkit-box-sizing:border-box;box-sizing:border-box}*.sc-nano-input,*.sc-nano-input::before,*.sc-nano-input::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden].sc-nano-input{display:none !important}[disabled].sc-nano-input-h:not([disabled=false]){opacity:0.5}.form-ctrl.sc-nano-input{min-inline-size:100%;display:block}.form-ctrl.has-helper-end.sc-nano-input{display:-webkit-box;display:-ms-flexbox;display:flex;gap:1rem;opacity:0}.form-ctrl.has-helper-end.is-ready.sc-nano-input{opacity:1}.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__wrapper.sc-nano-input{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__helper-end.sc-nano-input{display:none}.form-ctrl.has-helper-end.has-enough-width.sc-nano-input .form-ctrl__helper-end.sc-nano-input{display:block}.form-ctrl.has-helper-end.has-enough-width.sc-nano-input .form-ctrl__helper.sc-nano-input{display:none}.form-ctrl__wrapper.sc-nano-input{display:block}label.sc-nano-input,.form-ctrl__more.sc-nano-input,.form-ctrl__error.sc-nano-input,.form-ctrl__helper.sc-nano-input{display:block;inline-size:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}label.visually-hide.sc-nano-input,.form-ctrl__more.visually-hide.sc-nano-input,.form-ctrl__error.visually-hide.sc-nano-input,.form-ctrl__helper.visually-hide.sc-nano-input{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.form-ctrl__float-label.sc-nano-input{padding-block:0;-webkit-padding-end:0;padding-inline-end:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);color:var(--label-color);position:absolute;font-size:1.15em;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform-origin:top left;transform-origin:top left;inset-block-start:50%;-webkit-transition:0.125s ease-in;transition:0.125s ease-in;opacity:1}.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input,.has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input{-webkit-transform:translateY(-110%);transform:translateY(-110%);font-size:0.8em;opacity:0.7}.form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{opacity:0;-webkit-transition:opacity 0.125s ease-in;transition:opacity 0.125s ease-in}.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input,.has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{opacity:1}.form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{inset-block-start:50%}.has-focus.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{inset-block-start:0;-webkit-transform:translateY(38%);transform:translateY(38%)}.has-value.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{inset-block-start:0;-webkit-transform:translateY(38%);transform:translateY(38%)}.form-ctrl__label.sc-nano-input{color:var(--label-color);font-size:var(--label-font-size);-webkit-padding-after:var(--padding-bottom);padding-block-end:var(--padding-bottom);line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex}.form-ctrl__label.sc-nano-input .form-ctrl__label-wrap.sc-nano-input{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input{margin-block:unset;-webkit-margin-end:5px;margin-inline-end:5px;-webkit-margin-start:0;margin-inline-start:0;opacity:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-transition:0.3s ease opacity;transition:0.3s ease opacity;font-size:0.9em}.form-ctrl__label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{margin-block:unset;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:auto;margin-inline-start:auto;font-size:0.9em;opacity:0.5}.has-value.sc-nano-input-h .form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input{opacity:0.5}.has-focus.sc-nano-input-h .form-ctrl__label.sc-nano-input{color:var(--label-color--focus)}.is-invalid.sc-nano-input-h .form-ctrl__label.sc-nano-input{color:var(--label-color--invalid)}.has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{opacity:0;-webkit-transition:opacity 0.125s ease-in;transition:opacity 0.125s ease-in}.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{opacity:1}.form-ctrl__more.sc-nano-input{block-size:1em;position:relative;margin-block:4px var(--padding-bottom);margin-inline:3px 0}.form-ctrl__helper.sc-nano-input,.form-ctrl__error.sc-nano-input{inset-block-start:0;inset-inline-start:0;position:absolute;font-size:var(--invalid-msg-font-size);line-height:1.2;-webkit-transition:0.3s ease-out opacity;transition:0.3s ease-out opacity}.form-ctrl__helper.sc-nano-input{font-style:italic;color:var(--help-msg-color)}[show-inline-error].sc-nano-input-h:not([show-inline-error=false]).is-invalid .form-ctrl__helper.sc-nano-input{opacity:0}.form-ctrl__helper-end.sc-nano-input{-webkit-box-flex:1;-ms-flex:1 1 30%;flex:1 1 30%;min-inline-size:150px;font-size:var(--invalid-msg-font-size);color:var(--help-msg-color);font-style:italic}.form-ctrl__error.sc-nano-input{opacity:0;color:var(--invalid-msg-color);font-stretch:condensed}.is-invalid.sc-nano-input-h .form-ctrl__error.sc-nano-input{opacity:1}.form-ctrl__input.sc-nano-input{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--input-border-radius);inline-size:100%;padding:0 !important;position:relative;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;background:var(--input-bg-color);border:var(--input-border-style);border-width:var(--input-border-width);font-size:var(--input-font-size);-webkit-padding-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important;padding-inline-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important}.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--focus);border:var(--input-border-style--focus);border-width:var(--input-border-width);-webkit-padding-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important;padding-inline-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important}.is-invalid.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--invalid);border:var(--input-border-style--invalid);border-width:var(--input-border-width);-webkit-border-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);border-inline-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);-webkit-padding-start:0 !important;padding-inline-start:0 !important}.is-invalid.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--invalid);border:var(--input-border-style--invalid-focus);border-width:var(--input-border-width);-webkit-border-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);border-inline-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);-webkit-padding-start:0 !important;padding-inline-start:0 !important}.form-ctrl__input-wrap.sc-nano-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-flex:1;-ms-flex:1;flex:1;max-inline-size:100%}.form-ctrl__clear-btn.sc-nano-input,.form-ctrl__slot-end.sc-nano-input,.form-ctrl__slot-start.sc-nano-input,.form-ctrl__slot-value-end.sc-nano-input{--nano-icon-size:1.4em;margin-block:0;margin-inline:0;font-size:1em;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;inline-size:auto}.has-float-label.sc-nano-input .form-ctrl__slot-start.sc-nano-input{display:none}.form-ctrl__slot-start.sc-nano-input-s>*,.form-ctrl__slot-start .sc-nano-input-s>*,.form-ctrl__slot-end.sc-nano-input-s>*,.form-ctrl__slot-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input-s>*,.form-ctrl__slot-value-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{--nano-icon-size:1.4em;padding-inline:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);font-size:1em;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;block-size:100%;z-index:1}.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start .sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end .sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end .sc-nano-input-s>*,[disabled].sc-nano-input-h:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{pointer-events:none}.form-ctrl__slot-value-end.sc-nano-input-s>*,.form-ctrl__slot-value-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{pointer-events:none}.form-ctrl__clear-btn.sc-nano-input{color:var(--clear-btn-color);padding:0;opacity:0;inline-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden}.is-invalid.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input{color:var(--clear-btn-color--invalid)}.has-value.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input{padding-block:0;padding-inline:var(--padding-start) var(--padding-end);opacity:1;inline-size:auto}.form-ctrl__clear-btn.sc-nano-input:hover{color:var(--clear-btn-color--hover)}.sc-nano-input-h{--placeholder-color:var(--nano-input-placeholder-color, initial);--placeholder-font-style:var(--nano-input-placeholder-style, initial);--placeholder-font-weight:var(--nano-input-placeholder-weight, initial);--placeholder-opacity:var(--nano-input-placeholder-opacity, 0.5);--padding-top:var(--nano-input-padding-top, var(--nano-input-padding, 8px));--padding-end:var(--nano-input-padding-end, var(--nano-input-padding, 8px));--padding-bottom:var(--nano-input-padding-bottom, var(--nano-input-padding, 6px));--padding-start:var(--nano-input-padding-start, var(--nano-input-padding, 8px));--color-invalid:var(--nano-color-danger-rgb, 239, 65, 53);--color--focus-rgb:var(\n --nano-color-base-rgb,\n var(--nano-color-primary-rgb, 0, 116, 149)\n );--input-font-size:var(--nano-input-font-size, 0.87em);--input-text-color:var(--nano-input-text-color, #4a4a4a);--input-border-width:var(--nano-input-border-width, 1px);--input-border-hint-width:3px;--input-border-color:var(--nano-input-border-color, #e4e6e8);--input-border-radius:var(--nano-input-border-radius, 0);--input-border-style:var(--nano-input-border-style, solid) var(--nano-input-border-color, #e4e6e8);--input-border-style--focus:var(--nano-input-border-style, solid) var(--nano-input-border-color--focus, #90c6e7);--input-border-style--invalid:var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #e4e6e8);--input-border-style--invalid-focus:var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #ef4135);--input-bg-color:var(--nano-input-background-color, #fff);--input-bg-color--focus:var(--input-bg-color);--input-bg-color--invalid:var(--nano-input-background-color, white);--invalid-msg-color:rgba(var(--color-invalid), 1);--invalid-msg-font-size:var(--nano-input-help-font-size, 0.75em);--help-msg-color:var(--nano-input-help-color, #616d6e);--clear-btn-color:var(--nano-clear-btn-color, rgba(0, 0, 0, 0.3));--clear-btn-color--hover:rgba(var(--color--focus-rgb), 1);--clear-btn-color--invalid:rgba(var(--color-invalid), 1);--label-color:var(--nano-input-label-color, "currentColor");--label-color--focus:var(--label-color);--label-color--invalid:var(--nano-input-label-color-invalid, "currentColor");--label-font-size:var(--nano-input-label-color, 1em);--multi-input-value-bg:var(--nano-input-tag-bg, 186, 220, 240);--multi-input-value-text-color:var(--nano-input-tag-color, #455556);--multi-input-value-border:var(--nano-input-tag-color, #badcf0);position:relative;inline-size:100%;padding:0 !important;color:currentColor;display:block}.nano-color.sc-nano-input-h{color:var(--nano-color-base);--input-border-style--focus:var(--nano-input-border-style, solid) var(--nano-color-tint, var(--nano-color-primary-tint, #2689a5))}.input__native-ctrl.sc-nano-input{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-block:logical unset;padding-inline:var(--padding-start) var(--padding-end);border-radius:var(--input-border-radius);text-overflow:ellipsis;color:var(--input-text-color);display:inline-block;-webkit-box-flex:1;-ms-flex:1;flex:1;inline-size:100%;max-inline-size:100%;max-block-size:100%;border:0;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none;overflow:hidden;line-height:2.5em;min-block-size:2.5em}.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{line-height:2.1em;min-block-size:2.1em;-webkit-padding-before:1.4em;padding-block-start:1.4em}.input__native-ctrl.sc-nano-input::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::-moz-placeholder{line-height:2.8em;text-overflow:ellipsis}.input__native-ctrl.sc-nano-input:-webkit-autofill{background-color:transparent}.input__native-ctrl.sc-nano-input::-webkit-search-decoration,.input__native-ctrl.sc-nano-input::-webkit-search-cancel-button,.input__native-ctrl.sc-nano-input::-webkit-search-results-button,.input__native-ctrl.sc-nano-input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.input__native-ctrl.sc-nano-input:invalid{-webkit-box-shadow:none;box-shadow:none}.input__native-ctrl.sc-nano-input::-ms-clear,.input__native-ctrl.sc-nano-input::-ms-reveal{display:none}.input__native-ctrl.input__resizable.sc-nano-input{resize:vertical;overflow:auto}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input{line-height:1.5em;padding-block:var(--padding-top) 0.25em;white-space:pre-wrap}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-webkit-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-moz-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input:-ms-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-ms-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::placeholder{line-height:1.5em}.has-float-label.sc-nano-input .form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input{-webkit-padding-before:1.75em;padding-block-start:1.75em}[readonly].sc-nano-input-h:not([readonly=false]) .input__native-ctrl.sc-nano-input{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}';let u=0;const b=class{constructor(i){t(this,i);this.nanoInput=n(this,"nanoInput",7);this.nanoChange=n(this,"nanoChange",7);this.nanoBlur=n(this,"nanoBlur",7);this.nanoFocus=n(this,"nanoFocus",7);this.nanoDidLoad=n(this,"nanoDidLoad",7);this.nanoDidUnload=n(this,"nanoDidUnload",7);this.nanoValidate=n(this,"nanoValidate",7);this.inputId=`nano-input-${u++}`;this.didBlurAfterEdit=false;this.rtl=false;this.charCount=0;this.hasRendered=false;this.hasFocus=false;this.hasLabelSlot=false;this.hasHelperSlot=false;this.hasHelperEndSlot=false;this.errorMessage="";this.datalist=null;this._invalid=false;this.autocapitalise="none";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.clearInput=false;this.debounce=0;this.disabled=false;this.validateOn="submitThenDirty";this.showInlineError=true;this.hideLabel=false;this.floatLabel=false;this.name=this.inputId;this.readonly=false;this.required=false;this.spellcheck=false;this.type="text";this.value="";this.resize="auto";this.rows=2;this.showCharCount=false;this.validate=t=>{if(this.validateOn==="submitThenDirty")this.validateOn="dirty";if(!this.nativeInput.validity.valid){if(this.showInlineError){if(t)t.preventDefault();this.errorMessage=this.nativeInput.validationMessage}this._invalid=true}else this._invalid=false;this.nanoValidate.emit({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage,originalEvent:t})};this.onInput=t=>{const n=t.target;this.value=(n===null||n===void 0?void 0:n.value)||"";this.nanoInput.emit(t)};this.onBlur=()=>{this.hasFocus=false;this.focusChanged();if(this.validateOn==="dirty")this.validate();this.nanoBlur.emit()};this.onFocus=()=>{this.hasFocus=true;this.focusChanged();this.nanoFocus.emit()};this.onKeydown=()=>{if(this.shouldClearOnEdit()){if(this.didBlurAfterEdit&&this.hasValue()){this.clearTextInput()}this.didBlurAfterEdit=false}};this.clearTextInput=t=>{if(this.clearInput&&!this.readonly&&!this.disabled&&t){t.preventDefault();t.stopPropagation()}this.value="";this.nativeInput.value="";const n=new window.Event("change");this.nativeInput.dispatchEvent(n)};this.validate=l(this.validate,50);this.handleBlur=this.handleBlur.bind(this)}get nativeInputWrap(){return this._nativeInputWrap}set nativeInputWrap(t){if(this._nativeInputWrap===t)return;this._nativeInputWrap=t;this.setDataListOpts()}setDataListOpts(){if(!this.datalist)return;const t=this.datalist.dropDownConfig||{};this.datalist.dropDownConfig=Object.assign(Object.assign({},t),{skidding:-1,tetherTo:this.nativeInputWrap})}get invalid(){return this._invalid}get validityMessage(){if(!this.nativeInput)return"";return this.nativeInput.validationMessage}shouldValidate(){if(!this.hasRendered)return;requestAnimationFrame((()=>{if(this.validateOn==="dirty")this.validate()}))}valueChanged(){this.nanoChange.emit({value:this.value});this.charCount=this.value.length;if(this.type==="textarea"&&this.resize==="auto"){this.nativeInput.style.height="auto";if(this.value.length)this.nativeInput.style.height=this.nativeInput.scrollHeight+"px"}requestAnimationFrame((()=>{if(this.validateOn==="dirty")this.validate()}))}debounceChanged(){this.nanoChange=c(this.nanoChange,this.debounce)}async reportValidity(t){return new Promise((n=>{if(t)this.validate();setTimeout((()=>{n({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage})}),50)}))}async setFocus(){if(this.nativeInput){this.nativeInput.focus();this.nativeInput.click()}}async select(){if(this.nativeInput){this.nativeInput.select()}}getInputElement(){return Promise.resolve(this.nativeInput)}async showError(t){if(this.nativeInput){this.nativeInput.setCustomValidity(t);this.validate()}}onReset(t){const n=this.form?document.querySelector("#"+this.form):this.el.closest("form");if(!n||t.target!==this.el.closest("form"))return;this.value=""}handleBlur(t){if(!this.hasFocus)return;const n=t;let i;o((()=>{if(t instanceof KeyboardEvent&&n.key){if(n.key!=="Tab")return;i=document.activeElement}else if(t instanceof FocusEvent){i=document.activeElement}else i=t.target;if(p(this.el.tagName.toLowerCase(),i)!==this.el){this.onBlur()}}))}shouldClearOnEdit(){const{type:t,clearOnEdit:n}=this;return n===undefined?t==="password":n}getValue(){return this.value||""}focusChanged(){if(!this.hasFocus&&this.shouldClearOnEdit()&&this.hasValue()){this.didBlurAfterEdit=true}}hasValue(){return this.getValue().length>0}slotChangeObserver(){if(this.mo)this.mo.disconnect();const t=this.mo=new MutationObserver((()=>this.processSlottedContent()));t.observe(this.el,{childList:true,subtree:true})}processSlottedContent(){this.hasLabelSlot=!!this.el.querySelectorAll('[slot="label"]');this.hasHelperSlot=!!this.el.querySelector('[slot="helper"]');this.hasHelperEndSlot=!!this.el.querySelector('[slot="helper-end"]');this.datalist=this.el.querySelector("nano-datalist:not([slot])");if(!!this.el.querySelector('[slot="inline-button"]')){console.warn("The `inline-button` slot was renamed to `end` in v2 - please update your code",this.el)}}connectedCallback(){this.debounceChanged();{this.el.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.el}))}}disconnectedCallback(){{document.dispatchEvent(new CustomEvent("nanoDidUnload",{detail:this.el}))}if(this.mo)this.mo.disconnect()}componentDidLoad(){this.slotChangeObserver();this.hasRendered=true;if(this.autofocus)setTimeout((t=>this.setFocus()),300)}componentWillLoad(){this.processSlottedContent()}render(){const t=this.getValue();const n=this.inputId+"-lbl";const a=this.showInlineError||this.hasHelperSlot?this.inputId+"-more":"";const o=this.hasHelperEndSlot?this.inputId+"-helper":"";this.rtl=this.el.ownerDocument.dir==="rtl";const l=(({el:t,floatLabel:n,label:i,errorMessage:e,type:a,showInlineError:o,hasHelperSlot:r,hasLabelSlot:s,hideLabel:l,placeholder:c,maxlength:p,charCount:h,showCharCount:d,rtl:u,hasHelperEndSlot:b})=>({el:t,floatLabel:n,label:i,errorMessage:e,type:a,showInlineError:o,hasHelperSlot:r,hasLabelSlot:s,hideLabel:l,placeholder:c,maxlength:p,charCount:h,showCharCount:d,rtl:u,hasHelperEndSlot:b}))(this);const c=Object.assign(Object.assign({},l),{labelId:n,moreId:a,helperEndId:o,hasValue:this.hasValue(),controlId:this.inputId});const p=(({clearInput:t,readonly:n,disabled:i})=>({clearInput:t,readonly:n,disabled:i,clearControl:this.clearInput}))(this);return i(e,{"aria-disabled":this.disabled?"true":null,dir:this.rtl?"rtl":null,class:Object.assign(Object.assign({},h(this.color)),{"has-value":this.hasValue(),"has-focus":this.hasFocus,"is-invalid":this._invalid})},i(r,Object.assign({},c),i(s,Object.assign({},p,{onClearText:this.clearTextInput,control:this.el,ref:t=>this.nativeInputWrap=t}),this.type!=="textarea"&&i("input",{id:this.inputId,class:"input__native-ctrl",ref:t=>this.nativeInput=t,"aria-labelledby":n+" "+a+" "+o,disabled:this.disabled,accept:this.accept,autoCapitalize:this.autocapitalise,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,autoFocus:this.autofocus,inputMode:this.inputmode,form:this.form,min:this.min,max:this.max,minLength:this.minlength,maxLength:this.maxlength,multiple:this.multiple,name:this.name,pattern:this.pattern,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,step:this.step,size:this.size,type:this.type,value:t,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onBlur:this.handleBlur,onKeyDown:this.onKeydown,onInvalid:this.validate}),this.type==="textarea"&&i("textarea",{rows:this.floatLabel?1:this.rows,id:this.inputId,class:{"input__native-ctrl":true,input__resizable:this.resize==="true"},ref:t=>this.nativeInput=t,"aria-labelledby":n+" "+a+" "+o,disabled:this.disabled,autoCapitalize:this.autocapitalise,autoCorrect:this.autocorrect,autoFocus:this.autofocus,inputMode:this.inputmode,form:this.form,minLength:this.minlength,maxLength:this.maxlength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,value:t,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeydown,onInvalid:this.validate,onBlur:this.handleBlur})),i("slot",null)))}get el(){return a(this)}static get watchers(){return{datalist:["setDataListOpts"],minlength:["shouldValidate"],maxlength:["shouldValidate"],min:["shouldValidate"],max:["shouldValidate"],required:["shouldValidate"],disabled:["shouldValidate"],readonly:["shouldValidate"],pattern:["shouldValidate"],inputmode:["shouldValidate"],value:["valueChanged"],debounce:["debounceChanged"]}}};b.style=d;export{b as nano_input};
5
- //# sourceMappingURL=p-d74f4b9d.entry.js.map
4
+ import{r as t,c as n,h as i,e,g as a}from"./p-47982da0.js";import{r as o}from"./p-33798b5f.js";import{F as r,a as s}from"./p-f8c7c20b.js";import{d as l,a as c}from"./p-9746b0a5.js";import{c as p}from"./p-845ae77e.js";import{c as h}from"./p-411bb8f1.js";const d='.sc-nano-input-h{-webkit-box-sizing:border-box;box-sizing:border-box}*.sc-nano-input,*.sc-nano-input::before,*.sc-nano-input::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden].sc-nano-input{display:none !important}[disabled].sc-nano-input-h:not([disabled=false]){opacity:0.5}.form-ctrl.sc-nano-input{min-inline-size:100%;display:block}.form-ctrl.has-helper-end.sc-nano-input{display:-webkit-box;display:-ms-flexbox;display:flex;gap:1rem;opacity:0}.form-ctrl.has-helper-end.is-ready.sc-nano-input{opacity:1}.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__wrapper.sc-nano-input{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__helper-end.sc-nano-input{display:none}.form-ctrl.has-helper-end.has-enough-width.sc-nano-input .form-ctrl__helper-end.sc-nano-input{display:block}.form-ctrl.has-helper-end.has-enough-width.sc-nano-input .form-ctrl__helper.sc-nano-input{display:none}.form-ctrl__wrapper.sc-nano-input{display:block}label.sc-nano-input,.form-ctrl__more.sc-nano-input,.form-ctrl__error.sc-nano-input,.form-ctrl__helper.sc-nano-input{display:block;inline-size:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}label.visually-hide.sc-nano-input,.form-ctrl__more.visually-hide.sc-nano-input,.form-ctrl__error.visually-hide.sc-nano-input,.form-ctrl__helper.visually-hide.sc-nano-input{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.form-ctrl__float-label.sc-nano-input{padding-block:0;-webkit-padding-end:0;padding-inline-end:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);color:var(--label-color);position:absolute;font-size:1.15em;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform-origin:top left;transform-origin:top left;inset-block-start:50%;-webkit-transition:0.125s ease-in;transition:0.125s ease-in;opacity:1}.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input,.has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input{-webkit-transform:translateY(-110%);transform:translateY(-110%);font-size:0.8em;opacity:0.7}.form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{opacity:0;-webkit-transition:opacity 0.125s ease-in;transition:opacity 0.125s ease-in}.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input,.has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{opacity:1}.form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{inset-block-start:50%}.has-focus.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{inset-block-start:0;-webkit-transform:translateY(38%);transform:translateY(38%)}.has-value.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{inset-block-start:0;-webkit-transform:translateY(38%);transform:translateY(38%)}.form-ctrl__label.sc-nano-input{color:var(--label-color);font-size:var(--label-font-size);-webkit-padding-after:var(--padding-bottom);padding-block-end:var(--padding-bottom);line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex}.form-ctrl__label.sc-nano-input .form-ctrl__label-wrap.sc-nano-input{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input{margin-block:unset;-webkit-margin-end:5px;margin-inline-end:5px;-webkit-margin-start:0;margin-inline-start:0;opacity:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-transition:0.3s ease opacity;transition:0.3s ease opacity;font-size:0.9em}.form-ctrl__label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{margin-block:unset;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:auto;margin-inline-start:auto;font-size:0.9em;opacity:0.5}.has-value.sc-nano-input-h .form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input{opacity:0.5}.has-focus.sc-nano-input-h .form-ctrl__label.sc-nano-input{color:var(--label-color--focus)}.is-invalid.sc-nano-input-h .form-ctrl__label.sc-nano-input{color:var(--label-color--invalid)}.has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{opacity:0;-webkit-transition:opacity 0.125s ease-in;transition:opacity 0.125s ease-in}.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{opacity:1}.form-ctrl__more.sc-nano-input{block-size:1em;position:relative;margin-block:4px var(--padding-bottom);margin-inline:3px 0}.form-ctrl__helper.sc-nano-input,.form-ctrl__error.sc-nano-input{inset-block-start:0;inset-inline-start:0;position:absolute;font-size:var(--invalid-msg-font-size);line-height:1.2;-webkit-transition:0.3s ease-out opacity;transition:0.3s ease-out opacity}.form-ctrl__helper.sc-nano-input{font-style:italic;color:var(--help-msg-color)}[show-inline-error].sc-nano-input-h:not([show-inline-error=false]).is-invalid .form-ctrl__helper.sc-nano-input{opacity:0}.form-ctrl__helper-end.sc-nano-input{-webkit-box-flex:1;-ms-flex:1 1 30%;flex:1 1 30%;min-inline-size:150px;font-size:var(--invalid-msg-font-size);color:var(--help-msg-color);font-style:italic}.form-ctrl__error.sc-nano-input{opacity:0;color:var(--invalid-msg-color);font-stretch:condensed}.is-invalid.sc-nano-input-h .form-ctrl__error.sc-nano-input{opacity:1}.form-ctrl__input.sc-nano-input{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--input-border-radius);inline-size:100%;padding:0 !important;position:relative;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;background:var(--input-bg-color);border:var(--input-border-style);border-width:var(--input-border-width);font-size:var(--input-font-size);-webkit-padding-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important;padding-inline-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important}.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--focus);border:var(--input-border-style--focus);border-width:var(--input-border-width);-webkit-padding-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important;padding-inline-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important}.is-invalid.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--invalid);border:var(--input-border-style--invalid);border-width:var(--input-border-width);-webkit-border-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);border-inline-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);-webkit-padding-start:0 !important;padding-inline-start:0 !important}.is-invalid.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--invalid);border:var(--input-border-style--invalid-focus);border-width:var(--input-border-width);-webkit-border-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);border-inline-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);-webkit-padding-start:0 !important;padding-inline-start:0 !important}.form-ctrl__input-wrap.sc-nano-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-flex:1;-ms-flex:1;flex:1;max-inline-size:100%}.form-ctrl__clear-btn.sc-nano-input,.form-ctrl__slot-end.sc-nano-input,.form-ctrl__slot-start.sc-nano-input,.form-ctrl__slot-value-end.sc-nano-input{--nano-icon-size:1.4em;margin-block:0;margin-inline:0;font-size:1em;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;inline-size:auto}.has-float-label.sc-nano-input .form-ctrl__slot-start.sc-nano-input{display:none}.form-ctrl__slot-start.sc-nano-input-s>*,.form-ctrl__slot-start .sc-nano-input-s>*,.form-ctrl__slot-end.sc-nano-input-s>*,.form-ctrl__slot-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input-s>*,.form-ctrl__slot-value-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{--nano-icon-size:1.4em;padding-inline:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);font-size:1em;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;block-size:100%;z-index:1}.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start .sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end .sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end .sc-nano-input-s>*,[disabled].sc-nano-input-h:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{pointer-events:none}.form-ctrl__slot-value-end.sc-nano-input-s>*,.form-ctrl__slot-value-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{pointer-events:none}.form-ctrl__clear-btn.sc-nano-input{color:var(--clear-btn-color);padding:0;opacity:0;inline-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden}.is-invalid.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input{color:var(--clear-btn-color--invalid)}.has-value.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input{padding-block:0;padding-inline:var(--padding-start) var(--padding-end);opacity:1;inline-size:auto}.form-ctrl__clear-btn.sc-nano-input:hover{color:var(--clear-btn-color--hover)}.sc-nano-input-h{--placeholder-color:var(--nano-input-placeholder-color, initial);--placeholder-font-style:var(--nano-input-placeholder-style, initial);--placeholder-font-weight:var(--nano-input-placeholder-weight, initial);--placeholder-opacity:var(--nano-input-placeholder-opacity, 0.5);--padding-top:var(--nano-input-padding-top, var(--nano-input-padding, 8px));--padding-end:var(--nano-input-padding-end, var(--nano-input-padding, 8px));--padding-bottom:var(--nano-input-padding-bottom, var(--nano-input-padding, 6px));--padding-start:var(--nano-input-padding-start, var(--nano-input-padding, 8px));--color-invalid:var(--nano-color-danger-rgb, 239, 65, 53);--color--focus-rgb:var(\n --nano-color-base-rgb,\n var(--nano-color-primary-rgb, 0, 116, 149)\n );--input-font-size:var(--nano-input-font-size, 0.87em);--input-text-color:var(--nano-input-text-color, #4a4a4a);--input-border-width:var(--nano-input-border-width, 1px);--input-border-hint-width:3px;--input-border-color:var(--nano-input-border-color, #e4e6e8);--input-border-radius:var(--nano-input-border-radius, 0);--input-border-style:var(--nano-input-border-style, solid) var(--nano-input-border-color, #e4e6e8);--input-border-style--focus:var(--nano-input-border-style, solid) var(--nano-input-border-color--focus, #90c6e7);--input-border-style--invalid:var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #e4e6e8);--input-border-style--invalid-focus:var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #ef4135);--input-bg-color:var(--nano-input-background-color, #fff);--input-bg-color--focus:var(--input-bg-color);--input-bg-color--invalid:var(--nano-input-background-color, white);--invalid-msg-color:rgba(var(--color-invalid), 1);--invalid-msg-font-size:var(--nano-input-help-font-size, 0.75em);--help-msg-color:var(--nano-input-help-color, #616d6e);--clear-btn-color:var(--nano-clear-btn-color, rgba(0, 0, 0, 0.3));--clear-btn-color--hover:rgba(var(--color--focus-rgb), 1);--clear-btn-color--invalid:rgba(var(--color-invalid), 1);--label-color:var(--nano-input-label-color, "currentColor");--label-color--focus:var(--label-color);--label-color--invalid:var(--nano-input-label-color-invalid, "currentColor");--label-font-size:var(--nano-input-label-color, 1em);--multi-input-value-bg:var(--nano-input-tag-bg, 186, 220, 240);--multi-input-value-text-color:var(--nano-input-tag-color, #455556);--multi-input-value-border:var(--nano-input-tag-color, #badcf0);position:relative;inline-size:100%;padding:0 !important;color:currentColor;display:block}.nano-color.sc-nano-input-h{color:var(--nano-color-base);--input-border-style--focus:var(--nano-input-border-style, solid) var(--nano-color-tint, var(--nano-color-primary-tint, #2689a5))}.input__native-ctrl.sc-nano-input{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-block:0;padding-inline:var(--padding-start) var(--padding-end);border-radius:var(--input-border-radius);text-overflow:ellipsis;color:var(--input-text-color);display:inline-block;-webkit-box-flex:1;-ms-flex:1;flex:1;inline-size:100%;max-inline-size:100%;max-block-size:100%;border:0;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none;overflow:hidden;line-height:2.5em;min-height:2.5em}.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{line-height:2.1em;min-height:2.1em;-webkit-padding-before:1.4em;padding-block-start:1.4em}.input__native-ctrl.sc-nano-input::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-block-size:inherit}.input__native-ctrl.sc-nano-input::-moz-placeholder{line-height:2.8em;text-overflow:ellipsis}.input__native-ctrl.sc-nano-input:-webkit-autofill{background-color:transparent}.input__native-ctrl.sc-nano-input::-webkit-search-decoration,.input__native-ctrl.sc-nano-input::-webkit-search-cancel-button,.input__native-ctrl.sc-nano-input::-webkit-search-results-button,.input__native-ctrl.sc-nano-input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.input__native-ctrl.sc-nano-input:invalid{-webkit-box-shadow:none;box-shadow:none}.input__native-ctrl.sc-nano-input::-ms-clear,.input__native-ctrl.sc-nano-input::-ms-reveal{display:none}.input__native-ctrl.input__resizable.sc-nano-input{resize:vertical;overflow:auto}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input{line-height:1.5em;padding-block:var(--padding-top) 0.25em;white-space:pre-wrap}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-webkit-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-moz-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input:-ms-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-ms-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::placeholder{line-height:1.5em}.has-float-label.sc-nano-input .form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input{-webkit-padding-before:1.75em;padding-block-start:1.75em}[readonly].sc-nano-input-h:not([readonly=false]) .input__native-ctrl.sc-nano-input{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}';let u=0;const b=class{constructor(i){t(this,i);this.nanoInput=n(this,"nanoInput",7);this.nanoChange=n(this,"nanoChange",7);this.nanoBlur=n(this,"nanoBlur",7);this.nanoFocus=n(this,"nanoFocus",7);this.nanoDidLoad=n(this,"nanoDidLoad",7);this.nanoDidUnload=n(this,"nanoDidUnload",7);this.nanoValidate=n(this,"nanoValidate",7);this.inputId=`nano-input-${u++}`;this.didBlurAfterEdit=false;this.rtl=false;this.charCount=0;this.hasRendered=false;this.hasFocus=false;this.hasLabelSlot=false;this.hasHelperSlot=false;this.hasHelperEndSlot=false;this.errorMessage="";this.datalist=null;this._invalid=false;this.autocapitalise="none";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.clearInput=false;this.debounce=0;this.disabled=false;this.validateOn="submitThenDirty";this.showInlineError=true;this.hideLabel=false;this.floatLabel=false;this.name=this.inputId;this.readonly=false;this.required=false;this.spellcheck=false;this.type="text";this.value="";this.resize="auto";this.rows=2;this.showCharCount=false;this.validate=t=>{if(this.validateOn==="submitThenDirty")this.validateOn="dirty";if(!this.nativeInput.validity.valid){if(this.showInlineError){if(t)t.preventDefault();this.errorMessage=this.nativeInput.validationMessage}this._invalid=true}else this._invalid=false;this.nanoValidate.emit({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage,originalEvent:t})};this.onInput=t=>{const n=t.target;this.value=(n===null||n===void 0?void 0:n.value)||"";this.nanoInput.emit(t)};this.onBlur=()=>{this.hasFocus=false;this.focusChanged();if(this.validateOn==="dirty")this.validate();this.nanoBlur.emit()};this.onFocus=()=>{this.hasFocus=true;this.focusChanged();this.nanoFocus.emit()};this.onKeydown=()=>{if(this.shouldClearOnEdit()){if(this.didBlurAfterEdit&&this.hasValue()){this.clearTextInput()}this.didBlurAfterEdit=false}};this.clearTextInput=t=>{if(this.clearInput&&!this.readonly&&!this.disabled&&t){t.preventDefault();t.stopPropagation()}this.value="";this.nativeInput.value="";const n=new window.Event("change");this.nativeInput.dispatchEvent(n)};this.validate=l(this.validate,50);this.handleBlur=this.handleBlur.bind(this)}get nativeInputWrap(){return this._nativeInputWrap}set nativeInputWrap(t){if(this._nativeInputWrap===t)return;this._nativeInputWrap=t;this.setDataListOpts()}setDataListOpts(){if(!this.datalist)return;const t=this.datalist.dropDownConfig||{};this.datalist.dropDownConfig=Object.assign(Object.assign({},t),{skidding:-1,tetherTo:this.nativeInputWrap})}get invalid(){return this._invalid}get validityMessage(){if(!this.nativeInput)return"";return this.nativeInput.validationMessage}shouldValidate(){if(!this.hasRendered)return;requestAnimationFrame((()=>{if(this.validateOn==="dirty")this.validate()}))}valueChanged(){this.nanoChange.emit({value:this.value});this.charCount=this.value.length;if(this.type==="textarea"&&this.resize==="auto"){this.nativeInput.style.height="auto";if(this.value.length)this.nativeInput.style.height=this.nativeInput.scrollHeight+"px"}requestAnimationFrame((()=>{if(this.validateOn==="dirty")this.validate()}))}debounceChanged(){this.nanoChange=c(this.nanoChange,this.debounce)}async reportValidity(t){return new Promise((n=>{if(t)this.validate();setTimeout((()=>{n({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage})}),50)}))}async setFocus(){if(this.nativeInput){this.nativeInput.focus();this.nativeInput.click()}}async select(){if(this.nativeInput){this.nativeInput.select()}}getInputElement(){return Promise.resolve(this.nativeInput)}async showError(t){if(this.nativeInput){this.nativeInput.setCustomValidity(t);this.validate()}}onReset(t){const n=this.form?document.querySelector("#"+this.form):this.el.closest("form");if(!n||t.target!==this.el.closest("form"))return;this.value=""}handleBlur(t){if(!this.hasFocus)return;const n=t;let i;o((()=>{if(t instanceof KeyboardEvent&&n.key){if(n.key!=="Tab")return;i=document.activeElement}else if(t instanceof FocusEvent){i=document.activeElement}else i=t.target;if(p(this.el.tagName.toLowerCase(),i)!==this.el){this.onBlur()}}))}shouldClearOnEdit(){const{type:t,clearOnEdit:n}=this;return n===undefined?t==="password":n}getValue(){return this.value||""}focusChanged(){if(!this.hasFocus&&this.shouldClearOnEdit()&&this.hasValue()){this.didBlurAfterEdit=true}}hasValue(){return this.getValue().length>0}slotChangeObserver(){if(this.mo)this.mo.disconnect();const t=this.mo=new MutationObserver((()=>this.processSlottedContent()));t.observe(this.el,{childList:true,subtree:true})}processSlottedContent(){this.hasLabelSlot=!!this.el.querySelectorAll('[slot="label"]');this.hasHelperSlot=!!this.el.querySelector('[slot="helper"]');this.hasHelperEndSlot=!!this.el.querySelector('[slot="helper-end"]');this.datalist=this.el.querySelector("nano-datalist:not([slot])");if(!!this.el.querySelector('[slot="inline-button"]')){console.warn("The `inline-button` slot was renamed to `end` in v2 - please update your code",this.el)}}connectedCallback(){this.debounceChanged();{this.el.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.el}))}}disconnectedCallback(){{document.dispatchEvent(new CustomEvent("nanoDidUnload",{detail:this.el}))}if(this.mo)this.mo.disconnect()}componentDidLoad(){this.slotChangeObserver();this.hasRendered=true;if(this.autofocus)setTimeout((t=>this.setFocus()),300)}componentWillLoad(){this.processSlottedContent()}render(){const t=this.getValue();const n=this.inputId+"-lbl";const a=this.showInlineError||this.hasHelperSlot?this.inputId+"-more":"";const o=this.hasHelperEndSlot?this.inputId+"-helper":"";this.rtl=this.el.ownerDocument.dir==="rtl";const l=(({el:t,floatLabel:n,label:i,errorMessage:e,type:a,showInlineError:o,hasHelperSlot:r,hasLabelSlot:s,hideLabel:l,placeholder:c,maxlength:p,charCount:h,showCharCount:d,rtl:u,hasHelperEndSlot:b})=>({el:t,floatLabel:n,label:i,errorMessage:e,type:a,showInlineError:o,hasHelperSlot:r,hasLabelSlot:s,hideLabel:l,placeholder:c,maxlength:p,charCount:h,showCharCount:d,rtl:u,hasHelperEndSlot:b}))(this);const c=Object.assign(Object.assign({},l),{labelId:n,moreId:a,helperEndId:o,hasValue:this.hasValue(),controlId:this.inputId});const p=(({clearInput:t,readonly:n,disabled:i})=>({clearInput:t,readonly:n,disabled:i,clearControl:this.clearInput}))(this);return i(e,{"aria-disabled":this.disabled?"true":null,dir:this.rtl?"rtl":null,class:Object.assign(Object.assign({},h(this.color)),{"has-value":this.hasValue(),"has-focus":this.hasFocus,"is-invalid":this._invalid})},i(r,Object.assign({},c),i(s,Object.assign({},p,{onClearText:this.clearTextInput,control:this.el,ref:t=>this.nativeInputWrap=t}),this.type!=="textarea"&&i("input",{id:this.inputId,class:"input__native-ctrl",ref:t=>this.nativeInput=t,"aria-labelledby":n+" "+a+" "+o,disabled:this.disabled,accept:this.accept,autoCapitalize:this.autocapitalise,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,autoFocus:this.autofocus,inputMode:this.inputmode,form:this.form,min:this.min,max:this.max,minLength:this.minlength,maxLength:this.maxlength,multiple:this.multiple,name:this.name,pattern:this.pattern,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,step:this.step,size:this.size,type:this.type,value:t,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onBlur:this.handleBlur,onKeyDown:this.onKeydown,onInvalid:this.validate}),this.type==="textarea"&&i("textarea",{rows:this.floatLabel?1:this.rows,id:this.inputId,class:{"input__native-ctrl":true,input__resizable:this.resize==="true"},ref:t=>this.nativeInput=t,"aria-labelledby":n+" "+a+" "+o,disabled:this.disabled,autoCapitalize:this.autocapitalise,autoCorrect:this.autocorrect,autoFocus:this.autofocus,inputMode:this.inputmode,form:this.form,minLength:this.minlength,maxLength:this.maxlength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,value:t,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeydown,onInvalid:this.validate,onBlur:this.handleBlur})),i("slot",null)))}get el(){return a(this)}static get watchers(){return{datalist:["setDataListOpts"],minlength:["shouldValidate"],maxlength:["shouldValidate"],min:["shouldValidate"],max:["shouldValidate"],required:["shouldValidate"],disabled:["shouldValidate"],readonly:["shouldValidate"],pattern:["shouldValidate"],inputmode:["shouldValidate"],value:["valueChanged"],debounce:["debounceChanged"]}}};b.style=d;export{b as nano_input};
5
+ //# sourceMappingURL=p-65192b9b.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/input/input.scss?tag=nano-input&encapsulation=scoped","src/components/input/input.tsx"],"names":["inputCss","inputIds","Input","[object Object]","hostRef","this","inputId","didBlurAfterEdit","rtl","charCount","hasRendered","hasFocus","hasLabelSlot","hasHelperSlot","hasHelperEndSlot","errorMessage","datalist","_invalid","autocapitalise","autocomplete","autocorrect","autofocus","clearInput","debounce","disabled","validateOn","showInlineError","hideLabel","floatLabel","name","readonly","required","spellcheck","type","value","resize","rows","showCharCount","validate","ev","nativeInput","validity","valid","preventDefault","validationMessage","nanoValidate","emit","isValid","originalEvent","onInput","input","target","nanoInput","onBlur","focusChanged","nanoBlur","onFocus","nanoFocus","onKeydown","shouldClearOnEdit","hasValue","clearTextInput","stopPropagation","event","window","Event","dispatchEvent","handleBlur","bind","nativeInputWrap","_nativeInputWrap","ele","setDataListOpts","currDWConfig","dropDownConfig","Object","assign","skidding","tetherTo","invalid","validityMessage","requestAnimationFrame","nanoChange","length","style","height","scrollHeight","debounceEvent","validateFirst","Promise","resolve","setTimeout","focus","click","select","message","setCustomValidity","e","form","document","querySelector","el","closest","kev","raf","KeyboardEvent","key","activeElement","FocusEvent","closestElement","tagName","toLowerCase","clearOnEdit","undefined","getValue","mo","disconnect","MutationObserver","processSlottedContent","observe","childList","subtree","querySelectorAll","console","warn","debounceChanged","CustomEvent","detail","slotChangeObserver","_","setFocus","labelId","moreId","helperEndId","ownerDocument","dir","compWrapOptions","label","placeholder","maxlength","wrapOptions","controlId","controlOptions","clearControl","h","Host","aria-disabled","class","createColorClasses","color","has-value","has-focus","is-invalid","FormControlWrap","FormControl","onClearText","control","ref","id","aria-labelledby","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","inputMode","inputmode","min","max","minLength","minlength","maxLength","multiple","pattern","readOnly","step","size","onChange","onKeyDown","onInvalid","input__native-ctrl","input__resizable"],"mappings":";;;6PAAA,MAAMA,EAAW,u2iBCgCjB,IAAIC,EAAW,QAqBFC,EAAK,MAqBhBC,YAAAC,kSAnBQC,KAAAC,QAAU,cAAcL,MACxBI,KAAAE,iBAAmB,MACnBF,KAAAG,IAAe,MAEfH,KAAAI,UAAY,EACZJ,KAAAK,YAAc,MAmBbL,KAAAM,SAAW,MACXN,KAAAO,aAAe,MACfP,KAAAQ,cAAgB,MAChBR,KAAAS,iBAAmB,MACnBT,KAAAU,aAAuB,GACvBV,KAAAW,SAAoC,KAuBpCX,KAAAY,SAAW,MAwBZZ,KAAAa,eACN,OAKMb,KAAAc,aAA6B,MAK7Bd,KAAAe,YAA4B,MAK5Bf,KAAAgB,UAAY,MAKZhB,KAAAiB,WAAa,MAUbjB,KAAAkB,SAAW,EAKMlB,KAAAmB,SAAW,MAoBXnB,KAAAoB,WACvB,kBAKuBpB,KAAAqB,gBAAkB,KAUnCrB,KAAAsB,UAAsB,MAKtBtB,KAAAuB,WAAsB,MA8BtBvB,KAAAwB,KAAexB,KAAKC,QAeHD,KAAAyB,SAAW,MAK5BzB,KAAA0B,SAAW,MAKX1B,KAAA2B,WAAa,MAgBI3B,KAAA4B,KAAuB,OAUvB5B,KAAA6B,MAAwB,GAKzC7B,KAAA8B,OAAoC,OAKpC9B,KAAA+B,KAAO,EAKP/B,KAAAgC,cAAgB,MAqLhBhC,KAAAiC,SAAYC,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AAA","sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n color: currentColor;\n display: block;\n}\n\n:host(.nano-color) {\n color: current-color(base);\n\n --input-border-style--focus: #{$input-border-style} var(--nano-color-tint, #{nano-color(primary, tint)});\n}\n\n.input__native-ctrl {\n @include text-inherit();\n\n padding-block: 0;\n padding-inline: var(--padding-start) var(--padding-end);\n border-radius: var(--input-border-radius);\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n inline-size: 100%;\n max-inline-size: 100%;\n max-block-size: 100%;\n border: 0;\n outline: none;\n background: transparent;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n min-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-height: 2.1em;\n padding-block-start: 1.4em;\n }\n\n &::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-block-size: inherit;\n }\n\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.input__resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-block: var(--padding-top) 0.25em;\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n\n .has-float-label & {\n padding-block-start: 1.75em;\n }\n }\n\n :host([readonly]:not([readonly='false'])) & {\n user-select: none;\n }\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n Listen,\n} from '@stencil/core';\n\nimport {\n Color,\n ControlValidity,\n ControlValidityEventDetail,\n InputChangeEventDetail,\n TextFieldTypes,\n} from '../../interface';\nimport {\n debounceEvent,\n closestElement,\n createColorClasses,\n raf,\n debounce,\n} from '../../utils';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\n\nlet inputIds = 0;\n\n/**\n * The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input), but works great on desktop devices and integrates with the keyboard on mobile devices.\n\nIt is meant for text type inputs only, such as \"text\", \"password\", \"email\", \"number\", \"search\", \"tel\", and \"url\". It supports all standard text input events including keyup, keydown, keypress, and more.\nThe default styling reference comes from the [ONT styleguide](https://nanoporetech.zeroheight.com/styleguide/s/31282/p/230c74-text-input--textarea/b/942ee4)\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot - can be used with a `nano-datalist`. See the `nano-datalist` docs for more information\n */\n@Component({\n tag: 'nano-input',\n styleUrl: 'input.scss',\n scoped: true,\n})\nexport class Input implements ComponentInterface {\n private nativeInput?: HTMLInputElement | HTMLTextAreaElement;\n private inputId = `nano-input-${inputIds++}`;\n private didBlurAfterEdit = false;\n private rtl: boolean = false;\n private mo?: MutationObserver;\n private charCount = 0;\n private hasRendered = false;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. User get/set to set datalist options\n private _nativeInputWrap: HTMLElement;\n private get nativeInputWrap() {\n return this._nativeInputWrap;\n }\n private set nativeInputWrap(ele: HTMLElement) {\n if (this._nativeInputWrap === ele) return;\n this._nativeInputWrap = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.validate = debounce(this.validate, 50);\n this.handleBlur = this.handleBlur.bind(this);\n }\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasHelperSlot = false;\n @State() hasHelperEndSlot = false;\n @State() errorMessage: string = '';\n @State() datalist: HTMLNanoDatalistElement = null;\n\n @Watch('datalist')\n setDataListOpts() {\n if (!this.datalist) return;\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n skidding: -1,\n tetherTo: this.nativeInputWrap,\n };\n }\n\n @Element() el!: HTMLNanoInputElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeInput) return '';\n return this.nativeInput.validationMessage;\n }\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.\n */\n @Prop() accept?: string;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalise: 'none' | 'sentences' | 'words' | 'characters' =\n 'none';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: 'on' | 'off' = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.\n */\n @Prop() clearInput = false;\n\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n @Prop() clearOnEdit?: boolean;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode?:\n | 'none'\n | 'text'\n | 'tel'\n | 'url'\n | 'email'\n | 'numeric'\n | 'decimal'\n | 'search';\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively you may use a label slot.\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop({ reflect: true }) type: TextFieldTypes = 'text';\n\n /**\n * The form element to associate the input with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value?: string | null = '';\n\n /**\n * relevant to type=\"textarea\". Vertical resizing - enable / disable or make automatic.\n */\n @Prop() resize: 'true' | 'false' | 'auto' = 'auto';\n\n /**\n * relevant to type=\"textarea\". Default number of rows to show\n */\n @Prop() rows = 2;\n\n /**\n * relevant to type=\"textarea\".\n */\n @Prop() showCharCount = false;\n\n @Watch('minlength')\n @Watch('maxlength')\n @Watch('min')\n @Watch('max')\n @Watch('required')\n @Watch('disabled')\n @Watch('readonly')\n @Watch('pattern')\n @Watch('inputmode')\n protected shouldValidate() {\n if (!this.hasRendered) return;\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.nanoChange.emit({ value: this.value });\n this.charCount = this.value.length;\n\n if (this.type === 'textarea' && this.resize === 'auto') {\n this.nativeInput.style.height = 'auto';\n if (this.value.length)\n this.nativeInput.style.height = this.nativeInput.scrollHeight + 'px';\n }\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoChange = debounceEvent(this.nanoChange, this.debounce);\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() nanoInput!: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) this.validate();\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n this.nativeInput.click();\n }\n }\n\n /**\n * Sets focus and select the text on the specified `nano-input`. Use this method instead of the global\n * `input.select()`.\n */\n @Method()\n async select() {\n if (this.nativeInput) {\n this.nativeInput.select();\n }\n }\n\n /**\n * @returns the native `<input>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLInputElement | HTMLTextAreaElement> {\n return Promise.resolve(this.nativeInput);\n }\n\n /**\n * Invalidate the field and show a custom error message. To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeInput) {\n this.nativeInput.setCustomValidity(message);\n this.validate();\n }\n }\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.value = '';\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent | FocusEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n raf(() => {\n if (e instanceof KeyboardEvent && kev.key) {\n if (kev.key !== 'Tab') return;\n target = document.activeElement;\n } else if (e instanceof FocusEvent) {\n target = document.activeElement;\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private shouldClearOnEdit() {\n const { type, clearOnEdit } = this;\n return clearOnEdit === undefined ? type === 'password' : clearOnEdit;\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private validate = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n if (!this.nativeInput.validity.valid) {\n if (this.showInlineError) {\n if (ev) ev.preventDefault();\n this.errorMessage = this.nativeInput.validationMessage;\n }\n this._invalid = true;\n } else this._invalid = false;\n\n this.nanoValidate.emit({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n originalEvent: ev,\n });\n };\n\n private onInput = (ev: InputEvent) => {\n const input = ev.target as HTMLInputElement | null;\n this.value = input?.value || '';\n this.nanoInput.emit(ev);\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n if (this.validateOn === 'dirty') this.validate();\n this.nanoBlur.emit();\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.focusChanged();\n this.nanoFocus.emit();\n };\n\n private onKeydown = () => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n };\n\n private clearTextInput = (ev?: Event) => {\n if (this.clearInput && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n this.value = '';\n this.nativeInput.value = '';\n const event = new window.Event('change');\n this.nativeInput.dispatchEvent(event);\n };\n\n private focusChanged() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n }\n\n private hasValue(): boolean {\n return this.getValue().length > 0;\n }\n\n private slotChangeObserver() {\n if (!Build.isBrowser) return;\n\n if (this.mo) this.mo.disconnect();\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / button content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]');\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n this.datalist = this.el.querySelector('nano-datalist:not([slot])');\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"inline-button\"]')) {\n console.warn(\n 'The `inline-button` slot was renamed to `end` in v2 - please update your code',\n this.el\n );\n }\n }\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n }\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.hasRendered = true;\n if (this.autofocus) setTimeout((_) => this.setFocus(), 300);\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot ? this.inputId + '-more' : '';\n const helperEndId = this.hasHelperEndSlot ? this.inputId + '-helper' : '';\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: this.hasValue(),\n controlId: this.inputId,\n };\n\n const controlOptions = (({ clearInput, readonly, disabled }) => ({\n clearInput,\n readonly,\n disabled,\n clearControl: this.clearInput,\n }))(this);\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n dir={this.rtl ? 'rtl' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'is-invalid': this._invalid,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearTextInput}\n control={this.el}\n ref={(el) => (this.nativeInputWrap = el)}\n >\n {this.type !== 'textarea' && (\n <input\n id={this.inputId}\n class=\"input__native-ctrl\"\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n accept={this.accept}\n autoCapitalize={this.autocapitalise}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n />\n )}\n {this.type === 'textarea' && (\n <textarea\n rows={this.floatLabel ? 1 : this.rows}\n id={this.inputId}\n class={{\n 'input__native-ctrl': true,\n input__resizable: this.resize === 'true',\n }}\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalise}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n onBlur={this.handleBlur}\n ></textarea>\n )}\n </FormControl>\n <slot />\n </FormControlWrap>\n </Host>\n );\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- System.register(["./p-f0e912f3.system.js","./p-82e28afd.system.js"],(function(e,a){"use strict";var t,o,n,s,i,l,r;return{setters:[function(e){t=e.p;o=e.w;n=e.d;s=e.N;i=e.a;l=e.H;r=e.b},function(){}],execute:function(){var e=function(e){return"__sc_import_".concat(e.replace(/\s|-/g,"_"))};var d=function(){{t.$cssShim$=o.__cssshim}{h(l.prototype)}var e=Array.from(n.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(s,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===s}));var r={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,o.location.href)).href;{c(r.resourcesUrl,e)}if(!o.customElements){return a.import("./p-e2a16ec3.system.js").then((function(){return r}))}}return i(r)};var c=function(a,t){var i=e(s);try{o[i]=new Function("w","return import(w);//".concat(Math.random()))}catch(r){var l=new Map;o[i]=function(e){var s=new URL(e,a).href;var r=l.get(s);if(!r){var d=n.createElement("script");d.type="module";d.crossOrigin=t.crossOrigin;d.src=URL.createObjectURL(new Blob(["import * as m from '".concat(s,"'; window.").concat(i,".m = m;")],{type:"application/javascript"}));r=new Promise((function(e){d.onload=function(){e(o[i].m);d.remove()}}));l.set(s,r);n.head.appendChild(d)}return r}}};var h=function(e){var a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}var t=a.call(this,false);var o=this.childNodes;if(e){for(var n=0;n<o.length;n++){if(o[n].nodeType!==2){t.appendChild(o[n].cloneNode(true))}}}return t}};d().then((function(e){return r(JSON.parse('[["p-7f5e58b5.system",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"internalSearchIndeces":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"searchLoading":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchValInternal":[32],"submitSearch":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"]]]]],["p-ead9a57c.system",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"gridSizes":[32],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-23dc0398.system",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"dateValue":[2064],"isDateDisabled":[16],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-3e629224.system",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"isVisible":[32],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-8851a253.system",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[6160],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-a0e9b11f.system",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-03ea90fc.system",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-3f4c8687.system",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-0e201f64.system",[[1,"nano-menu-drawer",{"open":[4],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-bf6b8528.system",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-c5892bdc.system",[[1,"nano-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-cf4d5147.system",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-ad9d0c37.system",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-36e62d4a.system",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-4a85687c.system",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-65a52fbd.system",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-3b5efdd5.system",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-fb8174a5.system",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-9edb0dbb.system",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleCbChange"]]]]],["p-49781574.system",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-d1405b1c.system",[[1,"nano-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"type":[1],"contentSelector":[1,"content-selector"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]}]]],["p-b0cd1cc3.system",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"store":[2064],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"extraFieldSelector":[1,"extra-field-selector"],"validation":[16],"submitted":[32],"userForm":[32],"_dirty":[32],"_valid":[32],"_store":[32],"setStore":[64],"setCustomValidity":[64],"resetValidity":[64]}]]],["p-f68e0870.system",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-d07e4d93.system",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-a48693b1.system",[[1,"nano-slide",{"ready":[1540]}]]],["p-20cb4a15.system",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-d8d09969.system",[[1,"nano-tab-content",{"name":[513],"active":[516]}]]],["p-deb5ddb5.system",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-a7b0bd53.system",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-e5c8928a.system",[[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]}]]],["p-a521ff8c.system",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-51b4d117.system",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-ca0bd37a.system",[[2,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"disabled":[516],"href":[1],"target":[1],"setFocus":[64]}]]],["p-542290e9.system",[[1,"nano-resize-observe",{"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-ac68d22e.system",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-b4ebaf49.system",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]],["p-5841bd7a.system",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-ed44eb45.system",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"hasFocus":[32],"setFocus":[64]}]]],["p-1137929a.system",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"select":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-7243128b.system",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[2,"s-size"],"mSize":[2,"m-size"],"lSize":[2,"l-size"],"xlSize":[2,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"showHelper":[516,"show-helper"],"contentPanel":[516,"content-panel"],"fullHeight":[516,"full-height"],"ready":[32],"isSmall":[32],"isMedium":[32],"isLarge":[32],"isXL":[32],"isXXL":[32]}],[1,"nano-grid-item",{"gridStates":[1,"grid-states"],"changeBP":[64]}]]]]'),e)}))}}}));
4
+ System.register(["./p-f0e912f3.system.js","./p-82e28afd.system.js"],(function(e,a){"use strict";var t,o,n,s,i,l,r;return{setters:[function(e){t=e.p;o=e.w;n=e.d;s=e.N;i=e.a;l=e.H;r=e.b},function(){}],execute:function(){var e=function(e){return"__sc_import_".concat(e.replace(/\s|-/g,"_"))};var d=function(){{t.$cssShim$=o.__cssshim}{h(l.prototype)}var e=Array.from(n.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(s,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===s}));var r={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,o.location.href)).href;{c(r.resourcesUrl,e)}if(!o.customElements){return a.import("./p-e2a16ec3.system.js").then((function(){return r}))}}return i(r)};var c=function(a,t){var i=e(s);try{o[i]=new Function("w","return import(w);//".concat(Math.random()))}catch(r){var l=new Map;o[i]=function(e){var s=new URL(e,a).href;var r=l.get(s);if(!r){var d=n.createElement("script");d.type="module";d.crossOrigin=t.crossOrigin;d.src=URL.createObjectURL(new Blob(["import * as m from '".concat(s,"'; window.").concat(i,".m = m;")],{type:"application/javascript"}));r=new Promise((function(e){d.onload=function(){e(o[i].m);d.remove()}}));l.set(s,r);n.head.appendChild(d)}return r}}};var h=function(e){var a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}var t=a.call(this,false);var o=this.childNodes;if(e){for(var n=0;n<o.length;n++){if(o[n].nodeType!==2){t.appendChild(o[n].cloneNode(true))}}}return t}};d().then((function(e){return r(JSON.parse('[["p-495b3195.system",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"internalSearchIndeces":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"searchLoading":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchValInternal":[32],"submitSearch":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"]]]]],["p-ead9a57c.system",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"gridSizes":[32],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-23dc0398.system",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"dateValue":[2064],"isDateDisabled":[16],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-3e629224.system",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"isVisible":[32],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-8851a253.system",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[6160],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-a0e9b11f.system",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-03ea90fc.system",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-3f4c8687.system",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-0e201f64.system",[[1,"nano-menu-drawer",{"open":[4],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-bf6b8528.system",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-c5892bdc.system",[[1,"nano-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-cf4d5147.system",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-ad9d0c37.system",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-36e62d4a.system",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-4a85687c.system",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-65a52fbd.system",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-3b5efdd5.system",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-fb8174a5.system",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-9edb0dbb.system",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleCbChange"]]]]],["p-49781574.system",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-d1405b1c.system",[[1,"nano-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"type":[1],"contentSelector":[1,"content-selector"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]}]]],["p-491107e0.system",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"store":[2064],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"extraFieldSelector":[1,"extra-field-selector"],"validation":[16],"submitted":[32],"userForm":[32],"_dirty":[32],"_valid":[32],"_store":[32],"setStore":[64],"setCustomValidity":[64],"resetValidity":[64]}]]],["p-f68e0870.system",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-d07e4d93.system",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-a48693b1.system",[[1,"nano-slide",{"ready":[1540]}]]],["p-20cb4a15.system",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-d8d09969.system",[[1,"nano-tab-content",{"name":[513],"active":[516]}]]],["p-deb5ddb5.system",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-a7b0bd53.system",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-e5c8928a.system",[[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]}]]],["p-a521ff8c.system",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-51b4d117.system",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-ca0bd37a.system",[[2,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"disabled":[516],"href":[1],"target":[1],"setFocus":[64]}]]],["p-542290e9.system",[[1,"nano-resize-observe",{"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-ac68d22e.system",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-b4ebaf49.system",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]],["p-db8aea7a.system",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-80c6166e.system",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"hasFocus":[32],"setFocus":[64]}]]],["p-de983c13.system",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"select":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-7243128b.system",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[2,"s-size"],"mSize":[2,"m-size"],"lSize":[2,"l-size"],"xlSize":[2,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"showHelper":[516,"show-helper"],"contentPanel":[516,"content-panel"],"fullHeight":[516,"full-height"],"ready":[32],"isSmall":[32],"isMedium":[32],"isLarge":[32],"isXL":[32],"isXXL":[32]}],[1,"nano-grid-item",{"gridStates":[1,"grid-states"],"changeBP":[64]}]]]]'),e)}))}}}));
5
5
  //# sourceMappingURL=p-6b35560c.system.js.map