File size: 40,794 Bytes
2ab515e
9923f3d
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import{b as pe,L as _e,e as G,d as j,f as q,i as z,u as S,k as F,M as be,N as ge,O as Se,o as ve,s as x,P as Ve,Q as He,c as te,j as ne,l as W,w as ee,r as tt,R as rn,ac as wt,g as $,X as cn,n as ke,ad as un,S as Fe,t as ae,h as oe,H as nt,C as lt,F as re,B as ue,A as Vt,ae as Ht,G as fn,aa as Pe,K as dn,p as Ge,I as Gt,m as Oe,y as je,q as jt,x as Kt}from"./scheduler.5WtVptCO.js";import{S as ye,i as Ce,a as A,t as H,g as de,f as he,h as hn,j as mn,c as Ke,d as We,m as qe,e as Xe,b as Wt}from"./index.7IiDzEZn.js";import{w as we}from"./index.G3yBo0_P.js";import{e as me}from"./each.C7pZUaX1.js";import{p as _n}from"./ProgressBar.svelte_svelte_type_style_lang.7yc35pDe.js";import{s as ft,d as dt}from"./transitions.QBIMuVLc.js";import{b as bn}from"./SearchUtils.dqpKCG0P.js";const qt=!0;function gn(i){let e,t,n;const l=i[19].default,a=_e(l,i,i[18],null);return{c(){e=G("div"),a&&a.c(),this.h()},l(s){e=j(s,"DIV",{class:!0,"data-testid":!0});var o=q(e);a&&a.l(o),o.forEach(z),this.h()},h(){S(e,"class",t="accordion "+i[0]),S(e,"data-testid","accordion")},m(s,o){F(s,e,o),a&&a.m(e,null),n=!0},p(s,[o]){a&&a.p&&(!n||o&262144)&&be(a,l,s,s[18],n?Se(l,s[18],o,null):ge(s[18]),null),(!n||o&1&&t!==(t="accordion "+s[0]))&&S(e,"class",t)},i(s){n||(A(a,s),n=!0)},o(s){H(a,s),n=!1},d(s){s&&z(e),a&&a.d(s)}}}function Sn(i,e,t){let n,l;ve(i,_n,m=>t(20,l=m));let{$$slots:a={},$$scope:s}=e,{autocollapse:o=!1}=e,{width:r="w-full"}=e,{spacing:f="space-y-1"}=e,{disabled:u=!1}=e,{padding:b="py-2 px-4"}=e,{hover:P="hover:bg-primary-hover-token"}=e,{rounded:k="rounded-container-token"}=e,{caretOpen:d="rotate-180"}=e,{caretClosed:p=""}=e,{regionControl:R=""}=e,{regionPanel:y="space-y-4"}=e,{regionCaret:M=""}=e,{transitions:N=!l}=e,{transitionIn:K=ft}=e,{transitionInParams:w={duration:200}}=e,{transitionOut:O=ft}=e,{transitionOutParams:g={duration:200}}=e;const T=we(null);return x("active",T),x("autocollapse",o),x("disabled",u),x("padding",b),x("hover",P),x("rounded",k),x("caretOpen",d),x("caretClosed",p),x("regionControl",R),x("regionPanel",y),x("regionCaret",M),x("transitions",N),x("transitionIn",K),x("transitionInParams",w),x("transitionOut",O),x("transitionOutParams",g),i.$$set=m=>{t(22,e=Ve(Ve({},e),He(m))),"autocollapse"in m&&t(1,o=m.autocollapse),"width"in m&&t(2,r=m.width),"spacing"in m&&t(3,f=m.spacing),"disabled"in m&&t(4,u=m.disabled),"padding"in m&&t(5,b=m.padding),"hover"in m&&t(6,P=m.hover),"rounded"in m&&t(7,k=m.rounded),"caretOpen"in m&&t(8,d=m.caretOpen),"caretClosed"in m&&t(9,p=m.caretClosed),"regionControl"in m&&t(10,R=m.regionControl),"regionPanel"in m&&t(11,y=m.regionPanel),"regionCaret"in m&&t(12,M=m.regionCaret),"transitions"in m&&t(13,N=m.transitions),"transitionIn"in m&&t(14,K=m.transitionIn),"transitionInParams"in m&&t(15,w=m.transitionInParams),"transitionOut"in m&&t(16,O=m.transitionOut),"transitionOutParams"in m&&t(17,g=m.transitionOutParams),"$$scope"in m&&t(18,s=m.$$scope)},i.$$.update=()=>{t(0,n=`${r} ${f} ${e.class??""}`)},e=He(e),[n,o,r,f,u,b,P,k,d,p,R,y,M,N,K,w,O,g,s,a]}class vn extends ye{constructor(e){super(),Ce(this,e,Sn,gn,pe,{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})}}const kn=i=>({}),ht=i=>({}),zn=i=>({}),mt=i=>({}),Pn=i=>({}),_t=i=>({}),pn=i=>({}),bt=i=>({}),yn=i=>({}),gt=i=>({});function St(i){let e,t;const n=i[30].lead,l=_e(n,i,i[29],gt);return{c(){e=G("div"),l&&l.c(),this.h()},l(a){e=j(a,"DIV",{class:!0});var s=q(e);l&&l.l(s),s.forEach(z),this.h()},h(){S(e,"class","accordion-lead")},m(a,s){F(a,e,s),l&&l.m(e,null),t=!0},p(a,s){l&&l.p&&(!t||s[0]&536870912)&&be(l,n,a,a[29],t?Se(n,a[29],s,yn):ge(a[29]),gt)},i(a){t||(A(l,a),t=!0)},o(a){H(l,a),t=!1},d(a){a&&z(e),l&&l.d(a)}}}function Cn(i){let e;return{c(){e=ae("(summary)")},l(t){e=oe(t,"(summary)")},m(t,n){F(t,e,n)},d(t){t&&z(e)}}}function Rn(i){let e,t,n;return{c(){e=G("div"),t=new nt(!1),this.h()},l(l){e=j(l,"DIV",{class:!0});var a=q(e);t=lt(a,!1),a.forEach(z),this.h()},h(){t.a=null,S(e,"class",n="accordion-summary-caret "+i[11])},m(l,a){F(l,e,a),t.m(i[14],e)},p(l,a){a[0]&2048&&n!==(n="accordion-summary-caret "+l[11])&&S(e,"class",n)},i:ke,o:ke,d(l){l&&z(e)}}}function Dn(i){let e,t,n,l,a;const s=[On,In],o=[];function r(f,u){return f[8]?0:1}return t=r(i),n=o[t]=s[t](i),{c(){e=G("div"),n.c(),this.h()},l(f){e=j(f,"DIV",{class:!0});var u=q(e);n.l(u),u.forEach(z),this.h()},h(){S(e,"class",l="accordion-summary-icons "+i[10])},m(f,u){F(f,e,u),o[t].m(e,null),a=!0},p(f,u){let b=t;t=r(f),t===b?o[t].p(f,u):(de(),H(o[b],1,1,()=>{o[b]=null}),he(),n=o[t],n?n.p(f,u):(n=o[t]=s[t](f),n.c()),A(n,1),n.m(e,null)),(!a||u[0]&1024&&l!==(l="accordion-summary-icons "+f[10]))&&S(e,"class",l)},i(f){a||(A(n),a=!0)},o(f){H(n),a=!1},d(f){f&&z(e),o[t].d()}}}function In(i){let e;const t=i[30].iconOpen,n=_e(t,i,i[29],mt),l=n||En(i);return{c(){l&&l.c()},l(a){l&&l.l(a)},m(a,s){l&&l.m(a,s),e=!0},p(a,s){n&&n.p&&(!e||s[0]&536870912)&&be(n,t,a,a[29],e?Se(t,a[29],s,zn):ge(a[29]),mt)},i(a){e||(A(l,a),e=!0)},o(a){H(l,a),e=!1},d(a){l&&l.d(a)}}}function On(i){let e;const t=i[30].iconClosed,n=_e(t,i,i[29],_t),l=n||Mn(i);return{c(){l&&l.c()},l(a){l&&l.l(a)},m(a,s){l&&l.m(a,s),e=!0},p(a,s){n&&n.p&&(!e||s[0]&536870912)&&be(n,t,a,a[29],e?Se(t,a[29],s,Pn):ge(a[29]),_t)},i(a){e||(A(l,a),e=!0)},o(a){H(l,a),e=!1},d(a){l&&l.d(a)}}}function En(i){let e,t;return{c(){e=new nt(!1),t=re(),this.h()},l(n){e=lt(n,!1),t=re(),this.h()},h(){e.a=t},m(n,l){e.m(i[14],n,l),F(n,t,l)},p:ke,d(n){n&&(z(t),e.d())}}}function Mn(i){let e,t;return{c(){e=new nt(!1),t=re(),this.h()},l(n){e=lt(n,!1),t=re(),this.h()},h(){e.a=t},m(n,l){e.m(i[14],n,l),F(n,t,l)},p:ke,d(n){n&&(z(t),e.d())}}}function vt(i){let e,t,n,l,a,s,o;const r=i[30].content,f=_e(r,i,i[29],ht),u=f||Tn();return{c(){e=G("div"),u&&u.c(),this.h()},l(b){e=j(b,"DIV",{class:!0,id:!0,role:!0,"aria-hidden":!0,"aria-labelledby":!0});var P=q(e);u&&u.l(P),P.forEach(z),this.h()},h(){S(e,"class",t="accordion-panel "+i[9]),S(e,"id",n="accordion-panel-"+i[0]),S(e,"role","region"),S(e,"aria-hidden",l=!i[8]),S(e,"aria-labelledby",i[0])},m(b,P){F(b,e,P),u&&u.m(e,null),o=!0},p(b,P){i=b,f&&f.p&&(!o||P[0]&536870912)&&be(f,r,i,i[29],o?Se(r,i[29],P,kn):ge(i[29]),ht),(!o||P[0]&512&&t!==(t="accordion-panel "+i[9]))&&S(e,"class",t),(!o||P[0]&1&&n!==(n="accordion-panel-"+i[0]))&&S(e,"id",n),(!o||P[0]&256&&l!==(l=!i[8]))&&S(e,"aria-hidden",l),(!o||P[0]&1)&&S(e,"aria-labelledby",i[0])},i(b){o||(A(u,b),b&&cn(()=>{o&&(s&&s.end(1),a=hn(e,dt,{transition:i[4],params:i[5],enabled:i[3]}),a.start())}),o=!0)},o(b){H(u,b),a&&a.invalidate(),b&&(s=mn(e,dt,{transition:i[6],params:i[7],enabled:i[3]})),o=!1},d(b){b&&z(e),u&&u.d(b),b&&s&&s.end()}}}function Tn(i){let e;return{c(){e=ae("(content)")},l(t){e=oe(t,"(content)")},m(t,n){F(t,e,n)},d(t){t&&z(e)}}}function Bn(i){let e,t,n,l,a,s,o,r,f,u,b,P,k,d,p=i[16].lead&&St(i);const R=i[30].summary,y=_e(R,i,i[29],bt),M=y||Cn(),N=[Dn,Rn],K=[];function w(g,T){return g[16].iconClosed||g[16].iconOpen?0:1}s=w(i),o=K[s]=N[s](i);let O=i[8]&&vt(i);return{c(){e=G("div"),t=G("button"),p&&p.c(),n=te(),l=G("div"),M&&M.c(),a=te(),o.c(),u=te(),O&&O.c(),this.h()},l(g){e=j(g,"DIV",{class:!0,"data-testid":!0});var T=q(e);t=j(T,"BUTTON",{type:!0,class:!0,id:!0,"aria-expanded":!0,"aria-controls":!0});var m=q(t);p&&p.l(m),n=ne(m),l=j(m,"DIV",{class:!0});var L=q(l);M&&M.l(L),L.forEach(z),a=ne(m),o.l(m),m.forEach(z),u=ne(T),O&&O.l(T),T.forEach(z),this.h()},h(){S(l,"class","accordion-summary flex-1"),S(t,"type","button"),S(t,"class",r="accordion-control "+i[12]),S(t,"id",i[0]),S(t,"aria-expanded",i[8]),S(t,"aria-controls",f="accordion-panel-"+i[0]),t.disabled=i[2],S(e,"class",b="accordion-item "+i[13]),S(e,"data-testid","accordion-item")},m(g,T){F(g,e,T),W(e,t),p&&p.m(t,null),W(t,n),W(t,l),M&&M.m(l,null),W(t,a),K[s].m(t,null),W(e,u),O&&O.m(e,null),P=!0,k||(d=[ee(t,"click",i[15]),ee(t,"click",i[31]),ee(t,"keydown",i[32]),ee(t,"keyup",i[33]),ee(t,"keypress",i[34])],k=!0)},p(g,T){g[16].lead?p?(p.p(g,T),T[0]&65536&&A(p,1)):(p=St(g),p.c(),A(p,1),p.m(t,n)):p&&(de(),H(p,1,1,()=>{p=null}),he()),y&&y.p&&(!P||T[0]&536870912)&&be(y,R,g,g[29],P?Se(R,g[29],T,pn):ge(g[29]),bt);let m=s;s=w(g),s===m?K[s].p(g,T):(de(),H(K[m],1,1,()=>{K[m]=null}),he(),o=K[s],o?o.p(g,T):(o=K[s]=N[s](g),o.c()),A(o,1),o.m(t,null)),(!P||T[0]&4096&&r!==(r="accordion-control "+g[12]))&&S(t,"class",r),(!P||T[0]&1)&&S(t,"id",g[0]),(!P||T[0]&256)&&S(t,"aria-expanded",g[8]),(!P||T[0]&1&&f!==(f="accordion-panel-"+g[0]))&&S(t,"aria-controls",f),(!P||T[0]&4)&&(t.disabled=g[2]),g[8]?O?(O.p(g,T),T[0]&256&&A(O,1)):(O=vt(g),O.c(),A(O,1),O.m(e,null)):O&&(de(),H(O,1,1,()=>{O=null}),he()),(!P||T[0]&8192&&b!==(b="accordion-item "+g[13]))&&S(e,"class",b)},i(g){P||(A(p),A(M,g),A(o),A(O),P=!0)},o(g){H(p),H(M,g),H(o),H(O),P=!1},d(g){g&&z(e),p&&p.d(),M&&M.d(g),K[s].d(),O&&O.d(),k=!1,tt(d)}}}const Ln="",Nn="text-start w-full flex items-center space-x-4",kt="fill-current w-3 transition-transform duration-[200ms]",Fn="";function Un(i,e,t){let n,l,a,s,o,r,f,u,b=ke,P=()=>(b(),b=un(K,I=>t(28,u=I)),K);i.$$.on_destroy.push(()=>b());let{$$slots:k={},$$scope:d}=e;const p=rn(k),R=wt();let{open:y=!1}=e,{id:M=String(Math.random())}=e,{autocollapse:N=$("autocollapse")}=e,{active:K=$("active")}=e;P();let{disabled:w=$("disabled")}=e,{padding:O=$("padding")}=e,{hover:g=$("hover")}=e,{rounded:T=$("rounded")}=e,{caretOpen:m=$("caretOpen")}=e,{caretClosed:L=$("caretClosed")}=e,{regionControl:h=$("regionControl")}=e,{regionPanel:Z=$("regionPanel")}=e,{regionCaret:J=$("regionCaret")}=e,{transitions:ie=$("transitions")}=e,{transitionIn:V=$("transitionIn")}=e,{transitionInParams:fe=$("transitionInParams")}=e,{transitionOut:Ye=$("transitionOut")}=e,{transitionOutParams:Ee=$("transitionOutParams")}=e;const Qe=`
		<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class={classesControlCaret}>
			<path d="M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" />
		</svg>`;function Re(I){N===!0?K.set(M):t(17,y=!y),Ze(I)}function Ze(I){const Ie=N?u===M:y;R("toggle",{event:I,id:M,panelId:`accordion-panel-${M}`,open:Ie,autocollapse:N})}N&&y&&Re();function Me(I){Fe.call(this,i,I)}function Je(I){Fe.call(this,i,I)}function Te(I){Fe.call(this,i,I)}function De(I){Fe.call(this,i,I)}return i.$$set=I=>{t(37,e=Ve(Ve({},e),He(I))),"open"in I&&t(17,y=I.open),"id"in I&&t(0,M=I.id),"autocollapse"in I&&t(18,N=I.autocollapse),"active"in I&&P(t(1,K=I.active)),"disabled"in I&&t(2,w=I.disabled),"padding"in I&&t(19,O=I.padding),"hover"in I&&t(20,g=I.hover),"rounded"in I&&t(21,T=I.rounded),"caretOpen"in I&&t(22,m=I.caretOpen),"caretClosed"in I&&t(23,L=I.caretClosed),"regionControl"in I&&t(24,h=I.regionControl),"regionPanel"in I&&t(25,Z=I.regionPanel),"regionCaret"in I&&t(26,J=I.regionCaret),"transitions"in I&&t(3,ie=I.transitions),"transitionIn"in I&&t(4,V=I.transitionIn),"transitionInParams"in I&&t(5,fe=I.transitionInParams),"transitionOut"in I&&t(6,Ye=I.transitionOut),"transitionOutParams"in I&&t(7,Ee=I.transitionOutParams),"$$scope"in I&&t(29,d=I.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&393216&&y&&N&&Re(),i.$$.dirty[0]&268828673&&t(8,n=N?u===M:y),t(13,l=`${Ln} ${e.class??""}`),i.$$.dirty[0]&20447232&&t(12,a=`${Nn} ${O} ${g} ${T} ${h}`),i.$$.dirty[0]&12583168&&t(27,s=n?m:L),i.$$.dirty[0]&201326592&&t(11,o=`${kt} ${J} ${s}`),i.$$.dirty[0]&67108864&&t(10,r=`${kt} ${J}`),i.$$.dirty[0]&36175872&&t(9,f=`${Fn} ${O} ${T} ${Z}`)},e=He(e),[M,K,w,ie,V,fe,Ye,Ee,n,f,r,o,a,l,Qe,Re,p,y,N,O,g,T,m,L,h,Z,J,s,u,d,k,Me,Je,Te,De]}class An extends ye{constructor(e){super(),Ce(this,e,Un,Bn,pe,{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 Ue(i){if(!i.endsWith("px"))return;const e=parseFloat(i.slice(0,i.length-2));return isNaN(e)?void 0:e}const Xt=i=>i?"height":"width",$e=i=>window.getComputedStyle(i),et=i=>i.getBoundingClientRect(),wn=(i,e=!0)=>{if(i.getPropertyValue("box-sizing")==="border-box")return;const t=Ue(i.getPropertyValue("border-left-width"));if(t===void 0){console.error("Splitpanes Error: Fail to parse container `border-left-width`.");return}const n=Ue(i.getPropertyValue("border-top-width"));if(n===void 0){console.error("Splitpanes Error: Fail to parse container `border-top-width`.");return}const l={left:t,top:n};if(e){const a=Ue(i.getPropertyValue("border-right-width"));if(a===void 0){console.error("Splitpanes Error: Fail to parse container `border-right-width`.");return}const s=Ue(i.getPropertyValue("border-bottom-width"));if(s===void 0){console.error("Splitpanes Error: Fail to parse container `border-bottom-width`.");return}const o=l;o.right=a,o.bottom=s}return l};function Vn(i,e){e||(e=$e(i));const t=et(i),n=wn(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 zt=(i,e)=>({left:i.left-e.left,top:i.top-e.top});function Pt(i){const e=i,t=i,{clientX:n,clientY:l}="ontouchstart"in window&&t.touches?t.touches[0]:e;return{left:n,top:l}}function pt(i,e,t,n){let l=0;for(let a=e;a<t;a++)l+=n(i[a],a);return l}function Ae(i,e,t,n){for(let l=e;l<t;l++)n(i[l],l)}function Hn(i){let e,t,n,l,a=!qt;const s=i[16].default,o=_e(s,i,i[18],null);return{c(){e=G("div"),t=te(),o&&o.c(),this.h()},l(r){e=j(r,"DIV",{id:!0,class:!0,style:!0});var f=q(e);t=ne(f),o&&o.l(f),f.forEach(z),this.h()},h(){S(e,"id",i[0]),S(e,"class",n=`splitpanes ${i[3]||""} ${i[4]||""}`),S(e,"style",i[2]),ue(e,"splitpanes--horizontal",i[1]),ue(e,"splitpanes--vertical",!i[1]),ue(e,"splitpanes--dragging",i[7]||i[8]),ue(e,"splitpanes--freeze",!i[6])},m(r,f){F(r,e,f),W(e,t),o&&o.m(e,null),i[17](e),l=!0},p(r,f){o&&o.p&&(!l||f[0]&262144)&&be(o,s,r,r[18],l?Se(s,r[18],f,null):ge(r[18]),null),(!l||f[0]&1)&&S(e,"id",r[0]),(!l||f[0]&24&&n!==(n=`splitpanes ${r[3]||""} ${r[4]||""}`))&&S(e,"class",n),(!l||f[0]&4)&&S(e,"style",r[2]),(!l||f[0]&26)&&ue(e,"splitpanes--horizontal",r[1]),(!l||f[0]&26)&&ue(e,"splitpanes--vertical",!r[1]),(!l||f[0]&408)&&ue(e,"splitpanes--dragging",r[7]||r[8]),(!l||f[0]&88)&&ue(e,"splitpanes--freeze",!r[6])},i(r){l||(A(a),A(o,r),l=!0)},o(r){H(a),H(o,r),l=!1},d(r){r&&z(e),o&&o.d(r),i[17](null)}}}const Yt={};function Gn(i,e,t){let n,l,a,{$$slots:s={},$$scope:o}=e,{id:r=void 0}=e,{horizontal:f=!1}=e,{pushOtherPanes:u=!0}=e,{dblClickSplitter:b=!0}=e,{rtl:P="auto"}=e,{firstSplitter:k=!1}=e,{style:d=null}=e,{theme:p="default-theme"}=e,{class:R=""}=e;const y=wt();let M,N=!1,K=!1,w=!1,O=!1,g=!1,T=-1,m=-1,L,h=new Array,Z=we(f);ve(i,Z,c=>t(31,a=c));const J=we(k);ve(i,J,c=>t(30,l=c));const ie=we(void 0);ve(i,ie,c=>t(29,n=c));let V=null,fe=null;x(Yt,{showFirstSplitter:J,veryFirstPaneKey:ie,isHorizontal:Z,ssrRegisterPaneSize:void 0,onPaneInit:c=>(n===void 0&&Pe(ie,n=c,n),{undefinedPaneInitSize:0}),clientOnly:{onPaneAdd:Ee,onPaneRemove:Qe}});function Ee(c){let v=-1;Array.from(c.element.parentNode.children).some(_=>(_.className.includes("splitpanes__pane")&&v++,_===c.element)),v===0&&Pe(ie,n=c.key,n),h.splice(v,0,c);for(let _=0;_<h.length;_++)h[_].index=_;N&&xe().then(()=>{c.isReady=!0,y("pane-add",{index:v,panes:ze()})});const E=(_,B=!0)=>D=>{(B||c.index>0)&&_(D,c)};return{onSplitterDown:E(Zt,!1),onSplitterClick:E(Jt,!1),onSplitterDblClick:E(it),onPaneClick:E(Re),reportGivenSizeChange:E(Ze)}}async function Qe(c){const v=h.findIndex(E=>E.key===c);if(v>=0){const E=h.splice(v,1)[0];for(let _=0;_<h.length;_++)h[_].index=_;v===0&&Pe(ie,n=h.length>0?h[0].key:void 0,n),N&&(await xe(),y("pane-remove",{removed:E,panes:ze()}))}}function Re(c,v){y("pane-click",v)}function Ze(c,v){v.setSz(c),xe()}Vt(()=>{ct(),rt();for(let c=0;c<h.length;c++)h[c].isReady=!0;N=!0,y("ready"),setTimeout(()=>{t(6,w=!0)},0)}),Ht(()=>{N&&Te(),N=!1}),fn(()=>{ct()});function Me(c){if(P==="auto")try{return(c??$e(M)).direction==="rtl"}catch{}return P===!0}function Je(){document.body.style.cursor=Z?"col-resize":"row-resize",document.addEventListener("mousemove",Be,{passive:!1}),document.addEventListener("mouseup",Le),"ontouchstart"in window&&(document.addEventListener("touchmove",Be,{passive:!1}),document.addEventListener("touchend",Le))}function Te(){document.body.style.cursor="",document.removeEventListener("mousemove",Be),document.removeEventListener("mouseup",Le),"ontouchstart"in window&&(document.removeEventListener("touchmove",Be),document.removeEventListener("touchend",Le))}const De=c=>c.nodeType===Node.ELEMENT_NODE&&c.classList.contains("splitpanes__splitter");function I(c,v,E){let _=c[f?"top":"left"];return E&&!f&&(_=v-_),_}const Ie=()=>Xt(f);function Zt(c,v){t(7,O=!0),T=v.index,v.setSplitterActive(!0);let _=v.element;for(;_!=null&&(_=_.previousSibling,!De(_)););if(_==null){console.error("Splitpane Error: Active splitter wasn't found!");return}V=_;const B=Pt(c),D=et(V);fe=I(zt(B,D),D[Ie()],Me()),Je()}function Be(c){if(O){c.preventDefault(),t(8,g=!0);const v=Pt(c),E=$e(M),_=Vn(M,E),B=_[Ie()],D=Me(E),C=zt(v,_),U=I(C,B,D);$t(U,B),y("resize",ze())}}function Le(){g&&y("resized",ze()),t(7,O=!1),h[T].setSplitterActive(!1),setTimeout(()=>{t(8,g=!1),Te()},100)}function Jt(c,v){if("ontouchstart"in window){c.preventDefault();const E=v.index;b&&(m===E?(L&&clearTimeout(L),L=null,it(c,v),m=-1):(m=E,L=setTimeout(()=>{m=-1},500)))}g||y("splitter-click",v)}function it(c,v){if(b){const E=v.index;let _=0;for(let C=0;C<h.length;C++){const U=h[C];C!==E&&(_+=U.min())}const B=Math.min(Math.max(0,100-_),v.max()),D=_+B;if(D>=100)for(let C=0;C<h.length;C++){const U=h[C];U!==v?U.setSz(U.min()):U.setSz(100-_)}else{let C=100-D;v.setSz(B);const U=X=>{const Q=X.min(),le=X.max(),se=Math.min(Math.max(0,C),le-Q);X.setSz(Q+se),C-=se};for(let X=E-1;X>=0;X--)U(h[X]);for(let X=E+1;X<h.length;X++)U(h[X]);C!=0&&console.warn("Splitpanes: there is a left spare size after computation of splitter double click, which means there are issues on the size constains of the panes.")}y("pane-maximize",v),y("resized",ze())}t(7,O=!1)}const ze=()=>h.map(c=>({min:c.min(),max:c.max(),size:c.sz(),snap:c.snap()}));function xt(c,v){const E=le=>et(le)[Ie()],_=E(V);let B=0,D=V.previousSibling;for(;D!=null;)De(D)&&(B+=E(D)),D=D.previousSibling;let C=0,U=V.nextSibling;for(;U!=null;)De(U)&&(C+=E(U)),U=U.nextSibling;const X=B+fe,Q=B+_+C;return(c-X)/(v-Q)*100}function $t(c,v){let E=T-1,_=h[E],B=T,D=h[B],C={prevPanesSize:at(E),nextPanesSize:ot(B),prevReachedMinPanes:0,nextReachedMinPanes:0};const U=0+(u?0:C.prevPanesSize),X=100-(u?0:C.nextPanesSize),Q=Math.max(Math.min(xt(c,v),X),U),le=C.prevPanesSize+_.min()+_.snap(),se=100-(C.nextPanesSize+D.min()+D.snap());let Y=Q,ce=!1;Q<=le?Q>C.prevPanesSize+_.min()&&(Y=Math.max(_.min()+C.prevPanesSize,100-(D.max()+C.nextPanesSize)),ce=!0):Q>=se&&Q<100-C.nextPanesSize-D.min()&&(Y=Math.min(100-(D.min()+C.nextPanesSize),_.max()+C.prevPanesSize),ce=!0);const Ne=_.max()<100&&Y>=_.max()+C.prevPanesSize,on=D.max()<100&&Y<=100-(D.max()+C.nextPanesSize);if(Ne||on)Ne?(_.setSz(_.max()),D.setSz(Math.max(100-_.max()-C.prevPanesSize-C.nextPanesSize,0))):(_.setSz(Math.max(100-D.max()-C.prevPanesSize-C.nextPanesSize,0)),D.setSz(D.max()));else{if(u&&!ce){const ut=en(C,Y);if(!ut)return;({sums:C,paneBeforeIndex:E,paneAfterIndex:B}=ut),_=h[E],D=h[B]}E!=null&&_.setSz(Math.min(Math.max(Y-C.prevPanesSize-C.prevReachedMinPanes,_.min()),_.max())),B!=null&&D.setSz(Math.min(Math.max(100-Y-C.nextPanesSize-C.nextReachedMinPanes,D.min()),D.max()))}}function en(c,v){const E=T-1;let _=E,B=E+1;if(v<c.prevPanesSize+h[_].min()&&(_=tn(E)?.index,c.prevReachedMinPanes=0,_<E&&Ae(h,_+1,E+1,D=>{D.setSz(D.min()),c.prevReachedMinPanes+=D.min()}),c.prevPanesSize=at(_),_==null))return c.prevReachedMinPanes=0,h[0].setSz(h[0].min()),Ae(h,1,E+1,D=>{D.setSz(D.min()),c.prevReachedMinPanes+=D.min()}),h[B].setSz(100-c.prevReachedMinPanes-h[0].min()-c.prevPanesSize-c.nextPanesSize),null;if(v>100-c.nextPanesSize-h[B].min()){B=nn(E)?.index,c.nextReachedMinPanes=0,B>E+1&&Ae(h,E+1,B,C=>{C.setSz(C.min()),c.nextReachedMinPanes+=C.min()}),c.nextPanesSize=ot(B);const D=h.length;if(B==null)return c.nextReachedMinPanes=0,h[D-1].setSz(h[D-1].min()),Ae(h,E+1,D-1,C=>{C.setSz(C.min()),c.nextReachedMinPanes+=C.min()}),h[_].setSz(100-c.prevPanesSize-c.nextReachedMinPanes-h[D-1].min()-c.nextPanesSize),null}return{sums:c,paneBeforeIndex:_,paneAfterIndex:B}}const st=c=>c.sz(),at=c=>pt(h,0,c,st),ot=c=>pt(h,c+1,h.length,st),tn=c=>[...h].reverse().find(v=>v.index<c&&v.sz()>v.min()),nn=c=>h.find(v=>v.index>c+1&&v.sz()>v.min());async function xe(){K=!0,await dn(),K&&(rt(),K=!1)}function rt(){ln(),N&&y("resized",ze())}function ln(){if(h.length===0)return;const c=h.length;let v=100,E=0,_=0,B=0,D=[],C=[];for(let se=0;se<c;se++){const Y=h[se],ce=Y.sz();Y.givenSize==null?Y.isReady?(B+=ce,ce>=Y.max()&&D.push(Y),ce<=Y.min()&&C.push(Y)):_+=1:(v-=ce,E++,D.push(Y),C.push(Y))}const U=c-E,X=U-_;let Q,le;if(X>0?(Q=B/X,Q>.1&&v>.1?(B+=_*Q,le=v/B):(Q=0,le=1)):(Q=v/U,le=1),v+B>.1){v=100;for(let se=0;se<c;se++){const Y=h[se];if(Y.givenSize==null){const ce=Y.isReady?Y.sz():Q,Ne=Math.max(Math.min(ce*le,Y.max()),Y.min());Y.setSz(Ne)}v-=Y.sz()}Math.abs(v)>.1&&(v=sn(v,D,C))}isFinite(v)?Math.abs(v)>.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 sn(c,v,E){const B=h.length-(c>0?v.length:E.length);if(B<=0)return c;const D=c/B;if(h.length===1)h[0].setSz(100),c=0;else for(let C=0;C<h.length;C++){const U=h[C],X=U.sz();if(c>0&&!v.includes(U)){const Q=Math.max(Math.min(X+D,U.max()),U.min()),le=Q-X;c-=le,U.setSz(Q)}else if(!E.includes(U)){const Q=Math.max(Math.min(X+D,U.max()),U.min()),le=Q-X;c-=le,U.setSz(Q)}}return c}function ct(){const{children:c}=M;let v=0,E=!1;for(let _=0;_<c.length;_++){const B=c.item(_),D=B.classList.contains("splitpanes__pane"),C=B.classList.contains("splitpanes__splitter");if(!D&&!C){B.parentNode?.removeChild(B),console.warn("Splitpanes: Only <Pane> elements are allowed at the root of <Splitpanes>. One of your DOM nodes was removed.");return}else D&&(!E&&h[v].element!==B&&(E=!0),v++)}if(E){const _=[];for(let B=0;B<c.length;B++){const D=c.item(B);if(D.classList.contains("splitpanes__pane")){const U=h.find(X=>X.element===D);U!=null?(U.index=_.length,_.push(U)):console.warn("Splitpanes: Internal error - found a <Pane> elements which isn't tracked.")}}h=_,Pe(ie,n=h.length>0?h[0].key:void 0,n)}}function an(c){Ge[c?"unshift":"push"](()=>{M=c,t(5,M)})}return i.$$set=c=>{"id"in c&&t(0,r=c.id),"horizontal"in c&&t(1,f=c.horizontal),"pushOtherPanes"in c&&t(12,u=c.pushOtherPanes),"dblClickSplitter"in c&&t(13,b=c.dblClickSplitter),"rtl"in c&&t(14,P=c.rtl),"firstSplitter"in c&&t(15,k=c.firstSplitter),"style"in c&&t(2,d=c.style),"theme"in c&&t(3,p=c.theme),"class"in c&&t(4,R=c.class),"$$scope"in c&&t(18,o=c.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&2&&Pe(Z,a=f,a),i.$$.dirty[0]&32768&&Pe(J,l=k,l)},[r,f,d,p,R,M,w,O,g,Z,J,ie,u,b,P,k,s,an,o]}class bl extends ye{constructor(e){super(),Ce(this,e,Gn,Hn,pe,{id:0,horizontal:1,pushOtherPanes:12,dblClickSplitter:13,rtl:14,firstSplitter:15,style:2,theme:3,class:4},null,[-1,-1,-1])}}const jn=(i,e)=>t=>{const n=i();n?.[e](t)},Kn=i=>jn.bind(null,i);function Wn(i){let e,t,n,l,a,s,o=(i[4]!==i[9]||i[5])&&yt(i);const r=i[20].default,f=_e(r,i,i[19],null);return{c(){o&&o.c(),e=te(),t=G("div"),f&&f.c(),this.h()},l(u){o&&o.l(u),e=ne(u),t=j(u,"DIV",{class:!0,style:!0});var b=q(t);f&&f.l(b),b.forEach(z),this.h()},h(){S(t,"class",n=`splitpanes__pane ${i[0]||""}`),S(t,"style",i[3])},m(u,b){o&&o.m(u,b),F(u,e,b),F(u,t,b),f&&f.m(t,null),i[21](t),l=!0,a||(s=ee(t,"click",i[11]("onPaneClick")),a=!0)},p(u,b){u[4]!==u[9]||u[5]?o?o.p(u,b):(o=yt(u),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),f&&f.p&&(!l||b&524288)&&be(f,r,u,u[19],l?Se(r,u[19],b,null):ge(u[19]),null),(!l||b&1&&n!==(n=`splitpanes__pane ${u[0]||""}`))&&S(t,"class",n),(!l||b&8)&&S(t,"style",u[3])},i(u){l||(A(f,u),l=!0)},o(u){H(f,u),l=!1},d(u){u&&(z(e),z(t)),o&&o.d(u),f&&f.d(u),i[21](null),a=!1,s()}}}function yt(i){let e,t,n,l;return{c(){e=G("div"),this.h()},l(a){e=j(a,"DIV",{class:!0}),q(e).forEach(z),this.h()},h(){S(e,"class",t="splitpanes__splitter "+(i[2]?"splitpanes__splitter__active":""))},m(a,s){F(a,e,s),n||(l=[ee(e,"mousedown",i[11]("onSplitterDown")),ee(e,"touchstart",i[11]("onSplitterDown")),ee(e,"click",i[11]("onSplitterClick")),ee(e,"dblclick",i[11]("onSplitterDblClick"))],n=!0)},p(a,s){s&4&&t!==(t="splitpanes__splitter "+(a[2]?"splitpanes__splitter__active":""))&&S(e,"class",t)},d(a){a&&z(e),n=!1,tt(l)}}}function qn(i){let e,t,n=!i[10]&&Wn(i);return{c(){n&&n.c(),e=re()},l(l){n&&n.l(l),e=re()},m(l,a){n&&n.m(l,a),F(l,e,a),t=!0},p(l,[a]){l[10]||n.p(l,a)},i(l){t||(A(n),t=!0)},o(l){H(n),t=!1},d(l){l&&z(e),n&&n.d(l)}}}function Xn(i,e,t){let n,l,a,s,o,{$$slots:r={},$$scope:f}=e;const{ssrRegisterPaneSize:u,onPaneInit:b,clientOnly:P,isHorizontal:k,showFirstSplitter:d,veryFirstPaneKey:p}=$(Yt);ve(i,k,V=>t(18,a=V)),ve(i,d,V=>t(5,o=V)),ve(i,p,V=>t(4,s=V));let{size:R=null}=e,{minSize:y=0}=e,{maxSize:M=100}=e,{snapSize:N=0}=e,{class:K=""}=e;const w={},O=!qt,{undefinedPaneInitSize:g}=b(w);let T,m=R??g,L=!1,h;const Z=Kn(()=>h),J=V=>{V!=m&&Z("reportGivenSizeChange")(V)};Vt(()=>{const V={key:w,element:T,givenSize:R,sz:()=>m,setSz:fe=>{t(16,m=fe),R!=null&&R!=m&&t(12,R=m)},min:()=>y,max:()=>M,snap:()=>N,setSplitterActive:fe=>{t(2,L=fe)},isReady:!1};h=P.onPaneAdd(V)}),Ht(()=>{P.onPaneRemove(w)});function ie(V){Ge[V?"unshift":"push"](()=>{T=V,t(1,T)})}return i.$$set=V=>{"size"in V&&t(12,R=V.size),"minSize"in V&&t(13,y=V.minSize),"maxSize"in V&&t(14,M=V.maxSize),"snapSize"in V&&t(15,N=V.snapSize),"class"in V&&t(0,K=V.class),"$$scope"in V&&t(19,f=V.$$scope)},i.$$.update=()=>{i.$$.dirty&4096&&R!=null&&J(R),i.$$.dirty&262144&&t(17,n=Xt(a)),i.$$.dirty&196608&&t(3,l=`${n}: ${m}%;`)},[K,T,L,l,s,o,k,d,p,w,O,Z,R,y,M,N,m,n,a,f,r,ie]}class gl extends ye{constructor(e){super(),Ce(this,e,Xn,qn,pe,{size:12,minSize:13,maxSize:14,snapSize:15,class:0})}}function Ct(i,e,t){const n=i.slice();return n[11]=e[t],n}function Rt(i){let e,t,n;return{c(){e=G("input"),this.h()},l(l){e=j(l,"INPUT",{type:!0}),this.h()},h(){S(e,"type","checkbox")},m(l,a){F(l,e,a),e.checked=i[1][i[2].title],t||(n=ee(e,"change",i[9]),t=!0)},p(l,a){a&6&&(e.checked=l[1][l[2].title])},d(l){l&&z(e),t=!1,n()}}}function Yn(i){let e,t=i[2].teaser+"",n;return{c(){e=G("div"),n=ae(t),this.h()},l(l){e=j(l,"DIV",{class:!0});var a=q(e);n=oe(a,t),a.forEach(z),this.h()},h(){S(e,"class","annotation svelte-vfddhm")},m(l,a){F(l,e,a),W(e,n)},p(l,a){a&4&&t!==(t=l[2].teaser+"")&&Oe(n,t)},d(l){l&&z(e)}}}function Qn(i){let e,t=me(i[7].split(`
`)),n=[];for(let l=0;l<t.length;l+=1)n[l]=Dt(Ct(i,t,l));return{c(){e=G("div");for(let l=0;l<n.length;l+=1)n[l].c();this.h()},l(l){e=j(l,"DIV",{class:!0});var a=q(e);for(let s=0;s<n.length;s+=1)n[s].l(a);a.forEach(z),this.h()},h(){S(e,"class","annotation full-text svelte-vfddhm")},m(l,a){F(l,e,a);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(l,a){if(a&128){t=me(l[7].split(`
`));let s;for(s=0;s<t.length;s+=1){const o=Ct(l,t,s);n[s]?n[s].p(o,a):(n[s]=Dt(o),n[s].c(),n[s].m(e,null))}for(;s<n.length;s+=1)n[s].d(1);n.length=t.length}},d(l){l&&z(e),je(n,l)}}}function Dt(i){let e,t=i[11]+"",n;return{c(){e=G("p"),n=ae(t)},l(l){e=j(l,"P",{});var a=q(e);n=oe(a,t),a.forEach(z)},m(l,a){F(l,e,a),W(e,n)},p(l,a){a&128&&t!==(t=l[11]+"")&&Oe(n,t)},d(l){l&&z(e)}}}function It(i){let e,t,n;return{c(){e=G("a"),t=ae("Открыть документ"),this.h()},l(l){e=j(l,"A",{href:!0,target:!0,style:!0,class:!0});var a=q(e);t=oe(a,"Открыть документ"),a.forEach(z),this.h()},h(){S(e,"href",n=i[5]+"s/"+encodeURIComponent(i[2].title)),S(e,"target","_blank"),Gt(e,"font-weight","500"),S(e,"class","svelte-vfddhm")},m(l,a){F(l,e,a),W(e,t)},p(l,a){a&36&&n!==(n=l[5]+"s/"+encodeURIComponent(l[2].title))&&S(e,"href",n)},d(l){l&&z(e)}}}function Ot(i){let e,t,n;function l(o,r){return o[0][o[3]]?Jn:Zn}let a=l(i),s=a(i);return{c(){e=G("button"),s.c(),this.h()},l(o){e=j(o,"BUTTON",{class:!0});var r=q(e);s.l(r),r.forEach(z),this.h()},h(){S(e,"class","btn-link ml-3")},m(o,r){F(o,e,r),s.m(e,null),t||(n=ee(e,"click",i[10]),t=!0)},p(o,r){a!==(a=l(o))&&(s.d(1),s=a(o),s&&(s.c(),s.m(e,null)))},d(o){o&&z(e),s.d(),t=!1,n()}}}function Zn(i){let e,t;return{c(){e=ae("развернуть "),t=G("i"),this.h()},l(n){e=oe(n,"развернуть "),t=j(n,"I",{class:!0}),q(t).forEach(z),this.h()},h(){S(t,"class","fa fa-angle-down text-xs")},m(n,l){F(n,e,l),F(n,t,l)},d(n){n&&(z(e),z(t))}}}function Jn(i){let e,t;return{c(){e=ae("свернуть "),t=G("i"),this.h()},l(n){e=oe(n,"свернуть "),t=j(n,"I",{class:!0}),q(t).forEach(z),this.h()},h(){S(t,"class","fa fa-angle-up text-xs")},m(n,l){F(n,e,l),F(n,t,l)},d(n){n&&(z(e),z(t))}}}function xn(i){let e,t,n,l,a=i[2].title+"",s,o,r,f,u=i[6]&&Rt(i);function b(R,y){return R[0][R[3]]?Qn:Yn}let P=b(i),k=P(i),d=i[4]&&i[5]&&It(i),p=i[7].length>100&&Ot(i);return{c(){e=G("div"),t=G("div"),n=G("label"),u&&u.c(),l=te(),s=ae(a),o=te(),k.c(),r=te(),d&&d.c(),f=te(),p&&p.c(),this.h()},l(R){e=j(R,"DIV",{class:!0});var y=q(e);t=j(y,"DIV",{class:!0});var M=q(t);n=j(M,"LABEL",{style:!0});var N=q(n);u&&u.l(N),l=ne(N),s=oe(N,a),N.forEach(z),M.forEach(z),o=ne(y),k.l(y),r=ne(y),d&&d.l(y),f=ne(y),p&&p.l(y),y.forEach(z),this.h()},h(){Gt(n,"cursor","pointer"),S(t,"class","title svelte-vfddhm"),S(e,"class","search-result svelte-vfddhm")},m(R,y){F(R,e,y),W(e,t),W(t,n),u&&u.m(n,null),W(n,l),W(n,s),W(e,o),k.m(e,null),W(e,r),d&&d.m(e,null),W(e,f),p&&p.m(e,null)},p(R,[y]){R[6]?u?u.p(R,y):(u=Rt(R),u.c(),u.m(n,l)):u&&(u.d(1),u=null),y&4&&a!==(a=R[2].title+"")&&Oe(s,a),P===(P=b(R))&&k?k.p(R,y):(k.d(1),k=P(R),k&&(k.c(),k.m(e,r))),R[4]&&R[5]?d?d.p(R,y):(d=It(R),d.c(),d.m(e,f)):d&&(d.d(1),d=null),R[7].length>100?p?p.p(R,y):(p=Ot(R),p.c(),p.m(e,null)):p&&(p.d(1),p=null)},i:ke,o:ke,d(R){R&&z(e),u&&u.d(),k.d(),d&&d.d(),p&&p.d()}}}function $n(i,e,t){let{value:n}=e,{showFullText:l=Array(10).fill(!1)}=e,{useSearchResult:a}=e,{index:s}=e,{enableDocumentDb:o=!1}=e,{documentDbUrl:r=""}=e,{enableSearchResultSelection:f=!1}=e,u="";function b(d){t(0,l[d]=!l[d],l)}function P(){a[n.title]=this.checked,t(1,a)}const k=()=>b(s);return i.$$set=d=>{"value"in d&&t(2,n=d.value),"showFullText"in d&&t(0,l=d.showFullText),"useSearchResult"in d&&t(1,a=d.useSearchResult),"index"in d&&t(3,s=d.index),"enableDocumentDb"in d&&t(4,o=d.enableDocumentDb),"documentDbUrl"in d&&t(5,r=d.documentDbUrl),"enableSearchResultSelection"in d&&t(6,f=d.enableSearchResultSelection)},i.$$.update=()=>{i.$$.dirty&4&&t(7,u=n?n.text_for_llm||n.text:"")},[l,a,n,s,o,r,f,u,b,P,k]}class Qt extends ye{constructor(e){super(),Ce(this,e,$n,xn,pe,{value:2,showFullText:0,useSearchResult:1,index:3,enableDocumentDb:4,documentDbUrl:5,enableSearchResultSelection:6})}}function Et(i,e,t){const n=i.slice();return n[31]=e[t],n[34]=e,n[33]=t,n}function Mt(i,e,t){const n=i.slice();return n[27]=e[t][0],n[28]=e[t][1],n}function Tt(i,e,t){const n=i.slice();return n[31]=e[t],n[32]=e,n[33]=t,n}function Bt(i){let e,t,n,l,a=i[3]?"Выбрано LLM":"Все результаты",s,o,r,f,u,b,P,k="Выбрать источники для LLM",d,p,R,y,M,N,K,w=i[2]&&Lt();return{c(){e=G("div"),t=G("button"),n=G("i"),l=ae(` \r
				`),s=ae(a),f=te(),u=G("button"),w&&w.c(),b=te(),P=G("span"),P.textContent=k,p=te(),R=G("button"),y=ae("Группировать по типу"),this.h()},l(O){e=j(O,"DIV",{class:!0});var g=q(e);t=j(g,"BUTTON",{class:!0});var T=q(t);n=j(T,"I",{class:!0}),q(n).forEach(z),l=oe(T,` \r
				`),s=oe(T,a),T.forEach(z),f=ne(g),u=j(g,"BUTTON",{class:!0});var m=q(u);w&&w.l(m),b=ne(m),P=j(m,"SPAN",{"data-svelte-h":!0}),jt(P)!=="svelte-u1xxg4"&&(P.textContent=k),m.forEach(z),p=ne(g),R=j(g,"BUTTON",{class:!0});var L=q(R);y=oe(L,"Группировать по типу"),L.forEach(z),g.forEach(z),this.h()},h(){S(n,"class","fa-solid fa-check"),S(t,"class",o="chip "+(i[3]?"variant-filled-primary":"variant-soft-primary")+" svelte-1egz4bg"),t.disabled=r=i[8].length==0,ue(t,"blinking",i[11]),S(u,"class",d="chip "+i[14]+" svelte-1egz4bg"),u.disabled=i[7],S(R,"class",M="chip "+i[13]+" svelte-1egz4bg"),S(e,"class","w-full flex space-x-2 items-center mb-4")},m(O,g){F(O,e,g),W(e,t),W(t,n),W(t,l),W(t,s),W(e,f),W(e,u),w&&w.m(u,null),W(u,b),W(u,P),W(e,p),W(e,R),W(R,y),N||(K=[ee(t,"click",i[17]),ee(u,"click",i[18]),ee(R,"click",i[19])],N=!0)},p(O,g){g[0]&8&&a!==(a=O[3]?"Выбрано LLM":"Все результаты")&&Oe(s,a),g[0]&8&&o!==(o="chip "+(O[3]?"variant-filled-primary":"variant-soft-primary")+" svelte-1egz4bg")&&S(t,"class",o),g[0]&256&&r!==(r=O[8].length==0)&&(t.disabled=r),g[0]&2056&&ue(t,"blinking",O[11]),O[2]?w||(w=Lt(),w.c(),w.m(u,b)):w&&(w.d(1),w=null),g[0]&16384&&d!==(d="chip "+O[14]+" svelte-1egz4bg")&&S(u,"class",d),g[0]&128&&(u.disabled=O[7]),g[0]&8192&&M!==(M="chip "+O[13]+" svelte-1egz4bg")&&S(R,"class",M)},d(O){O&&z(e),w&&w.d(),N=!1,tt(K)}}}function Lt(i){let e,t='<i class="fa-solid fa-check"></i>';return{c(){e=G("span"),e.innerHTML=t},l(n){e=j(n,"SPAN",{"data-svelte-h":!0}),jt(e)!=="svelte-104b754"&&(e.innerHTML=t)},m(n,l){F(n,e,l)},d(n){n&&z(e)}}}function el(i){let e,t,n=me(i[9]),l=[];for(let s=0;s<n.length;s+=1)l[s]=Nt(Et(i,n,s));const a=s=>H(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s<l.length;s+=1)l[s].c();e=re()},l(s){for(let o=0;o<l.length;o+=1)l[o].l(s);e=re()},m(s,o){for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(s,o);F(s,e,o),t=!0},p(s,o){if(o[0]&629){n=me(s[9]);let r;for(r=0;r<n.length;r+=1){const f=Et(s,n,r);l[r]?(l[r].p(f,o),A(l[r],1)):(l[r]=Nt(f),l[r].c(),A(l[r],1),l[r].m(e.parentNode,e))}for(de(),r=n.length;r<l.length;r+=1)a(r);he()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)A(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)H(l[o]);t=!1},d(s){s&&z(e),je(l,s)}}}function tl(i){let e,t;return e=new vn({props:{$$slots:{default:[sl]},$$scope:{ctx:i}}}),{c(){Ke(e.$$.fragment)},l(n){We(e.$$.fragment,n)},m(n,l){qe(e,n,l),t=!0},p(n,l){const a={};l[0]&4213|l[1]&16&&(a.$$scope={dirty:l,ctx:n}),e.$set(a)},i(n){t||(A(e.$$.fragment,n),t=!0)},o(n){H(e.$$.fragment,n),t=!1},d(n){Xe(e,n)}}}function Nt(i){let e,t,n;function l(s){i[21](s,i[31],i[34],i[33])}let a={index:i[33],enableSearchResultSelection:i[2],useSearchResult:i[0],showFullText:i[4],enableDocumentDb:i[5],documentDbUrl:i[6]};return i[31]!==void 0&&(a.value=i[31]),e=new Qt({props:a}),Ge.push(()=>Wt(e,"value",l)),{c(){Ke(e.$$.fragment)},l(s){We(e.$$.fragment,s)},m(s,o){qe(e,s,o),n=!0},p(s,o){i=s;const r={};o[0]&4&&(r.enableSearchResultSelection=i[2]),o[0]&1&&(r.useSearchResult=i[0]),o[0]&16&&(r.showFullText=i[4]),o[0]&32&&(r.enableDocumentDb=i[5]),o[0]&64&&(r.documentDbUrl=i[6]),!t&&o[0]&512&&(t=!0,r.value=i[31],Kt(()=>t=!1)),e.$set(r)},i(s){n||(A(e.$$.fragment,s),n=!0)},o(s){H(e.$$.fragment,s),n=!1},d(s){Xe(e,s)}}}function Ft(i){let e,t,n,l;return{c(){e=G("input"),this.h()},l(a){e=j(a,"INPUT",{type:!0,"data-doctype":!0}),this.h()},h(){S(e,"type","checkbox"),S(e,"data-doctype",t=i[27])},m(a,s){F(a,e,s),n||(l=ee(e,"click",i[15]),n=!0)},p(a,s){s[0]&4096&&t!==(t=a[27])&&S(e,"data-doctype",t)},d(a){a&&z(e),n=!1,l()}}}function nl(i){let e,t=i[2]&&Ft(i);return{c(){t&&t.c(),e=te()},l(n){t&&t.l(n),e=ne(n)},m(n,l){t&&t.m(n,l),F(n,e,l)},p(n,l){n[2]?t?t.p(n,l):(t=Ft(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(n){n&&z(e),t&&t.d(n)}}}function ll(i){let e=i[27]+"",t;return{c(){t=ae(e)},l(n){t=oe(n,e)},m(n,l){F(n,t,l)},p(n,l){l[0]&4096&&e!==(e=n[27]+"")&&Oe(t,e)},d(n){n&&z(t)}}}function Ut(i){let e,t,n;function l(s){i[20](s,i[31],i[32],i[33])}let a={index:i[33],enableSearchResultSelection:i[2],useSearchResult:i[0],showFullText:i[4],enableDocumentDb:i[5],documentDbUrl:i[6]};return i[31]!==void 0&&(a.value=i[31]),e=new Qt({props:a}),Ge.push(()=>Wt(e,"value",l)),{c(){Ke(e.$$.fragment)},l(s){We(e.$$.fragment,s)},m(s,o){qe(e,s,o),n=!0},p(s,o){i=s;const r={};o[0]&4&&(r.enableSearchResultSelection=i[2]),o[0]&1&&(r.useSearchResult=i[0]),o[0]&16&&(r.showFullText=i[4]),o[0]&32&&(r.enableDocumentDb=i[5]),o[0]&64&&(r.documentDbUrl=i[6]),!t&&o[0]&4096&&(t=!0,r.value=i[31],Kt(()=>t=!1)),e.$set(r)},i(s){n||(A(e.$$.fragment,s),n=!0)},o(s){H(e.$$.fragment,s),n=!1},d(s){Xe(e,s)}}}function il(i){let e,t,n=me(i[28]),l=[];for(let s=0;s<n.length;s+=1)l[s]=Ut(Tt(i,n,s));const a=s=>H(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s<l.length;s+=1)l[s].c();e=te()},l(s){for(let o=0;o<l.length;o+=1)l[o].l(s);e=ne(s)},m(s,o){for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(s,o);F(s,e,o),t=!0},p(s,o){if(o[0]&4213){n=me(s[28]);let r;for(r=0;r<n.length;r+=1){const f=Tt(s,n,r);l[r]?(l[r].p(f,o),A(l[r],1)):(l[r]=Ut(f),l[r].c(),A(l[r],1),l[r].m(e.parentNode,e))}for(de(),r=n.length;r<l.length;r+=1)a(r);he()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)A(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)H(l[o]);t=!1},d(s){s&&z(e),je(l,s)}}}function At(i){let e,t;return e=new An({props:{$$slots:{content:[il],summary:[ll],lead:[nl]},$$scope:{ctx:i}}}),{c(){Ke(e.$$.fragment)},l(n){We(e.$$.fragment,n)},m(n,l){qe(e,n,l),t=!0},p(n,l){const a={};l[0]&4213|l[1]&16&&(a.$$scope={dirty:l,ctx:n}),e.$set(a)},i(n){t||(A(e.$$.fragment,n),t=!0)},o(n){H(e.$$.fragment,n),t=!1},d(n){Xe(e,n)}}}function sl(i){let e,t,n=me(Object.entries(i[12])),l=[];for(let s=0;s<n.length;s+=1)l[s]=At(Mt(i,n,s));const a=s=>H(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s<l.length;s+=1)l[s].c();e=re()},l(s){for(let o=0;o<l.length;o+=1)l[o].l(s);e=re()},m(s,o){for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(s,o);F(s,e,o),t=!0},p(s,o){if(o[0]&36981){n=me(Object.entries(s[12]));let r;for(r=0;r<n.length;r+=1){const f=Mt(s,n,r);l[r]?(l[r].p(f,o),A(l[r],1)):(l[r]=At(f),l[r].c(),A(l[r],1),l[r].m(e.parentNode,e))}for(de(),r=n.length;r<l.length;r+=1)a(r);he()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)A(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)H(l[o]);t=!1},d(s){s&&z(e),je(l,s)}}}function al(i){let e,t,n,l,a,s,o,r=i[1]&&i[1].length>0&&Bt(i);const f=[tl,el],u=[];function b(k,d){return k[10]&&k[12]?0:1}n=b(i),l=u[n]=f[n](i);let P=ol;return{c(){e=G("div"),r&&r.c(),t=te(),l.c(),a=te(),s=re(),this.h()},l(k){e=j(k,"DIV",{class:!0});var d=q(e);r&&r.l(d),t=ne(d),l.l(d),d.forEach(z),a=ne(k),s=re(),this.h()},h(){S(e,"class","search-results svelte-1egz4bg")},m(k,d){F(k,e,d),r&&r.m(e,null),W(e,t),u[n].m(e,null),F(k,a,d),F(k,s,d),o=!0},p(k,d){k[1]&&k[1].length>0?r?r.p(k,d):(r=Bt(k),r.c(),r.m(e,t)):r&&(r.d(1),r=null);let p=n;n=b(k),n===p?u[n].p(k,d):(de(),H(u[p],1,1,()=>{u[p]=null}),he(),l=u[n],l?l.p(k,d):(l=u[n]=f[n](k),l.c()),A(l,1),l.m(e,null))},i(k){o||(A(l),A(P),o=!0)},o(k){H(l),H(P),o=!1},d(k){k&&(z(e),z(a),z(s)),r&&r.d(),u[n].d()}}}let ol=!1;function rl(i,e,t){let n,l,{enableDocumentDb:a=!1}=e,{documentDbUrl:s=""}=e,{showFullText:o=Array(10).fill(!1)}=e,{useSearchResult:r}=e,{searchInTransactionLedger:f=!1}=e,{searchResults:u=[]}=e,{usedSearchResults:b=[]}=e,P=[],{enableSearchResultSelection:k=!1}=e,{showOnlyLlmUsed:d=!1}=e,p=!1;const R=()=>{t(11,p=!0),setTimeout(()=>{t(11,p=!1)},5e3)};let y=!1,M;const N=L=>L.reduce((h,Z)=>{const J=Z.docType||"Другие документы";return h[J]||(h[J]=[]),h[J].push(Z),h},{}),K=L=>{L.stopPropagation();const h=L.target.dataset.doctype;Object.keys(M[h]).forEach(Z=>{t(0,r[M[h][Z].title]=L.target.checked,r)})},w=()=>{t(3,d=!d)},O=()=>{t(2,k=!k)},g=()=>{t(10,y=!y)};function T(L,h,Z,J){Z[J]=L}function m(L,h,Z,J){Z[J]=L,t(9,P),t(10,y),t(3,d),t(8,b),t(1,u)}return i.$$set=L=>{"enableDocumentDb"in L&&t(5,a=L.enableDocumentDb),"documentDbUrl"in L&&t(6,s=L.documentDbUrl),"showFullText"in L&&t(4,o=L.showFullText),"useSearchResult"in L&&t(0,r=L.useSearchResult),"searchInTransactionLedger"in L&&t(7,f=L.searchInTransactionLedger),"searchResults"in L&&t(1,u=L.searchResults),"usedSearchResults"in L&&t(8,b=L.usedSearchResults),"enableSearchResultSelection"in L&&t(2,k=L.enableSearchResultSelection),"showOnlyLlmUsed"in L&&t(3,d=L.showOnlyLlmUsed)},i.$$.update=()=>{i.$$.dirty[0]&1536&&(y&&t(12,M=N(P)),t(9,P=bn.sortByRelevance(P))),i.$$.dirty[0]&1&&r===void 0&&t(0,r={}),i.$$.dirty[0]&4&&t(14,n=k?"variant-filled-primary":"variant-soft-primary"),i.$$.dirty[0]&1024&&t(13,l=y?"variant-filled-primary":"variant-soft-primary"),i.$$.dirty[0]&264&&t(3,d=b.length!==0&&d),i.$$.dirty[0]&266&&t(9,P=d?b:u)},[r,u,k,d,o,a,s,f,b,P,y,p,M,l,n,K,R,w,O,g,T,m]}class Sl extends ye{constructor(e){super(),Ce(this,e,rl,al,pe,{enableDocumentDb:5,documentDbUrl:6,showFullText:4,useSearchResult:0,searchInTransactionLedger:7,searchResults:1,usedSearchResults:8,enableSearchResultSelection:2,showOnlyLlmUsed:3,blinkButton:16},null,[-1,-1])}get blinkButton(){return this.$$.ctx[16]}}export{gl as P,bl as S,Sl as a};