fix: handle parent window access error in Colab environment
parent
82771115d5
commit
68b39c20f8
|
|
@ -13,7 +13,7 @@ Promise.resolve().then(async () => {
|
|||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Infinite Image Browsing</title>
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-291103b4.js"></script>
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-5b5fdd56.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-3112bec6.css">
|
||||
</head>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
import{d as E,bx as $,r as f,m as M,_ as T,a as c,al as W,h as m,c as v,P as z}from"./index-291103b4.js";var G=["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"],H={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:z.any,required:Boolean};const L=E({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:$(H,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup:function(a,d){var t=d.attrs,h=d.emit,x=d.expose,o=f(a.checked===void 0?a.defaultChecked:a.checked),i=f();M(function(){return a.checked},function(){o.value=a.checked}),x({focus:function(){var e;(e=i.value)===null||e===void 0||e.focus()},blur:function(){var e;(e=i.value)===null||e===void 0||e.blur()}});var l=f(),g=function(e){if(!a.disabled){a.checked===void 0&&(o.value=e.target.checked),e.shiftKey=l.value;var r={target:c(c({},a),{},{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e};a.checked!==void 0&&(i.value.checked=!!a.checked),h("change",r),l.value=!1}},C=function(e){h("click",e),l.value=e.shiftKey};return function(){var n,e=a.prefixCls,r=a.name,s=a.id,p=a.type,b=a.disabled,K=a.readonly,P=a.tabindex,B=a.autofocus,S=a.value,N=a.required,_=T(a,G),q=t.class,D=t.onFocus,j=t.onBlur,w=t.onKeydown,A=t.onKeypress,F=t.onKeyup,y=c(c({},_),t),O=Object.keys(y).reduce(function(k,u){return(u.substr(0,5)==="aria-"||u.substr(0,5)==="data-"||u==="role")&&(k[u]=y[u]),k},{}),R=W(e,q,(n={},m(n,"".concat(e,"-checked"),o.value),m(n,"".concat(e,"-disabled"),b),n)),V=c(c({name:r,id:s,type:p,readonly:K,disabled:b,tabindex:P,class:"".concat(e,"-input"),checked:!!o.value,autofocus:B,value:S},O),{},{onChange:g,onClick:C,onFocus:D,onBlur:j,onKeydown:w,onKeypress:A,onKeyup:F,required:N});return v("span",{class:R},[v("input",c({ref:i},V),null),v("span",{class:"".concat(e,"-inner")},null)])}}});export{L as V};
|
||||
import{d as E,bx as $,r as f,m as M,_ as T,a as c,al as W,h as m,c as v,P as z}from"./index-5b5fdd56.js";var G=["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"],H={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:z.any,required:Boolean};const L=E({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:$(H,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup:function(a,d){var t=d.attrs,h=d.emit,x=d.expose,o=f(a.checked===void 0?a.defaultChecked:a.checked),i=f();M(function(){return a.checked},function(){o.value=a.checked}),x({focus:function(){var e;(e=i.value)===null||e===void 0||e.focus()},blur:function(){var e;(e=i.value)===null||e===void 0||e.blur()}});var l=f(),g=function(e){if(!a.disabled){a.checked===void 0&&(o.value=e.target.checked),e.shiftKey=l.value;var r={target:c(c({},a),{},{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e};a.checked!==void 0&&(i.value.checked=!!a.checked),h("change",r),l.value=!1}},C=function(e){h("click",e),l.value=e.shiftKey};return function(){var n,e=a.prefixCls,r=a.name,s=a.id,p=a.type,b=a.disabled,K=a.readonly,P=a.tabindex,B=a.autofocus,S=a.value,N=a.required,_=T(a,G),q=t.class,D=t.onFocus,j=t.onBlur,w=t.onKeydown,A=t.onKeypress,F=t.onKeyup,y=c(c({},_),t),O=Object.keys(y).reduce(function(k,u){return(u.substr(0,5)==="aria-"||u.substr(0,5)==="data-"||u==="role")&&(k[u]=y[u]),k},{}),R=W(e,q,(n={},m(n,"".concat(e,"-checked"),o.value),m(n,"".concat(e,"-disabled"),b),n)),V=c(c({name:r,id:s,type:p,readonly:K,disabled:b,tabindex:P,class:"".concat(e,"-input"),checked:!!o.value,autofocus:B,value:S},O),{},{onChange:g,onClick:C,onFocus:D,onBlur:j,onKeydown:w,onKeypress:A,onKeyup:F,required:N});return v("span",{class:R},[v("input",c({ref:i},V),null),v("span",{class:"".concat(e,"-inner")},null)])}}});export{L as V};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{d as a,S as t,T as s,c as n,cx as _,Z as o}from"./index-291103b4.js";const c={class:"img-sli-container"},i=a({__name:"ImgSliPagePane",props:{paneIdx:{},tabIdx:{},left:{},right:{}},setup(l){return(e,r)=>(t(),s("div",c,[n(_,{left:e.left,right:e.right},null,8,["left","right"])]))}});const d=o(i,[["__scopeId","data-v-ae3fb9a8"]]);export{d as default};
|
||||
import{d as a,S as t,T as s,c as n,cx as _,Z as o}from"./index-5b5fdd56.js";const c={class:"img-sli-container"},i=a({__name:"ImgSliPagePane",props:{paneIdx:{},tabIdx:{},left:{},right:{}},setup(l){return(e,r)=>(t(),s("div",c,[n(_,{left:e.left,right:e.right},null,8,["left","right"])]))}});const d=o(i,[["__scopeId","data-v-ae3fb9a8"]]);export{d as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{d as ce,m as F,ax as re,$ as pe,S as p,T as I,c as l,a2 as e,a1 as n,a4 as R,U as d,J as me,W as o,V as u,a0 as V,ad as ue,Y as _,ae as z,ag as ge,R as fe,ai as G,aN as ve,aO as he,bz as Ie,Z as _e}from"./index-291103b4.js";import{S as ke}from"./index-99a11040.js";import{L as Ce,R as we,f as Se,_ as be}from"./MultiSelectKeep-b801971c.js";import{c as xe,d as ye,F as Me}from"./FileItem-05696d6c.js";import{c as Ae,u as Te}from"./hook-8fcf40ff.js";import{a as $e}from"./functionalCallableComp-33cd562d.js";import"./shortcut-9b128798.js";import"./Checkbox-12aa1d4b.js";/* empty css */import"./index-89cb307c.js";import"./index-2541210c.js";import"./_isIterateeCall-e0eaeb93.js";import"./useGenInfoDiff-7fd793c7.js";const De=c=>(ve("data-v-caebce58"),c=c(),he(),c),Fe={class:"hint"},Re={class:"action-bar"},Ve=De(()=>d("div",{style:{padding:"16px 0 512px"}},null,-1)),ze={key:1},Ge={class:"no-res-hint"},Be={class:"hint"},Ne={key:2,class:"preview-switch"},Ue=ce({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(c){const g=c,f=Ae(t=>Ie(g.selectedTagIds,t)),{queue:B,images:i,onContextMenuClickU:k,stackViewEl:N,previewIdx:r,previewing:C,onPreviewVisibleChange:U,previewImgMove:w,canPreview:S,itemSize:b,gridItems:J,showGenInfo:m,imageGenInfo:x,q:E,multiSelectedIdxs:v,onFileItemClick:L,scroller:y,showMenuIdx:h,onFileDragStart:O,onFileDragEnd:P,cellWidth:W,onScroll:M,saveAllFileAsJson:q,props:K,saveLoadedFileAsJson:Q,changeIndchecked:Y,seedChangeChecked:Z,getGenDiff:j,getGenDiffWatchDep:H}=Te(f);F(()=>g.selectedTagIds,async()=>{var t;await f.reset(),await re(),(t=y.value)==null||t.scrollToItem(0),M()},{immediate:!0}),F(()=>g,async t=>{K.value=t},{deep:!0,immediate:!0});const X=pe(),{onClearAllSelected:ee,onSelectAll:te,onReverseSelect:se}=xe();return(t,s)=>{const le=be,ne=ge,ae=fe,A=G,ie=G,oe=ke;return p(),I("div",{class:"container",ref_key:"stackViewEl",ref:N},[l(le,{show:!!e(v).length||e(X).keepMultiSelect,onClearAllSelected:e(ee),onSelectAll:e(te),onReverseSelect:e(se)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),l(oe,{size:"large",spinning:!e(B).isIdle},{default:n(()=>{var T,$;return[l(ae,{visible:e(m),"onUpdate:visible":s[1]||(s[1]=a=>R(m)?m.value=a:null),width:"70vw","mask-closable":"",onOk:s[2]||(s[2]=a=>m.value=!1)},{cancelText:n(()=>[]),default:n(()=>[l(ne,{active:"",loading:!e(E).isIdle},{default:n(()=>[d("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[0]||(s[0]=a=>e(me)(e(x)))},[d("div",Fe,o(t.$t("doubleClickToCopy")),1),u(" "+o(e(x)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),d("div",Re,[l(A,{onClick:e(Q)},{default:n(()=>[u(o(t.$t("saveLoadedImageAsJson")),1)]),_:1},8,["onClick"]),l(A,{onClick:e(q)},{default:n(()=>[u(o(t.$t("saveAllAsJson")),1)]),_:1},8,["onClick"])]),(T=e(i))!=null&&T.length?(p(),V(e(ye),{key:0,ref_key:"scroller",ref:y,class:"file-list",items:e(i),"item-size":e(b).first,"key-field":"fullpath","item-secondary-size":e(b).second,gridItems:e(J),onScroll:e(M)},{after:n(()=>[Ve]),default:n(({item:a,index:D})=>[l(Me,{idx:D,file:a,"cell-width":e(W),"show-menu-idx":e(h),"onUpdate:showMenuIdx":s[3]||(s[3]=de=>R(h)?h.value=de:null),onDragstart:e(O),onDragend:e(P),onFileItemClick:e(L),"full-screen-preview-image-url":e(i)[e(r)]?e(ue)(e(i)[e(r)]):"",selected:e(v).includes(D),onContextMenuClick:e(k),onPreviewVisibleChange:e(U),"is-selected-mutil-files":e(v).length>1,"enable-change-indicator":e(Y),"seed-change-checked":e(Z),"get-gen-diff":e(j),"get-gen-diff-watch-dep":e(H)},null,8,["idx","file","cell-width","show-menu-idx","onDragstart","onDragend","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):e(f).load&&t.selectedTagIds.and_tags.length===1&&!(($=t.selectedTagIds.folder_paths_str)!=null&&$.trim())?(p(),I("div",ze,[d("div",Ge,[d("p",Be,o(t.$t("tagSearchNoResultsMessage")),1),l(ie,{onClick:s[4]||(s[4]=a=>e($e)()),type:"primary"},{default:n(()=>[u(o(t.$t("rebuildImageIndex")),1)]),_:1})])])):_("",!0),e(C)?(p(),I("div",Ne,[l(e(Ce),{onClick:s[5]||(s[5]=a=>e(w)("prev")),class:z({disable:!e(S)("prev")})},null,8,["class"]),l(e(we),{onClick:s[6]||(s[6]=a=>e(w)("next")),class:z({disable:!e(S)("next")})},null,8,["class"])])):_("",!0)]}),_:1},8,["spinning"]),e(C)&&e(i)&&e(i)[e(r)]?(p(),V(Se,{key:0,file:e(i)[e(r)],idx:e(r),onContextMenuClick:e(k)},null,8,["file","idx","onContextMenuClick"])):_("",!0)],512)}}});const Xe=_e(Ue,[["__scopeId","data-v-caebce58"]]);export{Xe as default};
|
||||
import{d as ce,m as F,ax as re,$ as pe,S as p,T as I,c as l,a2 as e,a1 as n,a4 as R,U as d,J as me,W as o,V as u,a0 as V,ad as ue,Y as _,ae as z,ag as ge,R as fe,ai as G,aN as ve,aO as he,bz as Ie,Z as _e}from"./index-5b5fdd56.js";import{S as ke}from"./index-b9a282d1.js";import{L as Ce,R as we,f as Se,_ as be}from"./MultiSelectKeep-72e9597f.js";import{c as xe,d as ye,F as Me}from"./FileItem-b2542180.js";import{c as Ae,u as Te}from"./hook-ba2adfba.js";import{a as $e}from"./functionalCallableComp-51195a3e.js";import"./shortcut-bdce38ed.js";import"./Checkbox-5fa7cbf6.js";/* empty css */import"./index-a0e30b33.js";import"./index-b6f2a43c.js";import"./_isIterateeCall-c830f443.js";import"./useGenInfoDiff-3e61c6d2.js";const De=c=>(ve("data-v-caebce58"),c=c(),he(),c),Fe={class:"hint"},Re={class:"action-bar"},Ve=De(()=>d("div",{style:{padding:"16px 0 512px"}},null,-1)),ze={key:1},Ge={class:"no-res-hint"},Be={class:"hint"},Ne={key:2,class:"preview-switch"},Ue=ce({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(c){const g=c,f=Ae(t=>Ie(g.selectedTagIds,t)),{queue:B,images:i,onContextMenuClickU:k,stackViewEl:N,previewIdx:r,previewing:C,onPreviewVisibleChange:U,previewImgMove:w,canPreview:S,itemSize:b,gridItems:J,showGenInfo:m,imageGenInfo:x,q:E,multiSelectedIdxs:v,onFileItemClick:L,scroller:y,showMenuIdx:h,onFileDragStart:O,onFileDragEnd:P,cellWidth:W,onScroll:M,saveAllFileAsJson:q,props:K,saveLoadedFileAsJson:Q,changeIndchecked:Y,seedChangeChecked:Z,getGenDiff:j,getGenDiffWatchDep:H}=Te(f);F(()=>g.selectedTagIds,async()=>{var t;await f.reset(),await re(),(t=y.value)==null||t.scrollToItem(0),M()},{immediate:!0}),F(()=>g,async t=>{K.value=t},{deep:!0,immediate:!0});const X=pe(),{onClearAllSelected:ee,onSelectAll:te,onReverseSelect:se}=xe();return(t,s)=>{const le=be,ne=ge,ae=fe,A=G,ie=G,oe=ke;return p(),I("div",{class:"container",ref_key:"stackViewEl",ref:N},[l(le,{show:!!e(v).length||e(X).keepMultiSelect,onClearAllSelected:e(ee),onSelectAll:e(te),onReverseSelect:e(se)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),l(oe,{size:"large",spinning:!e(B).isIdle},{default:n(()=>{var T,$;return[l(ae,{visible:e(m),"onUpdate:visible":s[1]||(s[1]=a=>R(m)?m.value=a:null),width:"70vw","mask-closable":"",onOk:s[2]||(s[2]=a=>m.value=!1)},{cancelText:n(()=>[]),default:n(()=>[l(ne,{active:"",loading:!e(E).isIdle},{default:n(()=>[d("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[0]||(s[0]=a=>e(me)(e(x)))},[d("div",Fe,o(t.$t("doubleClickToCopy")),1),u(" "+o(e(x)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),d("div",Re,[l(A,{onClick:e(Q)},{default:n(()=>[u(o(t.$t("saveLoadedImageAsJson")),1)]),_:1},8,["onClick"]),l(A,{onClick:e(q)},{default:n(()=>[u(o(t.$t("saveAllAsJson")),1)]),_:1},8,["onClick"])]),(T=e(i))!=null&&T.length?(p(),V(e(ye),{key:0,ref_key:"scroller",ref:y,class:"file-list",items:e(i),"item-size":e(b).first,"key-field":"fullpath","item-secondary-size":e(b).second,gridItems:e(J),onScroll:e(M)},{after:n(()=>[Ve]),default:n(({item:a,index:D})=>[l(Me,{idx:D,file:a,"cell-width":e(W),"show-menu-idx":e(h),"onUpdate:showMenuIdx":s[3]||(s[3]=de=>R(h)?h.value=de:null),onDragstart:e(O),onDragend:e(P),onFileItemClick:e(L),"full-screen-preview-image-url":e(i)[e(r)]?e(ue)(e(i)[e(r)]):"",selected:e(v).includes(D),onContextMenuClick:e(k),onPreviewVisibleChange:e(U),"is-selected-mutil-files":e(v).length>1,"enable-change-indicator":e(Y),"seed-change-checked":e(Z),"get-gen-diff":e(j),"get-gen-diff-watch-dep":e(H)},null,8,["idx","file","cell-width","show-menu-idx","onDragstart","onDragend","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):e(f).load&&t.selectedTagIds.and_tags.length===1&&!(($=t.selectedTagIds.folder_paths_str)!=null&&$.trim())?(p(),I("div",ze,[d("div",Ge,[d("p",Be,o(t.$t("tagSearchNoResultsMessage")),1),l(ie,{onClick:s[4]||(s[4]=a=>e($e)()),type:"primary"},{default:n(()=>[u(o(t.$t("rebuildImageIndex")),1)]),_:1})])])):_("",!0),e(C)?(p(),I("div",Ne,[l(e(Ce),{onClick:s[5]||(s[5]=a=>e(w)("prev")),class:z({disable:!e(S)("prev")})},null,8,["class"]),l(e(we),{onClick:s[6]||(s[6]=a=>e(w)("next")),class:z({disable:!e(S)("next")})},null,8,["class"])])):_("",!0)]}),_:1},8,["spinning"]),e(C)&&e(i)&&e(i)[e(r)]?(p(),V(Se,{key:0,file:e(i)[e(r)],idx:e(r),onContextMenuClick:e(k)},null,8,["file","idx","onContextMenuClick"])):_("",!0)],512)}}});const Xe=_e(Ue,[["__scopeId","data-v-caebce58"]]);export{Xe as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{bP as i,aY as t,dI as f,bG as n}from"./index-291103b4.js";function u(e,a,r){if(!i(r))return!1;var s=typeof a;return(s=="number"?t(r)&&f(a,r.length):s=="string"&&a in r)?n(r[a],e):!1}export{u as i};
|
||||
import{bP as i,aY as t,dI as f,bG as n}from"./index-5b5fdd56.js";function u(e,a,r){if(!i(r))return!1;var s=typeof a;return(s=="number"?t(r)&&f(a,r.length):s=="string"&&a in r)?n(r[a],e):!1}export{u as i};
|
||||
|
|
@ -1 +1 @@
|
|||
import{d as F,$,cy as S,c6 as B,S as _,T as w,U as f,c as l,a1 as d,V as p,W as c,a2 as s,a0 as A,ad as R,cz as T,cA as y,y as V,z as x,ai as E,Z as U}from"./index-291103b4.js";import{_ as N}from"./index-89cb307c.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-05696d6c.js";import"./functionalCallableComp-33cd562d.js";/* empty css */import"./_isIterateeCall-e0eaeb93.js";import"./index-2541210c.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},Z=F({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(J){const{stackViewEl:D}=L().toRefs(),{itemSize:h,gridItems:b,cellWidth:g}=H(),i=$(),m=O(),{selectdFiles:a}=S(m),r=B(),v=async e=>{const t=T(e);t&&m.addFiles(t.nodes)},C=async()=>{r.pushAction(async()=>{const e=await y.value.post("/zip",{paths:a.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=t,o.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(o),o.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:a.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),V.success(x("success"))})},z=e=>{a.value.splice(e,1)};return(e,t)=>{const o=E,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(o,{onClick:t[0]||(t[0]=n=>s(m).selectdFiles=[])},{default:d(()=>[p(c(e.$t("clear")),1)]),_:1}),f("div",G,[p(c(e.$t("compressFile"))+": ",1),l(u,{checked:s(i).batchDownloadCompress,"onUpdate:checked":t[1]||(t[1]=n=>s(i).batchDownloadCompress=n)},null,8,["checked"])]),l(o,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(o,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(a).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(a).slice(),"item-size":s(h).first,"key-field":"fullpath","item-secondary-size":s(h).second,gridItems:s(b)},{default:d(({item:n,index:k})=>[l(W,{idx:k,file:n,"cell-width":s(g),"enable-close-icon":"",onCloseIconClick:K=>z(k),"full-screen-preview-image-url":s(R)(n),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(_(),w("div",P,[f("p",Q,c(e.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const ae=U(Z,[["__scopeId","data-v-a2642a17"]]);export{ae as default};
|
||||
import{d as F,$,cy as S,c6 as B,S as _,T as w,U as f,c as l,a1 as d,V as p,W as c,a2 as s,a0 as A,ad as R,cz as T,cA as y,y as V,z as x,ai as E,Z as U}from"./index-5b5fdd56.js";import{_ as N}from"./index-a0e30b33.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-b2542180.js";import"./functionalCallableComp-51195a3e.js";/* empty css */import"./_isIterateeCall-c830f443.js";import"./index-b6f2a43c.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},Z=F({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(J){const{stackViewEl:D}=L().toRefs(),{itemSize:h,gridItems:b,cellWidth:g}=H(),i=$(),m=O(),{selectdFiles:a}=S(m),r=B(),v=async e=>{const t=T(e);t&&m.addFiles(t.nodes)},C=async()=>{r.pushAction(async()=>{const e=await y.value.post("/zip",{paths:a.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=t,o.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(o),o.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:a.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),V.success(x("success"))})},z=e=>{a.value.splice(e,1)};return(e,t)=>{const o=E,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(o,{onClick:t[0]||(t[0]=n=>s(m).selectdFiles=[])},{default:d(()=>[p(c(e.$t("clear")),1)]),_:1}),f("div",G,[p(c(e.$t("compressFile"))+": ",1),l(u,{checked:s(i).batchDownloadCompress,"onUpdate:checked":t[1]||(t[1]=n=>s(i).batchDownloadCompress=n)},null,8,["checked"])]),l(o,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(o,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(a).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(a).slice(),"item-size":s(h).first,"key-field":"fullpath","item-secondary-size":s(h).second,gridItems:s(b)},{default:d(({item:n,index:k})=>[l(W,{idx:k,file:n,"cell-width":s(g),"enable-close-icon":"",onCloseIconClick:K=>z(k),"full-screen-preview-image-url":s(R)(n),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(_(),w("div",P,[f("p",Q,c(e.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const ae=U(Z,[["__scopeId","data-v-a2642a17"]]);export{ae as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{u as w,a as y,F as k,d as x}from"./FileItem-05696d6c.js";import{d as F,$ as b,c3 as h,r as D,bc as I,bg as C,S as z,T as E,c as n,a1 as S,a2 as e,ad as V,cz as B,cB as R,Z as T}from"./index-291103b4.js";import"./functionalCallableComp-33cd562d.js";/* empty css */import"./_isIterateeCall-e0eaeb93.js";import"./index-2541210c.js";const $=F({__name:"gridView",props:{tabIdx:{},paneIdx:{},id:{},removable:{type:Boolean},allowDragAndDrop:{type:Boolean},files:{},paneKey:{}},setup(p){const o=p,d=b(),{stackViewEl:m}=w().toRefs(),{itemSize:i,gridItems:u,cellWidth:f}=y(),g=h(),a=D(o.files??[]),_=async s=>{const l=B(s);o.allowDragAndDrop&&l&&(a.value=R([...a.value,...l.nodes]))},v=s=>{a.value.splice(s,1)};return I(()=>{d.pageFuncExportMap.set(o.paneKey,{getFiles:()=>C(a.value),setFiles:s=>a.value=s})}),(s,l)=>(z(),E("div",{class:"container",ref_key:"stackViewEl",ref:m,onDrop:_},[n(e(x),{ref:"scroller",class:"file-list",items:a.value.slice(),"item-size":e(i).first,"key-field":"fullpath","item-secondary-size":e(i).second,gridItems:e(u)},{default:S(({item:t,index:r})=>{var c;return[n(k,{idx:r,file:t,"cell-width":e(f),"enable-close-icon":o.removable,onCloseIconClick:A=>v(r),"full-screen-preview-image-url":e(V)(t),"extra-tags":(c=t==null?void 0:t.tags)==null?void 0:c.map(e(g).tagConvert),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","enable-close-icon","onCloseIconClick","full-screen-preview-image-url","extra-tags"])]}),_:1},8,["items","item-size","item-secondary-size","gridItems"])],544))}});const U=T($,[["__scopeId","data-v-f35f4802"]]);export{U as default};
|
||||
import{u as w,a as y,F as k,d as x}from"./FileItem-b2542180.js";import{d as F,$ as b,c3 as h,r as D,bc as I,bg as C,S as z,T as E,c as n,a1 as S,a2 as e,ad as V,cz as B,cB as R,Z as T}from"./index-5b5fdd56.js";import"./functionalCallableComp-51195a3e.js";/* empty css */import"./_isIterateeCall-c830f443.js";import"./index-b6f2a43c.js";const $=F({__name:"gridView",props:{tabIdx:{},paneIdx:{},id:{},removable:{type:Boolean},allowDragAndDrop:{type:Boolean},files:{},paneKey:{}},setup(p){const o=p,d=b(),{stackViewEl:m}=w().toRefs(),{itemSize:i,gridItems:u,cellWidth:f}=y(),g=h(),a=D(o.files??[]),_=async s=>{const l=B(s);o.allowDragAndDrop&&l&&(a.value=R([...a.value,...l.nodes]))},v=s=>{a.value.splice(s,1)};return I(()=>{d.pageFuncExportMap.set(o.paneKey,{getFiles:()=>C(a.value),setFiles:s=>a.value=s})}),(s,l)=>(z(),E("div",{class:"container",ref_key:"stackViewEl",ref:m,onDrop:_},[n(e(x),{ref:"scroller",class:"file-list",items:a.value.slice(),"item-size":e(i).first,"key-field":"fullpath","item-secondary-size":e(i).second,gridItems:e(u)},{default:S(({item:t,index:r})=>{var c;return[n(k,{idx:r,file:t,"cell-width":e(f),"enable-close-icon":o.removable,onCloseIconClick:A=>v(r),"full-screen-preview-image-url":e(V)(t),"extra-tags":(c=t==null?void 0:t.tags)==null?void 0:c.map(e(g).tagConvert),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","enable-close-icon","onCloseIconClick","full-screen-preview-image-url","extra-tags"])]}),_:1},8,["items","item-size","item-secondary-size","gridItems"])],544))}});const U=T($,[["__scopeId","data-v-f35f4802"]]);export{U as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{ak as k,r as g,l as R,k as A,L as b,E as q,c6 as G,ch as L,cl as z}from"./index-291103b4.js";import{u as O,a as Q,b as j,e as H}from"./FileItem-05696d6c.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-b801971c.js";import{u as B}from"./useGenInfoDiff-7fd793c7.js";let K=0;const V=()=>++K,X=(n,i,{dataUpdateStrategy:l="replace"}={})=>{const o=k([""]),c=g(!1),t=g(),a=g(!1);let f=g(-1);const v=new Set,w=e=>{var s;l==="replace"?t.value=e:l==="merge"&&(b((Array.isArray(t.value)||typeof t.value>"u")&&Array.isArray(e),"数据更新策略为合并时仅可用于值为数组的情况"),t.value=[...(s=t==null?void 0:t.value)!==null&&s!==void 0?s:[],...e])},d=e=>A(void 0,void 0,void 0,function*(){if(a.value||c.value&&typeof e>"u")return!1;a.value=!0;const s=V();f.value=s;try{let r;if(typeof e=="number"){if(r=o[e],typeof r!="string")return!1}else r=o[o.length-1];const I=yield n(r);if(v.has(s))return v.delete(s),!1;w(i(I));const u=I.cursor;if((e===o.length-1||typeof e!="number")&&(c.value=!u.has_next,u.has_next)){const y=u.next_cursor||u.next;b(typeof y=="string"),o.push(y)}}finally{f.value===s&&(a.value=!1)}return!0}),p=()=>{v.add(f.value),a.value=!1},x=(e=!1)=>A(void 0,void 0,void 0,function*(){const{refetch:s,force:r}=typeof e=="object"?e:{refetch:e};r&&p(),b(!a.value),o.splice(0,o.length,""),a.value=!1,t.value=void 0,c.value=!1,s&&(yield d())}),h=()=>({next:()=>A(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return R({abort:p,load:c,next:d,res:t,loading:a,cursorStack:o,reset:x,[Symbol.asyncIterator]:h,iter:{[Symbol.asyncIterator]:h}})},se=n=>k(X(n,i=>i.files,{dataUpdateStrategy:"merge"})),ne=n=>{const i=k(new Set),l=q(()=>(n.res??[]).filter(m=>!i.has(m.fullpath))),o=G(),{stackViewEl:c,multiSelectedIdxs:t,stack:a,scroller:f,props:v}=O({images:l}).toRefs(),{itemSize:w,gridItems:d,cellWidth:p,onScroll:x}=Q({fetchNext:()=>n.next()}),{showMenuIdx:h}=j(),{onFileDragStart:e,onFileDragEnd:s}=T(),{showGenInfo:r,imageGenInfo:I,q:u,onContextMenuClick:y,onFileItemClick:C}=U({openNext:L}),{previewIdx:E,previewing:_,onPreviewVisibleChange:M,previewImgMove:D,canPreview:J}=W({loadNext:()=>n.next()}),N=async(m,S,P)=>{a.value=[{curr:"",files:l.value}],await y(m,S,P)};H("removeFiles",async({paths:m})=>{m.forEach(S=>i.add(S))});const F=()=>{z(l.value)};return{images:l,scroller:f,queue:o,iter:n,onContextMenuClickU:N,stackViewEl:c,previewIdx:E,previewing:_,onPreviewVisibleChange:M,previewImgMove:D,canPreview:J,itemSize:w,gridItems:d,showGenInfo:r,imageGenInfo:I,q:u,onContextMenuClick:y,onFileItemClick:C,showMenuIdx:h,multiSelectedIdxs:t,onFileDragStart:e,onFileDragEnd:s,cellWidth:p,onScroll:x,saveLoadedFileAsJson:F,saveAllFileAsJson:async()=>{for(;!n.load;)await n.next();F()},props:v,...B()}};export{se as c,ne as u};
|
||||
import{ak as k,r as g,l as R,k as A,L as b,E as q,c6 as G,ch as L,cl as z}from"./index-5b5fdd56.js";import{u as O,a as Q,b as j,e as H}from"./FileItem-b2542180.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-72e9597f.js";import{u as B}from"./useGenInfoDiff-3e61c6d2.js";let K=0;const V=()=>++K,X=(n,i,{dataUpdateStrategy:l="replace"}={})=>{const o=k([""]),c=g(!1),t=g(),a=g(!1);let f=g(-1);const v=new Set,w=e=>{var s;l==="replace"?t.value=e:l==="merge"&&(b((Array.isArray(t.value)||typeof t.value>"u")&&Array.isArray(e),"数据更新策略为合并时仅可用于值为数组的情况"),t.value=[...(s=t==null?void 0:t.value)!==null&&s!==void 0?s:[],...e])},d=e=>A(void 0,void 0,void 0,function*(){if(a.value||c.value&&typeof e>"u")return!1;a.value=!0;const s=V();f.value=s;try{let r;if(typeof e=="number"){if(r=o[e],typeof r!="string")return!1}else r=o[o.length-1];const I=yield n(r);if(v.has(s))return v.delete(s),!1;w(i(I));const u=I.cursor;if((e===o.length-1||typeof e!="number")&&(c.value=!u.has_next,u.has_next)){const y=u.next_cursor||u.next;b(typeof y=="string"),o.push(y)}}finally{f.value===s&&(a.value=!1)}return!0}),p=()=>{v.add(f.value),a.value=!1},x=(e=!1)=>A(void 0,void 0,void 0,function*(){const{refetch:s,force:r}=typeof e=="object"?e:{refetch:e};r&&p(),b(!a.value),o.splice(0,o.length,""),a.value=!1,t.value=void 0,c.value=!1,s&&(yield d())}),h=()=>({next:()=>A(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return R({abort:p,load:c,next:d,res:t,loading:a,cursorStack:o,reset:x,[Symbol.asyncIterator]:h,iter:{[Symbol.asyncIterator]:h}})},se=n=>k(X(n,i=>i.files,{dataUpdateStrategy:"merge"})),ne=n=>{const i=k(new Set),l=q(()=>(n.res??[]).filter(m=>!i.has(m.fullpath))),o=G(),{stackViewEl:c,multiSelectedIdxs:t,stack:a,scroller:f,props:v}=O({images:l}).toRefs(),{itemSize:w,gridItems:d,cellWidth:p,onScroll:x}=Q({fetchNext:()=>n.next()}),{showMenuIdx:h}=j(),{onFileDragStart:e,onFileDragEnd:s}=T(),{showGenInfo:r,imageGenInfo:I,q:u,onContextMenuClick:y,onFileItemClick:C}=U({openNext:L}),{previewIdx:E,previewing:_,onPreviewVisibleChange:M,previewImgMove:D,canPreview:J}=W({loadNext:()=>n.next()}),N=async(m,S,P)=>{a.value=[{curr:"",files:l.value}],await y(m,S,P)};H("removeFiles",async({paths:m})=>{m.forEach(S=>i.add(S))});const F=()=>{z(l.value)};return{images:l,scroller:f,queue:o,iter:n,onContextMenuClickU:N,stackViewEl:c,previewIdx:E,previewing:_,onPreviewVisibleChange:M,previewImgMove:D,canPreview:J,itemSize:w,gridItems:d,showGenInfo:r,imageGenInfo:I,q:u,onContextMenuClick:y,onFileItemClick:C,showMenuIdx:h,multiSelectedIdxs:t,onFileDragStart:e,onFileDragEnd:s,cellWidth:p,onScroll:x,saveLoadedFileAsJson:F,saveAllFileAsJson:async()=>{for(;!n.load;)await n.next();F()},props:v,...B()}};export{se as c,ne as u};
|
||||
|
|
@ -1 +1 @@
|
|||
import{r as F,o as P,cq as K,at as L,E as i,av as T,aw as I,d as E,u as $,cr as _,b as y,bf as V,cs as A,al as B,h as c,c as M,a as G}from"./index-291103b4.js";const W=function(){var o=F(!1);return P(function(){o.value=K()}),o};var D=Symbol("rowContextKey"),q=function(r){T(D,r)},U=function(){return L(D,{gutter:i(function(){}),wrap:i(function(){}),supportFlexGap:i(function(){})})};I("top","middle","bottom","stretch");I("start","end","center","space-around","space-between");var k=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},H=E({compatConfig:{MODE:3},name:"ARow",props:k(),setup:function(r,N){var m=N.slots,v=$("row",r),d=v.prefixCls,h=v.direction,j,x=F({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=W();P(function(){j=_.subscribe(function(e){var t=r.gutter||0;(!Array.isArray(t)&&y(t)==="object"||Array.isArray(t)&&(y(t[0])==="object"||y(t[1])==="object"))&&(x.value=e)})}),V(function(){_.unsubscribe(j)});var S=i(function(){var e=[0,0],t=r.gutter,n=t===void 0?0:t,s=Array.isArray(n)?n:[n,0];return s.forEach(function(l,b){if(y(l)==="object")for(var a=0;a<A.length;a++){var p=A[a];if(x.value[p]&&l[p]!==void 0){e[b]=l[p];break}}else e[b]=l||0}),e});q({gutter:S,supportFlexGap:w,wrap:i(function(){return r.wrap})});var R=i(function(){var e;return B(d.value,(e={},c(e,"".concat(d.value,"-no-wrap"),r.wrap===!1),c(e,"".concat(d.value,"-").concat(r.justify),r.justify),c(e,"".concat(d.value,"-").concat(r.align),r.align),c(e,"".concat(d.value,"-rtl"),h.value==="rtl"),e))}),O=i(function(){var e=S.value,t={},n=e[0]>0?"".concat(e[0]/-2,"px"):void 0,s=e[1]>0?"".concat(e[1]/-2,"px"):void 0;return n&&(t.marginLeft=n,t.marginRight=n),w.value?t.rowGap="".concat(e[1],"px"):s&&(t.marginTop=s,t.marginBottom=s),t});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});const Y=H;function J(o){return typeof o=="number"?"".concat(o," ").concat(o," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(o)?"0 0 ".concat(o):o}var Q=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const Z=E({compatConfig:{MODE:3},name:"ACol",props:Q(),setup:function(r,N){var m=N.slots,v=U(),d=v.gutter,h=v.supportFlexGap,j=v.wrap,x=$("col",r),w=x.prefixCls,S=x.direction,R=i(function(){var e,t=r.span,n=r.order,s=r.offset,l=r.push,b=r.pull,a=w.value,p={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(g){var f,u={},C=r[g];typeof C=="number"?u.span=C:y(C)==="object"&&(u=C||{}),p=G(G({},p),{},(f={},c(f,"".concat(a,"-").concat(g,"-").concat(u.span),u.span!==void 0),c(f,"".concat(a,"-").concat(g,"-order-").concat(u.order),u.order||u.order===0),c(f,"".concat(a,"-").concat(g,"-offset-").concat(u.offset),u.offset||u.offset===0),c(f,"".concat(a,"-").concat(g,"-push-").concat(u.push),u.push||u.push===0),c(f,"".concat(a,"-").concat(g,"-pull-").concat(u.pull),u.pull||u.pull===0),c(f,"".concat(a,"-rtl"),S.value==="rtl"),f))}),B(a,(e={},c(e,"".concat(a,"-").concat(t),t!==void 0),c(e,"".concat(a,"-order-").concat(n),n),c(e,"".concat(a,"-offset-").concat(s),s),c(e,"".concat(a,"-push-").concat(l),l),c(e,"".concat(a,"-pull-").concat(b),b),e),p)}),O=i(function(){var e=r.flex,t=d.value,n={};if(t&&t[0]>0){var s="".concat(t[0]/2,"px");n.paddingLeft=s,n.paddingRight=s}if(t&&t[1]>0&&!h.value){var l="".concat(t[1]/2,"px");n.paddingTop=l,n.paddingBottom=l}return e&&(n.flex=J(e),j.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});export{Z as C,Y as R};
|
||||
import{r as F,o as P,cq as K,at as L,E as i,av as T,aw as I,d as E,u as $,cr as _,b as y,bf as V,cs as A,al as B,h as c,c as M,a as G}from"./index-5b5fdd56.js";const W=function(){var o=F(!1);return P(function(){o.value=K()}),o};var D=Symbol("rowContextKey"),q=function(r){T(D,r)},U=function(){return L(D,{gutter:i(function(){}),wrap:i(function(){}),supportFlexGap:i(function(){})})};I("top","middle","bottom","stretch");I("start","end","center","space-around","space-between");var k=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},H=E({compatConfig:{MODE:3},name:"ARow",props:k(),setup:function(r,N){var m=N.slots,v=$("row",r),d=v.prefixCls,h=v.direction,j,x=F({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=W();P(function(){j=_.subscribe(function(e){var t=r.gutter||0;(!Array.isArray(t)&&y(t)==="object"||Array.isArray(t)&&(y(t[0])==="object"||y(t[1])==="object"))&&(x.value=e)})}),V(function(){_.unsubscribe(j)});var S=i(function(){var e=[0,0],t=r.gutter,n=t===void 0?0:t,s=Array.isArray(n)?n:[n,0];return s.forEach(function(l,b){if(y(l)==="object")for(var a=0;a<A.length;a++){var p=A[a];if(x.value[p]&&l[p]!==void 0){e[b]=l[p];break}}else e[b]=l||0}),e});q({gutter:S,supportFlexGap:w,wrap:i(function(){return r.wrap})});var R=i(function(){var e;return B(d.value,(e={},c(e,"".concat(d.value,"-no-wrap"),r.wrap===!1),c(e,"".concat(d.value,"-").concat(r.justify),r.justify),c(e,"".concat(d.value,"-").concat(r.align),r.align),c(e,"".concat(d.value,"-rtl"),h.value==="rtl"),e))}),O=i(function(){var e=S.value,t={},n=e[0]>0?"".concat(e[0]/-2,"px"):void 0,s=e[1]>0?"".concat(e[1]/-2,"px"):void 0;return n&&(t.marginLeft=n,t.marginRight=n),w.value?t.rowGap="".concat(e[1],"px"):s&&(t.marginTop=s,t.marginBottom=s),t});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});const Y=H;function J(o){return typeof o=="number"?"".concat(o," ").concat(o," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(o)?"0 0 ".concat(o):o}var Q=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const Z=E({compatConfig:{MODE:3},name:"ACol",props:Q(),setup:function(r,N){var m=N.slots,v=U(),d=v.gutter,h=v.supportFlexGap,j=v.wrap,x=$("col",r),w=x.prefixCls,S=x.direction,R=i(function(){var e,t=r.span,n=r.order,s=r.offset,l=r.push,b=r.pull,a=w.value,p={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(g){var f,u={},C=r[g];typeof C=="number"?u.span=C:y(C)==="object"&&(u=C||{}),p=G(G({},p),{},(f={},c(f,"".concat(a,"-").concat(g,"-").concat(u.span),u.span!==void 0),c(f,"".concat(a,"-").concat(g,"-order-").concat(u.order),u.order||u.order===0),c(f,"".concat(a,"-").concat(g,"-offset-").concat(u.offset),u.offset||u.offset===0),c(f,"".concat(a,"-").concat(g,"-push-").concat(u.push),u.push||u.push===0),c(f,"".concat(a,"-").concat(g,"-pull-").concat(u.pull),u.pull||u.pull===0),c(f,"".concat(a,"-rtl"),S.value==="rtl"),f))}),B(a,(e={},c(e,"".concat(a,"-").concat(t),t!==void 0),c(e,"".concat(a,"-order-").concat(n),n),c(e,"".concat(a,"-offset-").concat(s),s),c(e,"".concat(a,"-push-").concat(l),l),c(e,"".concat(a,"-pull-").concat(b),b),e),p)}),O=i(function(){var e=r.flex,t=d.value,n={};if(t&&t[0]>0){var s="".concat(t[0]/2,"px");n.paddingLeft=s,n.paddingRight=s}if(t&&t[1]>0&&!h.value){var l="".concat(t[1]/2,"px");n.paddingTop=l,n.paddingBottom=l}return e&&(n.flex=J(e),j.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});export{Z as C,Y as R};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{cp as j,aw as K,d as $,j as z,c_ as E,w,r as b,E as S,m as U,u as A,o as D,ax as H,h as o,c as s,a as C,au as L,ba as W,g as _,c$ as G,P as c,d0 as x}from"./index-291103b4.js";var R=K("small","default"),q=function(){return{id:String,prefixCls:String,size:c.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},J=$({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:q(),slots:["checkedChildren","unCheckedChildren"],setup:function(n,r){var d=r.attrs,m=r.slots,B=r.expose,l=r.emit,y=z();E(function(){w(!("defaultChecked"in d),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),w(!("value"in d),"Switch","`value` is not validate prop, do you mean `checked`?")});var h=b(n.checked!==void 0?n.checked:d.defaultChecked),f=S(function(){return h.value===n.checkedValue});U(function(){return n.checked},function(){h.value=n.checked});var v=A("switch",n),u=v.prefixCls,F=v.direction,T=v.size,i=b(),g=function(){var e;(e=i.value)===null||e===void 0||e.focus()},V=function(){var e;(e=i.value)===null||e===void 0||e.blur()};B({focus:g,blur:V}),D(function(){H(function(){n.autofocus&&!n.disabled&&i.value.focus()})});var k=function(e,t){n.disabled||(l("update:checked",e),l("change",e,t),y.onFieldChange())},I=function(e){l("blur",e)},N=function(e){g();var t=f.value?n.unCheckedValue:n.checkedValue;k(t,e),l("click",t,e)},M=function(e){e.keyCode===x.LEFT?k(n.unCheckedValue,e):e.keyCode===x.RIGHT&&k(n.checkedValue,e),l("keydown",e)},O=function(e){var t;(t=i.value)===null||t===void 0||t.blur(),l("mouseup",e)},P=S(function(){var a;return a={},o(a,"".concat(u.value,"-small"),T.value==="small"),o(a,"".concat(u.value,"-loading"),n.loading),o(a,"".concat(u.value,"-checked"),f.value),o(a,"".concat(u.value,"-disabled"),n.disabled),o(a,u.value,!0),o(a,"".concat(u.value,"-rtl"),F.value==="rtl"),a});return function(){var a;return s(G,{insertExtraNode:!0},{default:function(){return[s("button",C(C(C({},L(n,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),d),{},{id:(a=n.id)!==null&&a!==void 0?a:y.id.value,onKeydown:M,onClick:N,onBlur:I,onMouseup:O,type:"button",role:"switch","aria-checked":h.value,disabled:n.disabled||n.loading,class:[d.class,P.value],ref:i}),[s("div",{class:"".concat(u.value,"-handle")},[n.loading?s(W,{class:"".concat(u.value,"-loading-icon")},null):null]),s("span",{class:"".concat(u.value,"-inner")},[f.value?_(m,n,"checkedChildren"):_(m,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};
|
||||
import{cp as j,aw as K,d as $,j as z,c_ as E,w,r as b,E as S,m as U,u as A,o as D,ax as H,h as o,c as s,a as C,au as L,ba as W,g as _,c$ as G,P as c,d0 as x}from"./index-5b5fdd56.js";var R=K("small","default"),q=function(){return{id:String,prefixCls:String,size:c.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},J=$({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:q(),slots:["checkedChildren","unCheckedChildren"],setup:function(n,r){var d=r.attrs,m=r.slots,B=r.expose,l=r.emit,y=z();E(function(){w(!("defaultChecked"in d),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),w(!("value"in d),"Switch","`value` is not validate prop, do you mean `checked`?")});var h=b(n.checked!==void 0?n.checked:d.defaultChecked),f=S(function(){return h.value===n.checkedValue});U(function(){return n.checked},function(){h.value=n.checked});var v=A("switch",n),u=v.prefixCls,F=v.direction,T=v.size,i=b(),g=function(){var e;(e=i.value)===null||e===void 0||e.focus()},V=function(){var e;(e=i.value)===null||e===void 0||e.blur()};B({focus:g,blur:V}),D(function(){H(function(){n.autofocus&&!n.disabled&&i.value.focus()})});var k=function(e,t){n.disabled||(l("update:checked",e),l("change",e,t),y.onFieldChange())},I=function(e){l("blur",e)},N=function(e){g();var t=f.value?n.unCheckedValue:n.checkedValue;k(t,e),l("click",t,e)},M=function(e){e.keyCode===x.LEFT?k(n.unCheckedValue,e):e.keyCode===x.RIGHT&&k(n.checkedValue,e),l("keydown",e)},O=function(e){var t;(t=i.value)===null||t===void 0||t.blur(),l("mouseup",e)},P=S(function(){var a;return a={},o(a,"".concat(u.value,"-small"),T.value==="small"),o(a,"".concat(u.value,"-loading"),n.loading),o(a,"".concat(u.value,"-checked"),f.value),o(a,"".concat(u.value,"-disabled"),n.disabled),o(a,u.value,!0),o(a,"".concat(u.value,"-rtl"),F.value==="rtl"),a});return function(){var a;return s(G,{insertExtraNode:!0},{default:function(){return[s("button",C(C(C({},L(n,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),d),{},{id:(a=n.id)!==null&&a!==void 0?a:y.id.value,onKeydown:M,onClick:N,onBlur:I,onMouseup:O,type:"button",role:"switch","aria-checked":h.value,disabled:n.disabled||n.loading,class:[d.class,P.value],ref:i}),[s("div",{class:"".concat(u.value,"-handle")},[n.loading?s(W,{class:"".concat(u.value,"-loading-icon")},null):null]),s("span",{class:"".concat(u.value,"-inner")},[f.value?_(m,n,"checkedChildren"):_(m,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{d as z,bx as D,at as A,ct as j,ax as k,n as V,cu as B,cv as y,e as $,c as a,_ as T,h as r,a as P,cw as M,P as b}from"./index-291103b4.js";var O=["class","style"],W=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:b.any,delay:Number,indicator:b.any}},p=null;function q(t,n){return!!t&&!!n&&!isNaN(Number(n))}function G(t){var n=t.indicator;p=typeof n=="function"?n:function(){return a(n,null,null)}}const H=z({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:D(W(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:A("configProvider",j)}},data:function(){var n=this.spinning,e=this.delay,i=q(n,e);return{sSpinning:n&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var n=this;k(function(){n.debouncifyUpdateSpinning(),n.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(n){var e=n||this.$props,i=e.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=V(this.originalUpdateSpinning,i))},updateSpinning:function(){var n=this.spinning,e=this.sSpinning;e!==n&&(this.sSpinning=n)},cancelExistingSpin:function(){var n=this.updateSpinning;n&&n.cancel&&n.cancel()},renderIndicator:function(n){var e="".concat(n,"-dot"),i=B(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),y(i)?$(i,{class:e}):p&&y(p())?$(p(),{class:e}):a("span",{class:"".concat(e," ").concat(n,"-dot-spin")},[a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null)]))}},render:function(){var n,e,i,o=this.$props,f=o.size,x=o.prefixCls,h=o.tip,d=h===void 0?(n=(e=this.$slots).tip)===null||n===void 0?void 0:n.call(e):h,N=o.wrapperClassName,l=this.$attrs,v=l.class,_=l.style,C=T(l,O),S=this.configProvider,U=S.getPrefixCls,w=S.direction,s=U("spin",x),u=this.sSpinning,E=(i={},r(i,s,!0),r(i,"".concat(s,"-sm"),f==="small"),r(i,"".concat(s,"-lg"),f==="large"),r(i,"".concat(s,"-spinning"),u),r(i,"".concat(s,"-show-text"),!!d),r(i,"".concat(s,"-rtl"),w==="rtl"),r(i,v,!!v),i),m=a("div",P(P({},C),{},{style:_,class:E}),[this.renderIndicator(s),d?a("div",{class:"".concat(s,"-text")},[d]):null]),g=M(this);if(g&&g.length){var c,I=(c={},r(c,"".concat(s,"-container"),!0),r(c,"".concat(s,"-blur"),u),c);return a("div",{class:["".concat(s,"-nested-loading"),N]},[u&&a("div",{key:"loading"},[m]),a("div",{class:I,key:"container"},[g])])}return m}});export{H as S,G as s};
|
||||
import{d as z,bx as D,at as A,ct as j,ax as k,n as V,cu as B,cv as y,e as $,c as a,_ as T,h as r,a as P,cw as M,P as b}from"./index-5b5fdd56.js";var O=["class","style"],W=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:b.any,delay:Number,indicator:b.any}},p=null;function q(t,n){return!!t&&!!n&&!isNaN(Number(n))}function G(t){var n=t.indicator;p=typeof n=="function"?n:function(){return a(n,null,null)}}const H=z({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:D(W(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:A("configProvider",j)}},data:function(){var n=this.spinning,e=this.delay,i=q(n,e);return{sSpinning:n&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var n=this;k(function(){n.debouncifyUpdateSpinning(),n.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(n){var e=n||this.$props,i=e.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=V(this.originalUpdateSpinning,i))},updateSpinning:function(){var n=this.spinning,e=this.sSpinning;e!==n&&(this.sSpinning=n)},cancelExistingSpin:function(){var n=this.updateSpinning;n&&n.cancel&&n.cancel()},renderIndicator:function(n){var e="".concat(n,"-dot"),i=B(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),y(i)?$(i,{class:e}):p&&y(p())?$(p(),{class:e}):a("span",{class:"".concat(e," ").concat(n,"-dot-spin")},[a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null)]))}},render:function(){var n,e,i,o=this.$props,f=o.size,x=o.prefixCls,h=o.tip,d=h===void 0?(n=(e=this.$slots).tip)===null||n===void 0?void 0:n.call(e):h,N=o.wrapperClassName,l=this.$attrs,v=l.class,_=l.style,C=T(l,O),S=this.configProvider,U=S.getPrefixCls,w=S.direction,s=U("spin",x),u=this.sSpinning,E=(i={},r(i,s,!0),r(i,"".concat(s,"-sm"),f==="small"),r(i,"".concat(s,"-lg"),f==="large"),r(i,"".concat(s,"-spinning"),u),r(i,"".concat(s,"-show-text"),!!d),r(i,"".concat(s,"-rtl"),w==="rtl"),r(i,v,!!v),i),m=a("div",P(P({},C),{},{style:_,class:E}),[this.renderIndicator(s),d?a("div",{class:"".concat(s,"-text")},[d]):null]),g=M(this);if(g&&g.length){var c,I=(c={},r(c,"".concat(s,"-container"),!0),r(c,"".concat(s,"-blur"),u),c);return a("div",{class:["".concat(s,"-nested-loading"),N]},[u&&a("div",{key:"loading"},[m]),a("div",{class:I,key:"container"},[g])])}return m}});export{H as S,G as s};
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{cf as t,cg as e,ch as r,ci as n,aY as a}from"./index-5b5fdd56.js";function o(i,s){return t(e(i,s,r),i+"")}function b(i){return n(i)&&a(i)}export{o as b,b as i};
|
||||
|
|
@ -1 +1 @@
|
|||
import{d as x,$,aI as g,cC as b,r as w,S as p,T as i,U as a,c as r,a1 as d,V as u,W as n,X as I,a6 as B,a2 as m,x as D,y as _,z as v,ah as V,ai as W,cD as N,Z as R}from"./index-291103b4.js";/* empty css */const F={class:"container"},L={class:"actions"},T={class:"uni-desc"},U={class:"snapshot"},q=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(z){const h=$(),t=g(),f=e=>{h.tabList=D(e.tabs)},k=b(async e=>{await N(`workspace_snapshot_${e.id}`),t.snapshots=t.snapshots.filter(c=>c.id!==e.id),_.success(v("deleteSuccess"))}),o=w(""),y=async()=>{if(!o.value){_.error(v("nameRequired"));return}const e=t.createSnapshot(o.value);await t.addSnapshot(e),_.success(v("saveCompleted"))};return(e,c)=>{const C=V,l=W;return p(),i("div",F,[a("div",L,[r(C,{value:o.value,"onUpdate:value":c[0]||(c[0]=s=>o.value=s),placeholder:e.$t("name"),style:{"max-width":"300px"}},null,8,["value","placeholder"]),r(l,{type:"primary",onClick:y},{default:d(()=>[u(n(e.$t("saveWorkspaceSnapshot")),1)]),_:1})]),a("p",T,n(e.$t("WorkspaceSnapshotDesc")),1),a("ul",U,[(p(!0),i(I,null,B(m(t).snapshots,s=>(p(),i("li",{key:s.id},[a("div",null,[a("span",null,n(s.name),1)]),a("div",null,[r(l,{onClick:S=>f(s)},{default:d(()=>[u(n(e.$t("restore")),1)]),_:2},1032,["onClick"]),r(l,{onClick:S=>m(k)(s)},{default:d(()=>[u(n(e.$t("remove")),1)]),_:2},1032,["onClick"])])]))),128))])])}}});const G=R(q,[["__scopeId","data-v-2c44013c"]]);export{G as default};
|
||||
import{d as x,$,aI as g,cC as b,r as w,S as p,T as i,U as a,c as r,a1 as d,V as u,W as n,X as I,a6 as B,a2 as m,x as D,y as _,z as v,ah as V,ai as W,cD as N,Z as R}from"./index-5b5fdd56.js";/* empty css */const F={class:"container"},L={class:"actions"},T={class:"uni-desc"},U={class:"snapshot"},q=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(z){const h=$(),t=g(),f=e=>{h.tabList=D(e.tabs)},k=b(async e=>{await N(`workspace_snapshot_${e.id}`),t.snapshots=t.snapshots.filter(c=>c.id!==e.id),_.success(v("deleteSuccess"))}),o=w(""),y=async()=>{if(!o.value){_.error(v("nameRequired"));return}const e=t.createSnapshot(o.value);await t.addSnapshot(e),_.success(v("saveCompleted"))};return(e,c)=>{const C=V,l=W;return p(),i("div",F,[a("div",L,[r(C,{value:o.value,"onUpdate:value":c[0]||(c[0]=s=>o.value=s),placeholder:e.$t("name"),style:{"max-width":"300px"}},null,8,["value","placeholder"]),r(l,{type:"primary",onClick:y},{default:d(()=>[u(n(e.$t("saveWorkspaceSnapshot")),1)]),_:1})]),a("p",T,n(e.$t("WorkspaceSnapshotDesc")),1),a("ul",U,[(p(!0),i(I,null,B(m(t).snapshots,s=>(p(),i("li",{key:s.id},[a("div",null,[a("span",null,n(s.name),1)]),a("div",null,[r(l,{onClick:S=>f(s)},{default:d(()=>[u(n(e.$t("restore")),1)]),_:2},1032,["onClick"]),r(l,{onClick:S=>m(k)(s)},{default:d(()=>[u(n(e.$t("remove")),1)]),_:2},1032,["onClick"])])]))),128))])])}}});const G=R(q,[["__scopeId","data-v-2c44013c"]]);export{G as default};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{cf as t,cg as e,ch as r,ci as n,aY as a}from"./index-291103b4.js";function o(i,s){return t(e(i,s,r),i+"")}function b(i){return n(i)&&a(i)}export{o as b,b as i};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
.container[data-v-2e2db2a9]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-2e2db2a9]{padding:8px;background-color:var(--zp-primary-background)}.container .refresh-button[data-v-2e2db2a9]{position:absolute;top:90%;left:50%;transform:translate(-50%,-50%);z-index:99;background:white;border-radius:9999px;box-shadow:0 0 20px var(--zp-secondary)}.container .file-list[data-v-2e2db2a9]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-2e2db2a9]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
.container[data-v-571ca593]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-571ca593]{padding:8px;background-color:var(--zp-primary-background)}.container .refresh-button[data-v-571ca593]{position:absolute;top:90%;left:50%;transform:translate(-50%,-50%);z-index:99;background:white;border-radius:9999px;box-shadow:0 0 20px var(--zp-secondary)}.container .file-list[data-v-571ca593]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-571ca593]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
|
|
@ -1 +1 @@
|
|||
import{d as q,$ as H,r as x,o as J,S as p,T as b,c as t,a2 as e,U as f,a1 as r,V as M,W as v,J as Q,a4 as Y,ad as Z,ae as F,Y as R,a0 as j,cE as X,y as ee,cF as le,ai as te,ag as se,R as ie,Z as ne}from"./index-291103b4.js";import{a as ae,b as oe,c as re,L as ce,R as de,f as ue,_ as me}from"./MultiSelectKeep-b801971c.js";import{u as pe,c as fe,a as ve,F as ge,d as _e}from"./FileItem-05696d6c.js";import"./functionalCallableComp-33cd562d.js";/* empty css */import"./shortcut-9b128798.js";import"./Checkbox-12aa1d4b.js";import"./index-89cb307c.js";import"./index-2541210c.js";import"./_isIterateeCall-e0eaeb93.js";const ke={class:"refresh-button"},we={class:"hint"},Ce={key:0,class:"preview-switch"},Se=q({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(he){const V=H(),d=x(!1),n=x([]),a=n,g=async()=>{try{d.value=!0;const s=await X();s.length===0&&ee.warn("No data, please generate index in image search page first"),n.value=s}finally{d.value=!1,k()}};J(g);const{stackViewEl:A,multiSelectedIdxs:u,stack:$,scroller:z}=pe({images:n}).toRefs(),{onClearAllSelected:N,onSelectAll:B,onReverseSelect:P}=fe();ae();const{itemSize:_,gridItems:T,cellWidth:E,onScroll:k}=ve(),{showGenInfo:c,imageGenInfo:w,q:U,onContextMenuClick:D,onFileItemClick:G}=oe({openNext:le}),{previewIdx:o,previewing:C,onPreviewVisibleChange:K,previewImgMove:S,canPreview:h}=re(),y=async(s,l,m)=>{$.value=[{curr:"",files:n.value}],await D(s,l,m)};return(s,l)=>{const m=me,O=te,L=se,W=ie;return p(),b("div",{class:"container",ref_key:"stackViewEl",ref:A},[t(m,{show:!!e(u).length||e(V).keepMultiSelect,onClearAllSelected:e(N),onSelectAll:e(B),onReverseSelect:e(P)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),f("div",ke,[t(O,{onClick:g,type:"primary",loading:d.value,shape:"round"},{default:r(()=>[M(v(s.$t("shuffle")),1)]),_:1},8,["loading"])]),t(W,{visible:e(c),"onUpdate:visible":l[1]||(l[1]=i=>Y(c)?c.value=i:null),width:"70vw","mask-closable":"",onOk:l[2]||(l[2]=i=>c.value=!1)},{cancelText:r(()=>[]),default:r(()=>[t(L,{active:"",loading:!e(U).isIdle},{default:r(()=>[f("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:l[0]||(l[0]=i=>e(Q)(e(w)))},[f("div",we,v(s.$t("doubleClickToCopy")),1),M(" "+v(e(w)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),t(e(_e),{ref_key:"scroller",ref:z,class:"file-list",items:n.value.slice(),"item-size":e(_).first,"key-field":"fullpath","item-secondary-size":e(_).second,gridItems:e(T),onScroll:e(k)},{default:r(({item:i,index:I})=>[t(ge,{idx:I,file:i,"cell-width":e(E),"full-screen-preview-image-url":e(a)[e(o)]?e(Z)(e(a)[e(o)]):"",onContextMenuClick:y,onPreviewVisibleChange:e(K),"is-selected-mutil-files":e(u).length>1,selected:e(u).includes(I),onFileItemClick:e(G)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(C)?(p(),b("div",Ce,[t(e(ce),{onClick:l[3]||(l[3]=i=>e(S)("prev")),class:F({disable:!e(h)("prev")})},null,8,["class"]),t(e(de),{onClick:l[4]||(l[4]=i=>e(S)("next")),class:F({disable:!e(h)("next")})},null,8,["class"])])):R("",!0),e(C)&&e(a)&&e(a)[e(o)]?(p(),j(ue,{key:1,file:e(a)[e(o)],idx:e(o),onContextMenuClick:y},null,8,["file","idx"])):R("",!0)],512)}}});const ze=ne(Se,[["__scopeId","data-v-2e2db2a9"]]);export{ze as default};
|
||||
import{d as q,$ as H,r as x,o as J,S as p,T as b,c as t,a2 as e,U as f,a1 as r,V as M,W as v,J as Q,a4 as Y,ad as Z,ae as F,Y as R,a0 as j,cE as X,y as ee,cF as le,ai as te,ag as se,R as ie,Z as ne}from"./index-5b5fdd56.js";import{a as ae,b as oe,c as re,L as ce,R as de,f as ue,_ as me}from"./MultiSelectKeep-72e9597f.js";import{u as pe,c as fe,a as ve,F as ge,d as _e}from"./FileItem-b2542180.js";import"./functionalCallableComp-51195a3e.js";/* empty css */import"./shortcut-bdce38ed.js";import"./Checkbox-5fa7cbf6.js";import"./index-a0e30b33.js";import"./index-b6f2a43c.js";import"./_isIterateeCall-c830f443.js";const ke={class:"refresh-button"},we={class:"hint"},Ce={key:0,class:"preview-switch"},Se=q({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(he){const V=H(),d=x(!1),n=x([]),a=n,g=async()=>{try{d.value=!0;const s=await X();s.length===0&&ee.warn("No data, please generate index in image search page first"),n.value=s}finally{d.value=!1,k()}};J(g);const{stackViewEl:A,multiSelectedIdxs:u,stack:$,scroller:z}=pe({images:n}).toRefs(),{onClearAllSelected:N,onSelectAll:B,onReverseSelect:P}=fe();ae();const{itemSize:_,gridItems:T,cellWidth:E,onScroll:k}=ve(),{showGenInfo:c,imageGenInfo:w,q:U,onContextMenuClick:D,onFileItemClick:G}=oe({openNext:le}),{previewIdx:o,previewing:C,onPreviewVisibleChange:K,previewImgMove:S,canPreview:h}=re(),y=async(s,l,m)=>{$.value=[{curr:"",files:n.value}],await D(s,l,m)};return(s,l)=>{const m=me,O=te,L=se,W=ie;return p(),b("div",{class:"container",ref_key:"stackViewEl",ref:A},[t(m,{show:!!e(u).length||e(V).keepMultiSelect,onClearAllSelected:e(N),onSelectAll:e(B),onReverseSelect:e(P)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),f("div",ke,[t(O,{onClick:g,type:"primary",loading:d.value,shape:"round"},{default:r(()=>[M(v(s.$t("shuffle")),1)]),_:1},8,["loading"])]),t(W,{visible:e(c),"onUpdate:visible":l[1]||(l[1]=i=>Y(c)?c.value=i:null),width:"70vw","mask-closable":"",onOk:l[2]||(l[2]=i=>c.value=!1)},{cancelText:r(()=>[]),default:r(()=>[t(L,{active:"",loading:!e(U).isIdle},{default:r(()=>[f("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:l[0]||(l[0]=i=>e(Q)(e(w)))},[f("div",we,v(s.$t("doubleClickToCopy")),1),M(" "+v(e(w)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),t(e(_e),{ref_key:"scroller",ref:z,class:"file-list",items:n.value.slice(),"item-size":e(_).first,"key-field":"fullpath","item-secondary-size":e(_).second,gridItems:e(T),onScroll:e(k)},{default:r(({item:i,index:I})=>[t(ge,{idx:I,file:i,"cell-width":e(E),"full-screen-preview-image-url":e(a)[e(o)]?e(Z)(e(a)[e(o)]):"",onContextMenuClick:y,onPreviewVisibleChange:e(K),"is-selected-mutil-files":e(u).length>1,selected:e(u).includes(I),onFileItemClick:e(G)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(C)?(p(),b("div",Ce,[t(e(ce),{onClick:l[3]||(l[3]=i=>e(S)("prev")),class:F({disable:!e(h)("prev")})},null,8,["class"]),t(e(de),{onClick:l[4]||(l[4]=i=>e(S)("next")),class:F({disable:!e(h)("next")})},null,8,["class"])])):R("",!0),e(C)&&e(a)&&e(a)[e(o)]?(p(),j(ue,{key:1,file:e(a)[e(o)],idx:e(o),onContextMenuClick:y},null,8,["file","idx"])):R("",!0)],512)}}});const ze=ne(Se,[["__scopeId","data-v-571ca593"]]);export{ze as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{R as y,C as v}from"./index-a2b6d909.js";import{cp as f,c as d,A as P,d as w,S as o,T as c,U as r,X as S,a6 as O,aE as V,a1 as b,V as u,W as p,a2 as R,ai as $,Z as x,O as H,I as _,Q as m}from"./index-291103b4.js";const A=f(y),E=f(v);var L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z"}}]},name:"pushpin",theme:"filled"};const C=L;function h(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){N(t,i,s[i])})}return t}function N(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var l=function(e,s){var n=h({},e,s.attrs);return d(P,h({},n,{icon:C}),null)};l.displayName="PushpinFilled";l.inheritAttrs=!1;const z=l,F={class:"record-container"},I={style:{flex:"1"}},k={class:"rec-actions"},B=["onClick"],j=w({__name:"HistoryRecord",props:{records:{}},emits:["reuseRecord"],setup(t){return(e,s)=>{const n=$;return o(),c("div",null,[r("ul",F,[(o(!0),c(S,null,O(e.records.getRecords(),i=>(o(),c("li",{key:i.id,class:"record"},[r("div",I,[V(e.$slots,"default",{record:i},void 0,!0)]),r("div",k,[d(n,{onClick:g=>e.$emit("reuseRecord",i),type:"primary"},{default:b(()=>[u(p(e.$t("restore")),1)]),_:2},1032,["onClick"]),r("div",{class:"pin",onClick:g=>e.records.switchPin(i)},[d(R(z)),u(" "+p(e.records.isPinned(i)?e.$t("unpin"):e.$t("pin")),1)],8,B)])]))),128))])])}}});const T=x(j,[["__scopeId","data-v-834a248f"]]);class a{constructor(e=128,s=[],n=[]){this.maxLength=e,this.records=s,this.pinnedValues=n}isPinned(e){return this.pinnedValues.some(s=>s.id===e.id)}add(e){this.records.length>=this.maxLength&&this.records.pop(),this.records.unshift({...e,id:H()+Date.now(),time:new Date().toLocaleString()})}pin(e){const s=this.records.findIndex(n=>n.id===e.id);s!==-1&&this.records.splice(s,1),this.pinnedValues.push(e)}unpin(e){const s=this.pinnedValues.findIndex(n=>n.id===e.id);s!==-1&&this.pinnedValues.splice(s,1),this.records.unshift(e)}switchPin(e){this.isPinned(e)?this.unpin(e):this.pin(e)}getRecords(){return[...this.pinnedValues,...this.records]}getPinnedValues(){return this.pinnedValues}}const q=_(`${m}fuzzy-search-HistoryRecord`,new a,{serializer:{read:t=>{const e=JSON.parse(t);return new a(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}}),M=_(`${m}tag-search-HistoryRecord`,new a,{serializer:{read:t=>{const e=JSON.parse(t);return new a(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}});export{T as H,E as _,A as a,q as f,M as t};
|
||||
import{R as y,C as v}from"./index-2869601c.js";import{cp as f,c as d,A as P,d as w,S as o,T as c,U as r,X as S,a6 as O,aE as V,a1 as b,V as u,W as p,a2 as R,ai as $,Z as x,O as H,I as _,Q as m}from"./index-5b5fdd56.js";const A=f(y),E=f(v);var L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z"}}]},name:"pushpin",theme:"filled"};const C=L;function h(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){N(t,i,s[i])})}return t}function N(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var l=function(e,s){var n=h({},e,s.attrs);return d(P,h({},n,{icon:C}),null)};l.displayName="PushpinFilled";l.inheritAttrs=!1;const z=l,F={class:"record-container"},I={style:{flex:"1"}},k={class:"rec-actions"},B=["onClick"],j=w({__name:"HistoryRecord",props:{records:{}},emits:["reuseRecord"],setup(t){return(e,s)=>{const n=$;return o(),c("div",null,[r("ul",F,[(o(!0),c(S,null,O(e.records.getRecords(),i=>(o(),c("li",{key:i.id,class:"record"},[r("div",I,[V(e.$slots,"default",{record:i},void 0,!0)]),r("div",k,[d(n,{onClick:g=>e.$emit("reuseRecord",i),type:"primary"},{default:b(()=>[u(p(e.$t("restore")),1)]),_:2},1032,["onClick"]),r("div",{class:"pin",onClick:g=>e.records.switchPin(i)},[d(R(z)),u(" "+p(e.records.isPinned(i)?e.$t("unpin"):e.$t("pin")),1)],8,B)])]))),128))])])}}});const T=x(j,[["__scopeId","data-v-834a248f"]]);class a{constructor(e=128,s=[],n=[]){this.maxLength=e,this.records=s,this.pinnedValues=n}isPinned(e){return this.pinnedValues.some(s=>s.id===e.id)}add(e){this.records.length>=this.maxLength&&this.records.pop(),this.records.unshift({...e,id:H()+Date.now(),time:new Date().toLocaleString()})}pin(e){const s=this.records.findIndex(n=>n.id===e.id);s!==-1&&this.records.splice(s,1),this.pinnedValues.push(e)}unpin(e){const s=this.pinnedValues.findIndex(n=>n.id===e.id);s!==-1&&this.pinnedValues.splice(s,1),this.records.unshift(e)}switchPin(e){this.isPinned(e)?this.unpin(e):this.pin(e)}getRecords(){return[...this.pinnedValues,...this.records]}getPinnedValues(){return this.pinnedValues}}const q=_(`${m}fuzzy-search-HistoryRecord`,new a,{serializer:{read:t=>{const e=JSON.parse(t);return new a(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}}),M=_(`${m}tag-search-HistoryRecord`,new a,{serializer:{read:t=>{const e=JSON.parse(t);return new a(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}});export{T as H,E as _,A as a,q as f,M as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{u as C,g as d}from"./FileItem-05696d6c.js";import{r as b,q as G,cm as j,cn as y,co as D}from"./index-291103b4.js";const r=new Map,A=()=>{const{useEventListen:k,sortedFiles:f,getViewableAreaFiles:w}=C().toRefs(),c=b(d.defaultChangeIndchecked),u=b(d.defaultSeedChangeChecked),g=async()=>{if(await G(100),!c.value)return;const o=w.value().filter(e=>j(e.fullpath)&&!e.gen_info_obj);if(!o.length)return;const t=await y(o.map(e=>e.fullpath).filter(e=>!r.has(e)));o.forEach(e=>{const i=t[e.fullpath]||r.get(e.fullpath)||"";r.set(e.fullpath,i),e.gen_info_obj=D(i),e.gen_info_raw=i})};k.value("viewableAreaFilesChange",g);const F=o=>{const t=f.value;return[o,u.value,t[o-1],t[o],t[o+1]]};function I(o,t,e,i){const a={diff:{},empty:!0,ownFile:"",otherFile:""};if(t+e<0||t+e>=f.value.length||f.value[t]==null||!("gen_info_obj"in f.value[t])||!("gen_info_obj"in f.value[t+e]))return a;const l=o,s=f.value[t+e].gen_info_obj;if(s==null)return a;const h=["hashes","resources"];a.diff={},a.ownFile=i.name,a.otherFile=f.value[t+e].name,a.empty=!1,u.value||h.push("seed");for(const n in l)if(!h.includes(n)){if(!(n in s)){a.diff[n]="+";continue}if(l[n]!=s[n])if(n.includes("rompt")&&l[n]!=""&&s[n]!=""){const p=l[n].split(","),m=s[n].split(",");let _=0;for(const v in p)p[v]!=m[v]&&_++;a.diff[n]=_}else a.diff[n]=[l[n],s[n]]}return a}return{getGenDiff:I,changeIndchecked:c,seedChangeChecked:u,getRawGenParams:()=>g(),getGenDiffWatchDep:F}};export{A as u};
|
||||
import{u as C,g as d}from"./FileItem-b2542180.js";import{r as b,q as G,cm as j,cn as y,co as D}from"./index-5b5fdd56.js";const r=new Map,A=()=>{const{useEventListen:k,sortedFiles:f,getViewableAreaFiles:w}=C().toRefs(),c=b(d.defaultChangeIndchecked),u=b(d.defaultSeedChangeChecked),g=async()=>{if(await G(100),!c.value)return;const o=w.value().filter(e=>j(e.fullpath)&&!e.gen_info_obj);if(!o.length)return;const t=await y(o.map(e=>e.fullpath).filter(e=>!r.has(e)));o.forEach(e=>{const i=t[e.fullpath]||r.get(e.fullpath)||"";r.set(e.fullpath,i),e.gen_info_obj=D(i),e.gen_info_raw=i})};k.value("viewableAreaFilesChange",g);const F=o=>{const t=f.value;return[o,u.value,t[o-1],t[o],t[o+1]]};function I(o,t,e,i){const a={diff:{},empty:!0,ownFile:"",otherFile:""};if(t+e<0||t+e>=f.value.length||f.value[t]==null||!("gen_info_obj"in f.value[t])||!("gen_info_obj"in f.value[t+e]))return a;const l=o,s=f.value[t+e].gen_info_obj;if(s==null)return a;const h=["hashes","resources"];a.diff={},a.ownFile=i.name,a.otherFile=f.value[t+e].name,a.empty=!1,u.value||h.push("seed");for(const n in l)if(!h.includes(n)){if(!(n in s)){a.diff[n]="+";continue}if(l[n]!=s[n])if(n.includes("rompt")&&l[n]!=""&&s[n]!=""){const p=l[n].split(","),m=s[n].split(",");let _=0;for(const v in p)p[v]!=m[v]&&_++;a.diff[n]=_}else a.diff[n]=[l[n],s[n]]}return a}return{getGenDiff:I,changeIndchecked:c,seedChangeChecked:u,getRawGenParams:()=>g(),getGenDiffWatchDep:F}};export{A as u};
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Infinite Image Browsing</title>
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-291103b4.js"></script>
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-5b5fdd56.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-3112bec6.css">
|
||||
</head>
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,15 @@ export const useGlobalStore = defineStore(
|
|||
const enableThumbnail = ref(true)
|
||||
const gridThumbnailResolution = ref(512)
|
||||
const defaultSortingMethod = ref(SortMethod.CREATED_TIME_DESC)
|
||||
const defaultGridCellWidth = ref(cellWidthMap(parent.window.innerHeight))
|
||||
const defaultGridCellWidth = ref(256)
|
||||
|
||||
try {
|
||||
if (typeof parent !== 'undefined' && parent.window) {
|
||||
defaultGridCellWidth.value = cellWidthMap(parent.window.innerHeight)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
||||
const darkModeControl = ref<'light' | 'dark' | 'auto'>('auto')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue