1import{S as ee,i as le,s as te,a3 as ne,c as N,m as q,o as p,t as z,l as H,G as E,e as pe,f as C,I as S,k as V,n as F,p as D,q as ye,V as ze,b as K,F as A,K as R,B as b,C as O,O as B,D as y,H as ie,J as se,N as ae,a2 as Ge,ak as Be,v as Ae,a7 as Ce,g as De,h as Ee,x as Ie}from"./index.a6771086.js";import{g as Ne,a as qe}from"./Empty.svelte_svelte_type_style_lang.d6377f22.js";import{B as He}from"./BlockLabel.b490a462.js";import{E as Le}from"./Empty.b61eaa47.js";import{n as U}from"./ModifyUpload.svelte_svelte_type_style_lang.e946db2d.js";import{M as Re}from"./ModifyUpload.40e06d67.js";/* empty css */import{I as oe}from"./Image.10222f9e.js";function P(l,t,e){const n=l.slice();return n[31]=t[e][0],n[32]=t[e][1],n[34]=e,n}function Q(l,t,e){const n=l.slice();return n[31]=t[e],n[35]=t,n[34]=e,n}function W(l){let t,e;return t=new He({props:{show_label:l[0],Icon:oe,label:l[1]||"Gallery",disable:typeof l[3].container=="boolean"&&!l[3].container}}),{c(){N(t.$$.fragment)},m(n,i){q(t,n,i),e=!0},p(n,i){const o={};i[0]&1&&(o.show_label=n[0]),i[0]&2&&(o.label=n[1]||"Gallery"),i[0]&8&&(o.disable=typeof n[3].container=="boolean"&&!n[3].container),t.$set(o)},i(n){e||(p(t.$$.fragment,n),e=!0)},o(n){z(t.$$.fragment,n),e=!1},d(n){H(t,n)}}}function Se(l){let t,e,n,i,o,m=l[4]!==null&&X(l),f=l[7],a=[];for(let s=0;s<f.length;s+=1)a[s]=x(P(l,f,s));return{c(){m&&m.c(),t=E(),e=A("div"),n=A("div");for(let s=0;s<a.length;s+=1)a[s].c();b(n,"class","grid-container svelte-1tkea93"),b(n,"style",l[10]),B(n,"pt-6",l[0]),b(e,"class","grid-wrap svelte-1tkea93"),ne(()=>l[26].call(e)),B(e,"fixed-height",!l[3].height||l[3].height=="auto")},m(s,c){m&&m.m(s,c),C(s,t,c),C(s,e,c),y(e,n);for(let h=0;h<a.length;h+=1)a[h].m(n,null);i=Be(e,l[26].bind(e)),o=!0},p(s,c){if(s[4]!==null?m?(m.p(s,c),c[0]&16&&p(m,1)):(m=X(s),m.c(),p(m,1),m.m(t.parentNode,t)):m&&(V(),z(m,1,1,()=>{m=null}),F()),c[0]&2192){f=s[7];let h;for(h=0;h<f.length;h+=1){const u=P(s,f,h);a[h]?a[h].p(u,c):(a[h]=x(u),a[h].c(),a[h].m(n,null))}for(;h<a.length;h+=1)a[h].d(1);a.length=f.length}(!o||c[0]&1024)&&b(n,"style",s[10]),c[0]&1&&B(n,"pt-6",s[0]),c[0]&8&&B(e,"fixed-height",!s[3].height||s[3].height=="auto")},i(s){o||(p(m),o=!0)},o(s){z(m),o=!1},d(s){m&&m.d(s),s&&D(t),s&&D(e),ae(a,s),i()}}}function je(l){let t,e;return t=new Le({props:{size:"large",unpadded_box:!0,$$slots:{default:[Me]},$$scope:{ctx:l}}}),{c(){N(t.$$.fragment)},m(n,i){q(t,n,i),e=!0},p(n,i){const o={};i[1]&32&&(o.$$scope={dirty:i,ctx:n}),t.$set(o)},i(n){e||(p(t.$$.fragment,n),e=!0)},o(n){z(t.$$.fragment,n),e=!1},d(n){H(t,n)}}}function X(l){let t,e,n,i,o,m,f,a,s,c,h,u,d;e=new Re({}),e.$on("clear",l[20]);let _=l[7][l[4]][1]&&Y(l),G=l[7],k=[];for(let r=0;r<G.length;r+=1)k[r]=Z(Q(l,G,r));return{c(){t=A("div"),N(e.$$.fragment),n=E(),i=A("img"),a=E(),_&&_.c(),s=E(),c=A("div");for(let r=0;r<k.length;r+=1)k[r].c();R(i.src,o=l[7][l[4]][0].data)||b(i,"src",o),b(i,"alt",m=l[7][l[4]][1]||""),b(i,"title",f=l[7][l[4]][1]||null),O(i,"height","calc(100% - "+(l[7][l[4]][1]?"80px":"60px")+")"),b(i,"class","svelte-1tkea93"),B(i,"with-caption",!!l[7][l[4]][1]),b(c,"class","thumbnails scroll-hide svelte-1tkea93"),b(t,"class","preview svelte-1tkea93"),B(t,"fixed-height",l[3].height!=="auto")},m(r,v){C(r,t,v),q(e,t,null),y(t,n),y(t,i),y(t,a),_&&_.m(t,null),y(t,s),y(t,c);for(let w=0;w<k.length;w+=1)k[w].m(c,null);l[24](c),h=!0,u||(d=[S(i,"click",l[21]),S(t,"keydown",l[13])],u=!0)},p(r,v){if((!h||v[0]&144&&!R(i.src,o=r[7][r[4]][0].data))&&b(i,"src",o),(!h||v[0]&144&&m!==(m=r[7][r[4]][1]||""))&&b(i,"alt",m),(!h||v[0]&144&&f!==(f=r[7][r[4]][1]||null))&&b(i,"title",f),(!h||v[0]&144)&&O(i,"height","calc(100% - "+(r[7][r[4]][1]?"80px":"60px")+")"),v[0]&144&&B(i,"with-caption",!!r[7][r[4]][1]),r[7][r[4]][1]?_?_.p(r,v):(_=Y(r),_.c(),_.m(t,s)):_&&(_.d(1),_=null),v[0]&400){G=r[7];let w;for(w=0;w<G.length;w+=1){const I=Q(r,G,w);k[w]?k[w].p(I,v):(k[w]=Z(I),k[w].c(),k[w].m(c,null))}for(;w<k.length;w+=1)k[w].d(1);k.length=G.length}v[0]&8&&B(t,"fixed-height",r[3].height!=="auto")},i(r){h||(p(e.$$.fragment,r),h=!0)},o(r){z(e.$$.fragment,r),h=!1},d(r){r&&D(t),H(e),_&&_.d(),ae(k,r),l[24](null),u=!1,Ge(d)}}}function Y(l){let t,e=l[7][l[4]][1]+"",n;return{c(){t=A("div"),n=ie(e),b(t,"class","caption svelte-1tkea93")},m(i,o){C(i,t,o),y(t,n)},p(i,o){o[0]&144&&e!==(e=i[7][i[4]][1]+"")&&se(n,e)},d(i){i&&D(t)}}}function Z(l){let t,e,n,i,o,m,f=l[34],a,s;const c=()=>l[22](t,f),h=()=>l[22](null,f);function u(){return l[23](l[34])}return{c(){t=A("button"),e=A("img"),m=E(),R(e.src,n=l[31][0].data)||b(e,"src",n),b(e,"title",i=l[31][1]||null),b(e,"alt",o=l[31][1]||null),b(e,"class","svelte-1tkea93"),b(t,"class","thumbnail-item thumbnail-small svelte-1tkea93"),B(t,"selected",l[4]===l[34])},m(d,_){C(d,t,_),y(t,e),y(t,m),c(),a||(s=S(t,"click",u),a=!0)},p(d,_){l=d,_[0]&128&&!R(e.src,n=l[31][0].data)&&b(e,"src",n),_[0]&128&&i!==(i=l[31][1]||null)&&b(e,"title",i),_[0]&128&&o!==(o=l[31][1]||null)&&b(e,"alt",o),f!==l[34]&&(h(),f=l[34],c()),_[0]&16&&B(t,"selected",l[4]===l[34])},d(d){d&&D(t),h(),a=!1,s()}}}function $(l){let t,e=l[32]+"",n;return{c(){t=A("div"),n=ie(e),b(t,"class","caption-label svelte-1tkea93")},m(i,o){C(i,t,o),y(t,n)},p(i,o){o[0]&128&&e!==(e=i[32]+"")&&se(n,e)},d(i){i&&D(t)}}}function x(l){let t,e,n,i,o,m,f,a,s=l[32]&&$(l);function c(){return l[25](l[34])}return{c(){t=A("button"),e=A("img"),o=E(),s&&s.c(),m=E(),b(e,"alt",n=l[32]||""),R(e.src,i=typeof l[31]=="string"?l[31]:l[31].data)||b(e,"src",i),b(e,"class","svelte-1tkea93"),b(t,"class","thumbnail-item thumbnail-lg svelte-1tkea93"),B(t,"selected",l[4]===l[34])},m(h,u){C(h,t,u),y(t,e),y(t,o),s&&s.m(t,null),y(t,m),f||(a=S(t,"click",c),f=!0)},p(h,u){l=h,u[0]&128&&n!==(n=l[32]||"")&&b(e,"alt",n),u[0]&128&&!R(e.src,i=typeof l[31]=="string"?l[31]:l[31].data)&&b(e,"src",i),l[32]?s?s.p(l,u):(s=$(l),s.c(),s.m(t,m)):s&&(s.d(1),s=null),u[0]&16&&B(t,"selected",l[4]===l[34])},d(h){h&&D(t),s&&s.d(),f=!1,a()}}}function Me(l){let t,e;return t=new oe({}),{c(){N(t.$$.fragment)},m(n,i){q(t,n,i),e=!0},i(n){e||(p(t.$$.fragment,n),e=!0)},o(n){z(t.$$.fragment,n),e=!1},d(n){H(t,n)}}}function Te(l){let t,e,n,i,o,m,f;ne(l[19]);let a=l[0]&&W(l);const s=[je,Se],c=[];function h(u,d){return u[2]===null||u[7]===null||u[7].length===0?0:1}return e=h(l),n=c[e]=s[e](l),{c(){a&&a.c(),t=E(),n.c(),i=pe()},m(u,d){a&&a.m(u,d),C(u,t,d),c[e].m(u,d),C(u,i,d),o=!0,m||(f=S(window,"resize",l[19]),m=!0)},p(u,d){u[0]?a?(a.p(u,d),d[0]&1&&p(a,1)):(a=W(u),a.c(),p(a,1),a.m(t.parentNode,t)):a&&(V(),z(a,1,1,()=>{a=null}),F());let _=e;e=h(u),e===_?c[e].p(u,d):(V(),z(c[_],1,1,()=>{c[_]=null}),F(),n=c[e],n?n.p(u,d):(n=c[e]=s[e](u),n.c()),p(n,1),n.m(i.parentNode,i))},i(u){o||(p(a),p(n),o=!0)},o(u){z(a),z(n),o=!1},d(u){a&&a.d(u),u&&D(t),c[e].d(u),u&&D(i),m=!1,f()}}}function Ve(l,t,e){let n,i,o,m,f,{show_label:a=!0}=t,{label:s}=t,{root:c=""}=t,{root_url:h=null}=t,{value:u=null}=t,{style:d={grid:[2],height:"auto"}}=t;const _=ye();let G=!0,k=u,r=null,v=null;function w(g){switch(g.code){case"Escape":g.preventDefault(),e(4,r=null);break;case"ArrowLeft":g.preventDefault(),e(4,r=i);break;case"ArrowRight":g.preventDefault(),e(4,r=o);break}}let I=[],L;async function re(g){if(typeof g!="number")return;await ze(),I[g].focus();const{left:T,width:ke}=L.getBoundingClientRect(),{left:we,width:ve}=I[g].getBoundingClientRect(),J=we-T+ve/2-ke/2+L.scrollLeft;L.scrollTo({left:J<0?0:J,behavior:"smooth"})}function fe(g){return e(10,f=Ne(g,["grid"]).styles),f+` height: ${g.height}`}let j=0,M=0;function ue(){e(6,M=window.innerHeight)}const _e=()=>e(4,r=null),ce=()=>e(4,r=o);function me(g,T){K[g?"unshift":"push"](()=>{I[T]=g,e(8,I)})}const he=g=>e(4,r=g);function ge(g){K[g?"unshift":"push"](()=>{L=g,e(9,L)})}const be=g=>e(4,r=m?g:r);
1function de(){j=this.clientHeight,e(5,j)}return l.$$set=g=>{"show_label"in g&&e(0,a=g.show_label),"label"in g&&e(1,s=g.label),"root"in g&&e(14,c=g.root),"root_url"in g&&e(15,h=g.root_url),"value"in g&&e(2,u=g.value),"style"in g&&e(3,d=g.style)},l.$$.update=()=>{l.$$.dirty[0]&65540&&e(16,G=u==null||u.length==0?!0:G),l.$$.dirty[0]&49156&&e(7,n=u===null?null:u.map(g=>Array.isArray(g)?[U(g[0],c,h),g[1]]:[U(g,c,h),null])),l.$$.dirty[0]&196636&&k!==u&&(G?(e(4,r=d.preview?0:null),e(16,G=!1)):e(4,r=r!==null&&u!==null&&r<u.length?r:null),e(17,k=u)),l.$$.dirty[0]&144&&(i=((r??0)+(n?.length??0)-1)%(n?.length??0)),l.$$.dirty[0]&144&&e(12,o=((r??0)+1)%(n?.length??0)),l.$$.dirty[0]&262288&&r!==v&&(e(18,v=r),r!==null&&_("select",{index:r,value:n?.[r][1]})),l.$$.dirty[0]&16&&re(r),l.$$.dirty[0]&96&&e(11,m=M>=j),l.$$.dirty[0]&8&&e(10,f=fe(d))},[a,s,u,d,r,j,M,n,I,L,f,m,o,w,c,h,G,k,v,ue,_e,ce,me,he,ge,be,de]}class Fe extends ee{constructor(t){super(),le(this,t,Ve,Te,te,{show_label:0,label:1,root:14,root_url:15,value:2,style:3},null,[-1,-1])}}function Je(l){let t,e,n,i;const o=[l[0]];let m={};for(let f=0;f<o.length;f+=1)m=Ae(m,o[f]);return t=new Ce({props:m}),n=new Fe({props:{label:l[2],value:l[8],style:l[9],show_label:l[1],root:l[3],root_url:l[4]}}),n.$on("select",l[10]),{c(){N(t.$$.fragment),e=E(),N(n.$$.fragment)},m(f,a){q(t,f,a),C(f,e,a),q(n,f,a),i=!0},p(f,a){const s=a&1?De(o,[Ee(f[0])]):{};t.$set(s);const c={};a&4&&(c.label=f[2]),a&256&&(c.value=f[8]),a&512&&(c.style=f[9]),a&2&&(c.show_label=f[1]),a&8&&(c.root=f[3]),a&16&&(c.root_url=f[4]),n.$set(c)},i(f){i||(p(t.$$.fragment,f),p(n.$$.fragment,f),i=!0)},o(f){z(t.$$.fragment,f),z(n.$$.fragment,f),i=!1},d(f){H(t,f),f&&D(e),H(n,f)}}}function Ke(l){let t,e;return t=new qe({props:{visible:l[7],variant:"solid",padding:!1,elem_id:l[5],elem_classes:l[6],disable:typeof l[9].container=="boolean"&&!l[9].container,$$slots:{default:[Je]},$$scope:{ctx:l}}}),{c(){N(t.$$.fragment)},m(n,i){q(t,n,i),e=!0},p(n,[i]){const o={};i&128&&(o.visible=n[7]),i&32&&(o.elem_id=n[5]),i&64&&(o.elem_classes=n[6]),i&512&&(o.disable=typeof n[9].container=="boolean"&&!n[9].container),i&2847&&(o.$$scope={dirty:i,ctx:n}),t.$set(o)},i(n){e||(p(t.$$.fragment,n),e=!0)},o(n){z(t.$$.fragment,n),e=!1},d(n){H(t,n)}}}function Oe(l,t,e){let{loading_status:n}=t,{show_label:i}=t,{label:o}=t,{root:m}=t,{root_url:f}=t,{elem_id:a=""}=t,{elem_classes:s=[]}=t,{visible:c=!0}=t,{value:h=null}=t,{style:u={}}=t;function d(_){Ie.call(this,l,_)}return l.$$set=_=>{"loading_status"in _&&e(0,n=_.loading_status),"show_label"in _&&e(1,i=_.show_label),"label"in _&&e(2,o=_.label),"root"in _&&e(3,m=_.root),"root_url"in _&&e(4,f=_.root_url),"elem_id"in _&&e(5,a=_.elem_id),"elem_classes"in _&&e(6,s=_.elem_classes),"visible"in _&&e(7,c=_.visible),"value"in _&&e(8,h=_.value),"style"in _&&e(9,u=_.style)},[n,i,o,m,f,a,s,c,h,u,d]}class Ue extends ee{constructor(t){super(),le(this,t,Oe,Ke,te,{loading_status:0,show_label:1,label:2,root:3,root_url:4,elem_id:5,elem_classes:6,visible:7,value:8,style:9})}}var ll=Ue;const tl=["static"],nl=l=>({type:{payload:"Array<{ name: string } | [{ name: string }, string]>"},description:{payload:"list of objects, with filename and optional caption,"}});export{ll as Component,nl as document,tl as modes}; 2//# sourceMappingURL=index.7e8dc02d.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.