@htmlbricks/hb-stylus-notebook 0.60.2 → 0.60.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.iife.js +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(function(xt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Pr=2,Ir="[",Mr="]",Ne={},N=Symbol(),Lr="http://www.w3.org/1999/xhtml",Ot=!1;var kt=Array.isArray,jr=Array.prototype.indexOf,Dr=Array.from,Le=Object.keys,_e=Object.defineProperty,he=Object.getOwnPropertyDescriptor,Fr=Object.getOwnPropertyDescriptors,qr=Object.prototype,Ur=Array.prototype,Rt=Object.getPrototypeOf,At=Object.isExtensible;function Ct(e){for(var t=0;t<e.length;t++)e[t]()}function Yr(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const P=2,et=4,tt=8,Te=16,K=32,z=64,Pt=128,D=256,je=512,k=1024,Y=2048,Z=4096,ve=8192,ne=16384,rt=32768,Br=65536,It=1<<17,Hr=1<<18,pe=1<<19,Gr=1<<20,nt=1<<21,it=1<<22,ie=1<<23,st=Symbol("$state"),Jr=Symbol("legacy props"),Vr=Symbol(""),lt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Wr=3,Mt=8;function Xr(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Kr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Zr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Qr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function en(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function tn(){throw new Error("https://svelte.dev/e/hydration_failed")}function rn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function nn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function sn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function at(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let T=!1;function ge(e){T=e}let x;function we(e){if(e===null)throw at(),Ne;return x=e}function Lt(){return we(ye(x))}function jt(e){if(T){if(ye(x)!==null)throw at(),Ne;x=e}}function Dt(e){return e===this.v}function ln(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function an(e){return!ln(e,this.v)}let on=!1,B=null;function De(e){B=e}function Ft(e,t=!1,r){B={p:B,c:null,e:null,s:e,x:null,l:null}}function qt(e){var t=B,r=t.e;if(r!==null){t.e=null;for(var n of r)ir(n)}return e!==void 0&&(t.x=e),B=t.p,e??{}}function Ut(){return!0}const un=new WeakMap;function fn(e){var t=w;if(t===null)return m.f|=ie,e;if((t.f&rt)===0){if((t.f&Pt)===0)throw!t.parent&&e instanceof Error&&Yt(e),e;t.b.error(e)}else ot(e,t)}function ot(e,t){for(;t!==null;){if((t.f&Pt)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&Yt(e),e}function Yt(e){const t=un.get(e);t&&(_e(e,"message",{value:t.message}),_e(e,"stack",{value:t.stack}))}let xe=[],ut=[];function Bt(){var e=xe;xe=[],Ct(e)}function cn(){var e=ut;ut=[],Ct(e)}function dn(e){xe.length===0&&queueMicrotask(Bt),xe.push(e)}function _n(){xe.length>0&&Bt(),ut.length>0&&cn()}function hn(){const e=w.b;return e===null&&Xr(),e}function Ht(e){var t=P|Y,r=m!==null&&(m.f&P)!==0?m:null;return w===null||r!==null&&(r.f&D)!==0?t|=D:w.f|=pe,{ctx:B,deps:null,effects:null,equals:Dt,f:t,fn:e,reactions:null,rv:0,v:N,wv:0,parent:r??w,ac:null}}function vn(e,t){let r=w;r===null&&Kr();var n=r.b,i=void 0,s=ht(N),a=null,o=!m;return An(()=>{try{var l=e();a&&Promise.resolve(l).catch(()=>{})}catch(h){l=Promise.reject(h)}var u=()=>l;i=a?.then(u,u)??Promise.resolve(l),a=i;var f=O,d=n.is_pending();o&&(n.update_pending_count(1),d||f.increment());const _=(h,v=void 0)=>{a=null,d||f.activate(),v?v!==lt&&(s.f|=ie,vt(s,v)):((s.f&ie)!==0&&(s.f^=ie),vt(s,h)),o&&(n.update_pending_count(-1),d||f.decrement()),Vt()};if(i.then(_,h=>_(null,h||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(l=>{function u(f){function d(){f===i?l(s):u(i)}f.then(d,d)}u(i)})}function Gt(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ee(t[r])}}function pn(e){for(var t=e.parent;t!==null;){if((t.f&P)===0)return t;t=t.parent}return null}function ft(e){var t,r=w;G(pn(e));try{Gt(e),t=vr(e)}finally{G(r)}return t}function Jt(e){var t=ft(e);if(e.equals(t)||(e.v=t,e.wv=_r()),!ue){var r=(te||(e.f&D)!==0)&&e.deps!==null?Z:k;M(e,r)}}function gn(e,t,r){const n=Ht;if(t.length===0){r(e.map(n));return}var i=O,s=w,a=wn(),o=hn();Promise.all(t.map(l=>vn(l))).then(l=>{i?.activate(),a();try{r([...e.map(n),...l])}catch(u){(s.f&ne)===0&&ot(u,s)}i?.deactivate(),Vt()}).catch(l=>{o.error(l)})}function wn(){var e=w,t=m,r=B,n=O;return function(){G(e),F(t),De(r),n?.activate()}}function Vt(){G(null),F(null),De(null)}const ct=new Set;let O=null,Wt=new Set,Fe=[];function Xt(){const e=Fe.shift();Fe.length>0&&queueMicrotask(Xt),e()}let se=[],qe=null,dt=!1,Ue=!1;class le{current=new Map;#t=new Map;#e=new Set;#r=0;#u=null;#f=!1;#i=[];#l=[];#s=[];#n=[];#a=[];#c=[];#d=[];skipped_effects=new Set;process(t){se=[];for(const i of t)this.#h(i);if(this.#i.length===0&&this.#r===0){this.#_();var r=this.#s,n=this.#n;this.#s=[],this.#n=[],this.#a=[],O=null,zt(r),zt(n),O===null?O=this:ct.delete(this),this.#u?.resolve()}else this.#o(this.#s),this.#o(this.#n),this.#o(this.#a);for(const i of this.#i)be(i);for(const i of this.#l)be(i);this.#i=[],this.#l=[]}#h(t){t.f^=k;for(var r=t.first;r!==null;){var n=r.f,i=(n&(K|z))!==0,s=i&&(n&k)!==0,a=s||(n&ve)!==0||this.skipped_effects.has(r);if(!a&&r.fn!==null){if(i)r.f^=k;else if((n&et)!==0)this.#n.push(r);else if((n&k)===0)if((n&it)!==0){var o=r.b?.is_pending()?this.#l:this.#i;o.push(r)}else Ye(r)&&((r.f&Te)!==0&&this.#a.push(r),be(r));var l=r.first;if(l!==null){r=l;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#o(t){for(const r of t)((r.f&Y)!==0?this.#c:this.#d).push(r),M(r,k);t.length=0}capture(t,r){this.#t.has(t)||this.#t.set(t,r),this.current.set(t,t.v)}activate(){O=this}deactivate(){O=null;for(const t of Wt)if(Wt.delete(t),t(),O!==null)break}neuter(){this.#f=!0}flush(){se.length>0?Kt():this.#_(),O===this&&(this.#r===0&&ct.delete(this),this.deactivate())}#_(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const t of this.#c)M(t,Y),Oe(t);for(const t of this.#d)M(t,Z),Oe(t);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=Yr()).promise}static ensure(){if(O===null){const t=O=new le;ct.add(O),Ue||le.enqueue(()=>{O===t&&t.flush()})}return O}static enqueue(t){Fe.length===0&&queueMicrotask(Xt),Fe.unshift(t)}}function _t(e){var t=Ue;Ue=!0;try{for(var r;;){if(_n(),se.length===0&&(O?.flush(),se.length===0))return qe=null,r;Kt()}}finally{Ue=t}}function Kt(){var e=$e;dt=!0;try{var t=0;for(ur(!0);se.length>0;){var r=le.ensure();if(t++>1e3){var n,i;mn()}r.process(se),Q.clear()}}finally{dt=!1,ur(e),qe=null}}function mn(){try{en()}catch(e){ot(e,qe)}}let ae=null;function zt(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(ne|ve))===0&&Ye(n)&&(ae=[],be(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?ar(n):n.fn=null),ae?.length>0)){Q.clear();for(const i of ae)be(i);ae=[]}}ae=null}}function Oe(e){for(var t=qe=e;t.parent!==null;){t=t.parent;var r=t.f;if(dt&&t===w&&(r&Te)!==0)return;if((r&(z|K))!==0){if((r&k)===0)return;t.f^=k}}se.push(t)}const Q=new Map;function ht(e,t){var r={f:0,v:e,reactions:null,equals:Dt,rv:0,wv:0};return r}function E(e,t){const r=ht(e);return Dn(r),r}function yn(e,t=!1,r=!0){const n=ht(e);return t||(n.equals=an),n}function b(e,t,r=!1){m!==null&&(!fe||(m.f&It)!==0)&&Ut()&&(m.f&(P|Te|it|It))!==0&&!W?.includes(e)&&sn();let n=r?me(t):t;return vt(e,n)}function vt(e,t){if(!e.equals(t)){var r=e.v;ue?Q.set(e,t):Q.set(e,r),e.v=t;var n=le.ensure();n.capture(e,r),(e.f&P)!==0&&((e.f&Y)!==0&&ft(e),M(e,(e.f&D)===0?k:Z)),e.wv=_r(),Zt(e,Y),w!==null&&(w.f&k)!==0&&(w.f&(K|z))===0&&(q===null?Fn([e]):q.push(e))}return t}function $n(e,t=1){var r=c(e),n=t===1?r++:r--;return b(e,r),n}function pt(e){b(e,e.v+1)}function Zt(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],a=s.f,o=(a&Y)===0;o&&M(s,t),(a&P)!==0?Zt(s,Z):o&&((a&Te)!==0&&ae!==null&&ae.push(s),Oe(s))}}function me(e){if(typeof e!="object"||e===null||st in e)return e;const t=Rt(e);if(t!==qr&&t!==Ur)return e;var r=new Map,n=kt(e),i=E(0),s=ce,a=o=>{if(ce===s)return o();var l=m,u=ce;F(null),dr(s);var f=o();return F(l),dr(u),f};return n&&r.set("length",E(e.length)),new Proxy(e,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&rn();var f=r.get(l);return f===void 0?f=a(()=>{var d=E(u.value);return r.set(l,d),d}):b(f,u.value,!0),!0},deleteProperty(o,l){var u=r.get(l);if(u===void 0){if(l in o){const f=a(()=>E(N));r.set(l,f),pt(i)}}else b(u,N),pt(i);return!0},get(o,l,u){if(l===st)return e;var f=r.get(l),d=l in o;if(f===void 0&&(!d||he(o,l)?.writable)&&(f=a(()=>{var h=me(d?o[l]:N),v=E(h);return v}),r.set(l,f)),f!==void 0){var _=c(f);return _===N?void 0:_}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var f=r.get(l);f&&(u.value=c(f))}else if(u===void 0){var d=r.get(l),_=d?.v;if(d!==void 0&&_!==N)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return u},has(o,l){if(l===st)return!0;var u=r.get(l),f=u!==void 0&&u.v!==N||Reflect.has(o,l);if(u!==void 0||w!==null&&(!f||he(o,l)?.writable)){u===void 0&&(u=a(()=>{var _=f?me(o[l]):N,h=E(_);return h}),r.set(l,u));var d=c(u);if(d===N)return!1}return f},set(o,l,u,f){var d=r.get(l),_=l in o;if(n&&l==="length")for(var h=u;h<d.v;h+=1){var v=r.get(h+"");v!==void 0?b(v,N):h in o&&(v=a(()=>E(N)),r.set(h+"",v))}if(d===void 0)(!_||he(o,l)?.writable)&&(d=a(()=>E(void 0)),b(d,me(u)),r.set(l,d));else{_=d.v!==N;var g=a(()=>me(u));b(d,g)}var L=Reflect.getOwnPropertyDescriptor(o,l);if(L?.set&&L.set.call(f,u),!_){if(n&&typeof l=="string"){var C=r.get("length"),S=Number(l);Number.isInteger(S)&&S>=C.v&&b(C,S+1)}pt(i)}return!0},ownKeys(o){c(i);var l=Reflect.ownKeys(o).filter(d=>{var _=r.get(d);return _===void 0||_.v!==N});for(var[u,f]of r)f.v!==N&&!(u in o)&&l.push(u);return l},setPrototypeOf(){nn()}})}var Qt,er,tr,rr;function gt(){if(Qt===void 0){Qt=window,er=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;tr=he(t,"firstChild").get,rr=he(t,"nextSibling").get,At(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),At(r)&&(r.__t=void 0)}}function wt(e=""){return document.createTextNode(e)}function ke(e){return tr.call(e)}function ye(e){return rr.call(e)}function nr(e,t){if(!T)return ke(e);var r=ke(x);return r===null&&(r=x.appendChild(wt())),we(r),r}function bn(e,t){if(!T){var r=ke(e);return r instanceof Comment&&r.data===""?ye(r):r}return x}function J(e,t=1,r=!1){let n=T?x:e;for(var i;t--;)i=n,n=ye(n);if(!T)return n;if(r&&n?.nodeType!==Wr){var s=wt();return n===null?i?.after(s):n.before(s),we(s),s}return we(n),n}function En(e){e.textContent=""}function mt(e){var t=m,r=w;F(null),G(null);try{return e()}finally{F(t),G(r)}}function Sn(e){w===null&&m===null&&Qr(),m!==null&&(m.f&D)!==0&&w===null&&Zr(),ue&&zr()}function Nn(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function V(e,t,r,n=!0){var i=w;i!==null&&(i.f&ve)!==0&&(e|=ve);var s={ctx:B,deps:null,nodes_start:null,nodes_end:null,f:e|Y,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{be(s),s.f|=rt}catch(l){throw ee(s),l}else t!==null&&Oe(s);if(n){var a=s;if(r&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&pe)===0&&(a=a.first),a!==null&&(a.parent=i,i!==null&&Nn(a,i),m!==null&&(m.f&P)!==0&&(e&z)===0)){var o=m;(o.effects??=[]).push(a)}}return s}function Tn(e){const t=V(tt,null,!1);return M(t,k),t.teardown=e,t}function xn(e){Sn();var t=w.f,r=!m&&(t&K)!==0&&(t&rt)===0;if(r){var n=B;(n.e??=[]).push(e)}else return ir(e)}function ir(e){return V(et|Gr,e,!1)}function On(e){le.ensure();const t=V(z|pe,e,!0);return()=>{ee(t)}}function kn(e){le.ensure();const t=V(z|pe,e,!0);return(r={})=>new Promise(n=>{r.outro?Ln(t,()=>{ee(t),n(void 0)}):(ee(t),n(void 0))})}function Rn(e){return V(et,e,!1)}function An(e){return V(it|pe,e,!0)}function Cn(e,t=0){return V(tt|t,e,!0)}function oe(e,t=[],r=[]){gn(t,r,n=>{V(tt,()=>e(...n.map(c)),!0)})}function Pn(e,t=!0){return V(K|pe,e,!0,t)}function sr(e){var t=e.teardown;if(t!==null){const r=ue,n=m;fr(!0),F(null);try{t.call(null)}finally{fr(r),F(n)}}}function lr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&mt(()=>{i.abort(lt)});var n=r.next;(r.f&z)!==0?r.parent=null:ee(r,t),r=n}}function In(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&K)===0&&ee(t),t=r}}function ee(e,t=!0){var r=!1;(t||(e.f&Hr)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(Mn(e.nodes_start,e.nodes_end),r=!0),lr(e,t&&!r),Be(e,0),M(e,ne);var n=e.transitions;if(n!==null)for(const s of n)s.stop();sr(e);var i=e.parent;i!==null&&i.first!==null&&ar(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Mn(e,t){for(;e!==null;){var r=e===t?null:ye(e);e.remove(),e=r}}function ar(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Ln(e,t){var r=[];or(e,r,!0),jn(r,()=>{ee(e),t&&t()})}function jn(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function or(e,t,r){if((e.f&ve)===0){if(e.f^=ve,e.transitions!==null)for(const a of e.transitions)(a.is_global||r)&&t.push(a);for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Br)!==0||(n.f&K)!==0;or(n,t,s?r:!1),n=i}}}let $e=!1;function ur(e){$e=e}let ue=!1;function fr(e){ue=e}let m=null,fe=!1;function F(e){m=e}let w=null;function G(e){w=e}let W=null;function Dn(e){m!==null&&(W===null?W=[e]:W.push(e))}let R=null,I=0,q=null;function Fn(e){q=e}let cr=1,Re=0,ce=Re;function dr(e){ce=e}let te=!1;function _r(){return++cr}function Ye(e){var t=e.f;if((t&Y)!==0)return!0;if((t&Z)!==0){var r=e.deps,n=(t&D)!==0;if(r!==null){var i,s,a=(t&je)!==0,o=n&&w!==null&&!te,l=r.length;if((a||o)&&(w===null||(w.f&ne)===0)){var u=e,f=u.parent;for(i=0;i<l;i++)s=r[i],(a||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);a&&(u.f^=je),o&&f!==null&&(f.f&D)===0&&(u.f^=D)}for(i=0;i<l;i++)if(s=r[i],Ye(s)&&Jt(s),s.wv>e.wv)return!0}(!n||w!==null&&!te)&&M(e,k)}return!1}function hr(e,t,r=!0){var n=e.reactions;if(n!==null&&!W?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&P)!==0?hr(s,t,!1):t===s&&(r?M(s,Y):(s.f&k)!==0&&M(s,Z),Oe(s))}}function vr(e){var t=R,r=I,n=q,i=m,s=te,a=W,o=B,l=fe,u=ce,f=e.f;R=null,I=0,q=null,te=(f&D)!==0&&(fe||!$e||m===null),m=(f&(K|z))===0?e:null,W=null,De(e.ctx),fe=!1,ce=++Re,e.ac!==null&&(mt(()=>{e.ac.abort(lt)}),e.ac=null);try{e.f|=nt;var d=e.fn,_=d(),h=e.deps;if(R!==null){var v;if(Be(e,I),h!==null&&I>0)for(h.length=I+R.length,v=0;v<R.length;v++)h[I+v]=R[v];else e.deps=h=R;if(!te||(f&P)!==0&&e.reactions!==null)for(v=I;v<h.length;v++)(h[v].reactions??=[]).push(e)}else h!==null&&I<h.length&&(Be(e,I),h.length=I);if(Ut()&&q!==null&&!fe&&h!==null&&(e.f&(P|Z|Y))===0)for(v=0;v<q.length;v++)hr(q[v],e);return i!==null&&i!==e&&(Re++,q!==null&&(n===null?n=q:n.push(...q))),(e.f&ie)!==0&&(e.f^=ie),_}catch(g){return fn(g)}finally{e.f^=nt,R=t,I=r,q=n,m=i,te=s,W=a,De(o),fe=l,ce=u}}function qn(e,t){let r=t.reactions;if(r!==null){var n=jr.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&P)!==0&&(R===null||!R.includes(t))&&(M(t,Z),(t.f&(D|je))===0&&(t.f^=je),Gt(t),Be(t,0))}function Be(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)qn(e,r[n])}function be(e){var t=e.f;if((t&ne)===0){M(e,k);var r=w,n=$e;w=e,$e=!0;try{(t&Te)!==0?In(e):lr(e),sr(e);var i=vr(e);e.teardown=typeof i=="function"?i:null,e.wv=cr;var s;Ot&&on&&(e.f&Y)!==0&&e.deps}finally{$e=n,w=r}}}function c(e){var t=e.f,r=(t&P)!==0;if(m!==null&&!fe){var n=w!==null&&(w.f&ne)!==0;if(!n&&!W?.includes(e)){var i=m.deps;if((m.f&nt)!==0)e.rv<Re&&(e.rv=Re,R===null&&i!==null&&i[I]===e?I++:R===null?R=[e]:(!te||!R.includes(e))&&R.push(e));else{(m.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[m]:s.includes(m)||s.push(m)}}}else if(r&&e.deps===null&&e.effects===null){var a=e,o=a.parent;o!==null&&(o.f&D)===0&&(a.f^=D)}if(ue){if(Q.has(e))return Q.get(e);if(r){a=e;var l=a.v;return((a.f&k)===0&&a.reactions!==null||pr(a))&&(l=ft(a)),Q.set(a,l),l}}else r&&(a=e,Ye(a)&&Jt(a));if((e.f&ie)!==0)throw e.v;return e.v}function pr(e){if(e.v===N)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Q.has(t)||(t.f&P)!==0&&pr(t))return!0;return!1}const Un=-7169;function M(e,t){e.f=e.f&Un|t}const gr=new Set,yt=new Set;function Yn(e,t,r,n={}){function i(s){if(n.capture||Ae.call(t,s),!s.cancelBubble)return mt(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?dn(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function He(e,t,r,n,i){var s={capture:n,passive:i},a=Yn(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Tn(()=>{t.removeEventListener(e,a,s)})}function Bn(e){for(var t=0;t<e.length;t++)gr.add(e[t]);for(var r of yt)r(e)}let wr=null;function Ae(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;wr=e;var a=0,o=wr===e&&e.__root;if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||e.target,s!==t){_e(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=m,d=w;F(null),G(null);try{for(var _,h=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var g=s["__"+n];if(g!=null&&(!s.disabled||e.target===s))if(kt(g)){var[L,...C]=g;L.apply(s,[e,...C])}else g.call(s,e)}catch(S){_?h.push(S):_=S}if(e.cancelBubble||v===t||v===null)break;s=v}if(_){for(let S of h)queueMicrotask(()=>{throw S});throw _}}finally{e.__root=t,delete e.currentTarget,F(f),G(d)}}}function Hn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function $t(e,t){var r=w;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Gn(e,t){var r=(t&Pr)!==0,n,i=!e.startsWith("<!>");return()=>{if(T)return $t(x,null),x;n===void 0&&(n=Hn(i?e:"<!>"+e));var s=r||er?document.importNode(n,!0):n.cloneNode(!0);{var a=ke(s),o=s.lastChild;$t(a,o)}return s}}function mr(e,t){if(T){w.nodes_end=x,Lt();return}e!==null&&e.before(t)}const Jn=["touchstart","touchmove"];function Vn(e){return Jn.includes(e)}function yr(e,t){return $r(e,t)}function Wn(e,t){gt(),t.intro=t.intro??!1;const r=t.target,n=T,i=x;try{for(var s=ke(r);s&&(s.nodeType!==Mt||s.data!==Ir);)s=ye(s);if(!s)throw Ne;ge(!0),we(s),Lt();const a=$r(e,{...t,anchor:s});if(x===null||x.nodeType!==Mt||x.data!==Mr)throw at(),Ne;return ge(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Ne&&console.warn("Failed to hydrate: ",a),t.recover===!1&&tn(),gt(),En(r),ge(!1),yr(e,t)}finally{ge(n),we(i)}}const Ee=new Map;function $r(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0}){gt();var o=new Set,l=d=>{for(var _=0;_<d.length;_++){var h=d[_];if(!o.has(h)){o.add(h);var v=Vn(h);t.addEventListener(h,Ae,{passive:v});var g=Ee.get(h);g===void 0?(document.addEventListener(h,Ae,{passive:v}),Ee.set(h,1)):Ee.set(h,g+1)}}};l(Dr(gr)),yt.add(l);var u=void 0,f=kn(()=>{var d=r??t.appendChild(wt());return Pn(()=>{if(s){Ft({});var _=B;_.c=s}i&&(n.$$events=i),T&&$t(d,null),u=e(d,n)||{},T&&(w.nodes_end=x),s&&qt()}),()=>{for(var _ of o){t.removeEventListener(_,Ae);var h=Ee.get(_);--h===0?(document.removeEventListener(_,Ae),Ee.delete(_)):Ee.set(_,h)}yt.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return bt.set(u,f),u}let bt=new WeakMap;function Xn(e,t){const r=bt.get(e);return r?(bt.delete(e),r(t)):Promise.resolve()}function Kn(e,t){Rn(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function zn(e,t){return e==null?null:String(e)}function Et(e,t,r,n){var i=e.__style;if(T||i!==t){var s=zn(t);(!T||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return n}const Zn=Symbol("is custom element"),Qn=Symbol("is html");function ei(e,t,r,n){var i=ti(e);T&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Vr]=r),r==null?e.removeAttribute(t):typeof r!="string"&&br(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function U(e,t,r){var n=m,i=w;let s=T;T&&ge(!1),F(null),G(null);try{t!=="style"&&(St.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?br(e).includes(t):r&&typeof r=="object")?e[t]=r:ei(e,t,r==null?r:String(r))}finally{F(n),G(i),s&&ge(!0)}}function ti(e){return e.__attributes??={[Zn]:e.nodeName.includes("-"),[Qn]:e.namespaceURI===Lr}}var St=new Map;function br(e){var t=e.getAttribute("is")||e.nodeName,r=St.get(t);if(r)return r;St.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Fr(i);for(var a in n)n[a].set&&r.push(a);i=Rt(i)}return r}function Er(e,t,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;o=e[t],o===void 0&&n!==void 0&&(o=a());var l;l=()=>{var _=e[t];return _===void 0?a():(s=!0,_)};var u=!1,f=Ht(()=>(u=!1,l())),d=w;return(function(_,h){if(arguments.length>0){const v=h?c(f):_;return b(f,v),u=!0,i!==void 0&&(i=v),_}return ue&&u||(d.f&ne)!==0?f.v:c(f)})}function ri(e){return new ni(e)}class ni{#t;#e;constructor(t){var r=new Map,n=(s,a)=>{var o=yn(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return c(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===Jr?!0:(c(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return b(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#e=(t.hydrate?Wn:yr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&_t(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||_e(this,s,{get(){return this.#e[s]},set(a){this.#e[s]=a},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{Xn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let Sr;typeof HTMLElement=="function"&&(Sr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),mr(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=ii(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Ge(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ri({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=On(()=>{Cn(()=>{this.$$r=!0;for(const n of Le(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Ge(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ge(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Le(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ge(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ii(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function si(e,t,r,n,i,s){let a=class extends Sr{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Le(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Le(t).forEach(o=>{_e(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Ge(o,l,t),this.$$d[o]=l;var u=this.$$c;if(u){var f=he(u,o)?.get;f?u[o]=l:u.$set({[o]:l})}}})}),n.forEach(o=>{_e(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}const Nr={version:"0.60.
|
|
2
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Ne&&console.warn("Failed to hydrate: ",a),t.recover===!1&&tn(),gt(),En(r),ge(!1),yr(e,t)}finally{ge(n),we(i)}}const Ee=new Map;function $r(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0}){gt();var o=new Set,l=d=>{for(var _=0;_<d.length;_++){var h=d[_];if(!o.has(h)){o.add(h);var v=Vn(h);t.addEventListener(h,Ae,{passive:v});var g=Ee.get(h);g===void 0?(document.addEventListener(h,Ae,{passive:v}),Ee.set(h,1)):Ee.set(h,g+1)}}};l(Dr(gr)),yt.add(l);var u=void 0,f=kn(()=>{var d=r??t.appendChild(wt());return Pn(()=>{if(s){Ft({});var _=B;_.c=s}i&&(n.$$events=i),T&&$t(d,null),u=e(d,n)||{},T&&(w.nodes_end=x),s&&qt()}),()=>{for(var _ of o){t.removeEventListener(_,Ae);var h=Ee.get(_);--h===0?(document.removeEventListener(_,Ae),Ee.delete(_)):Ee.set(_,h)}yt.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return bt.set(u,f),u}let bt=new WeakMap;function Xn(e,t){const r=bt.get(e);return r?(bt.delete(e),r(t)):Promise.resolve()}function Kn(e,t){Rn(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function zn(e,t){return e==null?null:String(e)}function Et(e,t,r,n){var i=e.__style;if(T||i!==t){var s=zn(t);(!T||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return n}const Zn=Symbol("is custom element"),Qn=Symbol("is html");function ei(e,t,r,n){var i=ti(e);T&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Vr]=r),r==null?e.removeAttribute(t):typeof r!="string"&&br(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function U(e,t,r){var n=m,i=w;let s=T;T&&ge(!1),F(null),G(null);try{t!=="style"&&(St.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?br(e).includes(t):r&&typeof r=="object")?e[t]=r:ei(e,t,r==null?r:String(r))}finally{F(n),G(i),s&&ge(!0)}}function ti(e){return e.__attributes??={[Zn]:e.nodeName.includes("-"),[Qn]:e.namespaceURI===Lr}}var St=new Map;function br(e){var t=e.getAttribute("is")||e.nodeName,r=St.get(t);if(r)return r;St.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Fr(i);for(var a in n)n[a].set&&r.push(a);i=Rt(i)}return r}function Er(e,t,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;o=e[t],o===void 0&&n!==void 0&&(o=a());var l;l=()=>{var _=e[t];return _===void 0?a():(s=!0,_)};var u=!1,f=Ht(()=>(u=!1,l())),d=w;return(function(_,h){if(arguments.length>0){const v=h?c(f):_;return b(f,v),u=!0,i!==void 0&&(i=v),_}return ue&&u||(d.f&ne)!==0?f.v:c(f)})}function ri(e){return new ni(e)}class ni{#t;#e;constructor(t){var r=new Map,n=(s,a)=>{var o=yn(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return c(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===Jr?!0:(c(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return b(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#e=(t.hydrate?Wn:yr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&_t(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||_e(this,s,{get(){return this.#e[s]},set(a){this.#e[s]=a},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{Xn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let Sr;typeof HTMLElement=="function"&&(Sr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),mr(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=ii(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Ge(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ri({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=On(()=>{Cn(()=>{this.$$r=!0;for(const n of Le(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Ge(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ge(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Le(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ge(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ii(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function si(e,t,r,n,i,s){let a=class extends Sr{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Le(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Le(t).forEach(o=>{_e(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Ge(o,l,t),this.$$d[o]=l;var u=this.$$c;if(u){var f=he(u,o)?.get;f?u[o]=l:u.$set({[o]:l})}}})}),n.forEach(o=>{_e(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}const Nr={version:"0.60.4"};function li(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Se={},Nt,Tr;function ai(){if(Tr)return Nt;Tr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
|
|
3
3
|
`,u="/",f="*",d="",_="comment",h="declaration";Nt=function(g,L){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];L=L||{};var C=1,S=1;function Je($){var p=$.match(t);p&&(C+=p.length);var A=$.lastIndexOf(l);S=~A?$.length-A:S+$.length}function Ve(){var $={line:C,column:S};return function(p){return p.position=new We($),Ke(),p}}function We($){this.start=$,this.end={line:C,column:S},this.source=L.source}We.prototype.content=g;function Xe($){var p=new Error(L.source+":"+C+":"+S+": "+$);if(p.reason=$,p.filename=L.source,p.line=C,p.column=S,p.source=g,!L.silent)throw p}function de($){var p=$.exec(g);if(p){var A=p[0];return Je(A),g=g.slice(A.length),p}}function Ke(){de(r)}function ze($){var p;for($=$||[];p=Ce();)p!==!1&&$.push(p);return $}function Ce(){var $=Ve();if(!(u!=g.charAt(0)||f!=g.charAt(1))){for(var p=2;d!=g.charAt(p)&&(f!=g.charAt(p)||u!=g.charAt(p+1));)++p;if(p+=2,d===g.charAt(p-1))return Xe("End of comment missing");var A=g.slice(2,p-2);return S+=2,Je(A),g=g.slice(p),S+=2,$({type:_,comment:A})}}function Pe(){var $=Ve(),p=de(n);if(p){if(Ce(),!de(i))return Xe("property missing ':'");var A=de(s),Ie=$({type:h,property:v(p[0].replace(e,d)),value:A?v(A[0].replace(e,d)):d});return de(a),Ie}}function Ze(){var $=[];ze($);for(var p;p=Pe();)p!==!1&&($.push(p),ze($));return $}return Ke(),Ze()};function v(g){return g?g.replace(o,d):d}return Nt}var xr;function oi(){if(xr)return Se;xr=1;var e=Se&&Se.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.default=r;var t=e(ai());function r(n,i){var s=null;if(!n||typeof n!="string")return s;var a=(0,t.default)(n),o=typeof i=="function";return a.forEach(function(l){if(l.type==="declaration"){var u=l.property,f=l.value;o?i(u,f,l):f&&(s=s||{},s[u]=f)}}),s}return Se}var ui=oi();const Or=li(ui);Or.default;function kr(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const r=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const n=document.createElement("script");if(n.id=t+"-script",n.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${r}`,e?.local)n.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];n.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${r}`}document.head.appendChild(n)}catch(n){console.warn(n)}}var fi=(e,t)=>t("eraser"),ci=(e,t)=>t("select"),di=(e,t)=>t("draw"),_i=(e,t)=>t(),hi=(e,t)=>t(),vi=(e,t)=>t(),pi=Gn('<div part="controller" id="controller" class="svelte-14wiqdf"><button>clear</button> <button>select</button> <button>draw</button> <button>undo</button> <button>redo</button> <button>save</button> <button>brush</button> <br/>load:<hb-input-file></hb-input-file> insert:<hb-input-file></hb-input-file></div> <div part="paper-container" id="paper-container" style="position:relative" class="svelte-14wiqdf"><hb-stylus-paper></hb-stylus-paper></div>',3);const gi={hash:"svelte-14wiqdf",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;position:absolute;width:100%;height:100%;display:block;display:grid;grid-template-areas:"header" "paper";grid-template-columns:1fr;grid-template-rows:auto 1fr;}#controller.svelte-14wiqdf {grid-area:header;}#paper-container.svelte-14wiqdf {grid-area:paper;background:green;}'};function Rr(e,t){Ft(t,!0),Kn(e,gi);let r=Er(t,"id",7,""),n=Er(t,"load_draw"),i=E("draw");me({});let s=E(""),a=E(""),o=E(0),l=E(void 0),u=E(!1),f=E(!1),d=E(!1),_=E(void 0),h=E(void 0),v=E(void 0),g;xn(()=>{if((c(l)===0||c(l))&&c(l)<c(o)?b(f,!0):b(f,!1),(c(o)||c(o)===0)&&c(d)&&(!c(l)||c(l)!==-1)&&(!g||g<c(o)&&(!c(l)||c(l)<g))?b(u,!0):b(u,!1),typeof n()=="string"&&n()?.length)try{n(JSON.parse(n()))}catch(y){console.error("error parsing json",y)}}),kr({repoName:"@htmlbricks/hb-stylus-paper",version:Nr.version}),kr({repoName:"@htmlbricks/hb-input-file",version:Nr.version});function L(y,re){var X="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(y)),j=document.createElement("a");j.setAttribute("href",X),j.setAttribute("download",re),document.body.appendChild(j),j.click(),j.remove()}function C(y){b(i,y,!0)}function S(){console.log("ch",c(o),c(l)),c(o)>=0&&(!c(l)||c(l)>-1)&&(b(l,c(l)||c(l)===0?c(l)-1:c(o)-1,!0),console.log("undo",c(o),c(l)))}function Je(){console.log(c(o),c(l)),(c(l)||c(l)===0)&&c(l)<=c(o)&&($n(l),console.log("redo",c(o),c(l)))}function Ve(y){c(d)||b(d,!0),console.log("h",y),b(o,y.index-1),y.start_index&&(g=y.start_index),b(l,void 0)}function We(){b(_,{name:"test",type:"json"},!0)}function Xe(y){const re=y.value?.name;if(re){const X=new FileReader;X.readAsDataURL(y.value),X.onload=function(j){try{if(console.log("insert file",j.target,j.target?.result),j.target?.result){const mi=j.target.result.toString().split(";")[0].split("/")[1];b(h,{base64:j.target.result.toString(),type:mi,name:re},!0)}}catch{console.error("error loading file")}},X.onerror=function(j){console.error("error reading file")}}}function de(y){console.log("save",y),b(_,void 0),L(y,y.name+".json")}function Ke(y){if(console.log("file",y),y.value.name){const re=new FileReader;re.readAsText(y.value,"UTF-8"),re.onload=function(X){if(X?.target?.result?.toString())try{n(JSON.parse(X.target.result.toString()))}catch{console.error("error loading file")}},re.onerror=function(X){console.error("error reading file")}}}var ze={get id(){return r()},set id(y=""){r(y),_t()},get load_draw(){return n()},set load_draw(y){n(y),_t()}},Ce=pi(),Pe=bn(Ce),Ze=nr(Pe);Ze.__click=[fi,C];var $=J(Ze,2);$.__click=[ci,C];var p=J($,2);p.__click=[di,C];var A=J(p,2);A.__click=[_i,S];var Ie=J(A,2);Ie.__click=[hi,Je];var Tt=J(Ie,2);Tt.__click=[vi,We];var Ar=J(Tt,2),Me=J(Ar,4);U(Me,"id","loadfile"),Et(Me,c(a)),U(Me,"schemaentry",JSON.stringify({label:"ciao",id:"xxxxxxx"}));var Qe=J(Me,2);U(Qe,"id","insertfile"),Et(Qe,c(a)),U(Qe,"schemaentry",JSON.stringify({label:"ciao"})),jt(Pe);var Cr=J(Pe,2),H=nr(Cr);return U(H,"id","stylus-paper"),oe(()=>U(H,"goto",c(l))),Et(H,c(s)),U(H,"background_color","green"),oe(()=>U(H,"mode",c(i))),oe(()=>U(H,"save_as",c(_)?JSON.stringify(c(_)):"")),oe(()=>U(H,"load_draw",n()?JSON.stringify(n()):null)),oe(()=>U(H,"insert_image",c(h)?JSON.stringify(c(h)):null)),oe(()=>U(H,"insert_text",c(v)?JSON.stringify(c(v)):null)),jt(Cr),oe(()=>{A.disabled=!c(u),Ie.disabled=!c(f),Tt.disabled=!c(u),Ar.disabled=c(i)!=="draw"}),He("setVal",Me,y=>Ke(y.detail)),He("setVal",Qe,y=>Xe(y.detail)),He("historyIndex",H,y=>Ve(y.detail)),He("save",H,y=>de(y.detail)),mr(e,Ce),qt(ze)}Bn(["click"]),customElements.define("hb-stylus-notebook",si(Rr,{id:{},load_draw:{}},[],[],!0)),xt.Component=Rr,Object.defineProperty(xt,Symbol.toStringTag,{value:"Module"})})(this["stylus-notebook"]=this["stylus-notebook"]||{});
|
|
4
4
|
//# sourceMappingURL=main.iife.js.map
|
package/manifest.json
CHANGED