diff --git "a/build/client/_app/immutable/nodes/2.lbs4H3Jw.js" "b/build/client/_app/immutable/nodes/2.lbs4H3Jw.js"
new file mode 100644--- /dev/null
+++ "b/build/client/_app/immutable/nodes/2.lbs4H3Jw.js"
@@ -0,0 +1,140 @@
+import{n as qe,I as Ec,Y as tt,Z as ut,_ as Ba,s as wt,U as hr,e as ae,c as oe,b as me,f as Y,m as P,i as Ae,V as dr,W as pr,X as mr,k as Dr,$ as Kt,a0 as sr,a as ve,g as Ee,h as Q,p as De,r as or,a1 as Zu,a2 as sa,G as Yu,a3 as Sc,a4 as Ot,t as lt,d as ct,a5 as Jr,a6 as Qr,w as ot,F as Tc,a7 as Ac,a8 as Ci,a9 as Ri,z as Ge,aa as gt,j as Xt,ab as sn,v as Kn,ac as aa,x as kc,B as xc,ad as Gt,ae as Vt,y as Jt,l as Ve,o as ir,q as $r,af as Ye,ag as Cc,u as Rc}from"../chunks/scheduler.OwA2AG0M.js";import{n as Ic,l as Dc,f as Nc,h as Oc,S as kt,i as xt,t as ye,a as Re,g as ht,c as dt,j as Ju,k as Qu,o as Je,b as rt,d as nt,m as it,e as st}from"../chunks/index.JlSaLmPP.js";import"../chunks/entry.vZ4dQZZ-.js";import{w as Yr}from"../chunks/index.UTqYide5.js";import{e as Mt,u as Fc,f as Bc}from"../chunks/each.N0yHvFdK.js";import{a as $u,p as Pc}from"../chunks/ProgressBar.svelte_svelte_type_style_lang.9muE4jOP.js";import{L as an}from"../chunks/LogService.hUlSDADx.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:s=0,duration:a=300,easing:o=Ec,start:u=Ic()+s,end:l=u+a,tick:f=qe,css:m}=t(r,{from:e,to:i},n);let g=!0,d=!1,y;function w(){m&&(y=Nc(r,0,1,a,s,o,m)),s||(d=!0)}function b(){m&&Oc(r,y),g=!1}return Dc(p=>{if(!d&&p>=u&&(d=!0),d&&p>=l&&(f(1,0),b()),!g)return!1;if(d){const _=p-u,k=0+1*o(_/a);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 s=r.length;for(;s--;){const a=r[s],o=e[s];if(o){for(const u in a)u in o||(n[u]=1);for(const u in o)i[u]||(t[u]=o[u],i[u]=1);r[s]=o}else for(const u in a)i[u]=1}for(const a in n)a in t||(t[a]=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=ut(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=s=>t(a=>{if(a.length>0){const o=a.findIndex(l=>l.id===s),u=a[o];u&&(u.callback&&u.callback({id:s,status:"closed"}),u.timeoutId&&clearTimeout(u.timeoutId),a.splice(o,1))}return a});function i(s){if(s.autohide===!0)return setTimeout(()=>{n(s.id)},s.timeout)}return{subscribe:r,close:n,trigger:s=>{const a=qc();return t(o=>{s&&s.callback&&s.callback({id:a,status:"queued"}),s.hideDismiss&&(s.autohide=!0);const u={...Vc,...s,id:a};return u.timeoutId=i(u),o.push(u),o}),a},freeze:s=>t(a=>(a.length>0&&clearTimeout(a[s].timeoutId),a)),unfreeze:s=>t(a=>(a.length>0&&(a[s].timeoutId=i(a[s])),a)),clear:()=>e([])}}function Zc(){Wc(),Kc(),zc()}function oa(r){const e=r-1;return e*e*e+1}function Pa(r,{delay:e=0,duration:t=400,easing:n=oa,x:i=0,y:s=0,opacity:a=0}={}){const o=getComputedStyle(r),u=+o.opacity,l=o.transform==="none"?"":o.transform,f=u*(1-a),[m,g]=Ba(i),[d,y]=Ba(s);return{delay:e,duration:t,easing:n,css:(w,b)=>`
+ transform: ${l} translate(${(1-w)*m}${g}, ${(1-w)*d}${y});
+ opacity: ${u-f*b}`}}function La(r,{delay:e=0,duration:t=400,easing:n=oa,axis:i="y"}={}){const s=getComputedStyle(r),a=+s.opacity,o=i==="y"?"height":"width",u=parseFloat(s[o]),l=i==="y"?["top","bottom"]:["left","right"],f=l.map(p=>`${p[0].toUpperCase()}${p.slice(1)}`),m=parseFloat(s[`padding${f[0]}`]),g=parseFloat(s[`padding${f[1]}`]),d=parseFloat(s[`margin${f[0]}`]),y=parseFloat(s[`margin${f[1]}`]),w=parseFloat(s[`border${f[0]}Width`]),b=parseFloat(s[`border${f[1]}Width`]);return{delay:e,duration:t,easing:n,css:p=>`overflow: hidden;opacity: ${Math.min(p*20,1)*a};${o}: ${p*u}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,s=hr(i,r,r[18],null);return{c(){e=ae("div"),s&&s.c(),this.h()},l(a){e=oe(a,"DIV",{class:!0,"data-testid":!0});var o=me(e);s&&s.l(o),o.forEach(Y),this.h()},h(){P(e,"class",t="accordion "+r[0]),P(e,"data-testid","accordion")},m(a,o){Ae(a,e,o),s&&s.m(e,null),n=!0},p(a,[o]){s&&s.p&&(!n||o&262144)&&dr(s,i,a,a[18],n?mr(i,a[18],o,null):pr(a[18]),null),(!n||o&1&&t!==(t="accordion "+a[0]))&&P(e,"class",t)},i(a){n||(ye(s,a),n=!0)},o(a){Re(s,a),n=!1},d(a){a&&Y(e),s&&s.d(a)}}}function Jc(r,e,t){let n,i;Dr(r,$u,C=>t(20,i=C));let{$$slots:s={},$$scope:a}=e,{autocollapse:o=!1}=e,{width:u="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:I=La}=e,{transitionInParams:F={duration:200}}=e,{transitionOut:q=La}=e,{transitionOutParams:j={duration:200}}=e;const L=Yr(null);return tt("active",L),tt("autocollapse",o),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",I),tt("transitionInParams",F),tt("transitionOut",q),tt("transitionOutParams",j),r.$$set=C=>{t(22,e=Kt(Kt({},e),sr(C))),"autocollapse"in C&&t(1,o=C.autocollapse),"width"in C&&t(2,u=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,I=C.transitionIn),"transitionInParams"in C&&t(15,F=C.transitionInParams),"transitionOut"in C&&t(16,q=C.transitionOut),"transitionOutParams"in C&&t(17,j=C.transitionOutParams),"$$scope"in C&&t(18,a=C.$$scope)},r.$$.update=()=>{t(0,n=`${u} ${l} ${e.class??""}`)},e=sr(e),[n,o,u,l,f,m,g,d,y,w,b,p,_,k,I,F,q,j,a,s]}class Qc extends kt{constructor(e){super(),xt(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 Ii(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=>({}),Ma=r=>({}),ef=r=>({}),Ua=r=>({}),tf=r=>({}),za=r=>({}),rf=r=>({}),ja=r=>({}),nf=r=>({}),Ha=r=>({});function Wa(r){let e,t;const n=r[30].lead,i=hr(n,r,r[29],Ha);return{c(){e=ae("div"),i&&i.c(),this.h()},l(s){e=oe(s,"DIV",{class:!0});var a=me(e);i&&i.l(a),a.forEach(Y),this.h()},h(){P(e,"class","accordion-lead")},m(s,a){Ae(s,e,a),i&&i.m(e,null),t=!0},p(s,a){i&&i.p&&(!t||a[0]&536870912)&&dr(i,n,s,s[29],t?mr(n,s[29],a,nf):pr(s[29]),Ha)},i(s){t||(ye(i,s),t=!0)},o(s){Re(i,s),t=!1},d(s){s&&Y(e),i&&i.d(s)}}}function sf(r){let e;return{c(){e=lt("(summary)")},l(t){e=ct(t,"(summary)")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function af(r){let e,t,n;return{c(){e=ae("div"),t=new Jr(!1),this.h()},l(i){e=oe(i,"DIV",{class:!0});var s=me(e);t=Qr(s,!1),s.forEach(Y),this.h()},h(){t.a=null,P(e,"class",n="accordion-summary-caret "+r[11])},m(i,s){Ae(i,e,s),t.m(r[14],e)},p(i,s){s[0]&2048&&n!==(n="accordion-summary-caret "+i[11])&&P(e,"class",n)},i:qe,o:qe,d(i){i&&Y(e)}}}function of(r){let e,t,n,i,s;const a=[lf,uf],o=[];function u(l,f){return l[8]?0:1}return t=u(r),n=o[t]=a[t](r),{c(){e=ae("div"),n.c(),this.h()},l(l){e=oe(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){Ae(l,e,f),o[t].m(e,null),s=!0},p(l,f){let m=t;t=u(l),t===m?o[t].p(l,f):(ht(),Re(o[m],1,1,()=>{o[m]=null}),dt(),n=o[t],n?n.p(l,f):(n=o[t]=a[t](l),n.c()),ye(n,1),n.m(e,null)),(!s||f[0]&1024&&i!==(i="accordion-summary-icons "+l[10]))&&P(e,"class",i)},i(l){s||(ye(n),s=!0)},o(l){Re(n),s=!1},d(l){l&&Y(e),o[t].d()}}}function uf(r){let e;const t=r[30].iconOpen,n=hr(t,r,r[29],Ua),i=n||cf(r);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,a){i&&i.m(s,a),e=!0},p(s,a){n&&n.p&&(!e||a[0]&536870912)&&dr(n,t,s,s[29],e?mr(t,s[29],a,ef):pr(s[29]),Ua)},i(s){e||(ye(i,s),e=!0)},o(s){Re(i,s),e=!1},d(s){i&&i.d(s)}}}function lf(r){let e;const t=r[30].iconClosed,n=hr(t,r,r[29],za),i=n||ff(r);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,a){i&&i.m(s,a),e=!0},p(s,a){n&&n.p&&(!e||a[0]&536870912)&&dr(n,t,s,s[29],e?mr(t,s[29],a,tf):pr(s[29]),za)},i(s){e||(ye(i,s),e=!0)},o(s){Re(i,s),e=!1},d(s){i&&i.d(s)}}}function cf(r){let e,t;return{c(){e=new Jr(!1),t=ot(),this.h()},l(n){e=Qr(n,!1),t=ot(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),Ae(n,t,i)},p:qe,d(n){n&&(Y(t),e.d())}}}function ff(r){let e,t;return{c(){e=new Jr(!1),t=ot(),this.h()},l(n){e=Qr(n,!1),t=ot(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),Ae(n,t,i)},p:qe,d(n){n&&(Y(t),e.d())}}}function Ga(r){let e,t,n,i,s,a,o;const u=r[30].content,l=hr(u,r,r[29],Ma),f=l||hf();return{c(){e=ae("div"),f&&f.c(),this.h()},l(m){e=oe(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){Ae(m,e,g),f&&f.m(e,null),o=!0},p(m,g){r=m,l&&l.p&&(!o||g[0]&536870912)&&dr(l,u,r,r[29],o?mr(u,r[29],g,$c):pr(r[29]),Ma),(!o||g[0]&512&&t!==(t="accordion-panel "+r[9]))&&P(e,"class",t),(!o||g[0]&1&&n!==(n="accordion-panel-"+r[0]))&&P(e,"id",n),(!o||g[0]&256&&i!==(i=!r[8]))&&P(e,"aria-hidden",i),(!o||g[0]&1)&&P(e,"aria-labelledby",r[0])},i(m){o||(ye(f,m),m&&Yu(()=>{o&&(a&&a.end(1),s=Ju(e,Ii,{transition:r[4],params:r[5],enabled:r[3]}),s.start())}),o=!0)},o(m){Re(f,m),s&&s.invalidate(),m&&(a=Qu(e,Ii,{transition:r[6],params:r[7],enabled:r[3]})),o=!1},d(m){m&&Y(e),f&&f.d(m),m&&a&&a.end()}}}function hf(r){let e;return{c(){e=lt("(content)")},l(t){e=ct(t,"(content)")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function df(r){let e,t,n,i,s,a,o,u,l,f,m,g,d,y,w=r[16].lead&&Wa(r);const b=r[30].summary,p=hr(b,r,r[29],ja),_=p||sf(),k=[of,af],I=[];function F(j,L){return j[16].iconClosed||j[16].iconOpen?0:1}a=F(r),o=I[a]=k[a](r);let q=r[8]&&Ga(r);return{c(){e=ae("div"),t=ae("button"),w&&w.c(),n=ve(),i=ae("div"),_&&_.c(),s=ve(),o.c(),f=ve(),q&&q.c(),this.h()},l(j){e=oe(j,"DIV",{class:!0,"data-testid":!0});var L=me(e);t=oe(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=oe(C,"DIV",{class:!0});var se=me(i);_&&_.l(se),se.forEach(Y),s=Ee(C),o.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",u="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){Ae(j,e,L),Q(e,t),w&&w.m(t,null),Q(t,n),Q(t,i),_&&_.m(i,null),Q(t,s),I[a].m(t,null),Q(e,f),q&&q.m(e,null),g=!0,d||(y=[De(t,"click",r[15]),De(t,"click",r[31]),De(t,"keydown",r[32]),De(t,"keyup",r[33]),De(t,"keypress",r[34])],d=!0)},p(j,L){j[16].lead?w?(w.p(j,L),L[0]&65536&&ye(w,1)):(w=Wa(j),w.c(),ye(w,1),w.m(t,n)):w&&(ht(),Re(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,rf):pr(j[29]),ja);let C=a;a=F(j),a===C?I[a].p(j,L):(ht(),Re(I[C],1,1,()=>{I[C]=null}),dt(),o=I[a],o?o.p(j,L):(o=I[a]=k[a](j),o.c()),ye(o,1),o.m(t,null)),(!g||L[0]&4096&&u!==(u="accordion-control "+j[12]))&&P(t,"class",u),(!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=Ga(j),q.c(),ye(q,1),q.m(e,null)):q&&(ht(),Re(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(o),ye(q),g=!0)},o(j){Re(w),Re(_,j),Re(o),Re(q),g=!1},d(j){j&&Y(e),w&&w.d(),_&&_.d(j),I[a].d(),q&&q.d(),d=!1,or(y)}}}const pf="",mf="text-start w-full flex items-center space-x-4",Va="fill-current w-3 transition-transform duration-[200ms]",gf="";function wf(r,e,t){let n,i,s,a,o,u,l,f,m=qe,g=()=>(m(),m=Sc(I,M=>t(28,f=M)),I);r.$$.on_destroy.push(()=>m());let{$$slots:d={},$$scope:y}=e;const w=Zu(d),b=sa();let{open:p=!1}=e,{id:_=String(Math.random())}=e,{autocollapse:k=ut("autocollapse")}=e,{active:I=ut("active")}=e;g();let{disabled:F=ut("disabled")}=e,{padding:q=ut("padding")}=e,{hover:j=ut("hover")}=e,{rounded:L=ut("rounded")}=e,{caretOpen:C=ut("caretOpen")}=e,{caretClosed:se=ut("caretClosed")}=e,{regionControl:ne=ut("regionControl")}=e,{regionPanel:O=ut("regionPanel")}=e,{regionCaret:Z=ut("regionCaret")}=e,{transitions:x=ut("transitions")}=e,{transitionIn:H=ut("transitionIn")}=e,{transitionInParams:ce=ut("transitionInParams")}=e,{transitionOut:W=ut("transitionOut")}=e,{transitionOutParams:pe=ut("transitionOutParams")}=e;const X=`
+ `;function Te(M){k===!0?I.set(_):t(17,p=!p),V(M)}function V(M){const T=k?f===_:p;b("toggle",{event:M,id:_,panelId:`accordion-panel-${_}`,open:T,autocollapse:k})}k&&p&&Te();function R(M){Ot.call(this,r,M)}function J(M){Ot.call(this,r,M)}function $(M){Ot.call(this,r,M)}function ie(M){Ot.call(this,r,M)}return r.$$set=M=>{t(37,e=Kt(Kt({},e),sr(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,I=M.active)),"disabled"in M&&t(2,F=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,se=M.caretClosed),"regionControl"in M&&t(24,ne=M.regionControl),"regionPanel"in M&&t(25,O=M.regionPanel),"regionCaret"in M&&t(26,Z=M.regionCaret),"transitions"in M&&t(3,x=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&&Te(),r.$$.dirty[0]&268828673&&t(8,n=k?f===_:p),t(13,i=`${pf} ${e.class??""}`),r.$$.dirty[0]&20447232&&t(12,s=`${mf} ${q} ${j} ${L} ${ne}`),r.$$.dirty[0]&12583168&&t(27,a=n?C:se),r.$$.dirty[0]&201326592&&t(11,o=`${Va} ${Z} ${a}`),r.$$.dirty[0]&67108864&&t(10,u=`${Va} ${Z}`),r.$$.dirty[0]&36175872&&t(9,l=`${gf} ${q} ${L} ${O}`)},e=sr(e),[_,I,F,x,H,ce,W,pe,n,l,u,o,s,i,X,Te,w,p,k,q,j,L,C,se,ne,O,Z,a,f,y,d,R,J,$,ie]}class yf extends kt{constructor(e){super(),xt(this,e,wf,df,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 bf(r,{from:e,to:t},n={}){const i=getComputedStyle(r),s=i.transform==="none"?"":i.transform,[a,o]=i.transformOrigin.split(" ").map(parseFloat),u=e.left+e.width*a/t.width-(t.left+a),l=e.top+e.height*o/t.height-(t.top+o),{delay:f=0,duration:m=d=>Math.sqrt(d)*120,easing:g=oa}=n;return{delay:f,duration:Tc(m)?m(Math.sqrt(u*u+l*l)):m,easing:g,css:(d,y)=>{const w=y*u,b=y*l,p=d+y*e.width/t.width,_=d+y*e.height/t.height;return`transform: ${s} translate(${w}px, ${b}px) scale(${p}, ${_});`}}}function _f(r){let e,t,n;const i=r[15].default,s=hr(i,r,r[14],null);return{c(){e=ae("div"),s&&s.c(),this.h()},l(a){e=oe(a,"DIV",{class:!0,"data-testid":!0,role:!0,"aria-labelledby":!0});var o=me(e);s&&s.l(o),o.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(a,o){Ae(a,e,o),s&&s.m(e,null),n=!0},p(a,[o]){s&&s.p&&(!n||o&16384)&&dr(s,i,a,a[14],n?mr(i,a[14],o,null):pr(a[14]),null),(!n||o&2&&t!==(t="radio-group "+a[1]))&&P(e,"class",t),(!n||o&1)&&P(e,"aria-labelledby",a[0])},i(a){n||(ye(s,a),n=!0)},o(a){Re(s,a),n=!1},d(a){a&&Y(e),s&&s.d(a)}}}const vf="p-1";function Ef(r,e,t){let n,{$$slots:i={},$$scope:s}=e,{display:a="inline-flex"}=e,{flexDirection:o="flex-row"}=e,{gap:u="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),sr(k))),"display"in k&&t(2,a=k.display),"flexDirection"in k&&t(3,o=k.flexDirection),"gap"in k&&t(4,u=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,s=k.$$scope)},r.$$.update=()=>{t(1,n=`${vf} ${a} ${o} ${u} ${l} ${f} ${m} ${e.class??""}`)},e=sr(e),[_,n,a,o,u,l,f,m,g,d,y,w,b,p,s,i]}class Sf extends kt{constructor(e){super(),xt(this,e,Ef,_f,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 Tf(r){let e,t,n,i,s,a,o,u,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),sr(X))),t(30,l=Ri(e,u)),"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,I=X.hover),"color"in X&&t(16,F=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} ${F} ${q}`:I),t(18,s=e.disabled?xf:""),t(8,o=`${kf} ${_} ${p} ${i} ${s} ${e.class??""}`)},t(9,a=`${Af}`),e=sr(e),[g,d,y,w,b,j,n,L,o,a,C,se,p,_,k,I,F,q,s,i,m,f,O,Z,x,H,ce,W,pe,ne]}class Ka extends kt{constructor(e){super(),xt(this,e,Cf,Tf,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 qa(r){let e,t;const n=r[22].default,i=hr(n,r,r[21],null);return{c(){e=ae("div"),i&&i.c(),this.h()},l(s){e=oe(s,"DIV",{class:!0});var a=me(e);i&&i.l(a),a.forEach(Y),this.h()},h(){P(e,"class","slide-toggle-text ml-3")},m(s,a){Ae(s,e,a),i&&i.m(e,null),t=!0},p(s,a){i&&i.p&&(!t||a[0]&2097152)&&dr(i,n,s,s[21],t?mr(n,s[21],a,null):pr(s[21]),null)},i(s){t||(ye(i,s),t=!0)},o(s){Re(i,s),t=!1},d(s){s&&Y(e),i&&i.d(s)}}}function Rf(r){let e,t,n,i,s,a,o,u,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||I[0]&32&&m!==(m="slide-toggle-label "+k[5]))&&P(t,"class",m),(!d||I[0]&4)&&P(e,"id",k[2]),(!d||I[0]&64&&g!==(g="slide-toggle "+k[6]))&&P(e,"class",g),(!d||I[0]&4)&&P(e,"aria-label",k[2]),(!d||I[0]&1)&&P(e,"aria-checked",k[0])},i(k){d||(ye(_),d=!0)},o(k){Re(_),d=!1},d(k){k&&Y(e),_&&_.d(),y=!1,or(w)}}}const If="inline-block",Df="unstyled flex items-center",Nf="flex transition-all duration-[200ms] cursor-pointer",Of="w-[50%] h-full scale-[0.8] transition-all duration-[200ms] shadow";function Ff(r,e,t){let n,i,s,a,o,u,l,f;const m=["name","checked","size","background","active","border","rounded","label"];let g=Ri(e,m),{$$slots:d={},$$scope:y}=e;const w=Zu(d),b=sa();let{name:p}=e,{checked:_=!1}=e,{size:k="md"}=e,{background:I="bg-surface-400 dark:bg-surface-700"}=e,{active:F="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 se(V){["Enter","Space"].includes(V.code)&&(V.preventDefault(),b("keyup",V),V.currentTarget.firstChild.click())}function ne(){return delete g.class,g}function O(V){Ot.call(this,r,V)}function Z(V){Ot.call(this,r,V)}function x(V){Ot.call(this,r,V)}function H(V){Ot.call(this,r,V)}function ce(V){Ot.call(this,r,V)}function W(V){Ot.call(this,r,V)}function pe(V){Ot.call(this,r,V)}function X(V){Ot.call(this,r,V)}function Te(){_=this.checked,t(0,_)}return r.$$set=V=>{t(9,e=Kt(Kt({},e),sr(V))),t(33,g=Ri(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,I=V.background),"active"in V&&t(13,F=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=_?F:`${I} cursor-pointer`),r.$$.dirty[0]&1&&t(18,i=_?"bg-white/75":"bg-white"),r.$$.dirty[0]&1&&t(17,s=_?"translate-x-full":""),t(20,a=e.disabled===!0?"opacity-50":"hover:brightness-[105%] dark:hover:brightness-110 cursor-pointer"),t(6,o=`${If} ${j} ${a} ${e.class??""}`),r.$$.dirty[0]&638976&&t(4,l=`${Nf} ${q} ${j} ${C} ${n}`),r.$$.dirty[0]&425984&&t(3,f=`${Of} ${j} ${i} ${s}`)},t(5,u=`${Df}`),e=sr(e),[_,p,L,f,l,u,o,se,ne,e,w,k,I,F,q,j,C,s,i,n,a,y,d,O,Z,x,H,ce,W,pe,X,Te]}class Ai extends kt{constructor(e){super(),xt(this,e,Ff,Rf,wt,{name:1,checked:0,size:11,background:12,active:13,border:14,rounded:15,label:2},null,[-1,-1])}}function Xa(r,e,t){const n=r.slice();return n[36]=e[t],n[38]=t,n}function Za(r){let e,t,n=[],i=new Map,s,a,o,u=Mt(r[11]);const l=f=>f[36];for(let f=0;f{w&&(g&&g.end(1),m=Ju(t,Ii,{transition:e[5],params:{x:e[10].x,y:e[10].y,...e[6]},enabled:e[4]}),m.start())}),w=!0)},o(F){m&&m.invalidate(),g=Qu(t,Ii,{transition:e[7],params:{x:e[10].x,y:e[10].y,...e[8]},enabled:e[4]}),w=!1},d(F){F&&Y(t),_&&_.d(),F&&g&&g.end(),b=!1,or(p)}}}function Bf(r){let e,t,n=r[9].length&&Za(r);return{c(){n&&n.c(),e=ot()},l(i){n&&n.l(i),e=ot()},m(i,s){n&&n.m(i,s),Ae(i,e,s),t=!0},p(i,s){i[9].length?n?(n.p(i,s),s[0]&512&&ye(n,1)):(n=Za(i),n.c(),ye(n,1),n.m(e.parentNode,e)):n&&(ht(),Re(n,1,1,()=>{n=null}),dt())},i(i){t||(ye(n),t=!0)},o(i){Re(n),t=!1},d(i){i&&Y(e),n&&n.d(i)}}}const Pf="flex fixed top-0 left-0 right-0 bottom-0 pointer-events-none",Lf="flex flex-col gap-y-2",Mf="flex justify-between items-center pointer-events-auto",Uf="flex items-center space-x-2";function zf(r,e,t){let n,i,s,a,o,u;Dr(r,$u,R=>t(34,u=R));const l=il();Dr(r,l,R=>t(9,o=R));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:I="btn variant-filled"}=e,{buttonDismiss:F="btn-icon btn-icon-sm variant-filled"}=e,{buttonDismissLabel:q="✕"}=e,{transitions:j=!u}=e,{transitionIn:L=Pa}=e,{transitionInParams:C={duration:250}}=e,{transitionOut:se=Pa}=e,{transitionOutParams:ne={duration:250}}=e,O,Z,x={x:0,y:0};switch(f){case"t":O="justify-center items-start",Z="items-center",x={x:0,y:-100};break;case"b":O="justify-center items-end",Z="items-center",x={x:0,y:100};break;case"l":O="justify-start items-center",Z="items-start",x={x:-100,y:0};break;case"r":O="justify-end items-center",Z="items-end",x={x:100,y:0};break;case"tl":O="justify-start items-start",Z="items-start",x={x:-100,y:0};break;case"tr":O="justify-end items-start",Z="items-end",x={x:100,y:0};break;case"bl":O="justify-start items-end",Z="items-start",x={x:-100,y:0};break;case"br":O="justify-end items-end",Z="items-end",x={x:100,y:0};break}function H(R){o[R]?.action?.response(),l.close(o[R].id)}function ce(R){o[R]?.hoverable&&(l.freeze(R),t(13,i+=" scale-[105%]"))}function W(R){o[R]?.hoverable&&(l.unfreeze(R),t(13,i=i.replace(" scale-[105%]","")))}const pe=R=>H(R),X=R=>l.close(R.id),Te=R=>ce(R),V=R=>W(R);return r.$$set=R=>{t(35,e=Kt(Kt({},e),sr(R))),"position"in R&&t(19,f=R.position),"max"in R&&t(20,m=R.max),"background"in R&&t(0,g=R.background),"width"in R&&t(21,d=R.width),"color"in R&&t(22,y=R.color),"padding"in R&&t(23,w=R.padding),"spacing"in R&&t(24,b=R.spacing),"rounded"in R&&t(25,p=R.rounded),"shadow"in R&&t(26,_=R.shadow),"zIndex"in R&&t(27,k=R.zIndex),"buttonAction"in R&&t(1,I=R.buttonAction),"buttonDismiss"in R&&t(2,F=R.buttonDismiss),"buttonDismissLabel"in R&&t(3,q=R.buttonDismissLabel),"transitions"in R&&t(4,j=R.transitions),"transitionIn"in R&&t(5,L=R.transitionIn),"transitionInParams"in R&&t(6,C=R.transitionInParams),"transitionOut"in R&&t(7,se=R.transitionOut),"transitionOutParams"in R&&t(8,ne=R.transitionOutParams)},r.$$.update=()=>{t(14,n=`${Pf} ${O} ${k} ${e.class||""}`),r.$$.dirty[0]&545259520&&t(13,i=`${Lf} ${Z} ${w}`),r.$$.dirty[0]&132120576&&t(12,s=`${Mf} ${d} ${y} ${w} ${b} ${p} ${_}`),r.$$.dirty[0]&1049088&&t(11,a=Array.from(o).slice(0,m))},e=sr(e),[g,I,F,q,j,L,C,se,ne,o,x,a,s,i,n,l,H,ce,W,f,m,d,y,w,b,p,_,k,O,Z,pe,X,Te,V]}class jf extends kt{constructor(e){super(),xt(this,e,zf,Bf,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 Hf=!1,n4=Object.freeze(Object.defineProperty({__proto__:null,prerender:Hf},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 sl=r=>r?"height":"width",Xs=r=>window.getComputedStyle(r),Zs=r=>r.getBoundingClientRect(),Wf=(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 s=di(r.getPropertyValue("border-right-width"));if(s===void 0){console.error("Splitpanes Error: Fail to parse container `border-right-width`.");return}const a=di(r.getPropertyValue("border-bottom-width"));if(a===void 0){console.error("Splitpanes Error: Fail to parse container `border-bottom-width`.");return}const o=i;o.right=s,o.bottom=a}return i};function Gf(r,e){e||(e=Xs(r));const t=Zs(r),n=Wf(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 eo=(r,e)=>({left:r.left-e.left,top:r.top-e.top});function to(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 ro(r,e,t,n){let i=0;for(let s=e;st(31,s=te));const Z=Yr(d);Dr(r,Z,te=>t(30,i=te));const x=Yr(void 0);Dr(r,x,te=>t(29,n=te));let H=null,ce=null;tt(al,{showFirstSplitter:Z,veryFirstPaneKey:x,isHorizontal:O,ssrRegisterPaneSize:void 0,onPaneInit:te=>(n===void 0&&sn(x,n=te,n),{undefinedPaneInitSize:0}),clientOnly:{onPaneAdd:pe,onPaneRemove:X}});function pe(te){let ke=-1;Array.from(te.element.parentNode.children).some(xe=>(xe.className.includes("splitpanes__pane")&&ke++,xe===te.element)),ke===0&&sn(x,n=te.key,n),ne.splice(ke,0,te);for(let xe=0;xe{te.isReady=!0,p("pane-add",{index:ke,panes:ee()})});const Oe=(xe,Fe=!0)=>Se=>{(Fe||te.index>0)&&xe(Se,te)};return{onSplitterDown:Oe(S,!1),onSplitterClick:Oe(D,!1),onSplitterDblClick:Oe(N),onPaneClick:Oe(Te),reportGivenSizeChange:Oe(V)}}async function X(te){const ke=ne.findIndex(Oe=>Oe.key===te);if(ke>=0){const Oe=ne.splice(ke,1)[0];for(let xe=0;xe0?ne[0].key:void 0,n),k&&(await z(),p("pane-remove",{removed:Oe,panes:ee()}))}}function Te(te,ke){p("pane-click",ke)}function V(te,ke){ke.setSz(te),z()}Kn(()=>{Ce(),ue();for(let te=0;te{t(6,F=!0)},0)}),aa(()=>{k&&$(),k=!1}),kc(()=>{Ce()});function R(te){if(g==="auto")try{return(te??Xs(_)).direction==="rtl"}catch{}return g===!0}function J(){document.body.style.cursor=O?"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,Oe){let xe=te[l?"top":"left"];return Oe&&!l&&(xe=ke-xe),xe}const T=()=>sl(l);function S(te,ke){t(7,q=!0),L=ke.index,ke.setSplitterActive(!0);let xe=ke.element;for(;xe!=null&&(xe=xe.previousSibling,!ie(xe)););if(xe==null){console.error("Splitpane Error: Active splitter wasn't found!");return}H=xe;const Fe=to(te),Se=Zs(H);ce=M(eo(Fe,Se),Se[T()],R()),J()}function G(te){if(q){te.preventDefault(),t(8,j=!0);const ke=to(te),Oe=Xs(_),xe=Gf(_,Oe),Fe=xe[T()],Se=R(Oe),Ie=eo(ke,xe),Pe=M(Ie,Fe,Se);re(Pe,Fe),p("resize",ee())}}function U(){j&&p("resized",ee()),t(7,q=!1),ne[L].setSplitterActive(!1),setTimeout(()=>{t(8,j=!1),$()},100)}function D(te,ke){if("ontouchstart"in window){te.preventDefault();const Oe=ke.index;m&&(C===Oe?(se&&clearTimeout(se),se=null,N(te,ke),C=-1):(C=Oe,se=setTimeout(()=>{C=-1},500)))}j||p("splitter-click",ke)}function N(te,ke){if(m){const Oe=ke.index;let xe=0;for(let Ie=0;Ie=100)for(let Ie=0;Ie{const Ke=ze.min(),$e=ze.max(),et=Math.min(Math.max(0,Ie),$e-Ke);ze.setSz(Ke+et),Ie-=et};for(let ze=Oe-1;ze>=0;ze--)Pe(ne[ze]);for(let ze=Oe+1;zene.map(te=>({min:te.min(),max:te.max(),size:te.sz(),snap:te.snap()}));function v(te,ke){const Oe=$e=>Zs($e)[T()],xe=Oe(H);let Fe=0,Se=H.previousSibling;for(;Se!=null;)ie(Se)&&(Fe+=Oe(Se)),Se=Se.previousSibling;let Ie=0,Pe=H.nextSibling;for(;Pe!=null;)ie(Pe)&&(Ie+=Oe(Pe)),Pe=Pe.nextSibling;const ze=Fe+ce,Ke=Fe+xe+Ie;return(te-ze)/(ke-Ke)*100}function re(te,ke){let Oe=L-1,xe=ne[Oe],Fe=L,Se=ne[Fe],Ie={prevPanesSize:h(Oe),nextPanesSize:E(Fe),prevReachedMinPanes:0,nextReachedMinPanes:0};const Pe=0+(f?0:Ie.prevPanesSize),ze=100-(f?0:Ie.nextPanesSize),Ke=Math.max(Math.min(v(te,ke),ze),Pe),$e=Ie.prevPanesSize+xe.min()+xe.snap(),et=100-(Ie.nextPanesSize+Se.min()+Se.snap());let We=Ke,pt=!1;Ke<=$e?Ke>Ie.prevPanesSize+xe.min()&&(We=Math.max(xe.min()+Ie.prevPanesSize,100-(Se.max()+Ie.nextPanesSize)),pt=!0):Ke>=et&&Ke<100-Ie.nextPanesSize-Se.min()&&(We=Math.min(100-(Se.min()+Ie.nextPanesSize),xe.max()+Ie.prevPanesSize),pt=!0);const Ut=xe.max()<100&&We>=xe.max()+Ie.prevPanesSize,Qt=Se.max()<100&&We<=100-(Se.max()+Ie.nextPanesSize);if(Ut||Qt)Ut?(xe.setSz(xe.max()),Se.setSz(Math.max(100-xe.max()-Ie.prevPanesSize-Ie.nextPanesSize,0))):(xe.setSz(Math.max(100-Se.max()-Ie.prevPanesSize-Ie.nextPanesSize,0)),Se.setSz(Se.max()));else{if(f&&!pt){const Zt=A(Ie,We);if(!Zt)return;({sums:Ie,paneBeforeIndex:Oe,paneAfterIndex:Fe}=Zt),xe=ne[Oe],Se=ne[Fe]}Oe!=null&&xe.setSz(Math.min(Math.max(We-Ie.prevPanesSize-Ie.prevReachedMinPanes,xe.min()),xe.max())),Fe!=null&&Se.setSz(Math.min(Math.max(100-We-Ie.nextPanesSize-Ie.nextReachedMinPanes,Se.min()),Se.max()))}}function A(te,ke){const Oe=L-1;let xe=Oe,Fe=Oe+1;if(ke{Se.setSz(Se.min()),te.prevReachedMinPanes+=Se.min()}),te.prevPanesSize=h(xe),xe==null))return te.prevReachedMinPanes=0,ne[0].setSz(ne[0].min()),pi(ne,1,Oe+1,Se=>{Se.setSz(Se.min()),te.prevReachedMinPanes+=Se.min()}),ne[Fe].setSz(100-te.prevReachedMinPanes-ne[0].min()-te.prevPanesSize-te.nextPanesSize),null;if(ke>100-te.nextPanesSize-ne[Fe].min()){Fe=K(Oe)?.index,te.nextReachedMinPanes=0,Fe>Oe+1&&pi(ne,Oe+1,Fe,Ie=>{Ie.setSz(Ie.min()),te.nextReachedMinPanes+=Ie.min()}),te.nextPanesSize=E(Fe);const Se=ne.length;if(Fe==null)return te.nextReachedMinPanes=0,ne[Se-1].setSz(ne[Se-1].min()),pi(ne,Oe+1,Se-1,Ie=>{Ie.setSz(Ie.min()),te.nextReachedMinPanes+=Ie.min()}),ne[xe].setSz(100-te.prevPanesSize-te.nextReachedMinPanes-ne[Se-1].min()-te.nextPanesSize),null}return{sums:te,paneBeforeIndex:xe,paneAfterIndex:Fe}}const c=te=>te.sz(),h=te=>ro(ne,0,te,c),E=te=>ro(ne,te+1,ne.length,c),B=te=>[...ne].reverse().find(ke=>ke.indexke.min()),K=te=>ne.find(ke=>ke.index>te+1&&ke.sz()>ke.min());async function z(){I=!0,await xc(),I&&(ue(),I=!1)}function ue(){we(),k&&p("resized",ee())}function we(){if(ne.length===0)return;const te=ne.length;let ke=100,Oe=0,xe=0,Fe=0,Se=[],Ie=[];for(let et=0;et=We.max()&&Se.push(We),pt<=We.min()&&Ie.push(We)):xe+=1:(ke-=pt,Oe++,Se.push(We),Ie.push(We))}const Pe=te-Oe,ze=Pe-xe;let Ke,$e;if(ze>0?(Ke=Fe/ze,Ke>.1&&ke>.1?(Fe+=xe*Ke,$e=ke/Fe):(Ke=0,$e=1)):(Ke=ke/Pe,$e=1),ke+Fe>.1){ke=100;for(let et=0;et.1&&(ke=de(ke,Se,Ie))}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,Oe){const Fe=ne.length-(te>0?ke.length:Oe.length);if(Fe<=0)return te;const Se=te/Fe;if(ne.length===1)ne[0].setSz(100),te=0;else for(let Ie=0;Ie0&&!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(!Oe.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,Oe=!1;for(let xe=0;xe elements are allowed at the root of . One of your DOM nodes was removed.");return}else Se&&(!Oe&&ne[ke].element!==Fe&&(Oe=!0),ke++)}if(Oe){const xe=[];for(let Fe=0;Feze.element===Se);Pe!=null?(Pe.index=xe.length,xe.push(Pe)):console.warn("Splitpanes: Internal error - found a elements which isn't tracked.")}}ne=xe,sn(x,n=ne.length>0?ne[0].key:void 0,n)}}function Ne(te){Ge[te?"unshift":"push"](()=>{_=te,t(5,_)})}return r.$$set=te=>{"id"in te&&t(0,u=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,o=te.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&2&&sn(O,s=l,s),r.$$.dirty[0]&32768&&sn(Z,i=d,i)},[u,l,y,w,b,_,F,q,j,O,Z,x,f,m,g,d,a,Ne,o]}class qf extends kt{constructor(e){super(),xt(this,e,Kf,Vf,wt,{id:0,horizontal:1,pushOtherPanes:12,dblClickSplitter:13,rtl:14,firstSplitter:15,style:2,theme:3,class:4},null,[-1,-1,-1])}}const Xf=(r,e)=>t=>{const n=r();n?.[e](t)},Zf=r=>Xf.bind(null,r);function Yf(r){let e,t,n,i,s,a,o=(r[4]!==r[9]||r[5])&&no(r);const u=r[20].default,l=hr(u,r,r[19],null);return{c(){o&&o.c(),e=ve(),t=ae("div"),l&&l.c(),this.h()},l(f){o&&o.l(f),e=Ee(f),t=oe(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){o&&o.m(f,m),Ae(f,e,m),Ae(f,t,m),l&&l.m(t,null),r[21](t),i=!0,s||(a=De(t,"click",r[11]("onPaneClick")),s=!0)},p(f,m){f[4]!==f[9]||f[5]?o?o.p(f,m):(o=no(f),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),l&&l.p&&(!i||m&524288)&&dr(l,u,f,f[19],i?mr(u,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){Re(l,f),i=!1},d(f){f&&(Y(e),Y(t)),o&&o.d(f),l&&l.d(f),r[21](null),s=!1,a()}}}function no(r){let e,t,n,i;return{c(){e=ae("div"),this.h()},l(s){e=oe(s,"DIV",{class:!0}),me(e).forEach(Y),this.h()},h(){P(e,"class",t="splitpanes__splitter "+(r[2]?"splitpanes__splitter__active":""))},m(s,a){Ae(s,e,a),n||(i=[De(e,"mousedown",r[11]("onSplitterDown")),De(e,"touchstart",r[11]("onSplitterDown")),De(e,"click",r[11]("onSplitterClick")),De(e,"dblclick",r[11]("onSplitterDblClick"))],n=!0)},p(s,a){a&4&&t!==(t="splitpanes__splitter "+(s[2]?"splitpanes__splitter__active":""))&&P(e,"class",t)},d(s){s&&Y(e),n=!1,or(i)}}}function Jf(r){let e,t,n=!r[10]&&Yf(r);return{c(){n&&n.c(),e=ot()},l(i){n&&n.l(i),e=ot()},m(i,s){n&&n.m(i,s),Ae(i,e,s),t=!0},p(i,[s]){i[10]||n.p(i,s)},i(i){t||(ye(n),t=!0)},o(i){Re(n),t=!1},d(i){i&&Y(e),n&&n.d(i)}}}function Qf(r,e,t){let n,i,s,a,o,{$$slots:u={},$$scope:l}=e;const{ssrRegisterPaneSize:f,onPaneInit:m,clientOnly:g,isHorizontal:d,showFirstSplitter:y,veryFirstPaneKey:w}=ut(al);Dr(r,d,H=>t(18,s=H)),Dr(r,y,H=>t(5,o=H)),Dr(r,w,H=>t(4,a=H));let{size:b=null}=e,{minSize:p=0}=e,{maxSize:_=100}=e,{snapSize:k=0}=e,{class:I=""}=e;const F={},q=!el,{undefinedPaneInitSize:j}=m(F);let L,C=b??j,se=!1,ne;const O=Zf(()=>ne),Z=H=>{H!=C&&O("reportGivenSizeChange")(H)};Kn(()=>{const H={key:F,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,se=ce)},isReady:!1};ne=g.onPaneAdd(H)}),aa(()=>{g.onPaneRemove(F)});function x(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,I=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=sl(s)),r.$$.dirty&196608&&t(3,i=`${n}: ${C}%;`)},[I,L,se,i,a,o,d,y,w,F,q,O,b,p,_,k,C,n,s,l,u,x]}class io extends kt{constructor(e){super(),xt(this,e,Qf,Jf,wt,{size:12,minSize:13,maxSize:14,snapSize:15,class:0})}}function $f(r){let e,t,n,i,s,a,o;return{c(){e=Gt("svg"),t=Gt("circle"),n=Gt("animate"),i=Gt("circle"),s=Gt("animate"),a=Gt("circle"),o=Gt("animate"),this.h()},l(u){e=Vt(u,"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);s=Vt(m,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),me(s).forEach(Y),m.forEach(Y),a=Vt(l,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var g=me(a);o=Vt(g,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),me(o).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(s,"attributeName","opacity"),P(s,"dur","1s"),P(s,"values","0;1;0"),P(s,"repeatCount","indefinite"),P(s,"begin","0.2"),P(i,"fill","#1976d2"),P(i,"stroke","none"),P(i,"cx","26"),P(i,"cy","50"),P(i,"r","6"),P(o,"attributeName","opacity"),P(o,"dur","1s"),P(o,"values","0;1;0"),P(o,"repeatCount","indefinite"),P(o,"begin","0.3"),P(a,"fill","#1976d2"),P(a,"stroke","none"),P(a,"cx","46"),P(a,"cy","50"),P(a,"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(u,l){Ae(u,e,l),Q(e,t),Q(t,n),Q(e,i),Q(i,s),Q(e,a),Q(a,o)},p:qe,i:qe,o:qe,d(u){u&&Y(e)}}}function eh(r,e,t){let{size:n=20}=e;return r.$$set=i=>{"size"in i&&t(0,n=i.size)},[n]}class th extends kt{constructor(e){super(),xt(this,e,eh,$f,wt,{size:0})}}function rh(r){let e,t,n,i,s;return{c(){e=ae("div"),t=Gt("svg"),n=Gt("circle"),i=ve(),s=lt(r[2]),this.h()},l(a){e=oe(a,"DIV",{class:!0});var o=me(e);t=Vt(o,"svg",{class:!0,viewBox:!0,xmlns:!0});var u=me(t);n=Vt(u,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),me(n).forEach(Y),u.forEach(Y),i=Ee(o),s=ct(o,r[2]),o.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(a,o){Ae(a,e,o),Q(e,t),Q(t,n),Q(e,i),Q(e,s)},p(a,[o]){o&1&&P(n,"fill",a[0]),o&2&&Jt(n,"filter","drop-shadow(0 0 1px "+a[1]+")"),o&4&&Xt(s,a[2])},i:qe,o:qe,d(a){a&&Y(e)}}}function nh(r,e,t){let{status:n="unknown"}=e,i="",s="",a="";switch(n){case"ok":i="#4CAF50",s="rgba(0, 128, 0, 0.7)",a="Сервис LLM работает";break;case"error":a="Сервис LLM не работает";break;case"loading model":i="yellow",s="rgba(255, 255, 0, 0.7)",a="Сервис LLM запускается...";break;case"unavailable":i="#af4f4c",s="#af4f4c",a="Сервис LLM не запущен";break;case"unknown":i="#af4f4c",s="#af4f4c",a="Сервис LLM недоступен";break}return r.$$set=o=>{"status"in o&&t(3,n=o.status)},[i,s,a,n]}class ih extends kt{constructor(e){super(),xt(this,e,nh,rh,wt,{status:3})}}function sh(r){let e,t,n,i,s;return{c(){e=ae("div"),t=Gt("svg"),n=Gt("circle"),i=ve(),s=lt(r[2]),this.h()},l(a){e=oe(a,"DIV",{class:!0});var o=me(e);t=Vt(o,"svg",{class:!0,viewBox:!0,xmlns:!0});var u=me(t);n=Vt(u,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),me(n).forEach(Y),u.forEach(Y),i=Ee(o),s=ct(o,r[2]),o.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(a,o){Ae(a,e,o),Q(e,t),Q(t,n),Q(e,i),Q(e,s)},p(a,[o]){o&1&&P(n,"fill",a[0]),o&2&&Jt(n,"filter","drop-shadow(0 0 1px "+a[1]+")"),o&4&&Xt(s,a[2])},i:qe,o:qe,d(a){a&&Y(e)}}}function ah(r,e,t){let{status:n="unavailable"}=e,i="",s="",a="";switch(n){case"ok":i="#4CAF50",s="rgba(0, 128, 0, 0.7)",a="Поиск работает";break;case"unavailable":i="#af4f4c",s="#af4f4c",a="Поиск не запущен";break;case"unknown":i="#af4f4c",s="#af4f4c",a="Поиск недоступен";break}return r.$$set=o=>{"status"in o&&t(3,n=o.status)},[i,s,a,n]}class oh extends kt{constructor(e){super(),xt(this,e,ah,sh,wt,{status:3})}}function uh(r){let e,t,n,i,s,a="Сохранить",o,u,l="Сбросить",f,m;return{c(){e=ae("div"),t=ae("div"),n=ae("textarea"),i=ve(),s=ae("button"),s.textContent=a,o=ve(),u=ae("button"),u.textContent=l,this.h()},l(g){e=oe(g,"DIV",{class:!0});var d=me(e);t=oe(d,"DIV",{class:!0});var y=me(t);n=oe(y,"TEXTAREA",{class:!0}),me(n).forEach(Y),i=Ee(y),s=oe(y,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(s)!=="svelte-g0hhac"&&(s.textContent=a),o=Ee(y),u=oe(y,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(u)!=="svelte-16kemh0"&&(u.textContent=l),y.forEach(Y),d.forEach(Y),this.h()},h(){P(n,"class","svelte-sfudwy"),P(s,"class","svelte-sfudwy"),P(u,"class","svelte-sfudwy"),P(t,"class","popup svelte-sfudwy"),P(e,"class","modal svelte-sfudwy")},m(g,d){Ae(g,e,d),Q(e,t),Q(t,n),ir(n,r[0]),Q(t,i),Q(t,s),Q(t,o),Q(t,u),f||(m=[De(n,"input",r[6]),De(s,"click",r[1]),De(u,"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,or(m)}}}let lh='Ты бухгалтер. Ты отвечаешь на русском языке. Ты всегда следуешь моим инструкциям. Ты отвечаешь на вопросы клиентов. Чтобы ответить, ты обязательно используешь только "источники", которые я тебе предоставляю. Ты используешь только официально-деловой стиль и необходимую терминологию. Соблюдай этические нормы. При ответе на вопрос ты используешь только такой формат ответа: 1) Четкий и краткий ответ на поставленный вопрос. Ты можешь начать свой ответ так: "По Вашему вопросу сообщаем...". Используй по возможности слова: да, можно, нет, нельзя. 2) Обоснование (ты используешь для обоснования "источники". Ты используешь только "источники" для поиска необходимых "законов", "статей", "пунктов" и "подпунктов" для ответа на вопрос пользователя). 3) Аргументация (Ты используешь только "источники" для поиска необходимых "писем" и "судебных решений", чтобы аргументировать свой ответ)." 4) Заключение (ты подводишь итоги всего, что сказал выше. Избегай повторения и сложных конструкций). Если в источниках нельзя найти подходящую информацию для ответа, ты отвечаешь так: "Мы не можем ответить на данный вопрос. Обратитесь к специалисту." Вопрос: {{ВОПРОС}} Источники: {{ИСТОЧНИКИ}}';function ch(r,e,t){let{onSave:n}=e,{onClose:i}=e,{text:s=""}=e,a=s;function o(){n(a),i()}function u(){t(0,a=lh)}function l(){a=this.value,t(0,a)}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,s=f.text)},[a,o,u,n,i,s,l]}class fh extends kt{constructor(e){super(),xt(this,e,ch,uh,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],[s,a,o]=i.split(".").map(Number);return new Date(o,a-1,s)}return null}static sortByRelevanceAndDate(e){return e.sort((t,n)=>{const i=n.relevance-t.relevance;if(i!==0)return i;const s=Yt.findDateInText(t.title),a=Yt.findDateInText(n.title);return s&&a?a.getTime()-s.getTime():s?-1:a?1:0})}static sortByDate(e){const t=e.filter(o=>Yt.findDateInText(o.title)),n=e.filter(o=>!Yt.findDateInText(o.title)),i=t.sort((o,u)=>{const l=Yt.findDateInText(o.title),f=Yt.findDateInText(u.title);return l&&f?f.getTime()-l.getTime():l?-1:f?1:0}),s=[];let a=0;for(const o of e)if(Yt.findDateInText(o.title)){let u=i.shift();u&&s.push(u)}else s.push(n[a]),a++;return s}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:s}of t)if(i.test(n.title))return n.docType=s,n;return n.docType="Другие документы",n})}static mergeResultsByTitle(e){const t=/(ст\.\d+)\s(НКРФ|НК РФ|ГКРФ|ГК РФ|ТКРФ|ТК РФ)$/,n={},i=[],s=a=>{const o=a.match(t);return o?o[0]:null};return e.forEach(a=>{const o=s(a.title);if(o)if(n[o]){n[o].relevance=Math.max(n[o].relevance,a.relevance);const u=n[o].title.match(/п[\w\.]+/g)||[],l=a.title.match(/п[\w\.]+/g)||[],f=[...new Set([...u,...l])].join(", ");n[o].title=`${f} ст.${o.split(" ")[0].split(".")[1]} ${o.split(" ")[1]}`,n[o].text+=`
+${a.title}
+${a.text}`}else n[o]={...a};else i.push(a)}),Object.keys(n).forEach(a=>{i.push(n[a])}),i}}function so(r,e,t){const n=r.slice();return n[13]=e[t],n}function ao(r){let e,t,n;return{c(){e=ae("input"),this.h()},l(i){e=oe(i,"INPUT",{type:!0}),this.h()},h(){P(e,"type","checkbox")},m(i,s){Ae(i,e,s),e.checked=r[1][r[3]],t||(n=De(e,"change",r[10]),t=!0)},p(i,s){s&10&&(e.checked=i[1][i[3]])},d(i){i&&Y(e),t=!1,n()}}}function hh(r){let e,t;return{c(){e=ae("div"),t=lt(r[4]),this.h()},l(n){e=oe(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){Ae(n,e,i),Q(e,t)},p(n,i){i&16&&Xt(t,n[4])},d(n){n&&Y(e)}}}function dh(r){let e,t=Mt(r[5].split(`
+`)),n=[];for(let i=0;i100&&lo(r);return{c(){e=ae("div"),t=ae("div"),n=ae("label"),l&&l.c(),i=ve(),s=lt(r[3]),a=ve(),g.c(),o=ve(),d&&d.c(),u=ve(),y&&y.c(),this.h()},l(w){e=oe(w,"DIV",{class:!0});var b=me(e);t=oe(b,"DIV",{class:!0});var p=me(t);n=oe(p,"LABEL",{style:!0});var _=me(n);l&&l.l(_),i=Ee(_),s=ct(_,r[3]),_.forEach(Y),p.forEach(Y),a=Ee(b),g.l(b),o=Ee(b),d&&d.l(b),u=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){Ae(w,e,b),Q(e,t),Q(t,n),l&&l.m(n,null),Q(n,i),Q(n,s),Q(e,a),g.m(e,null),Q(e,o),d&&d.m(e,null),Q(e,u),y&&y.m(e,null)},p(w,[b]){w[8]?l?l.p(w,b):(l=ao(w),l.c(),l.m(n,i)):l&&(l.d(1),l=null),b&8&&Xt(s,w[3]),m===(m=f(w))&&g?g.p(w,b):(g.d(1),g=m(w),g&&(g.c(),g.m(e,o))),w[6]&&w[7]?d?d.p(w,b):(d=uo(w),d.c(),d.m(e,u)):d&&(d.d(1),d=null),w[5].length>100?y?y.p(w,b):(y=lo(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 wh(r,e,t){let{showFullText:n=Array(10).fill(!1)}=e,{useSearchResult:i}=e,{index:s}=e,{title:a}=e,{teaser:o}=e,{text:u}=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[a]=this.checked,t(1,i)}const y=()=>g(s),w=()=>g(s);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,s=b.index),"title"in b&&t(3,a=b.title),"teaser"in b&&t(4,o=b.teaser),"text"in b&&t(5,u=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,s,a,o,u,l,f,m,g,d,y,w]}class ol extends kt{constructor(e){super(),xt(this,e,wh,gh,wt,{showFullText:0,useSearchResult:1,index:2,title:3,teaser:4,text:5,enableDocumentDb:6,documentDbUrl:7,enableSearchResultSelection:8})}}function co(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 fo(r,e,t){const n=r.slice();return n[18]=e[t][0],n[19]=e[t][1],n}function ho(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 po(r){let e,t,n,i="Сортировать по:",s,a,o,u,l,f;a=new Sf({props:{background:"",border:"",$$slots:{default:[_h]},$$scope:{ctx:r}}});function m(d){r[12](d)}let g={name:"groupByChecked",size:"sm",label:"Группировать по типу",$$slots:{default:[vh]},$$scope:{ctx:r}};return r[6]!==void 0&&(g.checked=r[6]),u=new Ai({props:g}),Ge.push(()=>Je(u,"checked",m)),{c(){e=ae("div"),t=ae("div"),n=ae("label"),n.textContent=i,s=ve(),rt(a.$$.fragment),o=ve(),rt(u.$$.fragment),this.h()},l(d){e=oe(d,"DIV",{class:!0});var y=me(e);t=oe(y,"DIV",{class:!0,style:!0});var w=me(t);n=oe(w,"LABEL",{style:!0,class:!0,"data-svelte-h":!0}),Ve(n)!=="svelte-12wnwfn"&&(n.textContent=i),s=Ee(w),nt(a.$$.fragment,w),o=Ee(w),nt(u.$$.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){Ae(d,e,y),Q(e,t),Q(t,n),Q(t,s),it(a,t,null),Q(t,o),it(u,t,null),f=!0},p(d,y){const w={};y&268435584&&(w.$$scope={dirty:y,ctx:d}),a.$set(w);const b={};y&268435456&&(b.$$scope={dirty:y,ctx:d}),!l&&y&64&&(l=!0,b.checked=d[6],Ye(()=>l=!1)),u.$set(b)},i(d){f||(ye(a.$$.fragment,d),ye(u.$$.fragment,d),f=!0)},o(d){Re(a.$$.fragment,d),Re(u.$$.fragment,d),f=!1},d(d){d&&Y(e),st(a),st(u)}}}function yh(r){let e;return{c(){e=lt("релевантности")},l(t){e=ct(t,"релевантности")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function bh(r){let e;return{c(){e=lt("дате")},l(t){e=ct(t,"дате")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function _h(r){let e,t,n,i,s,a;function o(m){r[10](m)}let u={name:"sortBy",value:"rel",$$slots:{default:[yh]},$$scope:{ctx:r}};r[7]!==void 0&&(u.group=r[7]),e=new Ka({props:u}),Ge.push(()=>Je(e,"group",o));function l(m){r[11](m)}let f={name:"sortBy",value:"date",$$slots:{default:[bh]},$$scope:{ctx:r}};return r[7]!==void 0&&(f.group=r[7]),i=new Ka({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),Ae(m,n,g),it(i,m,g),a=!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}),!s&&g&128&&(s=!0,y.group=m[7],Ye(()=>s=!1)),i.$set(y)},i(m){a||(ye(e.$$.fragment,m),ye(i.$$.fragment,m),a=!0)},o(m){Re(e.$$.fragment,m),Re(i.$$.fragment,m),a=!1},d(m){m&&Y(n),st(e,m),st(i,m)}}}function vh(r){let e;return{c(){e=lt("Группировать по типу")},l(t){e=ct(t,"Группировать по типу")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function Eh(r){let e,t,n=Mt(r[1]),i=[];for(let a=0;aRe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;aRe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;aRe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;a0&&po(r);const l=[Sh,Eh],f=[];function m(d,y){return d[6]&&d[8]?0:1}n=m(r),i=f[n]=l[n](r);let g=Rh;return{c(){e=ae("div"),u&&u.c(),t=ve(),i.c(),s=ve(),a=ot(),this.h()},l(d){e=oe(d,"DIV",{class:!0});var y=me(e);u&&u.l(y),t=Ee(y),i.l(y),y.forEach(Y),s=Ee(d),a=ot(),this.h()},h(){P(e,"class","search-results svelte-1ptibtq")},m(d,y){Ae(d,e,y),u&&u.m(e,null),Q(e,t),f[n].m(e,null),Ae(d,s,y),Ae(d,a,y),o=!0},p(d,[y]){d[1]&&d[1].length>0?u?(u.p(d,y),y&2&&ye(u,1)):(u=po(d),u.c(),ye(u,1),u.m(e,t)):u&&(ht(),Re(u,1,1,()=>{u=null}),dt());let w=n;n=m(d),n===w?f[n].p(d,y):(ht(),Re(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){o||(ye(u),ye(i),ye(g),o=!0)},o(d){Re(u),Re(i),Re(g),o=!1},d(d){d&&(Y(e),Y(s),Y(a)),u&&u.d(),f[n].d()}}}let Rh=!1;function Ih(r,e,t){let{enableDocumentDb:n=!1}=e,{documentDbUrl:i=""}=e,{showFullText:s=Array(10).fill(!1)}=e,{useSearchResult:a}=e,o=!1,u="rel",{searchResults:l=[]}=e,f,{enableSearchResultSelection:m=!1}=e;const g=p=>p.reduce((_,k)=>{const I=k.docType||"Другие документы";return _[I]||(_[I]=[]),_[I].push(k),_},{}),d=p=>{p.stopPropagation();const _=p.target.dataset.doctype;Object.keys(f[_]).forEach(k=>{t(0,a[f[_][k].title]=p.target.checked,a)})};function y(p){u=p,t(7,u)}function w(p){u=p,t(7,u)}function b(p){o=p,t(6,o)}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,s=p.showFullText),"useSearchResult"in p&&t(0,a=p.useSearchResult),"searchResults"in p&&t(1,l=p.searchResults),"enableSearchResultSelection"in p&&t(5,m=p.enableSearchResultSelection)},r.$$.update=()=>{r.$$.dirty&194&&(o&&t(8,f=g(l)),u=="date"?t(1,l=Yt.sortByDate(l)):u=="rel"&&t(1,l=Yt.sortByRelevance(l))),r.$$.dirty&1&&a===void 0&&t(0,a={})},[a,l,s,n,i,m,o,u,f,d,y,w,b]}class ul extends kt{constructor(e){super(),xt(this,e,Ih,Ch,wt,{enableDocumentDb:3,documentDbUrl:4,showFullText:2,useSearchResult:0,searchResults:1,enableSearchResultSelection:5})}}function bo(r,e,t){const n=r.slice();return n[6]=e[t],n}function _o(r){let e,t=Mt(r[3].split(`
+`)),n=[];for(let i=0;io(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,s=l.title),"text"in l&&t(3,a=l.text)},[n,i,s,a,o,u]}class Oh extends kt{constructor(e){super(),xt(this,e,Nh,Dh,wt,{showFullText:0,index:1,title:2,text:3})}}function Eo(r,e,t){const n=r.slice();return n[2]=e[t].title,n[3]=e[t].text,n[5]=t,n}function So(r){let e,t;return e=new Oh({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 s={};i&2&&(s.title=n[2]),i&2&&(s.text=n[3]),i&1&&(s.showFullText=n[0]),e.$set(s)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Fh(r){let e,t,n="Релевантные консультации",i,s,a,o,u=Mt(r[1]),l=[];for(let g=0;gRe(l[g],1,1,()=>{l[g]=null});let m=Bh;return{c(){e=ae("div"),t=ae("h2"),t.textContent=n,i=ve();for(let g=0;g{"showFullText"in s&&t(0,n=s.showFullText),"consultations"in s&&t(1,i=s.consultations)},[n,i]}class ll extends kt{constructor(e){super(),xt(this,e,Ph,Fh,wt,{showFullText:0,consultations:1})}}const Cr="clarificationHistory_",es="clarificationHistoryIndex",ts=2;class Pr{static loadHistory(){const e=[],t=this.getHistoryIndex();for(let n=0;nts){const t=e-ts;for(let n=0;n0?(t(4,f=m.length-1),t(5,g=m.length),y(),t(11,l=!0),t(1,s=""),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,s=L.llmClarification),t(8,a=L.searchResults),t(9,o=L.relevantConsultations),t(10,u=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:s,searchResults:[],llmResponse:"",relevantConsultations:[],transactionMaps:[]};t(5,g=Pr.getHistoryLength()),Pr.addHistoryItem(C),t(4,f=g-1)}function _(L,C,se,ne,O){console.log("updateCurrentState called");const Z=Pr.getHistoryItem(f);Z&&(Z.userRequest=L??Z.userRequest,Z.searchClarification=i??Z.searchClarification,Z.llmClarification=s??Z.llmClarification,Z.searchResults=C??Z.searchResults,Z.llmResponse=se??Z.llmResponse,Z.relevantConsultations=ne??Z.relevantConsultations,Z.transactionMaps=O??Z.transactionMaps,console.log(Z),Pr.updateHistoryItem(f,Z))}function k(){f>0&&(t(4,f-=1),y())}function I(){f{"userRequest"in L&&t(7,n=L.userRequest),"searchClarification"in L&&t(0,i=L.searchClarification),"llmClarification"in L&&t(1,s=L.llmClarification),"searchResults"in L&&t(8,a=L.searchResults),"relevantConsultations"in L&&t(9,o=L.relevantConsultations),"llmResponse"in L&&t(10,u=L.llmResponse),"historyIsNotEmpty"in L&&t(11,l=L.historyIsNotEmpty)},[i,s,k,I,f,g,b,n,a,o,u,l,y,w,p,_,F,q,j]}class jh extends kt{constructor(e){super(),xt(this,e,zh,Lh,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 Hh(r){let e;return{c(){e=lt(r[0])},l(t){e=ct(t,r[0])},m(t,n){Ae(t,e,n)},p(t,n){n&1&&Xt(e,t[0])},d(t){t&&Y(e)}}}function Wh(r){let e,t,n;return{c(){e=ae("a"),t=lt(r[0]),this.h()},l(i){e=oe(i,"A",{href:!0,target:!0,class:!0});var s=me(e);t=ct(s,r[0]),s.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,s){Ae(i,e,s),Q(e,t)},p(i,s){s&1&&Xt(t,i[0]),s&5&&n!==(n=i[2]+"file/download/name/"+encodeURIComponent(i[0]))&&P(e,"href",n)},d(i){i&&Y(e)}}}function Gh(r){let e,t,n,i,s;function a(l,f){return l[1]&&l[2]?Wh:Hh}let o=a(r),u=o(r);return{c(){e=ae("div"),t=ae("div"),u.c(),n=ve(),i=ae("div"),s=lt(r[3]),this.h()},l(l){e=oe(l,"DIV",{class:!0});var f=me(e);t=oe(f,"DIV",{class:!0});var m=me(t);u.l(m),m.forEach(Y),n=Ee(f),i=oe(f,"DIV",{});var g=me(i);s=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){Ae(l,e,f),Q(e,t),u.m(t,null),Q(e,n),Q(e,i),Q(i,s)},p(l,[f]){o===(o=a(l))&&u?u.p(l,f):(u.d(1),u=o(l),u&&(u.c(),u.m(t,null))),f&8&&Xt(s,l[3])},i:qe,o:qe,d(l){l&&Y(e),u.d()}}}function Vh(r,e,t){let{title:n}=e,{enableDocumentDb:i=!1}=e,{documentDbUrl:s=""}=e,{source:a=""}=e;return r.$$set=o=>{"title"in o&&t(0,n=o.title),"enableDocumentDb"in o&&t(1,i=o.enableDocumentDb),"documentDbUrl"in o&&t(2,s=o.documentDbUrl),"source"in o&&t(3,a=o.source)},[n,i,s,a]}class Kh extends kt{constructor(e){super(),xt(this,e,Vh,Gh,wt,{title:0,enableDocumentDb:1,documentDbUrl:2,source:3})}}function To(r,e,t){const n=r.slice();return n[3]=e[t],n}function Ao(r){let e,t;return e=new Kh({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 s={};i&4&&(s.title=n[3]),i&1&&(s.enableDocumentDb=n[0]),i&2&&(s.documentDbUrl=n[1]),i&4&&(s.source=n[2][n[3]]),e.$set(s)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function qh(r){let e,t,n,i,s=Mt(Object.keys(r[2])),a=[];for(let l=0;lRe(a[l],1,1,()=>{a[l]=null});let u=Xh;return{c(){e=ae("div");for(let l=0;l{"enableDocumentDb"in a&&t(0,n=a.enableDocumentDb),"documentDbUrl"in a&&t(1,i=a.documentDbUrl),"transactionMaps"in a&&t(2,s=a.transactionMaps)},[n,i,s]}class Yh extends kt{constructor(e){super(),xt(this,e,Zh,qh,wt,{enableDocumentDb:0,documentDbUrl:1,transactionMaps:2})}}var Jh=Object.defineProperty,Qh=Object.defineProperties,$h=Object.getOwnPropertyDescriptors,ko=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable,Ys=(r,e,t)=>e in r?Jh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xe=(r,e)=>{for(var t in e||(e={}))ed.call(e,t)&&Ys(r,t,e[t]);if(ko)for(var t of ko(e))td.call(e,t)&&Ys(r,t,e[t]);return r},qn=(r,e)=>Qh(r,$h(e)),ge=(r,e,t)=>(Ys(r,typeof e!="symbol"?e+"":e,t),t),mi=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});class Di{constructor(e){ge(this,"rootKey"),this.rootKey=e}}const rd=Object.seal({});class be extends Di{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 Di?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:rd}}addChildElement(e){return this.root.push(e),this}}class Bi 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 Di{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 s=this.xmlKeys&&this.xmlKeys[n]||n;t[s]=i}}),{_attr:t}}}class Xn extends Di{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:s})=>qn(Xe({},n),{[i]:s}),{})}}}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 Ar=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={},ua={exports:{}},ln=typeof Reflect=="object"?Reflect:null,xo=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 nd(r){console&&console.warn&&console.warn(r)}var hl=Number.isNaN||function(e){return e!==e};function Qe(){Qe.init.call(this)}ua.exports=Qe;ua.exports.once=od;Qe.EventEmitter=Qe;Qe.prototype._events=void 0;Qe.prototype._eventsCount=0;Qe.prototype._maxListeners=void 0;var Co=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 Co},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+".");Co=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&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=s[e];if(u===void 0)return!1;if(typeof u=="function")xo(u,this,t);else for(var l=u.length,f=yl(u,l),n=0;n0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=e,o.count=a.length,nd(o)}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 id(){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=id.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,s,a,o;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(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():sd(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||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 s=Object.keys(n),a;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?ad(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 o(d){var y=a(d),w=y[0],b=y[1];return(w+b)*3/4-b}function u(d,y,w){return(y+w)*3/4-w}function l(d){var y,w=a(d),b=w[0],p=w[1],_=new t(u(d,b,p)),k=0,I=p>0?b-4:b,F;for(F=0;F>16&255,_[k++]=y>>8&255,_[k++]=y&255;return p===2&&(y=e[d.charCodeAt(F)]<<2|e[d.charCodeAt(F+1)]>>4,_[k++]=y&255),p===1&&(y=e[d.charCodeAt(F)]<<10|e[d.charCodeAt(F+1)]<<4|e[d.charCodeAt(F+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;_I?I: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 Do;function pd(){return Do||(Do=1,gi.read=function(r,e,t,n,i){var s,a,o=i*8-n-1,u=(1<>1,f=-7,m=t?i-1:0,g=t?-1:1,d=r[e+m];for(m+=g,s=d&(1<<-f)-1,d>>=-f,f+=o;f>0;s=s*256+r[e+m],m+=g,f-=8);for(a=s&(1<<-f)-1,s>>=-f,f+=n;f>0;a=a*256+r[e+m],m+=g,f-=8);if(s===0)s=1-l;else{if(s===u)return a?NaN:(d?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-l}return(d?-1:1)*a*Math.pow(2,s-n)},gi.write=function(r,e,t,n,i,s){var a,o,u,l=s*8-i-1,f=(1<>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-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?(o=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+m>=1?e+=g/u:e+=g*Math.pow(2,1-m),e*u>=2&&(a++,u/=2),a+m>=f?(o=0,a=f):a+m>=1?(o=(e*u-1)*Math.pow(2,i),a=a+m):(o=e*Math.pow(2,m-1)*Math.pow(2,i),a=0));i>=8;r[t+d]=o&255,d+=y,o/=256,i-=8);for(a=a<0;r[t+d]=a&255,d+=y,a/=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 No;function Li(){return No||(No=1,function(r){var e=dd(),t=pd(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=o,r.SlowBuffer=_,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=s(),!o.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 s(){try{var A=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(A,c),A.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(A){if(A>i)throw new RangeError('The value "'+A+'" is invalid for option "size"');var c=new Uint8Array(A);return Object.setPrototypeOf(c,o.prototype),c}function o(A,c,h){if(typeof A=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(A)}return u(A,c,h)}o.poolSize=8192;function u(A,c,h){if(typeof A=="string")return g(A,c);if(ArrayBuffer.isView(A))return y(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(ee(A,ArrayBuffer)||A&&ee(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ee(A,SharedArrayBuffer)||A&&ee(A.buffer,SharedArrayBuffer)))return w(A,c,h);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=A.valueOf&&A.valueOf();if(E!=null&&E!==A)return o.from(E,c,h);var B=b(A);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return o.from(A[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 A)}o.from=function(A,c,h){return u(A,c,h)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function f(A,c,h){return l(A),A<=0?a(A):c!==void 0?typeof h=="string"?a(A).fill(c,h):a(A).fill(c):a(A)}o.alloc=function(A,c,h){return f(A,c,h)};function m(A){return l(A),a(A<0?0:p(A)|0)}o.allocUnsafe=function(A){return m(A)},o.allocUnsafeSlow=function(A){return m(A)};function g(A,c){if((typeof c!="string"||c==="")&&(c="utf8"),!o.isEncoding(c))throw new TypeError("Unknown encoding: "+c);var h=k(A,c)|0,E=a(h),B=E.write(A,c);return B!==h&&(E=E.slice(0,B)),E}function d(A){for(var c=A.length<0?0:p(A.length)|0,h=a(c),E=0;E=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return A|0}function _(A){return+A!=A&&(A=0),o.alloc(+A)}o.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==o.prototype},o.compare=function(c,h){if(ee(c,Uint8Array)&&(c=o.from(c,c.offset,c.byteLength)),ee(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),!o.isBuffer(c)||!o.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,B=h.length,K=0,z=Math.min(E,B);KB.length?o.from(z).copy(B,K):Uint8Array.prototype.set.call(B,z,K);else if(o.isBuffer(z))z.copy(B,K);else throw new TypeError('"list" argument must be an Array of Buffers');K+=z.length}return B};function k(A,c){if(o.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||ee(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);var h=A.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&h===0)return 0;for(var B=!1;;)switch(c){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return S(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return D(A).length;default:if(B)return E?-1:S(A).length;c=(""+c).toLowerCase(),B=!0}}o.byteLength=k;function I(A,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(A||(A="utf8");;)switch(A){case"hex":return X(this,c,h);case"utf8":case"utf-8":return x(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 Te(this,c,h);default:if(E)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function F(A,c,h){var E=A[c];A[c]=A[h],A[h]=E}o.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&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(c,h,E,B,K){if(ee(c,Uint8Array)&&(c=o.from(c,c.offset,c.byteLength)),!o.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),B===void 0&&(B=0),K===void 0&&(K=this.length),h<0||E>c.length||B<0||K>this.length)throw new RangeError("out of range index");if(B>=K&&h>=E)return 0;if(B>=K)return-1;if(h>=E)return 1;if(h>>>=0,E>>>=0,B>>>=0,K>>>=0,this===c)return 0;for(var z=K-B,ue=E-h,we=Math.min(z,ue),de=this.slice(B,K),Ce=c.slice(h,E),Ne=0;Ne2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,v(h)&&(h=B?0:A.length-1),h<0&&(h=A.length+h),h>=A.length){if(B)return-1;h=A.length-1}else if(h<0)if(B)h=0;else return-1;if(typeof c=="string"&&(c=o.from(c,E)),o.isBuffer(c))return c.length===0?-1:j(A,c,h,E,B);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?B?Uint8Array.prototype.indexOf.call(A,c,h):Uint8Array.prototype.lastIndexOf.call(A,c,h):j(A,[c],h,E,B);throw new TypeError("val must be string, number or Buffer")}function j(A,c,h,E,B){var K=1,z=A.length,ue=c.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(A.length<2||c.length<2)return-1;K=2,z/=2,ue/=2,h/=2}function we(ke,Oe){return K===1?ke[Oe]:ke.readUInt16BE(Oe*K)}var de;if(B){var Ce=-1;for(de=h;dez&&(h=z-ue),de=h;de>=0;de--){for(var Ne=!0,te=0;teB&&(E=B)):E=B;var K=c.length;E>K/2&&(E=K/2);for(var z=0;z>>0,isFinite(E)?(E=E>>>0,B===void 0&&(B="utf8")):(B=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");B||(B="utf8");for(var z=!1;;)switch(B){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 se(this,c,h,E);case"base64":return ne(this,c,h,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,c,h,E);default:if(z)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),z=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(A,c,h){return c===0&&h===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(c,h))}function x(A,c,h){h=Math.min(A.length,h);for(var E=[],B=c;B239?4:K>223?3:K>191?2:1;if(B+ue<=h){var we,de,Ce,Ne;switch(ue){case 1:K<128&&(z=K);break;case 2:we=A[B+1],(we&192)===128&&(Ne=(K&31)<<6|we&63,Ne>127&&(z=Ne));break;case 3:we=A[B+1],de=A[B+2],(we&192)===128&&(de&192)===128&&(Ne=(K&15)<<12|(we&63)<<6|de&63,Ne>2047&&(Ne<55296||Ne>57343)&&(z=Ne));break;case 4:we=A[B+1],de=A[B+2],Ce=A[B+3],(we&192)===128&&(de&192)===128&&(Ce&192)===128&&(Ne=(K&15)<<18|(we&63)<<12|(de&63)<<6|Ce&63,Ne>65535&&Ne<1114112&&(z=Ne))}}z===null?(z=65533,ue=1):z>65535&&(z-=65536,E.push(z>>>10&1023|55296),z=56320|z&1023),E.push(z),B+=ue}return ce(E)}var H=4096;function ce(A){var c=A.length;if(c<=H)return String.fromCharCode.apply(String,A);for(var h="",E=0;EE)&&(h=E);for(var B="",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")}o.prototype.readUintLE=o.prototype.readUIntLE=function(c,h,E){c=c>>>0,h=h>>>0,E||V(c,h,this.length);for(var B=this[c],K=1,z=0;++z>>0,h=h>>>0,E||V(c,h,this.length);for(var B=this[c+--h],K=1;h>0&&(K*=256);)B+=this[c+--h]*K;return B},o.prototype.readUint8=o.prototype.readUInt8=function(c,h){return c=c>>>0,h||V(c,1,this.length),this[c]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(c,h){return c=c>>>0,h||V(c,2,this.length),this[c]|this[c+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(c,h){return c=c>>>0,h||V(c,2,this.length),this[c]<<8|this[c+1]},o.prototype.readUint32LE=o.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},o.prototype.readUint32BE=o.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])},o.prototype.readIntLE=function(c,h,E){c=c>>>0,h=h>>>0,E||V(c,h,this.length);for(var B=this[c],K=1,z=0;++z=K&&(B-=Math.pow(2,8*h)),B},o.prototype.readIntBE=function(c,h,E){c=c>>>0,h=h>>>0,E||V(c,h,this.length);for(var B=h,K=1,z=this[c+--B];B>0&&(K*=256);)z+=this[c+--B]*K;return K*=128,z>=K&&(z-=Math.pow(2,8*h)),z},o.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]},o.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},o.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},o.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},o.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]},o.prototype.readFloatLE=function(c,h){return c=c>>>0,h||V(c,4,this.length),t.read(this,c,!0,23,4)},o.prototype.readFloatBE=function(c,h){return c=c>>>0,h||V(c,4,this.length),t.read(this,c,!1,23,4)},o.prototype.readDoubleLE=function(c,h){return c=c>>>0,h||V(c,8,this.length),t.read(this,c,!0,52,8)},o.prototype.readDoubleBE=function(c,h){return c=c>>>0,h||V(c,8,this.length),t.read(this,c,!1,52,8)};function R(A,c,h,E,B,K){if(!o.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>B||cA.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(c,h,E,B){if(c=+c,h=h>>>0,E=E>>>0,!B){var K=Math.pow(2,8*E)-1;R(this,c,h,E,K,0)}var z=1,ue=0;for(this[h]=c&255;++ue>>0,E=E>>>0,!B){var K=Math.pow(2,8*E)-1;R(this,c,h,E,K,0)}var z=E-1,ue=1;for(this[h+z]=c&255;--z>=0&&(ue*=256);)this[h+z]=c/ue&255;return h+E},o.prototype.writeUint8=o.prototype.writeUInt8=function(c,h,E){return c=+c,h=h>>>0,E||R(this,c,h,1,255,0),this[h]=c&255,h+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(c,h,E){return c=+c,h=h>>>0,E||R(this,c,h,2,65535,0),this[h]=c&255,this[h+1]=c>>>8,h+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(c,h,E){return c=+c,h=h>>>0,E||R(this,c,h,2,65535,0),this[h]=c>>>8,this[h+1]=c&255,h+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(c,h,E){return c=+c,h=h>>>0,E||R(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},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(c,h,E){return c=+c,h=h>>>0,E||R(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},o.prototype.writeIntLE=function(c,h,E,B){if(c=+c,h=h>>>0,!B){var K=Math.pow(2,8*E-1);R(this,c,h,E,K-1,-K)}var z=0,ue=1,we=0;for(this[h]=c&255;++z>0)-we&255;return h+E},o.prototype.writeIntBE=function(c,h,E,B){if(c=+c,h=h>>>0,!B){var K=Math.pow(2,8*E-1);R(this,c,h,E,K-1,-K)}var z=E-1,ue=1,we=0;for(this[h+z]=c&255;--z>=0&&(ue*=256);)c<0&&we===0&&this[h+z+1]!==0&&(we=1),this[h+z]=(c/ue>>0)-we&255;return h+E},o.prototype.writeInt8=function(c,h,E){return c=+c,h=h>>>0,E||R(this,c,h,1,127,-128),c<0&&(c=255+c+1),this[h]=c&255,h+1},o.prototype.writeInt16LE=function(c,h,E){return c=+c,h=h>>>0,E||R(this,c,h,2,32767,-32768),this[h]=c&255,this[h+1]=c>>>8,h+2},o.prototype.writeInt16BE=function(c,h,E){return c=+c,h=h>>>0,E||R(this,c,h,2,32767,-32768),this[h]=c>>>8,this[h+1]=c&255,h+2},o.prototype.writeInt32LE=function(c,h,E){return c=+c,h=h>>>0,E||R(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},o.prototype.writeInt32BE=function(c,h,E){return c=+c,h=h>>>0,E||R(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(A,c,h,E,B,K){if(h+E>A.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function $(A,c,h,E,B){return c=+c,h=h>>>0,B||J(A,c,h,4),t.write(A,c,h,E,23,4),h+4}o.prototype.writeFloatLE=function(c,h,E){return $(this,c,h,!0,E)},o.prototype.writeFloatBE=function(c,h,E){return $(this,c,h,!1,E)};function ie(A,c,h,E,B){return c=+c,h=h>>>0,B||J(A,c,h,8),t.write(A,c,h,E,52,8),h+8}o.prototype.writeDoubleLE=function(c,h,E){return ie(this,c,h,!0,E)},o.prototype.writeDoubleBE=function(c,h,E){return ie(this,c,h,!1,E)},o.prototype.copy=function(c,h,E,B){if(!o.isBuffer(c))throw new TypeError("argument should be a Buffer");if(E||(E=0),!B&&B!==0&&(B=this.length),h>=c.length&&(h=c.length),h||(h=0),B>0&&B=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=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(!B){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}B=h;continue}if(h<56320){(c-=3)>-1&&K.push(239,191,189),B=h;continue}h=(B-55296<<10|h-56320)+65536}else B&&(c-=3)>-1&&K.push(239,191,189);if(B=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(A){for(var c=[],h=0;h>8,B=h%256,K.push(B),K.push(E);return K}function D(A){return e.toByteArray(T(A))}function N(A,c,h,E){for(var B=0;B=c.length||B>=A.length);++B)c[B+h]=A[B];return B}function ee(A,c){return A instanceof c||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===c.name}function v(A){return A!==A}var re=function(){for(var A="0123456789abcdef",c=new Array(256),h=0;h<16;++h)for(var E=h*16,B=0;B<16;++B)c[E+B]=A[h]+A[B];return c}()}(ns)),ns}var is={},ss={},as,Oo;function Al(){return Oo||(Oo=1,as=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 s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),as}var os,Fo;function ca(){if(Fo)return os;Fo=1;var r=Al();return os=function(){return r()&&!!Symbol.toStringTag},os}var us,Bo;function md(){if(Bo)return us;Bo=1;var r=typeof Symbol<"u"&&Symbol,e=Al();return us=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},us}var ls,Po;function gd(){if(Po)return ls;Po=1;var r={foo:{}},e=Object;return ls=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof e)},ls}var cs,Lo;function wd(){if(Lo)return cs;Lo=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(u,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%":u&&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%":u&&f?f(f([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!u||!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"||!u||!f?r:f(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&f?f(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":e,"%ThrowTypeError%":o,"%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(O){var y=f(f(O));d["%Error.prototype%"]=y}var w=function O(Z){var x;if(Z==="%AsyncFunction%")x=i("async function () {}");else if(Z==="%GeneratorFunction%")x=i("function* () {}");else if(Z==="%AsyncGeneratorFunction%")x=i("async function* () {}");else if(Z==="%AsyncGenerator%"){var H=O("%AsyncGeneratorFunction%");H&&(x=H.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ce=O("%AsyncGenerator%");ce&&f&&(x=f(ce.prototype))}return d[Z]=x,x},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=fa(),_=yd(),k=p.call(Function.call,Array.prototype.concat),I=p.call(Function.apply,Array.prototype.splice),F=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,se=function(Z){var x=q(Z,0,1),H=q(Z,-1);if(x==="%"&&H!=="%")throw new e("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&x!=="%")throw new e("invalid intrinsic syntax, expected opening `%`");var ce=[];return F(Z,L,function(W,pe,X,Te){ce[ce.length]=X?F(Te,C,"$1"):pe||W}),ce},ne=function(Z,x){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"&&!x)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 ds=function(Z,x){if(typeof Z!="string"||Z.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof x!="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=se(Z),ce=H.length>0?H[0]:"",W=ne("%"+ce+"%",x),pe=W.name,X=W.value,Te=!1,V=W.alias;V&&(ce=V[0],I(H,k([0,1],V)));for(var R=1,J=!0;R=H.length){var T=s(X,$);J=!!T,J&&"get"in T&&!("originalValue"in T.get)?X=T.get:X=X[$]}else J=_(X,$),X=X[$];J&&!Te&&(d[pe]=X)}}return X},ds}var ps={exports:{}},ms,jo;function kl(){if(jo)return ms;jo=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}},ms=t,ms}var gs,Ho;function ha(){if(Ho)return gs;Ho=1;var r=bn(),e=r("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return gs=e,gs}var ws,Wo;function bd(){if(Wo)return ws;Wo=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%"),s=ha();return ws=function(o,u,l){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="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=!!s&&s(o,u);if(t)t(o,u,{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)o[u]=l;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ws}var ys,Go;function _d(){if(Go)return ys;Go=1;var r=bn(),e=bd(),t=kl()(),n=ha(),i=r("%TypeError%"),s=r("%Math.floor%");return ys=function(o,u){if(typeof o!="function")throw new i("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||s(u)!==u)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 o&&n){var g=n(o,"length");g&&!g.configurable&&(f=!1),g&&!g.writable&&(m=!1)}return(f||m||!l)&&(t?e(o,"length",u,!0,!0):e(o,"length",u)),o},ys}var Vo;function xl(){return Vo||(Vo=1,function(r){var e=fa(),t=bn(),n=_d(),i=t("%TypeError%"),s=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,s),u=t("%Object.defineProperty%",!0),l=t("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}r.exports=function(g){if(typeof g!="function")throw new i("a function is required");var d=o(e,a,arguments);return n(d,1+l(0,g.length-(arguments.length-1)),!0)};var f=function(){return o(e,s,arguments)};u?u(r.exports,"apply",{value:f}):r.exports.apply=f}(ps)),ps.exports}var bs,Ko;function Cl(){if(Ko)return bs;Ko=1;var r=bn(),e=xl(),t=e(r("String.prototype.indexOf"));return bs=function(i,s){var a=r(i,!!s);return typeof a=="function"&&t(i,".prototype.")>-1?e(a):a},bs}var _s,qo;function vd(){if(qo)return _s;qo=1;var r=ca()(),e=Cl(),t=e("Object.prototype.toString"),n=function(o){return r&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:t(o)==="[object Arguments]"},i=function(o){return n(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&t(o)!=="[object Array]"&&t(o.callee)==="[object Function]"},s=function(){return n(arguments)}();return n.isLegacyArguments=i,_s=s?n:i,_s}var vs,Xo;function Ed(){if(Xo)return vs;Xo=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=ca()(),i=Object.getPrototypeOf,s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},a;return vs=function(u){if(typeof u!="function")return!1;if(t.test(e.call(u)))return!0;if(!n){var l=r.call(u);return l==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var f=s();a=f?i(f):!1}return i(u)===a},vs}var Es,Zo;function Sd(){if(Zo)return Es;Zo=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/,s=function(k){try{var I=r.call(k);return i.test(I)}catch{return!1}},a=function(k){try{return s(k)?!1:(r.call(k),!0)}catch{return!1}},o=Object.prototype.toString,u="[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;o.call(p)===o.call(document.all)&&(b=function(k){if((w||!k)&&(typeof k>"u"||typeof k=="object"))try{var I=o.call(k);return(I===m||I===g||I===d||I===u)&&k("")==null}catch{}return!1})}return Es=e?function(k){if(b(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{e(k,null,t)}catch(I){if(I!==n)return!1}return!s(k)&&a(k)}:function(k){if(b(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(y)return a(k);if(s(k))return!1;var I=o.call(k);return I!==l&&I!==f&&!/^\[object HTML/.test(I)?!1:a(k)},Es}var Ss,Yo;function Td(){if(Yo)return Ss;Yo=1;var r=Sd(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(u,l,f){for(var m=0,g=u.length;m=3&&(m=f),e.call(u)==="[object Array]"?n(u,l,m):typeof u=="string"?i(u,l,m):s(u,l,m)};return Ss=a,Ss}var Ts,Jo;function Ad(){if(Jo)return Ts;Jo=1;var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],e=typeof globalThis>"u"?Ar:globalThis;return Ts=function(){for(var n=[],i=0;i"u"?Ar:globalThis,u=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},As}var ks,$o;function kd(){if($o)return ks;$o=1;var r=Rl();return ks=function(t){return!!r(t)},ks}var eu;function xd(){return eu||(eu=1,function(r){var e=vd(),t=Ed(),n=Rl(),i=kd();function s(E){return E.call.bind(E)}var a=typeof BigInt<"u",o=typeof Symbol<"u",u=s(Object.prototype.toString),l=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),m=s(Boolean.prototype.valueOf);if(a)var g=s(BigInt.prototype.valueOf);if(o)var d=s(Symbol.prototype.valueOf);function y(E,B){if(typeof E!="object")return!1;try{return B(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 I(E){return n(E)==="Uint32Array"}r.isUint32Array=I;function F(E){return n(E)==="Int8Array"}r.isInt8Array=F;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 se(E){return n(E)==="BigInt64Array"}r.isBigInt64Array=se;function ne(E){return n(E)==="BigUint64Array"}r.isBigUint64Array=ne;function O(E){return u(E)==="[object Map]"}O.working=typeof Map<"u"&&O(new Map);function Z(E){return typeof Map>"u"?!1:O.working?O(E):E instanceof Map}r.isMap=Z;function x(E){return u(E)==="[object Set]"}x.working=typeof Set<"u"&&x(new Set);function H(E){return typeof Set>"u"?!1:x.working?x(E):E instanceof Set}r.isSet=H;function ce(E){return u(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 u(E)==="[object WeakSet]"}pe.working=typeof WeakSet<"u"&&pe(new WeakSet);function X(E){return pe(E)}r.isWeakSet=X;function Te(E){return u(E)==="[object ArrayBuffer]"}Te.working=typeof ArrayBuffer<"u"&&Te(new ArrayBuffer);function V(E){return typeof ArrayBuffer>"u"?!1:Te.working?Te(E):E instanceof ArrayBuffer}r.isArrayBuffer=V;function R(E){return u(E)==="[object DataView]"}R.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&R(new DataView(new ArrayBuffer(1),0,1));function J(E){return typeof DataView>"u"?!1:R.working?R(E):E instanceof DataView}r.isDataView=J;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(E){return u(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 T(E){return u(E)==="[object AsyncFunction]"}r.isAsyncFunction=T;function S(E){return u(E)==="[object Map Iterator]"}r.isMapIterator=S;function G(E){return u(E)==="[object Set Iterator]"}r.isSetIterator=G;function U(E){return u(E)==="[object Generator]"}r.isGeneratorObject=U;function D(E){return u(E)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=D;function N(E){return y(E,l)}r.isNumberObject=N;function ee(E){return y(E,f)}r.isStringObject=ee;function v(E){return y(E,m)}r.isBooleanObject=v;function re(E){return a&&y(E,g)}r.isBigIntObject=re;function A(E){return o&&y(E,d)}r.isSymbolObject=A;function c(E){return N(E)||ee(E)||v(E)||re(E)||A(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")}})})}(ss)),ss}var xs,tu;function Cd(){return tu||(tu=1,xs=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),xs}var ru;function Il(){return ru||(ru=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(R){if(!F(R)){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(R,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 R.apply(this,arguments)}return ie};var n={},i=/^$/;if(je.env.NODE_DEBUG){var s=je.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}r.debuglog=function(R){if(R=R.toUpperCase(),!n[R])if(i.test(R)){var J=je.pid;n[R]=function(){var $=r.format.apply(r,arguments);console.error("%s %d: %s",R,J,$)}}else n[R]=function(){};return n[R]};function a(R,J){var $={seen:[],stylize:u};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=o),f($,R,$.depth)}r.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(R,J){var $=a.styles[J];return $?"\x1B["+a.colors[$][0]+"m"+R+"\x1B["+a.colors[$][1]+"m":R}function u(R,J){return R}function l(R){var J={};return R.forEach(function($,ie){J[$]=!0}),J}function f(R,J,$){if(R.customInspect&&J&&O(J.inspect)&&J.inspect!==r.inspect&&!(J.constructor&&J.constructor.prototype===J)){var ie=J.inspect($,R);return F(ie)||(ie=f(R,ie,$)),ie}var M=m(R,J);if(M)return M;var T=Object.keys(J),S=l(T);if(R.showHidden&&(T=Object.getOwnPropertyNames(J)),ne(J)&&(T.indexOf("message")>=0||T.indexOf("description")>=0))return g(J);if(T.length===0){if(O(J)){var G=J.name?": "+J.name:"";return R.stylize("[Function"+G+"]","special")}if(L(J))return R.stylize(RegExp.prototype.toString.call(J),"regexp");if(se(J))return R.stylize(Date.prototype.toString.call(J),"date");if(ne(J))return g(J)}var U="",D=!1,N=["{","}"];if(b(J)&&(D=!0,N=["[","]"]),O(J)){var ee=J.name?": "+J.name:"";U=" [Function"+ee+"]"}if(L(J)&&(U=" "+RegExp.prototype.toString.call(J)),se(J)&&(U=" "+Date.prototype.toUTCString.call(J)),ne(J)&&(U=" "+g(J)),T.length===0&&(!D||J.length==0))return N[0]+U+N[1];if($<0)return L(J)?R.stylize(RegExp.prototype.toString.call(J),"regexp"):R.stylize("[Object]","special");R.seen.push(J);var v;return D?v=d(R,J,$,S,T):v=T.map(function(re){return y(R,J,$,S,re,D)}),R.seen.pop(),w(v,U,N)}function m(R,J){if(j(J))return R.stylize("undefined","undefined");if(F(J)){var $="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return R.stylize($,"string")}if(I(J))return R.stylize(""+J,"number");if(p(J))return R.stylize(""+J,"boolean");if(_(J))return R.stylize("null","null")}function g(R){return"["+Error.prototype.toString.call(R)+"]"}function d(R,J,$,ie,M){for(var T=[],S=0,G=J.length;S-1&&(T?G=G.split(`
+`).map(function(D){return" "+D}).join(`
+`).slice(2):G=`
+`+G.split(`
+`).map(function(D){return" "+D}).join(`
+`))):G=R.stylize("[Circular]","special")),j(S)){if(T&&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=R.stylize(S,"name")):(S=S.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),S=R.stylize(S,"string"))}return S+": "+G}function w(R,J,$){var ie=R.reduce(function(M,T){return T.indexOf(`
+`)>=0,M+T.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ie>60?$[0]+(J===""?"":J+`
+ `)+" "+R.join(`,
+ `)+" "+$[1]:$[0]+J+" "+R.join(", ")+" "+$[1]}r.types=xd();function b(R){return Array.isArray(R)}r.isArray=b;function p(R){return typeof R=="boolean"}r.isBoolean=p;function _(R){return R===null}r.isNull=_;function k(R){return R==null}r.isNullOrUndefined=k;function I(R){return typeof R=="number"}r.isNumber=I;function F(R){return typeof R=="string"}r.isString=F;function q(R){return typeof R=="symbol"}r.isSymbol=q;function j(R){return R===void 0}r.isUndefined=j;function L(R){return C(R)&&x(R)==="[object RegExp]"}r.isRegExp=L,r.types.isRegExp=L;function C(R){return typeof R=="object"&&R!==null}r.isObject=C;function se(R){return C(R)&&x(R)==="[object Date]"}r.isDate=se,r.types.isDate=se;function ne(R){return C(R)&&(x(R)==="[object Error]"||R instanceof Error)}r.isError=ne,r.types.isNativeError=ne;function O(R){return typeof R=="function"}r.isFunction=O;function Z(R){return R===null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||typeof R=="symbol"||typeof R>"u"}r.isPrimitive=Z,r.isBuffer=Cd();function x(R){return Object.prototype.toString.call(R)}function H(R){return R<10?"0"+R.toString(10):R.toString(10)}var ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function W(){var R=new Date,J=[H(R.getHours()),H(R.getMinutes()),H(R.getSeconds())].join(":");return[R.getDate(),ce[R.getMonth()],J].join(" ")}r.log=function(){console.log("%s - %s",W(),r.format.apply(r,arguments))},r.inherits=en,r._extend=function(R,J){if(!J||!C(J))return R;for(var $=Object.keys(J),ie=$.length;ie--;)R[$[ie]]=J[$[ie]];return R};function pe(R,J){return Object.prototype.hasOwnProperty.call(R,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,T=new Promise(function(U,D){ie=U,M=D}),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 o.alloc(0);for(var w=o.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=o.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}(),Cs}var Rs,iu;function Dl(){if(iu)return Rs;iu=1;function r(a,o){var u=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(o?o(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,je.nextTick(i,this,a)):je.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(m){!o&&m?u._writableState?u._writableState.errorEmitted?je.nextTick(t,u):(u._writableState.errorEmitted=!0,je.nextTick(e,u,m)):je.nextTick(e,u,m):o?(je.nextTick(t,u),o(m)):je.nextTick(t,u)}),this)}function e(a,o){i(a,o),t(a)}function t(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.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(a,o){a.emit("error",o)}function s(a,o){var u=a._readableState,l=a._writableState;u&&u.autoDestroy||l&&l.autoDestroy?a.destroy(o):a.emit("error",o)}return Rs={destroy:r,undestroy:n,errorOrDestroy:s},Rs}var Is={},su;function _n(){if(su)return Is;su=1;function r(o,u){o.prototype=Object.create(u.prototype),o.prototype.constructor=o,o.__proto__=u}var e={};function t(o,u,l){l||(l=Error);function f(g,d,y){return typeof u=="string"?u:u(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=o,e[o]=m}function n(o,u){if(Array.isArray(o)){var l=o.length;return o=o.map(function(f){return String(f)}),l>2?"one of ".concat(u," ").concat(o.slice(0,l-1).join(", "),", or ")+o[l-1]:l===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function i(o,u,l){return o.substr(!l||l<0?0:+l,u.length)===u}function s(o,u,l){return(l===void 0||l>o.length)&&(l=o.length),o.substring(l-u.length,l)===u}function a(o,u,l){return typeof l!="number"&&(l=0),l+u.length>o.length?!1:o.indexOf(u,l)!==-1}return t("ERR_INVALID_OPT_VALUE",function(o,u){return'The value "'+u+'" is invalid for option "'+o+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(o,u,l){var f;typeof u=="string"&&i(u,"not ")?(f="must not be",u=u.replace(/^not /,"")):f="must be";var m;if(s(o," argument"))m="The ".concat(o," ").concat(f," ").concat(n(u,"type"));else{var g=a(o,".")?"property":"argument";m='The "'.concat(o,'" ').concat(g," ").concat(f," ").concat(n(u,"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(o){return"The "+o+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" 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(o){return"Unknown encoding: "+o},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Is.codes=e,Is}var Ds,au;function Nl(){if(au)return Ds;au=1;var r=_n().codes.ERR_INVALID_OPT_VALUE;function e(n,i,s){return n.highWaterMark!=null?n.highWaterMark:i?n[s]:null}function t(n,i,s,a){var o=e(i,a,s);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var u=a?s:"highWaterMark";throw new r(u,o)}return Math.floor(o)}return n.objectMode?16:16*1024}return Ds={getHighWaterMark:t},Ds}var Ns,ou;function Id(){if(ou)return Ns;ou=1,Ns=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function s(){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 s}function e(t){try{if(!Ar.localStorage)return!1}catch{return!1}var n=Ar.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return Ns}var Os,uu;function Ol(){if(uu)return Os;uu=1,Os=L;function r(M){var T=this;this.next=null,this.entry=null,this.finish=function(){ie(T,M)}}var e;L.WritableState=q;var t={deprecate:Id()},n=Tl(),i=Li().Buffer,s=Ar.Uint8Array||function(){};function a(M){return i.from(M)}function o(M){return i.isBuffer(M)||M instanceof s}var u=Dl(),l=Nl(),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,I=u.errorOrDestroy;en(L,n);function F(){}function q(M,T,S){e=e||pn(),M=M||{},typeof S!="boolean"&&(S=T 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(T,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 T=this.bufferedRequest,S=[];T;)S.push(T),T=T.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(T){return j.call(this,T)?!0:this!==L?!1:T&&T._writableState instanceof q}})):j=function(T){return T instanceof this};function L(M){e=e||pn();var T=this instanceof e;if(!T&&!j.call(L,this))return new L(M);this._writableState=new q(M,this,T),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(){I(this,new w)};function C(M,T){var S=new _;I(M,S),je.nextTick(T,S)}function se(M,T,S,G){var U;return S===null?U=new p:typeof S!="string"&&!T.objectMode&&(U=new g("chunk",["string","Buffer"],S)),U?(I(M,U),je.nextTick(G,U),!1):!0}L.prototype.write=function(M,T,S){var G=this._writableState,U=!1,D=!G.objectMode&&o(M);return D&&!i.isBuffer(M)&&(M=a(M)),typeof T=="function"&&(S=T,T=null),D?T="buffer":T||(T=G.defaultEncoding),typeof S!="function"&&(S=F),G.ending?C(this,S):(D||se(this,G,M,S))&&(G.pendingcb++,U=O(this,G,D,M,T,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(T){if(typeof T=="string"&&(T=T.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((T+"").toLowerCase())>-1))throw new k(T);return this._writableState.defaultEncoding=T,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ne(M,T,S){return!M.objectMode&&M.decodeStrings!==!1&&typeof T=="string"&&(T=i.from(T,S)),T}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function O(M,T,S,G,U,D){if(!S){var N=ne(T,G,U);G!==N&&(S=!0,U="buffer",G=N)}var ee=T.objectMode?1:G.length;T.length+=ee;var v=T.length>5===6?2:p>>4===14?3:p>>3===30?4:p>>6===2?-1:-2}function a(p,_,k){var I=_.length-1;if(I=0?(F>0&&(p.lastNeed=F-1),F):--I=0?(F>0&&(p.lastNeed=F-2),F):--I=0?(F>0&&(F===2?F=0:p.lastNeed=F-3),F):0))}function o(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 u(p){var _=this.lastTotal-this.lastNeed,k=o(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=a(this,p,_);if(!this.lastNeed)return p.toString("utf8",_);this.lastTotal=k;var I=p.length-(k-this.lastNeed);return p.copy(this.lastChar,0,I),p.toString("utf8",_,I)}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 I=k.charCodeAt(k.length-1);if(I>=55296&&I<=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 Bs}var Ps,hu;function da(){if(hu)return Ps;hu=1;var r=_n().codes.ERR_STREAM_PREMATURE_CLOSE;function e(s){var a=!1;return function(){if(!a){a=!0;for(var o=arguments.length,u=new Array(o),l=0;l0)if(typeof N!="string"&&!A.objectMode&&Object.getPrototypeOf(N)!==n.prototype&&(N=s(N)),v)A.endEmitted?F(D,new p):ne(D,A,N,!0);else if(A.ended)F(D,new w);else{if(A.destroyed)return!1;A.reading=!1,A.decoder&&!ee?(N=A.decoder.write(N),A.objectMode||N.length!==0?ne(D,A,N,!1):X(D,A)):ne(D,A,N,!1)}else v||(A.reading=!1,X(D,A))}return!A.ended&&(A.length=Z?D=Z:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function H(D,N){return D<=0||N.length===0&&N.ended?0:N.objectMode?1:D!==D?N.flowing&&N.length?N.buffer.head.data.length:N.length:(D>N.highWaterMark&&(N.highWaterMark=x(D)),D<=N.length?D:N.ended?N.length:(N.needReadable=!0,0))}C.prototype.read=function(D){u("read",D),D=parseInt(D,10);var N=this._readableState,ee=D;if(D!==0&&(N.emittedReadable=!1),D===0&&N.needReadable&&((N.highWaterMark!==0?N.length>=N.highWaterMark:N.length>0)||N.ended))return u("read: emitReadable",N.length,N.ended),N.length===0&&N.ended?S(this):W(this),null;if(D=H(D,N),D===0&&N.ended)return N.length===0&&S(this),null;var v=N.needReadable;u("need readable",v),(N.length===0||N.length-D0?re=T(D,N):re=null,re===null?(N.needReadable=N.length<=N.highWaterMark,D=0):(N.length-=D,N.awaitDrain=0),N.length===0&&(N.ended||(N.needReadable=!0),ee!==D&&N.ended&&S(this)),re!==null&&this.emit("data",re),re};function ce(D,N){if(u("onEofChunk"),!N.ended){if(N.decoder){var ee=N.decoder.end();ee&&ee.length&&(N.buffer.push(ee),N.length+=N.objectMode?1:ee.length)}N.ended=!0,N.sync?W(D):(N.needReadable=!1,N.emittedReadable||(N.emittedReadable=!0,pe(D)))}}function W(D){var N=D._readableState;u("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(u("emitReadable",N.flowing),N.emittedReadable=!0,je.nextTick(pe,D))}function pe(D){var N=D._readableState;u("emitReadable_",N.destroyed,N.length,N.ended),!N.destroyed&&(N.length||N.ended)&&(D.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,M(D)}function X(D,N){N.readingMore||(N.readingMore=!0,je.nextTick(Te,D,N))}function Te(D,N){for(;!N.reading&&!N.ended&&(N.length1&&U(v.pipes,D)!==-1)&&!B&&(u("false write response, pause",v.awaitDrain),v.awaitDrain++),ee.pause())}function ue(Ne){u("onerror",Ne),Ce(),D.removeListener("error",ue),e(D,"error")===0&&F(D,Ne)}j(D,"error",ue);function we(){D.removeListener("finish",de),Ce()}D.once("close",we);function de(){u("onfinish"),D.removeListener("close",we),Ce()}D.once("finish",de);function Ce(){u("unpipe"),ee.unpipe(D)}return D.emit("pipe",ee),v.flowing||(u("pipe resume"),ee.resume()),D};function V(D){return function(){var ee=D._readableState;u("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&e(D,"data")&&(ee.flowing=!0,M(D))}}C.prototype.unpipe=function(D){var N=this._readableState,ee={hasUnpiped:!1};if(N.pipesCount===0)return this;if(N.pipesCount===1)return D&&D!==N.pipes?this:(D||(D=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,D&&D.emit("unpipe",this,ee),this);if(!D){var v=N.pipes,re=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var A=0;A0,v.flowing!==!1&&this.resume()):D==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,u("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(D,N){var ee=t.prototype.removeListener.call(this,D,N);return D==="readable"&&je.nextTick(R,this),ee},C.prototype.removeAllListeners=function(D){var N=t.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&je.nextTick(R,this),N};function R(D){var N=D._readableState;N.readableListening=D.listenerCount("readable")>0,N.resumeScheduled&&!N.paused?N.flowing=!0:D.listenerCount("data")>0&&D.resume()}function J(D){u("readable nexttick read 0"),D.read(0)}C.prototype.resume=function(){var D=this._readableState;return D.flowing||(u("resume"),D.flowing=!D.readableListening,$(this,D)),D.paused=!1,this};function $(D,N){N.resumeScheduled||(N.resumeScheduled=!0,je.nextTick(ie,D,N))}function ie(D,N){u("resume",N.reading),N.reading||D.read(0),N.resumeScheduled=!1,D.emit("resume"),M(D),N.flowing&&!N.reading&&D.read(0)}C.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function M(D){var N=D._readableState;for(u("flow",N.flowing);N.flowing&&D.read()!==null;);}C.prototype.wrap=function(D){var N=this,ee=this._readableState,v=!1;D.on("end",function(){if(u("wrapped end"),ee.decoder&&!ee.ended){var c=ee.decoder.end();c&&c.length&&N.push(c)}N.push(null)}),D.on("data",function(c){if(u("wrapped data"),ee.decoder&&(c=ee.decoder.write(c)),!(ee.objectMode&&c==null)&&!(!ee.objectMode&&(!c||!c.length))){var h=N.push(c);h||(v=!0,D.pause())}});for(var re in D)this[re]===void 0&&typeof D[re]=="function"&&(this[re]=function(h){return function(){return D[h].apply(D,arguments)}}(re));for(var A=0;A=N.length?(N.decoder?ee=N.buffer.join(""):N.buffer.length===1?ee=N.buffer.first():ee=N.buffer.concat(N.length),N.buffer.clear()):ee=N.buffer.consume(D,N.decoder),ee}function S(D){var N=D._readableState;u("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,je.nextTick(G,N,D))}function G(D,N){if(u("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,N.readable=!1,N.emit("end"),D.autoDestroy)){var ee=N._writableState;(!ee||ee.autoDestroy&&ee.finished)&&N.destroy()}}typeof Symbol=="function"&&(C.from=function(D,N){return I===void 0&&(I=Od()),I(C,D,N)});function U(D,N){for(var ee=0,v=D.length;ee0;return o(_,I,F,function(q){b||(b=q),q&&p.forEach(u),!I&&(p.forEach(u),w(b))})});return d.reduce(l)}return Hs=m,Hs}var pa=ar,ma=la.EventEmitter,Pd=en;Pd(ar,ma);ar.Readable=Fl();ar.Writable=Ol();ar.Duplex=pn();ar.Transform=Bl();ar.PassThrough=Fd();ar.finished=da();ar.pipeline=Bd();ar.Stream=ar;function ar(){ma.call(this)}ar.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",a),t.on("close",o));var s=!1;function a(){s||(s=!0,r.end())}function o(){s||(s=!0,typeof r.destroy=="function"&&r.destroy())}function u(f){if(l(),ma.listenerCount(this,"error")===0)throw f}t.on("error",u),r.on("error",u);function l(){t.removeListener("data",n),r.removeListener("drain",i),t.removeListener("end",a),t.removeListener("close",o),t.removeListener("error",u),r.removeListener("error",u),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(T,S){return new n(T,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(T,S){if(!(this instanceof n))return new n(T,S);var G=this;s(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=!!T,G.noscript=!!(T||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(T){function S(){}S.prototype=T;var G=new S;return G}),Object.keys||(Object.keys=function(T){var S=[];for(var G in T)T.hasOwnProperty(G)&&S.push(G);return S});function i(T){for(var S=Math.max(e.MAX_BUFFER_LENGTH,10),G=0,U=0,D=t.length;US)switch(t[U]){case"textNode":Z(T);break;case"cdata":O(T,"oncdata",T.cdata),T.cdata="";break;case"script":O(T,"onscript",T.script),T.script="";break;default:H(T,"Max buffer length exceeded: "+t[U])}G=Math.max(G,N)}var ee=e.MAX_BUFFER_LENGTH-G;T.bufferCheckPosition=ee+T.position}function s(T){for(var S=0,G=t.length;S"||I(T)}function j(T,S){return T.test(S)}function L(T,S){return!j(T,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(T){var S=e.ENTITIES[T],G=typeof S=="number"?String.fromCharCode(S):S;e.ENTITIES[T]=G});for(var se in e.STATE)e.STATE[e.STATE[se]]=se;C=e.STATE;function ne(T,S,G){T[S]&&T[S](G)}function O(T,S,G){T.textNode&&Z(T),ne(T,S,G)}function Z(T){T.textNode=x(T.opt,T.textNode),T.textNode&&ne(T,"ontext",T.textNode),T.textNode=""}function x(T,S){return T.trim&&(S=S.trim()),T.normalize&&(S=S.replace(/\s+/g," ")),S}function H(T,S){return Z(T),T.trackPosition&&(S+=`
+Line: `+T.line+`
+Column: `+T.column+`
+Char: `+T.c),S=new Error(S),T.error=S,ne(T,"onerror",S),T}function ce(T){return T.sawRoot&&!T.closedRoot&&W(T,"Unclosed root tag"),T.state!==C.BEGIN&&T.state!==C.BEGIN_WHITESPACE&&T.state!==C.TEXT&&H(T,"Unexpected end"),Z(T),T.c="",T.closed=!0,ne(T,"onend"),n.call(T,T.strict,T.opt),T}function W(T,S){if(typeof T!="object"||!(T instanceof n))throw new Error("bad call to strictFail");T.strict&&H(T,S)}function pe(T){T.strict||(T.tagName=T.tagName[T.looseCase]());var S=T.tags[T.tags.length-1]||T,G=T.tag={name:T.tagName,attributes:{}};T.opt.xmlns&&(G.ns=S.ns),T.attribList.length=0,O(T,"onopentagstart",G)}function X(T,S){var G=T.indexOf(":"),U=G<0?["",T]:T.split(":"),D=U[0],N=U[1];return S&&T==="xmlns"&&(D="xmlns",N=""),{prefix:D,local:N}}function Te(T){if(T.strict||(T.attribName=T.attribName[T.looseCase]()),T.attribList.indexOf(T.attribName)!==-1||T.tag.attributes.hasOwnProperty(T.attribName)){T.attribName=T.attribValue="";return}if(T.opt.xmlns){var S=X(T.attribName,!0),G=S.prefix,U=S.local;if(G==="xmlns")if(U==="xml"&&T.attribValue!==d)W(T,"xml: prefix must be bound to "+d+`
+Actual: `+T.attribValue);else if(U==="xmlns"&&T.attribValue!==y)W(T,"xmlns: prefix must be bound to "+y+`
+Actual: `+T.attribValue);else{var D=T.tag,N=T.tags[T.tags.length-1]||T;D.ns===N.ns&&(D.ns=Object.create(N.ns)),D.ns[U]=T.attribValue}T.attribList.push([T.attribName,T.attribValue])}else T.tag.attributes[T.attribName]=T.attribValue,O(T,"onattribute",{name:T.attribName,value:T.attribValue});T.attribName=T.attribValue=""}function V(T,S){if(T.opt.xmlns){var G=T.tag,U=X(T.tagName);G.prefix=U.prefix,G.local=U.local,G.uri=G.ns[U.prefix]||"",G.prefix&&!G.uri&&(W(T,"Unbound namespace prefix: "+JSON.stringify(T.tagName)),G.uri=U.prefix);var D=T.tags[T.tags.length-1]||T;G.ns&&D.ns!==G.ns&&Object.keys(G.ns).forEach(function(z){O(T,"onopennamespace",{prefix:z,uri:G.ns[z]})});for(var N=0,ee=T.attribList.length;N",T.state=C.TEXT;return}if(T.script){if(T.tagName!=="script"){T.script+=""+T.tagName+">",T.tagName="",T.state=C.SCRIPT;return}O(T,"onscript",T.script),T.script=""}var S=T.tags.length,G=T.tagName;T.strict||(G=G[T.looseCase]());for(var U=G;S--;){var D=T.tags[S];if(D.name!==U)W(T,"Unexpected close tag");else break}if(S<0){W(T,"Unmatched closing tag: "+T.tagName),T.textNode+=""+T.tagName+">",T.state=C.TEXT;return}T.tagName=G;for(var N=T.tags.length;N-- >S;){var ee=T.tag=T.tags.pop();T.tagName=T.tag.name,O(T,"onclosetag",T.tagName);var v={};for(var re in ee.ns)v[re]=ee.ns[re];var A=T.tags[T.tags.length-1]||T;T.opt.xmlns&&ee.ns!==A.ns&&Object.keys(ee.ns).forEach(function(c){var h=ee.ns[c];O(T,"onclosenamespace",{prefix:c,uri:h})})}S===0&&(T.closedRoot=!0),T.tagName=T.attribValue=T.attribName="",T.attribList.length=0,T.state=C.TEXT}function J(T){var S=T.entity,G=S.toLowerCase(),U,D="";return T.ENTITIES[S]?T.ENTITIES[S]:T.ENTITIES[G]?T.ENTITIES[G]:(S=G,S.charAt(0)==="#"&&(S.charAt(1)==="x"?(S=S.slice(2),U=parseInt(S,16),D=U.toString(16)):(S=S.slice(1),U=parseInt(S,10),D=U.toString(10))),S=S.replace(/^0+/,""),isNaN(U)||D.toLowerCase()!==S?(W(T,"Invalid character entity"),"&"+T.entity+";"):String.fromCodePoint(U))}function $(T,S){S==="<"?(T.state=C.OPEN_WAKA,T.startTagPosition=T.position):I(S)||(W(T,"Non-whitespace before first tag."),T.textNode=S,T.state=C.TEXT)}function ie(T,S){var G="";return S"?(O(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=C.TEXT):(F(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,O(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=U,U==="["?S.state=C.DOCTYPE_DTD:F(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:F(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=x(S.opt,S.comment),S.comment&&O(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&&O(S,"oncdata",S.cdata),O(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:I(U)?S.state=C.PROC_INST_BODY:S.procInstName+=U;continue;case C.PROC_INST_BODY:if(!S.procInstBody&&I(U))continue;U==="?"?S.state=C.PROC_INST_ENDING:S.procInstBody+=U;continue;case C.PROC_INST_ENDING:U===">"?(O(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:(I(U)||W(S,"Invalid character in tag name"),S.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:U===">"?(V(S,!0),R(S)):(W(S,"Forward-slash in opening tag not followed by >"),S.state=C.ATTRIB);continue;case C.ATTRIB:if(I(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,Te(S),V(S)):I(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(I(U))continue;W(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",O(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(I(U))continue;F(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}Te(S),S.q="",S.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:I(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}Te(S),U===">"?V(S):S.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(S.tagName)U===">"?R(S):j(p,U)?S.tagName+=U:S.script?(S.script+=""+S.tagName,S.tagName="",S.state=C.SCRIPT):(I(U)||W(S,"Invalid tagname in closing tag"),S.state=C.CLOSE_TAG_SAW_WHITE);else{if(I(U))continue;L(b,U)?S.script?(S.script+=""+U,S.state=C.SCRIPT):W(S,"Invalid tagname in closing tag."):S.tagName=U}continue;case C.CLOSE_TAG_SAW_WHITE:if(I(U))continue;U===">"?R(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 T=String.fromCharCode,S=Math.floor,G=function(){var U=16384,D=[],N,ee,v=-1,re=arguments.length;if(!re)return"";for(var A="";++v1114111||S(c)!==c)throw RangeError("Invalid code point: "+c);c<=65535?D.push(c):(c-=65536,N=(c>>10)+55296,ee=c%1024+56320,D.push(N,ee)),(v+1===re||D.length>U)&&(A+=T.apply(null,D),D.length=0)}return A};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G}()})(r)})(fl);var ga={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}},Ld=ga.isArray,wa={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"&&!Ld(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}},Md=fl,Ze=wa,fn=ga.isArray,le,Ue;function Ud(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 zd(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 jd(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 Hd(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 Wd(r){le.ignoreComment||(le.trim&&(r=r.trim()),Zn("comment",r))}function Gd(r){var e=Ue[le.parentKey];le.addParent||delete Ue[le.parentKey],Ue=e}function Vd(r){le.ignoreCdata||(le.trim&&(r=r.trim()),Zn("cdata",r))}function Kd(r){le.ignoreDoctype||(r=r.replace(/^ /,""),le.trim&&(r=r.trim()),Zn("doctype",r))}function qd(r){r.note=r}var Ml=function(r,e){var t=Md.parser(!0,{}),n={};if(Ue=n,le=Ud(e),t.opt={strictEntities:!0},t.onopentag=jd,t.ontext=Hd,t.oncomment=Wd,t.onclosetag=Gd,t.onerror=qd,t.oncdata=Vd,t.ondoctype=Kd,t.onprocessinginstruction=zd,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},bu=wa,Xd=Ml;function Zd(r){var e=bu.copyOptions(r);return bu.ensureSpacesExists(e),e}var Yd=function(r,e){var t,n,i,s;return t=Zd(e),n=Xd(r,t),s="compact"in t&&t.compact?"_parent":"parent","addParent"in t&&t.addParent?i=JSON.stringify(n,function(a,o){return a===s?"_":o},t.spaces):i=JSON.stringify(n,null,t.spaces),i.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},at=wa,Jd=ga.isArray,Pt,Lt;function Qd(r){var e=at.copyOptions(r);return at.ensureFlagExists("ignoreDeclaration",e),at.ensureFlagExists("ignoreInstruction",e),at.ensureFlagExists("ignoreAttributes",e),at.ensureFlagExists("ignoreText",e),at.ensureFlagExists("ignoreComment",e),at.ensureFlagExists("ignoreCdata",e),at.ensureFlagExists("ignoreDoctype",e),at.ensureFlagExists("compact",e),at.ensureFlagExists("indentText",e),at.ensureFlagExists("indentCdata",e),at.ensureFlagExists("indentAttributes",e),at.ensureFlagExists("indentInstruction",e),at.ensureFlagExists("fullTagEmptyElement",e),at.ensureFlagExists("noQuotesForNativeAttributes",e),at.ensureSpacesExists(e),typeof e.spaces=="number"&&(e.spaces=Array(e.spaces+1).join(" ")),at.ensureKeyExists("declaration",e),at.ensureKeyExists("instruction",e),at.ensureKeyExists("attributes",e),at.ensureKeyExists("text",e),at.ensureKeyExists("comment",e),at.ensureKeyExists("cdata",e),at.ensureKeyExists("doctype",e),at.ensureKeyExists("type",e),at.ensureKeyExists("name",e),at.ensureKeyExists("elements",e),e}function Tr(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,s,a,o=[];for(n in r)r.hasOwnProperty(n)&&r[n]!==null&&r[n]!==void 0&&(a=e.noQuotesForNativeAttributes&&typeof r[n]!="string"?"":'"',i=""+r[n],i=i.replace(/"/g,"""),s="attributeNameFn"in e?e.attributeNameFn(n,i,Lt,Pt):n,o.push(e.spaces&&e.indentAttributes?Tr(e,t+1,!1):" "),o.push(s+"="+a+("attributeValueFn"in e?e.attributeValueFn(i,n,Lt,Pt):i)+a));return r&&Object.keys(r).length&&e.spaces&&e.indentAttributes&&o.push(Tr(e,t,!1)),o.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,""+i+Mi(r[n][e.attributesKey],e,t)+"?>";var s=r[n]?r[n]:"";return"instructionFn"in e&&(s=e.instructionFn(s,n,Lt,Pt)),""+i+(s?" "+s:"")+"?>"}function jl(r,e){return e.ignoreComment?"":""}function Hl(r,e){return e.ignoreCdata?"":"","]]]]>"))+"]]>"}function Wl(r,e){return e.ignoreDoctype?"":""}function ya(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 $d(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&&$d(r,e)?`
+`+Array(t+1).join(e.spaces):""),n.push(""+i+">")):n.push("/>"),n.join("")}function Gl(r,e,t,n){return r.reduce(function(i,s){var a=Tr(e,t,n&&!i);switch(s.type){case"element":return i+a+e0(s,e,t);case"comment":return i+a+jl(s[e.commentKey],e);case"doctype":return i+a+Wl(s[e.doctypeKey],e);case"cdata":return i+(e.indentCdata?a:"")+Hl(s[e.cdataKey],e);case"text":return i+(e.indentText?a:"")+ya(s[e.textKey],e);case"instruction":var o={};return o[s[e.nameKey]]=s[e.attributesKey]?s:s[e.instructionKey],i+(e.indentInstruction?a:"")+zl(o,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 t0(r,e,t,n,i){Pt=r,Lt=e;var s="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?"<"+s+">"+s+">":"<"+s+"/>";var a=[];if(e){if(a.push("<"+s),typeof r!="object")return a.push(">"+ya(r,t)+""+s+">"),a.join("");r[t.attributesKey]&&a.push(Mi(r[t.attributesKey],t,n));var o=Vl(r,t,!0)||r[t.attributesKey]&&r[t.attributesKey]["xml:space"]==="preserve";if(o||("fullTagEmptyElementFn"in t?o=t.fullTagEmptyElementFn(e,r):o=t.fullTagEmptyElement),o)a.push(">");else return a.push("/>"),a.join("")}return a.push(Kl(r,t,n+1,!1)),Pt=r,Lt=e,e&&a.push((i?Tr(t,n,!1):"")+""+s+">"),a.join("")}function Kl(r,e,t,n){var i,s,a,o=[];for(s in r)if(r.hasOwnProperty(s))for(a=Jd(r[s])?r[s]:[r[s]],i=0;i{switch(r.type){case void 0:case"element":const e=new l0(r.name,r.attributes),t=r.elements||[];for(const n of t){const i=ba(n);i!==void 0&&e.push(i)}return e;case"text":return r.text;default:return}};class u0 extends Le{}class l0 extends be{static fromXmlString(e){const t=Xl.xml2js(e,{compact:!1});return ba(t)}constructor(e,t){super(e),t&&this.root.push(new u0(t))}push(e){this.root.push(e)}}class c0 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},_u=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),f0=r=>typeof r=="string"?Ql(r):Ui(r),fr=r=>typeof r=="string"?Ql(r):Ui(r),h0=Ui,d0=Ui,p0=r=>r.toISOString();class _e extends be{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new bt({val:t}))}}class Ws extends be{constructor(e,t){super(e),this.root.push(new bt({val:f0(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 _a 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 m0 extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class g0 extends be{constructor(e){super("w:jc"),this.root.push(new m0({val:e}))}}class mt extends be{constructor(e,{color:t,size:n,space:i,style:s}){super(e),this.root.push(new w0({style:s,color:t===void 0?void 0:mn(t),size:n===void 0?void 0:h0(n),space:i===void 0?void 0:d0(i)}))}}class w0 extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{style:"w:val",color:"w:color",size:"w:sz",space:"w:space"})}}const va={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 y0 extends Bi{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 b0 extends be{constructor(){super("w:pBdr");const e=new mt("w:bottom",{color:"auto",space:1,style:va.SINGLE,size:6});this.root.push(e)}}class _0 extends be{constructor({start:e,end:t,left:n,right:i,hanging:s,firstLine:a}){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:s===void 0?void 0:fr(s)},firstLine:{key:"w:firstLine",value:a===void 0?void 0:fr(a)}}))}}let v0=class extends be{constructor(){super("w:br")}};const Ea={BEGIN:"begin",END:"end",SEPARATE:"separate"};class Sa 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 Sa({type:Ea.BEGIN,dirty:e}))}}class bi extends be{constructor(e){super("w:fldChar"),this.root.push(new Sa({type:Ea.SEPARATE,dirty:e}))}}class _i extends be{constructor(e){super("w:fldChar"),this.root.push(new Sa({type:Ea.END,dirty:e}))}}const gn={DEFAULT:"default",PRESERVE:"preserve"};class wn extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{space:"xml:space"})}}let E0=class extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("PAGE")}};class S0 extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("NUMPAGES")}}class T0 extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("SECTIONPAGES")}}class A0 extends be{constructor(){super("w:instrText"),this.root.push(new wn({space:gn.PRESERVE})),this.root.push("SECTION")}}class k0 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 k0({fill:e===void 0?void 0:mn(e),color:t===void 0?void 0:mn(t),type:n}))}}class x0 extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}const C0={DOT:"dot"};class R0 extends be{constructor(e){super("w:em"),this.root.push(new bt({val:e}))}}class I0 extends R0{constructor(e=C0.DOT){super(e)}}class D0 extends be{constructor(e){super("w:spacing"),this.root.push(new bt({val:Zr(e)}))}}class N0 extends be{constructor(e){super("w:color"),this.root.push(new bt({val:mn(e)}))}}class O0 extends be{constructor(e){super("w:highlight"),this.root.push(new bt({val:e}))}}class F0 extends be{constructor(e){super("w:highlightCs"),this.root.push(new bt({val:e}))}}const B0=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 vu extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"})}}class Gs extends be{constructor(e,t){if(super("w:rFonts"),typeof e=="string"){const n=e;this.root.push(new vu({ascii:n,cs:n,eastAsia:n,hAnsi:n,hint:t}))}else{const n=e;this.root.push(new vu(n))}}}let ec=class extends be{constructor(e){super("w:vertAlign"),this.root.push(new bt({val:e}))}};class P0 extends ec{constructor(){super("superscript")}}class L0 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 M0 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 Bi{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 M0(e.underline.type,e.underline.color)),e.effect&&this.push(new hn("w:effect",e.effect)),e.emphasisMark&&this.push(new I0(e.emphasisMark.type)),e.color&&this.push(new N0(e.color)),e.kern&&this.push(new Ws("w:kern",e.kern)),e.position&&this.push(new hn("w:position",e.position)),e.size!==void 0&&this.push(new Ws("w:sz",e.size));const i=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;i&&this.push(new Ws("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 L0),e.superScript&&this.push(new P0),e.style&&this.push(new hn("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(new Gs(e.font)):"name"in e.font?this.push(new Gs(e.font.name,e.font.hint)):this.push(new Gs(e.font))),e.highlight&&this.push(new O0(e.highlight));const s=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;s&&this.push(new F0(s)),e.characterSpacing&&this.push(new D0(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 U0(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 _a("w:w",e.scale)),e.language&&this.push(B0(e.language)),e.math&&this.push(new _e("w:oMath",e.math))}push(e){this.root.push(e)}}class U0 extends be{constructor(e){super("w:rPrChange"),this.root.push(new x0({id:e.id,author:e.author,date:e.date})),this.addChildElement(new tn(e))}}class ta 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},H0=(r=21)=>{let e="",t=r;for(;t--;)e+=z0[Math.random()*64|0];return e};const cr=r=>Math.floor(r*72*20),Ta=(r=0)=>{let e=r;return()=>++e},W0=()=>Ta(),G0=()=>Ta(1),V0=()=>Ta(),K0=()=>H0().toLowerCase(),Wn=r=>j0("1234567890abcdef",r)(),q0=()=>`${Wn(8)}-${Wn(4)}-${Wn(4)}-${Wn(4)}-${Wn(12)}`;class X0 extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class Z0 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 Y0 extends be{constructor({id:e,initials:t,author:n,date:i=new Date,children:s}){super("w:comment"),this.root.push(new X0({id:e,initials:t,author:n,date:i.toISOString()}));for(const a of s)this.root.push(a)}}class J0 extends be{constructor({children:e}){super("w:comments"),this.root.push(new Z0({"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 Y0(t))}}class Q0 extends be{constructor(){super("w:pageBreakBefore")}}const ra={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"};class $0 extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule"})}}class ep extends be{constructor(e){super("w:spacing"),this.root.push(new $0(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 tp extends be{constructor(e){super("w:tabs");for(const t of e)this.root.push(new np(t))}}const Eu={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"};class rp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val",pos:"w:pos",leader:"w:leader"})}}class np extends be{constructor({type:e,position:t,leader:n}){super("w:tab"),this.root.push(new rp({val:e,pos:t,leader:n}))}}class Su extends be{constructor(e,t){super("w:numPr"),this.root.push(new ip(t)),this.root.push(new sp(e))}}class ip 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 sp extends be{constructor(e){super("w:numId"),this.root.push(new bt({val:typeof e=="string"?`{${e}}`:e}))}}class ap extends be{constructor(){super(...arguments),ge(this,"fileChild",Symbol())}}class op extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"})}}const up={EXTERNAL:"External"};class lp extends be{constructor(e,t,n,i){super("Relationship"),this.root.push(new op({id:e,type:t,target:n,targetMode:i}))}}class cp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class fp 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}`},s=new cp(i);this.root.push(s),e.forEach(a=>{this.root.push(a)})}}class hp extends be{constructor(e){super("w:externalHyperlink"),this.options=e}}class dp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class pp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{id:"w:id"})}}class mp{constructor(e){ge(this,"bookmarkUniqueNumericId",V0()),ge(this,"start"),ge(this,"children"),ge(this,"end");const t=this.bookmarkUniqueNumericId();this.start=new gp(e.id,t),this.children=e.children,this.end=new wp(t)}}class gp extends be{constructor(e,t){super("w:bookmarkStart");const n=new dp({name:e,id:t});this.root.push(n)}}class wp extends be{constructor(e){super("w:bookmarkEnd");const t=new pp({id:e});this.root.push(t)}}class yp extends be{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new bt({val:e}))}}class bp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{verticalAlign:"w:val"})}}class _p extends be{constructor(e){super("w:vAlign"),this.root.push(new bp({verticalAlign:e}))}}const dn={DEFAULT:"default",FIRST:"first",EVEN:"even"};class vp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",id:"r:id"})}}const Tu={HEADER:"w:headerReference",FOOTER:"w:footerReference"};class Vs extends be{constructor(e,t){super(e),this.root.push(new vp({type:t.type||dn.DEFAULT,id:`rId${t.id}`}))}}class Ep extends be{constructor({space:e,count:t,separate:n,equalWidth:i,children:s}){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&&s&&s.forEach(a=>this.addChildElement(a))}}class Sp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",linePitch:"w:linePitch",charSpace:"w:charSpace"})}}class Tp extends be{constructor(e,t,n){super("w:docGrid"),this.root.push(new Sp({type:n,linePitch:qt(e),charSpace:t?qt(t):void 0}))}}const Ap=({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 Au extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class kp extends Bi{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new Au({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new Au({})),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 xp extends be{constructor(e,t,n,i,s,a,o){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(s)},footer:{key:"w:footer",value:fr(a)},gutter:{key:"w:gutter",value:fr(o)}}))}}class Cp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{start:"w:start",formatType:"w:fmt",separator:"w:chapSep"})}}class Rp extends be{constructor({start:e,formatType:t,separator:n}){super("w:pgNumType"),this.root.push(new Cp({start:e===void 0?void 0:qt(e),formatType:t,separator:n}))}}const rc={PORTRAIT:"portrait",LANDSCAPE:"landscape"};class Ip extends be{constructor(e,t,n){super("w:pgSz");const i=n===rc.LANDSCAPE,s=fr(e),a=fr(t);this.root.push(new Xn({width:{key:"w:w",value:i?a:s},height:{key:"w:h",value:i?s:a},orientation:{key:"w:orient",value:n}}))}}class Dp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Np extends be{constructor(e){super("w:textDirection"),this.root.push(new Dp({val:e}))}}class Op extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Fp extends be{constructor(e){super("w:type"),this.root.push(new Op({val:e}))}}const qr={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},Ks={WIDTH:11906,HEIGHT:16838,ORIENTATION:rc.PORTRAIT};class Bp extends be{constructor({page:{size:{width:e=Ks.WIDTH,height:t=Ks.HEIGHT,orientation:n=Ks.ORIENTATION}={},margin:{top:i=qr.TOP,right:s=qr.RIGHT,bottom:a=qr.BOTTOM,left:o=qr.LEFT,header:u=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:I,verticalAlign:F,column:q,type:j}={}){super("w:sectPr"),this.addHeaderFooterGroup(Tu.HEADER,p),this.addHeaderFooterGroup(Tu.FOOTER,_),j&&this.root.push(new Fp(j)),this.root.push(new Ip(e,t,n)),this.root.push(new xp(i,s,a,o,u,l,f)),g&&this.root.push(new kp(g)),k&&this.root.push(Ap(k)),this.root.push(new Rp(m)),q&&this.root.push(new Ep(q)),F&&this.root.push(new _p(F)),I!==void 0&&this.root.push(new _e("w:titlePg",I)),d&&this.root.push(new Np(d)),this.root.push(new Tp(y,w,b))}addHeaderFooterGroup(e,t){t.default&&this.root.push(new Vs(e,{type:dn.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(new Vs(e,{type:dn.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(new Vs(e,{type:dn.EVEN,id:t.even.View.ReferenceId}))}}class Pp 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 Bp(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 Lp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class Mp extends be{constructor(e){super("w:background"),this.root.push(new Lp({color:e.color===void 0?void 0:mn(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:_u(e.themeShade),themeTint:e.themeTint===void 0?void 0:_u(e.themeTint)}))}}class Up 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 Pp,e.background&&this.root.push(new Mp(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class zp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns"})}}class vn extends be{constructor(){super("Relationships"),this.root.push(new zp({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}createRelationship(e,t,n,i){const s=new lp(`rId${e}`,t,n,i);return this.root.push(s),s}get RelationshipCount(){return this.root.length-1}}class nc{constructor(e){ge(this,"document"),ge(this,"relationships"),this.document=new Up(e),this.relationships=new vn}get View(){return this.document}get Relationships(){return this.relationships}}class jp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Hp extends be{constructor(){super("w:wordWrap"),this.root.push(new jp({val:0}))}}const Wp=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 Bi{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 Q0),e.frame&&this.push(Wp(e.frame)),e.widowControl!==void 0&&this.push(new _e("w:widowControl",e.widowControl)),e.bullet&&this.push(new Su(1,e.bullet.level)),e.numbering&&(this.numberingReferences.push({reference:e.numbering.reference,instance:(t=e.numbering.instance)!=null?t:0}),this.push(new Su(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))),e.border&&this.push(new y0(e.border)),e.thematicBreak&&this.push(new b0),e.shading&&this.push(new $l(e.shading)),e.wordWrap&&this.push(new Hp),e.overflowPunctuation&&this.push(new _e("w:overflowPunct",e.overflowPunctuation));const i=[...e.rightTabStop!==void 0?[{type:Eu.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:Eu.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(new tp(i)),e.bidirectional!==void 0&&this.push(new _e("w:bidi",e.bidirectional)),e.spacing&&this.push(new ep(e.spacing)),e.indent&&this.push(new _0(e.indent)),e.contextualSpacing!==void 0&&this.push(new _e("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new g0(e.alignment)),e.outlineLevel!==void 0&&this.push(new yp(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 ap{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 Ni(e)),this;if(this.properties=new yn(e),this.root.push(this.properties),e.text&&this.root.push(new Ni(e.text)),e.children)for(const t of e.children){if(t instanceof mp){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 hp){const n=this.root.indexOf(t),i=new fp(t.options.children,K0());e.viewWrapper.Relationships.createRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,up.EXTERNAL),this.root[n]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}const on={style:va.NONE,size:0,color:"auto"},un={style:va.SINGLE,size:4,color:"auto"};class Gp 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",un)),e.left?this.root.push(new mt("w:left",e.left)):this.root.push(new mt("w:left",un)),e.bottom?this.root.push(new mt("w:bottom",e.bottom)):this.root.push(new mt("w:bottom",un)),e.right?this.root.push(new mt("w:right",e.right)):this.root.push(new mt("w:right",un)),e.insideHorizontal?this.root.push(new mt("w:insideH",e.insideHorizontal)):this.root.push(new mt("w:insideH",un)),e.insideVertical?this.root.push(new mt("w:insideV",e.insideVertical)):this.root.push(new mt("w:insideV",un))}}ge(Gp,"NONE",{top:on,bottom:on,left:on,right:on,insideHorizontal:on,insideVertical:on});class Vp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Kp extends be{constructor(){super("Properties"),this.root.push(new Vp({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class qp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns"})}}class Xp 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 Xp({contentType:e,extension:t}))}}class Zp 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 Zp({contentType:e,partName:t}))}}class Yp extends be{constructor(){super("Types"),this.root.push(new qp({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 Jp 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 ku("dcterms:created")),this.root.push(new ku("dcterms:modified"))}}class ku extends be{constructor(e){super(e),this.root.push(new Yn({type:"dcterms:W3CDTF"})),this.root.push(p0(new Date))}}class Qp extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class $p extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{fmtid:"fmtid",pid:"pid",name:"name"})}}class em extends be{constructor(e,t){super("property"),this.root.push(new $p({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new tm(t.value))}}class tm extends be{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class rm extends be{constructor(e){super("Properties"),ge(this,"nextId"),ge(this,"properties",[]),this.root.push(new Qp({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 em(this.nextId++,e))}}class nm 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 im=class extends Zl{constructor(e,t){super("w:ftr",t),ge(this,"refId"),this.refId=e,t||this.root.push(new nm({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 sm{constructor(e,t,n){ge(this,"footer"),ge(this,"relationships"),this.media=e,this.footer=new im(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 am extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class om extends be{constructor(){super("w:footnoteRef")}}class um extends zi{constructor(){super({style:"FootnoteReference"}),this.root.push(new om)}}const xu={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class qs extends be{constructor(e){super("w:footnote"),this.root.push(new am({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 _m({ilvl:qt(e),tentative:1}))}}class xm extends km{}class Cm extends be{constructor(e){super("w:multiLevelType"),this.root.push(new bt({val:e}))}}class Rm extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class Cu extends be{constructor(e,t){super("w:abstractNum"),ge(this,"id"),this.root.push(new Rm({abstractNumId:qt(e),restartNumberingAfterBreak:0})),this.root.push(new Cm("hybridMultilevel")),this.id=e;for(const n of t)this.root.push(new xm(n))}}class Im extends be{constructor(e){super("w:abstractNumId"),this.root.push(new bt({val:e}))}}class Dm extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{numId:"w:numId"})}}class Ru 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 Dm({numId:qt(e.numId)})),this.root.push(new Im(qt(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const t of e.overrideLevels)this.root.push(new Om(t.num,t.start))}}class Nm extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{ilvl:"w:ilvl"})}}class Om extends be{constructor(e,t){super("w:lvlOverride"),this.root.push(new Nm({ilvl:e})),t!==void 0&&this.root.push(new Bm(t))}}class Fm extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Bm extends be{constructor(e){super("w:startOverride"),this.root.push(new Fm({val:e}))}}class Pm 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",W0()),ge(this,"concreteNumUniqueNumericId",G0()),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 Cu(this.abstractNumUniqueNumericId(),[{level:0,format:Rr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:cr(.5),hanging:cr(.25)}}}},{level:1,format:Rr.BULLET,text:"○",alignment:vr.LEFT,style:{paragraph:{indent:{left:cr(1),hanging:cr(.25)}}}},{level:2,format:Rr.BULLET,text:"■",alignment:vr.LEFT,style:{paragraph:{indent:{left:2160,hanging:cr(.25)}}}},{level:3,format:Rr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:2880,hanging:cr(.25)}}}},{level:4,format:Rr.BULLET,text:"○",alignment:vr.LEFT,style:{paragraph:{indent:{left:3600,hanging:cr(.25)}}}},{level:5,format:Rr.BULLET,text:"■",alignment:vr.LEFT,style:{paragraph:{indent:{left:4320,hanging:cr(.25)}}}},{level:6,format:Rr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:5040,hanging:cr(.25)}}}},{level:7,format:Rr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:5760,hanging:cr(.25)}}}},{level:8,format:Rr.BULLET,text:"●",alignment:vr.LEFT,style:{paragraph:{indent:{left:6480,hanging:cr(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new Ru({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 Cu(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 s=this.referenceConfigMap.get(e),a=s&&s[0].start,o={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:t,overrideLevels:[a&&Number.isInteger(a)?{num:0,start:a}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new Ru(o))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class Lm extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{version:"w:val",name:"w:name",uri:"w:uri"})}}class Mm extends be{constructor(e){super("w:compatSetting"),this.root.push(new Lm({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class Um extends be{constructor(e){super("w:compat"),e.version&&this.root.push(new Mm(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 zm 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 jm extends be{constructor(e){var t,n,i,s;super("w:settings"),this.root.push(new zm({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 _a("w:defaultTabStop",e.defaultTabStop)),this.root.push(new Um(qn(Xe({},(t=e.compatibility)!=null?t:{}),{version:(s=(i=(n=e.compatibility)==null?void 0:n.version)!=null?i:e.compatibilityModeVersion)!=null?s:15})))}}class ic extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{val:"w:val"})}}class Hm extends be{constructor(e){super("w:name"),this.root.push(new ic({val:e}))}}class Wm extends be{constructor(e){super("w:uiPriority"),this.root.push(new ic({val:qt(e)}))}}class Gm extends Le{constructor(){super(...arguments),ge(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class sc extends be{constructor(e,t){super("w:style"),this.root.push(new Gm(e)),t.name&&this.root.push(new Hm(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 Wm(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 sc{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 sc{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 Vm extends Ur{constructor(e){super(Xe({id:"Title",name:"Title"},e))}}class Km extends Ur{constructor(e){super(Xe({id:"Heading1",name:"Heading 1"},e))}}class qm extends Ur{constructor(e){super(Xe({id:"Heading2",name:"Heading 2"},e))}}class Xm extends Ur{constructor(e){super(Xe({id:"Heading3",name:"Heading 3"},e))}}class Zm extends Ur{constructor(e){super(Xe({id:"Heading4",name:"Heading 4"},e))}}class Ym extends Ur{constructor(e){super(Xe({id:"Heading5",name:"Heading 5"},e))}}class Jm extends Ur{constructor(e){super(Xe({id:"Heading6",name:"Heading 6"},e))}}class Qm extends Ur{constructor(e){super(Xe({id:"Strong",name:"Strong"},e))}}class $m extends ji{constructor(e){super(Xe({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class eg 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:ra.AUTO}},run:{size:20}},e))}}class tg extends Hi{constructor(e){super(Xe({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class rg extends Hi{constructor(e){super(Xe({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class ng extends Hi{constructor(e){super(Xe({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:tc.SINGLE}}},e))}}class na 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 ig extends be{constructor(e){super("w:pPrDefault"),this.root.push(new yn(e))}}class sg extends be{constructor(e){super("w:rPrDefault"),this.root.push(new tn(e))}}class ag extends be{constructor(e){super("w:docDefaults"),ge(this,"runPropertiesDefaults"),ge(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new sg(e.run),this.paragraphPropertiesDefaults=new ig(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class og{newInstance(e){const t=Xl.xml2js(e,{compact:!1});let n;for(const a of t.elements||[])a.name==="w:styles"&&(n=a);if(n===void 0)throw new Error("can not find styles element");const i=n.elements||[];return new na({initialStyles:new c0(n.attributes),importedStyles:i.map(a=>ba(a))})}}class Iu{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 ag((t=e.document)!=null?t:{}),new Vm(Xe({run:{size:56}},e.title)),new Km(Xe({run:{color:"2E74B5",size:32}},e.heading1)),new qm(Xe({run:{color:"2E74B5",size:26}},e.heading2)),new Xm(Xe({run:{color:"1F4D78",size:24}},e.heading3)),new Zm(Xe({run:{color:"2E74B5",italics:!0}},e.heading4)),new Ym(Xe({run:{color:"2E74B5"}},e.heading5)),new Jm(Xe({run:{color:"1F4D78"}},e.heading6)),new Qm(Xe({run:{bold:!0}},e.strong)),new $m(e.listParagraph||{}),new ng(e.hyperlink||{}),new tg(e.footnoteReference||{}),new eg(e.footnoteText||{}),new rg(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)]:[]]}),ug=({name:r,altName:e,panose1:t,charset:n,family:i,notTrueType:s,pitch:a,sig:o,embedRegular:u,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)]:[],...s?[new _e("w:notTrueType",s)]:[],...a?[Hn("w:pitch",a)]:[],...o?[new Mr({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:o.usb0},usb1:{key:"w:usb1",value:o.usb1},usb2:{key:"w:usb2",value:o.usb2},usb3:{key:"w:usb3",value:o.usb3},csb0:{key:"w:csb0",value:o.csb0},csb1:{key:"w:csb1",value:o.csb1}}})]:[],...u?[Si(u,"w:embedRegular")]:[],...l?[Si(l,"w:embedBold")]:[],...f?[Si(f,"w:embedItalic")]:[],...m?[Si(m,"w:embedBoldItalic")]:[]]}),lg=({name:r,index:e,fontKey:t,characterSet:n})=>ug({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}`}}),cg=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)=>lg({name:e.name,index:t+1,fontKey:e.fontKey}))});class fg{constructor(e){ge(this,"fontTable"),ge(this,"relationships"),ge(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(t=>qn(Xe({},t),{fontKey:q0()})),this.fontTable=cg(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 Ti(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 ac={exports:{}};(function(r,e){(function(t){r.exports=t()})(function(){return function t(n,i,s){function a(l,f){if(!i[l]){if(!n[l]){var m=typeof Ti=="function"&&Ti;if(!f&&m)return m(l,!0);if(o)return o(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 a(w||y)},d,d.exports,t,n,i,s)}return i[l].exports}for(var o=typeof Ti=="function"&&Ti,u=0;u>2,d=(3&l)<<4|f>>4,y=1>6:64,w=2>4,f=(15&g)<<4|(d=o.indexOf(u.charAt(w++)))>>2,m=(3&d)<<6|(y=o.indexOf(u.charAt(w++))),_[b++]=l,d!==64&&(_[b++]=f),y!==64&&(_[b++]=m);return _}},{"./support":30,"./utils":32}],2:[function(t,n,i){var s=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),u=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 a(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("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 a(s.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 o).pipe(new u("uncompressedSize")).pipe(m.compressWorker(g)).pipe(new u("compressedSize")).withStreamInfo("compression",m)},n.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,i){var s=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,i){var s=t("./utils"),a=function(){for(var o,u=[],l=0;l<256;l++){o=l;for(var f=0;f<8;f++)o=1&o?3988292384^o>>>1:o>>>1;u[l]=o}return u}();n.exports=function(o,u){return o!==void 0&&o.length?s.getTypeOf(o)!=="string"?function(l,f,m,g){var d=a,y=g+m;l^=-1;for(var w=g;w>>8^d[255&(l^f[w])];return-1^l}(0|u,o,o.length,0):function(l,f,m,g){var d=a,y=g+m;l^=-1;for(var w=g;w>>8^d[255&(l^f.charCodeAt(w))];return-1^l}(0|u,o,o.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 s=null;s=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:s}},{lie:37}],7:[function(t,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),u=t("./stream/GenericWorker"),l=s?"uint8array":"array";function f(m,g){u.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=g,this.meta={}}i.magic="\b\0",o.inherits(f,u),f.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,m.data),!1)},f.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new a[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 s(d,y){var w,b="";for(w=0;w>>=8;return b}function a(d,y,w,b,p,_){var k,I,F=d.file,q=d.compression,j=_!==l.utf8encode,L=o.transformTo("string",_(F.name)),C=o.transformTo("string",l.utf8encode(F.name)),se=F.comment,ne=o.transformTo("string",_(se)),O=o.transformTo("string",l.utf8encode(se)),Z=C.length!==F.name.length,x=O.length!==se.length,H="",ce="",W="",pe=F.dir,X=F.date,Te={crc32:0,compressedSize:0,uncompressedSize:0};y&&!w||(Te.crc32=d.crc32,Te.compressedSize=d.compressedSize,Te.uncompressedSize=d.uncompressedSize);var V=0;y&&(V|=8),j||!Z&&!x||(V|=2048);var R=0,J=0;pe&&(R|=16),p==="UNIX"?(J=798,R|=function(ie,M){var T=ie;return ie||(T=M?16893:33204),(65535&T)<<16}(F.unixPermissions,pe)):(J=20,R|=function(ie){return 63&(ie||0)}(F.dosPermissions)),k=X.getUTCHours(),k<<=6,k|=X.getUTCMinutes(),k<<=5,k|=X.getUTCSeconds()/2,I=X.getUTCFullYear()-1980,I<<=4,I|=X.getUTCMonth()+1,I<<=5,I|=X.getUTCDate(),Z&&(ce=s(1,1)+s(f(L),4)+C,H+="up"+s(ce.length,2)+ce),x&&(W=s(1,1)+s(f(ne),4)+O,H+="uc"+s(W.length,2)+W);var $="";return $+=`
+\0`,$+=s(V,2),$+=q.magic,$+=s(k,2),$+=s(I,2),$+=s(Te.crc32,4),$+=s(Te.compressedSize,4),$+=s(Te.uncompressedSize,4),$+=s(L.length,2),$+=s(H.length,2),{fileRecord:m.LOCAL_FILE_HEADER+$+L+H,dirRecord:m.CENTRAL_FILE_HEADER+s(J,2)+$+s(ne.length,2)+"\0\0\0\0"+s(R,4)+s(b,4)+L+H+ne}}var o=t("../utils"),u=t("../stream/GenericWorker"),l=t("../utf8"),f=t("../crc32"),m=t("../signature");function g(d,y,w,b){u.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=[]}o.inherits(g,u),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,u.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=a(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=a(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+s(b.crc32,4)+s(b.compressedSize,4)+s(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;u--)l=(l<<8)+this.byteAt(u);return this.index+=o,l},readString:function(o){return s.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},n.exports=a},{"../utils":32}],19:[function(t,n,i){var s=t("./Uint8ArrayReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.readData=function(o){this.checkOffset(o);var u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,i){var s=t("./DataReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,n,i){var s=t("./ArrayReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,i){var s=t("../utils"),a=t("../support"),o=t("./ArrayReader"),u=t("./StringReader"),l=t("./NodeBufferReader"),f=t("./Uint8ArrayReader");n.exports=function(m){var g=s.getTypeOf(m);return s.checkSupport(g),g!=="string"||a.uint8array?g==="nodebuffer"?new l(m):a.uint8array?new f(s.transformTo("uint8array",m)):new o(s.transformTo("array",m)):new u(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 s=t("./GenericWorker"),a=t("../utils");function o(u){s.call(this,"ConvertWorker to "+u),this.destType=u}a.inherits(o,s),o.prototype.processChunk=function(u){this.push({data:a.transformTo(this.destType,u.data),meta:u.meta})},n.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,i){var s=t("./GenericWorker"),a=t("../crc32");function o(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,s),o.prototype.processChunk=function(u){this.streamInfo.crc32=a(u.data,this.streamInfo.crc32||0),this.push(u)},n.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,i){var s=t("../utils"),a=t("./GenericWorker");function o(u){a.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}s.inherits(o,a),o.prototype.processChunk=function(u){if(u){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+u.data.length}a.prototype.processChunk.call(this,u)},n.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,i){var s=t("../utils"),a=t("./GenericWorker");function o(u){a.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(f){l.dataIsReady=!0,l.data=f,l.max=f&&f.length||0,l.type=s.getTypeOf(f),l.isPaused||l._tickAndRepeat()},function(f){l.error(f)})}s.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,l);break;case"uint8array":u=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":u=this.data.slice(this.index,l)}return this.index=l,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,i){function s(a){this.name=a||"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}s.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var u=0;u "+a:a}},n.exports=s},{}],29:[function(t,n,i){var s=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),u=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,I=y._outputType,F=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 s.newBlob(s.transformTo("arraybuffer",L),C);case"base64":return u.encode(L);default:return s.transformTo(j,L)}}(I,function(j,L){var C,se=0,ne=null,O=0;for(C=0;C"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(s),i.blob=a.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 s=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),u=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(){u.call(this,"utf-8 decode"),this.leftOver=null}function g(){u.call(this,"utf-8 encode")}i.utf8encode=function(d){return a.nodebuffer?o.newBufferFrom(d,"utf-8"):function(y){var w,b,p,_,k,I=y.length,F=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 a.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):function(y){var w,b,p,_,k=y.length,I=new Array(2*k);for(w=b=0;w>10&1023,I[b++]=56320|1023&p)}return I.length!==b&&(I.subarray?I=I.subarray(0,b):I.length=b),s.applyFromCharCode(I)}(d=s.transformTo(a.uint8array?"uint8array":"array",d))},s.inherits(m,u),m.prototype.processChunk=function(d){var y=s.transformTo(a.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(a.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 I;for((k=k||_.length)>_.length&&(k=_.length),I=k-1;0<=I&&(192&_[I])==128;)I--;return I<0||I===0?k:I+l[_[I]]>k?I:k}(y),p=y;b!==y.length&&(a.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,s.inherits(g,u),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 s=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),u=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=s(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===a.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 s.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+u[m[d]]>g?d:g}},{"./common":41}],43:[function(t,n,i){n.exports=function(s,a,o,u){for(var l=65535&s|0,f=s>>>16&65535|0,m=0;o!==0;){for(o-=m=2e3>>1:a>>>1;o[u]=a}return o}();n.exports=function(a,o,u,l){var f=s,m=l+u;a^=-1;for(var g=l;g>>8^f[255&(a^o[g])];return-1^a}},{}],46:[function(t,n,i){var s,a=t("../utils/common"),o=t("./trees"),u=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,I=286,F=30,q=19,j=2*I+1,L=15,C=3,se=258,ne=se+C+1,O=42,Z=113,x=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&&(A=v.avail_out),A!==0&&(a.arraySet(v.output,re.pending_buf,re.pending_out,A,v.next_out),v.next_out+=A,re.pending_out+=A,v.total_out+=A,v.avail_out-=A,re.pending-=A,re.pending===0&&(re.pending_out=0))}function R(v,re){o._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 A,c,h=v.max_chain_length,E=v.strstart,B=v.prev_length,K=v.nice_match,z=v.strstart>v.w_size-ne?v.strstart-(v.w_size-ne):0,ue=v.window,we=v.w_mask,de=v.prev,Ce=v.strstart+se,Ne=ue[E+B-1],te=ue[E+B];v.prev_length>=v.good_match&&(h>>=2),K>v.lookahead&&(K=v.lookahead);do if(ue[(A=re)+B]===te&&ue[A+B-1]===Ne&&ue[A]===ue[E]&&ue[++A]===ue[E+1]){E+=2,A++;do;while(ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&ue[++E]===ue[++A]&&Ez&&--h!=0);return B<=v.lookahead?B:v.lookahead}function M(v){var re,A,c,h,E,B,K,z,ue,we,de=v.w_size;do{if(h=v.window_size-v.lookahead-v.strstart,v.strstart>=de+(de-ne)){for(a.arraySet(v.window,v.window,de,de,0),v.match_start-=de,v.strstart-=de,v.block_start-=de,re=A=v.hash_size;c=v.head[--re],v.head[re]=de<=c?c-de:0,--A;);for(re=A=de;c=v.prev[--re],v.prev[re]=de<=c?c-de:0,--A;);h+=de}if(v.strm.avail_in===0)break;if(B=v.strm,K=v.window,z=v.strstart+v.lookahead,ue=h,we=void 0,we=B.avail_in,ue=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=o._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=o._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&&(A=v.pending_buf_size-5);;){if(v.lookahead<=1){if(M(v),v.lookahead===0&&re===m)return x;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var c=v.block_start+A;if((v.strstart===0||v.strstart>=c)&&(v.lookahead=v.strstart-c,v.strstart=c,R(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-ne&&(R(v,!1),v.strm.avail_out===0))return x}return v.insert=0,re===g?(R(v,!0),v.strm.avail_out===0?ce:W):(v.strstart>v.block_start&&(R(v,!1),v.strm.avail_out),x)}),new G(4,4,8,4,T),new G(4,5,16,8,T),new G(4,6,32,32,T),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=N,i.deflateResetKeep=D,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 A,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 B=_+(c.w_bits-8<<4)<<8;B|=(2<=c.strategy||c.level<2?0:c.level<6?1:c.level===6?2:3)<<6,c.strstart!==0&&(B|=32),B+=31-B%31,c.status=Z,$(c,B),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(A)&&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,ue){for(var we;;){if(z.lookahead===0&&(M(z),z.lookahead===0)){if(ue===m)return x;break}if(z.match_length=0,we=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,we&&(R(z,!1),z.strm.avail_out===0))return x}return z.insert=0,ue===g?(R(z,!0),z.strm.avail_out===0?ce:W):z.last_lit&&(R(z,!1),z.strm.avail_out===0)?x:H}(c,re):c.strategy===3?function(z,ue){for(var we,de,Ce,Ne,te=z.window;;){if(z.lookahead<=se){if(M(z),z.lookahead<=se&&ue===m)return x;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=o._tr_tally(z,1,z.match_length-C),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(we=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),we&&(R(z,!1),z.strm.avail_out===0))return x}return z.insert=0,ue===g?(R(z,!0),z.strm.avail_out===0?ce:W):z.last_lit&&(R(z,!1),z.strm.avail_out===0)?x:H}(c,re):s[c.level].func(c,re);if(K!==ce&&K!==W||(c.status=666),K===x||K===ce)return v.avail_out===0&&(c.last_flush=-1),d;if(K===H&&(re===1?o._tr_align(c):re!==5&&(o._tr_stored_block(c,0,0,!1),re===3&&(Te(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=A.w_size&&(E===0&&(Te(A.head),A.strstart=0,A.block_start=0,A.insert=0),ue=new a.Buf8(A.w_size),a.arraySet(ue,re,we-A.w_size,A.w_size,0),re=ue,we=A.w_size),B=v.avail_in,K=v.next_in,z=v.input,v.avail_in=we,v.next_in=0,v.input=re,M(A);A.lookahead>=C;){for(c=A.strstart,h=A.lookahead-(C-1);A.ins_h=(A.ins_h<>>=C=L>>>24,k-=C,(C=L>>>16&255)===0)H[f++]=65535&L;else{if(!(16&C)){if(!(64&C)){L=I[(65535&L)+(_&(1<>>=C,k-=C),k<15&&(_+=x[u++]<>>=C=L>>>24,k-=C,!(16&(C=L>>>16&255))){if(!(64&C)){L=F[(65535&L)+(_&(1<>>=C,k-=C,(C=f-m)>3,_&=(1<<(k-=se<<3))-1,s.next_in=u,s.next_out=f,s.avail_in=u>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<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 s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(O){var Z;return O&&O.state?(Z=O.state,O.total_in=O.total_out=Z.total=0,O.msg="",Z.wrap&&(O.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 s.Buf32(w),Z.distcode=Z.distdyn=new s.Buf32(b),Z.sane=1,Z.back=-1,g):d}function I(O){var Z;return O&&O.state?((Z=O.state).wsize=0,Z.whave=0,Z.wnext=0,k(O)):d}function F(O,Z){var x,H;return O&&O.state?(H=O.state,Z<0?(x=0,Z=-Z):(x=1+(Z>>4),Z<48&&(Z&=15)),Z&&(Z<8||15=W.wsize?(s.arraySet(W.window,Z,x-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(H<(ce=W.wsize-W.wnext)&&(ce=H),s.arraySet(W.window,Z,x-H,ce,W.wnext),(H-=ce)?(s.arraySet(W.window,Z,x-H,H,0),W.wnext=H,W.whave=W.wsize):(W.wnext+=ce,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,x.check=o(x.check,E,2,0),R=V=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&V)<<8)+(V>>8))%31){O.msg="incorrect header check",x.mode=30;break}if((15&V)!=8){O.msg="unknown compression method",x.mode=30;break}if(R-=4,v=8+(15&(V>>>=4)),x.wbits===0)x.wbits=v;else if(v>x.wbits){O.msg="invalid window size",x.mode=30;break}x.dmax=1<>8&1),512&x.flags&&(E[0]=255&V,E[1]=V>>>8&255,x.check=o(x.check,E,2,0)),R=V=0,x.mode=3;case 3:for(;R<32;){if(X===0)break e;X--,V+=H[W++]<>>8&255,E[2]=V>>>16&255,E[3]=V>>>24&255,x.check=o(x.check,E,4,0)),R=V=0,x.mode=4;case 4:for(;R<16;){if(X===0)break e;X--,V+=H[W++]<>8),512&x.flags&&(E[0]=255&V,E[1]=V>>>8&255,x.check=o(x.check,E,2,0)),R=V=0,x.mode=5;case 5:if(1024&x.flags){for(;R<16;){if(X===0)break e;X--,V+=H[W++]<>>8&255,x.check=o(x.check,E,2,0)),R=V=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(X<(ie=x.length)&&(ie=X),ie&&(x.head&&(v=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),s.arraySet(x.head.extra,H,W,ie,v)),512&x.flags&&(x.check=o(x.check,H,ie,W)),X-=ie,W+=ie,x.length-=ie),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(X===0)break e;for(ie=0;v=H[W+ie++],x.head&&v&&x.length<65536&&(x.head.name+=String.fromCharCode(v)),v&&ie>9&1,x.head.done=!0),O.adler=x.check=0,x.mode=12;break;case 10:for(;R<32;){if(X===0)break e;X--,V+=H[W++]<>>=7&R,R-=7&R,x.mode=27;break}for(;R<3;){if(X===0)break e;X--,V+=H[W++]<>>=1)){case 0:x.mode=14;break;case 1:if(se(x),x.mode=20,Z!==6)break;V>>>=2,R-=2;break e;case 2:x.mode=17;break;case 3:O.msg="invalid block type",x.mode=30}V>>>=2,R-=2;break;case 14:for(V>>>=7&R,R-=7&R;R<32;){if(X===0)break e;X--,V+=H[W++]<>>16^65535)){O.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&V,R=V=0,x.mode=15,Z===6)break e;case 15:x.mode=16;case 16:if(ie=x.length){if(X>>=5,R-=5,x.ndist=1+(31&V),V>>>=5,R-=5,x.ncode=4+(15&V),V>>>=4,R-=4,286>>=3,R-=3}for(;x.have<19;)x.lens[B[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,A={bits:x.lenbits},re=l(0,x.lens,0,19,x.lencode,0,x.work,A),x.lenbits=A.bits,re){O.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have>>16&255,U=65535&h,!((S=h>>>24)<=R);){if(X===0)break e;X--,V+=H[W++]<>>=S,R-=S,x.lens[x.have++]=U;else{if(U===16){for(c=S+2;R>>=S,R-=S,x.have===0){O.msg="invalid bit length repeat",x.mode=30;break}v=x.lens[x.have-1],ie=3+(3&V),V>>>=2,R-=2}else if(U===17){for(c=S+3;R>>=S)),V>>>=3,R-=3}else{for(c=S+7;R>>=S)),V>>>=7,R-=7}if(x.have+ie>x.nlen+x.ndist){O.msg="invalid bit length repeat",x.mode=30;break}for(;ie--;)x.lens[x.have++]=v}}if(x.mode===30)break;if(x.lens[256]===0){O.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,A={bits:x.lenbits},re=l(f,x.lens,0,x.nlen,x.lencode,0,x.work,A),x.lenbits=A.bits,re){O.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,A={bits:x.distbits},re=l(m,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,A),x.distbits=A.bits,re){O.msg="invalid distances set",x.mode=30;break}if(x.mode=20,Z===6)break e;case 20:x.mode=21;case 21:if(6<=X&&258<=Te){O.next_out=pe,O.avail_out=Te,O.next_in=W,O.avail_in=X,x.hold=V,x.bits=R,u(O,$),pe=O.next_out,ce=O.output,Te=O.avail_out,W=O.next_in,H=O.input,X=O.avail_in,V=x.hold,R=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;G=(h=x.lencode[V&(1<>>16&255,U=65535&h,!((S=h>>>24)<=R);){if(X===0)break e;X--,V+=H[W++]<>D)])>>>16&255,U=65535&h,!(D+(S=h>>>24)<=R);){if(X===0)break e;X--,V+=H[W++]<>>=D,R-=D,x.back+=D}if(V>>>=S,R-=S,x.back+=S,x.length=U,G===0){x.mode=26;break}if(32&G){x.back=-1,x.mode=12;break}if(64&G){O.msg="invalid literal/length code",x.mode=30;break}x.extra=15&G,x.mode=22;case 22:if(x.extra){for(c=x.extra;R>>=x.extra,R-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;G=(h=x.distcode[V&(1<>>16&255,U=65535&h,!((S=h>>>24)<=R);){if(X===0)break e;X--,V+=H[W++]<>D)])>>>16&255,U=65535&h,!(D+(S=h>>>24)<=R);){if(X===0)break e;X--,V+=H[W++]<>>=D,R-=D,x.back+=D}if(V>>>=S,R-=S,x.back+=S,64&G){O.msg="invalid distance code",x.mode=30;break}x.offset=U,x.extra=15&G,x.mode=24;case 24:if(x.extra){for(c=x.extra;R>>=x.extra,R-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){O.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(Te===0)break e;if(ie=$-Te,x.offset>ie){if((ie=x.offset-ie)>x.whave&&x.sane){O.msg="invalid distance too far back",x.mode=30;break}M=ie>x.wnext?(ie-=x.wnext,x.wsize-ie):x.wnext-ie,ie>x.length&&(ie=x.length),T=x.window}else T=ce,M=pe-x.offset,ie=x.length;for(Tej?(C=M[T+b[Z]],R[J+b[Z]]):(C=96,0),_=1<>pe)+(k-=_)]=L<<24|C<<16|se|0,k!==0;);for(_=1<>=1;if(_!==0?(V&=_-1,V+=_):V=0,Z++,--$[O]==0){if(O===H)break;O=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,B){h.bi_valid>p-B?(h.bi_buf|=E<>p-h.bi_valid,h.bi_valid+=B-p):(h.bi_buf|=E<>>=1,B<<=1,0<--E;);return B>>>1}function T(h,E,B){var K,z,ue=new Array(b+1),we=0;for(K=1;K<=b;K++)ue[K]=we=we+B[K-1]<<1;for(z=0;z<=E;z++){var de=h[2*z+1];de!==0&&(h[2*z]=M(ue[de]++,de))}}function S(h){var E;for(E=0;E>1;1<=B;B--)D(h,ue,B);for(z=Ce;B=h.heap[1],h.heap[1]=h.heap[h.heap_len--],D(h,ue,1),K=h.heap[1],h.heap[--h.heap_max]=B,h.heap[--h.heap_max]=K,ue[2*z]=ue[2*B]+ue[2*K],h.depth[z]=(h.depth[B]>=h.depth[K]?h.depth[B]:h.depth[K])+1,ue[2*B+1]=ue[2*K+1]=z,h.heap[1]=z++,D(h,ue,1),2<=h.heap_len;);h.heap[--h.heap_max]=h.heap[1],function(te,ke){var Oe,xe,Fe,Se,Ie,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,Oe=te.heap_max+1;Oe>=7;z>>=1)if(1&Ne&&de.dyn_ltree[2*Ce]!==0)return a;if(de.dyn_ltree[18]!==0||de.dyn_ltree[20]!==0||de.dyn_ltree[26]!==0)return o;for(Ce=32;Ce>>3,(ue=h.static_len+3+7>>>3)<=z&&(z=ue)):z=ue=B+5,B+4<=z&&E!==-1?c(h,E,B,K):h.strategy===4||ue===z?($(h,2+(K?1:0),3),N(h,ne,O)):($(h,4+(K?1:0),3),function(de,Ce,Ne,te){var ke;for($(de,Ce-257,5),$(de,Ne-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&B,h.last_lit++,E===0?h.dyn_ltree[2*B]++:(h.matches++,E--,h.dyn_ltree[2*(x[B]+m+1)]++,h.dyn_dtree[2*R(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(s){(function(a,o){if(!a.setImmediate){var u,l,f,m,g=1,d={},y=!1,w=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,u={}.toString.call(a.process)==="[object process]"?function(I){je.nextTick(function(){_(I)})}:function(){if(a.postMessage&&!a.importScripts){var I=!0,F=a.onmessage;return a.onmessage=function(){I=!1},a.postMessage("","*"),a.onmessage=F,I}}()?(m="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",k,!1):a.attachEvent("onmessage",k),function(I){a.postMessage(m+I,"*")}):a.MessageChannel?((f=new MessageChannel).port1.onmessage=function(I){_(I.data)},function(I){f.port2.postMessage(I)}):w&&"onreadystatechange"in w.createElement("script")?(l=w.documentElement,function(I){var F=w.createElement("script");F.onreadystatechange=function(){_(I),F.onreadystatechange=null,l.removeChild(F),F=null},l.appendChild(F)}):function(I){setTimeout(_,0,I)},b.setImmediate=function(I){typeof I!="function"&&(I=new Function(""+I));for(var F=new Array(arguments.length-1),q=0;q"u"?s===void 0?this:s:self)}).call(this,typeof Ar<"u"?Ar:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ac);var dg=ac.exports;const pg=cl(dg);var Oi={exports:{}},mg={"&":"&",'"':""","'":"'","<":"<",">":">"};function gg(r){return r&&r.replace?r.replace(/([&"<>'])/g,function(e,t){return mg[t]}):r}var wg=gg,ia=wg,Du=pa.Stream,yg=" ";function bg(r,e){typeof e!="object"&&(e={indent:e});var t=e.stream?new Du:null,n="",i=!1,s=e.indent?e.indent===!0?yg:e.indent:"",a=!0;function o(g){a?je.nextTick(g):g()}function u(g,d){if(d!==void 0&&(n+=d),g&&!i&&(t=t||new Du,i=!0),g&&i){var y=n;o(function(){t.emit("data",y)}),n=""}}function l(g,d){Aa(u,Fi(g,s,s?1:0),d)}function f(){if(t){var g=n;o(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 o(function(){a=!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 _g(){var r=Array.prototype.slice.call(arguments),e={_elem:Fi(r)};return e.push=function(t){if(!this.append)throw new Error("not assigned to a parent!");var n=this,i=this._elem.indent;Aa(this.append,Fi(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 vg(r,e){return new Array(e||0).join(r||"")}function Fi(r,e,t){t=t||0;var n=vg(e,t),i,s=r,a=!1;if(typeof r=="object"){var o=Object.keys(r);if(i=o[0],s=r[i],s&&s._elem)return s._elem.name=i,s._elem.icount=t,s._elem.indent=e,s._elem.indents=n,s._elem.interrupt=s,s._elem}var u=[],l=[],f;function m(g){var d=Object.keys(g);d.forEach(function(y){u.push(Eg(y,g[y]))})}switch(typeof s){case"object":if(s===null)break;s._attr&&m(s._attr),s._cdata&&l.push(("/g,"]]]]>")+"]]>"),s.forEach&&(f=!1,l.push(""),s.forEach(function(g){if(typeof g=="object"){var d=Object.keys(g)[0];d=="_attr"?m(g._attr):l.push(Fi(g,e,t+1))}else l.pop(),f=!0,l.push(ia(g))}),f||l.push(""));break;default:l.push(ia(s))}return{name:i,interrupt:a,attributes:u,content:l,icount:t,indents:n,indent:e}}function Aa(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 a=e.content.shift();if(a!==void 0){if(s(a))return;Aa(r,a)}}r(!1,(n>1?e.indents:"")+(e.name?""+e.name+">":"")+(e.indent&&!t?`
+`:"")),t&&t()}function s(a){return a.interrupt?(a.interrupt.append=r,a.interrupt.end=i,a.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?`
+`:"");s(e)||i()}function Eg(r,e){return r+'="'+ia(e)+'"'}Oi.exports=bg;Oi.exports.element=Oi.exports.Element=_g;var Sg=Oi.exports;const yt=cl(Sg),Nu=0,Ou=32,Tg=32,Ag=(r,e)=>{const t=e.replace(/-/g,"");if(t.length!==Tg)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const i=t.replace(/(..)/g,"$1 ").trim().split(" ").map(u=>parseInt(u,16));i.reverse();const a=r.slice(Nu,Ou).map((u,l)=>u^i[l%i.length]);return Buffer.concat([r.slice(0,Nu),a,r.slice(Ou)])};class kg{format(e,t={stack:[]}){const n=e.prepForXml(t);if(n)return n;throw Error("XMLComponent did not format correctly")}}class xg{replace(e,t,n){let i=e;return t.forEach((s,a)=>{i=i.replace(new RegExp(`{${s.fileName}}`,"g"),(n+a).toString())}),i}getMediaData(e,t){return t.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class Cg{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 Rg{constructor(){ge(this,"formatter"),ge(this,"imageReplacer"),ge(this,"numberingReplacer"),this.formatter=new kg,this.imageReplacer=new xg,this.numberingReplacer=new Cg}compile(e,t){const n=new pg,i=this.xmlifyFile(e,t),s=new Map(Object.entries(i));for(const[,a]of s)if(Array.isArray(a))for(const o of a)n.file(o.path,o.data);else n.file(a.path,a.data);for(const{stream:a,fileName:o}of e.Media.Array)n.file(`word/media/${o}`,a);for(const{data:a,name:o,fontKey:u}of e.FontTable.fontOptionsWithKey){const[l]=o.split(".");n.file(`word/fonts/${l}.odttf`,Ag(a,u))}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"}}),s=this.imageReplacer.getMediaData(i,e.Media);return{Relationships:{data:(s.forEach((a,o)=>{e.Document.Relationships.createRelationship(n+o,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${a.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 a=this.imageReplacer.replace(i,s,n);return this.numberingReplacer.replace(a,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const a=yt(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(a,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((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(u,e.Media).forEach((f,m)=>{a.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${f.fileName}`)}),{data:yt(this.formatter.format(a.Relationships,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${o+1}.xml.rels`}}),FooterRelationships:e.Footers.map((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(u,e.Media).forEach((f,m)=>{a.Relationships.createRelationship(m,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${f.fileName}`)}),{data:yt(this.formatter.format(a.Relationships,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${o+1}.xml.rels`}}),Headers:e.Headers.map((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),l=this.imageReplacer.getMediaData(u,e.Media),f=this.imageReplacer.replace(u,l,0);return{data:this.numberingReplacer.replace(f,e.Numbering.ConcreteNumbering),path:`word/header${o+1}.xml`}}),Footers:e.Footers.map((a,o)=>{const u=yt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),l=this.imageReplacer.getMediaData(u,e.Media),f=this.imageReplacer.replace(u,l,0);return{data:this.numberingReplacer.replace(f,e.Numbering.ConcreteNumbering),path:`word/footer${o+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 Ig={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},Gn=r=>r===!0?Ig.WITH_2_BLANKS:r===!1?void 0:r;class oc{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 pa.Stream;return this.compiler.compile(e,Gn(t)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(s=>{n.emit("data",s),n.emit("end")}),n}}ge(oc,"compiler",new Rg);var Vn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var uc={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(){u(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 s(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 a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Vn=="object"&&Vn.global===Vn?Vn:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(l,f,m){var g=a.URL||a.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?s(d):i(d.href)?n(l,f,m):s(d,d.target="_blank")):(d.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(d.href)},4e4),setTimeout(function(){s(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(){s(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(a.HTMLElement)||a.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||d&&y||o)&&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=a.URL||a.webkitURL,_=p.createObjectURL(l);g?g.location=_:location.href=_,g=null,setTimeout(function(){p.revokeObjectURL(_)},4e4)}});a.saveAs=u.saveAs=u,r.exports=u})})(uc);var Ng=uc.exports;const Og=Dg(Ng),{saveAs:Fg}=Og;class Bg{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,""),s=l=>i(n(l)).split(`
+`).map(f=>new nr({children:[new Ni({text:f,font:"Calibri"})],spacing:{line:276}})),a=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 Ni({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"}),...s(e.userRequest)),t.push(new nr({text:"Ответ системы:",heading:Kr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...s(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"}),...s(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"}),...s(f.text))})),t.push(new nr({text:"Параметры запроса:",heading:Kr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...a(e.uiSettings));const o=new hg({sections:[{properties:{},children:t}]}),u=()=>{const l=new Date,f=l.toISOString().slice(0,10),m=l.toTimeString().slice(0,8).replace(/:/g,"-");return`Document_${f}_${m}.docx`};oc.toBlob(o).then(l=>{Fg(l,u())})}}const Pg="66d6a6c5ac59a1dde4b24a6e",Lg=`Ты профессиональный юрист. Твоя задача – дать верный ответ на поставленный тебе вопрос(ы) или предоставить информацию, если пользователю нужна консультация или разъяснение. Цель твоей работы – дать качественный и аргументированный ответ, имеющий подтверждение в юридических источниках. Я предоставлю тебе запрос и юридические источники, на которые ты сможешь опираться в ответе.
+Основные правила, которым ты всегда следуешь:
+- Ответ должен быть формальным, содержательным и точным.
+- Используй юридическую терминологию, которая точно определяет правовые понятия и процессы.
+- Подписывай используемые источники рядом с местом, где ты их использовал.
+- Подписывай источники их названием, а не номером очередности, который мы тебе даём. Не пиши слово 'источник' и номер после него - эта информация для тебя.
+- Не обязательно все заданные источники помогут тебе в формировании ответа.
+- Используй официально-деловой стиль.
+- Отвечай только на русском языке.
+- Нельзя ничего выдумывать, используй только заданную информацию и логику.
+- Ты можешь рассуждать логическими шагами на основе предоставленных юридических источниках по конкретному запросу.
+- Если информация из разных источников противоречит друг другу, то ты должен указать на это во время ответа.
+- Если цитируешь источник, то не искажай информацию.
+- Не нужно после ответа перечислять все источники, на которые ты опираешься.
+Ты действуешь по плану.
+1) Прочитай запрос. Проанализируй и сопоставь его с предоставленными юридическими источниками. Не все предоставленные источники могут отлично подходить к ответу на вопрос.
+2) Начни составлять ответ с рассуждений. Для этого выпиши, не искажая, самые подходящие запросу юридические нормы и ссылки на соответствующие статьи законов, постановления, прецеденты и другие источники. При выписывании не пиши 'Источник 0' и подобное, это информация для тебя - название источника следует после этой подписи. Используй только те предоставленные тебе источники, которые лучше всего подходят для ответа на запрос. Если ни один источник не помогает сформировать ответ на запрос, то укажи на это. Следуй основным правилам при написании.
+3) Прочитай запрос ещё раз. Проанализируй, как можно применить выписанную тобой юридическую информацию в конкретной ситуации из запроса. Напиши по шагам твои логические рассуждения по этой ситуации. Старайся не выдумывать информацию, используй только логику. Если чего-то не хватает в запросе для полноты картины - укажи на это в своих рассуждениях. Не нужно писать использованные источники в конце рассуждений. Следуй основным правилам при написании.
+4) Подведи итог. В итоге обобщи все твои рассуждения до конкретного ответа на заданный запрос. Итог должен отвечать на все поставленные вопросы в полной мере. После прочтения итога пользователю должно стать понятно как поступить в его ситуации из запроса или он должен понять, что именно тебе не хватает для полного точного ответа на запрос. Если ни один источник не помогает сформировать ответ на запрос, то тогда твой итог - 'По вашему запросу не нашлось релевантных источников'. Следуй основным правилам при написании.
+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%. Не больше, это же ясень.
+####
+Вывод:
+По вашему запросу сообщаем:
+Рассуждения:
+Согласно п.1 ст. 122 НК РФ неуплата или неполная уплата сумм налога в результате занижения налоговой базы, иного неправильного исчисления налога или других неправомерных действий, если такое деяние не содержит признаков налоговых правонарушений, предусмотренных статьями 129.3 и 129.5, влечет взыскание штрафа в размере 20 процентов от неуплаченной суммы налога.
+Конкретно в вашей ситуации возможные нарушения Иванова И.И. подходят под п.1 ст. 122 НК РФ, если нет признаков нарушений, предусмотренных статьями 129.3 и 129.5 НК РФ. Это значит, что нарушения Иванова И.И. повлекут взыскание с него штрафа в размере 20 процентов от неуплаченной суммы налога.
+
+Итог:
+На Иванова И.И., согласно п.1 ст. 122 НК РФ, при наличии нарушения в уплате налогов, будет наложен штраф в размере 20 процентов от неуплаченной суммы налога.
+
+Конец ответа.
+####
+Далее будет настоящий запрос
+####
+Запрос: {{ВОПРОС}}
+Юридические источники: {{ИСТОЧНИКИ}}
+####
+Вывод:
+`;function Fu(r){let e,t;return e=new ih({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 s={};i[0]&1024&&(s.status=n[10]),e.$set(s)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Bu(r){let e,t;return e=new oh({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 s={};i[0]&2048&&(s.status=n[11]),e.$set(s)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Pu(r){let e,t="Очистить",n,i;return{c(){e=ae("button"),e.textContent=t,this.h()},l(s){e=oe(s,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(e)!=="svelte-1rjqwcg"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(s,a){Ae(s,e,a),n||(i=De(e,"click",r[46]),n=!0)},p:qe,d(s){s&&Y(e),n=!1,i()}}}function Lu(r){let e,t="Остановить",n,i;return{c(){e=ae("button"),e.textContent=t,this.h()},l(s){e=oe(s,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(e)!=="svelte-a5kyut"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(s,a){Ae(s,e,a),n||(i=De(e,"click",r[53]),n=!0)},p:qe,d(s){s&&Y(e),n=!1,i()}}}function Mu(r){let e,t,n,i,s,a;return s=new th({}),{c(){e=ae("div"),t=lt(r[19]),n=ve(),i=ae("div"),rt(s.$$.fragment),this.h()},l(o){e=oe(o,"DIV",{class:!0});var u=me(e);t=ct(u,r[19]),u.forEach(Y),n=Ee(o),i=oe(o,"DIV",{class:!0});var l=me(i);nt(s.$$.fragment,l),l.forEach(Y),this.h()},h(){P(e,"class","loading-status svelte-rgnwju"),P(i,"class","loading-container svelte-rgnwju")},m(o,u){Ae(o,e,u),Q(e,t),Ae(o,n,u),Ae(o,i,u),it(s,i,null),a=!0},p(o,u){(!a||u[0]&524288)&&Xt(t,o[19])},i(o){a||(ye(s.$$.fragment,o),a=!0)},o(o){Re(s.$$.fragment,o),a=!1},d(o){o&&(Y(e),Y(n),Y(i)),st(s)}}}function Mg(r){let e;return{c(){e=lt("Выбрать источники для LLM")},l(t){e=ct(t,"Выбрать источники для LLM")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function Ug(r){let e;return{c(){e=lt("Использовать ключевые слова")},l(t){e=ct(t,"Использовать ключевые слова")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function zg(r){let e;return{c(){e=lt("Выполнить поиск по БУ")},l(t){e=ct(t,"Выполнить поиск по БУ")},m(t,n){Ae(t,e,n)},d(t){t&&Y(e)}}}function Uu(r){let e,t;return e=new fh({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 s={};i[0]&8192&&(s.text=n[13]),e.$set(s)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function zu(r){let e,t,n,i;function s(o){r[87](o)}let a={enableDocumentDb:r[42],documentDbUrl:r[41]};return r[15]!==void 0&&(a.transactionMaps=r[15]),t=new Yh({props:a}),Ge.push(()=>Je(t,"transactionMaps",s)),{c(){e=ae("div"),rt(t.$$.fragment),this.h()},l(o){e=oe(o,"DIV",{class:!0});var u=me(e);nt(t.$$.fragment,u),u.forEach(Y),this.h()},h(){P(e,"class","search-column svelte-rgnwju")},m(o,u){Ae(o,e,u),it(t,e,null),i=!0},p(o,u){const l={};!n&&u[0]&32768&&(n=!0,l.transactionMaps=o[15],Ye(()=>n=!1)),t.$set(l)},i(o){i||(ye(t.$$.fragment,o),i=!0)},o(o){Re(t.$$.fragment,o),i=!1},d(o){o&&Y(e),st(t)}}}function ju(r){let e,t='
Не могу предоставить консультацию по вашему вопросу, т.к. поиск ничего не нашел.
Пожалуйста, попробуйте переформулировать запрос.
';return{c(){e=ae("aside"),e.innerHTML=t,this.h()},l(n){e=oe(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){Ae(n,e,i)},d(n){n&&Y(e)}}}function Hu(r){let e,t,n,i;const s=[Hg,jg],a=[];function o(u,l){return u[7]?0:1}return e=o(r),t=a[e]=s[e](r),{c(){t.c(),n=ot()},l(u){t.l(u),n=ot()},m(u,l){a[e].m(u,l),Ae(u,n,l),i=!0},p(u,l){let f=e;e=o(u),e===f?a[e].p(u,l):(ht(),Re(a[f],1,1,()=>{a[f]=null}),dt(),t=a[e],t?t.p(u,l):(t=a[e]=s[e](u),t.c()),ye(t,1),t.m(n.parentNode,n))},i(u){i||(ye(t),i=!0)},o(u){Re(t),i=!1},d(u){u&&Y(n),a[e].d(u)}}}function jg(r){let e,t;return e=new qf({props:{theme:"modern-theme",$$slots:{default:[Vg]},$$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 s={};i[0]&16007174|i[1]&318|i[3]&33554432&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Re(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function Hg(r){let e,t,n,i="Получить ответ",s,a,o="Уточнить ответ",u,l,f="Скачать ответ в Word",m,g,d,y,w,b,p,_,k,I,F,q,j,L,C,se=r[36]&&Ku(r);function ne(W){r[89](W)}function O(W){r[90](W)}function Z(W){r[91](W)}function x(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 ul({props:H}),Ge.push(()=>Je(p,"searchResults",ne)),Ge.push(()=>Je(p,"showFullText",O)),Ge.push(()=>Je(p,"useSearchResult",Z)),Ge.push(()=>Je(p,"enableSearchResultSelection",x));let ce=r[14]&&r[14].length>0&&qu(r);return{c(){e=ae("div"),t=ae("div"),n=ae("button"),n.textContent=i,s=ve(),a=ae("button"),a.textContent=o,u=ve(),l=ae("button"),l.textContent=f,m=ve(),g=ae("div"),d=new Jr(!1),y=ve(),se&&se.c(),w=ve(),b=ae("div"),rt(p.$$.fragment),q=ve(),ce&&ce.c(),this.h()},l(W){e=oe(W,"DIV",{class:!0});var pe=me(e);t=oe(pe,"DIV",{class:!0});var X=me(t);n=oe(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(n)!=="svelte-18s0twx"&&(n.textContent=i),s=Ee(X),a=oe(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(a)!=="svelte-t6wyk0"&&(a.textContent=o),u=Ee(X),l=oe(X,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(l)!=="svelte-14pzf6r"&&(l.textContent=f),m=Ee(X),g=oe(X,"DIV",{class:!0});var Te=me(g);d=Qr(Te,!1),Te.forEach(Y),y=Ee(X),se&&se.l(X),X.forEach(Y),pe.forEach(Y),w=Ee(W),b=oe(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(a,"class","btn variant-filled"),gt(a,"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){Ae(W,e,pe),Q(e,t),Q(t,n),Q(t,s),Q(t,a),Q(t,u),Q(t,l),Q(t,m),Q(t,g),d.m(r[18],g),Q(t,y),se&&se.m(t,null),Ae(W,w,pe),Ae(W,b,pe),it(p,b,null),Q(b,q),ce&&ce.m(b,null),j=!0,L||(C=[De(n,"click",r[54]),De(a,"click",r[51]),De(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)&>(a,"hidden",!W[39]),(!j||pe[0]&262144)&&d.p(W[18]),W[36]?se?se.p(W,pe):(se=Ku(W),se.c(),se.m(t,null)):se&&(se.d(1),se=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)),!I&&pe[0]&4194304&&(I=!0,X.useSearchResult=W[22],Ye(()=>I=!1)),!F&&pe[0]&8388608&&(F=!0,X.enableSearchResultSelection=W[23],Ye(()=>F=!1)),p.$set(X),W[14]&&W[14].length>0?ce?(ce.p(W,pe),pe[0]&16384&&ye(ce,1)):(ce=qu(W),ce.c(),ye(ce,1),ce.m(b,null)):ce&&(ht(),Re(ce,1,1,()=>{ce=null}),dt())},i(W){j||(ye(p.$$.fragment,W),ye(ce),j=!0)},o(W){Re(p.$$.fragment,W),Re(ce),j=!1},d(W){W&&(Y(e),Y(w),Y(b)),se&&se.d(),st(p),ce&&ce.d(),L=!1,or(C)}}}function Wu(r){let e,t,n,i;function s(u){r[99](u)}function a(u){r[100](u)}let o={};return r[14]!==void 0&&(o.consultations=r[14]),r[21]!==void 0&&(o.showFullText=r[21]),e=new ll({props:o}),Ge.push(()=>Je(e,"consultations",s)),Ge.push(()=>Je(e,"showFullText",a)),{c(){rt(e.$$.fragment)},l(u){nt(e.$$.fragment,u)},m(u,l){it(e,u,l),i=!0},p(u,l){const f={};!t&&l[0]&16384&&(t=!0,f.consultations=u[14],Ye(()=>t=!1)),!n&&l[0]&2097152&&(n=!0,f.showFullText=u[21],Ye(()=>n=!1)),e.$set(f)},i(u){i||(ye(e.$$.fragment,u),i=!0)},o(u){Re(e.$$.fragment,u),i=!1},d(u){st(e,u)}}}function Wg(r){let e,t,n,i,s,a,o,u;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 ul({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&&Wu(r);return{c(){e=ae("div"),rt(t.$$.fragment),o=ve(),y&&y.c(),this.h()},l(w){e=oe(w,"DIV",{class:!0});var b=me(e);nt(t.$$.fragment,b),o=Ee(b),y&&y.l(b),b.forEach(Y),this.h()},h(){P(e,"class","search-column svelte-rgnwju")},m(w,b){Ae(w,e,b),it(t,e,null),Q(e,o),y&&y.m(e,null),u=!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)),!s&&b[0]&4194304&&(s=!0,p.useSearchResult=w[22],Ye(()=>s=!1)),!a&&b[0]&8388608&&(a=!0,p.enableSearchResultSelection=w[23],Ye(()=>a=!1)),t.$set(p),w[14]&&w[14].length>0?y?(y.p(w,b),b[0]&16384&&ye(y,1)):(y=Wu(w),y.c(),ye(y,1),y.m(e,null)):y&&(ht(),Re(y,1,1,()=>{y=null}),dt())},i(w){u||(ye(t.$$.fragment,w),ye(y),u=!0)},o(w){Re(t.$$.fragment,w),Re(y),u=!1},d(w){w&&Y(e),st(t),y&&y.d()}}}function Gu(r){let e,t;return{c(){e=new Jr(!1),t=ot(),this.h()},l(n){e=Qr(n,!1),t=ot(),this.h()},h(){e.a=t},m(n,i){e.m(r[18],n,i),Ae(n,t,i)},p(n,i){i[0]&262144&&e.p(n[18])},d(n){n&&(Y(t),e.d())}}}function Vu(r){let e,t,n="Оцените ответ:",i,s,a="👍",o,u,l="👎",f,m,g,d;return{c(){e=ae("div"),t=ae("span"),t.textContent=n,i=ve(),s=ae("button"),s.textContent=a,o=ve(),u=ae("button"),u.textContent=l,f=ve(),m=ae("textarea"),this.h()},l(y){e=oe(y,"DIV",{});var w=me(e);t=oe(w,"SPAN",{"data-svelte-h":!0}),Ve(t)!=="svelte-9pssby"&&(t.textContent=n),i=Ee(w),s=oe(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(s)!=="svelte-1hnmipt"&&(s.textContent=a),o=Ee(w),u=oe(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(u)!=="svelte-12wf95"&&(u.textContent=l),f=Ee(w),m=oe(w,"TEXTAREA",{rows:!0,placeholder:!0,class:!0}),me(m).forEach(Y),w.forEach(Y),this.h()},h(){P(s,"class","btn-icon"),P(u,"class","btn-icon"),P(m,"rows","3"),P(m,"placeholder","Комментарий"),P(m,"class","svelte-rgnwju")},m(y,w){Ae(y,e,w),Q(e,t),Q(e,i),Q(e,s),Q(e,o),Q(e,u),Q(e,f),Q(e,m),ir(m,r[35]),g||(d=[De(s,"click",r[55]),De(u,"click",r[56]),De(m,"input",r[101]),De(m,"input",r[49])],g=!0)},p(y,w){w[1]&16&&ir(m,y[35])},d(y){y&&Y(e),g=!1,or(d)}}}function Gg(r){let e,t,n,i="Получить ответ",s,a,o="Уточнить ответ",u,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])&&Gu(r),p=r[36]&&r[43]&&Vu(r);return{c(){e=ae("div"),t=ae("div"),n=ae("button"),n.textContent=i,s=ve(),a=ae("button"),a.textContent=o,u=ve(),l=ae("button"),l.textContent=f,m=ve(),g=ae("div"),b&&b.c(),d=ve(),p&&p.c(),this.h()},l(_){e=oe(_,"DIV",{class:!0});var k=me(e);t=oe(k,"DIV",{class:!0});var I=me(t);n=oe(I,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(n)!=="svelte-qvwp3t"&&(n.textContent=i),s=Ee(I),a=oe(I,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(a)!=="svelte-zcineo"&&(a.textContent=o),u=Ee(I),l=oe(I,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(l)!=="svelte-1ddim4b"&&(l.textContent=f),m=Ee(I),g=oe(I,"DIV",{class:!0});var F=me(g);b&&b.l(F),F.forEach(Y),d=Ee(I),p&&p.l(I),I.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(a,"class","btn variant-filled"),gt(a,"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){Ae(_,e,k),Q(e,t),Q(t,n),Q(t,s),Q(t,a),Q(t,u),Q(t,l),Q(t,m),Q(t,g),b&&b.m(g,null),Q(t,d),p&&p.m(t,null),y||(w=[De(n,"click",r[54]),De(a,"click",r[51]),De(l,"click",r[58])],y=!0)},p(_,k){k[0]&8388610|k[1]&256&>(n,"hidden",!(_[23]&&_[1].length>0&&!_[39])),k[1]&256&>(a,"hidden",!_[39]),_[34]&&_[2]||!_[34]&&!_[2]||_[34]&&_[18]&&!_[32]||_[18]&&_[32]&&_[33]?b?b.p(_,k):(b=Gu(_),b.c(),b.m(g,null)):b&&(b.d(1),b=null),_[36]&&_[43]?p?p.p(_,k):(p=Vu(_),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},d(_){_&&Y(e),b&&b.d(),p&&p.d(),y=!1,or(w)}}}function Vg(r){let e,t,n,i;return e=new io({props:{minSize:20,class:"search-column",size:49,$$slots:{default:[Wg]},$$scope:{ctx:r}}}),n=new io({props:{size:49,$$slots:{default:[Gg]},$$scope:{ctx:r}}}),{c(){rt(e.$$.fragment),t=ve(),rt(n.$$.fragment)},l(s){nt(e.$$.fragment,s),t=Ee(s),nt(n.$$.fragment,s)},m(s,a){it(e,s,a),Ae(s,t,a),it(n,s,a),i=!0},p(s,a){const o={};a[0]&15745026|a[3]&33554432&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const u={};a[0]&8650758|a[1]&318|a[3]&33554432&&(u.$$scope={dirty:a,ctx:s}),n.$set(u)},i(s){i||(ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!0)},o(s){Re(e.$$.fragment,s),Re(n.$$.fragment,s),i=!1},d(s){s&&Y(t),st(e,s),st(n,s)}}}function Ku(r){let e,t,n="Оцените ответ:",i,s,a="👍",o,u,l="👎",f,m,g,d;return{c(){e=ae("div"),t=ae("span"),t.textContent=n,i=ve(),s=ae("button"),s.textContent=a,o=ve(),u=ae("button"),u.textContent=l,f=ve(),m=ae("textarea"),this.h()},l(y){e=oe(y,"DIV",{});var w=me(e);t=oe(w,"SPAN",{"data-svelte-h":!0}),Ve(t)!=="svelte-9pssby"&&(t.textContent=n),i=Ee(w),s=oe(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(s)!=="svelte-1hnmipt"&&(s.textContent=a),o=Ee(w),u=oe(w,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(u)!=="svelte-12wf95"&&(u.textContent=l),f=Ee(w),m=oe(w,"TEXTAREA",{rows:!0,placeholder:!0,class:!0}),me(m).forEach(Y),w.forEach(Y),this.h()},h(){P(s,"class","btn-icon"),P(u,"class","btn-icon"),P(m,"rows","3"),P(m,"placeholder","Комментарий"),P(m,"class","svelte-rgnwju")},m(y,w){Ae(y,e,w),Q(e,t),Q(e,i),Q(e,s),Q(e,o),Q(e,u),Q(e,f),Q(e,m),ir(m,r[35]),g||(d=[De(s,"click",r[55]),De(u,"click",r[56]),De(m,"input",r[88]),De(m,"input",r[49])],g=!0)},p(y,w){w[1]&16&&ir(m,y[35])},d(y){y&&Y(e),g=!1,or(d)}}}function qu(r){let e,t,n,i,s,a;function o(f){r[93](f)}function u(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",o)),Ge.push(()=>Je(n,"showFullText",u)),{c(){e=ae("hr"),t=ve(),rt(n.$$.fragment)},l(f){e=oe(f,"HR",{}),t=Ee(f),nt(n.$$.fragment,f)},m(f,m){Ae(f,e,m),Ae(f,t,m),it(n,f,m),a=!0},p(f,m){const g={};!i&&m[0]&16384&&(i=!0,g.consultations=f[14],Ye(()=>i=!1)),!s&&m[0]&2097152&&(s=!0,g.showFullText=f[21],Ye(()=>s=!1)),n.$set(g)},i(f){a||(ye(n.$$.fragment,f),a=!0)},o(f){Re(n.$$.fragment,f),a=!1},d(f){f&&(Y(e),Y(t)),st(n,f)}}}function Kg(r){let e,t,n,i,s,a,o,u,l,f,m,g=r[10],d,y=r[11],w,b,p,_,k,I,F,q,j,L=r[40]?"Свернуть уточнение":"Уточнить",C,se,ne,O=`Инструменты
+ `,Z,x,H,ce,W,pe,X,Te="Использовать многоступенчатый поиск",V,R,J,$,ie,M="Использовать LLM для тизеров",T,S,G,U,D,N="Использовать LLM для фильтрации источников",ee,v,re,A,c,h="Выключить фильтрацию по порогам",E,B,K,z,ue,we="Получить более короткий ответ",de,Ce,Ne,te,ke,Oe="Выводить ответ в реальном времени",xe,Fe,Se,Ie,Pe,ze="Учитывать консультации в ответе",Ke,$e,et,We,pt,Ut="Использовать переранжирование",Qt,Zt,gr,En,Or,Jn="Карты проводок по вопросу",Sn,wr,yr,Tn,Fr,Qn="Карты проводок по хоз. операциям",An,rn,nn,ur,$n="Отправить",kn,kr,xn,br,Dt,Cn,Rn,In,Dn,Nn,On,Fn,Bn,zr,Pn,Nt,jr,$t,Ln,Mn,Un,Hr,fe,Me,He,Ct,Rt,jt,It,zn,Wi,ei,Gi,Vi,Wr,Ki=r[15]&&Object.keys(r[15]).length>0,qi,ti,Ht,Xi,ka;n=new jf({});let er=Fu(r),tr=Bu(r),Ft=r[3]&&Pu(r),Bt=r[2]&&Lu(r),vt=(r[16]||r[2])&&Mu(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 Br={};r[0]!==void 0&&(Br.llmClarification=r[0]),r[8]!==void 0&&(Br.searchClarification=r[8]),r[1]!==void 0&&(Br.searchResults=r[1]),r[14]!==void 0&&(Br.relevantConsultations=r[14]),r[18]!==void 0&&(Br.llmResponse=r[18]),r[9]!==void 0&&(Br.historyIsNotEmpty=r[9]),r[3]!==void 0&&(Br.userRequest=r[3]),Dt=new jh({props:Br}),r[73](Dt),Ge.push(()=>Je(Dt,"llmClarification",lc)),Ge.push(()=>Je(Dt,"searchClarification",cc)),Ge.push(()=>Je(Dt,"searchResults",fc)),Ge.push(()=>Je(Dt,"relevantConsultations",hc)),Ge.push(()=>Je(Dt,"llmResponse",dc)),Ge.push(()=>Je(Dt,"historyIsNotEmpty",pc)),Ge.push(()=>Je(Dt,"userRequest",mc));function gc(he){r[81](he)}function wc(he){r[82](he)}let Zi={name:"slider-label",size:"sm",$$slots:{default:[Mg]},$$scope:{ctx:r}};r[23]!==void 0&&(Zi.checked=r[23]),r[31]!==void 0&&(Zi.disabled=r[31]),$t=new Ai({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:[Ug]},$$scope:{ctx:r}};r[29]!==void 0&&(Yi.checked=r[29]),r[31]!==void 0&&(Yi.disabled=r[31]),fe=new Ai({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:[zg]},$$scope:{ctx:r}};r[26]!==void 0&&(Ji.checked=r[26]),r[31]!==void 0&&(Ji.disabled=r[31]),jt=new Ai({props:Ji}),Ge.push(()=>Je(jt,"checked",_c)),Ge.push(()=>Je(jt,"disabled",vc));let Et=r[12]&&Uu(r),St=Ki&&zu(r),zt=r[37]&&ju(),Tt=(r[17]||r[9]&&r[1].length>0||r[14]&&r[14].length>0)&&!r[31]&&Hu(r);return{c(){e=ae("meta"),t=ve(),rt(n.$$.fragment),i=ve(),s=ae("section"),a=ae("div"),o=ae("div"),u=ae("textarea"),l=ve(),f=ae("div"),m=ae("div"),er.c(),d=ve(),tr.c(),w=ve(),b=ae("div"),p=ae("a"),_=Gt("svg"),k=Gt("path"),I=Gt("path"),F=lt(`
+ Справка`),q=ve(),j=ae("button"),C=lt(L),se=ve(),ne=ae("button"),ne.innerHTML=O,Z=ve(),x=ae("div"),H=ae("div"),ce=ae("label"),W=ae("input"),pe=ve(),X=ae("p"),X.textContent=Te,V=ve(),R=ae("label"),J=ae("input"),$=ve(),ie=ae("p"),ie.textContent=M,T=ve(),S=ae("label"),G=ae("input"),U=ve(),D=ae("p"),D.textContent=N,ee=ve(),v=ae("label"),re=ae("input"),A=ve(),c=ae("p"),c.textContent=h,E=ve(),B=ae("label"),K=ae("input"),z=ve(),ue=ae("p"),ue.textContent=we,de=ve(),Ce=ae("label"),Ne=ae("input"),te=ve(),ke=ae("p"),ke.textContent=Oe,xe=ve(),Fe=ae("label"),Se=ae("input"),Ie=ve(),Pe=ae("p"),Pe.textContent=ze,Ke=ve(),$e=ae("label"),et=ae("input"),We=ve(),pt=ae("p"),pt.textContent=Ut,Qt=ve(),Zt=ae("label"),gr=ae("input"),En=ve(),Or=ae("p"),Or.textContent=Jn,Sn=ve(),wr=ae("label"),yr=ae("input"),Tn=ve(),Fr=ae("p"),Fr.textContent=Qn,An=ve(),Ft&&Ft.c(),rn=ve(),Bt&&Bt.c(),nn=ve(),ur=ae("button"),ur.textContent=$n,kn=ve(),kr=ae("div"),vt&&vt.c(),xn=ve(),br=ae("div"),rt(Dt.$$.fragment),Bn=ve(),zr=ae("div"),Pn=ve(),Nt=ae("div"),jr=ae("div"),rt($t.$$.fragment),Un=ve(),Hr=ae("div"),rt(fe.$$.fragment),Ct=ve(),Rt=ae("div"),rt(jt.$$.fragment),Wi=ve(),ei=ae("div"),Gi=ve(),Et&&Et.c(),Vi=ve(),Wr=ae("div"),St&&St.c(),qi=ve(),zt&&zt.c(),ti=ve(),Tt&&Tt.c(),this.h()},l(he){const Be=Cc("svelte-1wpbm1r",document.head);e=oe(Be,"META",{name:!0,content:!0}),Be.forEach(Y),t=Ee(he),nt(n.$$.fragment,he),i=Ee(he),s=oe(he,"SECTION",{});var lr=me(s);a=oe(lr,"DIV",{class:!0});var xr=me(a);o=oe(xr,"DIV",{class:!0});var Gr=me(o);u=oe(Gr,"TEXTAREA",{class:!0,rows:!0,placeholder:!0}),me(u).forEach(Y),Gr.forEach(Y),l=Ee(xr),f=oe(xr,"DIV",{class:!0});var ft=me(f);m=oe(ft,"DIV",{class:!0});var ri=me(m);er.l(ri),d=Ee(ri),tr.l(ri),ri.forEach(Y),w=Ee(ft),b=oe(ft,"DIV",{class:!0});var Wt=me(b);p=oe(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),I=Vt($i,"path",{d:!0}),me(I).forEach(Y),$i.forEach(Y),F=ct(Qi,`
+ Справка`),Qi.forEach(Y),q=Ee(Wt),j=oe(Wt,"BUTTON",{class:!0});var xa=me(j);C=ct(xa,L),xa.forEach(Y),se=Ee(Wt),ne=oe(Wt,"BUTTON",{class:!0,"data-svelte-h":!0}),Ve(ne)!=="svelte-7w234r"&&(ne.innerHTML=O),Z=Ee(Wt),x=oe(Wt,"DIV",{class:!0,"data-popup":!0});var Ca=me(x);H=oe(Ca,"DIV",{});var At=me(H);ce=oe(At,"LABEL",{class:!0});var ni=me(ce);W=oe(ni,"INPUT",{class:!0,type:!0}),pe=Ee(ni),X=oe(ni,"P",{"data-svelte-h":!0}),Ve(X)!=="svelte-o1whuo"&&(X.textContent=Te),ni.forEach(Y),V=Ee(At),R=oe(At,"LABEL",{class:!0});var ii=me(R);J=oe(ii,"INPUT",{class:!0,type:!0}),$=Ee(ii),ie=oe(ii,"P",{"data-svelte-h":!0}),Ve(ie)!=="svelte-9zxjq1"&&(ie.textContent=M),ii.forEach(Y),T=Ee(At),S=oe(At,"LABEL",{class:!0});var si=me(S);G=oe(si,"INPUT",{class:!0,type:!0}),U=Ee(si),D=oe(si,"P",{"data-svelte-h":!0}),Ve(D)!=="svelte-1uul1f7"&&(D.textContent=N),si.forEach(Y),ee=Ee(At),v=oe(At,"LABEL",{class:!0});var ai=me(v);re=oe(ai,"INPUT",{class:!0,type:!0}),A=Ee(ai),c=oe(ai,"P",{"data-svelte-h":!0}),Ve(c)!=="svelte-jhmp61"&&(c.textContent=h),ai.forEach(Y),E=Ee(At),B=oe(At,"LABEL",{class:!0});var oi=me(B);K=oe(oi,"INPUT",{class:!0,type:!0}),z=Ee(oi),ue=oe(oi,"P",{"data-svelte-h":!0}),Ve(ue)!=="svelte-1548adw"&&(ue.textContent=we),oi.forEach(Y),de=Ee(At),Ce=oe(At,"LABEL",{class:!0});var ui=me(Ce);Ne=oe(ui,"INPUT",{class:!0,type:!0}),te=Ee(ui),ke=oe(ui,"P",{"data-svelte-h":!0}),Ve(ke)!=="svelte-tnawxy"&&(ke.textContent=Oe),ui.forEach(Y),xe=Ee(At),Fe=oe(At,"LABEL",{class:!0});var li=me(Fe);Se=oe(li,"INPUT",{class:!0,type:!0}),Ie=Ee(li),Pe=oe(li,"P",{"data-svelte-h":!0}),Ve(Pe)!=="svelte-vv6jwf"&&(Pe.textContent=ze),li.forEach(Y),Ke=Ee(At),$e=oe(At,"LABEL",{class:!0});var ci=me($e);et=oe(ci,"INPUT",{class:!0,type:!0}),We=Ee(ci),pt=oe(ci,"P",{"data-svelte-h":!0}),Ve(pt)!=="svelte-qkyc7c"&&(pt.textContent=Ut),ci.forEach(Y),Qt=Ee(At),Zt=oe(At,"LABEL",{class:!0});var fi=me(Zt);gr=oe(fi,"INPUT",{class:!0,type:!0}),En=Ee(fi),Or=oe(fi,"P",{"data-svelte-h":!0}),Ve(Or)!=="svelte-17zslqw"&&(Or.textContent=Jn),fi.forEach(Y),Sn=Ee(At),wr=oe(At,"LABEL",{class:!0});var hi=me(wr);yr=oe(hi,"INPUT",{class:!0,type:!0}),Tn=Ee(hi),Fr=oe(hi,"P",{"data-svelte-h":!0}),Ve(Fr)!=="svelte-1esqmyo"&&(Fr.textContent=Qn),hi.forEach(Y),At.forEach(Y),Ca.forEach(Y),An=Ee(Wt),Ft&&Ft.l(Wt),rn=Ee(Wt),Bt&&Bt.l(Wt),nn=Ee(Wt),ur=oe(Wt,"BUTTON",{title:!0,class:!0,"data-svelte-h":!0}),Ve(ur)!=="svelte-w5ppob"&&(ur.textContent=$n),Wt.forEach(Y),kn=Ee(ft),kr=oe(ft,"DIV",{class:!0});var Ra=me(kr);vt&&vt.l(Ra),Ra.forEach(Y),xn=Ee(ft),br=oe(ft,"DIV",{class:!0});var Ia=me(br);nt(Dt.$$.fragment,Ia),Ia.forEach(Y),Bn=Ee(ft),zr=oe(ft,"DIV",{class:!0}),me(zr).forEach(Y),Pn=Ee(ft),Nt=oe(ft,"DIV",{class:!0});var _r=me(Nt);jr=oe(_r,"DIV",{});var Da=me(jr);nt($t.$$.fragment,Da),Da.forEach(Y),Un=Ee(_r),Hr=oe(_r,"DIV",{});var Na=me(Hr);nt(fe.$$.fragment,Na),Na.forEach(Y),Ct=Ee(_r),Rt=oe(_r,"DIV",{});var Oa=me(Rt);nt(jt.$$.fragment,Oa),Oa.forEach(Y),Wi=Ee(_r),ei=oe(_r,"DIV",{}),me(ei).forEach(Y),Gi=Ee(_r),Et&&Et.l(_r),_r.forEach(Y),Vi=Ee(ft),Wr=oe(ft,"DIV",{class:!0});var Fa=me(Wr);St&&St.l(Fa),Fa.forEach(Y),qi=Ee(ft),zt&&zt.l(ft),ti=Ee(ft),Tt&&Tt.l(ft),ft.forEach(Y),xr.forEach(Y),lr.forEach(Y),this.h()},h(){document.title="LLM demo app",P(e,"name","description"),P(e,"content","LLM demo app"),P(u,"class","auto-expand-textarea svelte-rgnwju"),P(u,"rows","1"),P(u,"placeholder","Введите ваш запрос..."),P(o,"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(I,"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/${Pg}`),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(R,"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(B,"class","flex items-center space-x-2"),P(Ne,"class","checkbox accent-white"),P(Ne,"type","checkbox"),Ne.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(Fe,"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(x,"class","card p-4 w-150 shadow-xl z-10"),P(x,"data-popup","popupFeatured"),P(ur,"title","Ctrl+Enter"),P(ur,"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(Nt,"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(a,"class","search-bar flex flex-wrap svelte-rgnwju")},m(he,Be){Q(document.head,e),Ae(he,t,Be),it(n,he,Be),Ae(he,i,Be),Ae(he,s,Be),Q(s,a),Q(a,o),Q(o,u),ir(u,r[3]),Q(a,l),Q(a,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(_,I),Q(p,F),Q(b,q),Q(b,j),Q(j,C),Q(b,se),Q(b,ne),Q(b,Z),Q(b,x),Q(x,H),Q(H,ce),Q(ce,W),W.checked=r[25],Q(ce,pe),Q(ce,X),Q(H,V),Q(H,R),Q(R,J),J.checked=r[24],Q(R,$),Q(R,ie),Q(H,T),Q(H,S),Q(S,G),G.checked=r[28],Q(S,U),Q(S,D),Q(H,ee),Q(H,v),Q(v,re),re.checked=r[30],Q(v,A),Q(v,c),Q(H,E),Q(H,B),Q(B,K),K.checked=r[32],Q(B,z),Q(B,ue),Q(H,de),Q(H,Ce),Q(Ce,Ne),Ne.checked=r[34],Q(Ce,te),Q(Ce,ke),Q(H,xe),Q(H,Fe),Q(Fe,Se),Se.checked=r[38],Q(Fe,Ie),Q(Fe,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,Or),Q(H,Sn),Q(H,wr),Q(wr,yr),yr.checked=r[5],Q(wr,Tn),Q(wr,Fr),Q(b,An),Ft&&Ft.m(b,null),Q(b,rn),Bt&&Bt.m(b,null),Q(b,nn),Q(b,ur),Q(f,kn),Q(f,kr),vt&&vt.m(kr,null),Q(f,xn),Q(f,br),it(Dt,br,null),Q(f,Bn),Q(f,zr),Q(f,Pn),Q(f,Nt),Q(Nt,jr),it($t,jr,null),Q(Nt,Un),Q(Nt,Hr),it(fe,Hr,null),Q(Nt,Ct),Q(Nt,Rt),it(jt,Rt,null),Q(Nt,Wi),Q(Nt,ei),Q(Nt,Gi),Et&&Et.m(Nt,null),Q(f,Vi),Q(f,Wr),St&&St.m(Wr,null),Q(f,qi),zt&&zt.m(f,null),Q(f,ti),Tt&&Tt.m(f,null),Ht=!0,Xi||(ka=[De(u,"input",r[62]),De(u,"input",r[48]),De(u,"keydown",r[50]),De(j,"click",r[47]),Rc(Pc.call(null,ne,r[57])),De(W,"change",r[63]),De(J,"change",r[64]),De(G,"change",r[65]),De(re,"change",r[66]),De(K,"change",r[67]),De(Ne,"change",r[68]),De(Se,"change",r[69]),De(et,"change",r[70]),De(gr,"change",r[71]),De(yr,"change",r[72]),De(ur,"click",r[52])],Xi=!0)},p(he,Be){Be[0]&8&&ir(u,he[3]),Be[0]&1024&&wt(g,g=he[10])?(ht(),Re(er,1,1,qe),dt(),er=Fu(he),er.c(),ye(er,1),er.m(m,d)):er.p(he,Be),Be[0]&2048&&wt(y,y=he[11])?(ht(),Re(tr,1,1,qe),dt(),tr=Bu(he),tr.c(),ye(tr,1),tr.m(m,null)):tr.p(he,Be),(!Ht||Be[1]&512)&&L!==(L=he[40]?"Свернуть уточнение":"Уточнить")&&Xt(C,L),(!Ht||Be[1]&1)&&(W.disabled=he[31]),Be[0]&33554432&&(W.checked=he[25]),(!Ht||Be[1]&1)&&(J.disabled=he[31]),Be[0]&16777216&&(J.checked=he[24]),(!Ht||Be[1]&1)&&(G.disabled=he[31]),Be[0]&268435456&&(G.checked=he[28]),(!Ht||Be[1]&1)&&(re.disabled=he[31]),Be[0]&1073741824&&(re.checked=he[30]),(!Ht||Be[1]&1)&&(K.disabled=he[31]),Be[1]&2&&(K.checked=he[32]),(!Ht||Be[1]&1)&&(Ne.disabled=he[31]),Be[1]&8&&(Ne.checked=he[34]),(!Ht||Be[1]&1)&&(Se.disabled=he[31]),Be[1]&128&&(Se.checked=he[38]),(!Ht||Be[1]&1)&&(et.disabled=he[31]),Be[0]&134217728&&(et.checked=he[27]),Be[0]&16&&(gr.checked=he[4]),Be[0]&32&&(yr.checked=he[5]),he[3]?Ft?Ft.p(he,Be):(Ft=Pu(he),Ft.c(),Ft.m(b,rn)):Ft&&(Ft.d(1),Ft=null),he[2]?Bt?Bt.p(he,Be):(Bt=Lu(he),Bt.c(),Bt.m(b,nn)):Bt&&(Bt.d(1),Bt=null),he[16]||he[2]?vt?(vt.p(he,Be),Be[0]&65540&&ye(vt,1)):(vt=Mu(he),vt.c(),ye(vt,1),vt.m(kr,null)):vt&&(ht(),Re(vt,1,1,()=>{vt=null}),dt());const lr={};!Cn&&Be[0]&1&&(Cn=!0,lr.llmClarification=he[0],Ye(()=>Cn=!1)),!Rn&&Be[0]&256&&(Rn=!0,lr.searchClarification=he[8],Ye(()=>Rn=!1)),!In&&Be[0]&2&&(In=!0,lr.searchResults=he[1],Ye(()=>In=!1)),!Dn&&Be[0]&16384&&(Dn=!0,lr.relevantConsultations=he[14],Ye(()=>Dn=!1)),!Nn&&Be[0]&262144&&(Nn=!0,lr.llmResponse=he[18],Ye(()=>Nn=!1)),!On&&Be[0]&512&&(On=!0,lr.historyIsNotEmpty=he[9],Ye(()=>On=!1)),!Fn&&Be[0]&8&&(Fn=!0,lr.userRequest=he[3],Ye(()=>Fn=!1)),Dt.$set(lr),(!Ht||Be[1]&512)&>(br,"hidden",!he[40]);const xr={};Be[3]&33554432&&(xr.$$scope={dirty:Be,ctx:he}),!Ln&&Be[0]&8388608&&(Ln=!0,xr.checked=he[23],Ye(()=>Ln=!1)),!Mn&&Be[1]&1&&(Mn=!0,xr.disabled=he[31],Ye(()=>Mn=!1)),$t.$set(xr);const Gr={};Be[3]&33554432&&(Gr.$$scope={dirty:Be,ctx:he}),!Me&&Be[0]&536870912&&(Me=!0,Gr.checked=he[29],Ye(()=>Me=!1)),!He&&Be[1]&1&&(He=!0,Gr.disabled=he[31],Ye(()=>He=!1)),fe.$set(Gr);const ft={};Be[3]&33554432&&(ft.$$scope={dirty:Be,ctx:he}),!It&&Be[0]&67108864&&(It=!0,ft.checked=he[26],Ye(()=>It=!1)),!zn&&Be[1]&1&&(zn=!0,ft.disabled=he[31],Ye(()=>zn=!1)),jt.$set(ft),he[12]?Et?(Et.p(he,Be),Be[0]&4096&&ye(Et,1)):(Et=Uu(he),Et.c(),ye(Et,1),Et.m(Nt,null)):Et&&(ht(),Re(Et,1,1,()=>{Et=null}),dt()),Be[0]&32768&&(Ki=he[15]&&Object.keys(he[15]).length>0),Ki?St?(St.p(he,Be),Be[0]&32768&&ye(St,1)):(St=zu(he),St.c(),ye(St,1),St.m(Wr,null)):St&&(ht(),Re(St,1,1,()=>{St=null}),dt()),he[37]?zt||(zt=ju(),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]?Tt?(Tt.p(he,Be),Be[0]&147970|Be[1]&1&&ye(Tt,1)):(Tt=Hu(he),Tt.c(),ye(Tt,1),Tt.m(f,null)):Tt&&(ht(),Re(Tt,1,1,()=>{Tt=null}),dt())},i(he){Ht||(ye(n.$$.fragment,he),ye(er),ye(tr),ye(vt),ye(Dt.$$.fragment,he),ye($t.$$.fragment,he),ye(fe.$$.fragment,he),ye(jt.$$.fragment,he),ye(Et),ye(St),ye(Tt),Ht=!0)},o(he){Re(n.$$.fragment,he),Re(er),Re(tr),Re(vt),Re(Dt.$$.fragment,he),Re($t.$$.fragment,he),Re(fe.$$.fragment,he),Re(jt.$$.fragment,he),Re(Et),Re(St),Re(Tt),Ht=!1},d(he){he&&(Y(t),Y(i),Y(s)),Y(e),st(n,he),er.d(he),tr.d(he),Ft&&Ft.d(),Bt&&Bt.d(),vt&&vt.d(),r[73](null),st(Dt),st($t),st(fe),st(jt),Et&&Et.d(),St&&St.d(),zt&&zt.d(),Tt&&Tt.d(),Xi=!1,or(ka)}}}let qg=`Ты юрист. Твоя задача – дать верный ответ на поставленный тебе вопрос(ы) или предоставить информацию, если пользователю нужна консультация или разъяснение. Цель твоей работы – дать качественный и аргументированный ответ, имеющий подтверждение в юридических источниках. Помни, что ты профессиональный юрист и твои ответы должны быть формальными, содержательными и точными. Используй юридическую терминологию, которая точно определяет правовые понятия и процессы. Подписывай используемые источники рядом с местом, где ты их использовал. Используй официально-деловой стиль. Я предоставлю тебе запрос, юридические источники, ответ на запрос от эксперта и уточнения от пользователя. Ты действуешь по такому плану:
+1) Прочитай запрос. Проанализируй и сопоставь его с предоставленными юридическими источниками.
+2) Прочитай ответ эксперта. Прочитай уточнения от пользователя. Подумай чего не хватает в ответе эксперта.
+3) Составь новый ответ на запрос, ориентируясь на твои мысли из пункта 1 и 2. Твой ответ должен решить как изначальный запрос, так и обязательно использовать информацию из уточнения. Ответ должен соблюдать все правила, которые я задавал тебе ранее.
+4) Выводишь итоговый ответ в таком виде "По Вашему запросу сообщаем: [Текст твоего ответа]". Закончи фразой "Конец ответа".
+Отвечай всегда только на РУССКОМ языке!
+Запрос: {{ВОПРОС}}
+Юридические источники: {{ИСТОЧНИКИ}}
+Ответ эксперта: {{ПРОШЛЫЙ ОТВЕТ}}
+Уточнения: {{УТОЧНЕНИЯ}}`,Xg=`Всегда отвечай на РУССКОМ языке. Прочитай ответ эксперта на вопрос. Используй только такой формат ответа:
+1) какие ответы даны на вопросы: "Ответ: *текст ответа*".
+2) какие юридические источники используются в обосновании: "Источники: *список документов*".
+Отвечай на русском языке!
+Текст:`;async function Xu(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 Zg(r,e,t){let{data:n}=e;const{ENV_DOCUMENT_DB_URL:i,ENV_ENABLE_DOCUMENT_DB:s,ENV_ENABLE_DB_SUPPORT:a}=n;let o;Zc();let u=!1;const l={message:"Спасибо за оценку!",timeout:5e3},f=il();Kn(()=>{t(7,u=window.innerWidth<=768)});let m="",g="",d=!0,y="unknown",w="unknown",b=!1,p=Lg;function _(fe){t(13,p=fe)}function k(){t(12,b=!1)}async function I(){const fe=`${window.location.origin}/llm/health`,Me=await Xu(fe,"Error fetching Llama health status");t(10,y=Me?.status)}async function F(){const fe=`${window.location.origin}/search/health`,Me=await Xu(fe,"Error fetching search health status");Me&&t(11,w=Me.status)}async function q(){await Promise.all([I(),F()])}let j;Kn(async()=>{q(),j=setInterval(async()=>{q()},2e4)}),aa(()=>{clearInterval(j),ze()});let L=[],C=[],se=null,ne=!1,O=!1,Z=!1,x="",H="",ce=!0,W="",pe="",X="",Te=Array(L.length).fill(!1),V=Array(C.length).fill(!1),R,J=!1,$=!1,ie=!1,M=!1,T=!1,S=!1,G=!1,U=!1,D=!1,N=!1,ee=!1,v=!1,re=!1,A=!1,c="",h=!1,E=!1,B=!1,K=!1,z=!1,ue=null,we="";const de=async fe=>{t(18,x=""),ce=!0,t(16,ne=!1),t(2,O=!1),t(17,Z=!1),t(1,L=[]),t(14,C=[]),t(15,se={}),t(3,W=""),t(61,pe=""),t(36,h=!1),t(37,E=!1),o.clear(),ze()},Ce=async fe=>{t(40,z=!z)},Ne=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 Oe(fe){let Me=fe.map(({title:He,text:Ct},Rt)=>`Источник ${Rt}: ${He}
+${Ct}`).join(`
+
+`);return B&&(Me+=(C||[]).map(({title:He,text:Ct})=>`${He}
+${Ct}`).join(`
+
+`)),Me}async function xe(){if(z&&g&&H){let fe="",Me="";if(ce=!1,J){if(fe=Oe(L.filter((He,Ct)=>R[He.title])),!fe){t(18,x="Выберите хотя бы один документ из результатов поиска.");return}}else{const He=L.slice(0,10);fe=Oe(He)}Me=qg.replace("{{ВОПРОС}}",W).replace("{{ИСТОЧНИКИ}}",fe).replace("{{ПРОШЛЫЙ ОТВЕТ}}",H).replace("{{УТОЧНЕНИЯ}}",g),t(18,x=""),await Se(Me)}}const Fe=async()=>{let fe="",Me="";if(J){if(fe=Oe(L.filter((He,Ct)=>R[He.title])),!fe){t(18,x="Выберите хотя бы один документ из результатов поиска.");return}}else{const He=L.slice(0,10);fe=Oe(He)}Me=p.replace("{{ВОПРОС}}",W+`
+`+g).replace("{{ИСТОЧНИКИ}}",fe),await Se(Me)},Se=async fe=>{t(2,O=!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:Ie.signal});try{if(Ie.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(Ie.signal.aborted){console.log("Request was cancelled during reading.");break}const{value:Rt,done:jt}=await He.read();if(jt){Ct=!1,v||(we=fe,t(19,X=""),t(2,O=!1),t(36,h=!0),ue=await an.log({consultations:(C||[]).map(It=>JSON.stringify(It)),llmPrompt:fe,llmResponse:x.replaceAll(" ",`
+`),searchResults:L.map(It=>JSON.stringify(It)),selectedSearchResults:L.filter((It,zn)=>R[It.title]).map(It=>JSON.stringify(It)),userScore:void 0,userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:T,useLLMForFiltering:S,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:N,useShortestPrompt:v,enableRealtimeLlmReponse:A,sendConsultationToLlm:B}}));break}Rt&&t(18,x+=Rt.replaceAll(`
+`," "))}catch(Rt){if(t(19,X="Ошибка генерации ответа"),Rt.name==="AbortError"){Ct=!1,console.log("Fetch was aborted during reading.");break}else{Ct=!1,console.error("Error during reading:",Rt);break}}finally{!v&&ce&&(t(60,H=x),ce=!1)}v||(t(19,X=""),t(2,O=!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=Xg+x;const Me=await fetch("/llm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userprompt:fe}),signal:Ie.signal});try{if(Ie.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,x="");Ct;)try{if(Ie.signal.aborted){console.log("Request was cancelled during reading.");break}const{value:Rt,done:jt}=await He.read();if(jt){ce&&(t(60,H=x),ce=!1),Ct=!1,we=fe,ue=await an.log({consultations:(C||[]).map(It=>JSON.stringify(It)),llmPrompt:fe,llmResponse:x.replaceAll(" ",`
+`),searchResults:L.map(It=>JSON.stringify(It)),selectedSearchResults:L.filter((It,zn)=>R[It.title]).map(It=>JSON.stringify(It)),userScore:void 0,userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:T,useLLMForFiltering:S,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:N,useShortestPrompt:v,enableRealtimeLlmReponse:A,sendConsultationToLlm:B}});break}Rt&&t(18,x+=Rt.replaceAll(`
+`," ")),x&&!re&&t(33,re=!0)}catch(Rt){if(t(19,X="Ошибка генерации ответа"),Rt.name==="AbortError"){Ct=!1,console.log("Fetch was aborted during reading.");break}else{Ct=!1,console.error("Error during reading:",Rt);break}}t(19,X=""),t(2,O=!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=x),ce=!1)}}o.updateCurrentState(null,null,x,null,se)};let Ie=new AbortController;const Pe=async fe=>{await ze(),t(20,Te=Array(10).fill(!1)),t(21,V=Array(10).fill(!1)),t(22,R={}),t(18,x=""),t(60,H=""),ce=!0,t(33,re=!1),t(36,h=!1),t(16,ne=!0),t(2,O=!1),t(17,Z=!0),t(37,E=!1),t(19,X="Ищем релевантные документы"),o.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:T,disable_thresholds:U,find_transaction_maps_by_question:N,find_transaction_maps_by_operation:ee,use_llm_for_filtering:S,use_keywords:G}),signal:Ie.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,se=He.transactionMapResults):(t(15,se=[]),D&&t(37,E=!0)),o.updateCurrentState(W,L,null,C,se),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)}D||(L&&L.length>0?J||await Fe():t(37,E=!0))},ze=()=>{Ie.abort("user canceled"),Ie=new AbortController,t(2,O=!1),t(19,X=""),ue=null,we=""};async function Ke(){t(18,x=""),t(60,H=""),ce=!0,await ze(),o.addState(W),o.updateCurrentState(null,L,H,C,se),setTimeout(async()=>{console.log(ce),await Fe()},1e3)}async function $e(){ue!=null?await an.logUserScore(ue,"positive",c):ue=await an.log({consultations:(C||[]).map(fe=>JSON.stringify(fe)),llmPrompt:we,llmResponse:x.replaceAll(" ",`
+`),searchResults:L.map(fe=>JSON.stringify(fe)),selectedSearchResults:L.filter((fe,Me)=>R[fe.title]).map(fe=>JSON.stringify(fe)),userScore:"positive",userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:T,useLLMForFiltering:S,useKeywords:G,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:N,useShortestPrompt:v,enableRealtimeLlmReponse:A,sendConsultationToLlm:B}}),f.trigger(l),t(35,c="")}async function et(){ue!=null?await an.logUserScore(ue,"negative",c):ue=await an.log({consultations:(C||[]).map(fe=>JSON.stringify(fe)),llmPrompt:we,llmResponse:x.replaceAll(" ",`
+`),searchResults:L.map(fe=>JSON.stringify(fe)),selectedSearchResults:L.filter((fe,Me)=>R[fe.title]).map(fe=>JSON.stringify(fe)),userScore:"negative",userComment:c,userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:T,useLLMForFiltering:S,useKeywords:G,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:N,useShortestPrompt:v,enableRealtimeLlmReponse:A,sendConsultationToLlm:B}}),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:x.replaceAll(" ",`
+`),searchResults:L.map(Me=>JSON.stringify(Me)),userRequest:W,uiSettings:{enableSearchResultSelection:J,enableLLMForTeasers:$,doMultistepSearch:ie,useAccountingDocs:M,useReranking:T,useLLMForFiltering:S,useKeywords:G,disableThresholds:U,searchInTransactionLedgerByOperation:ee,searchInTransactionLedgerByQuestion:N,useShortestPrompt:v,enableRealtimeLlmReponse:A,sendConsultationToLlm:B}};Bg.createDocxFromObject(fe)}function Ut(){W=this.value,t(3,W)}function Qt(){ie=this.checked,t(25,ie),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function Zt(){$=this.checked,t(24,$),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function gr(){S=this.checked,t(28,S),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function En(){U=this.checked,t(30,U),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function Or(){v=this.checked,t(32,v),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function Jn(){A=this.checked,t(34,A),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function Sn(){B=this.checked,t(38,B),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function wr(){T=this.checked,t(27,T),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function yr(){N=this.checked,t(4,N)}function Tn(){ee=this.checked,t(5,ee)}function Fr(fe){Ge[fe?"unshift":"push"](()=>{o=fe,t(6,o)})}function Qn(fe){g=fe,t(0,g)}function An(fe){m=fe,t(8,m)}function rn(fe){L=fe,t(1,L)}function nn(fe){C=fe,t(14,C)}function ur(fe){x=fe,t(18,x)}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,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function xn(fe){D=fe,t(31,D),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function br(fe){G=fe,t(29,G),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function Dt(fe){D=fe,t(31,D),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function Cn(fe){M=fe,t(26,M),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function Rn(fe){D=fe,t(31,D),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function In(fe){se=fe,t(15,se)}function Dn(){c=this.value,t(35,c)}function Nn(fe){L=fe,t(1,L)}function On(fe){Te=fe,t(20,Te)}function Fn(fe){R=fe,t(22,R)}function Bn(fe){J=fe,t(23,J),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}function zr(fe){C=fe,t(14,C)}function Pn(fe){V=fe,t(21,V)}function Nt(fe){L=fe,t(1,L)}function jr(fe){Te=fe,t(20,Te)}function $t(fe){R=fe,t(22,R)}function Ln(fe){J=fe,t(23,J),t(5,ee),t(4,N),t(0,g),t(1,L),t(60,H),t(61,pe),t(3,W),t(2,O)}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||N?(t(31,D=!0),t(23,J=!1),t(24,$=!1),t(25,ie=!1),t(26,M=!1),t(27,T=!1),t(28,S=!1),t(29,G=!1),t(30,U=!1),t(32,v=!1),t(34,A=!1),t(38,B=!1)):t(31,D=!1),g&&L.length>0&&H&&pe==W&&!O?t(39,K=!0):t(39,K=!1))},[g,L,O,W,N,ee,o,u,m,d,y,w,b,p,C,se,ne,Z,x,X,Te,V,R,J,$,ie,M,T,S,G,U,D,v,re,A,c,h,E,B,K,z,i,s,a,_,k,de,Ce,Ne,te,ke,xe,Pe,ze,Ke,$e,et,We,pt,n,H,pe,Ut,Qt,Zt,gr,En,Or,Jn,Sn,wr,yr,Tn,Fr,Qn,An,rn,nn,ur,$n,kn,kr,xn,br,Dt,Cn,Rn,In,Dn,Nn,On,Fn,Bn,zr,Pn,Nt,jr,$t,Ln,Mn,Un,Hr]}class c4 extends kt{constructor(e){super(),xt(this,e,Zg,Kg,wt,{data:59},null,[-1,-1,-1,-1])}}export{c4 as component,n4 as universal};