1import{Dt as e,Et as t,Ft as n,G as r,Kt as i,P as a,Pt as o,Q as s,S as c,Tt as l,V as u,X as d,Z as f,a as p,at as m,bt as h,ct as g,dt as _,ht as v,jt as y,kt as b,qt as x,r as S,vt as C,yt as w}from"./CkTpffHb.js";import"./xihTtKlq.js";import{t as T}from"./D-0kaLeE.js";var E=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function D(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=E,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=n(e=>{let n=m(t,`focusin`,e),r=m(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?D(this.#e):null}};function O(e,t){switch(e){case`post`:w(t);break;case`pre`:h(t);break}}function k(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;O(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=_(()=>n(t,o));return o=t,r})}function A(e,t,n){let r=v(()=>{let i=!1;k(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});w(()=>r)}function j(e,t,n){k(e,`post`,t,n)}function ee(e,t,n){k(e,`pre`,t,n)}j.pre=ee;function te(e,t){A(e,`post`,t)}function ne(e,t){A(e,`pre`,t)}te.pre=ne;function re(e,t){switch(e){case`local`:return t.localStorage;case`session`:return t.sessionStorage}}var ie=class{#e;#t;#n;#r;#i;#a=y(0);constructor(e,t,r={}){let{storage:i=`local`,serializer:a={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:o=!0,window:s=E}=r;if(this.#e=t,this.#t=e,this.#n=a,s===void 0)return;let c=re(i,s);this.#r=c;let l=c.getItem(e);l===null?this.#c(t):this.#e=this.#s(l),o&&i===`local`&&(this.#i=n(()=>m(s,`storage`,this.#o)))}get current(){this.#i?.(),g(this.#a);let e=this.#s(this.#r?.getItem(this.#t))??this.#e,t=new WeakMap,n=r=>{if(r===null||r?.constructor.name===`Date`||typeof r!=`object`)return r;let i=t.get(r);return i||(i=new Proxy(r,{get:(e,t)=>(g(this.#a),n(Reflect.get(e,t))),set:(t,n,r)=>(b(this.#a,g(this.#a)+1),Reflect.set(t,n,r),this.#c(e),!0)}),t.set(r,i)),i};return n(e)}set current(e){this.#c(e),b(this.#a,g(this.#a)+1)}#o=e=>{e.key!==this.#t||e.newValue===null||(this.#e=this.#s(e.newValue),b(this.#a,g(this.#a)+1))};#s(e){try{return this.#n.deserialize(e)}catch(t){console.error(`Error when parsing "${e}" from persisted store "${this.#t}"`,t);return}}#c(e){try{e!=null&&this.#r?.setItem(this.#t,this.#n.serialize(e))}catch(e){console.error(`Error when writing value from persisted store "${this.#t}" to ${this.#r}`,e)}}};function ae(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function oe(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function M(t,n,r={},i){let{lazy:a=!1,once:o=!1,initialValue:s,debounce:c,throttle:l}=r,u=y(e(s)),d=y(!1),f=y(void 0),p=y(e([])),m=()=>{g(p).forEach(e=>e()),b(p,[],!0)},h=e=>{b(p,[...g(p),e],!0)},_=async(e,t,r=!1)=>{try{b(d,!0),b(f,void 0),m();let i=new AbortController;h(()=>i.abort());let a=await n(e,t,{data:g(u),refetching:r,onCleanup:h,signal:i.signal});return b(u,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||b(f,e,!0);return}finally{b(d,!1)}},v=c?ae(_,c):l?oe(_,l):_,x=Array.isArray(t)?t:[t],S;return i((e,n)=>{o&&S||S&&JSON.stringify(e)===JSON.stringify(S)||(S=e,v(Array.isArray(t)?e:e[0],Array.isArray(t)?n:n?.[0]))},{lazy:a}),{get current(){return g(u)},get loading(){return g(d)},get error(){return g(f)},mutate:e=>{b(u,e,!0)},refetch:e=>{let n=x.map(e=>e());return v(Array.isArray(t)?n:n[0],Array.isArray(t)?n:n[0],e??!0)}}}function se(e,t,n){return M(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];j(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function ce(e,t,n){return M(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];j.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}se.pre=ce;function N(e){return e.filter(e=>e.length>0)}var P={getItem:e=>null,setItem:(e,t)=>{}},F=typeof document<`u`;function le(e){return typeof e==`function`}function ue(e){return typeof e==`object`&&!!e}var I=Symbol(`box`),L=Symbol(`is-writable`);function de(e){return ue(e)&&I in e}function fe(e){return R.isBox(e)&&L in e}function R(t){let n=y(e(t));return{[I]:!0,[L]:!0,get current(){return g(n)},set current(e){b(n,e,!0)}}}function pe(e,t){let n=o(e);return t?{[I]:!0,[L]:!0,get current(){return g(n)},set current(e){t(e)}}:{[I]:!0,get current(){return e()}}}function me(e){return R.isBox(e)?e:le(e)?R.with(e):R(e)}function he(e){return Object.entries(e).reduce((e,[t,n])=>R.isBox(n)?(R.isWritableBox(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function ge(e){return R.isWritableBox(e)?{[I]:!0,get current(){return e.current}}:e}R.from=me,R.with=pe,R.flatten=he,R.readonly=ge,R.isBox=de,R.isWritableBox=fe;function _e(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var ve=_e(/[A-Z]/,e=>`-${e.toLowerCase()}`);function ye(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${ve(t)}: ${e[t]};`).join(` 2`)}function be(e={}){return ye(e).replace(` 3`,` `)}be({position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`});var xe=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Se(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=xe,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=n(e=>{let n=m(t,`focusin`,e),r=m(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Se(this.#e):null}};function Ce(e,t){switch(e){case`post`:w(t);break;case`pre`:h(t);break}}function z(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;Ce(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=_(()=>n(t,o));return o=t,r})}function B(e,t,n){let r=v(()=>{let i=!1;z(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});w(()=>r)}function we(e,t,n){z(e,`post`,t,n)}function Te(e,t,n){z(e,`pre`,t,n)}we.pre=Te;function Ee(e,t){B(e,`post`,t)}function De(e,t){B(e,`pre`,t)}Ee.pre=De;var V=R(`mode-watcher-mode`),H=R(`mode-watcher-theme`),Oe=[`dark`,`light`,`system`];function U(e){return typeof e==`string`?Oe.includes(e):!1}var ke=class{#e=`system`;#t=F?localStorage:P;#n=this.#t.getItem(V.current);#r=U(this.#n)?this.#n:this.#e;#i=y(e(this.#a()));#a(e=this.#r){return new ie(V.current,e,{serializer:{serialize:e=>e,deserialize:e=>U(e)?e:this.#e}})}constructor(){v(()=>j.pre(()=>V.current,(e,t)=>{let n=g(this.#i).current;b(this.#i,this.#a(n),!0),t&&localStorage.removeItem(t)}))}get current(){return g(this.#i).current}set current(e){g(this.#i).current=e}},Ae=class{#e=void 0;#t=!0;#n=y(e(this.#e));#r=typeof window<`u`&&typeof window.matchMedia==`function`?new T(`prefers-color-scheme: light`):{current:!1};query(){F&&b(this.#n,this.#r.current?`light`:`dark`,!0)}tracking(e){this.#t=e}constructor(){v(()=>{h(()=>{this.#t&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return g(this.#n)}},W=new ke,G=new Ae,K=new class{#e=F?localStorage:P;#t=this.#e.getItem(H.current);#n=this.#t===null||this.#t===void 0?``:this.#t;#r=y(e(this.#i()));#i(e=this.#n){return new ie(H.current,e,{serializer:{serialize:e=>typeof e==`string`?e:``,deserialize:e=>e}})}constructor(){v(()=>j.pre(()=>H.current,(e,t)=>{let n=g(this.#r).current;b(this.#r,this.#i(n),!0),t&&localStorage.removeItem(t)}))}get current(){return g(this.#r).current}set current(e){g(this.#r).current=e}},je,Me,Ne=!1,q=null;function Pe(){return q||(q=document.createElement(`style`),q.appendChild(document.createTextNode(`* { 4 -webkit-transition: none !important; 5 -moz-transition: none !important; 6 -o-transition: none !important; 7 -ms-transition: none !important; 8 transition: none !important; 9 }`)),q)}function Fe(e,t=!1){if(typeof document>`u`)return;if(!Ne){Ne=!0,e();return}if(typeof window<`u`&&window.__vitest_worker__){e();return}
9clearTimeout(je),clearTimeout(Me);let n=Pe(),r=()=>document.head.appendChild(n),i=()=>{n.parentNode&&document.head.removeChild(n)};function a(){e(),window.requestAnimationFrame(i)}if(window.requestAnimationFrame!==void 0){r(),t?a():window.requestAnimationFrame(()=>{a()});return}r(),je=window.setTimeout(()=>{e(),Me=window.setTimeout(i,16)},16)}var J=R(void 0),Y=R(!0),X=R(!1),Z=R([]),Q=R([]);function Ie(){let e=o(()=>{if(!F)return;let e=W.current===`system`?G.current:W.current,t=N(Z.current),n=N(Q.current);function r(){let r=document.documentElement,i=document.querySelector(`meta[name="theme-color"]`);e===`light`?(t.length&&r.classList.remove(...t),n.length&&r.classList.add(...n),r.style.colorScheme=`light`,i&&J.current&&i.setAttribute(`content`,J.current.light)):(n.length&&r.classList.remove(...n),t.length&&r.classList.add(...t),r.style.colorScheme=`dark`,i&&J.current&&i.setAttribute(`content`,J.current.dark))}return Y.current?Fe(r,X.current):r(),e});return{get current(){return g(e)}}}function Le(){let e=o(()=>{if(K.current,!F)return;function e(){document.documentElement.setAttribute(`data-theme`,K.current)}return Y.current?Fe(e,_(()=>X.current)):e(),K.current});return{get current(){return g(e)}}}var $=Ie(),Re=Le();function ze(){W.current=$.current===`dark`?`light`:`dark`}function Be(e){W.current=e}function Ve(){W.current=`system`}function He(e){K.current=e}function Ue(e){return e}function We({defaultMode:e=`system`,themeColors:t,darkClassNames:n=[`dark`],lightClassNames:r=[],defaultTheme:i=``,modeStorageKey:a=`mode-watcher-mode`,themeStorageKey:o=`mode-watcher-theme`}){let s=document.documentElement,c=localStorage.getItem(a)??e,l=localStorage.getItem(o)??i,u=c===`light`||c===`system`&&window.matchMedia(`(prefers-color-scheme: light)`).matches;if(u?(n.length&&s.classList.remove(...n.filter(Boolean)),r.length&&s.classList.add(...r.filter(Boolean))):(r.length&&s.classList.remove(...r.filter(Boolean)),n.length&&s.classList.add(...n.filter(Boolean))),s.style.colorScheme=u?`light`:`dark`,t){let e=document.querySelector(`meta[name="theme-color"]`);e&&e.setAttribute(`content`,c===`light`?t.light:t.dark)}l&&(s.setAttribute(`data-theme`,l),localStorage.setItem(o,l)),localStorage.setItem(a,c)}var Ge=s(`<meta name="theme-color"/>`);function Ke(e,t){x(t,!0);var n=f(),a=l(n),o=e=>{var n=Ge();C(()=>c(n,`content`,t.themeColors.dark)),d(e,n)};r(a,e=>{t.themeColors&&e(o)}),d(e,n),i()}var qe=s(`<meta name="theme-color"/>`),Je=s(`<!> <!>`,1);function Ye(e,n){x(n,!0);let o=p(n,`trueNonce`,3,``);a(`1funsus`,e=>{var i=Je(),a=l(i),s=e=>{var t=qe();C(()=>c(t,`content`,n.themeColors.dark)),d(e,t)};r(a,e=>{n.themeColors&&e(s)}),u(t(a,2),()=>`<script${o()?` nonce=${o()}`:``}>(`+We.toString()+`)(`+JSON.stringify(n.initConfig)+`);<\/script>`),d(e,i)}),i()}function Xe(e,t){x(t,!0);let n=p(t,`track`,3,!0),a=p(t,`defaultMode`,3,`system`),s=p(t,`disableTransitions`,3,!0),c=p(t,`darkClassNames`,19,()=>[`dark`]),u=p(t,`lightClassNames`,19,()=>[]),m=p(t,`defaultTheme`,3,``),_=p(t,`nonce`,3,``),v=p(t,`themeStorageKey`,3,`mode-watcher-theme`),y=p(t,`modeStorageKey`,3,`mode-watcher-mode`),b=p(t,`disableHeadScriptInjection`,3,!1),C=p(t,`synchronousModeChanges`,3,!1);V.current=y(),H.current=v(),Z.current=c(),Q.current=u(),Y.current=s(),J.current=t.themeColors,X.current=C(),h(()=>{X.current=C()}),h(()=>{Y.current=s()}),h(()=>{J.current=t.themeColors}),h(()=>{Z.current=c()}),h(()=>{Q.current=u()}),h(()=>{V.current=y()}),h(()=>{H.current=v()}),h(()=>{$.current,V.current,H.current,Re.current}),S(()=>{G.tracking(n()),G.query();let e=localStorage.getItem(V.current);Be(U(e)?e:a()),He(localStorage.getItem(H.current)||m())});let w=Ue({defaultMode:a(),themeColors:t.themeColors,darkClassNames:c(),lightClassNames:u(),defaultTheme:m(),modeStorageKey:y(),themeStorageKey:v()}),T=o(()=>typeof window>`u`?_():``);var E=f(),D=l(E),O=e=>{Ke(e,{get themeColors(){return J.current}})},k=e=>{Ye(e,{get trueNonce(){return g(T)},get initConfig(){return w},get themeColors(){return J.current}})};r(D,e=>{b()?e(O):e(k,-1)}),d(e,E),i()}export{$ as a,ze as i,Ve as n,Be as r,Xe as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.