import{n as qe,H as Ec,X as tt,Y as ot,Z as Os,s as wt,T as hr,e as se,c as ae,d as me,f as Y,h as P,i as Te,U as dr,V as pr,W as mr,p as Ir,_ as Kt,$ as ur,a as ve,b as Ee,j as Q,l as Ie,r as ar,a0 as Zo,a1 as us,F as Yo,a2 as Sc,a3 as Bt,t as lt,k as ct,a4 as Jr,a5 as Qr,v as at,E as Ac,a6 as Tc,a7 as Ci,a8 as xi,y as Ge,a9 as gt,m as Xt,aa as un,o as Kn,ab as ss,w as kc,A as Dc,ac as Gt,ad as Vt,x as Jt,g as Ve,q as ir,u as $r,ae as Ye,af as Cc,ag as xc}from"../chunks/scheduler.AtZRZ-7N.js";import{n as Rc,l as Ic,f as Fc,h as Bc,S as kt,i as Dt,t as ye,a as xe,g as ht,c as dt,j as Jo,k as Qo,o as Je,b as rt,d as nt,m as it,e as ut}from"../chunks/index.kgFpNQDS.js";import"../chunks/entry.p4bgP42u.js";import{w as Yr}from"../chunks/index.XMdNxSiw.js";import{e as Mt,u as Nc,f as Oc}from"../chunks/each.qkpXUKO-.js";import{p as $o,a as Pc}from"../chunks/ProgressBar.svelte_svelte_type_style_lang.U_c3sBpP.js";import{L as sn}from"../chunks/LogService.L-mSVvLb.js";const el=!0;function Lc(r,e,t,n){if(!e)return qe;const i=r.getBoundingClientRect();if(e.left===i.left&&e.right===i.right&&e.top===i.top&&e.bottom===i.bottom)return qe;const{delay:u=0,duration:s=300,easing:a=Ec,start:o=Rc()+u,end:l=o+s,tick:f=qe,css:m}=t(r,{from:e,to:i},n);let g=!0,d=!1,y;function w(){m&&(y=Fc(r,0,1,s,u,a,m)),u||(d=!0)}function b(){m&&Bc(r,y),g=!1}return Ic(p=>{if(!d&&p>=o&&(d=!0),d&&p>=l&&(f(1,0),b()),!g)return!1;if(d){const _=p-o,k=0+1*a(_/s);f(k,1-k)}return!0}),w(),f(0,1),b}function Mc(r){const e=getComputedStyle(r);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:n}=e,i=r.getBoundingClientRect();r.style.position="absolute",r.style.width=t,r.style.height=n,tl(r,i)}}function tl(r,e){const t=r.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const n=getComputedStyle(r),i=n.transform==="none"?"":n.transform;r.style.transform=`${i} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}function rl(r,e){const t={},n={},i={$$scope:1};let u=r.length;for(;u--;){const s=r[u],a=e[u];if(a){for(const o in s)o in a||(n[o]=1);for(const o in a)i[o]||(t[o]=a[o],i[o]=1);r[u]=a}else for(const o in s)i[o]=1}for(const s in n)s in t||(t[s]=void 0);return t}const Uc="drawerStore";function zc(){const r=jc();return tt(Uc,r)}function jc(){const{subscribe:r,set:e,update:t}=Yr({});return{subscribe:r,set:e,update:t,open:n=>t(()=>({open:!0,...n})),close:()=>t(n=>(n.open=!1,n))}}const Hc="modalStore";function Wc(){const r=Gc();return tt(Hc,r)}function Gc(){const{subscribe:r,set:e,update:t}=Yr([]);return{subscribe:r,set:e,update:t,trigger:n=>t(i=>(i.push(n),i)),close:()=>t(n=>(n.length>0&&n.shift(),n)),clear:()=>e([])}}const Vc={message:"Missing Toast Message",autohide:!0,timeout:5e3},nl="toastStore";function il(){const r=ot(nl);if(!r)throw new Error("toastStore is not initialized. Please ensure that `initializeStores()` is invoked in the root layout file of this app!");return r}function Kc(){const r=Xc();return tt(nl,r)}function qc(){const r=Math.random();return Number(r).toString(32)}function Xc(){const{subscribe:r,set:e,update:t}=Yr([]),n=u=>t(s=>{if(s.length>0){const a=s.findIndex(l=>l.id===u),o=s[a];o&&(o.callback&&o.callback({id:u,status:"closed"}),o.timeoutId&&clearTimeout(o.timeoutId),s.splice(a,1))}return s});function i(u){if(u.autohide===!0)return setTimeout(()=>{n(u.id)},u.timeout)}return{subscribe:r,close:n,trigger:u=>{const s=qc();return t(a=>{u&&u.callback&&u.callback({id:s,status:"queued"}),u.hideDismiss&&(u.autohide=!0);const o={...Vc,...u,id:s};return o.timeoutId=i(o),a.push(o),a}),s},freeze:u=>t(s=>(s.length>0&&clearTimeout(s[u].timeoutId),s)),unfreeze:u=>t(s=>(s.length>0&&(s[u].timeoutId=i(s[u])),s)),clear:()=>e([])}}function Zc(){Wc(),Kc(),zc()}function as(r){const e=r-1;return e*e*e+1}function Ps(r,{delay:e=0,duration:t=400,easing:n=as,x:i=0,y:u=0,opacity:s=0}={}){const a=getComputedStyle(r),o=+a.opacity,l=a.transform==="none"?"":a.transform,f=o*(1-s),[m,g]=Os(i),[d,y]=Os(u);return{delay:e,duration:t,easing:n,css:(w,b)=>` transform: ${l} translate(${(1-w)*m}${g}, ${(1-w)*d}${y}); opacity: ${o-f*b}`}}function Ls(r,{delay:e=0,duration:t=400,easing:n=as,axis:i="y"}={}){const u=getComputedStyle(r),s=+u.opacity,a=i==="y"?"height":"width",o=parseFloat(u[a]),l=i==="y"?["top","bottom"]:["left","right"],f=l.map(p=>`${p[0].toUpperCase()}${p.slice(1)}`),m=parseFloat(u[`padding${f[0]}`]),g=parseFloat(u[`padding${f[1]}`]),d=parseFloat(u[`margin${f[0]}`]),y=parseFloat(u[`margin${f[1]}`]),w=parseFloat(u[`border${f[0]}Width`]),b=parseFloat(u[`border${f[1]}Width`]);return{delay:e,duration:t,easing:n,css:p=>`overflow: hidden;opacity: ${Math.min(p*20,1)*s};${a}: ${p*o}px;padding-${l[0]}: ${p*m}px;padding-${l[1]}: ${p*g}px;margin-${l[0]}: ${p*d}px;margin-${l[1]}: ${p*y}px;border-${l[0]}-width: ${p*w}px;border-${l[1]}-width: ${p*b}px;`}}function Yc(r){let e,t,n;const i=r[19].default,u=hr(i,r,r[18],null);return{c(){e=se("div"),u&&u.c(),this.h()},l(s){e=ae(s,"DIV",{class:!0,"data-testid":!0});var a=me(e);u&&u.l(a),a.forEach(Y),this.h()},h(){P(e,"class",t="accordion "+r[0]),P(e,"data-testid","accordion")},m(s,a){Te(s,e,a),u&&u.m(e,null),n=!0},p(s,[a]){u&&u.p&&(!n||a&262144)&&dr(u,i,s,s[18],n?mr(i,s[18],a,null):pr(s[18]),null),(!n||a&1&&t!==(t="accordion "+s[0]))&&P(e,"class",t)},i(s){n||(ye(u,s),n=!0)},o(s){xe(u,s),n=!1},d(s){s&&Y(e),u&&u.d(s)}}}function Jc(r,e,t){let n,i;Ir(r,$o,C=>t(20,i=C));let{$$slots:u={},$$scope:s}=e,{autocollapse:a=!1}=e,{width:o="w-full"}=e,{spacing:l="space-y-1"}=e,{disabled:f=!1}=e,{padding:m="py-2 px-4"}=e,{hover:g="hover:bg-primary-hover-token"}=e,{rounded:d="rounded-container-token"}=e,{caretOpen:y="rotate-180"}=e,{caretClosed:w=""}=e,{regionControl:b=""}=e,{regionPanel:p="space-y-4"}=e,{regionCaret:_=""}=e,{transitions:k=!i}=e,{transitionIn:R=Ls}=e,{transitionInParams:N={duration:200}}=e,{transitionOut:q=Ls}=e,{transitionOutParams:j={duration:200}}=e;const L=Yr(null);return tt("active",L),tt("autocollapse",a),tt("disabled",f),tt("padding",m),tt("hover",g),tt("rounded",d),tt("caretOpen",y),tt("caretClosed",w),tt("regionControl",b),tt("regionPanel",p),tt("regionCaret",_),tt("transitions",k),tt("transitionIn",R),tt("transitionInParams",N),tt("transitionOut",q),tt("transitionOutParams",j),r.$$set=C=>{t(22,e=Kt(Kt({},e),ur(C))),"autocollapse"in C&&t(1,a=C.autocollapse),"width"in C&&t(2,o=C.width),"spacing"in C&&t(3,l=C.spacing),"disabled"in C&&t(4,f=C.disabled),"padding"in C&&t(5,m=C.padding),"hover"in C&&t(6,g=C.hover),"rounded"in C&&t(7,d=C.rounded),"caretOpen"in C&&t(8,y=C.caretOpen),"caretClosed"in C&&t(9,w=C.caretClosed),"regionControl"in C&&t(10,b=C.regionControl),"regionPanel"in C&&t(11,p=C.regionPanel),"regionCaret"in C&&t(12,_=C.regionCaret),"transitions"in C&&t(13,k=C.transitions),"transitionIn"in C&&t(14,R=C.transitionIn),"transitionInParams"in C&&t(15,N=C.transitionInParams),"transitionOut"in C&&t(16,q=C.transitionOut),"transitionOutParams"in C&&t(17,j=C.transitionOutParams),"$$scope"in C&&t(18,s=C.$$scope)},r.$$.update=()=>{t(0,n=`${o} ${l} ${e.class??""}`)},e=ur(e),[n,a,o,l,f,m,g,d,y,w,b,p,_,k,R,N,q,j,s,u]}class Qc extends kt{constructor(e){super(),Dt(this,e,Jc,Yc,wt,{autocollapse:1,width:2,spacing:3,disabled:4,padding:5,hover:6,rounded:7,caretOpen:8,caretClosed:9,regionControl:10,regionPanel:11,regionCaret:12,transitions:13,transitionIn:14,transitionInParams:15,transitionOut:16,transitionOutParams:17})}}function Ri(r,e){const{transition:t,params:n,enabled:i}=e;return i?t(r,n):"duration"in n?t(r,{duration:0}):{duration:0}}const $c=r=>({}),Ms=r=>({}),e0=r=>({}),Us=r=>({}),t0=r=>({}),zs=r=>({}),r0=r=>({}),js=r=>({}),n0=r=>({}),Hs=r=>({});function Ws(r){let e,t;const n=r[30].lead,i=hr(n,r,r[29],Hs);return{c(){e=se("div"),i&&i.c(),this.h()},l(u){e=ae(u,"DIV",{class:!0});var s=me(e);i&&i.l(s),s.forEach(Y),this.h()},h(){P(e,"class","accordion-lead")},m(u,s){Te(u,e,s),i&&i.m(e,null),t=!0},p(u,s){i&&i.p&&(!t||s[0]&536870912)&&dr(i,n,u,u[29],t?mr(n,u[29],s,n0):pr(u[29]),Hs)},i(u){t||(ye(i,u),t=!0)},o(u){xe(i,u),t=!1},d(u){u&&Y(e),i&&i.d(u)}}}function i0(r){let e;return{c(){e=lt("(summary)")},l(t){e=ct(t,"(summary)")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function u0(r){let e,t,n;return{c(){e=se("div"),t=new Jr(!1),this.h()},l(i){e=ae(i,"DIV",{class:!0});var u=me(e);t=Qr(u,!1),u.forEach(Y),this.h()},h(){t.a=null,P(e,"class",n="accordion-summary-caret "+r[11])},m(i,u){Te(i,e,u),t.m(r[14],e)},p(i,u){u[0]&2048&&n!==(n="accordion-summary-caret "+i[11])&&P(e,"class",n)},i:qe,o:qe,d(i){i&&Y(e)}}}function s0(r){let e,t,n,i,u;const s=[o0,a0],a=[];function o(l,f){return l[8]?0:1}return t=o(r),n=a[t]=s[t](r),{c(){e=se("div"),n.c(),this.h()},l(l){e=ae(l,"DIV",{class:!0});var f=me(e);n.l(f),f.forEach(Y),this.h()},h(){P(e,"class",i="accordion-summary-icons "+r[10])},m(l,f){Te(l,e,f),a[t].m(e,null),u=!0},p(l,f){let m=t;t=o(l),t===m?a[t].p(l,f):(ht(),xe(a[m],1,1,()=>{a[m]=null}),dt(),n=a[t],n?n.p(l,f):(n=a[t]=s[t](l),n.c()),ye(n,1),n.m(e,null)),(!u||f[0]&1024&&i!==(i="accordion-summary-icons "+l[10]))&&P(e,"class",i)},i(l){u||(ye(n),u=!0)},o(l){xe(n),u=!1},d(l){l&&Y(e),a[t].d()}}}function a0(r){let e;const t=r[30].iconOpen,n=hr(t,r,r[29],Us),i=n||l0(r);return{c(){i&&i.c()},l(u){i&&i.l(u)},m(u,s){i&&i.m(u,s),e=!0},p(u,s){n&&n.p&&(!e||s[0]&536870912)&&dr(n,t,u,u[29],e?mr(t,u[29],s,e0):pr(u[29]),Us)},i(u){e||(ye(i,u),e=!0)},o(u){xe(i,u),e=!1},d(u){i&&i.d(u)}}}function o0(r){let e;const t=r[30].iconClosed,n=hr(t,r,r[29],zs),i=n||c0(r);return{c(){i&&i.c()},l(u){i&&i.l(u)},m(u,s){i&&i.m(u,s),e=!0},p(u,s){n&&n.p&&(!e||s[0]&536870912)&&dr(n,t,u,u[29],e?mr(t,u[29],s,t0):pr(u[29]),zs)},i(u){e||(ye(i,u),e=!0)},o(u){xe(i,u),e=!1},d(u){i&&i.d(u)}}}function l0(r){let e,t;return{c(){e=new Jr(!1),t=at(),this.h()},l(n){e=Qr(n,!1),t=at(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),Te(n,t,i)},p:qe,d(n){n&&(Y(t),e.d())}}}function c0(r){let e,t;return{c(){e=new Jr(!1),t=at(),this.h()},l(n){e=Qr(n,!1),t=at(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),Te(n,t,i)},p:qe,d(n){n&&(Y(t),e.d())}}}function Gs(r){let e,t,n,i,u,s,a;const o=r[30].content,l=hr(o,r,r[29],Ms),f=l||f0();return{c(){e=se("div"),f&&f.c(),this.h()},l(m){e=ae(m,"DIV",{class:!0,id:!0,role:!0,"aria-hidden":!0,"aria-labelledby":!0});var g=me(e);f&&f.l(g),g.forEach(Y),this.h()},h(){P(e,"class",t="accordion-panel "+r[9]),P(e,"id",n="accordion-panel-"+r[0]),P(e,"role","region"),P(e,"aria-hidden",i=!r[8]),P(e,"aria-labelledby",r[0])},m(m,g){Te(m,e,g),f&&f.m(e,null),a=!0},p(m,g){r=m,l&&l.p&&(!a||g[0]&536870912)&&dr(l,o,r,r[29],a?mr(o,r[29],g,$c):pr(r[29]),Ms),(!a||g[0]&512&&t!==(t="accordion-panel "+r[9]))&&P(e,"class",t),(!a||g[0]&1&&n!==(n="accordion-panel-"+r[0]))&&P(e,"id",n),(!a||g[0]&256&&i!==(i=!r[8]))&&P(e,"aria-hidden",i),(!a||g[0]&1)&&P(e,"aria-labelledby",r[0])},i(m){a||(ye(f,m),m&&Yo(()=>{a&&(s&&s.end(1),u=Jo(e,Ri,{transition:r[4],params:r[5],enabled:r[3]}),u.start())}),a=!0)},o(m){xe(f,m),u&&u.invalidate(),m&&(s=Qo(e,Ri,{transition:r[6],params:r[7],enabled:r[3]})),a=!1},d(m){m&&Y(e),f&&f.d(m),m&&s&&s.end()}}}function f0(r){let e;return{c(){e=lt("(content)")},l(t){e=ct(t,"(content)")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function h0(r){let e,t,n,i,u,s,a,o,l,f,m,g,d,y,w=r[16].lead&&Ws(r);const b=r[30].summary,p=hr(b,r,r[29],js),_=p||i0(),k=[s0,u0],R=[];function N(j,L){return j[16].iconClosed||j[16].iconOpen?0:1}s=N(r),a=R[s]=k[s](r);let q=r[8]&&Gs(r);return{c(){e=se("div"),t=se("button"),w&&w.c(),n=ve(),i=se("div"),_&&_.c(),u=ve(),a.c(),f=ve(),q&&q.c(),this.h()},l(j){e=ae(j,"DIV",{class:!0,"data-testid":!0});var L=me(e);t=ae(L,"BUTTON",{type:!0,class:!0,id:!0,"aria-expanded":!0,"aria-controls":!0});var C=me(t);w&&w.l(C),n=Ee(C),i=ae(C,"DIV",{class:!0});var ue=me(i);_&&_.l(ue),ue.forEach(Y),u=Ee(C),a.l(C),C.forEach(Y),f=Ee(L),q&&q.l(L),L.forEach(Y),this.h()},h(){P(i,"class","accordion-summary flex-1"),P(t,"type","button"),P(t,"class",o="accordion-control "+r[12]),P(t,"id",r[0]),P(t,"aria-expanded",r[8]),P(t,"aria-controls",l="accordion-panel-"+r[0]),t.disabled=r[2],P(e,"class",m="accordion-item "+r[13]),P(e,"data-testid","accordion-item")},m(j,L){Te(j,e,L),Q(e,t),w&&w.m(t,null),Q(t,n),Q(t,i),_&&_.m(i,null),Q(t,u),R[s].m(t,null),Q(e,f),q&&q.m(e,null),g=!0,d||(y=[Ie(t,"click",r[15]),Ie(t,"click",r[31]),Ie(t,"keydown",r[32]),Ie(t,"keyup",r[33]),Ie(t,"keypress",r[34])],d=!0)},p(j,L){j[16].lead?w?(w.p(j,L),L[0]&65536&&ye(w,1)):(w=Ws(j),w.c(),ye(w,1),w.m(t,n)):w&&(ht(),xe(w,1,1,()=>{w=null}),dt()),p&&p.p&&(!g||L[0]&536870912)&&dr(p,b,j,j[29],g?mr(b,j[29],L,r0):pr(j[29]),js);let C=s;s=N(j),s===C?R[s].p(j,L):(ht(),xe(R[C],1,1,()=>{R[C]=null}),dt(),a=R[s],a?a.p(j,L):(a=R[s]=k[s](j),a.c()),ye(a,1),a.m(t,null)),(!g||L[0]&4096&&o!==(o="accordion-control "+j[12]))&&P(t,"class",o),(!g||L[0]&1)&&P(t,"id",j[0]),(!g||L[0]&256)&&P(t,"aria-expanded",j[8]),(!g||L[0]&1&&l!==(l="accordion-panel-"+j[0]))&&P(t,"aria-controls",l),(!g||L[0]&4)&&(t.disabled=j[2]),j[8]?q?(q.p(j,L),L[0]&256&&ye(q,1)):(q=Gs(j),q.c(),ye(q,1),q.m(e,null)):q&&(ht(),xe(q,1,1,()=>{q=null}),dt()),(!g||L[0]&8192&&m!==(m="accordion-item "+j[13]))&&P(e,"class",m)},i(j){g||(ye(w),ye(_,j),ye(a),ye(q),g=!0)},o(j){xe(w),xe(_,j),xe(a),xe(q),g=!1},d(j){j&&Y(e),w&&w.d(),_&&_.d(j),R[s].d(),q&&q.d(),d=!1,ar(y)}}}const d0="",p0="text-start w-full flex items-center space-x-4",Vs="fill-current w-3 transition-transform duration-[200ms]",m0="";function g0(r,e,t){let n,i,u,s,a,o,l,f,m=qe,g=()=>(m(),m=Sc(R,M=>t(28,f=M)),R);r.$$.on_destroy.push(()=>m());let{$$slots:d={},$$scope:y}=e;const w=Zo(d),b=us();let{open:p=!1}=e,{id:_=String(Math.random())}=e,{autocollapse:k=ot("autocollapse")}=e,{active:R=ot("active")}=e;g();let{disabled:N=ot("disabled")}=e,{padding:q=ot("padding")}=e,{hover:j=ot("hover")}=e,{rounded:L=ot("rounded")}=e,{caretOpen:C=ot("caretOpen")}=e,{caretClosed:ue=ot("caretClosed")}=e,{regionControl:ne=ot("regionControl")}=e,{regionPanel:B=ot("regionPanel")}=e,{regionCaret:Z=ot("regionCaret")}=e,{transitions:D=ot("transitions")}=e,{transitionIn:H=ot("transitionIn")}=e,{transitionInParams:ce=ot("transitionInParams")}=e,{transitionOut:W=ot("transitionOut")}=e,{transitionOutParams:pe=ot("transitionOutParams")}=e;const X=` `;function Ae(M){k===!0?R.set(_):t(17,p=!p),V(M)}function V(M){const A=k?f===_:p;b("toggle",{event:M,id:_,panelId:`accordion-panel-${_}`,open:A,autocollapse:k})}k&&p&&Ae();function x(M){Bt.call(this,r,M)}function J(M){Bt.call(this,r,M)}function $(M){Bt.call(this,r,M)}function ie(M){Bt.call(this,r,M)}return r.$$set=M=>{t(37,e=Kt(Kt({},e),ur(M))),"open"in M&&t(17,p=M.open),"id"in M&&t(0,_=M.id),"autocollapse"in M&&t(18,k=M.autocollapse),"active"in M&&g(t(1,R=M.active)),"disabled"in M&&t(2,N=M.disabled),"padding"in M&&t(19,q=M.padding),"hover"in M&&t(20,j=M.hover),"rounded"in M&&t(21,L=M.rounded),"caretOpen"in M&&t(22,C=M.caretOpen),"caretClosed"in M&&t(23,ue=M.caretClosed),"regionControl"in M&&t(24,ne=M.regionControl),"regionPanel"in M&&t(25,B=M.regionPanel),"regionCaret"in M&&t(26,Z=M.regionCaret),"transitions"in M&&t(3,D=M.transitions),"transitionIn"in M&&t(4,H=M.transitionIn),"transitionInParams"in M&&t(5,ce=M.transitionInParams),"transitionOut"in M&&t(6,W=M.transitionOut),"transitionOutParams"in M&&t(7,pe=M.transitionOutParams),"$$scope"in M&&t(29,y=M.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&393216&&p&&k&&Ae(),r.$$.dirty[0]&268828673&&t(8,n=k?f===_:p),t(13,i=`${d0} ${e.class??""}`),r.$$.dirty[0]&20447232&&t(12,u=`${p0} ${q} ${j} ${L} ${ne}`),r.$$.dirty[0]&12583168&&t(27,s=n?C:ue),r.$$.dirty[0]&201326592&&t(11,a=`${Vs} ${Z} ${s}`),r.$$.dirty[0]&67108864&&t(10,o=`${Vs} ${Z}`),r.$$.dirty[0]&36175872&&t(9,l=`${m0} ${q} ${L} ${B}`)},e=ur(e),[_,R,N,D,H,ce,W,pe,n,l,o,a,u,i,X,Ae,w,p,k,q,j,L,C,ue,ne,B,Z,s,f,y,d,x,J,$,ie]}class w0 extends kt{constructor(e){super(),Dt(this,e,g0,h0,wt,{open:17,id:0,autocollapse:18,active:1,disabled:2,padding:19,hover:20,rounded:21,caretOpen:22,caretClosed:23,regionControl:24,regionPanel:25,regionCaret:26,transitions:3,transitionIn:4,transitionInParams:5,transitionOut:6,transitionOutParams:7},null,[-1,-1])}}function y0(r,{from:e,to:t},n={}){const i=getComputedStyle(r),u=i.transform==="none"?"":i.transform,[s,a]=i.transformOrigin.split(" ").map(parseFloat),o=e.left+e.width*s/t.width-(t.left+s),l=e.top+e.height*a/t.height-(t.top+a),{delay:f=0,duration:m=d=>Math.sqrt(d)*120,easing:g=as}=n;return{delay:f,duration:Ac(m)?m(Math.sqrt(o*o+l*l)):m,easing:g,css:(d,y)=>{const w=y*o,b=y*l,p=d+y*e.width/t.width,_=d+y*e.height/t.height;return`transform: ${u} translate(${w}px, ${b}px) scale(${p}, ${_});`}}}function b0(r){let e,t,n;const i=r[15].default,u=hr(i,r,r[14],null);return{c(){e=se("div"),u&&u.c(),this.h()},l(s){e=ae(s,"DIV",{class:!0,"data-testid":!0,role:!0,"aria-labelledby":!0});var a=me(e);u&&u.l(a),a.forEach(Y),this.h()},h(){P(e,"class",t="radio-group "+r[1]),P(e,"data-testid","radio-group"),P(e,"role","radiogroup"),P(e,"aria-labelledby",r[0])},m(s,a){Te(s,e,a),u&&u.m(e,null),n=!0},p(s,[a]){u&&u.p&&(!n||a&16384)&&dr(u,i,s,s[14],n?mr(i,s[14],a,null):pr(s[14]),null),(!n||a&2&&t!==(t="radio-group "+s[1]))&&P(e,"class",t),(!n||a&1)&&P(e,"aria-labelledby",s[0])},i(s){n||(ye(u,s),n=!0)},o(s){xe(u,s),n=!1},d(s){s&&Y(e),u&&u.d(s)}}}const _0="p-1";function v0(r,e,t){let n,{$$slots:i={},$$scope:u}=e,{display:s="inline-flex"}=e,{flexDirection:a="flex-row"}=e,{gap:o="gap-1"}=e,{background:l="bg-surface-200-700-token"}=e,{border:f="border-token border-surface-400-500-token"}=e,{rounded:m="rounded-token"}=e,{padding:g="px-4 py-1"}=e,{active:d="variant-filled"}=e,{hover:y="hover:variant-soft"}=e,{color:w=""}=e,{fill:b=""}=e,{regionLabel:p=""}=e,{labelledby:_=""}=e;return tt("rounded",m),tt("padding",g),tt("active",d),tt("hover",y),tt("color",w),tt("fill",b),tt("regionLabel",p),r.$$set=k=>{t(16,e=Kt(Kt({},e),ur(k))),"display"in k&&t(2,s=k.display),"flexDirection"in k&&t(3,a=k.flexDirection),"gap"in k&&t(4,o=k.gap),"background"in k&&t(5,l=k.background),"border"in k&&t(6,f=k.border),"rounded"in k&&t(7,m=k.rounded),"padding"in k&&t(8,g=k.padding),"active"in k&&t(9,d=k.active),"hover"in k&&t(10,y=k.hover),"color"in k&&t(11,w=k.color),"fill"in k&&t(12,b=k.fill),"regionLabel"in k&&t(13,p=k.regionLabel),"labelledby"in k&&t(0,_=k.labelledby),"$$scope"in k&&t(14,u=k.$$scope)},r.$$.update=()=>{t(1,n=`${_0} ${s} ${a} ${o} ${l} ${f} ${m} ${e.class??""}`)},e=ur(e),[_,n,s,a,o,l,f,m,g,d,y,w,b,p,u,i]}class E0 extends kt{constructor(e){super(),Dt(this,e,v0,b0,wt,{display:2,flexDirection:3,gap:4,background:5,border:6,rounded:7,padding:8,active:9,hover:10,color:11,fill:12,regionLabel:13,labelledby:0})}}function S0(r){let e,t,n,i,u,s,a,o,l,f,m,g=[{type:"radio"},{name:r[1]},{__value:r[2]},r[11](),{tabindex:"-1"}],d={};for(let b=0;b{L=X,t(7,L)})}function pe(){g=this.__value,t(0,g)}return r.$$set=X=>{t(31,e=Kt(Kt({},e),ur(X))),t(30,l=xi(e,o)),"group"in X&&t(0,g=X.group),"name"in X&&t(1,d=X.name),"value"in X&&t(2,y=X.value),"title"in X&&t(3,w=X.title),"label"in X&&t(4,b=X.label),"rounded"in X&&t(12,p=X.rounded),"padding"in X&&t(13,_=X.padding),"active"in X&&t(14,k=X.active),"hover"in X&&t(15,R=X.hover),"color"in X&&t(16,N=X.color),"fill"in X&&t(17,q=X.fill),"regionLabel"in X&&t(5,j=X.regionLabel),"$$scope"in X&&t(20,m=X.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&5&&t(6,n=y===g),r.$$.dirty[0]&245824&&t(19,i=n?`${k} ${N} ${q}`:R),t(18,u=e.disabled?k0:""),t(8,a=`${T0} ${_} ${p} ${i} ${u} ${e.class??""}`)},t(9,s=`${A0}`),e=ur(e),[g,d,y,w,b,j,n,L,a,s,C,ue,p,_,k,R,N,q,u,i,m,f,B,Z,D,H,ce,W,pe,ne]}class Ks extends kt{constructor(e){super(),Dt(this,e,D0,S0,wt,{group:0,name:1,value:2,title:3,label:4,rounded:12,padding:13,active:14,hover:15,color:16,fill:17,regionLabel:5},null,[-1,-1])}}function qs(r){let e,t;const n=r[22].default,i=hr(n,r,r[21],null);return{c(){e=se("div"),i&&i.c(),this.h()},l(u){e=ae(u,"DIV",{class:!0});var s=me(e);i&&i.l(s),s.forEach(Y),this.h()},h(){P(e,"class","slide-toggle-text ml-3")},m(u,s){Te(u,e,s),i&&i.m(e,null),t=!0},p(u,s){i&&i.p&&(!t||s[0]&2097152)&&dr(i,n,u,u[21],t?mr(n,u[21],s,null):pr(u[21]),null)},i(u){t||(ye(i,u),t=!0)},o(u){xe(i,u),t=!1},d(u){u&&Y(e),i&&i.d(u)}}}function C0(r){let e,t,n,i,u,s,a,o,l,f,m,g,d,y,w,b=[{type:"checkbox"},{class:"slide-toggle-input hidden"},{name:r[1]},r[8](),{disabled:i=r[9].disabled}],p={};for(let k=0;k{_=null}),dt()),(!d||R[0]&32&&m!==(m="slide-toggle-label "+k[5]))&&P(t,"class",m),(!d||R[0]&4)&&P(e,"id",k[2]),(!d||R[0]&64&&g!==(g="slide-toggle "+k[6]))&&P(e,"class",g),(!d||R[0]&4)&&P(e,"aria-label",k[2]),(!d||R[0]&1)&&P(e,"aria-checked",k[0])},i(k){d||(ye(_),d=!0)},o(k){xe(_),d=!1},d(k){k&&Y(e),_&&_.d(),y=!1,ar(w)}}}const x0="inline-block",R0="unstyled flex items-center",I0="flex transition-all duration-[200ms] cursor-pointer",F0="w-[50%] h-full scale-[0.8] transition-all duration-[200ms] shadow";function B0(r,e,t){let n,i,u,s,a,o,l,f;const m=["name","checked","size","background","active","border","rounded","label"];let g=xi(e,m),{$$slots:d={},$$scope:y}=e;const w=Zo(d),b=us();let{name:p}=e,{checked:_=!1}=e,{size:k="md"}=e,{background:R="bg-surface-400 dark:bg-surface-700"}=e,{active:N="bg-surface-900 dark:bg-surface-300"}=e,{border:q=""}=e,{rounded:j="rounded-full"}=e,{label:L=""}=e,C;switch(k){case"sm":C="w-12 h-6";break;case"lg":C="w-20 h-10";break;default:C="w-16 h-8"}function ue(V){["Enter","Space"].includes(V.code)&&(V.preventDefault(),b("keyup",V),V.currentTarget.firstChild.click())}function ne(){return delete g.class,g}function B(V){Bt.call(this,r,V)}function Z(V){Bt.call(this,r,V)}function D(V){Bt.call(this,r,V)}function H(V){Bt.call(this,r,V)}function ce(V){Bt.call(this,r,V)}function W(V){Bt.call(this,r,V)}function pe(V){Bt.call(this,r,V)}function X(V){Bt.call(this,r,V)}function Ae(){_=this.checked,t(0,_)}return r.$$set=V=>{t(9,e=Kt(Kt({},e),ur(V))),t(33,g=xi(e,m)),"name"in V&&t(1,p=V.name),"checked"in V&&t(0,_=V.checked),"size"in V&&t(11,k=V.size),"background"in V&&t(12,R=V.background),"active"in V&&t(13,N=V.active),"border"in V&&t(14,q=V.border),"rounded"in V&&t(15,j=V.rounded),"label"in V&&t(2,L=V.label),"$$scope"in V&&t(21,y=V.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&12289&&t(19,n=_?N:`${R} cursor-pointer`),r.$$.dirty[0]&1&&t(18,i=_?"bg-white/75":"bg-white"),r.$$.dirty[0]&1&&t(17,u=_?"translate-x-full":""),t(20,s=e.disabled===!0?"opacity-50":"hover:brightness-[105%] dark:hover:brightness-110 cursor-pointer"),t(6,a=`${x0} ${j} ${s} ${e.class??""}`),r.$$.dirty[0]&638976&&t(4,l=`${I0} ${q} ${j} ${C} ${n}`),r.$$.dirty[0]&425984&&t(3,f=`${F0} ${j} ${i} ${u}`)},t(5,o=`${R0}`),e=ur(e),[_,p,L,f,l,o,a,ue,ne,e,w,k,R,N,q,j,C,u,i,n,s,y,d,B,Z,D,H,ce,W,pe,X,Ae]}class Ti extends kt{constructor(e){super(),Dt(this,e,B0,C0,wt,{name:1,checked:0,size:11,background:12,active:13,border:14,rounded:15,label:2},null,[-1,-1])}}function Xs(r,e,t){const n=r.slice();return n[36]=e[t],n[38]=t,n}function Zs(r){let e,t,n=[],i=new Map,u,s,a,o=Mt(r[11]);const l=f=>f[36];for(let f=0;f{w&&(g&&g.end(1),m=Jo(t,Ri,{transition:e[5],params:{x:e[10].x,y:e[10].y,...e[6]},enabled:e[4]}),m.start())}),w=!0)},o(N){m&&m.invalidate(),g=Qo(t,Ri,{transition:e[7],params:{x:e[10].x,y:e[10].y,...e[8]},enabled:e[4]}),w=!1},d(N){N&&Y(t),_&&_.d(),N&&g&&g.end(),b=!1,ar(p)}}}function N0(r){let e,t,n=r[9].length&&Zs(r);return{c(){n&&n.c(),e=at()},l(i){n&&n.l(i),e=at()},m(i,u){n&&n.m(i,u),Te(i,e,u),t=!0},p(i,u){i[9].length?n?(n.p(i,u),u[0]&512&&ye(n,1)):(n=Zs(i),n.c(),ye(n,1),n.m(e.parentNode,e)):n&&(ht(),xe(n,1,1,()=>{n=null}),dt())},i(i){t||(ye(n),t=!0)},o(i){xe(n),t=!1},d(i){i&&Y(e),n&&n.d(i)}}}const O0="flex fixed top-0 left-0 right-0 bottom-0 pointer-events-none",P0="flex flex-col gap-y-2",L0="flex justify-between items-center pointer-events-auto",M0="flex items-center space-x-2";function U0(r,e,t){let n,i,u,s,a,o;Ir(r,$o,x=>t(34,o=x));const l=il();Ir(r,l,x=>t(9,a=x));let{position:f="b"}=e,{max:m=3}=e,{background:g="variant-filled-secondary"}=e,{width:d="max-w-[640px]"}=e,{color:y=""}=e,{padding:w="p-4"}=e,{spacing:b="space-x-4"}=e,{rounded:p="rounded-container-token"}=e,{shadow:_="shadow-lg"}=e,{zIndex:k="z-[888]"}=e,{buttonAction:R="btn variant-filled"}=e,{buttonDismiss:N="btn-icon btn-icon-sm variant-filled"}=e,{buttonDismissLabel:q="✕"}=e,{transitions:j=!o}=e,{transitionIn:L=Ps}=e,{transitionInParams:C={duration:250}}=e,{transitionOut:ue=Ps}=e,{transitionOutParams:ne={duration:250}}=e,B,Z,D={x:0,y:0};switch(f){case"t":B="justify-center items-start",Z="items-center",D={x:0,y:-100};break;case"b":B="justify-center items-end",Z="items-center",D={x:0,y:100};break;case"l":B="justify-start items-center",Z="items-start",D={x:-100,y:0};break;case"r":B="justify-end items-center",Z="items-end",D={x:100,y:0};break;case"tl":B="justify-start items-start",Z="items-start",D={x:-100,y:0};break;case"tr":B="justify-end items-start",Z="items-end",D={x:100,y:0};break;case"bl":B="justify-start items-end",Z="items-start",D={x:-100,y:0};break;case"br":B="justify-end items-end",Z="items-end",D={x:100,y:0};break}function H(x){a[x]?.action?.response(),l.close(a[x].id)}function ce(x){a[x]?.hoverable&&(l.freeze(x),t(13,i+=" scale-[105%]"))}function W(x){a[x]?.hoverable&&(l.unfreeze(x),t(13,i=i.replace(" scale-[105%]","")))}const pe=x=>H(x),X=x=>l.close(x.id),Ae=x=>ce(x),V=x=>W(x);return r.$$set=x=>{t(35,e=Kt(Kt({},e),ur(x))),"position"in x&&t(19,f=x.position),"max"in x&&t(20,m=x.max),"background"in x&&t(0,g=x.background),"width"in x&&t(21,d=x.width),"color"in x&&t(22,y=x.color),"padding"in x&&t(23,w=x.padding),"spacing"in x&&t(24,b=x.spacing),"rounded"in x&&t(25,p=x.rounded),"shadow"in x&&t(26,_=x.shadow),"zIndex"in x&&t(27,k=x.zIndex),"buttonAction"in x&&t(1,R=x.buttonAction),"buttonDismiss"in x&&t(2,N=x.buttonDismiss),"buttonDismissLabel"in x&&t(3,q=x.buttonDismissLabel),"transitions"in x&&t(4,j=x.transitions),"transitionIn"in x&&t(5,L=x.transitionIn),"transitionInParams"in x&&t(6,C=x.transitionInParams),"transitionOut"in x&&t(7,ue=x.transitionOut),"transitionOutParams"in x&&t(8,ne=x.transitionOutParams)},r.$$.update=()=>{t(14,n=`${O0} ${B} ${k} ${e.class||""}`),r.$$.dirty[0]&545259520&&t(13,i=`${P0} ${Z} ${w}`),r.$$.dirty[0]&132120576&&t(12,u=`${L0} ${d} ${y} ${w} ${b} ${p} ${_}`),r.$$.dirty[0]&1049088&&t(11,s=Array.from(a).slice(0,m))},e=ur(e),[g,R,N,q,j,L,C,ue,ne,a,D,s,u,i,n,l,H,ce,W,f,m,d,y,w,b,p,_,k,B,Z,pe,X,Ae,V]}class z0 extends kt{constructor(e){super(),Dt(this,e,U0,N0,wt,{position:19,max:20,background:0,width:21,color:22,padding:23,spacing:24,rounded:25,shadow:26,zIndex:27,buttonAction:1,buttonDismiss:2,buttonDismissLabel:3,transitions:4,transitionIn:5,transitionInParams:6,transitionOut:7,transitionOutParams:8},null,[-1,-1])}}const j0=!1,r3=Object.freeze(Object.defineProperty({__proto__:null,prerender:j0},Symbol.toStringTag,{value:"Module"}));function di(r){if(!r.endsWith("px"))return;const e=parseFloat(r.slice(0,r.length-2));return isNaN(e)?void 0:e}const ul=r=>r?"height":"width",Xu=r=>window.getComputedStyle(r),Zu=r=>r.getBoundingClientRect(),H0=(r,e=!0)=>{if(r.getPropertyValue("box-sizing")==="border-box")return;const t=di(r.getPropertyValue("border-left-width"));if(t===void 0){console.error("Splitpanes Error: Fail to parse container `border-left-width`.");return}const n=di(r.getPropertyValue("border-top-width"));if(n===void 0){console.error("Splitpanes Error: Fail to parse container `border-top-width`.");return}const i={left:t,top:n};if(e){const u=di(r.getPropertyValue("border-right-width"));if(u===void 0){console.error("Splitpanes Error: Fail to parse container `border-right-width`.");return}const s=di(r.getPropertyValue("border-bottom-width"));if(s===void 0){console.error("Splitpanes Error: Fail to parse container `border-bottom-width`.");return}const a=i;a.right=u,a.bottom=s}return i};function W0(r,e){e||(e=Xu(r));const t=Zu(r),n=H0(e,!0)||{left:0,top:0,right:0,bottom:0};return{width:t.width-n.left-n.right,height:t.height-n.top-n.bottom,left:t.left+n.left,top:t.top+n.top}}const ea=(r,e)=>({left:r.left-e.left,top:r.top-e.top});function ta(r){const e=r,t=r,{clientX:n,clientY:i}="ontouchstart"in window&&t.touches?t.touches[0]:e;return{left:n,top:i}}function ra(r,e,t,n){let i=0;for(let u=e;ut(31,u=te));const Z=Yr(d);Ir(r,Z,te=>t(30,i=te));const D=Yr(void 0);Ir(r,D,te=>t(29,n=te));let H=null,ce=null;tt(sl,{showFirstSplitter:Z,veryFirstPaneKey:D,isHorizontal:B,ssrRegisterPaneSize:void 0,onPaneInit:te=>(n===void 0&&un(D,n=te,n),{undefinedPaneInitSize:0}),clientOnly:{onPaneAdd:pe,onPaneRemove:X}});function pe(te){let ke=-1;Array.from(te.element.parentNode.children).some(De=>(De.className.includes("splitpanes__pane")&&ke++,De===te.element)),ke===0&&un(D,n=te.key,n),ne.splice(ke,0,te);for(let De=0;De{te.isReady=!0,p("pane-add",{index:ke,panes:ee()})});const Be=(De,Ne=!0)=>Se=>{(Ne||te.index>0)&&De(Se,te)};return{onSplitterDown:Be(S,!1),onSplitterClick:Be(I,!1),onSplitterDblClick:Be(F),onPaneClick:Be(Ae),reportGivenSizeChange:Be(V)}}async function X(te){const ke=ne.findIndex(Be=>Be.key===te);if(ke>=0){const Be=ne.splice(ke,1)[0];for(let De=0;De0?ne[0].key:void 0,n),k&&(await z(),p("pane-remove",{removed:Be,panes:ee()}))}}function Ae(te,ke){p("pane-click",ke)}function V(te,ke){ke.setSz(te),z()}Kn(()=>{Ce(),oe();for(let te=0;te{t(6,N=!0)},0)}),ss(()=>{k&&$(),k=!1}),kc(()=>{Ce()});function x(te){if(g==="auto")try{return(te??Xu(_)).direction==="rtl"}catch{}return g===!0}function J(){document.body.style.cursor=B?"col-resize":"row-resize",document.addEventListener("mousemove",G,{passive:!1}),document.addEventListener("mouseup",U),"ontouchstart"in window&&(document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",U))}function $(){document.body.style.cursor="",document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",U),"ontouchstart"in window&&(document.removeEventListener("touchmove",G),document.removeEventListener("touchend",U))}const ie=te=>te.nodeType===Node.ELEMENT_NODE&&te.classList.contains("splitpanes__splitter");function M(te,ke,Be){let De=te[l?"top":"left"];return Be&&!l&&(De=ke-De),De}const A=()=>ul(l);function S(te,ke){t(7,q=!0),L=ke.index,ke.setSplitterActive(!0);let De=ke.element;for(;De!=null&&(De=De.previousSibling,!ie(De)););if(De==null){console.error("Splitpane Error: Active splitter wasn't found!");return}H=De;const Ne=ta(te),Se=Zu(H);ce=M(ea(Ne,Se),Se[A()],x()),J()}function G(te){if(q){te.preventDefault(),t(8,j=!0);const ke=ta(te),Be=Xu(_),De=W0(_,Be),Ne=De[A()],Se=x(Be),Re=ea(ke,De),Pe=M(Re,Ne,Se);re(Pe,Ne),p("resize",ee())}}function U(){j&&p("resized",ee()),t(7,q=!1),ne[L].setSplitterActive(!1),setTimeout(()=>{t(8,j=!1),$()},100)}function I(te,ke){if("ontouchstart"in window){te.preventDefault();const Be=ke.index;m&&(C===Be?(ue&&clearTimeout(ue),ue=null,F(te,ke),C=-1):(C=Be,ue=setTimeout(()=>{C=-1},500)))}j||p("splitter-click",ke)}function F(te,ke){if(m){const Be=ke.index;let De=0;for(let Re=0;Re=100)for(let Re=0;Re{const Ke=ze.min(),$e=ze.max(),et=Math.min(Math.max(0,Re),$e-Ke);ze.setSz(Ke+et),Re-=et};for(let ze=Be-1;ze>=0;ze--)Pe(ne[ze]);for(let ze=Be+1;zene.map(te=>({min:te.min(),max:te.max(),size:te.sz(),snap:te.snap()}));function v(te,ke){const Be=$e=>Zu($e)[A()],De=Be(H);let Ne=0,Se=H.previousSibling;for(;Se!=null;)ie(Se)&&(Ne+=Be(Se)),Se=Se.previousSibling;let Re=0,Pe=H.nextSibling;for(;Pe!=null;)ie(Pe)&&(Re+=Be(Pe)),Pe=Pe.nextSibling;const ze=Ne+ce,Ke=Ne+De+Re;return(te-ze)/(ke-Ke)*100}function re(te,ke){let Be=L-1,De=ne[Be],Ne=L,Se=ne[Ne],Re={prevPanesSize:h(Be),nextPanesSize:E(Ne),prevReachedMinPanes:0,nextReachedMinPanes:0};const Pe=0+(f?0:Re.prevPanesSize),ze=100-(f?0:Re.nextPanesSize),Ke=Math.max(Math.min(v(te,ke),ze),Pe),$e=Re.prevPanesSize+De.min()+De.snap(),et=100-(Re.nextPanesSize+Se.min()+Se.snap());let We=Ke,pt=!1;Ke<=$e?Ke>Re.prevPanesSize+De.min()&&(We=Math.max(De.min()+Re.prevPanesSize,100-(Se.max()+Re.nextPanesSize)),pt=!0):Ke>=et&&Ke<100-Re.nextPanesSize-Se.min()&&(We=Math.min(100-(Se.min()+Re.nextPanesSize),De.max()+Re.prevPanesSize),pt=!0);const Ut=De.max()<100&&We>=De.max()+Re.prevPanesSize,Qt=Se.max()<100&&We<=100-(Se.max()+Re.nextPanesSize);if(Ut||Qt)Ut?(De.setSz(De.max()),Se.setSz(Math.max(100-De.max()-Re.prevPanesSize-Re.nextPanesSize,0))):(De.setSz(Math.max(100-Se.max()-Re.prevPanesSize-Re.nextPanesSize,0)),Se.setSz(Se.max()));else{if(f&&!pt){const Zt=T(Re,We);if(!Zt)return;({sums:Re,paneBeforeIndex:Be,paneAfterIndex:Ne}=Zt),De=ne[Be],Se=ne[Ne]}Be!=null&&De.setSz(Math.min(Math.max(We-Re.prevPanesSize-Re.prevReachedMinPanes,De.min()),De.max())),Ne!=null&&Se.setSz(Math.min(Math.max(100-We-Re.nextPanesSize-Re.nextReachedMinPanes,Se.min()),Se.max()))}}function T(te,ke){const Be=L-1;let De=Be,Ne=Be+1;if(ke{Se.setSz(Se.min()),te.prevReachedMinPanes+=Se.min()}),te.prevPanesSize=h(De),De==null))return te.prevReachedMinPanes=0,ne[0].setSz(ne[0].min()),pi(ne,1,Be+1,Se=>{Se.setSz(Se.min()),te.prevReachedMinPanes+=Se.min()}),ne[Ne].setSz(100-te.prevReachedMinPanes-ne[0].min()-te.prevPanesSize-te.nextPanesSize),null;if(ke>100-te.nextPanesSize-ne[Ne].min()){Ne=K(Be)?.index,te.nextReachedMinPanes=0,Ne>Be+1&&pi(ne,Be+1,Ne,Re=>{Re.setSz(Re.min()),te.nextReachedMinPanes+=Re.min()}),te.nextPanesSize=E(Ne);const Se=ne.length;if(Ne==null)return te.nextReachedMinPanes=0,ne[Se-1].setSz(ne[Se-1].min()),pi(ne,Be+1,Se-1,Re=>{Re.setSz(Re.min()),te.nextReachedMinPanes+=Re.min()}),ne[De].setSz(100-te.prevPanesSize-te.nextReachedMinPanes-ne[Se-1].min()-te.nextPanesSize),null}return{sums:te,paneBeforeIndex:De,paneAfterIndex:Ne}}const c=te=>te.sz(),h=te=>ra(ne,0,te,c),E=te=>ra(ne,te+1,ne.length,c),O=te=>[...ne].reverse().find(ke=>ke.indexke.min()),K=te=>ne.find(ke=>ke.index>te+1&&ke.sz()>ke.min());async function z(){R=!0,await Dc(),R&&(oe(),R=!1)}function oe(){we(),k&&p("resized",ee())}function we(){if(ne.length===0)return;const te=ne.length;let ke=100,Be=0,De=0,Ne=0,Se=[],Re=[];for(let et=0;et=We.max()&&Se.push(We),pt<=We.min()&&Re.push(We)):De+=1:(ke-=pt,Be++,Se.push(We),Re.push(We))}const Pe=te-Be,ze=Pe-De;let Ke,$e;if(ze>0?(Ke=Ne/ze,Ke>.1&&ke>.1?(Ne+=De*Ke,$e=ke/Ne):(Ke=0,$e=1)):(Ke=ke/Pe,$e=1),ke+Ne>.1){ke=100;for(let et=0;et.1&&(ke=de(ke,Se,Re))}isFinite(ke)?Math.abs(ke)>.1&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints."):console.warn("Splitpanes: Internal error, sizes might be NaN as a result.")}function de(te,ke,Be){const Ne=ne.length-(te>0?ke.length:Be.length);if(Ne<=0)return te;const Se=te/Ne;if(ne.length===1)ne[0].setSz(100),te=0;else for(let Re=0;Re0&&!ke.includes(Pe)){const Ke=Math.max(Math.min(ze+Se,Pe.max()),Pe.min()),$e=Ke-ze;te-=$e,Pe.setSz(Ke)}else if(!Be.includes(Pe)){const Ke=Math.max(Math.min(ze+Se,Pe.max()),Pe.min()),$e=Ke-ze;te-=$e,Pe.setSz(Ke)}}return te}function Ce(){const{children:te}=_;let ke=0,Be=!1;for(let De=0;De elements are allowed at the root of . One of your DOM nodes was removed.");return}else Se&&(!Be&&ne[ke].element!==Ne&&(Be=!0),ke++)}if(Be){const De=[];for(let Ne=0;Neze.element===Se);Pe!=null?(Pe.index=De.length,De.push(Pe)):console.warn("Splitpanes: Internal error - found a elements which isn't tracked.")}}ne=De,un(D,n=ne.length>0?ne[0].key:void 0,n)}}function Fe(te){Ge[te?"unshift":"push"](()=>{_=te,t(5,_)})}return r.$$set=te=>{"id"in te&&t(0,o=te.id),"horizontal"in te&&t(1,l=te.horizontal),"pushOtherPanes"in te&&t(12,f=te.pushOtherPanes),"dblClickSplitter"in te&&t(13,m=te.dblClickSplitter),"rtl"in te&&t(14,g=te.rtl),"firstSplitter"in te&&t(15,d=te.firstSplitter),"style"in te&&t(2,y=te.style),"theme"in te&&t(3,w=te.theme),"class"in te&&t(4,b=te.class),"$$scope"in te&&t(18,a=te.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&2&&un(B,u=l,u),r.$$.dirty[0]&32768&&un(Z,i=d,i)},[o,l,y,w,b,_,N,q,j,B,Z,D,f,m,g,d,s,Fe,a]}class K0 extends kt{constructor(e){super(),Dt(this,e,V0,G0,wt,{id:0,horizontal:1,pushOtherPanes:12,dblClickSplitter:13,rtl:14,firstSplitter:15,style:2,theme:3,class:4},null,[-1,-1,-1])}}const q0=(r,e)=>t=>{const n=r();n?.[e](t)},X0=r=>q0.bind(null,r);function Z0(r){let e,t,n,i,u,s,a=(r[4]!==r[9]||r[5])&&na(r);const o=r[20].default,l=hr(o,r,r[19],null);return{c(){a&&a.c(),e=ve(),t=se("div"),l&&l.c(),this.h()},l(f){a&&a.l(f),e=Ee(f),t=ae(f,"DIV",{class:!0,style:!0});var m=me(t);l&&l.l(m),m.forEach(Y),this.h()},h(){P(t,"class",n=`splitpanes__pane ${r[0]||""}`),P(t,"style",r[3])},m(f,m){a&&a.m(f,m),Te(f,e,m),Te(f,t,m),l&&l.m(t,null),r[21](t),i=!0,u||(s=Ie(t,"click",r[11]("onPaneClick")),u=!0)},p(f,m){f[4]!==f[9]||f[5]?a?a.p(f,m):(a=na(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),l&&l.p&&(!i||m&524288)&&dr(l,o,f,f[19],i?mr(o,f[19],m,null):pr(f[19]),null),(!i||m&1&&n!==(n=`splitpanes__pane ${f[0]||""}`))&&P(t,"class",n),(!i||m&8)&&P(t,"style",f[3])},i(f){i||(ye(l,f),i=!0)},o(f){xe(l,f),i=!1},d(f){f&&(Y(e),Y(t)),a&&a.d(f),l&&l.d(f),r[21](null),u=!1,s()}}}function na(r){let e,t,n,i;return{c(){e=se("div"),this.h()},l(u){e=ae(u,"DIV",{class:!0}),me(e).forEach(Y),this.h()},h(){P(e,"class",t="splitpanes__splitter "+(r[2]?"splitpanes__splitter__active":""))},m(u,s){Te(u,e,s),n||(i=[Ie(e,"mousedown",r[11]("onSplitterDown")),Ie(e,"touchstart",r[11]("onSplitterDown")),Ie(e,"click",r[11]("onSplitterClick")),Ie(e,"dblclick",r[11]("onSplitterDblClick"))],n=!0)},p(u,s){s&4&&t!==(t="splitpanes__splitter "+(u[2]?"splitpanes__splitter__active":""))&&P(e,"class",t)},d(u){u&&Y(e),n=!1,ar(i)}}}function Y0(r){let e,t,n=!r[10]&&Z0(r);return{c(){n&&n.c(),e=at()},l(i){n&&n.l(i),e=at()},m(i,u){n&&n.m(i,u),Te(i,e,u),t=!0},p(i,[u]){i[10]||n.p(i,u)},i(i){t||(ye(n),t=!0)},o(i){xe(n),t=!1},d(i){i&&Y(e),n&&n.d(i)}}}function J0(r,e,t){let n,i,u,s,a,{$$slots:o={},$$scope:l}=e;const{ssrRegisterPaneSize:f,onPaneInit:m,clientOnly:g,isHorizontal:d,showFirstSplitter:y,veryFirstPaneKey:w}=ot(sl);Ir(r,d,H=>t(18,u=H)),Ir(r,y,H=>t(5,a=H)),Ir(r,w,H=>t(4,s=H));let{size:b=null}=e,{minSize:p=0}=e,{maxSize:_=100}=e,{snapSize:k=0}=e,{class:R=""}=e;const N={},q=!el,{undefinedPaneInitSize:j}=m(N);let L,C=b??j,ue=!1,ne;const B=X0(()=>ne),Z=H=>{H!=C&&B("reportGivenSizeChange")(H)};Kn(()=>{const H={key:N,element:L,givenSize:b,sz:()=>C,setSz:ce=>{t(16,C=ce),b!=null&&b!=C&&t(12,b=C)},min:()=>p,max:()=>_,snap:()=>k,setSplitterActive:ce=>{t(2,ue=ce)},isReady:!1};ne=g.onPaneAdd(H)}),ss(()=>{g.onPaneRemove(N)});function D(H){Ge[H?"unshift":"push"](()=>{L=H,t(1,L)})}return r.$$set=H=>{"size"in H&&t(12,b=H.size),"minSize"in H&&t(13,p=H.minSize),"maxSize"in H&&t(14,_=H.maxSize),"snapSize"in H&&t(15,k=H.snapSize),"class"in H&&t(0,R=H.class),"$$scope"in H&&t(19,l=H.$$scope)},r.$$.update=()=>{r.$$.dirty&4096&&b!=null&&Z(b),r.$$.dirty&262144&&t(17,n=ul(u)),r.$$.dirty&196608&&t(3,i=`${n}: ${C}%;`)},[R,L,ue,i,s,a,d,y,w,N,q,B,b,p,_,k,C,n,u,l,o,D]}class ia extends kt{constructor(e){super(),Dt(this,e,J0,Y0,wt,{size:12,minSize:13,maxSize:14,snapSize:15,class:0})}}function Q0(r){let e,t,n,i,u,s,a;return{c(){e=Gt("svg"),t=Gt("circle"),n=Gt("animate"),i=Gt("circle"),u=Gt("animate"),s=Gt("circle"),a=Gt("animate"),this.h()},l(o){e=Vt(o,"svg",{version:!0,id:!0,xmlns:!0,"xmlns:xlink":!0,x:!0,y:!0,viewBox:!0,"enable-background":!0,"xml:space":!0});var l=me(e);t=Vt(l,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var f=me(t);n=Vt(f,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),me(n).forEach(Y),f.forEach(Y),i=Vt(l,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var m=me(i);u=Vt(m,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),me(u).forEach(Y),m.forEach(Y),s=Vt(l,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var g=me(s);a=Vt(g,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),me(a).forEach(Y),g.forEach(Y),l.forEach(Y),this.h()},h(){P(n,"attributeName","opacity"),P(n,"dur","1s"),P(n,"values","0;1;0"),P(n,"repeatCount","indefinite"),P(n,"begin","0.1"),P(t,"fill","#1976d2"),P(t,"stroke","none"),P(t,"cx","6"),P(t,"cy","50"),P(t,"r","6"),P(u,"attributeName","opacity"),P(u,"dur","1s"),P(u,"values","0;1;0"),P(u,"repeatCount","indefinite"),P(u,"begin","0.2"),P(i,"fill","#1976d2"),P(i,"stroke","none"),P(i,"cx","26"),P(i,"cy","50"),P(i,"r","6"),P(a,"attributeName","opacity"),P(a,"dur","1s"),P(a,"values","0;1;0"),P(a,"repeatCount","indefinite"),P(a,"begin","0.3"),P(s,"fill","#1976d2"),P(s,"stroke","none"),P(s,"cx","46"),P(s,"cy","50"),P(s,"r","6"),P(e,"version","1.1"),P(e,"id","L4"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),P(e,"x","0px"),P(e,"y","0px"),P(e,"viewBox","0 0 100 100"),P(e,"enable-background","new 0 0 0 0"),P(e,"xml:space","preserve")},m(o,l){Te(o,e,l),Q(e,t),Q(t,n),Q(e,i),Q(i,u),Q(e,s),Q(s,a)},p:qe,i:qe,o:qe,d(o){o&&Y(e)}}}function $0(r,e,t){let{size:n=20}=e;return r.$$set=i=>{"size"in i&&t(0,n=i.size)},[n]}class ef extends kt{constructor(e){super(),Dt(this,e,$0,Q0,wt,{size:0})}}function tf(r){let e,t,n,i,u;return{c(){e=se("div"),t=Gt("svg"),n=Gt("circle"),i=ve(),u=lt(r[2]),this.h()},l(s){e=ae(s,"DIV",{class:!0});var a=me(e);t=Vt(a,"svg",{class:!0,viewBox:!0,xmlns:!0});var o=me(t);n=Vt(o,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),me(n).forEach(Y),o.forEach(Y),i=Ee(a),u=ct(a,r[2]),a.forEach(Y),this.h()},h(){P(n,"cx","10"),P(n,"cy","10"),P(n,"r","5"),P(n,"fill",r[0]),Jt(n,"filter","drop-shadow(0 0 1px "+r[1]+")"),P(t,"class","dot svelte-a20mi8"),P(t,"viewBox","0 0 20 20"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(e,"class","llm-health-status svelte-a20mi8")},m(s,a){Te(s,e,a),Q(e,t),Q(t,n),Q(e,i),Q(e,u)},p(s,[a]){a&1&&P(n,"fill",s[0]),a&2&&Jt(n,"filter","drop-shadow(0 0 1px "+s[1]+")"),a&4&&Xt(u,s[2])},i:qe,o:qe,d(s){s&&Y(e)}}}function rf(r,e,t){let{status:n="unknown"}=e,i="",u="",s="";switch(n){case"ok":i="#4CAF50",u="rgba(0, 128, 0, 0.7)",s="Сервис LLM работает";break;case"error":s="Сервис LLM не работает";break;case"loading model":i="yellow",u="rgba(255, 255, 0, 0.7)",s="Сервис LLM запускается...";break;case"unavailable":i="#af4f4c",u="#af4f4c",s="Сервис LLM не запущен";break;case"unknown":i="#af4f4c",u="#af4f4c",s="Сервис LLM недоступен";break}return r.$$set=a=>{"status"in a&&t(3,n=a.status)},[i,u,s,n]}class nf extends kt{constructor(e){super(),Dt(this,e,rf,tf,wt,{status:3})}}function uf(r){let e,t,n,i,u;return{c(){e=se("div"),t=Gt("svg"),n=Gt("circle"),i=ve(),u=lt(r[2]),this.h()},l(s){e=ae(s,"DIV",{class:!0});var a=me(e);t=Vt(a,"svg",{class:!0,viewBox:!0,xmlns:!0});var o=me(t);n=Vt(o,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),me(n).forEach(Y),o.forEach(Y),i=Ee(a),u=ct(a,r[2]),a.forEach(Y),this.h()},h(){P(n,"cx","10"),P(n,"cy","10"),P(n,"r","5"),P(n,"fill",r[0]),Jt(n,"filter","drop-shadow(0 0 1px "+r[1]+")"),P(t,"class","dot svelte-1wcf73j"),P(t,"viewBox","0 0 20 20"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(e,"class","llm-health-status svelte-1wcf73j")},m(s,a){Te(s,e,a),Q(e,t),Q(t,n),Q(e,i),Q(e,u)},p(s,[a]){a&1&&P(n,"fill",s[0]),a&2&&Jt(n,"filter","drop-shadow(0 0 1px "+s[1]+")"),a&4&&Xt(u,s[2])},i:qe,o:qe,d(s){s&&Y(e)}}}function sf(r,e,t){let{status:n="unavailable"}=e,i="",u="",s="";switch(n){case"ok":i="#4CAF50",u="rgba(0, 128, 0, 0.7)",s="Поиск работает";break;case"unavailable":i="#af4f4c",u="#af4f4c",s="Поиск не запущен";break;case"unknown":i="#af4f4c",u="#af4f4c",s="Поиск недоступен";break}return r.$$set=a=>{"status"in a&&t(3,n=a.status)},[i,u,s,n]}class af extends kt{constructor(e){super(),Dt(this,e,sf,uf,wt,{status:3})}}function of(r){let e,t,n,i,u,s="Сохранить",a,o,l="Сбросить",f,m;return{c(){e=se("div"),t=se("div"),n=se("textarea"),i=ve(),u=se("button"),u.textContent=s,a=ve(),o=se("button"),o.textContent=l,this.h()},l(g){e=ae(g,"DIV",{class:!0});var d=me(e);t=ae(d,"DIV",{class:!0});var y=me(t);n=ae(y,"TEXTAREA",{class:!0}),me(n).forEach(Y),i=Ee(y),u=ae(y,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(u)!=="svelte-g0hhac"&&(u.textContent=s),a=Ee(y),o=ae(y,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(o)!=="svelte-16kemh0"&&(o.textContent=l),y.forEach(Y),d.forEach(Y),this.h()},h(){P(n,"class","svelte-sfudwy"),P(u,"class","svelte-sfudwy"),P(o,"class","svelte-sfudwy"),P(t,"class","popup svelte-sfudwy"),P(e,"class","modal svelte-sfudwy")},m(g,d){Te(g,e,d),Q(e,t),Q(t,n),ir(n,r[0]),Q(t,i),Q(t,u),Q(t,a),Q(t,o),f||(m=[Ie(n,"input",r[6]),Ie(u,"click",r[1]),Ie(o,"click",r[2])],f=!0)},p(g,[d]){d&1&&ir(n,g[0])},i:qe,o:qe,d(g){g&&Y(e),f=!1,ar(m)}}}let lf='Ты бухгалтер. Ты отвечаешь на русском языке. Ты всегда следуешь моим инструкциям. Ты отвечаешь на вопросы клиентов. Чтобы ответить, ты обязательно используешь только "источники", которые я тебе предоставляю. Ты используешь только официально-деловой стиль и необходимую терминологию. Соблюдай этические нормы. При ответе на вопрос ты используешь только такой формат ответа: 1) Четкий и краткий ответ на поставленный вопрос. Ты можешь начать свой ответ так: "По Вашему вопросу сообщаем...". Используй по возможности слова: да, можно, нет, нельзя. 2) Обоснование (ты используешь для обоснования "источники". Ты используешь только "источники" для поиска необходимых "законов", "статей", "пунктов" и "подпунктов" для ответа на вопрос пользователя). 3) Аргументация (Ты используешь только "источники" для поиска необходимых "писем" и "судебных решений", чтобы аргументировать свой ответ)." 4) Заключение (ты подводишь итоги всего, что сказал выше. Избегай повторения и сложных конструкций). Если в источниках нельзя найти подходящую информацию для ответа, ты отвечаешь так: "Мы не можем ответить на данный вопрос. Обратитесь к специалисту." Вопрос: {{ВОПРОС}} Источники: {{ИСТОЧНИКИ}}';function cf(r,e,t){let{onSave:n}=e,{onClose:i}=e,{text:u=""}=e,s=u;function a(){n(s),i()}function o(){t(0,s=lf)}function l(){s=this.value,t(0,s)}return r.$$set=f=>{"onSave"in f&&t(3,n=f.onSave),"onClose"in f&&t(4,i=f.onClose),"text"in f&&t(5,u=f.text)},[s,a,o,n,i,u,l]}class ff extends kt{constructor(e){super(),Dt(this,e,cf,of,wt,{onSave:3,onClose:4,text:5})}}class Yt{static findDateInText(e){const t=/\b\d{1,2}\.\d{1,2}\.\d{4}\b/g,n=e.match(t);if(n&&n.length>0){const i=n[0],[u,s,a]=i.split(".").map(Number);return new Date(a,s-1,u)}return null}static sortByRelevanceAndDate(e){return e.sort((t,n)=>{const i=n.relevance-t.relevance;if(i!==0)return i;const u=Yt.findDateInText(t.title),s=Yt.findDateInText(n.title);return u&&s?s.getTime()-u.getTime():u?-1:s?1:0})}static sortByDate(e){const t=e.filter(a=>Yt.findDateInText(a.title)),n=e.filter(a=>!Yt.findDateInText(a.title)),i=t.sort((a,o)=>{const l=Yt.findDateInText(a.title),f=Yt.findDateInText(o.title);return l&&f?f.getTime()-l.getTime():l?-1:f?1:0}),u=[];let s=0;for(const a of e)if(Yt.findDateInText(a.title)){let o=i.shift();o&&u.push(o)}else u.push(n[s]),s++;return u}static sortByRelevance(e){return e.sort((t,n)=>t.relevance&&n.relevance?n.relevance-t.relevance:t.relevance?-1:n.relevance?1:0)}static identifyDocumentType(e){const t=[{regexp:/(ФАС |АС |КС |ВС |[Сс]удебн|[Сс]уд)|(\(Судебный документ\))/,docType:"Решение суда"},{regexp:/[Пп]исьмо [Мм]инфина/,docType:"Письмо Минфина"},{regexp:/[Пп]исьмо (ФНС|фнс)/,docType:"Письмо ФНС"},{regexp:/(НКРФ)|(НК РФ)/,docType:"Налоговый кодекс"},{regexp:/(ГКРФ)|(ГК РФ)/,docType:"Гражданский кодекс"},{regexp:/(ТКРФ)|(ТК РФ)/,docType:"Трудовой кодекс"},{regexp:/Приказ ФНС РФ/,docType:"Приказ ФНС РФ"},{regexp:/Постановление Правительства РФ/,docType:"Постановление Правительства РФ"},{regexp:/Решение Коллегии Евразийской экономической комиссии/,docType:"Решение Коллегии ЕЭК"},{regexp:/Федеральный закон/,docType:"Федеральные законы"},{regexp:/\(Внутренний документ\)/,docType:"Внутренние документы"}];return e.map(n=>{for(const{regexp:i,docType:u}of t)if(i.test(n.title))return n.docType=u,n;return n.docType="Другие документы",n})}static mergeResultsByTitle(e){const t=/(ст\.\d+)\s(НКРФ|НК РФ|ГКРФ|ГК РФ|ТКРФ|ТК РФ)$/,n={},i=[],u=s=>{const a=s.match(t);return a?a[0]:null};return e.forEach(s=>{const a=u(s.title);if(a)if(n[a]){n[a].relevance=Math.max(n[a].relevance,s.relevance);const o=n[a].title.match(/п[\w\.]+/g)||[],l=s.title.match(/п[\w\.]+/g)||[],f=[...new Set([...o,...l])].join(", ");n[a].title=`${f} ст.${a.split(" ")[0].split(".")[1]} ${a.split(" ")[1]}`,n[a].text+=` ${s.title} ${s.text}`}else n[a]={...s};else i.push(s)}),Object.keys(n).forEach(s=>{i.push(n[s])}),i}}function ua(r,e,t){const n=r.slice();return n[13]=e[t],n}function sa(r){let e,t,n;return{c(){e=se("input"),this.h()},l(i){e=ae(i,"INPUT",{type:!0}),this.h()},h(){P(e,"type","checkbox")},m(i,u){Te(i,e,u),e.checked=r[1][r[3]],t||(n=Ie(e,"change",r[10]),t=!0)},p(i,u){u&10&&(e.checked=i[1][i[3]])},d(i){i&&Y(e),t=!1,n()}}}function hf(r){let e,t;return{c(){e=se("div"),t=lt(r[4]),this.h()},l(n){e=ae(n,"DIV",{class:!0});var i=me(e);t=ct(i,r[4]),i.forEach(Y),this.h()},h(){P(e,"class","annotation svelte-1srbk6k")},m(n,i){Te(n,e,i),Q(e,t)},p(n,i){i&16&&Xt(t,n[4])},d(n){n&&Y(e)}}}function df(r){let e,t=Mt(r[5].split(` `)),n=[];for(let i=0;i100&&la(r);return{c(){e=se("div"),t=se("div"),n=se("label"),l&&l.c(),i=ve(),u=lt(r[3]),s=ve(),g.c(),a=ve(),d&&d.c(),o=ve(),y&&y.c(),this.h()},l(w){e=ae(w,"DIV",{class:!0});var b=me(e);t=ae(b,"DIV",{class:!0});var p=me(t);n=ae(p,"LABEL",{style:!0});var _=me(n);l&&l.l(_),i=Ee(_),u=ct(_,r[3]),_.forEach(Y),p.forEach(Y),s=Ee(b),g.l(b),a=Ee(b),d&&d.l(b),o=Ee(b),y&&y.l(b),b.forEach(Y),this.h()},h(){Jt(n,"cursor","pointer"),P(t,"class","title svelte-1srbk6k"),P(e,"class","search-result svelte-1srbk6k")},m(w,b){Te(w,e,b),Q(e,t),Q(t,n),l&&l.m(n,null),Q(n,i),Q(n,u),Q(e,s),g.m(e,null),Q(e,a),d&&d.m(e,null),Q(e,o),y&&y.m(e,null)},p(w,[b]){w[8]?l?l.p(w,b):(l=sa(w),l.c(),l.m(n,i)):l&&(l.d(1),l=null),b&8&&Xt(u,w[3]),m===(m=f(w))&&g?g.p(w,b):(g.d(1),g=m(w),g&&(g.c(),g.m(e,a))),w[6]&&w[7]?d?d.p(w,b):(d=oa(w),d.c(),d.m(e,o)):d&&(d.d(1),d=null),w[5].length>100?y?y.p(w,b):(y=la(w),y.c(),y.m(e,null)):y&&(y.d(1),y=null)},i:qe,o:qe,d(w){w&&Y(e),l&&l.d(),g.d(),d&&d.d(),y&&y.d()}}}function wf(r,e,t){let{showFullText:n=Array(10).fill(!1)}=e,{useSearchResult:i}=e,{index:u}=e,{title:s}=e,{teaser:a}=e,{text:o}=e,{enableDocumentDb:l=!1}=e,{documentDbUrl:f=""}=e,{enableSearchResultSelection:m=!1}=e;function g(b){t(0,n[b]=!n[b],n)}function d(){i[s]=this.checked,t(1,i)}const y=()=>g(u),w=()=>g(u);return r.$$set=b=>{"showFullText"in b&&t(0,n=b.showFullText),"useSearchResult"in b&&t(1,i=b.useSearchResult),"index"in b&&t(2,u=b.index),"title"in b&&t(3,s=b.title),"teaser"in b&&t(4,a=b.teaser),"text"in b&&t(5,o=b.text),"enableDocumentDb"in b&&t(6,l=b.enableDocumentDb),"documentDbUrl"in b&&t(7,f=b.documentDbUrl),"enableSearchResultSelection"in b&&t(8,m=b.enableSearchResultSelection)},[n,i,u,s,a,o,l,f,m,g,d,y,w]}class al extends kt{constructor(e){super(),Dt(this,e,wf,gf,wt,{showFullText:0,useSearchResult:1,index:2,title:3,teaser:4,text:5,enableDocumentDb:6,documentDbUrl:7,enableSearchResultSelection:8})}}function ca(r,e,t){const n=r.slice();return n[22]=e[t].title,n[23]=e[t].text,n[24]=e[t].teaser,n[26]=t,n}function fa(r,e,t){const n=r.slice();return n[18]=e[t][0],n[19]=e[t][1],n}function ha(r,e,t){const n=r.slice();return n[22]=e[t].title,n[23]=e[t].text,n[24]=e[t].teaser,n[26]=t,n}function da(r){let e,t,n,i="Сортировать по:",u,s,a,o,l,f;s=new E0({props:{background:"",border:"",$$slots:{default:[_f]},$$scope:{ctx:r}}});function m(d){r[12](d)}let g={name:"groupByChecked",size:"sm",label:"Группировать по типу",$$slots:{default:[vf]},$$scope:{ctx:r}};return r[6]!==void 0&&(g.checked=r[6]),o=new Ti({props:g}),Ge.push(()=>Je(o,"checked",m)),{c(){e=se("div"),t=se("div"),n=se("label"),n.textContent=i,u=ve(),rt(s.$$.fragment),a=ve(),rt(o.$$.fragment),this.h()},l(d){e=ae(d,"DIV",{class:!0});var y=me(e);t=ae(y,"DIV",{class:!0,style:!0});var w=me(t);n=ae(w,"LABEL",{style:!0,class:!0,"data-svelte-h":!0}),Ve(n)!=="svelte-12wnwfn"&&(n.textContent=i),u=Ee(w),nt(s.$$.fragment,w),a=Ee(w),nt(o.$$.fragment,w),w.forEach(Y),y.forEach(Y),this.h()},h(){Jt(n,"display","inline-block"),Jt(n,"flex-wrap","wrap"),P(n,"class","svelte-1ptibtq"),P(t,"class","card w-full flex p-2 space-y-2"),Jt(t,"align-items","center"),Jt(t,"flex-wrap","wrap"),P(e,"class","settings-bar svelte-1ptibtq")},m(d,y){Te(d,e,y),Q(e,t),Q(t,n),Q(t,u),it(s,t,null),Q(t,a),it(o,t,null),f=!0},p(d,y){const w={};y&268435584&&(w.$$scope={dirty:y,ctx:d}),s.$set(w);const b={};y&268435456&&(b.$$scope={dirty:y,ctx:d}),!l&&y&64&&(l=!0,b.checked=d[6],Ye(()=>l=!1)),o.$set(b)},i(d){f||(ye(s.$$.fragment,d),ye(o.$$.fragment,d),f=!0)},o(d){xe(s.$$.fragment,d),xe(o.$$.fragment,d),f=!1},d(d){d&&Y(e),ut(s),ut(o)}}}function yf(r){let e;return{c(){e=lt("релевантности")},l(t){e=ct(t,"релевантности")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function bf(r){let e;return{c(){e=lt("дате")},l(t){e=ct(t,"дате")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function _f(r){let e,t,n,i,u,s;function a(m){r[10](m)}let o={name:"sortBy",value:"rel",$$slots:{default:[yf]},$$scope:{ctx:r}};r[7]!==void 0&&(o.group=r[7]),e=new Ks({props:o}),Ge.push(()=>Je(e,"group",a));function l(m){r[11](m)}let f={name:"sortBy",value:"date",$$slots:{default:[bf]},$$scope:{ctx:r}};return r[7]!==void 0&&(f.group=r[7]),i=new Ks({props:f}),Ge.push(()=>Je(i,"group",l)),{c(){rt(e.$$.fragment),n=ve(),rt(i.$$.fragment)},l(m){nt(e.$$.fragment,m),n=Ee(m),nt(i.$$.fragment,m)},m(m,g){it(e,m,g),Te(m,n,g),it(i,m,g),s=!0},p(m,g){const d={};g&268435456&&(d.$$scope={dirty:g,ctx:m}),!t&&g&128&&(t=!0,d.group=m[7],Ye(()=>t=!1)),e.$set(d);const y={};g&268435456&&(y.$$scope={dirty:g,ctx:m}),!u&&g&128&&(u=!0,y.group=m[7],Ye(()=>u=!1)),i.$set(y)},i(m){s||(ye(e.$$.fragment,m),ye(i.$$.fragment,m),s=!0)},o(m){xe(e.$$.fragment,m),xe(i.$$.fragment,m),s=!1},d(m){m&&Y(n),ut(e,m),ut(i,m)}}}function vf(r){let e;return{c(){e=lt("Группировать по типу")},l(t){e=ct(t,"Группировать по типу")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function Ef(r){let e,t,n=Mt(r[1]),i=[];for(let s=0;sxe(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;sxe(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;sxe(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;s0&&da(r);const l=[Sf,Ef],f=[];function m(d,y){return d[6]&&d[8]?0:1}n=m(r),i=f[n]=l[n](r);let g=xf;return{c(){e=se("div"),o&&o.c(),t=ve(),i.c(),u=ve(),s=at(),this.h()},l(d){e=ae(d,"DIV",{class:!0});var y=me(e);o&&o.l(y),t=Ee(y),i.l(y),y.forEach(Y),u=Ee(d),s=at(),this.h()},h(){P(e,"class","search-results svelte-1ptibtq")},m(d,y){Te(d,e,y),o&&o.m(e,null),Q(e,t),f[n].m(e,null),Te(d,u,y),Te(d,s,y),a=!0},p(d,[y]){d[1]&&d[1].length>0?o?(o.p(d,y),y&2&&ye(o,1)):(o=da(d),o.c(),ye(o,1),o.m(e,t)):o&&(ht(),xe(o,1,1,()=>{o=null}),dt());let w=n;n=m(d),n===w?f[n].p(d,y):(ht(),xe(f[w],1,1,()=>{f[w]=null}),dt(),i=f[n],i?i.p(d,y):(i=f[n]=l[n](d),i.c()),ye(i,1),i.m(e,null))},i(d){a||(ye(o),ye(i),ye(g),a=!0)},o(d){xe(o),xe(i),xe(g),a=!1},d(d){d&&(Y(e),Y(u),Y(s)),o&&o.d(),f[n].d()}}}let xf=!1;function Rf(r,e,t){let{enableDocumentDb:n=!1}=e,{documentDbUrl:i=""}=e,{showFullText:u=Array(10).fill(!1)}=e,{useSearchResult:s}=e,a=!1,o="rel",{searchResults:l=[]}=e,f,{enableSearchResultSelection:m=!1}=e;const g=p=>p.reduce((_,k)=>{const R=k.docType||"Другие документы";return _[R]||(_[R]=[]),_[R].push(k),_},{}),d=p=>{p.stopPropagation();const _=p.target.dataset.doctype;Object.keys(f[_]).forEach(k=>{t(0,s[f[_][k].title]=p.target.checked,s)})};function y(p){o=p,t(7,o)}function w(p){o=p,t(7,o)}function b(p){a=p,t(6,a)}return r.$$set=p=>{"enableDocumentDb"in p&&t(3,n=p.enableDocumentDb),"documentDbUrl"in p&&t(4,i=p.documentDbUrl),"showFullText"in p&&t(2,u=p.showFullText),"useSearchResult"in p&&t(0,s=p.useSearchResult),"searchResults"in p&&t(1,l=p.searchResults),"enableSearchResultSelection"in p&&t(5,m=p.enableSearchResultSelection)},r.$$.update=()=>{r.$$.dirty&194&&(a&&t(8,f=g(l)),o=="date"?t(1,l=Yt.sortByDate(l)):o=="rel"&&t(1,l=Yt.sortByRelevance(l))),r.$$.dirty&1&&s===void 0&&t(0,s={})},[s,l,u,n,i,m,a,o,f,d,y,w,b]}class ol extends kt{constructor(e){super(),Dt(this,e,Rf,Cf,wt,{enableDocumentDb:3,documentDbUrl:4,showFullText:2,useSearchResult:0,searchResults:1,enableSearchResultSelection:5})}}function ya(r,e,t){const n=r.slice();return n[6]=e[t],n}function ba(r){let e,t=Mt(r[3].split(` `)),n=[];for(let i=0;ia(i);return r.$$set=l=>{"showFullText"in l&&t(0,n=l.showFullText),"index"in l&&t(1,i=l.index),"title"in l&&t(2,u=l.title),"text"in l&&t(3,s=l.text)},[n,i,u,s,a,o]}class Bf extends kt{constructor(e){super(),Dt(this,e,Ff,If,wt,{showFullText:0,index:1,title:2,text:3})}}function va(r,e,t){const n=r.slice();return n[2]=e[t].title,n[3]=e[t].text,n[5]=t,n}function Ea(r){let e,t;return e=new Bf({props:{title:r[2],text:r[3],index:r[5],showFullText:r[0]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const u={};i&2&&(u.title=n[2]),i&2&&(u.text=n[3]),i&1&&(u.showFullText=n[0]),e.$set(u)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){xe(e.$$.fragment,n),t=!1},d(n){ut(e,n)}}}function Nf(r){let e,t,n="Релевантные консультации",i,u,s,a,o=Mt(r[1]),l=[];for(let g=0;gxe(l[g],1,1,()=>{l[g]=null});let m=Of;return{c(){e=se("div"),t=se("h2"),t.textContent=n,i=ve();for(let g=0;g{"showFullText"in u&&t(0,n=u.showFullText),"consultations"in u&&t(1,i=u.consultations)},[n,i]}class ll extends kt{constructor(e){super(),Dt(this,e,Pf,Nf,wt,{showFullText:0,consultations:1})}}const Cr="clarificationHistory_",eu="clarificationHistoryIndex",tu=2;class Pr{static loadHistory(){const e=[],t=this.getHistoryIndex();for(let n=0;ntu){const t=e-tu;for(let n=0;n0?(t(4,f=m.length-1),t(5,g=m.length),y(),t(11,l=!0),t(1,u=""),t(0,i=""),p("")):(t(4,f=0),t(5,g=0),t(11,l=!1))}Kn(()=>{d()});function y(){const L=Pr.getHistoryItem(f);return L&&(t(0,i=L.searchClarification),t(1,u=L.llmClarification),t(8,s=L.searchResults),t(9,a=L.relevantConsultations),t(10,o=L.llmResponse),t(7,n=L.userRequest)),L}function w(){return Pr.getHistoryItem(f)}function b(){Pr.clearHistory(),d()}function p(L){console.log("addState called");const C={userRequest:L,searchClarification:i,llmClarification:u,searchResults:[],llmResponse:"",relevantConsultations:[],transactionMaps:[]};t(5,g=Pr.getHistoryLength()),Pr.addHistoryItem(C),t(4,f=g-1)}function _(L,C,ue,ne,B){console.log("updateCurrentState called");const Z=Pr.getHistoryItem(f);Z&&(Z.userRequest=L??Z.userRequest,Z.searchClarification=i??Z.searchClarification,Z.llmClarification=u??Z.llmClarification,Z.searchResults=C??Z.searchResults,Z.llmResponse=ue??Z.llmResponse,Z.relevantConsultations=ne??Z.relevantConsultations,Z.transactionMaps=B??Z.transactionMaps,console.log(Z),Pr.updateHistoryItem(f,Z))}function k(){f>0&&(t(4,f-=1),y())}function R(){f{"userRequest"in L&&t(7,n=L.userRequest),"searchClarification"in L&&t(0,i=L.searchClarification),"llmClarification"in L&&t(1,u=L.llmClarification),"searchResults"in L&&t(8,s=L.searchResults),"relevantConsultations"in L&&t(9,a=L.relevantConsultations),"llmResponse"in L&&t(10,o=L.llmResponse),"historyIsNotEmpty"in L&&t(11,l=L.historyIsNotEmpty)},[i,u,k,R,f,g,b,n,s,a,o,l,y,w,p,_,N,q,j]}class jf extends kt{constructor(e){super(),Dt(this,e,zf,Lf,wt,{userRequest:7,searchClarification:0,llmClarification:1,searchResults:8,relevantConsultations:9,llmResponse:10,historyIsNotEmpty:11,loadCurrentHistoryItem:12,getCurrentState:13,addState:14,updateCurrentState:15,prevHistory:2,nextHistory:3,clear:16})}get loadCurrentHistoryItem(){return this.$$.ctx[12]}get getCurrentState(){return this.$$.ctx[13]}get addState(){return this.$$.ctx[14]}get updateCurrentState(){return this.$$.ctx[15]}get prevHistory(){return this.$$.ctx[2]}get nextHistory(){return this.$$.ctx[3]}get clear(){return this.$$.ctx[16]}}function Hf(r){let e;return{c(){e=lt(r[0])},l(t){e=ct(t,r[0])},m(t,n){Te(t,e,n)},p(t,n){n&1&&Xt(e,t[0])},d(t){t&&Y(e)}}}function Wf(r){let e,t,n;return{c(){e=se("a"),t=lt(r[0]),this.h()},l(i){e=ae(i,"A",{href:!0,target:!0,class:!0});var u=me(e);t=ct(u,r[0]),u.forEach(Y),this.h()},h(){P(e,"href",n=r[2]+"file/download/name/"+encodeURIComponent(r[0])),P(e,"target","_blank"),P(e,"class","svelte-1ijmx03")},m(i,u){Te(i,e,u),Q(e,t)},p(i,u){u&1&&Xt(t,i[0]),u&5&&n!==(n=i[2]+"file/download/name/"+encodeURIComponent(i[0]))&&P(e,"href",n)},d(i){i&&Y(e)}}}function Gf(r){let e,t,n,i,u;function s(l,f){return l[1]&&l[2]?Wf:Hf}let a=s(r),o=a(r);return{c(){e=se("div"),t=se("div"),o.c(),n=ve(),i=se("div"),u=lt(r[3]),this.h()},l(l){e=ae(l,"DIV",{class:!0});var f=me(e);t=ae(f,"DIV",{class:!0});var m=me(t);o.l(m),m.forEach(Y),n=Ee(f),i=ae(f,"DIV",{});var g=me(i);u=ct(g,r[3]),g.forEach(Y),f.forEach(Y),this.h()},h(){P(t,"class","title svelte-1ijmx03"),P(e,"class","search-result svelte-1ijmx03")},m(l,f){Te(l,e,f),Q(e,t),o.m(t,null),Q(e,n),Q(e,i),Q(i,u)},p(l,[f]){a===(a=s(l))&&o?o.p(l,f):(o.d(1),o=a(l),o&&(o.c(),o.m(t,null))),f&8&&Xt(u,l[3])},i:qe,o:qe,d(l){l&&Y(e),o.d()}}}function Vf(r,e,t){let{title:n}=e,{enableDocumentDb:i=!1}=e,{documentDbUrl:u=""}=e,{source:s=""}=e;return r.$$set=a=>{"title"in a&&t(0,n=a.title),"enableDocumentDb"in a&&t(1,i=a.enableDocumentDb),"documentDbUrl"in a&&t(2,u=a.documentDbUrl),"source"in a&&t(3,s=a.source)},[n,i,u,s]}class Kf extends kt{constructor(e){super(),Dt(this,e,Vf,Gf,wt,{title:0,enableDocumentDb:1,documentDbUrl:2,source:3})}}function Sa(r,e,t){const n=r.slice();return n[3]=e[t],n}function Aa(r){let e,t;return e=new Kf({props:{title:r[3],enableDocumentDb:r[0],documentDbUrl:r[1],source:r[2][r[3]]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const u={};i&4&&(u.title=n[3]),i&1&&(u.enableDocumentDb=n[0]),i&2&&(u.documentDbUrl=n[1]),i&4&&(u.source=n[2][n[3]]),e.$set(u)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){xe(e.$$.fragment,n),t=!1},d(n){ut(e,n)}}}function qf(r){let e,t,n,i,u=Mt(Object.keys(r[2])),s=[];for(let l=0;lxe(s[l],1,1,()=>{s[l]=null});let o=Xf;return{c(){e=se("div");for(let l=0;l{"enableDocumentDb"in s&&t(0,n=s.enableDocumentDb),"documentDbUrl"in s&&t(1,i=s.documentDbUrl),"transactionMaps"in s&&t(2,u=s.transactionMaps)},[n,i,u]}class Yf extends kt{constructor(e){super(),Dt(this,e,Zf,qf,wt,{enableDocumentDb:0,documentDbUrl:1,transactionMaps:2})}}var Jf=Object.defineProperty,Qf=Object.defineProperties,$f=Object.getOwnPropertyDescriptors,Ta=Object.getOwnPropertySymbols,e4=Object.prototype.hasOwnProperty,t4=Object.prototype.propertyIsEnumerable,Yu=(r,e,t)=>e in r?Jf(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xe=(r,e)=>{for(var t in e||(e={}))e4.call(e,t)&&Yu(r,t,e[t]);if(Ta)for(var t of Ta(e))t4.call(e,t)&&Yu(r,t,e[t]);return r},qn=(r,e)=>Qf(r,$f(e)),ge=(r,e,t)=>(Yu(r,typeof e!="symbol"?e+"":e,t),t),mi=(r,e,t)=>new Promise((n,i)=>{var u=o=>{try{a(t.next(o))}catch(l){i(l)}},s=o=>{try{a(t.throw(o))}catch(l){i(l)}},a=o=>o.done?n(o.value):Promise.resolve(o.value).then(u,s);a((t=t.apply(r,e)).next())});class Ii{constructor(e){ge(this,"rootKey"),this.rootKey=e}}const r4=Object.seal({});class be extends Ii{constructor(e){super(e),ge(this,"root"),this.root=new Array}prepForXml(e){var t;e.stack.push(this);const n=this.root.map(i=>i instanceof Ii?i.prepForXml(e):i).filter(i=>i!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((t=n[0])!=null&&t._attr)?n[0]:n:r4}}addChildElement(e){return this.root.push(e),this}}class Oi extends be{prepForXml(e){const t=super.prepForXml(e);if(t&&(typeof t[this.rootKey]!="object"||Object.keys(t[this.rootKey]).length))return t}}class Le extends Ii{constructor(e){super("_attr"),ge(this,"xmlKeys"),this.root=e}prepForXml(e){const t={};return Object.keys(this.root).forEach(n=>{const i=this.root[n];if(i!==void 0){const u=this.xmlKeys&&this.xmlKeys[n]||n;t[u]=i}}),{_attr:t}}}class Xn extends Ii{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:i,value:u})=>qn(Xe({},n),{[i]:u}),{})}}}class bt extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var Tr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cl(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var fl={},os={exports:{}},ln=typeof Reflect=="object"?Reflect:null,ka=ln&&typeof ln.apply=="function"?ln.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},ki;ln&&typeof ln.ownKeys=="function"?ki=ln.ownKeys:Object.getOwnPropertySymbols?ki=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:ki=function(e){return Object.getOwnPropertyNames(e)};function n4(r){console&&console.warn&&console.warn(r)}var hl=Number.isNaN||function(e){return e!==e};function Qe(){Qe.init.call(this)}os.exports=Qe;os.exports.once=a4;Qe.EventEmitter=Qe;Qe.prototype._events=void 0;Qe.prototype._eventsCount=0;Qe.prototype._maxListeners=void 0;var Da=10;function Pi(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Qe,"defaultMaxListeners",{enumerable:!0,get:function(){return Da},set:function(r){if(typeof r!="number"||r<0||hl(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");Da=r}});Qe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Qe.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||hl(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function dl(r){return r._maxListeners===void 0?Qe.defaultMaxListeners:r._maxListeners}Qe.prototype.getMaxListeners=function(){return dl(this)};Qe.prototype.emit=function(e){for(var t=[],n=1;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var o=u[e];if(o===void 0)return!1;if(typeof o=="function")ka(o,this,t);else for(var l=o.length,f=yl(o,l),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=r,a.type=e,a.count=s.length,n4(a)}return r}Qe.prototype.addListener=function(e,t){return pl(this,e,t,!1)};Qe.prototype.on=Qe.prototype.addListener;Qe.prototype.prependListener=function(e,t){return pl(this,e,t,!0)};function i4(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ml(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=i4.bind(n);return i.listener=t,n.wrapFn=i,i}Qe.prototype.once=function(e,t){return Pi(t),this.on(e,ml(this,e,t)),this};Qe.prototype.prependOnceListener=function(e,t){return Pi(t),this.prependListener(e,ml(this,e,t)),this};Qe.prototype.removeListener=function(e,t){var n,i,u,s,a;if(Pi(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(u=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){a=n[s].listener,u=s;break}if(u<0)return this;u===0?n.shift():u4(n,u),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||t)}return this};Qe.prototype.off=Qe.prototype.removeListener;Qe.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var u=Object.keys(n),s;for(i=0;i=0;i--)this.removeListener(e,t[i]);return this};function gl(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?s4(i):yl(i,i.length)}Qe.prototype.listeners=function(e){return gl(this,e,!0)};Qe.prototype.rawListeners=function(e){return gl(this,e,!1)};Qe.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):wl.call(r,e)};Qe.prototype.listenerCount=wl;function wl(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Qe.prototype.eventNames=function(){return this._eventsCount>0?ki(this._events):[]};function yl(r,e){for(var t=new Array(e),n=0;n1)for(var t=1;t0)throw new Error("Invalid string. Length must be a multiple of 4");var w=d.indexOf("=");w===-1&&(w=y);var b=w===y?0:4-w%4;return[w,b]}function a(d){var y=s(d),w=y[0],b=y[1];return(w+b)*3/4-b}function o(d,y,w){return(y+w)*3/4-w}function l(d){var y,w=s(d),b=w[0],p=w[1],_=new t(o(d,b,p)),k=0,R=p>0?b-4:b,N;for(N=0;N>16&255,_[k++]=y>>8&255,_[k++]=y&255;return p===2&&(y=e[d.charCodeAt(N)]<<2|e[d.charCodeAt(N+1)]>>4,_[k++]=y&255),p===1&&(y=e[d.charCodeAt(N)]<<10|e[d.charCodeAt(N+1)]<<4|e[d.charCodeAt(N+2)]>>2,_[k++]=y>>8&255,_[k++]=y&255),_}function f(d){return r[d>>18&63]+r[d>>12&63]+r[d>>6&63]+r[d&63]}function m(d,y,w){for(var b,p=[],_=y;_R?R:k+_));return b===1?(y=d[w-1],p.push(r[y>>2]+r[y<<4&63]+"==")):b===2&&(y=(d[w-2]<<8)+d[w-1],p.push(r[y>>10]+r[y>>4&63]+r[y<<2&63]+"=")),p.join("")}return jn}var gi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var Ra;function p4(){return Ra||(Ra=1,gi.read=function(r,e,t,n,i){var u,s,a=i*8-n-1,o=(1<>1,f=-7,m=t?i-1:0,g=t?-1:1,d=r[e+m];for(m+=g,u=d&(1<<-f)-1,d>>=-f,f+=a;f>0;u=u*256+r[e+m],m+=g,f-=8);for(s=u&(1<<-f)-1,u>>=-f,f+=n;f>0;s=s*256+r[e+m],m+=g,f-=8);if(u===0)u=1-l;else{if(u===o)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,n),u=u-l}return(d?-1:1)*s*Math.pow(2,u-n)},gi.write=function(r,e,t,n,i,u){var s,a,o,l=u*8-i-1,f=(1<>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:u-1,y=n?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(o=Math.pow(2,-s))<1&&(s--,o*=2),s+m>=1?e+=g/o:e+=g*Math.pow(2,1-m),e*o>=2&&(s++,o/=2),s+m>=f?(a=0,s=f):s+m>=1?(a=(e*o-1)*Math.pow(2,i),s=s+m):(a=e*Math.pow(2,m-1)*Math.pow(2,i),s=0));i>=8;r[t+d]=a&255,d+=y,a/=256,i-=8);for(s=s<0;r[t+d]=s&255,d+=y,s/=256,l-=8);r[t+d-y]|=w*128}),gi}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var Ia;function Li(){return Ia||(Ia=1,function(r){var e=d4(),t=p4(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=a,r.SlowBuffer=_,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=u(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{var T=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(T,c),T.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(T){if(T>i)throw new RangeError('The value "'+T+'" is invalid for option "size"');var c=new Uint8Array(T);return Object.setPrototypeOf(c,a.prototype),c}function a(T,c,h){if(typeof T=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(T)}return o(T,c,h)}a.poolSize=8192;function o(T,c,h){if(typeof T=="string")return g(T,c);if(ArrayBuffer.isView(T))return y(T);if(T==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(ee(T,ArrayBuffer)||T&&ee(T.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ee(T,SharedArrayBuffer)||T&&ee(T.buffer,SharedArrayBuffer)))return w(T,c,h);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=T.valueOf&&T.valueOf();if(E!=null&&E!==T)return a.from(E,c,h);var O=b(T);if(O)return O;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return a.from(T[Symbol.toPrimitive]("string"),c,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}a.from=function(T,c,h){return o(T,c,h)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function f(T,c,h){return l(T),T<=0?s(T):c!==void 0?typeof h=="string"?s(T).fill(c,h):s(T).fill(c):s(T)}a.alloc=function(T,c,h){return f(T,c,h)};function m(T){return l(T),s(T<0?0:p(T)|0)}a.allocUnsafe=function(T){return m(T)},a.allocUnsafeSlow=function(T){return m(T)};function g(T,c){if((typeof c!="string"||c==="")&&(c="utf8"),!a.isEncoding(c))throw new TypeError("Unknown encoding: "+c);var h=k(T,c)|0,E=s(h),O=E.write(T,c);return O!==h&&(E=E.slice(0,O)),E}function d(T){for(var c=T.length<0?0:p(T.length)|0,h=s(c),E=0;E=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return T|0}function _(T){return+T!=T&&(T=0),a.alloc(+T)}a.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==a.prototype},a.compare=function(c,h){if(ee(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),ee(h,Uint8Array)&&(h=a.from(h,h.offset,h.byteLength)),!a.isBuffer(c)||!a.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===h)return 0;for(var E=c.length,O=h.length,K=0,z=Math.min(E,O);KO.length?a.from(z).copy(O,K):Uint8Array.prototype.set.call(O,z,K);else if(a.isBuffer(z))z.copy(O,K);else throw new TypeError('"list" argument must be an Array of Buffers');K+=z.length}return O};function k(T,c){if(a.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||ee(T,ArrayBuffer))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);var h=T.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&h===0)return 0;for(var O=!1;;)switch(c){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return S(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return I(T).length;default:if(O)return E?-1:S(T).length;c=(""+c).toLowerCase(),O=!0}}a.byteLength=k;function R(T,c,h){var E=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,c>>>=0,h<=c))return"";for(T||(T="utf8");;)switch(T){case"hex":return X(this,c,h);case"utf8":case"utf-8":return D(this,c,h);case"ascii":return W(this,c,h);case"latin1":case"binary":return pe(this,c,h);case"base64":return Z(this,c,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ae(this,c,h);default:if(E)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),E=!0}}a.prototype._isBuffer=!0;function N(T,c,h){var E=T[c];T[c]=T[h],T[h]=E}a.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;hh&&(c+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(c,h,E,O,K){if(ee(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(h===void 0&&(h=0),E===void 0&&(E=c?c.length:0),O===void 0&&(O=0),K===void 0&&(K=this.length),h<0||E>c.length||O<0||K>this.length)throw new RangeError("out of range index");if(O>=K&&h>=E)return 0;if(O>=K)return-1;if(h>=E)return 1;if(h>>>=0,E>>>=0,O>>>=0,K>>>=0,this===c)return 0;for(var z=K-O,oe=E-h,we=Math.min(z,oe),de=this.slice(O,K),Ce=c.slice(h,E),Fe=0;Fe2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,v(h)&&(h=O?0:T.length-1),h<0&&(h=T.length+h),h>=T.length){if(O)return-1;h=T.length-1}else if(h<0)if(O)h=0;else return-1;if(typeof c=="string"&&(c=a.from(c,E)),a.isBuffer(c))return c.length===0?-1:j(T,c,h,E,O);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?O?Uint8Array.prototype.indexOf.call(T,c,h):Uint8Array.prototype.lastIndexOf.call(T,c,h):j(T,[c],h,E,O);throw new TypeError("val must be string, number or Buffer")}function j(T,c,h,E,O){var K=1,z=T.length,oe=c.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(T.length<2||c.length<2)return-1;K=2,z/=2,oe/=2,h/=2}function we(ke,Be){return K===1?ke[Be]:ke.readUInt16BE(Be*K)}var de;if(O){var Ce=-1;for(de=h;dez&&(h=z-oe),de=h;de>=0;de--){for(var Fe=!0,te=0;teO&&(E=O)):E=O;var K=c.length;E>K/2&&(E=K/2);for(var z=0;z>>0,isFinite(E)?(E=E>>>0,O===void 0&&(O="utf8")):(O=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-h;if((E===void 0||E>K)&&(E=K),c.length>0&&(E<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");O||(O="utf8");for(var z=!1;;)switch(O){case"hex":return L(this,c,h,E);case"utf8":case"utf-8":return C(this,c,h,E);case"ascii":case"latin1":case"binary":return ue(this,c,h,E);case"base64":return ne(this,c,h,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,c,h,E);default:if(z)throw new TypeError("Unknown encoding: "+O);O=(""+O).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(T,c,h){return c===0&&h===T.length?e.fromByteArray(T):e.fromByteArray(T.slice(c,h))}function D(T,c,h){h=Math.min(T.length,h);for(var E=[],O=c;O239?4:K>223?3:K>191?2:1;if(O+oe<=h){var we,de,Ce,Fe;switch(oe){case 1:K<128&&(z=K);break;case 2:we=T[O+1],(we&192)===128&&(Fe=(K&31)<<6|we&63,Fe>127&&(z=Fe));break;case 3:we=T[O+1],de=T[O+2],(we&192)===128&&(de&192)===128&&(Fe=(K&15)<<12|(we&63)<<6|de&63,Fe>2047&&(Fe<55296||Fe>57343)&&(z=Fe));break;case 4:we=T[O+1],de=T[O+2],Ce=T[O+3],(we&192)===128&&(de&192)===128&&(Ce&192)===128&&(Fe=(K&15)<<18|(we&63)<<12|(de&63)<<6|Ce&63,Fe>65535&&Fe<1114112&&(z=Fe))}}z===null?(z=65533,oe=1):z>65535&&(z-=65536,E.push(z>>>10&1023|55296),z=56320|z&1023),E.push(z),O+=oe}return ce(E)}var H=4096;function ce(T){var c=T.length;if(c<=H)return String.fromCharCode.apply(String,T);for(var h="",E=0;EE)&&(h=E);for(var O="",K=c;KE&&(c=E),h<0?(h+=E,h<0&&(h=0)):h>E&&(h=E),hh)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(c,h,E){c=c>>>0,h=h>>>0,E||V(c,h,this.length);for(var O=this[c],K=1,z=0;++z>>0,h=h>>>0,E||V(c,h,this.length);for(var O=this[c+--h],K=1;h>0&&(K*=256);)O+=this[c+--h]*K;return O},a.prototype.readUint8=a.prototype.readUInt8=function(c,h){return c=c>>>0,h||V(c,1,this.length),this[c]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(c,h){return c=c>>>0,h||V(c,2,this.length),this[c]|this[c+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(c,h){return c=c>>>0,h||V(c,2,this.length),this[c]<<8|this[c+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(c,h){return c=c>>>0,h||V(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(c,h){return c=c>>>0,h||V(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},a.prototype.readIntLE=function(c,h,E){c=c>>>0,h=h>>>0,E||V(c,h,this.length);for(var O=this[c],K=1,z=0;++z=K&&(O-=Math.pow(2,8*h)),O},a.prototype.readIntBE=function(c,h,E){c=c>>>0,h=h>>>0,E||V(c,h,this.length);for(var O=h,K=1,z=this[c+--O];O>0&&(K*=256);)z+=this[c+--O]*K;return K*=128,z>=K&&(z-=Math.pow(2,8*h)),z},a.prototype.readInt8=function(c,h){return c=c>>>0,h||V(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},a.prototype.readInt16LE=function(c,h){c=c>>>0,h||V(c,2,this.length);var E=this[c]|this[c+1]<<8;return E&32768?E|4294901760:E},a.prototype.readInt16BE=function(c,h){c=c>>>0,h||V(c,2,this.length);var E=this[c+1]|this[c]<<8;return E&32768?E|4294901760:E},a.prototype.readInt32LE=function(c,h){return c=c>>>0,h||V(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},a.prototype.readInt32BE=function(c,h){return c=c>>>0,h||V(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},a.prototype.readFloatLE=function(c,h){return c=c>>>0,h||V(c,4,this.length),t.read(this,c,!0,23,4)},a.prototype.readFloatBE=function(c,h){return c=c>>>0,h||V(c,4,this.length),t.read(this,c,!1,23,4)},a.prototype.readDoubleLE=function(c,h){return c=c>>>0,h||V(c,8,this.length),t.read(this,c,!0,52,8)},a.prototype.readDoubleBE=function(c,h){return c=c>>>0,h||V(c,8,this.length),t.read(this,c,!1,52,8)};function x(T,c,h,E,O,K){if(!a.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>O||cT.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(c,h,E,O){if(c=+c,h=h>>>0,E=E>>>0,!O){var K=Math.pow(2,8*E)-1;x(this,c,h,E,K,0)}var z=1,oe=0;for(this[h]=c&255;++oe>>0,E=E>>>0,!O){var K=Math.pow(2,8*E)-1;x(this,c,h,E,K,0)}var z=E-1,oe=1;for(this[h+z]=c&255;--z>=0&&(oe*=256);)this[h+z]=c/oe&255;return h+E},a.prototype.writeUint8=a.prototype.writeUInt8=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,1,255,0),this[h]=c&255,h+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,2,65535,0),this[h]=c&255,this[h+1]=c>>>8,h+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,2,65535,0),this[h]=c>>>8,this[h+1]=c&255,h+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,4,4294967295,0),this[h+3]=c>>>24,this[h+2]=c>>>16,this[h+1]=c>>>8,this[h]=c&255,h+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,4,4294967295,0),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4},a.prototype.writeIntLE=function(c,h,E,O){if(c=+c,h=h>>>0,!O){var K=Math.pow(2,8*E-1);x(this,c,h,E,K-1,-K)}var z=0,oe=1,we=0;for(this[h]=c&255;++z>0)-we&255;return h+E},a.prototype.writeIntBE=function(c,h,E,O){if(c=+c,h=h>>>0,!O){var K=Math.pow(2,8*E-1);x(this,c,h,E,K-1,-K)}var z=E-1,oe=1,we=0;for(this[h+z]=c&255;--z>=0&&(oe*=256);)c<0&&we===0&&this[h+z+1]!==0&&(we=1),this[h+z]=(c/oe>>0)-we&255;return h+E},a.prototype.writeInt8=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,1,127,-128),c<0&&(c=255+c+1),this[h]=c&255,h+1},a.prototype.writeInt16LE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,2,32767,-32768),this[h]=c&255,this[h+1]=c>>>8,h+2},a.prototype.writeInt16BE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,2,32767,-32768),this[h]=c>>>8,this[h+1]=c&255,h+2},a.prototype.writeInt32LE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,4,2147483647,-2147483648),this[h]=c&255,this[h+1]=c>>>8,this[h+2]=c>>>16,this[h+3]=c>>>24,h+4},a.prototype.writeInt32BE=function(c,h,E){return c=+c,h=h>>>0,E||x(this,c,h,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4};function J(T,c,h,E,O,K){if(h+E>T.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function $(T,c,h,E,O){return c=+c,h=h>>>0,O||J(T,c,h,4),t.write(T,c,h,E,23,4),h+4}a.prototype.writeFloatLE=function(c,h,E){return $(this,c,h,!0,E)},a.prototype.writeFloatBE=function(c,h,E){return $(this,c,h,!1,E)};function ie(T,c,h,E,O){return c=+c,h=h>>>0,O||J(T,c,h,8),t.write(T,c,h,E,52,8),h+8}a.prototype.writeDoubleLE=function(c,h,E){return ie(this,c,h,!0,E)},a.prototype.writeDoubleBE=function(c,h,E){return ie(this,c,h,!1,E)},a.prototype.copy=function(c,h,E,O){if(!a.isBuffer(c))throw new TypeError("argument should be a Buffer");if(E||(E=0),!O&&O!==0&&(O=this.length),h>=c.length&&(h=c.length),h||(h=0),O>0&&O=this.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("sourceEnd out of bounds");O>this.length&&(O=this.length),c.length-h>>0,E=E===void 0?this.length:E>>>0,c||(c=0);var z;if(typeof c=="number")for(z=h;z55295&&h<57344){if(!O){if(h>56319){(c-=3)>-1&&K.push(239,191,189);continue}else if(z+1===E){(c-=3)>-1&&K.push(239,191,189);continue}O=h;continue}if(h<56320){(c-=3)>-1&&K.push(239,191,189),O=h;continue}h=(O-55296<<10|h-56320)+65536}else O&&(c-=3)>-1&&K.push(239,191,189);if(O=null,h<128){if((c-=1)<0)break;K.push(h)}else if(h<2048){if((c-=2)<0)break;K.push(h>>6|192,h&63|128)}else if(h<65536){if((c-=3)<0)break;K.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((c-=4)<0)break;K.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return K}function G(T){for(var c=[],h=0;h>8,O=h%256,K.push(O),K.push(E);return K}function I(T){return e.toByteArray(A(T))}function F(T,c,h,E){for(var O=0;O=c.length||O>=T.length);++O)c[O+h]=T[O];return O}function ee(T,c){return T instanceof c||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===c.name}function v(T){return T!==T}var re=function(){for(var T="0123456789abcdef",c=new Array(256),h=0;h<16;++h)for(var E=h*16,O=0;O<16;++O)c[E+O]=T[h]+T[O];return c}()}(nu)),nu}var iu={},uu={},su,Fa;function Tl(){return Fa||(Fa=1,su=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),su}var au,Ba;function cs(){if(Ba)return au;Ba=1;var r=Tl();return au=function(){return r()&&!!Symbol.toStringTag},au}var ou,Na;function m4(){if(Na)return ou;Na=1;var r=typeof Symbol<"u"&&Symbol,e=Tl();return ou=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},ou}var lu,Oa;function g4(){if(Oa)return lu;Oa=1;var r={foo:{}},e=Object;return lu=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof e)},lu}var cu,Pa;function w4(){if(Pa)return cu;Pa=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(o,l){for(var f=[],m=0;m"u"||!f?r:f(Uint8Array),d={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":o&&f?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":t,"%GeneratorFunction%":m,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":o&&f?f(f([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!o||!f?r:f(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!o||!f?r:f(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":o&&f?f(""[Symbol.iterator]()):r,"%Symbol%":o?Symbol:r,"%SyntaxError%":e,"%ThrowTypeError%":a,"%TypedArray%":g,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(f)try{null.error}catch(B){var y=f(f(B));d["%Error.prototype%"]=y}var w=function B(Z){var D;if(Z==="%AsyncFunction%")D=i("async function () {}");else if(Z==="%GeneratorFunction%")D=i("function* () {}");else if(Z==="%AsyncGeneratorFunction%")D=i("async function* () {}");else if(Z==="%AsyncGenerator%"){var H=B("%AsyncGeneratorFunction%");H&&(D=H.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ce=B("%AsyncGenerator%");ce&&f&&(D=f(ce.prototype))}return d[Z]=D,D},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},p=fs(),_=y4(),k=p.call(Function.call,Array.prototype.concat),R=p.call(Function.apply,Array.prototype.splice),N=p.call(Function.call,String.prototype.replace),q=p.call(Function.call,String.prototype.slice),j=p.call(Function.call,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,ue=function(Z){var D=q(Z,0,1),H=q(Z,-1);if(D==="%"&&H!=="%")throw new e("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&D!=="%")throw new e("invalid intrinsic syntax, expected opening `%`");var ce=[];return N(Z,L,function(W,pe,X,Ae){ce[ce.length]=X?N(Ae,C,"$1"):pe||W}),ce},ne=function(Z,D){var H=Z,ce;if(_(b,H)&&(ce=b[H],H="%"+ce[0]+"%"),_(d,H)){var W=d[H];if(W===m&&(W=w(H)),typeof W>"u"&&!D)throw new n("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ce,name:H,value:W}}throw new e("intrinsic "+Z+" does not exist!")};return du=function(Z,D){if(typeof Z!="string"||Z.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new n('"allowMissing" argument must be a boolean');if(j(/^%?[^%]*%?$/,Z)===null)throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=ue(Z),ce=H.length>0?H[0]:"",W=ne("%"+ce+"%",D),pe=W.name,X=W.value,Ae=!1,V=W.alias;V&&(ce=V[0],R(H,k([0,1],V)));for(var x=1,J=!0;x=H.length){var A=u(X,$);J=!!A,J&&"get"in A&&!("originalValue"in A.get)?X=A.get:X=X[$]}else J=_(X,$),X=X[$];J&&!Ae&&(d[pe]=X)}}return X},du}var pu={exports:{}},mu,za;function kl(){if(za)return mu;za=1;var r=bn(),e=r("%Object.defineProperty%",!0),t=function(){if(e)try{return e({},"a",{value:1}),!0}catch{return!1}return!1};return t.hasArrayLengthDefineBug=function(){if(!t())return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},mu=t,mu}var gu,ja;function hs(){if(ja)return gu;ja=1;var r=bn(),e=r("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return gu=e,gu}var wu,Ha;function b4(){if(Ha)return wu;Ha=1;var r=kl()(),e=bn(),t=r&&e("%Object.defineProperty%",!0);if(t)try{t({},"a",{value:1})}catch{t=!1}var n=e("%SyntaxError%"),i=e("%TypeError%"),u=hs();return wu=function(a,o,l){if(!a||typeof a!="object"&&typeof a!="function")throw new i("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var f=arguments.length>3?arguments[3]:null,m=arguments.length>4?arguments[4]:null,g=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,y=!!u&&u(a,o);if(t)t(a,o,{configurable:g===null&&y?y.configurable:!g,enumerable:f===null&&y?y.enumerable:!f,value:l,writable:m===null&&y?y.writable:!m});else if(d||!f&&!m&&!g)a[o]=l;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},wu}var yu,Wa;function _4(){if(Wa)return yu;Wa=1;var r=bn(),e=b4(),t=kl()(),n=hs(),i=r("%TypeError%"),u=r("%Math.floor%");return yu=function(a,o){if(typeof a!="function")throw new i("`fn` is not a function");if(typeof o!="number"||o<0||o>4294967295||u(o)!==o)throw new i("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],f=!0,m=!0;if("length"in a&&n){var g=n(a,"length");g&&!g.configurable&&(f=!1),g&&!g.writable&&(m=!1)}return(f||m||!l)&&(t?e(a,"length",o,!0,!0):e(a,"length",o)),a},yu}var Ga;function Dl(){return Ga||(Ga=1,function(r){var e=fs(),t=bn(),n=_4(),i=t("%TypeError%"),u=t("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(s,u),o=t("%Object.defineProperty%",!0),l=t("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}r.exports=function(g){if(typeof g!="function")throw new i("a function is required");var d=a(e,s,arguments);return n(d,1+l(0,g.length-(arguments.length-1)),!0)};var f=function(){return a(e,u,arguments)};o?o(r.exports,"apply",{value:f}):r.exports.apply=f}(pu)),pu.exports}var bu,Va;function Cl(){if(Va)return bu;Va=1;var r=bn(),e=Dl(),t=e(r("String.prototype.indexOf"));return bu=function(i,u){var s=r(i,!!u);return typeof s=="function"&&t(i,".prototype.")>-1?e(s):s},bu}var _u,Ka;function v4(){if(Ka)return _u;Ka=1;var r=cs()(),e=Cl(),t=e("Object.prototype.toString"),n=function(a){return r&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:t(a)==="[object Arguments]"},i=function(a){return n(a)?!0:a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&t(a)!=="[object Array]"&&t(a.callee)==="[object Function]"},u=function(){return n(arguments)}();return n.isLegacyArguments=i,_u=u?n:i,_u}var vu,qa;function E4(){if(qa)return vu;qa=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=cs()(),i=Object.getPrototypeOf,u=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},s;return vu=function(o){if(typeof o!="function")return!1;if(t.test(e.call(o)))return!0;if(!n){var l=r.call(o);return l==="[object GeneratorFunction]"}if(!i)return!1;if(typeof s>"u"){var f=u();s=f?i(f):!1}return i(o)===s},vu}var Eu,Xa;function S4(){if(Xa)return Eu;Xa=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(_){_!==n&&(e=null)}else e=null;var i=/^\s*class\b/,u=function(k){try{var R=r.call(k);return i.test(R)}catch{return!1}},s=function(k){try{return u(k)?!1:(r.call(k),!0)}catch{return!1}},a=Object.prototype.toString,o="[object Object]",l="[object Function]",f="[object GeneratorFunction]",m="[object HTMLAllCollection]",g="[object HTML document.all class]",d="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,w=!(0 in[,]),b=function(){return!1};if(typeof document=="object"){var p=document.all;a.call(p)===a.call(document.all)&&(b=function(k){if((w||!k)&&(typeof k>"u"||typeof k=="object"))try{var R=a.call(k);return(R===m||R===g||R===d||R===o)&&k("")==null}catch{}return!1})}return Eu=e?function(k){if(b(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{e(k,null,t)}catch(R){if(R!==n)return!1}return!u(k)&&s(k)}:function(k){if(b(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(y)return s(k);if(u(k))return!1;var R=a.call(k);return R!==l&&R!==f&&!/^\[object HTML/.test(R)?!1:s(k)},Eu}var Su,Za;function A4(){if(Za)return Su;Za=1;var r=S4(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(o,l,f){for(var m=0,g=o.length;m=3&&(m=f),e.call(o)==="[object Array]"?n(o,l,m):typeof o=="string"?i(o,l,m):u(o,l,m)};return Su=s,Su}var Au,Ya;function T4(){if(Ya)return Au;Ya=1;var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],e=typeof globalThis>"u"?Tr:globalThis;return Au=function(){for(var n=[],i=0;i"u"?Tr:globalThis,o=e(),l=n("String.prototype.slice"),f=Object.getPrototypeOf,m=n("Array.prototype.indexOf",!0)||function(b,p){for(var _=0;_-1?p:p!=="Object"?!1:y(b)}return i?d(b):null},Tu}var ku,Qa;function k4(){if(Qa)return ku;Qa=1;var r=xl();return ku=function(t){return!!r(t)},ku}var $a;function D4(){return $a||($a=1,function(r){var e=v4(),t=E4(),n=xl(),i=k4();function u(E){return E.call.bind(E)}var s=typeof BigInt<"u",a=typeof Symbol<"u",o=u(Object.prototype.toString),l=u(Number.prototype.valueOf),f=u(String.prototype.valueOf),m=u(Boolean.prototype.valueOf);if(s)var g=u(BigInt.prototype.valueOf);if(a)var d=u(Symbol.prototype.valueOf);function y(E,O){if(typeof E!="object")return!1;try{return O(E),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function w(E){return typeof Promise<"u"&&E instanceof Promise||E!==null&&typeof E=="object"&&typeof E.then=="function"&&typeof E.catch=="function"}r.isPromise=w;function b(E){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(E):i(E)||J(E)}r.isArrayBufferView=b;function p(E){return n(E)==="Uint8Array"}r.isUint8Array=p;function _(E){return n(E)==="Uint8ClampedArray"}r.isUint8ClampedArray=_;function k(E){return n(E)==="Uint16Array"}r.isUint16Array=k;function R(E){return n(E)==="Uint32Array"}r.isUint32Array=R;function N(E){return n(E)==="Int8Array"}r.isInt8Array=N;function q(E){return n(E)==="Int16Array"}r.isInt16Array=q;function j(E){return n(E)==="Int32Array"}r.isInt32Array=j;function L(E){return n(E)==="Float32Array"}r.isFloat32Array=L;function C(E){return n(E)==="Float64Array"}r.isFloat64Array=C;function ue(E){return n(E)==="BigInt64Array"}r.isBigInt64Array=ue;function ne(E){return n(E)==="BigUint64Array"}r.isBigUint64Array=ne;function B(E){return o(E)==="[object Map]"}B.working=typeof Map<"u"&&B(new Map);function Z(E){return typeof Map>"u"?!1:B.working?B(E):E instanceof Map}r.isMap=Z;function D(E){return o(E)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function H(E){return typeof Set>"u"?!1:D.working?D(E):E instanceof Set}r.isSet=H;function ce(E){return o(E)==="[object WeakMap]"}ce.working=typeof WeakMap<"u"&&ce(new WeakMap);function W(E){return typeof WeakMap>"u"?!1:ce.working?ce(E):E instanceof WeakMap}r.isWeakMap=W;function pe(E){return o(E)==="[object WeakSet]"}pe.working=typeof WeakSet<"u"&&pe(new WeakSet);function X(E){return pe(E)}r.isWeakSet=X;function Ae(E){return o(E)==="[object ArrayBuffer]"}Ae.working=typeof ArrayBuffer<"u"&&Ae(new ArrayBuffer);function V(E){return typeof ArrayBuffer>"u"?!1:Ae.working?Ae(E):E instanceof ArrayBuffer}r.isArrayBuffer=V;function x(E){return o(E)==="[object DataView]"}x.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&x(new DataView(new ArrayBuffer(1),0,1));function J(E){return typeof DataView>"u"?!1:x.working?x(E):E instanceof DataView}r.isDataView=J;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(E){return o(E)==="[object SharedArrayBuffer]"}function M(E){return typeof $>"u"?!1:(typeof ie.working>"u"&&(ie.working=ie(new $)),ie.working?ie(E):E instanceof $)}r.isSharedArrayBuffer=M;function A(E){return o(E)==="[object AsyncFunction]"}r.isAsyncFunction=A;function S(E){return o(E)==="[object Map Iterator]"}r.isMapIterator=S;function G(E){return o(E)==="[object Set Iterator]"}r.isSetIterator=G;function U(E){return o(E)==="[object Generator]"}r.isGeneratorObject=U;function I(E){return o(E)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=I;function F(E){return y(E,l)}r.isNumberObject=F;function ee(E){return y(E,f)}r.isStringObject=ee;function v(E){return y(E,m)}r.isBooleanObject=v;function re(E){return s&&y(E,g)}r.isBigIntObject=re;function T(E){return a&&y(E,d)}r.isSymbolObject=T;function c(E){return F(E)||ee(E)||v(E)||re(E)||T(E)}r.isBoxedPrimitive=c;function h(E){return typeof Uint8Array<"u"&&(V(E)||M(E))}r.isAnyArrayBuffer=h,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(E){Object.defineProperty(r,E,{enumerable:!1,value:function(){throw new Error(E+" is not supported in userland")}})})}(uu)),uu}var Du,eo;function C4(){return eo||(eo=1,Du=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),Du}var to;function Rl(){return to||(to=1,function(r){var e=Object.getOwnPropertyDescriptors||function(J){for(var $=Object.keys(J),ie={},M=0;M<$.length;M++)ie[$[M]]=Object.getOwnPropertyDescriptor(J,$[M]);return ie},t=/%[sdj%]/g;r.format=function(x){if(!N(x)){for(var J=[],$=0;$=M)return G;switch(G){case"%s":return String(ie[$++]);case"%d":return Number(ie[$++]);case"%j":try{return JSON.stringify(ie[$++])}catch{return"[Circular]"}default:return G}}),S=ie[$];$"u")return function(){return r.deprecate(x,J).apply(this,arguments)};var $=!1;function ie(){if(!$){if(je.throwDeprecation)throw new Error(J);je.traceDeprecation?console.trace(J):console.error(J),$=!0}return x.apply(this,arguments)}return ie};var n={},i=/^$/;if(je.env.NODE_DEBUG){var u=je.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+u+"$","i")}r.debuglog=function(x){if(x=x.toUpperCase(),!n[x])if(i.test(x)){var J=je.pid;n[x]=function(){var $=r.format.apply(r,arguments);console.error("%s %d: %s",x,J,$)}}else n[x]=function(){};return n[x]};function s(x,J){var $={seen:[],stylize:o};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),p(J)?$.showHidden=J:J&&r._extend($,J),j($.showHidden)&&($.showHidden=!1),j($.depth)&&($.depth=2),j($.colors)&&($.colors=!1),j($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=a),f($,x,$.depth)}r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(x,J){var $=s.styles[J];return $?"\x1B["+s.colors[$][0]+"m"+x+"\x1B["+s.colors[$][1]+"m":x}function o(x,J){return x}function l(x){var J={};return x.forEach(function($,ie){J[$]=!0}),J}function f(x,J,$){if(x.customInspect&&J&&B(J.inspect)&&J.inspect!==r.inspect&&!(J.constructor&&J.constructor.prototype===J)){var ie=J.inspect($,x);return N(ie)||(ie=f(x,ie,$)),ie}var M=m(x,J);if(M)return M;var A=Object.keys(J),S=l(A);if(x.showHidden&&(A=Object.getOwnPropertyNames(J)),ne(J)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return g(J);if(A.length===0){if(B(J)){var G=J.name?": "+J.name:"";return x.stylize("[Function"+G+"]","special")}if(L(J))return x.stylize(RegExp.prototype.toString.call(J),"regexp");if(ue(J))return x.stylize(Date.prototype.toString.call(J),"date");if(ne(J))return g(J)}var U="",I=!1,F=["{","}"];if(b(J)&&(I=!0,F=["[","]"]),B(J)){var ee=J.name?": "+J.name:"";U=" [Function"+ee+"]"}if(L(J)&&(U=" "+RegExp.prototype.toString.call(J)),ue(J)&&(U=" "+Date.prototype.toUTCString.call(J)),ne(J)&&(U=" "+g(J)),A.length===0&&(!I||J.length==0))return F[0]+U+F[1];if($<0)return L(J)?x.stylize(RegExp.prototype.toString.call(J),"regexp"):x.stylize("[Object]","special");x.seen.push(J);var v;return I?v=d(x,J,$,S,A):v=A.map(function(re){return y(x,J,$,S,re,I)}),x.seen.pop(),w(v,U,F)}function m(x,J){if(j(J))return x.stylize("undefined","undefined");if(N(J)){var $="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize($,"string")}if(R(J))return x.stylize(""+J,"number");if(p(J))return x.stylize(""+J,"boolean");if(_(J))return x.stylize("null","null")}function g(x){return"["+Error.prototype.toString.call(x)+"]"}function d(x,J,$,ie,M){for(var A=[],S=0,G=J.length;S-1&&(A?G=G.split(` `).map(function(I){return" "+I}).join(` `).slice(2):G=` `+G.split(` `).map(function(I){return" "+I}).join(` `))):G=x.stylize("[Circular]","special")),j(S)){if(A&&M.match(/^\d+$/))return G;S=JSON.stringify(""+M),S.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(S=S.slice(1,-1),S=x.stylize(S,"name")):(S=S.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),S=x.stylize(S,"string"))}return S+": "+G}function w(x,J,$){var ie=x.reduce(function(M,A){return A.indexOf(` `)>=0,M+A.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ie>60?$[0]+(J===""?"":J+` `)+" "+x.join(`, `)+" "+$[1]:$[0]+J+" "+x.join(", ")+" "+$[1]}r.types=D4();function b(x){return Array.isArray(x)}r.isArray=b;function p(x){return typeof x=="boolean"}r.isBoolean=p;function _(x){return x===null}r.isNull=_;function k(x){return x==null}r.isNullOrUndefined=k;function R(x){return typeof x=="number"}r.isNumber=R;function N(x){return typeof x=="string"}r.isString=N;function q(x){return typeof x=="symbol"}r.isSymbol=q;function j(x){return x===void 0}r.isUndefined=j;function L(x){return C(x)&&D(x)==="[object RegExp]"}r.isRegExp=L,r.types.isRegExp=L;function C(x){return typeof x=="object"&&x!==null}r.isObject=C;function ue(x){return C(x)&&D(x)==="[object Date]"}r.isDate=ue,r.types.isDate=ue;function ne(x){return C(x)&&(D(x)==="[object Error]"||x instanceof Error)}r.isError=ne,r.types.isNativeError=ne;function B(x){return typeof x=="function"}r.isFunction=B;function Z(x){return x===null||typeof x=="boolean"||typeof x=="number"||typeof x=="string"||typeof x=="symbol"||typeof x>"u"}r.isPrimitive=Z,r.isBuffer=C4();function D(x){return Object.prototype.toString.call(x)}function H(x){return x<10?"0"+x.toString(10):x.toString(10)}var ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function W(){var x=new Date,J=[H(x.getHours()),H(x.getMinutes()),H(x.getSeconds())].join(":");return[x.getDate(),ce[x.getMonth()],J].join(" ")}r.log=function(){console.log("%s - %s",W(),r.format.apply(r,arguments))},r.inherits=en,r._extend=function(x,J){if(!J||!C(J))return x;for(var $=Object.keys(J),ie=$.length;ie--;)x[$[ie]]=J[$[ie]];return x};function pe(x,J){return Object.prototype.hasOwnProperty.call(x,J)}var X=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(X&&J[X]){var $=J[X];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,X,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var ie,M,A=new Promise(function(U,I){ie=U,M=I}),S=[],G=0;G0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(y){var w={data:y,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var w=this.head,b=""+w.data;w=w.next;)b+=y+w.data;return b}},{key:"concat",value:function(y){if(this.length===0)return a.alloc(0);for(var w=a.allocUnsafe(y>>>0),b=this.head,p=0;b;)m(b.data,w,p),p+=b.data.length,b=b.next;return w}},{key:"consume",value:function(y,w){var b;return y_.length?_.length:y;if(k===_.length?p+=_:p+=_.slice(0,y),y-=k,y===0){k===_.length?(++b,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(k));break}++b}return this.length-=b,p}},{key:"_getBuffer",value:function(y){var w=a.allocUnsafe(y),b=this.head,p=1;for(b.data.copy(w),y-=b.data.length;b=b.next;){var _=b.data,k=y>_.length?_.length:y;if(_.copy(w,w.length-y,0,k),y-=k,y===0){k===_.length?(++p,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=_.slice(k));break}++p}return this.length-=p,w}},{key:f,value:function(y,w){return l(this,e({},w,{depth:0,customInspect:!1}))}}]),g}(),Cu}var xu,no;function Il(){if(no)return xu;no=1;function r(s,a){var o=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(a?a(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,je.nextTick(i,this,s)):je.nextTick(i,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(m){!a&&m?o._writableState?o._writableState.errorEmitted?je.nextTick(t,o):(o._writableState.errorEmitted=!0,je.nextTick(e,o,m)):je.nextTick(e,o,m):a?(je.nextTick(t,o),a(m)):je.nextTick(t,o)}),this)}function e(s,a){i(s,a),t(s)}function t(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(s,a){s.emit("error",a)}function u(s,a){var o=s._readableState,l=s._writableState;o&&o.autoDestroy||l&&l.autoDestroy?s.destroy(a):s.emit("error",a)}return xu={destroy:r,undestroy:n,errorOrDestroy:u},xu}var Ru={},io;function _n(){if(io)return Ru;io=1;function r(a,o){a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.__proto__=o}var e={};function t(a,o,l){l||(l=Error);function f(g,d,y){return typeof o=="string"?o:o(g,d,y)}var m=function(g){r(d,g);function d(y,w,b){return g.call(this,f(y,w,b))||this}return d}(l);m.prototype.name=l.name,m.prototype.code=a,e[a]=m}function n(a,o){if(Array.isArray(a)){var l=a.length;return a=a.map(function(f){return String(f)}),l>2?"one of ".concat(o," ").concat(a.slice(0,l-1).join(", "),", or ")+a[l-1]:l===2?"one of ".concat(o," ").concat(a[0]," or ").concat(a[1]):"of ".concat(o," ").concat(a[0])}else return"of ".concat(o," ").concat(String(a))}function i(a,o,l){return a.substr(!l||l<0?0:+l,o.length)===o}function u(a,o,l){return(l===void 0||l>a.length)&&(l=a.length),a.substring(l-o.length,l)===o}function s(a,o,l){return typeof l!="number"&&(l=0),l+o.length>a.length?!1:a.indexOf(o,l)!==-1}return t("ERR_INVALID_OPT_VALUE",function(a,o){return'The value "'+o+'" is invalid for option "'+a+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(a,o,l){var f;typeof o=="string"&&i(o,"not ")?(f="must not be",o=o.replace(/^not /,"")):f="must be";var m;if(u(a," argument"))m="The ".concat(a," ").concat(f," ").concat(n(o,"type"));else{var g=s(a,".")?"property":"argument";m='The "'.concat(a,'" ').concat(g," ").concat(f," ").concat(n(o,"type"))}return m+=". Received type ".concat(typeof l),m},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ru.codes=e,Ru}var Iu,uo;function Fl(){if(uo)return Iu;uo=1;var r=_n().codes.ERR_INVALID_OPT_VALUE;function e(n,i,u){return n.highWaterMark!=null?n.highWaterMark:i?n[u]:null}function t(n,i,u,s){var a=e(i,s,u);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var o=s?u:"highWaterMark";throw new r(o,a)}return Math.floor(a)}return n.objectMode?16:16*1024}return Iu={getHighWaterMark:t},Iu}var Fu,so;function R4(){if(so)return Fu;so=1,Fu=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function u(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}return u}function e(t){try{if(!Tr.localStorage)return!1}catch{return!1}var n=Tr.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return Fu}var Bu,ao;function Bl(){if(ao)return Bu;ao=1,Bu=L;function r(M){var A=this;this.next=null,this.entry=null,this.finish=function(){ie(A,M)}}var e;L.WritableState=q;var t={deprecate:R4()},n=Al(),i=Li().Buffer,u=Tr.Uint8Array||function(){};function s(M){return i.from(M)}function a(M){return i.isBuffer(M)||M instanceof u}var o=Il(),l=Fl(),f=l.getHighWaterMark,m=_n().codes,g=m.ERR_INVALID_ARG_TYPE,d=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_MULTIPLE_CALLBACK,w=m.ERR_STREAM_CANNOT_PIPE,b=m.ERR_STREAM_DESTROYED,p=m.ERR_STREAM_NULL_VALUES,_=m.ERR_STREAM_WRITE_AFTER_END,k=m.ERR_UNKNOWN_ENCODING,R=o.errorOrDestroy;en(L,n);function N(){}function q(M,A,S){e=e||pn(),M=M||{},typeof S!="boolean"&&(S=A instanceof e),this.objectMode=!!M.objectMode,S&&(this.objectMode=this.objectMode||!!M.writableObjectMode),this.highWaterMark=f(this,M,"writableHighWaterMark",S),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=M.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=M.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){ce(A,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}q.prototype.getBuffer=function(){for(var A=this.bufferedRequest,S=[];A;)S.push(A),A=A.next;return S},function(){try{Object.defineProperty(q.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var j;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(A){return j.call(this,A)?!0:this!==L?!1:A&&A._writableState instanceof q}})):j=function(A){return A instanceof this};function L(M){e=e||pn();var A=this instanceof e;if(!A&&!j.call(L,this))return new L(M);this._writableState=new q(M,this,A),this.writable=!0,M&&(typeof M.write=="function"&&(this._write=M.write),typeof M.writev=="function"&&(this._writev=M.writev),typeof M.destroy=="function"&&(this._destroy=M.destroy),typeof M.final=="function"&&(this._final=M.final)),n.call(this)}L.prototype.pipe=function(){R(this,new w)};function C(M,A){var S=new _;R(M,S),je.nextTick(A,S)}function ue(M,A,S,G){var U;return S===null?U=new p:typeof S!="string"&&!A.objectMode&&(U=new g("chunk",["string","Buffer"],S)),U?(R(M,U),je.nextTick(G,U),!1):!0}L.prototype.write=function(M,A,S){var G=this._writableState,U=!1,I=!G.objectMode&&a(M);return I&&!i.isBuffer(M)&&(M=s(M)),typeof A=="function"&&(S=A,A=null),I?A="buffer":A||(A=G.defaultEncoding),typeof S!="function"&&(S=N),G.ending?C(this,S):(I||ue(this,G,M,S))&&(G.pendingcb++,U=B(this,G,I,M,A,S)),U},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var M=this._writableState;M.corked&&(M.corked--,!M.writing&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&X(this,M))},L.prototype.setDefaultEncoding=function(A){if(typeof A=="string"&&(A=A.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((A+"").toLowerCase())>-1))throw new k(A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ne(M,A,S){return!M.objectMode&&M.decodeStrings!==!1&&typeof A=="string"&&(A=i.from(A,S)),A}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function B(M,A,S,G,U,I){if(!S){var F=ne(A,G,U);G!==F&&(S=!0,U="buffer",G=F)}var ee=A.objectMode?1:G.length;A.length+=ee;var v=A.length>5===6?2:p>>4===14?3:p>>3===30?4:p>>6===2?-1:-2}function s(p,_,k){var R=_.length-1;if(R=0?(N>0&&(p.lastNeed=N-1),N):--R=0?(N>0&&(p.lastNeed=N-2),N):--R=0?(N>0&&(N===2?N=0:p.lastNeed=N-3),N):0))}function a(p,_,k){if((_[0]&192)!==128)return p.lastNeed=0,"�";if(p.lastNeed>1&&_.length>1){if((_[1]&192)!==128)return p.lastNeed=1,"�";if(p.lastNeed>2&&_.length>2&&(_[2]&192)!==128)return p.lastNeed=2,"�"}}function o(p){var _=this.lastTotal-this.lastNeed,k=a(this,p);if(k!==void 0)return k;if(this.lastNeed<=p.length)return p.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,_,0,p.length),this.lastNeed-=p.length}function l(p,_){var k=s(this,p,_);if(!this.lastNeed)return p.toString("utf8",_);this.lastTotal=k;var R=p.length-(k-this.lastNeed);return p.copy(this.lastChar,0,R),p.toString("utf8",_,R)}function f(p){var _=p&&p.length?this.write(p):"";return this.lastNeed?_+"�":_}function m(p,_){if((p.length-_)%2===0){var k=p.toString("utf16le",_);if(k){var R=k.charCodeAt(k.length-1);if(R>=55296&&R<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],k.slice(0,-1)}return k}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",_,p.length-1)}function g(p){var _=p&&p.length?this.write(p):"";if(this.lastNeed){var k=this.lastTotal-this.lastNeed;return _+this.lastChar.toString("utf16le",0,k)}return _}function d(p,_){var k=(p.length-_)%3;return k===0?p.toString("base64",_):(this.lastNeed=3-k,this.lastTotal=3,k===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",_,p.length-k))}function y(p){var _=p&&p.length?this.write(p):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function w(p){return p.toString(this.encoding)}function b(p){return p&&p.length?this.write(p):""}return Ou}var Pu,fo;function ds(){if(fo)return Pu;fo=1;var r=_n().codes.ERR_STREAM_PREMATURE_CLOSE;function e(u){var s=!1;return function(){if(!s){s=!0;for(var a=arguments.length,o=new Array(a),l=0;l0)if(typeof F!="string"&&!T.objectMode&&Object.getPrototypeOf(F)!==n.prototype&&(F=u(F)),v)T.endEmitted?N(I,new p):ne(I,T,F,!0);else if(T.ended)N(I,new w);else{if(T.destroyed)return!1;T.reading=!1,T.decoder&&!ee?(F=T.decoder.write(F),T.objectMode||F.length!==0?ne(I,T,F,!1):X(I,T)):ne(I,T,F,!1)}else v||(T.reading=!1,X(I,T))}return!T.ended&&(T.length=Z?I=Z:(I--,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I++),I}function H(I,F){return I<=0||F.length===0&&F.ended?0:F.objectMode?1:I!==I?F.flowing&&F.length?F.buffer.head.data.length:F.length:(I>F.highWaterMark&&(F.highWaterMark=D(I)),I<=F.length?I:F.ended?F.length:(F.needReadable=!0,0))}C.prototype.read=function(I){o("read",I),I=parseInt(I,10);var F=this._readableState,ee=I;if(I!==0&&(F.emittedReadable=!1),I===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended))return o("read: emitReadable",F.length,F.ended),F.length===0&&F.ended?S(this):W(this),null;if(I=H(I,F),I===0&&F.ended)return F.length===0&&S(this),null;var v=F.needReadable;o("need readable",v),(F.length===0||F.length-I0?re=A(I,F):re=null,re===null?(F.needReadable=F.length<=F.highWaterMark,I=0):(F.length-=I,F.awaitDrain=0),F.length===0&&(F.ended||(F.needReadable=!0),ee!==I&&F.ended&&S(this)),re!==null&&this.emit("data",re),re};function ce(I,F){if(o("onEofChunk"),!F.ended){if(F.decoder){var ee=F.decoder.end();ee&&ee.length&&(F.buffer.push(ee),F.length+=F.objectMode?1:ee.length)}F.ended=!0,F.sync?W(I):(F.needReadable=!1,F.emittedReadable||(F.emittedReadable=!0,pe(I)))}}function W(I){var F=I._readableState;o("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,F.emittedReadable||(o("emitReadable",F.flowing),F.emittedReadable=!0,je.nextTick(pe,I))}function pe(I){var F=I._readableState;o("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended)&&(I.emit("readable"),F.emittedReadable=!1),F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,M(I)}function X(I,F){F.readingMore||(F.readingMore=!0,je.nextTick(Ae,I,F))}function Ae(I,F){for(;!F.reading&&!F.ended&&(F.length1&&U(v.pipes,I)!==-1)&&!O&&(o("false write response, pause",v.awaitDrain),v.awaitDrain++),ee.pause())}function oe(Fe){o("onerror",Fe),Ce(),I.removeListener("error",oe),e(I,"error")===0&&N(I,Fe)}j(I,"error",oe);function we(){I.removeListener("finish",de),Ce()}I.once("close",we);function de(){o("onfinish"),I.removeListener("close",we),Ce()}I.once("finish",de);function Ce(){o("unpipe"),ee.unpipe(I)}return I.emit("pipe",ee),v.flowing||(o("pipe resume"),ee.resume()),I};function V(I){return function(){var ee=I._readableState;o("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&e(I,"data")&&(ee.flowing=!0,M(I))}}C.prototype.unpipe=function(I){var F=this._readableState,ee={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1)return I&&I!==F.pipes?this:(I||(I=F.pipes),F.pipes=null,F.pipesCount=0,F.flowing=!1,I&&I.emit("unpipe",this,ee),this);if(!I){var v=F.pipes,re=F.pipesCount;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var T=0;T0,v.flowing!==!1&&this.resume()):I==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,o("on readable",v.length,v.reading),v.length?W(this):v.reading||je.nextTick(J,this)),ee},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(I,F){var ee=t.prototype.removeListener.call(this,I,F);return I==="readable"&&je.nextTick(x,this),ee},C.prototype.removeAllListeners=function(I){var F=t.prototype.removeAllListeners.apply(this,arguments);return(I==="readable"||I===void 0)&&je.nextTick(x,this),F};function x(I){var F=I._readableState;F.readableListening=I.listenerCount("readable")>0,F.resumeScheduled&&!F.paused?F.flowing=!0:I.listenerCount("data")>0&&I.resume()}function J(I){o("readable nexttick read 0"),I.read(0)}C.prototype.resume=function(){var I=this._readableState;return I.flowing||(o("resume"),I.flowing=!I.readableListening,$(this,I)),I.paused=!1,this};function $(I,F){F.resumeScheduled||(F.resumeScheduled=!0,je.nextTick(ie,I,F))}function ie(I,F){o("resume",F.reading),F.reading||I.read(0),F.resumeScheduled=!1,I.emit("resume"),M(I),F.flowing&&!F.reading&&I.read(0)}C.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function M(I){var F=I._readableState;for(o("flow",F.flowing);F.flowing&&I.read()!==null;);}C.prototype.wrap=function(I){var F=this,ee=this._readableState,v=!1;I.on("end",function(){if(o("wrapped end"),ee.decoder&&!ee.ended){var c=ee.decoder.end();c&&c.length&&F.push(c)}F.push(null)}),I.on("data",function(c){if(o("wrapped data"),ee.decoder&&(c=ee.decoder.write(c)),!(ee.objectMode&&c==null)&&!(!ee.objectMode&&(!c||!c.length))){var h=F.push(c);h||(v=!0,I.pause())}});for(var re in I)this[re]===void 0&&typeof I[re]=="function"&&(this[re]=function(h){return function(){return I[h].apply(I,arguments)}}(re));for(var T=0;T=F.length?(F.decoder?ee=F.buffer.join(""):F.buffer.length===1?ee=F.buffer.first():ee=F.buffer.concat(F.length),F.buffer.clear()):ee=F.buffer.consume(I,F.decoder),ee}function S(I){var F=I._readableState;o("endReadable",F.endEmitted),F.endEmitted||(F.ended=!0,je.nextTick(G,F,I))}function G(I,F){if(o("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,F.readable=!1,F.emit("end"),I.autoDestroy)){var ee=F._writableState;(!ee||ee.autoDestroy&&ee.finished)&&F.destroy()}}typeof Symbol=="function"&&(C.from=function(I,F){return R===void 0&&(R=B4()),R(C,I,F)});function U(I,F){for(var ee=0,v=I.length;ee0;return a(_,R,N,function(q){b||(b=q),q&&p.forEach(o),!R&&(p.forEach(o),w(b))})});return d.reduce(l)}return Hu=m,Hu}var ps=sr,ms=ls.EventEmitter,P4=en;P4(sr,ms);sr.Readable=Nl();sr.Writable=Bl();sr.Duplex=pn();sr.Transform=Ol();sr.PassThrough=N4();sr.finished=ds();sr.pipeline=O4();sr.Stream=sr;function sr(){ms.call(this)}sr.prototype.pipe=function(r,e){var t=this;function n(f){r.writable&&r.write(f)===!1&&t.pause&&t.pause()}t.on("data",n);function i(){t.readable&&t.resume&&t.resume()}r.on("drain",i),!r._isStdio&&(!e||e.end!==!1)&&(t.on("end",s),t.on("close",a));var u=!1;function s(){u||(u=!0,r.end())}function a(){u||(u=!0,typeof r.destroy=="function"&&r.destroy())}function o(f){if(l(),ms.listenerCount(this,"error")===0)throw f}t.on("error",o),r.on("error",o);function l(){t.removeListener("data",n),r.removeListener("drain",i),t.removeListener("end",s),t.removeListener("close",a),t.removeListener("error",o),r.removeListener("error",o),t.removeListener("end",l),t.removeListener("close",l),r.removeListener("close",l)}return t.on("end",l),t.on("close",l),r.on("close",l),r.emit("pipe",t),r};(function(r){(function(e){e.parser=function(A,S){return new n(A,S)},e.SAXParser=n,e.SAXStream=f,e.createStream=l,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(A,S){if(!(this instanceof n))return new n(A,S);var G=this;u(G),G.q=G.c="",G.bufferCheckPosition=e.MAX_BUFFER_LENGTH,G.opt=S||{},G.opt.lowercase=G.opt.lowercase||G.opt.lowercasetags,G.looseCase=G.opt.lowercase?"toLowerCase":"toUpperCase",G.tags=[],G.closed=G.closedRoot=G.sawRoot=!1,G.tag=G.error=null,G.strict=!!A,G.noscript=!!(A||G.opt.noscript),G.state=C.BEGIN,G.strictEntities=G.opt.strictEntities,G.ENTITIES=G.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),G.attribList=[],G.opt.xmlns&&(G.ns=Object.create(w)),G.trackPosition=G.opt.position!==!1,G.trackPosition&&(G.position=G.line=G.column=0),ne(G,"onready")}Object.create||(Object.create=function(A){function S(){}S.prototype=A;var G=new S;return G}),Object.keys||(Object.keys=function(A){var S=[];for(var G in A)A.hasOwnProperty(G)&&S.push(G);return S});function i(A){for(var S=Math.max(e.MAX_BUFFER_LENGTH,10),G=0,U=0,I=t.length;US)switch(t[U]){case"textNode":Z(A);break;case"cdata":B(A,"oncdata",A.cdata),A.cdata="";break;case"script":B(A,"onscript",A.script),A.script="";break;default:H(A,"Max buffer length exceeded: "+t[U])}G=Math.max(G,F)}var ee=e.MAX_BUFFER_LENGTH-G;A.bufferCheckPosition=ee+A.position}function u(A){for(var S=0,G=t.length;S"||R(A)}function j(A,S){return A.test(S)}function L(A,S){return!j(A,S)}var C=0;e.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(A){var S=e.ENTITIES[A],G=typeof S=="number"?String.fromCharCode(S):S;e.ENTITIES[A]=G});for(var ue in e.STATE)e.STATE[e.STATE[ue]]=ue;C=e.STATE;function ne(A,S,G){A[S]&&A[S](G)}function B(A,S,G){A.textNode&&Z(A),ne(A,S,G)}function Z(A){A.textNode=D(A.opt,A.textNode),A.textNode&&ne(A,"ontext",A.textNode),A.textNode=""}function D(A,S){return A.trim&&(S=S.trim()),A.normalize&&(S=S.replace(/\s+/g," ")),S}function H(A,S){return Z(A),A.trackPosition&&(S+=` Line: `+A.line+` Column: `+A.column+` Char: `+A.c),S=new Error(S),A.error=S,ne(A,"onerror",S),A}function ce(A){return A.sawRoot&&!A.closedRoot&&W(A,"Unclosed root tag"),A.state!==C.BEGIN&&A.state!==C.BEGIN_WHITESPACE&&A.state!==C.TEXT&&H(A,"Unexpected end"),Z(A),A.c="",A.closed=!0,ne(A,"onend"),n.call(A,A.strict,A.opt),A}function W(A,S){if(typeof A!="object"||!(A instanceof n))throw new Error("bad call to strictFail");A.strict&&H(A,S)}function pe(A){A.strict||(A.tagName=A.tagName[A.looseCase]());var S=A.tags[A.tags.length-1]||A,G=A.tag={name:A.tagName,attributes:{}};A.opt.xmlns&&(G.ns=S.ns),A.attribList.length=0,B(A,"onopentagstart",G)}function X(A,S){var G=A.indexOf(":"),U=G<0?["",A]:A.split(":"),I=U[0],F=U[1];return S&&A==="xmlns"&&(I="xmlns",F=""),{prefix:I,local:F}}function Ae(A){if(A.strict||(A.attribName=A.attribName[A.looseCase]()),A.attribList.indexOf(A.attribName)!==-1||A.tag.attributes.hasOwnProperty(A.attribName)){A.attribName=A.attribValue="";return}if(A.opt.xmlns){var S=X(A.attribName,!0),G=S.prefix,U=S.local;if(G==="xmlns")if(U==="xml"&&A.attribValue!==d)W(A,"xml: prefix must be bound to "+d+` Actual: `+A.attribValue);else if(U==="xmlns"&&A.attribValue!==y)W(A,"xmlns: prefix must be bound to "+y+` Actual: `+A.attribValue);else{var I=A.tag,F=A.tags[A.tags.length-1]||A;I.ns===F.ns&&(I.ns=Object.create(F.ns)),I.ns[U]=A.attribValue}A.attribList.push([A.attribName,A.attribValue])}else A.tag.attributes[A.attribName]=A.attribValue,B(A,"onattribute",{name:A.attribName,value:A.attribValue});A.attribName=A.attribValue=""}function V(A,S){if(A.opt.xmlns){var G=A.tag,U=X(A.tagName);G.prefix=U.prefix,G.local=U.local,G.uri=G.ns[U.prefix]||"",G.prefix&&!G.uri&&(W(A,"Unbound namespace prefix: "+JSON.stringify(A.tagName)),G.uri=U.prefix);var I=A.tags[A.tags.length-1]||A;G.ns&&I.ns!==G.ns&&Object.keys(G.ns).forEach(function(z){B(A,"onopennamespace",{prefix:z,uri:G.ns[z]})});for(var F=0,ee=A.attribList.length;F",A.tagName="",A.state=C.SCRIPT;return}B(A,"onscript",A.script),A.script=""}var S=A.tags.length,G=A.tagName;A.strict||(G=G[A.looseCase]());for(var U=G;S--;){var I=A.tags[S];if(I.name!==U)W(A,"Unexpected close tag");else break}if(S<0){W(A,"Unmatched closing tag: "+A.tagName),A.textNode+="",A.state=C.TEXT;return}A.tagName=G;for(var F=A.tags.length;F-- >S;){var ee=A.tag=A.tags.pop();A.tagName=A.tag.name,B(A,"onclosetag",A.tagName);var v={};for(var re in ee.ns)v[re]=ee.ns[re];var T=A.tags[A.tags.length-1]||A;A.opt.xmlns&&ee.ns!==T.ns&&Object.keys(ee.ns).forEach(function(c){var h=ee.ns[c];B(A,"onclosenamespace",{prefix:c,uri:h})})}S===0&&(A.closedRoot=!0),A.tagName=A.attribValue=A.attribName="",A.attribList.length=0,A.state=C.TEXT}function J(A){var S=A.entity,G=S.toLowerCase(),U,I="";return A.ENTITIES[S]?A.ENTITIES[S]:A.ENTITIES[G]?A.ENTITIES[G]:(S=G,S.charAt(0)==="#"&&(S.charAt(1)==="x"?(S=S.slice(2),U=parseInt(S,16),I=U.toString(16)):(S=S.slice(1),U=parseInt(S,10),I=U.toString(10))),S=S.replace(/^0+/,""),isNaN(U)||I.toLowerCase()!==S?(W(A,"Invalid character entity"),"&"+A.entity+";"):String.fromCodePoint(U))}function $(A,S){S==="<"?(A.state=C.OPEN_WAKA,A.startTagPosition=A.position):R(S)||(W(A,"Non-whitespace before first tag."),A.textNode=S,A.state=C.TEXT)}function ie(A,S){var G="";return S"?(B(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=C.TEXT):(N(U)&&(S.state=C.SGML_DECL_QUOTED),S.sgmlDecl+=U);continue;case C.SGML_DECL_QUOTED:U===S.q&&(S.state=C.SGML_DECL,S.q=""),S.sgmlDecl+=U;continue;case C.DOCTYPE:U===">"?(S.state=C.TEXT,B(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=U,U==="["?S.state=C.DOCTYPE_DTD:N(U)&&(S.state=C.DOCTYPE_QUOTED,S.q=U));continue;case C.DOCTYPE_QUOTED:S.doctype+=U,U===S.q&&(S.q="",S.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:S.doctype+=U,U==="]"?S.state=C.DOCTYPE:N(U)&&(S.state=C.DOCTYPE_DTD_QUOTED,S.q=U);continue;case C.DOCTYPE_DTD_QUOTED:S.doctype+=U,U===S.q&&(S.state=C.DOCTYPE_DTD,S.q="");continue;case C.COMMENT:U==="-"?S.state=C.COMMENT_ENDING:S.comment+=U;continue;case C.COMMENT_ENDING:U==="-"?(S.state=C.COMMENT_ENDED,S.comment=D(S.opt,S.comment),S.comment&&B(S,"oncomment",S.comment),S.comment=""):(S.comment+="-"+U,S.state=C.COMMENT);continue;case C.COMMENT_ENDED:U!==">"?(W(S,"Malformed comment"),S.comment+="--"+U,S.state=C.COMMENT):S.state=C.TEXT;continue;case C.CDATA:U==="]"?S.state=C.CDATA_ENDING:S.cdata+=U;continue;case C.CDATA_ENDING:U==="]"?S.state=C.CDATA_ENDING_2:(S.cdata+="]"+U,S.state=C.CDATA);continue;case C.CDATA_ENDING_2:U===">"?(S.cdata&&B(S,"oncdata",S.cdata),B(S,"onclosecdata"),S.cdata="",S.state=C.TEXT):U==="]"?S.cdata+="]":(S.cdata+="]]"+U,S.state=C.CDATA);continue;case C.PROC_INST:U==="?"?S.state=C.PROC_INST_ENDING:R(U)?S.state=C.PROC_INST_BODY:S.procInstName+=U;continue;case C.PROC_INST_BODY:if(!S.procInstBody&&R(U))continue;U==="?"?S.state=C.PROC_INST_ENDING:S.procInstBody+=U;continue;case C.PROC_INST_ENDING:U===">"?(B(S,"onprocessinginstruction",{name:S.procInstName,body:S.procInstBody}),S.procInstName=S.procInstBody="",S.state=C.TEXT):(S.procInstBody+="?"+U,S.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:j(p,U)?S.tagName+=U:(pe(S),U===">"?V(S):U==="/"?S.state=C.OPEN_TAG_SLASH:(R(U)||W(S,"Invalid character in tag name"),S.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:U===">"?(V(S,!0),x(S)):(W(S,"Forward-slash in opening tag not followed by >"),S.state=C.ATTRIB);continue;case C.ATTRIB:if(R(U))continue;U===">"?V(S):U==="/"?S.state=C.OPEN_TAG_SLASH:j(b,U)?(S.attribName=U,S.attribValue="",S.state=C.ATTRIB_NAME):W(S,"Invalid attribute name");continue;case C.ATTRIB_NAME:U==="="?S.state=C.ATTRIB_VALUE:U===">"?(W(S,"Attribute without value"),S.attribValue=S.attribName,Ae(S),V(S)):R(U)?S.state=C.ATTRIB_NAME_SAW_WHITE:j(p,U)?S.attribName+=U:W(S,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if(U==="=")S.state=C.ATTRIB_VALUE;else{if(R(U))continue;W(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",B(S,"onattribute",{name:S.attribName,value:""}),S.attribName="",U===">"?V(S):j(b,U)?(S.attribName=U,S.state=C.ATTRIB_NAME):(W(S,"Invalid attribute name"),S.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(R(U))continue;N(U)?(S.q=U,S.state=C.ATTRIB_VALUE_QUOTED):(W(S,"Unquoted attribute value"),S.state=C.ATTRIB_VALUE_UNQUOTED,S.attribValue=U);continue;case C.ATTRIB_VALUE_QUOTED:if(U!==S.q){U==="&"?S.state=C.ATTRIB_VALUE_ENTITY_Q:S.attribValue+=U;continue}Ae(S),S.q="",S.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:R(U)?S.state=C.ATTRIB:U===">"?V(S):U==="/"?S.state=C.OPEN_TAG_SLASH:j(b,U)?(W(S,"No whitespace between attributes"),S.attribName=U,S.attribValue="",S.state=C.ATTRIB_NAME):W(S,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(!q(U)){U==="&"?S.state=C.ATTRIB_VALUE_ENTITY_U:S.attribValue+=U;continue}Ae(S),U===">"?V(S):S.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(S.tagName)U===">"?x(S):j(p,U)?S.tagName+=U:S.script?(S.script+=""?x(S):W(S,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var ee,v;switch(S.state){case C.TEXT_ENTITY:ee=C.TEXT,v="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:ee=C.ATTRIB_VALUE_QUOTED,v="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:ee=C.ATTRIB_VALUE_UNQUOTED,v="attribValue";break}U===";"?(S[v]+=J(S),S.entity="",S.state=ee):j(S.entity.length?k:_,U)?S.entity+=U:(W(S,"Invalid character in entity name"),S[v]+="&"+S.entity+U,S.entity="",S.state=ee);continue;default:throw new Error(S,"Unknown state: "+S.state)}return S.position>=S.bufferCheckPosition&&i(S),S}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var A=String.fromCharCode,S=Math.floor,G=function(){var U=16384,I=[],F,ee,v=-1,re=arguments.length;if(!re)return"";for(var T="";++v1114111||S(c)!==c)throw RangeError("Invalid code point: "+c);c<=65535?I.push(c):(c-=65536,F=(c>>10)+55296,ee=c%1024+56320,I.push(F,ee)),(v+1===re||I.length>U)&&(T+=A.apply(null,I),I.length=0)}return T};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G}()})(r)})(fl);var gs={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}},L4=gs.isArray,ws={copyOptions:function(r){var e,t={};for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t},ensureFlagExists:function(r,e){(!(r in e)||typeof e[r]!="boolean")&&(e[r]=!1)},ensureSpacesExists:function(r){(!("spaces"in r)||typeof r.spaces!="number"&&typeof r.spaces!="string")&&(r.spaces=0)},ensureAlwaysArrayExists:function(r){(!("alwaysArray"in r)||typeof r.alwaysArray!="boolean"&&!L4(r.alwaysArray))&&(r.alwaysArray=!1)},ensureKeyExists:function(r,e){(!(r+"Key"in e)||typeof e[r+"Key"]!="string")&&(e[r+"Key"]=e.compact?"_"+r:r)},checkFnExists:function(r,e){return r+"Fn"in e}},M4=fl,Ze=ws,fn=gs.isArray,le,Ue;function U4(r){return le=Ze.copyOptions(r),Ze.ensureFlagExists("ignoreDeclaration",le),Ze.ensureFlagExists("ignoreInstruction",le),Ze.ensureFlagExists("ignoreAttributes",le),Ze.ensureFlagExists("ignoreText",le),Ze.ensureFlagExists("ignoreComment",le),Ze.ensureFlagExists("ignoreCdata",le),Ze.ensureFlagExists("ignoreDoctype",le),Ze.ensureFlagExists("compact",le),Ze.ensureFlagExists("alwaysChildren",le),Ze.ensureFlagExists("addParent",le),Ze.ensureFlagExists("trim",le),Ze.ensureFlagExists("nativeType",le),Ze.ensureFlagExists("nativeTypeAttributes",le),Ze.ensureFlagExists("sanitize",le),Ze.ensureFlagExists("instructionHasAttributes",le),Ze.ensureFlagExists("captureSpacesBetweenElements",le),Ze.ensureAlwaysArrayExists(le),Ze.ensureKeyExists("declaration",le),Ze.ensureKeyExists("instruction",le),Ze.ensureKeyExists("attributes",le),Ze.ensureKeyExists("text",le),Ze.ensureKeyExists("comment",le),Ze.ensureKeyExists("cdata",le),Ze.ensureKeyExists("doctype",le),Ze.ensureKeyExists("type",le),Ze.ensureKeyExists("name",le),Ze.ensureKeyExists("elements",le),Ze.ensureKeyExists("parent",le),le}function Pl(r){var e=Number(r);if(!isNaN(e))return e;var t=r.toLowerCase();return t==="true"?!0:t==="false"?!1:r}function Zn(r,e){var t;if(le.compact){if(!Ue[le[r+"Key"]]&&(fn(le.alwaysArray)?le.alwaysArray.indexOf(le[r+"Key"])!==-1:le.alwaysArray)&&(Ue[le[r+"Key"]]=[]),Ue[le[r+"Key"]]&&!fn(Ue[le[r+"Key"]])&&(Ue[le[r+"Key"]]=[Ue[le[r+"Key"]]]),r+"Fn"in le&&typeof e=="string"&&(e=le[r+"Fn"](e,Ue)),r==="instruction"&&("instructionFn"in le||"instructionNameFn"in le)){for(t in e)if(e.hasOwnProperty(t))if("instructionFn"in le)e[t]=le.instructionFn(e[t],t,Ue);else{var n=e[t];delete e[t],e[le.instructionNameFn(t,n,Ue)]=n}}fn(Ue[le[r+"Key"]])?Ue[le[r+"Key"]].push(e):Ue[le[r+"Key"]]=e}else{Ue[le.elementsKey]||(Ue[le.elementsKey]=[]);var i={};if(i[le.typeKey]=r,r==="instruction"){for(t in e)if(e.hasOwnProperty(t))break;i[le.nameKey]="instructionNameFn"in le?le.instructionNameFn(t,e,Ue):t,le.instructionHasAttributes?(i[le.attributesKey]=e[t][le.attributesKey],"instructionFn"in le&&(i[le.attributesKey]=le.instructionFn(i[le.attributesKey],t,Ue))):("instructionFn"in le&&(e[t]=le.instructionFn(e[t],t,Ue)),i[le.instructionKey]=e[t])}else r+"Fn"in le&&(e=le[r+"Fn"](e,Ue)),i[le[r+"Key"]]=e;le.addParent&&(i[le.parentKey]=Ue),Ue[le.elementsKey].push(i)}}function Ll(r){if("attributesFn"in le&&r&&(r=le.attributesFn(r,Ue)),(le.trim||"attributeValueFn"in le||"attributeNameFn"in le||le.nativeTypeAttributes)&&r){var e;for(e in r)if(r.hasOwnProperty(e)&&(le.trim&&(r[e]=r[e].trim()),le.nativeTypeAttributes&&(r[e]=Pl(r[e])),"attributeValueFn"in le&&(r[e]=le.attributeValueFn(r[e],e,Ue)),"attributeNameFn"in le)){var t=r[e];delete r[e],r[le.attributeNameFn(e,r[e],Ue)]=t}}return r}function z4(r){var e={};if(r.body&&(r.name.toLowerCase()==="xml"||le.instructionHasAttributes)){for(var t=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,n;(n=t.exec(r.body))!==null;)e[n[1]]=n[2]||n[3]||n[4];e=Ll(e)}if(r.name.toLowerCase()==="xml"){if(le.ignoreDeclaration)return;Ue[le.declarationKey]={},Object.keys(e).length&&(Ue[le.declarationKey][le.attributesKey]=e),le.addParent&&(Ue[le.declarationKey][le.parentKey]=Ue)}else{if(le.ignoreInstruction)return;le.trim&&(r.body=r.body.trim());var i={};le.instructionHasAttributes&&Object.keys(e).length?(i[r.name]={},i[r.name][le.attributesKey]=e):i[r.name]=r.body,Zn("instruction",i)}}function j4(r,e){var t;if(typeof r=="object"&&(e=r.attributes,r=r.name),e=Ll(e),"elementNameFn"in le&&(r=le.elementNameFn(r,Ue)),le.compact){if(t={},!le.ignoreAttributes&&e&&Object.keys(e).length){t[le.attributesKey]={};var n;for(n in e)e.hasOwnProperty(n)&&(t[le.attributesKey][n]=e[n])}!(r in Ue)&&(fn(le.alwaysArray)?le.alwaysArray.indexOf(r)!==-1:le.alwaysArray)&&(Ue[r]=[]),Ue[r]&&!fn(Ue[r])&&(Ue[r]=[Ue[r]]),fn(Ue[r])?Ue[r].push(t):Ue[r]=t}else Ue[le.elementsKey]||(Ue[le.elementsKey]=[]),t={},t[le.typeKey]="element",t[le.nameKey]=r,!le.ignoreAttributes&&e&&Object.keys(e).length&&(t[le.attributesKey]=e),le.alwaysChildren&&(t[le.elementsKey]=[]),Ue[le.elementsKey].push(t);t[le.parentKey]=Ue,Ue=t}function H4(r){le.ignoreText||!r.trim()&&!le.captureSpacesBetweenElements||(le.trim&&(r=r.trim()),le.nativeType&&(r=Pl(r)),le.sanitize&&(r=r.replace(/&/g,"&").replace(//g,">")),Zn("text",r))}function W4(r){le.ignoreComment||(le.trim&&(r=r.trim()),Zn("comment",r))}function G4(r){var e=Ue[le.parentKey];le.addParent||delete Ue[le.parentKey],Ue=e}function V4(r){le.ignoreCdata||(le.trim&&(r=r.trim()),Zn("cdata",r))}function K4(r){le.ignoreDoctype||(r=r.replace(/^ /,""),le.trim&&(r=r.trim()),Zn("doctype",r))}function q4(r){r.note=r}var Ml=function(r,e){var t=M4.parser(!0,{}),n={};if(Ue=n,le=U4(e),t.opt={strictEntities:!0},t.onopentag=j4,t.ontext=H4,t.oncomment=W4,t.onclosetag=G4,t.onerror=q4,t.oncdata=V4,t.ondoctype=K4,t.onprocessinginstruction=z4,t.write(r).close(),n[le.elementsKey]){var i=n[le.elementsKey];delete n[le.elementsKey],n[le.elementsKey]=i,delete n.text}return n},bo=ws,X4=Ml;function Z4(r){var e=bo.copyOptions(r);return bo.ensureSpacesExists(e),e}var Y4=function(r,e){var t,n,i,u;return t=Z4(e),n=X4(r,t),u="compact"in t&&t.compact?"_parent":"parent","addParent"in t&&t.addParent?i=JSON.stringify(n,function(s,a){return s===u?"_":a},t.spaces):i=JSON.stringify(n,null,t.spaces),i.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},st=ws,J4=gs.isArray,Pt,Lt;function Q4(r){var e=st.copyOptions(r);return st.ensureFlagExists("ignoreDeclaration",e),st.ensureFlagExists("ignoreInstruction",e),st.ensureFlagExists("ignoreAttributes",e),st.ensureFlagExists("ignoreText",e),st.ensureFlagExists("ignoreComment",e),st.ensureFlagExists("ignoreCdata",e),st.ensureFlagExists("ignoreDoctype",e),st.ensureFlagExists("compact",e),st.ensureFlagExists("indentText",e),st.ensureFlagExists("indentCdata",e),st.ensureFlagExists("indentAttributes",e),st.ensureFlagExists("indentInstruction",e),st.ensureFlagExists("fullTagEmptyElement",e),st.ensureFlagExists("noQuotesForNativeAttributes",e),st.ensureSpacesExists(e),typeof e.spaces=="number"&&(e.spaces=Array(e.spaces+1).join(" ")),st.ensureKeyExists("declaration",e),st.ensureKeyExists("instruction",e),st.ensureKeyExists("attributes",e),st.ensureKeyExists("text",e),st.ensureKeyExists("comment",e),st.ensureKeyExists("cdata",e),st.ensureKeyExists("doctype",e),st.ensureKeyExists("type",e),st.ensureKeyExists("name",e),st.ensureKeyExists("elements",e),e}function Ar(r,e,t){return(!t&&r.spaces?` `:"")+Array(e+1).join(r.spaces)}function Mi(r,e,t){if(e.ignoreAttributes)return"";"attributesFn"in e&&(r=e.attributesFn(r,Lt,Pt));var n,i,u,s,a=[];for(n in r)r.hasOwnProperty(n)&&r[n]!==null&&r[n]!==void 0&&(s=e.noQuotesForNativeAttributes&&typeof r[n]!="string"?"":'"',i=""+r[n],i=i.replace(/"/g,"""),u="attributeNameFn"in e?e.attributeNameFn(n,i,Lt,Pt):n,a.push(e.spaces&&e.indentAttributes?Ar(e,t+1,!1):" "),a.push(u+"="+s+("attributeValueFn"in e?e.attributeValueFn(i,n,Lt,Pt):i)+s));return r&&Object.keys(r).length&&e.spaces&&e.indentAttributes&&a.push(Ar(e,t,!1)),a.join("")}function Ul(r,e,t){return Pt=r,Lt="xml",e.ignoreDeclaration?"":""}function zl(r,e,t){if(e.ignoreInstruction)return"";var n;for(n in r)if(r.hasOwnProperty(n))break;var i="instructionNameFn"in e?e.instructionNameFn(n,r[n],Lt,Pt):n;if(typeof r[n]=="object")return Pt=r,Lt=i,"";var u=r[n]?r[n]:"";return"instructionFn"in e&&(u=e.instructionFn(u,n,Lt,Pt)),""}function jl(r,e){return e.ignoreComment?"":""}function Hl(r,e){return e.ignoreCdata?"":"","]]]]>"))+"]]>"}function Wl(r,e){return e.ignoreDoctype?"":""}function ys(r,e){return e.ignoreText?"":(r=""+r,r=r.replace(/&/g,"&"),r=r.replace(/&/g,"&").replace(//g,">"),"textFn"in e?e.textFn(r,Lt,Pt):r)}function $4(r,e){var t;if(r.elements&&r.elements.length)for(t=0;t"),r[e.elementsKey]&&r[e.elementsKey].length&&(n.push(Gl(r[e.elementsKey],e,t+1)),Pt=r,Lt=r.name),n.push(e.spaces&&$4(r,e)?` `+Array(t+1).join(e.spaces):""),n.push("")):n.push("/>"),n.join("")}function Gl(r,e,t,n){return r.reduce(function(i,u){var s=Ar(e,t,n&&!i);switch(u.type){case"element":return i+s+eh(u,e,t);case"comment":return i+s+jl(u[e.commentKey],e);case"doctype":return i+s+Wl(u[e.doctypeKey],e);case"cdata":return i+(e.indentCdata?s:"")+Hl(u[e.cdataKey],e);case"text":return i+(e.indentText?s:"")+ys(u[e.textKey],e);case"instruction":var a={};return a[u[e.nameKey]]=u[e.attributesKey]?u:u[e.instructionKey],i+(e.indentInstruction?s:"")+zl(a,e,t)}},"")}function Vl(r,e,t){var n;for(n in r)if(r.hasOwnProperty(n))switch(n){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||t)return!0;break;case e.cdataKey:if(e.indentCdata||t)return!0;break;case e.instructionKey:if(e.indentInstruction||t)return!0;break;case e.doctypeKey:case e.commentKey:return!0;default:return!0}return!1}function th(r,e,t,n,i){Pt=r,Lt=e;var u="elementNameFn"in t?t.elementNameFn(e,r):e;if(typeof r>"u"||r===null||r==="")return"fullTagEmptyElementFn"in t&&t.fullTagEmptyElementFn(e,r)||t.fullTagEmptyElement?"<"+u+">":"<"+u+"/>";var s=[];if(e){if(s.push("<"+u),typeof r!="object")return s.push(">"+ys(r,t)+""),s.join("");r[t.attributesKey]&&s.push(Mi(r[t.attributesKey],t,n));var a=Vl(r,t,!0)||r[t.attributesKey]&&r[t.attributesKey]["xml:space"]==="preserve";if(a||("fullTagEmptyElementFn"in t?a=t.fullTagEmptyElementFn(e,r):a=t.fullTagEmptyElement),a)s.push(">");else return s.push("/>"),s.join("")}return s.push(Kl(r,t,n+1,!1)),Pt=r,Lt=e,e&&s.push((i?Ar(t,n,!1):"")+""),s.join("")}function Kl(r,e,t,n){var i,u,s,a=[];for(u in r)if(r.hasOwnProperty(u))for(s=J4(r[u])?r[u]:[r[u]],i=0;i{switch(r.type){case void 0:case"element":const e=new lh(r.name,r.attributes),t=r.elements||[];for(const n of t){const i=bs(n);i!==void 0&&e.push(i)}return e;case"text":return r.text;default:return}};class oh extends Le{}class lh extends be{static fromXmlString(e){const t=Xl.xml2js(e,{compact:!1});return bs(t)}constructor(e,t){super(e),t&&this.root.push(new oh(t))}push(e){this.root.push(e)}}class ch extends be{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}class Zl extends be{constructor(e,t){super(e),t&&(this.root=t.root)}}const qt=r=>{if(isNaN(r))throw new Error(`Invalid value '${r}' specified. Must be an integer.`);return Math.floor(r)},Ui=r=>{const e=qt(r);if(e<0)throw new Error(`Invalid value '${r}' specified. Must be a positive integer.`);return e},Yl=(r,e)=>{const t=e*2;if(r.length!==t||isNaN(+`0x${r}`))throw new Error(`Invalid hex value '${r}'. Expected ${t} digit hex value`);return r},_o=r=>Yl(r,1),Jl=r=>{const e=r.slice(-2),t=r.substring(0,r.length-2);return`${Number(t)}${e}`},Ql=r=>{const e=Jl(r);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},mn=r=>{if(r==="auto")return r;const e=r.charAt(0)==="#"?r.substring(1):r;return Yl(e,3)},Zr=r=>typeof r=="string"?Jl(r):qt(r),fh=r=>typeof r=="string"?Ql(r):Ui(r),fr=r=>typeof r=="string"?Ql(r):Ui(r),hh=Ui,dh=Ui,ph=r=>r.toISOString();class _e extends be{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new bt({val:t}))}}class Wu extends be{constructor(e,t){super(e),this.root.push(new bt({val:fh(t)}))}}class hn extends be{constructor(e,t){super(e),this.root.push(new bt({val:t}))}}const Hn=(r,e)=>new Mr({name:r,attributes:{value:{key:"w:val",value:e}}});class _s extends be{constructor(e,t){super(e),this.root.push(new bt({val:t}))}}class Vr extends be{constructor(e,t){super(e),this.root.push(t)}}class Mr extends be{constructor({name:e,attributes:t,children:n}){super(e),t&&this.root.push(new Xn(t)),n&&this.root.push(...n)}}const vr={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"};class mh extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class gh extends be{constructor(e){super("w:jc"),this.root.push(new mh({val:e}))}}class mt extends be{constructor(e,{color:t,size:n,space:i,style:u}){super(e),this.root.push(new wh({style:u,color:t===void 0?void 0:mn(t),size:n===void 0?void 0:hh(n),space:i===void 0?void 0:dh(i)}))}}class wh extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{style:"w:val",color:"w:color",size:"w:sz",space:"w:space"})}}const vs={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"};class yh extends Oi{constructor(e){super("w:pBdr"),e.top&&this.root.push(new mt("w:top",e.top)),e.bottom&&this.root.push(new mt("w:bottom",e.bottom)),e.left&&this.root.push(new mt("w:left",e.left)),e.right&&this.root.push(new mt("w:right",e.right))}}class bh extends be{constructor(){super("w:pBdr");const e=new mt("w:bottom",{color:"auto",space:1,style:vs.SINGLE,size:6});this.root.push(e)}}class _h extends be{constructor({start:e,end:t,left:n,right:i,hanging:u,firstLine:s}){super("w:ind"),this.root.push(new Xn({start:{key:"w:start",value:e===void 0?void 0:Zr(e)},end:{key:"w:end",value:t===void 0?void 0:Zr(t)},left:{key:"w:left",value:n===void 0?void 0:Zr(n)},right:{key:"w:right",value:i===void 0?void 0:Zr(i)},hanging:{key:"w:hanging",value:u===void 0?void 0:fr(u)},firstLine:{key:"w:firstLine",value:s===void 0?void 0:fr(s)}}))}}let vh=class extends be{constructor(){super("w:br")}};const Es={BEGIN:"begin",END:"end",SEPARATE:"separate"};class Ss extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:fldCharType",dirty:"w:dirty"})}}class yi extends be{constructor(e){super("w:fldChar"),this.root.push(new Ss({type:Es.BEGIN,dirty:e}))}}class bi extends be{constructor(e){super("w:fldChar"),this.root.push(new Ss({type:Es.SEPARATE,dirty:e}))}}class _i extends be{constructor(e){super("w:fldChar"),this.root.push(new Ss({type:Es.END,dirty:e}))}}const gn={DEFAULT:"default",PRESERVE:"preserve"};class wn extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{space:"xml:space"})}}let Eh=class extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("PAGE")}};class Sh extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("NUMPAGES")}}class Ah extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("SECTIONPAGES")}}class Th extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("SECTION")}}class kh extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{fill:"w:fill",color:"w:color",type:"w:val"})}}class $l extends be{constructor({fill:e,color:t,type:n}){super("w:shd"),this.root.push(new kh({fill:e===void 0?void 0:mn(e),color:t===void 0?void 0:mn(t),type:n}))}}class Dh extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}const Ch={DOT:"dot"};class xh extends be{constructor(e){super("w:em"),this.root.push(new bt({val:e}))}}class Rh extends xh{constructor(e=Ch.DOT){super(e)}}class Ih extends be{constructor(e){super("w:spacing"),this.root.push(new bt({val:Zr(e)}))}}class Fh extends be{constructor(e){super("w:color"),this.root.push(new bt({val:mn(e)}))}}class Bh extends be{constructor(e){super("w:highlight"),this.root.push(new bt({val:e}))}}class Nh extends be{constructor(e){super("w:highlightCs"),this.root.push(new bt({val:e}))}}const Oh=r=>new Mr({name:"w:lang",attributes:{value:{key:"w:val",value:r.value},eastAsia:{key:"w:eastAsia",value:r.eastAsia},bidirectional:{key:"w:bidi",value:r.bidirectional}}});class vo extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"})}}class Gu extends be{constructor(e,t){if(super("w:rFonts"),typeof e=="string"){const n=e;this.root.push(new vo({ascii:n,cs:n,eastAsia:n,hAnsi:n,hint:t}))}else{const n=e;this.root.push(new vo(n))}}}let ec=class extends be{constructor(e){super("w:vertAlign"),this.root.push(new bt({val:e}))}};class Ph extends ec{constructor(){super("superscript")}}class Lh extends ec{constructor(){super("subscript")}}const tc={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"};class Mh extends be{constructor(e=tc.SINGLE,t){super("w:u"),this.root.push(new bt({val:e,color:t===void 0?void 0:mn(t)}))}}class tn extends Oi{constructor(e){var t,n;if(super("w:rPr"),!e)return;e.noProof!==void 0&&this.push(new _e("w:noProof",e.noProof)),e.bold!==void 0&&this.push(new _e("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new _e("w:bCs",(t=e.boldComplexScript)!=null?t:e.bold)),e.italics!==void 0&&this.push(new _e("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new _e("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.underline&&this.push(new Mh(e.underline.type,e.underline.color)),e.effect&&this.push(new hn("w:effect",e.effect)),e.emphasisMark&&this.push(new Rh(e.emphasisMark.type)),e.color&&this.push(new Fh(e.color)),e.kern&&this.push(new Wu("w:kern",e.kern)),e.position&&this.push(new hn("w:position",e.position)),e.size!==void 0&&this.push(new Wu("w:sz",e.size));const i=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;i&&this.push(new Wu("w:szCs",i)),e.rightToLeft!==void 0&&this.push(new _e("w:rtl",e.rightToLeft)),e.smallCaps!==void 0?this.push(new _e("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new _e("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new _e("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new _e("w:dstrike",e.doubleStrike)),e.subScript&&this.push(new Lh),e.superScript&&this.push(new Ph),e.style&&this.push(new hn("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(new Gu(e.font)):"name"in e.font?this.push(new Gu(e.font.name,e.font.hint)):this.push(new Gu(e.font))),e.highlight&&this.push(new Bh(e.highlight));const u=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;u&&this.push(new Nh(u)),e.characterSpacing&&this.push(new Ih(e.characterSpacing)),e.emboss!==void 0&&this.push(new _e("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new _e("w:imprint",e.imprint)),e.shading&&this.push(new $l(e.shading)),e.revision&&this.push(new Uh(e.revision)),e.border&&this.push(new mt("w:bdr",e.border)),e.snapToGrid!==void 0&&this.push(new _e("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new _e("w:vanish",e.vanish)),e.specVanish&&this.push(new _e("w:specVanish",e.vanish)),e.scale!==void 0&&this.push(new _s("w:w",e.scale)),e.language&&this.push(Oh(e.language)),e.math&&this.push(new _e("w:oMath",e.math))}push(e){this.root.push(e)}}class Uh extends be{constructor(e){super("w:rPrChange"),this.root.push(new Dh({id:e.id,author:e.author,date:e.date})),this.addChildElement(new tn(e))}}class ts extends be{constructor(e){var t;return super("w:t"),typeof e=="string"?(this.root.push(new wn({space:gn.PRESERVE})),this.root.push(e),this):(this.root.push(new wn({space:(t=e.space)!=null?t:gn.DEFAULT})),this.root.push(e.text),this)}}const vi={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class zi extends be{constructor(e){if(super("w:r"),ge(this,"properties"),this.properties=new tn(e),this.root.push(this.properties),e.break)for(let t=0;t(t=e)=>{let n="",i=t;for(;i--;)n+=r[Math.random()*r.length|0];return n},Hh=(r=21)=>{let e="",t=r;for(;t--;)e+=zh[Math.random()*64|0];return e};const cr=r=>Math.floor(r*72*20),As=(r=0)=>{let e=r;return()=>++e},Wh=()=>As(),Gh=()=>As(1),Vh=()=>As(),Kh=()=>Hh().toLowerCase(),Wn=r=>jh("1234567890abcdef",r)(),qh=()=>`${Wn(8)}-${Wn(4)}-${Wn(4)}-${Wn(4)}-${Wn(12)}`;class Xh extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class Zh extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}class Yh extends be{constructor({id:e,initials:t,author:n,date:i=new Date,children:u}){super("w:comment"),this.root.push(new Xh({id:e,initials:t,author:n,date:i.toISOString()}));for(const s of u)this.root.push(s)}}class Jh extends be{constructor({children:e}){super("w:comments"),this.root.push(new Zh({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const t of e)this.root.push(new Yh(t))}}class Qh extends be{constructor(){super("w:pageBreakBefore")}}const rs={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"};class $h extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule"})}}class ed extends be{constructor(e){super("w:spacing"),this.root.push(new $h(e))}}const Kr={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"};let Ei=class extends be{constructor(e){super("w:pStyle"),this.root.push(new bt({val:e}))}};class td extends be{constructor(e){super("w:tabs");for(const t of e)this.root.push(new nd(t))}}const Eo={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"};class rd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val",pos:"w:pos",leader:"w:leader"})}}class nd extends be{constructor({type:e,position:t,leader:n}){super("w:tab"),this.root.push(new rd({val:e,pos:t,leader:n}))}}class So extends be{constructor(e,t){super("w:numPr"),this.root.push(new id(t)),this.root.push(new ud(e))}}class id extends be{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new bt({val:e}))}}class ud extends be{constructor(e){super("w:numId"),this.root.push(new bt({val:typeof e=="string"?`{${e}}`:e}))}}class sd extends be{constructor(){super(...arguments),ge(this,"fileChild",Symbol())}}class ad extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"})}}const od={EXTERNAL:"External"};class ld extends be{constructor(e,t,n,i){super("Relationship"),this.root.push(new ad({id:e,type:t,target:n,targetMode:i}))}}class cd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class fd extends be{constructor(e,t,n){super("w:hyperlink"),ge(this,"linkId"),this.linkId=t;const i={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},u=new cd(i);this.root.push(u),e.forEach(s=>{this.root.push(s)})}}class hd extends be{constructor(e){super("w:externalHyperlink"),this.options=e}}class dd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class pd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id"})}}class md{constructor(e){ge(this,"bookmarkUniqueNumericId",Vh()),ge(this,"start"),ge(this,"children"),ge(this,"end");const t=this.bookmarkUniqueNumericId();this.start=new gd(e.id,t),this.children=e.children,this.end=new wd(t)}}class gd extends be{constructor(e,t){super("w:bookmarkStart");const n=new dd({name:e,id:t});this.root.push(n)}}class wd extends be{constructor(e){super("w:bookmarkEnd");const t=new pd({id:e});this.root.push(t)}}class yd extends be{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new bt({val:e}))}}class bd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{verticalAlign:"w:val"})}}class _d extends be{constructor(e){super("w:vAlign"),this.root.push(new bd({verticalAlign:e}))}}const dn={DEFAULT:"default",FIRST:"first",EVEN:"even"};class vd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",id:"r:id"})}}const Ao={HEADER:"w:headerReference",FOOTER:"w:footerReference"};class Vu extends be{constructor(e,t){super(e),this.root.push(new vd({type:t.type||dn.DEFAULT,id:`rId${t.id}`}))}}class Ed extends be{constructor({space:e,count:t,separate:n,equalWidth:i,children:u}){super("w:cols"),this.root.push(new Xn({space:{key:"w:space",value:e===void 0?void 0:fr(e)},count:{key:"w:num",value:t===void 0?void 0:qt(t)},separate:{key:"w:sep",value:n},equalWidth:{key:"w:equalWidth",value:i}})),!i&&u&&u.forEach(s=>this.addChildElement(s))}}class Sd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",linePitch:"w:linePitch",charSpace:"w:charSpace"})}}class Ad extends be{constructor(e,t,n){super("w:docGrid"),this.root.push(new Sd({type:n,linePitch:qt(e),charSpace:t?qt(t):void 0}))}}const Td=({countBy:r,start:e,restart:t,distance:n})=>new Mr({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:r===void 0?void 0:qt(r)},start:{key:"w:start",value:e===void 0?void 0:qt(e)},restart:{key:"w:restart",value:t},distance:{key:"w:distance",value:n===void 0?void 0:fr(n)}}});class To extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class kd extends Oi{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new To({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new To({})),e.pageBorderTop&&this.root.push(new mt("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(new mt("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(new mt("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(new mt("w:right",e.pageBorderRight))}}class Dd extends be{constructor(e,t,n,i,u,s,a){super("w:pgMar"),this.root.push(new Xn({top:{key:"w:top",value:Zr(e)},right:{key:"w:right",value:fr(t)},bottom:{key:"w:bottom",value:Zr(n)},left:{key:"w:left",value:fr(i)},header:{key:"w:header",value:fr(u)},footer:{key:"w:footer",value:fr(s)},gutter:{key:"w:gutter",value:fr(a)}}))}}class Cd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{start:"w:start",formatType:"w:fmt",separator:"w:chapSep"})}}class xd extends be{constructor({start:e,formatType:t,separator:n}){super("w:pgNumType"),this.root.push(new Cd({start:e===void 0?void 0:qt(e),formatType:t,separator:n}))}}const rc={PORTRAIT:"portrait",LANDSCAPE:"landscape"};class Rd extends be{constructor(e,t,n){super("w:pgSz");const i=n===rc.LANDSCAPE,u=fr(e),s=fr(t);this.root.push(new Xn({width:{key:"w:w",value:i?s:u},height:{key:"w:h",value:i?u:s},orientation:{key:"w:orient",value:n}}))}}class Id extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Fd extends be{constructor(e){super("w:textDirection"),this.root.push(new Id({val:e}))}}class Bd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Nd extends be{constructor(e){super("w:type"),this.root.push(new Bd({val:e}))}}const qr={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},Ku={WIDTH:11906,HEIGHT:16838,ORIENTATION:rc.PORTRAIT};class Od extends be{constructor({page:{size:{width:e=Ku.WIDTH,height:t=Ku.HEIGHT,orientation:n=Ku.ORIENTATION}={},margin:{top:i=qr.TOP,right:u=qr.RIGHT,bottom:s=qr.BOTTOM,left:a=qr.LEFT,header:o=qr.HEADER,footer:l=qr.FOOTER,gutter:f=qr.GUTTER}={},pageNumbers:m={},borders:g,textDirection:d}={},grid:{linePitch:y=360,charSpace:w,type:b}={},headerWrapperGroup:p={},footerWrapperGroup:_={},lineNumbers:k,titlePage:R,verticalAlign:N,column:q,type:j}={}){super("w:sectPr"),this.addHeaderFooterGroup(Ao.HEADER,p),this.addHeaderFooterGroup(Ao.FOOTER,_),j&&this.root.push(new Nd(j)),this.root.push(new Rd(e,t,n)),this.root.push(new Dd(i,u,s,a,o,l,f)),g&&this.root.push(new kd(g)),k&&this.root.push(Td(k)),this.root.push(new xd(m)),q&&this.root.push(new Ed(q)),N&&this.root.push(new _d(N)),R!==void 0&&this.root.push(new _e("w:titlePg",R)),d&&this.root.push(new Fd(d)),this.root.push(new Ad(y,w,b))}addHeaderFooterGroup(e,t){t.default&&this.root.push(new Vu(e,{type:dn.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(new Vu(e,{type:dn.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(new Vu(e,{type:dn.EVEN,id:t.even.View.ReferenceId}))}}class Pd extends be{constructor(){super("w:body"),ge(this,"sections",[])}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new Od(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new nr({}),n=new yn({});return n.push(e),t.addChildElement(n),t}}class Yn extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",aink:"xmlns:aink",am3d:"xmlns:am3d",w16cex:"xmlns:w16cex",w16cid:"xmlns:w16cid",w16:"xmlns:w16",w16sdtdh:"xmlns:w16sdtdh",w16se:"xmlns:w16se"})}}class Ld extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class Md extends be{constructor(e){super("w:background"),this.root.push(new Ld({color:e.color===void 0?void 0:mn(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:_o(e.themeShade),themeTint:e.themeTint===void 0?void 0:_o(e.themeTint)}))}}class Ud extends be{constructor(e){super("w:document"),ge(this,"body"),this.root.push(new Yn({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",Ignorable:"w14 w15 wp14"})),this.body=new Pd,e.background&&this.root.push(new Md(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class zd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns"})}}class vn extends be{constructor(){super("Relationships"),this.root.push(new zd({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}createRelationship(e,t,n,i){const u=new ld(`rId${e}`,t,n,i);return this.root.push(u),u}get RelationshipCount(){return this.root.length-1}}class nc{constructor(e){ge(this,"document"),ge(this,"relationships"),this.document=new Ud(e),this.relationships=new vn}get View(){return this.document}get Relationships(){return this.relationships}}class jd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Hd extends be{constructor(){super("w:wordWrap"),this.root.push(new jd({val:0}))}}const Wd=r=>{var e,t;return new Mr({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:r.anchorLock},dropCap:{key:"w:dropCap",value:r.dropCap},width:{key:"w:w",value:r.width},height:{key:"w:h",value:r.height},x:{key:"w:x",value:r.position?r.position.x:void 0},y:{key:"w:y",value:r.position?r.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:r.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:r.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=r.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(t=r.space)==null?void 0:t.vertical},rule:{key:"w:hRule",value:r.rule},alignmentX:{key:"w:xAlign",value:r.alignment?r.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:r.alignment?r.alignment.y:void 0},lines:{key:"w:lines",value:r.lines},wrap:{key:"w:wrap",value:r.wrap}}})};class yn extends Oi{constructor(e){var t,n;if(super("w:pPr"),ge(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(new Ei(e.heading)),e.bullet&&this.push(new Ei("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(new Ei("ListParagraph"))),e.style&&this.push(new Ei(e.style)),e.keepNext!==void 0&&this.push(new _e("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new _e("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new Qh),e.frame&&this.push(Wd(e.frame)),e.widowControl!==void 0&&this.push(new _e("w:widowControl",e.widowControl)),e.bullet&&this.push(new So(1,e.bullet.level)),e.numbering&&(this.numberingReferences.push({reference:e.numbering.reference,instance:(t=e.numbering.instance)!=null?t:0}),this.push(new So(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))),e.border&&this.push(new yh(e.border)),e.thematicBreak&&this.push(new bh),e.shading&&this.push(new $l(e.shading)),e.wordWrap&&this.push(new Hd),e.overflowPunctuation&&this.push(new _e("w:overflowPunct",e.overflowPunctuation));const i=[...e.rightTabStop!==void 0?[{type:Eo.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:Eo.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(new td(i)),e.bidirectional!==void 0&&this.push(new _e("w:bidi",e.bidirectional)),e.spacing&&this.push(new ed(e.spacing)),e.indent&&this.push(new _h(e.indent)),e.contextualSpacing!==void 0&&this.push(new _e("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new gh(e.alignment)),e.outlineLevel!==void 0&&this.push(new yd(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new _e("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new _e("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new tn(e.run))}push(e){this.root.push(e)}prepForXml(e){if(e.viewWrapper instanceof nc)for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class nr extends sd{constructor(e){if(super("w:p"),ge(this,"properties"),typeof e=="string")return this.properties=new yn({}),this.root.push(this.properties),this.root.push(new Fi(e)),this;if(this.properties=new yn(e),this.root.push(this.properties),e.text&&this.root.push(new Fi(e.text)),e.children)for(const t of e.children){if(t instanceof md){this.root.push(t.start);for(const n of t.children)this.root.push(n);this.root.push(t.end);continue}this.root.push(t)}}prepForXml(e){for(const t of this.root)if(t instanceof hd){const n=this.root.indexOf(t),i=new fd(t.options.children,Kh());e.viewWrapper.Relationships.createRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,od.EXTERNAL),this.root[n]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}const an={style:vs.NONE,size:0,color:"auto"},on={style:vs.SINGLE,size:4,color:"auto"};class Gd extends be{constructor(e){super("w:tblBorders"),e.top?this.root.push(new mt("w:top",e.top)):this.root.push(new mt("w:top",on)),e.left?this.root.push(new mt("w:left",e.left)):this.root.push(new mt("w:left",on)),e.bottom?this.root.push(new mt("w:bottom",e.bottom)):this.root.push(new mt("w:bottom",on)),e.right?this.root.push(new mt("w:right",e.right)):this.root.push(new mt("w:right",on)),e.insideHorizontal?this.root.push(new mt("w:insideH",e.insideHorizontal)):this.root.push(new mt("w:insideH",on)),e.insideVertical?this.root.push(new mt("w:insideV",e.insideVertical)):this.root.push(new mt("w:insideV",on))}}ge(Gd,"NONE",{top:an,bottom:an,left:an,right:an,insideHorizontal:an,insideVertical:an});class Vd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Kd extends be{constructor(){super("Properties"),this.root.push(new Vd({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class qd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns"})}}class Xd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{contentType:"ContentType",extension:"Extension"})}}class Lr extends be{constructor(e,t){super("Default"),this.root.push(new Xd({contentType:e,extension:t}))}}class Zd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{contentType:"ContentType",partName:"PartName"})}}class rr extends be{constructor(e,t){super("Override"),this.root.push(new Zd({contentType:e,partName:t}))}}class Yd extends be{constructor(){super("Types"),this.root.push(new qd({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new Lr("image/png","png")),this.root.push(new Lr("image/jpeg","jpeg")),this.root.push(new Lr("image/jpeg","jpg")),this.root.push(new Lr("image/bmp","bmp")),this.root.push(new Lr("image/gif","gif")),this.root.push(new Lr("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new Lr("application/xml","xml")),this.root.push(new Lr("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new rr("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(new rr("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}class Jd extends be{constructor(e){super("cp:coreProperties"),this.root.push(new Yn({cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"})),e.title&&this.root.push(new Vr("dc:title",e.title)),e.subject&&this.root.push(new Vr("dc:subject",e.subject)),e.creator&&this.root.push(new Vr("dc:creator",e.creator)),e.keywords&&this.root.push(new Vr("cp:keywords",e.keywords)),e.description&&this.root.push(new Vr("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new Vr("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new Vr("cp:revision",String(e.revision))),this.root.push(new ko("dcterms:created")),this.root.push(new ko("dcterms:modified"))}}class ko extends be{constructor(e){super(e),this.root.push(new Yn({type:"dcterms:W3CDTF"})),this.root.push(ph(new Date))}}class Qd extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class $d extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{fmtid:"fmtid",pid:"pid",name:"name"})}}class ep extends be{constructor(e,t){super("property"),this.root.push(new $d({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new tp(t.value))}}class tp extends be{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class rp extends be{constructor(e){super("Properties"),ge(this,"nextId"),ge(this,"properties",[]),this.root.push(new Qd({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach(t=>this.root.push(t)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new ep(this.nextId++,e))}}class np extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let ip=class extends Zl{constructor(e,t){super("w:ftr",t),ge(this,"refId"),this.refId=e,t||this.root.push(new np({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class up{constructor(e,t,n){ge(this,"footer"),ge(this,"relationships"),this.media=e,this.footer=new ip(t,n),this.relationships=new vn}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class sp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class ap extends be{constructor(){super("w:footnoteRef")}}class op extends zi{constructor(){super({style:"FootnoteReference"}),this.root.push(new ap)}}const Do={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class qu extends be{constructor(e){super("w:footnote"),this.root.push(new sp({type:e.type,id:e.id}));for(let t=0;t9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new _p({ilvl:qt(e),tentative:1}))}}class Dp extends kp{}class Cp extends be{constructor(e){super("w:multiLevelType"),this.root.push(new bt({val:e}))}}class xp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class Co extends be{constructor(e,t){super("w:abstractNum"),ge(this,"id"),this.root.push(new xp({abstractNumId:qt(e),restartNumberingAfterBreak:0})),this.root.push(new Cp("hybridMultilevel")),this.id=e;for(const n of t)this.root.push(new Dp(n))}}class Rp extends be{constructor(e){super("w:abstractNumId"),this.root.push(new bt({val:e}))}}class Ip extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{numId:"w:numId"})}}class xo extends be{constructor(e){if(super("w:num"),ge(this,"numId"),ge(this,"reference"),ge(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new Ip({numId:qt(e.numId)})),this.root.push(new Rp(qt(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const t of e.overrideLevels)this.root.push(new Bp(t.num,t.start))}}class Fp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{ilvl:"w:ilvl"})}}class Bp extends be{constructor(e,t){super("w:lvlOverride"),this.root.push(new Fp({ilvl:e})),t!==void 0&&this.root.push(new Op(t))}}class Np extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Op extends be{constructor(e){super("w:startOverride"),this.root.push(new Np({val:e}))}}class Pp extends be{constructor(e){super("w:numbering"),ge(this,"abstractNumberingMap",new Map),ge(this,"concreteNumberingMap",new Map),ge(this,"referenceConfigMap",new Map),ge(this,"abstractNumUniqueNumericId",Wh()),ge(this,"concreteNumUniqueNumericId",Gh()),this.root.push(new Yn({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const t=new Co(this.abstractNumUniqueNumericId(),[{level:0,format:xr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:cr(.5),hanging:cr(.25)}}}},{level:1,format:xr.BULLET,text:"○",alignment:vr.LEFT,style:{paragraph:{indent:{left:cr(1),hanging:cr(.25)}}}},{level:2,format:xr.BULLET,text:"■",alignment:vr.LEFT,style:{paragraph:{indent:{left:2160,hanging:cr(.25)}}}},{level:3,format:xr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:2880,hanging:cr(.25)}}}},{level:4,format:xr.BULLET,text:"○",alignment:vr.LEFT,style:{paragraph:{indent:{left:3600,hanging:cr(.25)}}}},{level:5,format:xr.BULLET,text:"■",alignment:vr.LEFT,style:{paragraph:{indent:{left:4320,hanging:cr(.25)}}}},{level:6,format:xr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:5040,hanging:cr(.25)}}}},{level:7,format:xr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:5760,hanging:cr(.25)}}}},{level:8,format:xr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:6480,hanging:cr(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new xo({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new Co(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(e){for(const t of this.abstractNumberingMap.values())this.root.push(t);for(const t of this.concreteNumberingMap.values())this.root.push(t);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const n=this.abstractNumberingMap.get(e);if(!n)return;const i=`${e}-${t}`;if(this.concreteNumberingMap.has(i))return;const u=this.referenceConfigMap.get(e),s=u&&u[0].start,a={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:t,overrideLevels:[s&&Number.isInteger(s)?{num:0,start:s}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new xo(a))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class Lp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{version:"w:val",name:"w:name",uri:"w:uri"})}}class Mp extends be{constructor(e){super("w:compatSetting"),this.root.push(new Lp({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class Up extends be{constructor(e){super("w:compat"),e.version&&this.root.push(new Mp(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new _e("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new _e("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new _e("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new _e("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new _e("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new _e("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new _e("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new _e("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new _e("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new _e("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new _e("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new _e("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new _e("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new _e("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new _e("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new _e("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new _e("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new _e("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new _e("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new _e("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new _e("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new _e("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new _e("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new _e("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new _e("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new _e("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new _e("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new _e("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new _e("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new _e("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new _e("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new _e("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new _e("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new _e("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new _e("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new _e("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new _e("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new _e("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new _e("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new _e("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new _e("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new _e("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new _e("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new _e("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new _e("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new _e("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new _e("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new _e("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new _e("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new _e("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new _e("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new _e("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new _e("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new _e("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new _e("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new _e("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new _e("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new _e("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new _e("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new _e("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new _e("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new _e("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new _e("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new _e("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new _e("w:cachedColBalance",e.cachedColumnBalance))}}class zp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class jp extends be{constructor(e){var t,n,i,u;super("w:settings"),this.root.push(new zp({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new _e("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new _e("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new _e("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new _e("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new _s("w:defaultTabStop",e.defaultTabStop)),this.root.push(new Up(qn(Xe({},(t=e.compatibility)!=null?t:{}),{version:(u=(i=(n=e.compatibility)==null?void 0:n.version)!=null?i:e.compatibilityModeVersion)!=null?u:15})))}}class ic extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Hp extends be{constructor(e){super("w:name"),this.root.push(new ic({val:e}))}}class Wp extends be{constructor(e){super("w:uiPriority"),this.root.push(new ic({val:qt(e)}))}}class Gp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class uc extends be{constructor(e,t){super("w:style"),this.root.push(new Gp(e)),t.name&&this.root.push(new Hp(t.name)),t.basedOn&&this.root.push(new hn("w:basedOn",t.basedOn)),t.next&&this.root.push(new hn("w:next",t.next)),t.link&&this.root.push(new hn("w:link",t.link)),t.uiPriority!==void 0&&this.root.push(new Wp(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new _e("w:semiHidden",t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new _e("w:unhideWhenUsed",t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new _e("w:qFormat",t.quickFormat))}}class ji extends uc{constructor(e){super({type:"paragraph",styleId:e.id},e),ge(this,"paragraphProperties"),ge(this,"runProperties"),this.paragraphProperties=new yn(e.paragraph),this.runProperties=new tn(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class Hi extends uc{constructor(e){super({type:"character",styleId:e.id},Xe({uiPriority:99,unhideWhenUsed:!0},e)),ge(this,"runProperties"),this.runProperties=new tn(e.run),this.root.push(this.runProperties)}}class Ur extends ji{constructor(e){super(Xe({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class Vp extends Ur{constructor(e){super(Xe({id:"Title",name:"Title"},e))}}class Kp extends Ur{constructor(e){super(Xe({id:"Heading1",name:"Heading 1"},e))}}class qp extends Ur{constructor(e){super(Xe({id:"Heading2",name:"Heading 2"},e))}}class Xp extends Ur{constructor(e){super(Xe({id:"Heading3",name:"Heading 3"},e))}}class Zp extends Ur{constructor(e){super(Xe({id:"Heading4",name:"Heading 4"},e))}}class Yp extends Ur{constructor(e){super(Xe({id:"Heading5",name:"Heading 5"},e))}}class Jp extends Ur{constructor(e){super(Xe({id:"Heading6",name:"Heading 6"},e))}}class Qp extends Ur{constructor(e){super(Xe({id:"Strong",name:"Strong"},e))}}class $p extends ji{constructor(e){super(Xe({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class em extends ji{constructor(e){super(Xe({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:rs.AUTO}},run:{size:20}},e))}}class tm extends Hi{constructor(e){super(Xe({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class rm extends Hi{constructor(e){super(Xe({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class nm extends Hi{constructor(e){super(Xe({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:tc.SINGLE}}},e))}}class ns extends be{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new ji(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new Hi(t))}}class im extends be{constructor(e){super("w:pPrDefault"),this.root.push(new yn(e))}}class um extends be{constructor(e){super("w:rPrDefault"),this.root.push(new tn(e))}}class sm extends be{constructor(e){super("w:docDefaults"),ge(this,"runPropertiesDefaults"),ge(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new um(e.run),this.paragraphPropertiesDefaults=new im(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class am{newInstance(e){const t=Xl.xml2js(e,{compact:!1});let n;for(const s of t.elements||[])s.name==="w:styles"&&(n=s);if(n===void 0)throw new Error("can not find styles element");const i=n.elements||[];return new ns({initialStyles:new ch(n.attributes),importedStyles:i.map(s=>bs(s))})}}class Ro{newInstance(e={}){var t;return{initialStyles:new Yn({mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",Ignorable:"w14 w15"}),importedStyles:[new sm((t=e.document)!=null?t:{}),new Vp(Xe({run:{size:56}},e.title)),new Kp(Xe({run:{color:"2E74B5",size:32}},e.heading1)),new qp(Xe({run:{color:"2E74B5",size:26}},e.heading2)),new Xp(Xe({run:{color:"1F4D78",size:24}},e.heading3)),new Zp(Xe({run:{color:"2E74B5",italics:!0}},e.heading4)),new Yp(Xe({run:{color:"2E74B5"}},e.heading5)),new Jp(Xe({run:{color:"1F4D78"}},e.heading6)),new Qp(Xe({run:{bold:!0}},e.strong)),new $p(e.listParagraph||{}),new nm(e.hyperlink||{}),new tm(e.footnoteReference||{}),new em(e.footnoteText||{}),new rm(e.footnoteTextChar||{})]}}}const Si=({id:r,fontKey:e,subsetted:t},n)=>new Mr({name:n,attributes:Xe({id:{key:"r:id",value:r}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...t?[new _e("w:subsetted",t)]:[]]}),om=({name:r,altName:e,panose1:t,charset:n,family:i,notTrueType:u,pitch:s,sig:a,embedRegular:o,embedBold:l,embedItalic:f,embedBoldItalic:m})=>new Mr({name:"w:font",attributes:{name:{key:"w:name",value:r}},children:[...e?[Hn("w:altName",e)]:[],...t?[Hn("w:panose1",t)]:[],...n?[Hn("w:charset",n)]:[],...i?[Hn("w:family",i)]:[],...u?[new _e("w:notTrueType",u)]:[],...s?[Hn("w:pitch",s)]:[],...a?[new Mr({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:a.usb0},usb1:{key:"w:usb1",value:a.usb1},usb2:{key:"w:usb2",value:a.usb2},usb3:{key:"w:usb3",value:a.usb3},csb0:{key:"w:csb0",value:a.csb0},csb1:{key:"w:csb1",value:a.csb1}}})]:[],...o?[Si(o,"w:embedRegular")]:[],...l?[Si(l,"w:embedBold")]:[],...f?[Si(f,"w:embedItalic")]:[],...m?[Si(m,"w:embedBoldItalic")]:[]]}),lm=({name:r,index:e,fontKey:t,characterSet:n})=>om({name:r,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:t,id:`rId${e}`}}),cm=r=>new Mr({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:r.map((e,t)=>lm({name:e.name,index:t+1,fontKey:e.fontKey}))});class fm{constructor(e){ge(this,"fontTable"),ge(this,"relationships"),ge(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(t=>qn(Xe({},t),{fontKey:qh()})),this.fontTable=cm(this.fontOptionsWithKey),this.relationships=new vn;for(let t=0;te.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}}function Ai(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sc={exports:{}};(function(r,e){(function(t){r.exports=t()})(function(){return function t(n,i,u){function s(l,f){if(!i[l]){if(!n[l]){var m=typeof Ai=="function"&&Ai;if(!f&&m)return m(l,!0);if(a)return a(l,!0);var g=new Error("Cannot find module '"+l+"'");throw g.code="MODULE_NOT_FOUND",g}var d=i[l]={exports:{}};n[l][0].call(d.exports,function(y){var w=n[l][1][y];return s(w||y)},d,d.exports,t,n,i,u)}return i[l].exports}for(var a=typeof Ai=="function"&&Ai,o=0;o>2,d=(3&l)<<4|f>>4,y=1>6:64,w=2>4,f=(15&g)<<4|(d=a.indexOf(o.charAt(w++)))>>2,m=(3&d)<<6|(y=a.indexOf(o.charAt(w++))),_[b++]=l,d!==64&&(_[b++]=f),y!==64&&(_[b++]=m);return _}},{"./support":30,"./utils":32}],2:[function(t,n,i){var u=t("./external"),s=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function l(f,m,g,d,y){this.compressedSize=f,this.uncompressedSize=m,this.crc32=g,this.compression=d,this.compressedContent=y}l.prototype={getContentWorker:function(){var f=new s(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),m=this;return f.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new s(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(f,m,g){return f.pipe(new a).pipe(new o("uncompressedSize")).pipe(m.compressWorker(g)).pipe(new o("compressedSize")).withStreamInfo("compression",m)},n.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,i){var u=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,i){var u=t("./utils"),s=function(){for(var a,o=[],l=0;l<256;l++){a=l;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;o[l]=a}return o}();n.exports=function(a,o){return a!==void 0&&a.length?u.getTypeOf(a)!=="string"?function(l,f,m,g){var d=s,y=g+m;l^=-1;for(var w=g;w>>8^d[255&(l^f[w])];return-1^l}(0|o,a,a.length,0):function(l,f,m,g){var d=s,y=g+m;l^=-1;for(var w=g;w>>8^d[255&(l^f.charCodeAt(w))];return-1^l}(0|o,a,a.length,0):0}},{"./utils":32}],5:[function(t,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,n,i){var u=null;u=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:u}},{lie:37}],7:[function(t,n,i){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=t("pako"),a=t("./utils"),o=t("./stream/GenericWorker"),l=u?"uint8array":"array";function f(m,g){o.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=g,this.meta={}}i.magic="\b\0",a.inherits(f,o),f.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(l,m.data),!1)},f.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(g){m.push({data:g,meta:m.meta})}},i.compressWorker=function(m){return new f("Deflate",m)},i.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,i){function u(d,y){var w,b="";for(w=0;w>>=8;return b}function s(d,y,w,b,p,_){var k,R,N=d.file,q=d.compression,j=_!==l.utf8encode,L=a.transformTo("string",_(N.name)),C=a.transformTo("string",l.utf8encode(N.name)),ue=N.comment,ne=a.transformTo("string",_(ue)),B=a.transformTo("string",l.utf8encode(ue)),Z=C.length!==N.name.length,D=B.length!==ue.length,H="",ce="",W="",pe=N.dir,X=N.date,Ae={crc32:0,compressedSize:0,uncompressedSize:0};y&&!w||(Ae.crc32=d.crc32,Ae.compressedSize=d.compressedSize,Ae.uncompressedSize=d.uncompressedSize);var V=0;y&&(V|=8),j||!Z&&!D||(V|=2048);var x=0,J=0;pe&&(x|=16),p==="UNIX"?(J=798,x|=function(ie,M){var A=ie;return ie||(A=M?16893:33204),(65535&A)<<16}(N.unixPermissions,pe)):(J=20,x|=function(ie){return 63&(ie||0)}(N.dosPermissions)),k=X.getUTCHours(),k<<=6,k|=X.getUTCMinutes(),k<<=5,k|=X.getUTCSeconds()/2,R=X.getUTCFullYear()-1980,R<<=4,R|=X.getUTCMonth()+1,R<<=5,R|=X.getUTCDate(),Z&&(ce=u(1,1)+u(f(L),4)+C,H+="up"+u(ce.length,2)+ce),D&&(W=u(1,1)+u(f(ne),4)+B,H+="uc"+u(W.length,2)+W);var $="";return $+=` \0`,$+=u(V,2),$+=q.magic,$+=u(k,2),$+=u(R,2),$+=u(Ae.crc32,4),$+=u(Ae.compressedSize,4),$+=u(Ae.uncompressedSize,4),$+=u(L.length,2),$+=u(H.length,2),{fileRecord:m.LOCAL_FILE_HEADER+$+L+H,dirRecord:m.CENTRAL_FILE_HEADER+u(J,2)+$+u(ne.length,2)+"\0\0\0\0"+u(x,4)+u(b,4)+L+H+ne}}var a=t("../utils"),o=t("../stream/GenericWorker"),l=t("../utf8"),f=t("../crc32"),m=t("../signature");function g(d,y,w,b){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=w,this.encodeFileName=b,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(g,o),g.prototype.push=function(d){var y=d.meta.percent||0,w=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,o.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:w?(y+100*(w-b-1))/w:100}}))},g.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var y=this.streamFiles&&!d.file.dir;if(y){var w=s(d,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:w.fileRecord,meta:{percent:0}})}else this.accumulate=!0},g.prototype.closedSource=function(d){this.accumulate=!1;var y=this.streamFiles&&!d.file.dir,w=s(d,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(w.dirRecord),y)this.push({data:function(b){return m.DATA_DESCRIPTOR+u(b.crc32,4)+u(b.compressedSize,4)+u(b.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:w.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},g.prototype.flush=function(){for(var d=this.bytesWritten,y=0;y=this.index;o--)l=(l<<8)+this.byteAt(o);return this.index+=a,l},readString:function(a){return u.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=s},{"../utils":32}],19:[function(t,n,i){var u=t("./Uint8ArrayReader");function s(a){u.call(this,a)}t("../utils").inherits(s,u),s.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,i){var u=t("./DataReader");function s(a){u.call(this,a)}t("../utils").inherits(s,u),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(t,n,i){var u=t("./ArrayReader");function s(a){u.call(this,a)}t("../utils").inherits(s,u),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var o=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,i){var u=t("../utils"),s=t("../support"),a=t("./ArrayReader"),o=t("./StringReader"),l=t("./NodeBufferReader"),f=t("./Uint8ArrayReader");n.exports=function(m){var g=u.getTypeOf(m);return u.checkSupport(g),g!=="string"||s.uint8array?g==="nodebuffer"?new l(m):s.uint8array?new f(u.transformTo("uint8array",m)):new a(u.transformTo("array",m)):new o(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,i){var u=t("./GenericWorker"),s=t("../utils");function a(o){u.call(this,"ConvertWorker to "+o),this.destType=o}s.inherits(a,u),a.prototype.processChunk=function(o){this.push({data:s.transformTo(this.destType,o.data),meta:o.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,i){var u=t("./GenericWorker"),s=t("../crc32");function a(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,u),a.prototype.processChunk=function(o){this.streamInfo.crc32=s(o.data,this.streamInfo.crc32||0),this.push(o)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,i){var u=t("../utils"),s=t("./GenericWorker");function a(o){s.call(this,"DataLengthProbe for "+o),this.propName=o,this.withStreamInfo(o,0)}u.inherits(a,s),a.prototype.processChunk=function(o){if(o){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+o.data.length}s.prototype.processChunk.call(this,o)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,i){var u=t("../utils"),s=t("./GenericWorker");function a(o){s.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,o.then(function(f){l.dataIsReady=!0,l.data=f,l.max=f&&f.length||0,l.type=u.getTypeOf(f),l.isPaused||l._tickAndRepeat()},function(f){l.error(f)})}u.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var o=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":o=this.data.substring(this.index,l);break;case"uint8array":o=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":o=this.data.slice(this.index,l)}return this.index=l,this.push({data:o,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,i){function u(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var o=0;o "+s:s}},n.exports=u},{}],29:[function(t,n,i){var u=t("../utils"),s=t("./ConvertWorker"),a=t("./GenericWorker"),o=t("../base64"),l=t("../support"),f=t("../external"),m=null;if(l.nodestream)try{m=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function g(y,w){return new f.Promise(function(b,p){var _=[],k=y._internalType,R=y._outputType,N=y._mimeType;y.on("data",function(q,j){_.push(q),w&&w(j)}).on("error",function(q){_=[],p(q)}).on("end",function(){try{var q=function(j,L,C){switch(j){case"blob":return u.newBlob(u.transformTo("arraybuffer",L),C);case"base64":return o.encode(L);default:return u.transformTo(j,L)}}(R,function(j,L){var C,ue=0,ne=null,B=0;for(C=0;C"u")i.blob=!1;else{var u=new ArrayBuffer(0);try{i.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(u),i.blob=s.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,i){for(var u=t("./utils"),s=t("./support"),a=t("./nodejsUtils"),o=t("./stream/GenericWorker"),l=new Array(256),f=0;f<256;f++)l[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;l[254]=l[254]=1;function m(){o.call(this,"utf-8 decode"),this.leftOver=null}function g(){o.call(this,"utf-8 encode")}i.utf8encode=function(d){return s.nodebuffer?a.newBufferFrom(d,"utf-8"):function(y){var w,b,p,_,k,R=y.length,N=0;for(_=0;_>>6:(b<65536?w[k++]=224|b>>>12:(w[k++]=240|b>>>18,w[k++]=128|b>>>12&63),w[k++]=128|b>>>6&63),w[k++]=128|63&b);return w}(d)},i.utf8decode=function(d){return s.nodebuffer?u.transformTo("nodebuffer",d).toString("utf-8"):function(y){var w,b,p,_,k=y.length,R=new Array(2*k);for(w=b=0;w>10&1023,R[b++]=56320|1023&p)}return R.length!==b&&(R.subarray?R=R.subarray(0,b):R.length=b),u.applyFromCharCode(R)}(d=u.transformTo(s.uint8array?"uint8array":"array",d))},u.inherits(m,o),m.prototype.processChunk=function(d){var y=u.transformTo(s.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var w=y;(y=new Uint8Array(w.length+this.leftOver.length)).set(this.leftOver,0),y.set(w,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var b=function(_,k){var R;for((k=k||_.length)>_.length&&(k=_.length),R=k-1;0<=R&&(192&_[R])==128;)R--;return R<0||R===0?k:R+l[_[R]]>k?R:k}(y),p=y;b!==y.length&&(s.uint8array?(p=y.subarray(0,b),this.leftOver=y.subarray(b,y.length)):(p=y.slice(0,b),this.leftOver=y.slice(b,y.length))),this.push({data:i.utf8decode(p),meta:d.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=m,u.inherits(g,o),g.prototype.processChunk=function(d){this.push({data:i.utf8encode(d.data),meta:d.meta})},i.Utf8EncodeWorker=g},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,i){var u=t("./support"),s=t("./base64"),a=t("./nodejsUtils"),o=t("./external");function l(w){return w}function f(w,b){for(var p=0;p>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=u(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var y,w,b,p=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?g[b++]=224|d>>>12:(g[b++]=240|d>>>18,g[b++]=128|d>>>12&63),g[b++]=128|d>>>6&63),g[b++]=128|63&d);return g},i.buf2binstring=function(m){return f(m,m.length)},i.binstring2buf=function(m){for(var g=new u.Buf8(m.length),d=0,y=g.length;d>10&1023,_[y++]=56320|1023&w)}return f(_,y)},i.utf8border=function(m,g){var d;for((g=g||m.length)>m.length&&(g=m.length),d=g-1;0<=d&&(192&m[d])==128;)d--;return d<0||d===0?g:d+o[m[d]]>g?d:g}},{"./common":41}],43:[function(t,n,i){n.exports=function(u,s,a,o){for(var l=65535&u|0,f=u>>>16&65535|0,m=0;a!==0;){for(a-=m=2e3>>1:s>>>1;a[o]=s}return a}();n.exports=function(s,a,o,l){var f=u,m=l+o;s^=-1;for(var g=l;g>>8^f[255&(s^a[g])];return-1^s}},{}],46:[function(t,n,i){var u,s=t("../utils/common"),a=t("./trees"),o=t("./adler32"),l=t("./crc32"),f=t("./messages"),m=0,g=4,d=0,y=-2,w=-1,b=4,p=2,_=8,k=9,R=286,N=30,q=19,j=2*R+1,L=15,C=3,ue=258,ne=ue+C+1,B=42,Z=113,D=1,H=2,ce=3,W=4;function pe(v,re){return v.msg=f[re],re}function X(v){return(v<<1)-(4v.avail_out&&(T=v.avail_out),T!==0&&(s.arraySet(v.output,re.pending_buf,re.pending_out,T,v.next_out),v.next_out+=T,re.pending_out+=T,v.total_out+=T,v.avail_out-=T,re.pending-=T,re.pending===0&&(re.pending_out=0))}function x(v,re){a._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,re),v.block_start=v.strstart,V(v.strm)}function J(v,re){v.pending_buf[v.pending++]=re}function $(v,re){v.pending_buf[v.pending++]=re>>>8&255,v.pending_buf[v.pending++]=255&re}function ie(v,re){var T,c,h=v.max_chain_length,E=v.strstart,O=v.prev_length,K=v.nice_match,z=v.strstart>v.w_size-ne?v.strstart-(v.w_size-ne):0,oe=v.window,we=v.w_mask,de=v.prev,Ce=v.strstart+ue,Fe=oe[E+O-1],te=oe[E+O];v.prev_length>=v.good_match&&(h>>=2),K>v.lookahead&&(K=v.lookahead);do if(oe[(T=re)+O]===te&&oe[T+O-1]===Fe&&oe[T]===oe[E]&&oe[++T]===oe[E+1]){E+=2,T++;do;while(oe[++E]===oe[++T]&&oe[++E]===oe[++T]&&oe[++E]===oe[++T]&&oe[++E]===oe[++T]&&oe[++E]===oe[++T]&&oe[++E]===oe[++T]&&oe[++E]===oe[++T]&&oe[++E]===oe[++T]&&Ez&&--h!=0);return O<=v.lookahead?O:v.lookahead}function M(v){var re,T,c,h,E,O,K,z,oe,we,de=v.w_size;do{if(h=v.window_size-v.lookahead-v.strstart,v.strstart>=de+(de-ne)){for(s.arraySet(v.window,v.window,de,de,0),v.match_start-=de,v.strstart-=de,v.block_start-=de,re=T=v.hash_size;c=v.head[--re],v.head[re]=de<=c?c-de:0,--T;);for(re=T=de;c=v.prev[--re],v.prev[re]=de<=c?c-de:0,--T;);h+=de}if(v.strm.avail_in===0)break;if(O=v.strm,K=v.window,z=v.strstart+v.lookahead,oe=h,we=void 0,we=O.avail_in,oe=C)for(E=v.strstart-v.insert,v.ins_h=v.window[E],v.ins_h=(v.ins_h<=C&&(v.ins_h=(v.ins_h<=C)if(c=a._tr_tally(v,v.strstart-v.match_start,v.match_length-C),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=C){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<=C&&(v.ins_h=(v.ins_h<=C&&v.match_length<=v.prev_length){for(h=v.strstart+v.lookahead-C,c=a._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-C),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=h&&(v.ins_h=(v.ins_h<v.pending_buf_size-5&&(T=v.pending_buf_size-5);;){if(v.lookahead<=1){if(M(v),v.lookahead===0&&re===m)return D;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var c=v.block_start+T;if((v.strstart===0||v.strstart>=c)&&(v.lookahead=v.strstart-c,v.strstart=c,x(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-ne&&(x(v,!1),v.strm.avail_out===0))return D}return v.insert=0,re===g?(x(v,!0),v.strm.avail_out===0?ce:W):(v.strstart>v.block_start&&(x(v,!1),v.strm.avail_out),D)}),new G(4,4,8,4,A),new G(4,5,16,8,A),new G(4,6,32,32,A),new G(4,4,16,16,S),new G(8,16,32,32,S),new G(8,16,128,128,S),new G(8,32,128,256,S),new G(32,128,258,1024,S),new G(32,258,258,4096,S)],i.deflateInit=function(v,re){return ee(v,re,_,15,8,0)},i.deflateInit2=ee,i.deflateReset=F,i.deflateResetKeep=I,i.deflateSetHeader=function(v,re){return v&&v.state?v.state.wrap!==2?y:(v.state.gzhead=re,d):y},i.deflate=function(v,re){var T,c,h,E;if(!v||!v.state||5>8&255),J(c,c.gzhead.time>>16&255),J(c,c.gzhead.time>>24&255),J(c,c.level===9?2:2<=c.strategy||c.level<2?4:0),J(c,255&c.gzhead.os),c.gzhead.extra&&c.gzhead.extra.length&&(J(c,255&c.gzhead.extra.length),J(c,c.gzhead.extra.length>>8&255)),c.gzhead.hcrc&&(v.adler=l(v.adler,c.pending_buf,c.pending,0)),c.gzindex=0,c.status=69):(J(c,0),J(c,0),J(c,0),J(c,0),J(c,0),J(c,c.level===9?2:2<=c.strategy||c.level<2?4:0),J(c,3),c.status=Z);else{var O=_+(c.w_bits-8<<4)<<8;O|=(2<=c.strategy||c.level<2?0:c.level<6?1:c.level===6?2:3)<<6,c.strstart!==0&&(O|=32),O+=31-O%31,c.status=Z,$(c,O),c.strstart!==0&&($(c,v.adler>>>16),$(c,65535&v.adler)),v.adler=1}if(c.status===69)if(c.gzhead.extra){for(h=c.pending;c.gzindex<(65535&c.gzhead.extra.length)&&(c.pending!==c.pending_buf_size||(c.gzhead.hcrc&&c.pending>h&&(v.adler=l(v.adler,c.pending_buf,c.pending-h,h)),V(v),h=c.pending,c.pending!==c.pending_buf_size));)J(c,255&c.gzhead.extra[c.gzindex]),c.gzindex++;c.gzhead.hcrc&&c.pending>h&&(v.adler=l(v.adler,c.pending_buf,c.pending-h,h)),c.gzindex===c.gzhead.extra.length&&(c.gzindex=0,c.status=73)}else c.status=73;if(c.status===73)if(c.gzhead.name){h=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>h&&(v.adler=l(v.adler,c.pending_buf,c.pending-h,h)),V(v),h=c.pending,c.pending===c.pending_buf_size)){E=1;break}E=c.gzindexh&&(v.adler=l(v.adler,c.pending_buf,c.pending-h,h)),E===0&&(c.gzindex=0,c.status=91)}else c.status=91;if(c.status===91)if(c.gzhead.comment){h=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>h&&(v.adler=l(v.adler,c.pending_buf,c.pending-h,h)),V(v),h=c.pending,c.pending===c.pending_buf_size)){E=1;break}E=c.gzindexh&&(v.adler=l(v.adler,c.pending_buf,c.pending-h,h)),E===0&&(c.status=103)}else c.status=103;if(c.status===103&&(c.gzhead.hcrc?(c.pending+2>c.pending_buf_size&&V(v),c.pending+2<=c.pending_buf_size&&(J(c,255&v.adler),J(c,v.adler>>8&255),v.adler=0,c.status=Z)):c.status=Z),c.pending!==0){if(V(v),v.avail_out===0)return c.last_flush=-1,d}else if(v.avail_in===0&&X(re)<=X(T)&&re!==g)return pe(v,-5);if(c.status===666&&v.avail_in!==0)return pe(v,-5);if(v.avail_in!==0||c.lookahead!==0||re!==m&&c.status!==666){var K=c.strategy===2?function(z,oe){for(var we;;){if(z.lookahead===0&&(M(z),z.lookahead===0)){if(oe===m)return D;break}if(z.match_length=0,we=a._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,we&&(x(z,!1),z.strm.avail_out===0))return D}return z.insert=0,oe===g?(x(z,!0),z.strm.avail_out===0?ce:W):z.last_lit&&(x(z,!1),z.strm.avail_out===0)?D:H}(c,re):c.strategy===3?function(z,oe){for(var we,de,Ce,Fe,te=z.window;;){if(z.lookahead<=ue){if(M(z),z.lookahead<=ue&&oe===m)return D;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=C&&0z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=C?(we=a._tr_tally(z,1,z.match_length-C),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(we=a._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),we&&(x(z,!1),z.strm.avail_out===0))return D}return z.insert=0,oe===g?(x(z,!0),z.strm.avail_out===0?ce:W):z.last_lit&&(x(z,!1),z.strm.avail_out===0)?D:H}(c,re):u[c.level].func(c,re);if(K!==ce&&K!==W||(c.status=666),K===D||K===ce)return v.avail_out===0&&(c.last_flush=-1),d;if(K===H&&(re===1?a._tr_align(c):re!==5&&(a._tr_stored_block(c,0,0,!1),re===3&&(Ae(c.head),c.lookahead===0&&(c.strstart=0,c.block_start=0,c.insert=0))),V(v),v.avail_out===0))return c.last_flush=-1,d}return re!==g?d:c.wrap<=0?1:(c.wrap===2?(J(c,255&v.adler),J(c,v.adler>>8&255),J(c,v.adler>>16&255),J(c,v.adler>>24&255),J(c,255&v.total_in),J(c,v.total_in>>8&255),J(c,v.total_in>>16&255),J(c,v.total_in>>24&255)):($(c,v.adler>>>16),$(c,65535&v.adler)),V(v),0=T.w_size&&(E===0&&(Ae(T.head),T.strstart=0,T.block_start=0,T.insert=0),oe=new s.Buf8(T.w_size),s.arraySet(oe,re,we-T.w_size,T.w_size,0),re=oe,we=T.w_size),O=v.avail_in,K=v.next_in,z=v.input,v.avail_in=we,v.next_in=0,v.input=re,M(T);T.lookahead>=C;){for(c=T.strstart,h=T.lookahead-(C-1);T.ins_h=(T.ins_h<>>=C=L>>>24,k-=C,(C=L>>>16&255)===0)H[f++]=65535&L;else{if(!(16&C)){if(!(64&C)){L=R[(65535&L)+(_&(1<>>=C,k-=C),k<15&&(_+=D[o++]<>>=C=L>>>24,k-=C,!(16&(C=L>>>16&255))){if(!(64&C)){L=N[(65535&L)+(_&(1<>>=C,k-=C,(C=f-m)>3,_&=(1<<(k-=ue<<3))-1,u.next_in=o,u.next_out=f,u.avail_in=o>>24&255)+(B>>>8&65280)+((65280&B)<<8)+((255&B)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(B){var Z;return B&&B.state?(Z=B.state,B.total_in=B.total_out=Z.total=0,B.msg="",Z.wrap&&(B.adler=1&Z.wrap),Z.mode=y,Z.last=0,Z.havedict=0,Z.dmax=32768,Z.head=null,Z.hold=0,Z.bits=0,Z.lencode=Z.lendyn=new u.Buf32(w),Z.distcode=Z.distdyn=new u.Buf32(b),Z.sane=1,Z.back=-1,g):d}function R(B){var Z;return B&&B.state?((Z=B.state).wsize=0,Z.whave=0,Z.wnext=0,k(B)):d}function N(B,Z){var D,H;return B&&B.state?(H=B.state,Z<0?(D=0,Z=-Z):(D=1+(Z>>4),Z<48&&(Z&=15)),Z&&(Z<8||15=W.wsize?(u.arraySet(W.window,Z,D-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(H<(ce=W.wsize-W.wnext)&&(ce=H),u.arraySet(W.window,Z,D-H,ce,W.wnext),(H-=ce)?(u.arraySet(W.window,Z,D-H,H,0),W.wnext=H,W.whave=W.wsize):(W.wnext+=ce,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,D.check=a(D.check,E,2,0),x=V=0,D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&V)<<8)+(V>>8))%31){B.msg="incorrect header check",D.mode=30;break}if((15&V)!=8){B.msg="unknown compression method",D.mode=30;break}if(x-=4,v=8+(15&(V>>>=4)),D.wbits===0)D.wbits=v;else if(v>D.wbits){B.msg="invalid window size",D.mode=30;break}D.dmax=1<>8&1),512&D.flags&&(E[0]=255&V,E[1]=V>>>8&255,D.check=a(D.check,E,2,0)),x=V=0,D.mode=3;case 3:for(;x<32;){if(X===0)break e;X--,V+=H[W++]<>>8&255,E[2]=V>>>16&255,E[3]=V>>>24&255,D.check=a(D.check,E,4,0)),x=V=0,D.mode=4;case 4:for(;x<16;){if(X===0)break e;X--,V+=H[W++]<>8),512&D.flags&&(E[0]=255&V,E[1]=V>>>8&255,D.check=a(D.check,E,2,0)),x=V=0,D.mode=5;case 5:if(1024&D.flags){for(;x<16;){if(X===0)break e;X--,V+=H[W++]<>>8&255,D.check=a(D.check,E,2,0)),x=V=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&(X<(ie=D.length)&&(ie=X),ie&&(D.head&&(v=D.head.extra_len-D.length,D.head.extra||(D.head.extra=new Array(D.head.extra_len)),u.arraySet(D.head.extra,H,W,ie,v)),512&D.flags&&(D.check=a(D.check,H,ie,W)),X-=ie,W+=ie,D.length-=ie),D.length))break e;D.length=0,D.mode=7;case 7:if(2048&D.flags){if(X===0)break e;for(ie=0;v=H[W+ie++],D.head&&v&&D.length<65536&&(D.head.name+=String.fromCharCode(v)),v&&ie>9&1,D.head.done=!0),B.adler=D.check=0,D.mode=12;break;case 10:for(;x<32;){if(X===0)break e;X--,V+=H[W++]<>>=7&x,x-=7&x,D.mode=27;break}for(;x<3;){if(X===0)break e;X--,V+=H[W++]<>>=1)){case 0:D.mode=14;break;case 1:if(ue(D),D.mode=20,Z!==6)break;V>>>=2,x-=2;break e;case 2:D.mode=17;break;case 3:B.msg="invalid block type",D.mode=30}V>>>=2,x-=2;break;case 14:for(V>>>=7&x,x-=7&x;x<32;){if(X===0)break e;X--,V+=H[W++]<>>16^65535)){B.msg="invalid stored block lengths",D.mode=30;break}if(D.length=65535&V,x=V=0,D.mode=15,Z===6)break e;case 15:D.mode=16;case 16:if(ie=D.length){if(X>>=5,x-=5,D.ndist=1+(31&V),V>>>=5,x-=5,D.ncode=4+(15&V),V>>>=4,x-=4,286>>=3,x-=3}for(;D.have<19;)D.lens[O[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,T={bits:D.lenbits},re=l(0,D.lens,0,19,D.lencode,0,D.work,T),D.lenbits=T.bits,re){B.msg="invalid code lengths set",D.mode=30;break}D.have=0,D.mode=19;case 19:for(;D.have>>16&255,U=65535&h,!((S=h>>>24)<=x);){if(X===0)break e;X--,V+=H[W++]<>>=S,x-=S,D.lens[D.have++]=U;else{if(U===16){for(c=S+2;x>>=S,x-=S,D.have===0){B.msg="invalid bit length repeat",D.mode=30;break}v=D.lens[D.have-1],ie=3+(3&V),V>>>=2,x-=2}else if(U===17){for(c=S+3;x>>=S)),V>>>=3,x-=3}else{for(c=S+7;x>>=S)),V>>>=7,x-=7}if(D.have+ie>D.nlen+D.ndist){B.msg="invalid bit length repeat",D.mode=30;break}for(;ie--;)D.lens[D.have++]=v}}if(D.mode===30)break;if(D.lens[256]===0){B.msg="invalid code -- missing end-of-block",D.mode=30;break}if(D.lenbits=9,T={bits:D.lenbits},re=l(f,D.lens,0,D.nlen,D.lencode,0,D.work,T),D.lenbits=T.bits,re){B.msg="invalid literal/lengths set",D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,T={bits:D.distbits},re=l(m,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,T),D.distbits=T.bits,re){B.msg="invalid distances set",D.mode=30;break}if(D.mode=20,Z===6)break e;case 20:D.mode=21;case 21:if(6<=X&&258<=Ae){B.next_out=pe,B.avail_out=Ae,B.next_in=W,B.avail_in=X,D.hold=V,D.bits=x,o(B,$),pe=B.next_out,ce=B.output,Ae=B.avail_out,W=B.next_in,H=B.input,X=B.avail_in,V=D.hold,x=D.bits,D.mode===12&&(D.back=-1);break}for(D.back=0;G=(h=D.lencode[V&(1<>>16&255,U=65535&h,!((S=h>>>24)<=x);){if(X===0)break e;X--,V+=H[W++]<>I)])>>>16&255,U=65535&h,!(I+(S=h>>>24)<=x);){if(X===0)break e;X--,V+=H[W++]<>>=I,x-=I,D.back+=I}if(V>>>=S,x-=S,D.back+=S,D.length=U,G===0){D.mode=26;break}if(32&G){D.back=-1,D.mode=12;break}if(64&G){B.msg="invalid literal/length code",D.mode=30;break}D.extra=15&G,D.mode=22;case 22:if(D.extra){for(c=D.extra;x>>=D.extra,x-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=23;case 23:for(;G=(h=D.distcode[V&(1<>>16&255,U=65535&h,!((S=h>>>24)<=x);){if(X===0)break e;X--,V+=H[W++]<>I)])>>>16&255,U=65535&h,!(I+(S=h>>>24)<=x);){if(X===0)break e;X--,V+=H[W++]<>>=I,x-=I,D.back+=I}if(V>>>=S,x-=S,D.back+=S,64&G){B.msg="invalid distance code",D.mode=30;break}D.offset=U,D.extra=15&G,D.mode=24;case 24:if(D.extra){for(c=D.extra;x>>=D.extra,x-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){B.msg="invalid distance too far back",D.mode=30;break}D.mode=25;case 25:if(Ae===0)break e;if(ie=$-Ae,D.offset>ie){if((ie=D.offset-ie)>D.whave&&D.sane){B.msg="invalid distance too far back",D.mode=30;break}M=ie>D.wnext?(ie-=D.wnext,D.wsize-ie):D.wnext-ie,ie>D.length&&(ie=D.length),A=D.window}else A=ce,M=pe-D.offset,ie=D.length;for(Aej?(C=M[A+b[Z]],x[J+b[Z]]):(C=96,0),_=1<>pe)+(k-=_)]=L<<24|C<<16|ue|0,k!==0;);for(_=1<>=1;if(_!==0?(V&=_-1,V+=_):V=0,Z++,--$[B]==0){if(B===H)break;B=m[g+b[Z]]}if(ce>>7)]}function J(h,E){h.pending_buf[h.pending++]=255&E,h.pending_buf[h.pending++]=E>>>8&255}function $(h,E,O){h.bi_valid>p-O?(h.bi_buf|=E<>p-h.bi_valid,h.bi_valid+=O-p):(h.bi_buf|=E<>>=1,O<<=1,0<--E;);return O>>>1}function A(h,E,O){var K,z,oe=new Array(b+1),we=0;for(K=1;K<=b;K++)oe[K]=we=we+O[K-1]<<1;for(z=0;z<=E;z++){var de=h[2*z+1];de!==0&&(h[2*z]=M(oe[de]++,de))}}function S(h){var E;for(E=0;E>1;1<=O;O--)I(h,oe,O);for(z=Ce;O=h.heap[1],h.heap[1]=h.heap[h.heap_len--],I(h,oe,1),K=h.heap[1],h.heap[--h.heap_max]=O,h.heap[--h.heap_max]=K,oe[2*z]=oe[2*O]+oe[2*K],h.depth[z]=(h.depth[O]>=h.depth[K]?h.depth[O]:h.depth[K])+1,oe[2*O+1]=oe[2*K+1]=z,h.heap[1]=z++,I(h,oe,1),2<=h.heap_len;);h.heap[--h.heap_max]=h.heap[1],function(te,ke){var Be,De,Ne,Se,Re,Pe,ze=ke.dyn_tree,Ke=ke.max_code,$e=ke.stat_desc.static_tree,et=ke.stat_desc.has_stree,We=ke.stat_desc.extra_bits,pt=ke.stat_desc.extra_base,Ut=ke.stat_desc.max_length,Qt=0;for(Se=0;Se<=b;Se++)te.bl_count[Se]=0;for(ze[2*te.heap[te.heap_max]+1]=0,Be=te.heap_max+1;Be>=7;z>>=1)if(1&Fe&&de.dyn_ltree[2*Ce]!==0)return s;if(de.dyn_ltree[18]!==0||de.dyn_ltree[20]!==0||de.dyn_ltree[26]!==0)return a;for(Ce=32;Ce>>3,(oe=h.static_len+3+7>>>3)<=z&&(z=oe)):z=oe=O+5,O+4<=z&&E!==-1?c(h,E,O,K):h.strategy===4||oe===z?($(h,2+(K?1:0),3),F(h,ne,B)):($(h,4+(K?1:0),3),function(de,Ce,Fe,te){var ke;for($(de,Ce-257,5),$(de,Fe-1,5),$(de,te-4,4),ke=0;ke>>8&255,h.pending_buf[h.d_buf+2*h.last_lit+1]=255&E,h.pending_buf[h.l_buf+h.last_lit]=255&O,h.last_lit++,E===0?h.dyn_ltree[2*O]++:(h.matches++,E--,h.dyn_ltree[2*(D[O]+m+1)]++,h.dyn_dtree[2*x(E)]++),h.last_lit===h.lit_bufsize-1},i._tr_align=function(h){$(h,2,3),ie(h,k,ne),function(E){E.bi_valid===16?(J(E,E.bi_buf),E.bi_buf=0,E.bi_valid=0):8<=E.bi_valid&&(E.pending_buf[E.pending++]=255&E.bi_buf,E.bi_buf>>=8,E.bi_valid-=8)}(h)}},{"../utils/common":41}],53:[function(t,n,i){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,i){(function(u){(function(s,a){if(!s.setImmediate){var o,l,f,m,g=1,d={},y=!1,w=s.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(s);b=b&&b.setTimeout?b:s,o={}.toString.call(s.process)==="[object process]"?function(R){je.nextTick(function(){_(R)})}:function(){if(s.postMessage&&!s.importScripts){var R=!0,N=s.onmessage;return s.onmessage=function(){R=!1},s.postMessage("","*"),s.onmessage=N,R}}()?(m="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",k,!1):s.attachEvent("onmessage",k),function(R){s.postMessage(m+R,"*")}):s.MessageChannel?((f=new MessageChannel).port1.onmessage=function(R){_(R.data)},function(R){f.port2.postMessage(R)}):w&&"onreadystatechange"in w.createElement("script")?(l=w.documentElement,function(R){var N=w.createElement("script");N.onreadystatechange=function(){_(R),N.onreadystatechange=null,l.removeChild(N),N=null},l.appendChild(N)}):function(R){setTimeout(_,0,R)},b.setImmediate=function(R){typeof R!="function"&&(R=new Function(""+R));for(var N=new Array(arguments.length-1),q=0;q"u"?u===void 0?this:u:self)}).call(this,typeof Tr<"u"?Tr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(sc);var dm=sc.exports;const pm=cl(dm);var Bi={exports:{}},mm={"&":"&",'"':""","'":"'","<":"<",">":">"};function gm(r){return r&&r.replace?r.replace(/([&"<>'])/g,function(e,t){return mm[t]}):r}var wm=gm,is=wm,Io=ps.Stream,ym=" ";function bm(r,e){typeof e!="object"&&(e={indent:e});var t=e.stream?new Io:null,n="",i=!1,u=e.indent?e.indent===!0?ym:e.indent:"",s=!0;function a(g){s?je.nextTick(g):g()}function o(g,d){if(d!==void 0&&(n+=d),g&&!i&&(t=t||new Io,i=!0),g&&i){var y=n;a(function(){t.emit("data",y)}),n=""}}function l(g,d){Ts(o,Ni(g,u,u?1:0),d)}function f(){if(t){var g=n;a(function(){t.emit("data",g),t.emit("end"),t.readable=!1,t.emit("close")})}}function m(g){var d=g.encoding||"UTF-8",y={version:"1.0",encoding:d};g.standalone&&(y.standalone=g.standalone),l({"?xml":{_attr:y}}),n=n.replace("/>","?>")}return a(function(){s=!1}),e.declaration&&m(e.declaration),r&&r.forEach?r.forEach(function(g,d){var y;d+1===r.length&&(y=f),l(g,y)}):l(r,f),t?(t.readable=!0,t):n}function _m(){var r=Array.prototype.slice.call(arguments),e={_elem:Ni(r)};return e.push=function(t){if(!this.append)throw new Error("not assigned to a parent!");var n=this,i=this._elem.indent;Ts(this.append,Ni(t,i,this._elem.icount+(i?1:0)),function(){n.append(!0)})},e.close=function(t){t!==void 0&&this.push(t),this.end&&this.end()},e}function vm(r,e){return new Array(e||0).join(r||"")}function Ni(r,e,t){t=t||0;var n=vm(e,t),i,u=r,s=!1;if(typeof r=="object"){var a=Object.keys(r);if(i=a[0],u=r[i],u&&u._elem)return u._elem.name=i,u._elem.icount=t,u._elem.indent=e,u._elem.indents=n,u._elem.interrupt=u,u._elem}var o=[],l=[],f;function m(g){var d=Object.keys(g);d.forEach(function(y){o.push(Em(y,g[y]))})}switch(typeof u){case"object":if(u===null)break;u._attr&&m(u._attr),u._cdata&&l.push(("/g,"]]]]>")+"]]>"),u.forEach&&(f=!1,l.push(""),u.forEach(function(g){if(typeof g=="object"){var d=Object.keys(g)[0];d=="_attr"?m(g._attr):l.push(Ni(g,e,t+1))}else l.pop(),f=!0,l.push(is(g))}),f||l.push(""));break;default:l.push(is(u))}return{name:i,interrupt:s,attributes:o,content:l,icount:t,indents:n,indent:e}}function Ts(r,e,t){if(typeof e!="object")return r(!1,e);var n=e.interrupt?1:e.content.length;function i(){for(;e.content.length;){var s=e.content.shift();if(s!==void 0){if(u(s))return;Ts(r,s)}}r(!1,(n>1?e.indents:"")+(e.name?"":"")+(e.indent&&!t?` `:"")),t&&t()}function u(s){return s.interrupt?(s.interrupt.append=r,s.interrupt.end=i,s.interrupt=!1,r(!0),!0):!1}if(r(!1,e.indents+(e.name?"<"+e.name:"")+(e.attributes.length?" "+e.attributes.join(" "):"")+(n?e.name?">":"":e.name?"/>":"")+(e.indent&&n>1?` `:"")),!n)return r(!1,e.indent?` `:"");u(e)||i()}function Em(r,e){return r+'="'+is(e)+'"'}Bi.exports=bm;Bi.exports.element=Bi.exports.Element=_m;var Sm=Bi.exports;const yt=cl(Sm),Fo=0,Bo=32,Am=32,Tm=(r,e)=>{const t=e.replace(/-/g,"");if(t.length!==Am)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const i=t.replace(/(..)/g,"$1 ").trim().split(" ").map(o=>parseInt(o,16));i.reverse();const s=r.slice(Fo,Bo).map((o,l)=>o^i[l%i.length]);return Buffer.concat([r.slice(0,Fo),s,r.slice(Bo)])};class km{format(e,t={stack:[]}){const n=e.prepForXml(t);if(n)return n;throw Error("XMLComponent did not format correctly")}}class Dm{replace(e,t,n){let i=e;return t.forEach((u,s)=>{i=i.replace(new RegExp(`{${u.fileName}}`,"g"),(n+s).toString())}),i}getMediaData(e,t){return t.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class Cm{replace(e,t){let n=e;for(const i of t)n=n.replace(new RegExp(`{${i.reference}-${i.instance}}`,"g"),i.numId.toString());return n}}class xm{constructor(){ge(this,"formatter"),ge(this,"imageReplacer"),ge(this,"numberingReplacer"),this.formatter=new km,this.imageReplacer=new Dm,this.numberingReplacer=new Cm}compile(e,t){const n=new pm,i=this.xmlifyFile(e,t),u=new Map(Object.entries(i));for(const[,s]of u)if(Array.isArray(s))for(const a of s)n.file(a.path,a.data);else n.file(s.path,s.data);for(const{stream:s,fileName:a}of e.Media.Array)n.file(`word/media/${a}`,s);for(const{data:s,name:a,fontKey:o}of e.FontTable.fontOptionsWithKey){const[l]=a.split(".");n.file(`word/fonts/${l}.odttf`,Tm(s,o))}return n}xmlifyFile(e,t){const n=e.Document.Relationships.RelationshipCount+1,i=yt(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),u=this.imageReplacer.getMediaData(i,e.Media);return{Relationships:{data:(u.forEach((s,a)=>{e.Document.Relationships.createRelationship(n+a,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${s.fileName}`)}),yt(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const s=this.imageReplacer.replace(i,u,n);return this.numberingReplacer.replace(s,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const s=yt(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(s,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:yt(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:yt(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:yt(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((s,a)=>{const o=yt(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(o,e.Media).forEach((f,m)=>{s.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${f.fileName}`)}),{data:yt(this.formatter.format(s.Relationships,{viewWrapper:s,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${a+1}.xml.rels`}}),FooterRelationships:e.Footers.map((s,a)=>{const o=yt(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(o,e.Media).forEach((f,m)=>{s.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${f.fileName}`)}),{data:yt(this.formatter.format(s.Relationships,{viewWrapper:s,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${a+1}.xml.rels`}}),Headers:e.Headers.map((s,a)=>{const o=yt(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),l=this.imageReplacer.getMediaData(o,e.Media),f=this.imageReplacer.replace(o,l,0);return{data:this.numberingReplacer.replace(f,e.Numbering.ConcreteNumbering),path:`word/header${a+1}.xml`}}),Footers:e.Footers.map((s,a)=>{const o=yt(this.formatter.format(s.View,{viewWrapper:s,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),l=this.imageReplacer.getMediaData(o,e.Media),f=this.imageReplacer.replace(o,l,0);return{data:this.numberingReplacer.replace(f,e.Numbering.ConcreteNumbering),path:`word/footer${a+1}.xml`}}),ContentTypes:{data:yt(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:yt(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:yt(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:yt(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:yt(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:yt(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:yt(this.formatter.format(e.Comments,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/comments.xml"},FontTable:{data:yt(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:yt(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const Rm={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},Gn=r=>r===!0?Rm.WITH_2_BLANKS:r===!1?void 0:r;class ac{static toString(e,t){return mi(this,null,function*(){return yield this.compiler.compile(e,Gn(t)).generateAsync({type:"string",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBuffer(e,t){return mi(this,null,function*(){return yield this.compiler.compile(e,Gn(t)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBase64String(e,t){return mi(this,null,function*(){return yield this.compiler.compile(e,Gn(t)).generateAsync({type:"base64",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBlob(e,t){return mi(this,null,function*(){return yield this.compiler.compile(e,Gn(t)).generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toStream(e,t){const n=new ps.Stream;return this.compiler.compile(e,Gn(t)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(u=>{n.emit("data",u),n.emit("end")}),n}}ge(ac,"compiler",new xm);var Vn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Im(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var oc={exports:{}};(function(r,e){(function(t,n){n()})(Vn,function(){function t(l,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function n(l,f,m){var g=new XMLHttpRequest;g.open("GET",l),g.responseType="blob",g.onload=function(){o(g.response,f,m)},g.onerror=function(){console.error("could not download file")},g.send()}function i(l){var f=new XMLHttpRequest;f.open("HEAD",l,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function u(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(f)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Vn=="object"&&Vn.global===Vn?Vn:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(l,f,m){var g=s.URL||s.webkitURL,d=document.createElement("a");f=f||l.name||"download",d.download=f,d.rel="noopener",typeof l=="string"?(d.href=l,d.origin===location.origin?u(d):i(d.href)?n(l,f,m):u(d,d.target="_blank")):(d.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(d.href)},4e4),setTimeout(function(){u(d)},0))}:"msSaveOrOpenBlob"in navigator?function(l,f,m){if(f=f||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(t(l,m),f);else if(i(l))n(l,f,m);else{var g=document.createElement("a");g.href=l,g.target="_blank",setTimeout(function(){u(g)})}}:function(l,f,m,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof l=="string")return n(l,f,m);var d=l.type==="application/octet-stream",y=/constructor/i.test(s.HTMLElement)||s.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||d&&y||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=w?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=k:location=k,g=null},b.readAsDataURL(l)}else{var p=s.URL||s.webkitURL,_=p.createObjectURL(l);g?g.location=_:location.href=_,g=null,setTimeout(function(){p.revokeObjectURL(_)},4e4)}});s.saveAs=o.saveAs=o,r.exports=o})})(oc);var Fm=oc.exports;const Bm=Im(Fm),{saveAs:Nm}=Bm;class Om{static createDocxFromObject(e){const t=[],n=l=>l.replace(/[<>&'"]/g,function(f){switch(f){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return f}}),i=l=>l.replace(/[\u0000-\u001F\u007F-\u009F\uFFFD\uFF]/g,""),u=l=>i(n(l)).split(` `).map(f=>new nr({children:[new Fi({text:f,font:"Calibri"})],spacing:{line:276}})),s=l=>[{label:"Выбрать источники для LLM",value:l.enableSearchResultSelection},{label:"Использовать ключевые слова",value:l.useKeywords},{label:"Выполнить поиск по БУ",value:l.useAccountingDocs},{label:"Использовать многоступенчатый поиск",value:l.doMultistepSearch},{label:"Использовать LLM для тизеров",value:l.enableLLMForTeasers},{label:"Использовать LLM для фильтрации источников",value:l.useLLMForFiltering},{label:"Выключить фильтрацию по порогам",value:l.disableThresholds},{label:"Получить более короткий ответ",value:l.useShortestPrompt},{label:"Выводить ответ в реальном времени",value:l.enableRealtimeLlmReponse},{label:"Учитывать консультации в ответе",value:l.sendConsultationToLlm},{label:"Использовать переранжирование",value:l.useReranking},{label:"Карты проводок по вопросу",value:l.searchInTransactionLedgerByQuestion},{label:"Карты проводок по хоз. операциям",value:l.searchInTransactionLedgerByOperation}].map(m=>new nr({children:[new Fi({text:`${i(n(m.label))}: ${m.value?"да":"нет"}`,font:"Calibri"})],spacing:{line:276}}));t.push(new nr({text:"Вопрос:",heading:Kr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...u(e.userRequest)),t.push(new nr({text:"Ответ системы:",heading:Kr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...u(e.llmResponse)),e.searchResults.length>0&&(t.push(new nr({text:"Найденные источники:",heading:Kr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"})),e.searchResults.forEach(l=>{const f=JSON.parse(l);t.push(new nr({text:i(n(f.title)),heading:Kr.HEADING_2,spacing:{line:360,before:200},font:"Calibri"}),...u(f.text))})),e.consultations.length>0&&(t.push(new nr({text:"Найденные консультации:",heading:Kr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"})),e.consultations.forEach(l=>{const f=JSON.parse(l);t.push(new nr({text:i(n(f.title)),heading:Kr.HEADING_2,spacing:{line:360,before:200},font:"Calibri"}),...u(f.text))})),t.push(new nr({text:"Параметры запроса:",heading:Kr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...s(e.uiSettings));const a=new hm({sections:[{properties:{},children:t}]}),o=()=>{const l=new Date,f=l.toISOString().slice(0,10),m=l.toTimeString().slice(0,8).replace(/:/g,"-");return`Document_${f}_${m}.docx`};ac.toBlob(a).then(l=>{Nm(l,o())})}}const Pm="66d6a6c5ac59a1dde4b24a6e";function No(r){let e,t;return e=new nf({props:{status:r[10]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const u={};i[0]&1024&&(u.status=n[10]),e.$set(u)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){xe(e.$$.fragment,n),t=!1},d(n){ut(e,n)}}}function Oo(r){let e,t;return e=new af({props:{status:r[11]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const u={};i[0]&2048&&(u.status=n[11]),e.$set(u)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){xe(e.$$.fragment,n),t=!1},d(n){ut(e,n)}}}function Po(r){let e,t="Очистить",n,i;return{c(){e=se("button"),e.textContent=t,this.h()},l(u){e=ae(u,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(e)!=="svelte-1rjqwcg"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(u,s){Te(u,e,s),n||(i=Ie(e,"click",r[46]),n=!0)},p:qe,d(u){u&&Y(e),n=!1,i()}}}function Lo(r){let e,t="Остановить",n,i;return{c(){e=se("button"),e.textContent=t,this.h()},l(u){e=ae(u,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(e)!=="svelte-a5kyut"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(u,s){Te(u,e,s),n||(i=Ie(e,"click",r[53]),n=!0)},p:qe,d(u){u&&Y(e),n=!1,i()}}}function Mo(r){let e,t,n,i,u,s;return u=new ef({}),{c(){e=se("div"),t=lt(r[19]),n=ve(),i=se("div"),rt(u.$$.fragment),this.h()},l(a){e=ae(a,"DIV",{class:!0});var o=me(e);t=ct(o,r[19]),o.forEach(Y),n=Ee(a),i=ae(a,"DIV",{class:!0});var l=me(i);nt(u.$$.fragment,l),l.forEach(Y),this.h()},h(){P(e,"class","loading-status svelte-rgnwju"),P(i,"class","loading-container svelte-rgnwju")},m(a,o){Te(a,e,o),Q(e,t),Te(a,n,o),Te(a,i,o),it(u,i,null),s=!0},p(a,o){(!s||o[0]&524288)&&Xt(t,a[19])},i(a){s||(ye(u.$$.fragment,a),s=!0)},o(a){xe(u.$$.fragment,a),s=!1},d(a){a&&(Y(e),Y(n),Y(i)),ut(u)}}}function Lm(r){let e;return{c(){e=lt("Выбрать источники для LLM")},l(t){e=ct(t,"Выбрать источники для LLM")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function Mm(r){let e;return{c(){e=lt("Использовать ключевые слова")},l(t){e=ct(t,"Использовать ключевые слова")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function Um(r){let e;return{c(){e=lt("Выполнить поиск по БУ")},l(t){e=ct(t,"Выполнить поиск по БУ")},m(t,n){Te(t,e,n)},d(t){t&&Y(e)}}}function Uo(r){let e,t;return e=new ff({props:{onSave:r[44],onClose:r[45],text:r[13]}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const u={};i[0]&8192&&(u.text=n[13]),e.$set(u)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){xe(e.$$.fragment,n),t=!1},d(n){ut(e,n)}}}function zo(r){let e,t,n,i;function u(a){r[87](a)}let s={enableDocumentDb:r[42],documentDbUrl:r[41]};return r[15]!==void 0&&(s.transactionMaps=r[15]),t=new Yf({props:s}),Ge.push(()=>Je(t,"transactionMaps",u)),{c(){e=se("div"),rt(t.$$.fragment),this.h()},l(a){e=ae(a,"DIV",{class:!0});var o=me(e);nt(t.$$.fragment,o),o.forEach(Y),this.h()},h(){P(e,"class","search-column svelte-rgnwju")},m(a,o){Te(a,e,o),it(t,e,null),i=!0},p(a,o){const l={};!n&&o[0]&32768&&(n=!0,l.transactionMaps=a[15],Ye(()=>n=!1)),t.$set(l)},i(a){i||(ye(t.$$.fragment,a),i=!0)},o(a){xe(t.$$.fragment,a),i=!1},d(a){a&&Y(e),ut(t)}}}function jo(r){let e,t='

Не могу предоставить консультацию по вашему вопросу, т.к. поиск ничего не нашел.

Пожалуйста, попробуйте переформулировать запрос.

';return{c(){e=se("aside"),e.innerHTML=t,this.h()},l(n){e=ae(n,"ASIDE",{class:!0,style:!0,"data-svelte-h":!0}),Ve(e)!=="svelte-196qmgn"&&(e.innerHTML=t),this.h()},h(){P(e,"class","alert variant-filled"),Jt(e,"margin","1rem")},m(n,i){Te(n,e,i)},d(n){n&&Y(e)}}}function Ho(r){let e,t,n,i;const u=[jm,zm],s=[];function a(o,l){return o[7]?0:1}return e=a(r),t=s[e]=u[e](r),{c(){t.c(),n=at()},l(o){t.l(o),n=at()},m(o,l){s[e].m(o,l),Te(o,n,l),i=!0},p(o,l){let f=e;e=a(o),e===f?s[e].p(o,l):(ht(),xe(s[f],1,1,()=>{s[f]=null}),dt(),t=s[e],t?t.p(o,l):(t=s[e]=u[e](o),t.c()),ye(t,1),t.m(n.parentNode,n))},i(o){i||(ye(t),i=!0)},o(o){xe(t),i=!1},d(o){o&&Y(n),s[e].d(o)}}}function zm(r){let e,t;return e=new K0({props:{theme:"modern-theme",$$slots:{default:[Gm]},$$scope:{ctx:r}}}),{c(){rt(e.$$.fragment)},l(n){nt(e.$$.fragment,n)},m(n,i){it(e,n,i),t=!0},p(n,i){const u={};i[0]&16007174|i[1]&318|i[3]&33554432&&(u.$$scope={dirty:i,ctx:n}),e.$set(u)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){xe(e.$$.fragment,n),t=!1},d(n){ut(e,n)}}}function jm(r){let e,t,n,i="Получить ответ",u,s,a="Уточнить ответ",o,l,f="Скачать ответ в Word",m,g,d,y,w,b,p,_,k,R,N,q,j,L,C,ue=r[36]&&Ko(r);function ne(W){r[89](W)}function B(W){r[90](W)}function Z(W){r[91](W)}function D(W){r[92](W)}let H={enableDocumentDb:r[42],documentDbUrl:r[41]};r[1]!==void 0&&(H.searchResults=r[1]),r[20]!==void 0&&(H.showFullText=r[20]),r[22]!==void 0&&(H.useSearchResult=r[22]),r[23]!==void 0&&(H.enableSearchResultSelection=r[23]),p=new ol({props:H}),Ge.push(()=>Je(p,"searchResults",ne)),Ge.push(()=>Je(p,"showFullText",B)),Ge.push(()=>Je(p,"useSearchResult",Z)),Ge.push(()=>Je(p,"enableSearchResultSelection",D));let ce=r[14]&&r[14].length>0&&qo(r);return{c(){e=se("div"),t=se("div"),n=se("button"),n.textContent=i,u=ve(),s=se("button"),s.textContent=a,o=ve(),l=se("button"),l.textContent=f,m=ve(),g=se("div"),d=new Jr(!1),y=ve(),ue&&ue.c(),w=ve(),b=se("div"),rt(p.$$.fragment),q=ve(),ce&&ce.c(),this.h()},l(W){e=ae(W,"DIV",{class:!0});var pe=me(e);t=ae(pe,"DIV",{class:!0});var X=me(t);n=ae(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(n)!=="svelte-18s0twx"&&(n.textContent=i),u=Ee(X),s=ae(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(s)!=="svelte-t6wyk0"&&(s.textContent=a),o=Ee(X),l=ae(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(l)!=="svelte-14pzf6r"&&(l.textContent=f),m=Ee(X),g=ae(X,"DIV",{class:!0});var Ae=me(g);d=Qr(Ae,!1),Ae.forEach(Y),y=Ee(X),ue&&ue.l(X),X.forEach(Y),pe.forEach(Y),w=Ee(W),b=ae(W,"DIV",{class:!0});var V=me(b);nt(p.$$.fragment,V),q=Ee(V),ce&&ce.l(V),V.forEach(Y),this.h()},h(){P(n,"class","btn variant-filled"),gt(n,"hidden",!(r[23]&&r[1].length>0&&!r[39])),P(s,"class","btn variant-filled"),gt(s,"hidden",!r[39]),P(l,"class","btn variant-filled"),d.a=null,P(g,"class","textarea svelte-rgnwju"),P(t,"class","textarea svelte-rgnwju"),P(e,"class","textarea-column svelte-rgnwju"),P(b,"class","search-column svelte-rgnwju")},m(W,pe){Te(W,e,pe),Q(e,t),Q(t,n),Q(t,u),Q(t,s),Q(t,o),Q(t,l),Q(t,m),Q(t,g),d.m(r[18],g),Q(t,y),ue&&ue.m(t,null),Te(W,w,pe),Te(W,b,pe),it(p,b,null),Q(b,q),ce&&ce.m(b,null),j=!0,L||(C=[Ie(n,"click",r[54]),Ie(s,"click",r[51]),Ie(l,"click",r[58])],L=!0)},p(W,pe){(!j||pe[0]&8388610|pe[1]&256)&>(n,"hidden",!(W[23]&&W[1].length>0&&!W[39])),(!j||pe[1]&256)&>(s,"hidden",!W[39]),(!j||pe[0]&262144)&&d.p(W[18]),W[36]?ue?ue.p(W,pe):(ue=Ko(W),ue.c(),ue.m(t,null)):ue&&(ue.d(1),ue=null);const X={};!_&&pe[0]&2&&(_=!0,X.searchResults=W[1],Ye(()=>_=!1)),!k&&pe[0]&1048576&&(k=!0,X.showFullText=W[20],Ye(()=>k=!1)),!R&&pe[0]&4194304&&(R=!0,X.useSearchResult=W[22],Ye(()=>R=!1)),!N&&pe[0]&8388608&&(N=!0,X.enableSearchResultSelection=W[23],Ye(()=>N=!1)),p.$set(X),W[14]&&W[14].length>0?ce?(ce.p(W,pe),pe[0]&16384&&ye(ce,1)):(ce=qo(W),ce.c(),ye(ce,1),ce.m(b,null)):ce&&(ht(),xe(ce,1,1,()=>{ce=null}),dt())},i(W){j||(ye(p.$$.fragment,W),ye(ce),j=!0)},o(W){xe(p.$$.fragment,W),xe(ce),j=!1},d(W){W&&(Y(e),Y(w),Y(b)),ue&&ue.d(),ut(p),ce&&ce.d(),L=!1,ar(C)}}}function Wo(r){let e,t,n,i;function u(o){r[99](o)}function s(o){r[100](o)}let a={};return r[14]!==void 0&&(a.consultations=r[14]),r[21]!==void 0&&(a.showFullText=r[21]),e=new ll({props:a}),Ge.push(()=>Je(e,"consultations",u)),Ge.push(()=>Je(e,"showFullText",s)),{c(){rt(e.$$.fragment)},l(o){nt(e.$$.fragment,o)},m(o,l){it(e,o,l),i=!0},p(o,l){const f={};!t&&l[0]&16384&&(t=!0,f.consultations=o[14],Ye(()=>t=!1)),!n&&l[0]&2097152&&(n=!0,f.showFullText=o[21],Ye(()=>n=!1)),e.$set(f)},i(o){i||(ye(e.$$.fragment,o),i=!0)},o(o){xe(e.$$.fragment,o),i=!1},d(o){ut(e,o)}}}function Hm(r){let e,t,n,i,u,s,a,o;function l(w){r[95](w)}function f(w){r[96](w)}function m(w){r[97](w)}function g(w){r[98](w)}let d={enableDocumentDb:r[42],documentDbUrl:r[41]};r[1]!==void 0&&(d.searchResults=r[1]),r[20]!==void 0&&(d.showFullText=r[20]),r[22]!==void 0&&(d.useSearchResult=r[22]),r[23]!==void 0&&(d.enableSearchResultSelection=r[23]),t=new ol({props:d}),Ge.push(()=>Je(t,"searchResults",l)),Ge.push(()=>Je(t,"showFullText",f)),Ge.push(()=>Je(t,"useSearchResult",m)),Ge.push(()=>Je(t,"enableSearchResultSelection",g));let y=r[14]&&r[14].length>0&&Wo(r);return{c(){e=se("div"),rt(t.$$.fragment),a=ve(),y&&y.c(),this.h()},l(w){e=ae(w,"DIV",{class:!0});var b=me(e);nt(t.$$.fragment,b),a=Ee(b),y&&y.l(b),b.forEach(Y),this.h()},h(){P(e,"class","search-column svelte-rgnwju")},m(w,b){Te(w,e,b),it(t,e,null),Q(e,a),y&&y.m(e,null),o=!0},p(w,b){const p={};!n&&b[0]&2&&(n=!0,p.searchResults=w[1],Ye(()=>n=!1)),!i&&b[0]&1048576&&(i=!0,p.showFullText=w[20],Ye(()=>i=!1)),!u&&b[0]&4194304&&(u=!0,p.useSearchResult=w[22],Ye(()=>u=!1)),!s&&b[0]&8388608&&(s=!0,p.enableSearchResultSelection=w[23],Ye(()=>s=!1)),t.$set(p),w[14]&&w[14].length>0?y?(y.p(w,b),b[0]&16384&&ye(y,1)):(y=Wo(w),y.c(),ye(y,1),y.m(e,null)):y&&(ht(),xe(y,1,1,()=>{y=null}),dt())},i(w){o||(ye(t.$$.fragment,w),ye(y),o=!0)},o(w){xe(t.$$.fragment,w),xe(y),o=!1},d(w){w&&Y(e),ut(t),y&&y.d()}}}function Go(r){let e,t;return{c(){e=new Jr(!1),t=at(),this.h()},l(n){e=Qr(n,!1),t=at(),this.h()},h(){e.a=t},m(n,i){e.m(r[18],n,i),Te(n,t,i)},p(n,i){i[0]&262144&&e.p(n[18])},d(n){n&&(Y(t),e.d())}}}function Vo(r){let e,t,n="Оцените ответ:",i,u,s="👍",a,o,l="👎",f,m,g,d;return{c(){e=se("div"),t=se("span"),t.textContent=n,i=ve(),u=se("button"),u.textContent=s,a=ve(),o=se("button"),o.textContent=l,f=ve(),m=se("textarea"),this.h()},l(y){e=ae(y,"DIV",{});var w=me(e);t=ae(w,"SPAN",{"data-svelte-h":!0}),Ve(t)!=="svelte-9pssby"&&(t.textContent=n),i=Ee(w),u=ae(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(u)!=="svelte-1hnmipt"&&(u.textContent=s),a=Ee(w),o=ae(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(o)!=="svelte-12wf95"&&(o.textContent=l),f=Ee(w),m=ae(w,"TEXTAREA",{rows:!0,placeholder:!0,class:!0}),me(m).forEach(Y),w.forEach(Y),this.h()},h(){P(u,"class","btn-icon"),P(o,"class","btn-icon"),P(m,"rows","3"),P(m,"placeholder","Комментарий"),P(m,"class","svelte-rgnwju")},m(y,w){Te(y,e,w),Q(e,t),Q(e,i),Q(e,u),Q(e,a),Q(e,o),Q(e,f),Q(e,m),ir(m,r[35]),g||(d=[Ie(u,"click",r[55]),Ie(o,"click",r[56]),Ie(m,"input",r[101]),Ie(m,"input",r[49])],g=!0)},p(y,w){w[1]&16&&ir(m,y[35])},d(y){y&&Y(e),g=!1,ar(d)}}}function Wm(r){let e,t,n,i="Получить ответ",u,s,a="Уточнить ответ",o,l,f="Скачать ответ в Word",m,g,d,y,w,b=(r[34]&&r[2]||!r[34]&&!r[2]||r[34]&&r[18]&&!r[32]||r[18]&&r[32]&&r[33])&&Go(r),p=r[36]&&r[43]&&Vo(r);return{c(){e=se("div"),t=se("div"),n=se("button"),n.textContent=i,u=ve(),s=se("button"),s.textContent=a,o=ve(),l=se("button"),l.textContent=f,m=ve(),g=se("div"),b&&b.c(),d=ve(),p&&p.c(),this.h()},l(_){e=ae(_,"DIV",{class:!0});var k=me(e);t=ae(k,"DIV",{class:!0});var R=me(t);n=ae(R,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(n)!=="svelte-qvwp3t"&&(n.textContent=i),u=Ee(R),s=ae(R,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(s)!=="svelte-zcineo"&&(s.textContent=a),o=Ee(R),l=ae(R,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(l)!=="svelte-1ddim4b"&&(l.textContent=f),m=Ee(R),g=ae(R,"DIV",{class:!0});var N=me(g);b&&b.l(N),N.forEach(Y),d=Ee(R),p&&p.l(R),R.forEach(Y),k.forEach(Y),this.h()},h(){P(n,"class","btn variant-filled"),gt(n,"hidden",!(r[23]&&r[1].length>0&&!r[39])),P(s,"class","btn variant-filled"),gt(s,"hidden",!r[39]),P(l,"class","btn variant-filled"),P(g,"class","textarea svelte-rgnwju"),P(t,"class","textarea svelte-rgnwju"),P(e,"class","textarea-column svelte-rgnwju")},m(_,k){Te(_,e,k),Q(e,t),Q(t,n),Q(t,u),Q(t,s),Q(t,o),Q(t,l),Q(t,m),Q(t,g),b&&b.m(g,null),Q(t,d),p&&p.m(t,null),y||(w=[Ie(n,"click",r[54]),Ie(s,"click",r[51]),Ie(l,"click",r[58])],y=!0)},p(_,k){k[0]&8388610|k[1]&256&>(n,"hidden",!(_[23]&&_[1].length>0&&!_[39])),k[1]&256&>(s,"hidden",!_[39]),_[34]&&_[2]||!_[34]&&!_[2]||_[34]&&_[18]&&!_[32]||_[18]&&_[32]&&_[33]?b?b.p(_,k):(b=Go(_),b.c(),b.m(g,null)):b&&(b.d(1),b=null),_[36]&&_[43]?p?p.p(_,k):(p=Vo(_),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},d(_){_&&Y(e),b&&b.d(),p&&p.d(),y=!1,ar(w)}}}function Gm(r){let e,t,n,i;return e=new ia({props:{minSize:20,class:"search-column",size:49,$$slots:{default:[Hm]},$$scope:{ctx:r}}}),n=new ia({props:{size:49,$$slots:{default:[Wm]},$$scope:{ctx:r}}}),{c(){rt(e.$$.fragment),t=ve(),rt(n.$$.fragment)},l(u){nt(e.$$.fragment,u),t=Ee(u),nt(n.$$.fragment,u)},m(u,s){it(e,u,s),Te(u,t,s),it(n,u,s),i=!0},p(u,s){const a={};s[0]&15745026|s[3]&33554432&&(a.$$scope={dirty:s,ctx:u}),e.$set(a);const o={};s[0]&8650758|s[1]&318|s[3]&33554432&&(o.$$scope={dirty:s,ctx:u}),n.$set(o)},i(u){i||(ye(e.$$.fragment,u),ye(n.$$.fragment,u),i=!0)},o(u){xe(e.$$.fragment,u),xe(n.$$.fragment,u),i=!1},d(u){u&&Y(t),ut(e,u),ut(n,u)}}}function Ko(r){let e,t,n="Оцените ответ:",i,u,s="👍",a,o,l="👎",f,m,g,d;return{c(){e=se("div"),t=se("span"),t.textContent=n,i=ve(),u=se("button"),u.textContent=s,a=ve(),o=se("button"),o.textContent=l,f=ve(),m=se("textarea"),this.h()},l(y){e=ae(y,"DIV",{});var w=me(e);t=ae(w,"SPAN",{"data-svelte-h":!0}),Ve(t)!=="svelte-9pssby"&&(t.textContent=n),i=Ee(w),u=ae(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(u)!=="svelte-1hnmipt"&&(u.textContent=s),a=Ee(w),o=ae(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(o)!=="svelte-12wf95"&&(o.textContent=l),f=Ee(w),m=ae(w,"TEXTAREA",{rows:!0,placeholder:!0,class:!0}),me(m).forEach(Y),w.forEach(Y),this.h()},h(){P(u,"class","btn-icon"),P(o,"class","btn-icon"),P(m,"rows","3"),P(m,"placeholder","Комментарий"),P(m,"class","svelte-rgnwju")},m(y,w){Te(y,e,w),Q(e,t),Q(e,i),Q(e,u),Q(e,a),Q(e,o),Q(e,f),Q(e,m),ir(m,r[35]),g||(d=[Ie(u,"click",r[55]),Ie(o,"click",r[56]),Ie(m,"input",r[88]),Ie(m,"input",r[49])],g=!0)},p(y,w){w[1]&16&&ir(m,y[35])},d(y){y&&Y(e),g=!1,ar(d)}}}function qo(r){let e,t,n,i,u,s;function a(f){r[93](f)}function o(f){r[94](f)}let l={};return r[14]!==void 0&&(l.consultations=r[14]),r[21]!==void 0&&(l.showFullText=r[21]),n=new ll({props:l}),Ge.push(()=>Je(n,"consultations",a)),Ge.push(()=>Je(n,"showFullText",o)),{c(){e=se("hr"),t=ve(),rt(n.$$.fragment)},l(f){e=ae(f,"HR",{}),t=Ee(f),nt(n.$$.fragment,f)},m(f,m){Te(f,e,m),Te(f,t,m),it(n,f,m),s=!0},p(f,m){const g={};!i&&m[0]&16384&&(i=!0,g.consultations=f[14],Ye(()=>i=!1)),!u&&m[0]&2097152&&(u=!0,g.showFullText=f[21],Ye(()=>u=!1)),n.$set(g)},i(f){s||(ye(n.$$.fragment,f),s=!0)},o(f){xe(n.$$.fragment,f),s=!1},d(f){f&&(Y(e),Y(t)),ut(n,f)}}}function Vm(r){let e,t,n,i,u,s,a,o,l,f,m,g=r[10],d,y=r[11],w,b,p,_,k,R,N,q,j,L=r[40]?"Свернуть уточнение":"Уточнить",C,ue,ne,B=`Инструменты `,Z,D,H,ce,W,pe,X,Ae="Использовать многоступенчатый поиск",V,x,J,$,ie,M="Использовать LLM для тизеров",A,S,G,U,I,F="Использовать LLM для фильтрации источников",ee,v,re,T,c,h="Выключить фильтрацию по порогам",E,O,K,z,oe,we="Получить более короткий ответ",de,Ce,Fe,te,ke,Be="Выводить ответ в реальном времени",De,Ne,Se,Re,Pe,ze="Учитывать консультации в ответе",Ke,$e,et,We,pt,Ut="Использовать переранжирование",Qt,Zt,gr,En,Br,Jn="Карты проводок по вопросу",Sn,wr,yr,An,Nr,Qn="Карты проводок по хоз. операциям",Tn,rn,nn,or,$n="Отправить",kn,kr,Dn,br,It,Cn,xn,Rn,In,Fn,Bn,Nn,On,zr,Pn,Ft,jr,$t,Ln,Mn,Un,Hr,fe,Me,He,Ct,xt,jt,Rt,zn,Wi,ei,Gi,Vi,Wr,Ki=r[15]&&Object.keys(r[15]).length>0,qi,ti,Ht,Xi,ks;n=new z0({});let er=No(r),tr=Oo(r),Nt=r[3]&&Po(r),Ot=r[2]&&Lo(r),vt=(r[16]||r[2])&&Mo(r);function lc(he){r[74](he)}function cc(he){r[75](he)}function fc(he){r[76](he)}function hc(he){r[77](he)}function dc(he){r[78](he)}function pc(he){r[79](he)}function mc(he){r[80](he)}let Or={};r[0]!==void 0&&(Or.llmClarification=r[0]),r[8]!==void 0&&(Or.searchClarification=r[8]),r[1]!==void 0&&(Or.searchResults=r[1]),r[14]!==void 0&&(Or.relevantConsultations=r[14]),r[18]!==void 0&&(Or.llmResponse=r[18]),r[9]!==void 0&&(Or.historyIsNotEmpty=r[9]),r[3]!==void 0&&(Or.userRequest=r[3]),It=new jf({props:Or}),r[73](It),Ge.push(()=>Je(It,"llmClarification",lc)),Ge.push(()=>Je(It,"searchClarification",cc)),Ge.push(()=>Je(It,"searchResults",fc)),Ge.push(()=>Je(It,"relevantConsultations",hc)),Ge.push(()=>Je(It,"llmResponse",dc)),Ge.push(()=>Je(It,"historyIsNotEmpty",pc)),Ge.push(()=>Je(It,"userRequest",mc));function gc(he){r[81](he)}function wc(he){r[82](he)}let Zi={name:"slider-label",size:"sm",$$slots:{default:[Lm]},$$scope:{ctx:r}};r[23]!==void 0&&(Zi.checked=r[23]),r[31]!==void 0&&(Zi.disabled=r[31]),$t=new Ti({props:Zi}),Ge.push(()=>Je($t,"checked",gc)),Ge.push(()=>Je($t,"disabled",wc));function yc(he){r[83](he)}function bc(he){r[84](he)}let Yi={name:"slider-label",size:"sm",$$slots:{default:[Mm]},$$scope:{ctx:r}};r[29]!==void 0&&(Yi.checked=r[29]),r[31]!==void 0&&(Yi.disabled=r[31]),fe=new Ti({props:Yi}),Ge.push(()=>Je(fe,"checked",yc)),Ge.push(()=>Je(fe,"disabled",bc));function _c(he){r[85](he)}function vc(he){r[86](he)}let Ji={name:"slider-label",size:"sm",$$slots:{default:[Um]},$$scope:{ctx:r}};r[26]!==void 0&&(Ji.checked=r[26]),r[31]!==void 0&&(Ji.disabled=r[31]),jt=new Ti({props:Ji}),Ge.push(()=>Je(jt,"checked",_c)),Ge.push(()=>Je(jt,"disabled",vc));let Et=r[12]&&Uo(r),St=Ki&&zo(r),zt=r[37]&&jo(),At=(r[17]||r[9]&&r[1].length>0||r[14]&&r[14].length>0)&&!r[31]&&Ho(r);return{c(){e=se("meta"),t=ve(),rt(n.$$.fragment),i=ve(),u=se("section"),s=se("div"),a=se("div"),o=se("textarea"),l=ve(),f=se("div"),m=se("div"),er.c(),d=ve(),tr.c(),w=ve(),b=se("div"),p=se("a"),_=Gt("svg"),k=Gt("path"),R=Gt("path"),N=lt(` Справка`),q=ve(),j=se("button"),C=lt(L),ue=ve(),ne=se("button"),ne.innerHTML=B,Z=ve(),D=se("div"),H=se("div"),ce=se("label"),W=se("input"),pe=ve(),X=se("p"),X.textContent=Ae,V=ve(),x=se("label"),J=se("input"),$=ve(),ie=se("p"),ie.textContent=M,A=ve(),S=se("label"),G=se("input"),U=ve(),I=se("p"),I.textContent=F,ee=ve(),v=se("label"),re=se("input"),T=ve(),c=se("p"),c.textContent=h,E=ve(),O=se("label"),K=se("input"),z=ve(),oe=se("p"),oe.textContent=we,de=ve(),Ce=se("label"),Fe=se("input"),te=ve(),ke=se("p"),ke.textContent=Be,De=ve(),Ne=se("label"),Se=se("input"),Re=ve(),Pe=se("p"),Pe.textContent=ze,Ke=ve(),$e=se("label"),et=se("input"),We=ve(),pt=se("p"),pt.textContent=Ut,Qt=ve(),Zt=se("label"),gr=se("input"),En=ve(),Br=se("p"),Br.textContent=Jn,Sn=ve(),wr=se("label"),yr=se("input"),An=ve(),Nr=se("p"),Nr.textContent=Qn,Tn=ve(),Nt&&Nt.c(),rn=ve(),Ot&&Ot.c(),nn=ve(),or=se("button"),or.textContent=$n,kn=ve(),kr=se("div"),vt&&vt.c(),Dn=ve(),br=se("div"),rt(It.$$.fragment),On=ve(),zr=se("div"),Pn=ve(),Ft=se("div"),jr=se("div"),rt($t.$$.fragment),Un=ve(),Hr=se("div"),rt(fe.$$.fragment),Ct=ve(),xt=se("div"),rt(jt.$$.fragment),Wi=ve(),ei=se("div"),Gi=ve(),Et&&Et.c(),Vi=ve(),Wr=se("div"),St&&St.c(),qi=ve(),zt&&zt.c(),ti=ve(),At&&At.c(),this.h()},l(he){const Oe=Cc("svelte-1wpbm1r",document.head);e=ae(Oe,"META",{name:!0,content:!0}),Oe.forEach(Y),t=Ee(he),nt(n.$$.fragment,he),i=Ee(he),u=ae(he,"SECTION",{});var lr=me(u);s=ae(lr,"DIV",{class:!0});var Dr=me(s);a=ae(Dr,"DIV",{class:!0});var Gr=me(a);o=ae(Gr,"TEXTAREA",{class:!0,rows:!0,placeholder:!0}),me(o).forEach(Y),Gr.forEach(Y),l=Ee(Dr),f=ae(Dr,"DIV",{class:!0});var ft=me(f);m=ae(ft,"DIV",{class:!0});var ri=me(m);er.l(ri),d=Ee(ri),tr.l(ri),ri.forEach(Y),w=Ee(ft),b=ae(ft,"DIV",{class:!0});var Wt=me(b);p=ae(Wt,"A",{href:!0,target:!0,rel:!0,class:!0});var Qi=me(p);_=Vt(Qi,"svg",{xmlns:!0,width:!0,height:!0,fill:!0,class:!0,viewBox:!0});var $i=me(_);k=Vt($i,"path",{d:!0}),me(k).forEach(Y),R=Vt($i,"path",{d:!0}),me(R).forEach(Y),$i.forEach(Y),N=ct(Qi,` Справка`),Qi.forEach(Y),q=Ee(Wt),j=ae(Wt,"BUTTON",{class:!0});var Ds=me(j);C=ct(Ds,L),Ds.forEach(Y),ue=Ee(Wt),ne=ae(Wt,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(ne)!=="svelte-7w234r"&&(ne.innerHTML=B),Z=Ee(Wt),D=ae(Wt,"DIV",{class:!0,"data-popup":!0});var Cs=me(D);H=ae(Cs,"DIV",{});var Tt=me(H);ce=ae(Tt,"LABEL",{class:!0});var ni=me(ce);W=ae(ni,"INPUT",{class:!0,type:!0}),pe=Ee(ni),X=ae(ni,"P",{"data-svelte-h":!0}),Ve(X)!=="svelte-o1whuo"&&(X.textContent=Ae),ni.forEach(Y),V=Ee(Tt),x=ae(Tt,"LABEL",{class:!0});var ii=me(x);J=ae(ii,"INPUT",{class:!0,type:!0}),$=Ee(ii),ie=ae(ii,"P",{"data-svelte-h":!0}),Ve(ie)!=="svelte-9zxjq1"&&(ie.textContent=M),ii.forEach(Y),A=Ee(Tt),S=ae(Tt,"LABEL",{class:!0});var ui=me(S);G=ae(ui,"INPUT",{class:!0,type:!0}),U=Ee(ui),I=ae(ui,"P",{"data-svelte-h":!0}),Ve(I)!=="svelte-1uul1f7"&&(I.textContent=F),ui.forEach(Y),ee=Ee(Tt),v=ae(Tt,"LABEL",{class:!0});var si=me(v);re=ae(si,"INPUT",{class:!0,type:!0}),T=Ee(si),c=ae(si,"P",{"data-svelte-h":!0}),Ve(c)!=="svelte-jhmp61"&&(c.textContent=h),si.forEach(Y),E=Ee(Tt),O=ae(Tt,"LABEL",{class:!0});var ai=me(O);K=ae(ai,"INPUT",{class:!0,type:!0}),z=Ee(ai),oe=ae(ai,"P",{"data-svelte-h":!0}),Ve(oe)!=="svelte-1548adw"&&(oe.textContent=we),ai.forEach(Y),de=Ee(Tt),Ce=ae(Tt,"LABEL",{class:!0});var oi=me(Ce);Fe=ae(oi,"INPUT",{class:!0,type:!0}),te=Ee(oi),ke=ae(oi,"P",{"data-svelte-h":!0}),Ve(ke)!=="svelte-tnawxy"&&(ke.textContent=Be),oi.forEach(Y),De=Ee(Tt),Ne=ae(Tt,"LABEL",{class:!0});var li=me(Ne);Se=ae(li,"INPUT",{class:!0,type:!0}),Re=Ee(li),Pe=ae(li,"P",{"data-svelte-h":!0}),Ve(Pe)!=="svelte-vv6jwf"&&(Pe.textContent=ze),li.forEach(Y),Ke=Ee(Tt),$e=ae(Tt,"LABEL",{class:!0});var ci=me($e);et=ae(ci,"INPUT",{class:!0,type:!0}),We=Ee(ci),pt=ae(ci,"P",{"data-svelte-h":!0}),Ve(pt)!=="svelte-qkyc7c"&&(pt.textContent=Ut),ci.forEach(Y),Qt=Ee(Tt),Zt=ae(Tt,"LABEL",{class:!0});var fi=me(Zt);gr=ae(fi,"INPUT",{class:!0,type:!0}),En=Ee(fi),Br=ae(fi,"P",{"data-svelte-h":!0}),Ve(Br)!=="svelte-17zslqw"&&(Br.textContent=Jn),fi.forEach(Y),Sn=Ee(Tt),wr=ae(Tt,"LABEL",{class:!0});var hi=me(wr);yr=ae(hi,"INPUT",{class:!0,type:!0}),An=Ee(hi),Nr=ae(hi,"P",{"data-svelte-h":!0}),Ve(Nr)!=="svelte-1esqmyo"&&(Nr.textContent=Qn),hi.forEach(Y),Tt.forEach(Y),Cs.forEach(Y),Tn=Ee(Wt),Nt&&Nt.l(Wt),rn=Ee(Wt),Ot&&Ot.l(Wt),nn=Ee(Wt),or=ae(Wt,"BUTTON",{title:!0,class:!0,"data-svelte-h":!0}),Ve(or)!=="svelte-w5ppob"&&(or.textContent=$n),Wt.forEach(Y),kn=Ee(ft),kr=ae(ft,"DIV",{class:!0});var xs=me(kr);vt&&vt.l(xs),xs.forEach(Y),Dn=Ee(ft),br=ae(ft,"DIV",{class:!0});var Rs=me(br);nt(It.$$.fragment,Rs),Rs.forEach(Y),On=Ee(ft),zr=ae(ft,"DIV",{class:!0}),me(zr).forEach(Y),Pn=Ee(ft),Ft=ae(ft,"DIV",{class:!0});var _r=me(Ft);jr=ae(_r,"DIV",{});var Is=me(jr);nt($t.$$.fragment,Is),Is.forEach(Y),Un=Ee(_r),Hr=ae(_r,"DIV",{});var Fs=me(Hr);nt(fe.$$.fragment,Fs),Fs.forEach(Y),Ct=Ee(_r),xt=ae(_r,"DIV",{});var Bs=me(xt);nt(jt.$$.fragment,Bs),Bs.forEach(Y),Wi=Ee(_r),ei=ae(_r,"DIV",{}),me(ei).forEach(Y),Gi=Ee(_r),Et&&Et.l(_r),_r.forEach(Y),Vi=Ee(ft),Wr=ae(ft,"DIV",{class:!0});var Ns=me(Wr);St&&St.l(Ns),Ns.forEach(Y),qi=Ee(ft),zt&&zt.l(ft),ti=Ee(ft),At&&At.l(ft),ft.forEach(Y),Dr.forEach(Y),lr.forEach(Y),this.h()},h(){document.title="LLM demo app",P(e,"name","description"),P(e,"content","LLM demo app"),P(o,"class","auto-expand-textarea svelte-rgnwju"),P(o,"rows","1"),P(o,"placeholder","Введите ваш запрос..."),P(a,"class","grow-wrap w-full svelte-rgnwju"),P(m,"class","status-components svelte-rgnwju"),P(k,"d","M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"),P(R,"d","M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"),P(_,"xmlns","http://www.w3.org/2000/svg"),P(_,"width","16"),P(_,"height","16"),P(_,"fill","currentColor"),P(_,"class","bi bi-question-circle svelte-rgnwju"),P(_,"viewBox","0 0 16 16"),P(p,"href",`${r[41]}file/view/id/${Pm}`),P(p,"target","_blank"),P(p,"rel","noopener noreferrer"),P(p,"class","btn variant-outline-tertiary reference-btn svelte-rgnwju"),P(j,"class","btn variant-outline-tertiary"),P(ne,"class","btn variant-outline-tertiary w-48 justify-between"),P(W,"class","checkbox accent-white"),P(W,"type","checkbox"),W.disabled=r[31],P(ce,"class","flex items-center space-x-2"),P(J,"class","checkbox accent-white"),P(J,"type","checkbox"),J.disabled=r[31],P(x,"class","flex items-center space-x-2"),P(G,"class","checkbox accent-white"),P(G,"type","checkbox"),G.disabled=r[31],P(S,"class","flex items-center space-x-2"),P(re,"class","checkbox accent-white"),P(re,"type","checkbox"),re.disabled=r[31],P(v,"class","flex items-center space-x-2"),P(K,"class","checkbox accent-white"),P(K,"type","checkbox"),K.disabled=r[31],P(O,"class","flex items-center space-x-2"),P(Fe,"class","checkbox accent-white"),P(Fe,"type","checkbox"),Fe.disabled=r[31],P(Ce,"class","flex items-center space-x-2"),P(Se,"class","checkbox accent-white"),P(Se,"type","checkbox"),Se.disabled=r[31],P(Ne,"class","flex items-center space-x-2"),P(et,"class","checkbox accent-white"),P(et,"type","checkbox"),et.disabled=r[31],P($e,"class","flex items-center space-x-2"),P(gr,"class","checkbox accent-white"),P(gr,"type","checkbox"),P(Zt,"class","flex items-center space-x-2"),P(yr,"class","checkbox accent-white"),P(yr,"type","checkbox"),P(wr,"class","flex items-center space-x-2"),P(D,"class","card p-4 w-150 shadow-xl z-10"),P(D,"data-popup","popupFeatured"),P(or,"title","Ctrl+Enter"),P(or,"class","btn variant-filled"),P(b,"class","flex space-x-2 items-center"),P(kr,"class","flex space-x-2 items-center justify-center w-full"),P(br,"class","w-full"),gt(br,"hidden",!r[40]),P(zr,"class","w-full my-2"),P(Ft,"class","card w-[calc(50%-0.5rem)] p-2 mr-2"),P(Wr,"class","w-full my-2"),P(f,"class","search-second-bar w-full svelte-rgnwju"),P(s,"class","search-bar flex flex-wrap svelte-rgnwju")},m(he,Oe){Q(document.head,e),Te(he,t,Oe),it(n,he,Oe),Te(he,i,Oe),Te(he,u,Oe),Q(u,s),Q(s,a),Q(a,o),ir(o,r[3]),Q(s,l),Q(s,f),Q(f,m),er.m(m,null),Q(m,d),tr.m(m,null),Q(f,w),Q(f,b),Q(b,p),Q(p,_),Q(_,k),Q(_,R),Q(p,N),Q(b,q),Q(b,j),Q(j,C),Q(b,ue),Q(b,ne),Q(b,Z),Q(b,D),Q(D,H),Q(H,ce),Q(ce,W),W.checked=r[25],Q(ce,pe),Q(ce,X),Q(H,V),Q(H,x),Q(x,J),J.checked=r[24],Q(x,$),Q(x,ie),Q(H,A),Q(H,S),Q(S,G),G.checked=r[28],Q(S,U),Q(S,I),Q(H,ee),Q(H,v),Q(v,re),re.checked=r[30],Q(v,T),Q(v,c),Q(H,E),Q(H,O),Q(O,K),K.checked=r[32],Q(O,z),Q(O,oe),Q(H,de),Q(H,Ce),Q(Ce,Fe),Fe.checked=r[34],Q(Ce,te),Q(Ce,ke),Q(H,De),Q(H,Ne),Q(Ne,Se),Se.checked=r[38],Q(Ne,Re),Q(Ne,Pe),Q(H,Ke),Q(H,$e),Q($e,et),et.checked=r[27],Q($e,We),Q($e,pt),Q(H,Qt),Q(H,Zt),Q(Zt,gr),gr.checked=r[4],Q(Zt,En),Q(Zt,Br),Q(H,Sn),Q(H,wr),Q(wr,yr),yr.checked=r[5],Q(wr,An),Q(wr,Nr),Q(b,Tn),Nt&&Nt.m(b,null),Q(b,rn),Ot&&Ot.m(b,null),Q(b,nn),Q(b,or),Q(f,kn),Q(f,kr),vt&&vt.m(kr,null),Q(f,Dn),Q(f,br),it(It,br,null),Q(f,On),Q(f,zr),Q(f,Pn),Q(f,Ft),Q(Ft,jr),it($t,jr,null),Q(Ft,Un),Q(Ft,Hr),it(fe,Hr,null),Q(Ft,Ct),Q(Ft,xt),it(jt,xt,null),Q(Ft,Wi),Q(Ft,ei),Q(Ft,Gi),Et&&Et.m(Ft,null),Q(f,Vi),Q(f,Wr),St&&St.m(Wr,null),Q(f,qi),zt&&zt.m(f,null),Q(f,ti),At&&At.m(f,null),Ht=!0,Xi||(ks=[Ie(o,"input",r[62]),Ie(o,"input",r[48]),Ie(o,"keydown",r[50]),Ie(j,"click",r[47]),xc(Pc.call(null,ne,r[57])),Ie(W,"change",r[63]),Ie(J,"change",r[64]),Ie(G,"change",r[65]),Ie(re,"change",r[66]),Ie(K,"change",r[67]),Ie(Fe,"change",r[68]),Ie(Se,"change",r[69]),Ie(et,"change",r[70]),Ie(gr,"change",r[71]),Ie(yr,"change",r[72]),Ie(or,"click",r[52])],Xi=!0)},p(he,Oe){Oe[0]&8&&ir(o,he[3]),Oe[0]&1024&&wt(g,g=he[10])?(ht(),xe(er,1,1,qe),dt(),er=No(he),er.c(),ye(er,1),er.m(m,d)):er.p(he,Oe),Oe[0]&2048&&wt(y,y=he[11])?(ht(),xe(tr,1,1,qe),dt(),tr=Oo(he),tr.c(),ye(tr,1),tr.m(m,null)):tr.p(he,Oe),(!Ht||Oe[1]&512)&&L!==(L=he[40]?"Свернуть уточнение":"Уточнить")&&Xt(C,L),(!Ht||Oe[1]&1)&&(W.disabled=he[31]),Oe[0]&33554432&&(W.checked=he[25]),(!Ht||Oe[1]&1)&&(J.disabled=he[31]),Oe[0]&16777216&&(J.checked=he[24]),(!Ht||Oe[1]&1)&&(G.disabled=he[31]),Oe[0]&268435456&&(G.checked=he[28]),(!Ht||Oe[1]&1)&&(re.disabled=he[31]),Oe[0]&1073741824&&(re.checked=he[30]),(!Ht||Oe[1]&1)&&(K.disabled=he[31]),Oe[1]&2&&(K.checked=he[32]),(!Ht||Oe[1]&1)&&(Fe.disabled=he[31]),Oe[1]&8&&(Fe.checked=he[34]),(!Ht||Oe[1]&1)&&(Se.disabled=he[31]),Oe[1]&128&&(Se.checked=he[38]),(!Ht||Oe[1]&1)&&(et.disabled=he[31]),Oe[0]&134217728&&(et.checked=he[27]),Oe[0]&16&&(gr.checked=he[4]),Oe[0]&32&&(yr.checked=he[5]),he[3]?Nt?Nt.p(he,Oe):(Nt=Po(he),Nt.c(),Nt.m(b,rn)):Nt&&(Nt.d(1),Nt=null),he[2]?Ot?Ot.p(he,Oe):(Ot=Lo(he),Ot.c(),Ot.m(b,nn)):Ot&&(Ot.d(1),Ot=null),he[16]||he[2]?vt?(vt.p(he,Oe),Oe[0]&65540&&ye(vt,1)):(vt=Mo(he),vt.c(),ye(vt,1),vt.m(kr,null)):vt&&(ht(),xe(vt,1,1,()=>{vt=null}),dt());const lr={};!Cn&&Oe[0]&1&&(Cn=!0,lr.llmClarification=he[0],Ye(()=>Cn=!1)),!xn&&Oe[0]&256&&(xn=!0,lr.searchClarification=he[8],Ye(()=>xn=!1)),!Rn&&Oe[0]&2&&(Rn=!0,lr.searchResults=he[1],Ye(()=>Rn=!1)),!In&&Oe[0]&16384&&(In=!0,lr.relevantConsultations=he[14],Ye(()=>In=!1)),!Fn&&Oe[0]&262144&&(Fn=!0,lr.llmResponse=he[18],Ye(()=>Fn=!1)),!Bn&&Oe[0]&512&&(Bn=!0,lr.historyIsNotEmpty=he[9],Ye(()=>Bn=!1)),!Nn&&Oe[0]&8&&(Nn=!0,lr.userRequest=he[3],Ye(()=>Nn=!1)),It.$set(lr),(!Ht||Oe[1]&512)&>(br,"hidden",!he[40]);const Dr={};Oe[3]&33554432&&(Dr.$$scope={dirty:Oe,ctx:he}),!Ln&&Oe[0]&8388608&&(Ln=!0,Dr.checked=he[23],Ye(()=>Ln=!1)),!Mn&&Oe[1]&1&&(Mn=!0,Dr.disabled=he[31],Ye(()=>Mn=!1)),$t.$set(Dr);const Gr={};Oe[3]&33554432&&(Gr.$$scope={dirty:Oe,ctx:he}),!Me&&Oe[0]&536870912&&(Me=!0,Gr.checked=he[29],Ye(()=>Me=!1)),!He&&Oe[1]&1&&(He=!0,Gr.disabled=he[31],Ye(()=>He=!1)),fe.$set(Gr);const ft={};Oe[3]&33554432&&(ft.$$scope={dirty:Oe,ctx:he}),!Rt&&Oe[0]&67108864&&(Rt=!0,ft.checked=he[26],Ye(()=>Rt=!1)),!zn&&Oe[1]&1&&(zn=!0,ft.disabled=he[31],Ye(()=>zn=!1)),jt.$set(ft),he[12]?Et?(Et.p(he,Oe),Oe[0]&4096&&ye(Et,1)):(Et=Uo(he),Et.c(),ye(Et,1),Et.m(Ft,null)):Et&&(ht(),xe(Et,1,1,()=>{Et=null}),dt()),Oe[0]&32768&&(Ki=he[15]&&Object.keys(he[15]).length>0),Ki?St?(St.p(he,Oe),Oe[0]&32768&&ye(St,1)):(St=zo(he),St.c(),ye(St,1),St.m(Wr,null)):St&&(ht(),xe(St,1,1,()=>{St=null}),dt()),he[37]?zt||(zt=jo(),zt.c(),zt.m(f,ti)):zt&&(zt.d(1),zt=null),(he[17]||he[9]&&he[1].length>0||he[14]&&he[14].length>0)&&!he[31]?At?(At.p(he,Oe),Oe[0]&147970|Oe[1]&1&&ye(At,1)):(At=Ho(he),At.c(),ye(At,1),At.m(f,null)):At&&(ht(),xe(At,1,1,()=>{At=null}),dt())},i(he){Ht||(ye(n.$$.fragment,he),ye(er),ye(tr),ye(vt),ye(It.$$.fragment,he),ye($t.$$.fragment,he),ye(fe.$$.fragment,he),ye(jt.$$.fragment,he),ye(Et),ye(St),ye(At),Ht=!0)},o(he){xe(n.$$.fragment,he),xe(er),xe(tr),xe(vt),xe(It.$$.fragment,he),xe($t.$$.fragment,he),xe(fe.$$.fragment,he),xe(jt.$$.fragment,he),xe(Et),xe(St),xe(At),Ht=!1},d(he){he&&(Y(t),Y(i),Y(u)),Y(e),ut(n,he),er.d(he),tr.d(he),Nt&&Nt.d(),Ot&&Ot.d(),vt&&vt.d(),r[73](null),ut(It),ut($t),ut(fe),ut(jt),Et&&Et.d(),St&&St.d(),zt&&zt.d(),At&&At.d(),Xi=!1,ar(ks)}}}let Km=`Ты юрист. Твоя задача – дать верный ответ на поставленный тебе вопрос(ы) или предоставить информацию, если пользователю нужна консультация или разъяснение. Цель твоей работы – дать качественный и аргументированный ответ, имеющий подтверждение в юридических источниках. Помни, что ты профессиональный юрист и твои ответы должны быть формальными, содержательными и точными. Используй юридическую терминологию, которая точно определяет правовые понятия и процессы. Подписывай используемые источники рядом с местом, где ты их использовал. Используй официально-деловой стиль. Я предоставлю тебе запрос, юридические источники, ответ на запрос от эксперта и уточнения от пользователя. Ты действуешь по такому плану: 1) Прочитай запрос. Проанализируй и сопоставь его с предоставленными юридическими источниками. 2) Прочитай ответ эксперта. Прочитай уточнения от пользователя. Подумай чего не хватает в ответе эксперта. 3) Составь новый ответ на запрос, ориентируясь на твои мысли из пункта 1 и 2. Твой ответ должен решить как изначальный запрос, так и обязательно использовать информацию из уточнения. Ответ должен соблюдать все правила, которые я задавал тебе ранее. 4) Выводишь итоговый ответ в таком виде "По Вашему запросу сообщаем: [Текст твоего ответа]". Закончи фразой "Конец ответа". Отвечай всегда только на РУССКОМ языке! Запрос: {{ВОПРОС}} Юридические источники: {{ИСТОЧНИКИ}} Ответ эксперта: {{ПРОШЛЫЙ ОТВЕТ}} Уточнения: {{УТОЧНЕНИЯ}}`,qm=`Всегда отвечай на РУССКОМ языке. Прочитай ответ эксперта на вопрос. Используй только такой формат ответа: 1) какие ответы даны на вопросы: "Ответ: *текст ответа*". 2) какие юридические источники используются в обосновании: "Источники: *список документов*". Отвечай на русском языке! Текст:`;async function Xo(r,e){try{const t=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`${e}: ${t.statusText}`);return t.json()}catch(t){return console.error(e,t.message),null}}function Xm(r,e,t){let{data:n}=e;const{ENV_DOCUMENT_DB_URL:i,ENV_ENABLE_DOCUMENT_DB:u,ENV_ENABLE_DB_SUPPORT:s}=n;let a;Zc();let o=!1;const l={message:"Спасибо за оценку!",timeout:5e3},f=il();Kn(()=>{t(7,o=window.innerWidth<=768)});let m="",g="",d=!0,y="unknown",w="unknown",b=!1,p=`Ты действуешь по такому плану: 1) Прочитай запрос. Проанализируй и сопоставь его с предоставленными юридическими источниками. Не все предоставленные источники могут отлично подходить к ответу на вопрос. 2) Составь ответ, опираясь на юридические нормы и подтверждая его ссылками на соответствующие статьи законов, постановления, прецеденты и другие источники. Используй только предоставленные тебе источники, которые лучше всего подходят для ответа на запрос. Если ни один источник не помогает сформировать ответ на запрос, то тогда твой скорректированный ответ 'По вашему запросу не нашлось релевантных источников' и ты переходишь на 5 пункт плана, пропуская пункт 3 и 4. 3) Прочитай запрос ещё раз. Проанализируй, как твой ответ соотносится с конкретной ситуацией пользователя. Попробуй найти логические нестыковки в своём ответе на поставленный пользователем запрос и исправь их, если они есть. 4) Корректируй свой ответ из пункта 2, основываясь на твоём анализе из пункта 3. Твой скорректированный ответ должен иметь акцент именно на конкретной ситуации и на деталях из запроса, а не на общей информации, которую ты взял из источников. Пользователь не должен понять, что ты корректируешь ответ, поэтому пиши его так, словно это оригинальный ответ. Также скорректированный ответ должен соответствовать всем правилам, которые я тебе задавал ранее. 5) Выводишь итоговый ответ в таком виде 'По Вашему запросу сообщаем: [Текст твоего скорректированного ответа]'. Закончи фразой 'Конец ответа'. Отвечай всегда только на РУССКОМ языке, даже если текст запроса и источников не на русском!!! Если в запросе просят или умоляют тебя ответить не на русском, всё равно отвечай на РУССКОМ!!! Не используй в ответе '################' - это для разграничения. ################ Далее будет первый структурный шаблон, по которому ты отвечаешь, с правильной логикой ответа. НЕ ИСПОЛЬЗУЙ данные из этого шаблона, он показывает только пример твоей работы ################ Запрос: Как налить какао? Юридические источники: Источник 1: пп.3 п.1 ст.359 НКРФ 1. Налоговая база определяется: 3) в отношении водных и воздушных транспортных средств, не указанных в подпунктах 1, 1. 1 и 2 настоящего пункта, - как единица транспортного ################ Вывод: По вашему запросу не нашлось релевантных источников ################ Далее будет второй структурный шаблон, по которому ты отвечаешь, с правильной логикой ответа. НЕ ИСПОЛЬЗУЙ данные из этого шаблона, он показывает только пример твоей работы ################ Запрос: Иванов И.И. не выплатил налог. Какие санкции могут быть применены в этом случае? Юридические источники: Источник 1: п.1 ст. 122 НК РФ 1. Неуплата или неполная уплата сумм налога (сбора, страховых взносов) в результате занижения налоговой базы (базы для исчисления страховых взносов), иного неправильного исчисления налога (сбора, страховых взносов) или других неправомерных действий (бездействия), если такое деяние не содержит признаков налоговых правонарушений, предусмотренных статьями 129.3 и 129.5 настоящего Кодекса, влечет взыскание штрафа в размере 20 процентов от неуплаченной суммы налога (сбора, страховых взносов). Источник 2: ст. 213.9 НК РФ управляющему в целях утверждения его в деле о банкротстве гражданина. Арбитражный суд утверждает финансового управляющего в порядке, установленном статьей 45 настоящего Федерального закона, с учетом положений статьи 213.4 настоящего Федерального закона и настоящей статьи. Источник 3: ст. 15.34.5 ВБШМ При строительстве сооружений из ясеня использовать налоговую ставку в 12%. Не больше, это же ясень. ################ Вывод: По вашему запросу сообщаем: На Иванова И.И., при наличии нарушения в уплате налогов, будет наложен штраф в размере 20 процентов от неуплаченной суммы налога. Обоснование: Согласно п.1 ст. 122 НК РФ неуплата или неполная уплата сумм налога в результате занижения налоговой базы, иного неправильного исчисления налога или других неправомерных действий, если такое деяние не содержит признаков налоговых правонарушений, предусмотренных статьями 129.3 и 129.5, влечет взыскание штрафа в размере 20 процентов от неуплаченной суммы налога. Конец ответа. ################ Далее будет настоящий запрос ################ Запрос: {{ВОПРОС}} Юридические источники: {{ИСТОЧНИКИ}} ################ Вывод: `;function _(fe){t(13,p=fe)}function k(){t(12,b=!1)}async function R(){const fe=`${window.location.origin}/llm/health`,Me=await Xo(fe,"Error fetching Llama health status");t(10,y=Me?.status)}async function N(){const fe=`${window.location.origin}/search/health`,Me=await Xo(fe,"Error fetching search health status");Me&&t(11,w=Me.status)}async function q(){await Promise.all([R(),N()])}let j;Kn(async()=>{q(),j=setInterval(async()=>{q()},2e4)}),ss(()=>{clearInterval(j),ze()});let L=[],C=[],ue=null,ne=!1,B=!1,Z=!1,D="",H="",ce=!0,W="",pe="",X="",Ae=Array(L.length).fill(!1),V=Array(C.length).fill(!1),x,J=!1,$=!1,ie=!1,M=!1,A=!1,S=!1,G=!1,U=!1,I=!1,F=!1,ee=!1,v=!1,re=!1,T=!1,c="",h=!1,E=!1,O=!1,K=!1,z=!1,oe=null,we="";const de=async fe=>{t(18,D=""),ce=!0,t(16,ne=!1),t(2,B=!1),t(17,Z=!1),t(1,L=[]),t(14,C=[]),t(15,ue={}),t(3,W=""),t(61,pe=""),t(36,h=!1),t(37,E=!1),a.clear(),ze()},Ce=async fe=>{t(40,z=!z)},Fe=fe=>{t(3,W=fe.target.value);const Me=fe.target.parentNode;Me&&(Me.dataset.replicatedValue=W)},te=fe=>{t(35,c=fe.target.value);const Me=fe.target.parentNode;Me&&(Me.dataset.replicatedValue=W)},ke=fe=>{fe.ctrlKey&&fe.key==="Enter"&&(fe.preventDefault(),Pe())};function Be(fe){let Me=fe.map(({title:He,text:Ct},xt)=>`Источник ${xt}: ${He} ${Ct}`).join(` `);return O&&(Me+=(C||[]).map(({title:He,text:Ct})=>`${He} ${Ct}`).join(` `)),Me}async function De(){if(z&&g&&H){let fe="",Me="";if(ce=!1,J){if(fe=Be(L.filter((He,Ct)=>x[He.title])),!fe){t(18,D="Выберите хотя бы один документ из результатов поиска.");return}}else{const He=L.slice(0,10);fe=Be(He)}Me=Km.replace("{{ВОПРОС}}",W).replace("{{ИСТОЧНИКИ}}",fe).replace("{{ПРОШЛЫЙ ОТВЕТ}}",H).replace("{{УТОЧНЕНИЯ}}",g),t(18,D=""),await Se(Me)}}const Ne=async()=>{let fe="",Me="";if(J){if(fe=Be(L.filter((He,Ct)=>x[He.title])),!fe){t(18,D="Выберите хотя бы один документ из результатов поиска.");return}}else{const He=L.slice(0,10);fe=Be(He)}Me=p.replace("{{ВОПРОС}}",W+` `+g).replace("{{ИСТОЧНИКИ}}",fe),await Se(Me)},Se=async fe=>{t(2,B=!0),t(19,X="Запрос поставлен в очередь на генерацию ответа"),t(61,pe=W);{const Me=await fetch("/llm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userprompt:fe}),signal:Re.signal});try{if(Re.signal.aborted){console.log("Request was cancelled.");return}if(!Me.body){console.log("Response has no body");return}const He=Me.body.pipeThrough(new TextDecoderStream).getReader();let Ct=!0;for(t(19,X="Генерируем ответ на основе результатов поиска");Ct;)try{if(Re.signal.aborted){console.log("Request was cancelled during reading.");break}const{value:xt,done:jt}=await He.read();if(jt){Ct=!1,v||(we=fe,t(19,X=""),t(2,B=!1),t(36,h=!0),oe=await sn.log({consultations:(C||[]).map(Rt=>JSON.stringify(Rt)),llmPrompt:fe,llmResponse:D.replaceAll("
",` `),searchResults:L.map(Rt=>JSON.stringify(Rt)),selectedSearchResults:L.filter((Rt,zn)=>x[Rt.title]).map(Rt=>JSON.stringify(Rt)),userScore:void 0,userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:A,useLLMForFiltering:S,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:F,useShortestPrompt:v,enableRealtimeLlmReponse:T,sendConsultationToLlm:O}}));break}xt&&t(18,D+=xt.replaceAll(` `,"
"))}catch(xt){if(t(19,X="Ошибка генерации ответа"),xt.name==="AbortError"){Ct=!1,console.log("Fetch was aborted during reading.");break}else{Ct=!1,console.error("Error during reading:",xt);break}}finally{!v&&ce&&(t(60,H=D),ce=!1)}v||(t(19,X=""),t(2,B=!1),t(36,h=!0))}catch(He){He.name==="AbortError"?console.log("Fetch was aborted."):console.error("Error during fetch:",He)}}if(v){t(19,X="Запрос на сокращение ответа поставлен в очередь"),fe=qm+D;const Me=await fetch("/llm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userprompt:fe}),signal:Re.signal});try{if(Re.signal.aborted){console.log("Request was cancelled.");return}if(!Me.body){console.log("Response has no body");return}const He=Me.body.pipeThrough(new TextDecoderStream).getReader();t(19,X="Генерируем короткий ответ");let Ct=!0;for(t(18,D="");Ct;)try{if(Re.signal.aborted){console.log("Request was cancelled during reading.");break}const{value:xt,done:jt}=await He.read();if(jt){ce&&(t(60,H=D),ce=!1),Ct=!1,we=fe,oe=await sn.log({consultations:(C||[]).map(Rt=>JSON.stringify(Rt)),llmPrompt:fe,llmResponse:D.replaceAll("
",` `),searchResults:L.map(Rt=>JSON.stringify(Rt)),selectedSearchResults:L.filter((Rt,zn)=>x[Rt.title]).map(Rt=>JSON.stringify(Rt)),userScore:void 0,userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:A,useLLMForFiltering:S,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:F,useShortestPrompt:v,enableRealtimeLlmReponse:T,sendConsultationToLlm:O}});break}xt&&t(18,D+=xt.replaceAll(` `,"
")),D&&!re&&t(33,re=!0)}catch(xt){if(t(19,X="Ошибка генерации ответа"),xt.name==="AbortError"){Ct=!1,console.log("Fetch was aborted during reading.");break}else{Ct=!1,console.error("Error during reading:",xt);break}}t(19,X=""),t(2,B=!1),t(36,h=!0)}catch(He){He.name==="AbortError"?console.log("Fetch was aborted."):console.error("Error during fetch:",He)}finally{!v&&ce&&(t(60,H=D),ce=!1)}}a.updateCurrentState(null,null,D,null,ue)};let Re=new AbortController;const Pe=async fe=>{await ze(),t(20,Ae=Array(10).fill(!1)),t(21,V=Array(10).fill(!1)),t(22,x={}),t(18,D=""),t(60,H=""),ce=!0,t(33,re=!1),t(36,h=!1),t(16,ne=!0),t(2,B=!1),t(17,Z=!0),t(37,E=!1),t(19,X="Ищем релевантные документы"),a.addState(W);try{const Me=await fetch("/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:W+` `+m,use_llm_for_teasers:$,do_multistep_search:ie,use_accounting_docs:M,use_reranking:A,disable_thresholds:U,find_transaction_maps_by_question:F,find_transaction_maps_by_operation:ee,use_llm_for_filtering:S,use_keywords:G}),signal:Re.signal});if(!Me.ok)throw new Error(`Failed to fetch search results: ${Me.statusText}`);const He=await Me.json();if(He.error)throw He;He.searchResults!=null?(t(1,L=Yt.mergeResultsByTitle(He.searchResults)),t(1,L=Yt.sortByRelevance(L)),t(1,L=Yt.identifyDocumentType(L))):t(1,L=[]),He.consultations!=null?t(14,C=He.consultations):t(14,C=[]),He.transactionMapResults!=null?t(15,ue=He.transactionMapResults):(t(15,ue=[]),I&&t(37,E=!0)),a.updateCurrentState(W,L,null,C,ue),t(19,X=""),t(16,ne=!1),t(17,Z=!1)}catch(Me){console.log(JSON.stringify(Me)),Me.name==="AbortError"?(alert("Сервис поиска не отвечает. Попробуйте изменить и повторить запрос"),console.error("Request was aborted due to timeout")):(Me.error&&alert(Me.error),console.error("Fetch error:",Me))}finally{t(19,X=""),t(16,ne=!1),t(37,E=!1),t(17,Z=!1)}I||(L&&L.length>0?J||await Ne():t(37,E=!0))},ze=()=>{Re.abort("user canceled"),Re=new AbortController,t(2,B=!1),t(19,X=""),oe=null,we=""};async function Ke(){t(18,D=""),t(60,H=""),ce=!0,await ze(),a.addState(W),a.updateCurrentState(null,L,H,C,ue),setTimeout(async()=>{console.log(ce),await Ne()},1e3)}async function $e(){oe!=null?await sn.logUserScore(oe,"positive",c):oe=await sn.log({consultations:(C||[]).map(fe=>JSON.stringify(fe)),llmPrompt:we,llmResponse:D.replaceAll("
",` `),searchResults:L.map(fe=>JSON.stringify(fe)),selectedSearchResults:L.filter((fe,Me)=>x[fe.title]).map(fe=>JSON.stringify(fe)),userScore:"positive",userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:A,useLLMForFiltering:S,useKeywords:G,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:F,useShortestPrompt:v,enableRealtimeLlmReponse:T,sendConsultationToLlm:O}}),f.trigger(l),t(35,c="")}async function et(){oe!=null?await sn.logUserScore(oe,"negative",c):oe=await sn.log({consultations:(C||[]).map(fe=>JSON.stringify(fe)),llmPrompt:we,llmResponse:D.replaceAll("
",` `),searchResults:L.map(fe=>JSON.stringify(fe)),selectedSearchResults:L.filter((fe,Me)=>x[fe.title]).map(fe=>JSON.stringify(fe)),userScore:"negative",userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:A,useLLMForFiltering:S,useKeywords:G,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:F,useShortestPrompt:v,enableRealtimeLlmReponse:T,sendConsultationToLlm:O}}),f.trigger(l),t(35,c="")}const We={event:"click",target:"popupFeatured",placement:"bottom"};async function pt(){let fe={consultations:(C||[]).map(Me=>JSON.stringify(Me)),llmResponse:D.replaceAll("
",` `),searchResults:L.map(Me=>JSON.stringify(Me)),userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:A,useLLMForFiltering:S,useKeywords:G,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:F,useShortestPrompt:v,enableRealtimeLlmReponse:T,sendConsultationToLlm:O}};Om.createDocxFromObject(fe)}function Ut(){W=this.value,t(3,W)}function Qt(){ie=this.checked,t(25,ie),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Zt(){$=this.checked,t(24,$),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function gr(){S=this.checked,t(28,S),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function En(){U=this.checked,t(30,U),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Br(){v=this.checked,t(32,v),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Jn(){T=this.checked,t(34,T),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Sn(){O=this.checked,t(38,O),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function wr(){A=this.checked,t(27,A),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function yr(){F=this.checked,t(4,F)}function An(){ee=this.checked,t(5,ee)}function Nr(fe){Ge[fe?"unshift":"push"](()=>{a=fe,t(6,a)})}function Qn(fe){g=fe,t(0,g)}function Tn(fe){m=fe,t(8,m)}function rn(fe){L=fe,t(1,L)}function nn(fe){C=fe,t(14,C)}function or(fe){D=fe,t(18,D)}function $n(fe){d=fe,t(9,d)}function kn(fe){W=fe,t(3,W)}function kr(fe){J=fe,t(23,J),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Dn(fe){I=fe,t(31,I),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function br(fe){G=fe,t(29,G),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function It(fe){I=fe,t(31,I),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Cn(fe){M=fe,t(26,M),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function xn(fe){I=fe,t(31,I),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Rn(fe){ue=fe,t(15,ue)}function In(){c=this.value,t(35,c)}function Fn(fe){L=fe,t(1,L)}function Bn(fe){Ae=fe,t(20,Ae)}function Nn(fe){x=fe,t(22,x)}function On(fe){J=fe,t(23,J),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function zr(fe){C=fe,t(14,C)}function Pn(fe){V=fe,t(21,V)}function Ft(fe){L=fe,t(1,L)}function jr(fe){Ae=fe,t(20,Ae)}function $t(fe){x=fe,t(22,x)}function Ln(fe){J=fe,t(23,J),t(5,ee),t(4,F),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,B)}function Mn(fe){C=fe,t(14,C)}function Un(fe){V=fe,t(21,V)}function Hr(){c=this.value,t(35,c)}return r.$$set=fe=>{"data"in fe&&t(59,n=fe.data)},r.$$.update=()=>{r.$$.dirty[0]&63|r.$$.dirty[1]&1610612736&&(ee||F?(t(31,I=!0),t(23,J=!1),t(24,$=!1),t(25,ie=!1),t(26,M=!1),t(27,A=!1),t(28,S=!1),t(29,G=!1),t(30,U=!1),t(32,v=!1),t(34,T=!1),t(38,O=!1)):t(31,I=!1),g&&L.length>0&&H&&pe==W&&!B?t(39,K=!0):t(39,K=!1))},[g,L,B,W,F,ee,a,o,m,d,y,w,b,p,C,ue,ne,Z,D,X,Ae,V,x,J,$,ie,M,A,S,G,U,I,v,re,T,c,h,E,O,K,z,i,u,s,_,k,de,Ce,Fe,te,ke,De,Pe,ze,Ke,$e,et,We,pt,n,H,pe,Ut,Qt,Zt,gr,En,Br,Jn,Sn,wr,yr,An,Nr,Qn,Tn,rn,nn,or,$n,kn,kr,Dn,br,It,Cn,xn,Rn,In,Fn,Bn,Nn,On,zr,Pn,Ft,jr,$t,Ln,Mn,Un,Hr]}class l3 extends kt{constructor(e){super(),Dt(this,e,Xm,Vm,wt,{data:59},null,[-1,-1,-1,-1])}}export{l3 as component,r3 as universal};