plossy 0.5.0 → 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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Plossy v0.5.0 | MIT License
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,8 +48,8 @@
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 Xi=Object.defineProperty;var Gi=(r,t,e)=>t in r?Xi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var d=(r,t,e)=>Gi(r,typeof t!="symbol"?t+"":t,e);var ni={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 ri={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 te=new Map,vt=new WeakMap,it=new WeakMap,xt=new WeakMap,ie=0,He=0,hi=typeof FinalizationRegistry=="function"?new FinalizationRegistry(()=>ie--):null,Oe=!1,Qt="",ci="data-pl-persist",wt={autoDestroy:!0,locale:null},st={en:ni,pl:ri};function q(r){return wt.locale?String(wt.locale):(r?.closest?.("[lang]")||document.documentElement).getAttribute("lang")||"en"}function Zi(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=Zi(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 Ji(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]:[],Qi=0,k=(r="pl")=>`${r}-${(++Qi).toString(36)}${Math.random().toString(36).slice(2,6)}`,$=(r,t,e)=>Math.min(Math.max(r,t),e),pi=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 ai(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 se(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?pi(n.slice(0,a).trim()):null;l&&l in t?i[l]=ai(n.slice(a+1)):o===0&&e&&(i[e]=ai(s.length===1?r:n))}return i}var b=class{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);fi(this),!o.destroyed&&(o.destroyed=!0,s.call(this))}}),di(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=vt.get(this.el);i?.get(e)===this&&(i.delete(e),He--)}};d(b,"defaults",{}),d(b,"primary",null);function di(r){let t=r.constructor,e=r.el,i=it.get(r);r.options={...t.defaults,...se(e.getAttribute(`data-pl-${t.componentName}`),t.defaults,t.primary),...i.options},r._cleanup=[],r._life=new AbortController,i.destroyed=!1;let s=vt.get(e);s||vt.set(e,s=new Map),s.has(t.componentName)||He++,s.set(t.componentName,r),r.init()}function H(r,t){return vt.get(r)?.get(t)||null}function ui(r,t,e){return H(r,t)||mi(r,t)||new(te.get(t))(r,e)}function ts(r){let t=r.el,e=xt.get(t);e||(xt.set(t,e=new Map),ie++,hi?.register(t,null,e)),e.set(r.constructor.componentName,r)}function fi(r){let t=xt.get(r.el),e=r.constructor.componentName;t?.get(e)===r&&(t.delete(e),t.size||(xt.delete(r.el),ie--,hi?.unregister(t)))}function mi(r,t){let e=xt.get(r);if(!e)return null;let i=null;for(let[s,o]of[...e])if(!(t&&s!==t)&&(fi(o),!(H(r,s)||it.get(o).declarative&&!r.hasAttribute(`data-pl-${s}`))))try{di(o),i=o}catch(n){console.error(`[Plossy] ${s}:`,n)}return i}var gi=r=>r instanceof Element?[r,...r.querySelectorAll("*")]:[...r.querySelectorAll("*")];function es(r){if(!(!He||r.isConnected))for(let t of gi(r).reverse()){let e=vt.get(t);if(!(!e||t.isConnected||t.closest(`[${ci}]`))){for(let[i,s]of[...e])if(e.get(i)===s){try{s.destroy()}catch(o){console.error(`[Plossy] ${i}:`,o)}ts(s)}}}}var ee=new Set,ze=0;function is(){ze=0;let r=[...ee];ee.clear(),wt.autoDestroy&&r.forEach(es)}function v(r,t){t.componentName=r,te.set(r,t),Qt=[...te.keys()].map(i=>`[data-pl-${i}]`).join(",");let e=pi(r);return O[e]||(O[e]=(i,s)=>{let o=E(i);return o?ui(o,r,s):null}),Oe&&ct(document),t}function ct(r=document){if(ie&&gi(r).forEach(e=>mi(e)),!Qt)return;let t=[...r.querySelectorAll(Qt)];r instanceof Element&&r.matches(Qt)&&t.unshift(r);for(let e of t)for(let i of te.keys())if(e.hasAttribute(`data-pl-${i}`)&&!H(e,i))try{ui(e,i)}catch(s){console.error(`[Plossy] ${i}:`,s)}}function bi(){if(Oe||typeof document>"u")return;Oe=!0;let r=()=>{ct(document),new MutationObserver(t=>{for(let e of t){if(wt.autoDestroy&&!e.target.closest?.(`[${ci}]`))for(let i of e.removedNodes)i.nodeType===1&&ee.add(i);for(let i of e.addedNodes)i.nodeType===1&&i.isConnected&&ct(i)}ee.size&&!ze&&(ze=setTimeout(is))}).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 Ie(r,t){r.classList.add(t),await D(r),r.classList.remove(t)}var Jt=new WeakMap;function J(r,t,{duration:e=360,easing:i="cubic-bezier(0.33, 0.5, 0.2, 1)"}={}){let s=Jt.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,Jt.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 Jt.set(r,p),p.finished.then(()=>{t||(r.hidden=!0),r.style.overflow="",Jt.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 li={top:"bottom",bottom:"top",left:"right",right:"left"};function Mt(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,x=window.innerHeight,[f,u="center"]=i.split("-"),g={top:h.top-p-s-a,bottom:x-h.bottom-p-s-a,left:h.left-c-s-a,right:m-h.right-c-s-a};o&&g[f]<0&&g[li[f]]>g[f]&&(f=li[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,x-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(()=>Mt(r,t,e))};Mt(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 Ne=0;function kt(){if(Ne++>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(Ne===0||--Ne>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 Pe(r,t=150){let e;return(...i)=>{clearTimeout(e),e=setTimeout(()=>r(...i),t)}}Object.assign(O,{register:v,scan:ct,getInstance:H,config:wt,addLocale:Ji,locales:st,Component:b,util:{$:E,$$:T,uid:k,clamp:$,parseOptions:se,t:y,langOf:q,queryTargets:C,focusables:pt,animationsDone:D,animateClass:Ie,toggleHeight:J,showLayer:B,hideLayer:P,place:Mt,autoPlace:Q,lockScroll:kt,unlockScroll:dt,rafThrottle:z,debounce:Pe,prefersReducedMotion:S}});var oe=class extends b{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(s=>s!==t&&s.classList.contains("pl-open")).forEach(s=>this.hide(s,!0));let{title:e,content:i}=this.parts(t);t.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),this.emit("show",{item:t}),await J(i,!0,{duration:this.options.duration}),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(n=>n.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}),await J(o,!1,{duration:this.options.duration}),this.emit("hidden",{item:t})}};d(oe,"defaults",{multiple:!1,collapsible:!0,active:null,duration:380});v("accordion",oe);var ne=class extends b{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())}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.closing||this.el.hidden||!this.emit("beforehide",{},!0))return;this.closing=!0,this.stop(),this.emit("hide");let{el:t}=this,e=S()?0:this.options.duration;if(e&&typeof t.animate=="function"){let i=getComputedStyle(t);t.classList.add("pl-alert-leave"),t.style.overflow="hidden";let s={height:`${t.offsetHeight}px`,paddingTop:i.paddingTop,paddingBottom:i.paddingBottom,marginTop:i.marginTop,marginBottom:i.marginBottom,borderTopWidth:i.borderTopWidth,borderBottomWidth:i.borderBottomWidth,opacity:1,transform:"scale(1)"},o={...s,opacity:0,transform:"scale(0.97)",offset:.45},n={height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px",borderTopWidth:"0px",borderBottomWidth:"0px",opacity:0,transform:"scale(0.97)"};try{await t.animate([s,o,n],{duration:e,easing:"cubic-bezier(0.33, 0.5, 0.2, 1)"}).finished}catch{}}if(t.hidden=!0,t.classList.remove("pl-alert-leave"),t.style.overflow="",this.closing=!1,this.emit("hidden"),this.options.remove){let i=t.parentNode;this.destroy(),i?.removeChild(t)}}hide(){return this.close()}};d(ne,"defaults",{duration:320,timeout:0,remove:!0,selClose:".pl-alert-close"});v("alert",ne);var yi=[["days",86400],["hours",3600],["minutes",60],["seconds",1]],At=class extends b{init(){this.timer=null,this.target=0,this.remaining=0,this.ended=!1,this.values={},this.cells={};for(let[t]of yi){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 yi)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(At,"defaults",{date:"",seconds:0,autostart:!0,pad:2,reload:!1}),d(At,"primary","date");v("countdown",At);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 Lt=class extends b{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(Lt,"defaults",{name:"",stroke:1.75}),d(Lt,"primary","name");v("icon",Lt);O.icons={add(r){Object.assign(W,r)},names(){return Object.keys(W).sort()},get(r){return W[r]||null}};var re=class extends b{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(re,"defaults",{offset:16,cls:"pl-navbar-scrolled",hide:!1,hideOffset:240,tolerance:6,container:null});var ae=class extends b{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(s=>s!==t&&s.parentElement===t.parentElement&&s.classList.contains("pl-open")).forEach(s=>this.hide(s,!0));let{link:e,sub:i}=this.parts(t);t.classList.add("pl-open"),e.setAttribute("aria-expanded","true"),this.emit("show",{item:t}),await J(i,!0,{duration:this.options.duration}),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}),await J(s,!1,{duration:this.options.duration}),this.emit("hidden",{item:t})}};d(ae,"defaults",{multiple:!1,collapsible:!0,duration:340});v("navbar",re);v("nav",ae);var Et=class extends b{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(Et,"defaults",{offset:400,target:"",focus:!0,cls:"pl-active"}),d(Et,"primary","offset");v("totop",Et);var Be=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>`,le=r=>String(r).replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]);function vi(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 ss(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 os(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 he=class extends b{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;os(n,e.accept)?e.maxSize&&n.size>e.maxSize*1024*1024?a={type:"size",message:y("upload.size",{name:n.name,size:vi(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=Be(ss(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=le(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="${le(y("upload.remove",{name:t.name},this.el))}">${Be("x")}</button><span class="pl-upload-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="${le(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=[vi(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=`${Be("circle-alert")}<span>${t.map(i=>le(i.message)).join("<br>")}</span>`,e.after(this.errorEl))}clearErrors(){this.errorEl?.remove(),this.el.classList.remove("pl-upload-invalid")}};d(he,"defaults",{multiple:null,accept:"",maxSize:0,maxFiles:0,url:"",name:"file",method:"POST",auto:!0,thumbnails:!0,list:"",messages:!0});v("upload",he);var St=class extends b{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.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(St,"defaults",{length:6,type:"numeric",separator:0,masked:!1,name:"",autofocus:!1,submit:!1,label:null}),d(St,"primary","length");v("otp",St);var ns=["length","case","digit","symbol"],ce=class extends b{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 ns){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.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(ce,"defaults",{minLength:8,rules:!1,label:!0,labels:null,input:"",emptyLabel:""});v("strength",ce);var $t=class extends b{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($t,"defaults",{value:0,max:5,name:"",readonly:!1,clearable:!0,label:null,star:"gwiazdka|gwiazdki|gwiazdek"}),d($t,"primary","value");v("rating",$t);var pe=class extends b{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(pe,"defaults",{min:null,max:null,step:null,repeat:!0,minusLabel:null,plusLabel:null});v("quantity",pe);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=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]),ot=r=>String(r).split("").map(t=>(t==="\u0142"||t==="\u0141"?"l":t.normalize("NFD")[0]||t).toLowerCase()[0]||t).join("");function qe(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 de=class extends b{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=qe(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=Pe(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=qe(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=qe(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 x=this.items.some(u=>ot(u.label)===a);if(o.creatable&&n&&!x){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(de,"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",de);var xi=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"),Mi=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),tt=()=>Mi(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),ue=(r,t)=>new Date(r,t+1,0).getDate(),Tt=(r,t)=>{let e=new Date(r.getFullYear(),r.getMonth()+t,1);return e.setDate(Math.min(r.getDate(),ue(e.getFullYear(),e.getMonth()))),e};function F(r){if(r==null||r==="")return null;if(r instanceof Date)return Number.isNaN(r.getTime())?null:Mi(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 wi=/yyyy|yy|MMMM|MMM|MM|M|dd|d/g,rs=["dialog","prevMonth","nextMonth","prevYear","nextYear","prevYears","nextYears","pickMonth","pickYear","today","clear"],fe=class extends b{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(rs.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}">${xi("chevron-left")}</button><button class="pl-datepicker-next" type="button" aria-label="${t.nextMonth}">${xi("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(),ue(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(),ue(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(wi,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(wi,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=x=>x.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>ue(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=Tt(i,t):this.view==="months"?this.cursor=Tt(i,t*12):this.cursor=Tt(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),x=(m.getDay()-h+7)%7,f=Y(m,-x),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),x=l.getFullYear()===o&&l.getMonth()===c;return`<button class="pl-datepicker-cell${m?" pl-datepicker-selected":""}${x?" 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(),x=[this.start,this.end].some(f=>f&&f.getFullYear()===p);c+=`<button class="pl-datepicker-cell${x?" pl-datepicker-selected":""}${p===h?" pl-datepicker-current":""}" type="button" data-year="${p}" tabindex="${p===o?0:-1}"${x?' 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),x=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,x.setAttribute("aria-selected",String(w||A&&!c)),x.classList.toggle("pl-datepicker-in-range",A),x.classList.toggle("pl-datepicker-preview",A&&!!c),x.classList.toggle("pl-datepicker-range-start",A&&G(m,l)),x.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:()=>Tt(s,t.shiftKey?-12:-1),PageDown:()=>Tt(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(fe,"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",fe);var me=class extends b{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.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(me,"defaults",{dual:!1,tooltip:!1,ticks:0,gap:0,prefix:"",suffix:"",output:""});v("range",me);var ki=".pl-form-icon, .pl-form-affix, .pl-input-group, .pl-form-floating, .pl-form-field";function as(r,t){r.value=t,r.dispatchEvent(new Event("input",{bubbles:!0})),r.dispatchEvent(new Event("change",{bubbles:!0}))}var ge=class extends b{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.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(ge,"defaults",{minRows:0,maxRows:0});v("autosize",ge);var Dt=class extends b{init(){let{el:t}=this;this.input=this.options.target?C(t,this.options.target)[0]:t.closest(ki)?.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(Dt,"defaults",{target:"",iconShow:"eye",iconHide:"eye-off",labelShow:null,labelHide:null}),d(Dt,"primary","target");v("password-toggle",Dt);var Ct=class extends b{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.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(Ct,"defaults",{max:0,target:"",warn:.9,template:"{count} / {max}"}),d(Ct,"primary","max");v("char-count",Ct);var Ot=class extends b{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(ki)?.querySelector('input:not([type="hidden"]), textarea')}clear(){let{input:t}=this;!t||t.disabled||t.readOnly||(as(t,""),t.focus(),this.emit("clear",{input:t}))}};d(Ot,"defaults",{target:""}),d(Ot,"primary","target");v("form-clear",Ot);function ls(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 be=class extends b{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?"":ls(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(be,"defaults",{live:!0,success:!1,shake:!0,focus:!0});v("form-validate",be);var U=[],Ai=!1,Li={left:"start",top:"start",right:"end",bottom:"end",start:"start",end:"end"};function hs(r){let[t,e]=String(r).trim().split("-");return["top","bottom","left","right"].includes(t)?Li[e]?`${t}-${Li[e]}`:t:"bottom-start"}function cs(){Ai||(Ai=!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 ye=class extends b{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=hs(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.isOpen||!o||o===document.body||t.contains(o)||this.toggleEl?.contains(o)||this.hide()})};this.on(t,"focusout",s),this.on(i,"focusout",s),cs(),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(ye,"defaults",{toggle:null,mode:null,pos:null,offset:null,delayShow:0,delayHide:220,closeOnClick:"auto",matchWidth:!1,flip:!0,shift:!0});v("drop",ye);var $i="pl-tooltip",ps=400,N=null,K=null,Fe=0,Ei=-1/0,Si=!1;function ds(r){return N||(N=document.createElement("div"),N.id=$i,N.setAttribute("role","tooltip"),N.className="pl-tooltip"),N.parentElement!==r&&r.appendChild(N),N}function us(){Si||(Si=!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 zt=class extends b{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()),us(),this.onDestroy(()=>this.hide(!0))}schedule(){clearTimeout(this.timer);let t=K||performance.now()-Ei<ps,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=ds(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,++Fe;let s=this.render();s.className=`pl-tooltip ${i.cls||""} ${t?"pl-tooltip-instant":""}`.trim(),s.classList.add("pl-open"),B(s),Mt(s,e,{placement:i.pos,offset:i.offset}),this.labelled||(this.describedBy=e.getAttribute("aria-describedby"),e.setAttribute("aria-describedby",[this.describedBy,$i].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),Ei=performance.now(),this.emit("hide"),t||!N){N?.classList.remove("pl-open","pl-leave"),N&&P(N);return}let i=++Fe;N.classList.add("pl-leave"),N.classList.remove("pl-open"),await D(N),i===Fe&&(N.classList.remove("pl-leave"),P(N),this.emit("hidden"))}};d(zt,"defaults",{title:"",pos:"top",offset:10,delay:120,cls:"",html:!1}),d(zt,"primary","title");v("tooltip",zt);var j=[],Ti=!1;function fs(){Ti||(Ti=!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 Nt=class extends b{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()}),fs(),this.onDestroy(()=>{this.teardown(),this.restoreTarget(),this.pop?.remove(),["aria-haspopup","aria-expanded","aria-controls"].forEach(o=>t.removeAttribute(o))})}onFocusOut(){setTimeout(()=>{let t=document.activeElement;!this.isOpen||this.el.contains(t)||this.pop?.contains(t)||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(Nt,"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(Nt,"primary","content");v("popover",Nt);var ve=new Set;function Di(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 b{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")||Ie(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")&&this.emit("beforeshow",{},!0)){this.options.stack||[...ve].filter(i=>i!==this&&!i.el.contains(e)).forEach(i=>i.hide()),e.isConnected||document.body.append(e),H(e,this.constructor.componentName)!==this&&ct(e),this.opener=t instanceof Element?t:document.activeElement,e.classList.remove("pl-closing"),e.open&&e.close(),this.state="open",ve.add(this),kt();try{e.showModal(),e.scrollTop=0,e.scrollLeft=0}catch(i){this.state="closed",ve.delete(this),dt(),console.error("[Plossy] modal:",i);return}e.classList.add("pl-open"),e.scrollTop=0,this.emit("show"),await Di([e,this.panel]),this.state==="open"&&this.emit("shown")}}hide(){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=Di([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,ve.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");function We(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 Ht=class extends Z{};d(Ht,"defaults",{...Z.defaults});v("modal",Ht);We("modal");var Re={},at=r=>String(r??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]);function Ci(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 Ht(s,{stack:!0,...i});return s.addEventListener("pl:hidden",a=>{a.target===s&&(n.destroy(),s.remove())}),n.show(),n}function je(r,t,e={},i=""){let{title:s="",html:o=!1,ok:n=Re.ok??y("modal.ok"),cancel:a=Re.cancel??y("modal.cancel"),tone:l="primary",cls:h="pl-modal-small pl-modal-center",placeholder:c="",type:p="text",...m}=e,x=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}">${x}</label>
52
- <input class="pl-input" id="${f}" type="${at(p)}" placeholder="${at(c)}" autocomplete="off" autofocus>`:`<div class="pl-modal-message">${x}</div>`,w=`
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=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[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=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[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=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[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
+ <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>`:""}
55
55
  <div class="pl-modal-body"${s?"":' style="padding-top: var(--pl-modal-px)"'}>${g}</div>
@@ -57,16 +57,16 @@
57
57
  ${u?`<button class="pl-button" type="button" data-pl-modal-close>${at(a)}</button>`:""}
58
58
  <button class="pl-button pl-button-${at(l)}" type="submit"${r==="prompt"?"":" autofocus"}>${at(n)}</button>
59
59
  </div>
60
- </form>`;return new Promise(A=>{let M=r==="confirm"?!1:r==="prompt"?null:void 0,_=Ci(w,{cls:h,...m}),R=_.el,X=R.querySelector("input");R.setAttribute("role",r==="prompt"?"dialog":"alertdialog"),s||R.setAttribute("aria-label",r==="alert"?"Komunikat":r==="confirm"?"Potwierdzenie":"Pytanie"),X&&(X.value=i??"",X.select()),R.querySelector("form").addEventListener("submit",I=>{I.preventDefault(),M=r==="confirm"?!0:r==="prompt"?X.value:void 0,_.hide()}),R.addEventListener("pl:hidden",I=>{I.target===R&&A(M)})})}Object.assign(O.modal,{dialog:Ci,alert:(r,t)=>je("alert",r,t),confirm:(r,t)=>je("confirm",r,t),prompt:(r,t="",e)=>je("prompt",r,e,t),labels:Re});var Oi=["left","right","top","bottom"],lt=class extends Z{setup(){let t=this.el,e=Oi.includes(this.options.side)?this.options.side:"left";this.side=e,Oi.forEach(i=>t.classList.toggle(`pl-offcanvas-${i}`,i===e)),t.classList.toggle("pl-offcanvas-no-overlay",!this.options.overlay),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&t.setAttribute("aria-label",y("offcanvas.label",{},t)),this.on(t,"click",i=>{if(!this.options.anchorClose)return;let s=i.target.closest('a[href^="#"]');s&&s.getAttribute("href").length>1&&!s.hasAttribute("data-pl-toggle")&&this.hide()}),this.bindSwipe()}bindSwipe(){if(!this.options.swipe||this.side!=="left"&&this.side!=="right")return;let t=this.side==="left"?-1:1,e=null,i=s=>{if(!e)return;let{bar:o,dx:n,active:a,startTime:l}=e;if(e=null,!a)return;let h=Math.abs(n)/Math.max(s.timeStamp-l,1),c=n*t>0&&(Math.abs(n)>o.offsetWidth*.35||Math.abs(n)>24&&h>.5);o.classList.remove("pl-dragging"),c&&s.type!=="pointercancel"?this.hide():(o.classList.add("pl-offcanvas-snap"),o.style.translate="0px 0px")};this.on(this.el,"pl:hidden",s=>{if(s.target!==this.el)return;let o=this.panel;o?.classList.remove("pl-offcanvas-snap","pl-dragging"),o?.style.removeProperty("translate")}),this.on(this.el,"pointerdown",s=>{let o=this.panel;s.pointerType!=="touch"||this.state!=="open"||!o?.contains(s.target)||(e={bar:o,x:s.clientX,y:s.clientY,dx:0,active:!1,startTime:s.timeStamp})}),this.on(this.el,"pointermove",s=>{if(!e)return;let o=s.clientX-e.x,n=s.clientY-e.y;if(!e.active){if(Math.abs(n)>10&&Math.abs(n)>Math.abs(o))return void(e=null);if(Math.abs(o)<10)return;e.active=!0,e.bar.classList.remove("pl-offcanvas-snap"),e.bar.classList.add("pl-dragging")}e.dx=o*t>0?o:o*.15,e.bar.style.translate=`${e.dx}px 0px`}),this.on(this.el,"pointerup",i),this.on(this.el,"pointercancel",i)}};d(lt,"defaults",{...Z.defaults,side:"left",overlay:!0,swipe:!0,anchorClose:!0}),d(lt,"primary","side"),d(lt,"panel",".pl-offcanvas-bar"),d(lt,"title",".pl-offcanvas-title");v("offcanvas",lt);We("offcanvas");var ms=["top-right","top-left","top-center","bottom-left","bottom-center","bottom-right"],gs=["primary","secondary","success","warning","danger","info"],bs={primary:"bell",success:"circle-check",warning:"triangle-alert",danger:"circle-x",info:"info"},Ve="cubic-bezier(0.33, 0.5, 0.2, 1)",ys=72,Ye={message:"",title:"",status:"",pos:"top-right",timeout:4e3,icon:null,close:!0,action:null,group:"",cls:"",html:!1,progress:!0,onClose:null},zi=new Map,Ue=new Set;function vs(){let r=[...document.querySelectorAll("dialog[open]")].filter(t=>t.matches(":modal"));return r[r.length-1]||document.body}function xs(r){let t=zi.get(r);t||(t=document.createElement("div"),t.className=`pl-notification pl-notification-${r}`,zi.set(r,t));let e=vs();if(t.parentElement!==e)e.appendChild(t),e!==document.body&&e.addEventListener("close",()=>{t.parentElement===e&&t.childElementCount&&(document.body.appendChild(t),B(t))},{once:!0});else try{t.matches(":popover-open")&&t.hidePopover()}catch{}return B(t),t}function ws(r){r.childElementCount||(P(r),r.remove())}var Ke=class{constructor(t){this.options=t,this.closed=!1,this.pauses=new Set,this.build(),this.mount()}build(){let{options:t}=this,e=t.status==="danger"||t.status==="warning",i=this.item=document.createElement("div");i.className="pl-notification-item";let s=this.el=document.createElement("div");s.className=["pl-notification-message",t.status&&`pl-notification-${t.status}`,t.cls,"pl-enter"].filter(Boolean).join(" "),s.setAttribute("role",e?"alert":"status"),s.setAttribute("aria-live",e?"assertive":"polite"),s.setAttribute("aria-atomic","true");let o=t.icon===!1?null:t.icon||bs[t.status];if(o){let l=document.createElement("span");l.className="pl-notification-icon",l.setAttribute("data-pl-icon",o),s.append(l)}let n=document.createElement("div");if(n.className="pl-notification-content",t.title){let l=document.createElement("div");l.className="pl-notification-title",l.textContent=String(t.title),n.append(l)}let a=this.textEl=document.createElement("div");if(a.className="pl-notification-text",t.html?a.innerHTML=String(t.message):a.textContent=String(t.message),t.message!==""&&n.append(a),t.action?.label){let l=document.createElement("button");l.type="button",l.className="pl-notification-action",l.textContent=String(t.action.label),l.addEventListener("click",()=>{t.action.onClick?.(this.handle)===!1||this.close()}),n.append(l)}if(s.append(n),t.close){let l=document.createElement("button");l.type="button",l.className="pl-close pl-notification-close",l.setAttribute("aria-label",y("notification.close")),l.addEventListener("click",()=>this.close()),s.append(l)}if(t.timeout>0){let l=this.bar=document.createElement("span");l.className="pl-notification-progress",l.setAttribute("aria-hidden","true"),t.progress||(l.hidden=!0),s.append(l)}i.append(s),s.addEventListener("pointerenter",l=>l.pointerType!=="touch"&&this.pause("hover")),s.addEventListener("pointerleave",()=>this.resume("hover")),s.addEventListener("focusin",()=>this.pause("focus")),s.addEventListener("focusout",()=>this.resume("focus")),s.addEventListener("keydown",l=>{l.key==="Escape"&&(l.stopPropagation(),this.close())}),this.bindSwipe(),this.handle={el:s,options:t,close:()=>this.close(),update:l=>{t.html?a.innerHTML=String(l):a.textContent=String(l),a.isConnected||n.append(a)}}}mount(){let{item:t,el:e,options:i}=this,s=this.container=xs(i.pos);if(i.pos.startsWith("top")?s.prepend(t):s.append(t),Ue.add(this),!S()){let o=getComputedStyle(t);t.animate([{height:"0px",paddingTop:"0px",paddingBottom:"0px"},{height:`${t.offsetHeight}px`,paddingTop:o.paddingTop,paddingBottom:o.paddingBottom}],{duration:280,easing:Ve})}D(e).then(()=>e.classList.remove("pl-enter")),this.bar&&(this.timer=this.bar.animate([{transform:"scaleX(1)"},{transform:"scaleX(0)"}],{duration:i.timeout,easing:"linear",fill:"forwards"}),this.timer.finished.then(()=>this.close()).catch(()=>{}))}pause(t){this.pauses.add(t),this.timer?.playState==="running"&&this.timer.pause()}resume(t){this.pauses.delete(t),!this.pauses.size&&!this.closed&&this.timer?.playState==="paused"&&this.timer.play()}bindSwipe(){let{el:t}=this,e=0,i=0,s=!1,o=null;t.addEventListener("pointerdown",a=>{a.button!==0||a.target.closest("button, a, input, [data-pl-no-swipe]")||this.closed||(o=a.pointerId,e=a.clientX,i=0,s=!1)}),t.addEventListener("pointermove",a=>{if(a.pointerId===o){if(i=a.clientX-e,!s){if(Math.abs(i)<6)return;s=!0,t.getAnimations().forEach(l=>l.finish()),t.classList.remove("pl-enter"),t.classList.add("pl-dragging");try{t.setPointerCapture(o)}catch{}this.pause("drag")}t.style.transform=`translateX(${i}px)`,t.style.opacity=String(Math.max(.25,1-Math.abs(i)/260))}});let n=a=>{if(a.pointerId!==o||(o=null,!s))return;if(s=!1,t.classList.remove("pl-dragging"),a.type==="pointerup"&&Math.abs(i)>ys){this.close(i);return}let l={transform:t.style.transform,opacity:t.style.opacity};t.style.transform="",t.style.opacity="",S()||t.animate([l,{transform:"translateX(0)",opacity:1}],{duration:260,easing:Ve}),this.resume("drag")};t.addEventListener("pointerup",n),t.addEventListener("pointercancel",n)}async close(t=0){if(this.closed)return;this.closed=!0,Ue.delete(this);let{item:e,el:i,container:s}=this;this.timer?.cancel();let o=S(),n=i.contains(document.activeElement);if(t&&!o?await i.animate([{transform:i.style.transform,opacity:i.style.opacity},{transform:`translateX(${Math.sign(t)*(i.offsetWidth+40)}px)`,opacity:0}],{duration:180,easing:"ease-in",fill:"forwards"}).finished.catch(()=>{}):(i.classList.remove("pl-enter"),i.classList.add("pl-leave"),await D(i)),!o&&e.isConnected){let a=getComputedStyle(e);await e.animate([{height:`${e.offsetHeight}px`,paddingTop:a.paddingTop,paddingBottom:a.paddingBottom},{height:"0px",paddingTop:"0px",paddingBottom:"0px"}],{duration:220,easing:Ve,fill:"forwards"}).finished.catch(()=>{})}n&&document.activeElement?.blur?.(),e.remove(),ws(s),this.options.onClose?.(this.handle),i.dispatchEvent(new CustomEvent("pl:hidden",{detail:{notification:this.handle}})),document.dispatchEvent(new CustomEvent("pl:notificationclose",{detail:{notification:this.handle}}))}};function xe(r,t){if(typeof document>"u")return{close(){}};let e=r!==null&&typeof r=="object"&&!(r instanceof Node)?r:{message:r,...t},i={...Ye,...e};return ms.includes(i.pos)||(i.pos=Ye.pos),gs.includes(i.status)||(i.status=""),i.timeout=Number(i.timeout)||0,i.message==null&&(i.message=""),new Ke(i).handle}xe.closeAll=r=>{[...Ue].forEach(t=>{(r==null||t.options.group===r)&&t.close()})};xe.defaults=Ye;var It=class extends b{init(){this.on(this.el,"click",t=>{this.el.matches("a")&&t.preventDefault(),this.show()})}show(){return this.emit("beforeshow",{},!0)?xe({...this.options}):null}};d(It,"defaults",{message:"",title:"",status:"",pos:"top-right",timeout:4e3,icon:null,close:!0,group:"",cls:"",progress:!0}),d(It,"primary","message");v("notification",It);O.notification=xe;var Ms=/\.(avif|bmp|gif|jpe?g|png|svg|webp)([?#].*)?$/i,ks=/\.(mp4|m4v|mov|ogv|webm)([?#].*)?$/i,Ni=/(?:youtube(?:-nocookie)?\.com\/(?:watch\?(?:.*&)?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/i,Hi=/vimeo\.com\/(?:video\/)?(\d+)/i,_e={previous:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m15 18-6-6 6-6"/></svg>',next:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg>',play:'<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M8 5.5v13a1 1 0 0 0 1.5.86l11-6.5a1 1 0 0 0 0-1.72l-11-6.5A1 1 0 0 0 8 5.5Z"/></svg>'},Ge=r=>new Promise(t=>setTimeout(t,r));function Ze(r="",t=""){return["image","video","iframe"].includes(t)?t:Ms.test(r)?"image":ks.test(r)?"video":Ni.test(r)||Hi.test(r)?"iframe":null}function As(r){let t=r.match(Ni);if(t)return`https://www.youtube-nocookie.com/embed/${t[1]}?autoplay=1&rel=0`;let e=r.match(Hi);return e?`https://player.vimeo.com/video/${e[1]}?autoplay=1`:r}function Xe(r,t=1200){let e=r.filter(Boolean).flatMap(i=>i.getAnimations());return e.length?Promise.race([Promise.allSettled(e.map(i=>i.finished)),Ge(t)]):Promise.resolve()}function Ls(){return getComputedStyle(document.documentElement).getPropertyValue("--pl-ease-spring").trim()||"ease-out"}function Es(r){return r.width>0&&r.height>0&&r.bottom>0&&r.right>0&&r.top<innerHeight&&r.left<innerWidth}var Me=class{constructor(t={}){let{items:e=[],index:i=0,emit:s=null,...o}=t;this.options={animation:"slide",loop:!0,thumbs:!1,counter:!0,...o},this.items=e.map(n=>typeof n=="string"?{source:n}:{...n}).map(n=>({...n,type:Ze(n.source,n.type)||"image"})),this.index=-1,this.start=i,this.state="closed",this.current=null,this.opener=null,this.emitter=s,this.el=null}emit(t,e={}){let i={index:this.index,item:this.items[this.index],panel:this,...e};if(this.emitter)return this.emitter(t,i);this.el?.dispatchEvent(new CustomEvent(`pl:${t}`,{bubbles:!0,detail:i}))}build(){let{thumbs:t,counter:e,animation:i}=this.options,s=this.items.length>1,o=document.createElement("dialog");o.className=`pl-lightbox pl-lightbox-${i==="fade"?"fade":"slide"}`,o.dataset.plTheme="dark",o.setAttribute("aria-label",y("lightbox.label",{},o)),o.setAttribute("aria-roledescription",y("lightbox.role",{},o)),o.innerHTML=`
60
+ </form>`;return new Promise(A=>{let M=r==="confirm"?!1:r==="prompt"?null:void 0,_=Ni(w,{cls:h,...m}),R=_.el,X=R.querySelector("input");R.setAttribute("role",r==="prompt"?"dialog":"alertdialog"),s||R.setAttribute("aria-label",r==="alert"?"Komunikat":r==="confirm"?"Potwierdzenie":"Pytanie"),X&&(X.value=i??"",X.select()),R.querySelector("form").addEventListener("submit",I=>{I.preventDefault(),M=r==="confirm"?!0:r==="prompt"?X.value:void 0,_.hide()}),R.addEventListener("pl:hidden",I=>{I.target===R&&A(M)})})}Object.assign(O.modal,{dialog:Ni,alert:(r,t)=>We("alert",r,t),confirm:(r,t)=>We("confirm",r,t),prompt:(r,t="",e)=>We("prompt",r,e,t),labels:Ve});var Hi=["left","right","top","bottom"],lt=class extends Z{setup(){let t=this.el,e=Hi.includes(this.options.side)?this.options.side:"left";this.side=e,Hi.forEach(i=>t.classList.toggle(`pl-offcanvas-${i}`,i===e)),t.classList.toggle("pl-offcanvas-no-overlay",!this.options.overlay),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&t.setAttribute("aria-label",y("offcanvas.label",{},t)),this.on(t,"click",i=>{if(!this.options.anchorClose)return;let s=i.target.closest('a[href^="#"]');s&&s.getAttribute("href").length>1&&!s.hasAttribute("data-pl-toggle")&&this.hide()}),this.bindSwipe()}bindSwipe(){if(!this.options.swipe||this.side!=="left"&&this.side!=="right")return;let t=this.side==="left"?-1:1,e=null,i=s=>{if(!e)return;let{bar:o,dx:n,active:a,startTime:l}=e;if(e=null,!a)return;let h=Math.abs(n)/Math.max(s.timeStamp-l,1),c=n*t>0&&(Math.abs(n)>o.offsetWidth*.35||Math.abs(n)>24&&h>.5);o.classList.remove("pl-dragging"),c&&s.type!=="pointercancel"?this.hide():(o.classList.add("pl-offcanvas-snap"),o.style.translate="0px 0px")};this.on(this.el,"pl:hidden",s=>{if(s.target!==this.el)return;let o=this.panel;o?.classList.remove("pl-offcanvas-snap","pl-dragging"),o?.style.removeProperty("translate")}),this.on(this.el,"pointerdown",s=>{let o=this.panel;s.pointerType!=="touch"||this.state!=="open"||!o?.contains(s.target)||(e={bar:o,x:s.clientX,y:s.clientY,dx:0,active:!1,startTime:s.timeStamp})}),this.on(this.el,"pointermove",s=>{if(!e)return;let o=s.clientX-e.x,n=s.clientY-e.y;if(!e.active){if(Math.abs(n)>10&&Math.abs(n)>Math.abs(o))return void(e=null);if(Math.abs(o)<10)return;e.active=!0,e.bar.classList.remove("pl-offcanvas-snap"),e.bar.classList.add("pl-dragging")}e.dx=o*t>0?o:o*.15,e.bar.style.translate=`${e.dx}px 0px`}),this.on(this.el,"pointerup",i),this.on(this.el,"pointercancel",i)}};d(lt,"defaults",{...Z.defaults,side:"left",overlay:!0,swipe:!0,anchorClose:!0}),d(lt,"primary","side"),d(lt,"panel",".pl-offcanvas-bar"),d(lt,"title",".pl-offcanvas-title");v("offcanvas",lt);Ye("offcanvas");var ys=["top-right","top-left","top-center","bottom-left","bottom-center","bottom-right"],vs=["primary","secondary","success","warning","danger","info"],xs={primary:"bell",success:"circle-check",warning:"triangle-alert",danger:"circle-x",info:"info"},Ue="cubic-bezier(0.33, 0.5, 0.2, 1)",ws=72,Ke={message:"",title:"",status:"",pos:"top-right",timeout:4e3,icon:null,close:!0,action:null,group:"",cls:"",html:!1,progress:!0,onClose:null},Ii=new Map,_e=new Set;function Ms(){let r=[...document.querySelectorAll("dialog[open]")].filter(t=>t.matches(":modal"));return r[r.length-1]||document.body}function ks(r){let t=Ii.get(r);t||(t=document.createElement("div"),t.className=`pl-notification pl-notification-${r}`,Ii.set(r,t));let e=Ms();if(t.parentElement!==e)e.appendChild(t),e!==document.body&&e.addEventListener("close",()=>{t.parentElement===e&&t.childElementCount&&(document.body.appendChild(t),B(t))},{once:!0});else try{t.matches(":popover-open")&&t.hidePopover()}catch{}return B(t),t}function As(r){r.childElementCount||(P(r),r.remove())}var Xe=class{constructor(t){this.options=t,this.closed=!1,this.pauses=new Set,this.build(),this.mount()}build(){let{options:t}=this,e=t.status==="danger"||t.status==="warning",i=this.item=document.createElement("div");i.className="pl-notification-item";let s=this.el=document.createElement("div");s.className=["pl-notification-message",t.status&&`pl-notification-${t.status}`,t.cls,"pl-enter"].filter(Boolean).join(" "),s.setAttribute("role",e?"alert":"status"),s.setAttribute("aria-live",e?"assertive":"polite"),s.setAttribute("aria-atomic","true");let o=t.icon===!1?null:t.icon||xs[t.status];if(o){let l=document.createElement("span");l.className="pl-notification-icon",l.setAttribute("data-pl-icon",o),s.append(l)}let n=document.createElement("div");if(n.className="pl-notification-content",t.title){let l=document.createElement("div");l.className="pl-notification-title",l.textContent=String(t.title),n.append(l)}let a=this.textEl=document.createElement("div");if(a.className="pl-notification-text",t.html?a.innerHTML=String(t.message):a.textContent=String(t.message),t.message!==""&&n.append(a),t.action?.label){let l=document.createElement("button");l.type="button",l.className="pl-notification-action",l.textContent=String(t.action.label),l.addEventListener("click",()=>{t.action.onClick?.(this.handle)===!1||this.close()}),n.append(l)}if(s.append(n),t.close){let l=document.createElement("button");l.type="button",l.className="pl-close pl-notification-close",l.setAttribute("aria-label",y("notification.close")),l.addEventListener("click",()=>this.close()),s.append(l)}if(t.timeout>0){let l=this.bar=document.createElement("span");l.className="pl-notification-progress",l.setAttribute("aria-hidden","true"),t.progress||(l.hidden=!0),s.append(l)}i.append(s),s.addEventListener("pointerenter",l=>l.pointerType!=="touch"&&this.pause("hover")),s.addEventListener("pointerleave",()=>this.resume("hover")),s.addEventListener("focusin",()=>this.pause("focus")),s.addEventListener("focusout",()=>this.resume("focus")),s.addEventListener("keydown",l=>{l.key==="Escape"&&(l.stopPropagation(),this.close())}),this.bindSwipe(),this.handle={el:s,options:t,close:()=>this.close(),update:l=>{t.html?a.innerHTML=String(l):a.textContent=String(l),a.isConnected||n.append(a)}}}mount(){let{item:t,el:e,options:i}=this,s=this.container=ks(i.pos);if(i.pos.startsWith("top")?s.prepend(t):s.append(t),_e.add(this),!S()){let o=getComputedStyle(t);t.animate([{height:"0px",paddingTop:"0px",paddingBottom:"0px"},{height:`${t.offsetHeight}px`,paddingTop:o.paddingTop,paddingBottom:o.paddingBottom}],{duration:280,easing:Ue})}D(e).then(()=>e.classList.remove("pl-enter")),this.bar&&(this.timer=this.bar.animate([{transform:"scaleX(1)"},{transform:"scaleX(0)"}],{duration:i.timeout,easing:"linear",fill:"forwards"}),this.timer.finished.then(()=>this.close()).catch(()=>{}))}pause(t){this.pauses.add(t),this.timer?.playState==="running"&&this.timer.pause()}resume(t){this.pauses.delete(t),!this.pauses.size&&!this.closed&&this.timer?.playState==="paused"&&this.timer.play()}bindSwipe(){let{el:t}=this,e=0,i=0,s=!1,o=null;t.addEventListener("pointerdown",a=>{a.button!==0||a.target.closest("button, a, input, [data-pl-no-swipe]")||this.closed||(o=a.pointerId,e=a.clientX,i=0,s=!1)}),t.addEventListener("pointermove",a=>{if(a.pointerId===o){if(i=a.clientX-e,!s){if(Math.abs(i)<6)return;s=!0,t.getAnimations().forEach(l=>l.finish()),t.classList.remove("pl-enter"),t.classList.add("pl-dragging");try{t.setPointerCapture(o)}catch{}this.pause("drag")}t.style.transform=`translateX(${i}px)`,t.style.opacity=String(Math.max(.25,1-Math.abs(i)/260))}});let n=a=>{if(a.pointerId!==o||(o=null,!s))return;if(s=!1,t.classList.remove("pl-dragging"),a.type==="pointerup"&&Math.abs(i)>ws){this.close(i);return}let l={transform:t.style.transform,opacity:t.style.opacity};t.style.transform="",t.style.opacity="",S()||t.animate([l,{transform:"translateX(0)",opacity:1}],{duration:260,easing:Ue}),this.resume("drag")};t.addEventListener("pointerup",n),t.addEventListener("pointercancel",n)}async close(t=0){if(this.closed)return;this.closed=!0,_e.delete(this);let{item:e,el:i,container:s}=this;this.timer?.cancel();let o=S(),n=i.contains(document.activeElement);if(t&&!o?await i.animate([{transform:i.style.transform,opacity:i.style.opacity},{transform:`translateX(${Math.sign(t)*(i.offsetWidth+40)}px)`,opacity:0}],{duration:180,easing:"ease-in",fill:"forwards"}).finished.catch(()=>{}):(i.classList.remove("pl-enter"),i.classList.add("pl-leave"),await D(i)),!o&&e.isConnected){let a=getComputedStyle(e);await e.animate([{height:`${e.offsetHeight}px`,paddingTop:a.paddingTop,paddingBottom:a.paddingBottom},{height:"0px",paddingTop:"0px",paddingBottom:"0px"}],{duration:220,easing:Ue,fill:"forwards"}).finished.catch(()=>{})}n&&document.activeElement?.blur?.(),e.remove(),As(s),this.options.onClose?.(this.handle),i.dispatchEvent(new CustomEvent("pl:hidden",{detail:{notification:this.handle}})),document.dispatchEvent(new CustomEvent("pl:notificationclose",{detail:{notification:this.handle}}))}};function we(r,t){if(typeof document>"u")return{close(){}};let e=r!==null&&typeof r=="object"&&!(r instanceof Node)?r:{message:r,...t},i={...Ke,...e};return ys.includes(i.pos)||(i.pos=Ke.pos),vs.includes(i.status)||(i.status=""),i.timeout=Number(i.timeout)||0,i.message==null&&(i.message=""),new Xe(i).handle}we.closeAll=r=>{[..._e].forEach(t=>{(r==null||t.options.group===r)&&t.close()})};we.defaults=Ke;var Pt=class extends x{init(){this.on(this.el,"click",t=>{this.el.matches("a")&&t.preventDefault(),this.show()})}show(){return this.emit("beforeshow",{},!0)?we({...this.options}):null}};d(Pt,"defaults",{message:"",title:"",status:"",pos:"top-right",timeout:4e3,icon:null,close:!0,group:"",cls:"",progress:!0}),d(Pt,"primary","message");v("notification",Pt);O.notification=we;var Ls=/\.(avif|bmp|gif|jpe?g|png|svg|webp)([?#].*)?$/i,Es=/\.(mp4|m4v|mov|ogv|webm)([?#].*)?$/i,Pi=/(?:youtube(?:-nocookie)?\.com\/(?:watch\?(?:.*&)?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/i,Bi=/vimeo\.com\/(?:video\/)?(\d+)/i,Ge={previous:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m15 18-6-6 6-6"/></svg>',next:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg>',play:'<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M8 5.5v13a1 1 0 0 0 1.5.86l11-6.5a1 1 0 0 0 0-1.72l-11-6.5A1 1 0 0 0 8 5.5Z"/></svg>'},Je=r=>new Promise(t=>setTimeout(t,r));function Qe(r="",t=""){return["image","video","iframe"].includes(t)?t:Ls.test(r)?"image":Es.test(r)?"video":Pi.test(r)||Bi.test(r)?"iframe":null}function Ss(r){let t=r.match(Pi);if(t)return`https://www.youtube-nocookie.com/embed/${t[1]}?autoplay=1&rel=0`;let e=r.match(Bi);return e?`https://player.vimeo.com/video/${e[1]}?autoplay=1`:r}function Ze(r,t=1200){let e=r.filter(Boolean).flatMap(i=>i.getAnimations());return e.length?Promise.race([Promise.allSettled(e.map(i=>i.finished)),Je(t)]):Promise.resolve()}function $s(){return getComputedStyle(document.documentElement).getPropertyValue("--pl-ease-spring").trim()||"ease-out"}function Ts(r){return r.width>0&&r.height>0&&r.bottom>0&&r.right>0&&r.top<innerHeight&&r.left<innerWidth}var ke=class{constructor(t={}){let{items:e=[],index:i=0,emit:s=null,...o}=t;this.options={animation:"slide",loop:!0,thumbs:!1,counter:!0,...o},this.items=e.map(n=>typeof n=="string"?{source:n}:{...n}).map(n=>({...n,type:Qe(n.source,n.type)||"image"})),this.index=-1,this.start=i,this.state="closed",this.current=null,this.opener=null,this.emitter=s,this.el=null}emit(t,e={}){let i={index:this.index,item:this.items[this.index],panel:this,...e};if(this.emitter)return this.emitter(t,i);this.el?.dispatchEvent(new CustomEvent(`pl:${t}`,{bubbles:!0,detail:i}))}build(){let{thumbs:t,counter:e,animation:i}=this.options,s=this.items.length>1,o=document.createElement("dialog");o.className=`pl-lightbox pl-lightbox-${i==="fade"?"fade":"slide"}`,o.dataset.plTheme="dark",o.setAttribute("aria-label",y("lightbox.label",{},o)),o.setAttribute("aria-roledescription",y("lightbox.role",{},o)),o.innerHTML=`
61
61
  <div class="pl-lightbox-backdrop"></div>
62
62
  <div class="pl-lightbox-toolbar">
63
63
  ${e&&s?'<span class="pl-lightbox-counter" aria-live="polite"></span>':""}
64
64
  <button class="pl-close pl-lightbox-close" type="button" aria-label="${y("close",{},o)}"></button>
65
65
  </div>
66
66
  <div class="pl-lightbox-stage"></div>
67
- ${s?`<button class="pl-lightbox-nav pl-lightbox-previous pl-slidenav-previous" type="button" aria-label="${y("previous",{},o)}">${_e.previous}</button>
68
- <button class="pl-lightbox-nav pl-lightbox-next pl-slidenav-next" type="button" aria-label="${y("next",{},o)}">${_e.next}</button>`:""}
67
+ ${s?`<button class="pl-lightbox-nav pl-lightbox-previous pl-slidenav-previous" type="button" aria-label="${y("previous",{},o)}">${Ge.previous}</button>
68
+ <button class="pl-lightbox-nav pl-lightbox-next pl-slidenav-next" type="button" aria-label="${y("next",{},o)}">${Ge.next}</button>`:""}
69
69
  <div class="pl-lightbox-footer">
70
70
  <div class="pl-lightbox-caption"></div>
71
71
  ${t&&s?`<div class="pl-lightbox-thumbs" role="tablist" aria-label="${y("lightbox.thumbs",{},o)}"></div>`:""}
72
- </div>`,this.el=o,this.stage=o.querySelector(".pl-lightbox-stage"),this.counter=o.querySelector(".pl-lightbox-counter"),this.caption=o.querySelector(".pl-lightbox-caption"),this.thumbs=o.querySelector(".pl-lightbox-thumbs"),this.prevButton=o.querySelector(".pl-lightbox-previous"),this.nextButton=o.querySelector(".pl-lightbox-next"),this.thumbs&&this.items.forEach((n,a)=>{let l=document.createElement("button");l.type="button",l.className="pl-lightbox-thumb",l.setAttribute("role","tab"),l.setAttribute("aria-label",`${y("lightbox.item",{n:a+1},this.el)}${n.caption?`: ${n.caption}`:""}`);let h=n.thumb||(n.type==="image"?n.source:"");if(h){let c=document.createElement("img");c.src=h,c.alt="",c.loading="lazy",c.draggable=!1,l.append(c)}else l.innerHTML=_e.play;l.addEventListener("click",()=>this.go(a)),this.thumbs.append(l)}),o.addEventListener("click",n=>{if(this.swiped)return void(this.swiped=!1);let a=n.target;if(a.closest(".pl-lightbox-close"))return void this.hide();if(a.closest(".pl-lightbox-previous"))return void this.prev();if(a.closest(".pl-lightbox-next"))return void this.next();a.closest(".pl-lightbox-media, .pl-lightbox-error, .pl-lightbox-thumbs, .pl-lightbox-caption, button, a")||this.hide()}),o.addEventListener("keydown",n=>{if(n.defaultPrevented)return;let a=n.target.matches?.("video, input, textarea, select"),h={Escape:()=>this.hide(),ArrowLeft:()=>!a&&this.prev(),ArrowRight:()=>!a&&this.next(),Home:()=>!a&&this.go(0),End:()=>!a&&this.go(this.items.length-1)}[n.key];!h||a&&n.key!=="Escape"||(n.preventDefault(),h())}),o.addEventListener("cancel",n=>{n.preventDefault(),this.hide()}),o.addEventListener("close",()=>{this.state!=="closed"&&this.finish()}),this.onResize=()=>this.stage.querySelectorAll("[data-fit]").forEach(n=>this.fit(n)),window.addEventListener("resize",this.onResize,{passive:!0}),this.bindSwipe()}bindSwipe(){let t=this.stage,e=null;t.addEventListener("pointerdown",s=>{this.swiped=!1,!(s.pointerType==="mouse"||s.target.closest("video, iframe, button"))&&(e={x:s.clientX,y:s.clientY,dx:0,dy:0,axis:null,item:this.current})}),t.addEventListener("pointermove",s=>{if(!(!e||!e.item)){if(e.dx=s.clientX-e.x,e.dy=s.clientY-e.y,!e.axis){if(Math.hypot(e.dx,e.dy)<10)return;e.axis=Math.abs(e.dx)>Math.abs(e.dy)?"x":"y",e.item.classList.remove("pl-lightbox-snap","pl-lightbox-enter","pl-lightbox-first")}if(e.axis==="x"){let o=this.target(this.index+(e.dx<0?1:-1))===null;e.item.style.translate=`${e.dx*(o?.25:1)}px 0px`}else e.item.style.translate=`0px ${e.dy}px`,e.item.style.opacity=String(Math.max(.3,1-Math.abs(e.dy)/400))}});let i=s=>{if(!e)return;let{dx:o,dy:n,axis:a,item:l}=e;if(e=null,!a||!l)return;this.swiped=!0,setTimeout(()=>this.swiped=!1,350);let h=s.type==="pointercancel";if(!h&&a==="x"&&Math.abs(o)>56&&this.target(this.index+(o<0?1:-1))!==null)return void(o<0?this.next():this.prev());if(!h&&a==="y"&&Math.abs(n)>90)return void this.hide();l.classList.add("pl-lightbox-snap"),l.style.translate="0px 0px",l.style.opacity=""};t.addEventListener("pointerup",i),t.addEventListener("pointercancel",i)}target(t){let e=this.items.length;return e?this.options.loop&&e>1?(t%e+e)%e:t<0||t>=e?null:t:null}render(t){let e=document.createElement("div");e.className="pl-lightbox-item pl-loading",e.dataset.type=t.type;let i=document.createElement("div");i.className="pl-lightbox-spinner",i.setAttribute("role","status"),i.setAttribute("aria-label",y("loading",{},this.el));let s=()=>{e.classList.remove("pl-loading"),i.remove()},o=()=>{s();let a=document.createElement("div");a.className="pl-lightbox-error",a.textContent=y("lightbox.error",{},this.el),e.querySelector(".pl-lightbox-media")?.replaceWith(a)},n;if(t.type==="video")n=document.createElement("video"),n.controls=!0,n.playsInline=!0,n.preload="metadata",t.poster&&(n.poster=t.poster),n.addEventListener("loadedmetadata",s,{once:!0}),n.addEventListener("error",o,{once:!0}),n.src=t.source;else if(t.type==="iframe")n=document.createElement("iframe"),n.allow="autoplay; fullscreen; picture-in-picture; encrypted-media",n.allowFullscreen=!0,n.title=t.caption||y("lightbox.embed",{},this.el),n.addEventListener("load",s,{once:!0}),n.src=As(t.source);else{n=document.createElement("img"),n.alt=t.alt||t.caption||"",n.draggable=!1;let a=/\.svg([?#].*)?$/i.test(t.source);n.addEventListener("load",()=>{a&&this.fit(e),s()},{once:!0}),n.addEventListener("error",o,{once:!0}),a&&(e.dataset.fit=""),n.src=t.source,n.complete&&n.naturalWidth&&s()}return n.classList.add("pl-lightbox-media"),e.append(i,n),e}fit(t){let e=t.querySelector("img.pl-lightbox-media");if(!e?.naturalWidth||!e.naturalHeight)return;let i=getComputedStyle(t),s=t.clientWidth-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight),o=t.clientHeight-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom);if(s<=0||o<=0)return;let n=e.naturalWidth/e.naturalHeight,a=Math.min(s,o*n,1600);e.style.width=`${Math.round(a)}px`,e.style.height=`${Math.round(a/n)}px`}preload(t){let e=this.items[this.target(t)??-1];!e||e.type!=="image"||e.preloaded||(e.preloaded=!0,new Image().src=e.source)}go(t,e,i=!1){if(t=this.target(t),t===null||this.state==="closed"||this.state==="closing"||t===this.index&&this.current)return;let s=this.items.length,o=this.index;e===void 0&&(e=t>o?1:-1,this.options.loop&&s>2&&Math.abs(t-o)===s-1&&(e=-e));let n=this.current,a=this.items[t],l=this.render(a);if(l.style.setProperty("--pl-lightbox-dir",String(e)),i||l.classList.add("pl-lightbox-enter"),this.stage.append(l),this.current=l,this.index=t,n&&(n.querySelectorAll("video").forEach(h=>h.pause()),n.style.setProperty("--pl-lightbox-dir",String(e)),n.classList.remove("pl-lightbox-enter","pl-lightbox-first","pl-lightbox-snap"),n.classList.add("pl-lightbox-leave"),n.setAttribute("aria-hidden","true"),Xe([n],800).then(()=>n.remove())),this.counter&&(this.counter.innerHTML=`<b>${t+1}</b> / ${s}`),this.caption.textContent=a.caption||"",this.thumbs){[...this.thumbs.children].forEach((c,p)=>{c.classList.toggle("pl-active",p===t),c.setAttribute("aria-selected",String(p===t))});let h=this.thumbs.children[t];if(h){let c=h.offsetLeft-(this.thumbs.clientWidth-h.offsetWidth)/2;this.thumbs.scrollTo({left:c,behavior:i||S()?"auto":"smooth"})}}return this.prevButton&&(this.prevButton.disabled=this.target(t-1)===null),this.nextButton&&(this.nextButton.disabled=this.target(t+1)===null),this.preload(t+1),this.preload(t-1),this.emit("itemshow"),l}next(){this.go(this.index+1,1)}prev(){this.go(this.index-1,-1)}origin(t){let e=this.items[t]?.el;return e?.querySelector?.("img, picture, video")||e||null}flipFrames(t,e){let i=e.getBoundingClientRect(),s=t.getBoundingClientRect();if(!Es(i)||!s.width||!s.height)return null;let o=Math.max(i.width/s.width,i.height/s.height),n=i.left+i.width/2-(s.left+s.width/2),a=i.top+i.height/2-(s.top+s.height/2),l=Math.max(0,(s.width-i.width/o)/2),h=Math.max(0,(s.height-i.height/o)/2),c=(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0)/o,p=parseFloat(getComputedStyle(t).borderTopLeftRadius)||0;return[{transform:`translate(${n}px, ${a}px) scale(${o})`,clipPath:`inset(${h}px ${l}px round ${c}px)`},{transform:"translate(0px, 0px) scale(1)",clipPath:`inset(0px 0px round ${p}px)`}]}async zoomIn(t,e){let i=t.querySelector("img.pl-lightbox-media");if(!i||!e||S()||(t.classList.add("pl-lightbox-pending"),await Promise.race([i.decode?.().catch(()=>{})??Ge(0),Ge(280)]),t.classList.remove("pl-lightbox-pending"),!i.complete||!i.naturalWidth||this.current!==t||this.state!=="open"))return!1;t.classList.remove("pl-loading"),"fit"in t.dataset&&this.fit(t);let s=this.flipFrames(i,e);if(!s)return!1;let o={duration:560,easing:Ls(),fill:"backwards"};try{i.animate(s,o)}catch{i.animate(s,{...o,easing:"cubic-bezier(0.33, 0.5, 0.2, 1)"})}return!0}zoomOut(){let t=this.current,e=t?.querySelector("img.pl-lightbox-media"),i=this.origin(this.index);if(!e||!i?.isConnected||!e.naturalWidth||S()||t.style.translate)return!1;let s=this.flipFrames(e,i);return s?(this.el.classList.add("pl-lightbox-zooming"),e.animate(s.reverse(),{duration:300,easing:"cubic-bezier(0.3, 0, 0.2, 1)",fill:"forwards"}),!0):!1}async show(t=this.start){if(this.state!=="closed"||!this.items.length)return this;this.el||this.build();let e=this.el;t=this.target(t)??0,this.opener=document.activeElement,document.body.append(e),kt(),this.state="open";try{e.showModal()}catch(o){return console.error("[Plossy] lightbox:",o),this.finish(),this}let i=this.go(t,1,!0);return this.emit("show"),!(i&&await this.zoomIn(i,this.items[t].el?this.origin(t):null))&&i?.isConnected&&this.state==="open"&&i.classList.add("pl-lightbox-first"),i&&await Xe([i,i.querySelector(".pl-lightbox-media")]),this.state==="open"&&this.emit("shown"),this}hide(){if(this.state!=="open")return this.closing||Promise.resolve();this.state="closing",this.emit("hide"),this.zoomOut(),this.el.classList.add("pl-closing");let t=this.current;return this.closing=Xe([this.el.querySelector(".pl-lightbox-backdrop"),t,t?.querySelector(".pl-lightbox-media")]).then(()=>this.finish()),this.closing}finish(){if(this.state==="closed")return;let t=this.index,e=this.items[t];this.state="closed",this.closing=null;let i=this.el;i&&(i.querySelectorAll("video").forEach(o=>o.pause()),i.open&&i.close()),window.removeEventListener("resize",this.onResize),dt();let s=e?.el?.isConnected?e.el:this.opener;s?.isConnected&&s!==document.body&&s.focus?.({preventScroll:!0}),this.emit("hidden",{index:t,item:e}),i?.remove(),this.el=null,this.current=null,this.index=-1}destroy(){this.finish()}},we=class extends b{init(){this.panel=null,this.on(this.el,"click",t=>{if(t.defaultPrevented||t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=t.target.closest("a[href]");if(!e)return;let i=this.links.indexOf(e);i<0||(t.preventDefault(),this.show(i))}),this.onDestroy(()=>this.panel?.destroy())}get links(){return(this.el.matches("a[href]")?[this.el]:T("a[href]",this.el)).filter(e=>!e.closest("[data-pl-lightbox-ignore]")&&Ze(e.getAttribute("href"),e.dataset.type))}get items(){return this.links.map(t=>{let e=t.querySelector("img"),i=t.getAttribute("href");return{source:i,type:Ze(i,t.dataset.type),caption:t.dataset.caption??(e?.alt||t.title||""),alt:e?.alt||t.dataset.alt||"",thumb:t.dataset.thumb||e?.currentSrc||e?.src||"",poster:t.dataset.poster||"",el:t}})}get index(){return this.panel?.index??-1}show(t=0){if(this.panel&&this.panel.state!=="closed")return this.panel.go(t),Promise.resolve(this.panel);let e=this.items;return e.length?(this.panel=new Me({...this.options,items:e,index:t,emit:(i,s)=>this.emit(i,s)}),this.panel.show(t)):Promise.resolve(null)}hide(){return this.panel?.hide()??Promise.resolve()}next(){this.panel?.next()}prev(){this.panel?.prev()}};d(we,"defaults",{animation:"slide",loop:!0,thumbs:!1,counter:!0});v("lightbox",we);O.lightboxPanel=(r={})=>{let t=new Me(r);return t.show(r.index??0),t};var Ss={s:640,m:960,l:1200,xl:1600};function $s(r){return r===!1||r===null||r===void 0||r===""?null:(typeof r=="string"&&r.startsWith("@")&&(r=Ss[r.slice(1)]??0),typeof r=="number"||/^\d+$/.test(r)?matchMedia(`(min-width: ${r}px)`):matchMedia(r))}var ft=(r,t,e,i=!1)=>{let s=new CustomEvent(`pl:${t}`,{bubbles:!0,cancelable:i,detail:e});return r.dispatchEvent(s),!s.defaultPrevented},Pt=class extends b{init(){let{el:t,options:e}=this;this.media=$s(e.media),this.hoverTimer=0,this.busy=!1;let i=String(e.mode).split(",").map(o=>o.trim());if(t.matches("button, a[href], input, summary")||(t.setAttribute("role","button"),t.hasAttribute("tabindex")||(t.tabIndex=0),this.on(t,"keydown",o=>{o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),this.toggle())})),this.on(t,"click",o=>{this.enabled&&((t.matches('a[href^="#"]')||this.targets.length)&&o.preventDefault(),!(i.includes("hover")&&!i.includes("click")&&o.pointerType==="mouse")&&this.toggle())}),i.includes("hover")){let o=a=>{a.pointerType!=="mouse"||!this.enabled||(clearTimeout(this.hoverTimer),this.isToggled()||this.toggle())},n=a=>{a.pointerType!=="mouse"||!this.enabled||(clearTimeout(this.hoverTimer),this.hoverTimer=setTimeout(()=>{![t,...this.targets].some(h=>h.matches(":hover"))&&this.isToggled()&&this.toggle()},160))};this.on(t,"pointerenter",o),this.on(t,"pointerleave",n),this.on(document,"pointerout",a=>{let l=this.targets.find(h=>h.contains(a.target));l&&!l.contains(a.relatedTarget)&&n(a)}),this.onDestroy(()=>clearTimeout(this.hoverTimer))}let s=o=>{o.detail?.component!==this&&this.targets.includes(o.target)&&queueMicrotask(()=>this.sync())};for(let o of["pl:show","pl:shown","pl:hide","pl:hidden"])this.on(document,o,s);this.on(document,"close",s,!0),this.sync()}get enabled(){return!this.media||this.media.matches}get targets(){let{el:t,options:e}=this,i=e.target;if(!i){let s=t.getAttribute("href");i=s&&s.length>1&&s.startsWith("#")?s:"next"}return C(t,i)}overlay(t){for(let e of["modal","offcanvas"])if(t.hasAttribute(`data-pl-${e}`))return H(t,e)||O[e]?.(t)||null;return H(t,"modal")||H(t,"offcanvas")}shown(t){return this.overlay(t)?t.matches("dialog")?t.open:t.classList.contains("pl-open"):this.options.cls?this.classes.every(e=>t.classList.contains(e)):!t.hidden}get classes(){return String(this.options.cls).split(/[\s,]+/).filter(Boolean)}isToggled(){return this.targets.some(t=>this.shown(t))}sync(){let t=this.targets;if(!t.length)return;let e=t.some(i=>this.shown(i));this.el.setAttribute("aria-expanded",String(e)),this.el.setAttribute("aria-controls",t.map(i=>i.id||(i.id=k("pl-toggle"))).join(" ")),this.el.classList.toggle("pl-active",e)}async toggle(){let t=this.targets;if(!(!t.length||this.busy)){if(this.options.queued&&t.length>1){let e=t.findIndex(s=>this.shown(s)),i=t[(e+1)%t.length];this.busy=!0;try{e>-1&&await this.set(t[e],!1),await this.set(i,!0)}finally{this.busy=!1}}else await Promise.all(t.map(e=>this.set(e,!this.shown(e))));this.sync()}}async set(t,e){let i=this.overlay(t);if(i){typeof i.toggle=="function"&&i.toggle(this.el);return}let s={component:this,toggle:this.el};if(!ft(t,e?"beforeshow":"beforehide",s,!0))return;let{cls:o,animation:n,duration:a}=this.options;if(o)this.classes.forEach(l=>t.classList.toggle(l,e)),ft(t,e?"show":"hide",s),this.syncState(e),await D(t);else if(n===!0)ft(t,e?"show":"hide",s),this.syncState(e),await J(t,e,{duration:a});else if(n&&!S()){let[l,h]=String(n).split(",").map(c=>c.trim().split(/\s+/).filter(Boolean));if(ft(t,e?"show":"hide",s),this.syncState(e),e)t.hidden=!1,t.classList.add(...l),await D(t),t.classList.remove(...l);else{let c=h?.length?h:[...l,"pl-animation-reverse"];t.classList.add(...c),await D(t),t.hidden=!0,t.classList.remove(...c)}}else t.hidden=!e,ft(t,e?"show":"hide",s);ft(t,e?"shown":"hidden",s)}syncState(t){this.el.setAttribute("aria-expanded",String(t)),this.el.classList.toggle("pl-active",t)}};d(Pt,"defaults",{target:null,cls:"",animation:!1,mode:"click",queued:!1,media:!1,duration:360}),d(Pt,"primary","target");v("toggle",Pt);var Ts=".pl-nav-header, .pl-nav-divider, .pl-tab-indicator, [hidden]",Bt=class extends b{init(){let{el:t,options:e}=this;this.current=-1,this.token=0;let i=this.items,s=i.findIndex(o=>o.classList.contains("pl-active"));if(typeof e.active=="number"&&(s=e.active),e.followHash){let o=this.indexFromHash();o>-1&&(s=o)}if((s<0||!i[s]||this.disabled(i[s]))&&(s=i.findIndex(o=>!this.disabled(o))),this.on(t,"click",o=>{let n=this.itemOf(o.target);n&&(o.target.closest("a")&&o.preventDefault(),!this.disabled(n)&&this.show(this.items.indexOf(n)))}),this.on(t,"keydown",o=>this.onKeydown(o)),this.on(document,"click",o=>{let n=o.target.closest?.("[data-pl-switcher-item]");if(!n||!this.containerOf(n))return;o.preventDefault();let l=n.getAttribute("data-pl-switcher-item");this.show(/^\d+$/.test(l)?Number(l):l)}),e.swiping&&this.bindSwipe(),e.followHash&&this.on(window,"hashchange",()=>{let o=this.indexFromHash();o>-1&&this.show(o)}),this.updateIndicator=z(()=>this.setIndicator()),typeof ResizeObserver=="function"){let o=new ResizeObserver(this.updateIndicator);o.observe(t),i.forEach(n=>o.observe(n)),this.onDestroy(()=>o.disconnect())}this.on(window,"resize",this.updateIndicator,{passive:!0}),document.fonts?.ready.then(()=>this.setIndicator()).catch(()=>{}),this.activate(s,!1),requestAnimationFrame(()=>{this.setIndicator(),requestAnimationFrame(()=>t.classList.add("pl-switcher-ready"))})}get items(){let{el:t,options:e}=this,i;return e.toggle?i=C(t,e.toggle).filter(s=>t.contains(s)):(i=T(":scope > li",t),i.length||(i=[...t.children])),i.filter(s=>!s.matches(Ts))}get containers(){let{el:t,options:e}=this;if(e.connect)return C(t,e.connect);let i=t.nextElementSibling;for(;i&&!i.classList.contains("pl-switcher");)i=i.nextElementSibling;return i?[i]:[]}get index(){return this.current}get vertical(){let{el:t}=this;return t.matches(".pl-tab-left, .pl-tab-right, .pl-nav")?!0:getComputedStyle(t).flexDirection.startsWith("column")}tabOf(t){return t.matches("a, button")?t:t.querySelector("a, button")||t}itemOf(t){return this.items.find(e=>e.contains(t))||null}disabled(t){return t.classList.contains("pl-disabled")||this.tabOf(t).matches(':disabled, [aria-disabled="true"]')}containerOf(t){return this.containers.find(e=>{if(!e.contains(t))return!1;let i=t.closest(".pl-switcher");return!e.classList.contains("pl-switcher")||i===e})||null}indexFromHash(){let t=decodeURIComponent(location.hash);if(t.length<2)return-1;let i=this.items.findIndex(s=>this.tabOf(s).getAttribute("href")===t);if(i>-1)return i;for(let s of this.containers){let o=[...s.children].findIndex(n=>`#${n.id}`===t);if(o>-1)return o}return-1}onKeydown(t){let e=this.itemOf(t.target);if(!e||t.target!==this.tabOf(e))return;let i=this.items.filter(c=>!this.disabled(c)),s=i.indexOf(e);if(s<0)return;let o=this.vertical,n=getComputedStyle(this.el).direction==="rtl",a=o?"ArrowUp":n?"ArrowRight":"ArrowLeft",l=o?"ArrowDown":n?"ArrowLeft":"ArrowRight",h;t.key===l?h=i[(s+1)%i.length]:t.key===a?h=i[(s-1+i.length)%i.length]:t.key==="Home"?h=i[0]:t.key==="End"?h=i[i.length-1]:(t.key==="Enter"||t.key===" ")&&!t.target.matches("button")&&(h=e),h&&(t.preventDefault(),this.show(this.items.indexOf(h)),this.tabOf(h).focus())}bindSwipe(){let t=0,e=0,i=null;this.on(document,"touchstart",s=>{i=s.touches.length===1?this.containerOf(s.target):null,i&&(t=s.touches[0].clientX,e=s.touches[0].clientY)},{passive:!0}),this.on(document,"touchend",s=>{if(!i)return;i=null;let o=s.changedTouches[0],n=o.clientX-t,a=o.clientY-e;if(Math.abs(n)<48||Math.abs(n)<Math.abs(a)*1.5)return;let l=this.items,h=this.current;do h+=n<0?1:-1;while(l[h]&&this.disabled(l[h]));l[h]&&this.show(h)},{passive:!0})}resolve(t){let e=this.items;if(t==="next"||t==="previous"){let i=t==="next"?1:-1,s=this.current;for(let o=0;o<e.length;o++)if(s=(s+i+e.length)%e.length,!this.disabled(e[s]))return s;return-1}return t instanceof Element?e.findIndex(i=>i===t||i.contains(t)):(t=Number(t),Number.isInteger(t)&&e[t]?t:-1)}show(t){t=this.resolve(t),!(t<0||t===this.current)&&this.emit("beforeshow",{index:t,item:this.items[t]},!0)&&this.activate(t,!0)}activate(t,e){let{el:i,options:s}=this,o=this.items,n=this.current,a=n<0||t>n;if(this.current=t,o.length&&o.every(f=>this.tabOf(f)!==f||f.matches("a, button"))){i.setAttribute("role","tablist"),this.vertical?i.setAttribute("aria-orientation","vertical"):i.removeAttribute("aria-orientation");for(let f of i.children)!o.includes(f)&&!f.hasAttribute("role")&&f.setAttribute("role","presentation")}let h=this.containers;o.forEach((f,u)=>{let g=this.tabOf(f),w=u===t;f.classList.toggle("pl-active",w),g!==f&&f.setAttribute("role","presentation"),g.setAttribute("role","tab"),g.setAttribute("aria-selected",String(w)),g.tabIndex=w?0:-1,g.id||(g.id=k("pl-tab")),this.disabled(f)&&g.setAttribute("aria-disabled","true");let A=h[0]?.children[u];A&&g.setAttribute("aria-controls",A.id||(A.id=k("pl-panel")))});let c=++this.token,{signal:p}=this,m={index:t,previous:n,item:o[t]};e&&n>-1&&this.emit("hide",{index:n,item:o[n]});let x=[];for(let f of h)[...f.children].forEach((u,g)=>{let w=g===t,A=u.classList.contains("pl-active");u.classList.toggle("pl-active",w),u.setAttribute("role","tabpanel");let M=o[g]&&this.tabOf(o[g]);M&&u.setAttribute("aria-labelledby",M.id),w&&!A&&e&&x.push(this.animateIn(u,a))});if(this.setIndicator(),!!e){if(n>-1&&this.emit("hidden",{index:n,item:o[n]}),this.emit("show",m),s.followHash){let f=h[0]?.children[t],u=this.tabOf(o[t]).getAttribute("href"),g=u&&u.length>1&&u.startsWith("#")?u:f?.id?`#${f.id}`:"";g&&g!==location.hash&&history.replaceState(null,"",g)}Promise.all(x).then(()=>{!p.aborted&&c===this.token&&this.emit("shown",m)})}}async animateIn(t,e){let{animation:i}=this.options;if(!i||S())return;let s;if(i===!0)s=["pl-switcher-enter"],t.style.setProperty("--pl-switcher-dir",e?"1":"-1");else{let[n,a]=String(i).split(",").map(l=>l.trim().split(/\s+/).filter(Boolean));s=e||!a?.length?n:a}let o=(t.dataset.plSwitcherAnim||"").split(" ").filter(Boolean);t.classList.remove(...o),t.offsetWidth,t.classList.add(...s),t.dataset.plSwitcherAnim=s.join(" "),await D(t),t.dataset.plSwitcherAnim===s.join(" ")&&t.classList.contains("pl-active")?(t.classList.remove(...s),delete t.dataset.plSwitcherAnim):t.classList.contains("pl-active")||t.classList.remove(...s)}setIndicator(){let{el:t}=this,e=this.items[this.current];if(!e||!t.isConnected)return;let i=t.getBoundingClientRect(),s=e.getBoundingClientRect();if(!i.width&&!i.height)return;let o=t.offsetWidth?i.width/t.offsetWidth:1,n=t.offsetHeight?i.height/t.offsetHeight:1,a=(s.left-i.left)/(o||1)-t.clientLeft+t.scrollLeft,l=(s.top-i.top)/(n||1)-t.clientTop+t.scrollTop,h=(c,p)=>t.style.setProperty(`--pl-indicator-${c}`,`${Math.round(p*100)/100}px`);h("x",a),h("y",l),h("w",e.offsetWidth),h("h",e.offsetHeight)}};d(Bt,"defaults",{connect:null,toggle:null,active:null,animation:!0,swiping:!0,followHash:!1}),d(Bt,"primary","connect");v("switcher",Bt);var Ii={linear:r=>r,"ease-in":r=>r*r*r,"ease-out":r=>1-(1-r)**4,"ease-in-out":r=>r<.5?8*r**4:1-(-2*r+2)**4/2,spring:r=>1+2.2*(r-1)**3+1.2*(r-1)**2},Je=new WeakMap;function Qe(r){let t=document.scrollingElement||document.documentElement;for(let e=r?.parentElement;e&&e!==document.body&&e!==t;e=e.parentElement){let{overflowY:i}=getComputedStyle(e);if((i==="auto"||i==="scroll")&&e.scrollHeight>e.clientHeight)return e}return t}function ke(r,t={}){let{offset:e=0,duration:i="auto",easing:s="ease-in-out"}=t,o=document.scrollingElement||document.documentElement,n=typeof r=="number"?null:E(r);if(typeof r!="number"&&!n)return Promise.resolve(!1);let a=E(t.container)||(n?Qe(n):o),l=a===o,h=a.scrollTop,c;if(n){let u=l?0:a.getBoundingClientRect().top+a.clientTop;c=h+n.getBoundingClientRect().top-u-e}else c=r-e;let p=l?window.innerHeight:a.clientHeight;c=$(Math.round(c),0,Math.max(0,a.scrollHeight-p)),Je.get(a)?.(!1);let m=c-h,x=i==="auto"||i===null?$(Math.abs(m)*.45,280,1100):Number(i)||0,f=typeof s=="function"?s:Ii[s]||Ii["ease-in-out"];return!m||!x||S()?(a.scrollTop=c,Promise.resolve(!0)):new Promise(u=>{let g=0,w=performance.now(),A=a.style.scrollBehavior;a.style.scrollBehavior="auto";let M=["wheel","touchstart","pointerdown","keydown"],_=I=>{cancelAnimationFrame(g),M.forEach(Zt=>window.removeEventListener(Zt,R,!0)),a.style.scrollBehavior=A,Je.delete(a),u(I)},R=I=>{I.type==="keydown"&&!/^(Arrow|Page|Home|End| |Escape)/.test(I.key)||_(!1)},X=I=>{let Zt=$((I-w)/x,0,1);a.scrollTop=h+m*f(Zt),Zt<1?g=requestAnimationFrame(X):(a.scrollTop=c,_(!0))};M.forEach(I=>window.addEventListener(I,R,{capture:!0,passive:!0})),Je.set(a,_),g=requestAnimationFrame(X)})}function ti(r){!r||r===document.body||r===document.documentElement||(r.matches("a[href], button, input, select, textarea, [tabindex]")||(r.setAttribute("tabindex","-1"),r.addEventListener("blur",()=>r.removeAttribute("tabindex"),{once:!0})),r.focus({preventScroll:!0}))}var qt=class extends b{init(){this.on(this.el,"click",t=>{if(t.defaultPrevented||t.metaKey||t.ctrlKey||t.shiftKey||t.button)return;let i=(this.el.matches("a[href]")?this.el:t.target.closest("a[href]"))?.getAttribute("href")||this.el.getAttribute("data-pl-scroll-target")||"";i.startsWith("#")&&(t.preventDefault(),this.scrollTo(i))})}async scrollTo(t=this.el.getAttribute("href")){let{offset:e,duration:i,easing:s,hash:o,focus:n}=this.options,a=null;if(t instanceof Element?a=t:typeof t=="string"&&t.length>1&&(a=document.getElementById(decodeURIComponent(t.slice(1)))||(t!=="#top"?Ds(t):null)),!a&&!(!a&&(t==="#"||t==="#top"))||!this.emit("beforescroll",{target:a},!0))return!1;let h=await ke(a||0,{offset:a?e:0,duration:i,easing:s});return o&&typeof t=="string"&&t.length>1&&t!==location.hash&&history.pushState(null,"",t),h&&n&&a&&ti(a),this.emit("scrolled",{target:a,completed:h}),h}};d(qt,"defaults",{offset:0,duration:"auto",easing:"ease-in-out",hash:!0,focus:!0}),d(qt,"primary","offset");function Ds(r){try{return document.querySelector(r)}catch{return null}}v("scroll",qt);O.scroll.to=ke;var Pi=(r,t,e)=>r.dispatchEvent(new CustomEvent(`pl:${t}`,{bubbles:!0,detail:e})),Bi=r=>String(r||"").split(/[\s,]+/).filter(Boolean),Ft=class extends b{init(){let{options:t}=this;if(this.state=new WeakMap,this.timers=new Set,this.lastTime=0,typeof IntersectionObserver=="function"){if(this.observer=new IntersectionObserver(e=>{e.slice().sort((i,s)=>i.target.compareDocumentPosition(s.target)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1).forEach(i=>i.isIntersecting?this.enter(i.target):this.leave(i.target))},{rootMargin:`${t.offsetTop}px ${t.offsetLeft}px`}),this.observe(),t.target){let e=new MutationObserver(()=>this.observe());e.observe(this.el,{childList:!0,subtree:!0}),this.onDestroy(()=>e.disconnect())}this.onDestroy(()=>{this.observer.disconnect(),this.timers.forEach(clearTimeout)})}}get targets(){let t=String(this.options.target||"").trim();if(!t)return[this.el];if(t.startsWith(">"))return C(this.el,t);try{return[...this.el.querySelectorAll(t)]}catch{return[]}}classesFor(t){return Bi(t.getAttribute("data-pl-scrollspy-class")||this.options.cls)}observe(){for(let t of this.targets)this.state.has(t)||(this.state.set(t,{inview:!1,timer:0}),this.options.hidden&&t.classList.add("pl-invisible"),this.observer.observe(t))}enter(t){let e=this.state.get(t);if(!e||e.inview)return;e.inview=!0;let{delay:i,repeat:s}=this.options,o=performance.now(),n=i?Math.max(o,this.lastTime+i):o;this.lastTime=n;let a=()=>{this.timers.delete(e.timer),e.timer=0,t.classList.remove("pl-invisible"),t.classList.add(...this.classesFor(t)),Pi(t,"inview",{component:this,target:t})};n-o<1?a():(e.timer=setTimeout(a,n-o),this.timers.add(e.timer)),s||this.observer.unobserve(t)}leave(t){let e=this.state.get(t);!e||!e.inview||!this.options.repeat||(e.inview=!1,e.timer&&(clearTimeout(e.timer),this.timers.delete(e.timer),e.timer=0),t.classList.remove(...this.classesFor(t)),this.options.hidden&&t.classList.add("pl-invisible"),Pi(t,"outview",{component:this,target:t}))}};d(Ft,"defaults",{cls:"pl-animation-fade",target:null,hidden:!0,offsetTop:0,offsetLeft:0,repeat:!1,delay:0}),d(Ft,"primary","cls");var Ae=class extends b{init(){this.active=null,this.locked=!1,this.update=z(()=>this.refresh()),this.on(document,"scroll",this.update,{capture:!0,passive:!0}),this.on(window,"resize",this.update,{passive:!0}),this.on(window,"load",this.update),this.on(this.el,"click",async t=>{if(!this.options.scroll)return;let e=t.target.closest('a[href*="#"]');if(!e||!this.el.contains(e)||t.metaKey||t.ctrlKey)return;let i=this.targetOf(e);if(!i)return;t.preventDefault(),this.locked=!0,this.setActive(e);let s=await ke(i,{offset:this.options.offset,duration:this.options.duration});this.locked=!1,s?(e.hash!==location.hash&&history.replaceState(null,"",e.hash),ti(i)):this.refresh()}),this.refresh()}get links(){return T('a[href*="#"]',this.el).filter(t=>this.targetOf(t))}targetOf(t){let e=t.getAttribute("href")||"",i=e.slice(e.indexOf("#")+1);return!i||!e.startsWith("#")&&t.pathname!==location.pathname?null:document.getElementById(decodeURIComponent(i))}refresh(){if(this.locked)return;let t=this.links;if(!t.length)return;let{offset:e,overflow:i}=this.options,s=document.scrollingElement||document.documentElement,o=null,n=s;for(let h of t){let c=this.targetOf(h);if(!c.getClientRects().length)continue;n=Qe(c);let p=n===s?0:n.getBoundingClientRect().top+n.clientTop;if(c.getBoundingClientRect().top-p<=e+2)o=h;else break}let a=n===s?window.innerHeight:n.clientHeight,l=n.scrollHeight-a;l>0&&n.scrollTop>=l-2&&(o=t[t.length-1]),!o&&i&&(o=t[0]),this.setActive(o)}holder(t){let{closest:e}=this.options;return e&&t.closest(String(e))||t}setActive(t){if(t===this.active)return;let e=Bi(this.options.cls);this.active&&(this.holder(this.active).classList.remove(...e),this.active.removeAttribute("aria-current"));for(let i of T('a[href*="#"]',this.el))i!==t&&this.holder(i).classList.remove(...e);this.active=t,t&&(this.holder(t).classList.add(...e),t.setAttribute("aria-current","location"),this.emit("active",{link:t,target:this.targetOf(t)}))}};d(Ae,"defaults",{cls:"pl-active",closest:"li",scroll:!1,offset:0,overflow:!0,duration:"auto"});v("scrollspy",Ft);v("scrollspy-nav",Ae);var Cs={s:640,m:960,l:1200,xl:1600};function Os(r){return r===!1||r===null||r===void 0||r===""?null:(typeof r=="string"&&r.startsWith("@")&&(r=Cs[r.slice(1)]??0),typeof r=="number"||/^\d+$/.test(r)?matchMedia(`(min-width: ${r}px)`):matchMedia(r))}var mt=r=>String(r||"").split(/[\s,]+/).filter(Boolean);function qi(r,t){if(typeof r=="number")return r;let e=parseFloat(r);return Number.isNaN(e)?0:String(r).endsWith("vh")?window.innerHeight*e/100:String(r).endsWith("%")?t*e/100:e}var Le=class extends b{init(){let{el:t,options:e}=this;this.fixed=!1,this.active=null,this.below=!1,this.lastY=window.scrollY,this.direction="down",this.leaving=0,this.metrics=null,this.media=Os(e.media),this.placeholder=document.createElement("div"),this.placeholder.className="pl-sticky-placeholder",this.placeholder.setAttribute("aria-hidden","true"),this.placeholder.hidden=!0,t.classList.add("pl-sticky"),this.setState(!1,!0),this.update=z(()=>this.refresh());let i=z(()=>{this.measure(),this.refresh()});if(this.on(window,"scroll",this.update,{passive:!0}),this.on(window,"resize",i,{passive:!0}),this.on(window,"load",i),this.on(this.media,"change",i),document.fonts?.ready.then(i).catch(()=>{}),typeof ResizeObserver=="function"){let s=new ResizeObserver(()=>{this.fixed&&this.metrics&&Math.abs(t.offsetHeight-this.metrics.height)>.5?(this.metrics.height=t.offsetHeight,this.placeholder.style.height=`${t.offsetHeight}px`,this.update()):this.fixed||this.update()});s.observe(t),this.onDestroy(()=>s.disconnect())}this.onDestroy(()=>{this.unfix(),this.placeholder.remove(),t.classList.remove("pl-sticky","pl-sticky-below",...mt(e.clsActive),...mt(e.clsInactive))}),this.measure(),this.refresh()}get enabled(){return(!this.media||this.media.matches)&&this.el.isConnected&&(this.fixed||this.el.getClientRects().length>0)}get boundary(){let t=this.options.end||this.options.bottom;return t?t===!0||t==="parent"?(this.fixed?this.placeholder:this.el).parentElement:(t=String(t),t.startsWith("!")?this.el.parentElement?.closest(t.slice(1).trim())||null:E(t)):null}measure(){let{el:t}=this,e=this.fixed;e&&this.unfix(!0);let i=t.getBoundingClientRect(),s=getComputedStyle(t);this.metrics={width:i.width,height:t.offsetHeight,margin:s.margin,flex:s.flex,alignSelf:s.alignSelf,gridArea:s.gridArea},e&&this.fix(!0)}refresh(){let{el:t,options:e}=this,i=window.scrollY;if(i!==this.lastY&&(this.direction=i>this.lastY?"down":"up"),this.lastY=i,!this.enabled){this.fixed&&this.unfix(),this.setState(!1);return}(!this.metrics||!this.fixed&&Math.abs(this.metrics.height-t.offsetHeight)>.5)&&this.measure();let{height:s}=this.metrics,o=this.fixed?this.placeholder:t,n=o.getBoundingClientRect(),a=qi(e.offset,s),l=n.top+i,h=l-a,{top:c}=e;if(typeof c=="string"&&c&&Number.isNaN(parseFloat(c))){let g=E(c);g&&(h=g.getBoundingClientRect().bottom+i-a)}else c&&(h+=qi(c,s));let p=1/0,m=this.boundary;if(m){let g=getComputedStyle(m),w=m.contains(o)?parseFloat(g.paddingBottom)+parseFloat(g.borderBottomWidth):0;p=m.getBoundingClientRect().bottom+i-w-s-a}let x=i>l+s,f=h<=l-a+1,u=i>h&&p>h;if(e.showOnUp){let g=Math.max(h,l+s);this.fixed?u=i>l-a&&(this.direction==="up"||i<=g):u=i>g&&this.direction==="up",this.fixed&&i<=l-a&&(u=!1)}if(u&&!this.fixed?(this.fix(),(e.animation||e.showOnUp)&&!(f&&!e.showOnUp)&&this.animate(!1),this.setState(!0)):u&&this.leaving?(this.cancelLeave(),this.setState(!0)):!u&&this.fixed&&(i<=l-a||!(e.animation||e.showOnUp)?(this.unfix(),this.setState(!1)):this.leaving||this.leave()),this.fixed){let g=this.placeholder.getBoundingClientRect(),w=Math.min(0,p-i);t.style.top=`${a+w}px`,t.style.left=`${g.left}px`,t.style.width=`${g.width}px`,t.classList.toggle("pl-sticky-end",w<0)}x!==this.below&&(this.below=x,t.classList.toggle("pl-sticky-below",x))}fix(t=!1){let{el:e,placeholder:i,metrics:s,options:o}=this;if(this.fixed)return;this.cancelLeave(),Object.assign(i.style,{width:`${s.width}px`,height:`${s.height}px`,margin:s.margin,flex:s.flex.startsWith("0 ")?s.flex:"none",alignSelf:s.alignSelf,gridArea:s.gridArea}),e.after(i),i.hidden=!1,i.parentElement?.clientWidth&&getComputedStyle(i.parentElement).display==="block"&&(i.style.width="",Math.abs(i.getBoundingClientRect().width-s.width)>1&&(i.style.width=`${s.width}px`)),e.classList.add("pl-sticky-fixed"),o.zIndex!==null&&o.zIndex!==""&&(e.style.zIndex=o.zIndex),this.fixed=!0,t||this.refreshPosition()}refreshPosition(){let t=this.placeholder.getBoundingClientRect();this.el.style.left=`${t.left}px`,this.el.style.width=`${t.width}px`}unfix(t=!1){let{el:e,placeholder:i}=this;if(this.fixed){t||this.cancelLeave(),e.classList.remove("pl-sticky-fixed","pl-sticky-end");for(let s of["top","left","width","zIndex"])e.style[s]="";i.hidden=!0,i.remove(),this.fixed=!1}}async animate(t){let{el:e,options:i}=this;if(S())return;let s=mt(i.animation||"pl-animation-slide-down");t&&s.push("pl-animation-reverse"),e.classList.remove("pl-animation-reverse"),e.classList.add(...s),await D(e),e.classList.remove(...s)}async leave(){let t=this.leaving=Math.random()+1;this.setState(!1),await this.animate(!0),this.leaving===t&&(this.leaving=0,this.unfix(),this.refresh())}cancelLeave(){this.leaving&&(this.leaving=0,this.el.classList.remove("pl-animation-reverse",...mt(this.options.animation||"pl-animation-slide-down")))}setState(t,e=!1){if(t===this.active&&!e)return;let i=this.active===null;this.active=t;let s=mt(this.options.clsActive),o=mt(this.options.clsInactive);this.el.classList.remove(...t?o:s),this.el.classList.add(...t?s:o),i||this.emit(t?"active":"inactive")}};d(Le,"defaults",{offset:0,top:0,bottom:!1,end:!1,clsActive:"pl-active",clsInactive:"",animation:!1,showOnUp:!1,media:!1,zIndex:null});v("sticky",Le);var zs={s:640,m:960,l:1200,xl:1600};function Ns(r){return r===!1||r===null||r===void 0||r===""?null:(typeof r=="string"&&r.startsWith("@")&&(r=zs[r.slice(1)]??0),typeof r=="number"||/^\d+$/.test(r)?matchMedia(`(min-width: ${r}px)`):matchMedia(r))}var Ri={x:[0,"px"],y:[0,"px"],scale:[1,""],rotate:[0,"deg"],opacity:[1,""],blur:[0,"px"],grayscale:[0,"%"],saturate:[100,"%"],brightness:[100,"%"],hue:[0,"deg"],bgx:[0,"px"],bgy:[0,"px"]},Fi={blur:"blur",grayscale:"grayscale",saturate:"saturate",brightness:"brightness",hue:"hue-rotate"};function Hs(r,t){let[e,i]=Ri[t],s=String(r).split(",").map(a=>a.trim()).filter(Boolean),o=i,n=s.map(a=>{let l=a.match(/^(-?[\d.]+)([a-z%]*)$/i);return l?(l[2]&&(o=l[2]),parseFloat(l[1])):0});return n.length===1&&n.unshift(e),{stops:n,unit:o}}function Is(r,t){let e=r.length-1,i=t*e,s=Math.min(Math.floor(i),e-1),o=r[s];return o+(r[s+1]-o)*(i-s)}function ji(r,t){if(typeof r=="number")return r;let e=parseFloat(r);return Number.isNaN(e)?0:String(r).endsWith("vh")?window.innerHeight*e/100:String(r).endsWith("%")?t*e/100:e}function Ps(r){let t=0;for(let e=r;e;e=e.offsetParent)t+=e.offsetTop+(e!==r?e.clientTop:0);return t}var Ee=class extends b{init(){let{el:t,options:e}=this;this.props={};for(let s of Object.keys(Ri))e[s]!==null&&e[s]!==""&&(this.props[s]=Hs(e[s],s));if(this.media=Ns(e.media),this.visible=!0,this.progress=-1,this.applied=!1,!Object.keys(this.props).length)return;this.update=z(()=>this.refresh()),this.on(window,"scroll",()=>this.visible&&this.update(),{passive:!0}),this.on(window,"resize",()=>this.refresh(!0),{passive:!0}),this.on(window,"load",()=>this.refresh(!0)),this.on(this.media,"change",()=>this.refresh(!0));let i=matchMedia("(prefers-reduced-motion: reduce)");if(this.on(i,"change",()=>this.refresh(!0)),typeof IntersectionObserver=="function"){let s=new IntersectionObserver(([o])=>{this.visible=o.isIntersecting,this.visible&&this.refresh()},{rootMargin:"50% 0px"});s.observe(this.target),this.onDestroy(()=>s.disconnect())}("bgx"in this.props||"bgy"in this.props)&&this.prepareBackground(),this.onDestroy(()=>this.reset()),this.refresh(!0)}get target(){let{el:t,options:e}=this;if(!e.target)return t;let i=String(e.target);return i.startsWith("!")?t.closest(i.slice(1).trim())||t:C(t,i)[0]||t}get enabled(){return(!this.media||this.media.matches)&&!S()}prepareBackground(){let{el:t}=this,e=getComputedStyle(t).backgroundImage.match(/url\(["']?(.*?)["']?\)/)?.[1];if(!e)return;let i=new Image;i.onload=()=>{this.image={width:i.naturalWidth,height:i.naturalHeight},this.refresh(!0)},i.src=e}sizeBackground(){let{el:t,image:e,props:i}=this;if(!e||!e.width||!e.height)return;let s=l=>i[l]&&i[l].unit==="px"?Math.max(...i[l].stops)-Math.min(...i[l].stops):0,o=t.offsetWidth+s("bgx"),n=t.offsetHeight+s("bgy"),a=Math.max(o/e.width,n/e.height);t.style.backgroundSize=`${Math.ceil(e.width*a)}px ${Math.ceil(e.height*a)}px`,t.style.backgroundRepeat="no-repeat"}refresh(t=!1){let{el:e,options:i,props:s}=this;if(!this.enabled){this.reset();return}t&&(this.progress=-1,this.sizeBackground());let o=this.target,n=o.offsetHeight,a=window.innerHeight,l=document.scrollingElement||document.documentElement,h=Ps(o),c=Math.max(0,l.scrollHeight-a),p=Math.max(0,h-a+ji(i.start,n)),m=Math.min(c,h+n-ji(i.end,n)),x=m>p?$((window.scrollY-p)/(m-p),0,1):0,f=Number(i.easing);if(f>0&&f!==1&&(x**=f),Math.abs(x-this.progress)<5e-4)return;this.progress=x;let u=M=>Is(s[M].stops,x),g=M=>s[M].unit,w=[];if(s.x||s.y){let M=s.x?`${u("x").toFixed(2)}${g("x")}`:"0",_=s.y?`${u("y").toFixed(2)}${g("y")}`:"0";w.push(`translate3d(${M}, ${_}, 0)`)}s.rotate&&w.push(`rotate(${u("rotate").toFixed(3)}${g("rotate")})`),s.scale&&w.push(`scale(${u("scale").toFixed(4)})`),w.length&&(e.style.transform=w.join(" ")),s.opacity&&(e.style.opacity=u("opacity").toFixed(3));let A=Object.keys(Fi).filter(M=>s[M]).map(M=>`${Fi[M]}(${u(M).toFixed(2)}${g(M)})`);if(A.length&&(e.style.filter=A.join(" ")),s.bgx||s.bgy){let M=X=>{let{stops:I}=s[X];return(u(X)-(Math.max(...I)+Math.min(...I))/2).toFixed(2)},_=s.bgx?`calc(50% + ${M("bgx")}${g("bgx")})`:"50%",R=s.bgy?`calc(50% + ${M("bgy")}${g("bgy")})`:"50%";e.style.backgroundPosition=`${_} ${R}`}if(!this.applied){this.applied=!0;let M=[];w.length&&M.push("transform"),s.opacity&&M.push("opacity"),A.length&&M.push("filter"),M.length&&(e.style.willChange=M.join(", "))}}reset(){if(this.applied){this.applied=!1,this.progress=-1;for(let t of["transform","opacity","filter","willChange","backgroundPosition","backgroundSize","backgroundRepeat"])this.el.style[t]=""}}};d(Ee,"defaults",{x:null,y:null,scale:null,rotate:null,opacity:null,blur:null,grayscale:null,saturate:null,brightness:null,hue:null,bgx:null,bgy:null,easing:1,start:0,end:0,media:!1,target:!1});v("parallax",Ee);function ei({from:r,to:t,velocity:e=0,stiffness:i=170,damping:s=20,precision:o=.35,update:n,done:a}){if(S()||typeof requestAnimationFrame!="function")return n(t,0),a?.(),{stop(){},velocity:0};let l=r,h=e,c=performance.now(),p=0,m=!0,x={stop(){m=!1,cancelAnimationFrame(p)},get velocity(){return h}},f=u=>{if(!m)return;let g=$((u-c)/1e3,0,.064);for(c=u;g>1e-5;){let w=Math.min(g,.004166666666666667);h+=(-i*(l-t)-s*h)*w,l+=h*w,g-=w}if(Math.abs(l-t)<o&&Math.abs(h)<o*25){m=!1,h=0,n(t,0),a?.();return}n(l,h),p=requestAnimationFrame(f)};return p=requestAnimationFrame(f),x}function Se(r,t,e=.55){let i=Math.abs(r);return Math.sign(r)*(1-1/(i*e/t+1))*t}function ii(){let r=[];return{add(t,e){for(r.push({x:t,t:e});r.length>2&&e-r[0].t>100;)r.shift()},get(t){if(r.length<2)return 0;let e=r[0],i=r[r.length-1];return t-i.t>80||i.t===e.t?0:(i.x-e.x)/(i.t-e.t)*1e3}}}var Wi='input, textarea, select, [contenteditable]:not([contenteditable="false"]), .pl-drag-ignore',gt=class extends b{setup(){var s;let t=this.constructor.prefix,{el:e}=this;if(this.attr=`data-pl-${t}-item`,this.list=E(`.pl-${t}-items`,e),!this.list)return!1;this.index=0,this.pauses=new Set,this.autoplayOn=!!this.options.autoplay,this.generatedNavs=new Set,this.onDestroy(()=>this.generatedNavs.forEach(o=>o.replaceChildren())),this._timer=0,this._remaining=0,this._startedAt=0;let i=y("slider.carousel",{},e);if(e.hasAttribute("role")||e.setAttribute("role","region"),e.setAttribute("aria-roledescription",i),!e.hasAttribute("aria-label")&&!e.hasAttribute("aria-labelledby")&&e.setAttribute("aria-label",i[0].toUpperCase()+i.slice(1)),e.hasAttribute("tabindex")||(e.tabIndex=0),(s=this.list).id||(s.id=k(`pl-${t}`)),e.style.setProperty(`--pl-${t}-interval`,`${this.options.autoplayInterval}ms`),this.on(e,"click",o=>{let n=o.target.closest(`[${this.attr}]`);if(!n||!this.owns(n)||(o.preventDefault(),n.getAttribute("aria-disabled")==="true"))return;let a=n.getAttribute(this.attr).trim();a==="toggle"?this.autoplayOn?this.stopAutoplay():this.startAutoplay():this.show(/^\d+$/.test(a)?Number(a):a)}),this.on(e,"keydown",o=>{if(o.defaultPrevented||o.altKey||o.ctrlKey||o.metaKey||o.target.closest(Wi)||!this.owns(o.target))return;let a={ArrowLeft:"previous",ArrowRight:"next",Home:0,End:this.slides.length-1}[o.key];a!==void 0&&(o.preventDefault(),this.show(a))}),this.on(e,"pointerenter",o=>{this.options.pauseOnHover&&o.pointerType==="mouse"&&this.pause("hover")}),this.on(e,"pointerleave",()=>this.resume("hover")),this.on(e,"focusin",o=>{o.target.matches?.(":focus-visible")&&this.pause("focus")}),this.on(e,"focusout",o=>{e.contains(o.relatedTarget)||this.resume("focus")}),this.on(document,"visibilitychange",()=>document.hidden?this.pause("hidden"):this.resume("hidden")),typeof IntersectionObserver=="function"){let o=new IntersectionObserver(([n])=>n.isIntersecting?this.resume("offscreen"):this.pause("offscreen"));o.observe(e),this.onDestroy(()=>o.disconnect())}if(typeof MutationObserver=="function"){let o=new MutationObserver(()=>this.update());o.observe(this.list,{childList:!0}),this.onDestroy(()=>o.disconnect())}return this.onDestroy(()=>clearTimeout(this._timer)),!0}get slides(){return this.list?[...this.list.children]:[]}owns(t){let e=this.constructor.componentName;for(let i=t;i&&i!==this.el;i=i.parentElement)if(H(i,e))return!1;return!0}labelSlides(){let t=this.slides,e=y("slider.slide",{},this.el);t.forEach((i,s)=>{i.matches("li")||i.setAttribute("role","group"),i.setAttribute("aria-roledescription",e),!(i.hasAttribute("aria-label")&&!i.dataset.plAuto)&&(i.dataset.plAuto="1",i.setAttribute("aria-label",y("slider.position",{n:s+1,count:t.length},this.el)))})}buildNav(){let t=this.constructor.prefix,e=this.navIndexes();for(let i of T(`.pl-${t}-nav`,this.el))this.owns(i)&&(!i.children.length||this.generatedNavs.has(i)?(this.generatedNavs.add(i),[...i.children].map(o=>o.getAttribute(this.attr)).join()!==e.join()&&(i.innerHTML=e.map(o=>`<li ${this.attr}="${o}"><a href="#" role="button" aria-label="${y("slider.goto",{n:o+1},this.el)}"></a></li>`).join(""))):[...i.children].forEach((s,o)=>{!s.hasAttribute(this.attr)&&!s.querySelector(`[${this.attr}]`)&&s.setAttribute(this.attr,o)}));for(let i of T(`[${this.attr}]`,this.el)){if(!this.owns(i))continue;let s=i.getAttribute(this.attr),o=i.matches("a, button")?i:i.querySelector("a, button");o&&(o.setAttribute("aria-controls",this.list.id),(s==="previous"||s==="next")&&!o.hasAttribute("aria-label")&&!o.textContent.trim()&&o.setAttribute("aria-label",L[s]))}}updateNav(){let t=this.navOf(this.index),[e,i]=this.canMove();for(let s of T(`[${this.attr}]`,this.el)){if(!this.owns(s))continue;let o=s.getAttribute(this.attr).trim(),n=s.matches("a, button")?s:s.querySelector("a, button")||s;if(/^\d+$/.test(o)){let a=Number(o)===t;s.classList.toggle("pl-active",a),a?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}else if(o==="previous"||o==="next"){let a=!(o==="next"?i:e);s.classList.toggle("pl-disabled",a),a?n.setAttribute("aria-disabled","true"):n.removeAttribute("aria-disabled")}}}navIndexes(){return this.slides.map((t,e)=>e)}navOf(t){return t}canMove(){return[!0,!0]}update(){}show(){}startAutoplay(){this.autoplayOn=!0,this.tick(!0)}stopAutoplay(){this.autoplayOn=!1,this.tick(!0)}pause(t){this.pauses.has(t)||(this.pauses.add(t),this.tick(!1))}resume(t){this.pauses.delete(t)&&this.tick(!1)}tick(t=!0){let e=this.constructor.prefix,i=performance.now();this._timer&&(clearTimeout(this._timer),this._timer=0,this._remaining-=i-this._startedAt);let s=Math.max(Number(this.options.autoplayInterval)||0,400);(t||!(this._remaining>0))&&(this._remaining=s);let o=this.autoplayOn&&this.slides.length>1&&!S(),n=o&&!this.pauses.size;this.el.classList.toggle(`pl-${e}-autoplay`,o),this.el.classList.toggle(`pl-${e}-paused`,o&&!n),this.list.setAttribute("aria-live",o?"off":"polite");for(let a of T(`[${this.attr}="toggle"]`,this.el))a.classList.toggle("pl-active",this.autoplayOn),a.setAttribute("aria-pressed",String(this.autoplayOn));n&&(this._startedAt=i,this._timer=setTimeout(()=>{this._timer=0,this._remaining=0;let[,a]=this.canMove();this.show(a?"next":0)},this._remaining))}};d(gt,"prefix","slider");var jt=class extends gt{init(){this.setup()&&(this.container=E(".pl-slider-container",this.el)||this.list.parentElement,this.pos=0,this.target=0,this.metrics=[],this.anim=null,this.drag=null,this.wheelTimer=0,this.suppressClick=0,this.index=Math.max(0,Number(this.options.index)||0),this.el.classList.toggle("pl-slider-draggable",!!this.options.draggable),this.setupDrag(),this.update(),this.el.classList.add("pl-slider-ready"),typeof ResizeObserver=="function"?(this.ro=new ResizeObserver(()=>this.refresh()),this.observe(),this.onDestroy(()=>this.ro.disconnect())):this.on(window,"resize",()=>this.refresh()),this.onDestroy(()=>{this.anim?.stop(),clearTimeout(this.wheelTimer)}),this.tick(!0))}observe(){this.ro&&(this.ro.disconnect(),this.ro.observe(this.container),this.slides.forEach(t=>this.ro.observe(t)))}update(){this.list&&(this.labelSlides(),this.observe(),this.refresh())}refresh(){!this.list||this.drag?.active||(this.measure(),this.buildNav(),this.metrics.length&&(this.index=$(this.index,0,this.metrics.length-1),this.anim?.stop(),this.anim=null,this.pos=this.target=this.stops[this.index],this.render(),this.updateActive(this.pos),this.updateNav()))}measure(){let t=this.slides,{options:e}=this,i=getComputedStyle(this.container),s=getComputedStyle(this.list);this.viewW=this.container.clientWidth-(parseFloat(i.paddingLeft)||0)-(parseFloat(i.paddingRight)||0);let o=this.lead=Math.min(0,parseFloat(s.marginLeft)||0),n=parseFloat(s.columnGap)||0,a=t[0]?.offsetLeft||0,l=new Map(this.metrics.map(u=>[u.el,u.k]));this.metrics=t.map(u=>({el:u,left:u.offsetLeft-a,width:u.offsetWidth,k:l.get(u)||0}));let h=this.metrics,c=h.length;if(!c)return;let p=h[c-1].left+h[c-1].width,m=Math.max(...h.map(u=>u.width));this.total=p+n,this.loop=!e.finite&&c>1&&this.total>=this.viewW+m-1;let x=h.map(u=>e.center?u.left+(u.width+o)/2-this.viewW/2:u.left);this.min=e.center?x[0]:0,this.max=e.center?x[c-1]:Math.max(0,p+o-this.viewW),this.stops=this.loop?x:x.map(u=>$(u,this.min,this.max));let f=[0];if(e.sets&&!e.center){let u=0;for(let g=1;g<c;g++)h[g].left+h[g].width-h[u].left>this.viewW-o+1&&(u=g,f.push(g))}else f=h.map((u,g)=>g);if(!this.loop){let u=-1/0;f=f.filter(g=>this.stops[g]<=u+1?!1:(u=this.stops[g],!0)),f.length||(f=[0]);for(let g of h)g.k&&(g.el.style.transform=""),g.k=0}this.stopIdx=f}navIndexes(){return this.stopIdx||[]}navOf(t){let e=this.stopIdx?.[0]??0;for(let i of this.stopIdx||[])i<=t&&(e=i);return e}canMove(){if(this.loop||!this.options.finite||!this.stopIdx)return[!0,!0];let t=this.stopIdx.indexOf(this.navOf(this.index));return[t>0,t<this.stopIdx.length-1]}render(){let{pos:t}=this;if(this.list.style.transform=`translate3d(${-t}px, 0, 0)`,!!this.loop)for(let e of this.metrics){let i=Math.round((t+this.viewW/2-(e.left+e.width/2))/this.total);i!==e.k&&(e.k=i,e.el.style.transform=i?`translate3d(${i*this.total}px, 0, 0)`:"")}}updateActive(t){for(let e of this.metrics){let i=e.left-t;this.loop&&(i-=Math.round((i+e.width/2-this.viewW/2)/this.total)*this.total);let s=i+this.lead+e.width,o=i>=-1.5&&s<=this.viewW+1.5,n=s>1.5&&i+this.lead<this.viewW-1.5;e.el.classList.toggle("pl-active",o),!n&&e.el.contains(document.activeElement)&&this.el.focus({preventScroll:!0}),e.el.inert=!n}}nearest(t){let e=null;for(let i of this.stopIdx){let s=this.stops[i];this.loop&&(s+=Math.round((t-s)/this.total)*this.total);let o=Math.abs(s-t);(!e||o<e.distance)&&(e={index:i,dest:s,distance:o})}return e}show(t,{velocity:e}={}){let i=this.metrics?.length;if(!i)return;let s,o=0;if(t==="next"||t==="previous"){o=t==="next"?1:-1;let a=this.stopIdx,l=a.indexOf(this.navOf(this.index))+o;if(l<0||l>=a.length){if(!this.loop&&this.options.finite){this.animate(this.target,e??o*900);return}l=(l+a.length)%a.length,this.loop||(o=0)}s=a[l]}else s=this.navOf($(Math.round(Number(t))||0,0,i-1));let n=this.stops[s];if(this.loop){let a=this.target;n+=Math.round((a-n)/this.total)*this.total,o>0&&n<=a+1&&(n+=this.total),o<0&&n>=a-1&&(n-=this.total)}this.goTo(s,n,e)}goTo(t,e,i){let s=this.index,o=t!==s,n=this.metrics[t].el;o&&!this.emit("beforeitemshow",{index:t,item:n,previous:s},!0)&&(e=this.target,t=s);let a=t!==s;this.index=t,this.target=e,this.updateActive(e),this.updateNav(),a&&(this.emit("itemhide",{index:s,item:this.metrics[s]?.el}),this.emit("itemshow",{index:t,item:n,previous:s})),this.tick(!0),this.animate(e,i,()=>{a&&this.emit("itemshown",{index:t,item:n,previous:s})})}animate(t,e,i){let s=this.anim?.velocity||0;this.anim?.stop();let o=Math.max(Number(this.options.velocity)||1,.1);this.anim=ei({from:this.pos,to:t,velocity:e??s,stiffness:170*o*o,damping:20*o,update:n=>{this.pos=n,this.render()},done:()=>{if(this.anim=null,this.loop){let n=Math.floor(this.pos/this.total)*this.total;this.pos-=n,this.target-=n,this.render()}i?.()}})}bounded(t){return this.loop?t:t<this.min?this.min+Se(t-this.min,this.viewW):t>this.max?this.max+Se(t-this.max,this.viewW):t}setupDrag(){let t=this.container;this.on(t,"pointerdown",i=>{!this.options.draggable||this.drag||!this.metrics.length||i.pointerType==="mouse"&&i.button!==0||i.target.closest(Wi)||!this.owns(i.target)||(this.drag={id:i.pointerId,x0:i.clientX,y0:i.clientY,pos0:this.pos,active:!1,caught:!!this.anim,tracker:ii()},this.anim&&(this.anim.stop(),this.anim=null))}),this.on(window,"pointermove",i=>{let s=this.drag;if(!s||i.pointerId!==s.id)return;let o=i.clientX-s.x0,n=i.clientY-s.y0;if(!s.active){if(Math.abs(o)<5&&Math.abs(n)<5)return;if(i.pointerType!=="mouse"&&Math.abs(n)>Math.abs(o)){this.endDrag(!0);return}if(Math.abs(o)<5)return;s.active=!0,s.x0=i.clientX;try{t.setPointerCapture(s.id)}catch{}this.el.classList.add("pl-slider-dragging"),this.pause("drag")}this.pos=this.bounded(s.pos0-(i.clientX-s.x0)),s.tracker.add(i.clientX,i.timeStamp),this.render()});let e=i=>{let s=this.drag;!s||i.pointerId!==s.id||this.endDrag(i.type==="pointercancel",i.timeStamp)};this.on(window,"pointerup",e),this.on(window,"pointercancel",e),this.on(t,"click",i=>{performance.now()<this.suppressClick&&(i.preventDefault(),i.stopPropagation())},!0),this.on(t,"dragstart",i=>i.preventDefault()),this.on(t,"wheel",i=>{if(!this.options.draggable||!this.metrics.length||Math.abs(i.deltaX)<=Math.abs(i.deltaY))return;i.preventDefault(),this.anim?.stop(),this.anim=null;let s=i.deltaMode===1?i.deltaX*16:i.deltaX;this.pos=this.loop?this.pos+s:$(this.pos+s,this.min,this.max),this.render(),clearTimeout(this.wheelTimer),this.wheelTimer=setTimeout(()=>{let{index:o,dest:n}=this.nearest(this.pos);this.goTo(o,n,0)},110)},{passive:!1})}endDrag(t,e=performance.now()){let i=this.drag;if(!i)return;if(this.drag=null,!i.active){if(i.caught){let{index:l,dest:h}=this.nearest(this.pos);this.goTo(l,h,0)}return}try{this.container.releasePointerCapture(i.id)}catch{}this.el.classList.remove("pl-slider-dragging"),this.suppressClick=performance.now()+250;let s=t?0:-i.tracker.get(e),o=this.target,{index:n,dest:a}=this.nearest(this.pos+s*.22);if(this.resume("drag"),Math.abs(s)>280&&Math.abs(a-o)<1){let l=this.stopIdx.indexOf(this.navOf(this.index));if(this.loop||(s>0?l<this.stopIdx.length-1:l>0)){this.show(s>0?"next":"previous",{velocity:s});return}}this.goTo(n,a,s)}};d(jt,"prefix","slider"),d(jt,"defaults",{center:!1,finite:!1,sets:!1,autoplay:!1,autoplayInterval:5e3,pauseOnHover:!0,draggable:!0,index:0,velocity:1});v("slider",jt);var ht=r=>`translate3d(${(r*100).toFixed(3)}%, 0, 0)`,$e=r=>`scale(${r.toFixed(4)})`,Vi={slide:(r,t)=>[{transform:ht(-t*r)},{transform:ht(t*(1-r))}],fade:r=>[{opacity:1},{opacity:r,zIndex:1}],scale:r=>[{opacity:1-r,transform:$e(1-.12*r)},{opacity:r,transform:$e(1.12-.12*r),zIndex:1}],zoom:r=>[{opacity:1-r,transform:$e(1+.45*r),zIndex:1},{transform:$e(.86+.14*r)}],push:(r,t)=>[{transform:ht(-t*r*.3),filter:`brightness(${(1-.45*r).toFixed(3)})`},{transform:ht(t*(1-r)),zIndex:1}],pull:(r,t)=>[{transform:ht(-t*r),zIndex:1},{transform:ht(t*(1-r)*.3),filter:`brightness(${(.55+.45*r).toFixed(3)})`}]},Bs='input, textarea, select, [contenteditable]:not([contenteditable="false"]), .pl-drag-ignore',Rt=class extends gt{init(){if(!this.setup())return;let{options:t,list:e,el:i}=this;this.tr=null,this.drag=null,this.suppressClick=0;let s=String(t.ratio).match(/^\s*([\d.]+)\s*[:/]\s*([\d.]+)\s*$/);t.ratio===!1||t.ratio==="false"?e.style.setProperty("--pl-slideshow-ratio","auto"):s&&e.style.setProperty("--pl-slideshow-ratio",`${s[1]} / ${s[2]}`);let o=n=>typeof n=="number"?`${n}px`:n;t.minHeight&&e.style.setProperty("--pl-slideshow-min-height",o(t.minHeight)),t.maxHeight&&e.style.setProperty("--pl-slideshow-max-height",o(t.maxHeight)),t.kenburns&&i.classList.add("pl-slideshow-kenburns"),i.classList.toggle("pl-slideshow-draggable",!!t.draggable),this.index=$(Number(t.index)||0,0,Math.max(0,this.slides.length-1)),this.setupDrag(),this.update(),i.classList.add("pl-slideshow-ready"),this.onDestroy(()=>this.tr?.anim?.stop()),this.tick(!0)}update(){if(!this.list)return;this.tr&&this.finish();let t=this.slides;this.index=$(this.index,0,Math.max(0,t.length-1)),t.forEach((i,s)=>i.classList.toggle("pl-active",s===this.index)),this.labelSlides(),this.buildNav();let e=E(".pl-slideshow-progress",this.el);!e&&this.options.autoplay&&this.options.progress&&(e=document.createElement("div"),e.className="pl-slideshow-progress",this.el.append(e)),e&&(e.setAttribute("aria-hidden","true"),e.children.length!==t.length&&(e.innerHTML="<span></span>".repeat(t.length))),this.progress=e,this.updateNav()}updateNav(){super.updateNav(),[...this.progress?.children||[]].forEach((t,e)=>{t.classList.toggle("pl-done",e<this.index),t.classList.toggle("pl-active",e===this.index)})}canMove(){let t=this.slides.length;return this.options.finite?[this.index>0,this.index<t-1]:[t>1,t>1]}resolve(t){let e=this.slides.length;if(e<2)return-1;let i=this.index+(t==="next"?1:-1);return i>=0&&i<e?i:this.options.finite?-1:(i+e)%e}show(t,{velocity:e=0}={}){if(!this.list)return;this.tr&&this.finish();let i,s;if(t==="next"||t==="previous"){if(s=t==="next"?1:-1,i=this.resolve(t),i<0){this.slides.length&&(this.begin(-1,s),this.run(0,700));return}}else{if(i=$(Math.round(Number(t))||0,0,this.slides.length-1),i===this.index)return;s=i>this.index?1:-1}this.begin(i,s),this.commit()?this.run(1,e):this.finish()}begin(t,e){let i=this.slides,s=i[this.index],o=t>=0?i[t]:null;this.tr={from:s,to:o,fromIndex:this.index,toIndex:t,dir:e,p:0,committed:!1,anim:null},s.classList.add("pl-transition-active"),o?.classList.add("pl-transition-active"),this.renderTransition()}commit(){let t=this.tr,e={index:t.toIndex,item:t.to,previous:t.fromIndex};return this.emit("beforeitemshow",e,!0)?(t.committed=!0,t.from.classList.remove("pl-active"),t.to.classList.add("pl-active"),this.index=t.toIndex,this.updateNav(),this.emit("itemhide",{index:t.fromIndex,item:t.from}),this.emit("itemshow",e),this.tick(!0),!0):!1}run(t,e=0){let i=this.tr,s=this.list.offsetWidth||1,o=Math.max(Number(this.options.velocity)||1,.1);i.anim=ei({from:i.p*s,to:t*s,velocity:e,stiffness:210*o*o,damping:29*o,update:n=>{i.p=n/s,this.tr===i&&this.renderTransition()},done:()=>{this.tr===i&&this.finish()}})}renderTransition(){let{from:t,to:e,dir:i,p:s}=this.tr;if(!e){t.style.transform=ht(-i*Math.max(s,0));return}let o=Vi[this.options.animation]||Vi.slide,[n,a]=o($(s,0,1),i);Object.assign(t.style,n),Object.assign(e.style,a)}finish(){let t=this.tr;if(t){this.tr=null,t.anim?.stop();for(let e of[t.from,t.to])if(e){for(let i of["transform","opacity","zIndex","filter"])e.style[i]="";e.classList.remove("pl-transition-active")}t.committed&&(t.from.querySelectorAll("video").forEach(e=>e.pause()),t.to.querySelectorAll("video[autoplay]").forEach(e=>e.play?.()?.catch?.(()=>{})),this.emit("itemshown",{index:t.toIndex,item:t.to,previous:t.fromIndex}))}}setupDrag(){let t=this.list;this.on(t,"pointerdown",i=>{!this.options.draggable||this.drag||!this.slides.length||i.pointerType==="mouse"&&i.button!==0||i.target.closest(Bs)||!this.owns(i.target)||(this.drag={id:i.pointerId,x0:i.clientX,y0:i.clientY,active:!1,tracker:ii()})}),this.on(window,"pointermove",i=>{let s=this.drag;if(!s||i.pointerId!==s.id)return;let o=i.clientY-s.y0,n=i.clientX-s.x0;if(!s.active){if(Math.abs(n)<5&&Math.abs(o)<5)return;if(i.pointerType!=="mouse"&&Math.abs(o)>Math.abs(n)){this.drag=null;return}if(Math.abs(n)<5)return;this.tr&&this.finish(),s.active=!0,s.x0=i.clientX,s.width=t.offsetWidth||1,n=0;try{t.setPointerCapture(s.id)}catch{}this.el.classList.add("pl-slideshow-dragging"),this.pause("drag")}let a=n<=0?1:-1;(!this.tr||this.tr.dir!==a)&&(this.finish(),this.begin(this.resolve(a>0?"next":"previous"),a));let l=Math.abs(n);this.tr.p=this.tr.to?$(l/s.width,0,1):Se(l,s.width)/s.width/2.5,s.tracker.add(i.clientX,i.timeStamp),this.renderTransition()});let e=i=>{let s=this.drag;if(!s||i.pointerId!==s.id||(this.drag=null,!s.active))return;try{t.releasePointerCapture(s.id)}catch{}this.el.classList.remove("pl-slideshow-dragging"),this.suppressClick=performance.now()+250,this.resume("drag");let o=this.tr;if(!o)return;let n=i.type==="pointercancel"?0:-s.tracker.get(i.timeStamp)*o.dir;o.to&&(n>320||o.p>.5&&n>-320)&&this.commit()?this.run(1,n):this.run(0,n)};this.on(window,"pointerup",e),this.on(window,"pointercancel",e),this.on(t,"click",i=>{performance.now()<this.suppressClick&&(i.preventDefault(),i.stopPropagation())},!0),this.on(t,"dragstart",i=>i.preventDefault())}};d(Rt,"prefix","slideshow"),d(Rt,"defaults",{animation:"slide",autoplay:!1,autoplayInterval:6e3,pauseOnHover:!0,ratio:"16:9",minHeight:"",maxHeight:"",finite:!1,draggable:!0,kenburns:!1,progress:!0,index:0,velocity:1});v("slideshow",Rt);var qs='input, textarea, select, option, button, [contenteditable]:not([contenteditable="false"]), .pl-sortable-nodrag',Yi="cubic-bezier(0.33, 0.5, 0.2, 1)",Fs=260,Wt=new WeakMap;function Te(r,t,e){let i=[...new Set(r)].flatMap(o=>[...o.children]),s=new Map(i.map(o=>[o,o.getBoundingClientRect()]));if(t(),!(!e||S()))for(let[o,n]of s){if(Wt.get(o)?.cancel(),!o.isConnected||typeof o.animate!="function")continue;let a=o.getBoundingClientRect(),l=n.left-a.left,h=n.top-a.top;if(Math.abs(l)<.5&&Math.abs(h)<.5)continue;let c=o.animate([{transform:`translate(${l}px, ${h}px)`},{transform:"none"}],{duration:e,easing:Yi});Wt.set(o,c),c.onfinish=c.oncancel=()=>{Wt.get(o)===c&&Wt.delete(o)}}}function De(r,t,e){if(typeof r.moveBefore=="function"&&t.isConnected)try{r.moveBefore(t,e);return}catch{}r.insertBefore(t,e)}var bt,et,js="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function Ui(){return(!et||!et.isConnected)&&(et=document.createElement("div"),et.id="pl-sortable-help",et.hidden=!0,et.textContent=y("sortable.help"),bt=document.createElement("div"),bt.setAttribute("aria-live","assertive"),bt.setAttribute("aria-atomic","true"),bt.style.cssText=js,document.body.append(et,bt)),{liveRegion:bt,helpText:et}}function si(r){let{liveRegion:t}=Ui();t.textContent="",setTimeout(()=>t.textContent=r,30)}var Vt=class extends b{init(){let{el:t}=this;if(this.session=null,this.kb=null,this.kbMoving=!1,this.suppressClick=0,t.classList.add("pl-sortable"),t.classList.toggle("pl-sortable-by-handle",!!this.options.handle),this.on(t,"pointerdown",e=>this.onDown(e)),this.on(window,"pointermove",e=>this.onMove(e),{passive:!1}),this.on(window,"pointerup",e=>this.onUp(e)),this.on(window,"pointercancel",e=>this.onUp(e,!0)),this.on(document,"touchmove",e=>{this.session?.started&&e.cancelable&&e.preventDefault()},{passive:!1}),this.on(t,"contextmenu",e=>{this.session&&e.preventDefault()}),this.on(t,"dragstart",e=>e.preventDefault()),this.on(window,"click",e=>{performance.now()<this.suppressClick&&(e.preventDefault(),e.stopPropagation())},!0),this.on(window,"keydown",e=>{e.key==="Escape"&&this.session?.started&&(e.preventDefault(),this.finishDrag(!0))}),this.on(t,"keydown",e=>this.onKey(e)),this.on(t,"focusin",e=>{let i=this.itemOf(e.target);i&&e.target===i&&this.setTabStop(i)}),this.on(t,"focusout",e=>{this.kb&&!this.kbMoving&&e.target===this.kb.item&&this.dropKey()}),typeof MutationObserver=="function"){let e=new MutationObserver(()=>this.refresh());e.observe(t,{childList:!0}),this.onDestroy(()=>e.disconnect())}this.onDestroy(()=>this.finishDrag(!0,!0)),this.refresh()}get items(){return[...this.el.children]}toArray(t){return t?this.items.map(e=>e.getAttribute(t)):this.items}itemOf(t){for(;t&&t.parentElement!==this.el;)t=t.parentElement;return t||null}refresh(){let t=this.items.filter(s=>!s.classList.contains(this.options.clsDrag));if(this.el.classList.toggle(this.options.clsEmpty,!t.length),!t.length)return;let{helpText:e}=Ui(),i=t.find(s=>s.dataset.plSortableTab==="0")||t[0];for(let s of t)!s.dataset.plSortableTab&&s.hasAttribute("tabindex")||(s.dataset.plSortableTab=s===i?"0":"-1",s.tabIndex=s===i?0:-1,s.setAttribute("aria-roledescription",y("sortable.role",{},this.el)),s.setAttribute("aria-describedby",e.id))}setTabStop(t){for(let e of this.items)e.dataset.plSortableTab&&(e.dataset.plSortableTab=e===t?"0":"-1",e.tabIndex=e===t?0:-1)}onDown(t){if(this.session||this.kb||t.pointerType==="mouse"&&t.button!==0)return;let e=this.itemOf(t.target);if(!e||t.target===this.el)return;let{handle:i}=this.options;if(i){let o=t.target.closest(i);if(!o||!e.contains(o))return}else if(t.target.closest(qs))return;let s=t.pointerType==="touch";this.session={id:t.pointerId,item:e,x0:t.clientX,y0:t.clientY,x:t.clientX,y:t.clientY,started:!1,hold:s&&!i?setTimeout(()=>this.startDrag(),Fs):0,needsHold:s&&!i}}onMove(t){let e=this.session;if(!(!e||t.pointerId!==e.id)){if(e.x=t.clientX,e.y=t.clientY,!e.started){let i=Math.hypot(e.x-e.x0,e.y-e.y0);if(e.needsHold){i>8&&this.finishDrag(!0);return}if(i<this.options.threshold||(this.startDrag(),!this.session))return}t.cancelable&&t.preventDefault(),this.moveClone(),this.track()}}onUp(t,e=!1){let i=this.session;!i||t.pointerId!==i.id||this.finishDrag(e)}startDrag(){let t=this.session;if(!t||t.started)return;clearTimeout(t.hold);let{item:e}=t,i=this.items.indexOf(e);if(i<0||!this.emit("start",{item:e,index:i,from:i},!0)){this.session=null;return}t.started=!0,t.origin={parent:this.el,next:e.nextElementSibling,index:i};let s=e.getBoundingClientRect();t.offsetX=t.x0-s.left,t.offsetY=t.y0-s.top;let o=e.cloneNode(!0);o.removeAttribute("id"),o.removeAttribute("tabindex"),o.setAttribute("aria-hidden","true"),o.classList.add(this.options.clsDrag),Object.assign(o.style,{position:"fixed",left:"0",top:"0",width:`${s.width}px`,height:`${s.height}px`,margin:"0",boxSizing:"border-box",pointerEvents:"none"}),t.clone=o,(e.closest("dialog[open]")||document.body).append(o),this.moveClone(),e.classList.add(this.options.clsPlaceholder),document.documentElement.classList.add("pl-sortable-dragging"),getSelection?.()?.removeAllRanges();try{this.el.setPointerCapture(t.id)}catch{}t.needsHold&&navigator.vibrate?.(8);let n=()=>{this.session===t&&(this.autoScroll()&&this.track(),t.frame=requestAnimationFrame(n))};t.frame=requestAnimationFrame(n)}moveClone(){let t=this.session;t?.clone&&(t.clone.style.translate=`${t.x-t.offsetX}px ${t.y-t.offsetY}px`)}sortableAt(t){let{group:e}=this.options;for(;t;t=t.parentElement){let i=H(t,"sortable");if(i&&(i===this||e!==""&&i.options.group===e))return i}return null}track(){let t=this.session;if(!t?.started)return;let{item:e}=t,i=document.elementFromPoint(t.x,t.y),s=i&&this.sortableAt(i);if(!s)return;let o=i===s.el?null:s.itemOf(i);if(o===e)return;if(!o){e.parentElement!==s.el&&this.insert(s,null);return}if(Wt.has(o))return;let n=o.getBoundingClientRect(),a=e.getBoundingClientRect(),l;if(e.parentElement===s.el){l=!!(e.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING);let h=n.top<a.bottom-1&&n.bottom>a.top+1;if(h&&n.width>a.width+1){if(l?t.x>n.left+a.width:t.x<n.right-a.width)return}else if(!h&&n.height>a.height+1&&(l?t.y>n.top+a.height:t.y<n.bottom-a.height))return}else{let c=(o.nextElementSibling||o.previousElementSibling)?.getBoundingClientRect();l=(c?c.top<n.bottom-1&&c.bottom>n.top+1:!1)?t.x<n.left+n.width/2:t.y<n.top+n.height/2}this.insert(s,l?o:o.nextElementSibling)}insert(t,e){let{item:i}=this.session;if(e===i||i.parentElement===t.el&&i.nextElementSibling===e)return;let s=i.parentElement;Te([s,t.el],()=>De(t.el,i,e),this.options.animation)}autoScroll(){let t=this.session,e=64,i=20,s=document.scrollingElement||document.documentElement,o=(a,l,h)=>a<l+e?-i*Math.min(1,(l+e-a)/e):a>h-e?i*Math.min(1,(a-(h-e))/e):0,n=[];for(let a=t.item.parentElement;a&&a!==document.body&&a!==s;a=a.parentElement){let l=getComputedStyle(a);/(auto|scroll)/.test(l.overflowY+l.overflowX)&&n.push(a)}n.push(s);for(let a of n){let h=a===s?{top:0,left:0,bottom:innerHeight,right:innerWidth}:a.getBoundingClientRect(),c=o(t.y,Math.max(h.top,0),Math.min(h.bottom,innerHeight)),p=o(t.x,Math.max(h.left,0),Math.min(h.right,innerWidth)),m=a.scrollHeight-a.clientHeight,x=a.scrollWidth-a.clientWidth;if((c<0?a.scrollTop<=0:a.scrollTop>=m-1)&&(c=0),(p<0?a.scrollLeft<=0:a.scrollLeft>=x-1)&&(p=0),p||c)return a.scrollBy({left:p,top:c,behavior:"instant"}),!0}return!1}finishDrag(t=!1,e=!1){let i=this.session;if(!i||(this.session=null,clearTimeout(i.hold),!i.started))return;cancelAnimationFrame(i.frame);let{item:s,clone:o,origin:n}=i,{options:a}=this;if(document.documentElement.classList.remove("pl-sortable-dragging"),this.suppressClick=performance.now()+250,t&&(s.parentElement!==n.parent||s.nextElementSibling!==n.next)){let m=n.next?.parentElement===n.parent?n.next:null;Te([s.parentElement,n.parent],()=>De(n.parent,s,m),e?0:a.animation)}let l=()=>{o.remove(),s.classList.remove(a.clsPlaceholder)};if(e||S()||typeof o.animate!="function")l();else{let m=s.getBoundingClientRect(),x=getComputedStyle(o);o.classList.add("pl-sortable-drop"),o.animate([{translate:x.translate,rotate:x.rotate,scale:x.scale},{translate:`${m.left}px ${m.top}px`,rotate:"0deg",scale:"1"}],{duration:Math.max(a.animation,120)*1.2,easing:Yi,fill:"forwards"}).finished.then(l,l)}let h=H(s.parentElement,"sortable")||this,c=h.items.indexOf(s),p=n.index;this.refresh(),h!==this?(h.refresh(),this.emit("removed",{item:s,from:p,to:c,target:h}),h.emit("added",{item:s,from:p,to:c,source:this})):c!==p&&this.emit("moved",{item:s,from:p,to:c}),this.emit("stop",{item:s,from:p,to:c,target:h,cancelled:t})}label(t){let e=t.getAttribute("aria-label")||t.textContent.replace(/\s+/g," ").trim();return e.length>48?`${e.slice(0,48)}\u2026`:e}neighbor(t,e){let i=this.items,s=i.indexOf(t);if(e==="ArrowLeft")return i[s-1];if(e==="ArrowRight")return i[s+1];let o=e==="ArrowUp",n=t.getBoundingClientRect(),a=n.left+n.width/2,l=null,h=1/0;for(let c of i){if(c===t)continue;let p=c.getBoundingClientRect();if(o?p.bottom>n.top+1:p.top<n.bottom-1)continue;let m=Math.abs(p.top-n.top)*1e4+Math.abs(p.left+p.width/2-a);m<h&&(h=m,l=c)}return l||(o?i[s-1]:i[s+1])}onKey(t){let e=this.itemOf(t.target);if(!e||t.target!==e||this.session)return;let{key:i}=t,s=i.startsWith("Arrow"),o=this.items.length;if(!this.kb){if(i===" "){t.preventDefault();let n=this.items.indexOf(e);if(!this.emit("start",{item:e,index:n,from:n},!0))return;this.kb={item:e,next:e.nextElementSibling,index:n},e.classList.add("pl-sortable-grabbed"),si(y("sortable.lifted",{label:this.label(e),n:n+1,count:o},this.el))}else if(s||i==="Home"||i==="End"){let n=i==="Home"?this.items[0]:i==="End"?this.items[o-1]:this.neighbor(e,i);n&&(t.preventDefault(),n.focus())}return}if(s){t.preventDefault();let n=this.neighbor(e,i);if(!n)return;let a=i==="ArrowUp"||i==="ArrowLeft";this.kbMoving=!0,Te([this.el],()=>De(this.el,e,a?n:n.nextElementSibling),this.options.animation),e.focus({preventScroll:!0}),this.kbMoving=!1,e.scrollIntoView({block:"nearest",inline:"nearest"}),si(y("sortable.moved",{n:this.items.indexOf(e)+1,count:o},this.el))}else i===" "||i==="Enter"?(t.preventDefault(),this.dropKey()):i==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.dropKey(!0))}dropKey(t=!1){let e=this.kb;if(!e)return;this.kb=null;let{item:i}=e;if(i.classList.remove("pl-sortable-grabbed"),t){let n=document.activeElement===i;this.kbMoving=!0;let a=e.next?.parentElement===this.el?e.next:null;i.nextElementSibling!==a&&Te([this.el],()=>De(this.el,i,a),this.options.animation),n&&i.focus({preventScroll:!0}),this.kbMoving=!1}let s=this.items.indexOf(i),o=this.items.length;si(t?y("sortable.cancelled",{label:this.label(i),n:s+1,count:o},this.el):y("sortable.dropped",{label:this.label(i),n:s+1,count:o},this.el)),s!==e.index&&this.emit("moved",{item:i,from:e.index,to:s}),this.emit("stop",{item:i,from:e.index,to:s,target:this,cancelled:t})}};d(Vt,"defaults",{group:"",handle:"",animation:200,clsDrag:"pl-sortable-drag",clsPlaceholder:"pl-sortable-placeholder",clsEmpty:"pl-sortable-empty",threshold:5}),d(Vt,"primary","group");v("sortable",Vt);var yt="cubic-bezier(0.33, 0.5, 0.2, 1)",Yt="[data-pl-filter-control]";function Ki(r){let t=r.getAttribute("data-pl-filter-control")||"",e=se(t,{filter:"",group:"",sort:"",order:"asc"},"filter");for(let i of Object.keys(e))e[i]=e[i]===null?"":String(e[i]);return!("filter"in e)&&!("sort"in e)&&(e.filter=""),e}var Ut=class extends b{init(){this.state={filter:{"":""},sort:[]},this.pending=null;let{selActive:t}=this.options;(t?T(String(t),this.el):this.controls.filter(i=>i.classList.contains("pl-active"))).forEach(i=>this.merge(i));for(let i of this.controls)!i.matches("a, button")&&!i.querySelector("a, button")&&(i.setAttribute("role","button"),i.hasAttribute("tabindex")||(i.tabIndex=0));this.on(this.el,"click",i=>{let s=i.target.closest(Yt);!s||!this.el.contains(s)||(i.preventDefault(),this.apply(s))}),this.on(this.el,"keydown",i=>{if(i.key!=="Enter"&&i.key!==" ")return;let s=i.target;s.matches?.(`${Yt}[role="button"]`)?(i.preventDefault(),this.apply(s)):i.key===" "&&s.matches?.('a[role="button"]')&&s.closest(Yt)&&(i.preventDefault(),this.apply(s.closest(Yt)))}),this.onDestroy(()=>this.finishAnimations()),this.setState(this.state,!1)}get controls(){return T(Yt,this.el)}get targets(){let{target:t}=this.options;if(!t)return[];let e=T(t,this.el);return e.length?e:T(t)}get visible(){return this.targets.flatMap(t=>[...t.children].filter(e=>!e.hidden))}getState(){return{filter:{...this.state.filter},sort:[...this.state.sort]}}merge(t,e=this.state){let i=Ki(t);return"filter"in i&&(i.group?(delete e.filter[""],e.filter[i.group]=i.filter):e.filter={"":i.filter}),"sort"in i&&(e.sort=i.sort?[i.sort,i.order==="desc"?"desc":"asc"]:[]),e}isActive(t){let e=Ki(t),{filter:i,sort:s}=this.state,o=!0;if("filter"in e){let n=e.group||"";o=n in i?i[n]===e.filter:!e.filter&&n!==""&&!i[""]}return o&&"sort"in e&&(o=s[0]===e.sort&&(s[1]||"asc")===(e.order==="desc"?"desc":"asc")),o}apply(t){return this.setState(this.merge(t,this.getState()))}reset(){return this.setState({filter:{"":""},sort:this.state.sort})}setState(t,e=!0){if(t={filter:{...t.filter||{"":""}},sort:[...t.sort||[]]},!this.emit("beforefilter",{state:t},!0))return Promise.resolve();this.state=t;for(let o of this.controls){let n=this.isActive(o);o.classList.toggle("pl-active",n);let a=o.matches('a, button, [role="button"]')?o:o.querySelector("a, button");a&&(a.matches("a")&&!a.hasAttribute("role")&&a.setAttribute("role","button"),a.setAttribute("aria-pressed",String(n)))}this.finishAnimations();let i=e&&!S()&&this.options.duration>0?this.options.animation:!1,s=this.targets.map(o=>this.filterTarget(o,i));return Promise.all(s).then(()=>{if(this.state!==t)return;let o=this.visible;for(let n of T(".pl-filter-empty",this.el))n.hidden=o.length>0;this.emit("afterfilter",{state:t,items:o})})}filterTarget(t,e){let i=[...t.children],s=Object.values(this.state.filter).filter(Boolean),o=c=>s.every(p=>{try{return c.matches(p)}catch{return!0}}),[n,a]=this.state.sort,l=i;if(n){let c=new Intl.Collator(q(this.el),{numeric:!0,sensitivity:"base"}),p=(m,x)=>c.compare(m,x);l=[...i].sort((m,x)=>p(m.getAttribute(n)||"",x.getAttribute(n)||"")*(a==="desc"?-1:1))}let h=()=>{for(let c of i)c.hidden=!o(c);l.some((c,p)=>c!==i[p])&&t.append(...l)};return!e||typeof t.animate!="function"?(h(),Promise.resolve()):e==="slide"?this.slide(t,i,h):this.fade(t,i,h,e==="delayed-fade")}finishAnimations(){let t=this.pending;this.pending=null,t?.forEach(e=>e())}track(t,e){let i=!1,s=()=>{i||(i=!0,t.forEach(o=>o.cancel()),e?.())};return(this.pending||(this.pending=[])).push(s),Promise.allSettled(t.map(o=>o.finished)).then(s)}slide(t,e,i){let{duration:s}=this.options,o=new Map(e.filter(x=>!x.hidden).map(x=>[x,x.getBoundingClientRect()])),n=t.offsetHeight;i();let a=t.offsetHeight,l=new Map(e.filter(x=>!x.hidden).map(x=>[x,x.getBoundingClientRect()])),h=t.getBoundingClientRect(),c=[],p=[],m=t.style.cssText;getComputedStyle(t).position==="static"&&(t.style.position="relative"),p.push(()=>t.style.cssText=m);for(let x of e){let f=o.get(x),u=l.get(x);if(f&&u){let g=f.left-u.left,w=f.top-u.top;if(Math.abs(g)<.5&&Math.abs(w)<.5)continue;c.push(x.animate([{transform:`translate(${g}px, ${w}px)`},{transform:"none"}],{duration:s,easing:yt}))}else if(u)c.push(x.animate([{opacity:0,transform:"scale(0.9)"},{opacity:1,transform:"none"}],{duration:s,delay:s*.2,easing:yt,fill:"backwards"}));else if(f){let g=x.style.cssText;x.hidden=!1,Object.assign(x.style,{position:"absolute",left:`${f.left-h.left-t.clientLeft+t.scrollLeft}px`,top:`${f.top-h.top-t.clientTop+t.scrollTop}px`,width:`${f.width}px`,height:`${f.height}px`,margin:"0",boxSizing:"border-box",pointerEvents:"none"}),p.push(()=>{x.style.cssText=g,x.hidden=!0}),c.push(x.animate([{opacity:1,transform:"none"},{opacity:0,transform:"scale(0.88)"}],{duration:s*.8,easing:yt,fill:"forwards"}))}}return Math.abs(n-a)>1&&c.push(t.animate([{height:`${n}px`},{height:`${a}px`}],{duration:s,easing:yt})),this.track(c,()=>p.forEach(x=>x()))}async fade(t,e,i,s){let{duration:o}=this.options,n=o/2,a=s?Math.min(45,o/4):0,l=this.state,h=e.filter(p=>!p.hidden).map((p,m)=>p.animate([{opacity:1},{opacity:0,transform:s?"translateY(-6px)":"none"}],{duration:n,delay:m*a,easing:yt,fill:"forwards"}));if(await this.track(h),this.state!==l)return;i();let c=[...t.children].filter(p=>!p.hidden).map((p,m)=>p.animate([{opacity:0,transform:s?"translateY(8px)":"none"},{opacity:1,transform:"none"}],{duration:n,delay:m*a,easing:yt,fill:"backwards"}));await this.track(c)}};d(Ut,"defaults",{target:"",selActive:!1,animation:"slide",duration:250}),d(Ut,"primary","target");v("filter",Ut);var Rs=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,Kt=class extends b{init(){let{el:t,options:e}=this;if(this.native=t.matches("video, audio"),this.provider=this.native?null:this.detectProvider(),this.ready=this.native,this.wanted=!1,!this.native&&!this.provider)return;if(this.provider){this.on(t,"load",()=>{this.ready=!0,this.wanted&&this.play()});let{signal:s}=this;setTimeout(()=>{s.aborted||this.ready||(this.ready=!0,this.wanted&&this.play())},1500)}let i=e.autoplay;if(i==="hover"){let s=String(e.hoverTarget||""),o=e.hoverTarget?s.startsWith("!")?t.closest(s.slice(1).trim())||t:document.querySelector(s)||t:t;this.native&&(t.preload=t.getAttribute("preload")||"metadata"),this.on(o,"pointerenter",()=>this.play()),this.on(o,"pointerleave",()=>this.pause()),this.on(o,"focusin",()=>this.play()),this.on(o,"focusout",n=>{o.contains(n.relatedTarget)||this.pause()});return}if(!(i===!1||i==="false")){if(Rs()){this.native&&(t.removeAttribute("autoplay"),t.pause(),!t.controls&&!t.closest("a, button")&&(t.controls=!0));return}if(i==="inview"&&typeof IntersectionObserver=="function"){let s=new IntersectionObserver(([o])=>o.isIntersecting?this.play():this.pause(),{threshold:Number(e.threshold)||0});s.observe(t),this.onDestroy(()=>s.disconnect()),this.on(document,"visibilitychange",()=>{document.hidden?this.pause(!0):this.wanted&&this.play()})}else this.play()}}detectProvider(){let t=this.el.getAttribute("src")||"";return this.el.matches("iframe")?/youtube(-nocookie)?\.com|youtu\.be/.test(t)?"youtube":/vimeo\.com/.test(t)?"vimeo":null:null}post(t){try{this.el.contentWindow?.postMessage(JSON.stringify(t),"*")}catch{}}mute(){let{el:t}=this;this.native?t.muted=!0:this.provider==="youtube"?this.post({event:"command",func:"mute",args:[]}):this.post({method:"setVolume",value:0})}play(){let{el:t,options:e}=this;this.wanted=!0,this.ready&&(e.automute&&this.mute(),this.native?(t.playsInline=!0,t.play()?.catch?.(()=>{})):this.provider==="youtube"?this.post({event:"command",func:"playVideo",args:[]}):this.post({method:"play"}),this.emit("play"))}pause(t=!1){let{el:e,options:i}=this;t||(this.wanted=!1),this.ready&&(this.native?(e.pause(),i.rewind&&(e.currentTime=0)):this.provider==="youtube"?(this.post({event:"command",func:"pauseVideo",args:[]}),i.rewind&&this.post({event:"command",func:"seekTo",args:[0,!0]})):(this.post({method:"pause"}),i.rewind&&this.post({method:"setCurrentTime",value:0})),this.emit("pause"))}};d(Kt,"defaults",{autoplay:"inview",automute:!0,hoverTarget:!1,rewind:!1,threshold:.25}),d(Kt,"primary","autoplay");v("video",Kt);var _i={linear:r=>r,"ease-out":r=>1-(1-r)**4,"ease-in-out":r=>r<.5?8*r**4:1-(-2*r+2)**4/2},_t=class extends b{init(){let{el:t,options:e}=this;this.frame=0,this.timer=0,this.done=!1;let i=t.textContent.trim();if(e.locale??(e.locale=q(t)),e.to===null||e.to===""){let s=(()=>{try{return new Intl.NumberFormat(e.locale).format(1.5).replace(/\d/g,"")||"."}catch{return"."}})(),o=i.replace(new RegExp(`[^\\d\\-${s==="."?"\\.":s}]`,"g"),""),n=parseFloat(s==="."?o:o.replace(s,"."));this.to=Number.isNaN(n)?0:n}else this.to=Number(e.to)||0;this.from=Number(e.from)||0;try{this.formatter=new Intl.NumberFormat(e.locale||"en",{minimumFractionDigits:e.decimals,maximumFractionDigits:e.decimals,useGrouping:"always"})}catch{this.formatter=new Intl.NumberFormat("en",{minimumFractionDigits:e.decimals,maximumFractionDigits:e.decimals})}if(this.visual=document.createElement("span"),this.visual.setAttribute("aria-hidden","true"),this.label=document.createElement("span"),this.label.textContent=this.format(this.to),Object.assign(this.label.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"}),t.textContent="",t.append(this.visual,this.label),t.style.fontVariantNumeric="tabular-nums",this.render(this.from),e.autostart&&typeof IntersectionObserver=="function"){let s=new IntersectionObserver(([o])=>{o.isIntersecting?(e.once&&s.disconnect(),this.start()):e.once||this.reset()},{threshold:.2});s.observe(t),this.onDestroy(()=>s.disconnect())}this.onDestroy(()=>this.stop())}format(t){let{separator:e,decimal:i,prefix:s,suffix:o}=this.options,n;return e===null&&i===null?n=this.formatter.format(t):n=this.formatter.formatToParts(t).map(a=>a.type==="group"&&e!==null?String(e):a.type==="decimal"&&i!==null?String(i):a.value).join(""),`${s??""}${n}${o??""}`}render(t){this.visual.textContent=this.format(t)}stop(){cancelAnimationFrame(this.frame),clearTimeout(this.timer),this.frame=0,this.timer=0}reset(){this.stop(),this.done=!1,this.render(this.from)}start(t){let{options:e}=this;typeof t=="number"&&(this.to=t,this.label.textContent=this.format(t)),this.stop(),this.emit("start",{value:this.from});let i=()=>{this.render(this.to),this.done=!0,this.emit("complete",{value:this.to})},s=Number(e.duration)||0;if(!s||S()){i();return}let o=_i[e.easing]||_i["ease-out"],{from:n,to:a}=this,l=()=>{let h=performance.now(),c=p=>{let m=Math.min((p-h)/s,1);m<1?(this.render(n+(a-n)*o(m)),this.frame=requestAnimationFrame(c)):(this.frame=0,i())};this.frame=requestAnimationFrame(c)};e.delay?this.timer=setTimeout(l,Number(e.delay)):l()}};d(_t,"defaults",{to:null,from:0,duration:1600,delay:0,decimals:0,separator:null,decimal:null,prefix:"",suffix:"",locale:null,easing:"ease-out",once:!0,autostart:!0}),d(_t,"primary","to");v("counter",_t);var Xt=class extends b{init(){this.update=z(()=>this.match()),this.observed=new Set,typeof ResizeObserver=="function"&&(this.observer=new ResizeObserver(this.update),this.observer.observe(this.el),this.onDestroy(()=>this.observer.disconnect()));let t=new MutationObserver(this.update);t.observe(this.el,{childList:!0,subtree:!0,characterData:!0}),this.onDestroy(()=>t.disconnect()),this.on(window,"resize",this.update,{passive:!0}),this.on(window,"load",this.update),document.fonts?.ready.then(this.update).catch(()=>{}),this.onDestroy(()=>this.targets.forEach(e=>e.style.minHeight="")),this.match()}get targets(){let t=String(this.options.target||"> *").trim(),e;try{e=t.startsWith(">")?C(this.el,t):[...this.el.querySelectorAll(t)]}catch{e=[]}return e.filter(i=>i.getClientRects().length)}match(){let t=this.targets;if(this.observer)for(let s of t)this.observed.has(s)||(this.observed.add(s),this.observer.observe(s));t.forEach(s=>s.style.minHeight="");let e=t.map(s=>{let o=s.getBoundingClientRect();return{target:s,top:Math.round(o.top),height:s.offsetHeight}}),i=[];if(this.options.row)for(let s of e){let o=i.find(n=>Math.abs(n.top-s.top)<=2);o?o.items.push(s):i.push({top:s.top,items:[s]})}else i.push({top:0,items:e});for(let{items:s}of i){if(s.length<2)continue;let o=Math.max(...s.map(n=>n.height));for(let{target:n,height:a}of s){if(a===o)continue;let l=o,h=getComputedStyle(n);h.boxSizing!=="border-box"&&(l-=parseFloat(h.paddingTop)+parseFloat(h.paddingBottom)+parseFloat(h.borderTopWidth)+parseFloat(h.borderBottomWidth)),n.style.minHeight=`${l}px`}}this.emit("match",{targets:t})}};d(Xt,"defaults",{target:"> *",row:!0}),d(Xt,"primary","target");var oi=typeof CSS<"u"&&CSS.supports?.("height","100svh")?"svh":"vh",Ce=class extends b{init(){if(this.update=z(()=>this.resize()),this.on(window,"resize",this.update,{passive:!0}),this.on(window,"load",this.update),document.fonts?.ready.then(this.update).catch(()=>{}),typeof ResizeObserver=="function"&&this.options.expand){let t=new ResizeObserver(this.update);t.observe(document.body),this.onDestroy(()=>t.disconnect())}this.onDestroy(()=>this.el.style.minHeight=""),this.resize()}bottomOffset(){let{el:t}=this,e=this.options.offsetBottom;return e===!1||e===null||e===""?"":e===!0?`${t.nextElementSibling?.offsetHeight||0}px`:typeof e=="number"?e<=100?`${e}${oi}`:`${e}px`:/^-?[\d.]+(px|vh|svh|dvh|rem|em)$/.test(e)?e:`${E(e)?.offsetHeight||0}px`}resize(){let{el:t,options:e}=this;if(!t.getClientRects().length)return;let i=Number(e.min)||0,s;if(e.expand){t.style.minHeight="";let o=window.innerHeight-document.documentElement.offsetHeight;s=o>0?`${t.offsetHeight+o}px`:"",i&&(!s||parseFloat(s)<i)&&(s=`${i}px`)}else{let o=[];if(e.offsetTop===!0){let l=t.getBoundingClientRect().top+window.scrollY;l<window.innerHeight/2&&o.push(`${Math.round(l)}px`)}else typeof e.offsetTop=="number"&&e.offsetTop&&o.push(`${e.offsetTop}px`);let n=this.bottomOffset();n&&o.push(n);let a=o.length?`calc(100${oi} - ${o.join(" - ")})`:`100${oi}`;s=i?`max(${i}px, ${a})`:a}t.style.minHeight!==s&&(t.style.minHeight=s),this.emit("resize",{height:t.offsetHeight})}};d(Ce,"defaults",{offsetTop:!1,offsetBottom:!1,expand:!1,min:0});v("height-match",Xt);v("height-viewport",Ce);var Gt=class extends b{init(){let t=()=>this.options.target?[...this.el.querySelectorAll(`:scope ${this.options.target}`)]:[this.el],e=z(i=>{for(let s of t()){let o=s.getBoundingClientRect();s.style.setProperty("--pl-spot-x",`${i.clientX-o.left}px`),s.style.setProperty("--pl-spot-y",`${i.clientY-o.top}px`),s.classList.add("pl-spotlight","pl-spotlight-active")}});this.on(this.el,"pointermove",e),this.on(this.el,"pointerleave",()=>{requestAnimationFrame(()=>t().forEach(i=>i.classList.remove("pl-spotlight-active")))})}};d(Gt,"defaults",{target:null}),d(Gt,"primary","target");v("spotlight",Gt);typeof window<"u"&&(window.Plossy=O,bi());var Yr=O;})();
72
+ </div>`,this.el=o,this.stage=o.querySelector(".pl-lightbox-stage"),this.counter=o.querySelector(".pl-lightbox-counter"),this.caption=o.querySelector(".pl-lightbox-caption"),this.thumbs=o.querySelector(".pl-lightbox-thumbs"),this.prevButton=o.querySelector(".pl-lightbox-previous"),this.nextButton=o.querySelector(".pl-lightbox-next"),this.thumbs&&this.items.forEach((n,a)=>{let l=document.createElement("button");l.type="button",l.className="pl-lightbox-thumb",l.setAttribute("role","tab"),l.setAttribute("aria-label",`${y("lightbox.item",{n:a+1},this.el)}${n.caption?`: ${n.caption}`:""}`);let h=n.thumb||(n.type==="image"?n.source:"");if(h){let c=document.createElement("img");c.src=h,c.alt="",c.loading="lazy",c.draggable=!1,l.append(c)}else l.innerHTML=Ge.play;l.addEventListener("click",()=>this.go(a)),this.thumbs.append(l)}),o.addEventListener("click",n=>{if(this.swiped)return void(this.swiped=!1);let a=n.target;if(a.closest(".pl-lightbox-close"))return void this.hide();if(a.closest(".pl-lightbox-previous"))return void this.prev();if(a.closest(".pl-lightbox-next"))return void this.next();a.closest(".pl-lightbox-media, .pl-lightbox-error, .pl-lightbox-thumbs, .pl-lightbox-caption, button, a")||this.hide()}),o.addEventListener("keydown",n=>{if(n.defaultPrevented)return;let a=n.target.matches?.("video, input, textarea, select"),h={Escape:()=>this.hide(),ArrowLeft:()=>!a&&this.prev(),ArrowRight:()=>!a&&this.next(),Home:()=>!a&&this.go(0),End:()=>!a&&this.go(this.items.length-1)}[n.key];!h||a&&n.key!=="Escape"||(n.preventDefault(),h())}),o.addEventListener("cancel",n=>{n.preventDefault(),this.hide()}),o.addEventListener("close",()=>{this.state!=="closed"&&this.finish()}),this.onResize=()=>this.stage.querySelectorAll("[data-fit]").forEach(n=>this.fit(n)),window.addEventListener("resize",this.onResize,{passive:!0}),this.bindSwipe()}bindSwipe(){let t=this.stage,e=null;t.addEventListener("pointerdown",s=>{this.swiped=!1,!(s.pointerType==="mouse"||s.target.closest("video, iframe, button"))&&(e={x:s.clientX,y:s.clientY,dx:0,dy:0,axis:null,item:this.current})}),t.addEventListener("pointermove",s=>{if(!(!e||!e.item)){if(e.dx=s.clientX-e.x,e.dy=s.clientY-e.y,!e.axis){if(Math.hypot(e.dx,e.dy)<10)return;e.axis=Math.abs(e.dx)>Math.abs(e.dy)?"x":"y",e.item.classList.remove("pl-lightbox-snap","pl-lightbox-enter","pl-lightbox-first")}if(e.axis==="x"){let o=this.target(this.index+(e.dx<0?1:-1))===null;e.item.style.translate=`${e.dx*(o?.25:1)}px 0px`}else e.item.style.translate=`0px ${e.dy}px`,e.item.style.opacity=String(Math.max(.3,1-Math.abs(e.dy)/400))}});let i=s=>{if(!e)return;let{dx:o,dy:n,axis:a,item:l}=e;if(e=null,!a||!l)return;this.swiped=!0,setTimeout(()=>this.swiped=!1,350);let h=s.type==="pointercancel";if(!h&&a==="x"&&Math.abs(o)>56&&this.target(this.index+(o<0?1:-1))!==null)return void(o<0?this.next():this.prev());if(!h&&a==="y"&&Math.abs(n)>90)return void this.hide();l.classList.add("pl-lightbox-snap"),l.style.translate="0px 0px",l.style.opacity=""};t.addEventListener("pointerup",i),t.addEventListener("pointercancel",i)}target(t){let e=this.items.length;return e?this.options.loop&&e>1?(t%e+e)%e:t<0||t>=e?null:t:null}render(t){let e=document.createElement("div");e.className="pl-lightbox-item pl-loading",e.dataset.type=t.type;let i=document.createElement("div");i.className="pl-lightbox-spinner",i.setAttribute("role","status"),i.setAttribute("aria-label",y("loading",{},this.el));let s=()=>{e.classList.remove("pl-loading"),i.remove()},o=()=>{s();let a=document.createElement("div");a.className="pl-lightbox-error",a.textContent=y("lightbox.error",{},this.el),e.querySelector(".pl-lightbox-media")?.replaceWith(a)},n;if(t.type==="video")n=document.createElement("video"),n.controls=!0,n.playsInline=!0,n.preload="metadata",t.poster&&(n.poster=t.poster),n.addEventListener("loadedmetadata",s,{once:!0}),n.addEventListener("error",o,{once:!0}),n.src=t.source;else if(t.type==="iframe")n=document.createElement("iframe"),n.allow="autoplay; fullscreen; picture-in-picture; encrypted-media",n.allowFullscreen=!0,n.title=t.caption||y("lightbox.embed",{},this.el),n.addEventListener("load",s,{once:!0}),n.src=Ss(t.source);else{n=document.createElement("img"),n.alt=t.alt||t.caption||"",n.draggable=!1;let a=/\.svg([?#].*)?$/i.test(t.source);n.addEventListener("load",()=>{a&&this.fit(e),s()},{once:!0}),n.addEventListener("error",o,{once:!0}),a&&(e.dataset.fit=""),n.src=t.source,n.complete&&n.naturalWidth&&s()}return n.classList.add("pl-lightbox-media"),e.append(i,n),e}fit(t){let e=t.querySelector("img.pl-lightbox-media");if(!e?.naturalWidth||!e.naturalHeight)return;let i=getComputedStyle(t),s=t.clientWidth-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight),o=t.clientHeight-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom);if(s<=0||o<=0)return;let n=e.naturalWidth/e.naturalHeight,a=Math.min(s,o*n,1600);e.style.width=`${Math.round(a)}px`,e.style.height=`${Math.round(a/n)}px`}preload(t){let e=this.items[this.target(t)??-1];!e||e.type!=="image"||e.preloaded||(e.preloaded=!0,new Image().src=e.source)}go(t,e,i=!1){if(t=this.target(t),t===null||this.state==="closed"||this.state==="closing"||t===this.index&&this.current)return;let s=this.items.length,o=this.index;e===void 0&&(e=t>o?1:-1,this.options.loop&&s>2&&Math.abs(t-o)===s-1&&(e=-e));let n=this.current,a=this.items[t],l=this.render(a);if(l.style.setProperty("--pl-lightbox-dir",String(e)),i||l.classList.add("pl-lightbox-enter"),this.stage.append(l),this.current=l,this.index=t,n&&(n.querySelectorAll("video").forEach(h=>h.pause()),n.style.setProperty("--pl-lightbox-dir",String(e)),n.classList.remove("pl-lightbox-enter","pl-lightbox-first","pl-lightbox-snap"),n.classList.add("pl-lightbox-leave"),n.setAttribute("aria-hidden","true"),Ze([n],800).then(()=>n.remove())),this.counter&&(this.counter.innerHTML=`<b>${t+1}</b> / ${s}`),this.caption.textContent=a.caption||"",this.thumbs){[...this.thumbs.children].forEach((c,p)=>{c.classList.toggle("pl-active",p===t),c.setAttribute("aria-selected",String(p===t))});let h=this.thumbs.children[t];if(h){let c=h.offsetLeft-(this.thumbs.clientWidth-h.offsetWidth)/2;this.thumbs.scrollTo({left:c,behavior:i||S()?"auto":"smooth"})}}return this.prevButton&&(this.prevButton.disabled=this.target(t-1)===null),this.nextButton&&(this.nextButton.disabled=this.target(t+1)===null),this.preload(t+1),this.preload(t-1),this.emit("itemshow"),l}next(){this.go(this.index+1,1)}prev(){this.go(this.index-1,-1)}origin(t){let e=this.items[t]?.el;return e?.querySelector?.("img, picture, video")||e||null}flipFrames(t,e){let i=e.getBoundingClientRect(),s=t.getBoundingClientRect();if(!Ts(i)||!s.width||!s.height)return null;let o=Math.max(i.width/s.width,i.height/s.height),n=i.left+i.width/2-(s.left+s.width/2),a=i.top+i.height/2-(s.top+s.height/2),l=Math.max(0,(s.width-i.width/o)/2),h=Math.max(0,(s.height-i.height/o)/2),c=(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0)/o,p=parseFloat(getComputedStyle(t).borderTopLeftRadius)||0;return[{transform:`translate(${n}px, ${a}px) scale(${o})`,clipPath:`inset(${h}px ${l}px round ${c}px)`},{transform:"translate(0px, 0px) scale(1)",clipPath:`inset(0px 0px round ${p}px)`}]}async zoomIn(t,e){let i=t.querySelector("img.pl-lightbox-media");if(!i||!e||S()||(t.classList.add("pl-lightbox-pending"),await Promise.race([i.decode?.().catch(()=>{})??Je(0),Je(280)]),t.classList.remove("pl-lightbox-pending"),!i.complete||!i.naturalWidth||this.current!==t||this.state!=="open"))return!1;t.classList.remove("pl-loading"),"fit"in t.dataset&&this.fit(t);let s=this.flipFrames(i,e);if(!s)return!1;let o={duration:560,easing:$s(),fill:"backwards"};try{i.animate(s,o)}catch{i.animate(s,{...o,easing:"cubic-bezier(0.33, 0.5, 0.2, 1)"})}return!0}zoomOut(){let t=this.current,e=t?.querySelector("img.pl-lightbox-media"),i=this.origin(this.index);if(!e||!i?.isConnected||!e.naturalWidth||S()||t.style.translate)return!1;let s=this.flipFrames(e,i);return s?(this.el.classList.add("pl-lightbox-zooming"),e.animate(s.reverse(),{duration:300,easing:"cubic-bezier(0.3, 0, 0.2, 1)",fill:"forwards"}),!0):!1}async show(t=this.start){if(this.state!=="closed"||!this.items.length)return this;this.el||this.build();let e=this.el;t=this.target(t)??0,this.opener=document.activeElement,document.body.append(e),At(),this.state="open";try{e.showModal()}catch(o){return console.error("[Plossy] lightbox:",o),this.finish(),this}let i=this.go(t,1,!0);return this.emit("show"),!(i&&await this.zoomIn(i,this.items[t].el?this.origin(t):null))&&i?.isConnected&&this.state==="open"&&i.classList.add("pl-lightbox-first"),i&&await Ze([i,i.querySelector(".pl-lightbox-media")]),this.state==="open"&&this.emit("shown"),this}hide(){if(this.state!=="open")return this.closing||Promise.resolve();this.state="closing",this.emit("hide"),this.zoomOut(),this.el.classList.add("pl-closing");let t=this.current;return this.closing=Ze([this.el.querySelector(".pl-lightbox-backdrop"),t,t?.querySelector(".pl-lightbox-media")]).then(()=>this.finish()),this.closing}finish(){if(this.state==="closed")return;let t=this.index,e=this.items[t];this.state="closed",this.closing=null;let i=this.el;i&&(i.querySelectorAll("video").forEach(o=>o.pause()),i.open&&i.close()),window.removeEventListener("resize",this.onResize),dt();let s=e?.el?.isConnected?e.el:this.opener;s?.isConnected&&s!==document.body&&s.focus?.({preventScroll:!0}),this.emit("hidden",{index:t,item:e}),i?.remove(),this.el=null,this.current=null,this.index=-1}destroy(){this.finish()}},Me=class extends x{init(){this.panel=null,this.on(this.el,"click",t=>{if(t.defaultPrevented||t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=t.target.closest("a[href]");if(!e)return;let i=this.links.indexOf(e);i<0||(t.preventDefault(),this.show(i))}),this.onDestroy(()=>this.panel?.destroy())}get links(){return(this.el.matches("a[href]")?[this.el]:T("a[href]",this.el)).filter(e=>!e.closest("[data-pl-lightbox-ignore]")&&Qe(e.getAttribute("href"),e.dataset.type))}get items(){return this.links.map(t=>{let e=t.querySelector("img"),i=t.getAttribute("href");return{source:i,type:Qe(i,t.dataset.type),caption:t.dataset.caption??(e?.alt||t.title||""),alt:e?.alt||t.dataset.alt||"",thumb:t.dataset.thumb||e?.currentSrc||e?.src||"",poster:t.dataset.poster||"",el:t}})}get index(){return this.panel?.index??-1}show(t=0){if(this.panel&&this.panel.state!=="closed")return this.panel.go(t),Promise.resolve(this.panel);let e=this.items;return e.length?(this.panel=new ke({...this.options,items:e,index:t,emit:(i,s)=>this.emit(i,s)}),this.panel.show(t)):Promise.resolve(null)}hide(){return this.panel?.hide()??Promise.resolve()}next(){this.panel?.next()}prev(){this.panel?.prev()}};d(Me,"defaults",{animation:"slide",loop:!0,thumbs:!1,counter:!0});v("lightbox",Me);O.lightboxPanel=(r={})=>{let t=new ke(r);return t.show(r.index??0),t};var Ds={s:640,m:960,l:1200,xl:1600};function Cs(r){return r===!1||r===null||r===void 0||r===""?null:(typeof r=="string"&&r.startsWith("@")&&(r=Ds[r.slice(1)]??0),typeof r=="number"||/^\d+$/.test(r)?matchMedia(`(min-width: ${r}px)`):matchMedia(r))}var ft=(r,t,e,i=!1)=>{let s=new CustomEvent(`pl:${t}`,{bubbles:!0,cancelable:i,detail:e});return r.dispatchEvent(s),!s.defaultPrevented},Bt=class extends x{init(){let{el:t,options:e}=this;this.media=Cs(e.media),this.hoverTimer=0,this.busy=!1;let i=String(e.mode).split(",").map(o=>o.trim());if(t.matches("button, a[href], input, summary")||(t.setAttribute("role","button"),t.hasAttribute("tabindex")||(t.tabIndex=0),this.on(t,"keydown",o=>{o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),this.toggle())})),this.on(t,"click",o=>{this.enabled&&((t.matches('a[href^="#"]')||this.targets.length)&&o.preventDefault(),!(i.includes("hover")&&!i.includes("click")&&o.pointerType==="mouse")&&this.toggle())}),i.includes("hover")){let o=a=>{a.pointerType!=="mouse"||!this.enabled||(clearTimeout(this.hoverTimer),this.isToggled()||this.toggle())},n=a=>{a.pointerType!=="mouse"||!this.enabled||(clearTimeout(this.hoverTimer),this.hoverTimer=setTimeout(()=>{![t,...this.targets].some(h=>h.matches(":hover"))&&this.isToggled()&&this.toggle()},160))};this.on(t,"pointerenter",o),this.on(t,"pointerleave",n),this.on(document,"pointerout",a=>{let l=this.targets.find(h=>h.contains(a.target));l&&!l.contains(a.relatedTarget)&&n(a)}),this.onDestroy(()=>clearTimeout(this.hoverTimer))}let s=o=>{o.detail?.component!==this&&this.targets.includes(o.target)&&queueMicrotask(()=>this.sync())};for(let o of["pl:show","pl:shown","pl:hide","pl:hidden"])this.on(document,o,s);this.on(document,"close",s,!0),this.sync()}get enabled(){return!this.media||this.media.matches}get targets(){let{el:t,options:e}=this,i=e.target;if(!i){let s=t.getAttribute("href");i=s&&s.length>1&&s.startsWith("#")?s:"next"}return C(t,i)}overlay(t){for(let e of["modal","offcanvas"])if(t.hasAttribute(`data-pl-${e}`))return H(t,e)||O[e]?.(t)||null;return H(t,"modal")||H(t,"offcanvas")}shown(t){return this.overlay(t)?t.matches("dialog")?t.open:t.classList.contains("pl-open"):this.options.cls?this.classes.every(e=>t.classList.contains(e)):!t.hidden}get classes(){return String(this.options.cls).split(/[\s,]+/).filter(Boolean)}isToggled(){return this.targets.some(t=>this.shown(t))}sync(){let t=this.targets;if(!t.length)return;let e=t.some(i=>this.shown(i));this.el.setAttribute("aria-expanded",String(e)),this.el.setAttribute("aria-controls",t.map(i=>i.id||(i.id=k("pl-toggle"))).join(" ")),this.el.classList.toggle("pl-active",e)}async toggle(){let t=this.targets;if(!(!t.length||this.busy)){if(this.options.queued&&t.length>1){let e=t.findIndex(s=>this.shown(s)),i=t[(e+1)%t.length];this.busy=!0;try{e>-1&&await this.set(t[e],!1),await this.set(i,!0)}finally{this.busy=!1}}else await Promise.all(t.map(e=>this.set(e,!this.shown(e))));this.sync()}}async set(t,e){let i=this.overlay(t);if(i){typeof i.toggle=="function"&&i.toggle(this.el);return}let s={component:this,toggle:this.el};if(!ft(t,e?"beforeshow":"beforehide",s,!0))return;let{signal:o}=this,{cls:n,animation:a,duration:l}=this.options;if(n)this.classes.forEach(h=>t.classList.toggle(h,e)),ft(t,e?"show":"hide",s),this.syncState(e),await D(t);else if(a===!0)ft(t,e?"show":"hide",s),this.syncState(e),await J(t,e,{duration:l});else if(a&&!S()){let[h,c]=String(a).split(",").map(p=>p.trim().split(/\s+/).filter(Boolean));if(ft(t,e?"show":"hide",s),this.syncState(e),e)t.hidden=!1,t.classList.add(...h),await D(t),t.classList.remove(...h);else{let p=c?.length?c:[...h,"pl-animation-reverse"];t.classList.add(...p),await D(t),o.aborted||(t.hidden=!0),t.classList.remove(...p)}}else t.hidden=!e,ft(t,e?"show":"hide",s);o.aborted||ft(t,e?"shown":"hidden",s)}syncState(t){this.el.setAttribute("aria-expanded",String(t)),this.el.classList.toggle("pl-active",t)}};d(Bt,"defaults",{target:null,cls:"",animation:!1,mode:"click",queued:!1,media:!1,duration:360}),d(Bt,"primary","target");v("toggle",Bt);var Os=".pl-nav-header, .pl-nav-divider, .pl-tab-indicator, [hidden]",qt=class extends x{init(){let{el:t,options:e}=this;this.current=-1,this.token=0;let i=this.items,s=i.findIndex(n=>n.classList.contains("pl-active"));if(typeof e.active=="number"&&(s=e.active),e.followHash){let n=this.indexFromHash();n>-1&&(s=n)}if((s<0||!i[s]||this.disabled(i[s]))&&(s=i.findIndex(n=>!this.disabled(n))),this.on(t,"click",n=>{let a=this.itemOf(n.target);a&&(n.target.closest("a")&&n.preventDefault(),!this.disabled(a)&&this.show(this.items.indexOf(a)))}),this.on(t,"keydown",n=>this.onKeydown(n)),this.on(document,"click",n=>{let a=n.target.closest?.("[data-pl-switcher-item]");if(!a||!this.containerOf(a))return;n.preventDefault();let h=a.getAttribute("data-pl-switcher-item");this.show(/^\d+$/.test(h)?Number(h):h)}),e.swiping&&this.bindSwipe(),e.followHash&&this.on(window,"hashchange",()=>{let n=this.indexFromHash();n>-1&&this.show(n)}),this.updateIndicator=z(()=>this.setIndicator()),typeof ResizeObserver=="function"){let n=new ResizeObserver(this.updateIndicator);n.observe(t),i.forEach(a=>n.observe(a)),this.onDestroy(()=>n.disconnect())}this.on(window,"resize",this.updateIndicator,{passive:!0});let{signal:o}=this;document.fonts?.ready.then(()=>!o.aborted&&this.setIndicator()).catch(()=>{}),this.activate(s,!1),requestAnimationFrame(()=>{o.aborted||(this.setIndicator(),requestAnimationFrame(()=>!o.aborted&&t.classList.add("pl-switcher-ready")))})}get items(){let{el:t,options:e}=this,i;return e.toggle?i=C(t,e.toggle).filter(s=>t.contains(s)):(i=T(":scope > li",t),i.length||(i=[...t.children])),i.filter(s=>!s.matches(Os))}get containers(){let{el:t,options:e}=this;if(e.connect)return C(t,e.connect);let i=t.nextElementSibling;for(;i&&!i.classList.contains("pl-switcher");)i=i.nextElementSibling;return i?[i]:[]}get index(){return this.current}get vertical(){let{el:t}=this;return t.matches(".pl-tab-left, .pl-tab-right, .pl-nav")?!0:getComputedStyle(t).flexDirection.startsWith("column")}tabOf(t){return t.matches("a, button")?t:t.querySelector("a, button")||t}itemOf(t){return this.items.find(e=>e.contains(t))||null}disabled(t){return t.classList.contains("pl-disabled")||this.tabOf(t).matches(':disabled, [aria-disabled="true"]')}containerOf(t){return this.containers.find(e=>{if(!e.contains(t))return!1;let i=t.closest(".pl-switcher");return!e.classList.contains("pl-switcher")||i===e})||null}indexFromHash(){let t=decodeURIComponent(location.hash);if(t.length<2)return-1;let i=this.items.findIndex(s=>this.tabOf(s).getAttribute("href")===t);if(i>-1)return i;for(let s of this.containers){let o=[...s.children].findIndex(n=>`#${n.id}`===t);if(o>-1)return o}return-1}onKeydown(t){let e=this.itemOf(t.target);if(!e||t.target!==this.tabOf(e))return;let i=this.items.filter(c=>!this.disabled(c)),s=i.indexOf(e);if(s<0)return;let o=this.vertical,n=getComputedStyle(this.el).direction==="rtl",a=o?"ArrowUp":n?"ArrowRight":"ArrowLeft",l=o?"ArrowDown":n?"ArrowLeft":"ArrowRight",h;t.key===l?h=i[(s+1)%i.length]:t.key===a?h=i[(s-1+i.length)%i.length]:t.key==="Home"?h=i[0]:t.key==="End"?h=i[i.length-1]:(t.key==="Enter"||t.key===" ")&&!t.target.matches("button")&&(h=e),h&&(t.preventDefault(),this.show(this.items.indexOf(h)),this.tabOf(h).focus())}bindSwipe(){let t=0,e=0,i=null;this.on(document,"touchstart",s=>{i=s.touches.length===1?this.containerOf(s.target):null,i&&(t=s.touches[0].clientX,e=s.touches[0].clientY)},{passive:!0}),this.on(document,"touchend",s=>{if(!i)return;i=null;let o=s.changedTouches[0],n=o.clientX-t,a=o.clientY-e;if(Math.abs(n)<48||Math.abs(n)<Math.abs(a)*1.5)return;let l=this.items,h=this.current;do h+=n<0?1:-1;while(l[h]&&this.disabled(l[h]));l[h]&&this.show(h)},{passive:!0})}resolve(t){let e=this.items;if(t==="next"||t==="previous"){let i=t==="next"?1:-1,s=this.current;for(let o=0;o<e.length;o++)if(s=(s+i+e.length)%e.length,!this.disabled(e[s]))return s;return-1}return t instanceof Element?e.findIndex(i=>i===t||i.contains(t)):(t=Number(t),Number.isInteger(t)&&e[t]?t:-1)}show(t){t=this.resolve(t),!(t<0||t===this.current)&&this.emit("beforeshow",{index:t,item:this.items[t]},!0)&&this.activate(t,!0)}activate(t,e){let{el:i,options:s}=this,o=this.items,n=this.current,a=n<0||t>n;if(this.current=t,o.length&&o.every(f=>this.tabOf(f)!==f||f.matches("a, button"))){i.setAttribute("role","tablist"),this.vertical?i.setAttribute("aria-orientation","vertical"):i.removeAttribute("aria-orientation");for(let f of i.children)!o.includes(f)&&!f.hasAttribute("role")&&f.setAttribute("role","presentation")}let h=this.containers;o.forEach((f,u)=>{let g=this.tabOf(f),w=u===t;f.classList.toggle("pl-active",w),g!==f&&f.setAttribute("role","presentation"),g.setAttribute("role","tab"),g.setAttribute("aria-selected",String(w)),g.tabIndex=w?0:-1,g.id||(g.id=k("pl-tab")),this.disabled(f)&&g.setAttribute("aria-disabled","true");let A=h[0]?.children[u];A&&g.setAttribute("aria-controls",A.id||(A.id=k("pl-panel")))});let c=++this.token,{signal:p}=this,m={index:t,previous:n,item:o[t]};e&&n>-1&&this.emit("hide",{index:n,item:o[n]});let b=[];for(let f of h)[...f.children].forEach((u,g)=>{let w=g===t,A=u.classList.contains("pl-active");u.classList.toggle("pl-active",w),u.setAttribute("role","tabpanel");let M=o[g]&&this.tabOf(o[g]);M&&u.setAttribute("aria-labelledby",M.id),w&&!A&&e&&b.push(this.animateIn(u,a))});if(this.setIndicator(),!!e){if(n>-1&&this.emit("hidden",{index:n,item:o[n]}),this.emit("show",m),s.followHash){let f=h[0]?.children[t],u=this.tabOf(o[t]).getAttribute("href"),g=u&&u.length>1&&u.startsWith("#")?u:f?.id?`#${f.id}`:"";g&&g!==location.hash&&history.replaceState(null,"",g)}Promise.all(b).then(()=>{!p.aborted&&c===this.token&&this.emit("shown",m)})}}async animateIn(t,e){let{animation:i}=this.options;if(!i||S())return;let s;if(i===!0)s=["pl-switcher-enter"],t.style.setProperty("--pl-switcher-dir",e?"1":"-1");else{let[n,a]=String(i).split(",").map(l=>l.trim().split(/\s+/).filter(Boolean));s=e||!a?.length?n:a}let o=(t.dataset.plSwitcherAnim||"").split(" ").filter(Boolean);t.classList.remove(...o),t.offsetWidth,t.classList.add(...s),t.dataset.plSwitcherAnim=s.join(" "),await D(t),t.dataset.plSwitcherAnim===s.join(" ")&&t.classList.contains("pl-active")?(t.classList.remove(...s),delete t.dataset.plSwitcherAnim):t.classList.contains("pl-active")||t.classList.remove(...s)}setIndicator(){let{el:t}=this,e=this.items[this.current];if(!e||!t.isConnected)return;let i=t.getBoundingClientRect(),s=e.getBoundingClientRect();if(!i.width&&!i.height)return;let o=t.offsetWidth?i.width/t.offsetWidth:1,n=t.offsetHeight?i.height/t.offsetHeight:1,a=(s.left-i.left)/(o||1)-t.clientLeft+t.scrollLeft,l=(s.top-i.top)/(n||1)-t.clientTop+t.scrollTop,h=(c,p)=>t.style.setProperty(`--pl-indicator-${c}`,`${Math.round(p*100)/100}px`);h("x",a),h("y",l),h("w",e.offsetWidth),h("h",e.offsetHeight)}};d(qt,"defaults",{connect:null,toggle:null,active:null,animation:!0,swiping:!0,followHash:!1}),d(qt,"primary","connect");v("switcher",qt);var qi={linear:r=>r,"ease-in":r=>r*r*r,"ease-out":r=>1-(1-r)**4,"ease-in-out":r=>r<.5?8*r**4:1-(-2*r+2)**4/2,spring:r=>1+2.2*(r-1)**3+1.2*(r-1)**2},ti=new WeakMap;function ei(r){let t=document.scrollingElement||document.documentElement;for(let e=r?.parentElement;e&&e!==document.body&&e!==t;e=e.parentElement){let{overflowY:i}=getComputedStyle(e);if((i==="auto"||i==="scroll")&&e.scrollHeight>e.clientHeight)return e}return t}function Ae(r,t={}){let{offset:e=0,duration:i="auto",easing:s="ease-in-out"}=t,o=document.scrollingElement||document.documentElement,n=typeof r=="number"?null:E(r);if(typeof r!="number"&&!n)return Promise.resolve(!1);let a=E(t.container)||(n?ei(n):o),l=a===o,h=a.scrollTop,c;if(n){let u=l?0:a.getBoundingClientRect().top+a.clientTop;c=h+n.getBoundingClientRect().top-u-e}else c=r-e;let p=l?window.innerHeight:a.clientHeight;c=$(Math.round(c),0,Math.max(0,a.scrollHeight-p)),ti.get(a)?.(!1);let m=c-h,b=i==="auto"||i===null?$(Math.abs(m)*.45,280,1100):Number(i)||0,f=typeof s=="function"?s:qi[s]||qi["ease-in-out"];return!m||!b||S()?(a.scrollTop=c,Promise.resolve(!0)):new Promise(u=>{let g=0,w=performance.now(),A=a.style.scrollBehavior;a.style.scrollBehavior="auto";let M=["wheel","touchstart","pointerdown","keydown"],_=I=>{cancelAnimationFrame(g),M.forEach(Jt=>window.removeEventListener(Jt,R,!0)),a.style.scrollBehavior=A,ti.delete(a),u(I)},R=I=>{I.type==="keydown"&&!/^(Arrow|Page|Home|End| |Escape)/.test(I.key)||_(!1)},X=I=>{let Jt=$((I-w)/b,0,1);a.scrollTop=h+m*f(Jt),Jt<1?g=requestAnimationFrame(X):(a.scrollTop=c,_(!0))};M.forEach(I=>window.addEventListener(I,R,{capture:!0,passive:!0})),ti.set(a,_),g=requestAnimationFrame(X)})}function ii(r){!r||r===document.body||r===document.documentElement||(r.matches("a[href], button, input, select, textarea, [tabindex]")||(r.setAttribute("tabindex","-1"),r.addEventListener("blur",()=>r.removeAttribute("tabindex"),{once:!0})),r.focus({preventScroll:!0}))}var Ft=class extends x{init(){this.on(this.el,"click",t=>{if(t.defaultPrevented||t.metaKey||t.ctrlKey||t.shiftKey||t.button)return;let i=(this.el.matches("a[href]")?this.el:t.target.closest("a[href]"))?.getAttribute("href")||this.el.getAttribute("data-pl-scroll-target")||"";i.startsWith("#")&&(t.preventDefault(),this.scrollTo(i))})}async scrollTo(t=this.el.getAttribute("href")){let{offset:e,duration:i,easing:s,hash:o,focus:n}=this.options,a=null;if(t instanceof Element?a=t:typeof t=="string"&&t.length>1&&(a=document.getElementById(decodeURIComponent(t.slice(1)))||(t!=="#top"?zs(t):null)),!a&&!(!a&&(t==="#"||t==="#top"))||!this.emit("beforescroll",{target:a},!0))return!1;let{signal:h}=this,c=await Ae(a||0,{offset:a?e:0,duration:i,easing:s});return h.aborted||(o&&typeof t=="string"&&t.length>1&&t!==location.hash&&history.pushState(null,"",t),c&&n&&a&&ii(a),this.emit("scrolled",{target:a,completed:c})),c}};d(Ft,"defaults",{offset:0,duration:"auto",easing:"ease-in-out",hash:!0,focus:!0}),d(Ft,"primary","offset");function zs(r){try{return document.querySelector(r)}catch{return null}}v("scroll",Ft);O.scroll.to=Ae;var Fi=(r,t,e)=>r.dispatchEvent(new CustomEvent(`pl:${t}`,{bubbles:!0,detail:e})),ji=r=>String(r||"").split(/[\s,]+/).filter(Boolean),jt=class extends x{init(){let{options:t}=this;if(this.state=new WeakMap,this.timers=new Set,this.lastTime=0,typeof IntersectionObserver=="function"){if(this.observer=new IntersectionObserver(e=>{e.slice().sort((i,s)=>i.target.compareDocumentPosition(s.target)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1).forEach(i=>i.isIntersecting?this.enter(i.target):this.leave(i.target))},{rootMargin:`${t.offsetTop}px ${t.offsetLeft}px`}),this.observe(),t.target){let e=new MutationObserver(()=>this.observe());e.observe(this.el,{childList:!0,subtree:!0}),this.onDestroy(()=>e.disconnect())}this.onDestroy(()=>{this.observer.disconnect(),this.timers.forEach(clearTimeout)})}}get targets(){let t=String(this.options.target||"").trim();if(!t)return[this.el];if(t.startsWith(">"))return C(this.el,t);try{return[...this.el.querySelectorAll(t)]}catch{return[]}}classesFor(t){return ji(t.getAttribute("data-pl-scrollspy-class")||this.options.cls)}observe(){for(let t of this.targets)this.state.has(t)||(this.state.set(t,{inview:!1,timer:0}),this.options.hidden&&t.classList.add("pl-invisible"),this.observer.observe(t))}enter(t){let e=this.state.get(t);if(!e||e.inview)return;e.inview=!0;let{delay:i,repeat:s}=this.options,o=performance.now(),n=i?Math.max(o,this.lastTime+i):o;this.lastTime=n;let a=()=>{this.timers.delete(e.timer),e.timer=0,t.classList.remove("pl-invisible"),t.classList.add(...this.classesFor(t)),Fi(t,"inview",{component:this,target:t})};n-o<1?a():(e.timer=setTimeout(a,n-o),this.timers.add(e.timer)),s||this.observer.unobserve(t)}leave(t){let e=this.state.get(t);!e||!e.inview||!this.options.repeat||(e.inview=!1,e.timer&&(clearTimeout(e.timer),this.timers.delete(e.timer),e.timer=0),t.classList.remove(...this.classesFor(t)),this.options.hidden&&t.classList.add("pl-invisible"),Fi(t,"outview",{component:this,target:t}))}};d(jt,"defaults",{cls:"pl-animation-fade",target:null,hidden:!0,offsetTop:0,offsetLeft:0,repeat:!1,delay:0}),d(jt,"primary","cls");var Le=class extends x{init(){this.active=null,this.locked=!1,this.update=z(()=>this.refresh()),this.on(document,"scroll",this.update,{capture:!0,passive:!0}),this.on(window,"resize",this.update,{passive:!0}),this.on(window,"load",this.update),this.on(this.el,"click",async t=>{if(!this.options.scroll)return;let e=t.target.closest('a[href*="#"]');if(!e||!this.el.contains(e)||t.metaKey||t.ctrlKey)return;let i=this.targetOf(e);if(!i)return;t.preventDefault(),this.locked=!0,this.setActive(e);let{signal:s}=this,o=await Ae(i,{offset:this.options.offset,duration:this.options.duration});s.aborted||(this.locked=!1,o?(e.hash!==location.hash&&history.replaceState(null,"",e.hash),ii(i)):this.refresh())}),this.refresh()}get links(){return T('a[href*="#"]',this.el).filter(t=>this.targetOf(t))}targetOf(t){let e=t.getAttribute("href")||"",i=e.slice(e.indexOf("#")+1);return!i||!e.startsWith("#")&&t.pathname!==location.pathname?null:document.getElementById(decodeURIComponent(i))}refresh(){if(this.locked)return;let t=this.links;if(!t.length)return;let{offset:e,overflow:i}=this.options,s=document.scrollingElement||document.documentElement,o=null,n=s;for(let h of t){let c=this.targetOf(h);if(!c.getClientRects().length)continue;n=ei(c);let p=n===s?0:n.getBoundingClientRect().top+n.clientTop;if(c.getBoundingClientRect().top-p<=e+2)o=h;else break}let a=n===s?window.innerHeight:n.clientHeight,l=n.scrollHeight-a;l>0&&n.scrollTop>=l-2&&(o=t[t.length-1]),!o&&i&&(o=t[0]),this.setActive(o)}holder(t){let{closest:e}=this.options;return e&&t.closest(String(e))||t}setActive(t){if(t===this.active)return;let e=ji(this.options.cls);this.active&&(this.holder(this.active).classList.remove(...e),this.active.removeAttribute("aria-current"));for(let i of T('a[href*="#"]',this.el))i!==t&&this.holder(i).classList.remove(...e);this.active=t,t&&(this.holder(t).classList.add(...e),t.setAttribute("aria-current","location"),this.emit("active",{link:t,target:this.targetOf(t)}))}};d(Le,"defaults",{cls:"pl-active",closest:"li",scroll:!1,offset:0,overflow:!0,duration:"auto"});v("scrollspy",jt);v("scrollspy-nav",Le);var Ns={s:640,m:960,l:1200,xl:1600};function Hs(r){return r===!1||r===null||r===void 0||r===""?null:(typeof r=="string"&&r.startsWith("@")&&(r=Ns[r.slice(1)]??0),typeof r=="number"||/^\d+$/.test(r)?matchMedia(`(min-width: ${r}px)`):matchMedia(r))}var mt=r=>String(r||"").split(/[\s,]+/).filter(Boolean);function Ri(r,t){if(typeof r=="number")return r;let e=parseFloat(r);return Number.isNaN(e)?0:String(r).endsWith("vh")?window.innerHeight*e/100:String(r).endsWith("%")?t*e/100:e}var Ee=class extends x{init(){let{el:t,options:e}=this;this.fixed=!1,this.active=null,this.below=!1,this.lastY=window.scrollY,this.direction="down",this.leaving=0,this.metrics=null,this.media=Hs(e.media),this.placeholder=document.createElement("div"),this.placeholder.className="pl-sticky-placeholder",this.placeholder.setAttribute("aria-hidden","true"),this.placeholder.hidden=!0,t.classList.add("pl-sticky"),this.setState(!1,!0),this.update=z(()=>this.refresh());let i=z(()=>{this.measure(),this.refresh()});this.on(window,"scroll",this.update,{passive:!0}),this.on(window,"resize",i,{passive:!0}),this.on(window,"load",i),this.on(this.media,"change",i);let{signal:s}=this;if(document.fonts?.ready.then(()=>!s.aborted&&i()).catch(()=>{}),typeof ResizeObserver=="function"){let o=new ResizeObserver(()=>{this.fixed&&this.metrics&&Math.abs(t.offsetHeight-this.metrics.height)>.5?(this.metrics.height=t.offsetHeight,this.placeholder.style.height=`${t.offsetHeight}px`,this.update()):this.fixed||this.update()});o.observe(t),this.onDestroy(()=>o.disconnect())}this.onDestroy(()=>{this.unfix(),this.placeholder.remove(),t.classList.remove("pl-sticky","pl-sticky-below",...mt(e.clsActive),...mt(e.clsInactive))}),this.measure(),this.refresh()}get enabled(){return(!this.media||this.media.matches)&&this.el.isConnected&&(this.fixed||this.el.getClientRects().length>0)}get boundary(){let t=this.options.end||this.options.bottom;return t?t===!0||t==="parent"?(this.fixed?this.placeholder:this.el).parentElement:(t=String(t),t.startsWith("!")?this.el.parentElement?.closest(t.slice(1).trim())||null:E(t)):null}measure(){let{el:t}=this,e=this.fixed;e&&this.unfix(!0);let i=t.getBoundingClientRect(),s=getComputedStyle(t);this.metrics={width:i.width,height:t.offsetHeight,margin:s.margin,flex:s.flex,alignSelf:s.alignSelf,gridArea:s.gridArea},e&&this.fix(!0)}refresh(){let{el:t,options:e}=this,i=window.scrollY;if(i!==this.lastY&&(this.direction=i>this.lastY?"down":"up"),this.lastY=i,!this.enabled){this.fixed&&this.unfix(),this.setState(!1);return}(!this.metrics||!this.fixed&&Math.abs(this.metrics.height-t.offsetHeight)>.5)&&this.measure();let{height:s}=this.metrics,o=this.fixed?this.placeholder:t,n=o.getBoundingClientRect(),a=Ri(e.offset,s),l=n.top+i,h=l-a,{top:c}=e;if(typeof c=="string"&&c&&Number.isNaN(parseFloat(c))){let g=E(c);g&&(h=g.getBoundingClientRect().bottom+i-a)}else c&&(h+=Ri(c,s));let p=1/0,m=this.boundary;if(m){let g=getComputedStyle(m),w=m.contains(o)?parseFloat(g.paddingBottom)+parseFloat(g.borderBottomWidth):0;p=m.getBoundingClientRect().bottom+i-w-s-a}let b=i>l+s,f=h<=l-a+1,u=i>h&&p>h;if(e.showOnUp){let g=Math.max(h,l+s);this.fixed?u=i>l-a&&(this.direction==="up"||i<=g):u=i>g&&this.direction==="up",this.fixed&&i<=l-a&&(u=!1)}if(u&&!this.fixed?(this.fix(),(e.animation||e.showOnUp)&&!(f&&!e.showOnUp)&&this.animate(!1),this.setState(!0)):u&&this.leaving?(this.cancelLeave(),this.setState(!0)):!u&&this.fixed&&(i<=l-a||!(e.animation||e.showOnUp)?(this.unfix(),this.setState(!1)):this.leaving||this.leave()),this.fixed){let g=this.placeholder.getBoundingClientRect(),w=Math.min(0,p-i);t.style.top=`${a+w}px`,t.style.left=`${g.left}px`,t.style.width=`${g.width}px`,t.classList.toggle("pl-sticky-end",w<0)}b!==this.below&&(this.below=b,t.classList.toggle("pl-sticky-below",b))}fix(t=!1){let{el:e,placeholder:i,metrics:s,options:o}=this;if(this.fixed)return;this.cancelLeave(),Object.assign(i.style,{width:`${s.width}px`,height:`${s.height}px`,margin:s.margin,flex:s.flex.startsWith("0 ")?s.flex:"none",alignSelf:s.alignSelf,gridArea:s.gridArea}),e.after(i),i.hidden=!1,i.parentElement?.clientWidth&&getComputedStyle(i.parentElement).display==="block"&&(i.style.width="",Math.abs(i.getBoundingClientRect().width-s.width)>1&&(i.style.width=`${s.width}px`)),e.classList.add("pl-sticky-fixed"),o.zIndex!==null&&o.zIndex!==""&&(e.style.zIndex=o.zIndex),this.fixed=!0,t||this.refreshPosition()}refreshPosition(){let t=this.placeholder.getBoundingClientRect();this.el.style.left=`${t.left}px`,this.el.style.width=`${t.width}px`}unfix(t=!1){let{el:e,placeholder:i}=this;if(this.fixed){t||this.cancelLeave(),e.classList.remove("pl-sticky-fixed","pl-sticky-end");for(let s of["top","left","width","zIndex"])e.style[s]="";i.hidden=!0,i.remove(),this.fixed=!1}}async animate(t){let{el:e,options:i}=this;if(S())return;let s=mt(i.animation||"pl-animation-slide-down");t&&s.push("pl-animation-reverse"),e.classList.remove("pl-animation-reverse"),e.classList.add(...s),await D(e),e.classList.remove(...s)}async leave(){let t=this.leaving=Math.random()+1,{signal:e}=this;this.setState(!1),await this.animate(!0),!(e.aborted||this.leaving!==t)&&(this.leaving=0,this.unfix(),this.refresh())}cancelLeave(){this.leaving&&(this.leaving=0,this.el.classList.remove("pl-animation-reverse",...mt(this.options.animation||"pl-animation-slide-down")))}setState(t,e=!1){if(t===this.active&&!e)return;let i=this.active===null;this.active=t;let s=mt(this.options.clsActive),o=mt(this.options.clsInactive);this.el.classList.remove(...t?o:s),this.el.classList.add(...t?s:o),i||this.emit(t?"active":"inactive")}};d(Ee,"defaults",{offset:0,top:0,bottom:!1,end:!1,clsActive:"pl-active",clsInactive:"",animation:!1,showOnUp:!1,media:!1,zIndex:null});v("sticky",Ee);var Is={s:640,m:960,l:1200,xl:1600};function Ps(r){return r===!1||r===null||r===void 0||r===""?null:(typeof r=="string"&&r.startsWith("@")&&(r=Is[r.slice(1)]??0),typeof r=="number"||/^\d+$/.test(r)?matchMedia(`(min-width: ${r}px)`):matchMedia(r))}var Yi={x:[0,"px"],y:[0,"px"],scale:[1,""],rotate:[0,"deg"],opacity:[1,""],blur:[0,"px"],grayscale:[0,"%"],saturate:[100,"%"],brightness:[100,"%"],hue:[0,"deg"],bgx:[0,"px"],bgy:[0,"px"]},Wi={blur:"blur",grayscale:"grayscale",saturate:"saturate",brightness:"brightness",hue:"hue-rotate"};function Bs(r,t){let[e,i]=Yi[t],s=String(r).split(",").map(a=>a.trim()).filter(Boolean),o=i,n=s.map(a=>{let l=a.match(/^(-?[\d.]+)([a-z%]*)$/i);return l?(l[2]&&(o=l[2]),parseFloat(l[1])):0});return n.length===1&&n.unshift(e),{stops:n,unit:o}}function qs(r,t){let e=r.length-1,i=t*e,s=Math.min(Math.floor(i),e-1),o=r[s];return o+(r[s+1]-o)*(i-s)}function Vi(r,t){if(typeof r=="number")return r;let e=parseFloat(r);return Number.isNaN(e)?0:String(r).endsWith("vh")?window.innerHeight*e/100:String(r).endsWith("%")?t*e/100:e}function Fs(r){let t=0;for(let e=r;e;e=e.offsetParent)t+=e.offsetTop+(e!==r?e.clientTop:0);return t}var Se=class extends x{init(){let{el:t,options:e}=this;this.props={};for(let s of Object.keys(Yi))e[s]!==null&&e[s]!==""&&(this.props[s]=Bs(e[s],s));if(this.media=Ps(e.media),this.visible=!0,this.progress=-1,this.applied=!1,!Object.keys(this.props).length)return;this.update=z(()=>this.refresh()),this.on(window,"scroll",()=>this.visible&&this.update(),{passive:!0}),this.on(window,"resize",()=>this.refresh(!0),{passive:!0}),this.on(window,"load",()=>this.refresh(!0)),this.on(this.media,"change",()=>this.refresh(!0));let i=matchMedia("(prefers-reduced-motion: reduce)");if(this.on(i,"change",()=>this.refresh(!0)),typeof IntersectionObserver=="function"){let s=new IntersectionObserver(([o])=>{this.visible=o.isIntersecting,this.visible&&this.refresh()},{rootMargin:"50% 0px"});s.observe(this.target),this.onDestroy(()=>s.disconnect())}("bgx"in this.props||"bgy"in this.props)&&this.prepareBackground(),this.onDestroy(()=>this.reset()),this.refresh(!0)}get target(){let{el:t,options:e}=this;if(!e.target)return t;let i=String(e.target);return i.startsWith("!")?t.closest(i.slice(1).trim())||t:C(t,i)[0]||t}get enabled(){return(!this.media||this.media.matches)&&!S()}prepareBackground(){let{el:t}=this,e=getComputedStyle(t).backgroundImage.match(/url\(["']?(.*?)["']?\)/)?.[1];if(!e)return;let i=new Image;i.onload=()=>{this.image={width:i.naturalWidth,height:i.naturalHeight},this.refresh(!0)},i.src=e}sizeBackground(){let{el:t,image:e,props:i}=this;if(!e||!e.width||!e.height)return;let s=l=>i[l]&&i[l].unit==="px"?Math.max(...i[l].stops)-Math.min(...i[l].stops):0,o=t.offsetWidth+s("bgx"),n=t.offsetHeight+s("bgy"),a=Math.max(o/e.width,n/e.height);t.style.backgroundSize=`${Math.ceil(e.width*a)}px ${Math.ceil(e.height*a)}px`,t.style.backgroundRepeat="no-repeat"}refresh(t=!1){let{el:e,options:i,props:s}=this;if(!this.enabled){this.reset();return}t&&(this.progress=-1,this.sizeBackground());let o=this.target,n=o.offsetHeight,a=window.innerHeight,l=document.scrollingElement||document.documentElement,h=Fs(o),c=Math.max(0,l.scrollHeight-a),p=Math.max(0,h-a+Vi(i.start,n)),m=Math.min(c,h+n-Vi(i.end,n)),b=m>p?$((window.scrollY-p)/(m-p),0,1):0,f=Number(i.easing);if(f>0&&f!==1&&(b**=f),Math.abs(b-this.progress)<5e-4)return;this.progress=b;let u=M=>qs(s[M].stops,b),g=M=>s[M].unit,w=[];if(s.x||s.y){let M=s.x?`${u("x").toFixed(2)}${g("x")}`:"0",_=s.y?`${u("y").toFixed(2)}${g("y")}`:"0";w.push(`translate3d(${M}, ${_}, 0)`)}s.rotate&&w.push(`rotate(${u("rotate").toFixed(3)}${g("rotate")})`),s.scale&&w.push(`scale(${u("scale").toFixed(4)})`),w.length&&(e.style.transform=w.join(" ")),s.opacity&&(e.style.opacity=u("opacity").toFixed(3));let A=Object.keys(Wi).filter(M=>s[M]).map(M=>`${Wi[M]}(${u(M).toFixed(2)}${g(M)})`);if(A.length&&(e.style.filter=A.join(" ")),s.bgx||s.bgy){let M=X=>{let{stops:I}=s[X];return(u(X)-(Math.max(...I)+Math.min(...I))/2).toFixed(2)},_=s.bgx?`calc(50% + ${M("bgx")}${g("bgx")})`:"50%",R=s.bgy?`calc(50% + ${M("bgy")}${g("bgy")})`:"50%";e.style.backgroundPosition=`${_} ${R}`}if(!this.applied){this.applied=!0;let M=[];w.length&&M.push("transform"),s.opacity&&M.push("opacity"),A.length&&M.push("filter"),M.length&&(e.style.willChange=M.join(", "))}}reset(){if(this.applied){this.applied=!1,this.progress=-1;for(let t of["transform","opacity","filter","willChange","backgroundPosition","backgroundSize","backgroundRepeat"])this.el.style[t]=""}}};d(Se,"defaults",{x:null,y:null,scale:null,rotate:null,opacity:null,blur:null,grayscale:null,saturate:null,brightness:null,hue:null,bgx:null,bgy:null,easing:1,start:0,end:0,media:!1,target:!1});v("parallax",Se);function si({from:r,to:t,velocity:e=0,stiffness:i=170,damping:s=20,precision:o=.35,update:n,done:a}){if(S()||typeof requestAnimationFrame!="function")return n(t,0),a?.(),{stop(){},velocity:0};let l=r,h=e,c=performance.now(),p=0,m=!0,b={stop(){m=!1,cancelAnimationFrame(p)},get velocity(){return h}},f=u=>{if(!m)return;let g=$((u-c)/1e3,0,.064);for(c=u;g>1e-5;){let w=Math.min(g,.004166666666666667);h+=(-i*(l-t)-s*h)*w,l+=h*w,g-=w}if(Math.abs(l-t)<o&&Math.abs(h)<o*25){m=!1,h=0,n(t,0),a?.();return}n(l,h),p=requestAnimationFrame(f)};return p=requestAnimationFrame(f),b}function $e(r,t,e=.55){let i=Math.abs(r);return Math.sign(r)*(1-1/(i*e/t+1))*t}function oi(){let r=[];return{add(t,e){for(r.push({x:t,t:e});r.length>2&&e-r[0].t>100;)r.shift()},get(t){if(r.length<2)return 0;let e=r[0],i=r[r.length-1];return t-i.t>80||i.t===e.t?0:(i.x-e.x)/(i.t-e.t)*1e3}}}var Ui='input, textarea, select, [contenteditable]:not([contenteditable="false"]), .pl-drag-ignore',gt=class extends x{setup(){var s;let t=this.constructor.prefix,{el:e}=this;if(this.attr=`data-pl-${t}-item`,this.list=E(`.pl-${t}-items`,e),!this.list)return!1;this.index=0,this.pauses=new Set,this.autoplayOn=!!this.options.autoplay,this.generatedNavs=new Set,this.onDestroy(()=>this.generatedNavs.forEach(o=>o.replaceChildren())),this._timer=0,this._remaining=0,this._startedAt=0;let i=y("slider.carousel",{},e);if(e.hasAttribute("role")||e.setAttribute("role","region"),e.setAttribute("aria-roledescription",i),!e.hasAttribute("aria-label")&&!e.hasAttribute("aria-labelledby")&&e.setAttribute("aria-label",i[0].toUpperCase()+i.slice(1)),e.hasAttribute("tabindex")||(e.tabIndex=0),(s=this.list).id||(s.id=k(`pl-${t}`)),e.style.setProperty(`--pl-${t}-interval`,`${this.options.autoplayInterval}ms`),this.on(e,"click",o=>{let n=o.target.closest(`[${this.attr}]`);if(!n||!this.owns(n)||(o.preventDefault(),n.getAttribute("aria-disabled")==="true"))return;let a=n.getAttribute(this.attr).trim();a==="toggle"?this.autoplayOn?this.stopAutoplay():this.startAutoplay():this.show(/^\d+$/.test(a)?Number(a):a)}),this.on(e,"keydown",o=>{if(o.defaultPrevented||o.altKey||o.ctrlKey||o.metaKey||o.target.closest(Ui)||!this.owns(o.target))return;let a={ArrowLeft:"previous",ArrowRight:"next",Home:0,End:this.slides.length-1}[o.key];a!==void 0&&(o.preventDefault(),this.show(a))}),this.on(e,"pointerenter",o=>{this.options.pauseOnHover&&o.pointerType==="mouse"&&this.pause("hover")}),this.on(e,"pointerleave",()=>this.resume("hover")),this.on(e,"focusin",o=>{o.target.matches?.(":focus-visible")&&this.pause("focus")}),this.on(e,"focusout",o=>{e.contains(o.relatedTarget)||this.resume("focus")}),this.on(document,"visibilitychange",()=>document.hidden?this.pause("hidden"):this.resume("hidden")),typeof IntersectionObserver=="function"){let o=new IntersectionObserver(([n])=>n.isIntersecting?this.resume("offscreen"):this.pause("offscreen"));o.observe(e),this.onDestroy(()=>o.disconnect())}if(typeof MutationObserver=="function"){let o=new MutationObserver(()=>this.update());o.observe(this.list,{childList:!0}),this.onDestroy(()=>o.disconnect())}return this.onDestroy(()=>clearTimeout(this._timer)),!0}get slides(){return this.list?[...this.list.children]:[]}owns(t){let e=this.constructor.componentName;for(let i=t;i&&i!==this.el;i=i.parentElement)if(H(i,e))return!1;return!0}labelSlides(){let t=this.slides,e=y("slider.slide",{},this.el);t.forEach((i,s)=>{i.matches("li")||i.setAttribute("role","group"),i.setAttribute("aria-roledescription",e),!(i.hasAttribute("aria-label")&&!i.dataset.plAuto)&&(i.dataset.plAuto="1",i.setAttribute("aria-label",y("slider.position",{n:s+1,count:t.length},this.el)))})}buildNav(){let t=this.constructor.prefix,e=this.navIndexes();for(let i of T(`.pl-${t}-nav`,this.el))this.owns(i)&&(!i.children.length||this.generatedNavs.has(i)?(this.generatedNavs.add(i),[...i.children].map(o=>o.getAttribute(this.attr)).join()!==e.join()&&(i.innerHTML=e.map(o=>`<li ${this.attr}="${o}"><a href="#" role="button" aria-label="${y("slider.goto",{n:o+1},this.el)}"></a></li>`).join(""))):[...i.children].forEach((s,o)=>{!s.hasAttribute(this.attr)&&!s.querySelector(`[${this.attr}]`)&&s.setAttribute(this.attr,o)}));for(let i of T(`[${this.attr}]`,this.el)){if(!this.owns(i))continue;let s=i.getAttribute(this.attr),o=i.matches("a, button")?i:i.querySelector("a, button");o&&(o.setAttribute("aria-controls",this.list.id),(s==="previous"||s==="next")&&!o.hasAttribute("aria-label")&&!o.textContent.trim()&&o.setAttribute("aria-label",L[s]))}}updateNav(){let t=this.navOf(this.index),[e,i]=this.canMove();for(let s of T(`[${this.attr}]`,this.el)){if(!this.owns(s))continue;let o=s.getAttribute(this.attr).trim(),n=s.matches("a, button")?s:s.querySelector("a, button")||s;if(/^\d+$/.test(o)){let a=Number(o)===t;s.classList.toggle("pl-active",a),a?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}else if(o==="previous"||o==="next"){let a=!(o==="next"?i:e);s.classList.toggle("pl-disabled",a),a?n.setAttribute("aria-disabled","true"):n.removeAttribute("aria-disabled")}}}navIndexes(){return this.slides.map((t,e)=>e)}navOf(t){return t}canMove(){return[!0,!0]}update(){}show(){}startAutoplay(){this.autoplayOn=!0,this.tick(!0)}stopAutoplay(){this.autoplayOn=!1,this.tick(!0)}pause(t){this.pauses.has(t)||(this.pauses.add(t),this.tick(!1))}resume(t){this.pauses.delete(t)&&this.tick(!1)}tick(t=!0){let e=this.constructor.prefix,i=performance.now();this._timer&&(clearTimeout(this._timer),this._timer=0,this._remaining-=i-this._startedAt);let s=Math.max(Number(this.options.autoplayInterval)||0,400);(t||!(this._remaining>0))&&(this._remaining=s);let o=this.autoplayOn&&this.slides.length>1&&!S(),n=o&&!this.pauses.size;this.el.classList.toggle(`pl-${e}-autoplay`,o),this.el.classList.toggle(`pl-${e}-paused`,o&&!n),this.list.setAttribute("aria-live",o?"off":"polite");for(let a of T(`[${this.attr}="toggle"]`,this.el))a.classList.toggle("pl-active",this.autoplayOn),a.setAttribute("aria-pressed",String(this.autoplayOn));n&&(this._startedAt=i,this._timer=setTimeout(()=>{this._timer=0,this._remaining=0;let[,a]=this.canMove();this.show(a?"next":0)},this._remaining))}};d(gt,"prefix","slider");var Rt=class extends gt{init(){this.setup()&&(this.container=E(".pl-slider-container",this.el)||this.list.parentElement,this.pos=0,this.target=0,this.metrics=[],this.anim=null,this.drag=null,this.wheelTimer=0,this.suppressClick=0,this.index=Math.max(0,Number(this.options.index)||0),this.el.classList.toggle("pl-slider-draggable",!!this.options.draggable),this.setupDrag(),this.update(),this.el.classList.add("pl-slider-ready"),typeof ResizeObserver=="function"?(this.ro=new ResizeObserver(()=>this.refresh()),this.observe(),this.onDestroy(()=>this.ro.disconnect())):this.on(window,"resize",()=>this.refresh()),this.onDestroy(()=>{this.anim?.stop(),clearTimeout(this.wheelTimer)}),this.tick(!0))}observe(){this.ro&&(this.ro.disconnect(),this.ro.observe(this.container),this.slides.forEach(t=>this.ro.observe(t)))}update(){this.list&&(this.labelSlides(),this.observe(),this.refresh())}refresh(){!this.list||this.drag?.active||(this.measure(),this.buildNav(),this.metrics.length&&(this.index=$(this.index,0,this.metrics.length-1),this.anim?.stop(),this.anim=null,this.pos=this.target=this.stops[this.index],this.render(),this.updateActive(this.pos),this.updateNav()))}measure(){let t=this.slides,{options:e}=this,i=getComputedStyle(this.container),s=getComputedStyle(this.list);this.viewW=this.container.clientWidth-(parseFloat(i.paddingLeft)||0)-(parseFloat(i.paddingRight)||0);let o=this.lead=Math.min(0,parseFloat(s.marginLeft)||0),n=parseFloat(s.columnGap)||0,a=t[0]?.offsetLeft||0,l=new Map(this.metrics.map(u=>[u.el,u.k]));this.metrics=t.map(u=>({el:u,left:u.offsetLeft-a,width:u.offsetWidth,k:l.get(u)||0}));let h=this.metrics,c=h.length;if(!c)return;let p=h[c-1].left+h[c-1].width,m=Math.max(...h.map(u=>u.width));this.total=p+n,this.loop=!e.finite&&c>1&&this.total>=this.viewW+m-1;let b=h.map(u=>e.center?u.left+(u.width+o)/2-this.viewW/2:u.left);this.min=e.center?b[0]:0,this.max=e.center?b[c-1]:Math.max(0,p+o-this.viewW),this.stops=this.loop?b:b.map(u=>$(u,this.min,this.max));let f=[0];if(e.sets&&!e.center){let u=0;for(let g=1;g<c;g++)h[g].left+h[g].width-h[u].left>this.viewW-o+1&&(u=g,f.push(g))}else f=h.map((u,g)=>g);if(!this.loop){let u=-1/0;f=f.filter(g=>this.stops[g]<=u+1?!1:(u=this.stops[g],!0)),f.length||(f=[0]);for(let g of h)g.k&&(g.el.style.transform=""),g.k=0}this.stopIdx=f}navIndexes(){return this.stopIdx||[]}navOf(t){let e=this.stopIdx?.[0]??0;for(let i of this.stopIdx||[])i<=t&&(e=i);return e}canMove(){if(this.loop||!this.options.finite||!this.stopIdx)return[!0,!0];let t=this.stopIdx.indexOf(this.navOf(this.index));return[t>0,t<this.stopIdx.length-1]}render(){let{pos:t}=this;if(this.list.style.transform=`translate3d(${-t}px, 0, 0)`,!!this.loop)for(let e of this.metrics){let i=Math.round((t+this.viewW/2-(e.left+e.width/2))/this.total);i!==e.k&&(e.k=i,e.el.style.transform=i?`translate3d(${i*this.total}px, 0, 0)`:"")}}updateActive(t){for(let e of this.metrics){let i=e.left-t;this.loop&&(i-=Math.round((i+e.width/2-this.viewW/2)/this.total)*this.total);let s=i+this.lead+e.width,o=i>=-1.5&&s<=this.viewW+1.5,n=s>1.5&&i+this.lead<this.viewW-1.5;e.el.classList.toggle("pl-active",o),!n&&e.el.contains(document.activeElement)&&this.el.focus({preventScroll:!0}),e.el.inert=!n}}nearest(t){let e=null;for(let i of this.stopIdx){let s=this.stops[i];this.loop&&(s+=Math.round((t-s)/this.total)*this.total);let o=Math.abs(s-t);(!e||o<e.distance)&&(e={index:i,dest:s,distance:o})}return e}show(t,{velocity:e}={}){let i=this.metrics?.length;if(!i)return;let s,o=0;if(t==="next"||t==="previous"){o=t==="next"?1:-1;let a=this.stopIdx,l=a.indexOf(this.navOf(this.index))+o;if(l<0||l>=a.length){if(!this.loop&&this.options.finite){this.animate(this.target,e??o*900);return}l=(l+a.length)%a.length,this.loop||(o=0)}s=a[l]}else s=this.navOf($(Math.round(Number(t))||0,0,i-1));let n=this.stops[s];if(this.loop){let a=this.target;n+=Math.round((a-n)/this.total)*this.total,o>0&&n<=a+1&&(n+=this.total),o<0&&n>=a-1&&(n-=this.total)}this.goTo(s,n,e)}goTo(t,e,i){let s=this.index,o=t!==s,n=this.metrics[t].el;o&&!this.emit("beforeitemshow",{index:t,item:n,previous:s},!0)&&(e=this.target,t=s);let a=t!==s;this.index=t,this.target=e,this.updateActive(e),this.updateNav(),a&&(this.emit("itemhide",{index:s,item:this.metrics[s]?.el}),this.emit("itemshow",{index:t,item:n,previous:s})),this.tick(!0),this.animate(e,i,()=>{a&&this.emit("itemshown",{index:t,item:n,previous:s})})}animate(t,e,i){let s=this.anim?.velocity||0;this.anim?.stop();let o=Math.max(Number(this.options.velocity)||1,.1);this.anim=si({from:this.pos,to:t,velocity:e??s,stiffness:170*o*o,damping:20*o,update:n=>{this.pos=n,this.render()},done:()=>{if(this.anim=null,this.loop){let n=Math.floor(this.pos/this.total)*this.total;this.pos-=n,this.target-=n,this.render()}i?.()}})}bounded(t){return this.loop?t:t<this.min?this.min+$e(t-this.min,this.viewW):t>this.max?this.max+$e(t-this.max,this.viewW):t}setupDrag(){let t=this.container;this.on(t,"pointerdown",i=>{!this.options.draggable||this.drag||!this.metrics.length||i.pointerType==="mouse"&&i.button!==0||i.target.closest(Ui)||!this.owns(i.target)||(this.drag={id:i.pointerId,x0:i.clientX,y0:i.clientY,pos0:this.pos,active:!1,caught:!!this.anim,tracker:oi()},this.anim&&(this.anim.stop(),this.anim=null))}),this.on(window,"pointermove",i=>{let s=this.drag;if(!s||i.pointerId!==s.id)return;let o=i.clientX-s.x0,n=i.clientY-s.y0;if(!s.active){if(Math.abs(o)<5&&Math.abs(n)<5)return;if(i.pointerType!=="mouse"&&Math.abs(n)>Math.abs(o)){this.endDrag(!0);return}if(Math.abs(o)<5)return;s.active=!0,s.x0=i.clientX;try{t.setPointerCapture(s.id)}catch{}this.el.classList.add("pl-slider-dragging"),this.pause("drag")}this.pos=this.bounded(s.pos0-(i.clientX-s.x0)),s.tracker.add(i.clientX,i.timeStamp),this.render()});let e=i=>{let s=this.drag;!s||i.pointerId!==s.id||this.endDrag(i.type==="pointercancel",i.timeStamp)};this.on(window,"pointerup",e),this.on(window,"pointercancel",e),this.on(t,"click",i=>{performance.now()<this.suppressClick&&(i.preventDefault(),i.stopPropagation())},!0),this.on(t,"dragstart",i=>i.preventDefault()),this.on(t,"wheel",i=>{if(!this.options.draggable||!this.metrics.length||Math.abs(i.deltaX)<=Math.abs(i.deltaY))return;i.preventDefault(),this.anim?.stop(),this.anim=null;let s=i.deltaMode===1?i.deltaX*16:i.deltaX;this.pos=this.loop?this.pos+s:$(this.pos+s,this.min,this.max),this.render(),clearTimeout(this.wheelTimer),this.wheelTimer=setTimeout(()=>{let{index:o,dest:n}=this.nearest(this.pos);this.goTo(o,n,0)},110)},{passive:!1})}endDrag(t,e=performance.now()){let i=this.drag;if(!i)return;if(this.drag=null,!i.active){if(i.caught){let{index:l,dest:h}=this.nearest(this.pos);this.goTo(l,h,0)}return}try{this.container.releasePointerCapture(i.id)}catch{}this.el.classList.remove("pl-slider-dragging"),this.suppressClick=performance.now()+250;let s=t?0:-i.tracker.get(e),o=this.target,{index:n,dest:a}=this.nearest(this.pos+s*.22);if(this.resume("drag"),Math.abs(s)>280&&Math.abs(a-o)<1){let l=this.stopIdx.indexOf(this.navOf(this.index));if(this.loop||(s>0?l<this.stopIdx.length-1:l>0)){this.show(s>0?"next":"previous",{velocity:s});return}}this.goTo(n,a,s)}};d(Rt,"prefix","slider"),d(Rt,"defaults",{center:!1,finite:!1,sets:!1,autoplay:!1,autoplayInterval:5e3,pauseOnHover:!0,draggable:!0,index:0,velocity:1});v("slider",Rt);var ht=r=>`translate3d(${(r*100).toFixed(3)}%, 0, 0)`,Te=r=>`scale(${r.toFixed(4)})`,Ki={slide:(r,t)=>[{transform:ht(-t*r)},{transform:ht(t*(1-r))}],fade:r=>[{opacity:1},{opacity:r,zIndex:1}],scale:r=>[{opacity:1-r,transform:Te(1-.12*r)},{opacity:r,transform:Te(1.12-.12*r),zIndex:1}],zoom:r=>[{opacity:1-r,transform:Te(1+.45*r),zIndex:1},{transform:Te(.86+.14*r)}],push:(r,t)=>[{transform:ht(-t*r*.3),filter:`brightness(${(1-.45*r).toFixed(3)})`},{transform:ht(t*(1-r)),zIndex:1}],pull:(r,t)=>[{transform:ht(-t*r),zIndex:1},{transform:ht(t*(1-r)*.3),filter:`brightness(${(.55+.45*r).toFixed(3)})`}]},js='input, textarea, select, [contenteditable]:not([contenteditable="false"]), .pl-drag-ignore',Wt=class extends gt{init(){if(!this.setup())return;let{options:t,list:e,el:i}=this;this.tr=null,this.drag=null,this.suppressClick=0;let s=String(t.ratio).match(/^\s*([\d.]+)\s*[:/]\s*([\d.]+)\s*$/);t.ratio===!1||t.ratio==="false"?e.style.setProperty("--pl-slideshow-ratio","auto"):s&&e.style.setProperty("--pl-slideshow-ratio",`${s[1]} / ${s[2]}`);let o=n=>typeof n=="number"?`${n}px`:n;t.minHeight&&e.style.setProperty("--pl-slideshow-min-height",o(t.minHeight)),t.maxHeight&&e.style.setProperty("--pl-slideshow-max-height",o(t.maxHeight)),t.kenburns&&i.classList.add("pl-slideshow-kenburns"),i.classList.toggle("pl-slideshow-draggable",!!t.draggable),this.index=$(Number(t.index)||0,0,Math.max(0,this.slides.length-1)),this.setupDrag(),this.update(),i.classList.add("pl-slideshow-ready"),this.onDestroy(()=>this.tr?.anim?.stop()),this.tick(!0)}update(){if(!this.list)return;this.tr&&this.finish();let t=this.slides;this.index=$(this.index,0,Math.max(0,t.length-1)),t.forEach((i,s)=>i.classList.toggle("pl-active",s===this.index)),this.labelSlides(),this.buildNav();let e=E(".pl-slideshow-progress",this.el);!e&&this.options.autoplay&&this.options.progress&&(e=document.createElement("div"),e.className="pl-slideshow-progress",this.el.append(e)),e&&(e.setAttribute("aria-hidden","true"),e.children.length!==t.length&&(e.innerHTML="<span></span>".repeat(t.length))),this.progress=e,this.updateNav()}updateNav(){super.updateNav(),[...this.progress?.children||[]].forEach((t,e)=>{t.classList.toggle("pl-done",e<this.index),t.classList.toggle("pl-active",e===this.index)})}canMove(){let t=this.slides.length;return this.options.finite?[this.index>0,this.index<t-1]:[t>1,t>1]}resolve(t){let e=this.slides.length;if(e<2)return-1;let i=this.index+(t==="next"?1:-1);return i>=0&&i<e?i:this.options.finite?-1:(i+e)%e}show(t,{velocity:e=0}={}){if(!this.list)return;this.tr&&this.finish();let i,s;if(t==="next"||t==="previous"){if(s=t==="next"?1:-1,i=this.resolve(t),i<0){this.slides.length&&(this.begin(-1,s),this.run(0,700));return}}else{if(i=$(Math.round(Number(t))||0,0,this.slides.length-1),i===this.index)return;s=i>this.index?1:-1}this.begin(i,s),this.commit()?this.run(1,e):this.finish()}begin(t,e){let i=this.slides,s=i[this.index],o=t>=0?i[t]:null;this.tr={from:s,to:o,fromIndex:this.index,toIndex:t,dir:e,p:0,committed:!1,anim:null},s.classList.add("pl-transition-active"),o?.classList.add("pl-transition-active"),this.renderTransition()}commit(){let t=this.tr,e={index:t.toIndex,item:t.to,previous:t.fromIndex};return this.emit("beforeitemshow",e,!0)?(t.committed=!0,t.from.classList.remove("pl-active"),t.to.classList.add("pl-active"),this.index=t.toIndex,this.updateNav(),this.emit("itemhide",{index:t.fromIndex,item:t.from}),this.emit("itemshow",e),this.tick(!0),!0):!1}run(t,e=0){let i=this.tr,s=this.list.offsetWidth||1,o=Math.max(Number(this.options.velocity)||1,.1);i.anim=si({from:i.p*s,to:t*s,velocity:e,stiffness:210*o*o,damping:29*o,update:n=>{i.p=n/s,this.tr===i&&this.renderTransition()},done:()=>{this.tr===i&&this.finish()}})}renderTransition(){let{from:t,to:e,dir:i,p:s}=this.tr;if(!e){t.style.transform=ht(-i*Math.max(s,0));return}let o=Ki[this.options.animation]||Ki.slide,[n,a]=o($(s,0,1),i);Object.assign(t.style,n),Object.assign(e.style,a)}finish(){let t=this.tr;if(t){this.tr=null,t.anim?.stop();for(let e of[t.from,t.to])if(e){for(let i of["transform","opacity","zIndex","filter"])e.style[i]="";e.classList.remove("pl-transition-active")}t.committed&&(t.from.querySelectorAll("video").forEach(e=>e.pause()),t.to.querySelectorAll("video[autoplay]").forEach(e=>e.play?.()?.catch?.(()=>{})),this.emit("itemshown",{index:t.toIndex,item:t.to,previous:t.fromIndex}))}}setupDrag(){let t=this.list;this.on(t,"pointerdown",i=>{!this.options.draggable||this.drag||!this.slides.length||i.pointerType==="mouse"&&i.button!==0||i.target.closest(js)||!this.owns(i.target)||(this.drag={id:i.pointerId,x0:i.clientX,y0:i.clientY,active:!1,tracker:oi()})}),this.on(window,"pointermove",i=>{let s=this.drag;if(!s||i.pointerId!==s.id)return;let o=i.clientY-s.y0,n=i.clientX-s.x0;if(!s.active){if(Math.abs(n)<5&&Math.abs(o)<5)return;if(i.pointerType!=="mouse"&&Math.abs(o)>Math.abs(n)){this.drag=null;return}if(Math.abs(n)<5)return;this.tr&&this.finish(),s.active=!0,s.x0=i.clientX,s.width=t.offsetWidth||1,n=0;try{t.setPointerCapture(s.id)}catch{}this.el.classList.add("pl-slideshow-dragging"),this.pause("drag")}let a=n<=0?1:-1;(!this.tr||this.tr.dir!==a)&&(this.finish(),this.begin(this.resolve(a>0?"next":"previous"),a));let l=Math.abs(n);this.tr.p=this.tr.to?$(l/s.width,0,1):$e(l,s.width)/s.width/2.5,s.tracker.add(i.clientX,i.timeStamp),this.renderTransition()});let e=i=>{let s=this.drag;if(!s||i.pointerId!==s.id||(this.drag=null,!s.active))return;try{t.releasePointerCapture(s.id)}catch{}this.el.classList.remove("pl-slideshow-dragging"),this.suppressClick=performance.now()+250,this.resume("drag");let o=this.tr;if(!o)return;let n=i.type==="pointercancel"?0:-s.tracker.get(i.timeStamp)*o.dir;o.to&&(n>320||o.p>.5&&n>-320)&&this.commit()?this.run(1,n):this.run(0,n)};this.on(window,"pointerup",e),this.on(window,"pointercancel",e),this.on(t,"click",i=>{performance.now()<this.suppressClick&&(i.preventDefault(),i.stopPropagation())},!0),this.on(t,"dragstart",i=>i.preventDefault())}};d(Wt,"prefix","slideshow"),d(Wt,"defaults",{animation:"slide",autoplay:!1,autoplayInterval:6e3,pauseOnHover:!0,ratio:"16:9",minHeight:"",maxHeight:"",finite:!1,draggable:!0,kenburns:!1,progress:!0,index:0,velocity:1});v("slideshow",Wt);var Rs='input, textarea, select, option, button, [contenteditable]:not([contenteditable="false"]), .pl-sortable-nodrag',_i="cubic-bezier(0.33, 0.5, 0.2, 1)",Ws=260,Vt=new WeakMap;function De(r,t,e){let i=[...new Set(r)].flatMap(o=>[...o.children]),s=new Map(i.map(o=>[o,o.getBoundingClientRect()]));if(t(),!(!e||S()))for(let[o,n]of s){if(Vt.get(o)?.cancel(),!o.isConnected||typeof o.animate!="function")continue;let a=o.getBoundingClientRect(),l=n.left-a.left,h=n.top-a.top;if(Math.abs(l)<.5&&Math.abs(h)<.5)continue;let c=o.animate([{transform:`translate(${l}px, ${h}px)`},{transform:"none"}],{duration:e,easing:_i});Vt.set(o,c),c.onfinish=c.oncancel=()=>{Vt.get(o)===c&&Vt.delete(o)}}}function Ce(r,t,e){if(typeof r.moveBefore=="function"&&t.isConnected)try{r.moveBefore(t,e);return}catch{}r.insertBefore(t,e)}var bt,et,Vs="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function Xi(){return(!et||!et.isConnected)&&(et=document.createElement("div"),et.id="pl-sortable-help",et.hidden=!0,et.textContent=y("sortable.help"),bt=document.createElement("div"),bt.setAttribute("aria-live","assertive"),bt.setAttribute("aria-atomic","true"),bt.style.cssText=Vs,document.body.append(et,bt)),{liveRegion:bt,helpText:et}}function ni(r){let{liveRegion:t}=Xi();t.textContent="",setTimeout(()=>t.textContent=r,30)}var Yt=class extends x{init(){let{el:t}=this;if(this.session=null,this.kb=null,this.kbMoving=!1,this.suppressClick=0,t.classList.add("pl-sortable"),t.classList.toggle("pl-sortable-by-handle",!!this.options.handle),this.on(t,"pointerdown",e=>this.onDown(e)),this.on(window,"pointermove",e=>this.onMove(e),{passive:!1}),this.on(window,"pointerup",e=>this.onUp(e)),this.on(window,"pointercancel",e=>this.onUp(e,!0)),this.on(document,"touchmove",e=>{this.session?.started&&e.cancelable&&e.preventDefault()},{passive:!1}),this.on(t,"contextmenu",e=>{this.session&&e.preventDefault()}),this.on(t,"dragstart",e=>e.preventDefault()),this.on(window,"click",e=>{performance.now()<this.suppressClick&&(e.preventDefault(),e.stopPropagation())},!0),this.on(window,"keydown",e=>{e.key==="Escape"&&this.session?.started&&(e.preventDefault(),this.finishDrag(!0))}),this.on(t,"keydown",e=>this.onKey(e)),this.on(t,"focusin",e=>{let i=this.itemOf(e.target);i&&e.target===i&&this.setTabStop(i)}),this.on(t,"focusout",e=>{this.kb&&!this.kbMoving&&e.target===this.kb.item&&this.dropKey()}),typeof MutationObserver=="function"){let e=new MutationObserver(()=>this.refresh());e.observe(t,{childList:!0}),this.onDestroy(()=>e.disconnect())}this.onDestroy(()=>this.finishDrag(!0,!0)),this.refresh()}get items(){return[...this.el.children]}toArray(t){return t?this.items.map(e=>e.getAttribute(t)):this.items}itemOf(t){for(;t&&t.parentElement!==this.el;)t=t.parentElement;return t||null}refresh(){let t=this.items.filter(s=>!s.classList.contains(this.options.clsDrag));if(this.el.classList.toggle(this.options.clsEmpty,!t.length),!t.length)return;let{helpText:e}=Xi(),i=t.find(s=>s.dataset.plSortableTab==="0")||t[0];for(let s of t)!s.dataset.plSortableTab&&s.hasAttribute("tabindex")||(s.dataset.plSortableTab=s===i?"0":"-1",s.tabIndex=s===i?0:-1,s.setAttribute("aria-roledescription",y("sortable.role",{},this.el)),s.setAttribute("aria-describedby",e.id))}setTabStop(t){for(let e of this.items)e.dataset.plSortableTab&&(e.dataset.plSortableTab=e===t?"0":"-1",e.tabIndex=e===t?0:-1)}onDown(t){if(this.session||this.kb||t.pointerType==="mouse"&&t.button!==0)return;let e=this.itemOf(t.target);if(!e||t.target===this.el)return;let{handle:i}=this.options;if(i){let o=t.target.closest(i);if(!o||!e.contains(o))return}else if(t.target.closest(Rs))return;let s=t.pointerType==="touch";this.session={id:t.pointerId,item:e,x0:t.clientX,y0:t.clientY,x:t.clientX,y:t.clientY,started:!1,hold:s&&!i?setTimeout(()=>this.startDrag(),Ws):0,needsHold:s&&!i}}onMove(t){let e=this.session;if(!(!e||t.pointerId!==e.id)){if(e.x=t.clientX,e.y=t.clientY,!e.started){let i=Math.hypot(e.x-e.x0,e.y-e.y0);if(e.needsHold){i>8&&this.finishDrag(!0);return}if(i<this.options.threshold||(this.startDrag(),!this.session))return}t.cancelable&&t.preventDefault(),this.moveClone(),this.track()}}onUp(t,e=!1){let i=this.session;!i||t.pointerId!==i.id||this.finishDrag(e)}startDrag(){let t=this.session;if(!t||t.started)return;clearTimeout(t.hold);let{item:e}=t,i=this.items.indexOf(e);if(i<0||!this.emit("start",{item:e,index:i,from:i},!0)){this.session=null;return}t.started=!0,t.origin={parent:this.el,next:e.nextElementSibling,index:i};let s=e.getBoundingClientRect();t.offsetX=t.x0-s.left,t.offsetY=t.y0-s.top;let o=e.cloneNode(!0);o.removeAttribute("id"),o.removeAttribute("tabindex"),o.setAttribute("aria-hidden","true"),o.classList.add(this.options.clsDrag),Object.assign(o.style,{position:"fixed",left:"0",top:"0",width:`${s.width}px`,height:`${s.height}px`,margin:"0",boxSizing:"border-box",pointerEvents:"none"}),t.clone=o,(e.closest("dialog[open]")||document.body).append(o),this.moveClone(),e.classList.add(this.options.clsPlaceholder),document.documentElement.classList.add("pl-sortable-dragging"),getSelection?.()?.removeAllRanges();try{this.el.setPointerCapture(t.id)}catch{}t.needsHold&&navigator.vibrate?.(8);let n=()=>{this.session===t&&(this.autoScroll()&&this.track(),t.frame=requestAnimationFrame(n))};t.frame=requestAnimationFrame(n)}moveClone(){let t=this.session;t?.clone&&(t.clone.style.translate=`${t.x-t.offsetX}px ${t.y-t.offsetY}px`)}sortableAt(t){let{group:e}=this.options;for(;t;t=t.parentElement){let i=H(t,"sortable");if(i&&(i===this||e!==""&&i.options.group===e))return i}return null}track(){let t=this.session;if(!t?.started)return;let{item:e}=t,i=document.elementFromPoint(t.x,t.y),s=i&&this.sortableAt(i);if(!s)return;let o=i===s.el?null:s.itemOf(i);if(o===e)return;if(!o){e.parentElement!==s.el&&this.insert(s,null);return}if(Vt.has(o))return;let n=o.getBoundingClientRect(),a=e.getBoundingClientRect(),l;if(e.parentElement===s.el){l=!!(e.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING);let h=n.top<a.bottom-1&&n.bottom>a.top+1;if(h&&n.width>a.width+1){if(l?t.x>n.left+a.width:t.x<n.right-a.width)return}else if(!h&&n.height>a.height+1&&(l?t.y>n.top+a.height:t.y<n.bottom-a.height))return}else{let c=(o.nextElementSibling||o.previousElementSibling)?.getBoundingClientRect();l=(c?c.top<n.bottom-1&&c.bottom>n.top+1:!1)?t.x<n.left+n.width/2:t.y<n.top+n.height/2}this.insert(s,l?o:o.nextElementSibling)}insert(t,e){let{item:i}=this.session;if(e===i||i.parentElement===t.el&&i.nextElementSibling===e)return;let s=i.parentElement;De([s,t.el],()=>Ce(t.el,i,e),this.options.animation)}autoScroll(){let t=this.session,e=64,i=20,s=document.scrollingElement||document.documentElement,o=(a,l,h)=>a<l+e?-i*Math.min(1,(l+e-a)/e):a>h-e?i*Math.min(1,(a-(h-e))/e):0,n=[];for(let a=t.item.parentElement;a&&a!==document.body&&a!==s;a=a.parentElement){let l=getComputedStyle(a);/(auto|scroll)/.test(l.overflowY+l.overflowX)&&n.push(a)}n.push(s);for(let a of n){let h=a===s?{top:0,left:0,bottom:innerHeight,right:innerWidth}:a.getBoundingClientRect(),c=o(t.y,Math.max(h.top,0),Math.min(h.bottom,innerHeight)),p=o(t.x,Math.max(h.left,0),Math.min(h.right,innerWidth)),m=a.scrollHeight-a.clientHeight,b=a.scrollWidth-a.clientWidth;if((c<0?a.scrollTop<=0:a.scrollTop>=m-1)&&(c=0),(p<0?a.scrollLeft<=0:a.scrollLeft>=b-1)&&(p=0),p||c)return a.scrollBy({left:p,top:c,behavior:"instant"}),!0}return!1}finishDrag(t=!1,e=!1){let i=this.session;if(!i||(this.session=null,clearTimeout(i.hold),!i.started))return;cancelAnimationFrame(i.frame);let{item:s,clone:o,origin:n}=i,{options:a}=this;if(document.documentElement.classList.remove("pl-sortable-dragging"),this.suppressClick=performance.now()+250,t&&(s.parentElement!==n.parent||s.nextElementSibling!==n.next)){let m=n.next?.parentElement===n.parent?n.next:null;De([s.parentElement,n.parent],()=>Ce(n.parent,s,m),e?0:a.animation)}let l=()=>{o.remove(),s.classList.remove(a.clsPlaceholder)};if(e||S()||typeof o.animate!="function")l();else{let m=s.getBoundingClientRect(),b=getComputedStyle(o);o.classList.add("pl-sortable-drop"),o.animate([{translate:b.translate,rotate:b.rotate,scale:b.scale},{translate:`${m.left}px ${m.top}px`,rotate:"0deg",scale:"1"}],{duration:Math.max(a.animation,120)*1.2,easing:_i,fill:"forwards"}).finished.then(l,l)}let h=H(s.parentElement,"sortable")||this,c=h.items.indexOf(s),p=n.index;this.refresh(),h!==this?(h.refresh(),this.emit("removed",{item:s,from:p,to:c,target:h}),h.emit("added",{item:s,from:p,to:c,source:this})):c!==p&&this.emit("moved",{item:s,from:p,to:c}),this.emit("stop",{item:s,from:p,to:c,target:h,cancelled:t})}label(t){let e=t.getAttribute("aria-label")||t.textContent.replace(/\s+/g," ").trim();return e.length>48?`${e.slice(0,48)}\u2026`:e}neighbor(t,e){let i=this.items,s=i.indexOf(t);if(e==="ArrowLeft")return i[s-1];if(e==="ArrowRight")return i[s+1];let o=e==="ArrowUp",n=t.getBoundingClientRect(),a=n.left+n.width/2,l=null,h=1/0;for(let c of i){if(c===t)continue;let p=c.getBoundingClientRect();if(o?p.bottom>n.top+1:p.top<n.bottom-1)continue;let m=Math.abs(p.top-n.top)*1e4+Math.abs(p.left+p.width/2-a);m<h&&(h=m,l=c)}return l||(o?i[s-1]:i[s+1])}onKey(t){let e=this.itemOf(t.target);if(!e||t.target!==e||this.session)return;let{key:i}=t,s=i.startsWith("Arrow"),o=this.items.length;if(!this.kb){if(i===" "){t.preventDefault();let n=this.items.indexOf(e);if(!this.emit("start",{item:e,index:n,from:n},!0))return;this.kb={item:e,next:e.nextElementSibling,index:n},e.classList.add("pl-sortable-grabbed"),ni(y("sortable.lifted",{label:this.label(e),n:n+1,count:o},this.el))}else if(s||i==="Home"||i==="End"){let n=i==="Home"?this.items[0]:i==="End"?this.items[o-1]:this.neighbor(e,i);n&&(t.preventDefault(),n.focus())}return}if(s){t.preventDefault();let n=this.neighbor(e,i);if(!n)return;let a=i==="ArrowUp"||i==="ArrowLeft";this.kbMoving=!0,De([this.el],()=>Ce(this.el,e,a?n:n.nextElementSibling),this.options.animation),e.focus({preventScroll:!0}),this.kbMoving=!1,e.scrollIntoView({block:"nearest",inline:"nearest"}),ni(y("sortable.moved",{n:this.items.indexOf(e)+1,count:o},this.el))}else i===" "||i==="Enter"?(t.preventDefault(),this.dropKey()):i==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.dropKey(!0))}dropKey(t=!1){let e=this.kb;if(!e)return;this.kb=null;let{item:i}=e;if(i.classList.remove("pl-sortable-grabbed"),t){let n=document.activeElement===i;this.kbMoving=!0;let a=e.next?.parentElement===this.el?e.next:null;i.nextElementSibling!==a&&De([this.el],()=>Ce(this.el,i,a),this.options.animation),n&&i.focus({preventScroll:!0}),this.kbMoving=!1}let s=this.items.indexOf(i),o=this.items.length;ni(t?y("sortable.cancelled",{label:this.label(i),n:s+1,count:o},this.el):y("sortable.dropped",{label:this.label(i),n:s+1,count:o},this.el)),s!==e.index&&this.emit("moved",{item:i,from:e.index,to:s}),this.emit("stop",{item:i,from:e.index,to:s,target:this,cancelled:t})}};d(Yt,"defaults",{group:"",handle:"",animation:200,clsDrag:"pl-sortable-drag",clsPlaceholder:"pl-sortable-placeholder",clsEmpty:"pl-sortable-empty",threshold:5}),d(Yt,"primary","group");v("sortable",Yt);var yt="cubic-bezier(0.33, 0.5, 0.2, 1)",Ut="[data-pl-filter-control]";function Gi(r){let t=r.getAttribute("data-pl-filter-control")||"",e=oe(t,{filter:"",group:"",sort:"",order:"asc"},"filter");for(let i of Object.keys(e))e[i]=e[i]===null?"":String(e[i]);return!("filter"in e)&&!("sort"in e)&&(e.filter=""),e}var Kt=class extends x{init(){this.state={filter:{"":""},sort:[]},this.pending=null;let{selActive:t}=this.options;(t?T(String(t),this.el):this.controls.filter(i=>i.classList.contains("pl-active"))).forEach(i=>this.merge(i));for(let i of this.controls)!i.matches("a, button")&&!i.querySelector("a, button")&&(i.setAttribute("role","button"),i.hasAttribute("tabindex")||(i.tabIndex=0));this.on(this.el,"click",i=>{let s=i.target.closest(Ut);!s||!this.el.contains(s)||(i.preventDefault(),this.apply(s))}),this.on(this.el,"keydown",i=>{if(i.key!=="Enter"&&i.key!==" ")return;let s=i.target;s.matches?.(`${Ut}[role="button"]`)?(i.preventDefault(),this.apply(s)):i.key===" "&&s.matches?.('a[role="button"]')&&s.closest(Ut)&&(i.preventDefault(),this.apply(s.closest(Ut)))}),this.onDestroy(()=>this.finishAnimations()),this.setState(this.state,!1)}get controls(){return T(Ut,this.el)}get targets(){let{target:t}=this.options;if(!t)return[];let e=T(t,this.el);return e.length?e:T(t)}get visible(){return this.targets.flatMap(t=>[...t.children].filter(e=>!e.hidden))}getState(){return{filter:{...this.state.filter},sort:[...this.state.sort]}}merge(t,e=this.state){let i=Gi(t);return"filter"in i&&(i.group?(delete e.filter[""],e.filter[i.group]=i.filter):e.filter={"":i.filter}),"sort"in i&&(e.sort=i.sort?[i.sort,i.order==="desc"?"desc":"asc"]:[]),e}isActive(t){let e=Gi(t),{filter:i,sort:s}=this.state,o=!0;if("filter"in e){let n=e.group||"";o=n in i?i[n]===e.filter:!e.filter&&n!==""&&!i[""]}return o&&"sort"in e&&(o=s[0]===e.sort&&(s[1]||"asc")===(e.order==="desc"?"desc":"asc")),o}apply(t){return this.setState(this.merge(t,this.getState()))}reset(){return this.setState({filter:{"":""},sort:this.state.sort})}setState(t,e=!0){if(t={filter:{...t.filter||{"":""}},sort:[...t.sort||[]]},!this.emit("beforefilter",{state:t},!0))return Promise.resolve();this.state=t;for(let n of this.controls){let a=this.isActive(n);n.classList.toggle("pl-active",a);let l=n.matches('a, button, [role="button"]')?n:n.querySelector("a, button");l&&(l.matches("a")&&!l.hasAttribute("role")&&l.setAttribute("role","button"),l.setAttribute("aria-pressed",String(a)))}this.finishAnimations();let i=e&&!S()&&this.options.duration>0?this.options.animation:!1,s=this.targets.map(n=>this.filterTarget(n,i)),{signal:o}=this;return Promise.all(s).then(()=>{if(o.aborted||this.state!==t)return;let n=this.visible;for(let a of T(".pl-filter-empty",this.el))a.hidden=n.length>0;this.emit("afterfilter",{state:t,items:n})})}filterTarget(t,e){let i=[...t.children],s=Object.values(this.state.filter).filter(Boolean),o=c=>s.every(p=>{try{return c.matches(p)}catch{return!0}}),[n,a]=this.state.sort,l=i;if(n){let c=new Intl.Collator(q(this.el),{numeric:!0,sensitivity:"base"}),p=(m,b)=>c.compare(m,b);l=[...i].sort((m,b)=>p(m.getAttribute(n)||"",b.getAttribute(n)||"")*(a==="desc"?-1:1))}let h=()=>{for(let c of i)c.hidden=!o(c);l.some((c,p)=>c!==i[p])&&t.append(...l)};return!e||typeof t.animate!="function"?(h(),Promise.resolve()):e==="slide"?this.slide(t,i,h):this.fade(t,i,h,e==="delayed-fade")}finishAnimations(){let t=this.pending;this.pending=null,t?.forEach(e=>e())}track(t,e){let i=!1,s=()=>{i||(i=!0,t.forEach(o=>o.cancel()),e?.())};return(this.pending||(this.pending=[])).push(s),Promise.allSettled(t.map(o=>o.finished)).then(s)}slide(t,e,i){let{duration:s}=this.options,o=new Map(e.filter(b=>!b.hidden).map(b=>[b,b.getBoundingClientRect()])),n=t.offsetHeight;i();let a=t.offsetHeight,l=new Map(e.filter(b=>!b.hidden).map(b=>[b,b.getBoundingClientRect()])),h=t.getBoundingClientRect(),c=[],p=[],m=t.style.cssText;getComputedStyle(t).position==="static"&&(t.style.position="relative"),p.push(()=>t.style.cssText=m);for(let b of e){let f=o.get(b),u=l.get(b);if(f&&u){let g=f.left-u.left,w=f.top-u.top;if(Math.abs(g)<.5&&Math.abs(w)<.5)continue;c.push(b.animate([{transform:`translate(${g}px, ${w}px)`},{transform:"none"}],{duration:s,easing:yt}))}else if(u)c.push(b.animate([{opacity:0,transform:"scale(0.9)"},{opacity:1,transform:"none"}],{duration:s,delay:s*.2,easing:yt,fill:"backwards"}));else if(f){let g=b.style.cssText;b.hidden=!1,Object.assign(b.style,{position:"absolute",left:`${f.left-h.left-t.clientLeft+t.scrollLeft}px`,top:`${f.top-h.top-t.clientTop+t.scrollTop}px`,width:`${f.width}px`,height:`${f.height}px`,margin:"0",boxSizing:"border-box",pointerEvents:"none"}),p.push(()=>{b.style.cssText=g,b.hidden=!0}),c.push(b.animate([{opacity:1,transform:"none"},{opacity:0,transform:"scale(0.88)"}],{duration:s*.8,easing:yt,fill:"forwards"}))}}return Math.abs(n-a)>1&&c.push(t.animate([{height:`${n}px`},{height:`${a}px`}],{duration:s,easing:yt})),this.track(c,()=>p.forEach(b=>b()))}async fade(t,e,i,s){let{duration:o}=this.options,n=o/2,a=s?Math.min(45,o/4):0,l=this.state,{signal:h}=this,c=e.filter(m=>!m.hidden).map((m,b)=>m.animate([{opacity:1},{opacity:0,transform:s?"translateY(-6px)":"none"}],{duration:n,delay:b*a,easing:yt,fill:"forwards"}));if(await this.track(c),h.aborted||this.state!==l)return;i();let p=[...t.children].filter(m=>!m.hidden).map((m,b)=>m.animate([{opacity:0,transform:s?"translateY(8px)":"none"},{opacity:1,transform:"none"}],{duration:n,delay:b*a,easing:yt,fill:"backwards"}));await this.track(p)}};d(Kt,"defaults",{target:"",selActive:!1,animation:"slide",duration:250}),d(Kt,"primary","target");v("filter",Kt);var Ys=()=>matchMedia("(prefers-reduced-motion: reduce)").matches,_t=class extends x{init(){let{el:t,options:e}=this;if(this.native=t.matches("video, audio"),this.provider=this.native?null:this.detectProvider(),this.ready=this.native,this.wanted=!1,!this.native&&!this.provider)return;if(this.provider){this.on(t,"load",()=>{this.ready=!0,this.wanted&&this.play()});let{signal:s}=this;setTimeout(()=>{s.aborted||this.ready||(this.ready=!0,this.wanted&&this.play())},1500)}let i=e.autoplay;if(i==="hover"){let s=String(e.hoverTarget||""),o=e.hoverTarget?s.startsWith("!")?t.closest(s.slice(1).trim())||t:document.querySelector(s)||t:t;this.native&&(t.preload=t.getAttribute("preload")||"metadata"),this.on(o,"pointerenter",()=>this.play()),this.on(o,"pointerleave",()=>this.pause()),this.on(o,"focusin",()=>this.play()),this.on(o,"focusout",n=>{o.contains(n.relatedTarget)||this.pause()});return}if(!(i===!1||i==="false")){if(Ys()){this.native&&(t.removeAttribute("autoplay"),t.pause(),!t.controls&&!t.closest("a, button")&&(t.controls=!0));return}if(i==="inview"&&typeof IntersectionObserver=="function"){let s=new IntersectionObserver(([o])=>o.isIntersecting?this.play():this.pause(),{threshold:Number(e.threshold)||0});s.observe(t),this.onDestroy(()=>s.disconnect()),this.on(document,"visibilitychange",()=>{document.hidden?this.pause(!0):this.wanted&&this.play()})}else this.play()}}detectProvider(){let t=this.el.getAttribute("src")||"";return this.el.matches("iframe")?/youtube(-nocookie)?\.com|youtu\.be/.test(t)?"youtube":/vimeo\.com/.test(t)?"vimeo":null:null}post(t){try{this.el.contentWindow?.postMessage(JSON.stringify(t),"*")}catch{}}mute(){let{el:t}=this;this.native?t.muted=!0:this.provider==="youtube"?this.post({event:"command",func:"mute",args:[]}):this.post({method:"setVolume",value:0})}play(){let{el:t,options:e}=this;this.wanted=!0,this.ready&&(e.automute&&this.mute(),this.native?(t.playsInline=!0,t.play()?.catch?.(()=>{})):this.provider==="youtube"?this.post({event:"command",func:"playVideo",args:[]}):this.post({method:"play"}),this.emit("play"))}pause(t=!1){let{el:e,options:i}=this;t||(this.wanted=!1),this.ready&&(this.native?(e.pause(),i.rewind&&(e.currentTime=0)):this.provider==="youtube"?(this.post({event:"command",func:"pauseVideo",args:[]}),i.rewind&&this.post({event:"command",func:"seekTo",args:[0,!0]})):(this.post({method:"pause"}),i.rewind&&this.post({method:"setCurrentTime",value:0})),this.emit("pause"))}};d(_t,"defaults",{autoplay:"inview",automute:!0,hoverTarget:!1,rewind:!1,threshold:.25}),d(_t,"primary","autoplay");v("video",_t);var Zi={linear:r=>r,"ease-out":r=>1-(1-r)**4,"ease-in-out":r=>r<.5?8*r**4:1-(-2*r+2)**4/2},Xt=class extends x{init(){let{el:t,options:e}=this;this.frame=0,this.timer=0,this.done=!1;let i=t.textContent.trim();if(e.locale??(e.locale=q(t)),e.to===null||e.to===""){let s=(()=>{try{return new Intl.NumberFormat(e.locale).format(1.5).replace(/\d/g,"")||"."}catch{return"."}})(),o=i.replace(new RegExp(`[^\\d\\-${s==="."?"\\.":s}]`,"g"),""),n=parseFloat(s==="."?o:o.replace(s,"."));this.to=Number.isNaN(n)?0:n}else this.to=Number(e.to)||0;this.from=Number(e.from)||0;try{this.formatter=new Intl.NumberFormat(e.locale||"en",{minimumFractionDigits:e.decimals,maximumFractionDigits:e.decimals,useGrouping:"always"})}catch{this.formatter=new Intl.NumberFormat("en",{minimumFractionDigits:e.decimals,maximumFractionDigits:e.decimals})}if(this.visual=document.createElement("span"),this.visual.setAttribute("aria-hidden","true"),this.label=document.createElement("span"),this.label.textContent=this.format(this.to),Object.assign(this.label.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"}),t.textContent="",t.append(this.visual,this.label),t.style.fontVariantNumeric="tabular-nums",this.render(this.from),e.autostart&&typeof IntersectionObserver=="function"){let s=new IntersectionObserver(([o])=>{o.isIntersecting?(e.once&&s.disconnect(),this.start()):e.once||this.reset()},{threshold:.2});s.observe(t),this.onDestroy(()=>s.disconnect())}this.onDestroy(()=>this.stop())}format(t){let{separator:e,decimal:i,prefix:s,suffix:o}=this.options,n;return e===null&&i===null?n=this.formatter.format(t):n=this.formatter.formatToParts(t).map(a=>a.type==="group"&&e!==null?String(e):a.type==="decimal"&&i!==null?String(i):a.value).join(""),`${s??""}${n}${o??""}`}render(t){this.visual.textContent=this.format(t)}stop(){cancelAnimationFrame(this.frame),clearTimeout(this.timer),this.frame=0,this.timer=0}reset(){this.stop(),this.done=!1,this.render(this.from)}start(t){let{options:e}=this;typeof t=="number"&&(this.to=t,this.label.textContent=this.format(t)),this.stop(),this.emit("start",{value:this.from});let i=()=>{this.render(this.to),this.done=!0,this.emit("complete",{value:this.to})},s=Number(e.duration)||0;if(!s||S()){i();return}let o=Zi[e.easing]||Zi["ease-out"],{from:n,to:a}=this,l=()=>{let h=performance.now(),c=p=>{let m=Math.min((p-h)/s,1);m<1?(this.render(n+(a-n)*o(m)),this.frame=requestAnimationFrame(c)):(this.frame=0,i())};this.frame=requestAnimationFrame(c)};e.delay?this.timer=setTimeout(l,Number(e.delay)):l()}};d(Xt,"defaults",{to:null,from:0,duration:1600,delay:0,decimals:0,separator:null,decimal:null,prefix:"",suffix:"",locale:null,easing:"ease-out",once:!0,autostart:!0}),d(Xt,"primary","to");v("counter",Xt);var Gt=class extends x{init(){this.update=z(()=>this.match()),this.observed=new Set,typeof ResizeObserver=="function"&&(this.observer=new ResizeObserver(this.update),this.observer.observe(this.el),this.onDestroy(()=>this.observer.disconnect()));let t=new MutationObserver(this.update);t.observe(this.el,{childList:!0,subtree:!0,characterData:!0}),this.onDestroy(()=>t.disconnect()),this.on(window,"resize",this.update,{passive:!0}),this.on(window,"load",this.update);let{signal:e}=this;document.fonts?.ready.then(()=>!e.aborted&&this.update()).catch(()=>{}),this.onDestroy(()=>this.targets.forEach(i=>i.style.minHeight="")),this.match()}get targets(){let t=String(this.options.target||"> *").trim(),e;try{e=t.startsWith(">")?C(this.el,t):[...this.el.querySelectorAll(t)]}catch{e=[]}return e.filter(i=>i.getClientRects().length)}match(){let t=this.targets;if(this.observer)for(let s of t)this.observed.has(s)||(this.observed.add(s),this.observer.observe(s));t.forEach(s=>s.style.minHeight="");let e=t.map(s=>{let o=s.getBoundingClientRect();return{target:s,top:Math.round(o.top),height:s.offsetHeight}}),i=[];if(this.options.row)for(let s of e){let o=i.find(n=>Math.abs(n.top-s.top)<=2);o?o.items.push(s):i.push({top:s.top,items:[s]})}else i.push({top:0,items:e});for(let{items:s}of i){if(s.length<2)continue;let o=Math.max(...s.map(n=>n.height));for(let{target:n,height:a}of s){if(a===o)continue;let l=o,h=getComputedStyle(n);h.boxSizing!=="border-box"&&(l-=parseFloat(h.paddingTop)+parseFloat(h.paddingBottom)+parseFloat(h.borderTopWidth)+parseFloat(h.borderBottomWidth)),n.style.minHeight=`${l}px`}}this.emit("match",{targets:t})}};d(Gt,"defaults",{target:"> *",row:!0}),d(Gt,"primary","target");var ri=typeof CSS<"u"&&CSS.supports?.("height","100svh")?"svh":"vh",Oe=class extends x{init(){this.update=z(()=>this.resize()),this.on(window,"resize",this.update,{passive:!0}),this.on(window,"load",this.update);let{signal:t}=this;if(document.fonts?.ready.then(()=>!t.aborted&&this.update()).catch(()=>{}),typeof ResizeObserver=="function"&&this.options.expand){let e=new ResizeObserver(this.update);e.observe(document.body),this.onDestroy(()=>e.disconnect())}this.onDestroy(()=>this.el.style.minHeight=""),this.resize()}bottomOffset(){let{el:t}=this,e=this.options.offsetBottom;return e===!1||e===null||e===""?"":e===!0?`${t.nextElementSibling?.offsetHeight||0}px`:typeof e=="number"?e<=100?`${e}${ri}`:`${e}px`:/^-?[\d.]+(px|vh|svh|dvh|rem|em)$/.test(e)?e:`${E(e)?.offsetHeight||0}px`}resize(){let{el:t,options:e}=this;if(!t.getClientRects().length)return;let i=Number(e.min)||0,s;if(e.expand){t.style.minHeight="";let o=window.innerHeight-document.documentElement.offsetHeight;s=o>0?`${t.offsetHeight+o}px`:"",i&&(!s||parseFloat(s)<i)&&(s=`${i}px`)}else{let o=[];if(e.offsetTop===!0){let l=t.getBoundingClientRect().top+window.scrollY;l<window.innerHeight/2&&o.push(`${Math.round(l)}px`)}else typeof e.offsetTop=="number"&&e.offsetTop&&o.push(`${e.offsetTop}px`);let n=this.bottomOffset();n&&o.push(n);let a=o.length?`calc(100${ri} - ${o.join(" - ")})`:`100${ri}`;s=i?`max(${i}px, ${a})`:a}t.style.minHeight!==s&&(t.style.minHeight=s),this.emit("resize",{height:t.offsetHeight})}};d(Oe,"defaults",{offsetTop:!1,offsetBottom:!1,expand:!1,min:0});v("height-match",Gt);v("height-viewport",Oe);var Zt=class extends x{init(){let t=()=>this.options.target?[...this.el.querySelectorAll(`:scope ${this.options.target}`)]:[this.el],e=z(i=>{for(let s of t()){let o=s.getBoundingClientRect();s.style.setProperty("--pl-spot-x",`${i.clientX-o.left}px`),s.style.setProperty("--pl-spot-y",`${i.clientY-o.top}px`),s.classList.add("pl-spotlight","pl-spotlight-active")}});this.on(this.el,"pointermove",e),this.on(this.el,"pointerleave",()=>{requestAnimationFrame(()=>t().forEach(i=>i.classList.remove("pl-spotlight-active")))})}};d(Zt,"defaults",{target:null}),d(Zt,"primary","target");v("spotlight",Zt);typeof window<"u"&&(window.Plossy=O,xi());var _r=O;})();