@nanoporetech-digital/components 8.0.0-alpha.3 → 8.0.0-alpha.5

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 (169) hide show
  1. package/dist/cjs/{fade-CqKYrZYq.js → fade-B3XUTiE5.js} +1 -1
  2. package/dist/cjs/{fullscreen-D-fHJ_IJ.js → fullscreen-BQdjQr7K.js} +1 -1
  3. package/dist/cjs/index-IR1lkhwT.js +2 -2
  4. package/dist/cjs/{lazyload-DK1ITMfR.js → lazyload-B8HnSPAU.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{local-logged-in-C8Qr7Q7o.js → local-logged-in-CX0THX6r.js} +1 -1
  7. package/dist/cjs/{local-logged-out-fCQ614s8.js → local-logged-out-C-cPz-8v.js} +1 -1
  8. package/dist/cjs/nano-algolia.cjs.entry.js +1 -1
  9. package/dist/cjs/nano-avatar_5.cjs.entry.js +1 -1
  10. package/dist/cjs/nano-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +1 -1
  12. package/dist/cjs/nano-components.cjs.js +1 -1
  13. package/dist/cjs/{nano-data-table-C_KLyFMO.js → nano-data-table-BiTzaPlZ.js} +5 -5
  14. package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
  15. package/dist/cjs/nano-datalist_3.cjs.entry.js +4 -4
  16. package/dist/cjs/nano-date-picker_2.cjs.entry.js +1 -1
  17. package/dist/cjs/nano-global-nav.cjs.entry.js +11 -11
  18. package/dist/cjs/nano-grid_2.cjs.entry.js +3 -3
  19. package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
  20. package/dist/cjs/{nano-resize-observe_2.cjs.entry.js → nano-resize-observe.cjs.entry.js} +0 -18
  21. package/dist/cjs/nano-slide.cjs.entry.js +1 -1
  22. package/dist/cjs/{nano-slides-BhpvytBB.js → nano-slides-BHsOLxRZ.js} +8 -8
  23. package/dist/cjs/nano-slides.cjs.entry.js +1 -1
  24. package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
  25. package/dist/cjs/nano-spinner.cjs.entry.js +1 -12
  26. package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
  27. package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
  28. package/dist/cjs/nano-tab.cjs.entry.js +2 -2
  29. package/dist/cjs/nano-table.cjs.entry.js +2 -2
  30. package/dist/cjs/{page-dots-DeSuT5bE.js → page-dots-DJrv0V9e.js} +1 -1
  31. package/dist/cjs/{table.worker-C5ofbi7M.js → table.worker-DjOtTDwg.js} +1 -1
  32. package/dist/collection/collection-manifest.json +0 -1
  33. package/dist/collection/components/algolia/algolia.js +1 -1
  34. package/dist/collection/components/breadcrumb/breadcrumb.css +2 -125
  35. package/dist/collection/components/breadcrumb/breadcrumb.js +3 -2
  36. package/dist/collection/components/collapsible-comparison/collapsible-comparison.js +4 -3
  37. package/dist/collection/components/data-table/table.css +2 -7
  38. package/dist/collection/components/data-table/table.js +3 -3
  39. package/dist/collection/components/global-nav/assets/local-logged-in.json +1 -1
  40. package/dist/collection/components/global-nav/assets/local-logged-out.json +1 -1
  41. package/dist/collection/components/global-nav/global-nav.js +12 -11
  42. package/dist/collection/components/img/img.js +3 -3
  43. package/dist/collection/components/input/input.css +1 -1
  44. package/dist/collection/components/option/option.js +6 -3
  45. package/dist/collection/components/select/select.css +1 -1
  46. package/dist/collection/components/slides/slide.js +9 -1
  47. package/dist/collection/components/slides/slides.css +16 -10
  48. package/dist/collection/components/slides/slides.js +3 -3
  49. package/dist/collection/components/sortable/sortable.js +1 -1
  50. package/dist/collection/components/spinner/spinner.css +45 -138
  51. package/dist/collection/components/spinner/spinner.js +3 -43
  52. package/dist/collection/components/sticker/sticker.js +2 -2
  53. package/dist/collection/components/table/table.js +2 -2
  54. package/dist/collection/components/tabs/tab-content.js +2 -2
  55. package/dist/collection/components/tabs/tab.js +2 -2
  56. package/dist/collection/components/tag/tag.js +2 -2
  57. package/dist/collection/components/tooltip/tooltip.js +2 -2
  58. package/dist/components/algolia.js +1 -1
  59. package/dist/components/img.js +5 -11
  60. package/dist/components/input.js +1 -1
  61. package/dist/components/local-logged-in.js +1 -1
  62. package/dist/components/local-logged-out.js +1 -1
  63. package/dist/components/nano-breadcrumb.js +4 -3
  64. package/dist/components/nano-collapsible-comparison.js +4 -3
  65. package/dist/components/nano-data-table.js +14 -20
  66. package/dist/components/nano-global-nav.js +12 -11
  67. package/dist/components/nano-hero.js +6 -12
  68. package/dist/components/nano-slide.js +1 -1
  69. package/dist/components/nano-sortable.js +1 -1
  70. package/dist/components/nano-tab-content.js +2 -2
  71. package/dist/components/nano-tab.js +2 -2
  72. package/dist/components/nano-table.js +2 -2
  73. package/dist/components/option.js +2 -2
  74. package/dist/components/select.js +1 -1
  75. package/dist/components/slides.js +4 -4
  76. package/dist/components/spinner.js +4 -18
  77. package/dist/components/sticker.js +2 -2
  78. package/dist/components/tag.js +2 -2
  79. package/dist/components/tooltip.js +2 -2
  80. package/dist/esm/{fade-CnaZvOTY.js → fade-C74M8NQp.js} +1 -1
  81. package/dist/esm/{fullscreen-BIFliVxG.js → fullscreen-CmJdWdrB.js} +1 -1
  82. package/dist/esm/index-DXvE-U_j.js +2 -2
  83. package/dist/esm/{lazyload-D_Ju_KaC.js → lazyload-BPqjfQB3.js} +1 -1
  84. package/dist/esm/loader.js +1 -1
  85. package/dist/esm/{local-logged-in-DNQyU0ot.js → local-logged-in-Bycp-mPl.js} +1 -1
  86. package/dist/esm/{local-logged-out-CD2oXHpq.js → local-logged-out-BhOAka-2.js} +1 -1
  87. package/dist/esm/nano-algolia.entry.js +1 -1
  88. package/dist/esm/nano-avatar_5.entry.js +1 -1
  89. package/dist/esm/nano-breadcrumb.entry.js +1 -1
  90. package/dist/esm/nano-collapsible-comparison.entry.js +1 -1
  91. package/dist/esm/nano-components.js +1 -1
  92. package/dist/esm/{nano-data-table-CJbVKIuu.js → nano-data-table-BPQhfLyq.js} +5 -5
  93. package/dist/esm/nano-data-table.entry.js +1 -1
  94. package/dist/esm/nano-datalist_3.entry.js +4 -4
  95. package/dist/esm/nano-date-picker_2.entry.js +1 -1
  96. package/dist/esm/nano-global-nav.entry.js +11 -11
  97. package/dist/esm/nano-grid_2.entry.js +3 -3
  98. package/dist/esm/nano-icon_3.entry.js +2 -2
  99. package/dist/esm/{nano-resize-observe_2.entry.js → nano-resize-observe.entry.js} +1 -18
  100. package/dist/esm/nano-slide.entry.js +1 -1
  101. package/dist/esm/{nano-slides-B9KjZVqC.js → nano-slides-Bv0u7kg0.js} +8 -8
  102. package/dist/esm/nano-slides.entry.js +1 -1
  103. package/dist/esm/nano-sortable.entry.js +1 -1
  104. package/dist/esm/nano-spinner.entry.js +2 -13
  105. package/dist/esm/nano-sticker.entry.js +2 -2
  106. package/dist/esm/nano-tab-content.entry.js +2 -2
  107. package/dist/esm/nano-tab.entry.js +2 -2
  108. package/dist/esm/nano-table.entry.js +2 -2
  109. package/dist/esm/{page-dots-BmS6HUrx.js → page-dots-e1Gyk8V7.js} +1 -1
  110. package/dist/esm/{table.worker-CsTdjWrS.js → table.worker-DlLhvqK5.js} +1 -1
  111. package/dist/nano-assets/hash.txt +1 -1
  112. package/dist/nano-assets/local-logged-in.json +1 -1
  113. package/dist/nano-assets/local-logged-out.json +1 -1
  114. package/dist/nano-components/assets/local-logged-in.json +1 -1
  115. package/dist/nano-components/assets/local-logged-out.json +1 -1
  116. package/dist/nano-components/{fade-CnaZvOTY.js → fade-C74M8NQp.js} +1 -1
  117. package/dist/nano-components/{fullscreen-BIFliVxG.js → fullscreen-CmJdWdrB.js} +1 -1
  118. package/dist/nano-components/{lazyload-D_Ju_KaC.js → lazyload-BPqjfQB3.js} +1 -1
  119. package/dist/nano-components/{local-logged-in-DNQyU0ot.js → local-logged-in-Bycp-mPl.js} +1 -1
  120. package/dist/nano-components/{local-logged-out-CD2oXHpq.js → local-logged-out-BhOAka-2.js} +1 -1
  121. package/dist/nano-components/nano-algolia.entry.js +1 -1
  122. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  123. package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
  124. package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
  125. package/dist/nano-components/nano-components.css +126 -0
  126. package/dist/nano-components/nano-components.esm.js +1 -1
  127. package/dist/nano-components/{nano-data-table-CJbVKIuu.js → nano-data-table-BPQhfLyq.js} +1 -1
  128. package/dist/nano-components/nano-data-table.entry.js +1 -1
  129. package/dist/nano-components/nano-datalist_3.entry.js +1 -1
  130. package/dist/nano-components/nano-date-picker_2.entry.js +1 -1
  131. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  132. package/dist/nano-components/nano-grid_2.entry.js +1 -1
  133. package/dist/nano-components/nano-icon_3.entry.js +1 -1
  134. package/dist/nano-components/nano-resize-observe.entry.js +4 -0
  135. package/dist/nano-components/nano-slide.entry.js +1 -1
  136. package/dist/nano-components/{nano-slides-B9KjZVqC.js → nano-slides-Bv0u7kg0.js} +3 -3
  137. package/dist/nano-components/nano-slides.entry.js +1 -1
  138. package/dist/nano-components/nano-sortable.entry.js +1 -1
  139. package/dist/nano-components/nano-spinner.entry.js +1 -1
  140. package/dist/nano-components/nano-sticker.entry.js +1 -1
  141. package/dist/nano-components/nano-tab-content.entry.js +1 -1
  142. package/dist/nano-components/nano-tab.entry.js +1 -1
  143. package/dist/nano-components/nano-table.entry.js +1 -1
  144. package/dist/nano-components/{page-dots-BmS6HUrx.js → page-dots-e1Gyk8V7.js} +1 -1
  145. package/dist/nano-components/{table.worker-CsTdjWrS.js → table.worker-DlLhvqK5.js} +1 -1
  146. package/dist/style/components.css +1 -1
  147. package/dist/style/components.css.map +1 -1
  148. package/dist/style/core.css +1 -1
  149. package/dist/style/core.css.map +1 -1
  150. package/dist/style/nano.css +1 -1
  151. package/dist/style/nano.css.map +1 -1
  152. package/dist/types/components/collapsible-comparison/collapsible-comparison.d.ts +1 -1
  153. package/dist/types/components/date-picker/date-picker-interface.d.ts +19 -0
  154. package/dist/types/components/option/option.d.ts +4 -1
  155. package/dist/types/components/slides/slide.d.ts +8 -0
  156. package/dist/types/components/spinner/spinner.d.ts +3 -7
  157. package/dist/types/components.d.ts +23 -44
  158. package/docs-json.json +43 -133
  159. package/docs-vscode.json +2 -27
  160. package/hydrate/index.js +57 -160
  161. package/hydrate/index.mjs +57 -160
  162. package/package.json +2 -2
  163. package/dist/collection/components/skeleton/skeleton.css +0 -83
  164. package/dist/collection/components/skeleton/skeleton.js +0 -57
  165. package/dist/components/nano-skeleton.d.ts +0 -11
  166. package/dist/components/nano-skeleton.js +0 -9
  167. package/dist/components/skeleton.js +0 -41
  168. package/dist/nano-components/nano-resize-observe_2.entry.js +0 -4
  169. package/dist/types/components/skeleton/skeleton.d.ts +0 -12
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{a as t,r as i,c as e,e as o,d as n}from"./index-DXvE-U_j.js";import{t as s,h as a}from"./renderer-BUaAsDso.js";import{g as r}from"./active-element-C1pBwzyj.js";import{d as h}from"./throttle-C93FMm2Z.js";import{g as d}from"./dom-Cb7FUtXp.js";let l=0;const c=class{isNanoInput=!1;typeToSelect="";typeToSelectTimeout;nanoDropdown;listBox;mo;listId="nano-datalist-"+l++;isFiltered=!1;shouldFocus=!1;get allOptEles(){return this._allOptEles}set allOptEles(t){this._allOptEles=t,this.connectedInput?.value||t.forEach((t=>{t.selected&&!this.selected.includes(t.value)&&this.changeInputValue(t)}))}_allOptEles=[];get host(){return t(this)}actvOptEles=[];connectedInput;inputLabel;hasNoResult;shouldOpen;canOpen=!0;optionIds=[];constructor(t){i(this,t),this.nanoSelect=e(this,"nanoSelect",7),this.nanoDeselect=e(this,"nanoDeselect",7),this.nanoOptionsUpdated=e(this,"nanoOptionsUpdated",7),this.inputChange=h(this.inputChange.bind(this),50)}selected=[];get dropDownConfig(){return this._dropDownConfig}set dropDownConfig(t){this._dropDownConfig={...this._dropDownConfig,...t}}_dropDownConfig={skidding:-1};options=[];input;type="input";get activeOptions(){return this.allOptEles}open=!1;openWatcher(){o((()=>{if(this.open){const{height:t,top:i}=this.nanoDropdown.tetherTo.getBoundingClientRect();this.nanoDropdown.style.setProperty("--max-height",`max(${window.innerHeight-(t+i+40)}px, 48vw)`)}this.nanoDropdown.open=this.open,this.connectedInput&&this.connectedInput.setAttribute("aria-expanded",this.open.toString())}))}disableFilter=!1;disabled=!1;async watchInputChange(){let t;(t=this.host.closest(s("nano-input")))?(this.isNanoInput=!0,this.connectedInput=await t.getInputElement()):this.input&&"string"==typeof this.input&&(t=document.querySelector(this.input))?(this.isNanoInput=!1,this.connectedInput=t):"object"==typeof this.input&&(this.connectedInput=this.input)}handleOptionsChange(){if(this.host)if(d(this.host,":not(nano-nav-item):not(nano-option):not([role])",!0).forEach((t=>t.setAttribute("role","none"))),this.options&&this.options.length||this.mo){if(this.options?.length){this.mo&&(this.mo.disconnect(),this.mo=void 0);const t=this.host.querySelectorAll(s("nano-option"));o((()=>{t?.length&&t.forEach((t=>t.remove())),this.allOptEles=this.options.flatMap(((t,i)=>{if(t.value||t.label){const e=Object.assign(document.createElement(s("nano-option")),{label:t.label,value:t.value,ariaPosinset:i,ariaSetsize:this.options.length,selected:t.selected,id:this.listId+"-option-"+i,textContent:t.label?t.label:t.value,slot:"internal-opts"});return this.host.append(e),e}})),this.connectedInput?.value.length&&"select"!==this.type?this.inputChange():this.actvOptEles=[...this.allOptEles]}))}}else(this.mo=new MutationObserver((()=>this.processSlottedContent()))).observe(this.host,{childList:!0,subtree:!0}),this.processSlottedContent()}watchTypeChange(){if(!this.connectedInput)return;let t={closeOnSelect:!1},i="both",e=!1;switch(this.type){case"input":t={closeOnSelect:!0};break;case"select":i="list",e=!0,t={closeOnSelect:!0}}this.isNanoInput||(t.tetherTo=this.connectedInput),this.dropDownConfig={...this.dropDownConfig,...t},this.connectedInput.setAttribute("aria-autocomplete",i),this.connectedInput.readOnly=e}manageInputEvents(t,i){if(i){const t=i.closest(s("nano-input"));t&&t.removeEventListener("nanoChange",this.inputChange),this.removeEventListeners(i),this.inputLabel=null,o((()=>{i.removeAttribute("role"),i.removeAttribute("aria-expanded"),i.removeAttribute("aria-controls"),i.removeAttribute("aria-owns"),i.removeAttribute("aria-haspopup"),i.removeAttribute("aria-autocomplete"),i.removeAttribute("autocomplete")}))}if(t){const i=t.closest(s("nano-input"));i&&i.addEventListener("nanoChange",this.inputChange),t.addEventListener("change",this.inputChange),t.addEventListener("click",this.inputClick),t.addEventListener("keydown",this.inputKeydown),t.addEventListener("input",this.inputChange),this.listId=this.host.id||this.listId,this.inputLabel=t?.labels?.item(0)||function(t){let i;return t.id&&(i=document.querySelector(`label[for='${t.id}']`)),i||(i=t.closest("label")),i}(t),o((()=>{this.host.id=this.listId,t.setAttribute("role","combobox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",this.listId),t.setAttribute("aria-owns",this.listId),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("autocomplete","off")}))}}watchActvOptChange(){let t=0;const i=this.connectedInput?.value||"",e=[];o((()=>{this.allOptEles.forEach(((o,n)=>{this.actvOptEles.includes(o)?(t++,o.setAttribute("aria-posinset",t+""),o.setAttribute("aria-setsize",this.actvOptEles.length+""),o.hidden=!1,this.isSelected(o,i)):(o.removeAttribute("aria-posinset"),o.removeAttribute("aria-setsize"),o.hidden=!0,o.selected=!1),o.id=this.listId+"-option-"+n,e.push(o.id)})),this.optionIds=e}))}manageCanOpen(){this.canOpen=!(!this.actvOptEles.length&&!this.hasNoResult)}manageDropdownDisplay(){this.shouldOpen&&this.canOpen&&!this.disabled&&(this.open=!0),this.shouldOpen&&this.canOpen||(this.open=!1),this.openWatcher()}fireActiveOptsEvent(){this.nanoOptionsUpdated.emit(this.actvOptEles)}nanoSelect;nanoDeselect;nanoOptionsUpdated;isSelected(t,i){t.selected=!(i!==t.value&&!this.selected.includes(t.value))}get dropwdownOpen(){return!(!this.nanoDropdown||!this.open)}get exactMatch(){return this.allOptEles.find((t=>this.connectedInput.value===t.value))}changeInputValue(t){let i;if(this.selected.includes(t.value)?(this.selected=this.selected.filter((i=>i!==t.value)),i=this.nanoDeselect.emit(t)):(this.selected=[...this.selected],i=this.nanoSelect.emit(t)),!i.defaultPrevented){this.connectedInput&&(this.connectedInput.value=t.value);const i=new window.Event("change");this.connectedInput?.dispatchEvent(i)}}optSelected=t=>{t.stopPropagation(),this.changeInputValue(t.detail),requestAnimationFrame((()=>this.inputChange())),"selectMulti"!==this.type&&(this.shouldOpen=!1)};setOptStartsWith(){const t=t=>t.toLowerCase().substring(0,this.typeToSelect.length)===this.typeToSelect,i=this.allOptEles.find((i=>i.value.trim().length>0&&!i.disabled&&(t(i.textContent)||t(i.value)||t(i.label)||t(i.filterMeta))));i&&this.changeInputValue(i)}removeEventListeners(t){const i=t.closest(s("nano-input"));i&&i.removeEventListener("nanoChange",this.inputChange),t.removeEventListener("change",this.inputChange),t.removeEventListener("click",this.inputClick),t.removeEventListener("keydown",this.inputKeydown),t.removeEventListener("input",this.inputChange)}processSlottedContent(){requestAnimationFrame((()=>{this.allOptEles=Array.from(this.host.querySelectorAll(s("nano-option"))),this.hasNoResult=!!this.host.querySelector('[slot="no-result"]'),this.connectedInput?.value.length&&"select"!==this.type?this.inputChange():this.actvOptEles=this.allOptEles}))}handleShow=async()=>{this.shouldFocus?(this.shouldFocus=!1,this.listBox.setFocus()):"select"===this.type&&this.listBox.showActiveElement()};handleHide=()=>{this.open=!1,r().closest(this.host.tagName.toLowerCase())&&this.connectedInput.select()};inputChange(){if(this.disableFilter)return void(this.actvOptEles=this.allOptEles);const t=this.connectedInput.value,i=t.trim().toLowerCase();let e=!1;const o=[],n=t=>t.toLowerCase().indexOf(i)>-1;this.allOptEles.forEach((i=>{t!==i.value&&t!==i.label||"selectMulti"===this.type?this.isSelected(i,t):(i.selected=!0,e=!0)})),this.allOptEles.forEach((t=>{(!i.length||e||t.value.trim().length>0&&!t.disabled&&(n(t.textContent)||n(t.value)||n(t.label)||n(t.filterMeta)))&&o.push(t)})),this.isFiltered=i.length&&!e,this.actvOptEles=o}inputClick=()=>{this.open||(this.shouldOpen=!0,this.manageDropdownDisplay())};inputKeydown=t=>{["Shift","ArrowRight","ArrowLeft","Escape","Tab"].includes(t.key)?"Tab"===t.key&&(this.shouldOpen=!1):"select"!==this.type||["ArrowDown","ArrowUp","Enter"].includes(t.key)||" "===t.key&&!this.typeToSelectTimeout?this.open&&["ArrowDown","ArrowUp"].includes(t.key)?this.listBox.setFocus():(this.shouldOpen=!0,this.manageDropdownDisplay(),["ArrowDown","ArrowUp"," ","Enter"].includes(t.key)&&(t.preventDefault(),this.shouldFocus=!0)):(" "===t.key||/^[a-zA0-9]+$/i.test(t.key))&&(clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>{this.typeToSelect="",this.typeToSelectTimeout=0}),750),this.typeToSelect+=t.key,this.setOptStartsWith())};optionKeyDown=t=>{["Shift","ArrowUp","ArrowDown","Escape","Enter","Tab","Space","PageUp","PageDown","Home","End"," "].includes(t.key)?"Escape"===t.key&&this.connectedInput.focus():"select"===this.type||this.exactMatch&&!["Delete","Backspace"].includes(t.key)||this.connectedInput.focus()};connectedCallback(){this.watchInputChange()}componentDidLoad(){this.handleOptionsChange(),this.openWatcher()}componentDidRender(){setTimeout((()=>{this.connectedInput||console.warn("no `nano-input` found. `nano-datalist` should be nested within an `nano-input` or linked via `input` prop",this.host)}),500)}disconnectedCallback(){this.mo&&(this.mo.disconnect(),this.mo=void 0),this.connectedInput&&(this.connectedInput=void 0)}render(){return a(n,{key:"b9c67e5dfc3c26c4eac219d9bdc9081aa79d7122",class:"nano-datalist",role:this.actvOptEles.length?"listbox":void 0,"aria-owns":this.optionIds.length?this.optionIds.join(" "):void 0,"aria-label":this.optionIds.length?"Select options from the list below":void 0},a("nano-dropdown",{key:"29a0de977f7be1a39c5c869a5ab366bb64711d9e",part:"dropdown",exportparts:"trigger:dropdown__trigger, panel:dropdown__panel",...this.dropDownConfig,ref:t=>this.nanoDropdown=t,dialogTitle:"Select options from the list below",class:{dlist__dropdown:!0,"dlist--isfiltered":this.isFiltered},onNanoAfterShow:this.handleShow,onNanoAfterHide:this.handleHide,role:"group"},a("nano-menu",{key:"86769c73825853c557ed7a1dfb0f86898ce6504f",part:"main-menu",ref:t=>this.listBox=t,hidden:!this.actvOptEles.length,type:"listbox",label:this.inputLabel?this.inputLabel.textContent:void 0,class:{dlist__menu:!0,"dlist__menu--open":this.dropwdownOpen},tabIndex:-1,onNanoSelect:this.optSelected,onKeyDown:this.optionKeyDown},a("slot",{key:"f5ea0623591a368f38ce3c1e41ef431c4a9f5960",name:"list-top"}),a("slot",{key:"98804885ffb99528138867d2747af3acef3f64f7"}),a("slot",{key:"1341dc10f96570c04613153cf939aaf7dc21f0d3",name:"internal-opts"}),a("slot",{key:"84d86a667a69cd571f7b96dc29d1ddd58c3d482c",name:"list-bottom"})),a("nano-menu",{key:"9b09caa70bd106eb9e64c714072c0b88275f34c6",part:"no-result-menu",type:"listbox",label:"No results found",hidden:!!this.actvOptEles.length,class:{dlist__menu:!0,"dlist__menu--open":this.dropwdownOpen}},a("slot",{key:"58187330291198ff00571570e2b6b6bfdc79c905",name:"no-result"})),!!this.actvOptEles&&a("div",{key:"72ea39405f558d10de86a14704ed48e869f01426",class:"dlist__status"},this.actvOptEles.length," result",this.actvOptEles.length>1?"s":""," available.")))}static get watchers(){return{open:["openWatcher"],input:["watchInputChange"],options:["handleOptionsChange"],type:["watchTypeChange"],connectedInput:["watchTypeChange","manageInputEvents"],selected:["watchActvOptChange"],actvOptEles:["watchActvOptChange","manageCanOpen","fireActiveOptsEvent"],hasNoResult:["manageCanOpen"],shouldOpen:["manageDropdownDisplay"],canOpen:["manageDropdownDisplay"]}}};c.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--padding-top:8px;--padding-bottom:8px;--padding-start:var(--nano-spacing-l);--padding-end:var(--nano-spacing-l);--font-size:var(--nano-font-size-2xs);--color:var(--nano-color-neutral-1000);color:var(--color)}.dlist--isfiltered ::slotted(*:not(.nano-option,[slot=no-result],[slot=list-top],[slot=list-bottom])){display:none !important}.dlist__dropdown{--min-width:100%;--overflow:auto;display:inline}.dlist__status{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.dlist__menu{--padding-top:inherit;--padding-bottom:inherit;--padding-start:inherit;--padding-end:inherit;--font-size:inherit;--padding:var(--nano-spacing-sm) var(--nano-spacing-l)}";let p=0;const u=class{optId="nano-option-"+p++;get host(){return t(this)}constructor(t){i(this,t),this.nanoSelect=e(this,"nanoSelect",7),this.handleClick=h(this.handleClick.bind(this),5)}value="";valueChanged(){this.value&&this.value.length||this.label||(this.value=this.labelContent)}label="";labelChanged(){this.label&&this.label.length||(this.label=this.labelContent.length?this.labelContent:this.value)}selected=!1;disabled=!1;filterMeta="";href;nanoSelect;handleKeyDown(t){" "!==t.key&&"Enter"!==t.key||this.href||(t.preventDefault(),this.nanoSelect.emit(this.host))}handleClick(){this.disabled||this.href||this.nanoSelect.emit(this.host)}get labelContent(){return d(this.host,"*:not([slot])",!1).map((t=>t.textContent)).join(" ").trim()}componentWillLoad(){this.valueChanged(),this.labelChanged()}render(){return a(n,{key:"ab20615d63e2e61ae1d685d4e56074e9192aad02",role:"option","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false",class:"nano-option"},a(this.href?"a":"div",{key:"b301227561b6201851a03b6b1511fc789d58f872",href:this.href||void 0,onMouseDown:this.handleClick,id:this.optId,class:{option:!0,"option--selected":this.selected,"option--disabled":this.disabled,"option--novalue":!this.value}},a("div",{key:"ed2d11478560dd2e73f7b1373a6742a3f14368a8",part:"check-icon",class:"option__check"},a("slot",{key:"23a98f11788b6427ea1187bd4f0ddce6fb945ad1",name:"check-icon"},a("nano-icon",{key:"ae544942a830172078186d6b060d06423cdce4f6",name:"light/check","aria-hidden":"true"}))),a("div",{key:"8cc27b2315e7746e5a239cc5f28f656963736e56",part:"start",class:"option__start"},a("slot",{key:"774af5f7b50587f609dcefa3ba5c41340d9a6acf",name:"start"})),a("div",{key:"3c4524e66aac70d5e74b42271ff57ab10f747cf6",part:"label",class:"option__label"},a("slot",{key:"dc4fa00135857715d9867f747a14a19b01b892d1"},this.label||this.value)),a("div",{key:"3f59b784aec9d62f4c1aaf731781ff21b53e114b",part:"end",class:"option__end"},a("slot",{key:"138aa8b09d4195210528e87ff763c8c4d9a668b7",name:"end"}))))}static get watchers(){return{value:["valueChanged"],label:["labelChanged"]}}};u.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--bg:none;--bg-selected:none;--bg-focus:var(--nano-color-blue-cerulean-1000);--bg-disabled:none;--color:var(--nano-color-base-1000);--color-selected:var(--nano-color-base-1000);--color-focus:var(--nano-color-base-0);--color-disabled:var(--nano-color-neutral-300);--opt-icon-size:1em;--padding-start:var(--nano-spacing-sm);--padding-end:var(--nano-spacing-md);--padding-bottom:6px;--padding-top:6px;display:block;color:var(--color);overflow:hidden;font-size:var(--nano-font-size-xs)}:host(:focus){outline:none}.option{color:inherit;text-decoration:none;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;display:flex;align-items:stretch;inline-size:100%;background:var(--bg);padding-inline:var(--padding-start) var(--padding-end);padding-block:var(--padding-top) var(--padding-bottom)}:host(:focus) .option:not(.option--disabled),:host .option.option--selected{outline:none;background:var(--bg-selected);color:var(--color-selected)}:host(:focus) .option:not(.option--disabled){background:var(--bg-focus);color:var(--color-focus)}.option.option--disabled{outline:none;color:var(--color-disabled);cursor:not-allowed;background:var(--bg-disabled)}.option.option--novalue{font-style:italic;opacity:0.7}.option__label{flex:1 1 auto;display:flex;align-items:center}.option__start{flex:0 0 auto;display:flex;align-items:center}.option__start ::slotted(.nano-icon){font-size:var(--opt-icon-size)}.option__start ::slotted(:last-child){margin-inline-end:var(--padding-end)}.option__end{flex:0 0 auto;display:flex;align-items:center}.option__end ::slotted(.nano-icon){font-size:var(--opt-icon-size)}.option__end ::slotted(:first-child){margin-inline-start:var(--padding-start)}.option__check{visibility:hidden;display:flex;margin-inline-end:var(--padding-start);align-items:center;font-size:var(--nano-font-size-2xs);inline-size:var(--nano-font-size-2xs)}.option--selected:not(.option--novalue) .option__check{visibility:visible}";const b=class{constructor(t){i(this,t),this.nanoClose=e(this,"nanoClose",7)}closable=!1;size="regular";get el(){return t(this)}nanoClose;onKeyDown=t=>{switch(t.key){case"Enter":case" ":t.preventDefault(),this.close()}};handleClick=()=>{this.close()};close(){this.nanoClose.emit()}containsAnchor=()=>!!this.el.querySelector("a");render(){return this.closable&&!this.containsAnchor()&&[a("slot",{key:"a1a5a458c6bb76ab3c565d33830236a5bbda9408"}),a("nano-icon-button",{key:"23201b4215ff0aefbc34fdaba31b9006499e2716",label:"Close","icon-name":"light/xmark-large",onKeyDown:this.onKeyDown,onClick:this.handleClick})]}};b.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}";export{c as nano_datalist,u as nano_option,b as nano_tag}
4
+ import{a as t,r as i,c as e,e as o,d as n}from"./index-DXvE-U_j.js";import{t as s,h as a}from"./renderer-BUaAsDso.js";import{g as r}from"./active-element-C1pBwzyj.js";import{d as h}from"./throttle-C93FMm2Z.js";import{g as d}from"./dom-Cb7FUtXp.js";let l=0;const c=class{isNanoInput=!1;typeToSelect="";typeToSelectTimeout;nanoDropdown;listBox;mo;listId="nano-datalist-"+l++;isFiltered=!1;shouldFocus=!1;get allOptEles(){return this._allOptEles}set allOptEles(t){this._allOptEles=t,this.connectedInput?.value||t.forEach((t=>{t.selected&&!this.selected.includes(t.value)&&this.changeInputValue(t)}))}_allOptEles=[];get host(){return t(this)}actvOptEles=[];connectedInput;inputLabel;hasNoResult;shouldOpen;canOpen=!0;optionIds=[];constructor(t){i(this,t),this.nanoSelect=e(this,"nanoSelect",7),this.nanoDeselect=e(this,"nanoDeselect",7),this.nanoOptionsUpdated=e(this,"nanoOptionsUpdated",7),this.inputChange=h(this.inputChange.bind(this),50)}selected=[];get dropDownConfig(){return this._dropDownConfig}set dropDownConfig(t){this._dropDownConfig={...this._dropDownConfig,...t}}_dropDownConfig={skidding:-1};options=[];input;type="input";get activeOptions(){return this.allOptEles}open=!1;openWatcher(){o((()=>{if(this.open){const{height:t,top:i}=this.nanoDropdown.tetherTo.getBoundingClientRect();this.nanoDropdown.style.setProperty("--max-height",`max(${window.innerHeight-(t+i+40)}px, 48vw)`)}this.nanoDropdown.open=this.open,this.connectedInput&&this.connectedInput.setAttribute("aria-expanded",this.open.toString())}))}disableFilter=!1;disabled=!1;async watchInputChange(){let t;(t=this.host.closest(s("nano-input")))?(this.isNanoInput=!0,this.connectedInput=await t.getInputElement()):this.input&&"string"==typeof this.input&&(t=document.querySelector(this.input))?(this.isNanoInput=!1,this.connectedInput=t):"object"==typeof this.input&&(this.connectedInput=this.input)}handleOptionsChange(){if(this.host)if(d(this.host,":not(nano-nav-item):not(nano-option):not([role])",!0).forEach((t=>t.setAttribute("role","none"))),this.options&&this.options.length||this.mo){if(this.options?.length){this.mo&&(this.mo.disconnect(),this.mo=void 0);const t=this.host.querySelectorAll(s("nano-option"));o((()=>{t?.length&&t.forEach((t=>t.remove())),this.allOptEles=this.options.flatMap(((t,i)=>{if(t.value||t.label){const e=Object.assign(document.createElement(s("nano-option")),{label:t.label,value:t.value,ariaPosinset:i,ariaSetsize:this.options.length,selected:t.selected,id:this.listId+"-option-"+i,textContent:t.label?t.label:t.value,slot:"internal-opts"});return this.host.append(e),e}})),this.connectedInput?.value.length&&"select"!==this.type?this.inputChange():this.actvOptEles=[...this.allOptEles]}))}}else(this.mo=new MutationObserver((()=>this.processSlottedContent()))).observe(this.host,{childList:!0,subtree:!0}),this.processSlottedContent()}watchTypeChange(){if(!this.connectedInput)return;let t={closeOnSelect:!1},i="both",e=!1;switch(this.type){case"input":t={closeOnSelect:!0};break;case"select":i="list",e=!0,t={closeOnSelect:!0}}this.isNanoInput||(t.tetherTo=this.connectedInput),this.dropDownConfig={...this.dropDownConfig,...t},this.connectedInput.setAttribute("aria-autocomplete",i),this.connectedInput.readOnly=e}manageInputEvents(t,i){if(i){const t=i.closest(s("nano-input"));t&&t.removeEventListener("nanoChange",this.inputChange),this.removeEventListeners(i),this.inputLabel=null,o((()=>{i.removeAttribute("role"),i.removeAttribute("aria-expanded"),i.removeAttribute("aria-controls"),i.removeAttribute("aria-owns"),i.removeAttribute("aria-haspopup"),i.removeAttribute("aria-autocomplete"),i.removeAttribute("autocomplete")}))}if(t){const i=t.closest(s("nano-input"));i&&i.addEventListener("nanoChange",this.inputChange),t.addEventListener("change",this.inputChange),t.addEventListener("click",this.inputClick),t.addEventListener("keydown",this.inputKeydown),t.addEventListener("input",this.inputChange),this.listId=this.host.id||this.listId,this.inputLabel=t?.labels?.item(0)||function(t){let i;return t.id&&(i=document.querySelector(`label[for='${t.id}']`)),i||(i=t.closest("label")),i}(t),o((()=>{this.host.id=this.listId,t.setAttribute("role","combobox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",this.listId),t.setAttribute("aria-owns",this.listId),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("autocomplete","off")}))}}watchActvOptChange(){let t=0;const i=this.connectedInput?.value||"",e=[];o((()=>{this.allOptEles.forEach(((o,n)=>{this.actvOptEles.includes(o)?(t++,o.setAttribute("aria-posinset",t+""),o.setAttribute("aria-setsize",this.actvOptEles.length+""),o.hidden=!1,this.isSelected(o,i)):(o.removeAttribute("aria-posinset"),o.removeAttribute("aria-setsize"),o.hidden=!0,o.selected=!1),o.id=this.listId+"-option-"+n,e.push(o.id)})),this.optionIds=e}))}manageCanOpen(){this.canOpen=!(!this.actvOptEles.length&&!this.hasNoResult)}manageDropdownDisplay(){this.shouldOpen&&this.canOpen&&!this.disabled&&(this.open=!0),this.shouldOpen&&this.canOpen||(this.open=!1),this.openWatcher()}fireActiveOptsEvent(){this.nanoOptionsUpdated.emit(this.actvOptEles)}nanoSelect;nanoDeselect;nanoOptionsUpdated;isSelected(t,i){t.selected=!(i!==t.value&&!this.selected.includes(t.value))}get dropwdownOpen(){return!(!this.nanoDropdown||!this.open)}get exactMatch(){return this.allOptEles.find((t=>this.connectedInput.value===t.value))}changeInputValue(t){let i;if(this.selected.includes(t.value)?(this.selected=this.selected.filter((i=>i!==t.value)),i=this.nanoDeselect.emit(t)):(this.selected=[...this.selected],i=this.nanoSelect.emit(t)),!i.defaultPrevented){this.connectedInput&&(this.connectedInput.value=t.value);const i=new window.Event("change");this.connectedInput?.dispatchEvent(i)}}optSelected=t=>{t.stopPropagation(),this.changeInputValue(t.detail),requestAnimationFrame((()=>this.inputChange())),"selectMulti"!==this.type&&(this.shouldOpen=!1)};setOptStartsWith(){const t=t=>t.toLowerCase().substring(0,this.typeToSelect.length)===this.typeToSelect,i=this.allOptEles.find((i=>i.value.trim().length>0&&!i.disabled&&(t(i.textContent)||t(i.value)||t(i.label)||t(i.filterMeta))));i&&this.changeInputValue(i)}removeEventListeners(t){const i=t.closest(s("nano-input"));i&&i.removeEventListener("nanoChange",this.inputChange),t.removeEventListener("change",this.inputChange),t.removeEventListener("click",this.inputClick),t.removeEventListener("keydown",this.inputKeydown),t.removeEventListener("input",this.inputChange)}processSlottedContent(){requestAnimationFrame((()=>{this.allOptEles=Array.from(this.host.querySelectorAll(s("nano-option"))),this.hasNoResult=!!this.host.querySelector('[slot="no-result"]'),this.connectedInput?.value.length&&"select"!==this.type?this.inputChange():this.actvOptEles=this.allOptEles}))}handleShow=async()=>{this.shouldFocus?(this.shouldFocus=!1,this.listBox.setFocus()):"select"===this.type&&this.listBox.showActiveElement()};handleHide=()=>{this.open=!1,r().closest(this.host.tagName.toLowerCase())&&this.connectedInput.select()};inputChange(){if(this.disableFilter)return void(this.actvOptEles=this.allOptEles);const t=this.connectedInput.value,i=t.trim().toLowerCase();let e=!1;const o=[],n=t=>t.toLowerCase().indexOf(i)>-1;this.allOptEles.forEach((i=>{t!==i.value&&t!==i.label||"selectMulti"===this.type?this.isSelected(i,t):(i.selected=!0,e=!0)})),this.allOptEles.forEach((t=>{(!i.length||e||t.value.trim().length>0&&!t.disabled&&(n(t.textContent)||n(t.value)||n(t.label)||n(t.filterMeta)))&&o.push(t)})),this.isFiltered=i.length&&!e,this.actvOptEles=o}inputClick=()=>{this.open||(this.shouldOpen=!0,this.manageDropdownDisplay())};inputKeydown=t=>{["Shift","ArrowRight","ArrowLeft","Escape","Tab"].includes(t.key)?"Tab"===t.key&&(this.shouldOpen=!1):"select"!==this.type||["ArrowDown","ArrowUp","Enter"].includes(t.key)||" "===t.key&&!this.typeToSelectTimeout?this.open&&["ArrowDown","ArrowUp"].includes(t.key)?this.listBox.setFocus():(this.shouldOpen=!0,this.manageDropdownDisplay(),["ArrowDown","ArrowUp"," ","Enter"].includes(t.key)&&(t.preventDefault(),this.shouldFocus=!0)):(" "===t.key||/^[a-zA0-9]+$/i.test(t.key))&&(clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>{this.typeToSelect="",this.typeToSelectTimeout=0}),750),this.typeToSelect+=t.key,this.setOptStartsWith())};optionKeyDown=t=>{["Shift","ArrowUp","ArrowDown","Escape","Enter","Tab","Space","PageUp","PageDown","Home","End"," "].includes(t.key)?"Escape"===t.key&&this.connectedInput.focus():"select"===this.type||this.exactMatch&&!["Delete","Backspace"].includes(t.key)||this.connectedInput.focus()};connectedCallback(){this.watchInputChange()}componentDidLoad(){this.handleOptionsChange(),this.openWatcher()}componentDidRender(){setTimeout((()=>{this.connectedInput||console.warn("no `nano-input` found. `nano-datalist` should be nested within an `nano-input` or linked via `input` prop",this.host)}),500)}disconnectedCallback(){this.mo&&(this.mo.disconnect(),this.mo=void 0),this.connectedInput&&(this.connectedInput=void 0)}render(){return a(n,{key:"b9c67e5dfc3c26c4eac219d9bdc9081aa79d7122",class:"nano-datalist",role:this.actvOptEles.length?"listbox":void 0,"aria-owns":this.optionIds.length?this.optionIds.join(" "):void 0,"aria-label":this.optionIds.length?"Select options from the list below":void 0},a("nano-dropdown",{key:"29a0de977f7be1a39c5c869a5ab366bb64711d9e",part:"dropdown",exportparts:"trigger:dropdown__trigger, panel:dropdown__panel",...this.dropDownConfig,ref:t=>this.nanoDropdown=t,dialogTitle:"Select options from the list below",class:{dlist__dropdown:!0,"dlist--isfiltered":this.isFiltered},onNanoAfterShow:this.handleShow,onNanoAfterHide:this.handleHide,role:"group"},a("nano-menu",{key:"86769c73825853c557ed7a1dfb0f86898ce6504f",part:"main-menu",ref:t=>this.listBox=t,hidden:!this.actvOptEles.length,type:"listbox",label:this.inputLabel?this.inputLabel.textContent:void 0,class:{dlist__menu:!0,"dlist__menu--open":this.dropwdownOpen},tabIndex:-1,onNanoSelect:this.optSelected,onKeyDown:this.optionKeyDown},a("slot",{key:"f5ea0623591a368f38ce3c1e41ef431c4a9f5960",name:"list-top"}),a("slot",{key:"98804885ffb99528138867d2747af3acef3f64f7"}),a("slot",{key:"1341dc10f96570c04613153cf939aaf7dc21f0d3",name:"internal-opts"}),a("slot",{key:"84d86a667a69cd571f7b96dc29d1ddd58c3d482c",name:"list-bottom"})),a("nano-menu",{key:"9b09caa70bd106eb9e64c714072c0b88275f34c6",part:"no-result-menu",type:"listbox",label:"No results found",hidden:!!this.actvOptEles.length,class:{dlist__menu:!0,"dlist__menu--open":this.dropwdownOpen}},a("slot",{key:"58187330291198ff00571570e2b6b6bfdc79c905",name:"no-result"})),!!this.actvOptEles&&a("div",{key:"72ea39405f558d10de86a14704ed48e869f01426",class:"dlist__status"},this.actvOptEles.length," result",this.actvOptEles.length>1?"s":""," available.")))}static get watchers(){return{open:["openWatcher"],input:["watchInputChange"],options:["handleOptionsChange"],type:["watchTypeChange"],connectedInput:["watchTypeChange","manageInputEvents"],selected:["watchActvOptChange"],actvOptEles:["watchActvOptChange","manageCanOpen","fireActiveOptsEvent"],hasNoResult:["manageCanOpen"],shouldOpen:["manageDropdownDisplay"],canOpen:["manageDropdownDisplay"]}}};c.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--padding-top:8px;--padding-bottom:8px;--padding-start:var(--nano-spacing-l);--padding-end:var(--nano-spacing-l);--font-size:var(--nano-font-size-2xs);--color:var(--nano-color-neutral-1000);color:var(--color)}.dlist--isfiltered ::slotted(*:not(.nano-option,[slot=no-result],[slot=list-top],[slot=list-bottom])){display:none !important}.dlist__dropdown{--min-width:100%;--overflow:auto;display:inline}.dlist__status{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.dlist__menu{--padding-top:inherit;--padding-bottom:inherit;--padding-start:inherit;--padding-end:inherit;--font-size:inherit;--padding:var(--nano-spacing-sm) var(--nano-spacing-l)}";let p=0;const u=class{optId="nano-option-"+p++;get host(){return t(this)}constructor(t){i(this,t),this.nanoSelect=e(this,"nanoSelect",7),this.handleClick=h(this.handleClick.bind(this),5)}value="";valueChanged(){this.value&&this.value.length||this.label||(this.value=this.labelContent)}label="";labelChanged(){this.label&&this.label.length||(this.label=this.labelContent.length?this.labelContent:this.value)}selected=!1;disabled=!1;filterMeta="";href;nanoSelect;handleKeyDown(t){" "!==t.key&&"Enter"!==t.key||this.href||(t.preventDefault(),this.nanoSelect.emit(this.host))}handleClick(){this.disabled||this.href||this.nanoSelect.emit(this.host)}get labelContent(){return d(this.host,"*:not([slot])",!1).map((t=>t.textContent)).join(" ").trim()}componentWillLoad(){this.valueChanged(),this.labelChanged()}render(){return a(n,{key:"67b4ee2d21105b72d816b42054329fbe54ed8688",role:"option","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false",class:"nano-option"},a(this.href?"a":"div",{key:"61ad0172a3d7c0fefacd135121d9f52c15dc9bc5",href:this.href||void 0,onMouseDown:this.handleClick,id:this.optId,class:{option:!0,"option--selected":this.selected,"option--disabled":this.disabled,"option--novalue":!this.value}},a("div",{key:"029278a486ed9a1dd809940ed702c55ac0f490a2",part:"check-icon",class:"option__check"},a("slot",{key:"70c6d3b126e18b91f9e298491e11f6c6a188a957",name:"check-icon"},a("nano-icon",{key:"20543f3436aff8fb152d69b8d89d009b02d18b88",name:"light/check","aria-hidden":"true"}))),a("div",{key:"548cb4eb15f59c3be72ec1452ca84206c97389da",part:"start",class:"option__start"},a("slot",{key:"5e9f2ac1c0358b8008799ed08643619fc41055f8",name:"start"})),a("div",{key:"95f3cd28fb34f02d55034322cd5154e06d5fc4c1",part:"label",class:"option__label"},a("slot",{key:"1c1208ad99a9a123c6a9110c3cd976a502bc5cca"},this.label||this.value)),a("div",{key:"fcf9bf3e1c6674811be6a29af94d747903457d33",part:"end",class:"option__end"},a("slot",{key:"c49f296954fd5a60920af5b07fb5157bbe6e4e72",name:"end"}))))}static get watchers(){return{value:["valueChanged"],label:["labelChanged"]}}};u.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--bg:none;--bg-selected:none;--bg-focus:var(--nano-color-blue-cerulean-1000);--bg-disabled:none;--color:var(--nano-color-base-1000);--color-selected:var(--nano-color-base-1000);--color-focus:var(--nano-color-base-0);--color-disabled:var(--nano-color-neutral-300);--opt-icon-size:1em;--padding-start:var(--nano-spacing-sm);--padding-end:var(--nano-spacing-md);--padding-bottom:6px;--padding-top:6px;display:block;color:var(--color);overflow:hidden;font-size:var(--nano-font-size-xs)}:host(:focus){outline:none}.option{color:inherit;text-decoration:none;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;display:flex;align-items:stretch;inline-size:100%;background:var(--bg);padding-inline:var(--padding-start) var(--padding-end);padding-block:var(--padding-top) var(--padding-bottom)}:host(:focus) .option:not(.option--disabled),:host .option.option--selected{outline:none;background:var(--bg-selected);color:var(--color-selected)}:host(:focus) .option:not(.option--disabled){background:var(--bg-focus);color:var(--color-focus)}.option.option--disabled{outline:none;color:var(--color-disabled);cursor:not-allowed;background:var(--bg-disabled)}.option.option--novalue{font-style:italic;opacity:0.7}.option__label{flex:1 1 auto;display:flex;align-items:center}.option__start{flex:0 0 auto;display:flex;align-items:center}.option__start ::slotted(.nano-icon){font-size:var(--opt-icon-size)}.option__start ::slotted(:last-child){margin-inline-end:var(--padding-end)}.option__end{flex:0 0 auto;display:flex;align-items:center}.option__end ::slotted(.nano-icon){font-size:var(--opt-icon-size)}.option__end ::slotted(:first-child){margin-inline-start:var(--padding-start)}.option__check{visibility:hidden;display:flex;margin-inline-end:var(--padding-start);align-items:center;font-size:var(--nano-font-size-2xs);inline-size:var(--nano-font-size-2xs)}.option--selected:not(.option--novalue) .option__check{visibility:visible}";const f=class{constructor(t){i(this,t),this.nanoClose=e(this,"nanoClose",7)}closable=!1;size="regular";get el(){return t(this)}nanoClose;onKeyDown=t=>{switch(t.key){case"Enter":case" ":t.preventDefault(),this.close()}};handleClick=()=>{this.close()};close(){this.nanoClose.emit()}containsAnchor=()=>!!this.el.querySelector("a");render(){return this.closable&&!this.containsAnchor()&&[a("slot",{key:"7b5455fe29a182a51e9d9dc884e5d40dd3aaafd6"}),a("nano-icon-button",{key:"af79797da765a4da2d6a49d9ca1a7bd9295a8429",label:"Close","icon-name":"light/xmark-large",onKeyDown:this.onKeyDown,onClick:this.handleClick})]}};f.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}";export{c as nano_datalist,u as nano_option,f as nano_tag}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{r as n,c as t,a as e,d as i}from"./index-DXvE-U_j.js";import{h as a,t as o}from"./renderer-BUaAsDso.js";import{i as s,g as r,b as l,D as c,p as d,d as h,s as u,e as p,f as b,h as f,j as _,k as m,l as v,a as g}from"./date-utils-BZYdjI1P.js";import{c as y}from"./dom-Cb7FUtXp.js";import{a as k}from"./throttle-C93FMm2Z.js";import{F as x,a as w}from"./form-control-BOVGZF9R.js";const z={buttonLabel:"Choose date",placeholder:"YYYY-MM-DD",selectedDateMessage:"Selected date is",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",keyboardInstruction:"You can use arrow keys to navigate dates",calendarHeading:"Choose a date",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},D=({focusedDay:n,today:t,day:e,onDaySelect:i,onKeyboardNavigation:o,focusedDayRef:r,inRange:l,disabled:c,isSelected:d})=>{const h=s(e,t),u=s(e,n),p=e.getMonth()!==n.getMonth()||c,b=!l;return a("button",{class:{"duet-date__day":!0,"is-outside":b,"is-disabled":p,"is-today":h},tabIndex:u?0:-1,onClick:function(n){i(n,e)},onKeyDown:o,disabled:b,type:"button","aria-pressed":d?"true":"false",ref:n=>{u&&n&&r&&r(n)}},a("span",{"aria-hidden":"true"},e.getDate()),a("span",{class:"duet-date__vhidden"},e.toLocaleDateString(void 0,{day:"numeric",month:"long"})))},C=({selectedDate:n,focusedDate:t,labelledById:e,localization:i,firstDayOfWeek:o,min:c,max:d,onDateSelect:h,onKeyboardNavigation:u,focusedDayRef:p,onMouseDown:b,onFocusIn:f,isDateDisabled:_})=>{const m=new Date,v=r(t,o);return a("table",{class:"duet-date__table",role:"grid","aria-labelledby":e,onFocusin:f,onMouseDown:b},a("thead",null,a("tr",null,(y=o,k=n=>a("th",{class:"duet-date__table-header",scope:"col"},a("span",{"aria-hidden":"true"},n.substring(0,2)),a("span",{class:"duet-date__vhidden"},n)),(g=i.dayNames).map(((n,t)=>k(g[(t+y)%g.length])))))),a("tbody",null,function(n){const t=[];for(let e=0;e<n.length;e+=7)t.push(n.slice(e,e+7));return t}(v).map((e=>a("tr",{class:"duet-date__row"},e.map((e=>a("td",{class:"duet-date__cell",role:"gridcell","aria-selected":s(e,n)?"true":void 0},a(D,{day:e,today:m,focusedDay:t,inRange:l(e,c,d),onDaySelect:h,onKeyboardNavigation:u,focusedDayRef:p,disabled:_(e),isSelected:s(e,n)})))))))));var g,y,k};let S=0;const I=class{constructor(e){n(this,e),this.nanoDatePicked=t(this,"nanoDatePicked",7)}dateId="nano-datepicker-"+S++;monthSelectId=this.dateId+"-month";yearSelectId=this.dateId+"-year";dialogLabelId=this.dateId+"-dialog";firstFocusableElement;monthSelectNode;focusedDayNode;focusTimeoutId;initialTouchX=null;initialTouchY=null;get host(){return e(this)}activeFocus=!1;focusedDay=new Date;_selectedDate="";get selectedDate(){return this._selectedDate}set selectedDate(n){"string"==typeof n?(n=n.split("T")[0],this._selectedDate=n):this._selectedDate=""}min="";max="";firstDayOfWeek=c.Monday;localization=z;isDateDisabled=()=>!1;isModal=!1;firstFocusEle;nanoDatePicked;async setFocus(n=!1){this.setFocusedDay(d(this.selectedDate)||new Date),n?setTimeout((()=>this.focusedDayNode.focus()),20):(clearTimeout(this.focusTimeoutId),this.focusTimeoutId=setTimeout((()=>{this.monthSelectNode.focus()}),20))}handleSelectedDateChange(){this.setFocus(!0)}enableActiveFocus=()=>{this.activeFocus=!0};disableActiveFocus=()=>{this.activeFocus=!1};addDays(n){this.setFocusedDay(h(this.focusedDay,n))}addMonths(n){this.setMonth(this.focusedDay.getMonth()+n)}addYears(n){this.setYear(this.focusedDay.getFullYear()+n)}startOfWeek(){this.setFocusedDay(u(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(p(this.focusedDay,this.firstDayOfWeek))}setMonth(n){const t=b(f(this.focusedDay),n),e=_(t),i=b(this.focusedDay,n);this.setFocusedDay(m(i,t,e))}setYear(n){const t=v(f(this.focusedDay),n),e=_(t),i=v(this.focusedDay,n);this.setFocusedDay(m(i,t,e))}setFocusedDay(n){this.focusedDay=m(n,d(this.min),d(this.max))}handleTouchStart=n=>{const t=n.changedTouches[0];this.initialTouchX=t.pageX,this.initialTouchY=t.pageY};handleTouchMove=n=>{n.preventDefault()};handleTouchEnd=n=>{const t=n.changedTouches[0],e=t.pageX-this.initialTouchX,i=t.pageY-this.initialTouchY;Math.abs(e)>=70&&Math.abs(i)<=70&&this.addMonths(e<0?1:-1),this.initialTouchY=null,this.initialTouchX=null};handleNextMonthClick=n=>{n.preventDefault(),this.addMonths(1)};handlePreviousMonthClick=n=>{n.preventDefault(),this.addMonths(-1)};handleKeyboardNavigation=n=>{if("Tab"===n.key&&!n.shiftKey&&this.isModal){n.preventDefault();const t=this.firstFocusEle||this.firstFocusableElement;return void(t.setFocus?t.setFocus():t.focus())}let t=!0;switch(n.key){case"ArrowRight":this.addDays(1);break;case"ArrowLeft":this.addDays(-1);break;case"ArrowDown":this.addDays(7);break;case"ArrowUp":this.addDays(-7);break;case"PageUp":n.shiftKey?this.addYears(-1):this.addMonths(-1);break;case"PageDown":n.shiftKey?this.addYears(1):this.addMonths(1);break;case"Home":this.startOfWeek();break;case"End":this.endOfWeek();break;default:t=!1}t&&(n.preventDefault(),this.enableActiveFocus())};handleDaySelect=(n,t)=>{const e=!this.isDateDisabled(t);l(t,d(this.min),d(this.max))&&e&&(t.getMonth()===this.focusedDay.getMonth()?this.setValue(t):this.setFocusedDay(t))};handleMonthSelect=n=>{this.setMonth(parseInt(n.target.value,10))};handleYearSelect=n=>{this.setYear(parseInt(n.target.value,10))};setValue(n){this.selectedDate=g(n),this.nanoDatePicked.emit({value:this.selectedDate,valueAsDate:n})}processFocusedDayNode=n=>{this.focusedDayNode=n,this.activeFocus&&setTimeout((()=>n.focus()),0)};componentWillLoad(){this.handleSelectedDateChange()}render(){const n=d(this.selectedDate),t=(n||this.focusedDay).getFullYear(),e=this.focusedDay.getMonth(),o=this.focusedDay.getFullYear(),s=d(this.min),r=d(this.max),c=null!=s&&s.getMonth()===e&&s.getFullYear()===o,h=null!=r&&r.getMonth()===e&&r.getFullYear()===o;let u=t-10,p=t+10;return s&&(u=s.getFullYear()),r&&(p=r.getFullYear()),a(i,{key:"476708135e014efc8662dcfdd6877bfa21ef6f31",class:"nano-date-picker"},a("div",{key:"4ff36de5c9e6c86fa26638db70514f12fad96262",class:"duet-date"},a("div",{key:"544a676f3354fc3cd0a6c0f1fd8610d47c5c586b",class:{"duet-date__dialog":!0,"is-active":!0},onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},a("div",{key:"94665c51ab3ee801e6affb6be91076777f329665",class:"duet-date__dialog-content"},a("div",{key:"3e014e07dd3f43808bdb99fbc79c6f81958328ac",class:"duet-date__vhidden duet-date__instructions","aria-live":"polite"},this.localization.keyboardInstruction),a("div",{key:"6759c71255f8ff0c05a56e118ad628afc7f1af43",class:"duet-date__header",onFocusin:this.disableActiveFocus},a("div",{key:"b0688e27b47a95fbb8c051d0680975741547762e"},a("h2",{key:"1bb4b0035cc07304248c496c55077a88d43d57f5",id:this.dialogLabelId,class:"duet-date__vhidden","aria-live":"polite"},this.localization.monthNames[e]," ",this.focusedDay.getFullYear()),a("label",{key:"e740c878525a794eaac04b44c4770edaa5a1d780",htmlFor:this.monthSelectId,class:"duet-date__vhidden"},this.localization.monthSelectLabel),a("div",{key:"658b004a5ae3e50070a2683f92c68b924246a4e9",class:"duet-date__select"},a("select",{key:"3a99660e9c05ca78d5945b4a8dd581f3fcd64fff",id:this.monthSelectId,class:"duet-date__select--month",ref:n=>this.firstFocusableElement=this.monthSelectNode=n,onChange:this.handleMonthSelect},this.localization.monthNames.map(((n,t)=>a("option",{key:n,value:t,selected:t===e,disabled:!l(new Date(o,t,1),s?f(s):null,r?_(r):null)},n)))),a("div",{key:"6c9f19bbd85e2d6bd16e06b87507599a77f3b8e0",class:"duet-date__select-label","aria-hidden":"true"},a("span",{key:"94813adbb53c491d53045106a0e97e68ecc8a257"},this.localization.monthNamesShort[e]),a("nano-icon",{key:"d6d867b3732097902ac0b537d055ec0eb6dbb11f",name:"light/chevron-down"}))),a("label",{key:"a77adf78db5d8f2ec2998526c2d5d2882fb01a24",htmlFor:this.yearSelectId,class:"duet-date__vhidden"},this.localization.yearSelectLabel),a("div",{key:"fe5d77c1f3d5cb7bc8ba2befd232b001fcafa8da",class:"duet-date__select"},a("select",{key:"3585692273f5bdfdb58e1e265bb6b754708cb69a",id:this.yearSelectId,class:"duet-date__select--year",onChange:this.handleYearSelect},function(n,t){const e=[];for(let i=n;i<=t;i++)e.push(i);return e}(u,p).map((n=>a("option",{key:n,selected:n===o},n)))),a("div",{key:"ce1137c980183ccffc195f83bdc5147de3f8194b",class:"duet-date__select-label","aria-hidden":"true"},a("span",{key:"a5d3e28fdbb1b4192f51da8009cce094558db3c0"},this.focusedDay.getFullYear()),a("nano-icon",{key:"0958bff2d269607480fb9475f4a58df147885f4b",name:"light/chevron-down"})))),a("div",{key:"d49585f3b292ba85ed013e52a5a042cb55601937",class:"duet-date__nav"},a("button",{key:"1f3f492d1965e6416a5fac52db0ecba7864b8df7",class:"duet-date__prev",onClick:this.handlePreviousMonthClick,disabled:c,type:"button"},a("nano-icon",{key:"abe59d338029675ad55a5e7faab8170ca2c2af2f",name:"light/chevron-left"}),a("span",{key:"7d59fa5d95085c6d66d93f95c953e9a2f74b8a5f",class:"duet-date__vhidden"},this.localization.prevMonthLabel)),a("button",{key:"a895a7b901ca21fa32710c3a187ce263cf105908",class:"duet-date__next",onClick:this.handleNextMonthClick,disabled:h,type:"button"},a("nano-icon",{key:"b8737eb28e5ad5873f40523a557745a338aa5277",name:"light/chevron-right"}),a("span",{key:"2c98c7be89ce30939c647f7faea1c531fa0d38a9",class:"duet-date__vhidden"},this.localization.nextMonthLabel)))),a("div",{key:"42284a65a7e2bb5302cd75a61f19a691ea1236bd"},a(C,{key:"d548838275eecb1a2dff47851e9fd57c9f49f691",selectedDate:n,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,localization:this.localization,firstDayOfWeek:this.firstDayOfWeek,focusedDayRef:this.processFocusedDayNode,min:s,max:r,isDateDisabled:this.isDateDisabled}))))))}static get watchers(){return{selectedDate:["handleSelectedDateChange"]}}};I.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--active-color:var(--nano-color-primary-1000);--active-text-color:var(--nano-color-base-0);--inactive-color:var(--nano-color-neutral-300);display:block;font-size:16px;background:var(--nano-color-neutral-50)}.duet-date *,.duet-date *::before,.duet-date *::after{box-sizing:border-box;margin:0}.duet-date{box-sizing:border-box;color:currentcolor;display:block;margin:0;position:relative;text-align:start;inline-size:100%}.duet-date__dialog{display:flex;inset-block-start:100%;max-inline-size:100%;inline-size:100%}.duet-date__dialog.is-left{inset-inline:auto 0;inline-size:auto}.duet-date__dialog-content{min-inline-size:290px;padding:var(--nano-spacing-md);position:relative;transform:none;max-inline-size:100%;inline-size:100%}.duet-date__table{border-collapse:collapse;border-spacing:0;font-size:1em;line-height:1;text-align:center;inline-size:100%}.duet-date__table-header{font-size:0.75em;font-weight:600;letter-spacing:1px;line-height:1;padding-block-end:8px;text-decoration:none;text-transform:uppercase}.duet-date__cell{text-align:center;padding:0 0 3px}.duet-date__day{appearance:none;background:transparent;border:0;border-radius:50%;cursor:pointer;display:inline-block;font-size:0.875em;font-variant-numeric:tabular-nums;line-height:1;position:relative;text-align:center;vertical-align:middle;z-index:1;block-size:2.5em;inline-size:2.5em}.duet-date__day.is-today{box-shadow:0 0 0 1px var(--active-color);position:relative}.duet-date__day:hover::before,.duet-date__day.is-today::before{content:"";background:var(--active-color);border-radius:50%;opacity:0.16;position:absolute;inset:0}[aria-selected=true] .duet-date__day{background:var(--active-color) !important;color:var(--active-text-color);box-shadow:none;outline:0}.duet-date__day:not(.is-disabled):active{background:color-mix(in srgb, var(--active-color), black 20%);color:var(--active-text-color)}.duet-date__day:focus-visible{outline:var(--nano-focus-ring);outline-offset:-1px;z-index:2}.duet-date__day.is-disabled{background:transparent;box-shadow:none;cursor:default;opacity:0.5}.duet-date__day.is-disabled::before{display:none}.duet-date__day.is-outside{background:var(--inactive-color);box-shadow:none;cursor:default;opacity:0.8;pointer-events:none}.duet-date__day.is-outside::before{display:none}.duet-date__header{align-items:center;display:flex;justify-content:space-between;margin-block-end:var(--nano-spacing-md);inline-size:100%}.duet-date__nav{white-space:nowrap}.duet-date__prev,.duet-date__next{background:var(--inactive-color);align-items:center;appearance:none;border:0;border-radius:50%;cursor:pointer;display:inline-flex;justify-content:space-around;margin-inline-start:8px;padding:0;font-size:0.9em;block-size:2.2em;inline-size:2.2em}.duet-date__prev:focus-visible,.duet-date__next:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.duet-date__prev:active,.duet-date__next:active{background:color-mix(in srgb, var(--inactive-color), black 20%)}.duet-date__prev:disabled,.duet-date__next:disabled{cursor:default;opacity:0.7}.duet-date__prev .nano-icon,.duet-date__next .nano-icon{margin-block:0;margin-inline:auto}.duet-date__select{display:inline-flex;margin-block-start:4px;position:relative}.duet-date__select span{margin-inline-end:4px}.duet-date__select select{cursor:pointer;font-size:1em;block-size:100%;inset-inline-start:0;opacity:0;position:absolute;inset-block-start:0;inline-size:100%;z-index:2}.duet-date__select select:focus-visible:focus+.duet-date__select-label{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.duet-date__select-label{align-items:center;display:flex;font-size:1.25em;font-weight:600;line-height:1;padding-block:0;padding-inline:8px 4px;pointer-events:none;position:relative;inline-size:100%;z-index:1}.duet-date__select-label .nano-icon{font-size:0.55em}.duet-date__vhidden{border:0;clip:rect(1px, 1px, 1px, 1px);block-size:1px;overflow:hidden;padding:0;position:absolute;inset-block-start:0;inline-size:1px}';let F=0;const M=class{nativeInput;inputId="nano-input-"+F++;didBlurAfterEdit=!1;rtl=!1;mo;charCount=0;hasRendered=!1;pickerDropdown;picker;pickerCloseBtn;_nativeInputWrap;get nativeInputWrap(){return this._nativeInputWrap}set nativeInputWrap(n){this._nativeInputWrap!==n&&(this._nativeInputWrap=n,this.setDataListOpts())}constructor(e){n(this,e),this.nanoInput=t(this,"nanoInput",7),this.nanoChange=t(this,"nanoChange",7),this.nanoBlur=t(this,"nanoBlur",7),this.nanoFocus=t(this,"nanoFocus",7),this.nanoDidLoad=t(this,"nanoDidLoad",7),this.nanoDidUnload=t(this,"nanoDidUnload",7),this.nanoValidate=t(this,"nanoValidate",7),this.handleBlur=this.handleBlur.bind(this)}hasFocus=!1;hasLabelSlot=!1;hasHelperSlot=!1;hasHelperEndSlot=!1;errorMessage="";datalist=null;setDataListOpts(){this.datalist&&(this.datalist.dropDownConfig={distance:10,...this.datalist.dropDownConfig||{},skidding:-1,tetherTo:this.nativeInputWrap})}get el(){return e(this)}get invalid(){return this._invalid}_invalid=null;get validityMessage(){return this.nativeInput?this.nativeInput.validationMessage:""}accept;autocapitalise="none";autocomplete="off";autocorrect="off";autofocus=!1;clearable=!1;clearOnEdit;debounce=0;debounceChanged(){this.nanoChange=k(this.nanoChange,this.debounce)}disabled=!1;inputmode;validateOn="submitThenDirty";showInlineError=!0;_label="";get label(){return this.required&&!this._label.endsWith("*")?this._label+" *":this._label}set label(n){this._label=n}alwaysShowPlaceholder=!1;hideLabel=!1;floatLabel=!1;max;maxlength;min;minlength;multiple;name=this.inputId;pattern;placeholder;readonly=!1;required=!1;spellcheck=!1;step;size;type="text";form;value="";valueChanged(){this.nanoChange.emit({value:this.value}),this.charCount=this.value?.length||0,"textarea"===this.type&&"auto"===this.resize&&(this.nativeInput.style.height="auto",this.value?.length&&(this.nativeInput.style.height=this.nativeInput.scrollHeight+"px")),"date"===this.type&&(this.isDateDisabled(this.valueAsDate)?this.nativeInput.setCustomValidity("Date selected is not available."):"Date selected is not available."===this.nativeInput.validationMessage&&this.nativeInput.setCustomValidity("")),requestAnimationFrame((()=>{"dirty"===this.validateOn&&this.validate()}))}get valueAsNumber(){return"textarea"===this.type?NaN:this.nativeInput?.valueAsNumber||NaN}get valueAsDate(){return"textarea"===this.type?null:new Date(this.value)||null}showCharCount=!1;shouldValidate(){this.hasRendered&&requestAnimationFrame((()=>{"dirty"===this.validateOn&&this.validate()}))}resize="auto";rows=2;showPicker=!0;isDateDisabled=()=>!1;initialPickerDate;closeAfterPicked=!0;pickerOptions={};nanoInput;nanoChange;nanoBlur;nanoFocus;nanoDidLoad;nanoDidUnload;nanoValidate;async reportValidity(n){return new Promise((t=>{n&&this.validate(),setTimeout((()=>{t({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage})}),50)}))}async setFocus(){this.nativeInput&&(this.nativeInput.focus(),this.nativeInput.click())}async select(){this.nativeInput&&this.nativeInput.select()}getInputElement(){return Promise.resolve(this.nativeInput)}async showError(n){this.nativeInput&&(this.nativeInput.setCustomValidity(n),this.validate())}onReset(n){(this.form?document.querySelector("#"+this.form):this.el.closest("form"))&&n.target===this.el.closest("form")&&(this.value="")}handleBlur(n){if(!this.hasFocus)return;const t=n;let e;requestAnimationFrame((()=>{if(n instanceof KeyboardEvent&&t.key){if("Tab"!==t.key)return;e=document.activeElement}else e=n instanceof FocusEvent?document.activeElement:n.target;y(this.el.tagName.toLowerCase(),e)!==this.el&&this.onBlur()}))}shouldClearOnEdit(){const{type:n,clearOnEdit:t}=this;return void 0===t?"password"===n:t}getValue(){return this.value||""}validate=n=>{"submitThenDirty"===this.validateOn&&(this.validateOn="dirty"),this.nativeInput.validity.valid?this._invalid=!1:(this.showInlineError&&(n&&n.preventDefault(),this.errorMessage=this.nativeInput.validationMessage),this._invalid=!0),this.nanoValidate.emit({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage,originalEvent:n})};onInput=n=>{const t=n.target;this.value=t?.value||"",this.nanoInput.emit(n)};onBlur=()=>{this.hasFocus=!1,this.focusChanged(),"dirty"===this.validateOn&&this.validate(),this.nanoBlur.emit()};onFocus=n=>{"date"===this.type&&n.preventDefault(),this.hasFocus=!0,this.focusChanged(),this.nanoFocus.emit()};onKeydown=n=>{"date"===this.type&&[" "].includes(n.key)&&(n.preventDefault(),this.showPicker&&this.pickerDropdown?.show()),this.shouldClearOnEdit()&&(this.didBlurAfterEdit&&this.hasValue()&&this.clearTextInput(),this.didBlurAfterEdit=!1)};clearTextInput=n=>{this.clearable&&!this.readonly&&!this.disabled&&n&&(n.preventDefault(),n.stopPropagation()),this.value="",this.nativeInput.value="";const t=new window.Event("change");this.nativeInput.dispatchEvent(t)};focusChanged(){!this.hasFocus&&this.shouldClearOnEdit()&&this.hasValue()&&(this.didBlurAfterEdit=!0)}hasValue(){return this.getValue().length>0}slotChangeObserver(){this.mo&&this.mo.disconnect(),(this.mo=new MutationObserver((()=>this.processSlottedContent()))).observe(this.el,{childList:!0,subtree:!0})}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(`${o("nano-datalist")}:not([slot])`)}connectedCallback(){this.debounceChanged(),this.el.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.el}))}disconnectedCallback(){document.dispatchEvent(new CustomEvent("nanoDidUnload",{detail:this.el})),this.mo&&this.mo.disconnect()}componentDidLoad(){this.slotChangeObserver(),this.hasRendered=!0,this.autofocus&&setTimeout((()=>this.setFocus()),300)}componentWillLoad(){this.processSlottedContent()}render(){const n=this.getValue(),t=this.inputId+"-lbl",e=this.showInlineError||this.hasHelperSlot?this.inputId+"-more":"",o=this.hasHelperEndSlot?this.inputId+"-helper":"";this.rtl="rtl"===this.el.ownerDocument.dir;const s={...(({el:n,floatLabel:t,label:e,alwaysShowPlaceholder:i,errorMessage:a,type:o,showInlineError:s,hasHelperSlot:r,hasLabelSlot:l,hideLabel:c,placeholder:d,maxlength:h,charCount:u,showCharCount:p,rtl:b,hasHelperEndSlot:f})=>({el:n,floatLabel:t,label:e,alwaysShowPlaceholder:i,errorMessage:a,type:o,showInlineError:s,hasHelperSlot:r,hasLabelSlot:l,hideLabel:c,placeholder:d,maxlength:h,charCount:u,showCharCount:p,rtl:b,hasHelperEndSlot:f}))(this),labelId:t,moreId:e,helperEndId:o,hasValue:this.hasValue(),controlId:this.inputId},r=(({clearable:n,readonly:t,disabled:e})=>({clearable:n,readonly:t,disabled:e,clearControl:this.clearable}))(this);return a(i,{key:"1601bf765681a833b22c05294a1c8d9b5c6be5ee","aria-disabled":this.disabled?"true":null,class:{"has-value":this.hasValue(),"has-focus":this.hasFocus,"is-invalid":!0===this._invalid,"is-valid":!1===this._invalid,"nano-input":!0}},a("div",{key:"3db99291d328de9684137597706b79e4f24b65e2",style:{width:"100%"}},a(x,{key:"df525275b5c35b9ae3fdc793766a9af759740076",...s,class:{"has-helper":this.hasHelperSlot,"has-error":!!this.errorMessage&&this.showInlineError&&!0===this._invalid}},a(w,{key:"8f25ff2340431b2ea29d5063877ad376ec229758",...r,onClearText:this.clearTextInput,control:this.el,ref:n=>this.nativeInputWrap=n,showInlineError:this.showInlineError,endSlot:this.showPicker&&"date"===this.type&&!this.readonly&&!this.disabled&&[a("nano-dropdown",{slot:"end",dialogTitle:"Choose a date",class:"input__date-dropdown",part:"date__dropdown",placement:"bottom-end",skidding:10,distance:12,ref:n=>this.pickerDropdown=n,onNanoAfterShow:()=>this.picker.setFocus(!0)},a("nano-icon-button",{label:"Open date picker",iconName:"light/calendar-days",slot:"trigger",class:"input__date-trigger"}),a("div",null,a("div",{class:"date-field__close-bar"},a("nano-icon-button",{label:"Close date picker",iconName:"light/xmark",class:"input__date-close",onClick:n=>{n.target.closest("nano-dropdown")?.hide()},ref:n=>this.pickerCloseBtn=n})),a("nano-date-picker",{part:"date__picker",ref:n=>{this.picker=n,this.picker.firstFocusEle=this.pickerCloseBtn},...this.pickerOptions,isDateDisabled:this.isDateDisabled,onNanoDatePicked:n=>{this.value=n.detail.value,this.pickerDropdown?.hide()},min:this.min,max:this.max,"is-modal":!0,selectedDate:this.value||this.initialPickerDate||void 0})))]},"textarea"!==this.type&&a("input",{key:"97734d0168a049af1b22e4517db5e58d25a75b13",id:this.inputId,class:"input__native-ctrl",ref:n=>this.nativeInput=n,"aria-labelledby":t+" "+e+" "+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:n,onInput:this.onInput,onClick:n=>n.preventDefault(),onChange:this.onInput,onFocus:this.onFocus,onBlur:this.handleBlur,onKeyDown:this.onKeydown,onInvalid:this.validate}),"textarea"===this.type&&a("textarea",{key:"b1780aa8cf51d8b7440825d461d89e8746fcd96d",rows:this.floatLabel?1:this.rows,id:this.inputId,class:{"input__native-ctrl":!0,input__resizable:"true"===this.resize},ref:n=>this.nativeInput=n,"aria-labelledby":t+" "+e+" "+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:n,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeydown,onInvalid:this.validate,onBlur:this.handleBlur}))),a("slot",{key:"fa333ee624b824af60a8a79d09720e231e8d455c"})))}static get watchers(){return{datalist:["setDataListOpts"],debounce:["debounceChanged"],value:["valueChanged"],minlength:["shouldValidate"],maxlength:["shouldValidate"],min:["shouldValidate"],max:["shouldValidate"],required:["shouldValidate"],disabled:["shouldValidate"],readonly:["shouldValidate"],pattern:["shouldValidate"],inputmode:["shouldValidate"],type:["shouldValidate"]}}};M.style='.sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n box-sizing: border-box;\n}\n[hidden].sc-nano-input {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n .sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }.sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n box-sizing: border-box;\n}\n[hidden].sc-nano-input {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n .sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }slot-fb.sc-nano-input {\n display: contents !important;\n}\n\n[disabled].sc-nano-input-h:not([disabled=false]) {\n opacity: 0.5;\n position: relative;\n}\n[disabled].sc-nano-input-h:not([disabled=false])::after {\n content: "";\n position: absolute;\n inset: 0;\n cursor: not-allowed;\n}\n\n.form-ctrl.sc-nano-input {\n min-inline-size: 100%;\n display: block;\n}\n.form-ctrl.has-helper-end.sc-nano-input {\n display: flex;\n gap: 1rem;\n container-type: inline-size;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__wrapper.sc-nano-input {\n flex: 1 1 100%;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__helper-end.sc-nano-input {\n display: none;\n}\n@container (min-width: 350px) {\n .form-ctrl.has-helper-end .form-ctrl__helper-end {\n display: block !important;\n }\n .form-ctrl.has-helper-end .form-ctrl__helper {\n display: none !important;\n }\n}\n\n.form-ctrl__wrapper.sc-nano-input {\n display: block;\n}\n\nlabel.sc-nano-input, .form-ctrl__more.sc-nano-input, .form-ctrl__error.sc-nano-input, .form-ctrl__helper.sc-nano-input {\n display: block;\n inline-size: 100%;\n overflow: clip;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nlabel.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 {\n clip-path: inset(50%);\n block-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n inline-size: 1px;\n}\n\n.form-ctrl__float-label.sc-nano-input {\n padding-block: 0;\n padding-inline: var(--padding-start) 0;\n color: var(--label-color);\n position: absolute;\n font-size: 1em;\n transform: translateY(-50%);\n inset-block-start: 50%;\n transition: all 0.125s ease-in;\n opacity: 1;\n}\n.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 {\n transform: none;\n font-size: 0.75em;\n opacity: 0.7;\n inset-block-start: var(--padding-top);\n}\n.form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.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 {\n opacity: 1;\n}\n\n.form-ctrl__label.sc-nano-input {\n color: var(--label-color);\n font-size: var(--label-font-size);\n padding-block-end: var(--padding-bottom);\n line-height: 1;\n display: flex;\n align-items: center;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-wrap.sc-nano-input {\n flex: 1;\n overflow-x: clip;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n margin-block: unset;\n margin-inline: 0 5px;\n opacity: 0;\n appearance: none;\n transition: 0.3s ease opacity;\n font-size: 0.85em;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n margin-block: unset;\n margin-inline: auto 0;\n font-size: var(--nano-font-size-2xs);\n opacity: 0.5;\n}\n.has-value.sc-nano-input-h .form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n opacity: 0.5;\n}\n\n.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 {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.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 {\n opacity: 1;\n}\n\n.form-ctrl__more.sc-nano-input {\n block-size: 1em;\n position: relative;\n margin-block: var(--padding-bottom) 0;\n margin-inline: 0;\n opacity: 0;\n display: none;\n transition: all var(--nano-transition-fast) ease;\n transition-behavior: allow-discrete;\n}\n.has-helper.sc-nano-input .form-ctrl__more.sc-nano-input, .has-error.sc-nano-input .form-ctrl__more.sc-nano-input {\n display: block;\n opacity: 1;\n}\n\n.form-ctrl__helper.sc-nano-input, .form-ctrl__error.sc-nano-input {\n inset-block-start: 0;\n inset-inline-start: 0;\n position: absolute;\n font-size: var(--more-font-size);\n line-height: 1.2;\n transition: 0.3s ease-out opacity;\n}\n\n.form-ctrl__helper.sc-nano-input {\n font-style: italic;\n color: var(--help-msg-color);\n}\n[show-inline-error].sc-nano-input-h:not([show-inline-error=false] .form-ctrl__helper.sc-nano-input, [disabled]).is-invalid.sc-nano-input-h .form-ctrl__helper.sc-nano-input {\n opacity: 0;\n}\n\n.form-ctrl__helper-end.sc-nano-input {\n flex: 1 1 30%;\n min-inline-size: 150px;\n font-size: var(--invalid-msg-font-size);\n color: var(--help-msg-color);\n font-style: italic;\n}\n\n.form-ctrl__error.sc-nano-input {\n opacity: 0;\n color: var(--invalid-msg-color);\n font-style: italic;\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__error.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__input.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n border-radius: var(--input-border-radius);\n inline-size: 100%;\n padding: 0 !important;\n position: relative;\n flex: 1 0 auto;\n display: flex;\n background: var(--input-bg-color);\n border: var(--input-border-style) var(--input-border-width);\n font-size: var(--input-font-size);\n padding-inline-start: calc(var(--input-invalid-border-hint-width) - var(--input-border-width)) !important;\n}\n.form-ctrl__input.sc-nano-input:focus-visible, .form-ctrl__input.sc-nano-input:focus-within, .has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input {\n outline: var(--nano-focus-ring-color) solid 3px;\n outline-offset: -2px;\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n border-inline-start: solid var(--color-invalid) var(--input-invalid-border-hint-width);\n padding-inline-start: 0 !important;\n}\n.is-invalid.has-focus.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n border-color: var(--color-invalid);\n border-inline-start: solid var(--color-invalid) var(--input-invalid-border-hint-width);\n padding-inline-start: 0 !important;\n}\n\n.form-ctrl__input-wrap.sc-nano-input {\n display: flex;\n flex: 1;\n max-inline-size: 100%;\n align-items: center;\n}\n[type=textarea].sc-nano-input-h .form-ctrl__input-wrap.sc-nano-input {\n align-items: start;\n}\n\n.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 {\n margin-block: 0;\n margin-inline: 0;\n font-size: 1em;\n border: 0;\n outline: none;\n background-color: transparent;\n background-repeat: no-repeat;\n display: flex;\n align-items: center;\n inline-size: auto;\n padding-inline-end: var(--padding-end);\n padding-block: var(--padding-top) var(--padding-bottom);\n}\n.form-ctrl__clear-btn.sc-nano-input:empty, .form-ctrl__slot-end.sc-nano-input:empty, .form-ctrl__slot-start.sc-nano-input:empty, .form-ctrl__slot-value-end.sc-nano-input:empty {\n display: none;\n}\n\n.form-ctrl__slot-end.sc-nano-input {\n padding-block: calc(var(--padding-top) / 2) calc(var(--padding-bottom) / 2);\n}\n\n.form-ctrl__slot-start.sc-nano-input {\n padding-inline-end: 0;\n}\n.has-float-label.sc-nano-input .form-ctrl__slot-start.sc-nano-input {\n display: none;\n}\n\n.form-ctrl__slot-start.sc-nano-input-s > *, .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 > :not(slot-fb), .form-ctrl__slot-value-end .sc-nano-input-s > :not(slot-fb) {\n padding-inline: unset;\n align-items: center;\n display: flex;\n block-size: 100%;\n z-index: 1;\n}\n.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start .sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end.sc-nano-input-s > *, .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 > :not(slot-fb), .form-ctrl__slot-value-end .sc-nano-input-s > :not(slot-fb) {\n pointer-events: none;\n}\n\n.form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start .sc-nano-input-s > * {\n margin-inline: var(--padding-start) 0;\n}\n\n.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-s > *, .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n pointer-events: none;\n}\n\n.form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color);\n padding: 0;\n opacity: 0;\n inline-size: 0;\n appearance: none;\n align-items: center;\n overflow: hidden;\n padding-block: var(--padding-top) var(--padding-bottom);\n}\n.is-invalid.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color--invalid);\n}\n.has-value.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n padding-inline: 0 var(--padding-end);\n opacity: 1;\n inline-size: auto;\n}\n.form-ctrl__clear-btn.sc-nano-input:hover {\n color: var(--clear-btn-color--hover);\n}\n\n.form-ctrl__validation-icon.sc-nano-input {\n padding-block: var(--padding-top) var(--padding-bottom);\n padding-inline-end: var(--padding-end);\n display: grid;\n grid-template-areas: "overlay";\n}\n.sc-nano-input-h:not(.is-invalid .form-ctrl__validation-icon.sc-nano-input, .is-valid).sc-nano-input-h .form-ctrl__validation-icon.sc-nano-input {\n display: none;\n}\n\n.form-ctrl__error-icon.sc-nano-input, .form-ctrl__success-icon.sc-nano-input {\n color: var(--color-valid);\n opacity: 0;\n transition: 0.3s ease-out opacity;\n grid-area: overlay;\n}\n\n.is-valid.sc-nano-input-h .form-ctrl__success-icon.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__error-icon.sc-nano-input {\n color: var(--color-invalid);\n}\n.is-invalid.sc-nano-input-h .form-ctrl__error-icon.sc-nano-input {\n opacity: 1;\n}\n\n.sc-nano-input-h {\n \n --placeholder-color: var(--nano-color-neutral-1000);\n --padding-top: var(--nano-spacing-sm);\n --padding-end: var(--nano-spacing-sm);\n --padding-bottom: var(--nano-spacing-sm);\n --padding-start: var(--nano-spacing-sm);\n --color-invalid: var(--nano-color-danger-1100);\n --color-valid: var(--nano-color-success-1000);\n --input-font-size: var(--nano-font-size-sm);\n --input-text-color: var(--nano-color-base-1000);\n --input-border-width: 1px;\n --input-border-color: var(--nano-color-neutral-300);\n --input-border-radius: 0px;\n --input-invalid-border-hint-width: 2px;\n --input-border-style: solid var(--input-border-color);\n --input-border-style--focus: solid var(--input-border-width) var(--nano-color-primary-700);\n --input-bg-color: var(--nano-color-base-0);\n --invalid-msg-color: var(--color-invalid);\n --help-msg-color: var(--nano-color-base-1000);\n --more-font-size: var(--nano-font-size-2xs);\n --clear-btn-color: rgb(var(--nano-color-base-rgb-1000) / 60%);\n --clear-btn-color--hover: rgb(var(--nano-color-base-rgb-1000) / 100%);\n --clear-btn-color--invalid: rgb(var(--color-invalid) / 100%);\n --label-color: var(--nano-color-base-1000);\n --label-font-size: var(--nano-font-size-xs);\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n color: currentcolor;\n display: block;\n}\n\n[type=date].sc-nano-input-h .input__date-trigger.sc-nano-input {\n color: var(--nano-color-primary-1200);\n}\n[type=date].sc-nano-input-h .input__date-dropdown.sc-nano-input {\n --overflow: visible;\n}\n[type=date].sc-nano-input-h .input__date-close.sc-nano-input {\n position: absolute;\n inset-inline-end: 0;\n inset-block: 0;\n opacity: 0;\n z-index: 2;\n}\n[type=date].sc-nano-input-h .input__date-close.sc-nano-input:focus {\n opacity: 1;\n}\n@supports selector(::-moz-placeholder) {\n [type=date].sc-nano-input-h .form-ctrl__input-wrap.sc-nano-input {\n justify-content: end;\n min-block-size: 2.5em;\n }\n [type=date].sc-nano-input-h .input__native-ctrl.sc-nano-input {\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n }\n [type=date].sc-nano-input-h .input__date-dropdown.sc-nano-input {\n background-color: var(--nano-color-base-0);\n }\n}\n\n.input__native-ctrl.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n appearance: none;\n -webkit-rtl-ordering: logical;\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 margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n min-block-size: 2.5em;\n \n}\n.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 2.1em;\n min-block-size: 2.1em;\n padding-block-start: 1.4em;\n}\n.input__native-ctrl.sc-nano-input::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: initial;\n font-weight: initial;\n line-height: inherit;\n min-block-size: initial;\n}\n.input__native-ctrl.sc-nano-input::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n}\n.input__native-ctrl.sc-nano-input:-webkit-autofill {\n background-color: transparent;\n}\n.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 {\n appearance: none;\n}\n.input__native-ctrl.sc-nano-input::-webkit-calendar-picker-indicator {\n display: none;\n}\n.input__native-ctrl.sc-nano-input::-webkit-datetime-edit {\n display: block;\n padding: 0;\n}\n.input__native-ctrl.sc-nano-input:invalid {\n box-shadow: none;\n}\n.input__native-ctrl.sc-nano-input::-ms-clear, .input__native-ctrl.sc-nano-input::-ms-reveal {\n display: none;\n}\n.input__native-ctrl.input__resizable.sc-nano-input {\n resize: vertical;\n overflow: auto;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 1.5em;\n padding-block: calc(var(--padding-top) - 3px) 0.5em;\n white-space: pre-wrap;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::placeholder {\n line-height: 1.5em;\n}\n.has-float-label.sc-nano-input .form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n padding-block-start: 1.75em;\n}\n[readonly].sc-nano-input-h:not([readonly=false]) .input__native-ctrl.sc-nano-input {\n -webkit-user-select: none;\n user-select: none;\n}';export{I as nano_date_picker,M as nano_input}
4
+ import{r as n,c as t,a as e,d as i}from"./index-DXvE-U_j.js";import{h as a,t as o}from"./renderer-BUaAsDso.js";import{i as s,g as r,b as l,D as c,p as d,d as h,s as u,e as p,f as b,h as f,j as _,k as m,l as v,a as g}from"./date-utils-BZYdjI1P.js";import{c as y}from"./dom-Cb7FUtXp.js";import{a as k}from"./throttle-C93FMm2Z.js";import{F as x,a as w}from"./form-control-BOVGZF9R.js";const z={buttonLabel:"Choose date",placeholder:"YYYY-MM-DD",selectedDateMessage:"Selected date is",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",keyboardInstruction:"You can use arrow keys to navigate dates",calendarHeading:"Choose a date",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},D=({focusedDay:n,today:t,day:e,onDaySelect:i,onKeyboardNavigation:o,focusedDayRef:r,inRange:l,disabled:c,isSelected:d})=>{const h=s(e,t),u=s(e,n),p=e.getMonth()!==n.getMonth()||c,b=!l;return a("button",{class:{"duet-date__day":!0,"is-outside":b,"is-disabled":p,"is-today":h},tabIndex:u?0:-1,onClick:function(n){i(n,e)},onKeyDown:o,disabled:b,type:"button","aria-pressed":d?"true":"false",ref:n=>{u&&n&&r&&r(n)}},a("span",{"aria-hidden":"true"},e.getDate()),a("span",{class:"duet-date__vhidden"},e.toLocaleDateString(void 0,{day:"numeric",month:"long"})))},C=({selectedDate:n,focusedDate:t,labelledById:e,localization:i,firstDayOfWeek:o,min:c,max:d,onDateSelect:h,onKeyboardNavigation:u,focusedDayRef:p,onMouseDown:b,onFocusIn:f,isDateDisabled:_})=>{const m=new Date,v=r(t,o);return a("table",{class:"duet-date__table",role:"grid","aria-labelledby":e,onFocusin:f,onMouseDown:b},a("thead",null,a("tr",null,(y=o,k=n=>a("th",{class:"duet-date__table-header",scope:"col"},a("span",{"aria-hidden":"true"},n.substring(0,2)),a("span",{class:"duet-date__vhidden"},n)),(g=i.dayNames).map(((n,t)=>k(g[(t+y)%g.length])))))),a("tbody",null,function(n){const t=[];for(let e=0;e<n.length;e+=7)t.push(n.slice(e,e+7));return t}(v).map((e=>a("tr",{class:"duet-date__row"},e.map((e=>a("td",{class:"duet-date__cell",role:"gridcell","aria-selected":s(e,n)?"true":void 0},a(D,{day:e,today:m,focusedDay:t,inRange:l(e,c,d),onDaySelect:h,onKeyboardNavigation:u,focusedDayRef:p,disabled:_(e),isSelected:s(e,n)})))))))));var g,y,k};let S=0;const I=class{constructor(e){n(this,e),this.nanoDatePicked=t(this,"nanoDatePicked",7)}dateId="nano-datepicker-"+S++;monthSelectId=this.dateId+"-month";yearSelectId=this.dateId+"-year";dialogLabelId=this.dateId+"-dialog";firstFocusableElement;monthSelectNode;focusedDayNode;focusTimeoutId;initialTouchX=null;initialTouchY=null;get host(){return e(this)}activeFocus=!1;focusedDay=new Date;_selectedDate="";get selectedDate(){return this._selectedDate}set selectedDate(n){"string"==typeof n?(n=n.split("T")[0],this._selectedDate=n):this._selectedDate=""}min="";max="";firstDayOfWeek=c.Monday;localization=z;isDateDisabled=()=>!1;isModal=!1;firstFocusEle;nanoDatePicked;async setFocus(n=!1){this.setFocusedDay(d(this.selectedDate)||new Date),n?setTimeout((()=>this.focusedDayNode.focus()),20):(clearTimeout(this.focusTimeoutId),this.focusTimeoutId=setTimeout((()=>{this.monthSelectNode.focus()}),20))}handleSelectedDateChange(){this.setFocus(!0)}enableActiveFocus=()=>{this.activeFocus=!0};disableActiveFocus=()=>{this.activeFocus=!1};addDays(n){this.setFocusedDay(h(this.focusedDay,n))}addMonths(n){this.setMonth(this.focusedDay.getMonth()+n)}addYears(n){this.setYear(this.focusedDay.getFullYear()+n)}startOfWeek(){this.setFocusedDay(u(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(p(this.focusedDay,this.firstDayOfWeek))}setMonth(n){const t=b(f(this.focusedDay),n),e=_(t),i=b(this.focusedDay,n);this.setFocusedDay(m(i,t,e))}setYear(n){const t=v(f(this.focusedDay),n),e=_(t),i=v(this.focusedDay,n);this.setFocusedDay(m(i,t,e))}setFocusedDay(n){this.focusedDay=m(n,d(this.min),d(this.max))}handleTouchStart=n=>{const t=n.changedTouches[0];this.initialTouchX=t.pageX,this.initialTouchY=t.pageY};handleTouchMove=n=>{n.preventDefault()};handleTouchEnd=n=>{const t=n.changedTouches[0],e=t.pageX-this.initialTouchX,i=t.pageY-this.initialTouchY;Math.abs(e)>=70&&Math.abs(i)<=70&&this.addMonths(e<0?1:-1),this.initialTouchY=null,this.initialTouchX=null};handleNextMonthClick=n=>{n.preventDefault(),this.addMonths(1)};handlePreviousMonthClick=n=>{n.preventDefault(),this.addMonths(-1)};handleKeyboardNavigation=n=>{if("Tab"===n.key&&!n.shiftKey&&this.isModal){n.preventDefault();const t=this.firstFocusEle||this.firstFocusableElement;return void(t.setFocus?t.setFocus():t.focus())}let t=!0;switch(n.key){case"ArrowRight":this.addDays(1);break;case"ArrowLeft":this.addDays(-1);break;case"ArrowDown":this.addDays(7);break;case"ArrowUp":this.addDays(-7);break;case"PageUp":n.shiftKey?this.addYears(-1):this.addMonths(-1);break;case"PageDown":n.shiftKey?this.addYears(1):this.addMonths(1);break;case"Home":this.startOfWeek();break;case"End":this.endOfWeek();break;default:t=!1}t&&(n.preventDefault(),this.enableActiveFocus())};handleDaySelect=(n,t)=>{const e=!this.isDateDisabled(t);l(t,d(this.min),d(this.max))&&e&&(t.getMonth()===this.focusedDay.getMonth()?this.setValue(t):this.setFocusedDay(t))};handleMonthSelect=n=>{this.setMonth(parseInt(n.target.value,10))};handleYearSelect=n=>{this.setYear(parseInt(n.target.value,10))};setValue(n){this.selectedDate=g(n),this.nanoDatePicked.emit({value:this.selectedDate,valueAsDate:n})}processFocusedDayNode=n=>{this.focusedDayNode=n,this.activeFocus&&setTimeout((()=>n.focus()),0)};componentWillLoad(){this.handleSelectedDateChange()}render(){const n=d(this.selectedDate),t=(n||this.focusedDay).getFullYear(),e=this.focusedDay.getMonth(),o=this.focusedDay.getFullYear(),s=d(this.min),r=d(this.max),c=null!=s&&s.getMonth()===e&&s.getFullYear()===o,h=null!=r&&r.getMonth()===e&&r.getFullYear()===o;let u=t-10,p=t+10;return s&&(u=s.getFullYear()),r&&(p=r.getFullYear()),a(i,{key:"476708135e014efc8662dcfdd6877bfa21ef6f31",class:"nano-date-picker"},a("div",{key:"4ff36de5c9e6c86fa26638db70514f12fad96262",class:"duet-date"},a("div",{key:"544a676f3354fc3cd0a6c0f1fd8610d47c5c586b",class:{"duet-date__dialog":!0,"is-active":!0},onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},a("div",{key:"94665c51ab3ee801e6affb6be91076777f329665",class:"duet-date__dialog-content"},a("div",{key:"3e014e07dd3f43808bdb99fbc79c6f81958328ac",class:"duet-date__vhidden duet-date__instructions","aria-live":"polite"},this.localization.keyboardInstruction),a("div",{key:"6759c71255f8ff0c05a56e118ad628afc7f1af43",class:"duet-date__header",onFocusin:this.disableActiveFocus},a("div",{key:"b0688e27b47a95fbb8c051d0680975741547762e"},a("h2",{key:"1bb4b0035cc07304248c496c55077a88d43d57f5",id:this.dialogLabelId,class:"duet-date__vhidden","aria-live":"polite"},this.localization.monthNames[e]," ",this.focusedDay.getFullYear()),a("label",{key:"e740c878525a794eaac04b44c4770edaa5a1d780",htmlFor:this.monthSelectId,class:"duet-date__vhidden"},this.localization.monthSelectLabel),a("div",{key:"658b004a5ae3e50070a2683f92c68b924246a4e9",class:"duet-date__select"},a("select",{key:"3a99660e9c05ca78d5945b4a8dd581f3fcd64fff",id:this.monthSelectId,class:"duet-date__select--month",ref:n=>this.firstFocusableElement=this.monthSelectNode=n,onChange:this.handleMonthSelect},this.localization.monthNames.map(((n,t)=>a("option",{key:n,value:t,selected:t===e,disabled:!l(new Date(o,t,1),s?f(s):null,r?_(r):null)},n)))),a("div",{key:"6c9f19bbd85e2d6bd16e06b87507599a77f3b8e0",class:"duet-date__select-label","aria-hidden":"true"},a("span",{key:"94813adbb53c491d53045106a0e97e68ecc8a257"},this.localization.monthNamesShort[e]),a("nano-icon",{key:"d6d867b3732097902ac0b537d055ec0eb6dbb11f",name:"light/chevron-down"}))),a("label",{key:"a77adf78db5d8f2ec2998526c2d5d2882fb01a24",htmlFor:this.yearSelectId,class:"duet-date__vhidden"},this.localization.yearSelectLabel),a("div",{key:"fe5d77c1f3d5cb7bc8ba2befd232b001fcafa8da",class:"duet-date__select"},a("select",{key:"3585692273f5bdfdb58e1e265bb6b754708cb69a",id:this.yearSelectId,class:"duet-date__select--year",onChange:this.handleYearSelect},function(n,t){const e=[];for(let i=n;i<=t;i++)e.push(i);return e}(u,p).map((n=>a("option",{key:n,selected:n===o},n)))),a("div",{key:"ce1137c980183ccffc195f83bdc5147de3f8194b",class:"duet-date__select-label","aria-hidden":"true"},a("span",{key:"a5d3e28fdbb1b4192f51da8009cce094558db3c0"},this.focusedDay.getFullYear()),a("nano-icon",{key:"0958bff2d269607480fb9475f4a58df147885f4b",name:"light/chevron-down"})))),a("div",{key:"d49585f3b292ba85ed013e52a5a042cb55601937",class:"duet-date__nav"},a("button",{key:"1f3f492d1965e6416a5fac52db0ecba7864b8df7",class:"duet-date__prev",onClick:this.handlePreviousMonthClick,disabled:c,type:"button"},a("nano-icon",{key:"abe59d338029675ad55a5e7faab8170ca2c2af2f",name:"light/chevron-left"}),a("span",{key:"7d59fa5d95085c6d66d93f95c953e9a2f74b8a5f",class:"duet-date__vhidden"},this.localization.prevMonthLabel)),a("button",{key:"a895a7b901ca21fa32710c3a187ce263cf105908",class:"duet-date__next",onClick:this.handleNextMonthClick,disabled:h,type:"button"},a("nano-icon",{key:"b8737eb28e5ad5873f40523a557745a338aa5277",name:"light/chevron-right"}),a("span",{key:"2c98c7be89ce30939c647f7faea1c531fa0d38a9",class:"duet-date__vhidden"},this.localization.nextMonthLabel)))),a("div",{key:"42284a65a7e2bb5302cd75a61f19a691ea1236bd"},a(C,{key:"d548838275eecb1a2dff47851e9fd57c9f49f691",selectedDate:n,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,localization:this.localization,firstDayOfWeek:this.firstDayOfWeek,focusedDayRef:this.processFocusedDayNode,min:s,max:r,isDateDisabled:this.isDateDisabled}))))))}static get watchers(){return{selectedDate:["handleSelectedDateChange"]}}};I.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--active-color:var(--nano-color-primary-1000);--active-text-color:var(--nano-color-base-0);--inactive-color:var(--nano-color-neutral-300);display:block;font-size:16px;background:var(--nano-color-neutral-50)}.duet-date *,.duet-date *::before,.duet-date *::after{box-sizing:border-box;margin:0}.duet-date{box-sizing:border-box;color:currentcolor;display:block;margin:0;position:relative;text-align:start;inline-size:100%}.duet-date__dialog{display:flex;inset-block-start:100%;max-inline-size:100%;inline-size:100%}.duet-date__dialog.is-left{inset-inline:auto 0;inline-size:auto}.duet-date__dialog-content{min-inline-size:290px;padding:var(--nano-spacing-md);position:relative;transform:none;max-inline-size:100%;inline-size:100%}.duet-date__table{border-collapse:collapse;border-spacing:0;font-size:1em;line-height:1;text-align:center;inline-size:100%}.duet-date__table-header{font-size:0.75em;font-weight:600;letter-spacing:1px;line-height:1;padding-block-end:8px;text-decoration:none;text-transform:uppercase}.duet-date__cell{text-align:center;padding:0 0 3px}.duet-date__day{appearance:none;background:transparent;border:0;border-radius:50%;cursor:pointer;display:inline-block;font-size:0.875em;font-variant-numeric:tabular-nums;line-height:1;position:relative;text-align:center;vertical-align:middle;z-index:1;block-size:2.5em;inline-size:2.5em}.duet-date__day.is-today{box-shadow:0 0 0 1px var(--active-color);position:relative}.duet-date__day:hover::before,.duet-date__day.is-today::before{content:"";background:var(--active-color);border-radius:50%;opacity:0.16;position:absolute;inset:0}[aria-selected=true] .duet-date__day{background:var(--active-color) !important;color:var(--active-text-color);box-shadow:none;outline:0}.duet-date__day:not(.is-disabled):active{background:color-mix(in srgb, var(--active-color), black 20%);color:var(--active-text-color)}.duet-date__day:focus-visible{outline:var(--nano-focus-ring);outline-offset:-1px;z-index:2}.duet-date__day.is-disabled{background:transparent;box-shadow:none;cursor:default;opacity:0.5}.duet-date__day.is-disabled::before{display:none}.duet-date__day.is-outside{background:var(--inactive-color);box-shadow:none;cursor:default;opacity:0.8;pointer-events:none}.duet-date__day.is-outside::before{display:none}.duet-date__header{align-items:center;display:flex;justify-content:space-between;margin-block-end:var(--nano-spacing-md);inline-size:100%}.duet-date__nav{white-space:nowrap}.duet-date__prev,.duet-date__next{background:var(--inactive-color);align-items:center;appearance:none;border:0;border-radius:50%;cursor:pointer;display:inline-flex;justify-content:space-around;margin-inline-start:8px;padding:0;font-size:0.9em;block-size:2.2em;inline-size:2.2em}.duet-date__prev:focus-visible,.duet-date__next:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.duet-date__prev:active,.duet-date__next:active{background:color-mix(in srgb, var(--inactive-color), black 20%)}.duet-date__prev:disabled,.duet-date__next:disabled{cursor:default;opacity:0.7}.duet-date__prev .nano-icon,.duet-date__next .nano-icon{margin-block:0;margin-inline:auto}.duet-date__select{display:inline-flex;margin-block-start:4px;position:relative}.duet-date__select span{margin-inline-end:4px}.duet-date__select select{cursor:pointer;font-size:1em;block-size:100%;inset-inline-start:0;opacity:0;position:absolute;inset-block-start:0;inline-size:100%;z-index:2}.duet-date__select select:focus-visible:focus+.duet-date__select-label{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.duet-date__select-label{align-items:center;display:flex;font-size:1.25em;font-weight:600;line-height:1;padding-block:0;padding-inline:8px 4px;pointer-events:none;position:relative;inline-size:100%;z-index:1}.duet-date__select-label .nano-icon{font-size:0.55em}.duet-date__vhidden{border:0;clip:rect(1px, 1px, 1px, 1px);block-size:1px;overflow:hidden;padding:0;position:absolute;inset-block-start:0;inline-size:1px}';let F=0;const M=class{nativeInput;inputId="nano-input-"+F++;didBlurAfterEdit=!1;rtl=!1;mo;charCount=0;hasRendered=!1;pickerDropdown;picker;pickerCloseBtn;_nativeInputWrap;get nativeInputWrap(){return this._nativeInputWrap}set nativeInputWrap(n){this._nativeInputWrap!==n&&(this._nativeInputWrap=n,this.setDataListOpts())}constructor(e){n(this,e),this.nanoInput=t(this,"nanoInput",7),this.nanoChange=t(this,"nanoChange",7),this.nanoBlur=t(this,"nanoBlur",7),this.nanoFocus=t(this,"nanoFocus",7),this.nanoDidLoad=t(this,"nanoDidLoad",7),this.nanoDidUnload=t(this,"nanoDidUnload",7),this.nanoValidate=t(this,"nanoValidate",7),this.handleBlur=this.handleBlur.bind(this)}hasFocus=!1;hasLabelSlot=!1;hasHelperSlot=!1;hasHelperEndSlot=!1;errorMessage="";datalist=null;setDataListOpts(){this.datalist&&(this.datalist.dropDownConfig={distance:10,...this.datalist.dropDownConfig||{},skidding:-1,tetherTo:this.nativeInputWrap})}get el(){return e(this)}get invalid(){return this._invalid}_invalid=null;get validityMessage(){return this.nativeInput?this.nativeInput.validationMessage:""}accept;autocapitalise="none";autocomplete="off";autocorrect="off";autofocus=!1;clearable=!1;clearOnEdit;debounce=0;debounceChanged(){this.nanoChange=k(this.nanoChange,this.debounce)}disabled=!1;inputmode;validateOn="submitThenDirty";showInlineError=!0;_label="";get label(){return this.required&&!this._label.endsWith("*")?this._label+" *":this._label}set label(n){this._label=n}alwaysShowPlaceholder=!1;hideLabel=!1;floatLabel=!1;max;maxlength;min;minlength;multiple;name=this.inputId;pattern;placeholder;readonly=!1;required=!1;spellcheck=!1;step;size;type="text";form;value="";valueChanged(){this.nanoChange.emit({value:this.value}),this.charCount=this.value?.length||0,"textarea"===this.type&&"auto"===this.resize&&(this.nativeInput.style.height="auto",this.value?.length&&(this.nativeInput.style.height=this.nativeInput.scrollHeight+"px")),"date"===this.type&&(this.isDateDisabled(this.valueAsDate)?this.nativeInput.setCustomValidity("Date selected is not available."):"Date selected is not available."===this.nativeInput.validationMessage&&this.nativeInput.setCustomValidity("")),requestAnimationFrame((()=>{"dirty"===this.validateOn&&this.validate()}))}get valueAsNumber(){return"textarea"===this.type?NaN:this.nativeInput?.valueAsNumber||NaN}get valueAsDate(){return"textarea"===this.type?null:new Date(this.value)||null}showCharCount=!1;shouldValidate(){this.hasRendered&&requestAnimationFrame((()=>{"dirty"===this.validateOn&&this.validate()}))}resize="auto";rows=2;showPicker=!0;isDateDisabled=()=>!1;initialPickerDate;closeAfterPicked=!0;pickerOptions={};nanoInput;nanoChange;nanoBlur;nanoFocus;nanoDidLoad;nanoDidUnload;nanoValidate;async reportValidity(n){return new Promise((t=>{n&&this.validate(),setTimeout((()=>{t({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage})}),50)}))}async setFocus(){this.nativeInput&&(this.nativeInput.focus(),this.nativeInput.click())}async select(){this.nativeInput&&this.nativeInput.select()}getInputElement(){return Promise.resolve(this.nativeInput)}async showError(n){this.nativeInput&&(this.nativeInput.setCustomValidity(n),this.validate())}onReset(n){(this.form?document.querySelector("#"+this.form):this.el.closest("form"))&&n.target===this.el.closest("form")&&(this.value="")}handleBlur(n){if(!this.hasFocus)return;const t=n;let e;requestAnimationFrame((()=>{if(n instanceof KeyboardEvent&&t.key){if("Tab"!==t.key)return;e=document.activeElement}else e=n instanceof FocusEvent?document.activeElement:n.target;y(this.el.tagName.toLowerCase(),e)!==this.el&&this.onBlur()}))}shouldClearOnEdit(){const{type:n,clearOnEdit:t}=this;return void 0===t?"password"===n:t}getValue(){return this.value||""}validate=n=>{"submitThenDirty"===this.validateOn&&(this.validateOn="dirty"),this.nativeInput.validity.valid?this._invalid=!1:(this.showInlineError&&(n&&n.preventDefault(),this.errorMessage=this.nativeInput.validationMessage),this._invalid=!0),this.nanoValidate.emit({isValid:!this._invalid,errorMessage:this.nativeInput.validationMessage,originalEvent:n})};onInput=n=>{const t=n.target;this.value=t?.value||"",this.nanoInput.emit(n)};onBlur=()=>{this.hasFocus=!1,this.focusChanged(),"dirty"===this.validateOn&&this.validate(),this.nanoBlur.emit()};onFocus=n=>{"date"===this.type&&n.preventDefault(),this.hasFocus=!0,this.focusChanged(),this.nanoFocus.emit()};onKeydown=n=>{"date"===this.type&&[" "].includes(n.key)&&(n.preventDefault(),this.showPicker&&this.pickerDropdown?.show()),this.shouldClearOnEdit()&&(this.didBlurAfterEdit&&this.hasValue()&&this.clearTextInput(),this.didBlurAfterEdit=!1)};clearTextInput=n=>{this.clearable&&!this.readonly&&!this.disabled&&n&&(n.preventDefault(),n.stopPropagation()),this.value="",this.nativeInput.value="";const t=new window.Event("change");this.nativeInput.dispatchEvent(t)};focusChanged(){!this.hasFocus&&this.shouldClearOnEdit()&&this.hasValue()&&(this.didBlurAfterEdit=!0)}hasValue(){return this.getValue().length>0}slotChangeObserver(){this.mo&&this.mo.disconnect(),(this.mo=new MutationObserver((()=>this.processSlottedContent()))).observe(this.el,{childList:!0,subtree:!0})}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(`${o("nano-datalist")}:not([slot])`)}connectedCallback(){this.debounceChanged(),this.el.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.el}))}disconnectedCallback(){document.dispatchEvent(new CustomEvent("nanoDidUnload",{detail:this.el})),this.mo&&this.mo.disconnect()}componentDidLoad(){this.slotChangeObserver(),this.hasRendered=!0,this.autofocus&&setTimeout((()=>this.setFocus()),300)}componentWillLoad(){this.processSlottedContent()}render(){const n=this.getValue(),t=this.inputId+"-lbl",e=this.showInlineError||this.hasHelperSlot?this.inputId+"-more":"",o=this.hasHelperEndSlot?this.inputId+"-helper":"";this.rtl="rtl"===this.el.ownerDocument.dir;const s={...(({el:n,floatLabel:t,label:e,alwaysShowPlaceholder:i,errorMessage:a,type:o,showInlineError:s,hasHelperSlot:r,hasLabelSlot:l,hideLabel:c,placeholder:d,maxlength:h,charCount:u,showCharCount:p,rtl:b,hasHelperEndSlot:f})=>({el:n,floatLabel:t,label:e,alwaysShowPlaceholder:i,errorMessage:a,type:o,showInlineError:s,hasHelperSlot:r,hasLabelSlot:l,hideLabel:c,placeholder:d,maxlength:h,charCount:u,showCharCount:p,rtl:b,hasHelperEndSlot:f}))(this),labelId:t,moreId:e,helperEndId:o,hasValue:this.hasValue(),controlId:this.inputId},r=(({clearable:n,readonly:t,disabled:e})=>({clearable:n,readonly:t,disabled:e,clearControl:this.clearable}))(this);return a(i,{key:"1601bf765681a833b22c05294a1c8d9b5c6be5ee","aria-disabled":this.disabled?"true":null,class:{"has-value":this.hasValue(),"has-focus":this.hasFocus,"is-invalid":!0===this._invalid,"is-valid":!1===this._invalid,"nano-input":!0}},a("div",{key:"3db99291d328de9684137597706b79e4f24b65e2",style:{width:"100%"}},a(x,{key:"df525275b5c35b9ae3fdc793766a9af759740076",...s,class:{"has-helper":this.hasHelperSlot,"has-error":!!this.errorMessage&&this.showInlineError&&!0===this._invalid}},a(w,{key:"8f25ff2340431b2ea29d5063877ad376ec229758",...r,onClearText:this.clearTextInput,control:this.el,ref:n=>this.nativeInputWrap=n,showInlineError:this.showInlineError,endSlot:this.showPicker&&"date"===this.type&&!this.readonly&&!this.disabled&&[a("nano-dropdown",{slot:"end",dialogTitle:"Choose a date",class:"input__date-dropdown",part:"date__dropdown",placement:"bottom-end",skidding:10,distance:12,ref:n=>this.pickerDropdown=n,onNanoAfterShow:()=>this.picker.setFocus(!0)},a("nano-icon-button",{label:"Open date picker",iconName:"light/calendar-days",slot:"trigger",class:"input__date-trigger"}),a("div",null,a("div",{class:"date-field__close-bar"},a("nano-icon-button",{label:"Close date picker",iconName:"light/xmark",class:"input__date-close",onClick:n=>{n.target.closest("nano-dropdown")?.hide()},ref:n=>this.pickerCloseBtn=n})),a("nano-date-picker",{part:"date__picker",ref:n=>{this.picker=n,this.picker.firstFocusEle=this.pickerCloseBtn},...this.pickerOptions,isDateDisabled:this.isDateDisabled,onNanoDatePicked:n=>{this.value=n.detail.value,this.pickerDropdown?.hide()},min:this.min,max:this.max,"is-modal":!0,selectedDate:this.value||this.initialPickerDate||void 0})))]},"textarea"!==this.type&&a("input",{key:"97734d0168a049af1b22e4517db5e58d25a75b13",id:this.inputId,class:"input__native-ctrl",ref:n=>this.nativeInput=n,"aria-labelledby":t+" "+e+" "+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:n,onInput:this.onInput,onClick:n=>n.preventDefault(),onChange:this.onInput,onFocus:this.onFocus,onBlur:this.handleBlur,onKeyDown:this.onKeydown,onInvalid:this.validate}),"textarea"===this.type&&a("textarea",{key:"b1780aa8cf51d8b7440825d461d89e8746fcd96d",rows:this.floatLabel?1:this.rows,id:this.inputId,class:{"input__native-ctrl":!0,input__resizable:"true"===this.resize},ref:n=>this.nativeInput=n,"aria-labelledby":t+" "+e+" "+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:n,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeydown,onInvalid:this.validate,onBlur:this.handleBlur}))),a("slot",{key:"fa333ee624b824af60a8a79d09720e231e8d455c"})))}static get watchers(){return{datalist:["setDataListOpts"],debounce:["debounceChanged"],value:["valueChanged"],minlength:["shouldValidate"],maxlength:["shouldValidate"],min:["shouldValidate"],max:["shouldValidate"],required:["shouldValidate"],disabled:["shouldValidate"],readonly:["shouldValidate"],pattern:["shouldValidate"],inputmode:["shouldValidate"],type:["shouldValidate"]}}};M.style='.sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n box-sizing: border-box;\n}\n[hidden].sc-nano-input {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n .sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }.sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n box-sizing: border-box;\n}\n[hidden].sc-nano-input {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n .sc-nano-input-h, *.sc-nano-input, *.sc-nano-input::before, *.sc-nano-input::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }slot-fb.sc-nano-input {\n display: contents !important;\n}\n\n[disabled].sc-nano-input-h:not([disabled=false]) {\n opacity: 0.5;\n position: relative;\n}\n[disabled].sc-nano-input-h:not([disabled=false])::after {\n content: "";\n position: absolute;\n inset: 0;\n cursor: not-allowed;\n}\n\n.form-ctrl.sc-nano-input {\n min-inline-size: 100%;\n display: block;\n}\n.form-ctrl.has-helper-end.sc-nano-input {\n display: flex;\n gap: 1rem;\n container-type: inline-size;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__wrapper.sc-nano-input {\n flex: 1 1 100%;\n}\n.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__helper-end.sc-nano-input {\n display: none;\n}\n@container (min-width: 350px) {\n .form-ctrl.has-helper-end .form-ctrl__helper-end {\n display: block !important;\n }\n .form-ctrl.has-helper-end .form-ctrl__helper {\n display: none !important;\n }\n}\n\n.form-ctrl__wrapper.sc-nano-input {\n display: block;\n}\n\nlabel.sc-nano-input, .form-ctrl__more.sc-nano-input, .form-ctrl__error.sc-nano-input, .form-ctrl__helper.sc-nano-input {\n display: block;\n inline-size: 100%;\n overflow: clip;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nlabel.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 {\n clip-path: inset(50%);\n block-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n inline-size: 1px;\n}\n\n.form-ctrl__float-label.sc-nano-input {\n padding-block: 0;\n padding-inline: var(--padding-start) 0;\n color: var(--label-color);\n position: absolute;\n font-size: 1em;\n transform: translateY(-50%);\n inset-block-start: 50%;\n transition: all 0.125s ease-in;\n opacity: 1;\n}\n.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 {\n transform: none;\n font-size: 0.75em;\n opacity: 0.7;\n inset-block-start: var(--padding-top);\n}\n.form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.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 {\n opacity: 1;\n}\n\n.form-ctrl__label.sc-nano-input {\n color: var(--label-color);\n font-size: var(--label-font-size);\n padding-block-end: var(--padding-bottom);\n line-height: 1;\n display: flex;\n align-items: center;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-wrap.sc-nano-input {\n flex: 1;\n overflow-x: clip;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n margin-block: unset;\n margin-inline: 0 5px;\n opacity: 0;\n appearance: none;\n transition: 0.3s ease opacity;\n font-size: 0.85em;\n}\n.form-ctrl__label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input {\n margin-block: unset;\n margin-inline: auto 0;\n font-size: var(--nano-font-size-2xs);\n opacity: 0.5;\n}\n.has-value.sc-nano-input-h .form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input {\n opacity: 0.5;\n}\n\n.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 {\n opacity: 0;\n transition: opacity 0.125s ease-in;\n}\n.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 {\n opacity: 1;\n}\n\n.form-ctrl__more.sc-nano-input {\n block-size: 1em;\n position: relative;\n margin-block: var(--padding-bottom) 0;\n margin-inline: 0;\n opacity: 0;\n display: none;\n transition: all var(--nano-transition-fast) ease;\n transition-behavior: allow-discrete;\n}\n.has-helper.sc-nano-input .form-ctrl__more.sc-nano-input, .has-error.sc-nano-input .form-ctrl__more.sc-nano-input {\n display: block;\n opacity: 1;\n}\n\n.form-ctrl__helper.sc-nano-input, .form-ctrl__error.sc-nano-input {\n inset-block-start: 0;\n inset-inline-start: 0;\n position: absolute;\n font-size: var(--more-font-size);\n line-height: 1.2;\n transition: 0.3s ease-out opacity;\n}\n\n.form-ctrl__helper.sc-nano-input {\n font-style: italic;\n color: var(--help-msg-color);\n}\n[show-inline-error].sc-nano-input-h:not([show-inline-error=false] .form-ctrl__helper.sc-nano-input, [disabled]).is-invalid.sc-nano-input-h .form-ctrl__helper.sc-nano-input {\n opacity: 0;\n}\n\n.form-ctrl__helper-end.sc-nano-input {\n flex: 1 1 30%;\n min-inline-size: 150px;\n font-size: var(--invalid-msg-font-size);\n color: var(--help-msg-color);\n font-style: italic;\n}\n\n.form-ctrl__error.sc-nano-input {\n opacity: 0;\n color: var(--invalid-msg-color);\n font-style: italic;\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__error.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__input.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n border-radius: var(--input-border-radius);\n inline-size: 100%;\n padding: 0 !important;\n position: relative;\n flex: 1 0 auto;\n display: flex;\n background: var(--input-bg-color);\n border: var(--input-border-style) var(--input-border-width);\n font-size: var(--input-font-size);\n padding-inline-start: calc(var(--input-invalid-border-hint-width) - var(--input-border-width)) !important;\n}\n.form-ctrl__input.sc-nano-input:focus-visible, .form-ctrl__input.sc-nano-input:focus-within, .has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input {\n outline: var(--nano-focus-ring-color) solid 3px;\n outline-offset: -2px;\n}\n.is-invalid.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n border-inline-start: solid var(--color-invalid) var(--input-invalid-border-hint-width);\n padding-inline-start: 0 !important;\n}\n.is-invalid.has-focus.sc-nano-input-h:not([disabled]) .form-ctrl__input.sc-nano-input {\n border-color: var(--color-invalid);\n border-inline-start: solid var(--color-invalid) var(--input-invalid-border-hint-width);\n padding-inline-start: 0 !important;\n}\n\n.form-ctrl__input-wrap.sc-nano-input {\n display: flex;\n flex: 1;\n max-inline-size: 100%;\n align-items: center;\n}\n[type=textarea].sc-nano-input-h .form-ctrl__input-wrap.sc-nano-input {\n align-items: start;\n}\n\n.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 {\n margin-block: 0;\n margin-inline: 0;\n font-size: 1em;\n border: 0;\n outline: none;\n background-color: transparent;\n background-repeat: no-repeat;\n display: flex;\n align-items: center;\n inline-size: auto;\n padding-inline-end: var(--padding-end);\n padding-block: var(--padding-top) var(--padding-bottom);\n}\n.form-ctrl__clear-btn.sc-nano-input:empty, .form-ctrl__slot-end.sc-nano-input:empty, .form-ctrl__slot-start.sc-nano-input:empty, .form-ctrl__slot-value-end.sc-nano-input:empty {\n display: none;\n}\n\n.form-ctrl__slot-end.sc-nano-input {\n padding-block: calc(var(--padding-top) / 2) calc(var(--padding-bottom) / 2);\n}\n\n.form-ctrl__slot-start.sc-nano-input {\n padding-inline-end: 0;\n}\n.has-float-label.sc-nano-input .form-ctrl__slot-start.sc-nano-input {\n display: none;\n}\n\n.form-ctrl__slot-start.sc-nano-input-s > *, .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 > :not(slot-fb), .form-ctrl__slot-value-end .sc-nano-input-s > :not(slot-fb) {\n padding-inline: unset;\n align-items: center;\n display: flex;\n block-size: 100%;\n z-index: 1;\n}\n.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start .sc-nano-input-s > *, .sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end.sc-nano-input-s > *, .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 > :not(slot-fb), .form-ctrl__slot-value-end .sc-nano-input-s > :not(slot-fb) {\n pointer-events: none;\n}\n\n.form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start.sc-nano-input-s > *, .form-ctrl__slot-start .sc-nano-input-s > * {\n margin-inline: var(--padding-start) 0;\n}\n\n.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-s > *, .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input {\n pointer-events: none;\n}\n\n.form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color);\n padding: 0;\n opacity: 0;\n inline-size: 0;\n appearance: none;\n align-items: center;\n overflow: hidden;\n padding-block: var(--padding-top) var(--padding-bottom);\n}\n.is-invalid.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n color: var(--clear-btn-color--invalid);\n}\n.has-value.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input {\n padding-inline: 0 var(--padding-end);\n opacity: 1;\n inline-size: auto;\n}\n.form-ctrl__clear-btn.sc-nano-input:hover {\n color: var(--clear-btn-color--hover);\n}\n\n.form-ctrl__validation-icon.sc-nano-input {\n padding-block: var(--padding-top) var(--padding-bottom);\n padding-inline-end: var(--padding-end);\n display: grid;\n grid-template-areas: "overlay";\n}\n.sc-nano-input-h:not(.is-invalid):not(.is-valid) .form-ctrl__validation-icon.sc-nano-input {\n display: none;\n}\n\n.form-ctrl__error-icon.sc-nano-input, .form-ctrl__success-icon.sc-nano-input {\n color: var(--color-valid);\n opacity: 0;\n transition: 0.3s ease-out opacity;\n grid-area: overlay;\n}\n\n.is-valid.sc-nano-input-h .form-ctrl__success-icon.sc-nano-input {\n opacity: 1;\n}\n\n.form-ctrl__error-icon.sc-nano-input {\n color: var(--color-invalid);\n}\n.is-invalid.sc-nano-input-h .form-ctrl__error-icon.sc-nano-input {\n opacity: 1;\n}\n\n.sc-nano-input-h {\n \n --placeholder-color: var(--nano-color-neutral-1000);\n --padding-top: var(--nano-spacing-sm);\n --padding-end: var(--nano-spacing-sm);\n --padding-bottom: var(--nano-spacing-sm);\n --padding-start: var(--nano-spacing-sm);\n --color-invalid: var(--nano-color-danger-1100);\n --color-valid: var(--nano-color-success-1000);\n --input-font-size: var(--nano-font-size-sm);\n --input-text-color: var(--nano-color-base-1000);\n --input-border-width: 1px;\n --input-border-color: var(--nano-color-neutral-300);\n --input-border-radius: 0px;\n --input-invalid-border-hint-width: 2px;\n --input-border-style: solid var(--input-border-color);\n --input-border-style--focus: solid var(--input-border-width) var(--nano-color-primary-700);\n --input-bg-color: var(--nano-color-base-0);\n --invalid-msg-color: var(--color-invalid);\n --help-msg-color: var(--nano-color-base-1000);\n --more-font-size: var(--nano-font-size-2xs);\n --clear-btn-color: rgb(var(--nano-color-base-rgb-1000) / 60%);\n --clear-btn-color--hover: rgb(var(--nano-color-base-rgb-1000) / 100%);\n --clear-btn-color--invalid: rgb(var(--color-invalid) / 100%);\n --label-color: var(--nano-color-base-1000);\n --label-font-size: var(--nano-font-size-xs);\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n color: currentcolor;\n display: block;\n}\n\n[type=date].sc-nano-input-h .input__date-trigger.sc-nano-input {\n color: var(--nano-color-primary-1200);\n}\n[type=date].sc-nano-input-h .input__date-dropdown.sc-nano-input {\n --overflow: visible;\n}\n[type=date].sc-nano-input-h .input__date-close.sc-nano-input {\n position: absolute;\n inset-inline-end: 0;\n inset-block: 0;\n opacity: 0;\n z-index: 2;\n}\n[type=date].sc-nano-input-h .input__date-close.sc-nano-input:focus {\n opacity: 1;\n}\n@supports selector(::-moz-placeholder) {\n [type=date].sc-nano-input-h .form-ctrl__input-wrap.sc-nano-input {\n justify-content: end;\n min-block-size: 2.5em;\n }\n [type=date].sc-nano-input-h .input__native-ctrl.sc-nano-input {\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n }\n [type=date].sc-nano-input-h .input__date-dropdown.sc-nano-input {\n background-color: var(--nano-color-base-0);\n }\n}\n\n.input__native-ctrl.sc-nano-input {\n font-family: inherit;\n font-size: inherit;\n font-stretch: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n appearance: none;\n -webkit-rtl-ordering: logical;\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 margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n min-block-size: 2.5em;\n \n}\n.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 2.1em;\n min-block-size: 2.1em;\n padding-block-start: 1.4em;\n}\n.input__native-ctrl.sc-nano-input::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: initial;\n font-weight: initial;\n line-height: inherit;\n min-block-size: initial;\n}\n.input__native-ctrl.sc-nano-input::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n}\n.input__native-ctrl.sc-nano-input:-webkit-autofill {\n background-color: transparent;\n}\n.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 {\n appearance: none;\n}\n.input__native-ctrl.sc-nano-input::-webkit-calendar-picker-indicator {\n display: none;\n}\n.input__native-ctrl.sc-nano-input::-webkit-datetime-edit {\n display: block;\n padding: 0;\n}\n.input__native-ctrl.sc-nano-input:invalid {\n box-shadow: none;\n}\n.input__native-ctrl.sc-nano-input::-ms-clear, .input__native-ctrl.sc-nano-input::-ms-reveal {\n display: none;\n}\n.input__native-ctrl.input__resizable.sc-nano-input {\n resize: vertical;\n overflow: auto;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n line-height: 1.5em;\n padding-block: calc(var(--padding-top) - 3px) 0.5em;\n white-space: pre-wrap;\n}\n.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::placeholder {\n line-height: 1.5em;\n}\n.has-float-label.sc-nano-input .form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input {\n padding-block-start: 1.75em;\n}\n[readonly].sc-nano-input-h:not([readonly=false]) .input__native-ctrl.sc-nano-input {\n -webkit-user-select: none;\n user-select: none;\n}';export{I as nano_date_picker,M as nano_input}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{a as n,r as e,c as a,d as o,l as t}from"./index-DXvE-U_j.js";import{h as i}from"./renderer-BUaAsDso.js";import{a as r}from"./algoliasearch-lite.esm.browser-C1SNUAIj.js";import{d as s}from"./throttle-C93FMm2Z.js";import{a as l}from"./style-xLaX004n.js";import{s as c}from"./search-insights-8OL2oeQN.js";const h=class{get host(){return n(this)}overflowMenu;overflowOpen=!1;logoUrl=location.protocol+"//"+location.host;cartUrl="";msgUrl="";loginUrl="";logoutUrl="";contactUrl="https://nanoporetech.com/contact";_sessionRedirect=window.location.href;get sessionRedirect(){return encodeURIComponent(this._sessionRedirect)}set sessionRedirect(n){this._sessionRedirect=n}cartCount=0;msgCount=0;async openOverflowMenu(){this.overflowOpen=!0}async closeOverflowMenu(){this.overflowOpen=!1}myAccountUrl;async handleMyAccountUrl(){this.myAccountUrl&&("local-logged-in"!==this.myAccountUrl?"local-logged-out"!==this.myAccountUrl?fetch(this.myAccountUrl+"/nav_bar_data.json").then((n=>n.json())).then((n=>{this.myAccountData=n})).catch((n=>{console.error("Error fetching MyAccount data",n)})):this.myAccountData=await import("./local-logged-out-CD2oXHpq.js"):this.myAccountData=await import("./local-logged-in-DNQyU0ot.js"))}myAccountData;nanoUserData;userLinks=[];isLoggedIn=!1;get myAccountUser(){return this.myAccountData?.user?.uuid?this.myAccountData.user:null}processUserData(){this.myAccountUser&&(this.userLinks=this.myAccountData?.links.filter((n=>"profile-panel-list"===n.area)),this.loginUrl=this.loginUrl||this.myAccountData.urls.login,this.logoutUrl=this.logoutUrl||this.myAccountData.urls.logout,this.msgUrl=this.msgUrl||this.myAccountData.urls.messages,this.msgCount=this.msgCount||this.myAccountData.notifications.count,this.cartUrl=this.cartUrl||this.myAccountData.urls.cart,this.cartCount=this.cartCount||this.myAccountData.cart.count,this.isLoggedIn=!0,this.nanoUserData.emit(this.myAccountUser))}formatLoginLink(n){return n?this.sessionRedirect?n.endsWith("=")?n+this.sessionRedirect:n.includes("?")?n+"&ReplayState="+this.sessionRedirect:n+"?ReplayState="+this.sessionRedirect:n:""}resizeObserver;cachedWidth;mainMenu;_mainMenuBar;get mainMenuBar(){return this._mainMenuBar}set mainMenuBar(n){this._mainMenuBar!==n&&(this._mainMenuBar=n,this.addMainmenuRo())}shouldResize=!0;breakpoint=0;breakpointChanged(){this.breakpoint<this.bpPartials.mainMenu.breakpoint&&!1===this.shouldResize&&(this.overflowOpen=!1)}debounceResetResize=s((()=>{this.shouldResize=!1}),300);addMainmenuRo(){this.removeMainmenuRo(),(this.resizeObserver=new ResizeObserver((()=>{this.shouldResize||this.mainMenuBar.clientWidth>=this.cachedWidth&&0===this.breakpoint||this.mainMenuBar.clientWidth<=this.cachedWidth&&this.mainMenuBar.clientWidth>=this.mainMenu.scrollWidth||(this.shouldResize=!0,this.breakpoint=0)}))).observe(this.mainMenuBar)}removeMainmenuRo(){this.resizeObserver&&(this.mainMenuBar?this.resizeObserver.unobserve(this.mainMenuBar):this.resizeObserver.disconnect())}handleResize=()=>{this.shouldResize&&(this.breakpoint<4&&this.mainMenu.scrollWidth>this.mainMenuBar.clientWidth?this.breakpoint++:(this.cachedWidth=this.mainMenuBar.clientWidth,this.debounceResetResize()))};algoliaClient;searchResults;searchInput;activeIndex;autocompleteResults;searchForm;searchIndices=[];searchBarShown=!1;searchLoading=!1;_searchValue="";nanoSearchResult;nanoSearchError;nanoSearchReset;searchIndex="All";get searchValue(){return this._searchValue}set searchValue(n){n&&this.host.componentOnReady().then((()=>{this.searchBarShown=!0,this.handleSearchTermChangeEvent(n)}))}async submitSearch(){this.onSearchSubmit()}handleSearchIndex(){if(this.searchIndices?.length){if(this.searchIndex)return this.activeIndex=this.searchIndices.find((n=>n.name===this.searchIndex))||this.searchIndices[0],this.activeIndex;this.activeIndex=this.searchIndices[0]}}initSearch(){if(!this.myAccountData)return;const{search:n}=this.myAccountData;n?.app_id&&n?.api_key&&(this.algoliaClient=r(n.app_id,n.api_key),c.init(n.app_id,n.api_key).then((()=>{this.myAccountUser&&c.setUser(this.myAccountUser.uuid)})),this.searchIndices=this.myAccountData.search.indeces,this.searchIndices.forEach((n=>{n.algoliaIndex=this.algoliaClient.initIndex(n.index)})),this.searchIndex||(this.searchIndex=this.searchIndices[0].name))}onSearchSubmit=async n=>{if(n&&n.preventDefault(),!this.activeIndex||!this.myAccountData||this._searchValue?.length<3)return;this.searchResults||await this.doAlgoliaSearch();const{search:e}=this.myAccountData,a=this.searchResults.results.find((n=>this.activeIndex.index===n.index)),{index:o,domain:t,filters:i,query:r,replicas:s}=a;this.searchBarShown=!1,this.nanoSearchResult.emit({meta:{indexTitle:a.indexName,index:o,domain:t,filters:i,query:r,replicas:s},client:{apiKey:e.api_key,appId:e.app_id}})};async doAlgoliaSearch(){this.searchResults=null;const n=this.searchIndices.map((n=>{const e={clickAnalytics:!0,attributesToSnippet:["body:5","title:8"],indexName:n.index,query:this._searchValue,facets:n.filters,hitsPerPage:5,filters:""};return"Community"===n.name&&(e.filters="created > "+Math.floor((Date.now()-631152e5)/1e3)),e}));try{this.searchLoading=!0,this.searchResults=this.processSearchResults(await this.algoliaClient.search(n))}catch(n){console.error(n),this.nanoSearchError.emit(n)}return this.searchLoading=!1,this.searchResults}processSearchResults(n){const e=n,a=n;return e.results?(e.results.forEach(((n,a)=>{n={...n,indexName:this.searchIndices[a].name,selected:this.activeIndex.name===this.searchIndices[a].name,domain:this.activeIndex.domain||null,domains:this.myAccountData.domains||null,allGroup:!!this.searchIndices[a].allGroup,filters:this.searchIndices[a].filters,replicas:this.activeIndex.replicas},e.results[a]=this.processSearchResults(n)})),e):(a.hits.map((n=>{n.url&&!n.url.match(/^http/)&&(n.url=location.protocol+"//"+this.domainFor(n.origin)+n.url)})),a)}domainFor(n){if(!this.myAccountData)return"";const e=this.myAccountData.domains.find((e=>e.origin===n));return e?e.domain:""}async setAutocompleteResults(){this.autocompleteResults=null,this._searchValue.length<3?this._searchValue.length||this.nanoSearchReset.emit():this.autocompleteResults=(await this.doAlgoliaSearch()).results.find((n=>n.selected))}autocompleteSnippet(n){return n._snippetResult?.title?.value||n.title}handleSearchOpenEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&(this.searchInput.setFocus(),this.searchBarShown=!0)};handleSearchCloseEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&(this.searchBarShown=!1)};handleSearchTermInputEvent=n=>{"input"===n.detail.type&&this.searchInput.value.length>=3&&(this.autocompleteResults=null,this.searchLoading=!0)};handleSearchTermChangeEvent=n=>{this._searchValue!==n&&(this._searchValue=n,this.setAutocompleteResults())};handleSearchIndexChangeEvent=n=>{if(!n.detail?.value?.length)return;const e=n.detail.value;if(this.activeIndex.index===e)return;const a=this.searchIndices.find((n=>n.index===e));a&&a.algoliaIndex&&(this.searchIndex=a.name,this._searchValue.length>=3&&(this.searchInput.setFocus(),this.searchBarShown=!0,this.setAutocompleteResults()))};constructor(n){e(this,n),this.nanoUserData=a(this,"nanoUserData",7),this.nanoSearchResult=a(this,"nanoSearchResult",7),this.nanoSearchError=a(this,"nanoSearchError",7),this.nanoSearchReset=a(this,"nanoSearchReset",7),this.handleResize=s(this.handleResize,75)}componentWillLoad(){this.handleMyAccountUrl(),this.initSearch(),this.processUserData(),l(this.host.shadowRoot)}componentDidRender(){this.handleResize()}loggedInPanel(){if(this.isLoggedIn&&this.myAccountUser)return i("div",{part:"user-panel",class:"gn__user-panel nano-theme-dark"},i("div",{class:"gn__user-panel-head",slot:"label"},i("nano-avatar",{initials:this.myAccountUser.first_name?.charAt(0)+this.myAccountUser.last_name?.charAt(0)},this.myAccountUser.small_avatar_url&&!this.myAccountUser.small_avatar_url.includes("generic")&&i("img",{src:this.myAccountUser.small_avatar_url,alt:"User Avatar",height:40,width:40})),i("div",null,this.myAccountUser.name,i("br",null),this.myAccountUser.job_title,", ",this.myAccountUser.company)),i("div",{class:"gn__user-panel-body"},this.userLinks.map((n=>i("a",{href:n.address,target:n.target||void 0},n.title,("Messages"===n.title||n.address.includes(this.msgUrl)||this.msgUrl.includes(n.address))&&this.msgCount>0&&i("nano-badge",{theme:"danger",strength:"2"},this.msgCount))))),i("div",{class:"gn__user-panel-foot"},i("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},i("a",{href:this.formatLoginLink(this.logoutUrl)},"Logout"))))}bpPartials={contact:{tpl:()=>i("a",{href:this.contactUrl},"Contact"),breakpoint:0},mainMenu:{tpl:()=>i("slot",{name:"menu"}),breakpoint:1},logo:{tpl:()=>{},breakpoint:2}};noResultPartial(){if(this.searchLoading||this.autocompleteResults?.hits.length||this._searchValue.length<3)return;const n=[];return"All"===this.searchIndex?(n.push(i("div",{slot:"no-result",class:"gn__search-no-results"},'No results matching for "',i("strong",null,this._searchValue),'" Try another phrase')),n):(this.searchResults.results.forEach((e=>{e.hits.length&&n.push(i("nano-option",{class:"gn__search-result",onNanoSelect:n=>{n.preventDefault(),this.searchIndex=e.indexName,this.onSearchSubmit(n)}},'Show results for "',i("strong",null,this._searchValue),'" in ',i("strong",null,e.indexName)))})),n.unshift(i("div",{slot:n.length?"list-top":"no-result",class:"gn__search-no-results"},'No results matching for "',i("strong",null,this._searchValue),'" in'," ",i("strong",null,this.searchIndex),". Try another phrase")),n)}render(){const n=this.bpPartials;return i(o,{key:"184e0e7a9468ebb9d60cfac752d955358a4fe0fe",class:{"overflow-menu":this.breakpoint>n.mainMenu.breakpoint,"bar-menu":this.breakpoint<=n.mainMenu.breakpoint,"nano-global-nav":!0}},i("div",{key:"8eaa12e98b9a38721b9f03e2d646d20add74b3e6",class:{gn:!0,"gn__search-open":this.searchBarShown}},i("nano-drawer",{key:"b874e6c5aa026ed4c266601c52d41859857f38b5",ref:n=>this.overflowMenu=n,label:"Main menu",part:"drawer",class:"gn__drawer nano-theme-dark",placement:"start",open:this.overflowOpen,onNanoAfterHide:()=>this.overflowOpen=!1,onNanoAfterShow:()=>this.overflowOpen=!0},i("div",{key:"29e9160530cb0bfbc335cbae26a22a4a3fecdff7",class:"gn__drawer-header",part:"overflow-header",slot:"label"},"Main menu"),i("nav",{key:"0b09f539037bd906065f5cf2cc6e806173d97b66",class:"gn__drawer-menu",part:"overflow-menu"},this.breakpoint>n.mainMenu.breakpoint?n.mainMenu.tpl():"",i("slot",{key:"197989ea9849d9143024538c26b2678c6220e6d4",name:"overflow"}))),i("div",{key:"ce2b19cb76ff12eda8c4589ac188749ba3684c9f",class:"gn__menu-bar-wrapper"},i("div",{key:"11c7745248090f0163a2a505fb5a20f56fdd11d2",class:"gn__menu-bar",part:"menu-bar",ref:n=>this.mainMenuBar=n},i("nav",{key:"a797355c5204357100884bf865d5ffb58967028e",class:"gn__main-menu "+(this.shouldResize?"resizing":""),part:"main-menu",ref:n=>this.mainMenu=n},this.breakpoint>n.mainMenu.breakpoint&&i("nano-icon-button",{key:"0bf6477cd3dac4dd6cb0f55dd3ff3a313b55fb84",class:"gn__overflow-button",iconName:"light/bars",label:"Open Menu",onClick:()=>this.overflowMenu.show()}),i("slot",{key:"8dbb4a02f736efcddc019aa602953ff41c5eb15e",name:"logo"},i("a",{key:"5d60a835f364ada7ae8d8ee7b608df9b75443c26",href:this.logoUrl,class:"gn__logo-link",part:"logo-link"},i("img",this.breakpoint<=n.logo.breakpoint?{src:t("../nano-assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--large",width:"152",height:"36",part:"logo logo--large"}:{src:t("../nano-assets/ont-wheel.svg"),alt:"Oxford Nanopore Technologies logo. A stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--small",width:"36",height:"36",part:"logo logo--small"}))),this.breakpoint<=n.mainMenu.breakpoint&&i("div",{key:"4270c5dc3e334ca906debe763771acc1dc4dd82b",class:"gn__main-menu-links"},n.mainMenu.tpl()),i("div",{key:"7f39cd0f1338a1124a6c59c18774c62d7b3e36e7",class:"gn__main-menu-actions"},i("nano-dropdown",{key:"503d51cd5f72ad19203bab7939230f8f7a7f4bd3",dialogTitle:"Search Oxford Nanopore Technologies",placement:"bottom",class:"gn__search-dropdown",skidding:-30,distance:25,open:this.searchBarShown,onNanoAfterShow:this.handleSearchOpenEvent,onNanoAfterHide:this.handleSearchCloseEvent,autoOpen:!!this.searchIndices.length},i("nano-icon-button",{key:"0a82c9022cb41265d8cb969057404ad32d7179f2",class:"gn__search-button",slot:"trigger",iconName:"light/magnifying-glass",label:"Search"}),!!this.searchIndices.length&&i("form",{key:"ee9b0742d2e8e6c3e51d35de68141bedb3677081",ref:n=>this.searchForm=n,class:"gn__search-form",part:"search-form",onSubmit:this.onSearchSubmit},this.searchIndices.length>1&&i("nano-select",{key:"df0da7c60f0ced0d52eeb84360a7215d7247a5e7",part:"search-select",label:"Which site do you wish to search in?",mask:!0,hideLabel:!0,value:this.activeIndex?.index,onNanoChange:this.handleSearchIndexChangeEvent},this.searchIndices.map((n=>i("nano-option",{selected:n.name===this.searchIndex,value:n.index},n.name||n.index)))),i("nano-input",{key:"83bdee0aca807f594505c657a4b1aeaabdb8a3d0",ref:n=>this.searchInput=n,part:"search-input",label:"Search Oxford Nanopore Technologies",placeholder:"Search Oxford Nanopore...",hideLabel:!0,clearable:!0,onNanoChange:n=>{this.handleSearchTermChangeEvent(n.detail.value)},onNanoInput:this.handleSearchTermInputEvent,debounce:500,value:this._searchValue},i("nano-icon",{key:"2f7a3e620d015b8d56044d048ed49ee6a6e29ba4",slot:"end",name:"light/magnifying-glass"}),i("nano-datalist",{key:"528da1d7293b7589ce34a00007e83cf00ac71547",class:"gn__search-results",onNanoSelect:n=>n.preventDefault(),dropDownConfig:{tetherTo:this.searchForm},disableFilter:!0},this.searchLoading&&i("div",{key:"f1556946842927cd1aa65a97346bc3ce1886311e",slot:"no-result",class:"gn__search-loading"},i("nano-spinner",{key:"b7d9e741bdbcde586cb1734961b628de31aca103"},"Searching...")),this.noResultPartial(),!!this.autocompleteResults?.hits.length&&[this.autocompleteResults.hits.map(((n,e)=>i("nano-option",{href:n.url,class:"gn__search-result",onClick:()=>{c.sendClick({index:this.activeIndex.index,eventName:"Global nav quick search - search result clicked",queryID:this.autocompleteResults.queryID,objectIDs:[n.objectID],positions:[e+1]})}},i("span",{innerHTML:this.autocompleteSnippet(n)})))),i("nano-option",{key:"88e617068d30bfa4ca09f6b122109d9a3539088b",class:"gn__search-viewall",onNanoSelect:this.onSearchSubmit},"View all results")])))),i("div",{key:"acceaf54481ab87951bbd9384f079c9d37fa0663",class:"gn__cart"},i("nano-icon-button",{key:"6bed2b6a26492c9e7e4fe205b9ef94845360327d",iconName:"light/cart-shopping",label:"View your cart",href:this.cartUrl}),!!this.cartCount&&i("nano-badge",{key:"4034d7828876c1237b1869abeb977e258d55006b",theme:"danger",strength:"2"},this.cartCount>9?"9+":this.cartCount)),this.breakpoint<=n.contact.breakpoint?n.contact.tpl():"",this.isLoggedIn?i("nano-dropdown",{dialogTitle:"User menu",class:"gn__user-dropdown",distance:10,placement:"bottom-end"},i("button",{slot:"trigger",class:"gn__user-dropdown-trigger"},i("nano-icon",{name:"light/user"}),i("nano-icon",{name:"light/chevron-down",class:"gn__user-dropdown-chevron"}),!!this.msgCount&&i("nano-badge",{theme:"danger",strength:"2"},this.msgCount>9?"9+":this.msgCount)),this.loggedInPanel()):i("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},i("a",{href:this.formatLoginLink(this.loginUrl)},"Login")))))),i("div",{key:"f52e45cccc15b745f54978bc140816847dc66560",class:"gn__site",part:"site-wrapper"},i("nano-global-search-results",{key:"0dd16b2bb789a66f3ef5b214ea54609aedad3ae4",part:"site-search-results"},i("slot",{key:"3a86b5ee10f5da29d3da8d06b2b6ad36f27e725c"})))))}static get assetsDirs(){return["assets"]}static get watchers(){return{myAccountUrl:["handleMyAccountUrl"],myAccountData:["processUserData","initSearch"],shouldResize:["breakpointChanged"],breakpoint:["breakpointChanged"],searchIndices:["handleSearchIndex"],searchIndex:["handleSearchIndex"]}}};h.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--main-menu-bar-bg-color:var(--nano-color-base-0);--main-menu-text-color:var(--nano-color-base-1000);--main-menu-hover-text-color:var(--nano-color-primary-1000);--main-menu-active-text-color:var(--nano-color-primary-1200);--main-menu-active-border-color:var(--nano-color-primary-1000);--overflow-bg-color:var(--nano-color-grey-mono-1600);--overflow-text-color:var(--nano-color-basic-white);--overflow-hover-text-color:var(--nano-color-blue-cerulean-700);--overflow-active-text-color:var(--nano-color-blue-cerulean-300);display:block;color:var(--main-menu-text-color)}img{max-inline-size:none;display:block}::slotted(a),:host::slotted(a),a{text-decoration:none}a:has(img){display:inline-block}a:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}nano-drawer:not(:defined){display:none}nano-badge{position:absolute;font-size:0.5625rem;pointer-events:none}.gn__cart{position:relative}.gn__cart nano-badge{inset-block-start:-0.35rem;inset-inline-end:-0.4rem}.gn__login-cta{--bg:transparent}.gn__menu-bar-wrapper{z-index:var(--nano-z-index-menubar);position:relative}.gn__menu-bar-wrapper::after{content:"";position:absolute;block-size:1px;inline-size:100%;inset-inline:0;inset-block-end:-1px;z-index:-3;background-color:var(--nano-color-neutral-200)}.gn__menu-bar{inline-size:100%;overflow:clip}.gn__menu-bar a{color:var(--main-menu-text-color)}.gn__menu-bar a:hover{color:var(--main-menu-hover-text-color)}.gn__menu-bar a:active{color:var(--main-menu-active-text-color)}.gn__main-menu{display:inline-flex;align-items:center;background-color:var(--main-menu-bar-bg-color);min-inline-size:100%;padding:var(--nano-spacing-md);transition:opacity var(--nano-transition-x-fast) ease;opacity:1}.gn__main-menu.resizing{transition:none;opacity:0}.gn__main-menu>*{margin-inline-end:var(--nano-spacing-xl)}.gn__main-menu>*:is(slot,slot-fb){display:flex}.gn__main-menu>*:last-child{margin-inline-end:0}.gn__overflow-button{--padding:0.5rem 0.875rem 0.5rem 0;margin-inline-end:0.875rem;font-size:1.125rem;position:relative}.gn__overflow-button::after{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-end:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__main-menu-links,.gn__main-menu-actions{display:inline-flex;align-items:center}.gn__main-menu-links .nano-icon,.gn__main-menu-links .nano-icon-button,.gn__main-menu-actions .nano-icon,.gn__main-menu-actions .nano-icon-button{--active-color:var(--main-menu-active-text-color);--hover-color:var(--main-menu-hover-text-color);font-size:1rem}.gn__main-menu-links .nano-icon-button:hover,.gn__main-menu-actions .nano-icon-button:hover{color:var(--main-menu-hover-text-color)}.gn__main-menu-links{gap:var(--nano-spacing-xl)}.gn__main-menu-links ::slotted(a),.gn__main-menu-links::slotted(a){color:var(--main-menu-text-color)}.gn__main-menu-links ::slotted(a:hover){color:var(--main-menu-hover-text-color)}.gn__main-menu-links ::slotted(*:active){color:var(--main-menu-active-text-color)}.gn__main-menu-actions{margin-inline-start:auto;font-size:0.9375rem;gap:var(--nano-spacing-md)}.gn__search-dropdown{--overflow:visible;--padding:0;--background:transparent}.gn__search-dropdown .nano-icon-button{position:relative}.gn__search-dropdown .nano-icon-button::before{content:"";position:absolute;background-color:var(--main-menu-active-border-color);block-size:4px;inset-inline:5px 2px;inset-block-end:-1.5625rem;transform:translateZ(0) scaleX(0);transform-origin:0 center;transition:transform var(--nano-transition-x-fast) ease-in-out}.gn__search-open .gn__search-dropdown .nano-icon-button::before{transform:translateZ(0) scaleX(1)}.gn__search-form{display:inline-flex;max-inline-size:100vw;inline-size:30.625rem}.gn__search-form .nano-select{--input-bg-color:var(--nano-color-neutral-200);flex:0}.gn__search-form .nano-select:focus-within{z-index:1}.gn__search-form .nano-select .form-ctrl__input{border-inline-end:none}.gn__search-form .nano-input{flex:1}.gn__search-results{--padding-start:var(--nano-spacing-md);--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);font-size:var(--nano-font-size-2xs)}.gn__search-loading{display:flex;justify-content:center}.gn__search-result{--padding-start:0.3125rem;--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-neutral-1400);font-size:var(--nano-font-size-2xs)}.gn__search-result .search__highlight{font-style:normal;background:var(--nano-color-highlight)}.gn__search-viewall{--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-primary-1200)}.gn__search-viewall::part(label){justify-content:flex-end;text-decoration:underline}.gn__user-dropdown-trigger{all:unset;cursor:pointer;color:var(--nano-color-primary-1200);display:flex;white-space:nowrap;gap:var(--nano-spacing-xs);align-items:center;position:relative;padding-inline-start:var(--nano-spacing-md)}.gn__user-dropdown-trigger:hover{color:var(--main-menu-hover-text-color)}.gn__user-dropdown-trigger:active{color:var(--main-menu-active-text-color)}.gn__user-dropdown-trigger:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.gn__user-dropdown-trigger::before{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-start:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__user-dropdown-trigger .gn__user-dropdown-chevron{transition:rotate var(--nano-transition-x-fast) linear}[open] .gn__user-dropdown-trigger .gn__user-dropdown-chevron{rotate:180deg}.gn__user-dropdown-trigger nano-badge{inset-block-start:-0.7rem;inset-inline-end:-0.7rem}.gn__user-dropdown{--background:var(--overflow-bg-color);--padding:0;--overflow:visible}.gn__user-panel{inline-size:21.25rem;max-inline-size:21.25rem;color:var(--overflow-text-color);padding:var(--nano-spacing-md)}.gn__user-panel a{color:var(--overflow-text-color)}.gn__user-panel a:hover{text-decoration:underline;color:var(--overflow-hover-text-color)}.gn__user-panel-head{font-size:var(--nano-font-size-xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);padding-block-end:var(--nano-spacing-md);display:flex;align-items:center;gap:var(--nano-spacing-sm);font-size:var(--nano-font-size-xs)}.gn__user-panel-head .gn__user-avatar nano-icon{font-size:2.5rem}.gn__user-panel-body{display:flex;flex-direction:column}.gn__user-panel-body a{position:relative;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);padding-block:var(--nano-spacing-md)}.gn__user-panel-body a:first-child{border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__user-panel-foot{padding-block-start:var(--nano-spacing-md);display:flex;align-items:center;justify-content:space-between;gap:var(--nano-spacing-md)}.gn__drawer{--panel-background:var(--overflow-bg-color);--header-button-color:var(--overflow-text-color);--body-spacing:0;--header-spacing:var(--nano-spacing-md) 0;--footer-spacing:var(--nano-spacing-md)}.gn__drawer::part(title){display:flex;justify-content:flex-end}.gn__drawer::part(header-actions){order:-1}.gn__drawer-header{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.gn__drawer-menu{display:flex;flex-direction:column;margin:0 var(--nano-spacing-md);padding-block-end:var(--nano-spacing-md);color:var(--overflow-text-color);border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);position:relative}.gn__drawer-menu ::slotted(a),.gn__drawer-menu::slotted(a){padding:var(--nano-spacing-md) 0}.gn__drawer-menu ::slotted(a),.gn__drawer-menu ::slotted(.nano-nav-item),.gn__drawer-menu::slotted(a),.gn__drawer-menu::slotted(.nano-nav-item){--padding:var(--nano-spacing-md) 0;display:block;color:inherit !important;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__drawer-menu ::slotted(a:hover),.gn__drawer-menu ::slotted(.nano-nav-item:hover){text-decoration:underline;color:var(--overflow-hover-text-color) !important}';export{h as nano_global_nav}
4
+ import{a as n,r as e,c as a,d as o,l as t}from"./index-DXvE-U_j.js";import{h as i}from"./renderer-BUaAsDso.js";import{a as r}from"./algoliasearch-lite.esm.browser-C1SNUAIj.js";import{d as s}from"./throttle-C93FMm2Z.js";import{a as l}from"./style-xLaX004n.js";import{s as c}from"./search-insights-8OL2oeQN.js";const h=class{get host(){return n(this)}overflowMenu;overflowOpen=!1;logoUrl=location.protocol+"//"+location.host;cartUrl="";msgUrl="";loginUrl="";logoutUrl="";contactUrl="https://nanoporetech.com/contact";_sessionRedirect=window.location.href;get sessionRedirect(){return encodeURIComponent(this._sessionRedirect)}set sessionRedirect(n){this._sessionRedirect=n}cartCount=0;msgCount=0;async openOverflowMenu(){this.overflowOpen=!0}async closeOverflowMenu(){this.overflowOpen=!1}myAccountUrl;async handleMyAccountUrl(){this.myAccountUrl&&("local-logged-in"!==this.myAccountUrl?"local-logged-out"!==this.myAccountUrl?fetch(this.myAccountUrl+"/nav_bar_data.json").then((n=>n.json())).then((n=>{this.myAccountData=n})).catch((n=>{console.error("Error fetching MyAccount data",n)})):this.myAccountData=await import("./local-logged-out-BhOAka-2.js"):this.myAccountData=await import("./local-logged-in-Bycp-mPl.js"))}myAccountData;nanoUserData;userLinks=[];isLoggedIn=!1;get myAccountUser(){return this.myAccountData?.user?.uuid?this.myAccountData.user:null}processUserData(){this.myAccountUser&&(this.userLinks=this.myAccountData?.links.filter((n=>"profile-panel-list"===n.area)),this.loginUrl=this.loginUrl||this.myAccountData.urls.login,this.logoutUrl=this.logoutUrl||this.myAccountData.urls.logout,this.msgUrl=this.msgUrl||this.myAccountData.urls.messages,this.msgCount=this.msgCount||this.myAccountData.notifications.count,this.cartUrl=this.cartUrl||this.myAccountData.urls.cart,this.cartCount=this.cartCount||this.myAccountData.cart.count,this.isLoggedIn=!0,this.nanoUserData.emit(this.myAccountUser))}formatLoginLink(n){return n?this.sessionRedirect?n.endsWith("=")?n+this.sessionRedirect:n.includes("?")?n+"&ReplayState="+this.sessionRedirect:n+"?ReplayState="+this.sessionRedirect:n:""}resizeObserver;cachedWidth;mainMenu;_mainMenuBar;get mainMenuBar(){return this._mainMenuBar}set mainMenuBar(n){this._mainMenuBar!==n&&(this._mainMenuBar=n,this.addMainmenuRo())}shouldResize=!0;breakpoint=0;breakpointChanged(){this.breakpoint<this.bpPartials.mainMenu.breakpoint&&!1===this.shouldResize&&(this.overflowOpen=!1)}debounceResetResize=s((()=>{this.shouldResize=!1}),300);addMainmenuRo(){this.removeMainmenuRo(),(this.resizeObserver=new ResizeObserver((()=>{this.shouldResize||this.mainMenuBar.clientWidth>=this.cachedWidth&&0===this.breakpoint||this.mainMenuBar.clientWidth<=this.cachedWidth&&this.mainMenuBar.clientWidth>=this.mainMenu.scrollWidth||(this.shouldResize=!0,this.breakpoint=0)}))).observe(this.mainMenuBar)}removeMainmenuRo(){this.resizeObserver&&(this.mainMenuBar?this.resizeObserver.unobserve(this.mainMenuBar):this.resizeObserver.disconnect())}handleResize=()=>{this.shouldResize&&(this.breakpoint<4&&this.mainMenu.scrollWidth>this.mainMenuBar.clientWidth?this.breakpoint++:(this.cachedWidth=this.mainMenuBar.clientWidth,this.debounceResetResize()))};algoliaClient;searchResults;searchInput;activeIndex;autocompleteResults;searchForm;searchIndices=[];searchBarShown=!1;searchLoading=!1;_searchValue="";nanoSearchResult;nanoSearchError;nanoSearchReset;searchIndex="All";get searchValue(){return this._searchValue}set searchValue(n){n&&this.host.componentOnReady().then((()=>{this.searchBarShown=!0,this.handleSearchTermChangeEvent(n)}))}async submitSearch(){this.onSearchSubmit()}handleSearchIndex(){if(this.searchIndices?.length){if(this.searchIndex)return this.activeIndex=this.searchIndices.find((n=>n.name===this.searchIndex))||this.searchIndices[0],this.activeIndex;this.activeIndex=this.searchIndices[0]}}initSearch(){if(!this.myAccountData)return;const{search:n}=this.myAccountData;n?.app_id&&n?.api_key&&(this.algoliaClient=r(n.app_id,n.api_key),c.init(n.app_id,n.api_key).then((()=>{this.myAccountUser&&c.setUser(this.myAccountUser.uuid)})),this.searchIndices=this.myAccountData.search.indeces,this.searchIndices.forEach((n=>{n.algoliaIndex=this.algoliaClient.initIndex(n.index)})),this.searchIndex||(this.searchIndex=this.searchIndices[0].name))}onSearchSubmit=async n=>{if(n&&n.preventDefault(),!this.activeIndex||!this.myAccountData||this._searchValue?.length<3)return;this.searchResults||await this.doAlgoliaSearch();const{search:e}=this.myAccountData,a=this.searchResults.results.find((n=>this.activeIndex.index===n.index)),{index:o,domain:t,filters:i,query:r,replicas:s}=a;this.searchBarShown=!1,this.nanoSearchResult.emit({meta:{indexTitle:a.indexName,index:o,domain:t,filters:i,query:r,replicas:s},client:{apiKey:e.api_key,appId:e.app_id}})};async doAlgoliaSearch(){this.searchResults=null;const n=this.searchIndices.map((n=>{const e={clickAnalytics:!0,attributesToSnippet:["body:5","title:8"],indexName:n.index,query:this._searchValue,facets:n.filters,hitsPerPage:5,filters:""};return"Community"===n.name&&(e.filters="created > "+Math.floor((Date.now()-631152e5)/1e3)),e}));try{this.searchLoading=!0,this.searchResults=this.processSearchResults(await this.algoliaClient.search(n))}catch(n){console.error(n),this.nanoSearchError.emit(n)}return this.searchLoading=!1,this.searchResults}processSearchResults(n){const e=n,a=n;return e.results?(e.results.forEach(((n,a)=>{n={...n,indexName:this.searchIndices[a].name,selected:this.activeIndex.name===this.searchIndices[a].name,domain:this.activeIndex.domain||null,domains:this.myAccountData.domains||null,allGroup:!!this.searchIndices[a].allGroup,filters:this.searchIndices[a].filters,replicas:this.activeIndex.replicas},e.results[a]=this.processSearchResults(n)})),e):(a.hits.map((n=>{n.url&&!n.url.match(/^http/)&&(n.url=location.protocol+"//"+this.domainFor(n.origin)+n.url)})),a)}domainFor(n){if(!this.myAccountData)return"";const e=this.myAccountData.domains.find((e=>e.origin===n));return e?e.domain:""}async setAutocompleteResults(){this.autocompleteResults=null,this._searchValue.length<3?this._searchValue.length||this.nanoSearchReset.emit():this.autocompleteResults=(await this.doAlgoliaSearch()).results.find((n=>n.selected))}autocompleteSnippet(n){return n._snippetResult?.title?.value||n.title}handleSearchOpenEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&(this.searchInput.setFocus(),this.searchBarShown=!0)};handleSearchCloseEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&(this.searchBarShown=!1)};handleSearchTermInputEvent=n=>{"input"===n.detail.type&&this.searchInput.value.length>=3&&(this.autocompleteResults=null,this.searchLoading=!0)};handleSearchTermChangeEvent=n=>{this._searchValue!==n&&(this._searchValue=n,this.setAutocompleteResults())};handleSearchIndexChangeEvent=n=>{if(!n.detail?.value?.length)return;const e=n.detail.value;if(this.activeIndex.index===e)return;const a=this.searchIndices.find((n=>n.index===e));a&&a.algoliaIndex&&(this.searchIndex=a.name,this._searchValue.length>=3&&(this.searchInput.setFocus(),this.searchBarShown=!0,this.setAutocompleteResults()))};constructor(n){e(this,n),this.nanoUserData=a(this,"nanoUserData",7),this.nanoSearchResult=a(this,"nanoSearchResult",7),this.nanoSearchError=a(this,"nanoSearchError",7),this.nanoSearchReset=a(this,"nanoSearchReset",7),this.handleResize=s(this.handleResize,75)}componentWillLoad(){this.handleMyAccountUrl(),this.initSearch(),this.processUserData(),l(this.host.shadowRoot)}componentDidRender(){this.handleResize()}loggedInPanel(){if(this.isLoggedIn&&this.myAccountUser)return i("div",{part:"user-panel",class:"gn__user-panel nano-theme-dark"},i("div",{class:"gn__user-panel-head",slot:"label"},i("nano-avatar",{initials:this.myAccountUser.first_name?.charAt(0)+this.myAccountUser.last_name?.charAt(0)},this.myAccountUser.small_avatar_url&&!this.myAccountUser.small_avatar_url.includes("generic")&&i("img",{src:this.myAccountUser.small_avatar_url,alt:"User Avatar",height:40,width:40})),i("div",null,this.myAccountUser.name,i("br",null),this.myAccountUser.job_title,", ",this.myAccountUser.company)),i("div",{class:"gn__user-panel-body"},this.userLinks.map((n=>i("a",{href:n.address,target:n.target||void 0},n.title,("Messages"===n.title||n.address.includes(this.msgUrl)||this.msgUrl.includes(n.address))&&this.msgCount>0&&i("nano-badge",{theme:"danger",strength:"2"},this.msgCount))))),i("div",{class:"gn__user-panel-foot"},i("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},i("a",{href:this.formatLoginLink(this.logoutUrl)},"Logout"))))}bpPartials={contact:{tpl:()=>i("a",{href:this.contactUrl},"Contact"),breakpoint:0},mainMenu:{tpl:()=>i("slot",{name:"menu"}),breakpoint:1},logo:{tpl:()=>{},breakpoint:2}};noResultPartial(){if(this.searchLoading||this.autocompleteResults?.hits.length||this._searchValue.length<3)return;const n=[];return"All"===this.searchIndex?(n.push(i("div",{slot:"no-result",class:"gn__search-no-results"},'No results matching for "',i("strong",null,this._searchValue),'" Try another phrase')),n):(this.searchResults.results.forEach((e=>{e.hits.length&&n.push(i("nano-option",{class:"gn__search-result",onNanoSelect:n=>{n.preventDefault(),this.searchIndex=e.indexName,this.onSearchSubmit(n)}},'Show results for "',i("strong",null,this._searchValue),'" in ',i("strong",null,e.indexName)))})),n.unshift(i("div",{slot:n.length?"list-top":"no-result",class:"gn__search-no-results"},'No results matching for "',i("strong",null,this._searchValue),'" in'," ",i("strong",null,this.searchIndex),". Try another phrase")),n)}render(){const n=this.bpPartials;return i(o,{key:"66132ed8841605602bff8c2c750a657ec4d6d83a",class:{"overflow-menu":this.breakpoint>n.mainMenu.breakpoint,"bar-menu":this.breakpoint<=n.mainMenu.breakpoint,"nano-global-nav":!0}},i("div",{key:"c8dfcf4b405c72a14f576fb7b14ce41e8ff49b83",class:{gn:!0,"gn__search-open":this.searchBarShown}},i("nano-drawer",{key:"741e6dc6df0253450f65e792f45fe2a337bb007d",ref:n=>this.overflowMenu=n,label:"Main menu",part:"drawer",class:"gn__drawer nano-theme-dark",placement:"start",open:this.overflowOpen,onNanoAfterHide:()=>this.overflowOpen=!1,onNanoAfterShow:()=>this.overflowOpen=!0},i("div",{key:"b8d197424ed2d4dff32234457b7836507d9777ba",class:"gn__drawer-header",part:"overflow-header",slot:"label"},"Main menu"),i("nav",{key:"36ef3c9a323078bfbf4f28682afd4b33475c6d1d",class:"gn__drawer-menu",part:"overflow-menu"},this.breakpoint>n.mainMenu.breakpoint?n.mainMenu.tpl():"",i("slot",{key:"569277672e49d95702583537c90db8de51d89a35",name:"overflow"}))),i("div",{key:"367e4bfffe6a8359bf49e6a4ea7a69dfdd20e6af",class:"gn__menu-bar-wrapper"},i("div",{key:"aca6cb95a4b03c46509cfd6d0a55e722976200e9",class:"gn__menu-bar",part:"menu-bar",ref:n=>this.mainMenuBar=n},i("nav",{key:"8c56fcfde4d896b30a277a00f79de3dfb75d93ef",class:"gn__main-menu "+(this.shouldResize?"resizing":""),part:"main-menu",ref:n=>this.mainMenu=n},this.breakpoint>n.mainMenu.breakpoint&&i("nano-icon-button",{key:"fb8ca915d6460ee871a0a357b8a25d2e720620ac",class:"gn__overflow-button",iconName:"light/bars",label:"Open Menu",onClick:()=>this.overflowMenu.show()}),i("slot",{key:"96962d7ccd0d55f5c054dae0e8480398e7ea1415",name:"logo"},i("a",{key:"dcfa5d446ef38afb07285172dd5c0269da604d44",href:this.logoUrl,class:"gn__logo-link",part:"logo-link"},i("img",this.breakpoint<=n.logo.breakpoint?{src:t("../nano-assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--large",width:"152",height:"36",part:"logo logo--large"}:{src:t("../nano-assets/ont-wheel.svg"),alt:"Oxford Nanopore Technologies logo. A stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--small",width:"36",height:"36",part:"logo logo--small"}))),this.breakpoint<=n.mainMenu.breakpoint&&i("div",{key:"c4e2a7166c5766eede74e6f9e5763e157c47ac74",class:"gn__main-menu-links"},n.mainMenu.tpl()),i("div",{key:"e6bb457db190019f21c1c712bb8c9bab5abec91b",class:"gn__main-menu-actions"},i("nano-dropdown",{key:"d46c596a07189f129a1644118560590e70101a2b",dialogTitle:"Search Oxford Nanopore Technologies",placement:"bottom",class:"gn__search-dropdown",skidding:-30,distance:25,open:this.searchBarShown,onNanoAfterShow:this.handleSearchOpenEvent,onNanoAfterHide:this.handleSearchCloseEvent,autoOpen:!!this.searchIndices.length},i("nano-icon-button",{key:"00df8fe73a5c1e5b0e3263ee584549c1b450675f",class:"gn__search-button",slot:"trigger",iconName:"light/magnifying-glass",label:"Search"}),!!this.searchIndices.length&&i("form",{key:"b03a0c3f58a7a50939ec09258dda85a49157cf48",ref:n=>this.searchForm=n,class:"gn__search-form",part:"search-form",onSubmit:this.onSearchSubmit},this.searchIndices.length>1&&i("nano-select",{key:"367ed61df9546497f9cef04d833e86f59389f48a",part:"search-select",label:"Which site do you wish to search in?",mask:!0,hideLabel:!0,value:this.activeIndex?.index,onNanoChange:this.handleSearchIndexChangeEvent},this.searchIndices.map((n=>i("nano-option",{selected:n.name===this.searchIndex,value:n.index},n.name||n.index)))),i("nano-input",{key:"d8013a6f1cd8953bc63ba6f518367a4b278197bd",ref:n=>this.searchInput=n,part:"search-input",label:"Search Oxford Nanopore Technologies",placeholder:"Search Oxford Nanopore...",hideLabel:!0,clearable:!0,onNanoChange:n=>{this.handleSearchTermChangeEvent(n.detail.value)},onNanoInput:this.handleSearchTermInputEvent,debounce:500,value:this._searchValue},i("nano-icon",{key:"fe62a269a2f3ca318ad1e071404f693c9540317b",slot:"end",name:"light/magnifying-glass"}),i("nano-datalist",{key:"87d39b1dc2be07a66b546ba53eea56351bb103ec",class:"gn__search-results",onNanoSelect:n=>n.preventDefault(),dropDownConfig:{tetherTo:this.searchForm},disableFilter:!0},this.searchLoading&&i("div",{key:"fade49b478eddeb181f332b8db31b0f88c98305f",slot:"no-result",class:"gn__search-loading"},i("nano-spinner",{key:"e7c946dc5ec1ee76d115fd2575b1288f95d71c43"},"Searching...")),this.noResultPartial(),!!this.autocompleteResults?.hits.length&&[this.autocompleteResults.hits.map(((n,e)=>i("nano-option",{href:n.url,class:"gn__search-result",onClick:()=>{c.sendClick({index:this.activeIndex.index,eventName:"Global nav quick search - search result clicked",queryID:this.autocompleteResults.queryID,objectIDs:[n.objectID],positions:[e+1]})}},i("span",{innerHTML:this.autocompleteSnippet(n)})))),i("nano-option",{key:"74852e060130852064b4987f1de0c8f0fa2a395e",class:"gn__search-viewall",onNanoSelect:this.onSearchSubmit},"View all results")])))),i("div",{key:"e66b10d8ce1de533d772bfd66bf7c73511f338ff",class:"gn__cart"},i("nano-icon-button",{key:"47b8fc7ad91f5ea1048a670407ad602d29eb347f",iconName:"light/cart-shopping",label:"View your cart",href:this.cartUrl}),!!this.cartCount&&i("nano-badge",{key:"75c8ffb6264bd4a390ad77d15c408105d6f77393",theme:"danger",strength:"2"},this.cartCount>9?"9+":this.cartCount)),this.breakpoint<=n.contact.breakpoint?n.contact.tpl():"",this.isLoggedIn?i("nano-dropdown",{dialogTitle:"User menu",class:"gn__user-dropdown",distance:10,placement:"bottom-end"},i("button",{slot:"trigger",class:"gn__user-dropdown-trigger"},i("nano-icon",{name:"light/user"}),i("nano-icon",{name:"light/chevron-down",class:"gn__user-dropdown-chevron"}),!!this.msgCount&&i("nano-badge",{theme:"danger",strength:"2"},this.msgCount>9?"9+":this.msgCount)),this.loggedInPanel()):i("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},i("a",{href:this.formatLoginLink(this.loginUrl)},"Login")))))),i("div",{key:"798ee16df74983e3d5689639f3320198bd1fe14d",class:"gn__site",part:"site-wrapper"},i("nano-global-search-results",{key:"a51edbf9c6bc9b0e34e207e21b4341704032e82f",part:"site-search-results"},i("slot",{key:"4ae65a7bc4d8897d95e43692b87830cf9f9d8a8f"})))))}static get assetsDirs(){return["assets"]}static get watchers(){return{myAccountUrl:["handleMyAccountUrl"],myAccountData:["processUserData","initSearch"],shouldResize:["breakpointChanged"],breakpoint:["breakpointChanged"],searchIndices:["handleSearchIndex"],searchIndex:["handleSearchIndex"]}}};h.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--main-menu-bar-bg-color:var(--nano-color-base-0);--main-menu-text-color:var(--nano-color-base-1000);--main-menu-hover-text-color:var(--nano-color-primary-1000);--main-menu-active-text-color:var(--nano-color-primary-1200);--main-menu-active-border-color:var(--nano-color-primary-1000);--overflow-bg-color:var(--nano-color-grey-mono-1600);--overflow-text-color:var(--nano-color-basic-white);--overflow-hover-text-color:var(--nano-color-blue-cerulean-700);--overflow-active-text-color:var(--nano-color-blue-cerulean-300);display:block;color:var(--main-menu-text-color)}img{max-inline-size:none;display:block}::slotted(a),:host::slotted(a),a{text-decoration:none}a:has(img){display:inline-block}a:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}nano-drawer:not(:defined){display:none}nano-badge{position:absolute;font-size:0.5625rem;pointer-events:none}.gn__cart{position:relative}.gn__cart nano-badge{inset-block-start:-0.35rem;inset-inline-end:-0.4rem}.gn__login-cta{--bg:transparent}.gn__menu-bar-wrapper{z-index:var(--nano-z-index-menubar);position:relative}.gn__menu-bar-wrapper::after{content:"";position:absolute;block-size:1px;inline-size:100%;inset-inline:0;inset-block-end:-1px;z-index:-3;background-color:var(--nano-color-neutral-200)}.gn__menu-bar{inline-size:100%;overflow:clip}.gn__menu-bar a{color:var(--main-menu-text-color)}.gn__menu-bar a:hover{color:var(--main-menu-hover-text-color)}.gn__menu-bar a:active{color:var(--main-menu-active-text-color)}.gn__main-menu{display:inline-flex;align-items:center;background-color:var(--main-menu-bar-bg-color);min-inline-size:100%;padding:var(--nano-spacing-md);transition:opacity var(--nano-transition-x-fast) ease;opacity:1}.gn__main-menu.resizing{transition:none;opacity:0}.gn__main-menu>*{margin-inline-end:var(--nano-spacing-xl)}.gn__main-menu>*:is(slot,slot-fb){display:flex}.gn__main-menu>*:last-child{margin-inline-end:0}.gn__overflow-button{--padding:0.5rem 0.875rem 0.5rem 0;margin-inline-end:0.875rem;font-size:1.125rem;position:relative}.gn__overflow-button::after{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-end:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__main-menu-links,.gn__main-menu-actions{display:inline-flex;align-items:center}.gn__main-menu-links .nano-icon,.gn__main-menu-links .nano-icon-button,.gn__main-menu-actions .nano-icon,.gn__main-menu-actions .nano-icon-button{--active-color:var(--main-menu-active-text-color);--hover-color:var(--main-menu-hover-text-color);font-size:1rem}.gn__main-menu-links .nano-icon-button:hover,.gn__main-menu-actions .nano-icon-button:hover{color:var(--main-menu-hover-text-color)}.gn__main-menu-links{gap:var(--nano-spacing-xl)}.gn__main-menu-links ::slotted(a),.gn__main-menu-links::slotted(a){color:var(--main-menu-text-color)}.gn__main-menu-links ::slotted(a:hover){color:var(--main-menu-hover-text-color)}.gn__main-menu-links ::slotted(*:active){color:var(--main-menu-active-text-color)}.gn__main-menu-actions{margin-inline-start:auto;font-size:0.9375rem;gap:var(--nano-spacing-md)}.gn__search-dropdown{--overflow:visible;--padding:0;--background:transparent}.gn__search-dropdown .nano-icon-button{position:relative}.gn__search-dropdown .nano-icon-button::before{content:"";position:absolute;background-color:var(--main-menu-active-border-color);block-size:4px;inset-inline:5px 2px;inset-block-end:-1.5625rem;transform:translateZ(0) scaleX(0);transform-origin:0 center;transition:transform var(--nano-transition-x-fast) ease-in-out}.gn__search-open .gn__search-dropdown .nano-icon-button::before{transform:translateZ(0) scaleX(1)}.gn__search-form{display:inline-flex;max-inline-size:100vw;inline-size:30.625rem}.gn__search-form .nano-select{--input-bg-color:var(--nano-color-neutral-200);flex:0}.gn__search-form .nano-select:focus-within{z-index:1}.gn__search-form .nano-select .form-ctrl__input{border-inline-end:none}.gn__search-form .nano-input{flex:1}.gn__search-results{--padding-start:var(--nano-spacing-md);--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);font-size:var(--nano-font-size-2xs)}.gn__search-loading{display:flex;justify-content:center}.gn__search-result{--padding-start:0.3125rem;--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-neutral-1400);font-size:var(--nano-font-size-2xs)}.gn__search-result .search__highlight{font-style:normal;background:var(--nano-color-highlight)}.gn__search-viewall{--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-primary-1200)}.gn__search-viewall::part(label){justify-content:flex-end;text-decoration:underline}.gn__user-dropdown-trigger{all:unset;cursor:pointer;color:var(--nano-color-primary-1200);display:flex;white-space:nowrap;gap:var(--nano-spacing-xs);align-items:center;position:relative;padding-inline-start:var(--nano-spacing-md)}.gn__user-dropdown-trigger:hover{color:var(--main-menu-hover-text-color)}.gn__user-dropdown-trigger:active{color:var(--main-menu-active-text-color)}.gn__user-dropdown-trigger:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.gn__user-dropdown-trigger::before{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-start:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__user-dropdown-trigger .gn__user-dropdown-chevron{transition:rotate var(--nano-transition-x-fast) linear}[open] .gn__user-dropdown-trigger .gn__user-dropdown-chevron{rotate:180deg}.gn__user-dropdown-trigger nano-badge{inset-block-start:-0.7rem;inset-inline-end:-0.7rem}.gn__user-dropdown{--background:var(--overflow-bg-color);--padding:0;--overflow:visible}.gn__user-panel{inline-size:21.25rem;max-inline-size:21.25rem;color:var(--overflow-text-color);padding:var(--nano-spacing-md)}.gn__user-panel a{color:var(--overflow-text-color)}.gn__user-panel a:hover{text-decoration:underline;color:var(--overflow-hover-text-color)}.gn__user-panel-head{font-size:var(--nano-font-size-xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);padding-block-end:var(--nano-spacing-md);display:flex;align-items:center;gap:var(--nano-spacing-sm);font-size:var(--nano-font-size-xs)}.gn__user-panel-head .gn__user-avatar nano-icon{font-size:2.5rem}.gn__user-panel-body{display:flex;flex-direction:column}.gn__user-panel-body a{position:relative;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);padding-block:var(--nano-spacing-md)}.gn__user-panel-body a:first-child{border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__user-panel-foot{padding-block-start:var(--nano-spacing-md);display:flex;align-items:center;justify-content:space-between;gap:var(--nano-spacing-md)}.gn__drawer{--panel-background:var(--overflow-bg-color);--header-button-color:var(--overflow-text-color);--body-spacing:0;--header-spacing:var(--nano-spacing-md) 0;--footer-spacing:var(--nano-spacing-md)}.gn__drawer::part(title){display:flex;justify-content:flex-end}.gn__drawer::part(header-actions){order:-1}.gn__drawer-header{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.gn__drawer-menu{display:flex;flex-direction:column;margin:0 var(--nano-spacing-md);padding-block-end:var(--nano-spacing-md);color:var(--overflow-text-color);border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);position:relative}.gn__drawer-menu ::slotted(a),.gn__drawer-menu::slotted(a){padding:var(--nano-spacing-md) 0}.gn__drawer-menu ::slotted(a),.gn__drawer-menu ::slotted(.nano-nav-item),.gn__drawer-menu::slotted(a),.gn__drawer-menu::slotted(.nano-nav-item){--padding:var(--nano-spacing-md) 0;display:block;color:inherit !important;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__drawer-menu ::slotted(a:hover),.gn__drawer-menu ::slotted(.nano-nav-item:hover){text-decoration:underline;color:var(--overflow-hover-text-color) !important}';export{h as nano_global_nav}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{h as t,d as i,a as e,r as n,c as r}from"./index-DXvE-U_j.js";import{h as s}from"./renderer-BUaAsDso.js";const o=(()=>{try{return!!new CSSStyleSheet}catch(t){return!1}})(),a=new WeakMap;function c(i,e,n){(function(t){for(const i in t)if(i in t&&Array.isArray(t[i]))return t[i]}(i)||[]).push(t("style",{type:"text/css","constructible-style":e},n))}function l(t,i,e,n){i.__constructableStyle||(i.__constructableStyle={});const r=t[n.cacheKeyProperty];return i.__constructableStyle[r]||(i.__constructableStyle[r]=new CSSStyleSheet,i.__constructableStyle[r].replace(e)),i.__constructableStyle[r]}const d=class{constructor(t){n(this,t)}grids=[];cacheKey;sSize=300;mSize=550;lSize=800;xlSize=1e3;sCols;mCols;lCols;xlCols;xxlCols;sTpl;mTpl;lTpl;xlTpl;xxlTpl;showHelper=!1;constructSizeArray(){this.grids=[],this.sCols&&this.grids.push({cols:this.sCols,breakpoint:0,name:"s",template:this.sTpl}),this.mCols&&this.grids.push({cols:this.mCols,breakpoint:this.sSize,name:"m",template:this.mTpl}),this.lCols&&this.grids.push({cols:this.lCols,breakpoint:this.mSize,name:"l",template:this.lTpl}),this.xlCols&&this.grids.push({cols:this.xlCols,breakpoint:this.lSize,name:"xl",template:this.xlTpl}),this.xxlCols&&this.grids.push({cols:this.xxlCols,breakpoint:this.xlSize,name:"xxl",template:this.xxlTpl}),this.cacheKey=this.grids.map((t=>`${t.cols}-${t.breakpoint}-${t.template||""}`)).join("")+"-helper-"+this.showHelper}styles=()=>`\n ${this.grids.map((t=>`\n @container (min-width: ${Number(t.breakpoint+1)?Number(t.breakpoint)+1+"px":t.breakpoint}) {\n [cache-key="${this.cacheKey}"].grid {\n --current-grid-size: "grid size: ${t.name}";\n ${t.template?`grid-template: ${t.template};`:`grid-template-columns: repeat(${t.cols}, minmax(calc((100% / ${t.cols}) - var(--grid-col-gap)), 1fr));`}\n }\n ${[...Array(t.cols)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-start-${n}"],\n ::slotted([grid-states~="${t.name}-col-start-${n}"]) {\n grid-column-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-span-${n}"],\n ::slotted([grid-states~="${t.name}-col-span-${n}"]) {\n grid-column-end: span ${n} !important;\n }\n `})).join("")}\n ${[...Array(24)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-start-${n}"],\n ::slotted([grid-states~="${t.name}-row-start-${n}"]) {\n grid-row-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-span-${n}"],\n ::slotted([grid-states~="${t.name}-row-span-${n}"]) {\n grid-row-end: span ${n} !important;\n }\n `})).join("")}\n ${this.showHelper?`\n [cache-key="${this.cacheKey}"].grid--helper :nth-child(-n+${t.cols}) {\n display: block !important;\n }\n `:""}\n }\n `)).join("")}\n `.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s{2,}/g," ").replace(/\s*([{}:;,])\s*/g,"$1").replace(/\n/g,"");componentWillLoad(){this.constructSizeArray()}render(){return s(i,{key:"410e2e3fce3867216adb0f9bf0501f8d40514bce",class:"nano-grid"},s("div",{key:"424f6da1b39d37ef70912e87e5d61320b5ff8d11",part:"grid",class:"grid","cache-key":this.cacheKey},s("slot",{key:"051bdae40a3d63dfdb744a980c74a42c2ac9c05f"})),this.showHelper&&s("div",{key:"b24395cdacf9d7ba3a15b1a9b064a2a97f3afac1",class:"grid grid--helper",part:"helper","cache-key":this.cacheKey},[...Array(24)].map((()=>s("div",{class:"grid__helper-item"})))))}static get watchers(){return{sTpl:["constructSizeArray"],mTpl:["constructSizeArray"],lTpl:["constructSizeArray"],xlTpl:["constructSizeArray"],xxlTpl:["constructSizeArray"],sSize:["constructSizeArray"],mSize:["constructSizeArray"],lSize:["constructSizeArray"],xlSize:["constructSizeArray"],sCols:["constructSizeArray"],mCols:["constructSizeArray"],lCols:["constructSizeArray"],xlCols:["constructSizeArray"],xxlCols:["constructSizeArray"],showHelper:["constructSizeArray"]}}};(function(t,i,e,n){var r,s=arguments.length,o=s<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(i,e,o):r(i,e))||o);s>3&&o&&Object.defineProperty(i,e,o)})([function(n={}){return(r,s)=>{n.cacheKeyProperty||(n.cacheKeyProperty=s);const{componentWillLoad:d,render:h,componentWillRender:m}=r;if(d||console.warn(`ConstructibleStyle requires you to have a \`componentWillLoad\` lifecycle method in \`${r.constructor.name}\`. Failure to add this function may cause ConstructibleStyle to fail due to StencilJS build optimizations.`),o){const t=t=>{if(!t[n.cacheKeyProperty]||a.get(t)&&a.get(t)===t[n.cacheKeyProperty])return;a.set(t,t[n.cacheKeyProperty]);const i=e(t),o="function"==typeof t[s]?t[s]():t[s],c=i.shadowRoot||document;c.adoptedStyleSheets=[...c.adoptedStyleSheets||[],l(t,r,o,n)]};r.componentWillLoad=function(){const i=d&&d.call(this);return t(this),i},r.componentWillRender=function(){const i=m&&m.call(this);return t(this),i}}else r.render=function(){const e="function"==typeof this[s]?this[s]():this[s];let n=h.call(this);if(function(t){for(const e in t)if(e in t&&t[e]===i)return!0;return!1}(n))c(n,r.constructor.name,e);else if(n=t(i,null,n),"attachShadow"in HTMLElement.prototype){if(!r.__constructableStyle){const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("constructible-style",r.constructor.name),t.innerHTML=e,r.__constructableStyle=t,document.head.appendChild(t)}}else c(n,r.constructor.name,e);return n}}}({cacheKeyProperty:"cacheKey"}),function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)}("design:type",Object)],d.prototype,"styles",void 0),d.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--grid-col-gap:var(--nano-spacing-medium, 16px);--grid-row-gap:var(--nano-spacing-medium, 16px);--grid-align-items:start;--current-grid-size:"grid size: s";container-type:inline-size;display:block}:host .grid{display:grid;gap:var(--grid-row-gap) var(--grid-col-gap);block-size:inherit;min-block-size:inherit;align-items:var(--grid-align-items)}:host([show-helper]:not([show-helper=false])){position:relative}:host([show-helper]:not([show-helper=false])) .grid--helper{position:absolute;inset:0;pointer-events:none;display:grid !important;overflow:hidden}:host([show-helper]:not([show-helper=false])) .grid--helper::before{content:var(--current-grid-size);font-size:30px;position:absolute;inline-size:100%;inset-inline-start:0;text-align:center;inset-block-start:50%;transform:translateY(-50%);color:rgba(0, 0, 0, 0.2);text-transform:uppercase;z-index:99;pointer-events:none}:host([show-helper]:not([show-helper=false])) .grid__helper-item{background:hsla(204, 80%, 72%, 0.25);block-size:100vh}';const h=class{constructor(t){n(this,t),this.nanoImgWillLoad=r(this,"nanoImgWillLoad",7),this.nanoImgDidLoad=r(this,"nanoImgDidLoad",7),this.nanoImgError=r(this,"nanoImgError",7)}io;_srcSet={};get host(){return e(this)}loadSrc;loadError;hasLoaded=!1;imgStates=null;_src;_srcChanged(){this.hasLoaded=!1,this.addIO()}alt;src;srcChanged(){this._src=this.src}srcSet;srcSetChanged(){this.srcSet&&(delete this._srcSet,this._srcSet={},this.imgStates=this.srcSet.split(",").map((t=>{const[i,e]=t.split(" ").filter((t=>t.length));return this._srcSet[i]={src:e,active:!1},i})).join(", "))}lazy=!0;lazyChanged(){this.lazy||this.load()}background;autoHeight="content";nanoImgWillLoad;nanoImgDidLoad;nanoImgError;addIO(){this._src&&!this.hasLoaded&&(this.lazy?"undefined"!=typeof window&&"IntersectionObserver"in window?(this.removeIO(),this.io=new IntersectionObserver((t=>{t[0].isIntersecting&&(this.load(),this.removeIO())})),this.io.observe(this.host)):setTimeout((()=>this.load()),200):this.load())}load(){this.loadError=this.onError,this.loadSrc=this._src,this.nanoImgWillLoad.emit()}onLoad=()=>{this.nanoImgDidLoad.emit(),setTimeout((()=>this.hasLoaded=!0),50)};onError=()=>{this.nanoImgError.emit()};onResize=t=>{Object.entries(t.detail).forEach((([t,i])=>{this._srcSet[t].active=!!i}));const i=[];Object.keys(this._srcSet).sort().forEach((t=>{this._srcSet[t].active&&i.push(this._srcSet[t].src)})),this._src=i.length?i.slice(-1)[0]:this.src};removeIO(){this.io&&(this.io.disconnect(),this.io=void 0)}connectedCallback(){this.srcChanged(),this.srcSetChanged(),this.lazyChanged()}componentDidLoad(){this.addIO()}disconnectedCallback(){this.removeIO()}render(){const t=this.loadSrc?{"background-image":`url(${this.loadSrc})`}:{};return s(i,{key:"a9d5cb1d0be8540d7ea690fd13d92b1f5ec614af",class:"nano-img"},s("div",{key:"1f40afc64a5652f53b224403c59b4f108e5eb044",class:"img"},s("nano-skeleton",{key:"a8872721a38b11951ca6950d567193ba16e1d348",class:"img__loader"}),!!this.background&&s("div",{key:"d9c1fd739f4a4914a0cfe8c1eb8ef50832ecc35c",class:{loaded:this.hasLoaded,img__bg:!0,"no-height":"image"===this.autoHeight},style:t},s("slot",{key:"750330595e7dc0e2127d8646616107154215e97b"})),s("img",{key:"c04ad33e34573482e701f4239e17a9a28fd98dd0",class:{img__image:!0,loaded:this.hasLoaded,hide:this.background,"no-height":"content"===this.autoHeight},decoding:"async",src:this.loadSrc,loading:void 0,alt:this.alt,onLoad:this.onLoad,onError:this.loadError}),s("nano-resize-observe",{key:"4d40e294ec3a56be5756aede03e91aaf3d629bf3",class:"img__observer",onNanoResizeStateChange:this.onResize,states:this.imgStates})))}static get watchers(){return{_src:["_srcChanged"],src:["srcChanged"],srcSet:["srcSetChanged"],lazy:["lazyChanged"]}}};h.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--padding:0;display:inline-block;object-fit:cover;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;object-fit:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;flex:1 1 100%;display:flex;flex-direction:column;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__loader,.img__observer{position:absolute;inset:0;block-size:100%;inline-size:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;transition:0.5s ease opacity, 0.3s ease filter 0.4s;filter:blur(5px);flex:1}.img__image.loaded,.img__bg.loaded{opacity:1;filter:blur(0)}@media not all and (resolution >= 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{filter:blur(0)}}}.img__image{object-fit:inherit;object-position:inherit;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__image.hide{visibility:hidden}.img__image.hide.no-height{block-size:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;inset:0}";export{d as nano_grid,h as nano_img}
4
+ import{h as t,d as i,a as e,r as n,c as r}from"./index-DXvE-U_j.js";import{h as s}from"./renderer-BUaAsDso.js";const o=(()=>{try{return!!new CSSStyleSheet}catch(t){return!1}})(),a=new WeakMap;function c(i,e,n){(function(t){for(const i in t)if(i in t&&Array.isArray(t[i]))return t[i]}(i)||[]).push(t("style",{type:"text/css","constructible-style":e},n))}function l(t,i,e,n){i.__constructableStyle||(i.__constructableStyle={});const r=t[n.cacheKeyProperty];return i.__constructableStyle[r]||(i.__constructableStyle[r]=new CSSStyleSheet,i.__constructableStyle[r].replace(e)),i.__constructableStyle[r]}const d=class{constructor(t){n(this,t)}grids=[];cacheKey;sSize=300;mSize=550;lSize=800;xlSize=1e3;sCols;mCols;lCols;xlCols;xxlCols;sTpl;mTpl;lTpl;xlTpl;xxlTpl;showHelper=!1;constructSizeArray(){this.grids=[],this.sCols&&this.grids.push({cols:this.sCols,breakpoint:0,name:"s",template:this.sTpl}),this.mCols&&this.grids.push({cols:this.mCols,breakpoint:this.sSize,name:"m",template:this.mTpl}),this.lCols&&this.grids.push({cols:this.lCols,breakpoint:this.mSize,name:"l",template:this.lTpl}),this.xlCols&&this.grids.push({cols:this.xlCols,breakpoint:this.lSize,name:"xl",template:this.xlTpl}),this.xxlCols&&this.grids.push({cols:this.xxlCols,breakpoint:this.xlSize,name:"xxl",template:this.xxlTpl}),this.cacheKey=this.grids.map((t=>`${t.cols}-${t.breakpoint}-${t.template||""}`)).join("")+"-helper-"+this.showHelper}styles=()=>`\n ${this.grids.map((t=>`\n @container (min-width: ${Number(t.breakpoint+1)?Number(t.breakpoint)+1+"px":t.breakpoint}) {\n [cache-key="${this.cacheKey}"].grid {\n --current-grid-size: "grid size: ${t.name}";\n ${t.template?`grid-template: ${t.template};`:`grid-template-columns: repeat(${t.cols}, minmax(calc((100% / ${t.cols}) - var(--grid-col-gap)), 1fr));`}\n }\n ${[...Array(t.cols)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-start-${n}"],\n ::slotted([grid-states~="${t.name}-col-start-${n}"]) {\n grid-column-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-span-${n}"],\n ::slotted([grid-states~="${t.name}-col-span-${n}"]) {\n grid-column-end: span ${n} !important;\n }\n `})).join("")}\n ${[...Array(24)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-start-${n}"],\n ::slotted([grid-states~="${t.name}-row-start-${n}"]) {\n grid-row-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-span-${n}"],\n ::slotted([grid-states~="${t.name}-row-span-${n}"]) {\n grid-row-end: span ${n} !important;\n }\n `})).join("")}\n ${this.showHelper?`\n [cache-key="${this.cacheKey}"].grid--helper :nth-child(-n+${t.cols}) {\n display: block !important;\n }\n `:""}\n }\n `)).join("")}\n `.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s{2,}/g," ").replace(/\s*([{}:;,])\s*/g,"$1").replace(/\n/g,"");componentWillLoad(){this.constructSizeArray()}render(){return s(i,{key:"410e2e3fce3867216adb0f9bf0501f8d40514bce",class:"nano-grid"},s("div",{key:"424f6da1b39d37ef70912e87e5d61320b5ff8d11",part:"grid",class:"grid","cache-key":this.cacheKey},s("slot",{key:"051bdae40a3d63dfdb744a980c74a42c2ac9c05f"})),this.showHelper&&s("div",{key:"b24395cdacf9d7ba3a15b1a9b064a2a97f3afac1",class:"grid grid--helper",part:"helper","cache-key":this.cacheKey},[...Array(24)].map((()=>s("div",{class:"grid__helper-item"})))))}static get watchers(){return{sTpl:["constructSizeArray"],mTpl:["constructSizeArray"],lTpl:["constructSizeArray"],xlTpl:["constructSizeArray"],xxlTpl:["constructSizeArray"],sSize:["constructSizeArray"],mSize:["constructSizeArray"],lSize:["constructSizeArray"],xlSize:["constructSizeArray"],sCols:["constructSizeArray"],mCols:["constructSizeArray"],lCols:["constructSizeArray"],xlCols:["constructSizeArray"],xxlCols:["constructSizeArray"],showHelper:["constructSizeArray"]}}};(function(t,i,e,n){var r,s=arguments.length,o=s<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(i,e,o):r(i,e))||o);s>3&&o&&Object.defineProperty(i,e,o)})([function(n={}){return(r,s)=>{n.cacheKeyProperty||(n.cacheKeyProperty=s);const{componentWillLoad:d,render:h,componentWillRender:m}=r;if(d||console.warn(`ConstructibleStyle requires you to have a \`componentWillLoad\` lifecycle method in \`${r.constructor.name}\`. Failure to add this function may cause ConstructibleStyle to fail due to StencilJS build optimizations.`),o){const t=t=>{if(!t[n.cacheKeyProperty]||a.get(t)&&a.get(t)===t[n.cacheKeyProperty])return;a.set(t,t[n.cacheKeyProperty]);const i=e(t),o="function"==typeof t[s]?t[s]():t[s],c=i.shadowRoot||document;c.adoptedStyleSheets=[...c.adoptedStyleSheets||[],l(t,r,o,n)]};r.componentWillLoad=function(){const i=d&&d.call(this);return t(this),i},r.componentWillRender=function(){const i=m&&m.call(this);return t(this),i}}else r.render=function(){const e="function"==typeof this[s]?this[s]():this[s];let n=h.call(this);if(function(t){for(const e in t)if(e in t&&t[e]===i)return!0;return!1}(n))c(n,r.constructor.name,e);else if(n=t(i,null,n),"attachShadow"in HTMLElement.prototype){if(!r.__constructableStyle){const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("constructible-style",r.constructor.name),t.innerHTML=e,r.__constructableStyle=t,document.head.appendChild(t)}}else c(n,r.constructor.name,e);return n}}}({cacheKeyProperty:"cacheKey"}),function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)}("design:type",Object)],d.prototype,"styles",void 0),d.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--grid-col-gap:var(--nano-spacing-medium, 16px);--grid-row-gap:var(--nano-spacing-medium, 16px);--grid-align-items:start;--current-grid-size:"grid size: s";container-type:inline-size;display:block}:host .grid{display:grid;gap:var(--grid-row-gap) var(--grid-col-gap);block-size:inherit;min-block-size:inherit;align-items:var(--grid-align-items)}:host([show-helper]:not([show-helper=false])){position:relative}:host([show-helper]:not([show-helper=false])) .grid--helper{position:absolute;inset:0;pointer-events:none;display:grid !important;overflow:hidden}:host([show-helper]:not([show-helper=false])) .grid--helper::before{content:var(--current-grid-size);font-size:30px;position:absolute;inline-size:100%;inset-inline-start:0;text-align:center;inset-block-start:50%;transform:translateY(-50%);color:rgba(0, 0, 0, 0.2);text-transform:uppercase;z-index:99;pointer-events:none}:host([show-helper]:not([show-helper=false])) .grid__helper-item{background:hsla(204, 80%, 72%, 0.25);block-size:100vh}';const h=class{constructor(t){n(this,t),this.nanoImgWillLoad=r(this,"nanoImgWillLoad",7),this.nanoImgDidLoad=r(this,"nanoImgDidLoad",7),this.nanoImgError=r(this,"nanoImgError",7)}io;_srcSet={};get host(){return e(this)}loadSrc;loadError;hasLoaded=!1;imgStates=null;_src;_srcChanged(){this.hasLoaded=!1,this.addIO()}alt;src;srcChanged(){this._src=this.src}srcSet;srcSetChanged(){this.srcSet&&(delete this._srcSet,this._srcSet={},this.imgStates=this.srcSet.split(",").map((t=>{const[i,e]=t.split(" ").filter((t=>t.length));return this._srcSet[i]={src:e,active:!1},i})).join(", "))}lazy=!0;lazyChanged(){this.lazy||this.load()}background;autoHeight="content";nanoImgWillLoad;nanoImgDidLoad;nanoImgError;addIO(){this._src&&!this.hasLoaded&&(this.lazy?"undefined"!=typeof window&&"IntersectionObserver"in window?(this.removeIO(),this.io=new IntersectionObserver((t=>{t[0].isIntersecting&&(this.load(),this.removeIO())})),this.io.observe(this.host)):setTimeout((()=>this.load()),200):this.load())}load(){this.loadError=this.onError,this.loadSrc=this._src,this.nanoImgWillLoad.emit()}onLoad=()=>{this.nanoImgDidLoad.emit(),setTimeout((()=>this.hasLoaded=!0),50)};onError=()=>{this.nanoImgError.emit()};onResize=t=>{Object.entries(t.detail).forEach((([t,i])=>{this._srcSet[t].active=!!i}));const i=[];Object.keys(this._srcSet).sort().forEach((t=>{this._srcSet[t].active&&i.push(this._srcSet[t].src)})),this._src=i.length?i.slice(-1)[0]:this.src};removeIO(){this.io&&(this.io.disconnect(),this.io=void 0)}connectedCallback(){this.srcChanged(),this.srcSetChanged(),this.lazyChanged()}componentDidLoad(){this.addIO()}disconnectedCallback(){this.removeIO()}render(){const t=this.loadSrc?{"background-image":`url(${this.loadSrc})`}:{};return s(i,{key:"a9d5cb1d0be8540d7ea690fd13d92b1f5ec614af",class:"nano-img"},s("div",{key:"1f40afc64a5652f53b224403c59b4f108e5eb044",class:"img"},s("div",{key:"7b3a0b8521888092effb1fc675b0c52bce7faa6f",class:"img__loader n-loader-skeleton"},"Loading"),!!this.background&&s("div",{key:"1f4d59fc6ff3e0be42f18d1db4a099a32d099872",class:{loaded:this.hasLoaded,img__bg:!0,"no-height":"image"===this.autoHeight},style:t},s("slot",{key:"d987180d13fa9ef34868c8e962344da9e0f6b876"})),s("img",{key:"f3d603cf35bf0c37c4e1eb530e9a9ea7d7e81beb",class:{img__image:!0,loaded:this.hasLoaded,hide:this.background,"no-height":"content"===this.autoHeight},decoding:"async",src:this.loadSrc,loading:void 0,alt:this.alt,onLoad:this.onLoad,onError:this.loadError}),s("nano-resize-observe",{key:"cf77dadeb8d5b01ef1afff5e6df5eb6aacad13e6",class:"img__observer",onNanoResizeStateChange:this.onResize,states:this.imgStates})))}static get watchers(){return{_src:["_srcChanged"],src:["srcChanged"],srcSet:["srcSetChanged"],lazy:["lazyChanged"]}}};h.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--padding:0;display:inline-block;object-fit:cover;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;object-fit:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;flex:1 1 100%;display:flex;flex-direction:column;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__loader,.img__observer{position:absolute;inset:0;block-size:100%;inline-size:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;transition:0.5s ease opacity, 0.3s ease filter 0.4s;filter:blur(5px);flex:1}.img__image.loaded,.img__bg.loaded{opacity:1;filter:blur(0)}@media not all and (resolution >= 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{filter:blur(0)}}}.img__image{object-fit:inherit;object-position:inherit;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__image.hide{visibility:hidden}.img__image.hide.no-height{block-size:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;inset:0}";export{d as nano_grid,h as nano_img}