3 lines
8.0 KiB
JavaScript
3 lines
8.0 KiB
JavaScript
import{q as k,B as J,a4 as se,aI as ne,g as U,R as ie,aJ as B,aK as S,av as X,Q as v,I as p,S as m,aL as Y,H as ae,J as oe,aM as ue,aN as H,Z as g,Y as G,X as I,_ as z,a0 as fe,aO as le,aB as O,aP as D,aQ as $,aR as ce,aS as he,aT as K,z as Q,aU as de,W as x,N as L,n as _e,M as pe,aV as R,K as ge,aG as ve,aW as be,aX as ye,an as Ee,aY as me,ao as we,aZ as F,a5 as Te,a8 as Z,P as Se,a9 as Re,ab as P,O as A,a_ as Ae,a$ as Ne,b0 as ke,b1 as Oe,p as De,a6 as Le,b2 as Me,aa as Ie,b as xe}from"./krC2xWPP.js";function Fe(t,e,r){if(t==null)return e(void 0),k;const n=J(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}const E=[];function Je(t,e=k){let r=null;const n=new Set;function i(f){if(se(t,f)&&(t=f,r)){const u=!E.length;for(const a of n)a[1](),E.push(a,t);if(u){for(let a=0;a<E.length;a+=2)E[a][0](E[a+1]);E.length=0}}}function s(f){i(f(t))}function o(f,u=k){const a=[f,u];return n.add(a),n.size===1&&(r=e(i,s)||k),f(t),()=>{n.delete(a),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:o}}function Ue(t){let e;return Fe(t,r=>e=r)(),e}function Pe(t){let e=0,r=X(0),n;return()=>{ne()&&(U(r),ie(()=>(e===0&&(n=J(()=>t(()=>B(r)))),e+=1,()=>{S(()=>{e-=1,e===0&&(n?.(),n=void 0,B(r))})})))}}var Ve=ge|ve;function Ce(t,e,r,n){new We(t,e,r,n)}class We{parent;is_pending=!1;transform_error;#t;#_=p?v:null;#n;#f;#e;#i=null;#r=null;#s=null;#a=null;#l=0;#u=0;#c=!1;#p=new Set;#g=new Set;#o=null;#y=Pe(()=>(this.#o=X(this.#l),()=>{this.#o=null}));constructor(e,r,n,i){this.#t=e,this.#n=r,this.#f=s=>{var o=m;o.b=this,o.f|=Y,n(s)},this.parent=m.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#e=ae(()=>{if(p){const s=this.#_;oe();const o=s.data===ue;if(s.data.startsWith(H)){const u=JSON.parse(s.data.slice(H.length));this.#m(u)}else o?this.#w():this.#E()}else this.#v()},Ve),p&&(this.#t=v)}#E(){try{this.#i=g(()=>this.#f(this.#t))}catch(e){this.error(e)}}#m(e){const r=this.#n.failed;r&&(this.#s=g(()=>{r(this.#t,()=>e,()=>()=>{})}))}#w(){const e=this.#n.pending;e&&(this.is_pending=!0,this.#r=g(()=>e(this.#t)),S(()=>{var r=this.#a=document.createDocumentFragment(),n=G();r.append(n),this.#i=this.#d(()=>g(()=>this.#f(n))),this.#u===0&&(this.#t.before(r),this.#a=null,I(this.#r,()=>{this.#r=null}),this.#h(z))}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#i=g(()=>{this.#f(this.#t)}),this.#u>0){var e=this.#a=document.createDocumentFragment();fe(this.#i,e);const r=this.#n.pending;this.#r=g(()=>r(this.#t))}else this.#h(z)}catch(r){this.error(r)}}#h(e){this.is_pending=!1,e.transfer_effects(this.#p,this.#g)}defer_effect(e){le(e,this.#p,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#d(e){var r=m,n=K,i=Q;O(this.#e),D(this.#e),$(this.#e.ctx);try{return ce.ensure(),e()}catch(s){return he(s),null}finally{O(r),D(n),$(i)}}#b(e,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,r);return}this.#u+=e,this.#u===0&&(this.#h(r),this.#r&&I(this.#r,()=>{this.#r=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(e,r){this.#b(e,r),this.#l+=e,!(!this.#o||this.#c)&&(this.#c=!0,S(()=>{this.#c=!1,this.#o&&de(this.#o,this.#l)}))}get_effect_pending(){return this.#y(),U(this.#o)}error(e){var r=this.#n.onerror;let n=this.#n.failed;if(!r&&!n)throw e;this.#i&&(x(this.#i),this.#i=null),this.#r&&(x(this.#r),this.#r=null),this.#s&&(x(this.#s),this.#s=null),p&&(L(this.#_),_e(),L(pe()));var i=!1,s=!1;const o=()=>{if(i){ye();return}i=!0,s&&be(),this.#s!==null&&I(this.#s,()=>{this.#s=null}),this.#d(()=>{this.#v()})},f=u=>{try{s=!0,r?.(u,o),s=!1}catch(a){R(a,this.#e&&this.#e.parent)}n&&(this.#s=this.#d(()=>{try{return g(()=>{var a=m;a.b=this,a.f|=Y,n(this.#t,()=>u,()=>o)})}catch(a){return R(a,this.#e.parent),null}}))};S(()=>{var u;try{u=this.transform_error(e)}catch(a){R(a,this.#e&&this.#e.parent);return}u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(f,a=>R(a,this.#e&&this.#e.parent)):f(u)})}}function Xe(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const qe=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ge(t){return qe.includes(t)}const Be={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Ke(t){return t=t.toLowerCase(),Be[t]??t}const Ye=["touchstart","touchmove"];function He(t){return Ye.includes(t)}const ze=["textarea","script","style","title"];function Qe(t){return ze.includes(t)}const T=Symbol("events"),ee=new Set,V=new Set;function Ze(t){if(!p)return;t.removeAttribute("onload"),t.removeAttribute("onerror");const e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function te(t,e,r,n={}){function i(s){if(n.capture||C.call(e,s),!s.cancelBubble)return me(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?S(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function et(t,e,r,n={}){var i=te(e,t,r,n);return()=>{t.removeEventListener(e,i,n)}}function tt(t,e,r,n,i){var s={capture:n,passive:i},o=te(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ee(()=>{e.removeEventListener(t,o,s)})}function rt(t,e,r){(e[T]??={})[t]=r}function st(t){for(var e=0;e<t.length;e++)ee.add(t[e]);for(var r of V)r(t)}let j=null;function C(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;j=t;var o=0,f=j===t&&t[T];if(f){var u=i.indexOf(f);if(u!==-1&&(e===document||e===window)){t[T]=e;return}var a=i.indexOf(e);if(a===-1)return;u<=a&&(o=u)}if(s=i[o]||t.target,s!==e){we(t,"currentTarget",{configurable:!0,get(){return s||r}});var b=K,w=m;D(null),O(null);try{for(var _,c=[];s!==null;){var l=s.assignedSlot||s.parentNode||s.host||null;try{var h=s[T]?.[n];h!=null&&(!s.disabled||t.target===s)&&h.call(s,t)}catch(d){_?c.push(d):_=d}if(t.cancelBubble||l===e||l===null)break;s=l}if(_){for(let d of c)queueMicrotask(()=>{throw d});throw _}}finally{t[T]=e,delete t.currentTarget,D(b),O(w)}}}function nt(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=`${r}`)}function $e(t,e){return re(t,e)}function it(t,e){F(),e.intro=e.intro??!1;const r=e.target,n=p,i=v;try{for(var s=Te(r);s&&(s.nodeType!==Z||s.data!==Se);)s=Re(s);if(!s)throw P;A(!0),L(s);const o=re(t,{...e,anchor:s});return A(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
`).some(f=>f.startsWith("https://svelte.dev/e/")))throw o;return o!==P&&console.warn("Failed to hydrate: ",o),e.recover===!1&&Ae(),F(),Ne(r),A(!1),$e(t,e)}finally{A(n),L(i)}}const N=new Map;function re(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:f}){F();var u=void 0,a=ke(()=>{var b=r??e.appendChild(G());Ce(b,{pending:()=>{}},c=>{De({});var l=Q;if(s&&(l.c=s),i&&(n.$$events=i),p&&Le(c,null),u=t(c,n)||{},p&&(m.nodes.end=v,v===null||v.nodeType!==Z||v.data!==Me))throw Ie(),P;xe()},f);var w=new Set,_=c=>{for(var l=0;l<c.length;l++){var h=c[l];if(!w.has(h)){w.add(h);var d=He(h);for(const M of[e,document]){var y=N.get(M);y===void 0&&(y=new Map,N.set(M,y));var q=y.get(h);q===void 0?(M.addEventListener(h,C,{passive:d}),y.set(h,1)):y.set(h,q+1)}}}};return _(Oe(ee)),V.add(_),()=>{for(var c of w)for(const d of[e,document]){var l=N.get(d),h=l.get(c);--h==0?(d.removeEventListener(c,C),l.delete(c),l.size===0&&N.delete(d)):l.set(c,h)}V.delete(_),b!==r&&b.parentNode?.removeChild(b)}});return W.set(u,a),u}let W=new WeakMap;function at(t,e){const r=W.get(t);return r?(W.delete(t),r(e)):Promise.resolve()}export{rt as a,Fe as b,Xe as c,st as d,tt as e,te as f,Ue as g,it as h,Qe as i,Ge as j,Pe as k,$e as m,Ke as n,et as o,Ze as r,nt as s,at as u,Je as w};
|