(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.fQuery=t())})(this,function(){var e=Object.defineProperty,t=/* @__PURE__ */ ((t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r})({animation:()=>Ce,callDomMethod:()=>n,camelCase:()=>O,capitalize:()=>Ue,clamp:()=>oe,clampPercent:()=>se,compose:()=>we,curry:()=>Te,debounce:()=>Ee,diff:()=>ge,dist:()=>ce,escape:()=>We,escapeRegExp:()=>Ge,evaluate:()=>De,extend:()=>D,flatten:()=>Pe,forgetDot:()=>Fe,getDomProperty:()=>r,getDot:()=>Ie,hasDot:()=>Le,humanize:()=>Ke,intersect:()=>_e,inverseLerp:()=>le,isArray:()=>u,isArrayLike:()=>d,isBoolean:()=>f,isDocument:()=>p,isElement:()=>m,isFragment:()=>h,isFunction:()=>g,isNaN:()=>ee,isNode:()=>_,isNull:()=>te,isNumeric:()=>ne,isObject:()=>v,isPlainObject:()=>y,isShadow:()=>b,isString:()=>x,isText:()=>re,isUndefined:()=>ie,isWindow:()=>S,kebabCase:()=>qe,len:()=>ue,lerp:()=>de,map:()=>fe,merge:()=>C,once:()=>Oe,partial:()=>ke,pascalCase:()=>Je,pipe:()=>Ae,pluckDot:()=>Re,random:()=>pe,randomInt:()=>me,randomString:()=>Ye,randomValue:()=>ve,range:()=>ye,setDot:()=>ze,snakeCase:()=>Xe,throttle:()=>je,times:()=>Me,toStep:()=>he,unescape:()=>Ze,unique:()=>w,wrap:()=>be}),n=(e,t,...n)=>Reflect.apply(r(e,t),e,n),r=(e,t)=>{let n=Object.getPrototypeOf(e);return n&&`nodeType`in n?Reflect.get(n,t,e):e[t]},i=1,a=3,o=8,s=9,c=11,l=e=>e&&r(e,`nodeType`),u=Array.isArray,d=e=>{if(u(e))return!0;if(!v(e)||g(e)||S(e)||m(e))return!1;if(g(e[Symbol.iterator]))return!0;let t=e.length;return ne(t)&&(!t||t-1 in e)},f=e=>typeof e==`boolean`,p=e=>l(e)===s,m=e=>l(e)===i,h=e=>l(e)===c&&!e.host,g=e=>typeof e==`function`,ee=Number.isNaN,_=e=>{let t=l(e);return t===i||t===a||t===o},te=e=>e===null,ne=e=>{try{return!ee(Number.parseFloat(e))&&isFinite(e)}catch{return!1}},v=e=>!!e&&e===Object(e),y=e=>{if(!v(e))return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null},b=e=>l(e)===c&&!!e.host,x=e=>typeof e==`string`,re=e=>l(e)===a,ie=e=>e===void 0,S=e=>!!e&&!!e.document&&r(e.document,`defaultView`)===e,ae=e=>{let[t,n=0]=`${e}`.toLowerCase().split(`e`),r=(t.split(`.`)[1]||``).length;return Math.max(0,r-Number(n))},oe=(e,t=0,n=1)=>Math.max(t,Math.min(n,e)),se=e=>oe(e,0,100),ce=(e,t,n,r)=>ue(e-n,t-r),le=(e,t,n)=>(n-e)/(t-e),ue=Math.hypot,de=(e,t,n)=>e*(1-n)+t*n,fe=(e,t,n,r,i)=>(e-t)*(i-r)/(n-t)+r,pe=(e=1,t=null)=>te(t)?Math.random()*e:fe(Math.random(),0,1,e,t),me=(e=1,t=null)=>{let n=Math.ceil(Math.min(e,te(t)?0:t)),r=Math.ceil(Math.max(e,te(t)?0:t));if(n>=r)throw RangeError(`The bounds do not contain an integer`);return n+Math.floor(Math.random()*(r-n))},he=(e,t=.01)=>{if(t===0)return e;t=Math.abs(t);let n=Math.round(e/t)*t,r=ae(t);return r>100?n:Number(n.toFixed(r))},ge=(e,...t)=>{let n=t.map(e=>new Set(e));return e.filter(e=>!n.some(t=>t.has(e)))},_e=(...e)=>{if(!e.length)return[];let[t,...n]=e,r=n.map(e=>new Set(e));return w(t).filter(e=>r.every(t=>t.has(e)))},C=(e=[],...t)=>{for(let n of t){let t=Math.max(0,Math.floor(Number(n.length)||0));if(!Number.isFinite(t))throw RangeError(`Array-like length must be finite`);for(let r=0;r<t;r++)e.push(n[r])}return e},ve=e=>e.length?e[me(e.length)]:null,ye=(e,t,n=1)=>{if(n===0)return[];n=Math.abs(n);let r=Math.sign(t-e),i=he(Math.abs(t-e)/n,1e-10);return Array.from({length:Math.floor(i)+1},(a,o)=>o>0&&o===i?t:e+he(o*n*r,n))},w=e=>Array.from(new Set(e)),be=e=>ie(e)?[]:u(e)?e:v(e)&&g(e[Symbol.iterator])?Array.from(e):d(e)?C([],e):[e],xe=typeof window<`u`&&`requestAnimationFrame`in window,Se=xe?e=>window.requestAnimationFrame(e):e=>setTimeout(e,1e3/60),Ce=(e,{leading:t=!1}={})=>{let n=null,r,i,a=!1,o=()=>{n!==null&&(xe?window.cancelAnimationFrame(n):clearTimeout(n)),n=null,r=null,i=null,a=!1},s=function(...s){if(r=s,i=this,!a&&(a=!0,n=Se(()=>{let o=r,s=i;n=null,r=null,i=null,a=!1,t||e.apply(s,o)}),t))try{e.apply(this,s)}catch(e){throw o(),e}};return s.cancel=o,s},we=(...e)=>function(t){return e.reduceRight((e,t)=>t.call(this,e),t)},Te=e=>{let t=function(...n){let r=this;return n.length>=e.length?e.apply(r,n):(...e)=>t.apply(r,n.concat(e))};return t},Ee=(e,t=0,{leading:n=!1,trailing:r=!0}={})=>{let i=null,a,o,s=!1,c=()=>{i!==null&&clearTimeout(i),i=null,a=null,o=null,s=!1},l=function(...l){if(!n&&!r)return;let u=n&&i===null;if(i===null?s=!1:(clearTimeout(i),s=!0),a=l,o=this,i=setTimeout(()=>{let t=a,c=o,l=r&&(!n||s);i=null,a=null,o=null,s=!1,l&&e.apply(c,t)},t),u)try{e.apply(this,l)}catch(e){throw c(),e}};return l.cancel=c,l},De=e=>g(e)?e():e,Oe=e=>{let t=!1,n;return function(...r){if(t)return n;t=!0;try{return n=e.apply(this,r),n}catch(e){throw t=!1,e}}},ke=(e,...t)=>function(...n){let r=t.map(e=>ie(e)?n.shift():e);return e.apply(this,r.concat(n))},Ae=(...e)=>function(t){return e.reduce((e,t)=>t.call(this,e),t)},je=(e,t=0,{leading:n=!0,trailing:r=!0}={})=>{let i=null,a,o,s,c=()=>{i!==null&&clearTimeout(i),i=null,a=void 0,o=null,s=null},l=()=>{let t=o,n=s;i=null,o=null,s=null,a=Date.now(),e.apply(n,t)},u=function(...u){let d=Date.now(),f=a===void 0?null:d-a;if(n&&(f===null||f>=t)){i!==null&&(clearTimeout(i),i=null),o=null,s=null,a=d;try{e.apply(this,u)}catch(e){throw c(),e}return}r&&(o=u,s=this,i===null&&(i=setTimeout(l,f===null||!n&&f>=t?t:Math.max(0,t-f))))};return u.cancel=c,u},Me=(e,t)=>{for(;t-->0&&e()!==!1;);},T=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),E=(e,t,n)=>{if(T(e,t)){e[t]=n;return}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},Ne=(e,t,n,r)=>{let[i,...a]=t;if(i===`*`){for(let t of Object.keys(e)){if(!a.length){r&&E(e,t,n);continue}let i=e[t];if(!v(i)){if(!r)continue;i={},E(e,t,i)}Ne(i,a,n,r)}return}if(a.length){let t=T(e,i)?e[i]:void 0;if(!v(t)){if(T(e,i)&&!r)return;t={},E(e,i,t)}Ne(t,a,n,r)}else(r||!T(e,i))&&E(e,i,n)},D=(e,...t)=>{for(let n of t)if(n!=null)for(let t of Object.keys(n)){let r=n[t],i=T(e,t)?e[t]:void 0;if(u(r)){let e=u(i)?i:[];e.length=Math.max(e.length,r.length),r=D(e,r)}else y(r)&&(r=D(y(i)?i:{},r));E(e,t,r)}return e},Pe=(e,t=``)=>Object.keys(e).reduce((n,r)=>{let i=`${t}${r}`;if(y(e[r])&&Object.keys(e[r]).length){let t=Pe(e[r],`${i}.`);for(let e of Object.keys(t))E(n,e,t[e])}else E(n,i,e[r]);return n},{}),Fe=(e,t)=>{let n=t.split(`.`);for(;n.length&&(t=n.shift(),v(e)&&T(e,t));)n.length?e=e[t]:delete e[t]},Ie=(e,t,n)=>{let r=t.split(`.`);for(;r.length;){if(t=r.shift(),!v(e)||!T(e,t))return n;e=e[t]}return e},Le=(e,t)=>{let n=t.split(`.`);for(;n.length;){if(t=n.shift(),!v(e)||!T(e,t))return!1;e=e[t]}return!0},Re=(e,t,n)=>e.map(e=>Ie(e,t,n)),ze=(e,t,n,{overwrite:r=!0}={})=>Ne(e,t.split(`.`),n,r),Be={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&apos;`},Ve={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},He=e=>`${e}`.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/([A-Z])([A-Z][a-z])/g,`$1 $2`).split(/[^a-zA-Z0-9']/).reduce((e,t)=>(t=t.replace(/[^\w]/g,``).toLowerCase(),t&&e.push(t),e),[]),O=e=>He(e).map((e,t)=>t?Ue(e):e).join(``),Ue=e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase(),We=e=>e.replace(/[&<>"']/g,e=>Be[e]),Ge=e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,e=>e===`-`?`\\x2d`:`\\${e}`),Ke=e=>Ue(He(e).join(` `)),qe=e=>He(e).join(`-`),Je=e=>He(e).map(e=>e.charAt(0).toUpperCase()+e.substring(1)).join(``),Ye=(e=16,t=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`)=>{let n=Array.from(t);if(!n.length)throw TypeError(`chars must not be empty`);return Array(e).fill().map(()=>n[me(n.length)]).join(``)},Xe=e=>He(e).join(`_`),Ze=e=>e.replace(/&(amp|lt|gt|quot|apos);/g,(e,t)=>Ve[t]);function Qe(e,t,n,r){let i=et(e,r);return i.searchParams.append(t,n),i.toString()}function $e(e){let{URLSearchParams:t}=j();return new t(e)}function et(e,t=r(j().document,`baseURI`)){let{URL:n}=j();return new n(e,t)}function tt(...e){let t=/* @__PURE__ */ new Map;for(let n of e)for(let[e,r]of Object.entries(n||{}))t.set(e.toLowerCase(),[e,r]);return Object.fromEntries(t.values())}function nt(e){let{FormData:t}=j(),n=at(e),r=new t;for(let[e,t]of n)r.append(e,t);return r}function rt(e){return at(e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`)}function it(e,t){return t===null||ie(t)?[]:u(t)?(e.substring(e.length-2)!==`[]`&&(e+=`[]`),t.flatMap(t=>it(e,t))):y(t)?Object.entries(t).flatMap(([t,n])=>it(`${e}[${t}]`,n)):[[e,t]]}function at(e){return u(e)?e.flatMap(e=>it(e.name,e.value)):v(e)?Object.entries(e).flatMap(([e,t])=>it(e,t)):e}var ot={afterSend:null,beforeSend:null,cache:!0,contentType:`application/x-www-form-urlencoded`,data:null,headers:{},isLocal:null,method:`GET`,onProgress:null,onUploadProgress:null,processData:!0,rejectOnCancel:!0,responseType:null,url:null,xhr:()=>{let{XMLHttpRequest:e}=j();return new e}},st={duration:1e3,type:`ease-in-out`,infinite:!1,debug:!1},k={ajaxDefaults:ot,animationDefaults:st,context:null,useTimeout:!1,window:null};function ct(){return ot}function lt(){return st}function A(){return k.context}function j(){return k.window}function ut(e){let t=tt(ot.headers,e?.headers);D(ot,e),ot.headers=t}function dt(e){D(st,e)}function ft(e){if(!p(e))throw Error(`fQuery requires a valid Document.`);k.context=e}function pt(e){if(!S(e))throw Error(`fQuery requires a valid Window.`);k.window=e}function mt(e=!0){k.useTimeout=e}var M=class{#e;#t;#n;#r;#i;#a;#o;constructor(e){let{location:t}=j(),n=ct();this.#r=D({},n,e),this.#r.method=this.#r.method.toUpperCase();let r=Object.prototype.toString.call(this.#r.data)===`[object FormData]`;this.#r.url||(this.#r.url=t.href),this.#r.cache||(this.#r.url=Qe(this.#r.url,`_`,Date.now())),this.#r.isLocal===null&&(this.#r.isLocal=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(t.protocol));let i={};if(!r&&this.#r.contentType&&(i[`Content-Type`]=this.#r.contentType),this.#r.isLocal||(i[`X-Requested-With`]=`XMLHttpRequest`),this.#r.headers=tt(i,n.headers,e?.headers),this.#i=new Promise((e,t)=>{this.#o=t=>{this.#n=!0,e(t)},this.#a=e=>{this.#t=!0,t(e)}}),this.xhr=this.#r.xhr(),this.#r.data!==null&&this.#r.data!==void 0){if(!r&&this.#r.processData&&v(this.#r.data)){let e=(Object.entries(this.#r.headers).find(([e])=>e.toLowerCase()===`content-type`)?.[1]||``).split(`;`)[0].trim().toLowerCase();[`GET`,`HEAD`].includes(this.#r.method)||e===`application/x-www-form-urlencoded`?this.#r.data=rt(this.#r.data):e===`application/json`?this.#r.data=JSON.stringify(this.#r.data):this.#r.data=nt(this.#r.data)}if([`GET`,`HEAD`].includes(this.#r.method)){let e=$e(this.#r.data),t=et(this.#r.url);for(let[n,r]of e.entries())t.searchParams.append(n,r);t.search=t.searchParams.toString(),this.#r.url=t.toString(),this.#r.data=null}}this.xhr.open(this.#r.method,this.#r.url,!0,this.#r.username,this.#r.password);for(let[e,t]of Object.entries(this.#r.headers))this.xhr.setRequestHeader(e,t);this.#r.responseType&&(this.xhr.responseType=this.#r.responseType),this.#r.mimeType&&this.xhr.overrideMimeType(this.#r.mimeType),this.#r.timeout&&(this.xhr.timeout=this.#r.timeout);let a=e=>this.#a({status:this.xhr.status,xhr:this.xhr,event:e});this.xhr.onload=e=>{this.xhr.status>=400?a(e):this.#o({response:this.xhr.response,xhr:this.xhr,event:e})},this.xhr.onabort=()=>this.cancel(),this.xhr.onerror=a,this.xhr.ontimeout=a,this.#r.onProgress&&(this.xhr.onprogress=e=>this.#r.onProgress(e.loaded/e.total,this.xhr,e)),this.#r.onUploadProgress&&(this.xhr.upload.onprogress=e=>this.#r.onUploadProgress(e.loaded/e.total,this.xhr,e)),this.#r.beforeSend&&this.#r.beforeSend(this.xhr),this.xhr.send(this.#r.data),this.#r.afterSend&&this.#r.afterSend(this.xhr)}cancel(e=`Request was cancelled`){this.#n||this.#t||this.#e||(this.#e=!0,this.xhr.abort(),this.#r.rejectOnCancel&&this.#a({status:this.xhr.status,xhr:this.xhr,reason:e}))}catch(e){return this.#i.catch(e)}finally(e){return this.#i.finally(e)}then(e,t){return this.#i.then(e,t)}};Object.setPrototypeOf(M.prototype,Promise.prototype);function ht(e,t){return new M({url:e,method:`DELETE`,...t})}function gt(e){return new M(e)}function _t(e,t,n){return new M({url:e,data:t,method:`GET`,...n})}function vt(e,t,n){return new M({url:e,data:t,method:`PATCH`,...n})}function yt(e,t,n){return new M({url:e,data:t,method:`POST`,...n})}function bt(e,t,n){return new M({url:e,data:t,method:`PUT`,...n})}var N=class e{#e;constructor(e=[]){this.#e=e}get length(){return this.#e.length}each(e){return this.#e.forEach((t,n)=>e(t,n)),this}get(e=null){return e===null?this.#e:e<0?this.#e[e+this.#e.length]:this.#e[e]}map(t){let n=this.#e.map(t);return new e(n)}slice(t,n){let r=this.#e.slice(t,n);return new e(r)}[Symbol.iterator](){return this.#e.values()}};function xt(e,t){let{CustomEvent:n}=j();return new n(e,t)}function St(e){let t;return(...n)=>{t||(t=!0,Promise.resolve().then(()=>{try{e(...n)}finally{t=!1}}))}}function Ct(e){return j().CSS.escape(e)}function wt(e){return RegExp(`^${Ge(e)}(?:\\.|$)`,`i`)}function Tt(e){let t;for(;t=r(e,`firstElementChild`);)e=t;return e}function P(e){return e.startsWith(`--`)?e:qe(e)}function Et(e,t){if(e.startsWith(`--`)||!t||!ne(t))return t;let{CSS:n}=j();return n.supports(e,t)?t:`${t}px`}function F(e){return e.flat().flatMap(e=>e.split(` `)).filter(e=>!!e)}function I(e,t,{json:n=!1}={}){let r=x(e)?{[e]:t}:e;return n?Object.fromEntries(Object.entries(r).map(([e,t])=>[e,v(t)||u(t)?JSON.stringify(t):t])):r}function Dt(e){if(ie(e))return e;let t=e.toLowerCase().trim();if([`true`,`on`].includes(t))return!0;if([`false`,`off`].includes(t))return!1;if(t===`null`)return null;if(ne(t))return Number(t);if([`{`,`[`].includes(t.charAt(0)))try{return JSON.parse(e)}catch{}return e}function Ot(e){return e.split(`.`).shift()}function kt(e){return e.split(` `)}function At(e,t,n){if(x(e))return t(e);if(n(e))return e;if(e instanceof N){let t=e.get(0);return n(t)?t:void 0}if(e&&typeof e.item==`function`){let t=e.item(0);return n(t)?t:void 0}}function jt(e,t,n){return x(e)?t(e):n(e)?[e]:e instanceof N?e.get().filter(n):e&&typeof e.item==`function`?C([],e).filter(n):[]}function Mt(e,{contentType:t=`text/html`}={}){let{DOMParser:n}=j();return new n().parseFromString(e,t)}function Nt(e){let t=n(A(),`createRange`).createContextualFragment(e).children;return C([],t)}function L(e){let t=e=>p(e)||m(e)||h(e)||b(e);if(!u(e))return jt(e,Pt,t);let n=e.flatMap(e=>jt(e,Pt,t));return e.length>1&&n.length>1?w(n):n}function Pt(e,t=A()){if(!e)return[];let r=e.match(/^([#.]?)([\w-]+)$/);if(r)return r[1]===`#`?It(r[2],t):r[1]===`.`?Ft(r[2],t):Lt(r[2],t);if(p(t)||m(t)||h(t)||b(t))return C([],n(t,`querySelectorAll`,e));let i=L(t),a=[];for(let t of i){let r=n(t,`querySelectorAll`,e);a.push(...r)}return i.length>1&&a.length>1?w(a):a}function Ft(e,t=A()){if(p(t)||m(t))return C([],n(t,`getElementsByClassName`,e));let r=`.${Ct(e)}`;if(h(t)||b(t))return C([],n(t,`querySelectorAll`,r));let i=L(t),a=[];for(let t of i){let i=h(t)||b(t)?n(t,`querySelectorAll`,r):n(t,`getElementsByClassName`,e);a.push(...i)}return i.length>1&&a.length>1?w(a):a}function It(e,t=A()){let r=`#${Ct(e)}`;if(p(t)||m(t)||h(t)||b(t))return C([],n(t,`querySelectorAll`,r));let i=L(t),a=[];for(let e of i){let t=n(e,`querySelectorAll`,r);a.push(...t)}return i.length>1&&a.length>1?w(a):a}function Lt(e,t=A()){if(p(t)||m(t))return C([],n(t,`getElementsByTagName`,e));if(h(t)||b(t))return C([],n(t,`querySelectorAll`,e));let r=L(t),i=[];for(let t of r){let r=h(t)||b(t)?n(t,`querySelectorAll`,e):n(t,`getElementsByTagName`,e);i.push(...r)}return r.length>1&&i.length>1?w(i):i}function Rt(e,t=A()){if(!e)return null;let r=e.match(/^([#.]?)([\w-]+)$/);if(r)return r[1]===`#`?Bt(r[2],t):r[1]===`.`?zt(r[2],t):Vt(r[2],t);if(p(t)||m(t)||h(t)||b(t))return n(t,`querySelector`,e);let i=L(t);if(i.length){for(let t of i){let r=n(t,`querySelector`,e);if(r)return r}return null}}function zt(e,t=A()){if(p(t)||m(t))return n(t,`getElementsByClassName`,e).item(0);let r=`.${Ct(e)}`;if(h(t)||b(t))return n(t,`querySelector`,r);let i=L(t);if(i.length){for(let t of i){let i=h(t)||b(t)?n(t,`querySelector`,r):n(t,`getElementsByClassName`,e).item(0);if(i)return i}return null}}function Bt(e,t=A()){if(p(t))return n(t,`getElementById`,e);let r=`#${Ct(e)}`;if(m(t)||h(t)||b(t))return n(t,`querySelector`,r);let i=L(t);if(i.length){for(let t of i){let i=p(t)?n(t,`getElementById`,e):n(t,`querySelector`,r);if(i)return i}return null}}function Vt(e,t=A()){if(p(t)||m(t))return n(t,`getElementsByTagName`,e).item(0);if(h(t)||b(t))return n(t,`querySelector`,e);let r=L(t);if(r.length){for(let t of r){let r=h(t)||b(t)?n(t,`querySelector`,e):n(t,`getElementsByTagName`,e).item(0);if(r)return r}return null}}function R(e,t=!0){return e?g(e)?e:x(e)?t=>m(t)&&n(t,`matches`,e):_(e)||h(e)||b(e)?t=>t===e:(e=B(e,{node:!0,fragment:!0,shadow:!0}),e.length?t=>e.includes(t):()=>!t):()=>t}function Ht(e,t=!0){return e?g(e)?t=>C([],n(t,`querySelectorAll`,`*`)).some(e):x(e)?t=>!!Rt(e,t):_(e)||h(e)||b(e)?t=>t!==e&&n(t,`contains`,e):(e=B(e,{node:!0,fragment:!0,shadow:!0}),e.length?t=>e.some(e=>t!==e&&n(t,`contains`,e)):()=>!t):e=>t&&!!r(e,`firstElementChild`)}function z(e,t={}){let n=Ut(t),r=t.context||A(),i=e=>t.html&&e.trim().charAt(0)===`<`?Nt(e).shift():Rt(e,r);if(!u(e))return At(e,i,n);for(let t of e){let e=At(t,i,n);if(e)return e}}function B(e,t={}){let n=Ut(t),r=t.context||A(),i=e=>t.html&&e.trim().charAt(0)===`<`?Nt(e):Pt(e,r);if(!u(e))return jt(e,i,n);let a=e.flatMap(e=>jt(e,i,n));return e.length>1&&a.length>1?w(a):a}function Ut({node:e=!1,document:t=!1,window:n=!1,fragment:r=!1,shadow:i=!1}={}){return a=>(e?_(a):m(a))||t&&p(a)||n&&S(a)||r&&h(a)||i&&b(a)}var Wt={"*":[`class`,`dir`,`id`,`lang`,`role`,/^aria-[\w-]*$/i],a:[`target`,`href`,`title`,`rel`],area:[],b:[],br:[],col:[],code:[],div:[],dd:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:[`src`,`alt`,`title`,`width`,`height`],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Gt=/* @__PURE__ */ new Set([`action`,`background`,`cite`,`formaction`,`href`,`itemtype`,`longdesc`,`poster`,`src`,`xlink:href`]),Kt={mousedown:[`mousemove`,`mouseup`],touchstart:[`touchmove`,`touchend touchcancel`]},V=/* @__PURE__ */ new Map,H=/* @__PURE__ */ new WeakMap,U=/* @__PURE__ */ new WeakMap,W=/* @__PURE__ */ new WeakMap,qt=/* @__PURE__ */ new WeakMap,Jt=class{#e;#t;constructor(e){this.#e=e,this.#t=Promise.all(e)}catch(e){return this.#t.catch(e)}finally(e){return this.#t.finally(e)}stop({finish:e=!0}={}){for(let t of this.#e)t.stop({finish:e})}then(e,t){return this.#t.then(e,t)}};Object.setPrototypeOf(Jt.prototype,Promise.prototype);var Yt=!1;function Xt(){let{performance:e}=j();return e.now()}function Zt(){Yt||(Yt=!0,Qt())}function Qt(){let{requestAnimationFrame:e,setTimeout:t}=j(),n=Xt();for(let[e,t]of[...V]){let r=t.slice().filter(e=>e.update(n)),i=(V.get(e)||[]).filter(e=>!r.includes(e));i.length?V.set(e,i):V.delete(e)}V.size?k.useTimeout?t(Qt,1e3/60):e(Qt):Yt=!1}var $t=class e{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;constructor(e,t,n,i){this.#a=e,this.#e=t,this.#t=i,this.#o={...lt(),...n},`start`in this.#o||(this.#o.start=Xt()),this.#o.debug&&(r(this.#a,`dataset`).animationStart=this.#o.start),this.#s=new Promise((e,t)=>{this.#l=e,this.#c=t}),V.has(e)||V.set(e,[]),V.get(e).push(this)}catch(e){return this.#s.catch(e)}clone(t){return new e(t,this.#e,this.#o,this.#t)}finally(e){return this.#s.finally(e)}stop({finish:e=!0}={}){if(this.#r||this.#i||this.#n)return;this.#i=!0;let t=V.get(this.#a).filter(e=>e!==this);t.length?V.set(this.#a,t):V.delete(this.#a),e&&this.update(),this.#r=!0,this.#i=!1,e||(this.#t?.(!1),this.#c(this.#a))}then(e,t){return this.#s.then(e,t)}update(e=null){if(this.#r||this.#n)return!0;let t;if(e===null?t=1:this.#o.duration===0?t=+(e>=this.#o.start):(t=(e-this.#o.start)/this.#o.duration,t=this.#o.infinite?Math.max(0,t)%1:oe(t),this.#o.type===`ease-in`?t**=2:this.#o.type===`ease-out`?t=Math.sqrt(t):this.#o.type===`ease-in-out`&&(t=t<=.5?t**2*2:1-(1-t)**2*2)),this.#o.debug){let n=r(this.#a,`dataset`);n.animationTime=e,n.animationProgress=t}try{this.#e(this.#a,t,this.#o)}catch(e){if(this.#o.debug){let e=r(this.#a,`dataset`);delete e.animationStart,delete e.animationTime,delete e.animationProgress}return this.#n=!0,this.#t?.(!0),this.#c(e),!0}if(t<1)return!1;if(this.#o.debug){let e=r(this.#a,`dataset`);delete e.animationStart,delete e.animationTime,delete e.animationProgress}return this.#n||(this.#n=!0,this.#t?.(!0),this.#l(this.#a)),!0}};Object.setPrototypeOf($t.prototype,Promise.prototype);function en(e,t,n){let r=B(e).map(e=>new $t(e,t,n));return Zt(),new Jt(r)}function tn(e,{finish:t=!0}={}){let n=B(e);for(let e of n){if(!V.has(e))continue;let n=V.get(e);for(let e of n)e.stop({finish:t})}}var G=/* @__PURE__ */ new WeakMap;function nn(e,t){if(G.get(e)?.has(t))throw Error(`CSS property "${t}" is already locked.`)}function rn(e,t,n,{important:i=!1}={}){t=P(t),n=Et(t,n);let a=an(t,n),o=w(B(e)).map(e=>{nn(e,t);let n=r(e,`style`),i=[...n].includes(t),o=n.getPropertyValue(t),s=n.getPropertyPriority(t);if(i&&!t.startsWith(`--`)){a.cssText=n.cssText;let e=[...a].indexOf(t);if(a.setProperty(t,o,s),o===``||a.item(e)!==t)throw Error(`Cannot lock CSS property "${t}" because its original value cannot be restored.`)}return{node:e,style:n,present:i,value:o,priority:s}});for(let{node:e}of o)G.has(e)||G.set(e,/* @__PURE__ */ new Set),G.get(e).add(t);for(let{style:e}of o)e.setProperty(t,n,i?`important`:``);let s=!1;return({restore:e=!0}={})=>{if(!s){if(s=!0,e)for(let{style:e,value:n,priority:r,present:i}of o)e.setProperty(t,n,r),i&&n===``&&(e.cssText+=` ${Ct(t)}:${r?`!important`:``};`);for(let{node:e}of o){let n=G.get(e);n.delete(t),n.size||G.delete(e)}}}}function an(e,t){let i=r(n(A(),`createElementNS`,`http://www.w3.org/1999/xhtml`,`div`),`style`);if(i.setProperty(e,`initial`),e===`all`||i.length!==1||i.item(0)!==e)throw Error(`Cannot lock CSS property "${e}". Use a supported longhand or custom property.`);if(i.cssText=``,i.setProperty(e,t),t!==``&&!i.length)throw Error(`Invalid value for CSS property "${e}".`);return i}var on=/* @__PURE__ */ new WeakMap;function sn(e,...t){let n=B(e);if(t=F(t),t.length)for(let e of n)r(e,`classList`).add(...t)}function K(e,t){let n=z(e);if(!n)return;qt.has(n)||qt.set(n,j().getComputedStyle(n));let r=qt.get(n);if(!t){let e={};for(let t of r)e[t]=r.getPropertyValue(t);return e}return t=P(t),r.getPropertyValue(t)}function cn(e,t){let n=z(e);if(!n)return;if(t)return t=P(t),r(n,`style`).getPropertyValue(t);let i={},a=r(n,`style`);for(let e of a)i[e]=a.getPropertyValue(e);return i}function ln(e){let t=B(e);for(let e of t)on.has(e)||nn(e,`display`);for(let e of t){let t=r(e,`style`),n=t.getPropertyPriority(`display`);on.has(e)?t.setProperty(`display`,`none`,n):on.set(e,rn(e,`display`,`none`,{important:n===`important`}))}}function un(e,...t){let n=B(e);if(t=F(t),t.length)for(let e of n)r(e,`classList`).remove(...t)}function dn(e,t){let n=B(e);t=P(t);for(let e of n)r(e,`style`).removeProperty(t)}function fn(e,t,n,{important:i=!1}={}){let a=B(e),o=I(t,n);for(let[e,t]of Object.entries(o)){e=P(e),t=Et(e,t);for(let n of a)r(n,`style`).setProperty(e,t,i?`important`:``)}}function pn(e){let t=B(e);for(let e of t){let t=on.get(e);t&&(on.delete(e),t());let n=r(e,`style`);n.display===`none`&&n.setProperty(`display`,``),K(e,`display`)===`none`&&n.setProperty(`display`,`revert`)}}function mn(e,t){let n=B(e);for(let e of n)t??(r(e,`style`).display===`none`||K(e,`display`)===`none`)?pn(e):ln(e)}function hn(e,...t){let n=B(e);if(t=F(t),t.length)for(let e of n)for(let n of t)r(e,`classList`).toggle(n)}function gn(e,t){return Sn(e,{direction:`top`,...t})}function _n(e,t){return Cn(e,{direction:`top`,...t})}function vn(e,t){return q(e,[`opacity`],(e,t)=>J(r(e,`style`),`opacity`,t.toFixed(2)),t)}function yn(e,t){return q(e,[`opacity`],(e,t)=>J(r(e,`style`),`opacity`,(1-t).toFixed(2)),t)}function bn(e,t){return q(e,[`transform`],(e,t,n)=>{let i=((90-t*90)*(n.inverse?-1:1)).toFixed(2);J(r(e,`style`),`transform`,`rotate3d(${n.x}, ${n.y}, ${n.z}, ${i}deg)`)},{x:0,y:1,z:0,...t})}function xn(e,t){return q(e,[`transform`],(e,t,n)=>{let i=(t*90*(n.inverse?-1:1)).toFixed(2);J(r(e,`style`),`transform`,`rotate3d(${n.x}, ${n.y}, ${n.z}, ${i}deg)`)},{x:0,y:1,z:0,...t})}function Sn(e,t){return En(e,t,!1)}function Cn(e,t){return En(e,t,!0)}function wn(e,t){return Dn(e,t,!1)}function Tn(e,t){return Dn(e,t,!0)}function q(e,t,n,i){let a=B(e).map(e=>{let a=/* @__PURE__ */ new WeakMap,o,s;return new $t(e,function(e,i,c){if(!a.has(this)){let n=r(e,`style`);for(let n of t)nn(e,n);let i=o||t.map(e=>({property:e,value:n.getPropertyValue(e),priority:n.getPropertyPriority(e)})),c=[];a.set(this,c);for(let{property:t,value:r,priority:a}of i)o&&n.setProperty(t,r,a),c.push(rn(e,t,r,{important:a===`important`}));o??=i,s??=Object.fromEntries(i.map(({property:e,value:t})=>[e,t]))}i<1&&n(e,i,c,s)},i,function(e){let t=a.get(this);if(t){for(let n of t)n({restore:e});a.delete(this)}})});return Zt(),new Jt(a)}function En(e,t,n){return t={direction:`bottom`,...t},q(e,[`transform`],(e,t,i)=>{let a=De(i.direction),o,s,c;[`top`,`bottom`].includes(a)?(o=r(e,`clientHeight`),s=`Y`,c=a===`top`):(o=r(e,`clientWidth`),s=`X`,c=a===`left`);let l=((n?o*t:o-o*t)*(c?-1:1)).toFixed(2);J(r(e,`style`),`transform`,`translate${s}(${l}px)`)},t)}function Dn(e,t,n){return t={direction:`bottom`,...t},q(e,[`height`,`overflow-x`,`overflow-y`,`transform`,`width`],(e,t,i,a)=>{let o=r(e,`style`);J(o,`height`,a.height),J(o,`width`,a.width),J(o,`overflow-x`,`hidden`),J(o,`overflow-y`,`hidden`);let s=De(i.direction),c,l,u;[`top`,`bottom`].includes(s)?(c=Number.parseFloat(K(e,`height`))||0,l=`height`,s===`top`&&(u=`Y`)):(c=Number.parseFloat(K(e,`width`))||0,l=`width`,s===`left`&&(u=`X`));let d=(n?c-c*t:c*t).toFixed(2);if(J(o,l,`${d}px`),u){let e=(c-d).toFixed(2);J(o,`transform`,`translate${u}(${e}px)`)}},t)}function J(e,t,n){e.setProperty(t,n,e.getPropertyPriority(t))}function On(e,t,i,a){let o=a?C([],n(e,`querySelectorAll`,i)):null;for(;t&&t!==e;){if(m(t)&&(o?o.includes(t):n(t,`matches`,i)))return t;t=r(t,`parentNode`)}}function kn(e,t,n){let r=S(e)?e.document:e,i=/:scope\b/i.test(t);return a=>{if(e===a.target)return;let o=On(r,a.target,t,i);if(o){Object.defineProperty(a,"currentTarget",{configurable:!0,enumerable:!0,value:o}),Object.defineProperty(a,"delegateTarget",{configurable:!0,enumerable:!0,value:e});try{return n(a)}finally{delete a.currentTarget,delete a.delegateTarget}}}}function An(e,t){return n=>{if(!(`namespaceRegExp`in n&&!n.namespaceRegExp.test(e)))return t(n)}}function jn(e){return t=>{e(t)===!1&&t.preventDefault()}}function Mn(e,t){return n=>(t(),e(n))}function Y(e,t,r,{capture:i=!1,delegate:a=null,passive:o=!1,selfDestruct:s=!1}={}){let c=B(e,{shadow:!0,document:!0,window:!0});t=kt(t);for(let e of t){let t=Ot(e);for(let l of c){U.has(l)||U.set(l,Object.create(null));let c=U.get(l),u=r;s&&(u=Mn(u,()=>X(l,e,u,{capture:i,delegate:a}))),u=jn(u),a&&(u=kn(l,a,u)),u=An(e,u),c[t]||(c[t]=[]),c[t].push({callback:r,delegate:a,selfDestruct:s,capture:i,passive:o,realCallback:u,eventName:e,realEventName:t}),n(l,`addEventListener`,t,u,{capture:i,passive:o})}}}function Nn(e,t,n,r,{capture:i=!1,passive:a=!1}={}){Y(e,t,r,{capture:i,delegate:n,passive:a})}function Pn(e,t,n,r,{capture:i=!1,passive:a=!1}={}){Y(e,t,r,{capture:i,delegate:n,passive:a,selfDestruct:!0})}function Fn(e,t,n,{capture:r=!1,passive:i=!1}={}){Y(e,t,n,{capture:r,passive:i,selfDestruct:!0})}function In(e,t){let n=B(e,{shadow:!0,document:!0,window:!0}).flatMap(e=>Object.values(U.get(e)||{}).flat());for(let e of n)Y(t,e.eventName,e.callback,e)}function X(e,t,r,{capture:i=null,delegate:a=null}={}){let o=B(e,{shadow:!0,document:!0,window:!0}),s;if(t){t=kt(t),s=Object.create(null);for(let e of t){let t=Ot(e);t in s||(s[t]=[]),s[t].push(wt(e))}}for(let e of o){if(!U.has(e))continue;let t=U.get(e);for(let[o,c]of Object.entries(t)){if(s&&!(o in s))continue;let l=c.filter(t=>s&&!s[o].some(e=>e.test(t.eventName))||r&&r!==t.callback&&r!==t.realCallback||a&&a!==t.delegate||i!==null&&i!==t.capture?!0:(n(e,`removeEventListener`,o,t.realCallback,t.capture),!1));l.length?t[o]=l:delete t[o]}Object.keys(t).length||U.delete(e)}}function Ln(e,t,n,r,{capture:i=null}={}){X(e,t,r,{capture:i,delegate:n})}function Rn(e,t,{data:n=null,detail:r=null,bubbles:i=!0,cancelable:a=!0}={}){let o=B(e,{shadow:!0,document:!0,window:!0});t=kt(t);for(let e of t)for(let t of o)zn(t,e,{data:n,detail:r,bubbles:i,cancelable:a})}function zn(e,t,{data:r=null,detail:i=null,bubbles:a=!0,cancelable:o=!0}={}){let s=z(e,{shadow:!0,document:!0,window:!0});if(!s)return;let c=Ot(t),l=xt(c,{detail:i,bubbles:a,cancelable:o});return r&&Object.assign(l,r),c!==t&&(l.namespace=t.substring(c.length+1),l.namespaceRegExp=wt(t)),n(s,`dispatchEvent`,l)}function Bn(e,{open:t=!0}={}){let r=z(e);if(r)return n(r,`attachShadow`,{mode:t?`open`:`closed`})}function Vn(e=`div`,t={}){let i=n(A(),`createElement`,e);if(`html`in t?i.innerHTML=t.html:`text`in t&&(i.textContent=t.text),`class`in t){let e=F(be(t.class));r(i,`classList`).add(...e)}if(`style`in t)for(let[e,n]of Object.entries(t.style))e=P(e),n=Et(e,n),r(i,`style`).setProperty(e,n);if(`value`in t&&(i.value=t.value),`attributes`in t)for(let[e,r]of Object.entries(t.attributes))n(i,`setAttribute`,e,r);if(`properties`in t)for(let[e,n]of Object.entries(t.properties))i[e]=n;if(`dataset`in t){let e=I(t.dataset,null,{json:!0});for(let[t,n]of Object.entries(e))t=O(t),r(i,`dataset`)[t]=n}return i}function Hn(e){return n(A(),`createComment`,e)}function Un(){return n(A(),`createDocumentFragment`)}function Wn(){return n(A(),`createRange`)}function Gn(e){return n(A(),`createTextNode`,e)}function Z(e,{deep:t=!0,events:r=!1,data:i=!1,animations:a=!1}={}){return B(e,{node:!0,fragment:!0}).map(e=>{let o=n(e,`cloneNode`,t);return(r||i||a)&&Kn(e,o,{deep:t,events:r,data:i,animations:a}),o})}function Kn(e,t,{deep:n=!0,events:i=!1,data:a=!1,animations:o=!1}={}){if(i&&U.has(e)){let n=U.get(e);for(let e of Object.values(n))for(let n of e)Y(t,n.eventName,n.callback,n)}if(a&&H.has(e)){let n=H.get(e);H.set(t,Object.assign(Object.create(null),n))}if(o&&V.has(e)){let n=V.get(e);for(let e of n)e.clone(t)}if(n){for(let[s,c]of r(e,`childNodes`).entries())Kn(c,r(t,`childNodes`).item(s),{deep:n,events:i,data:a,animations:o});let s=r(e,`content`);h(s)&&Kn(s,r(t,`content`),{deep:n,events:i,data:a,animations:o})}}function qn(e){let t=B(e,{node:!0});for(let e of t)n(e,`remove`);return t}function Jn(e){let t=B(e,{fragment:!0,shadow:!0,document:!0});for(let e of t){let t=C([],r(e,`childNodes`));for(let e of t)(m(e)||h(e)||b(e))&&Q(e),n(e,`remove`)}}function Yn(e){let t=B(e,{node:!0,fragment:!0,shadow:!0});for(let e of t)(m(e)||h(e)||b(e))&&Q(e),_(e)&&n(e,`remove`)}function Q(e){if(U.has(e)){let t=U.get(e);`remove`in t&&n(e,`dispatchEvent`,xt(`remove`,{bubbles:!1,cancelable:!1}));for(let[r,i]of Object.entries(t))for(let t of i)n(e,`removeEventListener`,r,t.realCallback,{capture:t.capture});U.delete(e)}if(W.has(e)&&W.delete(e),V.has(e)){let t=V.get(e);for(let e of t)e.stop()}qt.has(e)&&qt.delete(e),H.has(e)&&H.delete(e);let t=C([],r(e,`children`));for(let e of t)Q(e);let i=r(e,`shadowRoot`);i&&Q(i);let a=r(e,`content`);h(a)&&Q(a)}function Xn(e,t){Zn(t,e)}function Zn(e,t){let i=B(e,{node:!0}),a=B(t,{node:!0,fragment:!0,html:!0}),o=e=>r(e,`parentNode`)&&!a.includes(e)&&!i.some(t=>t!==e&&n(t,`contains`,e));if(!i.some(o))return;let s=Un();for(let e of a)s.insertBefore(e,null);a=C([],s.childNodes),i=i.filter(o);for(let[e,t]of i.entries()){let o=r(t,`parentNode`);if(!o)continue;let s;s=e===i.length-1?a:Z(a,{events:!0,data:!0,animations:!0});for(let e of s)n(o,`insertBefore`,e,t)}Yn(i)}function Qn(e,t){let i=z(e);if(i)return t?n(i,`getAttribute`,t):Object.fromEntries(C([],r(i,`attributes`)).map(e=>[e.nodeName,e.nodeValue]))}function $n(e,t){let n=z(e);if(n){if(t){t=O(t);let e=r(n,`dataset`);return Object.hasOwn(e,t)?Dt(e[t]):void 0}return Object.fromEntries(Object.entries(r(n,`dataset`)).map(([e,t])=>[e,Dt(t)]))}}function er(e){let t=z(e);if(t)return r(t,`innerHTML`)}function tr(e,t){let n=z(e);if(n)return n[t]}function nr(e){let t=z(e);if(t)return r(t,`textContent`)}function rr(e){return tr(e,`value`)}function ir(e,t){let r=B(e);for(let e of r)n(e,`removeAttribute`,t)}function ar(e,t){let n=B(e);for(let e of n)t=O(t),delete r(e,`dataset`)[t]}function or(e,t){let n=B(e);for(let e of n)delete e[t]}function sr(e,t,r){let i=B(e),a=I(t,r);for(let[e,t]of Object.entries(a))for(let r of i)n(r,`setAttribute`,e,t)}function cr(e,t,n){let i=B(e),a=I(t,n,{json:!0});for(let[e,t]of Object.entries(a)){e=O(e);for(let n of i)r(n,`dataset`)[e]=t}}function lr(e,t){let n=B(e);for(let e of n){let n=r(e,`content`),i=C([],r(h(n)?n:e,`children`));for(let e of i)Q(e);e.innerHTML=t}}function ur(e,t,n){let r=B(e),i=I(t,n);for(let[e,t]of Object.entries(i))for(let n of r)n[e]=t}function dr(e,t){let n=B(e);for(let e of n){let n=C([],r(e,`children`));for(let e of n)Q(e);e.textContent=t}}function fr(e,t){let n=B(e);for(let e of n)e.value=t}function pr(e,t){let n=B(e,{fragment:!0,shadow:!0,document:!0,window:!0}),r=B(t,{fragment:!0,shadow:!0,document:!0,window:!0}),i=n.filter(e=>H.has(e)).map(e=>({...H.get(e)}));for(let e of i)gr(r,e)}function mr(e,t){let n=z(e,{fragment:!0,shadow:!0,document:!0,window:!0});if(!n||!H.has(n))return;let r=H.get(n);return t?r[t]:r}function hr(e,t){let n=B(e,{fragment:!0,shadow:!0,document:!0,window:!0});for(let e of n){if(!H.has(e))continue;let n=H.get(e);t&&delete n[t],(!t||!Object.keys(n).length)&&H.delete(e)}}function gr(e,t,n){let r=B(e,{fragment:!0,shadow:!0,document:!0,window:!0}),i=I(t,n);for(let e of r){H.has(e)||H.set(e,Object.create(null));let t=H.get(e);Object.assign(t,i)}}function _r(e,{offset:t=!1}={}){let n=$(e,{offset:t});if(n)return{x:n.left+n.width/2,y:n.top+n.height/2}}function vr(e,t){let n=$(t);if(!n)return;let i=B(e),a=r(A(),`documentElement`),o=j(),s=()=>r(a,`scrollHeight`)>o.outerHeight,c=()=>r(a,`scrollWidth`)>o.outerWidth,l=s(),u=c();for(let e of i){let t=K(e,`box-sizing`)===`content-box`,i=$(e),a=!1;if(i.height>n.height){let i=n.height;t&&(i-=Number.parseFloat(K(e,`padding-top`)),i-=Number.parseFloat(K(e,`padding-bottom`)),i-=Number.parseFloat(K(e,`border-top-width`)),i-=Number.parseFloat(K(e,`border-bottom-width`))),r(e,`style`).setProperty(`height`,`${Math.max(0,i)}px`),a=!0}if(i.width>n.width){let i=n.width;t&&(i-=Number.parseFloat(K(e,`padding-left`)),i-=Number.parseFloat(K(e,`padding-right`)),i-=Number.parseFloat(K(e,`border-left-width`)),i-=Number.parseFloat(K(e,`border-right-width`))),r(e,`style`).setProperty(`width`,`${Math.max(0,i)}px`),a=!0}a&&(i=$(e));let o;if(i.left-n.left<0?o=i.left-n.left:i.right-n.right>0&&(o=i.right-n.right),o){let t=K(e,`left`),n=t&&t!==`auto`?Number.parseFloat(t):0;r(e,`style`).setProperty(`left`,`${n-o}px`)}let s;if(i.top-n.top<0?s=i.top-n.top:i.bottom-n.bottom>0&&(s=i.bottom-n.bottom),s){let t=K(e,`top`),n=t&&t!==`auto`?Number.parseFloat(t):0;r(e,`style`).setProperty(`top`,`${n-s}px`)}K(e,`position`)===`static`&&r(e,`style`).setProperty(`position`,`relative`)}let d=s(),f=c();(l!==d||u!==f)&&vr(i,t)}function yr(e,t,n,{offset:r=!1}={}){let i=_r(e,{offset:r});if(i)return ce(i.x,i.y,t,n)}function br(e,t){let n=_r(t);if(n)return yr(e,n.x,n.y)}function xr(e,t,n,{offset:r=!1}={}){let i,a=Number.MAX_VALUE,o=B(e);for(let e of o){let o=yr(e,t,n,{offset:r});o<a&&(a=o,i=e)}return i}function Sr(e,t){let n=_r(t);if(n)return xr(e,n.x,n.y)}function Cr(e,t,{offset:n=!1,clamp:r=!0}={}){let i=$(e,{offset:n});if(!i)return;let a=(t-i.left)/i.width*100;return r?se(a):a}function wr(e,t,{offset:n=!1,clamp:r=!0}={}){let i=$(e,{offset:n});if(!i)return;let a=(t-i.top)/i.height*100;return r?se(a):a}function Tr(e,{offset:t=!1}={}){let n=z(e);if(!n)return;let i={x:r(n,`offsetLeft`),y:r(n,`offsetTop`)};if(t){let e=n;for(;e=r(e,`offsetParent`);)i.x+=r(e,`offsetLeft`)+r(e,`clientLeft`),i.y+=r(e,`offsetTop`)+r(e,`clientTop`)}return i}function $(e,{offset:t=!1}={}){let r=z(e);if(!r)return;let i=n(r,`getBoundingClientRect`);if(t){let e=j();i.x+=e.scrollX,i.y+=e.scrollY}return i}function Er(e){let t=z(e,{document:!0,window:!0});if(t){if(S(t))return t.scrollX;if(p(t)){let e=r(t,`scrollingElement`);return e?r(e,`scrollLeft`):r(t,`defaultView`)?.scrollX??0}return r(t,`scrollLeft`)}}function Dr(e){let t=z(e,{document:!0,window:!0});if(t){if(S(t))return t.scrollY;if(p(t)){let e=r(t,`scrollingElement`);return e?r(e,`scrollTop`):r(t,`defaultView`)?.scrollY??0}return r(t,`scrollTop`)}}function Or(e,t,n){let i=B(e,{document:!0,window:!0});for(let e of i)if(S(e))e.scroll(t,n);else if(p(e)){let i=r(e,`scrollingElement`);i?(i.scrollLeft=t,i.scrollTop=n):r(e,`defaultView`)?.scroll(t,n)}else e.scrollLeft=t,e.scrollTop=n}function kr(e,t){let n=B(e,{document:!0,window:!0});for(let e of n)if(S(e))e.scroll(t,e.scrollY);else if(p(e)){let n=r(e,`scrollingElement`);if(n)n.scrollLeft=t;else{let n=r(e,`defaultView`);n?.scroll(t,n.scrollY)}}else e.scrollLeft=t}function Ar(e,t){let n=B(e,{document:!0,window:!0});for(let e of n)if(S(e))e.scroll(e.scrollX,t);else if(p(e)){let n=r(e,`scrollingElement`);if(n)n.scrollTop=t;else{let n=r(e,`defaultView`);n?.scroll(n.scrollX,t)}}else e.scrollTop=t}function jr(e,{boxSize:t=1,outer:n=!1}={}){let i=z(e,{document:!0,window:!0});if(!i)return;if(S(i))return n?i.outerHeight:i.innerHeight;if(p(i)&&(i=r(i,`documentElement`)),t>=4)return r(i,`scrollHeight`);let a=r(i,`clientHeight`);return t<=0&&(a-=Number.parseInt(K(i,`padding-top`)),a-=Number.parseInt(K(i,`padding-bottom`)),a=Math.max(0,a)),t>=2&&(a=r(i,`offsetHeight`)??a+Number.parseInt(K(i,`border-top-width`))+Number.parseInt(K(i,`border-bottom-width`))),t>=3&&(a+=Number.parseInt(K(i,`margin-top`)),a+=Number.parseInt(K(i,`margin-bottom`))),a}function Mr(e,{boxSize:t=1,outer:n=!1}={}){let i=z(e,{document:!0,window:!0});if(!i)return;if(S(i))return n?i.outerWidth:i.innerWidth;if(p(i)&&(i=r(i,`documentElement`)),t>=4)return r(i,`scrollWidth`);let a=r(i,`clientWidth`);return t<=0&&(a-=Number.parseInt(K(i,`padding-left`)),a-=Number.parseInt(K(i,`padding-right`)),a=Math.max(0,a)),t>=2&&(a=r(i,`offsetWidth`)??a+Number.parseInt(K(i,`border-left-width`))+Number.parseInt(K(i,`border-right-width`))),t>=3&&(a+=Number.parseInt(K(i,`margin-left`)),a+=Number.parseInt(K(i,`margin-right`))),a}function Nr(e){let t=`${e}=`,n=r(A(),`cookie`).split(`;`).find(e=>e.trimStart().startsWith(t));return n?decodeURIComponent(n.trimStart().substring(t.length)):null}function Pr(e,{path:t=null,secure:n=!1}={}){if(!e)return;let r=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC`;t&&(r+=`;path=${t}`),n&&(r+=`;secure`),A().cookie=r}function Fr(e,t,{expires:n=null,path:r=null,secure:i=!1}={}){if(!e)return;let a=`${e}=${encodeURIComponent(t)}`;if(n){let e=/* @__PURE__ */ new Date;e.setTime(e.getTime()+n*1e3),a+=`;expires=${e.toUTCString()}`}r&&(a+=`;path=${r}`),i&&(a+=`;secure`),A().cookie=a}function Ir(e,t,n,{debounce:r=!0,passive:i=!0,preventDefault:a=!0,touches:o=1}={}){return t&&r&&(t=St(t),n&&=St(n)),r=>{let s=r.type===`touchstart`;if(s&&r.touches.length!==o||e&&e(r)===!1||(a&&r.preventDefault(),!t&&!n))return;let c=j(),[l,u]=r.type in Kt?Kt[r.type]:Kt.mousedown,d=e=>{s&&e.touches.length!==o||(a&&!i&&e.preventDefault(),t&&t(e))},f=e=>{let t=e.type===`touchcancel`;s&&!t&&e.touches.length>=o||(!n||n(e)!==!1||t)&&(a&&e.preventDefault(),X(c,l,d),X(c,u,f))};Y(c,l,d,{passive:i}),Y(c,u,f)}}function Lr(e){let t=z(e);t&&n(t,`blur`)}function Rr(e){let t=z(e);t&&n(t,`click`)}function zr(e){let t=z(e);t&&n(t,`focus`)}function Br(e){r(A(),`readyState`)===`loading`?j().addEventListener(`DOMContentLoaded`,e,{once:!0}):e()}var Vr,Hr;function Ur(){let e=j();Hr&&e.$===Hr&&(e.$=Vr)}function Wr(e,t,n){return Hr=n,pt(e),ft(t||e.document),Vr=e.$,e.$=Hr,Hr}function Gr(e,t){let i=B(e,{node:!0}).filter(e=>r(e,`parentNode`)),a=B(t,{node:!0,fragment:!0,html:!0}).reverse();for(let[e,t]of i.entries()){let o=r(t,`parentNode`);if(!o)continue;let s;s=e===i.length-1?a:Z(a,{events:!0,data:!0,animations:!0});for(let e of s)n(o,`insertBefore`,e,r(t,`nextSibling`))}}function Kr(e,t){let r=B(e,{fragment:!0,shadow:!0,document:!0}),i=B(t,{node:!0,fragment:!0,html:!0});for(let[e,t]of r.entries()){let a;a=e===r.length-1?i:Z(i,{events:!0,data:!0,animations:!0});for(let e of a)n(t,`insertBefore`,e,null)}}function qr(e,t){Kr(t,e)}function Jr(e,t){let i=B(e,{node:!0}).filter(e=>r(e,`parentNode`)),a=B(t,{node:!0,fragment:!0,html:!0});for(let[e,t]of i.entries()){let o=r(t,`parentNode`);if(!o)continue;let s;s=e===i.length-1?a:Z(a,{events:!0,data:!0,animations:!0});for(let e of s)n(o,`insertBefore`,e,t)}}function Yr(e,t){Gr(t,e)}function Xr(e,t){Jr(t,e)}function Zr(e,t){let i=B(e,{fragment:!0,shadow:!0,document:!0}),a=B(t,{node:!0,fragment:!0,html:!0}).reverse();for(let[e,t]of i.entries()){let o;o=e===i.length-1?a:Z(a,{events:!0,data:!0,animations:!0});for(let e of o)n(t,`insertBefore`,e,r(t,`firstChild`))}}function Qr(e,t){Zr(t,e)}function $r(e,t){let i=B(e,{node:!0});t=R(t);let a=[];for(let e of i){let n=r(e,`parentNode`);n&&r(n,`parentNode`)&&(a.includes(n)||t(n)&&a.push(n))}for(let e of a){let t=r(e,`parentNode`);if(!t)continue;let i=C([],r(e,`childNodes`));for(let r of i)n(t,`insertBefore`,r,e)}Yn(a)}function ei(e,t){let i=B(e,{node:!0}),a=B(t,{fragment:!0,html:!0});for(let e of i){let t=r(e,`parentNode`);if(!t)continue;let i=Z(a,{events:!0,data:!0,animations:!0}),o=i[0],s=h(o)?r(o,`firstElementChild`):o;if(!s)continue;let c=Tt(s);for(let r of i)n(t,`insertBefore`,r,e);n(c,`insertBefore`,e,null)}}function ti(e,t){let i=B(e,{node:!0}),a=Z(B(t,{fragment:!0,html:!0}),{events:!0,data:!0,animations:!0}),o=i[0];if(!o)return;let s=r(o,`parentNode`);if(!s)return;let c=a[0],l=h(c)?r(c,`firstElementChild`):c;if(!l)return;let u=Tt(l);for(let e of a)n(s,`insertBefore`,e,o);for(let e of i)n(u,`insertBefore`,e,null)}function ni(e,t){let i=B(e,{node:!0,fragment:!0,shadow:!0}),a=B(t,{fragment:!0,html:!0});for(let e of i){let t=C([],r(e,`childNodes`)),i=Z(a,{events:!0,data:!0,animations:!0}),o=i[0],s=h(o)?r(o,`firstElementChild`):o;if(!s)continue;let c=Tt(s);for(let t of i)n(e,`insertBefore`,t,null);for(let e of t)n(c,`insertBefore`,e,null)}}function ri(e,{queueName:t=`default`,...n}={}){return this.queue(t=>en(t,e,n),{queueName:t})}function ii({finish:e=!0}={}){return this.clearQueue({queueName:null}),tn(this,{finish:e}),this}function ai({queueName:e=`default`,...t}={}){return this.queue(e=>gn(e,t),{queueName:e})}function oi({queueName:e=`default`,...t}={}){return this.queue(e=>_n(e,t),{queueName:e})}function si({queueName:e=`default`,...t}={}){return this.queue(e=>vn(e,t),{queueName:e})}function ci({queueName:e=`default`,...t}={}){return this.queue(e=>yn(e,t),{queueName:e})}function li({queueName:e=`default`,...t}={}){return this.queue(e=>bn(e,t),{queueName:e})}function ui({queueName:e=`default`,...t}={}){return this.queue(e=>xn(e,t),{queueName:e})}function di({queueName:e=`default`,...t}={}){return this.queue(e=>Sn(e,t),{queueName:e})}function fi({queueName:e=`default`,...t}={}){return this.queue(e=>Cn(e,t),{queueName:e})}function pi({queueName:e=`default`,...t}={}){return this.queue(e=>wn(e,t),{queueName:e})}function mi({queueName:e=`default`,...t}={}){return this.queue(e=>Tn(e,t),{queueName:e})}function hi(e){return Qn(this,e)}function gi(e){return $n(this,e)}function _i(){return er(this)}function vi(e){return tr(this,e)}function yi(){return nr(this)}function bi(){return rr(this)}function xi(e){return ir(this,e),this}function Si(e){return ar(this,e),this}function Ci(e){return or(this,e),this}function wi(e,t){return sr(this,e,t),this}function Ti(e,t){return cr(this,e,t),this}function Ei(e){return lr(this,e),this}function Di(e,t){return ur(this,e,t),this}function Oi(e){return dr(this,e),this}function ki(e){return fr(this,e),this}function Ai(e){return pr(this,e),this}function ji(e){return mr(this,e)}function Mi(e){return hr(this,e),this}function Ni(e,t){return gr(this,e,t),this}function Pi({offset:e=!1}={}){return _r(this,{offset:e})}function Fi(e){return vr(this,e),this}function Ii(e,t,{offset:n=!1}={}){return yr(this,e,t,{offset:n})}function Li(e){return br(this,e)}function Ri(e,t,{offset:n=!1}={}){let r=xr(this,e,t,{offset:n});return new N(r?[r]:[])}function zi(e){let t=Sr(this,e);return new N(t?[t]:[])}function Bi(e,{offset:t=!1,clamp:n=!0}={}){return Cr(this,e,{offset:t,clamp:n})}function Vi(e,{offset:t=!1,clamp:n=!0}={}){return wr(this,e,{offset:t,clamp:n})}function Hi({offset:e=!1}={}){return Tr(this,{offset:e})}function Ui({offset:e=!1}={}){return $(this,{offset:e})}function Wi(){return Er(this)}function Gi(){return Dr(this)}function Ki(e,t){return Or(this,e,t),this}function qi(e){return kr(this,e),this}function Ji(e){return Ar(this,e),this}function Yi({boxSize:e=1,outer:t=!1}={}){return jr(this,{boxSize:e,outer:t})}function Xi({boxSize:e=1,outer:t=!1}={}){return Mr(this,{boxSize:e,outer:t})}function Zi(...e){return sn(this,...e),this}function Qi(e){return K(this,e)}function $i(e){return cn(this,e)}function ea(){return ln(this),this}function ta(...e){return un(this,...e),this}function na(e){return dn(this,e),this}function ra(e,t,{important:n=!1}={}){return fn(this,e,t,{important:n}),this}function ia(e,t,{important:n=!1}={}){return rn(this,e,t,{important:n})}function aa(){return pn(this),this}function oa(e){return mn(this,e),this}function sa(...e){return hn(this,...e),this}function ca(e,t,{capture:n=!1,passive:r=!1}={}){return Y(this,e,t,{capture:n,passive:r}),this}function la(e,t,n,{capture:r=!1,passive:i=!1}={}){return Nn(this,e,t,n,{capture:r,passive:i}),this}function ua(e,t,n,{capture:r=!1,passive:i=!1}={}){return Pn(this,e,t,n,{capture:r,passive:i}),this}function da(e,t,{capture:n=!1,passive:r=!1}={}){return Fn(this,e,t,{capture:n,passive:r}),this}function fa(e){return In(this,e),this}function pa(e,t,{capture:n=null}={}){return X(this,e,t,{capture:n}),this}function ma(e,t,n,{capture:r=null}={}){return Ln(this,e,t,n,{capture:r}),this}function ha(e,{data:t=null,detail:n=null,bubbles:r=!0,cancelable:i=!0}={}){return Rn(this,e,{data:t,detail:n,bubbles:r,cancelable:i}),this}function ga(e,{data:t=null,detail:n=null,bubbles:r=!0,cancelable:i=!0}={}){return zn(this,e,{data:t,detail:n,bubbles:r,cancelable:i})}function _a(){return Lr(this),this}function va(){return Rr(this),this}function ya(){return zr(this),this}function ba({open:e=!0}={}){let t=Bn(this,{open:e});return new N(t?[t]:[])}function xa(e){return new N(Z(this,e))}function Sa(){return qn(this),this}function Ca(){return Jn(this),this}function wa(){return Yn(this),this}function Ta(e){return Xn(this,e),this}function Ea(e){return Zn(this,e),this}function Da(e){return Gr(this,e),this}function Oa(e){return Kr(this,e),this}function ka(e){return qr(this,e),this}function Aa(e){return Jr(this,e),this}function ja(e){return Yr(this,e),this}function Ma(e){return Xr(this,e),this}function Na(e){return Zr(this,e),this}function Pa(e){return Qr(this,e),this}function Fa(e){return $r(this,e),this}function Ia(e){return ei(this,e),this}function La(e){return ti(this,e),this}function Ra(e){return ni(this,e),this}function za(e,{queueName:t=`default`}={}){let n=B(e);for(let e of n){if(!W.has(e))continue;let n=W.get(e);t!==null&&n.delete(t),(t===null||!n.size)&&W.delete(e)}}function Ba(e,{queueName:t=`default`}={}){let n=W.get(e);if(!n||!n.has(t))return;let r=n.get(t),i=r.shift();if(!i){n.delete(t),!n.size&&W.get(e)===n&&W.delete(e);return}Promise.resolve(i(e)).then(()=>{W.get(e)===n&&n.get(t)===r&&Ba(e,{queueName:t})}).catch(()=>{W.get(e)===n&&n.get(t)===r&&(n.delete(t),n.size||W.delete(e))})}function Va(e,t,{queueName:n=`default`}={}){let{setTimeout:r}=j(),i=B(e);for(let e of i){W.has(e)||W.set(e,/* @__PURE__ */ new Map);let i=W.get(e),a=i.has(n);a||i.set(n,[()=>new Promise(e=>{r(e,1)})]),i.get(n).push(t),a||Ba(e,{queueName:n})}}function Ha({queueName:e=`default`}={}){return za(this,{queueName:e}),this}function Ua(e,{queueName:t=`default`}={}){let{setTimeout:n}=j();return this.queue(()=>new Promise(t=>n(t,e)),{queueName:t})}function Wa(e,{queueName:t=`default`}={}){return Va(this,e,{queueName:t}),this}function Ga(e,t){return Ka(e,t,{first:!0})}function Ka(e,t,{first:n=!1,elementsOnly:i=!0}={}){t=R(t);let a=B(e,{fragment:!0,shadow:!0,document:!0}),o=[];for(let e of a){let a=i?C([],r(e,`children`)):C([],r(e,`childNodes`));for(let e of a)if(t(e)&&(o.push(e),n))break}return a.length>1&&o.length>1?w(o):o}function qa(e,t,n){return to(e,t,n,{first:!0})}function Ja(e){let t=B(e,{node:!0,fragment:!0,shadow:!0,document:!0,window:!0});if(!t.length||t.some(e=>!r(e,`parentNode`)))return;let i=r(t[0],`parentNode`);for(;i;){if(t.every(e=>e!==i&&n(i,`contains`,e)))return i;i=r(i,`parentNode`)}}function Ya(e){return Ka(e,!1,{elementsOnly:!1})}function Xa(e){let t=z(e);if(!t)return;let n=r(t,`content`);if(h(n))return n}function Za(e,t){t=R(t);let n=B(e,{node:!0}),i=[];for(let e of n)e=r(e,`nextElementSibling`),e&&t(e)&&i.push(e);return n.length>1&&i.length>1?w(i):i}function Qa(e,t,n,{first:i=!1}={}){t=R(t),n=R(n,!1);let a=B(e,{node:!0}),o=[];for(let e of a)for(;(e=r(e,`nextElementSibling`))&&!(n(e)||t(e)&&(o.push(e),i)););return a.length>1&&o.length>1?w(o):o}function $a(e){let t=z(e);if(t)return r(t,`offsetParent`)}function eo(e,t){t=R(t);let n=B(e,{node:!0}),i=[];for(let e of n)e=r(e,`parentNode`),e&&t(e)&&i.push(e);return n.length>1&&i.length>1?w(i):i}function to(e,t,n,{first:i=!1}={}){t=R(t),n=R(n,!1);let a=B(e,{node:!0}),o=[];for(let e of a){let a=[];for(;(e=r(e,`parentNode`))&&!(p(e)||n(e)||t(e)&&(a.unshift(e),i)););o.push(...a)}return a.length>1&&o.length>1?w(o):o}function no(e,t){t=R(t);let n=B(e,{node:!0}),i=[];for(let e of n)e=r(e,`previousElementSibling`),e&&t(e)&&i.push(e);return n.length>1&&i.length>1?w(i):i}function ro(e,t,n,{first:i=!1}={}){t=R(t),n=R(n,!1);let a=B(e,{node:!0}),o=[];for(let e of a){let a=[];for(;(e=r(e,`previousElementSibling`))&&!(n(e)||t(e)&&(a.unshift(e),i)););o.push(...a)}return a.length>1&&o.length>1?w(o):o}function io(e){let t=z(e);if(t)return r(t,`shadowRoot`)}function ao(e,t,{elementsOnly:n=!0}={}){t=R(t);let i=B(e,{node:!0}),a=[];for(let e of i){let i=r(e,`parentNode`);if(!i)continue;let o=n?r(i,`children`):r(i,`childNodes`),s;for(s of o)e!==s&&t(s)&&a.push(s)}return i.length>1&&a.length>1?w(a):a}function oo(e){return B(e,{node:!0,fragment:!0,shadow:!0}).filter(e=>r(e,`isConnected`))}function so(e,t){let r=B(t,{node:!0,fragment:!0,shadow:!0});return B(e,{node:!0,fragment:!0,shadow:!0}).filter(e=>r.some(t=>n(e,`isEqualNode`,t)))}function co(e,t){return t=R(t),B(e,{node:!0,fragment:!0,shadow:!0}).filter(t)}function lo(e,t){return t=R(t),B(e,{node:!0,fragment:!0,shadow:!0}).find(t)||null}function uo(e){return B(e,{node:!0}).filter(e=>m(e)&&K(e,`position`)===`fixed`||qa(e,e=>m(e)&&K(e,`position`)===`fixed`).length)}function fo(e){return B(e,{node:!0,document:!0,window:!0}).filter(e=>S(e)?r(e.document,`visibilityState`)!==`visible`:p(e)?r(e,`visibilityState`)!==`visible`:!m(e)||n(e,`getClientRects`).length===0)}function po(e,t){return t=R(t),B(e,{node:!0,fragment:!0,shadow:!0}).filter((e,n)=>!t(e,n))}function mo(e,t){return t=R(t),B(e,{node:!0,fragment:!0,shadow:!0}).find((e,n)=>!t(e,n))||null}function ho(e,t){let n=B(t,{node:!0,fragment:!0,shadow:!0});return B(e,{node:!0,fragment:!0,shadow:!0}).filter(e=>n.includes(e))}function go(e){return B(e,{node:!0,document:!0,window:!0}).filter(e=>S(e)?r(e.document,`visibilityState`)===`visible`:p(e)?r(e,`visibilityState`)===`visible`:m(e)&&n(e,`getClientRects`).length>0)}function _o(e){return B(e).filter(e=>V.has(e))}function vo(e,t){return B(e).filter(e=>n(e,`hasAttribute`,t))}function yo(e){return B(e,{fragment:!0,shadow:!0,document:!0}).filter(e=>!!r(e,`childElementCount`))}function bo(e,...t){return t=F(t),B(e).filter(e=>t.some(t=>r(e,`classList`).contains(t)))}function xo(e){return B(e).filter(e=>K(e,`animation-duration`).split(`,`).some(e=>Number.parseFloat(e)))}function So(e){return B(e).filter(e=>K(e,`transition-duration`).split(`,`).some(e=>Number.parseFloat(e)))}function Co(e,t){return B(e,{node:!0,fragment:!0,shadow:!0,document:!0,window:!0}).filter(e=>{if(!H.has(e))return!1;if(!t)return!0;let n=H.get(e);return Object.hasOwn(n,t)})}function wo(e,t){return t=Ht(t),B(e,{fragment:!0,shadow:!0,document:!0}).filter(t)}function To(e,t){return B(e).filter(e=>Object.hasOwn(e,t))}function Eo(){return new N(oo(this))}function Do(e){return new N(so(this,e))}function Oo(e){return new N(co(this,e))}function ko(e){let t=lo(this,e);return new N(t?[t]:[])}function Ao(){return new N(uo(this))}function jo(){return new N(fo(this))}function Mo(e){return new N(po(this,e))}function No(e){let t=mo(this,e);return new N(t?[t]:[])}function Po(e){return new N(ho(this,e))}function Fo(){return new N(go(this))}function Io(){return new N(_o(this))}function Lo(e){return new N(vo(this,e))}function Ro(){return new N(yo(this))}function zo(...e){return new N(bo(this,...e))}function Bo(){return new N(xo(this))}function Vo(){return new N(So(this))}function Ho(e){return new N(Co(this,e))}function Uo(e){return new N(wo(this,e))}function Wo(e){return new N(To(this,e))}function Go(e){return new N(Pt(e,this))}function Ko(e){return new N(Ft(e,this))}function qo(e){return new N(It(e,this))}function Jo(e){return new N(Lt(e,this))}function Yo(e){let t=Rt(e,this);return new N(t?[t]:[])}function Xo(e){let t=zt(e,this);return new N(t?[t]:[])}function Zo(e){let t=Bt(e,this);return new N(t?[t]:[])}function Qo(e){let t=Vt(e,this);return new N(t?[t]:[])}function $o(e){return new N(Ga(this,e))}function es(e,{elementsOnly:t=!0}={}){return new N(Ka(this,e,{elementsOnly:t}))}function ts(e,t){return new N(qa(this,e,t))}function ns(){let e=Ja(this);return new N(e?[e]:[])}function rs(){return new N(Ya(this))}function is(){let e=Xa(this);return new N(e?[e]:[])}function as(e){return new N(Za(this,e))}function os(e,t){return new N(Qa(this,e,t))}function ss(){let e=$a(this);return new N(e?[e]:[])}function cs(e){return new N(eo(this,e))}function ls(e,t){return new N(to(this,e,t))}function us(e){return new N(no(this,e))}function ds(e,t){return new N(ro(this,e,t))}function fs(){let e=io(this);return new N(e?[e]:[])}function ps(e,{elementsOnly:t=!0}={}){return new N(ao(this,e,{elementsOnly:t}))}function ms(e,t=null){return n(A(),`execCommand`,e,!1,t)}function hs(e){let t=z(e,{node:!0}),n=t&&r(t,`parentNode`);if(n)return C([],r(n,`children`)).indexOf(t)}function gs(e,t){return t=R(t),B(e,{node:!0,fragment:!0,shadow:!0}).findIndex(t)}function _s(e){let t=B(e,{node:!0,fragment:!0,shadow:!0,document:!0});for(let e of t)n(e,`normalize`)}function vs(e){return rt(ys(e).map(({name:e,value:t})=>({name:e.replace(/\r\n|\r|\n/g,`\r
`),value:t.replace(/\r\n|\r|\n/g,`\r
`)})))}function ys(e){let t=B(e,{fragment:!0,shadow:!0}).flatMap(e=>h(e)||b(e)?C([],n(e,`querySelectorAll`,`input, select, textarea`)):n(e,`matches`,`form`)?C([],r(e,`elements`)):[e]),i=[];for(let e of t){if(n(e,`matches`,`:not(input, select, textarea), :disabled, datalist *, input:is([type=button], [type=submit], [type=reset], [type=file], [type=image]), input:is([type=radio], [type=checkbox]):not(:checked)`))continue;let t=n(e,`getAttribute`,`name`);if(t){if(n(e,`matches`,`select`))for(let n of e.selectedOptions)n.matches(`:disabled`)||i.push({name:t,value:n.value||``});else i.push({name:t,value:e.value||``})}}return i}function bs(e){let{Node:t}=j();return B(e,{node:!0,fragment:!0,shadow:!0,document:!0,window:!0}).sort((e,i)=>{if(S(e))return 1;if(S(i))return-1;if(p(e))return 1;if(p(i))return-1;if(h(i))return 1;if(h(e))return-1;let a=b(e),o=b(i);a&&(e=e.host),o&&(i=i.host);let s=r(e,`isConnected`),c=r(i,`isConnected`);if(!s||!c){if(s!==c)return a&&!s?1:o&&!c?-1:s?1:-1;if(n(e,`getRootNode`)!==n(i,`getRootNode`))return 0}if(e===i)return 0;let l=n(e,`compareDocumentPosition`,i);return l&t.DOCUMENT_POSITION_FOLLOWING||l&t.DOCUMENT_POSITION_CONTAINED_BY?-1:l&t.DOCUMENT_POSITION_PRECEDING||l&t.DOCUMENT_POSITION_CONTAINS?1:0})}function xs(e){let t=z(e);if(t)return r(t,`tagName`).toLowerCase()}function Ss(e){let t=B(e,{node:!0,fragment:!0,html:!0}).reverse(),n=j().getSelection();if(!t.length||!n.rangeCount)return;let r=n.getRangeAt(0);n.removeAllRanges(),r.collapse();for(let e of t)r.insertNode(e)}function Cs(e){let t=B(e,{node:!0,fragment:!0,html:!0}).reverse(),n=j().getSelection();if(!t.length||!n.rangeCount)return;let r=n.getRangeAt(0);n.removeAllRanges();for(let e of t)r.insertNode(e)}function ws(){let e=j().getSelection();if(!e.rangeCount)return[];let t=e.getRangeAt(0);return e.removeAllRanges(),C([],t.extractContents().childNodes)}function Ts(){let e=j().getSelection();if(!e.rangeCount)return[];let t=e.getRangeAt(0);if(t.collapsed)return[];let n=t.commonAncestorContainer,i=C([],r(n,`childNodes`));return i.length?i.filter(e=>t.intersectsNode(e)):[n]}function Es(e){let t=z(e,{node:!0}),n=t&&r(t,`select`);if(typeof n==`function`){n.call(t);return}let i=j().getSelection();if(i.rangeCount>0&&i.removeAllRanges(),!t)return;let a=Wn();a.selectNode(t),i.addRange(a)}function Ds(e){let t=bs(e);t=t.filter(e=>!t.some(t=>t!==e&&n(t,`contains`,e)));let r=j().getSelection();if(r.rangeCount&&r.removeAllRanges(),!t.length)return;let i=Wn();t.length===1?i.selectNode(t.shift()):(i.setStartBefore(t.shift()),i.setEndAfter(t.pop())),r.addRange(i)}function Os(e){let t=B(e,{fragment:!0,html:!0}),r=j().getSelection();if(!t.length||!r.rangeCount)return;let i=r.getRangeAt(0);r.removeAllRanges(),n(Tt(t[0]),`appendChild`,i.extractContents());for(let e of t.reverse())i.insertNode(e)}function ks(){return Ss(this),this}function As(){return Cs(this),this}function js(){return Es(this),this}function Ms(){return Ds(this),this}function Ns(){return Os(this),this}function Ps(e){return B(e).some(e=>V.has(e))}function Fs(e,t){return B(e).some(e=>n(e,`hasAttribute`,t))}function Is(e){return B(e,{fragment:!0,shadow:!0,document:!0}).some(e=>r(e,`childElementCount`))}function Ls(e,...t){return t=F(t),B(e).some(e=>t.some(t=>r(e,`classList`).contains(t)))}function Rs(e){return B(e).some(e=>K(e,`animation-duration`).split(`,`).some(e=>Number.parseFloat(e)))}function zs(e){return B(e).some(e=>K(e,`transition-duration`).split(`,`).some(e=>Number.parseFloat(e)))}function Bs(e,t){return B(e,{fragment:!0,shadow:!0,document:!0,window:!0}).some(e=>{if(!H.has(e))return!1;if(!t)return!0;let n=H.get(e);return Object.hasOwn(n,t)})}function Vs(e,t){return t=O(t),B(e).some(e=>Object.hasOwn(r(e,`dataset`),t))}function Hs(e,t){return t=Ht(t),B(e,{fragment:!0,shadow:!0,document:!0}).some(t)}function Us(e){return B(e).some(e=>h(r(e,`content`)))}function Ws(e,t){return B(e).some(e=>Object.hasOwn(e,t))}function Gs(e){return B(e).some(e=>r(e,`shadowRoot`))}function Ks(e,t){return t=R(t),B(e,{node:!0,fragment:!0,shadow:!0}).some(t)}function qs(e){return B(e,{node:!0,fragment:!0,shadow:!0}).some(e=>r(e,`isConnected`))}function Js(e,t,{shallow:r=!1}={}){let i=B(e,{node:!0,fragment:!0,shadow:!0}),a=B(t,{node:!0,fragment:!0,shadow:!0});return r&&(i=Z(i,{deep:!1}),a=Z(a,{deep:!1})),i.some(e=>a.some(t=>n(e,`isEqualNode`,t)))}function Ys(e){return B(e,{node:!0}).some(e=>m(e)&&K(e,`position`)===`fixed`||qa(e,e=>m(e)&&K(e,`position`)===`fixed`).length)}function Xs(e){return B(e,{node:!0,document:!0,window:!0}).some(e=>S(e)?r(e.document,`visibilityState`)!==`visible`:p(e)?r(e,`visibilityState`)!==`visible`:!m(e)||n(e,`getClientRects`).length===0)}function Zs(e,t){let n=B(t,{node:!0,fragment:!0,shadow:!0});return B(e,{node:!0,fragment:!0,shadow:!0}).some(e=>n.includes(e))}function Qs(e){return B(e,{node:!0,document:!0,window:!0}).some(e=>S(e)?r(e.document,`visibilityState`)===`visible`:p(e)?r(e,`visibilityState`)===`visible`:m(e)&&n(e,`getClientRects`).length>0)}function $s(){return Ps(this)}function ec(e){return Fs(this,e)}function tc(){return Is(this)}function nc(...e){return Ls(this,...e)}function rc(){return Rs(this)}function ic(){return zs(this)}function ac(e){return Bs(this,e)}function oc(e){return Vs(this,e)}function sc(e){return Hs(this,e)}function cc(){return Us(this)}function lc(e){return Ws(this,e)}function uc(){return Gs(this)}function dc(e){return Ks(this,e)}function fc(){return qs(this)}function pc(e,{shallow:t=!1}={}){return Js(this,e,{shallow:t})}function mc(){return Ys(this)}function hc(){return Xs(this)}function gc(e){return Zs(this,e)}function _c(){return Qs(this)}function vc(e,t=null){let n=B(e,{node:!0,fragment:!0,shadow:!0,document:!0,window:!0,html:!0,context:t||A()});return new N(bs(w(C([],this.get(),n))))}function yc(e){let t=this.get(e);return new N(t?[t]:[])}function bc(){return this.eq(0)}function xc(){return hs(this)}function Sc(e){return gs(this,e)}function Cc(){return this.eq(-1)}function wc(){return _s(this),this}function Tc(){return vs(this)}function Ec(){return ys(this)}function Dc(){return new N(bs(this))}function Oc(){return xs(this)}var kc={add:vc,addClass:Zi,addEvent:ca,addEventDelegate:la,addEventDelegateOnce:ua,addEventOnce:da,after:Da,afterSelection:ks,animate:ri,append:Oa,appendTo:ka,attachShadow:ba,before:Aa,beforeSelection:As,blur:_a,center:Pi,child:$o,children:es,clearQueue:Ha,click:va,clone:xa,cloneData:Ai,cloneEvents:fa,closest:ts,commonAncestor:ns,connected:Eo,constrain:Fi,contents:rs,css:Qi,delay:Ua,detach:Sa,distTo:Ii,distToNode:Li,dropIn:ai,dropOut:oi,empty:Ca,eq:yc,equal:Do,fadeIn:si,fadeOut:ci,filter:Oo,filterOne:ko,find:Go,findByClass:Ko,findById:qo,findByTag:Jo,findOne:Yo,findOneByClass:Xo,findOneById:Zo,findOneByTag:Qo,first:bc,fixed:Ao,focus:ya,fragment:is,getAttribute:hi,getData:ji,getDataset:gi,getHtml:_i,getProperty:vi,getScrollX:Wi,getScrollY:Gi,getStyle:$i,getText:yi,getValue:bi,hasAnimation:$s,hasAttribute:ec,hasChildren:tc,hasClass:nc,hasCssAnimation:rc,hasCssTransition:ic,hasData:ac,hasDataset:oc,hasDescendent:sc,hasFragment:cc,hasProperty:lc,hasShadow:uc,height:Yi,hidden:jo,hide:ea,index:xc,indexOf:Sc,insertAfter:ja,insertBefore:Ma,is:dc,isConnected:fc,isEqual:pc,isFixed:mc,isHidden:hc,isSame:gc,isVisible:_c,last:Cc,nearestTo:Ri,nearestToNode:zi,next:as,nextAll:os,normalize:wc,not:Mo,notOne:No,offsetParent:ss,parent:cs,parents:ls,percentX:Bi,percentY:Vi,position:Hi,prepend:Na,prependTo:Pa,prev:us,prevAll:ds,queue:Wa,rect:Ui,remove:wa,removeAttribute:xi,removeClass:ta,removeData:Mi,removeDataset:Si,removeEvent:pa,removeEventDelegate:ma,removeProperty:Ci,removeStyle:na,replaceAll:Ta,replaceWith:Ea,rotateIn:li,rotateOut:ui,same:Po,select:js,selectAll:Ms,serialize:Tc,serializeArray:Ec,setAttribute:wi,setData:Ni,setDataset:Ti,setHtml:Ei,setProperty:Di,setScroll:Ki,setScrollX:qi,setScrollY:Ji,setStyle:ra,setStyleLock:ia,setText:Oi,setValue:ki,shadow:fs,show:aa,siblings:ps,slideIn:di,slideOut:fi,sort:Dc,squeezeIn:pi,squeezeOut:mi,stop:ii,tagName:Oc,toggle:oa,toggleClass:sa,triggerEvent:ha,triggerOne:ga,unwrap:Fa,visible:Fo,width:Xi,withAnimation:Io,withAttribute:Lo,withChildren:Ro,withClass:zo,withCssAnimation:Bo,withCssTransition:Vo,withData:Ho,withDescendent:Uo,withProperty:Wo,wrap:Ia,wrapAll:La,wrapInner:Ra,wrapSelection:Ns};for(let[e,t]of Object.entries(kc))Object.defineProperty(N.prototype,e,{configurable:!0,enumerable:!1,value:t,writable:!0});var Ac=N;function jc(e,t=null){return g(e)?Br(e):new Ac(B(e,{node:!0,fragment:!0,shadow:!0,document:!0,window:!0,html:!0,context:t||A()}))}function Mc(e,t=null){let n=z(e,{node:!0,fragment:!0,shadow:!0,document:!0,window:!0,html:!0,context:t||A()});return new Ac(n?[n]:[])}function Nc(e){return e!==!1&&e!=null}function Pc(e,t,n){t!==`async`&&Nc(n)&&e.setAttribute(t,n===!0?``:n)}function Fc(e,t,{cache:i=!0,context:a=A()}={}){t={src:e,type:`text/javascript`,...t},i||(t.src=Qe(t.src,`_`,Date.now(),r(a,`baseURI`)));let o=n(a,`createElement`,`script`);o.async=`async`in t&&Nc(t.async);for(let[e,n]of Object.entries(t))Pc(o,e,n);return r(a,`head`).appendChild(o),new Promise((e,t)=>{o.onload=()=>e(),o.onerror=e=>t(e)})}function Ic(e,{cache:t=!0,context:n=A()}={}){return Promise.all(e.map(e=>x(e)?Fc(e,null,{cache:t,context:n}):Fc(null,e,{cache:t,context:n})))}function Lc(e,t,{cache:i=!0,context:a=A()}={}){t={href:e,rel:`stylesheet`,...t},i||(t.href=Qe(t.href,`_`,Date.now(),r(a,`baseURI`)));let o=n(a,`createElement`,`link`);for(let[e,n]of Object.entries(t))o.setAttribute(e,n);return r(a,`head`).appendChild(o),new Promise((e,t)=>{o.onload=()=>e(),o.onerror=e=>t(e)})}function Rc(e,{cache:t=!0,context:n=A()}={}){return Promise.all(e.map(e=>x(e)?Lc(e,null,{cache:t,context:n}):Lc(null,e,{cache:t,context:n})))}function zc(e,t=Wt){let r=n(A(),`createElement`,`template`);r.innerHTML=e;let i=r.content,a=C([],i.children);for(let e of a)Vc(e,t);return r.innerHTML}function Bc(e,t){let n=e.nodeName.toLowerCase(),i=t.some(e=>typeof e==`string`?e===n:e instanceof RegExp&&e.test(n));if(!i||!Gt.has(n))return i;try{let{URL:t}=j();return new t(e.nodeValue,r(A(),`baseURI`)).protocol!==`javascript:`}catch{return!1}}function Vc(e,t=Wt){let i=r(e,`tagName`).toLowerCase();if(!Object.hasOwn(t,i)){n(e,`remove`);return}let a=[];Object.hasOwn(t,`*`)&&a.push(...t[`*`]),a.push(...t[i]);let o=C([],r(e,`attributes`));for(let t of o)Bc(t,a)||n(e,`removeAttribute`,t.nodeName);let s=r(e,`content`),c=C([],h(s)?s.children:r(e,`children`));for(let e of c)Vc(e,t)}Object.assign(jc,{BORDER_BOX:2,CONTENT_BOX:0,MARGIN_BOX:3,PADDING_BOX:1,SCROLL_BOX:4,Animation:$t,AnimationSet:Jt,QuerySet:Ac,addClass:sn,addEvent:Y,addEventDelegate:Nn,addEventDelegateOnce:Pn,addEventOnce:Fn,after:Gr,afterSelection:Ss,ajax:gt,animate:en,append:Kr,appendTo:qr,attachShadow:Bn,before:Jr,beforeSelection:Cs,blur:Lr,center:_r,child:Ga,children:Ka,clearQueue:za,click:Rr,clone:Z,cloneData:pr,cloneEvents:In,closest:qa,commonAncestor:Ja,connected:oo,constrain:vr,contents:Ya,create:Vn,createComment:Hn,createFragment:Un,createRange:Wn,createText:Gn,css:K,debounce:St,delete:ht,detach:qn,distTo:yr,distToNode:br,dropIn:gn,dropOut:_n,empty:Jn,equal:so,exec:ms,extractSelection:ws,fadeIn:vn,fadeOut:yn,filter:co,filterOne:lo,find:Pt,findByClass:Ft,findById:It,findByTag:Lt,findOne:Rt,findOneByClass:zt,findOneById:Bt,findOneByTag:Vt,fixed:uo,focus:zr,fragment:Xa,get:_t,getAjaxDefaults:ct,getAnimationDefaults:lt,getAttribute:Qn,getContext:A,getCookie:Nr,getData:mr,getDataset:$n,getHtml:er,getProperty:tr,getScrollX:Er,getScrollY:Dr,getSelection:Ts,getStyle:cn,getText:nr,getValue:rr,getWindow:j,hasAnimation:Ps,hasAttribute:Fs,hasCssAnimation:Rs,hasCssTransition:zs,hasChildren:Is,hasClass:Ls,hasData:Bs,hasDataset:Vs,hasDescendent:Hs,hasFragment:Us,hasProperty:Ws,hasShadow:Gs,height:jr,hidden:fo,hide:ln,index:hs,indexOf:gs,insertAfter:Yr,insertBefore:Xr,is:Ks,isConnected:qs,isEqual:Js,isFixed:Ys,isHidden:Xs,isSame:Zs,isVisible:Qs,loadScript:Fc,loadScripts:Ic,loadStyle:Lc,loadStyles:Rc,mouseDragFactory:Ir,nearestTo:xr,nearestToNode:Sr,next:Za,nextAll:Qa,noConflict:Ur,normalize:_s,not:po,notOne:mo,offsetParent:$a,parent:eo,parents:to,parseDocument:Mt,parseFormData:nt,parseHtml:Nt,parseParams:rt,patch:vt,percentX:Cr,percentY:wr,position:Tr,post:yt,prepend:Zr,prependTo:Qr,prev:no,prevAll:ro,put:bt,query:jc,queryOne:Mc,queue:Va,ready:Br,rect:$,remove:Yn,removeAttribute:ir,removeClass:un,removeCookie:Pr,removeData:hr,removeDataset:ar,removeEvent:X,removeEventDelegate:Ln,removeProperty:or,removeStyle:dn,replaceAll:Xn,replaceWith:Zn,rotateIn:bn,rotateOut:xn,same:ho,sanitize:zc,select:Es,selectAll:Ds,serialize:vs,serializeArray:ys,setAjaxDefaults:ut,setAnimationDefaults:dt,setAttribute:sr,setContext:ft,setCookie:Fr,setData:gr,setDataset:cr,setHtml:lr,setProperty:ur,setScroll:Or,setScrollX:kr,setScrollY:Ar,setStyle:fn,setStyleLock:rn,setText:dr,setValue:fr,setWindow:pt,shadow:io,show:pn,siblings:ao,slideIn:Sn,slideOut:Cn,sort:bs,squeezeIn:wn,squeezeOut:Tn,stop:tn,tagName:xs,toggle:mn,toggleClass:hn,triggerEvent:Rn,triggerOne:zn,unwrap:$r,useTimeout:mt,visible:go,width:Mr,withAnimation:_o,withAttribute:vo,withCssAnimation:xo,withCssTransition:So,withChildren:yo,withClass:bo,withData:Co,withDescendent:wo,withProperty:To,wrap:ei,wrapAll:ti,wrapInner:ni,wrapSelection:Os});for(let[e,n]of Object.entries(t))jc[`_${e}`]=n;var Hc=jc,Uc=(e,t)=>Wr(e,t,Hc);return S(globalThis)?Uc(globalThis):Uc});
//# sourceMappingURL=fquery.min.js.map