plossy 0.5.1 → 0.5.2
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.
- package/README.md +6 -4
- package/dist/plossy.bootstrap.css +1 -1
- package/dist/plossy.bootstrap.min.css +1 -1
- package/dist/plossy.core.css +1 -1
- package/dist/plossy.core.min.css +1 -1
- package/dist/plossy.css +1 -1
- package/dist/plossy.esm.js +2 -2
- package/dist/plossy.js +2 -2
- package/dist/plossy.min.css +1 -1
- package/dist/plossy.min.js +2 -2
- package/dist/presets/editorial.css +1 -1
- package/dist/presets/editorial.min.css +1 -1
- package/dist/presets/elegant.css +1 -1
- package/dist/presets/elegant.min.css +1 -1
- package/dist/presets/flat.css +1 -1
- package/dist/presets/flat.min.css +1 -1
- package/dist/presets/glass.css +1 -1
- package/dist/presets/glass.min.css +1 -1
- package/dist/presets/paper.css +1 -1
- package/dist/presets/paper.min.css +1 -1
- package/dist/presets/pop.css +1 -1
- package/dist/presets/pop.min.css +1 -1
- package/dist/presets/round.css +1 -1
- package/dist/presets/round.min.css +1 -1
- package/dist/presets/tender.css +1 -1
- package/dist/presets/tender.min.css +1 -1
- package/dist/presets/toy.css +1 -1
- package/dist/presets/toy.min.css +1 -1
- package/package.json +2 -1
package/dist/plossy.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Plossy v0.5.
|
|
2
|
+
* Plossy v0.5.2 | MIT License
|
|
3
3
|
*
|
|
4
4
|
* Includes icons from Lucide (https://lucide.dev), some of them derived from Feather.
|
|
5
5
|
* Full third-party notices (also shipped as LICENSE-LUCIDE):
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
49
49
|
* SOFTWARE.
|
|
50
50
|
*/
|
|
51
|
-
(()=>{var Ji=Object.defineProperty;var Qi=(r,t,e)=>t in r?Ji(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var d=(r,t,e)=>Qi(r,typeof t!="symbol"?t+"":t,e);var ai={close:"Close",clear:"Clear",previous:"Previous",next:"Next",loading:"Loading","combobox.empty":"No results","combobox.loading":"Searching\u2026","combobox.create":"Add","combobox.options":"Options","combobox.remove":"Remove: {label}","combobox.minLength":{one:"Type at least {n} character to search",other:"Type at least {n} characters to search"},"combobox.error":"Couldn\u2019t load results","datepicker.dialog":"Choose a date","datepicker.prevMonth":"Previous month","datepicker.nextMonth":"Next month","datepicker.prevYear":"Previous year","datepicker.nextYear":"Next year","datepicker.prevYears":"Previous years","datepicker.nextYears":"Next years","datepicker.pickMonth":"Choose a month","datepicker.pickYear":"Choose a year","datepicker.today":"Today","datepicker.clear":"Clear","countdown.days":"days","countdown.hours":"hr","countdown.minutes":"min","countdown.seconds":"s","slider.carousel":"carousel","slider.slide":"slide","slider.position":"{n} of {count}","slider.previous":"Previous slide","slider.next":"Next slide","slider.goto":"Slide {n}","lightbox.label":"Gallery","lightbox.role":"gallery","lightbox.thumbs":"Thumbnails","lightbox.item":"Item {n}","lightbox.error":"Couldn\u2019t load the content.","lightbox.embed":"Embedded content","modal.ok":"OK","modal.cancel":"Cancel","modal.close":"Close","notification.close":"Close notification","offcanvas.label":"Side panel","totop.label":"Back to top","quantity.label":"Quantity","quantity.minus":"Decrease","quantity.plus":"Increase","rating.label":"Rating","otp.label":"One-time code","otp.char":"Character {n} of {count}","password.show":"Show password","password.hide":"Hide password","strength.levels":"Weak, Fair, Good, Strong","strength.meter":"Password strength","strength.empty":"No password","strength.met":"met","strength.unmet":"not met","strength.rule.length":{one:"At least {n} character",other:"At least {n} characters"},"strength.rule.case":"Lowercase and uppercase letter","strength.rule.digit":"At least one digit","strength.rule.symbol":"A special character (e.g. ! @ # ?)","validation.required":"This field is required.","validation.checkbox":"Check this box to continue.","validation.radio":"Choose one of the options.","validation.file":"Choose a file.","validation.select":"Choose an item from the list.","validation.email":"Enter a valid email address, e.g. jane@example.com.","validation.url":"Enter a valid URL, e.g. https://example.com.","validation.type":"Enter a value in the correct format.","validation.pattern":"Enter a value in the required format.","validation.minlength":{one:"Enter at least {n} character (currently {length}).",other:"Enter at least {n} characters (currently {length})."},"validation.maxlength":{one:"Enter at most {n} character (currently {length}).",other:"Enter at most {n} characters (currently {length})."},"validation.min":"The value can\u2019t be less than {min}.","validation.max":"The value can\u2019t be greater than {max}.","validation.step":"Enter a value that matches the allowed step.","validation.bad":"Enter a valid value.","upload.choose":"Choose files","upload.type":"The file \u201C{name}\u201D has a format that isn\u2019t allowed.","upload.size":"The file \u201C{name}\u201D is too large ({size}). The maximum size is {max} MB.","upload.count":{one:"You can add at most {n} file.",other:"You can add at most {n} files."},"upload.remove":"Remove file {name}","upload.progress":"Upload progress: {name}","upload.uploading":"Uploading\u2026 {percent}%","upload.done":"Uploaded","upload.failed":"Couldn\u2019t upload the file.","upload.failedStatus":"Couldn\u2019t upload the file (error {status}).","upload.failedNetwork":"Couldn\u2019t upload the file \u2014 check your connection.","sortable.help":"Press space to pick up an item. Use the arrow keys to move it, space or Enter to drop it, and Escape to cancel.","sortable.role":"sortable item","sortable.lifted":"Picked up: {label}. Position {n} of {count}. Use the arrow keys to move, space to drop, Escape to cancel.","sortable.moved":"Position {n} of {count}.","sortable.cancelled":"Cancelled. {label} returns to position {n} of {count}.","sortable.dropped":"Dropped: {label}. Position {n} of {count}."};var li={close:"Zamknij",clear:"Wyczy\u015B\u0107",previous:"Poprzedni",next:"Nast\u0119pny",loading:"Wczytywanie","combobox.empty":"Brak wynik\xF3w","combobox.loading":"Szukam\u2026","combobox.create":"Dodaj","combobox.options":"Opcje","combobox.remove":"Usu\u0144: {label}","combobox.minLength":"Wpisz co najmniej {n} zn., aby wyszuka\u0107","combobox.error":"Nie uda\u0142o si\u0119 pobra\u0107 wynik\xF3w","datepicker.dialog":"Wybierz dat\u0119","datepicker.prevMonth":"Poprzedni miesi\u0105c","datepicker.nextMonth":"Nast\u0119pny miesi\u0105c","datepicker.prevYear":"Poprzedni rok","datepicker.nextYear":"Nast\u0119pny rok","datepicker.prevYears":"Poprzednie lata","datepicker.nextYears":"Nast\u0119pne lata","datepicker.pickMonth":"Wybierz miesi\u0105c","datepicker.pickYear":"Wybierz rok","datepicker.today":"Dzi\u015B","datepicker.clear":"Wyczy\u015B\u0107","countdown.days":"dni","countdown.hours":"godz.","countdown.minutes":"min","countdown.seconds":"s","slider.carousel":"karuzela","slider.slide":"slajd","slider.position":"{n} z {count}","slider.previous":"Poprzedni slajd","slider.next":"Nast\u0119pny slajd","slider.goto":"Slajd {n}","lightbox.label":"Galeria","lightbox.role":"galeria","lightbox.thumbs":"Miniatury","lightbox.item":"Pozycja {n}","lightbox.error":"Nie uda\u0142o si\u0119 wczyta\u0107 zawarto\u015Bci.","lightbox.embed":"Osadzona tre\u015B\u0107","modal.ok":"OK","modal.cancel":"Anuluj","modal.close":"Zamknij","notification.close":"Zamknij powiadomienie","offcanvas.label":"Panel boczny","totop.label":"Wr\xF3\u0107 na g\xF3r\u0119 strony","quantity.label":"Ilo\u015B\u0107","quantity.minus":"Mniej","quantity.plus":"Wi\u0119cej","rating.label":"Ocena","otp.label":"Kod jednorazowy","otp.char":"Znak {n} z {count}","password.show":"Poka\u017C has\u0142o","password.hide":"Ukryj has\u0142o","strength.levels":"S\u0142abe, \u015Arednie, Dobre, Silne","strength.meter":"Si\u0142a has\u0142a","strength.empty":"Brak has\u0142a","strength.met":"spe\u0142nione","strength.unmet":"niespe\u0142nione","strength.rule.length":"Co najmniej {n} znak\xF3w","strength.rule.case":"Ma\u0142a i wielka litera","strength.rule.digit":"Co najmniej jedna cyfra","strength.rule.symbol":"Znak specjalny (np. ! @ # ?)","validation.required":"To pole jest wymagane.","validation.checkbox":"Zaznacz to pole, aby kontynuowa\u0107.","validation.radio":"Wybierz jedn\u0105 z opcji.","validation.file":"Wybierz plik.","validation.select":"Wybierz pozycj\u0119 z listy.","validation.email":"Podaj poprawny adres e-mail, np. jan@example.com.","validation.url":"Podaj poprawny adres URL, np. https://example.com.","validation.type":"Podaj warto\u015B\u0107 w poprawnym formacie.","validation.pattern":"Podaj warto\u015B\u0107 w wymaganym formacie.","validation.minlength":{one:"Wpisz co najmniej {n} znak (obecnie {length}).",few:"Wpisz co najmniej {n} znaki (obecnie {length}).",many:"Wpisz co najmniej {n} znak\xF3w (obecnie {length}).",other:"Wpisz co najmniej {n} znaku (obecnie {length})."},"validation.maxlength":{one:"Wpisz najwy\u017Cej {n} znak (obecnie {length}).",few:"Wpisz najwy\u017Cej {n} znaki (obecnie {length}).",many:"Wpisz najwy\u017Cej {n} znak\xF3w (obecnie {length}).",other:"Wpisz najwy\u017Cej {n} znaku (obecnie {length})."},"validation.min":"Warto\u015B\u0107 nie mo\u017Ce by\u0107 mniejsza ni\u017C {min}.","validation.max":"Warto\u015B\u0107 nie mo\u017Ce by\u0107 wi\u0119ksza ni\u017C {max}.","validation.step":"Podaj warto\u015B\u0107 zgodn\u0105 z dozwolonym krokiem.","validation.bad":"Podaj poprawn\u0105 warto\u015B\u0107.","upload.choose":"Wybierz pliki","upload.type":"Plik \u201E{name}\u201D ma niedozwolony format.","upload.size":"Plik \u201E{name}\u201D jest za du\u017Cy ({size}). Maksymalny rozmiar to {max} MB.","upload.count":{one:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} plik.",few:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} pliki.",many:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} plik\xF3w.",other:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} pliku."},"upload.remove":"Usu\u0144 plik {name}","upload.progress":"Post\u0119p przesy\u0142ania: {name}","upload.uploading":"Przesy\u0142anie\u2026 {percent}%","upload.done":"Przes\u0142ano","upload.failed":"Nie uda\u0142o si\u0119 przes\u0142a\u0107 pliku.","upload.failedStatus":"Nie uda\u0142o si\u0119 przes\u0142a\u0107 pliku (b\u0142\u0105d {status}).","upload.failedNetwork":"Nie uda\u0142o si\u0119 przes\u0142a\u0107 pliku \u2014 sprawd\u017A po\u0142\u0105czenie.","sortable.help":"Naci\u015Bnij spacj\u0119, aby podnie\u015B\u0107 element. Strza\u0142kami zmie\u0144 jego pozycj\u0119, spacj\u0105 lub Enterem upu\u015B\u0107, klawiszem Escape anuluj.","sortable.role":"element sortowalny","sortable.lifted":"Podniesiono: {label}. Pozycja {n} z {count}. Strza\u0142kami zmie\u0144 pozycj\u0119, spacj\u0105 upu\u015B\u0107, Escape anuluje.","sortable.moved":"Pozycja {n} z {count}.","sortable.cancelled":"Anulowano. {label} wraca na pozycj\u0119 {n} z {count}.","sortable.dropped":"Upuszczono: {label}. Pozycja {n} z {count}."};var ee=new Map,xt=new WeakMap,it=new WeakMap,wt=new WeakMap,se=0,Ie=0,di=typeof FinalizationRegistry=="function"?new FinalizationRegistry(()=>se--):null,ze=!1,te="",ui="data-pl-persist",Mt={autoDestroy:!0,locale:null},st={en:ai,pl:li};function q(r){return Mt.locale?String(Mt.locale):(r?.closest?.("[lang]")||document.documentElement).getAttribute("lang")||"en"}function ts(r){let t=q(r).toLowerCase();if(st[t])return t;let e=t.split("-")[0];return st[e]?e:"en"}function y(r,t={},e=null){let i=ts(e),s=st[i][r]??st.en[r]??r;if(typeof s=="object"){let o=new Intl.PluralRules(i).select(Number(t.n)||0);s=s[o]??s.other}return String(s).replace(/\{(\w+)\}/g,(o,n)=>n in t?String(t[n]):o)}function es(r,t){let e=String(r).toLowerCase();st[e]={...st[e]||{},...t}}var O={},E=(r,t=document)=>typeof r=="string"?t.querySelector(r):r||null,T=(r,t=document)=>typeof r=="string"?[...t.querySelectorAll(r)]:r?r instanceof Element?[r]:[...r]:[],is=0,k=(r="pl")=>`${r}-${(++is).toString(36)}${Math.random().toString(36).slice(2,6)}`,$=(r,t,e)=>Math.min(Math.max(r,t),e),fi=r=>r.replace(/-([a-z0-9])/g,(t,e)=>e.toUpperCase()),S=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function C(r,t){if(!t)return[];if(t instanceof Element)return[t];if(t=String(t).trim(),t==="next")return r.nextElementSibling?[r.nextElementSibling]:[];if(t==="prev")return r.previousElementSibling?[r.previousElementSibling]:[];if(t==="parent")return r.parentElement?[r.parentElement]:[];if(t.startsWith(">"))return[...r.querySelectorAll(`:scope ${t}`)];try{return[...document.querySelectorAll(t)]}catch{return[]}}function pt(r){return T('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',r).filter(t=>t.offsetParent!==null||t.getClientRects().length)}function hi(r){return r=r.trim(),r==="true"?!0:r==="false"?!1:r==="null"?null:r!==""&&!Number.isNaN(Number(r))?Number(r):r.replace(/^(['"])(.*)\1$/,"$2")}function oe(r,t={},e=null){let i={};if(!r||!(r=r.trim()))return i;if(r.startsWith("{"))try{return JSON.parse(r)}catch{return i}let s=r.split(";");for(let o=0;o<s.length;o++){let n=s[o],a=n.indexOf(":"),l=a>0?fi(n.slice(0,a).trim()):null;l&&l in t?i[l]=hi(n.slice(a+1)):o===0&&e&&(i[e]=hi(s.length===1?r:n))}return i}var vt=class vt{constructor(t,e={}){let i=this.constructor.componentName;this.el=t,it.set(this,{options:e,declarative:t.hasAttribute(`data-pl-${i}`),destroyed:!1});let s=this.destroy;Object.defineProperty(this,"destroy",{configurable:!0,writable:!0,value:()=>{let o=it.get(this);if(bi(this),!o.destroyed){o.destroyed=!0;try{s.call(this)}finally{vt.prototype.destroy.call(this)}}}}),mi(this)}init(){}get signal(){return this._life.signal}on(t,e,i,s){if(!t||it.get(this)?.destroyed)return()=>{};t.addEventListener(e,i,s);let o=()=>t.removeEventListener(e,i,s);return this._cleanup.push(o),o}onDestroy(t){it.get(this)?.destroyed?t():this._cleanup.push(t)}emit(t,e={},i=!1){let s=new CustomEvent(`pl:${t}`,{bubbles:!0,cancelable:i,detail:{...e,component:this}});return this.el.dispatchEvent(s),!s.defaultPrevented}destroy(){let t=it.get(this);t&&(t.destroyed=!0),this._life?.abort();let e=this.constructor.componentName;for(let s of this._cleanup.splice(0))try{s()}catch(o){console.error(`[Plossy] ${e}:`,o)}let i=xt.get(this.el);i?.get(e)===this&&(i.delete(e),Ie--)}};d(vt,"defaults",{}),d(vt,"primary",null);var x=vt;function mi(r){let t=r.constructor,e=r.el,i=it.get(r);r.options={...t.defaults,...oe(e.getAttribute(`data-pl-${t.componentName}`),t.defaults,t.primary),...i.options},r._cleanup=[],r._life=new AbortController,i.destroyed=!1;let s=xt.get(e);s||xt.set(e,s=new Map),s.has(t.componentName)||Ie++,s.set(t.componentName,r);let{signal:o}=r._life,n;try{n=r.init()}catch(a){throw ci(r),a}n&&typeof n.then=="function"&&n.then(null,a=>{console.error(`[Plossy] ${t.componentName}:`,a),o.aborted||ci(r)})}function ci(r){try{r.destroy()}catch(t){console.error(`[Plossy] ${r.constructor.componentName}:`,t)}}function H(r,t){return xt.get(r)?.get(t)||null}function gi(r,t,e){return H(r,t)||yi(r,t)||new(ee.get(t))(r,e)}function ss(r){let t=r.el,e=wt.get(t);e||(wt.set(t,e=new Map),se++,di?.register(t,null,e)),e.set(r.constructor.componentName,r)}function bi(r){let t=wt.get(r.el),e=r.constructor.componentName;t?.get(e)===r&&(t.delete(e),t.size||(wt.delete(r.el),se--,di?.unregister(t)))}function yi(r,t){let e=wt.get(r);if(!e)return null;let i=null;for(let[s,o]of[...e])if(!(t&&s!==t)&&(bi(o),!(H(r,s)||it.get(o).declarative&&!r.hasAttribute(`data-pl-${s}`))))try{mi(o),i=o}catch(n){console.error(`[Plossy] ${s}:`,n)}return i}var vi=r=>r instanceof Element?[r,...r.querySelectorAll("*")]:[...r.querySelectorAll("*")];function os(r){if(!(!Ie||r.isConnected))for(let t of vi(r).reverse()){let e=xt.get(t);if(!(!e||t.isConnected||t.closest(`[${ui}]`))){for(let[i,s]of[...e])if(e.get(i)===s){try{s.destroy()}catch(o){console.error(`[Plossy] ${i}:`,o)}ss(s)}}}}var ie=new Set,Ne=0;function ns(){Ne=0;let r=[...ie];ie.clear(),Mt.autoDestroy&&r.forEach(os)}function v(r,t){t.componentName=r,ee.set(r,t),te=[...ee.keys()].map(i=>`[data-pl-${i}]`).join(",");let e=fi(r);return O[e]||(O[e]=(i,s)=>{let o=E(i);return o?gi(o,r,s):null}),ze&&ct(document),t}function ct(r=document){if(se&&vi(r).forEach(e=>yi(e)),!te)return;let t=[...r.querySelectorAll(te)];r instanceof Element&&r.matches(te)&&t.unshift(r);for(let e of t)for(let i of ee.keys())if(e.hasAttribute(`data-pl-${i}`)&&!H(e,i))try{gi(e,i)}catch(s){console.error(`[Plossy] ${i}:`,s)}}function xi(){if(ze||typeof document>"u")return;ze=!0;let r=()=>{ct(document),new MutationObserver(t=>{for(let e of t){if(Mt.autoDestroy&&!e.target.closest?.(`[${ui}]`))for(let i of e.removedNodes)i.nodeType===1&&ie.add(i);for(let i of e.addedNodes)i.nodeType===1&&i.isConnected&&ct(i)}ie.size&&!Ne&&(Ne=setTimeout(ns))}).observe(document.documentElement,{childList:!0,subtree:!0})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r,{once:!0}):r()}function D(r){return Promise.allSettled(r.getAnimations().map(t=>t.finished))}async function Pe(r,t){r.classList.add(t),await D(r),r.classList.remove(t)}var Qt=new WeakMap;function J(r,t,{duration:e=360,easing:i="cubic-bezier(0.33, 0.5, 0.2, 1)"}={}){let s=Qt.get(r),o=s?getComputedStyle(r):null,n=o?{height:o.height,paddingTop:o.paddingTop,paddingBottom:o.paddingBottom,opacity:o.opacity}:null;s?.cancel();let a={height:"0px",paddingTop:"0px",paddingBottom:"0px",opacity:0};t&&(r.hidden=!1);let l=getComputedStyle(r),h={height:`${r.offsetHeight}px`,paddingTop:l.paddingTop,paddingBottom:l.paddingBottom,opacity:1};if(S()||!e)return r.hidden=!t,Qt.delete(r),Promise.resolve();let c=t?[n||a,h]:[n||h,a];r.style.overflow="hidden";let p=r.animate(c,{duration:e,easing:i});return Qt.set(r,p),p.finished.then(()=>{t||(r.hidden=!0),r.style.overflow="",Qt.delete(r)}).catch(()=>{})}function B(r){if(r.hidden=!1,typeof r.showPopover=="function"){r.hasAttribute("popover")||r.setAttribute("popover","manual");try{r.matches(":popover-open")||r.showPopover()}catch{}}}function P(r){try{r.hasAttribute("popover")&&r.matches(":popover-open")&&r.hidePopover()}catch{}r.hidden=!0}var pi={top:"bottom",bottom:"top",left:"right",right:"left"};function kt(r,t,e={}){let{placement:i="bottom",offset:s=8,flip:o=!0,shift:n=!0,padding:a=8,matchWidth:l=!1}=e,h=t instanceof Element?t.getBoundingClientRect():t;l&&(r.style.minWidth=`${h.width}px`);let c=r.offsetWidth,p=r.offsetHeight,m=document.documentElement.clientWidth,b=window.innerHeight,[f,u="center"]=i.split("-"),g={top:h.top-p-s-a,bottom:b-h.bottom-p-s-a,left:h.left-c-s-a,right:m-h.right-c-s-a};o&&g[f]<0&&g[pi[f]]>g[f]&&(f=pi[f]);let w=f==="top"||f==="bottom",A,M;return w?(M=f==="top"?h.top-p-s:h.bottom+s,A=u==="start"?h.left:u==="end"?h.right-c:h.left+(h.width-c)/2,n&&(A=$(A,a,Math.max(a,m-c-a)))):(A=f==="left"?h.left-c-s:h.right+s,M=u==="start"?h.top:u==="end"?h.bottom-p:h.top+(h.height-p)/2,n&&(M=$(M,a,Math.max(a,b-p-a)))),r.style.left=`${Math.round(A)}px`,r.style.top=`${Math.round(M)}px`,r.dataset.plPlacement=u==="center"?f:`${f}-${u}`,r.style.setProperty("--pl-arrow-x",`${Math.round(h.left+h.width/2-A)}px`),r.style.setProperty("--pl-arrow-y",`${Math.round(h.top+h.height/2-M)}px`),f}function Q(r,t,e={}){let i=0,s=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(()=>kt(r,t,e))};kt(r,t,e),window.addEventListener("scroll",s,{capture:!0,passive:!0}),window.addEventListener("resize",s,{passive:!0});let o=typeof ResizeObserver=="function"?new ResizeObserver(s):null;return o?.observe(r),()=>{cancelAnimationFrame(i),window.removeEventListener("scroll",s,{capture:!0}),window.removeEventListener("resize",s),o?.disconnect()}}var He=0;function At(){if(He++>0)return;let r=document.documentElement;r.style.setProperty("--pl-scrollbar-w",`${window.innerWidth-r.clientWidth}px`),r.classList.add("pl-scroll-lock")}function dt(){if(He===0||--He>0)return;let r=document.documentElement;r.classList.remove("pl-scroll-lock"),r.style.removeProperty("--pl-scrollbar-w")}function z(r){let t=0;return(...e)=>{t||(t=requestAnimationFrame(()=>{t=0,r(...e)}))}}function Be(r,t=150){let e;return(...i)=>{clearTimeout(e),e=setTimeout(()=>r(...i),t)}}Object.assign(O,{register:v,scan:ct,getInstance:H,config:Mt,addLocale:es,locales:st,Component:x,util:{$:E,$$:T,uid:k,clamp:$,parseOptions:oe,t:y,langOf:q,queryTargets:C,focusables:pt,animationsDone:D,animateClass:Pe,toggleHeight:J,showLayer:B,hideLayer:P,place:kt,autoPlace:Q,lockScroll:At,unlockScroll:dt,rafThrottle:z,debounce:Be,prefersReducedMotion:S}});var ne=class extends x{init(){this.items.forEach((t,e)=>{let{title:i,content:s}=this.parts(t);if(!i||!s)return;let o=t.classList.contains("pl-open")||this.options.active===e;t.classList.toggle("pl-open",o),s.hidden=!o,s.id||(s.id=k("pl-accordion")),i.id||(i.id=k("pl-accordion-title")),i.setAttribute("aria-controls",s.id),i.setAttribute("aria-expanded",String(o)),s.setAttribute("role","region"),s.setAttribute("aria-labelledby",i.id),i.matches("button, a[href]")||(i.setAttribute("role","button"),i.tabIndex=0)}),this.on(this.el,"click",t=>{let i=t.target.closest(".pl-accordion-title")?.closest(".pl-accordion-item");!i||i.parentElement!==this.el||(t.preventDefault(),this.toggle(i))}),this.on(this.el,"keydown",t=>{let e=t.target.closest(".pl-accordion-title");if(!e||e.closest(".pl-accordion-item")?.parentElement!==this.el)return;let i=this.items.map(n=>this.parts(n).title).filter(Boolean),s=i.indexOf(e),o={ArrowDown:s+1,ArrowUp:s-1,Home:0,End:i.length-1}[t.key];o!==void 0?(t.preventDefault(),i[(o+i.length)%i.length].focus()):(t.key==="Enter"||t.key===" ")&&!e.matches("button, a[href]")&&(t.preventDefault(),this.toggle(e.closest(".pl-accordion-item")))})}get items(){return T(":scope > .pl-accordion-item",this.el)}parts(t){return{title:t.querySelector(":scope > .pl-accordion-title"),content:t.querySelector(":scope > .pl-accordion-content")}}resolve(t){return typeof t=="number"?this.items[t]:t}toggle(t){if(t=this.resolve(t),!!t)return t.classList.contains("pl-open")?this.hide(t):this.show(t)}async show(t){if(t=this.resolve(t),!t||t.classList.contains("pl-open")||!this.emit("beforeshow",{item:t},!0))return;this.options.multiple||this.items.filter(o=>o!==t&&o.classList.contains("pl-open")).forEach(o=>this.hide(o,!0));let{title:e,content:i}=this.parts(t);t.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),this.emit("show",{item:t});let{signal:s}=this;await J(i,!0,{duration:this.options.duration}),s.aborted||this.emit("shown",{item:t})}async hide(t,e=!1){if(t=this.resolve(t),!t||!t.classList.contains("pl-open"))return;let i=this.items.filter(a=>a.classList.contains("pl-open")).length;if(!e&&!this.options.collapsible&&i<=1||!this.emit("beforehide",{item:t},!0))return;let{title:s,content:o}=this.parts(t);t.classList.remove("pl-open"),s.setAttribute("aria-expanded","false"),this.emit("hide",{item:t});let{signal:n}=this;await J(o,!1,{duration:this.options.duration}),n.aborted||this.emit("hidden",{item:t})}};d(ne,"defaults",{multiple:!1,collapsible:!0,active:null,duration:380});v("accordion",ne);var re=class extends x{init(){if(this.closing=!1,this.timer=null,!this.el.hasAttribute("role")){let t=this.el.matches(".pl-alert-danger, .pl-alert-warning");this.el.setAttribute("role",t?"alert":"status")}this.on(this.el,"click",t=>{let e=t.target.closest(this.options.selClose);!e||e.closest("[data-pl-alert]")!==this.el||(t.preventDefault(),this.close())}),this.options.timeout>0&&(this.start(),this.on(this.el,"pointerenter",()=>this.stop()),this.on(this.el,"pointerleave",()=>this.start()),this.on(this.el,"focusin",()=>this.stop()),this.on(this.el,"focusout",()=>this.start())),this.onDestroy(()=>{this.stop(),this.animation?.cancel(),this.animation=null,this.el.classList.remove("pl-alert-leave"),this.el.style.overflow=""})}start(){this.stop(),this.options.timeout>0&&!this.closing&&(this.timer=setTimeout(()=>this.close(),this.options.timeout))}stop(){clearTimeout(this.timer),this.timer=null}async close(){if(this.signal.aborted||this.closing||this.el.hidden||!this.emit("beforehide",{},!0))return;this.closing=!0,this.stop(),this.emit("hide");let{el:t,signal:e}=this,i=S()?0:this.options.duration;if(i&&typeof t.animate=="function"){let s=getComputedStyle(t);t.classList.add("pl-alert-leave"),t.style.overflow="hidden";let o={height:`${t.offsetHeight}px`,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom,marginTop:s.marginTop,marginBottom:s.marginBottom,borderTopWidth:s.borderTopWidth,borderBottomWidth:s.borderBottomWidth,opacity:1,transform:"scale(1)"},n={...o,opacity:0,transform:"scale(0.97)",offset:.45},a={height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px",borderTopWidth:"0px",borderBottomWidth:"0px",opacity:0,transform:"scale(0.97)"};this.animation=t.animate([o,n,a],{duration:i,easing:"cubic-bezier(0.33, 0.5, 0.2, 1)"});try{await this.animation.finished}catch{}if(e.aborted)return;this.animation=null}if(t.hidden=!0,t.classList.remove("pl-alert-leave"),t.style.overflow="",this.closing=!1,this.emit("hidden"),this.options.remove){let s=t.parentNode;this.destroy(),s?.removeChild(t)}}hide(){return this.close()}};d(re,"defaults",{duration:320,timeout:0,remove:!0,selClose:".pl-alert-close"});v("alert",re);var wi=[["days",86400],["hours",3600],["minutes",60],["seconds",1]],Lt=class extends x{init(){this.timer=null,this.target=0,this.remaining=0,this.ended=!1,this.values={},this.cells={};for(let[t]of wi){let e=E(`.pl-countdown-${t}`,this.el);e&&(this.cells[t]=e)}this.el.hasAttribute("role")||this.el.setAttribute("role","timer"),Object.values(this.cells).forEach(t=>t.setAttribute("aria-hidden","true")),this.sr=document.createElement("span"),this.sr.className="pl-countdown-sr",this.sr.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",this.el.append(this.sr),this.onDestroy(()=>{this.stop(),this.sr.remove()}),this.on(document,"visibilitychange",()=>{!document.hidden&&this.timer&&this.tick()}),this.reset(!1),this.options.autostart&&this.start()}resolveTarget(){let{date:t,seconds:e}=this.options;if(t!==""&&t!==null&&t!==void 0){let i=typeof t=="number"?t:Date.parse(t);if(!Number.isNaN(i))return i;console.warn(`[Plossy] countdown: invalid date "${t}"`)}return Date.now()+Math.max(0,Number(e)||0)*1e3}get running(){return this.timer!==null}start(){this.running||this.ended||(this.relative&&(this.target=Date.now()+this.remaining),this.el.classList.add("pl-countdown-running"),this.timer=0,this.tick())}stop(){this.timer!==null&&(clearTimeout(this.timer),this.timer=null,this.remaining=Math.max(0,this.target-Date.now()),this.el.classList.remove("pl-countdown-running"))}reset(t){let e=this.running;this.stop(),t&&typeof t=="object"&&("seconds"in t&&!("date"in t)&&(this.options.date=""),Object.assign(this.options,t));let{date:i}=this.options;this.relative=i===""||i===null||i===void 0||Number.isNaN(typeof i=="number"?i:Date.parse(i)),this.target=this.resolveTarget(),this.remaining=Math.max(0,this.target-Date.now()),this.total=this.remaining,this.ended=!1,this.el.classList.remove("pl-countdown-ended","pl-countdown-finish"),this.render(this.remaining,!1),(e||t&&typeof t=="object"&&this.options.autostart)&&this.start()}tick(){clearTimeout(this.timer);let t=this.target-Date.now();if(this.render(Math.max(0,t)),t<=0){this.timer=null,this.el.classList.remove("pl-countdown-running"),this.ended=!0,this.remaining=0,this.el.classList.add("pl-countdown-ended","pl-countdown-finish"),this.emit("end"),this.options.reload&&this.relative&&this.options.seconds>0&&(this.reset(),this.start());return}this.timer=setTimeout(()=>this.tick(),t%1e3+20)}split(t){let e=Math.ceil(t/1e3),i={};for(let[s,o]of wi)this.cells[s]&&(i[s]=Math.floor(e/o),e-=i[s]*o);return i}render(t,e=!0){let i=this.split(t),s=!1;for(let[n,a]of Object.entries(i))this.values[n]!==a&&(s=!0,this.values[n]=a,this.renderCell(this.cells[n],String(a).padStart(this.options.pad,"0"),e));if(!s)return;this.el.style.setProperty("--pl-countdown-progress",this.total?String(1-t/this.total):"0");let o=Object.entries(i).filter(([n])=>n!=="seconds"||Object.keys(i).length===1).map(([n,a])=>`${a} ${y(`countdown.${n}`,{},this.el)}`).join(" ");o!==this.srKey&&(this.srKey=o,this.sr.textContent=o),e&&this.emit("tick",{...i,remaining:t})}renderCell(t,e,i){let s=[...t.querySelectorAll(":scope > .pl-countdown-digit")];s.length!==e.length&&(t.textContent="",s=[...e].map(()=>{let o=document.createElement("span");return o.className="pl-countdown-digit",t.append(o),o}),i=!1),s.forEach((o,n)=>{let a=e[n],l=o.dataset.value;if(l===a)return;o.dataset.value=a;let h=document.createElement("span");if(h.textContent=a,i&&l!==void 0){h.className="pl-countdown-digit-in";let c=document.createElement("span");c.className="pl-countdown-digit-out",c.textContent=l,c.addEventListener("animationend",()=>c.remove(),{once:!0}),setTimeout(()=>c.remove(),700),o.replaceChildren(h,c)}else o.replaceChildren(h)})}};d(Lt,"defaults",{date:"",seconds:0,autostart:!0,pad:2,reload:!1}),d(Lt,"primary","date");v("countdown",Lt);var W={"arrow-down":'<path d="M12 5v14" /><path d="m19 12-7 7-7-7" />',"arrow-left":'<path d="m12 19-7-7 7-7" /><path d="M19 12H5" />',"arrow-right":'<path d="M5 12h14" /><path d="m12 5 7 7-7 7" />',"arrow-up":'<path d="m5 12 7-7 7 7" /><path d="M12 19V5" />',"arrow-up-right":'<path d="M7 7h10v10" /><path d="M7 17 17 7" />',"arrow-down-left":'<path d="M17 7 7 17" /><path d="M17 17H7V7" />',"chevron-down":'<path d="m6 9 6 6 6-6" />',"chevron-left":'<path d="m15 18-6-6 6-6" />',"chevron-right":'<path d="m9 18 6-6-6-6" />',"chevron-up":'<path d="m18 15-6-6-6 6" />',"chevrons-left":'<path d="m11 17-5-5 5-5" /><path d="m18 17-5-5 5-5" />',"chevrons-right":'<path d="m6 17 5-5-5-5" /><path d="m13 17 5-5-5-5" />',"chevrons-up-down":'<path d="m7 15 5 5 5-5" /><path d="m7 9 5-5 5 5" />',check:'<path d="M20 6 9 17l-5-5" />',"check-check":'<path d="M18 6 7 17l-5-5" /><path d="m22 10-7.5 7.5L13 16" />',x:'<path d="M18 6 6 18" /><path d="m6 6 12 12" />',plus:'<path d="M5 12h14" /><path d="M12 5v14" />',minus:'<path d="M5 12h14" />',"circle-check":'<circle cx="12" cy="12" r="10" /><path d="m16 9-5.5 5.5L8 12" />',"circle-x":'<circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" />',"circle-alert":'<circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" />',"circle-help":'<circle cx="12" cy="12" r="10" /><path d="M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5" /><path d="M12 17h.01" />',"circle-plus":'<circle cx="12" cy="12" r="10" /><path d="M8 12h8" /><path d="M12 8v8" />',"circle-minus":'<circle cx="12" cy="12" r="10" /><path d="M8 12h8" />',info:'<circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" />',"triangle-alert":'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /><path d="M12 9v4" /><path d="M12 17h.01" />',"octagon-alert":'<path d="M12 16h.01" /><path d="M12 8v4" /><path d="M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z" />',ban:'<circle cx="12" cy="12" r="10" /><path d="M4.929 4.929 19.07 19.071" />',search:'<path d="m21 21-4.34-4.34" /><circle cx="11" cy="11" r="8" />',menu:'<path d="M4 5h16" /><path d="M4 12h16" /><path d="M4 19h16" />',ellipsis:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',"ellipsis-vertical":'<circle cx="12" cy="12" r="1" /><circle cx="12" cy="5" r="1" /><circle cx="12" cy="19" r="1" />',"grip-vertical":'<circle cx="9" cy="12" r="1" /><circle cx="9" cy="5" r="1" /><circle cx="9" cy="19" r="1" /><circle cx="15" cy="12" r="1" /><circle cx="15" cy="5" r="1" /><circle cx="15" cy="19" r="1" />',"grip-horizontal":'<circle cx="12" cy="9" r="1" /><circle cx="19" cy="9" r="1" /><circle cx="5" cy="9" r="1" /><circle cx="12" cy="15" r="1" /><circle cx="19" cy="15" r="1" /><circle cx="5" cy="15" r="1" />',settings:'<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /><circle cx="12" cy="12" r="3" />',"sliders-horizontal":'<path d="M10 5H3" /><path d="M12 19H3" /><path d="M14 3v4" /><path d="M16 17v4" /><path d="M21 12h-9" /><path d="M21 19h-5" /><path d="M21 5h-7" /><path d="M8 10v4" /><path d="M8 12H3" />',filter:'<path d="M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" />',home:'<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />',user:'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',users:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><path d="M16 3.128a4 4 0 0 1 0 7.744" /><path d="M22 21v-2a4 4 0 0 0-3-3.87" /><circle cx="9" cy="7" r="4" />',"user-plus":'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><line x1="19" x2="19" y1="8" y2="14" /><line x1="22" x2="16" y1="11" y2="11" />',"user-round":'<circle cx="12" cy="8" r="5" /><path d="M20 21a8 8 0 0 0-16 0" />',"log-in":'<path d="m10 17 5-5-5-5" /><path d="M15 12H3" /><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />',"log-out":'<path d="m16 17 5-5-5-5" /><path d="M21 12H9" /><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />',lock:'<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',"lock-open":'<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" />',key:'<path d="m2 21 9.6-9.6" /><path d="m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19" /><circle cx="15.5" cy="7.5" r="5.5" />',shield:'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />',"shield-check":'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /><path d="m9 12 2 2 4-4" />',mail:'<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" /><rect x="2" y="4" width="20" height="16" rx="2" />',phone:'<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />',"message-circle":'<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />',"message-square":'<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />',send:'<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" /><path d="m21.854 2.147-10.94 10.939" />',bell:'<path d="M10.268 21a2 2 0 0 0 3.464 0" /><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" />',"bell-off":'<path d="M10.268 21a2 2 0 0 0 3.464 0" /><path d="M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742" /><path d="m2 2 20 20" /><path d="M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05" />',"at-sign":'<circle cx="12" cy="12" r="4" /><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8" />',heart:'<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" />',star:'<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" />',bookmark:'<path d="M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z" />',"thumbs-up":'<path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" /><path d="M7 10v12" />',"thumbs-down":'<path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" /><path d="M17 14V2" />',smile:'<path d="M15 10V9" /><path d="M16.472 15a6 6 0 01-8.943 0" /><path d="M9 10V9" /><circle cx="12" cy="12" r="10" />',flag:'<path d="M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528" />',tag:'<path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" /><circle cx="7.5" cy="7.5" r=".5" fill="currentColor" />',hash:'<line x1="4" x2="20" y1="9" y2="9" /><line x1="4" x2="20" y1="15" y2="15" /><line x1="10" x2="8" y1="3" y2="21" /><line x1="16" x2="14" y1="3" y2="21" />',calendar:'<path d="M8 2v3" /><path d="M16 2v3" /><rect x="3" y="3" width="18" height="18" rx="2" /><path d="M3 9h18" />',clock:'<circle cx="12" cy="12" r="10" /><path d="M12 6v6l4 2" />',timer:'<line x1="10" x2="14" y1="2" y2="2" /><line x1="12" x2="15" y1="14" y2="11" /><circle cx="12" cy="14" r="8" />',history:'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" /><path d="M12 7v5l4 2" />',file:'<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /><path d="M14 2v5a1 1 0 0 0 1 1h5" />',"file-text":'<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /><path d="M14 2v5a1 1 0 0 0 1 1h5" /><path d="M10 9H8" /><path d="M16 13H8" /><path d="M16 17H8" />',files:'<path d="M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" /><path d="M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z" /><path d="M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" />',folder:'<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />',"folder-open":'<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />',image:'<rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />',images:'<path d="m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16" /><path d="M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2" /><circle cx="13" cy="7" r="1" fill="currentColor" /><rect x="8" y="2" width="14" height="14" rx="2" />',camera:'<path d="M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" /><circle cx="12" cy="13" r="3" />',video:'<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /><rect x="2" y="6" width="14" height="12" rx="2" />',film:'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M7 3v18" /><path d="M3 7.5h4" /><path d="M3 12h18" /><path d="M3 16.5h4" /><path d="M17 3v18" /><path d="M17 7.5h4" /><path d="M17 16.5h4" />',music:'<path d="M21 16V3a1 1 0 0 0-1.28-.96l-10 2.917a1 1 0 0 0-.72.96V19" /><circle cx="18" cy="16" r="3" /><circle cx="6" cy="19" r="3" />',download:'<path d="M12 15V3" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><path d="m7 10 5 5 5-5" />',upload:'<path d="M12 3v12" /><path d="m17 8-5-5-5 5" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />',cloud:'<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />',"cloud-upload":'<path d="M12 13v8" /><path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" /><path d="m8 17 4-4 4 4" />',"cloud-download":'<path d="M12 13v8l-4-4" /><path d="m12 21 4-4" /><path d="M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284" />',share:'<path d="M12 2v13" /><path d="m16 6-4-4-4 4" /><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />',"share-2":'<circle cx="18" cy="5" r="3" /><circle cx="6" cy="12" r="3" /><circle cx="18" cy="19" r="3" /><line x1="8.59" x2="15.42" y1="13.51" y2="17.49" /><line x1="15.41" x2="8.59" y1="6.51" y2="10.49" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"link-2":'<path d="M9 17H7A5 5 0 0 1 7 7h2" /><path d="M15 7h2a5 5 0 1 1 0 10h-2" /><line x1="8" x2="16" y1="12" y2="12" />',"external-link":'<path d="M15 3h6v6" /><path d="M10 14 21 3" /><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />',paperclip:'<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" />',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />',clipboard:'<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />',"clipboard-check":'<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /><path d="m9 14 2 2 4-4" />',pencil:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" />',"pen-line":'<path d="M13 21h8" /><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />',trash:'<path d="M10 11v6" /><path d="M14 11v6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /><path d="M3 6h18" /><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />',"trash-2":'<path d="M10 11v6" /><path d="M14 11v6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /><path d="M3 6h18" /><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />',save:'<path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" /><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" /><path d="M7 3v4a1 1 0 0 0 1 1h7" />',"refresh-cw":'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" />',"rotate-cw":'<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" />',"rotate-ccw":'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" />',eye:'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /><circle cx="12" cy="12" r="3" />',"eye-off":'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" /><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" /><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" /><path d="m2 2 20 20" />',maximize:'<path d="M8 3H5a2 2 0 0 0-2 2v3" /><path d="M21 8V5a2 2 0 0 0-2-2h-3" /><path d="M3 16v3a2 2 0 0 0 2 2h3" /><path d="M16 21h3a2 2 0 0 0 2-2v-3" />',minimize:'<path d="M8 3v3a2 2 0 0 1-2 2H3" /><path d="M21 8h-3a2 2 0 0 1-2-2V3" /><path d="M3 16h3a2 2 0 0 1 2 2v3" /><path d="M16 21v-3a2 2 0 0 1 2-2h3" />',"maximize-2":'<path d="M15 3h6v6" /><path d="m21 3-7 7" /><path d="m3 21 7-7" /><path d="M9 21H3v-6" />',"minimize-2":'<path d="m14 10 7-7" /><path d="M20 10h-6V4" /><path d="m3 21 7-7" /><path d="M4 14h6v6" />',expand:'<path d="m15 15 6 6" /><path d="m15 9 6-6" /><path d="M21 16v5h-5" /><path d="M21 8V3h-5" /><path d="M3 16v5h5" /><path d="m3 21 6-6" /><path d="M3 8V3h5" /><path d="M9 9 3 3" />',shrink:'<path d="m15 15 6 6m-6-6v4.8m0-4.8h4.8" /><path d="M9 19.8V15m0 0H4.2M9 15l-6 6" /><path d="M15 4.2V9m0 0h4.8M15 9l6-6" /><path d="M9 4.2V9m0 0H4.2M9 9 3 3" />',"zoom-in":'<circle cx="11" cy="11" r="8" /><line x1="21" x2="16.65" y1="21" y2="16.65" /><line x1="11" x2="11" y1="8" y2="14" /><line x1="8" x2="14" y1="11" y2="11" />',"zoom-out":'<circle cx="11" cy="11" r="8" /><line x1="21" x2="16.65" y1="21" y2="16.65" /><line x1="8" x2="14" y1="11" y2="11" />',move:'<path d="M12 2v20" /><path d="m15 19-3 3-3-3" /><path d="m19 9 3 3-3 3" /><path d="M2 12h20" /><path d="m5 9-3 3 3 3" /><path d="m9 5 3-3 3 3" />',play:'<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" />',pause:'<rect x="14" y="3" width="5" height="18" rx="1" /><rect x="5" y="3" width="5" height="18" rx="1" />',square:'<rect width="18" height="18" x="3" y="3" rx="2" />',"skip-back":'<path d="M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z" /><path d="M3 20V4" />',"skip-forward":'<path d="M21 4v16" /><path d="M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z" />',"volume-2":'<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" /><path d="M16 9a5 5 0 0 1 0 6" /><path d="M19.364 18.364a9 9 0 0 0 0-12.728" />',"volume-x":'<path d="M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z" /><path d="m16.5 14.5 5-5" /><path d="m16.5 9.5 5 5" />',mic:'<path d="M12 19v3" /><path d="M19 10v2a7 7 0 0 1-14 0v-2" /><rect x="9" y="2" width="6" height="13" rx="3" />',sun:'<circle cx="12" cy="12" r="4" /><path d="M12 2v2" /><path d="M12 20v2" /><path d="m4.93 4.93 1.41 1.41" /><path d="m17.66 17.66 1.41 1.41" /><path d="M2 12h2" /><path d="M20 12h2" /><path d="m6.34 17.66-1.41 1.41" /><path d="m19.07 4.93-1.41 1.41" />',moon:'<path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" />',monitor:'<rect width="20" height="14" x="2" y="3" rx="2" /><line x1="8" x2="16" y1="21" y2="21" /><line x1="12" x2="12" y1="17" y2="21" />',smartphone:'<rect width="14" height="20" x="5" y="2" rx="2" ry="2" /><path d="M12 18h.01" />',laptop:'<path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z" /><path d="M20.054 15.987H3.946" />',palette:'<path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" /><circle cx="13.5" cy="6.5" r=".5" fill="currentColor" /><circle cx="17.5" cy="10.5" r=".5" fill="currentColor" /><circle cx="6.5" cy="12.5" r=".5" fill="currentColor" /><circle cx="8.5" cy="7.5" r=".5" fill="currentColor" />',sparkles:'<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /><path d="M20 2v4" /><path d="M22 4h-4" /><circle cx="4" cy="20" r="2" />',"wand-sparkles":'<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72" /><path d="m14 7 3 3" /><path d="M5 6v4" /><path d="M19 14v4" /><path d="M10 2v2" /><path d="M7 8H3" /><path d="M21 16h-4" /><path d="M11 3H9" />',zap:'<path d="M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z" />',flame:'<path d="M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" />',droplet:'<path d="M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z" />',leaf:'<path d="M11 20a10 10 0 0010-10 25.9 25.9 0 00-1.04-7.281 1 1 0 00-1.755-.325C15.833 5.5 13 5.5 9.8 6.1A7 7 0 0011 20" /><path d="M2 21a5 5 0 012.911-4.544C7.613 15.212 8.351 15.24 11 13" />',"shopping-cart":'<path d="m2.05 2.05 1.099-.028a1 1 0 0 1 1.008.815l2.69 14.347A1 1 0 0 0 7.83 18H18" /><path d="M4.563 5h16.435a1 1 0 0 1 .981 1.204l-1.026 6.226A2 2 0 0 1 18.962 14H6.25" /><circle cx="18" cy="20" r="2" /><circle cx="8" cy="20" r="2" />',"shopping-bag":'<path d="M16 10a4 4 0 0 1-8 0" /><path d="M3.103 6.034h17.794" /><path d="M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z" />',"credit-card":'<rect width="20" height="14" x="2" y="5" rx="2" /><line x1="2" x2="22" y1="10" y2="10" /><path d="M6 14h2" />',wallet:'<path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" /><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" />',package:'<path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z" /><path d="M12 22V12" /><polyline points="3.29 7 12 12 20.71 7" /><path d="m7.5 4.27 9 5.15" />',gift:'<path d="M12 7v14" /><path d="M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8" /><path d="M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5" /><rect x="3" y="7" width="18" height="4" rx="1" />',truck:'<path d="M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2" /><path d="M15 18H9" /><path d="M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14" /><circle cx="17" cy="18" r="2" /><circle cx="7" cy="18" r="2" />',store:'<path d="M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5" /><path d="M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244" /><path d="M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05" />',receipt:'<path d="M12 17V7" /><path d="M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8" /><path d="M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z" />',percent:'<line x1="19" x2="5" y1="5" y2="19" /><circle cx="6.5" cy="6.5" r="2.5" /><circle cx="17.5" cy="17.5" r="2.5" />',"map-pin":'<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" /><circle cx="12" cy="10" r="3" />',map:'<path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" /><path d="M15 5.764v15" /><path d="M9 3.236v15" />',globe:'<circle cx="12" cy="12" r="10" /><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /><path d="M2 12h20" />',compass:'<circle cx="12" cy="12" r="10" /><path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />',navigation:'<polygon points="3 11 22 2 13 21 11 13 3 11" />',"layout-grid":'<rect width="7" height="7" x="3" y="3" rx="1" /><rect width="7" height="7" x="14" y="3" rx="1" /><rect width="7" height="7" x="14" y="14" rx="1" /><rect width="7" height="7" x="3" y="14" rx="1" />',"layout-list":'<rect width="7" height="7" x="3" y="3" rx="1" /><rect width="7" height="7" x="3" y="14" rx="1" /><path d="M14 4h7" /><path d="M14 9h7" /><path d="M14 15h7" /><path d="M14 20h7" />',"layout-dashboard":'<rect width="7" height="9" x="3" y="3" rx="1" /><rect width="7" height="5" x="14" y="3" rx="1" /><rect width="7" height="9" x="14" y="12" rx="1" /><rect width="7" height="5" x="3" y="16" rx="1" />',list:'<path d="M3 5h.01" /><path d="M3 12h.01" /><path d="M3 19h.01" /><path d="M8 5h13" /><path d="M8 12h13" /><path d="M8 19h13" />',"list-ordered":'<path d="M11 5h10" /><path d="M11 12h10" /><path d="M11 19h10" /><path d="M4 4h1v5" /><path d="M4 9h2" /><path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" />',table:'<path d="M12 3v18" /><rect width="18" height="18" x="3" y="3" rx="2" /><path d="M3 9h18" /><path d="M3 15h18" />',"columns-2":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M12 3v18" />',"columns-3":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M9 3v18" /><path d="M15 3v18" />',"rows-3":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M21 9H3" /><path d="M21 15H3" />',"panel-left":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M9 3v18" />',"panel-right":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M15 3v18" />',code:'<path d="m16 18 6-6-6-6" /><path d="m8 6-6 6 6 6" />',"code-xml":'<path d="m18 16 4-4-4-4" /><path d="m6 8-4 4 4 4" /><path d="m14.5 4-5 16" />',terminal:'<path d="M12 19h8" /><path d="m4 17 6-6-6-6" />',braces:'<path d="M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" /><path d="M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" />',database:'<ellipse cx="12" cy="5" rx="9" ry="3" /><path d="M3 5V19A9 3 0 0 0 21 19V5" /><path d="M3 12A9 3 0 0 0 21 12" />',server:'<rect width="20" height="8" x="2" y="2" rx="2" ry="2" /><rect width="20" height="8" x="2" y="14" rx="2" ry="2" /><line x1="6" x2="6.01" y1="6" y2="6" /><line x1="6" x2="6.01" y1="18" y2="18" />',cpu:'<path d="M12 20v2" /><path d="M12 2v2" /><path d="M17 20v2" /><path d="M17 2v2" /><path d="M2 12h2" /><path d="M2 17h2" /><path d="M2 7h2" /><path d="M20 12h2" /><path d="M20 17h2" /><path d="M20 7h2" /><path d="M7 20v2" /><path d="M7 2v2" /><rect x="4" y="4" width="16" height="16" rx="2" /><rect x="8" y="8" width="8" height="8" rx="1" />',"git-branch":'<path d="M15 6a9 9 0 0 0-9 9V3" /><circle cx="18" cy="6" r="3" /><circle cx="6" cy="18" r="3" />',bug:'<path d="M12 20v-9" /><path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z" /><path d="M14.12 3.88 16 2" /><path d="M21 21a4 4 0 0 0-3.81-4" /><path d="M21 5a4 4 0 0 1-3.55 3.97" /><path d="M22 13h-4" /><path d="M3 21a4 4 0 0 1 3.81-4" /><path d="M3 5a4 4 0 0 0 3.55 3.97" /><path d="M6 13H2" /><path d="m8 2 1.88 1.88" /><path d="M9 7.13V6a3 3 0 1 1 6 0v1.13" />',rocket:'<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" /><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09" /><path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z" /><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" />',puzzle:'<path d="M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z" />',box:'<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" /><path d="m3.3 7 8.7 5 8.7-5" /><path d="M12 22V12" />',boxes:'<path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" /><path d="m7 16.5-4.74-2.85" /><path d="m7 16.5 5-3" /><path d="M7 16.5v5.17" /><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" /><path d="m17 16.5-5-3" /><path d="m17 16.5 4.74-2.85" /><path d="M17 16.5v5.17" /><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" /><path d="M12 8 7.26 5.15" /><path d="m12 8 4.74-2.85" /><path d="M12 13.5V8" />',layers:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" /><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" /><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" />',component:'<path d="M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" /><path d="M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z" /><path d="M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z" /><path d="M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" />',"chart-bar":'<path d="M3 3v16a2 2 0 0 0 2 2h16" /><path d="M7 16h8" /><path d="M7 11h12" /><path d="M7 6h3" />',"chart-line":'<path d="M3 3v16a2 2 0 0 0 2 2h16" /><path d="m19 9-5 5-4-4-3 3" />',"chart-pie":'<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" /><path d="M21.21 15.89A10 10 0 1 1 8 2.83" />',"trending-up":'<path d="M16 7h6v6" /><path d="m22 7-8.5 8.5-5-5L2 17" />',"trending-down":'<path d="M16 17h6v-6" /><path d="m22 17-8.5-8.5-5 5L2 7" />',activity:'<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />',bold:'<path d="M6 12h9a4 4 0 010 8H7a1 1 0 01-1-1V5a1 1 0 011-1h7a4 4 0 010 8" />',italic:'<line x1="19" x2="10" y1="4" y2="4" /><line x1="14" x2="5" y1="20" y2="20" /><line x1="15" x2="9" y1="4" y2="20" />',underline:'<path d="M6 4v6a6 6 0 0 0 12 0V4" /><line x1="4" x2="20" y1="20" y2="20" />',"align-left":'<path d="M21 5H3" /><path d="M15 12H3" /><path d="M17 19H3" />',"align-center":'<path d="M21 5H3" /><path d="M17 12H7" /><path d="M19 19H5" />',"align-right":'<path d="M21 5H3" /><path d="M21 12H9" /><path d="M21 19H7" />',quote:'<path d="M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" /><path d="M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" />',type:'<path d="M12 4v16" /><path d="M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" /><path d="M9 20h6" />',"life-buoy":'<circle cx="12" cy="12" r="10" /><path d="m4.93 4.93 4.24 4.24" /><path d="m14.83 9.17 4.24-4.24" /><path d="m14.83 14.83 4.24 4.24" /><path d="m9.17 14.83-4.24 4.24" /><circle cx="12" cy="12" r="4" />',"book-open":'<path d="M12 5v16" /><path d="M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z" />',"graduation-cap":'<path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" /><path d="M22 10v6" /><path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" />',lightbulb:'<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" /><path d="M9 18h6" /><path d="M10 22h4" />',coffee:'<path d="M10 2v2" /><path d="M14 2v2" /><path d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1" /><path d="M6 2v2" />',award:'<path d="m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526" /><circle cx="12" cy="8" r="6" />',crown:'<path d="M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z" /><path d="M5 21h14" />',target:'<circle cx="12" cy="12" r="10" /><circle cx="12" cy="12" r="6" /><circle cx="12" cy="12" r="2" />',circle:'<circle cx="12" cy="12" r="10" />',dot:'<circle cx="12" cy="12" r="1" />',loader:'<path d="M12 2v4" /><path d="m16.2 7.8 2.9-2.9" /><path d="M18 12h4" /><path d="m16.2 16.2 2.9 2.9" /><path d="M12 18v4" /><path d="m4.9 19.1 2.9-2.9" /><path d="M2 12h4" /><path d="m4.9 4.9 2.9 2.9" />',"loader-circle":'<path d="M21 12a9 9 0 1 1-6.219-8.56" />'};var Et=class extends x{init(){this.render()}render(t=this.options.name){let e=W[t];if(this.el.classList.add("pl-icon"),!e){t&&console.warn(`[Plossy] icon: nieznana ikona \u201E${t}"`);return}this.options.name=t,this.el.hasAttribute("aria-label")||this.el.setAttribute("aria-hidden","true"),this.el.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${this.options.stroke}" stroke-linecap="round" stroke-linejoin="round">${e}</svg>`}};d(Et,"defaults",{name:"",stroke:1.75}),d(Et,"primary","name");v("icon",Et);O.icons={add(r){Object.assign(W,r)},names(){return Object.keys(W).sort()},get(r){return W[r]||null}};var ae=class extends x{init(){let{container:t}=this.options;this.scroller=t&&(this.el.closest(t)||document.querySelector(t))||null,this.last=this.position,this.scrolled=!1,this.hidden=!1;let e=z(()=>this.update());this.on(this.scroller||window,"scroll",e,{passive:!0}),this.on(this.el,"focusin",()=>this.show()),this.onDestroy(()=>this.el.classList.remove(this.options.cls,"pl-navbar-hidden")),this.update()}get position(){return Math.max(0,this.scroller?this.scroller.scrollTop:window.scrollY)}get busy(){return!!this.el.querySelector('[aria-expanded="true"], .pl-navbar-toggle.pl-open')}update(){let{offset:t,cls:e,hide:i,hideOffset:s,tolerance:o}=this.options,n=this.position,a=n>t;if(a!==this.scrolled&&(this.scrolled=a,this.el.classList.toggle(e,a),this.emit("scrolled",{scrolled:a})),i){let l=n-this.last;n<=s||l<-o?this.show():l>o&&!this.busy&&this.hide(),Math.abs(l)>o&&(this.last=n)}else this.last=n}show(){this.hidden&&(this.hidden=!1,this.el.classList.remove("pl-navbar-hidden"),this.emit("show"))}hide(){this.hidden||(this.hidden=!0,this.el.classList.add("pl-navbar-hidden"),this.emit("hide"))}};d(ae,"defaults",{offset:16,cls:"pl-navbar-scrolled",hide:!1,hideOffset:240,tolerance:6,container:null});var le=class extends x{init(){this.parents.forEach(t=>{let{link:e,sub:i}=this.parts(t);if(!e||!i)return;let s=t.classList.contains("pl-open")||!!i.querySelector(".pl-active");t.classList.toggle("pl-open",s),i.hidden=!s,i.id||(i.id=k("pl-nav-sub")),e.setAttribute("aria-controls",i.id),e.setAttribute("aria-expanded",String(s)),e.matches("button, a[href]")||(e.setAttribute("role","button"),e.tabIndex=0)}),this.on(this.el,"click",t=>{let e=this.parentOf(t.target);e&&(t.preventDefault(),this.toggle(e))}),this.on(this.el,"keydown",t=>{if(t.key!=="Enter"&&t.key!==" ")return;let e=this.parentOf(t.target);!e||t.target.closest("button, a[href]")||(t.preventDefault(),this.toggle(e))})}get parents(){return T(".pl-parent",this.el).filter(t=>t.closest("[data-pl-nav]")===this.el)}parts(t){return{link:t.querySelector(":scope > a, :scope > button"),sub:t.querySelector(":scope > .pl-nav-sub")}}parentOf(t){let i=t.closest?.('a, button, [role="button"]')?.parentElement;return!i?.classList.contains("pl-parent")||i.closest("[data-pl-nav]")!==this.el?null:this.parts(i).sub?i:null}resolve(t){return typeof t=="number"?this.parents[t]:t}toggle(t){if(t=this.resolve(t),!!t)return t.classList.contains("pl-open")?this.hide(t):this.show(t)}async show(t){if(t=this.resolve(t),!t||t.classList.contains("pl-open")||!this.emit("beforeshow",{item:t},!0))return;this.options.multiple||this.parents.filter(o=>o!==t&&o.parentElement===t.parentElement&&o.classList.contains("pl-open")).forEach(o=>this.hide(o,!0));let{link:e,sub:i}=this.parts(t);t.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),this.emit("show",{item:t});let{signal:s}=this;await J(i,!0,{duration:this.options.duration}),s.aborted||this.emit("shown",{item:t})}async hide(t,e=!1){if(t=this.resolve(t),!t||!t.classList.contains("pl-open")||!e&&!this.options.collapsible||!this.emit("beforehide",{item:t},!0))return;let{link:i,sub:s}=this.parts(t);t.classList.remove("pl-open"),i.setAttribute("aria-expanded","false"),this.emit("hide",{item:t});let{signal:o}=this;await J(s,!1,{duration:this.options.duration}),o.aborted||this.emit("hidden",{item:t})}};d(le,"defaults",{multiple:!1,collapsible:!0,duration:340});v("navbar",ae);v("nav",le);var St=class extends x{init(){let{el:t}=this;this.active=null,!t.hasAttribute("aria-label")&&!t.textContent.trim()&&t.setAttribute("aria-label",y("totop.label",{},t)),t.matches("a[href], button")||(t.hasAttribute("role")||t.setAttribute("role","button"),t.hasAttribute("tabindex")||(t.tabIndex=0),this.on(t,"keydown",e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.scroll())})),this.on(t,"click",e=>{e.preventDefault(),this.scroll()}),this.update=z(()=>this.refresh()),this.on(window,"scroll",this.update,{passive:!0}),this.on(window,"resize",this.update,{passive:!0}),this.refresh()}get target(){let{target:t}=this.options,e=this.el.getAttribute("href"),i=t||(e&&e.length>1&&e.startsWith("#")?e:"");if(!i)return null;try{return document.querySelector(i)}catch{return null}}refresh(){let t=document.scrollingElement||document.documentElement,e=window.scrollY,i=Math.max(t.scrollHeight-window.innerHeight,0),s=i?$(e/i,0,1):0;this.el.style.setProperty("--pl-totop-progress",s.toFixed(4));let o=e>this.options.offset;o!==this.active&&(this.active=o,this.el.classList.toggle(this.options.cls,o),this.emit(o?"show":"hide"))}scroll(){if(!this.emit("beforescroll",{},!0))return;let t=this.target,e=S()?"auto":"smooth";if(t?t.scrollIntoView({behavior:e,block:"start"}):window.scrollTo({top:0,left:0,behavior:e}),this.options.focus){let i=t||document.body,s=i.hasAttribute("tabindex");s||i.setAttribute("tabindex","-1");let o=i===document.body;o&&(i.style.outline="none"),i.focus({preventScroll:!0}),i.addEventListener("blur",()=>{s||i.removeAttribute("tabindex"),o&&(i.style.outline="")},{once:!0})}this.emit("scroll",{target:t})}destroy(){this.el.classList.remove(this.options.cls),super.destroy()}};d(St,"defaults",{offset:400,target:"",focus:!0,cls:"pl-active"}),d(St,"primary","offset");v("totop",St);var qe=r=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${W[r]||""}</svg>`,he=r=>String(r).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]);function Mi(r,t="en"){let e=["B","KB","MB","GB"],i=0;for(;r>=1024&&i<e.length-1;)r/=1024,i++;return`${r.toLocaleString(t,{maximumFractionDigits:i?1:0})} ${e[i]}`}function rs(r){let t=r.type||"",e=(r.name.split(".").pop()||"").toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"film":t.startsWith("audio/")?"music":/^(zip|rar|7z|tar|gz)$/.test(e)?"package":/^(js|ts|json|html|css|scss|xml|php|py)$/.test(e)?"code":/^(csv|xls|xlsx|ods)$/.test(e)?"table":t==="application/pdf"||t.startsWith("text/")||/^(doc|docx|odt|rtf|md)$/.test(e)?"file-text":"file"}function as(r,t){let e=String(t||"").split(",").map(o=>o.trim().toLowerCase()).filter(Boolean);if(!e.length)return!0;let i=r.name.toLowerCase(),s=(r.type||"").toLowerCase();return e.some(o=>o.startsWith(".")?i.endsWith(o):o.endsWith("/*")?s.startsWith(o.slice(0,-1)):s===o)}var ce=class extends x{init(){let{el:t,options:e}=this;this.entries=[],this.dragDepth=0,this.input=E('input[type="file"]',t),this.input||(this.input=document.createElement("input"),this.input.type="file",this.input.tabIndex=-1,this.input.name=e.name,this.input.setAttribute("aria-label",y("upload.choose",{},t)),this.input.hidden=!0,t.append(this.input),t.hasAttribute("tabindex")||(t.tabIndex=0),t.setAttribute("role","button")),e.multiple===null?e.multiple=this.input.multiple:this.input.multiple=!!e.multiple,e.accept?this.input.accept=e.accept:e.accept=this.input.accept||"",this.list=e.list&&E(e.list)||(t.nextElementSibling?.classList.contains("pl-upload-list")?t.nextElementSibling:null),this.list||(this.list=document.createElement("ul"),this.list.className="pl-upload-list",t.after(this.list),this.ownList=!0),this.list.setAttribute("aria-live","polite"),this.on(this.input,"change",()=>{let i=[...this.input.files];i.length&&this.add(i)}),this.on(t,"click",i=>{i.target.closest("a, button, label, input")||this.browse()}),this.on(t,"keydown",i=>{i.target===t&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.browse())}),this.on(t,"dragenter",i=>{this.hasFiles(i)&&(i.preventDefault(),this.dragDepth++,t.classList.add("pl-upload-dragover"))}),this.on(t,"dragover",i=>{this.hasFiles(i)&&(i.preventDefault(),i.dataTransfer.dropEffect="copy")}),this.on(t,"dragleave",()=>{this.dragDepth=Math.max(0,this.dragDepth-1),this.dragDepth||t.classList.remove("pl-upload-dragover")}),this.on(t,"drop",i=>{this.hasFiles(i)&&(i.preventDefault(),this.dragDepth=0,t.classList.remove("pl-upload-dragover"),this.disabled||this.add([...i.dataTransfer.files]))}),this.on(this.list,"click",i=>{let o=i.target.closest(".pl-upload-remove")?.closest(".pl-upload-item"),n=o&&this.entries.find(a=>a.el===o);n&&this.remove(n.file)}),this.onDestroy(()=>{this.entries.forEach(i=>this.release(i)),this.ownList&&this.list.remove(),this.errorEl?.remove()})}get disabled(){return this.el.classList.contains("pl-disabled")||this.input.disabled}get files(){return this.entries.map(t=>t.file)}hasFiles(t){return[...t.dataTransfer?.types||[]].includes("Files")}browse(){this.disabled||this.input.click()}add(t){let{options:e}=this,i=[],s=[];this.clearErrors(),e.multiple||(t=[...t].slice(0,1));for(let n of t){let a=null;as(n,e.accept)?e.maxSize&&n.size>e.maxSize*1024*1024?a={type:"size",message:y("upload.size",{name:n.name,size:Mi(n.size,q(this.el)),max:e.maxSize},this.el)}:e.maxFiles&&this.entries.length+i.length>=e.maxFiles&&(a={type:"count",message:y("upload.count",{n:e.maxFiles},this.el)}):a={type:"type",message:y("upload.type",{name:n.name},this.el)},a?(a.type!=="count"||!s.some(l=>l.type==="count"))&&s.push({...a,file:n}):i.push(n)}s.forEach(n=>this.emit("error",n)),!e.multiple&&i.length&&this.clear(!0),s.length&&this.showErrors(s);let o=i.map((n,a)=>this.createEntry(n,a));return this.entries.push(...o),this.sync(),o.length&&(this.emit("select",{files:i}),e.url&&e.auto&&o.forEach(n=>this.send(n))),i}createEntry(t,e=0){let i={id:k("pl-upload"),file:t,status:"ready",percent:0,xhr:null,objectUrl:null},s=document.createElement("li");s.className="pl-upload-item",s.style.animationDelay=`${e*50}ms`;let o=qe(rs(t));this.options.thumbnails&&t.type?.startsWith("image/")&&typeof URL.createObjectURL=="function"&&(i.objectUrl=URL.createObjectURL(t),o=`<img src="${i.objectUrl}" alt="">`);let n=he(t.name);return s.innerHTML=`<span class="pl-upload-thumb">${o}</span><span class="pl-upload-info"><span class="pl-upload-name" title="${n}">${n}</span><span class="pl-upload-meta"></span></span><button class="pl-upload-remove" type="button" aria-label="${he(y("upload.remove",{name:t.name},this.el))}">${qe("x")}</button><span class="pl-upload-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="${he(y("upload.progress",{name:t.name},this.el))}"><span class="pl-upload-bar"></span></span>`,i.el=s,this.list.append(s),this.describe(i),i}describe(t,e){let{file:i}=t,s=i.name.includes(".")?i.name.split(".").pop().toUpperCase():"",o=[Mi(i.size,q(this.el)),s].filter(Boolean).join(" \xB7 "),n=E(".pl-upload-meta",t.el);n&&(n.textContent=e?`${e}`:o),t.base=o}find(t){return typeof t=="number"?this.entries[t]||null:this.entries.find(e=>e===t||e.file===t||e.id===t||e.el===t)||null}setProgress(t,e,i={}){let s=this.find(t);!s||s.status==="done"||(e=Math.min(100,Math.max(0,Math.round(e))),s.percent=e,s.status="uploading",s.el.classList.add("pl-upload-item-uploading"),s.el.classList.remove("pl-upload-item-error"),s.el.style.setProperty("--pl-upload-value",e/100),E(".pl-upload-progress",s.el)?.setAttribute("aria-valuenow",e),this.describe(s,y("upload.uploading",{percent:e},this.el)),this.emit("progress",{file:s.file,percent:e,...i}))}complete(t,e=null,i=null){let s=this.find(t);!s||s.status==="done"||(s.status="done",s.percent=100,s.el.style.setProperty("--pl-upload-value",1),s.el.classList.remove("pl-upload-item-uploading","pl-upload-item-error"),s.el.classList.add("pl-upload-item-done"),this.describe(s),this.describe(s,`${s.base} \xB7 ${y("upload.done",{},this.el)}`),this.emit("complete",{file:s.file,response:e,xhr:i}),this.entries.every(o=>o.status==="done")&&this.emit("completeall",{files:this.files}))}fail(t,e=y("upload.failed",{},this.el),i=null){let s=this.find(t);s&&(s.status="error",s.el.classList.remove("pl-upload-item-uploading"),s.el.classList.add("pl-upload-item-error"),this.describe(s,e),this.emit("error",{type:"upload",message:e,file:s.file,xhr:i}))}upload(){this.options.url&&this.entries.filter(t=>t.status==="ready"||t.status==="error").forEach(t=>this.send(t))}send(t){let{options:e}=this,i=new XMLHttpRequest,s=new FormData;if(s.append(e.name,t.file,t.file.name),t.xhr=i,i.open(e.method,e.url),i.upload.addEventListener("progress",o=>{o.lengthComputable&&this.setProgress(t,o.loaded/o.total*100,{loaded:o.loaded,total:o.total})}),i.addEventListener("load",()=>{if(t.xhr=null,i.status>=200&&i.status<300){let o=i.responseText;try{o=JSON.parse(o)}catch{}this.complete(t,o,i)}else this.fail(t,y("upload.failedStatus",{status:i.status},this.el),i)}),i.addEventListener("error",()=>{t.xhr=null,this.fail(t,y("upload.failedNetwork",{},this.el),i)}),!this.emit("beforesend",{file:t.file,xhr:i,data:s},!0)){t.xhr=null;return}this.setProgress(t,0),i.send(s)}release(t){t.xhr?.abort(),t.xhr=null,t.objectUrl&&URL.revokeObjectURL(t.objectUrl)}remove(t){let e=this.find(t);if(!e)return;this.entries.splice(this.entries.indexOf(e),1),this.release(e);let i=e.el;i.classList.add("pl-upload-item-leave"),setTimeout(()=>i.remove(),200),this.clearErrors(),this.sync(),this.emit("remove",{file:e.file})}clear(t=!1){let e=this.entries.splice(0);e.forEach(i=>{this.release(i),i.el.remove()}),this.clearErrors(),this.sync(),t||e.forEach(i=>this.emit("remove",{file:i.file}))}sync(){try{let t=new DataTransfer;this.entries.forEach(e=>t.items.add(e.file)),this.input.files=t.files}catch{}this.el.classList.toggle("pl-upload-has-files",this.entries.length>0)}showErrors(t){let{el:e}=this;e.classList.remove("pl-upload-invalid"),e.offsetWidth,e.classList.add("pl-upload-invalid"),clearTimeout(this.invalidTimer),this.invalidTimer=setTimeout(()=>e.classList.remove("pl-upload-invalid"),1600),this.options.messages&&(this.errorEl||(this.errorEl=document.createElement("div"),this.errorEl.className="pl-upload-error",this.errorEl.setAttribute("role","alert")),this.errorEl.innerHTML=`${qe("circle-alert")}<span>${t.map(i=>he(i.message)).join("<br>")}</span>`,e.after(this.errorEl))}clearErrors(){this.errorEl?.remove(),this.el.classList.remove("pl-upload-invalid")}};d(ce,"defaults",{multiple:null,accept:"",maxSize:0,maxFiles:0,url:"",name:"file",method:"POST",auto:!0,thumbnails:!0,list:"",messages:!0});v("upload",ce);var $t=class extends x{init(){let{el:t,options:e}=this,i=Math.max(1,Number(e.length)||6);e.length=i,t.classList.add("pl-otp"),this.input=E("input:not(.pl-otp-box)",t),this.input?(this.input.classList.add("pl-otp-value"),this.input.tabIndex=-1,this.input.setAttribute("aria-hidden","true")):(this.input=document.createElement("input"),this.input.type="hidden",e.name&&(this.input.name=e.name),t.append(this.input),this.ownInput=!0);let s=this.input.disabled,o=this.sanitize(this.input.value||"");t.setAttribute("role","group"),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&t.setAttribute("aria-label",e.label??y("otp.label",{},t)),this.boxes=[],this.generated=[];let n=null;for(let a=0;a<i;a++){if(!n||e.separator>0&&a%e.separator===0){if(n){let h=document.createElement("span");h.className="pl-otp-separator",h.setAttribute("aria-hidden","true"),t.insertBefore(h,this.input),this.generated.push(h)}n=document.createElement("span"),n.className="pl-otp-group",t.insertBefore(n,this.input),this.generated.push(n)}let l=document.createElement("input");l.className="pl-otp-box",l.type=e.masked?"password":"text",l.inputMode=e.type==="numeric"?"numeric":"text",e.type==="numeric"&&(l.pattern="[0-9]*"),l.autocomplete=a===0?"one-time-code":"off",l.autocapitalize="characters",l.spellcheck=!1,l.disabled=s,l.style.setProperty("--pl-otp-index",a),l.setAttribute("aria-label",y("otp.char",{n:a+1,count:i},this.el)),n.append(l),this.boxes.push(l)}this.on(t,"focusin",a=>{a.target.classList?.contains("pl-otp-box")&&a.target.select()}),this.on(t,"pointerup",a=>{let l=a.target.closest?.(".pl-otp-box");if(!l||l.value)return;let h=this.boxes.find(c=>!c.value);h&&h!==l&&h.focus()}),this.on(t,"beforeinput",a=>{let l=a.target;if(l.classList?.contains("pl-otp-box")&&a.inputType==="insertText"&&a.data&&a.data.length===1){a.preventDefault();let h=this.sanitize(a.data);h?this.fill(this.boxes.indexOf(l),h):this.reject(l)}}),this.on(t,"input",a=>{let l=a.target;if(!l.classList?.contains("pl-otp-box"))return;let h=this.boxes.indexOf(l),c=this.sanitize(l.value),p=this.prev?.[h];p&&c.length===2&&(c=c.replace(p,"")||p),l.value="",c?this.fill(c.length>=this.options.length?0:h,c):this.update()}),this.on(t,"paste",a=>{let l=a.target;if(!l.classList?.contains("pl-otp-box"))return;a.preventDefault();let h=this.sanitize(a.clipboardData?.getData("text")||"");if(!h)return this.reject(l);this.fill(h.length>=this.options.length?0:this.boxes.indexOf(l),h)}),this.on(t,"keydown",a=>{let l=a.target;if(!l.classList?.contains("pl-otp-box"))return;let h=this.boxes.indexOf(l),c=p=>{a.preventDefault(),this.boxes[Math.min(Math.max(p,0),this.boxes.length-1)].focus()};switch(a.key){case"Backspace":a.preventDefault(),l.value?l.value="":h>0&&(this.boxes[h-1].value="",this.boxes[h-1].focus()),this.update();break;case"Delete":a.preventDefault(),this.write(this.chars().filter((p,m)=>m!==h).join(""),!0),l.select();break;case"ArrowLeft":c(h-1);break;case"ArrowRight":c(h+1);break;case"Home":c(0);break;case"End":c(this.boxes.length-1);break;case"ArrowUp":case"ArrowDown":a.preventDefault();break;default:}}),this.on(this.input.form,"reset",()=>setTimeout(()=>!this.signal.aborted&&this.clear())),this.onDestroy(()=>{this.generated.forEach(a=>a.remove()),this.ownInput?this.input.remove():this.input.classList.remove("pl-otp-value")}),o&&this.write(o,!0),e.autofocus&&this.focus()}sanitize(t){let e=this.options.type==="numeric"?/[^0-9]/g:/[^0-9a-z]/gi;return String(t).replace(e,"").toUpperCase()}chars(){return this.boxes.map(t=>t.value)}get value(){return this.chars().join("")}set value(t){this.setValue(t)}get complete(){return this.boxes.every(t=>t.value)}fill(t,e){t=Math.max(0,t);let i=t;[...e].slice(0,this.boxes.length-t).forEach((o,n)=>{let a=this.boxes[t+n];a.value=o,this.pop(a),i=t+n});let s=this.boxes[Math.min(i+1,this.boxes.length-1)];(this.el.contains(document.activeElement)||document.activeElement===document.body)&&(s.focus(),i===this.boxes.length-1&&s.select()),this.update()}pop(t){t.classList.remove("pl-otp-pop"),t.offsetWidth,t.classList.add("pl-otp-pop")}reject(t){t.classList.remove("pl-otp-shake"),t.offsetWidth,t.classList.add("pl-otp-shake"),setTimeout(()=>t.classList.remove("pl-otp-shake"),450)}write(t,e=!1){let i=[...this.sanitize(t)];this.boxes.forEach((s,o)=>{s.value=i[o]||""}),this.update(e)}update(t=!1){let e=this.value;if(this.prev=this.chars(),this.boxes.forEach(s=>s.classList.toggle("pl-otp-filled",!!s.value)),e===this.input.value)return;let i=this.input.value.length===this.boxes.length;this.input.value=e,(this.el.classList.contains("pl-otp-danger")||this.el.classList.contains("pl-otp-success"))&&this.reset(),!t&&(this.input.dispatchEvent(new Event("input",{bubbles:!1})),this.emit("change",{value:e,complete:this.complete}),this.complete&&!(i&&e===this.lastComplete)&&(this.lastComplete=e,this.emit("complete",{value:e}),this.options.submit&&this.input.form?.requestSubmit?.()))}setValue(t){this.write(t??"")}clear(t=!1){this.reset(),this.lastComplete=null,this.write(""),t&&this.focus()}focus(){(this.boxes.find(t=>!t.value)||this.boxes[this.boxes.length-1])?.focus()}error({clear:t=!1}={}){let{el:e}=this;e.classList.remove("pl-otp-success","pl-otp-shake"),e.offsetWidth,e.classList.add("pl-otp-danger","pl-otp-shake"),this.boxes.forEach(i=>i.setAttribute("aria-invalid","true")),setTimeout(()=>e.classList.remove("pl-otp-shake"),450),t&&(this.lastComplete=null,this.boxes.forEach(i=>{i.value="",i.classList.remove("pl-otp-filled")}),this.input.value="",this.boxes[0].focus())}success(){this.el.classList.remove("pl-otp-danger","pl-otp-shake"),this.el.classList.add("pl-otp-success"),this.boxes.forEach(t=>{t.removeAttribute("aria-invalid"),t.classList.remove("pl-otp-pop")})}reset(){this.el.classList.remove("pl-otp-danger","pl-otp-success","pl-otp-shake"),this.boxes.forEach(t=>t.removeAttribute("aria-invalid"))}disable(t=!0){this.boxes.forEach(e=>{e.disabled=t}),this.input.disabled=t}};d($t,"defaults",{length:6,type:"numeric",separator:0,masked:!1,name:"",autofocus:!1,submit:!1,label:null}),d($t,"primary","length");v("otp",$t);var ls=["length","case","digit","symbol"],pe=class extends x{init(){var s;let{el:t,options:e}=this;t.classList.add("pl-strength"),this.input=e.input&&E(e.input)||E("input",t),e.labels??(e.labels=y("strength.levels",{},t)),typeof e.labels=="string"&&(e.labels=e.labels.split(",").map(o=>o.trim())),this.created=[],this.score=0,this.meter=E(".pl-strength-meter",t);let i=this.meter?.closest(".pl-strength-bar");if(this.meter||(i=this.make("div","pl-strength-bar"),this.meter=this.make("div","pl-strength-meter"),i.append(this.meter),t.append(i),this.created.push(i)),!this.meter.children.length)for(let o=0;o<4;o++)this.meter.append(this.make("span","pl-strength-segment"));if(this.meter.setAttribute("role","meter"),this.meter.setAttribute("aria-label",y("strength.meter",{},t)),this.meter.setAttribute("aria-valuemin","0"),this.meter.setAttribute("aria-valuemax","4"),this.labelEl=E(".pl-strength-label",t),!this.labelEl&&e.label&&(this.labelEl=this.make("span","pl-strength-label"),(i||t).append(this.labelEl),i||this.created.push(this.labelEl)),this.labelEl?.setAttribute("aria-live","polite"),this.rulesEl=E(".pl-strength-rules",t),!this.rulesEl&&e.rules&&(this.rulesEl=this.make("ul","pl-strength-rules"),t.append(this.rulesEl),this.created.push(this.rulesEl)),this.rulesEl&&!this.rulesEl.children.length)for(let o of ls){let n=this.make("li","pl-strength-rule");n.dataset.rule=o,n.textContent=y(`strength.rule.${o}`,{n:e.minLength},t),this.rulesEl.append(n)}if(this.rulesEl&&this.input){(s=this.rulesEl).id||(s.id=k("pl-strength"));let o=this.input.getAttribute("aria-describedby");o?.includes(this.rulesEl.id)||this.input.setAttribute("aria-describedby",[o,this.rulesEl.id].filter(Boolean).join(" "))}this.on(this.input,"input",()=>this.update()),this.on(this.input?.form,"reset",()=>setTimeout(()=>!this.signal.aborted&&this.update())),this.onDestroy(()=>this.created.forEach(o=>o.remove())),this.update(!0)}make(t,e){let i=document.createElement(t);return i.className=e,i}check(t=this.input?.value||""){let e=this.options.minLength,i={length:t.length>=e,case:/\p{Ll}/u.test(t)&&/\p{Lu}/u.test(t),digit:/\d/.test(t),symbol:/[^\p{L}\d\s]/u.test(t)},s=0;if(t){let o=[i.case,i.digit,i.symbol].filter(Boolean).length,n=/^(.)\1+$/.test(t)||/^(?:0?123456789?|abcdef|qwerty|haslo|hasło|password)/i.test(t);s=1,i.length&&(s=1+o,o<3&&t.length>=e+6&&s++,n&&(s=Math.min(s,1))),s=Math.min(4,s)}return{score:s,rules:i}}update(t=!1){let e=this.input?.value||"",{score:i,rules:s}=this.check(e),o=i?this.options.labels[i-1]||"":this.options.emptyLabel;if(this.el.dataset.score=i,[...this.meter.children].forEach((a,l)=>a.classList.toggle("pl-active",l<i)),this.meter.setAttribute("aria-valuenow",i),this.meter.setAttribute("aria-valuetext",o||y("strength.empty",{},this.el)),this.labelEl&&(this.labelEl.textContent=o),this.rulesEl)for(let a of this.rulesEl.querySelectorAll("[data-rule]")){let l=!!s[a.dataset.rule];a.classList.toggle("pl-active",l),a.setAttribute("aria-label",`${a.textContent} \u2014 ${y(l?"strength.met":"strength.unmet",{},this.el)}`)}let n=i!==this.score;this.score=i,this.rules=s,t||this.emit("change",{score:i,label:o,rules:s,value:e,changed:n})}};d(pe,"defaults",{minLength:8,rules:!1,label:!0,labels:null,input:"",emptyLabel:""});v("strength",pe);var Tt=class extends x{init(){let{el:t,options:e}=this,i=Math.max(1,Math.round(Number(e.max))||5);e.max=i,this.current=0,t.classList.add("pl-rating"),t.classList.toggle("pl-rating-readonly",!!e.readonly),t.style.setProperty("--pl-rating-max",i),t.setAttribute("role","radiogroup"),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&t.setAttribute("aria-label",e.label??y("rating.label",{},t));let s=e.name||k("pl-rating"),o=n=>{let a=document.createElement("input");return a.type="radio",a.name=s,a.value=String(n),a.className=n?"pl-rating-star":"pl-rating-zero",a.setAttribute("aria-label",n?`${n} ${this.plural(n)}`:"Brak oceny"),e.readonly&&(a.disabled=!0),a};this.zero=o(0),this.stars=Array.from({length:i},(n,a)=>o(a+1)),t.append(this.zero,...this.stars),this.onDestroy(()=>{[this.zero,...this.stars].forEach(n=>n.remove()),t.classList.remove("pl-rating-readonly")}),this.on(t,"change",n=>{n.target.matches('input[type="radio"]')&&this.set(Number(n.target.value),!0)}),this.on(t,"click",n=>{let a=n.target.closest(".pl-rating-star");!a||!e.clearable||e.readonly||Number(a.value)===this.current&&this.set(0,!0)}),this.on(t,"pointerover",n=>{let a=n.target.closest(".pl-rating-star");a&&!e.readonly&&this.paint(Number(a.value),!0)}),this.on(t,"pointerleave",()=>this.paint(this.current)),this.set($(Math.round(Number(e.value))||0,0,i))}plural(t){let[e,i,s]=String(this.options.star).split("|");if(t===1)return e;let o=t%10,n=t%100;return o>=2&&o<=4&&!(n>=12&&n<=14)?i||e:s||i||e}paint(t,e=!1){this.stars.forEach((i,s)=>{let o=s<t;i.classList.toggle("pl-active",o&&!(e&&s>=this.current)),i.classList.toggle("pl-rating-preview",e&&o&&s>=this.current)})}get value(){return this.current}set value(t){this.set(t)}set(t,e=!1){let i=$(Math.round(Number(t))||0,0,this.options.max),s=i!==this.current;this.current=i;let o=i?this.stars[i-1]:this.zero;o.checked=!0,this.el.style.setProperty("--pl-rating-value",i),this.paint(i),s&&e&&this.stars.forEach((n,a)=>{n.classList.remove("pl-rating-pop"),a<i&&(n.style.animationDelay=`${a*35}ms`,n.offsetWidth,n.classList.add("pl-rating-pop"))}),s&&this.emit("change",{value:i})}clear(){this.set(0)}disable(t=!0){this.el.classList.toggle("pl-disabled",!!t),[this.zero,...this.stars].forEach(e=>e.disabled=!!t||!!this.options.readonly)}};d(Tt,"defaults",{value:0,max:5,name:"",readonly:!1,clearable:!0,label:null,star:"gwiazdka|gwiazdki|gwiazdek"}),d(Tt,"primary","value");v("rating",Tt);var de=class extends x{init(){let{el:t,options:e}=this;t.classList.add("pl-quantity"),this.input=E("input",t),this.input||(this.input=document.createElement("input"),this.input.type="number",this.input.value="1",t.append(this.input),this.ownInput=!0),this.input.classList.add("pl-quantity-input"),this.input.hasAttribute("inputmode")||(this.input.inputMode="numeric"),!this.input.hasAttribute("aria-label")&&!this.input.labels?.length&&this.input.setAttribute("aria-label",y("quantity.label",{},t));let i=s=>{let o=document.createElement("button");return o.type="button",o.className=`pl-quantity-button ${s<0?"pl-quantity-minus":"pl-quantity-plus"}`,o.setAttribute("aria-label",s<0?e.minusLabel??y("quantity.minus",{},t):e.plusLabel??y("quantity.plus",{},t)),o.tabIndex=-1,this.on(o,"pointerdown",n=>{n.button||(n.preventDefault(),this.input.focus({preventScroll:!0}),this.step(s,!0),e.repeat&&(this.stopRepeat(),this.timer=setTimeout(()=>{this.timer=setInterval(()=>this.step(s,!0),70)},420)))}),this.on(o,"click",n=>{n.detail===0&&this.step(s,!0)}),o};this.minus=i(-1),this.plus=i(1),this.input.before(this.minus),this.input.after(this.plus),this.on(document,"pointerup",()=>this.stopRepeat()),this.on(document,"pointercancel",()=>this.stopRepeat()),this.on(this.input,"keydown",s=>{s.key!=="ArrowUp"&&s.key!=="ArrowDown"||(s.preventDefault(),this.step(s.key==="ArrowUp"?1:-1,!0))}),this.on(this.input,"input",()=>this.sync()),this.on(this.input,"change",s=>{this.set(this.input.value,!0,!0)}),this.onDestroy(()=>{this.stopRepeat(),this.minus.remove(),this.plus.remove(),this.input.classList.remove("pl-quantity-input","pl-quantity-up","pl-quantity-down"),this.ownInput&&this.input.remove()}),this.last=this.parse(this.input.value),this.set(this.last)}limit(t,e){let i=this.options[t],s=i!==null&&i!==""?i:this.input.getAttribute(t),o=Number(s);return s===null||s===""||Number.isNaN(o)?e:o}get min(){return this.limit("min",0)}get max(){return this.limit("max",1/0)}get stepSize(){return this.limit("step",1)||1}parse(t){let e=Number(String(t).replace(",","."));return Number.isFinite(e)?e:this.min}stopRepeat(){clearTimeout(this.timer),clearInterval(this.timer),this.timer=null}sync(){let t=this.parse(this.input.value),e=this.input.disabled;this.minus.disabled=e||t<=this.min,this.plus.disabled=e||t>=this.max,(this.minus.disabled||this.plus.disabled)&&this.stopRepeat()}get value(){return this.last}set value(t){this.set(t)}set(t,e=!1,i=!1){let s=this.stepSize,o=(String(s).split(".")[1]||"").length,n=Number($(this.parse(t),this.min,this.max).toFixed(o)),a=this.last;if(this.last=n,this.input.value=String(n),this.sync(),n!==a){if(e&&!i){let l=n>a?"pl-quantity-up":"pl-quantity-down";this.input.classList.remove("pl-quantity-up","pl-quantity-down"),this.input.offsetWidth,this.input.classList.add(l)}e&&(this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.emit("change",{value:n,previous:a}))}}step(t=1,e=!1){this.set(this.last+t*this.stepSize,e)}disable(t=!0){this.input.disabled=!!t,this.el.classList.toggle("pl-disabled",!!t),this.sync()}};d(de,"defaults",{min:null,max:null,step:null,repeat:!0,minusLabel:null,plusLabel:null});v("quantity",de);var ut=r=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${W[r]||""}</svg>`,V=r=>String(r).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]),ot=r=>String(r).split("").map(t=>(t==="\u0142"||t==="\u0141"?"l":t.normalize("NFD")[0]||t).toLowerCase()[0]||t).join("");function Fe(r){return(r||[]).map(t=>{if(t===null||typeof t!="object")return{value:String(t),label:String(t)};let e=t.label??t.text??t.name??t.value;return{...t,value:String(t.value??e),label:String(e)}})}var ue=class extends x{init(){let{el:t,options:e}=this;e.emptyText??(e.emptyText=y("combobox.empty",{},t)),e.loadingText??(e.loadingText=y("combobox.loading",{},t)),e.createText??(e.createText=y("combobox.create",{},t)),this.isSelect=t.tagName==="SELECT",this.multiple=this.isSelect&&t.multiple,this.isOpen=!1,this.items=[],this.selected=[],this.visible=[],this.active=-1,this.query="",this.request=0,this.typed="",e.closeOnSelect===null&&(e.closeOnSelect=!this.multiple),this.build(),this.readItems(),this.renderValue(),this.bind()}build(){let{el:t,options:e}=this,i=this.wrapper=document.createElement("div");i.className="pl-combobox";for(let h of t.classList)/^pl-form-(small|large|danger|success|width-)/.test(h)&&i.classList.add(h);i.classList.toggle("pl-combobox-multiple",this.multiple);let s=this.control=document.createElement("div");s.className="pl-combobox-control";let o=k("pl-combobox"),n;if(this.isSelect){n=document.createElement("input"),n.type="text";let h=t.labels?.[0];h?(h.id||(h.id=k("pl-combobox-label")),n.setAttribute("aria-labelledby",h.id)):t.getAttribute("aria-label")&&n.setAttribute("aria-label",t.getAttribute("aria-label")),this.placeholderOption=[...t.options].find(c=>c.value===""&&!c.closest("optgroup"))||null,t.after(i),t.classList.add("pl-combobox-native"),this.nativeTabIndex=t.getAttribute("tabindex"),t.tabIndex=-1,t.setAttribute("aria-hidden","true")}else{n=t,t.before(i),this.hadInputClass=t.classList.contains("pl-input"),t.classList.remove("pl-input");let h=t.getAttribute("list");this.datalist=h?document.getElementById(h):null,this.datalist&&t.removeAttribute("list")}this.input=n,this.placeholder=e.placeholder||t.getAttribute("placeholder")||t.dataset.placeholder||this.placeholderOption?.textContent.trim()||"",n.classList.add("pl-combobox-input"),n.autocomplete="off",n.spellcheck=!1,n.setAttribute("role","combobox"),n.setAttribute("aria-autocomplete",e.search?"list":"none"),n.setAttribute("aria-expanded","false"),n.setAttribute("aria-controls",o),n.setAttribute("aria-haspopup","listbox"),e.search||(n.readOnly=!0),this.isSelect&&(n.disabled=t.disabled),i.classList.toggle("pl-disabled",n.disabled),s.append(n),this.clearButton=document.createElement("button"),this.clearButton.type="button",this.clearButton.className="pl-combobox-clear",this.clearButton.tabIndex=-1,this.clearButton.setAttribute("aria-label",y("clear",{},t)),this.clearButton.innerHTML=ut("x"),this.clearButton.hidden=!0,e.clearable&&s.append(this.clearButton);let a=document.createElement("span");a.className="pl-combobox-caret",a.innerHTML=ut(this.isSelect?"chevrons-up-down":"chevron-down"),s.append(a);let l=this.list=document.createElement("div");l.className="pl-combobox-list",l.id=o,l.setAttribute("role","listbox"),l.hidden=!0,this.multiple&&l.setAttribute("aria-multiselectable","true"),n.getAttribute("aria-labelledby")?l.setAttribute("aria-labelledby",n.getAttribute("aria-labelledby")):l.setAttribute("aria-label",this.placeholder||y("combobox.options",{},t)),i.append(s,l),this.onDestroy(()=>{if(this.stopPlace?.(),P(l),this.isSelect)t.classList.remove("pl-combobox-native"),t.removeAttribute("aria-hidden"),this.nativeTabIndex===null?t.removeAttribute("tabindex"):t.setAttribute("tabindex",this.nativeTabIndex);else{i.before(t),t.classList.remove("pl-combobox-input"),this.hadInputClass&&t.classList.add("pl-input");for(let h of["role","aria-autocomplete","aria-expanded","aria-controls","aria-haspopup","aria-activedescendant"])t.removeAttribute(h)}i.remove()})}readItems(){let{el:t,options:e}=this;this.isSelect?(this.items=[...t.options].filter(i=>i!==this.placeholderOption).map(i=>({value:i.value,label:i.textContent.trim(),group:i.closest("optgroup")?.label||"",disabled:i.disabled||!!i.closest("optgroup")?.disabled,description:i.dataset.description||"",icon:i.dataset.icon||"",image:i.dataset.image||"",option:i})),this.selected=this.items.filter(i=>i.option.selected),!this.multiple&&this.placeholderOption?.selected&&(this.selected=[])):e.options?this.items=Fe(typeof e.options=="string"?e.options.split(",").map(i=>i.trim()):e.options):this.datalist&&(this.items=[...this.datalist.options].map(i=>({value:i.value,label:i.label||i.textContent.trim()||i.value,description:i.dataset.description||"",icon:i.dataset.icon||"",image:i.dataset.image||""}))),e.options&&this.isSelect&&this.setOptions(e.options,!0)}bind(){let{input:t,list:e,control:i,wrapper:s,options:o}=this;this.on(t,"input",()=>{this.syncing||(this.query=t.value,this.isSelect||this.wrapper.classList.toggle("pl-combobox-has-value",!!t.value),this.clearButton.hidden=!this.hasValue,this.isOpen?this.refreshList():this.open(!0))}),this.on(t,"keydown",a=>this.onKeydown(a)),this.on(i,"pointerdown",a=>{if(!(t.disabled||a.button>0)){if(a.target.closest(".pl-combobox-chip-remove, .pl-combobox-clear")){a.preventDefault();return}a.target!==t&&a.preventDefault(),t.focus(),this.isOpen?(a.target!==t||!o.search)&&this.close():this.open()}}),this.on(i,"click",a=>{let l=a.target.closest(".pl-combobox-chip-remove");if(l){let h=l.closest(".pl-combobox-chip")?.dataset.value;this.deselect(this.selected.find(c=>c.value===h))}else a.target.closest(".pl-combobox-clear")&&(this.clear(),t.focus())}),this.on(e,"pointerdown",a=>a.preventDefault()),this.on(e,"click",a=>{let l=a.target.closest(".pl-combobox-option"),h=this.visible.findIndex(c=>c.el===l);h>=0&&this.choose(h)}),this.on(e,"pointermove",a=>{let l=a.target.closest(".pl-combobox-option"),h=this.visible.findIndex(c=>c.el===l);h>=0&&h!==this.active&&!this.visible[h].item.disabled&&this.setActive(h,!1)}),this.on(document,"pointerdown",a=>{this.isOpen&&!s.contains(a.target)&&this.close()},!0),this.on(s,"focusout",a=>{this.isOpen&&!s.contains(a.relatedTarget)&&this.close()}),this.isSelect?(this.on(this.el,"focus",()=>t.focus()),this.on(this.el.form,"reset",()=>setTimeout(()=>!this.signal.aborted&&this.refresh()))):this.on(t,"change",()=>{this.syncing||this.emit("change",{value:t.value,item:null})});let{signal:n}=this;this.load=Be(a=>!n.aborted&&this.fetch(a),o.delay),this.onDestroy(()=>clearTimeout(this.typedTimer))}get hasValue(){return this.isSelect?this.selected.length>0:!!this.input.value}get value(){return this.isSelect?this.multiple?this.selected.map(t=>t.value):this.selected[0]?.value??"":this.input.value}renderValue(){let{input:t,control:e}=this,i=new Map([...e.querySelectorAll(".pl-combobox-chip")].map(s=>[s.dataset.value,s]));if(this.multiple){for(let s of this.selected){if(i.has(s.value)){i.delete(s.value);continue}let o=document.createElement("span");o.className="pl-combobox-chip",o.dataset.value=s.value,o.innerHTML=`<span class="pl-combobox-chip-label">${V(s.label)}</span><button class="pl-combobox-chip-remove" type="button" tabindex="-1" aria-label="${V(y("combobox.remove",{label:s.label},this.el))}">${ut("x")}</button>`,e.insertBefore(o,t)}i.forEach(s=>s.remove()),t.placeholder=this.selected.length?"":this.placeholder,this.isOpen||(t.value="")}else this.isSelect?(t.placeholder=this.placeholder,(!this.isOpen||!this.query)&&(t.value=this.selected[0]?.label||"")):t.placeholder=this.placeholder;this.clearButton.hidden=!this.hasValue,this.wrapper.classList.toggle("pl-combobox-has-value",this.hasValue)}commit(t=null){let{el:e}=this;if(this.isSelect){let i=new Set(this.selected.map(s=>s.value));for(let s of this.selected)(!s.option||s.option.parentNode===null)&&(s.option=new Option(s.label,s.value),e.append(s.option));for(let s of e.options)s.selected=i.has(s.value)&&s!==this.placeholderOption;this.selected.length||(this.placeholderOption?this.placeholderOption.selected=!0:this.multiple||(e.selectedIndex=-1))}else t&&(this.input.value=t.label,this.input.dataset.value=t.value);this.renderValue(),this.syncing=!0,e.dispatchEvent(new Event("change",{bubbles:!0})),this.syncing=!1,this.emit("change",{value:this.value,item:t,items:[...this.selected]})}choose(t){let e=this.visible[t];if(!e||e.item.disabled)return;let{item:i}=e;if(e.create&&(i={value:this.query.trim(),label:this.query.trim(),created:!0},this.items.push(i),this.emit("create",{item:i})),this.multiple){let s=this.selected.findIndex(o=>o.value===i.value);s>=0?this.selected.splice(s,1):this.selected.push(i),this.query="",this.input.value="",this.commit(i),this.options.closeOnSelect?this.close():this.refreshList(i.value)}else this.selected=this.isSelect?[i]:[],this.query="",this.commit(i),this.close()}deselect(t){t&&(this.selected=this.selected.filter(e=>e!==t),this.commit(t),this.isOpen&&this.refreshList())}setValue(t,e=!1){let i=(Array.isArray(t)?t:t==null||t===""?[]:[t]).map(String);if(this.isSelect)this.selected=i.map(s=>this.items.find(o=>o.value===s)).filter(Boolean),this.multiple||(this.selected=this.selected.slice(0,1));else{let s=this.items.find(o=>o.value===i[0]);this.input.value=s?.label??i[0]??""}this.query="",e?this.renderValue():this.commit(null),this.isOpen&&this.refreshList()}clear(){this.selected=[],this.query="",this.input.value="",delete this.input.dataset.value,this.commit(null),this.isOpen&&this.refreshList()}setOptions(t,e=!1){let i=Fe(t);if(this.isSelect){let s=new Set(this.selected.map(o=>o.value));[...this.el.options].forEach(o=>{o!==this.placeholderOption&&!s.has(o.value)&&o.remove()}),this.el.querySelectorAll("optgroup:empty").forEach(o=>o.remove());for(let o of i){let n=this.selected.find(a=>a.value===o.value);n?(o.option=n.option,this.selected[this.selected.indexOf(n)]=o):(o.option=new Option(o.label,o.value),o.option.disabled=!!o.disabled,this.el.append(o.option))}}this.items=i,!e&&this.isOpen&&this.refreshList()}refresh(){this.readItems(),this.renderValue(),this.isOpen&&this.refreshList()}refreshList(t){let{options:e}=this;if(e.source){if(this.query.length<e.minLength){this.request++,this.setLoading(!1),this.items=this.isSelect?[...this.selected]:[],this.renderList(e.minLength>0?y("combobox.minLength",{n:e.minLength},this.el):e.emptyText);return}this.setLoading(!0),this.visible.length||this.renderMessage(e.loadingText,!0),this.load(this.query);return}this.renderList(null,t)}async fetch(t){let{options:e}=this,i=++this.request,{signal:s}=this;try{let o=e.source,n=typeof o=="function"?await o(t,{signal:s}):await fetch(`${o}${encodeURIComponent(t)}`,{signal:s}).then(l=>l.json());if(s.aborted||i!==this.request)return;let a=Fe(n);this.items=a.map(l=>this.selected.find(h=>h.value===l.value)||l),this.setLoading(!1),this.isOpen&&this.renderList(null,void 0,!0)}catch(o){if(s.aborted||i!==this.request)return;this.setLoading(!1),this.renderMessage(y("combobox.error",{},this.el)),this.emit("error",{error:o})}}setLoading(t){this.wrapper.classList.toggle("pl-combobox-loading",t),this.input.setAttribute("aria-busy",String(t))}renderMessage(t,e=!1){this.visible=[],this.active=-1,this.input.removeAttribute("aria-activedescendant"),this.list.innerHTML=`<div class="pl-combobox-empty${e?" pl-combobox-empty-loading":""}" role="presentation">${e?'<span class="pl-combobox-spinner"></span>':""}${V(t)}</div>`}renderList(t=null,e,i=!1){let{list:s,options:o}=this,n=this.query.trim(),a=ot(n),l=a&&o.search&&!i&&!o.source,h=new Set(this.selected.map(u=>u.value)),c=this.items.filter(u=>!l||ot(u.label).includes(a)||u.description&&ot(u.description).includes(a));this.visible=[],s.innerHTML="";let p=null,m=s;c.forEach(u=>{if((u.group||"")!==(p??""))if(p=u.group||"",p){m=document.createElement("div"),m.className="pl-combobox-group",m.setAttribute("role","group");let A=document.createElement("div");A.className="pl-combobox-group-label",A.id=k("pl-combobox-group"),A.textContent=p,m.setAttribute("aria-labelledby",A.id),m.append(A),s.append(m)}else m=s;let g=this.isSelect?h.has(u.value):!1,w=this.optionEl(u,a,g);m.append(w),this.visible.push({item:u,el:w})});let b=this.items.some(u=>ot(u.label)===a);if(o.creatable&&n&&!b){let u=document.createElement("div");u.className="pl-combobox-option pl-combobox-create",u.setAttribute("role","option"),u.setAttribute("aria-selected","false"),u.id=k(`${s.id}-o`),u.innerHTML=`<span class="pl-combobox-option-icon">${ut("plus")}</span><span class="pl-combobox-option-text">${V(o.createText)} \u201E<strong>${V(n)}</strong>\u201D</span>`,s.append(u),this.visible.push({item:{value:n,label:n},el:u,create:!0})}if(!this.visible.length){this.renderMessage(t||o.emptyText);return}let f=-1;e!==void 0&&(f=this.visible.findIndex(u=>u.item.value===e)),f<0&&!n&&this.isSelect&&!this.multiple&&(f=this.visible.findIndex(u=>h.has(u.item.value))),f<0&&(n&&this.isSelect||!o.search)&&(f=this.visible.findIndex(u=>!u.item.disabled)),this.active=-1,this.input.removeAttribute("aria-activedescendant"),f>=0&&this.setActive(f)}optionEl(t,e,i){let s=document.createElement("div");s.className="pl-combobox-option",s.id=k(`${this.list.id}-o`),s.setAttribute("role","option"),s.setAttribute("aria-selected",String(i)),t.disabled&&(s.setAttribute("aria-disabled","true"),s.classList.add("pl-disabled"));let o=V(t.label);if(e&&this.options.highlight){let a=ot(t.label).indexOf(e);a>=0&&(o=`${V(t.label.slice(0,a))}<mark>${V(t.label.slice(a,a+e.length))}</mark>${V(t.label.slice(a+e.length))}`)}let n="";return t.image?n=`<img class="pl-combobox-option-image" src="${V(t.image)}" alt="">`:t.icon&&(n=`<span class="pl-combobox-option-icon">${ut(t.icon)}</span>`),s.innerHTML=n+`<span class="pl-combobox-option-text"><span class="pl-combobox-option-label">${o}</span>${t.description?`<span class="pl-combobox-option-description">${V(t.description)}</span>`:""}</span><span class="pl-combobox-check">${ut("check")}</span>`,s}setActive(t,e=!0){this.visible[this.active]?.el.classList.remove("pl-active"),this.active=t;let i=this.visible[t];if(!i){this.input.removeAttribute("aria-activedescendant");return}i.el.classList.add("pl-active"),this.input.setAttribute("aria-activedescendant",i.el.id),e&&this.isOpen&&i.el.scrollIntoView({block:"nearest"})}move(t,e=this.active){let i=this.visible.length;if(!i)return;let s=e;for(let o=0;o<i;o++)if(s=(s+t+i)%i,!this.visible[s].item.disabled)return this.setActive(s)}edge(t){let i=(t?[...this.visible.keys()].reverse():[...this.visible.keys()]).find(s=>!this.visible[s].item.disabled);i!==void 0&&this.setActive(i)}onKeydown(t){let{input:e,options:i}=this,{key:s}=t;switch(s){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),t.altKey&&s==="ArrowUp")return this.close();this.isOpen?this.active<0?this.edge(s==="ArrowUp"):this.move(s==="ArrowDown"?1:-1):(this.open(),this.active<0&&this.edge(s==="ArrowUp"));break;case"Home":case"End":if(!this.isOpen)return;t.preventDefault(),this.edge(s==="End");break;case"PageDown":case"PageUp":if(!this.isOpen)return;t.preventDefault();{let o=Math.min(Math.max(this.active+(s==="PageDown"?8:-8),0),this.visible.length-1);this.visible[o]?.item.disabled?this.move(s==="PageDown"?1:-1,o):this.setActive(o)}break;case"Enter":this.isOpen&&(this.active>=0?(t.preventDefault(),this.choose(this.active)):this.isSelect?t.preventDefault():this.close());break;case"Escape":this.isOpen?(t.preventDefault(),t.stopPropagation(),this.close()):i.clearable&&this.hasValue&&(t.preventDefault(),this.clear());break;case"Tab":this.isOpen&&this.close();break;case"Backspace":this.multiple&&!e.value&&this.selected.length&&this.deselect(this.selected[this.selected.length-1]);break;case" ":i.search||(t.preventDefault(),this.isOpen&&this.active>=0?this.choose(this.active):this.open());break;default:!i.search&&s.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&this.typeahead(s)}}typeahead(t){clearTimeout(this.typedTimer),this.typed+=ot(t),this.typedTimer=setTimeout(()=>{this.typed=""},600),this.isOpen||this.open();let e=this.typed.length===1?this.active+1:Math.max(this.active,0),i=[...this.visible.keys()],o=[...i.slice(e),...i.slice(0,e)].find(n=>!this.visible[n].item.disabled&&ot(this.visible[n].item.label).startsWith(this.typed));o!==void 0&&this.setActive(o)}open(t=!1){let{input:e,list:i,options:s}=this;this.isOpen||e.disabled||this.emit("beforeopen",{},!0)&&(this.isOpen=!0,t||(this.query="",this.isSelect&&!this.multiple&&s.search&&e.select()),this.wrapper.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),i.classList.remove("pl-combobox-list-out"),B(i),this.refreshList(),this.stopPlace?.(),this.stopPlace=Q(i,this.control,{placement:s.placement,offset:s.offset,matchWidth:!0}),this.visible[this.active]?.el.scrollIntoView({block:"nearest"}),this.emit("open"))}async close(){let{input:t,list:e}=this;if(!this.isOpen)return;this.isOpen=!1,this.request++,this.setLoading(!1),this.query="",this.wrapper.classList.remove("pl-open"),t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),this.isSelect&&this.renderValue(),this.emit("close"),e.classList.add("pl-combobox-list-out");let{signal:i}=this;await D(e),!(i.aborted||this.isOpen)&&(this.stopPlace?.(),this.stopPlace=null,e.classList.remove("pl-combobox-list-out"),P(e))}toggle(){return this.isOpen?this.close():this.open()}};d(ue,"defaults",{placeholder:"",clearable:!1,creatable:!1,search:!0,highlight:!0,closeOnSelect:null,options:null,source:null,minLength:0,delay:220,placement:"bottom-start",offset:6,emptyText:null,loadingText:null,createText:null});v("combobox",ue);var ki=r=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${W[r]||""}</svg>`,rt=(r,t=2)=>String(r).padStart(t,"0"),Li=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),tt=()=>Li(new Date),nt=r=>r?`${rt(r.getFullYear(),4)}-${rt(r.getMonth()+1)}-${rt(r.getDate())}`:"",G=(r,t)=>!!r&&!!t&&r.getTime()===t.getTime(),Y=(r,t)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+t),fe=(r,t)=>new Date(r,t+1,0).getDate(),Dt=(r,t)=>{let e=new Date(r.getFullYear(),r.getMonth()+t,1);return e.setDate(Math.min(r.getDate(),fe(e.getFullYear(),e.getMonth()))),e};function F(r){if(r==null||r==="")return null;if(r instanceof Date)return Number.isNaN(r.getTime())?null:Li(r);if(typeof r=="number")return Y(tt(),r);let t=String(r).trim();if(t==="today")return tt();if(/^[+-]\d+$/.test(t))return Y(tt(),Number(t));let e=t.match(/^(\d{4})-(\d{1,2})-(\d{1,2})/);if(!e)return null;let i=new Date(Number(e[1]),Number(e[2])-1,Number(e[3]));return i.getMonth()===Number(e[2])-1?i:null}var Ai=/yyyy|yy|MMMM|MMM|MM|M|dd|d/g,hs=["dialog","prevMonth","nextMonth","prevYear","nextYear","prevYears","nextYears","pickMonth","pickYear","today","clear"],me=class extends x{init(){let{el:t,options:e}=this;this.isInput=t.tagName==="INPUT",this.inline=!!e.inline||!this.isInput,this.input=this.isInput?t:null,e.locale??(e.locale=q(t));let i=Object.fromEntries(hs.map(o=>[o,y(`datepicker.${o}`,{},t)]));this.labels={...i,...e.labels||{}},this.isOpen=!1,this.view="days",this.start=null,this.end=null,this.hover=null,this.setup(),e.name&&(this.hidden=document.createElement("input"),this.hidden.type="hidden",this.hidden.name=e.name,t.after(this.hidden)),this.build();let s=e.value||t.dataset.value||"";s?this.assign(String(s).split("/").map(F)):this.input?.value&&this.assign(this.parse(this.input.value)),this.cursor=this.clampDate(this.start||tt()),this.write(!0),this.inline?(this.picker.classList.add("pl-datepicker-inline"),this.isInput?t.after(this.picker):t.append(this.picker),this.render()):(this.picker.hidden=!0,this.picker.setAttribute("role","dialog"),this.picker.setAttribute("aria-label",this.labels.dialog),this.picker.id||(this.picker.id=k("pl-datepicker")),this.ownRole=this.isInput&&!t.hasAttribute("role"),this.ownRole&&t.setAttribute("role","combobox"),t.setAttribute("aria-controls",this.picker.id),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false"),t.autocomplete="off"),this.bind(),this.onDestroy(()=>{this.stopPlace?.(),this.picker.remove(),this.hidden?.remove(),this.inline||(t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls"),this.ownRole&&t.removeAttribute("role"))})}setup(){let{options:t}=this;this.min=F(t.min),this.max=F(t.max);let e=o=>(Array.isArray(o)?o:String(o??"").split(",")).map(n=>String(n).trim()).filter(Boolean);this.disabledDays=new Set(e(t.disabledDays).map(Number)),this.disabledDates=new Set(e(t.disabledDates).map(o=>nt(F(o))));let i=o=>{try{return new Intl.DateTimeFormat(t.locale,o)}catch{return new Intl.DateTimeFormat("en",o)}};this.fmt={title:i({month:"long",year:"numeric"}),full:i({weekday:"long",day:"numeric",month:"long",year:"numeric"}),month:i({month:"long"}),monthShort:i({month:"short"}),weekday:i({weekday:"short"}),weekdayLong:i({weekday:"long"})},this.monthNames=Array.from({length:12},(o,n)=>this.fmt.month.format(new Date(2024,n,1)));let s=i({day:"numeric",month:"long"});this.monthNamesDay=Array.from({length:12},(o,n)=>s.formatToParts(new Date(2024,n,1)).find(a=>a.type==="month")?.value||this.monthNames[n]),this.monthShort=Array.from({length:12},(o,n)=>this.fmt.monthShort.format(new Date(2024,n,1)).replace(".",""))}build(){let{labels:t}=this,e=this.picker=document.createElement("div");e.className="pl-datepicker",this.options.range&&e.classList.add("pl-datepicker-range"),this.titleId=k("pl-datepicker"),e.innerHTML=`<div class="pl-datepicker-header"><button class="pl-datepicker-title" type="button" id="${this.titleId}" aria-live="polite"></button><span class="pl-datepicker-nav"><button class="pl-datepicker-prev" type="button" aria-label="${t.prevMonth}">${ki("chevron-left")}</button><button class="pl-datepicker-next" type="button" aria-label="${t.nextMonth}">${ki("chevron-right")}</button></span></div><div class="pl-datepicker-body"></div>`+(this.options.footer?`<div class="pl-datepicker-footer"><button class="pl-datepicker-action pl-datepicker-action-today" type="button">${t.today}</button><button class="pl-datepicker-action pl-datepicker-action-clear" type="button">${t.clear}</button></div>`:""),this.title=e.querySelector(".pl-datepicker-title"),this.body=e.querySelector(".pl-datepicker-body"),this.prevButton=e.querySelector(".pl-datepicker-prev"),this.nextButton=e.querySelector(".pl-datepicker-next")}bind(){let{picker:t,input:e}=this;if(this.on(t,"click",i=>{let s=i.target.closest("button");if(!s||!t.contains(s)||s.getAttribute("aria-disabled")==="true")return;if(s===this.prevButton)return this.shift(-1);if(s===this.nextButton)return this.shift(1);if(s===this.title)return this.setView(this.view==="days"?"months":this.view==="months"?"years":"days");if(s.classList.contains("pl-datepicker-action-today"))return this.goToday();if(s.classList.contains("pl-datepicker-action-clear"))return this.clear();if(s.dataset.date)return this.select(F(s.dataset.date));let o=i.detail===0;if(s.dataset.month)return this.cursor=this.clampDate(new Date(this.cursor.getFullYear(),Number(s.dataset.month),Math.min(this.cursor.getDate(),fe(this.cursor.getFullYear(),Number(s.dataset.month))))),this.setView("days",o);if(s.dataset.year){let n=Number(s.dataset.year);return this.cursor=this.clampDate(new Date(n,this.cursor.getMonth(),Math.min(this.cursor.getDate(),fe(n,this.cursor.getMonth())))),this.setView("months",o)}}),this.on(t,"keydown",i=>this.onKeydown(i)),this.options.range){let i=s=>{let o=F(s.target.closest?.("[data-date]")?.dataset.date);!G(o,this.hover)&&(o||this.hover)&&(this.hover=o,this.paint())};this.on(t,"pointerover",i),this.on(t,"focusin",i),this.on(t,"pointerleave",()=>{this.hover=null,this.paint()})}e&&this.on(e,"change",()=>{if(this.writing)return;let i=this.parse(e.value);if(i.length&&i.every(s=>s&&!this.isDisabled(s))){let s=this.value;if(this.assign(i),this.value===s)return this.write(!0);this.cursor=this.clampDate(this.start),this.write(),this.emitChange()}else e.value.trim()?this.write(!0):this.clear();(this.isOpen||this.inline)&&this.render()}),!this.inline&&(this.on(t,"pointerdown",i=>{document.activeElement===e&&i.preventDefault()}),this.on(e,"click",()=>this.open()),this.on(e,"input",()=>{if(this.writing)return;let i=this.parse(e.value);this.isOpen||this.open(),i.length&&i.every(Boolean)&&(this.cursor=this.clampDate(i[0]),this.render())}),this.on(e,"keydown",i=>{i.key==="ArrowDown"||i.key==="ArrowUp"&&i.altKey?(i.preventDefault(),this.open(),this.focusCursor()):i.key==="Escape"&&this.isOpen?(i.preventDefault(),i.stopPropagation(),this.close()):i.key==="Enter"&&this.isOpen?(i.preventDefault(),e.dispatchEvent(new Event("change",{bubbles:!0})),this.close()):i.key==="Tab"&&this.close()}),this.on(document,"pointerdown",i=>{let{target:s}=i;!this.isOpen||t.contains(s)||s===e||[...e.labels||[]].some(o=>o.contains(s))||this.close()},!0),this.on(t,"focusout",i=>{let s=i.relatedTarget;this.isOpen&&s&&!t.contains(s)&&s!==e&&this.close()}))}isDisabled(t){return this.min&&t<this.min||this.max&&t>this.max||this.disabledDays.has(t.getDay())||this.disabledDates.has(nt(t))}clampDate(t){return this.min&&t<this.min?new Date(this.min):this.max&&t>this.max?new Date(this.max):t}format(t){if(!t)return"";let e={yyyy:rt(t.getFullYear(),4),yy:rt(t.getFullYear()%100),MMMM:(/\bd/.test(this.options.format)?this.monthNamesDay:this.monthNames)[t.getMonth()],MMM:this.monthShort[t.getMonth()],MM:rt(t.getMonth()+1),M:t.getMonth()+1,dd:rt(t.getDate()),d:t.getDate()};return this.options.format.replace(Ai,i=>e[i])}parseOne(t){if(t=t.trim(),!t)return null;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(t))return F(t);let e=[],i=this.options.format.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(Ai,h=>(e.push(h),h==="yyyy"?"(\\d{4})":h==="yy"?"(\\d{2})":h==="MMMM"||h==="MMM"?"([^\\s\\d.,/-]+)":"(\\d{1,2})")),s=t.match(new RegExp(`^${i}$`,"i"));if(!s)return null;let o=new Date,n=o.getFullYear(),a=o.getMonth(),l=1;return e.forEach((h,c)=>{let p=s[c+1];if(h==="yyyy")n=Number(p);else if(h==="yy")n=2e3+Number(p);else if(h==="MMMM"){let m=b=>b.findIndex(f=>f.toLowerCase()===p.toLowerCase());a=m(this.monthNamesDay)>=0?m(this.monthNamesDay):m(this.monthNames)}else h==="MMM"?a=this.monthShort.findIndex(m=>m.toLowerCase()===p.toLowerCase().replace(".","")):h==="MM"||h==="M"?a=Number(p)-1:l=Number(p)}),a<0||a>11||l<1||l>fe(n,a)?null:new Date(n,a,l)}parse(t){if(t=String(t||"").trim(),!t)return[];if(this.options.range){let e=this.options.separator.trim()||"\u2013",i=t.split(new RegExp(`\\s*(?:${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}|\u2013|\u2014|\\s-\\s|/)\\s*`));return i.length===2?i.map(s=>this.parseOne(s)):t.includes("/")?t.split("/").map(F):[this.parseOne(t)]}return[this.parseOne(t)]}assign(t){if(t=(t||[]).filter(Boolean),this.options.range){let[e=null,i=null]=t;this.start=e&&i&&i<e?i:e,this.end=e&&i&&i<e?e:i}else this.start=t[0]||null,this.end=null}get value(){return this.options.range?this.start&&this.end?`${nt(this.start)}/${nt(this.end)}`:"":nt(this.start)}write(t=!1){let{el:e,input:i,options:s}=this,o=this.value,n="";s.range?n=this.start&&this.end?`${this.format(this.start)}${s.separator}${this.format(this.end)}`:"":n=this.format(this.start),o?e.dataset.value=o:delete e.dataset.value,this.hidden&&(this.hidden.value=o),!(!i||i.value===n)&&(i.value=n,!t&&(this.writing=!0,i.dispatchEvent(new Event("input",{bubbles:!0})),i.dispatchEvent(new Event("change",{bubbles:!0})),this.writing=!1))}emitChange(){this.emit("change",{value:this.value,date:this.start?new Date(this.start):null,start:this.start?new Date(this.start):null,end:this.end?new Date(this.end):null,formatted:this.input?this.input.value:this.options.range?[this.format(this.start),this.format(this.end)].join(this.options.separator):this.format(this.start)})}select(t){if(!t||this.isDisabled(t))return;let{options:e}=this,i=this.picker.contains(document.activeElement);this.cursor=t;let s=!0;e.range?!this.start||this.end?(this.start=t,this.end=null,s=!1):t<this.start?(this.end=this.start,this.start=t):this.end=t:this.start=t,this.hover=null,this.monthOf(t)!==this.shownMonth?this.render(this.monthOf(t)>this.shownMonth?"next":"prev"):this.paint(!0),i&&this.focusCursor(),s&&(this.write(),this.emitChange(),!this.inline&&e.closeOnSelect&&this.close(!0))}goToday(){let t=tt();if(this.view="days",!this.options.range&&!this.isDisabled(t))return this.cursor=t,this.render(),this.select(t);this.cursor=this.clampDate(t),this.render()}setDate(t,e=!1){this.assign((Array.isArray(t)?t:[t]).map(F)),this.start&&(this.cursor=this.clampDate(this.start)),this.write(e),(this.isOpen||this.inline)&&this.render(),e||this.emitChange()}getDate(){let t=e=>e?new Date(e):null;return this.options.range?[t(this.start),t(this.end)]:t(this.start)}clear(){let t=!!this.start;this.start=null,this.end=null,this.hover=null,this.write(),(this.isOpen||this.inline)&&this.paint(),t&&this.emitChange()}update(t={}){Object.assign(this.options,t),this.setup(),this.cursor=this.clampDate(this.cursor),(this.isOpen||this.inline)&&this.render()}monthOf(t){return t.getFullYear()*12+t.getMonth()}setView(t,e=this.picker.contains(document.activeElement)){this.view=t,this.render("zoom"),e&&this.focusCursor()}shift(t,e=!1){let{cursor:i}=this;this.view==="days"?this.cursor=Dt(i,t):this.view==="months"?this.cursor=Dt(i,t*12):this.cursor=Dt(i,t*144),this.cursor=this.clampDate(this.cursor),this.render(t>0?"next":"prev"),e&&this.focusCursor()}render(t=""){let{cursor:e,labels:i,view:s}=this,o=e.getFullYear(),n=e.getMonth(),a=document.createElement("div");if(a.className=`pl-datepicker-view pl-datepicker-${s}`,t&&a.classList.add(`pl-datepicker-anim-${t}`),this.picker.dataset.view=s,s==="days"){this.shownMonth=this.monthOf(e);let l=this.fmt.title.format(e);this.title.textContent=l.charAt(0).toLocaleUpperCase(this.options.locale)+l.slice(1),this.title.setAttribute("aria-label",`${this.title.textContent} \u2014 ${i.pickMonth}`),this.prevButton.setAttribute("aria-label",i.prevMonth),this.nextButton.setAttribute("aria-label",i.nextMonth),this.setNav(this.min&&new Date(o,n,0)<this.min,this.max&&new Date(o,n+1,1)>this.max);let h=Number(this.options.weekStart)||0,c=new Date(2024,0,1),p="";for(let g=0;g<7;g++){let w=Y(c,(h+g+6)%7),A=w.getDay()===0||w.getDay()===6;p+=`<th scope="col" abbr="${this.fmt.weekdayLong.format(w)}"${A?' class="pl-datepicker-weekend"':""}>${this.fmt.weekday.format(w).replace(".","")}</th>`}let m=new Date(o,n,1),b=(m.getDay()-h+7)%7,f=Y(m,-b),u="";for(let g=0;g<6;g++){u+="<tr>";for(let w=0;w<7;w++)u+=`<td role="gridcell"><button class="pl-datepicker-day${f.getMonth()!==n?" pl-datepicker-outside":""}" type="button" tabindex="-1" data-date="${nt(f)}" aria-label="${this.fmt.full.format(f)}">${f.getDate()}</button></td>`,f=Y(f,1);u+="</tr>"}a.innerHTML=`<table class="pl-datepicker-grid" role="grid" aria-labelledby="${this.titleId}"><thead><tr>${p}</tr></thead><tbody>${u}</tbody></table>`}else if(s==="months"){this.title.textContent=String(o),this.title.setAttribute("aria-label",`${o} \u2014 ${i.pickYear}`),this.prevButton.setAttribute("aria-label",i.prevYear),this.nextButton.setAttribute("aria-label",i.nextYear),this.setNav(this.min&&o<=this.min.getFullYear(),this.max&&o>=this.max.getFullYear());let l=tt();a.innerHTML=this.monthShort.map((h,c)=>{let p=this.min&&new Date(o,c+1,0)<this.min||this.max&&new Date(o,c,1)>this.max,m=[this.start,this.end].some(f=>f&&f.getFullYear()===o&&f.getMonth()===c),b=l.getFullYear()===o&&l.getMonth()===c;return`<button class="pl-datepicker-cell${m?" pl-datepicker-selected":""}${b?" pl-datepicker-current":""}" type="button" data-month="${c}" tabindex="${c===n?0:-1}" aria-label="${this.monthNames[c]} ${o}"${m?' aria-pressed="true"':""}${p?' aria-disabled="true"':""}>${h}</button>`}).join("")}else{let l=Math.floor(o/12)*12;this.title.textContent=`${l} \u2013 ${l+11}`,this.title.setAttribute("aria-label",this.title.textContent),this.prevButton.setAttribute("aria-label",i.prevYears),this.nextButton.setAttribute("aria-label",i.nextYears),this.setNav(this.min&&l<=this.min.getFullYear(),this.max&&l+11>=this.max.getFullYear());let h=tt().getFullYear(),c="";for(let p=l;p<l+12;p++){let m=this.min&&p<this.min.getFullYear()||this.max&&p>this.max.getFullYear(),b=[this.start,this.end].some(f=>f&&f.getFullYear()===p);c+=`<button class="pl-datepicker-cell${b?" pl-datepicker-selected":""}${p===h?" pl-datepicker-current":""}" type="button" data-year="${p}" tabindex="${p===o?0:-1}"${b?' aria-pressed="true"':""}${m?' aria-disabled="true"':""}>${p}</button>`}a.innerHTML=c}this.body.replaceChildren(a),s==="days"&&this.paint()}setNav(t,e){this.prevButton.disabled=!!t,this.nextButton.disabled=!!e}paint(t=!1){if(this.view!=="days")return;let{start:e,end:i,hover:s,cursor:o}=this,n=tt(),a=this.options.range,l=e,h=i,c=a&&e&&!i&&s&&!G(s,e);c&&(l=s<e?s:e,h=s<e?e:s);for(let p of this.body.querySelectorAll(".pl-datepicker-day")){let m=F(p.dataset.date),b=p.parentElement,f=this.isDisabled(m),u=G(m,e),g=G(m,i),w=u||g,A=!!(a&&l&&h&&m>=l&&m<=h&&!G(l,h)),M=p.classList.contains("pl-datepicker-selected");p.classList.toggle("pl-datepicker-today",G(m,n)),p.classList.toggle("pl-datepicker-selected",w),p.classList.toggle("pl-datepicker-pop",t&&w&&!M),p.classList.toggle("pl-disabled",f),f?p.setAttribute("aria-disabled","true"):p.removeAttribute("aria-disabled"),G(m,n)&&p.setAttribute("aria-current","date"),p.tabIndex=G(m,o)?0:-1,b.setAttribute("aria-selected",String(w||A&&!c)),b.classList.toggle("pl-datepicker-in-range",A),b.classList.toggle("pl-datepicker-preview",A&&!!c),b.classList.toggle("pl-datepicker-range-start",A&&G(m,l)),b.classList.toggle("pl-datepicker-range-end",A&&G(m,h))}}focusCursor(){(this.view==="days"?this.body.querySelector(`[data-date="${nt(this.cursor)}"]`):this.body.querySelector('[tabindex="0"]')||this.body.querySelector("button"))?.focus()}moveCursor(t){t=this.clampDate(t);let e=this.monthOf(this.cursor),i=this.monthOf(t);this.cursor=t,i!==e||i!==this.shownMonth?this.render(i>e?"next":"prev"):this.paint(),this.focusCursor()}onKeydown(t){let{key:e}=t,i=t.target;if(e==="Escape"&&!this.inline)return t.preventDefault(),t.stopPropagation(),this.close(!0);if(e==="Tab"&&!this.inline){let s=pt(this.picker),o=s[0],n=s[s.length-1];t.shiftKey&&i===o?(t.preventDefault(),n.focus()):!t.shiftKey&&i===n&&(t.preventDefault(),o.focus());return}if(this.view==="days"&&i.dataset?.date){let s=F(i.dataset.date),o=Number(this.options.weekStart)||0,n=(s.getDay()-o+7)%7,a={ArrowLeft:()=>Y(s,-1),ArrowRight:()=>Y(s,1),ArrowUp:()=>Y(s,-7),ArrowDown:()=>Y(s,7),Home:()=>Y(s,-n),End:()=>Y(s,6-n),PageUp:()=>Dt(s,t.shiftKey?-12:-1),PageDown:()=>Dt(s,t.shiftKey?12:1)};a[e]&&(t.preventDefault(),this.moveCursor(a[e]()));return}if(i.classList?.contains("pl-datepicker-cell")){let s=[...this.body.querySelectorAll(".pl-datepicker-cell")],o=s.indexOf(i),n={ArrowLeft:-1,ArrowRight:1,ArrowUp:-3,ArrowDown:3}[e],a=null;if(n)a=o+n;else if(e==="Home")a=0;else if(e==="End")a=s.length-1;else if(e==="PageUp"||e==="PageDown"){t.preventDefault(),this.shift(e==="PageDown"?1:-1,!0);return}if(a===null)return;t.preventDefault(),a<0||a>=s.length?(this.shift(a<0?-1:1),[...this.body.querySelectorAll(".pl-datepicker-cell")][(a+s.length)%s.length]?.focus()):s[a].focus()}}open(){let{picker:t,el:e,options:i}=this;if(this.inline||this.isOpen||e.disabled||e.readOnly||!this.emit("beforeopen",{},!0))return;this.isOpen=!0,this.view="days",this.hover=null,this.cursor=this.clampDate(this.start||this.cursor||tt());let s=e.closest("dialog, [data-pl-theme], [data-pl-accent]");(!s||s===document.documentElement)&&(s=document.body),t.parentElement!==s&&s.append(t),t.classList.remove("pl-datepicker-out"),this.render(),B(t),this.stopPlace?.(),this.stopPlace=Q(t,e,{placement:i.placement,offset:i.offset}),e.setAttribute("aria-expanded","true"),e.classList.add("pl-datepicker-active"),this.emit("open")}async close(t=!1){let{picker:e,el:i}=this;if(this.inline||!this.isOpen)return;this.isOpen=!1,this.options.range&&this.start&&!this.end&&this.assign((i.dataset.value||"").split("/").map(F)),i.setAttribute("aria-expanded","false"),i.classList.remove("pl-datepicker-active"),(t||e.contains(document.activeElement))&&i.focus({preventScroll:!0}),this.emit("close"),e.classList.add("pl-datepicker-out");let{signal:s}=this;await D(e),!(s.aborted||this.isOpen)&&(this.stopPlace?.(),this.stopPlace=null,e.classList.remove("pl-datepicker-out"),P(e))}toggle(){return this.isOpen?this.close():this.open()}};d(me,"defaults",{inline:!1,range:!1,value:"",min:null,max:null,disabledDays:"",disabledDates:"",locale:null,format:"dd.MM.yyyy",separator:" \u2013 ",weekStart:1,name:"",footer:!1,closeOnSelect:!0,placement:"bottom-start",offset:6,labels:null});v("datepicker",me);var ge=class extends x{init(){let{el:t,options:e}=this,i=t.matches("input");this.inputs=i?[t]:T('input[type="range"]',t).slice(0,2),this.inputs.length&&(this.dual=!i&&this.inputs.length===2&&(e.dual||t.classList.contains("pl-range-dual")),this.dual||(this.inputs=[this.inputs[0]]),this.dual&&t.classList.add("pl-range-dual"),this.outputs=e.output?C(t,e.output):[],this.bubbles=[],this.ticks=null,this.created=[],e.tooltip&&this.buildBubbles(),e.ticks>1&&this.buildTicks(),this.ticks||(this.ticks=this.host?.querySelector(".pl-range-ticks")||(this.dual&&t.nextElementSibling?.matches(".pl-range-ticks")?t.nextElementSibling:null)),this.inputs.forEach((s,o)=>{this.on(s,"input",()=>{this.dual&&this.constrain(o),this.update(),this.emit("input",this.detail())}),this.on(s,"change",()=>this.emit("change",this.detail()))}),this.on(this.inputs[0].form,"reset",()=>requestAnimationFrame(()=>!this.signal.aborted&&this.update())),this.dual&&(this.constrain(1),this.on(t,"pointerdown",s=>this.jump(s)),this.on(t,"pointermove",s=>{s.buttons||this.raise(this.nearest(this.ratioAt(s.clientX)))})),this.onDestroy(()=>{this.created.forEach(s=>s.remove());for(let s of this.inputs)s.style.removeProperty("--pl-range-ratio"),s.style.removeProperty("--pl-range-progress"),s.style.zIndex=""}),this.update())}get host(){if(this._host)return this._host;let{el:t}=this;return t.matches("input")?t.parentElement?.classList.contains("pl-range-wrap")?this._host=t.parentElement:null:this._host=t}ensureHost(){if(this.host)return this.host;let{el:t}=this,e=document.createElement("div");return e.className="pl-range-wrap",t.before(e),e.append(t),this._host=e}buildBubbles(){let t=this.ensureHost(),e=this.options.tooltip==="always";this.bubbles=this.inputs.map(()=>{let i=document.createElement("output");return i.className="pl-range-bubble",i.setAttribute("aria-hidden","true"),e&&i.classList.add("pl-range-bubble-always"),t.append(i),this.created.push(i),i})}buildTicks(){let t=this.ensureHost(),{min:e,max:i}=this.bounds(),s=Math.round(this.options.ticks),o=document.createElement("div");o.className="pl-range-ticks",o.setAttribute("aria-hidden","true");for(let n=0;n<s;n++){let a=this.snap(e+(i-e)*n/(s-1)),l=document.createElement("span");l.dataset.value=a,l.textContent=this.format(a),o.append(l)}this.dual?t.after(o):t.append(o),this.created.push(o),this.ticks=o}bounds(t=this.inputs[0]){let e=t.min===""?0:Number(t.min),i=t.max===""?100:Number(t.max),s=t.step==="any"?0:Number(t.step)||1;return{min:e,max:i,step:s}}snap(t,e=this.inputs[0]){let{min:i,max:s,step:o}=this.bounds(e);return o&&(t=Math.round((t-i)/o)*o+i),$(Number(t.toFixed(6)),i,s)}ratio(t){let{min:e,max:i}=this.bounds(t);return i>e?$((Number(t.value)-e)/(i-e),0,1):0}format(t){this.numberFormat??(this.numberFormat=new Intl.NumberFormat(q(this.el),{maximumFractionDigits:6}));let e=this.numberFormat.format(t);return`${this.options.prefix}${e}${this.options.suffix}`}get value(){let t=this.inputs.map(e=>Number(e.value));return this.dual?t:t[0]}detail(){let t=this.inputs.map(e=>Number(e.value));return{value:this.dual?t:t[0],values:t}}set(t){let e=Array.isArray(t)?t:[t];this.inputs.forEach((i,s)=>{e[s]!==void 0&&e[s]!==null&&(i.value=e[s])}),this.dual&&this.constrain(1),this.update(),this.emit("change",this.detail())}constrain(t){let[e,i]=this.inputs,s=Math.max(0,Number(this.options.gap)||0);Number(e.value)>Number(i.value)-s&&(t===0?e.value=Number(i.value)-s:i.value=Number(e.value)+s,Number(e.value)>Number(i.value)-s&&(t===0?i.value=Number(e.value)+s:e.value=Number(i.value)-s)),this.raise(t)}raise(t){this.dual&&this.inputs.forEach((e,i)=>{e.style.zIndex=i===t?"2":""})}thumbSize(){let t=getComputedStyle(this.inputs[0]).getPropertyValue("--pl-range-thumb").trim(),e=parseFloat(t);return Number.isNaN(e)?18:t.endsWith("rem")?e*parseFloat(getComputedStyle(document.documentElement).fontSize):e}ratioAt(t){let e=this.el.getBoundingClientRect(),i=this.thumbSize(),s=e.width-i;return s>0?$((t-e.left-i/2)/s,0,1):0}nearest(t){let[e,i]=this.inputs.map(s=>this.ratio(s));return e===i?t<e?0:1:Math.abs(t-e)<=Math.abs(t-i)?0:1}jump(t){if(t.target!==this.el||t.button>0)return;let e=this.ratioAt(t.clientX),i=this.nearest(e),s=this.inputs[i];if(s.disabled)return;t.preventDefault();let{min:o,max:n}=this.bounds(s);s.value=this.snap(o+e*(n-o),s),s.focus({preventScroll:!0}),s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0}))}update(){if(!this.inputs?.length)return;let t=this.inputs.map(n=>this.ratio(n)),e=this.inputs.map(n=>Number(n.value)),i=e.map(n=>this.format(n)),s=this.options.prefix||this.options.suffix;if(this.inputs.forEach((n,a)=>{n.style.setProperty("--pl-range-ratio",t[a].toFixed(4)),n.style.setProperty("--pl-range-progress",`${(t[a]*100).toFixed(2)}%`),s&&n.setAttribute("aria-valuetext",i[a]);let l=this.bubbles[a];l&&(l.style.setProperty("--pl-range-ratio",t[a].toFixed(4)),l.textContent=i[a])}),this.dual&&(this.el.style.setProperty("--pl-range-start",t[0].toFixed(4)),this.el.style.setProperty("--pl-range-end",t[1].toFixed(4))),this.ticks)for(let n of this.ticks.children)n.dataset.value!==void 0&&n.classList.toggle("pl-active",e.includes(Number(n.dataset.value)));let o=this.dual?`${i[0]} \u2013 ${i[1]}`:i[0];this.outputs.forEach((n,a)=>{n.textContent=this.dual&&this.outputs.length>1?i[a]??"":o})}};d(ge,"defaults",{dual:!1,tooltip:!1,ticks:0,gap:0,prefix:"",suffix:"",output:""});v("range",ge);var Ei=".pl-form-icon, .pl-form-affix, .pl-input-group, .pl-form-floating, .pl-form-field";function cs(r,t){r.value=t,r.dispatchEvent(new Event("input",{bubbles:!0})),r.dispatchEvent(new Event("change",{bubbles:!0}))}var be=class extends x{init(){let{el:t}=this;if(this.resizeBefore=t.style.resize,t.style.resize="none",this.options.minRows&&(t.rows=this.options.minRows),this.update=this.update.bind(this),this.on(t,"input",this.update),this.on(t.form,"reset",()=>requestAnimationFrame(()=>!this.signal.aborted&&this.update())),this.on(window,"resize",this.update,{passive:!0}),typeof ResizeObserver=="function"){let e=t.offsetWidth,i=new ResizeObserver(()=>{t.offsetWidth!==e&&(e=t.offsetWidth,this.update())});i.observe(t),this.onDestroy(()=>i.disconnect())}this.onDestroy(()=>{t.style.height="",t.style.overflowY="",t.style.resize=this.resizeBefore}),this.update()}update(){let{el:t}=this;if(!t.offsetParent&&!t.getClientRects().length)return;let e=getComputedStyle(t),i=t.offsetHeight-t.clientHeight;t.style.height="auto";let s=t.scrollHeight+i,o="hidden";if(this.options.maxRows){let a=(parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.5)*this.options.maxRows+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+i;s>a&&(s=a,o="auto")}t.style.overflowY=o,t.style.height=`${s}px`}};d(be,"defaults",{minRows:0,maxRows:0});v("autosize",be);var Ct=class extends x{init(){let{el:t}=this;this.input=this.options.target?C(t,this.options.target)[0]:t.closest(Ei)?.querySelector('input[type="password"], input[data-pl-password]'),this.input&&(t.matches("button")&&!t.hasAttribute("type")&&(t.type="button"),t.matches("button, a[href]")||(t.setAttribute("role","button"),t.tabIndex=0),this.input.id&&t.setAttribute("aria-controls",this.input.id),this.on(t,"click",e=>{e.preventDefault(),this.toggle()}),this.on(t,"keydown",e=>{(e.key==="Enter"||e.key===" ")&&!t.matches("button, a[href]")&&(e.preventDefault(),this.toggle())}),this.on(this.input.form,"submit",()=>this.hide()),this.sync())}get visible(){return!!this.input&&this.input.type!=="password"}sync(){let{el:t,options:e}=this,i=this.visible;t.setAttribute("aria-pressed",String(i)),t.setAttribute("aria-label",i?e.labelHide??y("password.hide",{},t):e.labelShow??y("password.show",{},t)),t.classList.toggle("pl-active",i);let s=t.matches("[data-pl-icon]")?t:E("[data-pl-icon]",t);if(s){let o=i?e.iconHide:e.iconShow,n=H(s,"icon");n?n.render(o):s.setAttribute("data-pl-icon",o)}}show(){this.set(!0)}hide(){this.set(!1)}toggle(){this.set(!this.visible)}set(t){!this.input||t===this.visible||(this.input.type=t?"text":"password",this.sync(),this.emit(t?"show":"hide",{input:this.input}))}};d(Ct,"defaults",{target:"",iconShow:"eye",iconHide:"eye-off",labelShow:null,labelHide:null}),d(Ct,"primary","target");v("password-toggle",Ct);var Ot=class extends x{init(){var s;let{el:t,options:e}=this;this.max=Number(e.max)||(t.maxLength>0?t.maxLength:0),this.counter=e.target&&C(t,e.target)[0]||t.closest(".pl-form-field")?.querySelector(".pl-form-count"),this.counter||(this.counter=document.createElement("span"),this.counter.className="pl-form-help pl-form-count",(t.closest(".pl-form-icon, .pl-form-affix, .pl-input-group, .pl-form-floating")||t).after(this.counter),this.onDestroy(()=>this.counter.remove())),(s=this.counter).id||(s.id=k("pl-count"));let i=t.getAttribute("aria-describedby");i?.split(" ").includes(this.counter.id)||t.setAttribute("aria-describedby",i?`${i} ${this.counter.id}`:this.counter.id),this.update=this.update.bind(this),this.on(t,"input",this.update),this.on(t.form,"reset",()=>requestAnimationFrame(()=>!this.signal.aborted&&this.update())),this.update()}update(){let{el:t,counter:e,max:i,options:s}=this,o=t.value.length,n=i-o;e.textContent=i?s.template.replace("{count}",o).replace("{max}",i).replace("{left}",n):String(o);let a=!!i&&o>i,l=!!i&&!a&&o>=i*s.warn;e.classList.toggle("pl-form-count-warning",l),e.classList.toggle("pl-form-count-danger",a||!!i&&o===i),a!==this.over&&(this.over=a,this.emit(a?"exceed":"within",{count:o,max:i}))}};d(Ot,"defaults",{max:0,target:"",warn:.9,template:"{count} / {max}"}),d(Ot,"primary","max");v("char-count",Ot);var zt=class extends x{init(){let{el:t}=this;t.matches("button")&&!t.hasAttribute("type")&&(t.type="button"),!t.hasAttribute("aria-label")&&!t.textContent.trim()&&t.setAttribute("aria-label",y("clear",{},t)),this.on(t,"click",e=>{e.preventDefault(),this.clear()})}get input(){return this.options.target?C(this.el,this.options.target)[0]:this.el.closest(Ei)?.querySelector('input:not([type="hidden"]), textarea')}clear(){let{input:t}=this;!t||t.disabled||t.readOnly||(cs(t,""),t.focus(),this.emit("clear",{input:t}))}};d(zt,"defaults",{target:""}),d(zt,"primary","target");v("form-clear",zt);function ps(r){let t=r.validity,e=s=>r.getAttribute(`data-pl-message-${s}`),i=(s,o)=>y(`validation.${s}`,o,r);return t.valueMissing?e("required")?e("required"):r.type==="checkbox"?i("checkbox"):r.type==="radio"?i("radio"):r.type==="file"?i("file"):r.matches("select")?i("select"):i("required"):t.typeMismatch?e("type")?e("type"):r.type==="email"?i("email"):r.type==="url"?i("url"):i("type"):t.patternMismatch?e("pattern")||r.title||i("pattern"):t.tooShort?e("minlength")||i("minlength",{n:r.minLength,length:r.value.length}):t.tooLong?e("maxlength")||i("maxlength",{n:r.maxLength,length:r.value.length}):t.rangeUnderflow?e("min")||i("min",{min:r.min}):t.rangeOverflow?e("max")||i("max",{max:r.max}):t.stepMismatch?e("step")||i("step"):t.badInput?e("type")||i("bad"):t.customError?r.validationMessage:""}var ye=class extends x{init(){let{el:t}=this;this.hadNoValidate=t.noValidate,t.noValidate=!0,this.messages=new Map,this.on(t,"submit",i=>{if(this.validate()){this.emit("valid",{originalEvent:i});return}i.preventDefault(),i.stopImmediatePropagation()}),this.on(t,"focusout",i=>{!this.options.live||!this.isField(i.target)||!this.touched(i.target)&&i.target.validity.valueMissing||this.validateField(i.target)});let e=i=>{let s=i.target;this.isField(s)&&(this.marked(s)||this.options.live&&i.type==="change")&&this.validateField(s)};this.on(t,"input",e),this.on(t,"change",e),this.on(t,"reset",()=>this.reset()),this.onDestroy(()=>{this.reset(),t.noValidate=this.hadNoValidate})}get fields(){return[...this.el.elements].filter(t=>this.isField(t))}isField(t){return t instanceof Element&&t.matches("input, select, textarea")&&t.form===this.el&&t.willValidate&&!t.matches('[type="hidden"], [type="submit"], [type="reset"], [type="button"], [data-pl-novalidate]')}touched(t){return t.type==="checkbox"||t.type==="radio"?t.checked:t.value!==""}marked(t){return this.group(t).some(e=>e.classList.contains("pl-form-danger"))}group(t){return t.type==="radio"&&t.name?this.fields.filter(e=>e.type==="radio"&&e.name===t.name):[t]}validate(){let t=new Set,e=[];for(let i of this.fields){let s=this.group(i)[0];t.has(s)||(t.add(s),this.validateField(s)||e.push(s))}if(!e.length)return!0;if(this.options.shake)for(let i of e)for(let s of this.group(i)){let o=s.closest(".pl-form-affix")||s;o.classList.remove("pl-form-shake"),o.offsetWidth,o.classList.add("pl-form-shake"),o.addEventListener("animationend",()=>o.classList.remove("pl-form-shake"),{once:!0})}return this.options.focus&&e[0].focus({preventScroll:!1}),this.emit("invalid",{fields:e}),!1}validateField(t){if(t=E(t,this.el),!t||!this.isField(t))return!0;let e=this.group(t),i=e[0],s=i.validity.valid,o=s?"":ps(i);for(let n of e){let a=n.closest(".pl-form-affix")||n;a.classList.toggle("pl-form-danger",!s),a.classList.toggle("pl-form-success",s&&this.options.success&&this.touched(n)),s?n.removeAttribute("aria-invalid"):n.setAttribute("aria-invalid","true")}return this.setMessage(i,e,o),s}setMessage(t,e,i){let s=this.messages.get(t);if(!i){if(s){s.remove(),this.messages.delete(t);for(let o of e)this.describe(o,s.id,!1)}return}if(!s){s=document.createElement("div"),s.className="pl-form-help pl-form-help-danger",s.id=k("pl-error"),s.setAttribute("data-pl-form-message",""),this.messages.set(t,s);let o=t.closest(".pl-form-field"),n=e[e.length-1],a=[".pl-input-group",".pl-form-checks",".pl-form-floating",".pl-form-icon",".pl-form-affix",".pl-form-check",".pl-form-card"].map(l=>n.closest(l)).find(l=>l&&this.el.contains(l))||n;o&&e.length>1?o.append(s):a.after(s);for(let l of e)this.describe(l,s.id,!0)}s.textContent!==i&&(s.textContent=i)}describe(t,e,i){let s=(t.getAttribute("aria-describedby")||"").split(" ").filter(o=>o&&o!==e);i&&s.push(e),s.length?t.setAttribute("aria-describedby",s.join(" ")):t.removeAttribute("aria-describedby")}reset(){for(let[t,e]of this.messages){e.remove();for(let i of this.group(t))this.describe(i,e.id,!1)}this.messages.clear();for(let t of T(".pl-form-danger, .pl-form-success",this.el))t.matches("input, select, textarea, .pl-form-affix")&&t.classList.remove("pl-form-danger","pl-form-success");for(let t of this.fields)t.removeAttribute("aria-invalid")}};d(ye,"defaults",{live:!0,success:!1,shake:!0,focus:!0});v("form-validate",ye);var U=[],Si=!1,$i={left:"start",top:"start",right:"end",bottom:"end",start:"start",end:"end"};function ds(r){let[t,e]=String(r).trim().split("-");return["top","bottom","left","right"].includes(t)?$i[e]?`${t}-${$i[e]}`:t:"bottom-start"}function us(){Si||(Si=!0,document.addEventListener("click",r=>{let t=r.target;t instanceof Node&&[...U].forEach(e=>{e.el.contains(t)||e.toggleEl?.contains(t)||e.hide()})}),document.addEventListener("keydown",r=>{if(r.key!=="Escape"||!U.length)return;let t=U[U.length-1];r.preventDefault(),t.hide()}))}var ve=class extends x{init(){let{el:t,options:e}=this;this.isOpen=!1,this.token=0,this.timer=0,this.hovering=!1,this.stopPlace=null,this.parentDrop=t.parentElement?.closest(".pl-drop, [data-pl-drop]")||null,this.nested=!!this.parentDrop,this.mode=e.mode==="hover"||e.mode==null&&this.nested?"hover":"click",this.placement=ds(e.pos||(this.nested?"right-start":"bottom-start")),this.offset=e.offset??(this.nested?4:8);let i=e.toggle?C(t,e.toggle)[0]:t.previousElementSibling;if(this.toggleEl=i||null,t.id||(t.id=k("pl-drop")),t.classList.remove("pl-open"),this.setupMenu(),i){let o=!!this.menu;i.setAttribute("aria-haspopup",o?"menu":"true"),i.setAttribute("aria-controls",t.id),i.setAttribute("aria-expanded","false"),i.matches("button, a[href], input, select, textarea, [tabindex]")||(i.setAttribute("role","button"),i.tabIndex=0),this.onDestroy(()=>{["aria-haspopup","aria-controls","aria-expanded"].forEach(n=>i.removeAttribute(n)),i.classList.remove("pl-open")}),this.on(i,"click",n=>this.onToggleClick(n)),this.on(i,"keydown",n=>this.onToggleKeydown(n)),this.mode==="hover"&&(this.on(i,"pointerenter",n=>{n.pointerType!=="touch"&&(this.hovering=!0,this.schedule(!0))}),this.on(i,"pointerleave",n=>{n.pointerType!=="touch"&&(this.hovering=!1,this.schedule(!1))}),this.on(i,"focusin",()=>{!this.suppressFocus&&i.matches(":focus-visible")&&this.schedule(!0,0)}))}this.mode==="hover"&&(this.on(t,"pointerenter",o=>{o.pointerType!=="touch"&&clearTimeout(this.timer)}),this.on(t,"pointerleave",o=>{o.pointerType!=="touch"&&this.schedule(!1)})),this.on(t,"click",o=>this.onClick(o)),this.on(t,"keydown",o=>this.onKeydown(o));let s=()=>{setTimeout(()=>{let o=document.activeElement;this.signal.aborted||!this.isOpen||!o||o===document.body||t.contains(o)||this.toggleEl?.contains(o)||this.hide()})};this.on(t,"focusout",s),this.on(i,"focusout",s),us(),this.onDestroy(()=>this.teardown())}setupMenu(){this.menu=T(".pl-dropdown-nav",this.el).find(t=>this.owns(t))||null,T(".pl-dropdown-nav",this.el).filter(t=>this.owns(t)).forEach(t=>{t.hasAttribute("role")||t.setAttribute("role","menu"),[...t.children].forEach(e=>{if(e.hasAttribute("role"))return;e.classList.contains("pl-nav-divider")?e.setAttribute("role","separator"):e.setAttribute("role","none");let i=e.querySelector(":scope > a, :scope > button");i&&!i.hasAttribute("role")&&i.setAttribute("role","menuitem")})})}owns(t){return t.closest(".pl-drop, [data-pl-drop]")===this.el}get items(){return T(".pl-dropdown-nav > li > a, .pl-dropdown-nav > li > button",this.el).filter(t=>this.owns(t)&&!t.disabled&&!t.parentElement.classList.contains("pl-disabled")&&t.getClientRects().length)}schedule(t,e){if(clearTimeout(this.timer),e??(e=t?this.options.delayShow:this.options.delayHide),!e)return t?this.show():this.hide();this.timer=setTimeout(()=>t?this.show():this.hide(),e)}onToggleClick(t){if(this.toggleEl.matches("a")&&t.preventDefault(),clearTimeout(this.timer),this.mode==="hover"){this.isOpen&&!this.hovering?this.hide():this.show();return}this.toggle()}onToggleKeydown(t){let e=this.placement.split("-")[0],i=e==="right"?"ArrowRight":e==="left"?"ArrowLeft":e==="top"?"ArrowUp":"ArrowDown";if(t.key===i||t.key==="ArrowDown"&&!this.nested){if(!this.menu&&this.isOpen)return;t.preventDefault(),t.stopPropagation(),this.show(),this.focusItem(0)}else(t.key==="Enter"||t.key===" ")&&this.toggleEl.getAttribute("role")==="button"&&(t.preventDefault(),this.toggle())}onClick(t){let e=this.options.closeOnClick;if(e===!1||e==="false")return;let i=t.target.closest("a, button");if(!i||!this.el.contains(i)||i.hasAttribute("aria-haspopup")&&i.getAttribute("aria-controls"))return;let s=!!i.closest(".pl-dropdown-nav");if(i.getAttribute("href")==="#"&&t.preventDefault(),s||e===!0||e==="true"||i.hasAttribute("data-pl-drop-close")){let o=this.el.contains(document.activeElement)&&!this.nested;this.hide(o)}}onKeydown(t){if(!this.owns(t.target)&&t.target!==this.el)return;let e=this.items,i=e.indexOf(t.target.closest("a, button")),s=this.placement.split("-")[0];if(this.nested&&(s==="right"&&t.key==="ArrowLeft"||s==="left"&&t.key==="ArrowRight")){t.preventDefault(),t.stopPropagation(),this.hide(!0);return}if(!e.length)return;let o={ArrowDown:i+1,ArrowUp:i<0?e.length-1:i-1,Home:0,End:e.length-1}[t.key];o!==void 0&&(t.preventDefault(),t.stopPropagation(),e[(o+e.length)%e.length].focus())}focusItem(t){let e=this.items;e.length&&e[t<0?e.length+t:t]?.focus()}toggle(){return this.isOpen?this.hide():this.show()}show(){if(clearTimeout(this.timer),this.isOpen||!this.el.isConnected||!this.emit("beforeshow",{},!0))return;[...U].forEach(o=>{o!==this&&!o.el.contains(this.el)&&o.hide()});let{el:t,toggleEl:e}=this,i=++this.token,{signal:s}=this;this.isOpen=!0,U.push(this),t.classList.remove("pl-leave"),t.classList.add("pl-open"),e?.classList.add("pl-open"),e?.setAttribute("aria-expanded","true"),B(t),this.stopPlace?.(),this.stopPlace=Q(t,e||t.parentElement||document.body,{placement:this.placement,offset:this.offset,flip:this.options.flip,shift:this.options.shift,matchWidth:this.options.matchWidth}),this.emit("show"),D(t).then(()=>{!s.aborted&&i===this.token&&this.isOpen&&this.emit("shown")})}async hide(t=!1){if(clearTimeout(this.timer),!this.isOpen||!this.emit("beforehide",{},!0))return;[...U].forEach(l=>{l!==this&&this.el.contains(l.el)&&l.hide()});let{el:e,toggleEl:i}=this,s=++this.token,{signal:o}=this,n=e.contains(document.activeElement);this.isOpen=!1;let a=U.indexOf(this);a>-1&&U.splice(a,1),i?.classList.remove("pl-open"),i?.setAttribute("aria-expanded","false"),i&&(t===!0||n)&&(this.suppressFocus=!0,i.focus({preventScroll:!0}),this.suppressFocus=!1),e.classList.add("pl-leave"),e.classList.remove("pl-open"),this.emit("hide"),await D(e),!(o.aborted||s!==this.token)&&(this.teardown(),this.emit("hidden"))}teardown(){clearTimeout(this.timer),this.stopPlace?.(),this.stopPlace=null,this.el.classList.remove("pl-leave","pl-open"),P(this.el),this.el.hidden=!1;let t=U.indexOf(this);t>-1&&U.splice(t,1),this.isOpen=!1}};d(ve,"defaults",{toggle:null,mode:null,pos:null,offset:null,delayShow:0,delayHide:220,closeOnClick:"auto",matchWidth:!1,flip:!0,shift:!0});v("drop",ve);var Ci="pl-tooltip",fs=400,N=null,K=null,je=0,Ti=-1/0,Di=!1;function ms(r){return N||(N=document.createElement("div"),N.id=Ci,N.setAttribute("role","tooltip"),N.className="pl-tooltip"),N.parentElement!==r&&r.appendChild(N),N}function gs(){Di||(Di=!0,document.addEventListener("keydown",r=>{r.key==="Escape"&&K?.hide()}),window.addEventListener("scroll",r=>{K&&r.target!==N&&K.hide()},{capture:!0,passive:!0}),window.addEventListener("resize",()=>K?.hide(),{passive:!0}))}var Nt=class extends x{init(){let{el:t,options:e}=this;this.timer=0,this.visible=!1;let i=t.getAttribute("title");i!=null&&(e.title||(e.title=i),t.removeAttribute("title"),this.onDestroy(()=>t.setAttribute("title",i))),this.labelled=!1,e.title&&!e.html&&!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&!t.textContent.trim()&&!t.matches("input, select, textarea")&&(!t.hasAttribute("role")&&!t.matches("a[href], button, summary, img, svg")&&(t.setAttribute("role","img"),this.onDestroy(()=>t.removeAttribute("role"))),t.setAttribute("aria-label",String(e.title)),this.labelled=!0),this.on(t,"pointerenter",s=>{s.pointerType!=="touch"&&this.schedule()}),this.on(t,"pointerleave",()=>this.hide()),this.on(t,"pointerdown",()=>this.hide()),this.on(t,"focusin",()=>{(t.matches(":focus-visible")||t.querySelector(":focus-visible"))&&this.show()}),this.on(t,"focusout",()=>this.hide()),gs(),this.onDestroy(()=>this.hide(!0))}schedule(){clearTimeout(this.timer);let t=K||performance.now()-Ti<fs,e=t?0:this.options.delay;if(!e)return this.show(!!t);this.timer=setTimeout(()=>this.show(),e)}setTitle(t){this.options.title=t,this.labelled&&this.el.setAttribute("aria-label",String(t)),this.visible&&this.render()}render(){let{el:t,options:e}=this,i=t.closest("dialog")||document.body,s=ms(i);return e.html?s.innerHTML=String(e.title):s.textContent=String(e.title),s}show(t=!1){clearTimeout(this.timer);let{el:e,options:i}=this;if(this.visible||!i.title||!e.isConnected||e.matches(":disabled, .pl-disabled")||!this.emit("beforeshow",{},!0))return;K&&K!==this&&K.hide(!0),K=this,this.visible=!0,++je;let s=this.render();s.className=`pl-tooltip ${i.cls||""} ${t?"pl-tooltip-instant":""}`.trim(),s.classList.add("pl-open"),B(s),kt(s,e,{placement:i.pos,offset:i.offset}),this.labelled||(this.describedBy=e.getAttribute("aria-describedby"),e.setAttribute("aria-describedby",[this.describedBy,Ci].filter(Boolean).join(" "))),this.emit("show")}async hide(t=!1){if(clearTimeout(this.timer),!this.visible)return;this.visible=!1;let{el:e}=this;if(this.labelled||(this.describedBy?e.setAttribute("aria-describedby",this.describedBy):e.removeAttribute("aria-describedby")),K===this&&(K=null),Ti=performance.now(),this.emit("hide"),t||!N){N?.classList.remove("pl-open","pl-leave"),N&&P(N);return}let i=++je;N.classList.add("pl-leave"),N.classList.remove("pl-open");let{signal:s}=this;await D(N),i===je&&(N.classList.remove("pl-leave"),P(N),s.aborted||this.emit("hidden"))}};d(Nt,"defaults",{title:"",pos:"top",offset:10,delay:120,cls:"",html:!1}),d(Nt,"primary","title");v("tooltip",Nt);var j=[],Oi=!1;function bs(){Oi||(Oi=!0,document.addEventListener("click",r=>{let t=r.target;t instanceof Node&&[...j].forEach(e=>{e.options.dismiss&&(e.el.contains(t)||e.pop?.contains(t)||j.some(i=>i!==e&&e.pop?.contains(i.el)&&i.pop?.contains(t))||e.hide())})}),document.addEventListener("keydown",r=>{r.key!=="Escape"||!j.length||(r.preventDefault(),j[j.length-1].hide(!0))}))}var Ht=class extends x{init(){let{el:t,options:e}=this;this.isOpen=!1,this.token=0,this.timer=0,this.pop=null,this.stopPlace=null,this.id=k("pl-popover");let i=t.getAttribute("title");i!=null&&(!e.title&&!e.content?e.content=i:e.title||(e.title=i),t.removeAttribute("title")),this.expandable=!t.matches("input, select, textarea"),this.expandable&&(t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false")),t.matches("button, a[href], input, select, textarea, [tabindex]")||(t.setAttribute("role","button"),t.tabIndex=0,this.on(t,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggle())}));let{mode:s}=e;s==="hover"?(this.on(t,"pointerenter",o=>{o.pointerType!=="touch"&&this.schedule(!0)}),this.on(t,"pointerleave",o=>{o.pointerType!=="touch"&&this.schedule(!1)}),this.on(t,"focusin",()=>{!this.suppressFocus&&t.matches(":focus-visible")&&this.schedule(!0,0)}),this.on(t,"focusout",()=>this.onFocusOut()),this.on(t,"click",o=>{t.matches("a")&&o.preventDefault(),o.pointerType==="mouse"?this.show():this.toggle()})):s==="focus"?(this.on(t,"focusin",()=>{this.suppressFocus||this.show()}),this.on(t,"focusout",()=>this.onFocusOut())):this.on(t,"click",o=>{t.matches("a")&&o.preventDefault(),this.toggle()}),bs(),this.onDestroy(()=>{this.teardown(),this.restoreTarget(),this.pop?.remove(),["aria-haspopup","aria-expanded","aria-controls"].forEach(o=>t.removeAttribute(o))})}onFocusOut(){let{signal:t}=this;setTimeout(()=>{let e=document.activeElement;t.aborted||!this.isOpen||this.el.contains(e)||this.pop?.contains(e)||this.hide()})}schedule(t,e){if(clearTimeout(this.timer),e??(e=t?this.options.delayShow:this.options.delayHide),!e)return t?this.show():this.hide();this.timer=setTimeout(()=>t?this.show():this.hide(),e)}build(){let{el:t,options:e}=this,i=this.pop;i||(i=this.pop=document.createElement("div"),i.id=this.id,i.setAttribute("role",e.mode==="click"?"dialog":"tooltip"),i.tabIndex=-1,i.addEventListener("click",c=>{c.target.closest("[data-pl-popover-close]")&&this.hide(!0)}),i.addEventListener("keydown",c=>this.onKeydown(c)),i.addEventListener("focusout",()=>{(e.mode!=="click"||e.dismiss)&&this.onFocusOut()}),e.mode==="hover"&&(i.addEventListener("pointerenter",()=>clearTimeout(this.timer)),i.addEventListener("pointerleave",c=>{c.pointerType!=="touch"&&this.schedule(!1)}))),i.className=`pl-popover ${e.cls||""}`.trim(),this.restoreTarget(),i.replaceChildren(),i.removeAttribute("aria-labelledby");let s=(c,p)=>{e.html?c.innerHTML=String(p):c.textContent=String(p)},o=()=>{let c=document.createElement("button");return c.type="button",c.className="pl-close",c.setAttribute("aria-label",y("close",{},this.el)),c.setAttribute("data-pl-popover-close",""),c},n=e.title!==""&&e.title!=null;if(n){let c=document.createElement("div");c.className="pl-popover-header";let p=document.createElement("div");p.className="pl-popover-title",p.id=`${this.id}-title`,s(p,e.title),c.append(p),e.close&&c.append(o()),i.append(c),i.setAttribute("aria-labelledby",p.id)}let a=document.createElement("div");a.className="pl-popover-body",!n&&e.close&&a.append(o());let l=e.target?C(t,e.target)[0]:null;if(l)this.targetEl=l,this.targetHome=document.createComment("pl-popover"),this.targetHidden=l.hidden,l.before(this.targetHome),l.hidden=!1,a.append(l);else{let c=document.createElement("div");s(c,e.content),a.append(...e.html?c.childNodes:[c.textContent])}i.append(a),!n&&!i.hasAttribute("aria-label")?i.setAttribute("aria-label",t.textContent.trim()||"Popover"):n&&i.removeAttribute("aria-label");let h=t.closest("dialog, .pl-popover")||document.body;return i.parentElement!==h&&h.append(i),i}restoreTarget(){this.targetEl&&(this.targetEl.hidden=this.targetHidden,this.targetHome.replaceWith(this.targetEl),this.targetEl=this.targetHome=null)}onKeydown(t){if(t.key!=="Tab"||this.options.mode!=="click")return;let e=pt(this.pop),i=e[0],s=e[e.length-1],o=document.activeElement;(t.shiftKey?o===i||o===this.pop:o===s||!e.length&&o===this.pop)&&(t.preventDefault(),this.el.focus())}update(t={}){Object.assign(this.options,t),this.isOpen&&this.build()}toggle(){return this.isOpen?this.hide():this.show()}show(){clearTimeout(this.timer);let{el:t,options:e}=this;if(this.isOpen||!t.isConnected||!e.target&&e.content===""&&e.title===""||!this.emit("beforeshow",{},!0))return;let i=this.build();[...j].forEach(n=>{n!==this&&!n.pop?.contains(t)&&n.hide()});let s=++this.token,{signal:o}=this;this.isOpen=!0,j.push(this),i.classList.remove("pl-leave"),i.classList.add("pl-open"),t.classList.add("pl-open"),this.expandable&&t.setAttribute("aria-expanded","true"),e.mode==="click"?t.setAttribute("aria-controls",i.id):t.setAttribute("aria-describedby",i.id),B(i),this.stopPlace?.(),this.stopPlace=Q(i,t,{placement:e.pos,offset:e.offset}),e.mode==="click"&&e.focus&&pt(i).length&&i.focus({preventScroll:!0}),this.emit("show"),D(i).then(()=>{!o.aborted&&s===this.token&&this.isOpen&&this.emit("shown")})}async hide(t=!1){if(clearTimeout(this.timer),!this.isOpen||!this.emit("beforehide",{},!0))return;let{el:e,pop:i}=this;[...j].forEach(l=>{l!==this&&i.contains(l.el)&&l.hide()});let s=++this.token,{signal:o}=this,n=i.contains(document.activeElement);this.isOpen=!1;let a=j.indexOf(this);a>-1&&j.splice(a,1),e.classList.remove("pl-open"),this.expandable&&e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-describedby"),(n||t===!0&&this.options.mode==="click")&&(this.suppressFocus=!0,e.focus({preventScroll:!0}),this.suppressFocus=!1),i.classList.add("pl-leave"),i.classList.remove("pl-open"),this.emit("hide"),await D(i),!(o.aborted||s!==this.token)&&(this.teardown(),this.emit("hidden"))}teardown(){clearTimeout(this.timer),this.stopPlace?.(),this.stopPlace=null;let t=j.indexOf(this);t>-1&&j.splice(t,1),this.isOpen=!1,this.pop&&(this.pop.classList.remove("pl-open","pl-leave"),P(this.pop),this.pop.hidden=!1)}};d(Ht,"defaults",{title:"",content:"",target:null,pos:"top",mode:"click",offset:12,close:!1,dismiss:!0,html:!1,cls:"",delayShow:80,delayHide:200,focus:!0}),d(Ht,"primary","content");v("popover",Ht);var xe=new Set;function zi(r,t=1500){let e=r.filter(Boolean).flatMap(i=>i.getAnimations());return e.length?Promise.race([Promise.allSettled(e.map(i=>i.finished)),new Promise(i=>setTimeout(i,t))]):Promise.resolve()}var Z=class extends x{init(){let t=this.el,e=this.constructor.componentName;this.state="closed",this.opener=null,this.closing=null,this.pressed=null,(!(t instanceof HTMLDialogElement)||typeof t.showModal!="function")&&console.warn(`[Plossy] ${e}: wymagany element <dialog>.`);let i=t.querySelector(this.constructor.title);i&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(i.id||(i.id=k(`pl-${e}-title`)),t.setAttribute("aria-labelledby",i.id)),this.setup(),this.on(t,"pointerdown",s=>{let o=s.target===t&&(s.offsetX>=t.clientWidth||s.offsetY>=t.clientHeight);this.pressed=o?!1:s.target}),this.on(t,"click",s=>{let o=s.target.closest(`[data-pl-${e}-close]`);if(o&&o.closest("dialog")===t){s.preventDefault(),this.hide();return}s.target===t&&(this.pressed===t||this.pressed===null)&&this.dismiss("backdrop"),this.pressed=null}),this.on(t,"keydown",s=>{s.key!=="Escape"||s.defaultPrevented||(s.preventDefault(),this.dismiss("esc"))}),this.on(t,"cancel",s=>{s.target===t&&(s.preventDefault(),this.dismiss("esc"))}),this.on(t,"close",s=>{s.target===t&&this.state!=="closed"&&this.finish()}),this.onDestroy(()=>this.finish(!0))}setup(){}get panel(){return this.el.querySelector(`:scope > ${this.constructor.panel}`)||this.el.firstElementChild}get isOpen(){return this.state==="open"}dismiss(t){if(this.state!=="open")return;let{backdropClose:e,escClose:i,static:s}=this.options;if(t==="backdrop"&&s)return this.nope();if(t==="backdrop"?e:i)return this.hide();s&&this.nope()}nope(){let t=this.panel;!t||t.classList.contains("pl-modal-shake")||Pe(t,"pl-modal-shake")}toggle(t){return this.state==="open"?this.hide():this.show(t)}async show(t){let e=this.el;if(this.state==="closing"&&await this.closing,!(this.state!=="closed"||typeof e.showModal!="function")&&(e.isConnected||document.body.append(e),Re(this)||ct(e),!!Re(this)&&this.emit("beforeshow",{},!0))){this.options.stack||[...xe].filter(i=>i!==this&&!i.el.contains(e)).forEach(i=>i.hide()),this.opener=t instanceof Element?t:document.activeElement,e.classList.remove("pl-closing"),e.open&&e.close(),this.state="open",xe.add(this),At();try{e.showModal(),e.scrollTop=0,e.scrollLeft=0}catch(i){this.state="closed",xe.delete(this),dt(),console.error("[Plossy] modal:",i);return}e.classList.add("pl-open"),e.scrollTop=0,this.emit("show"),await zi([e,this.panel]),this.state==="open"&&this.emit("shown")}}hide(){if(!Re(this))return Promise.resolve();if(this.state==="closing")return this.closing;if(this.state!=="open"||!this.emit("beforehide",{},!0))return Promise.resolve();this.state="closing",this.el.classList.add("pl-closing"),this.emit("hide");let{signal:t}=this;return this.closing=zi([this.el,this.panel]).then(()=>{t.aborted||this.finish()}),this.closing}finish(t=!1){if(this.state==="closed")return;let e=this.el;this.state="closed",this.closing=null,xe.delete(this),e.open&&e.close(),e.classList.remove("pl-closing","pl-open"),dt();let i=this.opener;this.opener=null,i?.isConnected&&i!==document.body&&i.focus?.({preventScroll:!0}),t||this.emit("hidden")}};d(Z,"defaults",{backdropClose:!0,escClose:!0,static:!1,stack:!1}),d(Z,"panel",".pl-modal-dialog"),d(Z,"title",".pl-modal-title");var Re=r=>!r.signal.aborted&&H(r.el,r.constructor.componentName)===r;function Ye(r){if(typeof document>"u")return;let t=`data-pl-${r}-open`;document.addEventListener("click",e=>{let i=e.target.closest?.(`[${t}]`);if(!i||i.disabled||i.classList.contains("pl-disabled"))return;let s=i.getAttribute(t)||i.getAttribute("href"),o=null;try{o=s?document.querySelector(s):null}catch{}o&&(e.preventDefault(),O[r](o)?.show(i))})}var It=class extends Z{};d(It,"defaults",{...Z.defaults});v("modal",It);Ye("modal");var Ve={},at=r=>String(r??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]);function Ni(r,t={}){let{cls:e="",...i}=t,s=document.createElement("dialog");s.className=`pl-modal ${e}`.trim();let o=document.createElement("div");o.className="pl-modal-dialog",r instanceof Node?o.append(r):o.innerHTML=r??"",s.append(o),document.body.append(s);let n=new It(s,{stack:!0,...i});return s.addEventListener("pl:hidden",a=>{a.target===s&&(n.destroy(),s.remove())}),n.show(),n}function We(r,t,e={},i=""){let{title:s="",html:o=!1,ok:n=Ve.ok??y("modal.ok"),cancel:a=Ve.cancel??y("modal.cancel"),tone:l="primary",cls:h="pl-modal-small pl-modal-center",placeholder:c="",type:p="text",...m}=e,b=o?String(t??""):at(t),f=k("pl-modal-input"),u=r!=="alert",g=r==="prompt"?`<label class="pl-modal-prompt-label pl-modal-message" for="${f}">${b}</label>
|
|
51
|
+
(()=>{var Ji=Object.defineProperty;var Qi=(r,t,e)=>t in r?Ji(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var d=(r,t,e)=>Qi(r,typeof t!="symbol"?t+"":t,e);var ai={close:"Close",clear:"Clear",previous:"Previous",next:"Next",loading:"Loading","combobox.empty":"No results","combobox.loading":"Searching\u2026","combobox.create":"Add","combobox.options":"Options","combobox.remove":"Remove: {label}","combobox.minLength":{one:"Type at least {n} character to search",other:"Type at least {n} characters to search"},"combobox.error":"Couldn\u2019t load results","datepicker.dialog":"Choose a date","datepicker.prevMonth":"Previous month","datepicker.nextMonth":"Next month","datepicker.prevYear":"Previous year","datepicker.nextYear":"Next year","datepicker.prevYears":"Previous years","datepicker.nextYears":"Next years","datepicker.pickMonth":"Choose a month","datepicker.pickYear":"Choose a year","datepicker.today":"Today","datepicker.clear":"Clear","countdown.days":"days","countdown.hours":"hr","countdown.minutes":"min","countdown.seconds":"s","slider.carousel":"carousel","slider.slide":"slide","slider.position":"{n} of {count}","slider.previous":"Previous slide","slider.next":"Next slide","slider.goto":"Slide {n}","lightbox.label":"Gallery","lightbox.role":"gallery","lightbox.thumbs":"Thumbnails","lightbox.item":"Item {n}","lightbox.error":"Couldn\u2019t load the content.","lightbox.embed":"Embedded content","modal.ok":"OK","modal.cancel":"Cancel","modal.close":"Close","notification.close":"Close notification","offcanvas.label":"Side panel","totop.label":"Back to top","quantity.label":"Quantity","quantity.minus":"Decrease","quantity.plus":"Increase","rating.label":"Rating","otp.label":"One-time code","otp.char":"Character {n} of {count}","password.show":"Show password","password.hide":"Hide password","strength.levels":"Weak, Fair, Good, Strong","strength.meter":"Password strength","strength.empty":"No password","strength.met":"met","strength.unmet":"not met","strength.rule.length":{one:"At least {n} character",other:"At least {n} characters"},"strength.rule.case":"Lowercase and uppercase letter","strength.rule.digit":"At least one digit","strength.rule.symbol":"A special character (e.g. ! @ # ?)","validation.required":"This field is required.","validation.checkbox":"Check this box to continue.","validation.radio":"Choose one of the options.","validation.file":"Choose a file.","validation.select":"Choose an item from the list.","validation.email":"Enter a valid email address, e.g. jane@example.com.","validation.url":"Enter a valid URL, e.g. https://example.com.","validation.type":"Enter a value in the correct format.","validation.pattern":"Enter a value in the required format.","validation.minlength":{one:"Enter at least {n} character (currently {length}).",other:"Enter at least {n} characters (currently {length})."},"validation.maxlength":{one:"Enter at most {n} character (currently {length}).",other:"Enter at most {n} characters (currently {length})."},"validation.min":"The value can\u2019t be less than {min}.","validation.max":"The value can\u2019t be greater than {max}.","validation.step":"Enter a value that matches the allowed step.","validation.bad":"Enter a valid value.","upload.choose":"Choose files","upload.type":"The file \u201C{name}\u201D has a format that isn\u2019t allowed.","upload.size":"The file \u201C{name}\u201D is too large ({size}). The maximum size is {max} MB.","upload.count":{one:"You can add at most {n} file.",other:"You can add at most {n} files."},"upload.remove":"Remove file {name}","upload.progress":"Upload progress: {name}","upload.uploading":"Uploading\u2026 {percent}%","upload.done":"Uploaded","upload.failed":"Couldn\u2019t upload the file.","upload.failedStatus":"Couldn\u2019t upload the file (error {status}).","upload.failedNetwork":"Couldn\u2019t upload the file \u2014 check your connection.","sortable.help":"Press space to pick up an item. Use the arrow keys to move it, space or Enter to drop it, and Escape to cancel.","sortable.role":"sortable item","sortable.lifted":"Picked up: {label}. Position {n} of {count}. Use the arrow keys to move, space to drop, Escape to cancel.","sortable.moved":"Position {n} of {count}.","sortable.cancelled":"Cancelled. {label} returns to position {n} of {count}.","sortable.dropped":"Dropped: {label}. Position {n} of {count}."};var li={close:"Zamknij",clear:"Wyczy\u015B\u0107",previous:"Poprzedni",next:"Nast\u0119pny",loading:"Wczytywanie","combobox.empty":"Brak wynik\xF3w","combobox.loading":"Szukam\u2026","combobox.create":"Dodaj","combobox.options":"Opcje","combobox.remove":"Usu\u0144: {label}","combobox.minLength":"Wpisz co najmniej {n} zn., aby wyszuka\u0107","combobox.error":"Nie uda\u0142o si\u0119 pobra\u0107 wynik\xF3w","datepicker.dialog":"Wybierz dat\u0119","datepicker.prevMonth":"Poprzedni miesi\u0105c","datepicker.nextMonth":"Nast\u0119pny miesi\u0105c","datepicker.prevYear":"Poprzedni rok","datepicker.nextYear":"Nast\u0119pny rok","datepicker.prevYears":"Poprzednie lata","datepicker.nextYears":"Nast\u0119pne lata","datepicker.pickMonth":"Wybierz miesi\u0105c","datepicker.pickYear":"Wybierz rok","datepicker.today":"Dzi\u015B","datepicker.clear":"Wyczy\u015B\u0107","countdown.days":"dni","countdown.hours":"godz.","countdown.minutes":"min","countdown.seconds":"s","slider.carousel":"karuzela","slider.slide":"slajd","slider.position":"{n} z {count}","slider.previous":"Poprzedni slajd","slider.next":"Nast\u0119pny slajd","slider.goto":"Slajd {n}","lightbox.label":"Galeria","lightbox.role":"galeria","lightbox.thumbs":"Miniatury","lightbox.item":"Pozycja {n}","lightbox.error":"Nie uda\u0142o si\u0119 wczyta\u0107 zawarto\u015Bci.","lightbox.embed":"Osadzona tre\u015B\u0107","modal.ok":"OK","modal.cancel":"Anuluj","modal.close":"Zamknij","notification.close":"Zamknij powiadomienie","offcanvas.label":"Panel boczny","totop.label":"Wr\xF3\u0107 na g\xF3r\u0119 strony","quantity.label":"Ilo\u015B\u0107","quantity.minus":"Mniej","quantity.plus":"Wi\u0119cej","rating.label":"Ocena","otp.label":"Kod jednorazowy","otp.char":"Znak {n} z {count}","password.show":"Poka\u017C has\u0142o","password.hide":"Ukryj has\u0142o","strength.levels":"S\u0142abe, \u015Arednie, Dobre, Silne","strength.meter":"Si\u0142a has\u0142a","strength.empty":"Brak has\u0142a","strength.met":"spe\u0142nione","strength.unmet":"niespe\u0142nione","strength.rule.length":"Co najmniej {n} znak\xF3w","strength.rule.case":"Ma\u0142a i wielka litera","strength.rule.digit":"Co najmniej jedna cyfra","strength.rule.symbol":"Znak specjalny (np. ! @ # ?)","validation.required":"To pole jest wymagane.","validation.checkbox":"Zaznacz to pole, aby kontynuowa\u0107.","validation.radio":"Wybierz jedn\u0105 z opcji.","validation.file":"Wybierz plik.","validation.select":"Wybierz pozycj\u0119 z listy.","validation.email":"Podaj poprawny adres e-mail, np. jan@example.com.","validation.url":"Podaj poprawny adres URL, np. https://example.com.","validation.type":"Podaj warto\u015B\u0107 w poprawnym formacie.","validation.pattern":"Podaj warto\u015B\u0107 w wymaganym formacie.","validation.minlength":{one:"Wpisz co najmniej {n} znak (obecnie {length}).",few:"Wpisz co najmniej {n} znaki (obecnie {length}).",many:"Wpisz co najmniej {n} znak\xF3w (obecnie {length}).",other:"Wpisz co najmniej {n} znaku (obecnie {length})."},"validation.maxlength":{one:"Wpisz najwy\u017Cej {n} znak (obecnie {length}).",few:"Wpisz najwy\u017Cej {n} znaki (obecnie {length}).",many:"Wpisz najwy\u017Cej {n} znak\xF3w (obecnie {length}).",other:"Wpisz najwy\u017Cej {n} znaku (obecnie {length})."},"validation.min":"Warto\u015B\u0107 nie mo\u017Ce by\u0107 mniejsza ni\u017C {min}.","validation.max":"Warto\u015B\u0107 nie mo\u017Ce by\u0107 wi\u0119ksza ni\u017C {max}.","validation.step":"Podaj warto\u015B\u0107 zgodn\u0105 z dozwolonym krokiem.","validation.bad":"Podaj poprawn\u0105 warto\u015B\u0107.","upload.choose":"Wybierz pliki","upload.type":"Plik \u201E{name}\u201D ma niedozwolony format.","upload.size":"Plik \u201E{name}\u201D jest za du\u017Cy ({size}). Maksymalny rozmiar to {max} MB.","upload.count":{one:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} plik.",few:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} pliki.",many:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} plik\xF3w.",other:"Mo\u017Cna doda\u0107 najwy\u017Cej {n} pliku."},"upload.remove":"Usu\u0144 plik {name}","upload.progress":"Post\u0119p przesy\u0142ania: {name}","upload.uploading":"Przesy\u0142anie\u2026 {percent}%","upload.done":"Przes\u0142ano","upload.failed":"Nie uda\u0142o si\u0119 przes\u0142a\u0107 pliku.","upload.failedStatus":"Nie uda\u0142o si\u0119 przes\u0142a\u0107 pliku (b\u0142\u0105d {status}).","upload.failedNetwork":"Nie uda\u0142o si\u0119 przes\u0142a\u0107 pliku \u2014 sprawd\u017A po\u0142\u0105czenie.","sortable.help":"Naci\u015Bnij spacj\u0119, aby podnie\u015B\u0107 element. Strza\u0142kami zmie\u0144 jego pozycj\u0119, spacj\u0105 lub Enterem upu\u015B\u0107, klawiszem Escape anuluj.","sortable.role":"element sortowalny","sortable.lifted":"Podniesiono: {label}. Pozycja {n} z {count}. Strza\u0142kami zmie\u0144 pozycj\u0119, spacj\u0105 upu\u015B\u0107, Escape anuluje.","sortable.moved":"Pozycja {n} z {count}.","sortable.cancelled":"Anulowano. {label} wraca na pozycj\u0119 {n} z {count}.","sortable.dropped":"Upuszczono: {label}. Pozycja {n} z {count}."};var ee=new Map,xt=new WeakMap,it=new WeakMap,wt=new WeakMap,se=0,Ie=0,di=typeof FinalizationRegistry=="function"?new FinalizationRegistry(()=>se--):null,ze=!1,te="",ui="data-pl-persist",Mt={autoDestroy:!0,locale:null},st={en:ai,pl:li};function q(r){return Mt.locale?String(Mt.locale):(r?.closest?.("[lang]")||document.documentElement).getAttribute("lang")||"en"}function ts(r){let t=q(r).toLowerCase();if(st[t])return t;let e=t.split("-")[0];return st[e]?e:"en"}function y(r,t={},e=null){let i=ts(e),s=st[i][r]??st.en[r]??r;if(typeof s=="object"){let o=new Intl.PluralRules(i).select(Number(t.n)||0);s=s[o]??s.other}return String(s).replace(/\{(\w+)\}/g,(o,n)=>n in t?String(t[n]):o)}function es(r,t){let e=String(r).toLowerCase();st[e]={...st[e]||{},...t}}var O={},E=(r,t=document)=>typeof r=="string"?t.querySelector(r):r||null,T=(r,t=document)=>typeof r=="string"?[...t.querySelectorAll(r)]:r?r instanceof Element?[r]:[...r]:[],is=0,k=(r="pl")=>`${r}-${(++is).toString(36)}${Math.random().toString(36).slice(2,6)}`,$=(r,t,e)=>Math.min(Math.max(r,t),e),fi=r=>r.replace(/-([a-z0-9])/g,(t,e)=>e.toUpperCase()),S=()=>matchMedia("(prefers-reduced-motion: reduce)").matches;function C(r,t){if(!t)return[];if(t instanceof Element)return[t];if(t=String(t).trim(),t==="next")return r.nextElementSibling?[r.nextElementSibling]:[];if(t==="prev")return r.previousElementSibling?[r.previousElementSibling]:[];if(t==="parent")return r.parentElement?[r.parentElement]:[];if(t.startsWith(">"))return[...r.querySelectorAll(`:scope ${t}`)];try{return[...document.querySelectorAll(t)]}catch{return[]}}function pt(r){return T('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',r).filter(t=>t.offsetParent!==null||t.getClientRects().length)}function hi(r){return r=r.trim(),r==="true"?!0:r==="false"?!1:r==="null"?null:r!==""&&!Number.isNaN(Number(r))?Number(r):r.replace(/^(['"])(.*)\1$/,"$2")}function oe(r,t={},e=null){let i={};if(!r||!(r=r.trim()))return i;if(r.startsWith("{"))try{return JSON.parse(r)}catch{return i}let s=r.split(";");for(let o=0;o<s.length;o++){let n=s[o],a=n.indexOf(":"),l=a>0?fi(n.slice(0,a).trim()):null;l&&l in t?i[l]=hi(n.slice(a+1)):o===0&&e&&(i[e]=hi(s.length===1?r:n))}return i}var vt=class vt{constructor(t,e={}){let i=this.constructor.componentName;this.el=t,it.set(this,{options:e,declarative:t.hasAttribute(`data-pl-${i}`),destroyed:!1});let s=this.destroy;Object.defineProperty(this,"destroy",{configurable:!0,writable:!0,value:()=>{let o=it.get(this);if(bi(this),!o.destroyed){o.destroyed=!0;try{s.call(this)}finally{vt.prototype.destroy.call(this)}}}}),mi(this)}init(){}get signal(){return this._life.signal}on(t,e,i,s){if(!t||it.get(this)?.destroyed)return()=>{};t.addEventListener(e,i,s);let o=()=>t.removeEventListener(e,i,s);return this._cleanup.push(o),o}onDestroy(t){it.get(this)?.destroyed?t():this._cleanup.push(t)}emit(t,e={},i=!1){let s=new CustomEvent(`pl:${t}`,{bubbles:!0,cancelable:i,detail:{...e,component:this}});return this.el.dispatchEvent(s),!s.defaultPrevented}destroy(){let t=it.get(this);t&&(t.destroyed=!0),this._life?.abort();let e=this.constructor.componentName;for(let s of this._cleanup.splice(0))try{s()}catch(o){console.error(`[Plossy] ${e}:`,o)}let i=xt.get(this.el);i?.get(e)===this&&(i.delete(e),Ie--)}};d(vt,"defaults",{}),d(vt,"primary",null);var x=vt;function mi(r){let t=r.constructor,e=r.el,i=it.get(r);r.options={...t.defaults,...oe(e.getAttribute(`data-pl-${t.componentName}`),t.defaults,t.primary),...i.options},r._cleanup=[],r._life=new AbortController,i.destroyed=!1;let s=xt.get(e);s||xt.set(e,s=new Map),s.has(t.componentName)||Ie++,s.set(t.componentName,r);let{signal:o}=r._life,n;try{n=r.init()}catch(a){throw ci(r),a}n&&typeof n.then=="function"&&n.then(null,a=>{console.error(`[Plossy] ${t.componentName}:`,a),o.aborted||ci(r)})}function ci(r){try{r.destroy()}catch(t){console.error(`[Plossy] ${r.constructor.componentName}:`,t)}}function H(r,t){return xt.get(r)?.get(t)||null}function gi(r,t,e){return H(r,t)||yi(r,t)||new(ee.get(t))(r,e)}function ss(r){let t=r.el,e=wt.get(t);e||(wt.set(t,e=new Map),se++,di?.register(t,null,e)),e.set(r.constructor.componentName,r)}function bi(r){let t=wt.get(r.el),e=r.constructor.componentName;t?.get(e)===r&&(t.delete(e),t.size||(wt.delete(r.el),se--,di?.unregister(t)))}function yi(r,t){let e=wt.get(r);if(!e)return null;let i=null;for(let[s,o]of[...e])if(!(t&&s!==t)&&(bi(o),!(H(r,s)||it.get(o).declarative&&!r.hasAttribute(`data-pl-${s}`))))try{mi(o),i=o}catch(n){console.error(`[Plossy] ${s}:`,n)}return i}var vi=r=>r instanceof Element?[r,...r.querySelectorAll("*")]:[...r.querySelectorAll("*")];function os(r){if(!(!Ie||r.isConnected))for(let t of vi(r).reverse()){let e=xt.get(t);if(!(!e||t.isConnected||t.closest(`[${ui}]`))){for(let[i,s]of[...e])if(e.get(i)===s){try{s.destroy()}catch(o){console.error(`[Plossy] ${i}:`,o)}ss(s)}}}}var ie=new Set,Ne=0;function ns(){Ne=0;let r=[...ie];ie.clear(),Mt.autoDestroy&&r.forEach(os)}function v(r,t){t.componentName=r,ee.set(r,t),te=[...ee.keys()].map(i=>`[data-pl-${i}]`).join(",");let e=fi(r);return O[e]||(O[e]=(i,s)=>{let o=E(i);return o?gi(o,r,s):null}),ze&&ct(document),t}function ct(r=document){if(se&&vi(r).forEach(e=>yi(e)),!te)return;let t=[...r.querySelectorAll(te)];r instanceof Element&&r.matches(te)&&t.unshift(r);for(let e of t)for(let i of ee.keys())if(e.hasAttribute(`data-pl-${i}`)&&!H(e,i))try{gi(e,i)}catch(s){console.error(`[Plossy] ${i}:`,s)}}function xi(){if(ze||typeof document>"u")return;ze=!0;let r=()=>{ct(document),new MutationObserver(t=>{for(let e of t){if(Mt.autoDestroy&&!e.target.closest?.(`[${ui}]`))for(let i of e.removedNodes)i.nodeType===1&&ie.add(i);for(let i of e.addedNodes)i.nodeType===1&&i.isConnected&&ct(i)}ie.size&&!Ne&&(Ne=setTimeout(ns))}).observe(document.documentElement,{childList:!0,subtree:!0})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r,{once:!0}):r()}function D(r){return Promise.allSettled(r.getAnimations().map(t=>t.finished))}async function Pe(r,t){r.classList.add(t),await D(r),r.classList.remove(t)}var Qt=new WeakMap;function J(r,t,{duration:e=360,easing:i="cubic-bezier(0.33, 0.5, 0.2, 1)"}={}){let s=Qt.get(r),o=s?getComputedStyle(r):null,n=o?{height:o.height,paddingTop:o.paddingTop,paddingBottom:o.paddingBottom,opacity:o.opacity}:null;s?.cancel();let a={height:"0px",paddingTop:"0px",paddingBottom:"0px",opacity:0};t&&(r.hidden=!1);let l=getComputedStyle(r),h={height:`${r.offsetHeight}px`,paddingTop:l.paddingTop,paddingBottom:l.paddingBottom,opacity:1};if(S()||!e)return r.hidden=!t,Qt.delete(r),Promise.resolve();let c=t?[n||a,h]:[n||h,a];r.style.overflow="hidden";let p=r.animate(c,{duration:e,easing:i});return Qt.set(r,p),p.finished.then(()=>{t||(r.hidden=!0),r.style.overflow="",Qt.delete(r)}).catch(()=>{})}function B(r){if(r.hidden=!1,typeof r.showPopover=="function"){r.hasAttribute("popover")||r.setAttribute("popover","manual");try{r.matches(":popover-open")||r.showPopover()}catch{}}}function P(r){try{r.hasAttribute("popover")&&r.matches(":popover-open")&&r.hidePopover()}catch{}r.hidden=!0}var pi={top:"bottom",bottom:"top",left:"right",right:"left"};function kt(r,t,e={}){let{placement:i="bottom",offset:s=8,flip:o=!0,shift:n=!0,padding:a=8,matchWidth:l=!1}=e,h=t instanceof Element?t.getBoundingClientRect():t;l&&(r.style.minWidth=`${h.width}px`);let c=r.offsetWidth,p=r.offsetHeight,m=document.documentElement.clientWidth,b=window.innerHeight,[f,u="center"]=i.split("-"),g={top:h.top-p-s-a,bottom:b-h.bottom-p-s-a,left:h.left-c-s-a,right:m-h.right-c-s-a};o&&g[f]<0&&g[pi[f]]>g[f]&&(f=pi[f]);let w=f==="top"||f==="bottom",A,M;return w?(M=f==="top"?h.top-p-s:h.bottom+s,A=u==="start"?h.left:u==="end"?h.right-c:h.left+(h.width-c)/2,n&&(A=$(A,a,Math.max(a,m-c-a)))):(A=f==="left"?h.left-c-s:h.right+s,M=u==="start"?h.top:u==="end"?h.bottom-p:h.top+(h.height-p)/2,n&&(M=$(M,a,Math.max(a,b-p-a)))),r.style.left=`${Math.round(A)}px`,r.style.top=`${Math.round(M)}px`,r.dataset.plPlacement=u==="center"?f:`${f}-${u}`,r.style.setProperty("--pl-arrow-x",`${Math.round(h.left+h.width/2-A)}px`),r.style.setProperty("--pl-arrow-y",`${Math.round(h.top+h.height/2-M)}px`),f}function Q(r,t,e={}){let i=0,s=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(()=>kt(r,t,e))};kt(r,t,e),window.addEventListener("scroll",s,{capture:!0,passive:!0}),window.addEventListener("resize",s,{passive:!0});let o=typeof ResizeObserver=="function"?new ResizeObserver(s):null;return o?.observe(r),()=>{cancelAnimationFrame(i),window.removeEventListener("scroll",s,{capture:!0}),window.removeEventListener("resize",s),o?.disconnect()}}var He=0;function At(){if(He++>0)return;let r=document.documentElement;r.style.setProperty("--pl-scrollbar-w",`${window.innerWidth-r.clientWidth}px`),r.classList.add("pl-scroll-lock")}function dt(){if(He===0||--He>0)return;let r=document.documentElement;r.classList.remove("pl-scroll-lock"),r.style.removeProperty("--pl-scrollbar-w")}function z(r){let t=0;return(...e)=>{t||(t=requestAnimationFrame(()=>{t=0,r(...e)}))}}function Be(r,t=150){let e;return(...i)=>{clearTimeout(e),e=setTimeout(()=>r(...i),t)}}Object.assign(O,{register:v,scan:ct,getInstance:H,config:Mt,addLocale:es,locales:st,Component:x,util:{$:E,$$:T,uid:k,clamp:$,parseOptions:oe,t:y,langOf:q,queryTargets:C,focusables:pt,animationsDone:D,animateClass:Pe,toggleHeight:J,showLayer:B,hideLayer:P,place:kt,autoPlace:Q,lockScroll:At,unlockScroll:dt,rafThrottle:z,debounce:Be,prefersReducedMotion:S}});var ne=class extends x{init(){this.items.forEach((t,e)=>{let{title:i,content:s}=this.parts(t);if(!i||!s)return;let o=t.classList.contains("pl-open")||this.options.active===e;t.classList.toggle("pl-open",o),s.hidden=!o,s.id||(s.id=k("pl-accordion")),i.id||(i.id=k("pl-accordion-title")),i.setAttribute("aria-controls",s.id),i.setAttribute("aria-expanded",String(o)),s.setAttribute("role","region"),s.setAttribute("aria-labelledby",i.id),i.matches("button, a[href]")||(i.setAttribute("role","button"),i.tabIndex=0)}),this.on(this.el,"click",t=>{let i=t.target.closest(".pl-accordion-title")?.closest(".pl-accordion-item");!i||i.parentElement!==this.el||(t.preventDefault(),this.toggle(i))}),this.on(this.el,"keydown",t=>{let e=t.target.closest(".pl-accordion-title");if(!e||e.closest(".pl-accordion-item")?.parentElement!==this.el)return;let i=this.items.map(n=>this.parts(n).title).filter(Boolean),s=i.indexOf(e),o={ArrowDown:s+1,ArrowUp:s-1,Home:0,End:i.length-1}[t.key];o!==void 0?(t.preventDefault(),i[(o+i.length)%i.length].focus()):(t.key==="Enter"||t.key===" ")&&!e.matches("button, a[href]")&&(t.preventDefault(),this.toggle(e.closest(".pl-accordion-item")))})}get items(){return T(":scope > .pl-accordion-item",this.el)}parts(t){return{title:t.querySelector(":scope > .pl-accordion-title"),content:t.querySelector(":scope > .pl-accordion-content")}}resolve(t){return typeof t=="number"?this.items[t]:t}toggle(t){if(t=this.resolve(t),!!t)return t.classList.contains("pl-open")?this.hide(t):this.show(t)}async show(t){if(t=this.resolve(t),!t||t.classList.contains("pl-open")||!this.emit("beforeshow",{item:t},!0))return;this.options.multiple||this.items.filter(o=>o!==t&&o.classList.contains("pl-open")).forEach(o=>this.hide(o,!0));let{title:e,content:i}=this.parts(t);t.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),this.emit("show",{item:t});let{signal:s}=this;await J(i,!0,{duration:this.options.duration}),s.aborted||this.emit("shown",{item:t})}async hide(t,e=!1){if(t=this.resolve(t),!t||!t.classList.contains("pl-open"))return;let i=this.items.filter(a=>a.classList.contains("pl-open")).length;if(!e&&!this.options.collapsible&&i<=1||!this.emit("beforehide",{item:t},!0))return;let{title:s,content:o}=this.parts(t);t.classList.remove("pl-open"),s.setAttribute("aria-expanded","false"),this.emit("hide",{item:t});let{signal:n}=this;await J(o,!1,{duration:this.options.duration}),n.aborted||this.emit("hidden",{item:t})}};d(ne,"defaults",{multiple:!1,collapsible:!0,active:null,duration:380});v("accordion",ne);var re=class extends x{init(){if(this.closing=!1,this.timer=null,!this.el.hasAttribute("role")){let t=this.el.matches(".pl-alert-danger, .pl-alert-warning");this.el.setAttribute("role",t?"alert":"status")}this.on(this.el,"click",t=>{let e=t.target.closest(this.options.selClose);!e||e.closest("[data-pl-alert]")!==this.el||(t.preventDefault(),this.close())}),this.options.timeout>0&&(this.start(),this.on(this.el,"pointerenter",()=>this.stop()),this.on(this.el,"pointerleave",()=>this.start()),this.on(this.el,"focusin",()=>this.stop()),this.on(this.el,"focusout",()=>this.start())),this.onDestroy(()=>{this.stop(),this.animation?.cancel(),this.animation=null,this.el.classList.remove("pl-alert-leave"),this.el.style.overflow=""})}start(){this.stop(),this.options.timeout>0&&!this.closing&&(this.timer=setTimeout(()=>this.close(),this.options.timeout))}stop(){clearTimeout(this.timer),this.timer=null}async close(){if(this.signal.aborted||this.closing||this.el.hidden||!this.emit("beforehide",{},!0))return;this.closing=!0,this.stop(),this.emit("hide");let{el:t,signal:e}=this,i=S()?0:this.options.duration;if(i&&typeof t.animate=="function"){let s=getComputedStyle(t);t.classList.add("pl-alert-leave"),t.style.overflow="hidden";let o={height:`${t.offsetHeight}px`,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom,marginTop:s.marginTop,marginBottom:s.marginBottom,borderTopWidth:s.borderTopWidth,borderBottomWidth:s.borderBottomWidth,opacity:1,transform:"scale(1)"},n={...o,opacity:0,transform:"scale(0.97)",offset:.45},a={height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px",borderTopWidth:"0px",borderBottomWidth:"0px",opacity:0,transform:"scale(0.97)"};this.animation=t.animate([o,n,a],{duration:i,easing:"cubic-bezier(0.33, 0.5, 0.2, 1)"});try{await this.animation.finished}catch{}if(e.aborted)return;this.animation=null}if(t.hidden=!0,t.classList.remove("pl-alert-leave"),t.style.overflow="",this.closing=!1,this.emit("hidden"),this.options.remove){let s=t.parentNode;this.destroy(),s?.removeChild(t)}}hide(){return this.close()}};d(re,"defaults",{duration:320,timeout:0,remove:!0,selClose:".pl-alert-close"});v("alert",re);var wi=[["days",86400],["hours",3600],["minutes",60],["seconds",1]],Lt=class extends x{init(){this.timer=null,this.target=0,this.remaining=0,this.ended=!1,this.values={},this.cells={};for(let[t]of wi){let e=E(`.pl-countdown-${t}`,this.el);e&&(this.cells[t]=e)}this.el.hasAttribute("role")||this.el.setAttribute("role","timer"),Object.values(this.cells).forEach(t=>t.setAttribute("aria-hidden","true")),this.sr=document.createElement("span"),this.sr.className="pl-countdown-sr",this.sr.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",this.el.append(this.sr),this.onDestroy(()=>{this.stop(),this.sr.remove()}),this.on(document,"visibilitychange",()=>{!document.hidden&&this.timer&&this.tick()}),this.reset(!1),this.options.autostart&&this.start()}resolveTarget(){let{date:t,seconds:e}=this.options;if(t!==""&&t!==null&&t!==void 0){let i=typeof t=="number"?t:Date.parse(t);if(!Number.isNaN(i))return i;console.warn(`[Plossy] countdown: invalid date "${t}"`)}return Date.now()+Math.max(0,Number(e)||0)*1e3}get running(){return this.timer!==null}start(){this.running||this.ended||(this.relative&&(this.target=Date.now()+this.remaining),this.el.classList.add("pl-countdown-running"),this.timer=0,this.tick())}stop(){this.timer!==null&&(clearTimeout(this.timer),this.timer=null,this.remaining=Math.max(0,this.target-Date.now()),this.el.classList.remove("pl-countdown-running"))}reset(t){let e=this.running;this.stop(),t&&typeof t=="object"&&("seconds"in t&&!("date"in t)&&(this.options.date=""),Object.assign(this.options,t));let{date:i}=this.options;this.relative=i===""||i===null||i===void 0||Number.isNaN(typeof i=="number"?i:Date.parse(i)),this.target=this.resolveTarget(),this.remaining=Math.max(0,this.target-Date.now()),this.total=this.remaining,this.ended=!1,this.el.classList.remove("pl-countdown-ended","pl-countdown-finish"),this.render(this.remaining,!1),(e||t&&typeof t=="object"&&this.options.autostart)&&this.start()}tick(){clearTimeout(this.timer);let t=this.target-Date.now();if(this.render(Math.max(0,t)),t<=0){this.timer=null,this.el.classList.remove("pl-countdown-running"),this.ended=!0,this.remaining=0,this.el.classList.add("pl-countdown-ended","pl-countdown-finish"),this.emit("end"),this.options.reload&&this.relative&&this.options.seconds>0&&(this.reset(),this.start());return}this.timer=setTimeout(()=>this.tick(),t%1e3+20)}split(t){let e=Math.ceil(t/1e3),i={};for(let[s,o]of wi)this.cells[s]&&(i[s]=Math.floor(e/o),e-=i[s]*o);return i}render(t,e=!0){let i=this.split(t),s=!1;for(let[n,a]of Object.entries(i))this.values[n]!==a&&(s=!0,this.values[n]=a,this.renderCell(this.cells[n],String(a).padStart(this.options.pad,"0"),e));if(!s)return;this.el.style.setProperty("--pl-countdown-progress",this.total?String(1-t/this.total):"0");let o=Object.entries(i).filter(([n])=>n!=="seconds"||Object.keys(i).length===1).map(([n,a])=>`${a} ${y(`countdown.${n}`,{},this.el)}`).join(" ");o!==this.srKey&&(this.srKey=o,this.sr.textContent=o),e&&this.emit("tick",{...i,remaining:t})}renderCell(t,e,i){let s=[...t.querySelectorAll(":scope > .pl-countdown-digit")];s.length!==e.length&&(t.textContent="",s=[...e].map(()=>{let o=document.createElement("span");return o.className="pl-countdown-digit",t.append(o),o}),i=!1),s.forEach((o,n)=>{let a=e[n],l=o.dataset.value;if(l===a)return;o.dataset.value=a;let h=document.createElement("span");if(h.textContent=a,i&&l!==void 0){h.className="pl-countdown-digit-in";let c=document.createElement("span");c.className="pl-countdown-digit-out",c.textContent=l,c.addEventListener("animationend",()=>c.remove(),{once:!0}),setTimeout(()=>c.remove(),700),o.replaceChildren(h,c)}else o.replaceChildren(h)})}};d(Lt,"defaults",{date:"",seconds:0,autostart:!0,pad:2,reload:!1}),d(Lt,"primary","date");v("countdown",Lt);var W={"arrow-down":'<path d="M12 5v14" /><path d="m19 12-7 7-7-7" />',"arrow-left":'<path d="m12 19-7-7 7-7" /><path d="M19 12H5" />',"arrow-right":'<path d="M5 12h14" /><path d="m12 5 7 7-7 7" />',"arrow-up":'<path d="m5 12 7-7 7 7" /><path d="M12 19V5" />',"arrow-up-right":'<path d="M7 7h10v10" /><path d="M7 17 17 7" />',"arrow-down-left":'<path d="M17 7 7 17" /><path d="M17 17H7V7" />',"chevron-down":'<path d="m6 9 6 6 6-6" />',"chevron-left":'<path d="m15 18-6-6 6-6" />',"chevron-right":'<path d="m9 18 6-6-6-6" />',"chevron-up":'<path d="m18 15-6-6-6 6" />',"chevrons-left":'<path d="m11 17-5-5 5-5" /><path d="m18 17-5-5 5-5" />',"chevrons-right":'<path d="m6 17 5-5-5-5" /><path d="m13 17 5-5-5-5" />',"chevrons-up-down":'<path d="m7 15 5 5 5-5" /><path d="m7 9 5-5 5 5" />',check:'<path d="M20 6 9 17l-5-5" />',"check-check":'<path d="M18 6 7 17l-5-5" /><path d="m22 10-7.5 7.5L13 16" />',x:'<path d="M18 6 6 18" /><path d="m6 6 12 12" />',plus:'<path d="M5 12h14" /><path d="M12 5v14" />',minus:'<path d="M5 12h14" />',"circle-check":'<circle cx="12" cy="12" r="10" /><path d="m16 9-5.5 5.5L8 12" />',"circle-x":'<circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" />',"circle-alert":'<circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" />',"circle-help":'<circle cx="12" cy="12" r="10" /><path d="M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5" /><path d="M12 17h.01" />',"circle-plus":'<circle cx="12" cy="12" r="10" /><path d="M8 12h8" /><path d="M12 8v8" />',"circle-minus":'<circle cx="12" cy="12" r="10" /><path d="M8 12h8" />',info:'<circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" />',"triangle-alert":'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /><path d="M12 9v4" /><path d="M12 17h.01" />',"octagon-alert":'<path d="M12 16h.01" /><path d="M12 8v4" /><path d="M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z" />',ban:'<circle cx="12" cy="12" r="10" /><path d="M4.929 4.929 19.07 19.071" />',search:'<path d="m21 21-4.34-4.34" /><circle cx="11" cy="11" r="8" />',menu:'<path d="M4 5h16" /><path d="M4 12h16" /><path d="M4 19h16" />',ellipsis:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',"ellipsis-vertical":'<circle cx="12" cy="12" r="1" /><circle cx="12" cy="5" r="1" /><circle cx="12" cy="19" r="1" />',"grip-vertical":'<circle cx="9" cy="12" r="1" /><circle cx="9" cy="5" r="1" /><circle cx="9" cy="19" r="1" /><circle cx="15" cy="12" r="1" /><circle cx="15" cy="5" r="1" /><circle cx="15" cy="19" r="1" />',"grip-horizontal":'<circle cx="12" cy="9" r="1" /><circle cx="19" cy="9" r="1" /><circle cx="5" cy="9" r="1" /><circle cx="12" cy="15" r="1" /><circle cx="19" cy="15" r="1" /><circle cx="5" cy="15" r="1" />',settings:'<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /><circle cx="12" cy="12" r="3" />',"sliders-horizontal":'<path d="M10 5H3" /><path d="M12 19H3" /><path d="M14 3v4" /><path d="M16 17v4" /><path d="M21 12h-9" /><path d="M21 19h-5" /><path d="M21 5h-7" /><path d="M8 10v4" /><path d="M8 12H3" />',filter:'<path d="M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" />',home:'<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />',user:'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',users:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><path d="M16 3.128a4 4 0 0 1 0 7.744" /><path d="M22 21v-2a4 4 0 0 0-3-3.87" /><circle cx="9" cy="7" r="4" />',"user-plus":'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><line x1="19" x2="19" y1="8" y2="14" /><line x1="22" x2="16" y1="11" y2="11" />',"user-round":'<circle cx="12" cy="8" r="5" /><path d="M20 21a8 8 0 0 0-16 0" />',"log-in":'<path d="m10 17 5-5-5-5" /><path d="M15 12H3" /><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />',"log-out":'<path d="m16 17 5-5-5-5" /><path d="M21 12H9" /><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />',lock:'<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',"lock-open":'<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" />',key:'<path d="m2 21 9.6-9.6" /><path d="m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19" /><circle cx="15.5" cy="7.5" r="5.5" />',shield:'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />',"shield-check":'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /><path d="m9 12 2 2 4-4" />',mail:'<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" /><rect x="2" y="4" width="20" height="16" rx="2" />',phone:'<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />',"message-circle":'<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />',"message-square":'<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />',send:'<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" /><path d="m21.854 2.147-10.94 10.939" />',bell:'<path d="M10.268 21a2 2 0 0 0 3.464 0" /><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" />',"bell-off":'<path d="M10.268 21a2 2 0 0 0 3.464 0" /><path d="M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742" /><path d="m2 2 20 20" /><path d="M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05" />',"at-sign":'<circle cx="12" cy="12" r="4" /><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8" />',heart:'<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" />',star:'<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" />',bookmark:'<path d="M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z" />',"thumbs-up":'<path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" /><path d="M7 10v12" />',"thumbs-down":'<path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" /><path d="M17 14V2" />',smile:'<path d="M15 10V9" /><path d="M16.472 15a6 6 0 01-8.943 0" /><path d="M9 10V9" /><circle cx="12" cy="12" r="10" />',flag:'<path d="M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528" />',tag:'<path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" /><circle cx="7.5" cy="7.5" r=".5" fill="currentColor" />',hash:'<line x1="4" x2="20" y1="9" y2="9" /><line x1="4" x2="20" y1="15" y2="15" /><line x1="10" x2="8" y1="3" y2="21" /><line x1="16" x2="14" y1="3" y2="21" />',calendar:'<path d="M8 2v3" /><path d="M16 2v3" /><rect x="3" y="3" width="18" height="18" rx="2" /><path d="M3 9h18" />',clock:'<circle cx="12" cy="12" r="10" /><path d="M12 6v6l4 2" />',timer:'<line x1="10" x2="14" y1="2" y2="2" /><line x1="12" x2="15" y1="14" y2="11" /><circle cx="12" cy="14" r="8" />',history:'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" /><path d="M12 7v5l4 2" />',file:'<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /><path d="M14 2v5a1 1 0 0 0 1 1h5" />',"file-text":'<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /><path d="M14 2v5a1 1 0 0 0 1 1h5" /><path d="M10 9H8" /><path d="M16 13H8" /><path d="M16 17H8" />',files:'<path d="M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" /><path d="M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z" /><path d="M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" />',folder:'<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />',"folder-open":'<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />',image:'<rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />',images:'<path d="m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16" /><path d="M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2" /><circle cx="13" cy="7" r="1" fill="currentColor" /><rect x="8" y="2" width="14" height="14" rx="2" />',camera:'<path d="M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" /><circle cx="12" cy="13" r="3" />',video:'<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /><rect x="2" y="6" width="14" height="12" rx="2" />',film:'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M7 3v18" /><path d="M3 7.5h4" /><path d="M3 12h18" /><path d="M3 16.5h4" /><path d="M17 3v18" /><path d="M17 7.5h4" /><path d="M17 16.5h4" />',music:'<path d="M21 16V3a1 1 0 0 0-1.28-.96l-10 2.917a1 1 0 0 0-.72.96V19" /><circle cx="18" cy="16" r="3" /><circle cx="6" cy="19" r="3" />',download:'<path d="M12 15V3" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><path d="m7 10 5 5 5-5" />',upload:'<path d="M12 3v12" /><path d="m17 8-5-5-5 5" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />',cloud:'<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />',"cloud-upload":'<path d="M12 13v8" /><path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" /><path d="m8 17 4-4 4 4" />',"cloud-download":'<path d="M12 13v8l-4-4" /><path d="m12 21 4-4" /><path d="M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284" />',share:'<path d="M12 2v13" /><path d="m16 6-4-4-4 4" /><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />',"share-2":'<circle cx="18" cy="5" r="3" /><circle cx="6" cy="12" r="3" /><circle cx="18" cy="19" r="3" /><line x1="8.59" x2="15.42" y1="13.51" y2="17.49" /><line x1="15.41" x2="8.59" y1="6.51" y2="10.49" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"link-2":'<path d="M9 17H7A5 5 0 0 1 7 7h2" /><path d="M15 7h2a5 5 0 1 1 0 10h-2" /><line x1="8" x2="16" y1="12" y2="12" />',"external-link":'<path d="M15 3h6v6" /><path d="M10 14 21 3" /><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />',paperclip:'<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" />',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />',clipboard:'<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />',"clipboard-check":'<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /><path d="m9 14 2 2 4-4" />',pencil:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" />',"pen-line":'<path d="M13 21h8" /><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />',trash:'<path d="M10 11v6" /><path d="M14 11v6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /><path d="M3 6h18" /><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />',"trash-2":'<path d="M10 11v6" /><path d="M14 11v6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /><path d="M3 6h18" /><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />',save:'<path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" /><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" /><path d="M7 3v4a1 1 0 0 0 1 1h7" />',"refresh-cw":'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" />',"rotate-cw":'<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" />',"rotate-ccw":'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" />',eye:'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /><circle cx="12" cy="12" r="3" />',"eye-off":'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" /><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" /><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" /><path d="m2 2 20 20" />',maximize:'<path d="M8 3H5a2 2 0 0 0-2 2v3" /><path d="M21 8V5a2 2 0 0 0-2-2h-3" /><path d="M3 16v3a2 2 0 0 0 2 2h3" /><path d="M16 21h3a2 2 0 0 0 2-2v-3" />',minimize:'<path d="M8 3v3a2 2 0 0 1-2 2H3" /><path d="M21 8h-3a2 2 0 0 1-2-2V3" /><path d="M3 16h3a2 2 0 0 1 2 2v3" /><path d="M16 21v-3a2 2 0 0 1 2-2h3" />',"maximize-2":'<path d="M15 3h6v6" /><path d="m21 3-7 7" /><path d="m3 21 7-7" /><path d="M9 21H3v-6" />',"minimize-2":'<path d="m14 10 7-7" /><path d="M20 10h-6V4" /><path d="m3 21 7-7" /><path d="M4 14h6v6" />',expand:'<path d="m15 15 6 6" /><path d="m15 9 6-6" /><path d="M21 16v5h-5" /><path d="M21 8V3h-5" /><path d="M3 16v5h5" /><path d="m3 21 6-6" /><path d="M3 8V3h5" /><path d="M9 9 3 3" />',shrink:'<path d="m15 15 6 6m-6-6v4.8m0-4.8h4.8" /><path d="M9 19.8V15m0 0H4.2M9 15l-6 6" /><path d="M15 4.2V9m0 0h4.8M15 9l6-6" /><path d="M9 4.2V9m0 0H4.2M9 9 3 3" />',"zoom-in":'<circle cx="11" cy="11" r="8" /><line x1="21" x2="16.65" y1="21" y2="16.65" /><line x1="11" x2="11" y1="8" y2="14" /><line x1="8" x2="14" y1="11" y2="11" />',"zoom-out":'<circle cx="11" cy="11" r="8" /><line x1="21" x2="16.65" y1="21" y2="16.65" /><line x1="8" x2="14" y1="11" y2="11" />',move:'<path d="M12 2v20" /><path d="m15 19-3 3-3-3" /><path d="m19 9 3 3-3 3" /><path d="M2 12h20" /><path d="m5 9-3 3 3 3" /><path d="m9 5 3-3 3 3" />',play:'<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" />',pause:'<rect x="14" y="3" width="5" height="18" rx="1" /><rect x="5" y="3" width="5" height="18" rx="1" />',square:'<rect width="18" height="18" x="3" y="3" rx="2" />',"skip-back":'<path d="M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z" /><path d="M3 20V4" />',"skip-forward":'<path d="M21 4v16" /><path d="M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z" />',"volume-2":'<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" /><path d="M16 9a5 5 0 0 1 0 6" /><path d="M19.364 18.364a9 9 0 0 0 0-12.728" />',"volume-x":'<path d="M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z" /><path d="m16.5 14.5 5-5" /><path d="m16.5 9.5 5 5" />',mic:'<path d="M12 19v3" /><path d="M19 10v2a7 7 0 0 1-14 0v-2" /><rect x="9" y="2" width="6" height="13" rx="3" />',sun:'<circle cx="12" cy="12" r="4" /><path d="M12 2v2" /><path d="M12 20v2" /><path d="m4.93 4.93 1.41 1.41" /><path d="m17.66 17.66 1.41 1.41" /><path d="M2 12h2" /><path d="M20 12h2" /><path d="m6.34 17.66-1.41 1.41" /><path d="m19.07 4.93-1.41 1.41" />',moon:'<path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" />',monitor:'<rect width="20" height="14" x="2" y="3" rx="2" /><line x1="8" x2="16" y1="21" y2="21" /><line x1="12" x2="12" y1="17" y2="21" />',smartphone:'<rect width="14" height="20" x="5" y="2" rx="2" ry="2" /><path d="M12 18h.01" />',laptop:'<path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z" /><path d="M20.054 15.987H3.946" />',palette:'<path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" /><circle cx="13.5" cy="6.5" r=".5" fill="currentColor" /><circle cx="17.5" cy="10.5" r=".5" fill="currentColor" /><circle cx="6.5" cy="12.5" r=".5" fill="currentColor" /><circle cx="8.5" cy="7.5" r=".5" fill="currentColor" />',sparkles:'<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /><path d="M20 2v4" /><path d="M22 4h-4" /><circle cx="4" cy="20" r="2" />',"wand-sparkles":'<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72" /><path d="m14 7 3 3" /><path d="M5 6v4" /><path d="M19 14v4" /><path d="M10 2v2" /><path d="M7 8H3" /><path d="M21 16h-4" /><path d="M11 3H9" />',zap:'<path d="M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z" />',flame:'<path d="M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" />',droplet:'<path d="M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z" />',leaf:'<path d="M11 20a10 10 0 0010-10 25.9 25.9 0 00-1.04-7.281 1 1 0 00-1.755-.325C15.833 5.5 13 5.5 9.8 6.1A7 7 0 0011 20" /><path d="M2 21a5 5 0 012.911-4.544C7.613 15.212 8.351 15.24 11 13" />',"shopping-cart":'<path d="m2.05 2.05 1.099-.028a1 1 0 0 1 1.008.815l2.69 14.347A1 1 0 0 0 7.83 18H18" /><path d="M4.563 5h16.435a1 1 0 0 1 .981 1.204l-1.026 6.226A2 2 0 0 1 18.962 14H6.25" /><circle cx="18" cy="20" r="2" /><circle cx="8" cy="20" r="2" />',"shopping-bag":'<path d="M16 10a4 4 0 0 1-8 0" /><path d="M3.103 6.034h17.794" /><path d="M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z" />',"credit-card":'<rect width="20" height="14" x="2" y="5" rx="2" /><line x1="2" x2="22" y1="10" y2="10" /><path d="M6 14h2" />',wallet:'<path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" /><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" />',package:'<path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z" /><path d="M12 22V12" /><polyline points="3.29 7 12 12 20.71 7" /><path d="m7.5 4.27 9 5.15" />',gift:'<path d="M12 7v14" /><path d="M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8" /><path d="M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5" /><rect x="3" y="7" width="18" height="4" rx="1" />',truck:'<path d="M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2" /><path d="M15 18H9" /><path d="M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14" /><circle cx="17" cy="18" r="2" /><circle cx="7" cy="18" r="2" />',store:'<path d="M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5" /><path d="M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244" /><path d="M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05" />',receipt:'<path d="M12 17V7" /><path d="M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8" /><path d="M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z" />',percent:'<line x1="19" x2="5" y1="5" y2="19" /><circle cx="6.5" cy="6.5" r="2.5" /><circle cx="17.5" cy="17.5" r="2.5" />',"map-pin":'<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" /><circle cx="12" cy="10" r="3" />',map:'<path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" /><path d="M15 5.764v15" /><path d="M9 3.236v15" />',globe:'<circle cx="12" cy="12" r="10" /><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /><path d="M2 12h20" />',compass:'<circle cx="12" cy="12" r="10" /><path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />',navigation:'<polygon points="3 11 22 2 13 21 11 13 3 11" />',"layout-grid":'<rect width="7" height="7" x="3" y="3" rx="1" /><rect width="7" height="7" x="14" y="3" rx="1" /><rect width="7" height="7" x="14" y="14" rx="1" /><rect width="7" height="7" x="3" y="14" rx="1" />',"layout-list":'<rect width="7" height="7" x="3" y="3" rx="1" /><rect width="7" height="7" x="3" y="14" rx="1" /><path d="M14 4h7" /><path d="M14 9h7" /><path d="M14 15h7" /><path d="M14 20h7" />',"layout-dashboard":'<rect width="7" height="9" x="3" y="3" rx="1" /><rect width="7" height="5" x="14" y="3" rx="1" /><rect width="7" height="9" x="14" y="12" rx="1" /><rect width="7" height="5" x="3" y="16" rx="1" />',list:'<path d="M3 5h.01" /><path d="M3 12h.01" /><path d="M3 19h.01" /><path d="M8 5h13" /><path d="M8 12h13" /><path d="M8 19h13" />',"list-ordered":'<path d="M11 5h10" /><path d="M11 12h10" /><path d="M11 19h10" /><path d="M4 4h1v5" /><path d="M4 9h2" /><path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" />',table:'<path d="M12 3v18" /><rect width="18" height="18" x="3" y="3" rx="2" /><path d="M3 9h18" /><path d="M3 15h18" />',"columns-2":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M12 3v18" />',"columns-3":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M9 3v18" /><path d="M15 3v18" />',"rows-3":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M21 9H3" /><path d="M21 15H3" />',"panel-left":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M9 3v18" />',"panel-right":'<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M15 3v18" />',code:'<path d="m16 18 6-6-6-6" /><path d="m8 6-6 6 6 6" />',"code-xml":'<path d="m18 16 4-4-4-4" /><path d="m6 8-4 4 4 4" /><path d="m14.5 4-5 16" />',terminal:'<path d="M12 19h8" /><path d="m4 17 6-6-6-6" />',braces:'<path d="M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" /><path d="M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" />',database:'<ellipse cx="12" cy="5" rx="9" ry="3" /><path d="M3 5V19A9 3 0 0 0 21 19V5" /><path d="M3 12A9 3 0 0 0 21 12" />',server:'<rect width="20" height="8" x="2" y="2" rx="2" ry="2" /><rect width="20" height="8" x="2" y="14" rx="2" ry="2" /><line x1="6" x2="6.01" y1="6" y2="6" /><line x1="6" x2="6.01" y1="18" y2="18" />',cpu:'<path d="M12 20v2" /><path d="M12 2v2" /><path d="M17 20v2" /><path d="M17 2v2" /><path d="M2 12h2" /><path d="M2 17h2" /><path d="M2 7h2" /><path d="M20 12h2" /><path d="M20 17h2" /><path d="M20 7h2" /><path d="M7 20v2" /><path d="M7 2v2" /><rect x="4" y="4" width="16" height="16" rx="2" /><rect x="8" y="8" width="8" height="8" rx="1" />',"git-branch":'<path d="M15 6a9 9 0 0 0-9 9V3" /><circle cx="18" cy="6" r="3" /><circle cx="6" cy="18" r="3" />',bug:'<path d="M12 20v-9" /><path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z" /><path d="M14.12 3.88 16 2" /><path d="M21 21a4 4 0 0 0-3.81-4" /><path d="M21 5a4 4 0 0 1-3.55 3.97" /><path d="M22 13h-4" /><path d="M3 21a4 4 0 0 1 3.81-4" /><path d="M3 5a4 4 0 0 0 3.55 3.97" /><path d="M6 13H2" /><path d="m8 2 1.88 1.88" /><path d="M9 7.13V6a3 3 0 1 1 6 0v1.13" />',rocket:'<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" /><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09" /><path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z" /><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" />',puzzle:'<path d="M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z" />',box:'<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" /><path d="m3.3 7 8.7 5 8.7-5" /><path d="M12 22V12" />',boxes:'<path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" /><path d="m7 16.5-4.74-2.85" /><path d="m7 16.5 5-3" /><path d="M7 16.5v5.17" /><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" /><path d="m17 16.5-5-3" /><path d="m17 16.5 4.74-2.85" /><path d="M17 16.5v5.17" /><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" /><path d="M12 8 7.26 5.15" /><path d="m12 8 4.74-2.85" /><path d="M12 13.5V8" />',layers:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" /><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" /><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" />',component:'<path d="M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" /><path d="M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z" /><path d="M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z" /><path d="M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" />',"chart-bar":'<path d="M3 3v16a2 2 0 0 0 2 2h16" /><path d="M7 16h8" /><path d="M7 11h12" /><path d="M7 6h3" />',"chart-line":'<path d="M3 3v16a2 2 0 0 0 2 2h16" /><path d="m19 9-5 5-4-4-3 3" />',"chart-pie":'<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" /><path d="M21.21 15.89A10 10 0 1 1 8 2.83" />',"trending-up":'<path d="M16 7h6v6" /><path d="m22 7-8.5 8.5-5-5L2 17" />',"trending-down":'<path d="M16 17h6v-6" /><path d="m22 17-8.5-8.5-5 5L2 7" />',activity:'<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />',bold:'<path d="M6 12h9a4 4 0 010 8H7a1 1 0 01-1-1V5a1 1 0 011-1h7a4 4 0 010 8" />',italic:'<line x1="19" x2="10" y1="4" y2="4" /><line x1="14" x2="5" y1="20" y2="20" /><line x1="15" x2="9" y1="4" y2="20" />',underline:'<path d="M6 4v6a6 6 0 0 0 12 0V4" /><line x1="4" x2="20" y1="20" y2="20" />',"align-left":'<path d="M21 5H3" /><path d="M15 12H3" /><path d="M17 19H3" />',"align-center":'<path d="M21 5H3" /><path d="M17 12H7" /><path d="M19 19H5" />',"align-right":'<path d="M21 5H3" /><path d="M21 12H9" /><path d="M21 19H7" />',quote:'<path d="M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" /><path d="M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" />',type:'<path d="M12 4v16" /><path d="M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" /><path d="M9 20h6" />',"life-buoy":'<circle cx="12" cy="12" r="10" /><path d="m4.93 4.93 4.24 4.24" /><path d="m14.83 9.17 4.24-4.24" /><path d="m14.83 14.83 4.24 4.24" /><path d="m9.17 14.83-4.24 4.24" /><circle cx="12" cy="12" r="4" />',"book-open":'<path d="M12 5v16" /><path d="M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z" />',"graduation-cap":'<path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" /><path d="M22 10v6" /><path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" />',lightbulb:'<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" /><path d="M9 18h6" /><path d="M10 22h4" />',coffee:'<path d="M10 2v2" /><path d="M14 2v2" /><path d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1" /><path d="M6 2v2" />',award:'<path d="m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526" /><circle cx="12" cy="8" r="6" />',crown:'<path d="M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z" /><path d="M5 21h14" />',target:'<circle cx="12" cy="12" r="10" /><circle cx="12" cy="12" r="6" /><circle cx="12" cy="12" r="2" />',circle:'<circle cx="12" cy="12" r="10" />',dot:'<circle cx="12" cy="12" r="1" />',loader:'<path d="M12 2v4" /><path d="m16.2 7.8 2.9-2.9" /><path d="M18 12h4" /><path d="m16.2 16.2 2.9 2.9" /><path d="M12 18v4" /><path d="m4.9 19.1 2.9-2.9" /><path d="M2 12h4" /><path d="m4.9 4.9 2.9 2.9" />',"loader-circle":'<path d="M21 12a9 9 0 1 1-6.219-8.56" />'};var Et=class extends x{init(){this.render()}render(t=this.options.name){let e=W[t];if(this.el.classList.add("pl-icon"),!e){t&&console.warn(`[Plossy] icon: nieznana ikona \u201E${t}"`);return}this.options.name=t,this.el.hasAttribute("aria-label")||this.el.setAttribute("aria-hidden","true"),this.el.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${this.options.stroke}" stroke-linecap="round" stroke-linejoin="round">${e}</svg>`}};d(Et,"defaults",{name:"",stroke:1.75}),d(Et,"primary","name");v("icon",Et);O.icons={add(r){Object.assign(W,r)},names(){return Object.keys(W).sort()},get(r){return W[r]||null}};var ae=class extends x{init(){let{container:t}=this.options;this.scroller=t&&(this.el.closest(t)||document.querySelector(t))||null,this.last=this.position,this.scrolled=!1,this.hidden=!1;let e=z(()=>this.update());this.on(this.scroller||window,"scroll",e,{passive:!0}),this.on(this.el,"focusin",()=>this.show()),this.onDestroy(()=>this.el.classList.remove(this.options.cls,"pl-navbar-hidden")),this.update()}get position(){return Math.max(0,this.scroller?this.scroller.scrollTop:window.scrollY)}get busy(){return!!this.el.querySelector('[aria-expanded="true"], .pl-navbar-toggle.pl-open')}update(){let{offset:t,cls:e,hide:i,hideOffset:s,tolerance:o}=this.options,n=this.position,a=n>t;if(a!==this.scrolled&&(this.scrolled=a,this.el.classList.toggle(e,a),this.emit("scrolled",{scrolled:a})),i){let l=n-this.last;n<=s||l<-o?this.show():l>o&&!this.busy&&this.hide(),Math.abs(l)>o&&(this.last=n)}else this.last=n}show(){this.hidden&&(this.hidden=!1,this.el.classList.remove("pl-navbar-hidden"),this.emit("show"))}hide(){this.hidden||(this.hidden=!0,this.el.classList.add("pl-navbar-hidden"),this.emit("hide"))}};d(ae,"defaults",{offset:16,cls:"pl-navbar-scrolled",hide:!1,hideOffset:240,tolerance:6,container:null});var le=class extends x{init(){this.parents.forEach(t=>{let{link:e,sub:i}=this.parts(t);if(!e||!i)return;let s=t.classList.contains("pl-open")||!!i.querySelector(".pl-active");t.classList.toggle("pl-open",s),i.hidden=!s,i.id||(i.id=k("pl-nav-sub")),e.setAttribute("aria-controls",i.id),e.setAttribute("aria-expanded",String(s)),e.matches("button, a[href]")||(e.setAttribute("role","button"),e.tabIndex=0)}),this.on(this.el,"click",t=>{let e=this.parentOf(t.target);e&&(t.preventDefault(),this.toggle(e))}),this.on(this.el,"keydown",t=>{if(t.key!=="Enter"&&t.key!==" ")return;let e=this.parentOf(t.target);!e||t.target.closest("button, a[href]")||(t.preventDefault(),this.toggle(e))})}get parents(){return T(".pl-parent",this.el).filter(t=>t.closest("[data-pl-nav]")===this.el)}parts(t){return{link:t.querySelector(":scope > a, :scope > button"),sub:t.querySelector(":scope > .pl-nav-sub")}}parentOf(t){let i=t.closest?.('a, button, [role="button"]')?.parentElement;return!i?.classList.contains("pl-parent")||i.closest("[data-pl-nav]")!==this.el?null:this.parts(i).sub?i:null}resolve(t){return typeof t=="number"?this.parents[t]:t}toggle(t){if(t=this.resolve(t),!!t)return t.classList.contains("pl-open")?this.hide(t):this.show(t)}async show(t){if(t=this.resolve(t),!t||t.classList.contains("pl-open")||!this.emit("beforeshow",{item:t},!0))return;this.options.multiple||this.parents.filter(o=>o!==t&&o.parentElement===t.parentElement&&o.classList.contains("pl-open")).forEach(o=>this.hide(o,!0));let{link:e,sub:i}=this.parts(t);t.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),this.emit("show",{item:t});let{signal:s}=this;await J(i,!0,{duration:this.options.duration}),s.aborted||this.emit("shown",{item:t})}async hide(t,e=!1){if(t=this.resolve(t),!t||!t.classList.contains("pl-open")||!e&&!this.options.collapsible||!this.emit("beforehide",{item:t},!0))return;let{link:i,sub:s}=this.parts(t);t.classList.remove("pl-open"),i.setAttribute("aria-expanded","false"),this.emit("hide",{item:t});let{signal:o}=this;await J(s,!1,{duration:this.options.duration}),o.aborted||this.emit("hidden",{item:t})}};d(le,"defaults",{multiple:!1,collapsible:!0,duration:340});v("navbar",ae);v("nav",le);var St=class extends x{init(){let{el:t}=this;this.active=null,!t.hasAttribute("aria-label")&&!t.textContent.trim()&&t.setAttribute("aria-label",y("totop.label",{},t)),t.matches("a[href], button")||(t.hasAttribute("role")||t.setAttribute("role","button"),t.hasAttribute("tabindex")||(t.tabIndex=0),this.on(t,"keydown",e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.scroll())})),this.on(t,"click",e=>{e.preventDefault(),this.scroll()}),this.update=z(()=>this.refresh()),this.on(window,"scroll",this.update,{passive:!0}),this.on(window,"resize",this.update,{passive:!0}),this.refresh()}get target(){let{target:t}=this.options,e=this.el.getAttribute("href"),i=t||(e&&e.length>1&&e.startsWith("#")?e:"");if(!i)return null;try{return document.querySelector(i)}catch{return null}}refresh(){let t=document.scrollingElement||document.documentElement,e=window.scrollY,i=Math.max(t.scrollHeight-window.innerHeight,0),s=i?$(e/i,0,1):0;this.el.style.setProperty("--pl-totop-progress",s.toFixed(4));let o=e>this.options.offset;o!==this.active&&(this.active=o,this.el.classList.toggle(this.options.cls,o),this.emit(o?"show":"hide"))}scroll(){if(!this.emit("beforescroll",{},!0))return;let t=this.target,e=S()?"auto":"smooth";if(t?t.scrollIntoView({behavior:e,block:"start"}):window.scrollTo({top:0,left:0,behavior:e}),this.options.focus){let i=t||document.body,s=i.hasAttribute("tabindex");s||i.setAttribute("tabindex","-1");let o=i===document.body;o&&(i.style.outline="none"),i.focus({preventScroll:!0}),i.addEventListener("blur",()=>{s||i.removeAttribute("tabindex"),o&&(i.style.outline="")},{once:!0})}this.emit("scroll",{target:t})}destroy(){this.el.classList.remove(this.options.cls),super.destroy()}};d(St,"defaults",{offset:400,target:"",focus:!0,cls:"pl-active"}),d(St,"primary","offset");v("totop",St);var qe=r=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${W[r]||""}</svg>`,he=r=>String(r).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]);function Mi(r,t="en"){let e=["B","KB","MB","GB"],i=0;for(;r>=1024&&i<e.length-1;)r/=1024,i++;return`${r.toLocaleString(t,{maximumFractionDigits:i?1:0})} ${e[i]}`}function rs(r){let t=r.type||"",e=(r.name.split(".").pop()||"").toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"film":t.startsWith("audio/")?"music":/^(zip|rar|7z|tar|gz)$/.test(e)?"package":/^(js|ts|json|html|css|scss|xml|php|py)$/.test(e)?"code":/^(csv|xls|xlsx|ods)$/.test(e)?"table":t==="application/pdf"||t.startsWith("text/")||/^(doc|docx|odt|rtf|md)$/.test(e)?"file-text":"file"}function as(r,t){let e=String(t||"").split(",").map(o=>o.trim().toLowerCase()).filter(Boolean);if(!e.length)return!0;let i=r.name.toLowerCase(),s=(r.type||"").toLowerCase();return e.some(o=>o.startsWith(".")?i.endsWith(o):o.endsWith("/*")?s.startsWith(o.slice(0,-1)):s===o)}var ce=class extends x{init(){let{el:t,options:e}=this;this.entries=[],this.dragDepth=0,this.input=E('input[type="file"]',t),this.input||(this.input=document.createElement("input"),this.input.type="file",this.input.tabIndex=-1,this.input.name=e.name,this.input.setAttribute("aria-label",y("upload.choose",{},t)),this.input.hidden=!0,t.append(this.input),t.hasAttribute("tabindex")||(t.tabIndex=0),t.setAttribute("role","button")),e.multiple===null?e.multiple=this.input.multiple:this.input.multiple=!!e.multiple,e.accept?this.input.accept=e.accept:e.accept=this.input.accept||"",this.list=e.list&&E(e.list)||(t.nextElementSibling?.classList.contains("pl-upload-list")?t.nextElementSibling:null),this.list||(this.list=document.createElement("ul"),this.list.className="pl-upload-list",t.after(this.list),this.ownList=!0),this.list.setAttribute("aria-live","polite"),this.on(this.input,"change",()=>{let i=[...this.input.files];i.length&&this.add(i)}),this.on(t,"click",i=>{i.target.closest("a, button, label, input")||this.browse()}),this.on(t,"keydown",i=>{i.target===t&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.browse())}),this.on(t,"dragenter",i=>{this.hasFiles(i)&&(i.preventDefault(),this.dragDepth++,t.classList.add("pl-upload-dragover"))}),this.on(t,"dragover",i=>{this.hasFiles(i)&&(i.preventDefault(),i.dataTransfer.dropEffect="copy")}),this.on(t,"dragleave",()=>{this.dragDepth=Math.max(0,this.dragDepth-1),this.dragDepth||t.classList.remove("pl-upload-dragover")}),this.on(t,"drop",i=>{this.hasFiles(i)&&(i.preventDefault(),this.dragDepth=0,t.classList.remove("pl-upload-dragover"),this.disabled||this.add([...i.dataTransfer.files]))}),this.on(this.list,"click",i=>{let o=i.target.closest(".pl-upload-remove")?.closest(".pl-upload-item"),n=o&&this.entries.find(a=>a.el===o);n&&this.remove(n.file)}),this.onDestroy(()=>{this.entries.forEach(i=>this.release(i)),this.ownList&&this.list.remove(),this.errorEl?.remove()})}get disabled(){return this.el.classList.contains("pl-disabled")||this.input.disabled}get files(){return this.entries.map(t=>t.file)}hasFiles(t){return[...t.dataTransfer?.types||[]].includes("Files")}browse(){this.disabled||this.input.click()}add(t){let{options:e}=this,i=[],s=[];this.clearErrors(),e.multiple||(t=[...t].slice(0,1));for(let n of t){let a=null;as(n,e.accept)?e.maxSize&&n.size>e.maxSize*1024*1024?a={type:"size",message:y("upload.size",{name:n.name,size:Mi(n.size,q(this.el)),max:e.maxSize},this.el)}:e.maxFiles&&this.entries.length+i.length>=e.maxFiles&&(a={type:"count",message:y("upload.count",{n:e.maxFiles},this.el)}):a={type:"type",message:y("upload.type",{name:n.name},this.el)},a?(a.type!=="count"||!s.some(l=>l.type==="count"))&&s.push({...a,file:n}):i.push(n)}s.forEach(n=>this.emit("error",n)),!e.multiple&&i.length&&this.clear(!0),s.length&&this.showErrors(s);let o=i.map((n,a)=>this.createEntry(n,a));return this.entries.push(...o),this.sync(),o.length&&(this.emit("select",{files:i}),e.url&&e.auto&&o.forEach(n=>this.send(n))),i}createEntry(t,e=0){let i={id:k("pl-upload"),file:t,status:"ready",percent:0,xhr:null,objectUrl:null},s=document.createElement("li");s.className="pl-upload-item",s.style.animationDelay=`${e*50}ms`;let o=qe(rs(t));this.options.thumbnails&&t.type?.startsWith("image/")&&typeof URL.createObjectURL=="function"&&(i.objectUrl=URL.createObjectURL(t),o=`<img src="${i.objectUrl}" alt="">`);let n=he(t.name);return s.innerHTML=`<span class="pl-upload-thumb">${o}</span><span class="pl-upload-info"><span class="pl-upload-name" title="${n}">${n}</span><span class="pl-upload-meta"></span></span><button class="pl-upload-remove" type="button" aria-label="${he(y("upload.remove",{name:t.name},this.el))}">${qe("x")}</button><span class="pl-upload-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="${he(y("upload.progress",{name:t.name},this.el))}"><span class="pl-upload-bar"></span></span>`,i.el=s,this.list.append(s),this.describe(i),i}describe(t,e){let{file:i}=t,s=i.name.includes(".")?i.name.split(".").pop().toUpperCase():"",o=[Mi(i.size,q(this.el)),s].filter(Boolean).join(" \xB7 "),n=E(".pl-upload-meta",t.el);n&&(n.textContent=e?`${e}`:o),t.base=o}find(t){return typeof t=="number"?this.entries[t]||null:this.entries.find(e=>e===t||e.file===t||e.id===t||e.el===t)||null}setProgress(t,e,i={}){let s=this.find(t);!s||s.status==="done"||(e=Math.min(100,Math.max(0,Math.round(e))),s.percent=e,s.status="uploading",s.el.classList.add("pl-upload-item-uploading"),s.el.classList.remove("pl-upload-item-error"),s.el.style.setProperty("--pl-upload-value",e/100),E(".pl-upload-progress",s.el)?.setAttribute("aria-valuenow",e),this.describe(s,y("upload.uploading",{percent:e},this.el)),this.emit("progress",{file:s.file,percent:e,...i}))}complete(t,e=null,i=null){let s=this.find(t);!s||s.status==="done"||(s.status="done",s.percent=100,s.el.style.setProperty("--pl-upload-value",1),s.el.classList.remove("pl-upload-item-uploading","pl-upload-item-error"),s.el.classList.add("pl-upload-item-done"),this.describe(s),this.describe(s,`${s.base} \xB7 ${y("upload.done",{},this.el)}`),this.emit("complete",{file:s.file,response:e,xhr:i}),this.entries.every(o=>o.status==="done")&&this.emit("completeall",{files:this.files}))}fail(t,e=y("upload.failed",{},this.el),i=null){let s=this.find(t);s&&(s.status="error",s.el.classList.remove("pl-upload-item-uploading"),s.el.classList.add("pl-upload-item-error"),this.describe(s,e),this.emit("error",{type:"upload",message:e,file:s.file,xhr:i}))}upload(){this.options.url&&this.entries.filter(t=>t.status==="ready"||t.status==="error").forEach(t=>this.send(t))}send(t){let{options:e}=this,i=new XMLHttpRequest,s=new FormData;if(s.append(e.name,t.file,t.file.name),t.xhr=i,i.open(e.method,e.url),i.upload.addEventListener("progress",o=>{o.lengthComputable&&this.setProgress(t,o.loaded/o.total*100,{loaded:o.loaded,total:o.total})}),i.addEventListener("load",()=>{if(t.xhr=null,i.status>=200&&i.status<300){let o=i.responseText;try{o=JSON.parse(o)}catch{}this.complete(t,o,i)}else this.fail(t,y("upload.failedStatus",{status:i.status},this.el),i)}),i.addEventListener("error",()=>{t.xhr=null,this.fail(t,y("upload.failedNetwork",{},this.el),i)}),!this.emit("beforesend",{file:t.file,xhr:i,data:s},!0)){t.xhr=null;return}this.setProgress(t,0),i.send(s)}release(t){t.xhr?.abort(),t.xhr=null,t.objectUrl&&URL.revokeObjectURL(t.objectUrl)}remove(t){let e=this.find(t);if(!e)return;this.entries.splice(this.entries.indexOf(e),1),this.release(e);let i=e.el;i.classList.add("pl-upload-item-leave"),setTimeout(()=>i.remove(),200),this.clearErrors(),this.sync(),this.emit("remove",{file:e.file})}clear(t=!1){let e=this.entries.splice(0);e.forEach(i=>{this.release(i),i.el.remove()}),this.clearErrors(),this.sync(),t||e.forEach(i=>this.emit("remove",{file:i.file}))}sync(){try{let t=new DataTransfer;this.entries.forEach(e=>t.items.add(e.file)),this.input.files=t.files}catch{}this.el.classList.toggle("pl-upload-has-files",this.entries.length>0)}showErrors(t){let{el:e}=this;e.classList.remove("pl-upload-invalid"),e.offsetWidth,e.classList.add("pl-upload-invalid"),clearTimeout(this.invalidTimer),this.invalidTimer=setTimeout(()=>e.classList.remove("pl-upload-invalid"),1600),this.options.messages&&(this.errorEl||(this.errorEl=document.createElement("div"),this.errorEl.className="pl-upload-error",this.errorEl.setAttribute("role","alert")),this.errorEl.innerHTML=`${qe("circle-alert")}<span>${t.map(i=>he(i.message)).join("<br>")}</span>`,e.after(this.errorEl))}clearErrors(){this.errorEl?.remove(),this.el.classList.remove("pl-upload-invalid")}};d(ce,"defaults",{multiple:null,accept:"",maxSize:0,maxFiles:0,url:"",name:"file",method:"POST",auto:!0,thumbnails:!0,list:"",messages:!0});v("upload",ce);var $t=class extends x{init(){let{el:t,options:e}=this,i=Math.max(1,Number(e.length)||6);e.length=i,t.classList.add("pl-otp"),this.input=E("input:not(.pl-otp-box)",t),this.input?(this.input.classList.add("pl-otp-value"),this.input.tabIndex=-1,this.input.setAttribute("aria-hidden","true")):(this.input=document.createElement("input"),this.input.type="hidden",e.name&&(this.input.name=e.name),t.append(this.input),this.ownInput=!0);let s=this.input.disabled,o=this.sanitize(this.input.value||"");t.setAttribute("role","group"),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&t.setAttribute("aria-label",e.label??y("otp.label",{},t)),this.boxes=[],this.generated=[];let n=null;for(let a=0;a<i;a++){if(!n||e.separator>0&&a%e.separator===0){if(n){let h=document.createElement("span");h.className="pl-otp-separator",h.setAttribute("aria-hidden","true"),t.insertBefore(h,this.input),this.generated.push(h)}n=document.createElement("span"),n.className="pl-otp-group",t.insertBefore(n,this.input),this.generated.push(n)}let l=document.createElement("input");l.className="pl-otp-box",l.type=e.masked?"password":"text",l.inputMode=e.type==="numeric"?"numeric":"text",e.type==="numeric"&&(l.pattern="[0-9]*"),l.autocomplete=a===0?"one-time-code":"off",l.autocapitalize="characters",l.spellcheck=!1,l.disabled=s,l.style.setProperty("--pl-otp-index",a),l.setAttribute("aria-label",y("otp.char",{n:a+1,count:i},this.el)),n.append(l),this.boxes.push(l)}this.on(t,"focusin",a=>{a.target.classList?.contains("pl-otp-box")&&a.target.select()}),this.on(t,"pointerup",a=>{let l=a.target.closest?.(".pl-otp-box");if(!l||l.value)return;let h=this.boxes.find(c=>!c.value);h&&h!==l&&h.focus()}),this.on(t,"beforeinput",a=>{let l=a.target;if(l.classList?.contains("pl-otp-box")&&a.inputType==="insertText"&&a.data&&a.data.length===1){a.preventDefault();let h=this.sanitize(a.data);h?this.fill(this.boxes.indexOf(l),h):this.reject(l)}}),this.on(t,"input",a=>{let l=a.target;if(!l.classList?.contains("pl-otp-box"))return;let h=this.boxes.indexOf(l),c=this.sanitize(l.value),p=this.prev?.[h];p&&c.length===2&&(c=c.replace(p,"")||p),l.value="",c?this.fill(c.length>=this.options.length?0:h,c):this.update()}),this.on(t,"paste",a=>{let l=a.target;if(!l.classList?.contains("pl-otp-box"))return;a.preventDefault();let h=this.sanitize(a.clipboardData?.getData("text")||"");if(!h)return this.reject(l);this.fill(h.length>=this.options.length?0:this.boxes.indexOf(l),h)}),this.on(t,"keydown",a=>{let l=a.target;if(!l.classList?.contains("pl-otp-box"))return;let h=this.boxes.indexOf(l),c=p=>{a.preventDefault(),this.boxes[Math.min(Math.max(p,0),this.boxes.length-1)].focus()};switch(a.key){case"Backspace":a.preventDefault(),l.value?l.value="":h>0&&(this.boxes[h-1].value="",this.boxes[h-1].focus()),this.update();break;case"Delete":a.preventDefault(),this.write(this.chars().filter((p,m)=>m!==h).join(""),!0),l.select();break;case"ArrowLeft":c(h-1);break;case"ArrowRight":c(h+1);break;case"Home":c(0);break;case"End":c(this.boxes.length-1);break;case"ArrowUp":case"ArrowDown":a.preventDefault();break;default:}}),this.on(this.input.form,"reset",()=>setTimeout(()=>!this.signal.aborted&&this.clear())),this.onDestroy(()=>{this.generated.forEach(a=>a.remove()),this.ownInput?this.input.remove():this.input.classList.remove("pl-otp-value")}),o&&this.write(o,!0),e.autofocus&&this.focus()}sanitize(t){let e=this.options.type==="numeric"?/[^0-9]/g:/[^0-9a-z]/gi;return String(t).replace(e,"").toUpperCase()}chars(){return this.boxes.map(t=>t.value)}get value(){return this.chars().join("")}set value(t){this.setValue(t)}get complete(){return this.boxes.every(t=>t.value)}fill(t,e){t=Math.max(0,t);let i=t;[...e].slice(0,this.boxes.length-t).forEach((o,n)=>{let a=this.boxes[t+n];a.value=o,this.pop(a),i=t+n});let s=this.boxes[Math.min(i+1,this.boxes.length-1)];(this.el.contains(document.activeElement)||document.activeElement===document.body)&&(s.focus(),i===this.boxes.length-1&&s.select()),this.update()}pop(t){t.classList.remove("pl-otp-pop"),t.offsetWidth,t.classList.add("pl-otp-pop")}reject(t){t.classList.remove("pl-otp-shake"),t.offsetWidth,t.classList.add("pl-otp-shake"),setTimeout(()=>t.classList.remove("pl-otp-shake"),450)}write(t,e=!1){let i=[...this.sanitize(t)];this.boxes.forEach((s,o)=>{s.value=i[o]||""}),this.update(e)}update(t=!1){let e=this.value;if(this.prev=this.chars(),this.boxes.forEach(s=>s.classList.toggle("pl-otp-filled",!!s.value)),e===this.input.value)return;let i=this.input.value.length===this.boxes.length;this.input.value=e,(this.el.classList.contains("pl-otp-danger")||this.el.classList.contains("pl-otp-success"))&&this.reset(),!t&&(this.input.dispatchEvent(new Event("input",{bubbles:!1})),this.emit("change",{value:e,complete:this.complete}),this.complete&&!(i&&e===this.lastComplete)&&(this.lastComplete=e,this.emit("complete",{value:e}),this.options.submit&&this.input.form?.requestSubmit?.()))}setValue(t){this.write(t??"")}clear(t=!1){this.reset(),this.lastComplete=null,this.write(""),t&&this.focus()}focus(){(this.boxes.find(t=>!t.value)||this.boxes[this.boxes.length-1])?.focus()}error({clear:t=!1}={}){let{el:e}=this;e.classList.remove("pl-otp-success","pl-otp-shake"),e.offsetWidth,e.classList.add("pl-otp-danger","pl-otp-shake"),this.boxes.forEach(i=>i.setAttribute("aria-invalid","true")),setTimeout(()=>e.classList.remove("pl-otp-shake"),450),t&&(this.lastComplete=null,this.boxes.forEach(i=>{i.value="",i.classList.remove("pl-otp-filled")}),this.input.value="",this.boxes[0].focus())}success(){this.el.classList.remove("pl-otp-danger","pl-otp-shake"),this.el.classList.add("pl-otp-success"),this.boxes.forEach(t=>{t.removeAttribute("aria-invalid"),t.classList.remove("pl-otp-pop")})}reset(){this.el.classList.remove("pl-otp-danger","pl-otp-success","pl-otp-shake"),this.boxes.forEach(t=>t.removeAttribute("aria-invalid"))}disable(t=!0){this.boxes.forEach(e=>{e.disabled=t}),this.input.disabled=t}};d($t,"defaults",{length:6,type:"numeric",separator:0,masked:!1,name:"",autofocus:!1,submit:!1,label:null}),d($t,"primary","length");v("otp",$t);var ls=["length","case","digit","symbol"],pe=class extends x{init(){var s;let{el:t,options:e}=this;t.classList.add("pl-strength"),this.input=e.input&&E(e.input)||E("input",t),e.labels??(e.labels=y("strength.levels",{},t)),typeof e.labels=="string"&&(e.labels=e.labels.split(",").map(o=>o.trim())),this.created=[],this.score=0,this.meter=E(".pl-strength-meter",t);let i=this.meter?.closest(".pl-strength-bar");if(this.meter||(i=this.make("div","pl-strength-bar"),this.meter=this.make("div","pl-strength-meter"),i.append(this.meter),t.append(i),this.created.push(i)),!this.meter.children.length)for(let o=0;o<4;o++)this.meter.append(this.make("span","pl-strength-segment"));if(this.meter.setAttribute("role","meter"),this.meter.setAttribute("aria-label",y("strength.meter",{},t)),this.meter.setAttribute("aria-valuemin","0"),this.meter.setAttribute("aria-valuemax","4"),this.labelEl=E(".pl-strength-label",t),!this.labelEl&&e.label&&(this.labelEl=this.make("span","pl-strength-label"),(i||t).append(this.labelEl),i||this.created.push(this.labelEl)),this.labelEl?.setAttribute("aria-live","polite"),this.rulesEl=E(".pl-strength-rules",t),!this.rulesEl&&e.rules&&(this.rulesEl=this.make("ul","pl-strength-rules"),t.append(this.rulesEl),this.created.push(this.rulesEl)),this.rulesEl&&!this.rulesEl.children.length)for(let o of ls){let n=this.make("li","pl-strength-rule");n.dataset.rule=o,n.textContent=y(`strength.rule.${o}`,{n:e.minLength},t),this.rulesEl.append(n)}if(this.rulesEl&&this.input){(s=this.rulesEl).id||(s.id=k("pl-strength"));let o=this.input.getAttribute("aria-describedby");o?.includes(this.rulesEl.id)||this.input.setAttribute("aria-describedby",[o,this.rulesEl.id].filter(Boolean).join(" "))}this.on(this.input,"input",()=>this.update()),this.on(this.input?.form,"reset",()=>setTimeout(()=>!this.signal.aborted&&this.update())),this.onDestroy(()=>this.created.forEach(o=>o.remove())),this.update(!0)}make(t,e){let i=document.createElement(t);return i.className=e,i}check(t=this.input?.value||""){let e=this.options.minLength,i={length:t.length>=e,case:/\p{Ll}/u.test(t)&&/\p{Lu}/u.test(t),digit:/\d/.test(t),symbol:/[^\p{L}\d\s]/u.test(t)},s=0;if(t){let o=[i.case,i.digit,i.symbol].filter(Boolean).length,n=/^(.)\1+$/.test(t)||/^(?:0?123456789?|abcdef|qwerty|haslo|hasło|password)/i.test(t);s=1,i.length&&(s=1+o,o<3&&t.length>=e+6&&s++,n&&(s=Math.min(s,1))),s=Math.min(4,s)}return{score:s,rules:i}}update(t=!1){let e=this.input?.value||"",{score:i,rules:s}=this.check(e),o=i?this.options.labels[i-1]||"":this.options.emptyLabel;if(this.el.dataset.score=i,[...this.meter.children].forEach((a,l)=>a.classList.toggle("pl-active",l<i)),this.meter.setAttribute("aria-valuenow",i),this.meter.setAttribute("aria-valuetext",o||y("strength.empty",{},this.el)),this.labelEl&&(this.labelEl.textContent=o),this.rulesEl)for(let a of this.rulesEl.querySelectorAll("[data-rule]")){let l=!!s[a.dataset.rule];a.classList.toggle("pl-active",l),a.setAttribute("aria-label",`${a.textContent} \u2014 ${y(l?"strength.met":"strength.unmet",{},this.el)}`)}let n=i!==this.score;this.score=i,this.rules=s,t||this.emit("change",{score:i,label:o,rules:s,value:e,changed:n})}};d(pe,"defaults",{minLength:8,rules:!1,label:!0,labels:null,input:"",emptyLabel:""});v("strength",pe);var Tt=class extends x{init(){let{el:t,options:e}=this,i=Math.max(1,Math.round(Number(e.max))||5);e.max=i,this.current=0,t.classList.add("pl-rating"),t.classList.toggle("pl-rating-readonly",!!e.readonly),t.style.setProperty("--pl-rating-max",i),t.setAttribute("role","radiogroup"),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&t.setAttribute("aria-label",e.label??y("rating.label",{},t));let s=e.name||k("pl-rating"),o=n=>{let a=document.createElement("input");return a.type="radio",a.name=s,a.value=String(n),a.className=n?"pl-rating-star":"pl-rating-zero",a.setAttribute("aria-label",n?`${n} ${this.plural(n)}`:"Brak oceny"),e.readonly&&(a.disabled=!0),a};this.zero=o(0),this.stars=Array.from({length:i},(n,a)=>o(a+1)),t.append(this.zero,...this.stars),this.onDestroy(()=>{[this.zero,...this.stars].forEach(n=>n.remove()),t.classList.remove("pl-rating-readonly")}),this.on(t,"change",n=>{n.target.matches('input[type="radio"]')&&this.set(Number(n.target.value),!0)}),this.on(t,"click",n=>{let a=n.target.closest(".pl-rating-star");!a||!e.clearable||e.readonly||Number(a.value)===this.current&&this.set(0,!0)}),this.on(t,"pointerover",n=>{let a=n.target.closest(".pl-rating-star");a&&!e.readonly&&this.paint(Number(a.value),!0)}),this.on(t,"pointerleave",()=>this.paint(this.current)),this.set($(Math.round(Number(e.value))||0,0,i))}plural(t){let[e,i,s]=String(this.options.star).split("|");if(t===1)return e;let o=t%10,n=t%100;return o>=2&&o<=4&&!(n>=12&&n<=14)?i||e:s||i||e}paint(t,e=!1){this.stars.forEach((i,s)=>{let o=s<t;i.classList.toggle("pl-active",o&&!(e&&s>=this.current)),i.classList.toggle("pl-rating-preview",e&&o&&s>=this.current)})}get value(){return this.current}set value(t){this.set(t)}set(t,e=!1){let i=$(Math.round(Number(t))||0,0,this.options.max),s=i!==this.current;this.current=i;let o=i?this.stars[i-1]:this.zero;o.checked=!0,this.el.style.setProperty("--pl-rating-value",i),this.paint(i),s&&e&&this.stars.forEach((n,a)=>{n.classList.remove("pl-rating-pop"),a<i&&(n.style.animationDelay=`${a*35}ms`,n.offsetWidth,n.classList.add("pl-rating-pop"))}),s&&this.emit("change",{value:i})}clear(){this.set(0)}disable(t=!0){this.el.classList.toggle("pl-disabled",!!t),[this.zero,...this.stars].forEach(e=>e.disabled=!!t||!!this.options.readonly)}};d(Tt,"defaults",{value:0,max:5,name:"",readonly:!1,clearable:!0,label:null,star:"gwiazdka|gwiazdki|gwiazdek"}),d(Tt,"primary","value");v("rating",Tt);var de=class extends x{init(){let{el:t,options:e}=this;t.classList.add("pl-quantity"),this.input=E("input",t),this.input||(this.input=document.createElement("input"),this.input.type="number",this.input.value="1",t.append(this.input),this.ownInput=!0),this.input.classList.add("pl-quantity-input"),this.input.hasAttribute("inputmode")||(this.input.inputMode="numeric"),!this.input.hasAttribute("aria-label")&&!this.input.labels?.length&&this.input.setAttribute("aria-label",y("quantity.label",{},t));let i=s=>{let o=document.createElement("button");return o.type="button",o.className=`pl-quantity-button ${s<0?"pl-quantity-minus":"pl-quantity-plus"}`,o.setAttribute("aria-label",s<0?e.minusLabel??y("quantity.minus",{},t):e.plusLabel??y("quantity.plus",{},t)),o.tabIndex=-1,this.on(o,"pointerdown",n=>{n.button||(n.preventDefault(),this.input.focus({preventScroll:!0}),this.step(s,!0),e.repeat&&(this.stopRepeat(),this.timer=setTimeout(()=>{this.timer=setInterval(()=>this.step(s,!0),70)},420)))}),this.on(o,"click",n=>{n.detail===0&&this.step(s,!0)}),o};this.minus=i(-1),this.plus=i(1),this.input.before(this.minus),this.input.after(this.plus),this.on(document,"pointerup",()=>this.stopRepeat()),this.on(document,"pointercancel",()=>this.stopRepeat()),this.on(this.input,"keydown",s=>{s.key!=="ArrowUp"&&s.key!=="ArrowDown"||(s.preventDefault(),this.step(s.key==="ArrowUp"?1:-1,!0))}),this.on(this.input,"input",()=>this.sync()),this.on(this.input,"change",s=>{this.set(this.input.value,!0,!0)}),this.onDestroy(()=>{this.stopRepeat(),this.minus.remove(),this.plus.remove(),this.input.classList.remove("pl-quantity-input","pl-quantity-up","pl-quantity-down"),this.ownInput&&this.input.remove()}),this.last=this.parse(this.input.value),this.set(this.last)}limit(t,e){let i=this.options[t],s=i!==null&&i!==""?i:this.input.getAttribute(t),o=Number(s);return s===null||s===""||Number.isNaN(o)?e:o}get min(){return this.limit("min",0)}get max(){return this.limit("max",1/0)}get stepSize(){return this.limit("step",1)||1}parse(t){let e=Number(String(t).replace(",","."));return Number.isFinite(e)?e:this.min}stopRepeat(){clearTimeout(this.timer),clearInterval(this.timer),this.timer=null}sync(){let t=this.parse(this.input.value),e=this.input.disabled;this.minus.disabled=e||t<=this.min,this.plus.disabled=e||t>=this.max,(this.minus.disabled||this.plus.disabled)&&this.stopRepeat()}get value(){return this.last}set value(t){this.set(t)}set(t,e=!1,i=!1){let s=this.stepSize,o=(String(s).split(".")[1]||"").length,n=Number($(this.parse(t),this.min,this.max).toFixed(o)),a=this.last;if(this.last=n,this.input.value=String(n),this.sync(),n!==a){if(e&&!i){let l=n>a?"pl-quantity-up":"pl-quantity-down";this.input.classList.remove("pl-quantity-up","pl-quantity-down"),this.input.offsetWidth,this.input.classList.add(l)}e&&(this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.emit("change",{value:n,previous:a}))}}step(t=1,e=!1){this.set(this.last+t*this.stepSize,e)}disable(t=!0){this.input.disabled=!!t,this.el.classList.toggle("pl-disabled",!!t),this.sync()}};d(de,"defaults",{min:null,max:null,step:null,repeat:!0,minusLabel:null,plusLabel:null});v("quantity",de);var ut=r=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${W[r]||""}</svg>`,V=r=>String(r).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]),ot=r=>String(r).split("").map(t=>(t==="\u0142"||t==="\u0141"?"l":t.normalize("NFD")[0]||t).toLowerCase()[0]||t).join("");function Fe(r){return(r||[]).map(t=>{if(t===null||typeof t!="object")return{value:String(t),label:String(t)};let e=t.label??t.text??t.name??t.value;return{...t,value:String(t.value??e),label:String(e)}})}var ue=class extends x{init(){let{el:t,options:e}=this;e.emptyText??(e.emptyText=y("combobox.empty",{},t)),e.loadingText??(e.loadingText=y("combobox.loading",{},t)),e.createText??(e.createText=y("combobox.create",{},t)),this.isSelect=t.tagName==="SELECT",this.multiple=this.isSelect&&t.multiple,this.isOpen=!1,this.items=[],this.selected=[],this.visible=[],this.active=-1,this.query="",this.request=0,this.typed="",e.closeOnSelect===null&&(e.closeOnSelect=!this.multiple),this.build(),this.readItems(),this.renderValue(),this.bind()}build(){let{el:t,options:e}=this,i=this.wrapper=document.createElement("div");i.className="pl-combobox";for(let h of t.classList)/^pl-form-(small|large|danger|success|width-)/.test(h)&&i.classList.add(h);i.classList.toggle("pl-combobox-multiple",this.multiple);let s=this.control=document.createElement("div");s.className="pl-combobox-control";let o=k("pl-combobox"),n;if(this.isSelect){n=document.createElement("input"),n.type="text";let h=t.labels?.[0];h?(h.id||(h.id=k("pl-combobox-label")),n.setAttribute("aria-labelledby",h.id)):t.getAttribute("aria-label")&&n.setAttribute("aria-label",t.getAttribute("aria-label")),this.placeholderOption=[...t.options].find(c=>c.value===""&&!c.closest("optgroup"))||null,t.after(i),t.classList.add("pl-combobox-native"),this.nativeTabIndex=t.getAttribute("tabindex"),t.tabIndex=-1,t.setAttribute("aria-hidden","true")}else{n=t,t.before(i),this.hadInputClass=t.classList.contains("pl-input"),t.classList.remove("pl-input");let h=t.getAttribute("list");this.datalist=h?document.getElementById(h):null,this.datalist&&t.removeAttribute("list")}this.input=n,this.placeholder=e.placeholder||t.getAttribute("placeholder")||t.dataset.placeholder||this.placeholderOption?.textContent.trim()||"",n.classList.add("pl-combobox-input"),n.autocomplete="off",n.spellcheck=!1,n.setAttribute("role","combobox"),n.setAttribute("aria-autocomplete",e.search?"list":"none"),n.setAttribute("aria-expanded","false"),n.setAttribute("aria-controls",o),n.setAttribute("aria-haspopup","listbox"),e.search||(n.readOnly=!0),this.isSelect&&(n.disabled=t.disabled),i.classList.toggle("pl-disabled",n.disabled),s.append(n),this.clearButton=document.createElement("button"),this.clearButton.type="button",this.clearButton.className="pl-combobox-clear",this.clearButton.tabIndex=-1,this.clearButton.setAttribute("aria-label",y("clear",{},t)),this.clearButton.innerHTML=ut("x"),this.clearButton.hidden=!0,e.clearable&&s.append(this.clearButton);let a=document.createElement("span");a.className="pl-combobox-caret",a.innerHTML=ut(this.isSelect?"chevrons-up-down":"chevron-down"),s.append(a);let l=this.list=document.createElement("div");l.className="pl-combobox-list",l.id=o,l.setAttribute("role","listbox"),l.hidden=!0,this.multiple&&l.setAttribute("aria-multiselectable","true"),n.getAttribute("aria-labelledby")?l.setAttribute("aria-labelledby",n.getAttribute("aria-labelledby")):l.setAttribute("aria-label",this.placeholder||y("combobox.options",{},t)),i.append(s,l),this.onDestroy(()=>{if(this.stopPlace?.(),P(l),this.isSelect)t.classList.remove("pl-combobox-native"),t.removeAttribute("aria-hidden"),this.nativeTabIndex===null?t.removeAttribute("tabindex"):t.setAttribute("tabindex",this.nativeTabIndex);else{i.before(t),t.classList.remove("pl-combobox-input"),this.hadInputClass&&t.classList.add("pl-input");for(let h of["role","aria-autocomplete","aria-expanded","aria-controls","aria-haspopup","aria-activedescendant"])t.removeAttribute(h)}i.remove()})}readItems(){let{el:t,options:e}=this;this.isSelect?(this.items=[...t.options].filter(i=>i!==this.placeholderOption).map(i=>({value:i.value,label:i.textContent.trim(),group:i.closest("optgroup")?.label||"",disabled:i.disabled||!!i.closest("optgroup")?.disabled,description:i.dataset.description||"",icon:i.dataset.icon||"",image:i.dataset.image||"",option:i})),this.selected=this.items.filter(i=>i.option.selected),!this.multiple&&this.placeholderOption?.selected&&(this.selected=[])):e.options?this.items=Fe(typeof e.options=="string"?e.options.split(",").map(i=>i.trim()):e.options):this.datalist&&(this.items=[...this.datalist.options].map(i=>({value:i.value,label:i.label||i.textContent.trim()||i.value,description:i.dataset.description||"",icon:i.dataset.icon||"",image:i.dataset.image||""}))),e.options&&this.isSelect&&this.setOptions(e.options,!0)}bind(){let{input:t,list:e,control:i,wrapper:s,options:o}=this;this.on(t,"input",()=>{this.syncing||(this.query=t.value,this.isSelect||this.wrapper.classList.toggle("pl-combobox-has-value",!!t.value),this.clearButton.hidden=!this.hasValue,this.isOpen?this.refreshList():this.open(!0))}),this.on(t,"keydown",a=>this.onKeydown(a)),this.on(i,"pointerdown",a=>{if(!(t.disabled||a.button>0)){if(a.target.closest(".pl-combobox-chip-remove, .pl-combobox-clear")){a.preventDefault();return}a.target!==t&&a.preventDefault(),t.focus(),this.isOpen?(a.target!==t||!o.search)&&this.close():this.open()}}),this.on(i,"click",a=>{let l=a.target.closest(".pl-combobox-chip-remove");if(l){let h=l.closest(".pl-combobox-chip")?.dataset.value;this.deselect(this.selected.find(c=>c.value===h))}else a.target.closest(".pl-combobox-clear")&&(this.clear(),t.focus())}),this.on(e,"pointerdown",a=>a.preventDefault()),this.on(e,"click",a=>{let l=a.target.closest(".pl-combobox-option"),h=this.visible.findIndex(c=>c.el===l);h>=0&&this.choose(h)}),this.on(e,"pointermove",a=>{let l=a.target.closest(".pl-combobox-option"),h=this.visible.findIndex(c=>c.el===l);h>=0&&h!==this.active&&!this.visible[h].item.disabled&&this.setActive(h,!1)}),this.on(document,"pointerdown",a=>{this.isOpen&&!s.contains(a.target)&&this.close()},!0),this.on(s,"focusout",a=>{this.isOpen&&!s.contains(a.relatedTarget)&&this.close()}),this.isSelect?(this.on(this.el,"focus",()=>t.focus()),this.on(this.el.form,"reset",()=>setTimeout(()=>!this.signal.aborted&&this.refresh()))):this.on(t,"change",()=>{this.syncing||this.emit("change",{value:t.value,item:null})});let{signal:n}=this;this.load=Be(a=>!n.aborted&&this.fetch(a),o.delay),this.onDestroy(()=>clearTimeout(this.typedTimer))}get hasValue(){return this.isSelect?this.selected.length>0:!!this.input.value}get value(){return this.isSelect?this.multiple?this.selected.map(t=>t.value):this.selected[0]?.value??"":this.input.value}renderValue(){let{input:t,control:e}=this,i=new Map([...e.querySelectorAll(".pl-combobox-chip")].map(s=>[s.dataset.value,s]));if(this.multiple){for(let s of this.selected){if(i.has(s.value)){i.delete(s.value);continue}let o=document.createElement("span");o.className="pl-combobox-chip",o.dataset.value=s.value,o.innerHTML=`<span class="pl-combobox-chip-label">${V(s.label)}</span><button class="pl-combobox-chip-remove" type="button" tabindex="-1" aria-label="${V(y("combobox.remove",{label:s.label},this.el))}">${ut("x")}</button>`,e.insertBefore(o,t)}i.forEach(s=>s.remove()),t.placeholder=this.selected.length?"":this.placeholder,this.isOpen||(t.value="")}else this.isSelect?(t.placeholder=this.placeholder,(!this.isOpen||!this.query)&&(t.value=this.selected[0]?.label||"")):t.placeholder=this.placeholder;this.clearButton.hidden=!this.hasValue,this.wrapper.classList.toggle("pl-combobox-has-value",this.hasValue)}commit(t=null){let{el:e}=this;if(this.isSelect){let i=new Set(this.selected.map(s=>s.value));for(let s of this.selected)(!s.option||s.option.parentNode===null)&&(s.option=new Option(s.label,s.value),e.append(s.option));for(let s of e.options)s.selected=i.has(s.value)&&s!==this.placeholderOption;this.selected.length||(this.placeholderOption?this.placeholderOption.selected=!0:this.multiple||(e.selectedIndex=-1))}else t&&(this.input.value=t.label,this.input.dataset.value=t.value);this.renderValue(),this.syncing=!0,e.dispatchEvent(new Event("change",{bubbles:!0})),this.syncing=!1,this.emit("change",{value:this.value,item:t,items:[...this.selected]})}choose(t){let e=this.visible[t];if(!e||e.item.disabled)return;let{item:i}=e;if(e.create&&(i={value:this.query.trim(),label:this.query.trim(),created:!0},this.items.push(i),this.emit("create",{item:i})),this.multiple){let s=this.selected.findIndex(o=>o.value===i.value);s>=0?this.selected.splice(s,1):this.selected.push(i),this.query="",this.input.value="",this.commit(i),this.options.closeOnSelect?this.close():this.refreshList(i.value)}else this.selected=this.isSelect?[i]:[],this.query="",this.commit(i),this.close()}deselect(t){t&&(this.selected=this.selected.filter(e=>e!==t),this.commit(t),this.isOpen&&this.refreshList())}setValue(t,e=!1){let i=(Array.isArray(t)?t:t==null||t===""?[]:[t]).map(String);if(this.isSelect)this.selected=i.map(s=>this.items.find(o=>o.value===s)).filter(Boolean),this.multiple||(this.selected=this.selected.slice(0,1));else{let s=this.items.find(o=>o.value===i[0]);this.input.value=s?.label??i[0]??""}this.query="",e?this.renderValue():this.commit(null),this.isOpen&&this.refreshList()}clear(){this.selected=[],this.query="",this.input.value="",delete this.input.dataset.value,this.commit(null),this.isOpen&&this.refreshList()}setOptions(t,e=!1){let i=Fe(t);if(this.isSelect){let s=new Set(this.selected.map(o=>o.value));[...this.el.options].forEach(o=>{o!==this.placeholderOption&&!s.has(o.value)&&o.remove()}),this.el.querySelectorAll("optgroup:empty").forEach(o=>o.remove());for(let o of i){let n=this.selected.find(a=>a.value===o.value);n?(o.option=n.option,this.selected[this.selected.indexOf(n)]=o):(o.option=new Option(o.label,o.value),o.option.disabled=!!o.disabled,this.el.append(o.option))}}this.items=i,!e&&this.isOpen&&this.refreshList()}refresh(){this.readItems(),this.renderValue(),this.isOpen&&this.refreshList()}refreshList(t){let{options:e}=this;if(e.source){if(this.query.length<e.minLength){this.request++,this.setLoading(!1),this.items=this.isSelect?[...this.selected]:[],this.renderList(e.minLength>0?y("combobox.minLength",{n:e.minLength},this.el):e.emptyText);return}this.setLoading(!0),this.visible.length||this.renderMessage(e.loadingText,!0),this.load(this.query);return}this.renderList(null,t)}async fetch(t){let{options:e}=this,i=++this.request,{signal:s}=this;try{let o=e.source,n=typeof o=="function"?await o(t,{signal:s}):await fetch(`${o}${encodeURIComponent(t)}`,{signal:s}).then(l=>l.json());if(s.aborted||i!==this.request)return;let a=Fe(n);this.items=a.map(l=>this.selected.find(h=>h.value===l.value)||l),this.setLoading(!1),this.isOpen&&this.renderList(null,void 0,!0)}catch(o){if(s.aborted||i!==this.request)return;this.setLoading(!1),this.renderMessage(y("combobox.error",{},this.el)),this.emit("error",{error:o})}}setLoading(t){this.wrapper.classList.toggle("pl-combobox-loading",t),this.input.setAttribute("aria-busy",String(t))}renderMessage(t,e=!1){this.visible=[],this.active=-1,this.input.removeAttribute("aria-activedescendant"),this.list.innerHTML=`<div class="pl-combobox-empty${e?" pl-combobox-empty-loading":""}" role="presentation">${e?'<span class="pl-combobox-spinner"></span>':""}${V(t)}</div>`}renderList(t=null,e,i=!1){let{list:s,options:o}=this,n=this.query.trim(),a=ot(n),l=a&&o.search&&!i&&!o.source,h=new Set(this.selected.map(u=>u.value)),c=this.items.filter(u=>!l||ot(u.label).includes(a)||u.description&&ot(u.description).includes(a));this.visible=[],s.innerHTML="";let p=null,m=s;c.forEach(u=>{if((u.group||"")!==(p??""))if(p=u.group||"",p){m=document.createElement("div"),m.className="pl-combobox-group",m.setAttribute("role","group");let A=document.createElement("div");A.className="pl-combobox-group-label",A.id=k("pl-combobox-group"),A.textContent=p,m.setAttribute("aria-labelledby",A.id),m.append(A),s.append(m)}else m=s;let g=this.isSelect?h.has(u.value):!1,w=this.optionEl(u,a,g);m.append(w),this.visible.push({item:u,el:w})});let b=this.items.some(u=>ot(u.label)===a);if(o.creatable&&n&&!b){let u=document.createElement("div");u.className="pl-combobox-option pl-combobox-create",u.setAttribute("role","option"),u.setAttribute("aria-selected","false"),u.id=k(`${s.id}-o`),u.innerHTML=`<span class="pl-combobox-option-icon">${ut("plus")}</span><span class="pl-combobox-option-text">${V(o.createText)} \u201E<strong>${V(n)}</strong>\u201D</span>`,s.append(u),this.visible.push({item:{value:n,label:n},el:u,create:!0})}if(!this.visible.length){this.renderMessage(t||o.emptyText);return}let f=-1;e!==void 0&&(f=this.visible.findIndex(u=>u.item.value===e)),f<0&&!n&&this.isSelect&&!this.multiple&&(f=this.visible.findIndex(u=>h.has(u.item.value))),f<0&&(n&&this.isSelect||!o.search)&&(f=this.visible.findIndex(u=>!u.item.disabled)),this.active=-1,this.input.removeAttribute("aria-activedescendant"),f>=0&&this.setActive(f)}optionEl(t,e,i){let s=document.createElement("div");s.className="pl-combobox-option",s.id=k(`${this.list.id}-o`),s.setAttribute("role","option"),s.setAttribute("aria-selected",String(i)),t.disabled&&(s.setAttribute("aria-disabled","true"),s.classList.add("pl-disabled"));let o=V(t.label);if(e&&this.options.highlight){let a=ot(t.label).indexOf(e);a>=0&&(o=`${V(t.label.slice(0,a))}<mark>${V(t.label.slice(a,a+e.length))}</mark>${V(t.label.slice(a+e.length))}`)}let n="";return t.image?n=`<img class="pl-combobox-option-image" src="${V(t.image)}" alt="">`:t.icon&&(n=`<span class="pl-combobox-option-icon">${ut(t.icon)}</span>`),s.innerHTML=n+`<span class="pl-combobox-option-text"><span class="pl-combobox-option-label">${o}</span>${t.description?`<span class="pl-combobox-option-description">${V(t.description)}</span>`:""}</span><span class="pl-combobox-check">${ut("check")}</span>`,s}setActive(t,e=!0){this.visible[this.active]?.el.classList.remove("pl-active"),this.active=t;let i=this.visible[t];if(!i){this.input.removeAttribute("aria-activedescendant");return}i.el.classList.add("pl-active"),this.input.setAttribute("aria-activedescendant",i.el.id),e&&this.isOpen&&i.el.scrollIntoView({block:"nearest"})}move(t,e=this.active){let i=this.visible.length;if(!i)return;let s=e;for(let o=0;o<i;o++)if(s=(s+t+i)%i,!this.visible[s].item.disabled)return this.setActive(s)}edge(t){let i=(t?[...this.visible.keys()].reverse():[...this.visible.keys()]).find(s=>!this.visible[s].item.disabled);i!==void 0&&this.setActive(i)}onKeydown(t){let{input:e,options:i}=this,{key:s}=t;switch(s){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),t.altKey&&s==="ArrowUp")return this.close();this.isOpen?this.active<0?this.edge(s==="ArrowUp"):this.move(s==="ArrowDown"?1:-1):(this.open(),this.active<0&&this.edge(s==="ArrowUp"));break;case"Home":case"End":if(!this.isOpen)return;t.preventDefault(),this.edge(s==="End");break;case"PageDown":case"PageUp":if(!this.isOpen)return;t.preventDefault();{let o=Math.min(Math.max(this.active+(s==="PageDown"?8:-8),0),this.visible.length-1);this.visible[o]?.item.disabled?this.move(s==="PageDown"?1:-1,o):this.setActive(o)}break;case"Enter":this.isOpen&&(this.active>=0?(t.preventDefault(),this.choose(this.active)):this.isSelect?t.preventDefault():this.close());break;case"Escape":this.isOpen?(t.preventDefault(),t.stopPropagation(),this.close()):i.clearable&&this.hasValue&&(t.preventDefault(),this.clear());break;case"Tab":this.isOpen&&this.close();break;case"Backspace":this.multiple&&!e.value&&this.selected.length&&this.deselect(this.selected[this.selected.length-1]);break;case" ":i.search||(t.preventDefault(),this.isOpen&&this.active>=0?this.choose(this.active):this.open());break;default:!i.search&&s.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&this.typeahead(s)}}typeahead(t){clearTimeout(this.typedTimer),this.typed+=ot(t),this.typedTimer=setTimeout(()=>{this.typed=""},600),this.isOpen||this.open();let e=this.typed.length===1?this.active+1:Math.max(this.active,0),i=[...this.visible.keys()],o=[...i.slice(e),...i.slice(0,e)].find(n=>!this.visible[n].item.disabled&&ot(this.visible[n].item.label).startsWith(this.typed));o!==void 0&&this.setActive(o)}open(t=!1){let{input:e,list:i,options:s}=this;this.isOpen||e.disabled||this.emit("beforeopen",{},!0)&&(this.isOpen=!0,t||(this.query="",this.isSelect&&!this.multiple&&s.search&&e.select()),this.wrapper.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),i.classList.remove("pl-combobox-list-out"),B(i),this.refreshList(),this.stopPlace?.(),this.stopPlace=Q(i,this.control,{placement:s.placement,offset:s.offset,matchWidth:!0}),this.visible[this.active]?.el.scrollIntoView({block:"nearest"}),this.emit("open"))}async close(){let{input:t,list:e}=this;if(!this.isOpen)return;this.isOpen=!1,this.request++,this.setLoading(!1),this.query="",this.wrapper.classList.remove("pl-open"),t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),this.isSelect&&this.renderValue(),this.emit("close"),e.classList.add("pl-combobox-list-out");let{signal:i}=this;await D(e),!(i.aborted||this.isOpen)&&(this.stopPlace?.(),this.stopPlace=null,e.classList.remove("pl-combobox-list-out"),P(e))}toggle(){return this.isOpen?this.close():this.open()}};d(ue,"defaults",{placeholder:"",clearable:!1,creatable:!1,search:!0,highlight:!0,closeOnSelect:null,options:null,source:null,minLength:0,delay:220,placement:"bottom-start",offset:6,emptyText:null,loadingText:null,createText:null});v("combobox",ue);var ki=r=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${W[r]||""}</svg>`,rt=(r,t=2)=>String(r).padStart(t,"0"),Li=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),tt=()=>Li(new Date),nt=r=>r?`${rt(r.getFullYear(),4)}-${rt(r.getMonth()+1)}-${rt(r.getDate())}`:"",G=(r,t)=>!!r&&!!t&&r.getTime()===t.getTime(),Y=(r,t)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+t),fe=(r,t)=>new Date(r,t+1,0).getDate(),Dt=(r,t)=>{let e=new Date(r.getFullYear(),r.getMonth()+t,1);return e.setDate(Math.min(r.getDate(),fe(e.getFullYear(),e.getMonth()))),e};function F(r){if(r==null||r==="")return null;if(r instanceof Date)return Number.isNaN(r.getTime())?null:Li(r);if(typeof r=="number")return Y(tt(),r);let t=String(r).trim();if(t==="today")return tt();if(/^[+-]\d+$/.test(t))return Y(tt(),Number(t));let e=t.match(/^(\d{4})-(\d{1,2})-(\d{1,2})/);if(!e)return null;let i=new Date(Number(e[1]),Number(e[2])-1,Number(e[3]));return i.getMonth()===Number(e[2])-1?i:null}var Ai=/yyyy|yy|MMMM|MMM|MM|M|dd|d/g,hs=["dialog","prevMonth","nextMonth","prevYear","nextYear","prevYears","nextYears","pickMonth","pickYear","today","clear"],me=class extends x{init(){let{el:t,options:e}=this;this.isInput=t.tagName==="INPUT",this.inline=!!e.inline||!this.isInput,this.input=this.isInput?t:null,e.locale??(e.locale=q(t));let i=Object.fromEntries(hs.map(o=>[o,y(`datepicker.${o}`,{},t)]));this.labels={...i,...e.labels||{}},this.isOpen=!1,this.view="days",this.start=null,this.end=null,this.hover=null,this.setup(),e.name&&(this.hidden=document.createElement("input"),this.hidden.type="hidden",this.hidden.name=e.name,t.after(this.hidden)),this.build();let s=e.value||t.dataset.value||"";s?this.assign(String(s).split("/").map(F)):this.input?.value&&this.assign(this.parse(this.input.value)),this.cursor=this.clampDate(this.start||tt()),this.write(!0),this.inline?(this.picker.classList.add("pl-datepicker-inline"),this.isInput?t.after(this.picker):t.append(this.picker),this.render()):(this.picker.hidden=!0,this.picker.setAttribute("role","dialog"),this.picker.setAttribute("aria-label",this.labels.dialog),this.picker.id||(this.picker.id=k("pl-datepicker")),this.ownRole=this.isInput&&!t.hasAttribute("role"),this.ownRole&&t.setAttribute("role","combobox"),t.setAttribute("aria-controls",this.picker.id),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false"),t.autocomplete="off"),this.bind(),this.onDestroy(()=>{this.stopPlace?.(),this.picker.remove(),this.hidden?.remove(),this.inline||(t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls"),this.ownRole&&t.removeAttribute("role"))})}setup(){let{options:t}=this;this.min=F(t.min),this.max=F(t.max);let e=o=>(Array.isArray(o)?o:String(o??"").split(",")).map(n=>String(n).trim()).filter(Boolean);this.disabledDays=new Set(e(t.disabledDays).map(Number)),this.disabledDates=new Set(e(t.disabledDates).map(o=>nt(F(o))));let i=o=>{try{return new Intl.DateTimeFormat(t.locale,o)}catch{return new Intl.DateTimeFormat("en",o)}};this.fmt={title:i({month:"long",year:"numeric"}),full:i({weekday:"long",day:"numeric",month:"long",year:"numeric"}),month:i({month:"long"}),monthShort:i({month:"short"}),weekday:i({weekday:"short"}),weekdayLong:i({weekday:"long"})},this.monthNames=Array.from({length:12},(o,n)=>this.fmt.month.format(new Date(2024,n,1)));let s=i({day:"numeric",month:"long"});this.monthNamesDay=Array.from({length:12},(o,n)=>s.formatToParts(new Date(2024,n,1)).find(a=>a.type==="month")?.value||this.monthNames[n]),this.monthShort=Array.from({length:12},(o,n)=>this.fmt.monthShort.format(new Date(2024,n,1)).replace(".",""))}build(){let{labels:t}=this,e=this.picker=document.createElement("div");e.className="pl-datepicker",this.options.range&&e.classList.add("pl-datepicker-range"),this.titleId=k("pl-datepicker"),e.innerHTML=`<div class="pl-datepicker-header"><button class="pl-datepicker-title" type="button" id="${this.titleId}" aria-live="polite"></button><span class="pl-datepicker-nav"><button class="pl-datepicker-prev" type="button" aria-label="${t.prevMonth}">${ki("chevron-left")}</button><button class="pl-datepicker-next" type="button" aria-label="${t.nextMonth}">${ki("chevron-right")}</button></span></div><div class="pl-datepicker-body"></div>`+(this.options.footer?`<div class="pl-datepicker-footer"><button class="pl-datepicker-action pl-datepicker-action-today" type="button">${t.today}</button><button class="pl-datepicker-action pl-datepicker-action-clear" type="button">${t.clear}</button></div>`:""),this.title=e.querySelector(".pl-datepicker-title"),this.body=e.querySelector(".pl-datepicker-body"),this.prevButton=e.querySelector(".pl-datepicker-prev"),this.nextButton=e.querySelector(".pl-datepicker-next")}bind(){let{picker:t,input:e}=this;if(this.on(t,"click",i=>{let s=i.target.closest("button");if(!s||!t.contains(s)||s.getAttribute("aria-disabled")==="true")return;if(s===this.prevButton)return this.shift(-1);if(s===this.nextButton)return this.shift(1);if(s===this.title)return this.setView(this.view==="days"?"months":this.view==="months"?"years":"days");if(s.classList.contains("pl-datepicker-action-today"))return this.goToday();if(s.classList.contains("pl-datepicker-action-clear"))return this.clear();if(s.dataset.date)return this.select(F(s.dataset.date));let o=i.detail===0;if(s.dataset.month)return this.cursor=this.clampDate(new Date(this.cursor.getFullYear(),Number(s.dataset.month),Math.min(this.cursor.getDate(),fe(this.cursor.getFullYear(),Number(s.dataset.month))))),this.setView("days",o);if(s.dataset.year){let n=Number(s.dataset.year);return this.cursor=this.clampDate(new Date(n,this.cursor.getMonth(),Math.min(this.cursor.getDate(),fe(n,this.cursor.getMonth())))),this.setView("months",o)}}),this.on(t,"keydown",i=>this.onKeydown(i)),this.options.range){let i=s=>{let o=F(s.target.closest?.("[data-date]")?.dataset.date);!G(o,this.hover)&&(o||this.hover)&&(this.hover=o,this.paint())};this.on(t,"pointerover",i),this.on(t,"focusin",i),this.on(t,"pointerleave",()=>{this.hover=null,this.paint()})}e&&this.on(e,"change",()=>{if(this.writing)return;let i=this.parse(e.value);if(i.length&&i.every(s=>s&&!this.isDisabled(s))){let s=this.value;if(this.assign(i),this.value===s)return this.write(!0);this.cursor=this.clampDate(this.start),this.write(),this.emitChange()}else e.value.trim()?this.write(!0):this.clear();(this.isOpen||this.inline)&&this.render()}),!this.inline&&(this.on(t,"pointerdown",i=>{document.activeElement===e&&i.preventDefault()}),this.on(e,"click",()=>this.open()),this.on(e,"input",()=>{if(this.writing)return;let i=this.parse(e.value);this.isOpen||this.open(),i.length&&i.every(Boolean)&&(this.cursor=this.clampDate(i[0]),this.render())}),this.on(e,"keydown",i=>{i.key==="ArrowDown"||i.key==="ArrowUp"&&i.altKey?(i.preventDefault(),this.open(),this.focusCursor()):i.key==="Escape"&&this.isOpen?(i.preventDefault(),i.stopPropagation(),this.close()):i.key==="Enter"&&this.isOpen?(i.preventDefault(),e.dispatchEvent(new Event("change",{bubbles:!0})),this.close()):i.key==="Tab"&&this.close()}),this.on(document,"pointerdown",i=>{let{target:s}=i;!this.isOpen||t.contains(s)||s===e||[...e.labels||[]].some(o=>o.contains(s))||this.close()},!0),this.on(t,"focusout",i=>{let s=i.relatedTarget;this.isOpen&&s&&!t.contains(s)&&s!==e&&this.close()}))}isDisabled(t){return this.min&&t<this.min||this.max&&t>this.max||this.disabledDays.has(t.getDay())||this.disabledDates.has(nt(t))}clampDate(t){return this.min&&t<this.min?new Date(this.min):this.max&&t>this.max?new Date(this.max):t}format(t){if(!t)return"";let e={yyyy:rt(t.getFullYear(),4),yy:rt(t.getFullYear()%100),MMMM:(/\bd/.test(this.options.format)?this.monthNamesDay:this.monthNames)[t.getMonth()],MMM:this.monthShort[t.getMonth()],MM:rt(t.getMonth()+1),M:t.getMonth()+1,dd:rt(t.getDate()),d:t.getDate()};return this.options.format.replace(Ai,i=>e[i])}parseOne(t){if(t=t.trim(),!t)return null;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(t))return F(t);let e=[],i=this.options.format.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(Ai,h=>(e.push(h),h==="yyyy"?"(\\d{4})":h==="yy"?"(\\d{2})":h==="MMMM"||h==="MMM"?"([^\\s\\d.,/-]+)":"(\\d{1,2})")),s=t.match(new RegExp(`^${i}$`,"i"));if(!s)return null;let o=new Date,n=o.getFullYear(),a=o.getMonth(),l=1;return e.forEach((h,c)=>{let p=s[c+1];if(h==="yyyy")n=Number(p);else if(h==="yy")n=2e3+Number(p);else if(h==="MMMM"){let m=b=>b.findIndex(f=>f.toLowerCase()===p.toLowerCase());a=m(this.monthNamesDay)>=0?m(this.monthNamesDay):m(this.monthNames)}else h==="MMM"?a=this.monthShort.findIndex(m=>m.toLowerCase()===p.toLowerCase().replace(".","")):h==="MM"||h==="M"?a=Number(p)-1:l=Number(p)}),a<0||a>11||l<1||l>fe(n,a)?null:new Date(n,a,l)}parse(t){if(t=String(t||"").trim(),!t)return[];if(this.options.range){let e=this.options.separator.trim()||"\u2013",i=t.split(new RegExp(`\\s*(?:${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}|\u2013|\u2014|\\s-\\s|/)\\s*`));return i.length===2?i.map(s=>this.parseOne(s)):t.includes("/")?t.split("/").map(F):[this.parseOne(t)]}return[this.parseOne(t)]}assign(t){if(t=(t||[]).filter(Boolean),this.options.range){let[e=null,i=null]=t;this.start=e&&i&&i<e?i:e,this.end=e&&i&&i<e?e:i}else this.start=t[0]||null,this.end=null}get value(){return this.options.range?this.start&&this.end?`${nt(this.start)}/${nt(this.end)}`:"":nt(this.start)}write(t=!1){let{el:e,input:i,options:s}=this,o=this.value,n="";s.range?n=this.start&&this.end?`${this.format(this.start)}${s.separator}${this.format(this.end)}`:"":n=this.format(this.start),o?e.dataset.value=o:delete e.dataset.value,this.hidden&&(this.hidden.value=o),!(!i||i.value===n)&&(i.value=n,!t&&(this.writing=!0,i.dispatchEvent(new Event("input",{bubbles:!0})),i.dispatchEvent(new Event("change",{bubbles:!0})),this.writing=!1))}emitChange(){this.emit("change",{value:this.value,date:this.start?new Date(this.start):null,start:this.start?new Date(this.start):null,end:this.end?new Date(this.end):null,formatted:this.input?this.input.value:this.options.range?[this.format(this.start),this.format(this.end)].join(this.options.separator):this.format(this.start)})}select(t){if(!t||this.isDisabled(t))return;let{options:e}=this,i=this.picker.contains(document.activeElement);this.cursor=t;let s=!0;e.range?!this.start||this.end?(this.start=t,this.end=null,s=!1):t<this.start?(this.end=this.start,this.start=t):this.end=t:this.start=t,this.hover=null,this.monthOf(t)!==this.shownMonth?this.render(this.monthOf(t)>this.shownMonth?"next":"prev"):this.paint(!0),i&&this.focusCursor(),s&&(this.write(),this.emitChange(),!this.inline&&e.closeOnSelect&&this.close(!0))}goToday(){let t=tt();if(this.view="days",!this.options.range&&!this.isDisabled(t))return this.cursor=t,this.render(),this.select(t);this.cursor=this.clampDate(t),this.render()}setDate(t,e=!1){this.assign((Array.isArray(t)?t:[t]).map(F)),this.start&&(this.cursor=this.clampDate(this.start)),this.write(e),(this.isOpen||this.inline)&&this.render(),e||this.emitChange()}getDate(){let t=e=>e?new Date(e):null;return this.options.range?[t(this.start),t(this.end)]:t(this.start)}clear(){let t=!!this.start;this.start=null,this.end=null,this.hover=null,this.write(),(this.isOpen||this.inline)&&this.paint(),t&&this.emitChange()}update(t={}){Object.assign(this.options,t),this.setup(),this.cursor=this.clampDate(this.cursor),(this.isOpen||this.inline)&&this.render()}monthOf(t){return t.getFullYear()*12+t.getMonth()}setView(t,e=this.picker.contains(document.activeElement)){this.view=t,this.render("zoom"),e&&this.focusCursor()}shift(t,e=!1){let{cursor:i}=this;this.view==="days"?this.cursor=Dt(i,t):this.view==="months"?this.cursor=Dt(i,t*12):this.cursor=Dt(i,t*144),this.cursor=this.clampDate(this.cursor),this.render(t>0?"next":"prev"),e&&this.focusCursor()}render(t=""){let{cursor:e,labels:i,view:s}=this,o=e.getFullYear(),n=e.getMonth(),a=document.createElement("div");if(a.className=`pl-datepicker-view pl-datepicker-${s}`,t&&a.classList.add(`pl-datepicker-anim-${t}`),this.picker.dataset.view=s,s==="days"){this.shownMonth=this.monthOf(e);let l=this.fmt.title.format(e);this.title.textContent=l.charAt(0).toLocaleUpperCase(this.options.locale)+l.slice(1),this.title.setAttribute("aria-label",`${this.title.textContent} \u2014 ${i.pickMonth}`),this.prevButton.setAttribute("aria-label",i.prevMonth),this.nextButton.setAttribute("aria-label",i.nextMonth),this.setNav(this.min&&new Date(o,n,0)<this.min,this.max&&new Date(o,n+1,1)>this.max);let h=Number(this.options.weekStart)||0,c=new Date(2024,0,1),p="";for(let g=0;g<7;g++){let w=Y(c,(h+g+6)%7),A=w.getDay()===0||w.getDay()===6;p+=`<th scope="col" abbr="${this.fmt.weekdayLong.format(w)}"${A?' class="pl-datepicker-weekend"':""}>${this.fmt.weekday.format(w).replace(".","")}</th>`}let m=new Date(o,n,1),b=(m.getDay()-h+7)%7,f=Y(m,-b),u="";for(let g=0;g<6;g++){u+="<tr>";for(let w=0;w<7;w++)u+=`<td role="gridcell"><button class="pl-datepicker-day${f.getMonth()!==n?" pl-datepicker-outside":""}" type="button" tabindex="-1" data-date="${nt(f)}" aria-label="${this.fmt.full.format(f)}">${f.getDate()}</button></td>`,f=Y(f,1);u+="</tr>"}a.innerHTML=`<table class="pl-datepicker-grid" role="grid" aria-labelledby="${this.titleId}"><thead><tr>${p}</tr></thead><tbody>${u}</tbody></table>`}else if(s==="months"){this.title.textContent=String(o),this.title.setAttribute("aria-label",`${o} \u2014 ${i.pickYear}`),this.prevButton.setAttribute("aria-label",i.prevYear),this.nextButton.setAttribute("aria-label",i.nextYear),this.setNav(this.min&&o<=this.min.getFullYear(),this.max&&o>=this.max.getFullYear());let l=tt();a.innerHTML=this.monthShort.map((h,c)=>{let p=this.min&&new Date(o,c+1,0)<this.min||this.max&&new Date(o,c,1)>this.max,m=[this.start,this.end].some(f=>f&&f.getFullYear()===o&&f.getMonth()===c),b=l.getFullYear()===o&&l.getMonth()===c;return`<button class="pl-datepicker-cell${m?" pl-datepicker-selected":""}${b?" pl-datepicker-current":""}" type="button" data-month="${c}" tabindex="${c===n?0:-1}" aria-label="${this.monthNames[c]} ${o}"${m?' aria-pressed="true"':""}${p?' aria-disabled="true"':""}>${h}</button>`}).join("")}else{let l=Math.floor(o/12)*12;this.title.textContent=`${l} \u2013 ${l+11}`,this.title.setAttribute("aria-label",this.title.textContent),this.prevButton.setAttribute("aria-label",i.prevYears),this.nextButton.setAttribute("aria-label",i.nextYears),this.setNav(this.min&&l<=this.min.getFullYear(),this.max&&l+11>=this.max.getFullYear());let h=tt().getFullYear(),c="";for(let p=l;p<l+12;p++){let m=this.min&&p<this.min.getFullYear()||this.max&&p>this.max.getFullYear(),b=[this.start,this.end].some(f=>f&&f.getFullYear()===p);c+=`<button class="pl-datepicker-cell${b?" pl-datepicker-selected":""}${p===h?" pl-datepicker-current":""}" type="button" data-year="${p}" tabindex="${p===o?0:-1}"${b?' aria-pressed="true"':""}${m?' aria-disabled="true"':""}>${p}</button>`}a.innerHTML=c}this.body.replaceChildren(a),s==="days"&&this.paint()}setNav(t,e){this.prevButton.disabled=!!t,this.nextButton.disabled=!!e}paint(t=!1){if(this.view!=="days")return;let{start:e,end:i,hover:s,cursor:o}=this,n=tt(),a=this.options.range,l=e,h=i,c=a&&e&&!i&&s&&!G(s,e);c&&(l=s<e?s:e,h=s<e?e:s);for(let p of this.body.querySelectorAll(".pl-datepicker-day")){let m=F(p.dataset.date),b=p.parentElement,f=this.isDisabled(m),u=G(m,e),g=G(m,i),w=u||g,A=!!(a&&l&&h&&m>=l&&m<=h&&!G(l,h)),M=p.classList.contains("pl-datepicker-selected");p.classList.toggle("pl-datepicker-today",G(m,n)),p.classList.toggle("pl-datepicker-selected",w),p.classList.toggle("pl-datepicker-pop",t&&w&&!M),p.classList.toggle("pl-disabled",f),f?p.setAttribute("aria-disabled","true"):p.removeAttribute("aria-disabled"),G(m,n)&&p.setAttribute("aria-current","date"),p.tabIndex=G(m,o)?0:-1,b.setAttribute("aria-selected",String(w||A&&!c)),b.classList.toggle("pl-datepicker-in-range",A),b.classList.toggle("pl-datepicker-preview",A&&!!c),b.classList.toggle("pl-datepicker-range-start",A&&G(m,l)),b.classList.toggle("pl-datepicker-range-end",A&&G(m,h))}}focusCursor(){(this.view==="days"?this.body.querySelector(`[data-date="${nt(this.cursor)}"]`):this.body.querySelector('[tabindex="0"]')||this.body.querySelector("button"))?.focus()}moveCursor(t){t=this.clampDate(t);let e=this.monthOf(this.cursor),i=this.monthOf(t);this.cursor=t,i!==e||i!==this.shownMonth?this.render(i>e?"next":"prev"):this.paint(),this.focusCursor()}onKeydown(t){let{key:e}=t,i=t.target;if(e==="Escape"&&!this.inline)return t.preventDefault(),t.stopPropagation(),this.close(!0);if(e==="Tab"&&!this.inline){let s=pt(this.picker),o=s[0],n=s[s.length-1];t.shiftKey&&i===o?(t.preventDefault(),n.focus()):!t.shiftKey&&i===n&&(t.preventDefault(),o.focus());return}if(this.view==="days"&&i.dataset?.date){let s=F(i.dataset.date),o=Number(this.options.weekStart)||0,n=(s.getDay()-o+7)%7,a={ArrowLeft:()=>Y(s,-1),ArrowRight:()=>Y(s,1),ArrowUp:()=>Y(s,-7),ArrowDown:()=>Y(s,7),Home:()=>Y(s,-n),End:()=>Y(s,6-n),PageUp:()=>Dt(s,t.shiftKey?-12:-1),PageDown:()=>Dt(s,t.shiftKey?12:1)};a[e]&&(t.preventDefault(),this.moveCursor(a[e]()));return}if(i.classList?.contains("pl-datepicker-cell")){let s=[...this.body.querySelectorAll(".pl-datepicker-cell")],o=s.indexOf(i),n={ArrowLeft:-1,ArrowRight:1,ArrowUp:-3,ArrowDown:3}[e],a=null;if(n)a=o+n;else if(e==="Home")a=0;else if(e==="End")a=s.length-1;else if(e==="PageUp"||e==="PageDown"){t.preventDefault(),this.shift(e==="PageDown"?1:-1,!0);return}if(a===null)return;t.preventDefault(),a<0||a>=s.length?(this.shift(a<0?-1:1),[...this.body.querySelectorAll(".pl-datepicker-cell")][(a+s.length)%s.length]?.focus()):s[a].focus()}}open(){let{picker:t,el:e,options:i}=this;if(this.inline||this.isOpen||e.disabled||e.readOnly||!this.emit("beforeopen",{},!0))return;this.isOpen=!0,this.view="days",this.hover=null,this.cursor=this.clampDate(this.start||this.cursor||tt());let s=e.closest("dialog, [data-pl-theme], [data-pl-accent]");(!s||s===document.documentElement)&&(s=document.body),t.parentElement!==s&&s.append(t),t.classList.remove("pl-datepicker-out"),this.render(),B(t),this.stopPlace?.(),this.stopPlace=Q(t,e,{placement:i.placement,offset:i.offset}),e.setAttribute("aria-expanded","true"),e.classList.add("pl-datepicker-active"),this.emit("open")}async close(t=!1){let{picker:e,el:i}=this;if(this.inline||!this.isOpen)return;this.isOpen=!1,this.options.range&&this.start&&!this.end&&this.assign((i.dataset.value||"").split("/").map(F)),i.setAttribute("aria-expanded","false"),i.classList.remove("pl-datepicker-active"),(t||e.contains(document.activeElement))&&i.focus({preventScroll:!0}),this.emit("close"),e.classList.add("pl-datepicker-out");let{signal:s}=this;await D(e),!(s.aborted||this.isOpen)&&(this.stopPlace?.(),this.stopPlace=null,e.classList.remove("pl-datepicker-out"),P(e))}toggle(){return this.isOpen?this.close():this.open()}};d(me,"defaults",{inline:!1,range:!1,value:"",min:null,max:null,disabledDays:"",disabledDates:"",locale:null,format:"dd.MM.yyyy",separator:" \u2013 ",weekStart:1,name:"",footer:!1,closeOnSelect:!0,placement:"bottom-start",offset:6,labels:null});v("datepicker",me);var ge=class extends x{init(){let{el:t,options:e}=this,i=t.matches("input");this.inputs=i?[t]:T('input[type="range"]',t).slice(0,2),this.inputs.length&&(this.dual=!i&&this.inputs.length===2&&(e.dual||t.classList.contains("pl-range-dual")),this.dual||(this.inputs=[this.inputs[0]]),this.dual&&t.classList.add("pl-range-dual"),this.outputs=e.output?C(t,e.output):[],this.bubbles=[],this.ticks=null,this.created=[],e.tooltip&&this.buildBubbles(),e.ticks>1&&this.buildTicks(),this.ticks||(this.ticks=this.host?.querySelector(".pl-range-ticks")||(this.dual&&t.nextElementSibling?.matches(".pl-range-ticks")?t.nextElementSibling:null)),this.inputs.forEach((s,o)=>{this.on(s,"input",()=>{this.dual&&this.constrain(o),this.update(),this.emit("input",this.detail())}),this.on(s,"change",()=>this.emit("change",this.detail()))}),this.on(this.inputs[0].form,"reset",()=>requestAnimationFrame(()=>!this.signal.aborted&&this.update())),this.dual&&(this.constrain(1),this.on(t,"pointerdown",s=>this.jump(s)),this.on(t,"pointermove",s=>{s.buttons||this.raise(this.nearest(this.ratioAt(s.clientX)))})),this.onDestroy(()=>{this.created.forEach(s=>s.remove());for(let s of this.inputs)s.style.removeProperty("--pl-range-ratio"),s.style.removeProperty("--pl-range-progress"),s.style.zIndex=""}),this.update())}get host(){if(this._host)return this._host;let{el:t}=this;return t.matches("input")?t.parentElement?.classList.contains("pl-range-wrap")?this._host=t.parentElement:null:this._host=t}ensureHost(){if(this.host)return this.host;let{el:t}=this,e=document.createElement("div");return e.className="pl-range-wrap",t.before(e),e.append(t),this._host=e}buildBubbles(){let t=this.ensureHost(),e=this.options.tooltip==="always";this.bubbles=this.inputs.map(()=>{let i=document.createElement("output");return i.className="pl-range-bubble",i.setAttribute("aria-hidden","true"),e&&i.classList.add("pl-range-bubble-always"),t.append(i),this.created.push(i),i})}buildTicks(){let t=this.ensureHost(),{min:e,max:i}=this.bounds(),s=Math.round(this.options.ticks),o=document.createElement("div");o.className="pl-range-ticks",o.setAttribute("aria-hidden","true");for(let n=0;n<s;n++){let a=this.snap(e+(i-e)*n/(s-1)),l=document.createElement("span");l.dataset.value=a,l.textContent=this.format(a),o.append(l)}this.dual?t.after(o):t.append(o),this.created.push(o),this.ticks=o}bounds(t=this.inputs[0]){let e=t.min===""?0:Number(t.min),i=t.max===""?100:Number(t.max),s=t.step==="any"?0:Number(t.step)||1;return{min:e,max:i,step:s}}snap(t,e=this.inputs[0]){let{min:i,max:s,step:o}=this.bounds(e);return o&&(t=Math.round((t-i)/o)*o+i),$(Number(t.toFixed(6)),i,s)}ratio(t){let{min:e,max:i}=this.bounds(t);return i>e?$((Number(t.value)-e)/(i-e),0,1):0}format(t){this.numberFormat??(this.numberFormat=new Intl.NumberFormat(q(this.el),{maximumFractionDigits:6}));let e=this.numberFormat.format(t);return`${this.options.prefix}${e}${this.options.suffix}`}get value(){let t=this.inputs.map(e=>Number(e.value));return this.dual?t:t[0]}detail(){let t=this.inputs.map(e=>Number(e.value));return{value:this.dual?t:t[0],values:t}}set(t){let e=Array.isArray(t)?t:[t];this.inputs.forEach((i,s)=>{e[s]!==void 0&&e[s]!==null&&(i.value=e[s])}),this.dual&&this.constrain(1),this.update(),this.emit("change",this.detail())}constrain(t){let[e,i]=this.inputs,s=Math.max(0,Number(this.options.gap)||0);Number(e.value)>Number(i.value)-s&&(t===0?e.value=Number(i.value)-s:i.value=Number(e.value)+s,Number(e.value)>Number(i.value)-s&&(t===0?i.value=Number(e.value)+s:e.value=Number(i.value)-s)),this.raise(t)}raise(t){this.dual&&this.inputs.forEach((e,i)=>{e.style.zIndex=i===t?"2":""})}thumbSize(){let t=getComputedStyle(this.inputs[0]).getPropertyValue("--pl-range-thumb").trim(),e=parseFloat(t);return Number.isNaN(e)?18:t.endsWith("rem")?e*parseFloat(getComputedStyle(document.documentElement).fontSize):e}ratioAt(t){let e=this.el.getBoundingClientRect(),i=this.thumbSize(),s=e.width-i;return s>0?$((t-e.left-i/2)/s,0,1):0}nearest(t){let[e,i]=this.inputs.map(s=>this.ratio(s));return e===i?t<e?0:1:Math.abs(t-e)<=Math.abs(t-i)?0:1}jump(t){if(t.target!==this.el||t.button>0)return;let e=this.ratioAt(t.clientX),i=this.nearest(e),s=this.inputs[i];if(s.disabled)return;t.preventDefault();let{min:o,max:n}=this.bounds(s);s.value=this.snap(o+e*(n-o),s),s.focus({preventScroll:!0}),s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0}))}update(){if(!this.inputs?.length)return;let t=this.inputs.map(n=>this.ratio(n)),e=this.inputs.map(n=>Number(n.value)),i=e.map(n=>this.format(n)),s=this.options.prefix||this.options.suffix;if(this.inputs.forEach((n,a)=>{n.style.setProperty("--pl-range-ratio",t[a].toFixed(4)),n.style.setProperty("--pl-range-progress",`${(t[a]*100).toFixed(2)}%`),s&&n.setAttribute("aria-valuetext",i[a]);let l=this.bubbles[a];l&&(l.style.setProperty("--pl-range-ratio",t[a].toFixed(4)),l.textContent=i[a])}),this.dual&&(this.el.style.setProperty("--pl-range-start",t[0].toFixed(4)),this.el.style.setProperty("--pl-range-end",t[1].toFixed(4))),this.ticks)for(let n of this.ticks.children)n.dataset.value!==void 0&&n.classList.toggle("pl-active",e.includes(Number(n.dataset.value)));let o=this.dual?`${i[0]} \u2013 ${i[1]}`:i[0];this.outputs.forEach((n,a)=>{n.textContent=this.dual&&this.outputs.length>1?i[a]??"":o})}};d(ge,"defaults",{dual:!1,tooltip:!1,ticks:0,gap:0,prefix:"",suffix:"",output:""});v("range",ge);var Ei=".pl-form-icon, .pl-form-affix, .pl-input-group, .pl-form-floating, .pl-form-field";function cs(r,t){r.value=t,r.dispatchEvent(new Event("input",{bubbles:!0})),r.dispatchEvent(new Event("change",{bubbles:!0}))}var be=class extends x{init(){let{el:t}=this;if(this.resizeBefore=t.style.resize,t.style.resize="none",this.options.minRows&&(t.rows=this.options.minRows),this.update=this.update.bind(this),this.on(t,"input",this.update),this.on(t.form,"reset",()=>requestAnimationFrame(()=>!this.signal.aborted&&this.update())),this.on(window,"resize",this.update,{passive:!0}),typeof ResizeObserver=="function"){let e=t.offsetWidth,i=new ResizeObserver(()=>{t.offsetWidth!==e&&(e=t.offsetWidth,this.update())});i.observe(t),this.onDestroy(()=>i.disconnect())}this.onDestroy(()=>{t.style.height="",t.style.overflowY="",t.style.resize=this.resizeBefore}),this.update()}update(){let{el:t}=this;if(!t.offsetParent&&!t.getClientRects().length)return;let e=getComputedStyle(t),i=t.offsetHeight-t.clientHeight;t.style.height="auto";let s=t.scrollHeight+i,o="hidden";if(this.options.maxRows){let a=(parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.5)*this.options.maxRows+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+i;s>a&&(s=a,o="auto")}t.style.overflowY=o,t.style.height=`${s}px`}};d(be,"defaults",{minRows:0,maxRows:0});v("autosize",be);var Ct=class extends x{init(){let{el:t}=this;this.input=this.options.target?C(t,this.options.target)[0]:t.closest(Ei)?.querySelector('input[type="password"], input[data-pl-password]'),this.input&&(t.matches("button")&&!t.hasAttribute("type")&&(t.type="button"),t.matches("button, a[href]")||(t.setAttribute("role","button"),t.tabIndex=0),this.input.id&&t.setAttribute("aria-controls",this.input.id),this.on(t,"click",e=>{e.preventDefault(),this.toggle()}),this.on(t,"keydown",e=>{(e.key==="Enter"||e.key===" ")&&!t.matches("button, a[href]")&&(e.preventDefault(),this.toggle())}),this.on(this.input.form,"submit",()=>this.hide()),this.sync())}get visible(){return!!this.input&&this.input.type!=="password"}sync(){let{el:t,options:e}=this,i=this.visible;t.setAttribute("aria-pressed",String(i)),t.setAttribute("aria-label",i?e.labelHide??y("password.hide",{},t):e.labelShow??y("password.show",{},t)),t.classList.toggle("pl-active",i);let s=t.matches("[data-pl-icon]")?t:E("[data-pl-icon]",t);if(s){let o=i?e.iconHide:e.iconShow,n=H(s,"icon");n?n.render(o):s.setAttribute("data-pl-icon",o)}}show(){this.set(!0)}hide(){this.set(!1)}toggle(){this.set(!this.visible)}set(t){!this.input||t===this.visible||(this.input.type=t?"text":"password",this.sync(),this.emit(t?"show":"hide",{input:this.input}))}};d(Ct,"defaults",{target:"",iconShow:"eye",iconHide:"eye-off",labelShow:null,labelHide:null}),d(Ct,"primary","target");v("password-toggle",Ct);var Ot=class extends x{init(){var s;let{el:t,options:e}=this;this.max=Number(e.max)||(t.maxLength>0?t.maxLength:0),this.counter=e.target&&C(t,e.target)[0]||t.closest(".pl-form-field")?.querySelector(".pl-form-count"),this.counter||(this.counter=document.createElement("span"),this.counter.className="pl-form-help pl-form-count",(t.closest(".pl-form-icon, .pl-form-affix, .pl-input-group, .pl-form-floating")||t).after(this.counter),this.onDestroy(()=>this.counter.remove())),(s=this.counter).id||(s.id=k("pl-count"));let i=t.getAttribute("aria-describedby");i?.split(" ").includes(this.counter.id)||t.setAttribute("aria-describedby",i?`${i} ${this.counter.id}`:this.counter.id),this.update=this.update.bind(this),this.on(t,"input",this.update),this.on(t.form,"reset",()=>requestAnimationFrame(()=>!this.signal.aborted&&this.update())),this.update()}update(){let{el:t,counter:e,max:i,options:s}=this,o=t.value.length,n=i-o;e.textContent=i?s.template.replace("{count}",o).replace("{max}",i).replace("{left}",n):String(o);let a=!!i&&o>i,l=!!i&&!a&&o>=i*s.warn;e.classList.toggle("pl-form-count-warning",l),e.classList.toggle("pl-form-count-danger",a||!!i&&o===i),a!==this.over&&(this.over=a,this.emit(a?"exceed":"within",{count:o,max:i}))}};d(Ot,"defaults",{max:0,target:"",warn:.9,template:"{count} / {max}"}),d(Ot,"primary","max");v("char-count",Ot);var zt=class extends x{init(){let{el:t}=this;t.matches("button")&&!t.hasAttribute("type")&&(t.type="button"),!t.hasAttribute("aria-label")&&!t.textContent.trim()&&t.setAttribute("aria-label",y("clear",{},t)),this.on(t,"click",e=>{e.preventDefault(),this.clear()})}get input(){return this.options.target?C(this.el,this.options.target)[0]:this.el.closest(Ei)?.querySelector('input:not([type="hidden"]), textarea')}clear(){let{input:t}=this;!t||t.disabled||t.readOnly||(cs(t,""),t.focus(),this.emit("clear",{input:t}))}};d(zt,"defaults",{target:""}),d(zt,"primary","target");v("form-clear",zt);function ps(r){let t=r.validity,e=s=>r.getAttribute(`data-pl-message-${s}`),i=(s,o)=>y(`validation.${s}`,o,r);return t.valueMissing?e("required")?e("required"):r.type==="checkbox"?i("checkbox"):r.type==="radio"?i("radio"):r.type==="file"?i("file"):r.matches("select")?i("select"):i("required"):t.typeMismatch?e("type")?e("type"):r.type==="email"?i("email"):r.type==="url"?i("url"):i("type"):t.patternMismatch?e("pattern")||r.title||i("pattern"):t.tooShort?e("minlength")||i("minlength",{n:r.minLength,length:r.value.length}):t.tooLong?e("maxlength")||i("maxlength",{n:r.maxLength,length:r.value.length}):t.rangeUnderflow?e("min")||i("min",{min:r.min}):t.rangeOverflow?e("max")||i("max",{max:r.max}):t.stepMismatch?e("step")||i("step"):t.badInput?e("type")||i("bad"):t.customError?r.validationMessage:""}var ye=class extends x{init(){let{el:t}=this;this.hadNoValidate=t.noValidate,t.noValidate=!0,this.messages=new Map,this.on(t,"submit",i=>{if(this.validate()){this.emit("valid",{originalEvent:i});return}i.preventDefault(),i.stopImmediatePropagation()}),this.on(t,"focusout",i=>{!this.options.live||!this.isField(i.target)||!this.touched(i.target)&&i.target.validity.valueMissing||this.validateField(i.target)});let e=i=>{let s=i.target;this.isField(s)&&(this.marked(s)||this.options.live&&i.type==="change")&&this.validateField(s)};this.on(t,"input",e),this.on(t,"change",e),this.on(t,"reset",()=>this.reset()),this.onDestroy(()=>{this.reset(),t.noValidate=this.hadNoValidate})}get fields(){return[...this.el.elements].filter(t=>this.isField(t))}isField(t){return t instanceof Element&&t.matches("input, select, textarea")&&t.form===this.el&&t.willValidate&&!t.matches('[type="hidden"], [type="submit"], [type="reset"], [type="button"], [data-pl-novalidate]')}touched(t){return t.type==="checkbox"||t.type==="radio"?t.checked:t.value!==""}marked(t){return this.group(t).some(e=>e.classList.contains("pl-form-danger"))}group(t){return t.type==="radio"&&t.name?this.fields.filter(e=>e.type==="radio"&&e.name===t.name):[t]}validate(){let t=new Set,e=[];for(let i of this.fields){let s=this.group(i)[0];t.has(s)||(t.add(s),this.validateField(s)||e.push(s))}if(!e.length)return!0;if(this.options.shake)for(let i of e)for(let s of this.group(i)){let o=s.closest(".pl-form-affix")||s;o.classList.remove("pl-form-shake"),o.offsetWidth,o.classList.add("pl-form-shake"),o.addEventListener("animationend",()=>o.classList.remove("pl-form-shake"),{once:!0})}return this.options.focus&&e[0].focus({preventScroll:!1}),this.emit("invalid",{fields:e}),!1}validateField(t){if(t=E(t,this.el),!t||!this.isField(t))return!0;let e=this.group(t),i=e[0],s=i.validity.valid,o=s?"":ps(i);for(let n of e){let a=n.closest(".pl-form-affix")||n;a.classList.toggle("pl-form-danger",!s),a.classList.toggle("pl-form-success",s&&this.options.success&&this.touched(n)),s?n.removeAttribute("aria-invalid"):n.setAttribute("aria-invalid","true")}return this.setMessage(i,e,o),s}setMessage(t,e,i){let s=this.messages.get(t);if(!i){if(s){s.remove(),this.messages.delete(t);for(let o of e)this.describe(o,s.id,!1)}return}if(!s){s=document.createElement("div"),s.className="pl-form-help pl-form-help-danger",s.id=k("pl-error"),s.setAttribute("data-pl-form-message",""),this.messages.set(t,s);let o=t.closest(".pl-form-field"),n=e[e.length-1],a=[".pl-input-group",".pl-form-checks",".pl-form-floating",".pl-form-icon",".pl-form-affix",".pl-form-check",".pl-form-card"].map(l=>n.closest(l)).find(l=>l&&this.el.contains(l))||n;o&&e.length>1?o.append(s):a.after(s);for(let l of e)this.describe(l,s.id,!0)}s.textContent!==i&&(s.textContent=i)}describe(t,e,i){let s=(t.getAttribute("aria-describedby")||"").split(" ").filter(o=>o&&o!==e);i&&s.push(e),s.length?t.setAttribute("aria-describedby",s.join(" ")):t.removeAttribute("aria-describedby")}reset(){for(let[t,e]of this.messages){e.remove();for(let i of this.group(t))this.describe(i,e.id,!1)}this.messages.clear();for(let t of T(".pl-form-danger, .pl-form-success",this.el))t.matches("input, select, textarea, .pl-form-affix")&&t.classList.remove("pl-form-danger","pl-form-success");for(let t of this.fields)t.removeAttribute("aria-invalid")}};d(ye,"defaults",{live:!0,success:!1,shake:!0,focus:!0});v("form-validate",ye);var U=[],Si=!1,$i={left:"start",top:"start",right:"end",bottom:"end",start:"start",end:"end"};function ds(r){let[t,e]=String(r).trim().split("-");return["top","bottom","left","right"].includes(t)?$i[e]?`${t}-${$i[e]}`:t:"bottom-start"}function us(){Si||(Si=!0,document.addEventListener("click",r=>{let t=r.target;t instanceof Node&&[...U].forEach(e=>{e.el.contains(t)||e.toggleEl?.contains(t)||e.hide()})}),document.addEventListener("keydown",r=>{if(r.key!=="Escape"||!U.length)return;let t=U[U.length-1];r.preventDefault(),t.hide()}))}var ve=class extends x{init(){let{el:t,options:e}=this;this.isOpen=!1,this.token=0,this.timer=0,this.hovering=!1,this.stopPlace=null,this.parentDrop=t.parentElement?.closest(".pl-drop, [data-pl-drop]")||null,this.nested=!!this.parentDrop,this.mode=e.mode==="hover"||e.mode==null&&this.nested?"hover":"click",this.placement=ds(e.pos||(this.nested?"right-start":"bottom-start")),this.offset=e.offset??(this.nested?4:8);let i=e.toggle?C(t,e.toggle)[0]:t.previousElementSibling;if(this.toggleEl=i||null,t.id||(t.id=k("pl-drop")),t.classList.remove("pl-open"),this.setupMenu(),i){let o=!!this.menu;i.setAttribute("aria-haspopup",o?"menu":"true"),i.setAttribute("aria-controls",t.id),i.setAttribute("aria-expanded","false"),i.matches("button, a[href], input, select, textarea, [tabindex]")||(i.setAttribute("role","button"),i.tabIndex=0),this.onDestroy(()=>{["aria-haspopup","aria-controls","aria-expanded"].forEach(n=>i.removeAttribute(n)),i.classList.remove("pl-open")}),this.on(i,"click",n=>this.onToggleClick(n)),this.on(i,"keydown",n=>this.onToggleKeydown(n)),this.mode==="hover"&&(this.on(i,"pointerenter",n=>{n.pointerType!=="touch"&&(this.hovering=!0,this.schedule(!0))}),this.on(i,"pointerleave",n=>{n.pointerType!=="touch"&&(this.hovering=!1,this.schedule(!1))}),this.on(i,"focusin",()=>{!this.suppressFocus&&i.matches(":focus-visible")&&this.schedule(!0,0)}))}this.mode==="hover"&&(this.on(t,"pointerenter",o=>{o.pointerType!=="touch"&&clearTimeout(this.timer)}),this.on(t,"pointerleave",o=>{o.pointerType!=="touch"&&this.schedule(!1)})),this.on(t,"click",o=>this.onClick(o)),this.on(t,"keydown",o=>this.onKeydown(o));let s=()=>{setTimeout(()=>{let o=document.activeElement;this.signal.aborted||!this.isOpen||!o||o===document.body||t.contains(o)||this.toggleEl?.contains(o)||this.hide()})};this.on(t,"focusout",s),this.on(i,"focusout",s),us(),this.onDestroy(()=>this.teardown())}setupMenu(){this.menu=T(".pl-dropdown-nav",this.el).find(t=>this.owns(t))||null,T(".pl-dropdown-nav",this.el).filter(t=>this.owns(t)).forEach(t=>{t.hasAttribute("role")||t.setAttribute("role","menu"),[...t.children].forEach(e=>{if(e.hasAttribute("role"))return;e.classList.contains("pl-nav-divider")?e.setAttribute("role","separator"):e.setAttribute("role","none");let i=e.querySelector(":scope > a, :scope > button");i&&!i.hasAttribute("role")&&i.setAttribute("role","menuitem")})})}owns(t){return t.closest(".pl-drop, [data-pl-drop]")===this.el}get items(){return T(".pl-dropdown-nav > li > a, .pl-dropdown-nav > li > button",this.el).filter(t=>this.owns(t)&&!t.disabled&&!t.parentElement.classList.contains("pl-disabled")&&t.getClientRects().length)}schedule(t,e){if(clearTimeout(this.timer),e??(e=t?this.options.delayShow:this.options.delayHide),!e)return t?this.show():this.hide();this.timer=setTimeout(()=>t?this.show():this.hide(),e)}onToggleClick(t){if(this.toggleEl.matches("a")&&t.preventDefault(),clearTimeout(this.timer),this.mode==="hover"){this.isOpen&&!this.hovering?this.hide():this.show();return}this.toggle()}onToggleKeydown(t){let e=this.placement.split("-")[0],i=e==="right"?"ArrowRight":e==="left"?"ArrowLeft":e==="top"?"ArrowUp":"ArrowDown";if(t.key===i||t.key==="ArrowDown"&&!this.nested){if(!this.menu&&this.isOpen)return;t.preventDefault(),t.stopPropagation(),this.show(),this.focusItem(0)}else(t.key==="Enter"||t.key===" ")&&this.toggleEl.getAttribute("role")==="button"&&(t.preventDefault(),this.toggle())}onClick(t){let e=this.options.closeOnClick;if(e===!1||e==="false")return;let i=t.target.closest("a, button");if(!i||!this.el.contains(i)||i.hasAttribute("aria-haspopup")&&i.getAttribute("aria-controls"))return;let s=!!i.closest(".pl-dropdown-nav");if(i.getAttribute("href")==="#"&&t.preventDefault(),s||e===!0||e==="true"||i.hasAttribute("data-pl-drop-close")){let o=this.el.contains(document.activeElement)&&!this.nested;this.hide(o)}}onKeydown(t){if(!this.owns(t.target)&&t.target!==this.el)return;let e=this.items,i=e.indexOf(t.target.closest("a, button")),s=this.placement.split("-")[0];if(this.nested&&(s==="right"&&t.key==="ArrowLeft"||s==="left"&&t.key==="ArrowRight")){t.preventDefault(),t.stopPropagation(),this.hide(!0);return}if(!e.length)return;let o={ArrowDown:i+1,ArrowUp:i<0?e.length-1:i-1,Home:0,End:e.length-1}[t.key];o!==void 0&&(t.preventDefault(),t.stopPropagation(),e[(o+e.length)%e.length].focus())}focusItem(t){let e=this.items;e.length&&e[t<0?e.length+t:t]?.focus()}toggle(){return this.isOpen?this.hide():this.show()}show(){if(clearTimeout(this.timer),this.isOpen||!this.el.isConnected||!this.emit("beforeshow",{},!0))return;[...U].forEach(o=>{o!==this&&!o.el.contains(this.el)&&o.hide()});let{el:t,toggleEl:e}=this,i=++this.token,{signal:s}=this;this.isOpen=!0,U.push(this),t.classList.remove("pl-leave"),t.classList.add("pl-open"),e?.classList.add("pl-open"),e?.setAttribute("aria-expanded","true"),B(t),this.stopPlace?.(),this.stopPlace=Q(t,e||t.parentElement||document.body,{placement:this.placement,offset:this.offset,flip:this.options.flip,shift:this.options.shift,matchWidth:this.options.matchWidth}),this.emit("show"),D(t).then(()=>{!s.aborted&&i===this.token&&this.isOpen&&this.emit("shown")})}async hide(t=!1){if(clearTimeout(this.timer),!this.isOpen||!this.emit("beforehide",{},!0))return;[...U].forEach(l=>{l!==this&&this.el.contains(l.el)&&l.hide()});let{el:e,toggleEl:i}=this,s=++this.token,{signal:o}=this,n=e.contains(document.activeElement);this.isOpen=!1;let a=U.indexOf(this);a>-1&&U.splice(a,1),i?.classList.remove("pl-open"),i?.setAttribute("aria-expanded","false"),i&&(t===!0||n)&&(this.suppressFocus=!0,i.focus({preventScroll:!0}),this.suppressFocus=!1),e.classList.add("pl-leave"),e.classList.remove("pl-open"),this.emit("hide"),await D(e),!(o.aborted||s!==this.token)&&(this.teardown(),this.emit("hidden"))}teardown(){clearTimeout(this.timer),this.stopPlace?.(),this.stopPlace=null,this.el.classList.remove("pl-leave","pl-open"),P(this.el),this.el.hidden=!1;let t=U.indexOf(this);t>-1&&U.splice(t,1),this.isOpen=!1}};d(ve,"defaults",{toggle:null,mode:null,pos:null,offset:null,delayShow:0,delayHide:220,closeOnClick:"auto",matchWidth:!1,flip:!0,shift:!0});v("drop",ve);var Ci="pl-tooltip",fs=400,N=null,K=null,je=0,Ti=-1/0,Di=!1;function ms(r){return N||(N=document.createElement("div"),N.id=Ci,N.setAttribute("role","tooltip"),N.className="pl-tooltip"),N.parentElement!==r&&r.appendChild(N),N}function gs(){Di||(Di=!0,document.addEventListener("keydown",r=>{r.key==="Escape"&&K?.hide()}),window.addEventListener("scroll",r=>{K&&r.target!==N&&K.hide()},{capture:!0,passive:!0}),window.addEventListener("resize",()=>K?.hide(),{passive:!0}))}var Nt=class extends x{init(){let{el:t,options:e}=this;this.timer=0,this.visible=!1;let i=t.getAttribute("title");i!=null&&(e.title||(e.title=i),t.removeAttribute("title"),this.onDestroy(()=>t.setAttribute("title",i))),this.labelled=!1,e.title&&!e.html&&!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&!t.textContent.trim()&&!t.matches("input, select, textarea")&&(!t.hasAttribute("role")&&!t.matches("a[href], button, summary, img, svg")&&(t.setAttribute("role","img"),this.onDestroy(()=>t.removeAttribute("role"))),t.setAttribute("aria-label",String(e.title)),this.labelled=!0),this.on(t,"pointerenter",s=>{s.pointerType!=="touch"&&this.schedule()}),this.on(t,"pointerleave",()=>this.hide()),this.on(t,"pointerdown",()=>this.hide()),this.on(t,"focusin",()=>{(t.matches(":focus-visible")||t.querySelector(":focus-visible"))&&this.show()}),this.on(t,"focusout",()=>this.hide()),gs(),this.onDestroy(()=>this.hide(!0))}schedule(){clearTimeout(this.timer);let t=K||performance.now()-Ti<fs,e=t?0:this.options.delay;if(!e)return this.show(!!t);this.timer=setTimeout(()=>this.show(),e)}setTitle(t){this.options.title=t,this.labelled&&this.el.setAttribute("aria-label",String(t)),this.visible&&this.render()}render(){let{el:t,options:e}=this,i=t.closest("dialog")||document.body,s=ms(i);return e.html?s.innerHTML=String(e.title):s.textContent=String(e.title),s}show(t=!1){clearTimeout(this.timer);let{el:e,options:i}=this;if(this.visible||!i.title||!e.isConnected||e.matches(":disabled, .pl-disabled")||!this.emit("beforeshow",{},!0))return;K&&K!==this&&K.hide(!0),K=this,this.visible=!0,++je;let s=this.render();s.className=`pl-tooltip ${i.cls||""} ${t?"pl-tooltip-instant":""}`.trim(),s.classList.add("pl-open"),B(s),kt(s,e,{placement:i.pos,offset:i.offset}),this.labelled||(this.describedBy=e.getAttribute("aria-describedby"),e.setAttribute("aria-describedby",[this.describedBy,Ci].filter(Boolean).join(" "))),this.emit("show")}async hide(t=!1){if(clearTimeout(this.timer),!this.visible)return;this.visible=!1;let{el:e}=this;if(this.labelled||(this.describedBy?e.setAttribute("aria-describedby",this.describedBy):e.removeAttribute("aria-describedby")),K===this&&(K=null),Ti=performance.now(),this.emit("hide"),t||!N){N?.classList.remove("pl-open","pl-leave"),N&&P(N);return}let i=++je;N.classList.add("pl-leave"),N.classList.remove("pl-open");let{signal:s}=this;await D(N),i===je&&(N.classList.remove("pl-leave"),P(N),s.aborted||this.emit("hidden"))}};d(Nt,"defaults",{title:"",pos:"top",offset:10,delay:120,cls:"",html:!1}),d(Nt,"primary","title");v("tooltip",Nt);var j=[],Oi=!1;function bs(){Oi||(Oi=!0,document.addEventListener("click",r=>{let t=r.target;t instanceof Node&&[...j].forEach(e=>{e.options.dismiss&&(e.el.contains(t)||e.pop?.contains(t)||j.some(i=>i!==e&&e.pop?.contains(i.el)&&i.pop?.contains(t))||e.hide())})}),document.addEventListener("keydown",r=>{r.key!=="Escape"||!j.length||(r.preventDefault(),j[j.length-1].hide(!0))}))}var Ht=class extends x{init(){let{el:t,options:e}=this;this.isOpen=!1,this.token=0,this.timer=0,this.pop=null,this.stopPlace=null,this.id=k("pl-popover");let i=t.getAttribute("title");i!=null&&(!e.title&&!e.content?e.content=i:e.title||(e.title=i),t.removeAttribute("title")),this.expandable=!t.matches("input, select, textarea"),this.expandable&&(t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false")),t.matches("button, a[href], input, select, textarea, [tabindex]")||(t.setAttribute("role","button"),t.tabIndex=0,this.on(t,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggle())}));let{mode:s}=e;s==="hover"?(this.on(t,"pointerenter",o=>{o.pointerType!=="touch"&&this.schedule(!0)}),this.on(t,"pointerleave",o=>{o.pointerType!=="touch"&&this.schedule(!1)}),this.on(t,"focusin",()=>{!this.suppressFocus&&t.matches(":focus-visible")&&this.schedule(!0,0)}),this.on(t,"focusout",()=>this.onFocusOut()),this.on(t,"click",o=>{t.matches("a")&&o.preventDefault(),o.pointerType==="mouse"?this.show():this.toggle()})):s==="focus"?(this.on(t,"focusin",()=>{this.suppressFocus||this.show()}),this.on(t,"focusout",()=>this.onFocusOut())):this.on(t,"click",o=>{t.matches("a")&&o.preventDefault(),this.toggle()}),bs(),this.onDestroy(()=>{this.teardown(),this.restoreTarget(),this.pop?.remove(),["aria-haspopup","aria-expanded","aria-controls"].forEach(o=>t.removeAttribute(o))})}onFocusOut(){let{signal:t}=this;setTimeout(()=>{let e=document.activeElement;t.aborted||!this.isOpen||this.el.contains(e)||this.pop?.contains(e)||this.hide()})}schedule(t,e){if(clearTimeout(this.timer),e??(e=t?this.options.delayShow:this.options.delayHide),!e)return t?this.show():this.hide();this.timer=setTimeout(()=>t?this.show():this.hide(),e)}build(){let{el:t,options:e}=this,i=this.pop;i||(i=this.pop=document.createElement("div"),i.id=this.id,i.setAttribute("role",e.mode==="click"?"dialog":"tooltip"),i.tabIndex=-1,i.addEventListener("click",c=>{c.target.closest("[data-pl-popover-close]")&&this.hide(!0)}),i.addEventListener("keydown",c=>this.onKeydown(c)),i.addEventListener("focusout",()=>{(e.mode!=="click"||e.dismiss)&&this.onFocusOut()}),e.mode==="hover"&&(i.addEventListener("pointerenter",()=>clearTimeout(this.timer)),i.addEventListener("pointerleave",c=>{c.pointerType!=="touch"&&this.schedule(!1)}))),i.className=`pl-popover ${e.cls||""}`.trim(),this.restoreTarget(),i.replaceChildren(),i.removeAttribute("aria-labelledby");let s=(c,p)=>{e.html?c.innerHTML=String(p):c.textContent=String(p)},o=()=>{let c=document.createElement("button");return c.type="button",c.className="pl-close",c.setAttribute("aria-label",y("close",{},this.el)),c.setAttribute("data-pl-popover-close",""),c},n=e.title!==""&&e.title!=null;if(n){let c=document.createElement("div");c.className="pl-popover-header";let p=document.createElement("div");p.className="pl-popover-title",p.id=`${this.id}-title`,s(p,e.title),c.append(p),e.close&&c.append(o()),i.append(c),i.setAttribute("aria-labelledby",p.id)}let a=document.createElement("div");a.className="pl-popover-body",!n&&e.close&&a.append(o());let l=e.target?C(t,e.target)[0]:null;if(l)this.targetEl=l,this.targetHome=document.createComment("pl-popover"),this.targetHidden=l.hidden,l.before(this.targetHome),l.hidden=!1,a.append(l);else{let c=document.createElement("div");s(c,e.content),a.append(...e.html?c.childNodes:[c.textContent])}i.append(a),!n&&!i.hasAttribute("aria-label")?i.setAttribute("aria-label",t.textContent.trim()||"Popover"):n&&i.removeAttribute("aria-label");let h=t.closest("dialog, .pl-popover")||document.body;return i.parentElement!==h&&h.append(i),i}restoreTarget(){this.targetEl&&(this.targetEl.hidden=this.targetHidden,this.targetHome.replaceWith(this.targetEl),this.targetEl=this.targetHome=null)}onKeydown(t){if(t.key!=="Tab"||this.options.mode!=="click")return;let e=pt(this.pop),i=e[0],s=e[e.length-1],o=document.activeElement;(t.shiftKey?o===i||o===this.pop:o===s||!e.length&&o===this.pop)&&(t.preventDefault(),this.el.focus())}update(t={}){Object.assign(this.options,t),this.isOpen&&this.build()}toggle(){return this.isOpen?this.hide():this.show()}show(){clearTimeout(this.timer);let{el:t,options:e}=this;if(this.isOpen||!t.isConnected||!e.target&&e.content===""&&e.title===""||!this.emit("beforeshow",{},!0))return;let i=this.build();[...j].forEach(n=>{n!==this&&!n.pop?.contains(t)&&n.hide()});let s=++this.token,{signal:o}=this;this.isOpen=!0,j.push(this),i.classList.remove("pl-leave"),i.classList.add("pl-open"),t.classList.add("pl-open"),this.expandable&&t.setAttribute("aria-expanded","true"),e.mode==="click"?t.setAttribute("aria-controls",i.id):t.setAttribute("aria-describedby",i.id),B(i),this.stopPlace?.(),this.stopPlace=Q(i,t,{placement:e.pos,offset:e.offset}),e.mode==="click"&&e.focus&&pt(i).length&&i.focus({preventScroll:!0}),this.emit("show"),D(i).then(()=>{!o.aborted&&s===this.token&&this.isOpen&&this.emit("shown")})}async hide(t=!1){if(clearTimeout(this.timer),!this.isOpen||!this.emit("beforehide",{},!0))return;let{el:e,pop:i}=this;[...j].forEach(l=>{l!==this&&i.contains(l.el)&&l.hide()});let s=++this.token,{signal:o}=this,n=i.contains(document.activeElement);this.isOpen=!1;let a=j.indexOf(this);a>-1&&j.splice(a,1),e.classList.remove("pl-open"),this.expandable&&e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-describedby"),(n||t===!0&&this.options.mode==="click")&&(this.suppressFocus=!0,e.focus({preventScroll:!0}),this.suppressFocus=!1),i.classList.add("pl-leave"),i.classList.remove("pl-open"),this.emit("hide"),await D(i),!(o.aborted||s!==this.token)&&(this.teardown(),this.emit("hidden"))}teardown(){clearTimeout(this.timer),this.stopPlace?.(),this.stopPlace=null;let t=j.indexOf(this);t>-1&&j.splice(t,1),this.isOpen=!1,this.pop&&(this.pop.classList.remove("pl-open","pl-leave"),P(this.pop),this.pop.hidden=!1)}};d(Ht,"defaults",{title:"",content:"",target:null,pos:"top",mode:"click",offset:12,close:!1,dismiss:!0,html:!1,cls:"",delayShow:80,delayHide:200,focus:!0}),d(Ht,"primary","content");v("popover",Ht);var xe=new Set;function zi(r,t=1500){let e=r.filter(Boolean).flatMap(i=>i.getAnimations());return e.length?Promise.race([Promise.allSettled(e.map(i=>i.finished)),new Promise(i=>setTimeout(i,t))]):Promise.resolve()}var Z=class extends x{init(){let t=this.el,e=this.constructor.componentName;this.state="closed",this.opener=null,this.closing=null,this.pressed=null,(!(t instanceof HTMLDialogElement)||typeof t.showModal!="function")&&console.warn(`[Plossy] ${e}: wymagany element <dialog>.`);let i=t.querySelector(this.constructor.title);i&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(i.id||(i.id=k(`pl-${e}-title`)),t.setAttribute("aria-labelledby",i.id)),this.setup(),this.on(t,"pointerdown",s=>{let o=s.target===t&&(s.offsetX>=t.clientWidth||s.offsetY>=t.clientHeight);this.pressed=o?!1:s.target}),this.on(t,"click",s=>{let o=s.target.closest(`[data-pl-${e}-close]`);if(o&&o.closest("dialog")===t){s.preventDefault(),this.hide();return}s.target===t&&(this.pressed===t||this.pressed===null)&&this.dismiss("backdrop"),this.pressed=null}),this.on(t,"keydown",s=>{s.key!=="Escape"||s.defaultPrevented||(s.preventDefault(),this.dismiss("esc"))}),this.on(t,"cancel",s=>{s.target===t&&(s.preventDefault(),this.dismiss("esc"))}),this.on(t,"close",s=>{s.target===t&&this.state!=="closed"&&this.finish()}),this.onDestroy(()=>this.finish(!0))}setup(){}get panel(){return this.el.querySelector(`:scope > ${this.constructor.panel}`)||this.el.firstElementChild}get isOpen(){return this.state==="open"}dismiss(t){if(this.state!=="open")return;let{backdropClose:e,escClose:i,static:s}=this.options;if(t==="backdrop"&&s)return this.nope();if(t==="backdrop"?e:i)return this.hide();s&&this.nope()}nope(){let t=this.panel;!t||t.classList.contains("pl-modal-shake")||Pe(t,"pl-modal-shake")}toggle(t){return this.state==="open"?this.hide():this.show(t)}async show(t){let e=this.el;if(this.state==="closing"&&await this.closing,!(this.state!=="closed"||typeof e.showModal!="function")&&(Re(this)||ct(e),!!Re(this)&&(e.isConnected||document.body.append(e),!!this.emit("beforeshow",{},!0)))){this.options.stack||[...xe].filter(i=>i!==this&&!i.el.contains(e)).forEach(i=>i.hide()),this.opener=t instanceof Element?t:document.activeElement,e.classList.remove("pl-closing"),e.open&&e.close(),this.state="open",xe.add(this),At();try{e.showModal(),e.scrollTop=0,e.scrollLeft=0}catch(i){this.state="closed",xe.delete(this),dt(),console.error("[Plossy] modal:",i);return}e.classList.add("pl-open"),e.scrollTop=0,this.emit("show"),await zi([e,this.panel]),this.state==="open"&&this.emit("shown")}}hide(){if(!Re(this))return Promise.resolve();if(this.state==="closing")return this.closing;if(this.state!=="open"||!this.emit("beforehide",{},!0))return Promise.resolve();this.state="closing",this.el.classList.add("pl-closing"),this.emit("hide");let{signal:t}=this;return this.closing=zi([this.el,this.panel]).then(()=>{t.aborted||this.finish()}),this.closing}finish(t=!1){if(this.state==="closed")return;let e=this.el;this.state="closed",this.closing=null,xe.delete(this),e.open&&e.close(),e.classList.remove("pl-closing","pl-open"),dt();let i=this.opener;this.opener=null,i?.isConnected&&i!==document.body&&i.focus?.({preventScroll:!0}),t||this.emit("hidden")}};d(Z,"defaults",{backdropClose:!0,escClose:!0,static:!1,stack:!1}),d(Z,"panel",".pl-modal-dialog"),d(Z,"title",".pl-modal-title");var Re=r=>!r.signal.aborted&&H(r.el,r.constructor.componentName)===r;function Ye(r){if(typeof document>"u")return;let t=`data-pl-${r}-open`;document.addEventListener("click",e=>{let i=e.target.closest?.(`[${t}]`);if(!i||i.disabled||i.classList.contains("pl-disabled"))return;let s=i.getAttribute(t)||i.getAttribute("href"),o=null;try{o=s?document.querySelector(s):null}catch{}o&&(e.preventDefault(),O[r](o)?.show(i))})}var It=class extends Z{};d(It,"defaults",{...Z.defaults});v("modal",It);Ye("modal");var Ve={},at=r=>String(r??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]);function Ni(r,t={}){let{cls:e="",...i}=t,s=document.createElement("dialog");s.className=`pl-modal ${e}`.trim();let o=document.createElement("div");o.className="pl-modal-dialog",r instanceof Node?o.append(r):o.innerHTML=r??"",s.append(o),document.body.append(s);let n=new It(s,{stack:!0,...i});return s.addEventListener("pl:hidden",a=>{a.target===s&&(n.destroy(),s.remove())}),n.show(),n}function We(r,t,e={},i=""){let{title:s="",html:o=!1,ok:n=Ve.ok??y("modal.ok"),cancel:a=Ve.cancel??y("modal.cancel"),tone:l="primary",cls:h="pl-modal-small pl-modal-center",placeholder:c="",type:p="text",...m}=e,b=o?String(t??""):at(t),f=k("pl-modal-input"),u=r!=="alert",g=r==="prompt"?`<label class="pl-modal-prompt-label pl-modal-message" for="${f}">${b}</label>
|
|
52
52
|
<input class="pl-input" id="${f}" type="${at(p)}" placeholder="${at(c)}" autocomplete="off" autofocus>`:`<div class="pl-modal-message">${b}</div>`,w=`
|
|
53
53
|
<form method="dialog" novalidate>
|
|
54
54
|
${s?`<div class="pl-modal-header"><h2 class="pl-modal-title">${at(s)}</h2></div>`:""}
|