From 8f670db13c358d5ad24972a1ad1bd92e052abd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix?= Date: Fri, 22 Nov 2024 18:23:11 +0100 Subject: [PATCH] rebuild front --- panoptic_back/panoptic/html/assets/HomeView-04d1f2e9.js | 1 - panoptic_back/panoptic/html/assets/HomeView-91d06d01.js | 1 + .../assets/{HomeView-fa1e879e.css => HomeView-e5222f81.css} | 2 +- .../{PanopticView-4be4490c.js => PanopticView-f227269d.js} | 2 +- .../assets/{TestView-8bc8a48d.js => TestView-d606e433.js} | 2 +- .../assets/{Tutorial-8facc104.js => Tutorial-513a3a94.js} | 2 +- .../html/assets/{index-c17cfbdf.js => index-9c28c371.js} | 6 +++--- panoptic_back/panoptic/html/index.html | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 panoptic_back/panoptic/html/assets/HomeView-04d1f2e9.js create mode 100644 panoptic_back/panoptic/html/assets/HomeView-91d06d01.js rename panoptic_back/panoptic/html/assets/{HomeView-fa1e879e.css => HomeView-e5222f81.css} (75%) rename panoptic_back/panoptic/html/assets/{PanopticView-4be4490c.js => PanopticView-f227269d.js} (99%) rename panoptic_back/panoptic/html/assets/{TestView-8bc8a48d.js => TestView-d606e433.js} (98%) rename panoptic_back/panoptic/html/assets/{Tutorial-8facc104.js => Tutorial-513a3a94.js} (98%) rename panoptic_back/panoptic/html/assets/{index-c17cfbdf.js => index-9c28c371.js} (98%) diff --git a/panoptic_back/panoptic/html/assets/HomeView-04d1f2e9.js b/panoptic_back/panoptic/html/assets/HomeView-04d1f2e9.js deleted file mode 100644 index cdbc3cdf..00000000 --- a/panoptic_back/panoptic/html/assets/HomeView-04d1f2e9.js +++ /dev/null @@ -1 +0,0 @@ -import{d as U,u as O,r as w,c as k,a as l,b as e,t as i,e as x,w as E,v as M,n as I,M as L,o as s,g as G,p as R,f as T,_ as F,F as A,h as Y,i as g,j as D,k as J,l as Z,m as ee,q as B,s as N,x as H,y as te,z as K,D as se,P as oe}from"./index-c17cfbdf.js";import{_ as le}from"./Tutorial-8facc104.js";const Q=r=>(R("data-v-a138fd7d"),r=r(),T(),r),ne={class:""},ae={class:"mb-3"},ie={class:"d-flex text-start input mb-2"},ce={class:"info"},re={key:0},ue={key:1,class:"text-placeholder"},de=Q(()=>e("i",{class:"bi bi-folder"},null,-1)),pe=[de],_e={class:"d-flex text-start input"},ve={class:"info"},me={class:"flex-grow-1 value text-dim"},he={class:"d-flex mt-2"},ge=Q(()=>e("div",{class:"flex-grow-1"},null,-1)),fe=U({__name:"Create",emits:["cancel","create"],setup(r,{emit:t}){const f=O(),d=t,v=w(""),o=w(""),c=k(()=>v.value!=""&&o.value!="");function b(m){m&&(v.value=m)}function p(){f.showModal(L.FOLDERSELECTION,{callback:b,mode:"create"})}return(m,y)=>(s(),l("div",ne,[e("h3",ae,i(m.$t("main.home.create_title")),1),e("div",ie,[e("div",ce,i(m.$t("main.home.label.folder")),1),e("div",{class:"flex-grow-1 value text-dim",style:{cursor:"pointer"},onClick:p},[v.value!=""?(s(),l("span",re,i(v.value),1)):(s(),l("span",ue,i(m.$t("main.home.label.path_placeholder")),1))]),e("div",{id:"select-folder",class:"folder",style:{cursor:"pointer"},onClick:y[0]||(y[0]=C=>{p(),x(G)()})},pe)]),e("div",_e,[e("div",ve,i(m.$t("main.home.label.name")),1),e("div",me,[E(e("input",{type:"text","onUpdate:modelValue":y[1]||(y[1]=C=>o.value=C),placeholder:"project_name",style:{width:"100%"}},null,512),[[M,o.value]])])]),e("div",he,[ge,e("div",{class:"btn-grey hover-grey",onClick:y[2]||(y[2]=C=>d("cancel"))},i(m.$t("main.home.label.cancel")),1),e("div",{id:"confirm-create",class:I(["ms-2",c.value?"btn-blue":"btn-grey text-dim"]),onClick:y[3]||(y[3]=C=>{d("create",{path:v.value,name:o.value}),x(G)()})},i(m.$t("main.home.label.create")),3)])]))}});const be=F(fe,[["__scopeId","data-v-a138fd7d"]]),ye={class:"create-option d-flex"},$e={class:"flex-grow-1"},we={class:"create-title m-0"},ke={class:"create-explanation"},xe={class:"create-option d-flex"},Ce={class:"flex-grow-1"},Pe={class:"create-title m-0"},Se={class:"create-explanation"},Ee=U({__name:"Options",emits:["create","import"],setup(r,{emit:t}){const f=O(),d=t;function v(c){c&&d("import",c)}function o(){f.showModal(L.FOLDERSELECTION,{callback:v,mode:"import"})}return(c,b)=>(s(),l(A,null,[e("div",ye,[e("div",$e,[e("h6",we,i(c.$t("main.projects.create")),1),e("span",ke,i(c.$t("main.projects.create_details")),1)]),e("div",{id:"create-project",class:"create-btn highlight",onClick:b[0]||(b[0]=p=>{d("create"),x(G)()})},i(c.$t("main.projects.create_button")),1)]),e("div",xe,[e("div",Ce,[e("h6",Pe,i(c.$t("main.projects.import")),1),e("span",Se,i(c.$t("main.projects.import_details")),1)]),e("div",{class:"create-btn",onClick:o},i(c.$t("main.projects.import_button")),1)])],64))}});const Me=F(Ee,[["__scopeId","data-v-ef56d793"]]),Ie="/assets/duck-0f72bec4.svg";const Le=r=>(R("data-v-01169a42"),r=r(),T(),r),Fe=Le(()=>e("img",{alt:"Duck",class:"logo",src:Ie,style:{height:"100vh"}},null,-1)),je=[Fe],W="ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba",Ve={__name:"Egg",setup(r){let t="",f=w(-1100),d="";return window.addEventListener("keydown",async function(v){t+=v.key,W.slice(0,t.length)!==t&&(t=""),t.length===W.length&&(t===W&&(d="",f.value=-300,setTimeout(()=>{d="active",f.value=-1100},1500)),t="")}),(v,o)=>(s(),l("div",{id:"duck-container",style:Y({right:x(f).toString()+"px"}),class:I(x(d))},je,6))}},Ne=F(Ve,[["__scopeId","data-v-01169a42"]]),X=r=>(R("data-v-0ece9efe"),r=r(),T(),r),Ae={style:{"font-size":"20px"},class:"mb-1"},De={key:0,class:"d-flex"},Ue=X(()=>e("i",{class:"bi bi-github me-2 ms-1",style:{"font-size":"19px"}},null,-1)),Oe={key:2,style:{position:"relative",top:"7px"},class:"spinner-border spinner-border-sm text-primary ms-1",role:"status"},Re={class:"visually-hidden"},Te={key:1,class:"d-flex"},qe=X(()=>e("i",{class:"bi bi-folder me-2 ms-1"},null,-1)),ze={key:2,style:{position:"relative",top:"7px"},class:"spinner-border spinner-border-sm text-primary ms-1",role:"status"},Be={class:"visually-hidden"},He={key:2,class:"text-warning"},We=U({__name:"PluginForm",emits:["cancel"],setup(r,{expose:t,emit:f}){const d=O(),v=f;t({setPanopticMl:_});const o=w("github"),c=w(""),b=w(""),p=w(""),m=w(!1),y=k(()=>d.data.plugins.map(n=>n.name)),C=k(()=>!(p.value==""||y.value.includes(p.value))),P=k(()=>o.value=="github"&&c.value.length>0||o.value=="local"&&b.value.length>0),j=k(()=>P.value&&C.value),V=k(()=>P.value&&y.value.includes(p.value)?"main.home.plugins.error_name_not_unique":P.value?"main.home.plugins.require_unique_name":o.value=="github"?"main.home.plugins.require_url":"main.home.plugins.require_folder");function q(n){if(!n)return;b.value=n;let a=n.split("/"),h=a[a.length-1]||a[a.length-2];h&&(p.value=h)}function z(){d.showModal(L.FOLDERSELECTION,{callback:q})}function u(){if(o.value=="github"&&p.value==""){const n=c.value.split("/"),a=n[n.length-1],h=a.endsWith(".git")?a.slice(0,-4):a;p.value=h}}async function $(){m.value=!0,await J();const n={pluginName:p.value};o.value=="github"&&(n.gitUrl=c.value),o.value=="local"&&(n.path=b.value),await d.addPlugin(n),m.value=!1,v("cancel")}function _(){o.value="github",c.value="https://github.com/CERES-Sorbonne/PanopticML",p.value="PanopticML"}return(n,a)=>(s(),l("div",null,[e("div",Ae,[e("i",{class:I(["bi bi-github rounded bbb me-1",o.value=="github"?"selected":""]),onClick:a[0]||(a[0]=h=>o.value="github")},null,2),e("i",{class:I(["bi bi-folder rounded bbb me-1",o.value=="local"?"selected":""]),onClick:a[1]||(a[1]=h=>o.value="local")},null,2)]),o.value=="github"?(s(),l("div",De,[Ue,E(e("input",{type:"url","onUpdate:modelValue":a[2]||(a[2]=h=>c.value=h),placeholder:"Enter git url",style:{width:"250px"}},null,512),[[M,c.value]]),P.value?E((s(),l("input",{key:0,"onUpdate:modelValue":a[3]||(a[3]=h=>p.value=h),type:"text",placeholder:"plugin unique name",style:{width:"150px"},class:"ms-2",onFocus:u},null,544)),[[M,p.value]]):g("",!0),j.value?(s(),l("div",{key:1,class:"bbb ms-2",onClick:$},i(n.$t("main.home.plugins.install")),1)):g("",!0),m.value?(s(),l("div",Oe,[e("span",Re,i(n.$t("main.home.plugins.load")),1)])):g("",!0)])):g("",!0),o.value=="local"?(s(),l("div",Te,[e("div",{class:"bbb pe-2 me-2",onClick:z},[qe,D("Select")]),E(e("input",{type:"url","onUpdate:modelValue":a[4]||(a[4]=h=>b.value=h),placeholder:"Folder path",style:{width:"180px"}},null,512),[[M,b.value]]),P.value?E((s(),l("input",{key:0,"onUpdate:modelValue":a[5]||(a[5]=h=>p.value=h),type:"text",placeholder:"plugin unique name",style:{width:"150px"},class:"ms-2"},null,512)),[[M,p.value]]):g("",!0),j.value?(s(),l("div",{key:1,class:"bbb ms-2",onClick:$},i(n.$t("main.home.plugins.install")),1)):g("",!0),m.value?(s(),l("div",ze,[e("span",Be,i(n.$t("main.home.plugins.load")),1)])):g("",!0)])):g("",!0),e("div",{class:I(["mt-2 mb-2",V.value.includes(".error")?"text-danger":""])},i(n.$t(V.value)),3),o.value!="github"||o.value=="github"&&!c.value.includes("github.com/CERES-Sorbonne")?(s(),l("div",He,i(n.$t("main.home.plugins.warning")),1)):g("",!0),e("div",null,[e("div",{class:"bbb mt-2 text-center",style:{width:"70px"},onClick:a[6]||(a[6]=h=>v("cancel"))},"Cancel")])]))}});const Ge=F(We,[["__scopeId","data-v-0ece9efe"]]),S=r=>(R("data-v-74778545"),r=r(),T(),r),Je={key:0},Ke={class:"window2 d-flex"},Qe={key:0,class:"project-menu"},Xe={class:"d-flex"},Ye=["onClick"],Ze={class:"m-0"},et={class:"m-0 p-0 text-wrap text-break dimmed-2",style:{"font-size":"13px"}},tt={class:"project-option flex-shrink-0"},st=S(()=>e("i",{class:"bi bi-three-dots-vertical"},null,-1)),ot={class:"text-start"},lt=["onClick"],nt=S(()=>e("i",{class:"bi bi-trash me-1"},null,-1)),at={key:1,class:"flex-grow-1"},it={class:"d-flex flex-column main-menu justify-content-center"},ct={class:"icon"},rt=S(()=>e("h1",{class:"m-0 p-0"},"Panoptic",-1)),ut=S(()=>e("h6",{class:"dimmed-2"},"Version 0.4",-1)),dt={class:"lang"},pt=S(()=>e("i",{class:"bi bi-translate",style:{"margin-right":"0.5rem"}},null,-1)),_t=["value"],vt={id:"main-menu",class:"create-menu mt-5 pt-5"},mt={class:"mt-5 plugin-preview"},ht={class:"text-center"},gt={key:0,class:"text-center"},ft=S(()=>e("i",{class:"bi bi-lightbulb"},null,-1)),bt={class:"flex-grow-1 plugin-preview",style:{"overflow-y":"auto"}},yt={key:1},$t={class:"ps-1"},wt=["onClick"],kt={key:2,class:"text-center mt-5 w-100"},xt=S(()=>e("p",null,"Waiting for Server...",-1)),Ct=[xt],Pt=U({__name:"HomeView",setup(r){const t=O(),f=w(0),d=w(!1),v=w(null),o=w(!0),c=["fr","en"],b=k(()=>Array.isArray(t.data.status.projects)&&t.data.status.projects.length>0),p=k(()=>!b.value&&t.data.init),m=k(()=>!b.value&&t.data.init&&t.openModalId!==L.FIRSTMODAL),y=k(()=>t.data.plugins.some(u=>u.sourceUrl&&u.sourceUrl.includes("https://github.com/CERES-Sorbonne/PanopticML")));function C(u){return u.replaceAll("-","‑")}function P(u){u.path&&u.name&&t.createProject(u.path,u.name)}function j(u){t.importProject(u)}function V(u){t.delPlugin(u)}async function q(){d.value=!0,await J(),v.value.setPanopticMl()}async function z(){o.value=!1,await J(),o.value=!0}return Z(()=>{t.isProjectLoaded&&ee.push("/view"),p.value&&t.showModal(L.FIRSTMODAL)}),(u,$)=>o.value?(s(),l("div",Je,[B(Ne),m.value?(s(),N(le,{key:0})):g("",!0),e("div",Ke,[b.value?(s(),l("div",Qe,[(s(!0),l(A,null,H(x(t).data.status.projects,_=>(s(),l("div",Xe,[e("div",{class:"project flex-grow-1 overflow-hidden",onClick:n=>x(t).loadProject(_.path)},[e("h5",Ze,i(_.name),1),e("div",et,i(C(_.path)),1)],8,Ye),e("div",tt,[B(se,null,{button:K(()=>[st]),popup:K(({hide:n})=>[e("div",ot,[e("div",{onClick:a=>{x(t).deleteProject(_.path),n()},class:"m-1 base-hover p-1"},[nt,D("delete ")],8,lt)])]),_:2},1024)])]))),256))])):g("",!0),x(t).data.init?(s(),l("div",at,[e("div",it,[e("div",null,[e("div",ct,[B(oe)]),rt,ut,e("div",dt,[pt,E(e("select",{"onUpdate:modelValue":$[0]||($[0]=_=>u.$i18n.locale=_),onChange:z},[(s(),l(A,null,H(c,(_,n)=>e("option",{key:`Lang${n}`,value:_},i(_.toUpperCase()),9,_t)),64))],544),[[te,u.$i18n.locale]])])]),e("div",vt,[f.value==0?(s(),N(Me,{key:0,onCreate:$[1]||($[1]=_=>f.value=1),onImport:j})):g("",!0),f.value==1?(s(),N(be,{key:1,onCancel:$[2]||($[2]=_=>f.value=0),onCreate:P})):g("",!0)]),e("div",mt,[e("h5",ht,[D(" Plugins "),e("span",{class:"sb bi bi-plus",style:{position:"relative",top:"1px"},onClick:$[3]||($[3]=_=>d.value=!0)})]),y.value?g("",!0):(s(),l("div",gt,[e("span",{class:"bb ms-1 me-1",onClick:q},[ft,D(" "+i(u.$t("main.home.plugins.install_panoptic_ml")),1)])]))]),e("div",bt,[d.value?(s(),N(Ge,{key:0,onCancel:$[4]||($[4]=_=>d.value=!1),ref_key:"pluginFormElem",ref:v},null,512)):(s(),l("div",yt,[(s(!0),l(A,null,H(x(t).data.plugins,_=>(s(),l("div",$t,[e("span",{onClick:n=>V(_.path),class:"bi bi-x base-hover"},null,8,wt),e("span",null,i(_.name),1)]))),256))]))])])])):(s(),l("div",kt,Ct))])])):g("",!0)}});const Mt=F(Pt,[["__scopeId","data-v-74778545"]]);export{Mt as default}; diff --git a/panoptic_back/panoptic/html/assets/HomeView-91d06d01.js b/panoptic_back/panoptic/html/assets/HomeView-91d06d01.js new file mode 100644 index 00000000..afa3e02c --- /dev/null +++ b/panoptic_back/panoptic/html/assets/HomeView-91d06d01.js @@ -0,0 +1 @@ +import{d as U,u as O,r as w,c as k,a as l,b as e,t as i,e as x,w as E,v as M,n as I,M as L,o as s,g as G,p as R,f as T,_ as F,F as A,h as Y,i as g,j as D,k as J,l as Z,m as ee,q as B,s as N,x as H,y as te,z as K,D as se,P as oe}from"./index-9c28c371.js";import{_ as le}from"./Tutorial-513a3a94.js";const Q=r=>(R("data-v-a138fd7d"),r=r(),T(),r),ne={class:""},ae={class:"mb-3"},ie={class:"d-flex text-start input mb-2"},ce={class:"info"},re={key:0},ue={key:1,class:"text-placeholder"},de=Q(()=>e("i",{class:"bi bi-folder"},null,-1)),pe=[de],_e={class:"d-flex text-start input"},ve={class:"info"},me={class:"flex-grow-1 value text-dim"},he={class:"d-flex mt-2"},ge=Q(()=>e("div",{class:"flex-grow-1"},null,-1)),fe=U({__name:"Create",emits:["cancel","create"],setup(r,{emit:t}){const f=O(),d=t,v=w(""),o=w(""),c=k(()=>v.value!=""&&o.value!="");function b(m){m&&(v.value=m)}function p(){f.showModal(L.FOLDERSELECTION,{callback:b,mode:"create"})}return(m,y)=>(s(),l("div",ne,[e("h3",ae,i(m.$t("main.home.create_title")),1),e("div",ie,[e("div",ce,i(m.$t("main.home.label.folder")),1),e("div",{class:"flex-grow-1 value text-dim",style:{cursor:"pointer"},onClick:p},[v.value!=""?(s(),l("span",re,i(v.value),1)):(s(),l("span",ue,i(m.$t("main.home.label.path_placeholder")),1))]),e("div",{id:"select-folder",class:"folder",style:{cursor:"pointer"},onClick:y[0]||(y[0]=C=>{p(),x(G)()})},pe)]),e("div",_e,[e("div",ve,i(m.$t("main.home.label.name")),1),e("div",me,[E(e("input",{type:"text","onUpdate:modelValue":y[1]||(y[1]=C=>o.value=C),placeholder:"project_name",style:{width:"100%"}},null,512),[[M,o.value]])])]),e("div",he,[ge,e("div",{class:"btn-grey hover-grey",onClick:y[2]||(y[2]=C=>d("cancel"))},i(m.$t("main.home.label.cancel")),1),e("div",{id:"confirm-create",class:I(["ms-2",c.value?"btn-blue":"btn-grey text-dim"]),onClick:y[3]||(y[3]=C=>{d("create",{path:v.value,name:o.value}),x(G)()})},i(m.$t("main.home.label.create")),3)])]))}});const be=F(fe,[["__scopeId","data-v-a138fd7d"]]),ye={class:"create-option d-flex"},$e={class:"flex-grow-1"},we={class:"create-title m-0"},ke={class:"create-explanation"},xe={class:"create-option d-flex"},Ce={class:"flex-grow-1"},Pe={class:"create-title m-0"},Se={class:"create-explanation"},Ee=U({__name:"Options",emits:["create","import"],setup(r,{emit:t}){const f=O(),d=t;function v(c){c&&d("import",c)}function o(){f.showModal(L.FOLDERSELECTION,{callback:v,mode:"import"})}return(c,b)=>(s(),l(A,null,[e("div",ye,[e("div",$e,[e("h6",we,i(c.$t("main.home.projects.create")),1),e("span",ke,i(c.$t("main.home.projects.create_details")),1)]),e("div",{id:"create-project",class:"create-btn highlight",onClick:b[0]||(b[0]=p=>{d("create"),x(G)()})},i(c.$t("main.home.projects.create_button")),1)]),e("div",xe,[e("div",Ce,[e("h6",Pe,i(c.$t("main.home.projects.import")),1),e("span",Se,i(c.$t("main.home.projects.import_details")),1)]),e("div",{class:"create-btn",onClick:o},i(c.$t("main.home.projects.import_button")),1)])],64))}});const Me=F(Ee,[["__scopeId","data-v-dc4965fd"]]),Ie="/assets/duck-0f72bec4.svg";const Le=r=>(R("data-v-a82a2918"),r=r(),T(),r),Fe=Le(()=>e("img",{alt:"Duck",class:"logo",src:Ie,style:{height:"100vh"}},null,-1)),je=[Fe],W="ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba",Ve={__name:"Egg",setup(r){let t="",f=w(-1100),d="";return window.addEventListener("keydown",async function(v){t+=v.key,W.slice(0,t.length)!==t&&(t=""),t.length===W.length&&(t===W&&(d="",f.value=-50,setTimeout(()=>{d="active",f.value=-100},1500)),t="")}),(v,o)=>(s(),l("div",{id:"duck-container",style:Y({right:x(f).toString()+"vh"}),class:I(x(d))},je,6))}},Ne=F(Ve,[["__scopeId","data-v-a82a2918"]]),X=r=>(R("data-v-0ece9efe"),r=r(),T(),r),Ae={style:{"font-size":"20px"},class:"mb-1"},De={key:0,class:"d-flex"},Ue=X(()=>e("i",{class:"bi bi-github me-2 ms-1",style:{"font-size":"19px"}},null,-1)),Oe={key:2,style:{position:"relative",top:"7px"},class:"spinner-border spinner-border-sm text-primary ms-1",role:"status"},Re={class:"visually-hidden"},Te={key:1,class:"d-flex"},qe=X(()=>e("i",{class:"bi bi-folder me-2 ms-1"},null,-1)),ze={key:2,style:{position:"relative",top:"7px"},class:"spinner-border spinner-border-sm text-primary ms-1",role:"status"},Be={class:"visually-hidden"},He={key:2,class:"text-warning"},We=U({__name:"PluginForm",emits:["cancel"],setup(r,{expose:t,emit:f}){const d=O(),v=f;t({setPanopticMl:_});const o=w("github"),c=w(""),b=w(""),p=w(""),m=w(!1),y=k(()=>d.data.plugins.map(n=>n.name)),C=k(()=>!(p.value==""||y.value.includes(p.value))),P=k(()=>o.value=="github"&&c.value.length>0||o.value=="local"&&b.value.length>0),j=k(()=>P.value&&C.value),V=k(()=>P.value&&y.value.includes(p.value)?"main.home.plugins.error_name_not_unique":P.value?"main.home.plugins.require_unique_name":o.value=="github"?"main.home.plugins.require_url":"main.home.plugins.require_folder");function q(n){if(!n)return;b.value=n;let a=n.split("/"),h=a[a.length-1]||a[a.length-2];h&&(p.value=h)}function z(){d.showModal(L.FOLDERSELECTION,{callback:q})}function u(){if(o.value=="github"&&p.value==""){const n=c.value.split("/"),a=n[n.length-1],h=a.endsWith(".git")?a.slice(0,-4):a;p.value=h}}async function $(){m.value=!0,await J();const n={pluginName:p.value};o.value=="github"&&(n.gitUrl=c.value),o.value=="local"&&(n.path=b.value),await d.addPlugin(n),m.value=!1,v("cancel")}function _(){o.value="github",c.value="https://github.com/CERES-Sorbonne/PanopticML",p.value="PanopticML"}return(n,a)=>(s(),l("div",null,[e("div",Ae,[e("i",{class:I(["bi bi-github rounded bbb me-1",o.value=="github"?"selected":""]),onClick:a[0]||(a[0]=h=>o.value="github")},null,2),e("i",{class:I(["bi bi-folder rounded bbb me-1",o.value=="local"?"selected":""]),onClick:a[1]||(a[1]=h=>o.value="local")},null,2)]),o.value=="github"?(s(),l("div",De,[Ue,E(e("input",{type:"url","onUpdate:modelValue":a[2]||(a[2]=h=>c.value=h),placeholder:"Enter git url",style:{width:"250px"}},null,512),[[M,c.value]]),P.value?E((s(),l("input",{key:0,"onUpdate:modelValue":a[3]||(a[3]=h=>p.value=h),type:"text",placeholder:"plugin unique name",style:{width:"150px"},class:"ms-2",onFocus:u},null,544)),[[M,p.value]]):g("",!0),j.value?(s(),l("div",{key:1,class:"bbb ms-2",onClick:$},i(n.$t("main.home.plugins.install")),1)):g("",!0),m.value?(s(),l("div",Oe,[e("span",Re,i(n.$t("main.home.plugins.load")),1)])):g("",!0)])):g("",!0),o.value=="local"?(s(),l("div",Te,[e("div",{class:"bbb pe-2 me-2",onClick:z},[qe,D("Select")]),E(e("input",{type:"url","onUpdate:modelValue":a[4]||(a[4]=h=>b.value=h),placeholder:"Folder path",style:{width:"180px"}},null,512),[[M,b.value]]),P.value?E((s(),l("input",{key:0,"onUpdate:modelValue":a[5]||(a[5]=h=>p.value=h),type:"text",placeholder:"plugin unique name",style:{width:"150px"},class:"ms-2"},null,512)),[[M,p.value]]):g("",!0),j.value?(s(),l("div",{key:1,class:"bbb ms-2",onClick:$},i(n.$t("main.home.plugins.install")),1)):g("",!0),m.value?(s(),l("div",ze,[e("span",Be,i(n.$t("main.home.plugins.load")),1)])):g("",!0)])):g("",!0),e("div",{class:I(["mt-2 mb-2",V.value.includes(".error")?"text-danger":""])},i(n.$t(V.value)),3),o.value!="github"||o.value=="github"&&!c.value.includes("github.com/CERES-Sorbonne")?(s(),l("div",He,i(n.$t("main.home.plugins.warning")),1)):g("",!0),e("div",null,[e("div",{class:"bbb mt-2 text-center",style:{width:"70px"},onClick:a[6]||(a[6]=h=>v("cancel"))},"Cancel")])]))}});const Ge=F(We,[["__scopeId","data-v-0ece9efe"]]),S=r=>(R("data-v-74778545"),r=r(),T(),r),Je={key:0},Ke={class:"window2 d-flex"},Qe={key:0,class:"project-menu"},Xe={class:"d-flex"},Ye=["onClick"],Ze={class:"m-0"},et={class:"m-0 p-0 text-wrap text-break dimmed-2",style:{"font-size":"13px"}},tt={class:"project-option flex-shrink-0"},st=S(()=>e("i",{class:"bi bi-three-dots-vertical"},null,-1)),ot={class:"text-start"},lt=["onClick"],nt=S(()=>e("i",{class:"bi bi-trash me-1"},null,-1)),at={key:1,class:"flex-grow-1"},it={class:"d-flex flex-column main-menu justify-content-center"},ct={class:"icon"},rt=S(()=>e("h1",{class:"m-0 p-0"},"Panoptic",-1)),ut=S(()=>e("h6",{class:"dimmed-2"},"Version 0.4",-1)),dt={class:"lang"},pt=S(()=>e("i",{class:"bi bi-translate",style:{"margin-right":"0.5rem"}},null,-1)),_t=["value"],vt={id:"main-menu",class:"create-menu mt-5 pt-5"},mt={class:"mt-5 plugin-preview"},ht={class:"text-center"},gt={key:0,class:"text-center"},ft=S(()=>e("i",{class:"bi bi-lightbulb"},null,-1)),bt={class:"flex-grow-1 plugin-preview",style:{"overflow-y":"auto"}},yt={key:1},$t={class:"ps-1"},wt=["onClick"],kt={key:2,class:"text-center mt-5 w-100"},xt=S(()=>e("p",null,"Waiting for Server...",-1)),Ct=[xt],Pt=U({__name:"HomeView",setup(r){const t=O(),f=w(0),d=w(!1),v=w(null),o=w(!0),c=["fr","en"],b=k(()=>Array.isArray(t.data.status.projects)&&t.data.status.projects.length>0),p=k(()=>!b.value&&t.data.init),m=k(()=>!b.value&&t.data.init&&t.openModalId!==L.FIRSTMODAL),y=k(()=>t.data.plugins.some(u=>u.sourceUrl&&u.sourceUrl.includes("https://github.com/CERES-Sorbonne/PanopticML")));function C(u){return u.replaceAll("-","‑")}function P(u){u.path&&u.name&&t.createProject(u.path,u.name)}function j(u){t.importProject(u)}function V(u){t.delPlugin(u)}async function q(){d.value=!0,await J(),v.value.setPanopticMl()}async function z(){o.value=!1,await J(),o.value=!0}return Z(()=>{t.isProjectLoaded&&ee.push("/view"),p.value&&t.showModal(L.FIRSTMODAL)}),(u,$)=>o.value?(s(),l("div",Je,[B(Ne),m.value?(s(),N(le,{key:0})):g("",!0),e("div",Ke,[b.value?(s(),l("div",Qe,[(s(!0),l(A,null,H(x(t).data.status.projects,_=>(s(),l("div",Xe,[e("div",{class:"project flex-grow-1 overflow-hidden",onClick:n=>x(t).loadProject(_.path)},[e("h5",Ze,i(_.name),1),e("div",et,i(C(_.path)),1)],8,Ye),e("div",tt,[B(se,null,{button:K(()=>[st]),popup:K(({hide:n})=>[e("div",ot,[e("div",{onClick:a=>{x(t).deleteProject(_.path),n()},class:"m-1 base-hover p-1"},[nt,D("delete ")],8,lt)])]),_:2},1024)])]))),256))])):g("",!0),x(t).data.init?(s(),l("div",at,[e("div",it,[e("div",null,[e("div",ct,[B(oe)]),rt,ut,e("div",dt,[pt,E(e("select",{"onUpdate:modelValue":$[0]||($[0]=_=>u.$i18n.locale=_),onChange:z},[(s(),l(A,null,H(c,(_,n)=>e("option",{key:`Lang${n}`,value:_},i(_.toUpperCase()),9,_t)),64))],544),[[te,u.$i18n.locale]])])]),e("div",vt,[f.value==0?(s(),N(Me,{key:0,onCreate:$[1]||($[1]=_=>f.value=1),onImport:j})):g("",!0),f.value==1?(s(),N(be,{key:1,onCancel:$[2]||($[2]=_=>f.value=0),onCreate:P})):g("",!0)]),e("div",mt,[e("h5",ht,[D(" Plugins "),e("span",{class:"sb bi bi-plus",style:{position:"relative",top:"1px"},onClick:$[3]||($[3]=_=>d.value=!0)})]),y.value?g("",!0):(s(),l("div",gt,[e("span",{class:"bb ms-1 me-1",onClick:q},[ft,D(" "+i(u.$t("main.home.plugins.install_panoptic_ml")),1)])]))]),e("div",bt,[d.value?(s(),N(Ge,{key:0,onCancel:$[4]||($[4]=_=>d.value=!1),ref_key:"pluginFormElem",ref:v},null,512)):(s(),l("div",yt,[(s(!0),l(A,null,H(x(t).data.plugins,_=>(s(),l("div",$t,[e("span",{onClick:n=>V(_.path),class:"bi bi-x base-hover"},null,8,wt),e("span",null,i(_.name),1)]))),256))]))])])])):(s(),l("div",kt,Ct))])])):g("",!0)}});const Mt=F(Pt,[["__scopeId","data-v-74778545"]]);export{Mt as default}; diff --git a/panoptic_back/panoptic/html/assets/HomeView-fa1e879e.css b/panoptic_back/panoptic/html/assets/HomeView-e5222f81.css similarity index 75% rename from panoptic_back/panoptic/html/assets/HomeView-fa1e879e.css rename to panoptic_back/panoptic/html/assets/HomeView-e5222f81.css index 6d30fd6d..abf3a558 100644 --- a/panoptic_back/panoptic/html/assets/HomeView-fa1e879e.css +++ b/panoptic_back/panoptic/html/assets/HomeView-e5222f81.css @@ -1 +1 @@ -.input[data-v-a138fd7d]{border:1px solid var(--border-color);border-radius:5px;overflow:hidden}.info[data-v-a138fd7d]{background-color:var(--grey);padding:5px 10px}.value[data-v-a138fd7d]{border-left:1px solid var(--border-color);padding:5px 10px}.folder[data-v-a138fd7d]{padding:5px;background-color:var(--grey);border-left:1px solid var(--border-color);cursor:pointer}input[data-v-a138fd7d]{border:none}.create-option[data-v-ef56d793]{text-align:left;padding-bottom:10px;padding-top:10px;border-bottom:1px solid var(--border-color)}.create-btn[data-v-ef56d793]{text-align:center;background-color:#f0f0f0;height:36px;padding:6px;border-radius:8px;margin-top:6px;width:100px;cursor:pointer;color:#2d2d2d}.create-btn[data-v-ef56d793]:hover{background-color:#e3e3ff;color:#000}.highlight[data-v-ef56d793]{background-color:#aaf;color:#fff}.create-title[data-v-ef56d793]{font-size:20px}.create-explanation[data-v-ef56d793]{font-size:15px}#duck-container[data-v-01169a42]{height:100vh;position:fixed;z-index:999;top:0;transition:right .4s ease;transform:rotate(-45deg)}#duck-container.active[data-v-01169a42]{transition:right 4s ease}.selected[data-v-0ece9efe]{background-color:#e3e3ff}.dimmed-2[data-v-74778545]{color:#5a5a5a}.nowrap[data-v-74778545]{white-space:nowrap}.window2[data-v-74778545]{width:100vw;height:100vh}.project-menu[data-v-74778545]{height:100%;width:350px;padding:25px 0 25px 25px;background-color:#f6f6f7;color:#2d2d2d;border-right:1px solid var(--border-color);overflow-y:scroll}.project[data-v-74778545]{padding:10px;cursor:pointer}.project[data-v-74778545]:hover{background-color:#e8e8ff;border-radius:10px}.main-menu[data-v-74778545]{height:100%;text-align:center;padding:15px}.project-option[data-v-74778545]{width:20px;margin:0 15px;text-align:center;cursor:pointer}.icon[data-v-74778545]{font-size:100px;line-height:100px;margin-top:50px}.create-menu[data-v-74778545]{width:500px;margin:auto}.plugin-preview[data-v-74778545]{text-align:left;font-size:15px;color:#575757;width:500px;margin:auto}.add-btn[data-v-74778545]{padding:4px;font-size:15px;color:#323232} +.input[data-v-a138fd7d]{border:1px solid var(--border-color);border-radius:5px;overflow:hidden}.info[data-v-a138fd7d]{background-color:var(--grey);padding:5px 10px}.value[data-v-a138fd7d]{border-left:1px solid var(--border-color);padding:5px 10px}.folder[data-v-a138fd7d]{padding:5px;background-color:var(--grey);border-left:1px solid var(--border-color);cursor:pointer}input[data-v-a138fd7d]{border:none}.create-option[data-v-dc4965fd]{text-align:left;padding-bottom:10px;padding-top:10px;border-bottom:1px solid var(--border-color)}.create-btn[data-v-dc4965fd]{text-align:center;background-color:#f0f0f0;height:36px;padding:6px;border-radius:8px;margin-top:6px;width:100px;cursor:pointer;color:#2d2d2d}.create-btn[data-v-dc4965fd]:hover{background-color:#e3e3ff;color:#000}.highlight[data-v-dc4965fd]{background-color:#aaf;color:#fff}.create-title[data-v-dc4965fd]{font-size:20px}.create-explanation[data-v-dc4965fd]{font-size:15px}#duck-container[data-v-a82a2918]{height:100vh;position:fixed;z-index:999;top:0;transition:right .4s ease;transform:rotate(-45deg)}#duck-container.active[data-v-a82a2918]{transition:right 4s ease}.selected[data-v-0ece9efe]{background-color:#e3e3ff}.dimmed-2[data-v-74778545]{color:#5a5a5a}.nowrap[data-v-74778545]{white-space:nowrap}.window2[data-v-74778545]{width:100vw;height:100vh}.project-menu[data-v-74778545]{height:100%;width:350px;padding:25px 0 25px 25px;background-color:#f6f6f7;color:#2d2d2d;border-right:1px solid var(--border-color);overflow-y:scroll}.project[data-v-74778545]{padding:10px;cursor:pointer}.project[data-v-74778545]:hover{background-color:#e8e8ff;border-radius:10px}.main-menu[data-v-74778545]{height:100%;text-align:center;padding:15px}.project-option[data-v-74778545]{width:20px;margin:0 15px;text-align:center;cursor:pointer}.icon[data-v-74778545]{font-size:100px;line-height:100px;margin-top:50px}.create-menu[data-v-74778545]{width:500px;margin:auto}.plugin-preview[data-v-74778545]{text-align:left;font-size:15px;color:#575757;width:500px;margin:auto}.add-btn[data-v-74778545]{padding:4px;font-size:15px;color:#323232} diff --git a/panoptic_back/panoptic/html/assets/PanopticView-4be4490c.js b/panoptic_back/panoptic/html/assets/PanopticView-f227269d.js similarity index 99% rename from panoptic_back/panoptic/html/assets/PanopticView-4be4490c.js rename to panoptic_back/panoptic/html/assets/PanopticView-f227269d.js index c2e17449..066c0415 100644 --- a/panoptic_back/panoptic/html/assets/PanopticView-4be4490c.js +++ b/panoptic_back/panoptic/html/assets/PanopticView-f227269d.js @@ -1 +1 @@ -import{d as D,V as Ue,u as he,W as re,B as K,r as I,c as V,X as Q,o as s,a as l,b as e,q as k,Y as ke,t as b,i as x,w as pe,v as ge,e as _,Z as Ee,M as ne,z as $,$ as F,a0 as we,s as S,a1 as Oe,n as H,S as U,a2 as Se,j as te,a3 as He,p as X,f as Z,_ as j,D as oe,a4 as Ne,a5 as Ce,a6 as Pe,F as T,x as N,h as Y,a7 as be,a8 as Ve,g as xe,a9 as Be,aa as Fe,ab as qe,ac as Qe,L as Ke,ad as We,ae as Ye,O as Xe,R as Ze,Q as Je,af as et,ag as tt,ah as st,ai as De,l as ue,k as ee,aj as Le,ak as ot,al as ie,am as se,an as at,ao as nt,ap as lt,aq as it,ar as rt,as as dt,at as ct,au as ce,av as ut,aw as pt,ax as mt,ay as _t,y as vt,m as ze,C as G,az as ht}from"./index-c17cfbdf.js";import{_ as gt}from"./Tutorial-8facc104.js";const ve={},le=u=>(X("data-v-fde3194e"),u=u(),Z(),u),ft={class:"d-flex flex-row"},yt={key:1,class:"d-flex",style:{width:"150px"}},bt={class:"flex-grow-1"},$t={key:1,style:{"padding-top":"1px"}},kt=le(()=>e("i",{class:"bi bi-arrows-fullscreen"},null,-1)),wt={style:{width:"20px","margin-top":"2px"},class:"text-center"},xt=le(()=>e("i",{class:"bi bi-link-45deg"},null,-1)),St={class:"text-center",style:{width:"20px","margin-top":"2px"}},Ct=le(()=>e("i",{class:"bi bi-chevron-down"},null,-1)),Mt=le(()=>e("i",{class:"bi bi-chevron-right"},null,-1)),It={key:0,class:"ms-3 pt-1"},Vt=le(()=>e("i",{class:"bi bi-funnel-fill me-2"},null,-1)),Ft=le(()=>e("i",{class:"bi bi-filter me-2"},null,-1)),zt=le(()=>e("i",{class:"bi bi-collection me-2"},null,-1)),Tt=le(()=>e("i",{class:"bi bi-trash me-2"},null,-1)),Et={key:1},Ot=D({__name:"PropertyOptions",props:{property:Object},setup(u){const{t:h}=Ue({useScope:"global"}),t=he(),o=re(),d=K(),c=o.getTabManager(),r=u,g=I(!1),m=I(!1),i=I(""),a=I(!1),n=V(()=>o.getTab()),p=V(()=>n.value.visibleProperties[r.property.id]==!0),v=V(()=>c.collection.filterManager.state.filter.filters.some(z=>!z.isGroup&&z.propertyId==r.property.id)),w=V(()=>c.collection.groupManager.state.groupBy.includes(r.property.id)),f=V(()=>c.collection.sortManager.state.sortBy.includes(r.property.id)),y=V(()=>{if(v.value)return c.collection.filterManager.state.filter.filters.find(z=>!z.isGroup&&z.propertyId==r.property.id).id}),E=()=>c.collection.filterManager,B=V(()=>c.getSha1Mode());function ae(){p.value?c.setVisibleProperty(r.property.id,!1):c.setVisibleProperty(r.property.id,!0)}function M(){g.value?g.value=!1:(g.value=!0,i.value=r.property.name),m.value=!1}function C(){r.property.type!=U.tag&&r.property.type!=U.multi_tags||(m.value?m.value=!1:m.value=!0,g.value=!1)}function O(){f.value?c.collection.sortManager.delSort(r.property.id):c.collection.sortManager.setSort(r.property.id),c.collection.sortManager.update(!0)}function A(){w.value?c.collection.groupManager.delGroupOption(r.property.id):c.collection.groupManager.setGroupOption(r.property.id),c.collection.groupManager.update(!0)}function W(){confirm(h("common.properties.delete")+": "+r.property.name+" ? "+r.property.id)&&d.deleteProperty(r.property.id)}async function R(){i.value!=""&&(await d.updateProperty(r.property.id,i.value),M())}function L(){const z=E();v.value?(z.deleteFilter(y.value),ve.filter.hide()):(z.addNewFilter(r.property.id),ve.filter.show())}return Q(()=>r.property,()=>{g.value=!1}),(z,P)=>(s(),l("div",{class:H(a.value?"hover-light":"")},[e("div",ft,[g.value?x("",!0):(s(),l("div",{key:0,class:"option-holder hover-light btn-icon",style:{width:"150px"},onClick:M},[k(ke,{type:r.property.type,class:"me-2 btn-icon",onMouseenter:P[0]||(P[0]=q=>a.value=!0),onMouseleave:P[1]||(P[1]=q=>a.value=!1)},null,8,["type"]),e("span",null,b(r.property.name),1)])),g.value?(s(),l("div",yt,[e("div",null,[e("i",{class:"btn-icon me-1 bi bi-x-lg",style:{padding:"2px"},onClick:M,onMouseenter:P[2]||(P[2]=q=>a.value=!0),onMouseleave:P[3]||(P[3]=q=>a.value=!1)},null,32)]),e("div",bt,[r.property.id>=0?pe((s(),l("input",{key:0,style:{position:"relative",top:"1px"},type:"text",class:"text-input","onUpdate:modelValue":P[4]||(P[4]=q=>i.value=q),onChange:R},null,544)),[[ge,i.value]]):(s(),l("span",$t,[k(ke,{type:r.property.type,class:"me-2 btn-icon"},null,8,["type"]),e("span",null,b(r.property.name),1)]))])])):x("",!0),_(Ee)(r.property.type)?(s(),l("div",{key:2,style:{width:"20px","margin-top":"2px",cursor:"pointer"},class:"text-center",onClick:P[5]||(P[5]=q=>_(t).showModal(_(ne).TAG,{propId:r.property.id}))},[k(F,{click:!1,message:"main.nav.properties.open_tags"},{default:$(()=>[kt]),_:1})])):x("",!0),e("div",wt,[r.property.mode==_(we).id?(s(),S(F,{key:0,click:!1,message:"main.nav.properties.linked_property_tooltip"},{default:$(()=>[xt]),_:1})):x("",!0)]),e("div",{style:{width:"20px","margin-top":"2px"},onClick:ae,class:"btn-icon text-center"},[B.value&&r.property.mode==_(we).id?(s(),S(F,{key:0,message:"main.nav.properties.hidden_property_tooltip"},{default:$(()=>[e("span",{class:"bi bi-eye-slash",onClick:P[6]||(P[6]=Oe(()=>{},["stop"]))})]),_:1})):(s(),S(F,{key:1,pos:"right",message:"main.nav.properties.hide_property_tooltip"},{default:$(()=>[e("span",{class:H("bi bi-eye text-"+(p.value?"primary":"secondary"))},null,2)]),_:1}))]),e("div",St,[r.property.type==_(U).tag||r.property.type==_(U).multi_tags?(s(),l("div",{key:0,onClick:C,style:{cursor:"pointer"}},[m.value?(s(),S(F,{key:0,message:"main.nav.properties.collapse_property_tooltip"},{default:$(()=>[Ct]),_:1})):(s(),S(F,{key:1,message:"main.nav.properties.expand_property_tooltip"},{default:$(()=>[Mt]),_:1}))])):x("",!0)])]),e("div",null,[g.value?(s(),l("div",It,[u.property.id!=_(Se).folders?(s(),l("div",{key:0,class:H(["options hover-light",v.value?" text-primary":""]),onClick:L},[e("div",null,[Vt,te(b(z.$t("main.menu.filters")),1)])],2)):x("",!0),e("div",{class:H(["options hover-light",f.value?" text-primary":""]),onClick:O},[Ft,te(b(z.$t("main.menu.sort.title")),1)],2),e("div",{class:H(["options hover-light",w.value?" text-primary":""]),onClick:A},[zt,te(b(z.$t("main.menu.groupby")),1)],2),r.property.id>=0?(s(),l("div",{key:1,class:"options hover-light",onClick:W},[Tt,te(b(z.$t("main.nav.properties.delete_property")),1)])):x("",!0)])):m.value?(s(),l("div",Et,[k(He,{property:r.property,"can-create":!0,"can-customize":!0,"can-delete":!0,"can-link":!0},null,8,["property"])])):x("",!0)])],2))}});const Te=j(Ot,[["__scopeId","data-v-fde3194e"]]),Pt=e("i",{class:"bi bi-three-dots base-hover"},null,-1),Dt={class:"text-nowrap"},Lt=["onClick"],Gt=e("i",{class:"bi bi-arrow-clockwise me-1"},null,-1),Rt=e("div",{class:"custom-hr"},null,-1),jt=["onClick"],At=e("i",{class:"bi bi-trash me-1"},null,-1),Ut=D({__name:"FolderOptionDropdown",props:{folder:{}},setup(u){const h=K(),t=u;function o(){h.reImportFolder(t.folder.id)}function d(){confirm(Ne.global.t("main.nav.folders.del_alert"))&&h.deleteFolder(t.folder.id)}return(c,r)=>(s(),S(oe,{teleport:!0},{button:$(()=>[Pt]),popup:$(({hide:g})=>[e("div",Dt,[e("div",{class:"p-2 bb",onClick:m=>{o(),g()}},[Gt,te("Re import")],8,Lt),Rt,e("div",{class:"bb p-2",onClick:m=>{d(),g()}},[At,te(b(c.$t("main.nav.folders.del")),1)],8,jt)])]),_:1}))}}),Ht=["onMouseenter"],Nt=["onClick"],Bt={class:"text-secondary"},qt=["onClick"],Qt=D({__name:"FolderList2",props:{folders:Array,visibleFolders:Object,filterManager:Ce,root:{type:Boolean,default:!0}},setup(u){const h=K(),t=u,o=I(null),d=V(()=>{let a={};const n=new Set(t.filterManager.state.folders);return t.folders.map(p=>p.id).forEach(p=>{n.has(p)&&(a[p]=!0)}),a}),c=V(()=>{let a={};return t.folders.map(n=>n.id).forEach(n=>{t.visibleFolders[n]&&(a[n]=!0)}),a}),r=V(()=>{let a={};return t.folders.forEach(n=>{let p=[];d.value[n.id]&&p.push("selected"),a[n.id]=p.join(" ")}),a});function g(a){let n=t.visibleFolders;n[a]?delete n[a]:n[a]=!0}function m(a){let n=new Set(t.filterManager.state.folders);const p=n.has(a),v=h.folders[a].parent!=null&&n.has(h.folders[a].parent);p&&!v?(n.delete(a),be(a).forEach(w=>n.delete(w.id))):(i(a,n),n.add(a),be(a).forEach(w=>n.add(w.id)),Ve(h.folders[a]).forEach(w=>n.delete(w.id))),t.filterManager.setFolders(Array.from(n)),t.filterManager.update(!0)}function i(a,n){const p=Ve(h.folders[a]);let v;for(let w of p)if(n.has(w.id))v=w;else break;v!=null&&be(v.id).forEach(w=>n.delete(w.id))}return(a,n)=>{const p=Pe("FolderList2",!0);return s(),l("ul",{class:H(t.root?"tree":""),style:Y(t.root?"padding-left:0px;":"")},[(s(!0),l(T,null,N(u.folders,v=>(s(),l("li",{style:Y(t.root?"padding-left:0px;":""),class:"no-break",onMouseenter:w=>o.value=v.id,onMouseleave:n[0]||(n[0]=w=>o.value=null)},[e("summary",{class:H(r.value[v.id]),onClick:w=>m(v.id)},[te(b(v.name)+" ",1),e("span",Bt,b(v.count),1)],10,Nt),v.children&&v.children.length>0?(s(),l("i",{key:0,onClick:w=>g(v.id),class:H("bi bi-chevron-"+(c.value[v.id]?"down":"right")+" ms-2 btn-icon"),style:{"font-size":"9px"}},null,10,qt)):x("",!0),e("span",{class:H(o.value===v.id?"visible-option":"invisible-option")},[k(Ut,{folder:v,style:{display:"inline-block"}},null,8,["folder"])],2),v.children&&v.children.length>0&&c.value[v.id]?(s(),S(p,{key:1,folders:v.children,root:!1,"visible-folders":t.visibleFolders,"filter-manager":t.filterManager},null,8,["folders","visible-folders","filter-manager"])):x("",!0)],44,Ht))),256))],6)}}});const Kt=j(Qt,[["__scopeId","data-v-069cc964"]]),Wt={class:"text-center"},Yt={class:"w-100 text-center",style:{"font-size":"10px"}},Xt={key:0,class:"progress",role:"progressbar","aria-label":"Example 1px high","aria-valuemin":"0","aria-valuemax":"100",style:{height:"1px"}},Zt=D({__name:"TaskStatus",props:{task:{}},setup(u){const h=u,t=V(()=>h.task.total-h.task.remain-h.task.computing),o=V(()=>h.task.total);return(d,c)=>(s(),l("div",Wt,[te(b(h.task.name)+" ",1),e("div",Yt,b(t.value)+" / "+b(o.value)+" "+b(d.$t("main.nav.tasks.done")),1),o.value>0?(s(),l("div",Xt,[e("div",{class:"progress-bar",style:Y(`width: ${t.value/o.value*100}%`)},null,4)])):x("",!0)]))}}),J=u=>(X("data-v-a5725e66"),u=u(),Z(),u),Jt={class:"menu overflow-scroll"},es={class:""},ts={class:"m-0",style:{padding:"4px 0px 4px 8px"}},ss={class:"d-flex align-items-center",style:{"font-size":"15px","line-height":"14px"}},os=J(()=>e("i",{class:"bi bi-gear"},null,-1)),as=[os],ns=J(()=>e("i",{class:"bi bi-arrow-left-right"},null,-1)),ls=[ns],is=J(()=>e("div",{class:"custom-hr"},null,-1)),rs={class:"ps-2 pe-2",style:{"padding-bottom":"9.5px"}},ds={class:"d-flex align-items-center"},cs=J(()=>e("i",{class:"bi bi-plus"},null,-1)),us={style:{"max-height":"300px",overflow:"auto"}},ps={key:0,id:"import"},ms=J(()=>e("div",{class:"custom-hr"},null,-1)),_s={class:"pt-1 pb-2"},vs={class:"d-flex align-items-center ps-2 pe-2",style:{height:"30px"}},hs=J(()=>e("div",{class:"custom-hr"},null,-1)),gs={key:0,class:"ps-2 pe-2"},fs={class:"p-1"},ys={key:0,class:"custom-hr"},bs=J(()=>e("div",{class:"custom-hr"},null,-1)),$s={class:"p-2 mt-0"},ks={class:"d-flex"},ws=J(()=>e("span",{class:"flex-grow-1"},null,-1)),xs={key:0,class:"spinner-grow spinner-grow-sm float-end",style:{width:"10px",height:"10px","margin-top":"5px"}},Ss=J(()=>e("span",{class:"sr-only"},null,-1)),Cs=[Ss],Ms={key:1,class:"bb me-1"},Is={class:"bb me-2"},Vs={key:0,class:"mt-2"},Fs={key:0,class:"property-item"},zs=J(()=>e("div",{class:"property-item m-0 p-0"},null,-1)),Ts=J(()=>e("i",{class:"bi bi-plus btn-icon float-start",style:{"font-size":"25px"}},null,-1)),Es=J(()=>e("div",{class:"custom-hr"},null,-1)),Os={class:"p-2 mt-0"},Ps={key:0,class:"mt-2"},Ds={key:0,class:"property-item"},Ls=D({__name:"Menu",emits:["export"],setup(u,{emit:h}){const t=re(),o=K(),d=he(),c=t.getTabManager(),r=I(!1),g=I(!1),m=async p=>{d.showModal(ne.IMPORT)},i=V(()=>t.backendStatus.tasks.filter(p=>!p.done));function a(){d.showModal(ne.FOLDERSELECTION,{callback:n,mode:"images"})}function n(p){p&&o.addFolder(p)}return Q(()=>t.status.import.to_import,()=>r.value=!0),(p,v)=>{var w;return s(),l("div",Jt,[e("div",es,[e("div",null,[e("div",ts,[e("div",ss,[e("div",{class:"flex-grow-1 text-capitalize overflow-hidden",onClick:v[0]||(v[0]=()=>{})},b((w=_(d).data.status.selectedProject)==null?void 0:w.name),1),e("div",{class:"base-hover p-1",onClick:v[1]||(v[1]=f=>_(d).showModal(_(ne).SETTINGS))},as),e("div",{class:"base-hover p-1",style:{"margin-right":"6px"},onClick:v[2]||(v[2]=f=>_(d).closeProject())},ls)])]),is,e("div",rs,[e("div",ds,[e("div",null,[e("b",null,b(p.$t("main.nav.folders.title")),1)]),e("div",{id:"add_folder",class:"ms-auto plus",onClick:v[3]||(v[3]=f=>{a(),_(xe)()})},[k(F,{message:"main.nav.folders.add"},{default:$(()=>[cs]),_:1})])]),e("div",us,[_(t).getTab()?(s(),S(Kt,{key:0,folders:_(o).folderRoots,"filter-manager":_(c).collection.filterManager,"visible-folders":_(c).state.visibleFolders},null,8,["folders","filter-manager","visible-folders"])):x("",!0)])]),i.value&&i.value.length?(s(),l("div",ps,[ms,e("div",_s,[e("div",vs,[e("div",null,[e("b",null,b(p.$t("main.nav.tasks.title")),1)])]),hs,_(t).backendStatus?(s(),l("div",gs,[(s(!0),l(T,null,N(i.value,(f,y)=>(s(),l("div",fs,[y?(s(),l("div",ys)):x("",!0),k(Zt,{task:f},null,8,["task"])]))),256))])):x("",!0)])])):x("",!0),bs,e("div",$s,[e("div",ks,[k(F,{message:"main.nav.properties.properties_tooltip",pos:"top",icon:!0},{default:$(()=>[e("b",null,b(p.$t("main.nav.properties.title")),1)]),_:1}),ws,g.value?(s(),l("span",xs,Cs)):(s(),l("span",Ms,[k(F,{pos:"right",message:"main.nav.properties.import_properties_tooltip"},{default:$(()=>[e("i",{class:"bi bi-box-arrow-in-up text-secondary",style:{position:"relative",top:"0px","font-size":"15px"},onClick:m})]),_:1})])),e("span",Is,[k(F,{pos:"right",message:"main.nav.properties.export_properties_tooltip"},{default:$(()=>[e("i",{class:"bi bi-box-arrow-up text-secondary",style:{position:"relative",top:"0px","font-size":"15px"},onClick:v[4]||(v[4]=f=>_(d).showModal(_(ne).EXPORT,void 0))})]),_:1})])]),_(t).status.loaded?(s(),l("div",Vs,[(s(!0),l(T,null,N(_(o).properties,f=>(s(),l(T,null,[f.id>=0?(s(),l("div",Fs,[k(Te,{property:f},null,8,["property"])])):x("",!0)],64))),256)),zs,e("div",{id:"add-property",onClick:v[5]||(v[5]=f=>{_(d).showModal(_(ne).PROPERTY,void 0),_(xe)()}),class:"btn-icon base-hover mt-1",style:{"line-height":"25px"}},[Ts,e("span",null,b(p.$t("main.nav.properties.add_property")),1)])])):x("",!0)]),Es,e("div",Os,[k(F,{message:"main.nav.computed.computed_tooltip",icon:!0},{default:$(()=>[e("b",null,b(p.$t("main.nav.computed.title")),1)]),_:1}),_(t).status.loaded?(s(),l("div",Ps,[(s(!0),l(T,null,N(_(o).properties,f=>(s(),l(T,null,[f.id<0&&f.id!=_(Be)?(s(),l("div",Ds,[k(F,{pos:"bottom",message:"main.nav.computed."+Math.abs(f.id).toString()+"_tooltip"},{default:$(()=>[k(Te,{property:f},null,8,["property"])]),_:2},1032,["message"])])):x("",!0)],64))),256))])):x("",!0)])])])])}}});const Gs=j(Ls,[["__scopeId","data-v-a5725e66"]]),Rs={class:"p-0 hover-light ps-1 bb",style:{width:"50px"}},js={class:""},As=["onClick"],Us=e("hr",{class:"m-0 p-0 mt-1 mb-1"},null,-1),Hs=D({__name:"FilterGroupOperator",props:{modelValue:{}},emits:["update:modelValue"],setup(u,{emit:h}){const t=u,o=h;function d(c){o("update:modelValue",c)}return(c,r)=>(s(),S(oe,null,{button:$(()=>[e("div",Rs,[e("span",js,b(c.$t("modals.filters."+t.modelValue)),1)])]),popup:$(({hide:g})=>[e("div",{class:"ps-2 pt-1 pb-1 pe-2",onClick:g},[e("div",{class:"base-btn",onClick:r[0]||(r[0]=m=>d(_(Fe).and))},b(c.$t("modals.filters.and")),1),Us,e("div",{class:"base-btn",onClick:r[1]||(r[1]=m=>d(_(Fe).or))},b(c.$t("modals.filters.or")),1)],8,As)]),_:1}))}}),Ns=["disabled"],Bs={class:"m-0 p-1"},qs=["onClick"],Qs=D({__name:"OperatorChoice",props:{propertyId:{},modelValue:{},disabled:{type:Boolean}},emits:["hide","update:modelValue"],setup(u,{emit:h}){const t=K(),o=u,d=h,c=V(()=>t.properties[o.propertyId]),r=V(()=>qe(c.value.type));async function g(m){d("update:modelValue",m)}return(m,i)=>(s(),S(oe,{onHide:i[0]||(i[0]=a=>d("hide")),placement:"bottom"},{button:$(()=>[e("div",{class:"text-nowrap sb ps-1 pe-1",disabled:o.disabled},[e("span",null,b(m.$t("modals.filters.operators."+o.modelValue)),1)],8,Ns)]),popup:$(({hide:a})=>[e("div",Bs,[(s(!0),l(T,null,N(r.value,n=>(s(),l("div",{class:"hover-light p-1 rounded",style:{cursor:"pointer"},onClick:p=>{g(n),a()}},[e("a",null,b(m.$t("modals.filters.operators."+n)),1)],8,qs))),256))])]),_:1}))}});const Ks=j(Qs,[["__scopeId","data-v-21b8bb8e"]]),Ws={class:"d-flex text-nowrap overflow-hidden",style:{"font-size":"14px"}},Ys=D({__name:"FilterValueInput",props:{modelValue:{},property:{},width:{}},emits:["update:modelValue"],setup(u,{emit:h}){const t=u,o=h;function d(c){o("update:modelValue",c)}return(c,r)=>(s(),l("div",Ws,[_(Ee)(c.property.type)?(s(),S(Qe,{key:0,"model-value":t.modelValue,"onUpdate:modelValue":d,"no-wrap":!0,"auto-focus":!0,"can-create":!0,"can-customize":!0,property:t.property,teleport:!1,width:t.width,class:"sb"},null,8,["model-value","property","width"])):t.property.type==_(U).color?(s(),S(Ke,{key:1,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,rounded:!0,"min-height":22,teleport:!1,offset:2,class:"sb"},null,8,["model-value","width"])):t.property.type==_(U).number?(s(),S(We,{key:2,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,height:26,"input-offset":0,class:"sb"},null,8,["model-value","width"])):t.property.type==_(U).url?(s(),S(Ye,{key:3,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,offset:-22,class:"sb"},null,8,["model-value","width"])):t.property.type==_(U).checkbox?(s(),S(Xe,{key:4,"model-value":t.modelValue,"onUpdate:modelValue":d,label:t.property.name,width:t.width,class:"sb"},null,8,["model-value","label","width"])):t.property.type==_(U).date?(s(),S(Ze,{key:5,"model-value":t.modelValue,teleport:!1,"onUpdate:modelValue":d,width:t.width,class:"sb"},null,8,["model-value","width"])):(s(),S(Je,{key:6,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,offset:-22,class:"sb"},null,8,["model-value","width"]))]))}}),Xs={class:"p-0 m-0 ps-2"},Zs=D({__name:"FilterRow",props:{manager:{},filter:{}},emits:[],setup(u,{emit:h}){const t=K(),o=u,d=V(()=>t.properties[o.filter.propertyId]),c=V(()=>tt(o.filter.operator));function r(i){o.manager.updateFilter(o.filter.id,{operator:i})}function g(i){o.manager.updateFilter(o.filter.id,{value:i})}function m(i){o.manager.updateFilter(o.filter.id,{propertyId:i.id})}return(i,a)=>(s(),l(T,null,[e("td",Xs,[k(et,{"model-value":d.value,"onUpdate:modelValue":m},null,8,["model-value"])]),e("td",null,[k(Ks,{"property-id":d.value.id,"model-value":o.filter.operator,"onUpdate:modelValue":r},null,8,["property-id","model-value"])]),e("td",null,[c.value?(s(),S(Ys,{key:0,"model-value":o.filter.value,"onUpdate:modelValue":g,property:d.value,width:140,style:{width:"150px"},class:""},null,8,["model-value","property"])):x("",!0)])],64))}}),Js={style:{"max-height":"500px",overflow:"auto"}},Ge=D({__name:"AddFilterBtn",props:{group:{},manager:{}},emits:[],setup(u,{emit:h}){const t=u;function o(d){t.manager.addNewFilter(d,t.group.id),ve.filter.show()}return(d,c)=>(s(),S(oe,{placement:"auto"},{button:$(()=>[st(d.$slots,"default")]),popup:$(({hide:r})=>[e("div",Js,[k(De,{onSelect:g=>{o(g),r()},"ignore-ids":[_(Se).folders]},null,8,["onSelect","ignore-ids"])])]),_:3}))}}),Me=u=>(X("data-v-e644f737"),u=u(),Z(),u),eo={class:"filter-group"},to={class:"table table-sm"},so={style:{height:"33px"}},oo={class:""},ao={key:0,class:"m-0 p-0"},no={key:2,class:"text-secondary"},lo={class:"border rounded"},io={class:""},ro=["onClick"],co=Me(()=>e("i",{class:"bi bi-trash"},null,-1)),uo=[co],po={class:"d-flex text-secondary ms-2"},mo={class:"add-options hover-light"},_o=Me(()=>e("i",{class:"bi bi-plus"},null,-1)),vo=Me(()=>e("i",{class:"bi bi-plus"},null,-1)),ho=D({__name:"FilterGroup",props:{filter:{},manager:{},parent:{}},emits:["delete"],setup(u,{emit:h}){K();const t=u,o=V(()=>t.filter),d=V(()=>o.value.filters),c=V(()=>{let i=255-(o.value.depth+1)*5;return`background: rgb(${i},${i},${i});`});function r(i){t.manager.deleteFilter(i.id)}function g(i){t.manager.addNewFilterGroup(i)}function m(i,a){t.manager.updateFilterGroup(i,a)}return(i,a)=>(s(),l("div",eo,[e("table",to,[(s(!0),l(T,null,N(d.value,(n,p)=>(s(),l("tr",so,[e("td",oo,[p==0?(s(),l("div",ao,b(i.$t("modals.filters.where")),1)):p==1?(s(),S(Hs,{key:1,"model-value":o.value.groupOperator,"onUpdate:modelValue":a[0]||(a[0]=v=>m(o.value.id,v))},null,8,["model-value"])):(s(),l("span",no,b(i.$t("modals.filters."+o.value.groupOperator)),1))]),n.propertyId!==void 0?(s(),S(Zs,{key:0,filter:n,manager:t.manager},null,8,["filter","manager"])):(s(),l("td",{key:1,colspan:"3",style:Y(c.value)},[e("div",lo,[k(Re,{filter:n,manager:t.manager},null,8,["filter","manager"])])],4)),e("td",io,[e("span",{class:"base-btn",onClick:v=>r(n)},uo,8,ro)])]))),256))]),e("div",po,[k(Ge,{group:t.filter,manager:t.manager},{default:$(()=>[e("div",mo,[_o,te(b(i.$t("modals.filters.new_filter")),1)])]),_:1},8,["group","manager"]),e("div",{class:"add-options hover-light",onClick:a[1]||(a[1]=n=>g(o.value.id))},[vo,te(b(i.$t("modals.filters.new_group")),1)])])]))}});const Re=j(ho,[["__scopeId","data-v-e644f737"]]),go=u=>(X("data-v-56cd3bdb"),u=u(),Z(),u),fo={key:0,class:"d-flex flex-row m-0 ms-1 p-1 bg hover-light bg-medium",style:{cursor:"pointer"}},yo={key:0},bo=go(()=>e("span",{class:"text-primary"},"Text Query",-1)),$o={key:0,class:"or-separator"},ko={key:0,class:"or-separator"},wo={key:0,class:"m-1 p-1"},xo=D({__name:"MainFilterDropdown",props:{manager:Ce},emits:["update:modelValue"],setup(u,{emit:h}){const t=K(),o=u,d=I(null),c=I(null),r=V(()=>{let m=g(o.manager.state.filter),i={};return m.forEach(a=>i[a.propertyId]=a),Object.values(i)});function g(m){let i=[];for(let a of m.filters)a.isGroup?i.push(...g(a)):i.push(a);return i}return Q(()=>o.manager.state.filter.filters,()=>{o.manager.state.filter.filters.length==0&&c.value.hide()}),ue(async()=>{await ee(),ve.filter=c.value}),(m,i)=>(s(),S(oe,{ref_key:"dropdownElem",ref:c,placement:"top-start"},{button:$(()=>[e("div",null,[r.value.length||o.manager.state.query?(s(),l("div",fo,[o.manager.state.query?(s(),l("div",yo,[bo,r.value.length?(s(),l("span",$o,"|")):x("",!0)])):x("",!0),(s(!0),l(T,null,N(r.value,(a,n)=>(s(),l("div",null,[n>0?(s(),l("span",ko,"|")):x("",!0),a.propertyId==_(Se).id?(s(),S(ke,{key:1,type:_(t).properties[a.propertyId].type,style:{"margin-right":"2px"}},null,8,["type"])):x("",!0),e("span",null,b(_(t).properties[a.propertyId].name),1)]))),256))])):x("",!0)])]),popup:$(()=>[e("div",{class:"m-0 p-0",ref_key:"popupElem",ref:d},[Object.keys(_(t).properties).length>0?(s(),l("div",wo,[k(Re,{filter:o.manager.state.filter,manager:o.manager,parent:d.value},null,8,["filter","manager","parent"])])):x("",!0)],512)]),_:1},512))}});const So=j(xo,[["__scopeId","data-v-56cd3bdb"]]),Co=u=>(X("data-v-cc2f25ec"),u=u(),Z(),u),Mo={class:"d-flex flex-row filter-form"},Io={class:"pt-1 pb-1"},Vo=Co(()=>e("span",{class:"base-hover plus-btn text-secondary"},[e("i",{class:"bi bi-plus"})],-1)),Fo=D({__name:"FilterForm",props:{manager:Ce},setup(u){const h=u;return(t,o)=>(s(),l("div",Mo,[e("div",Io,b(t.$t("main.menu.filters"))+": ",1),k(So,{manager:h.manager},null,8,["manager"]),k(Ge,{manager:h.manager,group:h.manager.state.filter,class:"p-1"},{default:$(()=>[Vo]),_:1},8,["manager","group"])]))}});const zo=j(Fo,[["__scopeId","data-v-cc2f25ec"]]),To=u=>(X("data-v-012e1f38"),u=u(),Z(),u),Eo=To(()=>e("div",{class:"text-secondary p-1"},[e("span",{class:"base-hover plus-btn"},[e("i",{class:"bi bi-plus"})])],-1)),Oo={class:"p-1",style:{"max-height":"400px","overflow-y":"scroll"}},Po=D({__name:"PropertyDropdown",props:{groupIds:Array},emits:["select"],setup(u,{emit:h}){const t=u,o=h,d=I(null);return(c,r)=>(s(),S(oe,{ref_key:"dropdownElem",ref:d,"auto-focus":!1},{button:$(()=>[Eo]),popup:$(()=>[e("div",Oo,[k(De,{onClick:r[0]||(r[0]=g=>_(xe)()),onSelect:r[1]||(r[1]=g=>{o("select",g),d.value.hide()}),"ignore-ids":t.groupIds},null,8,["ignore-ids"])])]),_:1},512))}});const je=j(Po,[["__scopeId","data-v-012e1f38"]]),Do={class:"base-hover ps-1 pe-1"},Lo={class:"main"},Go=["onClick"],Ro=D({__name:"TimeUnitDropdown",props:{modelValue:{}},emits:["update:modelValue"],setup(u,{emit:h}){const t=u,o=h,d=Object.values(Le);function c(r){o("update:modelValue",r)}return(r,g)=>(s(),S(oe,null,{button:$(()=>[e("div",Do,b(t.modelValue),1)]),popup:$(({hide:m})=>[e("div",Lo,[(s(!0),l(T,null,N(_(d),i=>(s(),l("div",{class:"base-hover option",onClick:a=>{c(i),m()}},b(i),9,Go))),256))])]),_:1}))}});const jo=j(Ro,[["__scopeId","data-v-ce3e3774"]]),Ao=u=>(X("data-v-78b647dc"),u=u(),Z(),u),Uo=Ao(()=>e("i",{class:"bi bi-three-dots-vertical"},null,-1)),Ho={class:""},No={class:"d-flex ipt"},Bo={class:"ms-2",min:"1"},qo=D({__name:"GroupOptionDropdown",props:{option:{}},emits:["change"],setup(u,{emit:h}){const t=u,o=h,d=I(1),c=I(Le.Year);function r(){t.option.stepSize==d.value&&t.option.stepUnit==c.value||o("change",{stepSize:d.value,stepUnit:c.value})}function g(){d.value=t.option.stepSize??1,c.value=t.option.stepUnit}return Q(()=>t.option,g),ue(g),Q(d,()=>{(d.value<1||d.value==null||isNaN(d.value))&&(d.value=1)}),(m,i)=>(s(),S(oe,{onHide:r},{button:$(()=>[Uo]),popup:$(({hide:a,focus:n})=>[e("div",Ho,[e("div",No,[e("div",null,[pe(e("input",{type:"number","onUpdate:modelValue":i[0]||(i[0]=p=>d.value=p)},null,512),[[ge,d.value]])]),e("div",Bo,[k(jo,{modelValue:c.value,"onUpdate:modelValue":i[1]||(i[1]=p=>c.value=p),onHide:n},null,8,["modelValue","onHide"])])])])]),_:1}))}});const Qo=j(qo,[["__scopeId","data-v-78b647dc"]]),Ko={class:"d-flex flex-row group-form"},Wo={class:"pt-1 pb-1"},Yo={key:0,class:"bg-medium bg d-flex flex-row m-0 ms-1 p-0 align-items-center"},Xo={key:0,class:"bi bi-chevron-right smaller"},Zo=["onClick"],Jo=["onClick"],ea=["onClick"],ta=["onClick"],sa=["onClick"],oa=["onClick"],aa=["onClick"],na=["onClick"],la=["onClick"],ia={key:5,class:"sm-btn"},ra={key:0,class:"spinner-grow spinner-grow-sm loading ms-1"},da=D({__name:"GroupForm",props:{isLoading:Boolean,manager:ot},setup(u){const h=K(),t=u;function o(a){t.manager.setGroupOption(a),t.manager.update(!0)}function d(a){t.manager.delGroupOption(a),t.manager.update(!0)}function c(a,n){t.manager.setGroupOption(a,{direction:n}),t.manager.sortGroups(!0)}function r(a,n){t.manager.setGroupOption(a,{type:n}),t.manager.sortGroups(!0)}function g(a,n){t.manager.setGroupOption(a,n),t.manager.update(!0)}const m=V(()=>t.manager.state.groupBy.map(a=>h.properties[a])),i=V(()=>{const a=[];return t.manager.state.groupBy.forEach(n=>{a.push({option:t.manager.state.options[n],property:h.properties[n]})}),a});return(a,n)=>(s(),l("div",Ko,[e("div",Wo,b(a.$t("main.menu.groupby"))+": ",1),m.value.length?(s(),l("div",Yo,[(s(!0),l(T,null,N(i.value,(p,v)=>(s(),l(T,null,[v>0?(s(),l("i",Xo)):x("",!0),e("div",{class:"base-hover m-1 ps-1 pe-1",onClick:w=>d(p.property.id),id:"remove-group-button"},b(p.property.name),9,Zo),p.option.type==_(ie).Size?(s(),S(F,{key:1,message:"main.menu.sort.group_order_nb_tooltip"},{default:$(()=>[p.option.direction==_(se).Ascending?(s(),l("i",{key:0,class:"bi bi-sort-up-alt sm-btn",onClick:w=>r(p.property.id,_(ie).Property)},null,8,Jo)):(s(),l("i",{key:1,class:"bi bi-sort-down sm-btn",onClick:w=>r(p.property.id,_(ie).Property)},null,8,ea))]),_:2},1024)):(s(),S(F,{key:2,message:"main.menu.sort.group_order_az_tooltip"},{default:$(()=>[p.property.type==_(U).number?(s(),l(T,{key:0},[p.option.direction==_(se).Ascending?(s(),l("i",{key:0,class:"bi bi-sort-numeric-up sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,ta)):(s(),l("i",{key:1,class:"bi bi-sort-numeric-down-alt sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,sa))],64)):(s(),l(T,{key:1},[p.option.direction==_(se).Ascending?(s(),l("i",{key:0,class:"bi bi-sort-alpha-up sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,oa)):(s(),l("i",{key:1,class:"bi bi-sort-alpha-down-alt sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,aa))],64))]),_:2},1024)),p.option.direction==_(se).Ascending?(s(),S(F,{key:3,message:"main.menu.sort.order_asc"},{default:$(()=>[e("i",{class:"bi bi-arrow-up sm-btn",onClick:w=>c(p.property.id,_(se).Descending)},null,8,na)]),_:2},1024)):(s(),S(F,{key:4,message:"main.menu.sort.order_desc"},{default:$(()=>[e("i",{class:"bi bi-arrow-down sm-btn",onClick:w=>c(p.property.id,_(se).Ascending)},null,8,la)]),_:2},1024)),p.property.type==_(U).date?(s(),l("div",ia,[k(Qo,{option:p.option,onChange:w=>g(p.property.id,w)},null,8,["option","onChange"])])):x("",!0)],64))),256)),t.isLoading?(s(),l("i",ra)):x("",!0)])):x("",!0),k(je,{id:"add-group-button","group-ids":t.manager.state.groupBy,onSelect:n[0]||(n[0]=p=>o(p))},null,8,["group-ids"])]))}});const ca=j(da,[["__scopeId","data-v-dcec9b5d"]]),ua={class:"d-flex flex-row sort-form"},pa={class:"pt-1 pb-1"},ma={key:0,class:"d-flex flex-row m-0 p-0 bg-medium bg ms-1 align-items-center"},_a={key:0,class:"bi bi-chevron-right smaller"},va=["onClick"],ha=["onClick"],ga=["onClick"],fa=D({__name:"SortForm",props:{manager:at},setup(u){const h=K(),t=u,o=V(()=>t.manager.state.sortBy.map(m=>({propertyId:m,direction:t.manager.state.options[m].direction}))),d=V(()=>o.value.map(m=>m.propertyId));function c(m){t.manager.setSort(m),t.manager.update(!0)}function r(m){t.manager.delSort(m),t.manager.update(!0)}function g(m,i){t.manager.setSort(m,{direction:i}),t.manager.update(!0)}return(m,i)=>(s(),l("div",ua,[e("div",pa,b(m.$t("main.menu.sort.title"))+": ",1),o.value.length?(s(),l("div",ma,[(s(!0),l(T,null,N(o.value,(a,n)=>(s(),l(T,null,[n>0?(s(),l("i",_a)):x("",!0),e("div",{class:"me-0 ms-1 ps-1 mt-1 mb-1 pe-1 base-hover",onClick:p=>r(a.propertyId)},b(_(h).properties[a.propertyId].name),9,va),a.direction==_(se).Ascending?(s(),S(F,{key:1,message:"main.menu.sort.order_asc"},{default:$(()=>[e("i",{class:"bi bi-arrow-up sm-btn",onClick:p=>g(a.propertyId,_(se).Descending)},null,8,ha)]),_:2},1024)):(s(),S(F,{key:2,message:"main.menu.sort.order_desc"},{default:$(()=>[e("i",{class:"bi bi-arrow-down sm-btn",onClick:p=>g(a.propertyId,_(se).Ascending)},null,8,ga)]),_:2},1024))],64))),256))])):x("",!0),k(je,{"group-ids":d.value,onSelect:i[0]||(i[0]=a=>c(a))},null,8,["group-ids"])]))}});const ya=j(fa,[["__scopeId","data-v-4e00ef99"]]),fe=u=>(X("data-v-a37327b6"),u=u(),Z(),u),ba=fe(()=>e("i",{class:"bi bi-clock-history me-1"},null,-1)),$a={class:"p-2"},ka={key:0,class:"border mb-1 p-1 text-center text-secondary",style:{"background-color":"#f7f7f7"}},wa={class:"border mb-1 p-1"},xa={class:"me"},Sa=fe(()=>e("span",{class:"sep ms-1 me-1"},null,-1)),Ca={key:0},Ma={key:1},Ia={class:"border mb-1 p-1",style:{"background-color":"#f7f7f7"}},Va={class:"d-flex center justify-content-center"},Fa={key:1,class:"bi bi-arrow-down text-secondary"},za=fe(()=>e("div",{style:{width:"30px"}},null,-1)),Ta={key:3,class:"bi bi-arrow-up text-secondary"},Ea={class:"border mb-1 p-1"},Oa={class:"me"},Pa=fe(()=>e("span",{class:"sep ms-1 me-1"},null,-1)),Da={key:0},La={key:1},Ga={key:1,class:"border mb-1 p-1 text-center text-secondary",style:{"background-color":"#f7f7f7"}},de=5,Ra=D({__name:"HistoryDropdown",emits:[],setup(u,{emit:h}){const t=K(),o=I(!1),d=V(()=>o.value?{backgroundColor:"blue"}:{backgroundColor:"white"}),c=V(()=>[...t.history.undo].reverse().slice(0,de)),r=V(()=>t.history.redo.slice(Math.max(t.history.redo.length-de,0)));return Q(()=>t.onUndo,()=>{console.log("changed"),o.value=!0,setTimeout(()=>o.value=!1,100)}),(g,m)=>c.value.length||r.value.length?(s(),S(oe,{key:0},{button:$(()=>[k(F,{message:"dropdown.history.info"},{default:$(()=>[e("div",{class:"d-flex sb flash",style:Y([{"font-size":"14px"},d.value])},[ba,e("div",null,b(g.$t("dropdown.history.button")),1)],4)]),_:1})]),popup:$(()=>[e("div",$a,[_(t).history.redo.length>de?(s(),l("div",ka," + "+b(_(t).history.redo.length-de),1)):x("",!0),(s(!0),l(T,null,N(r.value,i=>(s(),l("div",wa,[e("span",xa,b(new Date(i.timestamp).toLocaleTimeString("fr-Fr",{hour:"2-digit",minute:"2-digit"})),1),Sa,i.tags?(s(),l("span",Ca,b(i.tags)+" "+b(g.$t("dropdown.history.tags")),1)):x("",!0),i.values?(s(),l("span",Ma,b(i.values)+" "+b(g.$t("dropdown.history.values")),1)):x("",!0)]))),256)),e("div",Ia,[e("div",Va,[c.value.length?(s(),S(F,{key:0,message:"dropdown.history.undo"},{default:$(()=>[e("div",{class:"bi bi-arrow-down sb",onClick:m[0]||(m[0]=(...i)=>_(t).undo&&_(t).undo(...i))})]),_:1})):(s(),l("div",Fa)),za,r.value.length?(s(),S(F,{key:2,message:"dropdown.history.redo"},{default:$(()=>[e("div",{class:"bi bi-arrow-up sb",onClick:m[1]||(m[1]=(...i)=>_(t).redo&&_(t).redo(...i))})]),_:1})):(s(),l("div",Ta))])]),(s(!0),l(T,null,N(c.value,i=>(s(),l("div",Ea,[e("span",Oa,b(new Date(i.timestamp).toLocaleTimeString("fr-Fr",{hour:"2-digit",minute:"2-digit"})),1),Pa,i.tags?(s(),l("span",Da,b(i.tags)+" "+b(g.$t("dropdown.history.tags")),1)):x("",!0),i.values?(s(),l("span",La,b(i.values)+" "+b(g.$t("dropdown.history.values")),1)):x("",!0)]))),256)),_(t).history.undo.length>de?(s(),l("div",Ga," + "+b(_(t).history.undo.length-de),1)):x("",!0)])]),_:1})):x("",!0)}});const ja=j(Ra,[["__scopeId","data-v-a37327b6"]]),Ie=u=>(X("data-v-9411b625"),u=u(),Z(),u),Aa=Ie(()=>e("span",{class:"bi bi-arrow-repeat text-warning"},null,-1)),Ua=Ie(()=>e("span",{class:"bi bi-check2-all text-success"},null,-1)),Ha=Ie(()=>e("div",{style:{height:"30px"}},[e("span",{class:"bi bi-check2-all text-success small-valid"}),e("span",{class:"bi bi-arrow-repeat big-arrow text-warning",style:{opacity:"0.3"}})],-1)),Na=D({__name:"ToggleReload",emits:[],setup(u,{emit:h}){const t=re(),o=V(()=>t.getTab().autoReload?2:t.getTabManager().collection.state.isDirty?0:1);function d(){o.value==0?t.getTabManager().collection.update():o.value==1?(t.getTab().autoReload=!0,t.updateTabs()):(t.getTab().autoReload=!1,t.updateTabs())}return(c,r)=>(s(),l("div",{class:"bb font",onClick:d,style:{width:"26px",height:"30px",overflow:"hidde"}},[o.value==0?(s(),S(F,{key:0,message:"btn.reload.dirty",pos:"bottom"},{default:$(()=>[Aa]),_:1})):x("",!0),o.value==1?(s(),S(F,{key:1,message:"btn.reload.valid",pos:"bottom"},{default:$(()=>[Ua]),_:1})):x("",!0),o.value==2?(s(),S(F,{key:2,message:"btn.reload.auto",pos:"bottom"},{default:$(()=>[Ha]),_:1})):x("",!0)]))}});const Ba=j(Na,[["__scopeId","data-v-9411b625"]]),ye=u=>(X("data-v-3f54024a"),u=u(),Z(),u),qa={class:"d-flex flex-row p-2"},Qa=ye(()=>e("div",{class:"bi bi-search float-start bi-sm"},null,-1)),Ka=["placeholder"],Wa={class:"me-5 d-flex"},Ya=ye(()=>e("div",{class:"bi bi-aspect-ratio me-1"},null,-1)),Xa={class:"ms-5",style:{"font-size":"13px"}},Za=["checked"],Ja={class:"ms-1"},en={class:"ms-4"},tn=ye(()=>e("div",{class:"flex-grow-1"},null,-1)),sn=ye(()=>e("a",{href:"https://github.com/CERES-Sorbonne/Panoptic/issues/new/choose",target:"_blank",class:"bi bi-cone-striped",style:{color:"grey"}},null,-1)),on={class:"d-flex flex-wrap content-container ps-2"},an=D({__name:"ContentFilter",props:{tab:nt,computeStatus:Object},emits:["compute-ml","search-images","remove:selected"],setup(u,{emit:h}){const t=u,o=I(""),d=V(()=>Object.keys(t.tab.collection.groupManager.selectedImages.value).map(Number)),c=V(()=>d.value.length);function r(a){const n=a.target.checked;t.tab.collection.groupManager.setSha1Mode(n,!0)}function g(){o.value=t.tab.state.filterState.query}function m(){t.tab.collection.filterManager.setQuery(o.value),t.tab.collection.filterManager.update(!0)}function i(){t.tab.collection.filterManager.setQuery(""),t.tab.collection.filterManager.update(!0)}return ue(g),Q(()=>t.tab.collection.filterManager.state.query,g),(a,n)=>(s(),l(T,null,[e("div",qa,[k(F,{icon:!0,message:"main.menu.search_tooltip",iconPos:"left"},{default:$(()=>[e("div",{class:H(["d-flex flex-row search-input me-5",o.value?"border-primary":""])},[Qa,pe(e("input",{type:"text",class:"input-hidden",placeholder:a.$t("main.menu.search"),"onUpdate:modelValue":n[0]||(n[0]=p=>o.value=p),onChange:m},null,40,Ka),[[ge,o.value]]),e("div",{class:"bi-sm base-hover",style:{cursor:"pointer",padding:"0px 2px"},onClick:i},"x")],2)]),_:1}),e("div",Wa,[k(F,{message:"main.menu.grid_tooltip"},{default:$(()=>[e("i",{class:H("bi bi-grid-3x3-gap-fill me-2 btn-icon"+(t.tab.state.display=="tree"?"":" text-secondary")),onClick:n[1]||(n[1]=p=>t.tab.state.display="tree")},null,2)]),_:1}),k(F,{message:"main.menu.table_tooltip"},{default:$(()=>[e("i",{id:"toot",class:H("bi bi-table btn-icon me-2"+(t.tab.state.display=="grid"?"":" text-secondary")),onClick:n[2]||(n[2]=p=>t.tab.state.display="grid")},null,2)]),_:1}),k(F,{message:"main.menu.graph_tooltip"},{default:$(()=>[e("i",{id:"toot",class:H("bi bi-bar-chart btn-icon"+(t.tab.state.display=="graph"?"":" text-secondary")),onClick:n[3]||(n[3]=p=>t.tab.state.display="graph")},null,2)]),_:1})]),k(F,{message:"main.menu.image_size_tooltip",click:!1},{default:$(()=>[Ya]),_:1}),e("div",null,[k(lt,{min:30,max:500,modelValue:t.tab.state.imageSize,"onUpdate:modelValue":n[4]||(n[4]=p=>t.tab.state.imageSize=p)},null,8,["modelValue"])]),e("div",Xa,[k(F,{message:"main.menu.image_mode_tooltip"},{default:$(()=>[e("input",{type:"checkbox",checked:t.tab.collection.groupManager.state.sha1Mode,onChange:r},null,40,Za),e("span",Ja,b(a.$t("main.menu.image_mode")),1)]),_:1})]),e("div",en,[k(ja)]),c.value?(s(),S(it,{key:0,id:"selection-stamp",class:"ms-5","selected-images-ids":d.value,"onRemove:selected":n[5]||(n[5]=p=>t.tab.collection.groupManager.clearSelection())},null,8,["selected-images-ids"])):x("",!0),tn,k(F,{message:"main.menu.issue",class:"bb"},{default:$(()=>[sn]),_:1})]),e("div",on,[k(Ba,{class:"me-1"}),k(zo,{manager:t.tab.collection.filterManager},null,8,["manager"]),k(ca,{"is-loading":t.computeStatus.groups,manager:t.tab.collection.groupManager},null,8,["is-loading","manager"]),k(ya,{manager:t.tab.collection.sortManager},null,8,["manager"])])],64))}});const nn=j(an,[["__scopeId","data-v-3f54024a"]]),ln={class:""},rn={class:"d-flex flex-row"},dn=D({__name:"ImageRecomended",props:{pile:Object,size:{type:Number,default:100}},emits:["accept","refuse"],setup(u,{emit:h}){const t=he(),o=u,d=h,c=V(()=>`width: ${o.size}px; height: ${o.size}px;`);V(()=>`max-width: ${o.size-2}px; max-height: ${o.size-1}px;`);const r=V(()=>o.pile.images[0]);return(g,m)=>(s(),l("div",ln,[k(dt,{image:r.value},{default:$(()=>[e("div",{style:Y(c.value),class:"img-container",onClick:m[0]||(m[0]=i=>_(t).showModal(_(ne).IMAGE,{image:r.value}))},[k(rt,{image:r.value,width:o.size-2,height:o.size-1},null,8,["image","width","height"])],4)]),_:1},8,["image"]),e("div",rn,[k(F,{message:"main.recommand.accept"},{default:$(()=>[e("div",{style:Y(["width: "+o.size/2+"px;",{"font-size":"10px"}]),class:"text-center text-success validate clickable unselectable",onClick:m[1]||(m[1]=i=>d("accept",r.value))}," ✓ ",4)]),_:1}),k(F,{message:"main.recommand.refuse"},{default:$(()=>[e("div",{style:Y(["width: "+o.size/2+"px;",{"font-size":"10px"}]),class:"text-center text-danger refuse clickable unselectable",onClick:m[2]||(m[2]=i=>d("refuse",r.value))}," ✕ ",4)]),_:1})])]))}});const cn=j(dn,[["__scopeId","data-v-2ff8fded"]]),me=u=>(X("data-v-9744de99"),u=u(),Z(),u),un={class:"reco-container"},pn={class:"d-flex flex-row m-0 ps-2 center mb-1 mt-0",style:{height:"25px"}},mn=me(()=>e("span",{class:"bi bi-x-lg bb",style:{}},null,-1)),_n=[mn],vn=me(()=>e("div",{class:"b-left pe-1"},null,-1)),hn=me(()=>e("span",{class:"bi bi-arrow-down-circle bb"},null,-1)),gn=[hn],fn=me(()=>e("div",{class:"b-left pe-1"},null,-1)),yn={key:0,class:"bi bi-funnel-fill bb text-primary"},bn={key:1,class:"bi bi-funnel bb"},$n=me(()=>e("div",{class:"b-left pe-1"},null,-1)),kn={class:"text-secondary me-2"},wn={class:"flex-grow-1"},xn={class:"d-flex flex-row"},Sn={key:0,class:"separator"},Cn={class:"d-flex flex-row"},$e=10,Mn=D({__name:"RecommendedMenu",props:{imageSize:{},group:{},width:{},height:{}},emits:["scroll","close","update"],setup(u,{emit:h}){const t=re(),o=K(),d=ct(),c=u,r=h,g=I(1),m=ce([]),i=ce([]),a=ce([]),n=ce(new Set),p=I(!0);function v(M){let C=i.indexOf(M);C<0||(i.splice(C,1),y())}async function w(M){const C=[],O=[];a.forEach(A=>{if(A.value!=null){const W=o.properties[A.propertyId];let R=A.value;W.type==U.multi_tags?(R=M.properties[A.propertyId]??[],R=[...R,A.value]):W.type==U.tag&&(R=[R]),W.mode==we.id?O.push({instanceId:M.id,propertyId:W.id,value:R}):C.push({propertyId:W.id,sha1:M.sha1,value:R})}}),await o.setPropertyValues(O,C),v(M.sha1)}function f(M){n.add(M.sha1),v(M.sha1)}function y(){m.length=0;const M=i.map(C=>({sha1:C,images:o.sha1Index[C]}));E(M,m,g.value,c.imageSize,c.width)}function E(M,C,O,A,W){let R=W,L=[],z=0;for(let P=0;P=O);P++){let q=M[P];if(n.has(q.sha1))continue;let _e=A+$e;if(z+_e0&&C.lengthL.id);let C=await d.getSimilarImages({instanceIds:M});if(console.log(C),!C.instances)throw new Error("No instances in ActionResult");let O=[];const A=C.instances.scores??[];if(C.instances.ids)for(let L in C.instances.ids){const z={id:C.instances.ids[L],score:A[L]};O.push(z)}else for(let L in C.instances.sha1s){const z=C.instances.sha1s[L];for(let P of o.sha1Index[z]){const q={id:P.id,score:A[L]};O.push(q)}}if(O.sort((L,z)=>z.score-L.score),p.value){const L=t.getTabManager(),z=new Set(L.collection.groupManager.result.root.images.map(P=>P.id));O=O.filter(P=>z.has(P.id))}const W=Array.from(new Set(O.map(L=>o.instances[L.id].sha1)));a.length=0;let R=c.group;for(;R;)a.push(...R.meta.propertyValues),R=R.parent;i.length=0,i.push(...W),n.clear(),y(),r("update")}function ae(){p.value=!p.value}return ue(B),Q(()=>c.group,()=>{B(),n.clear()}),Q(()=>c.imageSize,y),Q(()=>c.width,y),Q(p,B),(M,C)=>(s(),l("div",un,[e("div",pn,[e("div",{class:"text-secondary pe-1",onClick:C[0]||(C[0]=O=>r("close"))},_n),vn,e("div",{class:"text-secondary pe-1",onClick:C[1]||(C[1]=O=>r("scroll",c.group.id))},gn),fn,e("div",{class:"text-secondary pe-1",onClick:ae},[p.value?(s(),l("span",yn)):(s(),l("span",bn))]),$n,k(F,{"icon-pos":"left",message:"main.recommand.tooltip",icon:!0},{default:$(()=>[e("span",kn,b(M.$t("main.recommand.title")),1)]),_:1}),e("div",wn,[e("div",xn,[(s(!0),l(T,null,N(a,(O,A)=>(s(),l(T,null,[k(ut,{class:"",value:O},null,8,["value"]),A(s(),l("div",null,[e("div",Cn,[(s(!0),l(T,null,N(O,A=>(s(),S(cn,{pile:A,size:c.imageSize,onAccept:w,onRefuse:f,style:Y("margin-right:"+$e+"px;")},null,8,["pile","size","style"]))),256))])]))),256))],4)]))}});const In=j(Mn,[["__scopeId","data-v-9744de99"]]);const Vn={style:{display:"flex"}},Fn={class:"info"},zn=e("img",{id:"zoomed-image",style:{display:"none",position:"absolute","z-index":"1000",width:"120px",height:"120px","pointer-events":"none"}},null,-1),Tn={__name:"LineChart",props:{chartData:{series:Array,xValues:Array,dataType:U},height:String},setup(u){const h=u,t=I(0),o=I(!1),d={};Object.keys(h.chartData.series).forEach(n=>{d[n]=!1});const c=I({markers:{size:7},legend:{showForSingleSeries:!0,onItemClick:{toggleDataSeries:!1}},xaxis:{type:h.chartData.dataType===U.date?"datetime":"numeric",categories:h.chartData.xValues},chart:{type:"area",stacked:!1,stackOnlyBar:!1,zoom:{type:"x",autoScaleYaxis:!0},animations:{animateGradually:{enabled:!1,delay:150}}},dataLabels:{enabled:!1},stroke:{curve:"straight"},tooltip:{intersect:!0,shared:!1,custom:function({series:n,seriesIndex:p,dataPointIndex:v,w}){const f=h.chartData.series[p].data[v];let y='
';f.images.forEach((B,ae)=>{ae<10&&(y+=`
`)}),y+="
";let E=`${h.chartData.series[p].name} — ${f.y} Images`;return E+=`
${y}
`,E}}}),r=()=>{c.value.chart.stacked=!c.value.chart.stacked,o.value=!o.value,t.value+=1},g=()=>{let n;c.value.chart.type==="area"?n={chart:{...c.value.chart,type:"bar"}}:n={chart:{...c.value.chart,type:"area"}},c.value={...c.value,...n},t.value+=1},m=(n,p,v)=>{const f=h.chartData.series[p];let y=Math.max(...f.data.map(E=>E.y));if(document.querySelectorAll(".apexcharts-custom-image").forEach(E=>E.remove()),d[p]){d[p]=!1;return}f.data.forEach((E,B)=>{const M=Math.floor(E.y/y*17),C=E.images.slice(0,M),O=`circle[index="${p}"][j="${B}"]`,A=document.querySelector(O),W=parseFloat(A.getAttribute("cx"));C.forEach((R,L)=>{const z=document.createElement("img");z.src=R,z.width=40,z.height=40,z.style.position="absolute";let P=W+40/1.5,q=65+L*40;z.style.left=`${P}px`,z.style.bottom=`${q}px`,z.classList.add("apexcharts-custom-image"),z.addEventListener("mouseover",_e=>i(P,q,R)),z.addEventListener("mouseout",a),n.el.appendChild(z)})}),Object.keys(d).forEach(E=>d[E]=!1),d[p]=!0};function i(n,p,v){const w=document.getElementById("zoomed-image");w.style.left=`${n+120*1.5}px`,w.src=v,w.style.bottom=`${p}px`,w.style.display="block"}function a(){const n=document.getElementById("zoomed-image");n.style.display="none"}return console.log("test"),(n,p)=>{const v=Pe("apexchart");return s(),l(T,null,[e("div",Vn,[e("button",{class:"mt-2",onClick:g},b(c.value.chart.type==="area"?n.$t("main.graph-view.histo"):n.$t("main.graph-view.curve")),1),h.chartData.series.length>1?(s(),l("button",{key:0,class:"mt-2",style:{"margin-left":"1em"},onClick:r},b(o.value?n.$t("main.graph-view.over"):n.$t("main.graph-view.stack")),1)):x("",!0)]),(s(),S(v,{style:{position:"relative"},key:t.value,height:h.height,type:c.value.chart.type,options:c.value,series:h.chartData.series,onLegendClick:m},null,8,["height","type","options","series"])),e("i",Fn,b(n.$t("main.graph-view.info")),1),zn],64)}}},En={key:1},On=D({__name:"GraphView",props:{collection:{},height:{}},emits:[],setup(u,{emit:h}){const t=K(),o=u,d=I(""),c=I(g());function r(){const m=new Set;let i=o.collection.groupManager.getGroupIterator();for(;i;){const a=i.group;if(a.id===0||a.meta.propertyValues&&a.meta.propertyValues[0].value==null){i=i.nextGroup();continue}for(let n of a.children)m.add(n.meta.propertyValues[0].value);a.children.forEach(()=>i=i.nextGroup()),i=i.nextGroup()}return m}function g(){const m={};let i,a=o.collection.groupManager.state.groupBy;if(a.length===0){d.value="Choose at least one date or numeric value to group the images by";return}const n=t.properties[a[0]],p=n.type;if(a.length>2){d.value="Only max two levels of grouping are supported";return}else if(a.length===1)m[n.name]={name:n.name,data:[]};else if(i=Array.from(r()),i.length>20){d.value="Too many curves to draw, select a subgrouping with less than 20 possible values";return}if(p!==U.number&&p!==U.date){d.value="First level of grouping needs to be a date or a numeric property";return}let v=o.collection.groupManager.getGroupIterator();const w=[];for(;v;){const f=v.group;if(f.id===0||f.meta.propertyValues&&f.meta.propertyValues[0].value==null){v=v.nextGroup();continue}let y=f.meta.propertyValues[0];const E=p===U.date?new Date(y.value).getTime():y.value;if(w.push(E),n.name in m)m[n.name].data.push({x:E,y:f.images.length,images:f.images.slice(0,20).map(B=>B.urlSmall)});else{const B=f.children.map(M=>M.meta.propertyValues[0].value),ae=i.filter(M=>!B.includes(M));for(let M of f.children){const C=M.meta.propertyValues[0].value;if(m[C]===void 0){let O=C;C in t.tags&&(O=t.tags[C].value),m[C]={data:[],name:O}}m[M.meta.propertyValues[0].value].data.push({x:E,y:M.images.length,images:M.images.slice(0,20).map(O=>O.urlSmall)})}for(let M of ae){if(m[M]===void 0){let C=M;M in t.tags&&(C=t.tags[M].value),m[M]={data:[],name:C}}m[M].data.push({x:E,y:0,images:[]})}f.children.forEach(()=>v=v.nextGroup())}v=v.nextGroup()}return d.value="",{series:Object.values(m),xValues:w,dataType:p}}return o.collection.groupManager.onChange.addListener(()=>c.value=g()),(m,i)=>(s(),l("div",{class:"",style:Y({height:o.height+"px"})},[d.value===""?(s(),S(Tn,{key:0,chartData:c.value,height:o.height-50+"px"},null,8,["chartData","height"])):(s(),l("span",En,b(d.value),1))],4))}}),Pn={key:0,class:"m-0 p-0"},Dn={key:0,style:{"margin-left":"10px"}},Ln=D({__name:"MainView",props:{tabId:Number,height:Number},setup(u){const h=re(),t=h.getTabManager(),o=u,d=I({}),c=I(!0),r=I(null),g=I(null),m=I(null),i=I(0),a=I(0),n=ce({groups:!1}),p=V(()=>t.getVisibleProperties());function v(){r.value&&g.value?i.value=o.height-r.value.clientHeight-g.value.clientHeight-5:r.value?i.value=o.height-r.value.clientHeight-5:i.value=0}t.collection.groupManager.onChange.addListener(()=>{m.value&&t.state.display=="tree"&&m.value.computeLines()});function w(y){d.value=t.collection.groupManager.result.index[y],ee(()=>v())}function f(){d.value={},ee(()=>v())}return ue(()=>{a.value=r.value.clientWidth,window.addEventListener("resize",()=>{ee(()=>{var y;a.value=((y=r.value)==null?void 0:y.clientWidth)??a.value})})}),Q(()=>t.state.imageSize,()=>ee(v)),Q(()=>o.height,async()=>{await ee(v)}),Q(t.state,y=>{h.updateTabs()},{deep:!0}),Q(()=>o.tabId,async()=>{c.value=!1,await ee(),c.value=!0}),(y,E)=>(s(),l(T,null,[e("div",{id:"main-content",ref_key:"filterElem",ref:r},[k(nn,{tab:_(t),"compute-status":n},null,8,["tab","compute-status"])],512),e("div",{ref_key:"boxElem",ref:g,class:"m-0 p-0"},[d.value.id?(s(),l("div",Pn,[k(In,{group:d.value,"image-size":_(t).state.imageSize,width:a.value,height:50,onClose:f,onScroll:m.value.scrollTo,onUpdate:E[0]||(E[0]=B=>ee(()=>v()))},null,8,["group","image-size","width","onScroll"])])):x("",!0)],512),a.value>0&&i.value>0&&c.value?(s(),l("div",Dn,[_(t).state.display=="tree"?(s(),S(pt,{key:0,"group-manager":_(t).collection.groupManager,"image-size":_(t).state.imageSize,height:i.value-0,properties:p.value,"hide-if-modal":!0,"selected-images":_(t).collection.groupManager.selectedImages,ref_key:"imageList",ref:m,width:a.value-25,onRecommend:w},null,8,["group-manager","image-size","height","properties","selected-images","width"])):x("",!0),_(t).state.display=="grid"?(s(),l("div",{key:1,style:Y({width:a.value-12+"px"}),class:"p-0 m-0 grid-container"},[k(mt,{manager:_(t).collection.groupManager,height:i.value-15,width:a.value-40,"selected-properties":p.value,class:"p-0 m-0","show-images":!0,"selected-images":_(t).collection.groupManager.selectedImages,ref_key:"imageList",ref:m,"hide-if-modal":!0},null,8,["manager","height","width","selected-properties","selected-images"])],4)):x("",!0),_(t).state.display=="graph"?(s(),S(On,{key:2,collection:_(t).collection,height:i.value-15},null,8,["collection","height"])):x("",!0)])):x("",!0)],64))}});const Gn=j(Ln,[["__scopeId","data-v-8d18a136"]]),Rn={class:"d-flex d-row",style:{cursor:"pointer"}},jn=["onMouseenter","onMouseleave"],An=["onClick"],Un=["onClick"],Hn=["onClick"],Nn=["onSubmit"],Bn=["onKeydown","onUpdate:modelValue"],qn=e("span",{class:"bi bi-plus"},null,-1),Qn=[qn],Kn={class:"lang"},Wn=e("i",{class:"bi bi-translate",style:{"margin-right":"0.5rem"}},null,-1),Yn=["value"],Xn=D({__name:"TabNav",props:{reRender:Function},setup(u){const h=re(),t=I(-1),o=I(""),d=I(null),c=u;function r(v){h.data.selectedTabId==v||m(),h.selectTab(v)}function g(v){t.value=v,o.value=h.data.tabs[v].name,ee(()=>d.value[0].focus())}function m(){t.value=-1,o.value=""}function i(v){h.addTab("New Tab")}async function a(v){confirm("Are you sure to delete Tab: "+v.name)&&await h.removeTab(v.id)}const n=ce({});I(-1);const p=["fr","en"];return(v,w)=>(s(),l("nav",null,[e("div",Rn,[(s(!0),l(T,null,N(_(h).data.tabs,f=>(s(),l("div",{class:"d-flex d-row me-2",onMouseenter:y=>n[f.id]=!0,onMouseleave:y=>n[f.id]=!1},[t.value!=f.id?(s(),l(T,{key:0},[k(F,{message:"main.menu.rename_tab_tooltip"},{default:$(()=>[e("i",{onClick:y=>g(f.id),class:H(["bi bi-pencil me-1 tab-icon hover-light",n[f.id]&&_(h).data.selectedTabId==f.id?"":"hidden"]),style:{"font-size":"10px"}},null,10,An)]),_:2},1024),e("div",{class:H(["tab-button",f.id==_(h).data.selectedTabId?" active":""]),onClick:y=>r(f.id)},[e("span",null,b(f.name),1)],10,Un),k(F,{message:"main.menu.delete_tab_tooltip"},{default:$(()=>[e("i",{onClick:y=>a(f),class:H(["btn-icon bi bi-x tab-icon hover-light",n[f.id]?"":"hidden"]),style:{"font-size":"15px"}},null,10,Hn)]),_:2},1024)],64)):(s(),l("div",{key:1,class:H(["tab-button",f.id==_(h).data.selectedTabId?" active":""])},[e("form",{onSubmit:Oe(m,["stop","prevent"])},[pe(e("input",{onFocusout:m,onKeydown:_t(m,["escape"]),type:"text",class:"text-input","onUpdate:modelValue":y=>f.name=y,ref_for:!0,ref_key:"inputElem",ref:d},null,40,Bn),[[ge,f.name]])],40,Nn)],2))],40,jn))),256)),k(F,{message:"main.menu.add_tab_tooltip"},{default:$(()=>[e("button",{class:"tab-icon hover-light ps-1 pe-1",onClick:i,id:"add-tab-button"},Qn)]),_:1}),e("div",Kn,[Wn,pe(e("select",{"onUpdate:modelValue":w[0]||(w[0]=f=>v.$i18n.locale=f),onChange:w[1]||(w[1]=f=>c.reRender())},[(s(),l(T,null,N(p,(f,y)=>e("option",{key:`Lang${y}`,value:f},b(f.toUpperCase()),9,Yn)),64))],544),[[vt,v.$i18n.locale]])])])]))}});const Ae=u=>(X("data-v-ef872353"),u=u(),Z(),u),Zn={key:0},Jn={class:"d-flex flex-row m-0 p-0 overflow-hidden"},el={class:"w-100"},tl={key:0,class:"custom-hr"},sl={key:1,class:"loading"},ol={class:"text-center"},al={key:2,class:"loading"},nl=Ae(()=>e("i",{class:"spinner-border",role:"status"},null,-1)),ll=Ae(()=>e("span",{class:"ms-1"},"Loading...",-1)),il=[nl,ll],rl=D({__name:"PanopticView",setup(u){const h=re(),t=K(),o=he(),d=I(null),c=I(null),r=I(window.innerHeight),g=I(!1),m=I(!0),i=V(()=>{var y;return r.value-(((y=c.value)==null?void 0:y.clientHeight)??0)}),a=V(()=>{var y;return(y=d.value)==null?void 0:y.filteredImages.map(E=>E.id)});let n=navigator.userAgent.indexOf("Mac OS X")!==-1;async function p(){m.value=!1,await ee(),m.value=!0}ue(async()=>{o.isProjectLoaded||ze.push("/"),ee(()=>{window.addEventListener("resize",v),v()}),window.addEventListener("keydown",y=>{y.key=="Control"&&(G.ctrl=!0),y.key=="Alt"&&(n&&(G.ctrl=!0),G.alt=!0),y.key=="Shift"&&(G.shift=!0),y.key=="ArrowLeft"&&(G.left=!0),y.key=="ArrowRight"&&(G.right=!0,console.log("keeeyy")),y.key=="Z"&&G.ctrl&&t.redo(),y.key=="z"&&G.ctrl&&t.undo()}),window.addEventListener("keyup",y=>{y.key=="Control"&&(G.ctrl=!1),y.key=="Alt"&&(n&&(G.ctrl=!1),G.alt=!1),y.key=="Shift"&&(G.shift=!1),y.key=="ArrowLeft"&&(G.left=!1),y.key=="ArrowRight"&&(G.right=!1)}),window.addEventListener("mousemove",y=>{G.ctrl=y.ctrlKey,G.alt=y.altKey,G.shift=y.shiftKey,n&&(G.ctrl=G.ctrl||G.alt)})}),ht(()=>{window.removeEventListener("resize",v)});function v(){r.value=window.innerHeight,g.value=!0}function w(){o.showModal(ne.EXPORT,a)}function f(){ze.push("/")}return(y,E)=>m.value?(s(),l("div",Zn,[d.value&&!d.value.imageList?(s(),S(gt,{key:0,tutorial:"project"})):x("",!0),(s(),l("div",{id:"panoptic",key:_(h).status.renderNb},[e("div",Jn,[_(h).status.loaded?(s(),l(T,{key:0},[e("div",null,[k(Gs,{onExport:E[0]||(E[0]=B=>w())})]),e("div",el,[e("div",{class:"ms-3",ref_key:"navElem",ref:c},[k(Xn,{"re-render":p})],512),g.value?(s(),l("div",tl)):x("",!0),k(Gn,{"tab-id":_(h).data.selectedTabId,height:i.value,ref_key:"mainViewRef",ref:d},null,8,["tab-id","height"])])],64)):_(o).isProjectLoaded?(s(),l("div",al,il)):(s(),l("div",sl,[e("div",ol,[e("div",null,b(y.$t("main.status.no_project")),1),e("div",{class:"bi bi-house p-3",onClick:f,style:{"font-size":"50px",cursor:"pointer"}})])]))])]))])):x("",!0)}});const ul=j(rl,[["__scopeId","data-v-ef872353"]]);export{ul as default}; +import{d as D,V as Ue,u as he,W as re,B as K,r as I,c as V,X as Q,o as s,a as l,b as e,q as k,Y as ke,t as b,i as x,w as pe,v as ge,e as _,Z as Ee,M as ne,z as $,$ as F,a0 as we,s as S,a1 as Oe,n as H,S as U,a2 as Se,j as te,a3 as He,p as X,f as Z,_ as j,D as oe,a4 as Ne,a5 as Ce,a6 as Pe,F as T,x as N,h as Y,a7 as be,a8 as Ve,g as xe,a9 as Be,aa as Fe,ab as qe,ac as Qe,L as Ke,ad as We,ae as Ye,O as Xe,R as Ze,Q as Je,af as et,ag as tt,ah as st,ai as De,l as ue,k as ee,aj as Le,ak as ot,al as ie,am as se,an as at,ao as nt,ap as lt,aq as it,ar as rt,as as dt,at as ct,au as ce,av as ut,aw as pt,ax as mt,ay as _t,y as vt,m as ze,C as G,az as ht}from"./index-9c28c371.js";import{_ as gt}from"./Tutorial-513a3a94.js";const ve={},le=u=>(X("data-v-fde3194e"),u=u(),Z(),u),ft={class:"d-flex flex-row"},yt={key:1,class:"d-flex",style:{width:"150px"}},bt={class:"flex-grow-1"},$t={key:1,style:{"padding-top":"1px"}},kt=le(()=>e("i",{class:"bi bi-arrows-fullscreen"},null,-1)),wt={style:{width:"20px","margin-top":"2px"},class:"text-center"},xt=le(()=>e("i",{class:"bi bi-link-45deg"},null,-1)),St={class:"text-center",style:{width:"20px","margin-top":"2px"}},Ct=le(()=>e("i",{class:"bi bi-chevron-down"},null,-1)),Mt=le(()=>e("i",{class:"bi bi-chevron-right"},null,-1)),It={key:0,class:"ms-3 pt-1"},Vt=le(()=>e("i",{class:"bi bi-funnel-fill me-2"},null,-1)),Ft=le(()=>e("i",{class:"bi bi-filter me-2"},null,-1)),zt=le(()=>e("i",{class:"bi bi-collection me-2"},null,-1)),Tt=le(()=>e("i",{class:"bi bi-trash me-2"},null,-1)),Et={key:1},Ot=D({__name:"PropertyOptions",props:{property:Object},setup(u){const{t:h}=Ue({useScope:"global"}),t=he(),o=re(),d=K(),c=o.getTabManager(),r=u,g=I(!1),m=I(!1),i=I(""),a=I(!1),n=V(()=>o.getTab()),p=V(()=>n.value.visibleProperties[r.property.id]==!0),v=V(()=>c.collection.filterManager.state.filter.filters.some(z=>!z.isGroup&&z.propertyId==r.property.id)),w=V(()=>c.collection.groupManager.state.groupBy.includes(r.property.id)),f=V(()=>c.collection.sortManager.state.sortBy.includes(r.property.id)),y=V(()=>{if(v.value)return c.collection.filterManager.state.filter.filters.find(z=>!z.isGroup&&z.propertyId==r.property.id).id}),E=()=>c.collection.filterManager,B=V(()=>c.getSha1Mode());function ae(){p.value?c.setVisibleProperty(r.property.id,!1):c.setVisibleProperty(r.property.id,!0)}function M(){g.value?g.value=!1:(g.value=!0,i.value=r.property.name),m.value=!1}function C(){r.property.type!=U.tag&&r.property.type!=U.multi_tags||(m.value?m.value=!1:m.value=!0,g.value=!1)}function O(){f.value?c.collection.sortManager.delSort(r.property.id):c.collection.sortManager.setSort(r.property.id),c.collection.sortManager.update(!0)}function A(){w.value?c.collection.groupManager.delGroupOption(r.property.id):c.collection.groupManager.setGroupOption(r.property.id),c.collection.groupManager.update(!0)}function W(){confirm(h("common.properties.delete")+": "+r.property.name+" ? "+r.property.id)&&d.deleteProperty(r.property.id)}async function R(){i.value!=""&&(await d.updateProperty(r.property.id,i.value),M())}function L(){const z=E();v.value?(z.deleteFilter(y.value),ve.filter.hide()):(z.addNewFilter(r.property.id),ve.filter.show())}return Q(()=>r.property,()=>{g.value=!1}),(z,P)=>(s(),l("div",{class:H(a.value?"hover-light":"")},[e("div",ft,[g.value?x("",!0):(s(),l("div",{key:0,class:"option-holder hover-light btn-icon",style:{width:"150px"},onClick:M},[k(ke,{type:r.property.type,class:"me-2 btn-icon",onMouseenter:P[0]||(P[0]=q=>a.value=!0),onMouseleave:P[1]||(P[1]=q=>a.value=!1)},null,8,["type"]),e("span",null,b(r.property.name),1)])),g.value?(s(),l("div",yt,[e("div",null,[e("i",{class:"btn-icon me-1 bi bi-x-lg",style:{padding:"2px"},onClick:M,onMouseenter:P[2]||(P[2]=q=>a.value=!0),onMouseleave:P[3]||(P[3]=q=>a.value=!1)},null,32)]),e("div",bt,[r.property.id>=0?pe((s(),l("input",{key:0,style:{position:"relative",top:"1px"},type:"text",class:"text-input","onUpdate:modelValue":P[4]||(P[4]=q=>i.value=q),onChange:R},null,544)),[[ge,i.value]]):(s(),l("span",$t,[k(ke,{type:r.property.type,class:"me-2 btn-icon"},null,8,["type"]),e("span",null,b(r.property.name),1)]))])])):x("",!0),_(Ee)(r.property.type)?(s(),l("div",{key:2,style:{width:"20px","margin-top":"2px",cursor:"pointer"},class:"text-center",onClick:P[5]||(P[5]=q=>_(t).showModal(_(ne).TAG,{propId:r.property.id}))},[k(F,{click:!1,message:"main.nav.properties.open_tags"},{default:$(()=>[kt]),_:1})])):x("",!0),e("div",wt,[r.property.mode==_(we).id?(s(),S(F,{key:0,click:!1,message:"main.nav.properties.linked_property_tooltip"},{default:$(()=>[xt]),_:1})):x("",!0)]),e("div",{style:{width:"20px","margin-top":"2px"},onClick:ae,class:"btn-icon text-center"},[B.value&&r.property.mode==_(we).id?(s(),S(F,{key:0,message:"main.nav.properties.hidden_property_tooltip"},{default:$(()=>[e("span",{class:"bi bi-eye-slash",onClick:P[6]||(P[6]=Oe(()=>{},["stop"]))})]),_:1})):(s(),S(F,{key:1,pos:"right",message:"main.nav.properties.hide_property_tooltip"},{default:$(()=>[e("span",{class:H("bi bi-eye text-"+(p.value?"primary":"secondary"))},null,2)]),_:1}))]),e("div",St,[r.property.type==_(U).tag||r.property.type==_(U).multi_tags?(s(),l("div",{key:0,onClick:C,style:{cursor:"pointer"}},[m.value?(s(),S(F,{key:0,message:"main.nav.properties.collapse_property_tooltip"},{default:$(()=>[Ct]),_:1})):(s(),S(F,{key:1,message:"main.nav.properties.expand_property_tooltip"},{default:$(()=>[Mt]),_:1}))])):x("",!0)])]),e("div",null,[g.value?(s(),l("div",It,[u.property.id!=_(Se).folders?(s(),l("div",{key:0,class:H(["options hover-light",v.value?" text-primary":""]),onClick:L},[e("div",null,[Vt,te(b(z.$t("main.menu.filters")),1)])],2)):x("",!0),e("div",{class:H(["options hover-light",f.value?" text-primary":""]),onClick:O},[Ft,te(b(z.$t("main.menu.sort.title")),1)],2),e("div",{class:H(["options hover-light",w.value?" text-primary":""]),onClick:A},[zt,te(b(z.$t("main.menu.groupby")),1)],2),r.property.id>=0?(s(),l("div",{key:1,class:"options hover-light",onClick:W},[Tt,te(b(z.$t("main.nav.properties.delete_property")),1)])):x("",!0)])):m.value?(s(),l("div",Et,[k(He,{property:r.property,"can-create":!0,"can-customize":!0,"can-delete":!0,"can-link":!0},null,8,["property"])])):x("",!0)])],2))}});const Te=j(Ot,[["__scopeId","data-v-fde3194e"]]),Pt=e("i",{class:"bi bi-three-dots base-hover"},null,-1),Dt={class:"text-nowrap"},Lt=["onClick"],Gt=e("i",{class:"bi bi-arrow-clockwise me-1"},null,-1),Rt=e("div",{class:"custom-hr"},null,-1),jt=["onClick"],At=e("i",{class:"bi bi-trash me-1"},null,-1),Ut=D({__name:"FolderOptionDropdown",props:{folder:{}},setup(u){const h=K(),t=u;function o(){h.reImportFolder(t.folder.id)}function d(){confirm(Ne.global.t("main.nav.folders.del_alert"))&&h.deleteFolder(t.folder.id)}return(c,r)=>(s(),S(oe,{teleport:!0},{button:$(()=>[Pt]),popup:$(({hide:g})=>[e("div",Dt,[e("div",{class:"p-2 bb",onClick:m=>{o(),g()}},[Gt,te("Re import")],8,Lt),Rt,e("div",{class:"bb p-2",onClick:m=>{d(),g()}},[At,te(b(c.$t("main.nav.folders.del")),1)],8,jt)])]),_:1}))}}),Ht=["onMouseenter"],Nt=["onClick"],Bt={class:"text-secondary"},qt=["onClick"],Qt=D({__name:"FolderList2",props:{folders:Array,visibleFolders:Object,filterManager:Ce,root:{type:Boolean,default:!0}},setup(u){const h=K(),t=u,o=I(null),d=V(()=>{let a={};const n=new Set(t.filterManager.state.folders);return t.folders.map(p=>p.id).forEach(p=>{n.has(p)&&(a[p]=!0)}),a}),c=V(()=>{let a={};return t.folders.map(n=>n.id).forEach(n=>{t.visibleFolders[n]&&(a[n]=!0)}),a}),r=V(()=>{let a={};return t.folders.forEach(n=>{let p=[];d.value[n.id]&&p.push("selected"),a[n.id]=p.join(" ")}),a});function g(a){let n=t.visibleFolders;n[a]?delete n[a]:n[a]=!0}function m(a){let n=new Set(t.filterManager.state.folders);const p=n.has(a),v=h.folders[a].parent!=null&&n.has(h.folders[a].parent);p&&!v?(n.delete(a),be(a).forEach(w=>n.delete(w.id))):(i(a,n),n.add(a),be(a).forEach(w=>n.add(w.id)),Ve(h.folders[a]).forEach(w=>n.delete(w.id))),t.filterManager.setFolders(Array.from(n)),t.filterManager.update(!0)}function i(a,n){const p=Ve(h.folders[a]);let v;for(let w of p)if(n.has(w.id))v=w;else break;v!=null&&be(v.id).forEach(w=>n.delete(w.id))}return(a,n)=>{const p=Pe("FolderList2",!0);return s(),l("ul",{class:H(t.root?"tree":""),style:Y(t.root?"padding-left:0px;":"")},[(s(!0),l(T,null,N(u.folders,v=>(s(),l("li",{style:Y(t.root?"padding-left:0px;":""),class:"no-break",onMouseenter:w=>o.value=v.id,onMouseleave:n[0]||(n[0]=w=>o.value=null)},[e("summary",{class:H(r.value[v.id]),onClick:w=>m(v.id)},[te(b(v.name)+" ",1),e("span",Bt,b(v.count),1)],10,Nt),v.children&&v.children.length>0?(s(),l("i",{key:0,onClick:w=>g(v.id),class:H("bi bi-chevron-"+(c.value[v.id]?"down":"right")+" ms-2 btn-icon"),style:{"font-size":"9px"}},null,10,qt)):x("",!0),e("span",{class:H(o.value===v.id?"visible-option":"invisible-option")},[k(Ut,{folder:v,style:{display:"inline-block"}},null,8,["folder"])],2),v.children&&v.children.length>0&&c.value[v.id]?(s(),S(p,{key:1,folders:v.children,root:!1,"visible-folders":t.visibleFolders,"filter-manager":t.filterManager},null,8,["folders","visible-folders","filter-manager"])):x("",!0)],44,Ht))),256))],6)}}});const Kt=j(Qt,[["__scopeId","data-v-069cc964"]]),Wt={class:"text-center"},Yt={class:"w-100 text-center",style:{"font-size":"10px"}},Xt={key:0,class:"progress",role:"progressbar","aria-label":"Example 1px high","aria-valuemin":"0","aria-valuemax":"100",style:{height:"1px"}},Zt=D({__name:"TaskStatus",props:{task:{}},setup(u){const h=u,t=V(()=>h.task.total-h.task.remain-h.task.computing),o=V(()=>h.task.total);return(d,c)=>(s(),l("div",Wt,[te(b(h.task.name)+" ",1),e("div",Yt,b(t.value)+" / "+b(o.value)+" "+b(d.$t("main.nav.tasks.done")),1),o.value>0?(s(),l("div",Xt,[e("div",{class:"progress-bar",style:Y(`width: ${t.value/o.value*100}%`)},null,4)])):x("",!0)]))}}),J=u=>(X("data-v-a5725e66"),u=u(),Z(),u),Jt={class:"menu overflow-scroll"},es={class:""},ts={class:"m-0",style:{padding:"4px 0px 4px 8px"}},ss={class:"d-flex align-items-center",style:{"font-size":"15px","line-height":"14px"}},os=J(()=>e("i",{class:"bi bi-gear"},null,-1)),as=[os],ns=J(()=>e("i",{class:"bi bi-arrow-left-right"},null,-1)),ls=[ns],is=J(()=>e("div",{class:"custom-hr"},null,-1)),rs={class:"ps-2 pe-2",style:{"padding-bottom":"9.5px"}},ds={class:"d-flex align-items-center"},cs=J(()=>e("i",{class:"bi bi-plus"},null,-1)),us={style:{"max-height":"300px",overflow:"auto"}},ps={key:0,id:"import"},ms=J(()=>e("div",{class:"custom-hr"},null,-1)),_s={class:"pt-1 pb-2"},vs={class:"d-flex align-items-center ps-2 pe-2",style:{height:"30px"}},hs=J(()=>e("div",{class:"custom-hr"},null,-1)),gs={key:0,class:"ps-2 pe-2"},fs={class:"p-1"},ys={key:0,class:"custom-hr"},bs=J(()=>e("div",{class:"custom-hr"},null,-1)),$s={class:"p-2 mt-0"},ks={class:"d-flex"},ws=J(()=>e("span",{class:"flex-grow-1"},null,-1)),xs={key:0,class:"spinner-grow spinner-grow-sm float-end",style:{width:"10px",height:"10px","margin-top":"5px"}},Ss=J(()=>e("span",{class:"sr-only"},null,-1)),Cs=[Ss],Ms={key:1,class:"bb me-1"},Is={class:"bb me-2"},Vs={key:0,class:"mt-2"},Fs={key:0,class:"property-item"},zs=J(()=>e("div",{class:"property-item m-0 p-0"},null,-1)),Ts=J(()=>e("i",{class:"bi bi-plus btn-icon float-start",style:{"font-size":"25px"}},null,-1)),Es=J(()=>e("div",{class:"custom-hr"},null,-1)),Os={class:"p-2 mt-0"},Ps={key:0,class:"mt-2"},Ds={key:0,class:"property-item"},Ls=D({__name:"Menu",emits:["export"],setup(u,{emit:h}){const t=re(),o=K(),d=he(),c=t.getTabManager(),r=I(!1),g=I(!1),m=async p=>{d.showModal(ne.IMPORT)},i=V(()=>t.backendStatus.tasks.filter(p=>!p.done));function a(){d.showModal(ne.FOLDERSELECTION,{callback:n,mode:"images"})}function n(p){p&&o.addFolder(p)}return Q(()=>t.status.import.to_import,()=>r.value=!0),(p,v)=>{var w;return s(),l("div",Jt,[e("div",es,[e("div",null,[e("div",ts,[e("div",ss,[e("div",{class:"flex-grow-1 text-capitalize overflow-hidden",onClick:v[0]||(v[0]=()=>{})},b((w=_(d).data.status.selectedProject)==null?void 0:w.name),1),e("div",{class:"base-hover p-1",onClick:v[1]||(v[1]=f=>_(d).showModal(_(ne).SETTINGS))},as),e("div",{class:"base-hover p-1",style:{"margin-right":"6px"},onClick:v[2]||(v[2]=f=>_(d).closeProject())},ls)])]),is,e("div",rs,[e("div",ds,[e("div",null,[e("b",null,b(p.$t("main.nav.folders.title")),1)]),e("div",{id:"add_folder",class:"ms-auto plus",onClick:v[3]||(v[3]=f=>{a(),_(xe)()})},[k(F,{message:"main.nav.folders.add"},{default:$(()=>[cs]),_:1})])]),e("div",us,[_(t).getTab()?(s(),S(Kt,{key:0,folders:_(o).folderRoots,"filter-manager":_(c).collection.filterManager,"visible-folders":_(c).state.visibleFolders},null,8,["folders","filter-manager","visible-folders"])):x("",!0)])]),i.value&&i.value.length?(s(),l("div",ps,[ms,e("div",_s,[e("div",vs,[e("div",null,[e("b",null,b(p.$t("main.nav.tasks.title")),1)])]),hs,_(t).backendStatus?(s(),l("div",gs,[(s(!0),l(T,null,N(i.value,(f,y)=>(s(),l("div",fs,[y?(s(),l("div",ys)):x("",!0),k(Zt,{task:f},null,8,["task"])]))),256))])):x("",!0)])])):x("",!0),bs,e("div",$s,[e("div",ks,[k(F,{message:"main.nav.properties.properties_tooltip",pos:"top",icon:!0},{default:$(()=>[e("b",null,b(p.$t("main.nav.properties.title")),1)]),_:1}),ws,g.value?(s(),l("span",xs,Cs)):(s(),l("span",Ms,[k(F,{pos:"right",message:"main.nav.properties.import_properties_tooltip"},{default:$(()=>[e("i",{class:"bi bi-box-arrow-in-up text-secondary",style:{position:"relative",top:"0px","font-size":"15px"},onClick:m})]),_:1})])),e("span",Is,[k(F,{pos:"right",message:"main.nav.properties.export_properties_tooltip"},{default:$(()=>[e("i",{class:"bi bi-box-arrow-up text-secondary",style:{position:"relative",top:"0px","font-size":"15px"},onClick:v[4]||(v[4]=f=>_(d).showModal(_(ne).EXPORT,void 0))})]),_:1})])]),_(t).status.loaded?(s(),l("div",Vs,[(s(!0),l(T,null,N(_(o).properties,f=>(s(),l(T,null,[f.id>=0?(s(),l("div",Fs,[k(Te,{property:f},null,8,["property"])])):x("",!0)],64))),256)),zs,e("div",{id:"add-property",onClick:v[5]||(v[5]=f=>{_(d).showModal(_(ne).PROPERTY,void 0),_(xe)()}),class:"btn-icon base-hover mt-1",style:{"line-height":"25px"}},[Ts,e("span",null,b(p.$t("main.nav.properties.add_property")),1)])])):x("",!0)]),Es,e("div",Os,[k(F,{message:"main.nav.computed.computed_tooltip",icon:!0},{default:$(()=>[e("b",null,b(p.$t("main.nav.computed.title")),1)]),_:1}),_(t).status.loaded?(s(),l("div",Ps,[(s(!0),l(T,null,N(_(o).properties,f=>(s(),l(T,null,[f.id<0&&f.id!=_(Be)?(s(),l("div",Ds,[k(F,{pos:"bottom",message:"main.nav.computed."+Math.abs(f.id).toString()+"_tooltip"},{default:$(()=>[k(Te,{property:f},null,8,["property"])]),_:2},1032,["message"])])):x("",!0)],64))),256))])):x("",!0)])])])])}}});const Gs=j(Ls,[["__scopeId","data-v-a5725e66"]]),Rs={class:"p-0 hover-light ps-1 bb",style:{width:"50px"}},js={class:""},As=["onClick"],Us=e("hr",{class:"m-0 p-0 mt-1 mb-1"},null,-1),Hs=D({__name:"FilterGroupOperator",props:{modelValue:{}},emits:["update:modelValue"],setup(u,{emit:h}){const t=u,o=h;function d(c){o("update:modelValue",c)}return(c,r)=>(s(),S(oe,null,{button:$(()=>[e("div",Rs,[e("span",js,b(c.$t("modals.filters."+t.modelValue)),1)])]),popup:$(({hide:g})=>[e("div",{class:"ps-2 pt-1 pb-1 pe-2",onClick:g},[e("div",{class:"base-btn",onClick:r[0]||(r[0]=m=>d(_(Fe).and))},b(c.$t("modals.filters.and")),1),Us,e("div",{class:"base-btn",onClick:r[1]||(r[1]=m=>d(_(Fe).or))},b(c.$t("modals.filters.or")),1)],8,As)]),_:1}))}}),Ns=["disabled"],Bs={class:"m-0 p-1"},qs=["onClick"],Qs=D({__name:"OperatorChoice",props:{propertyId:{},modelValue:{},disabled:{type:Boolean}},emits:["hide","update:modelValue"],setup(u,{emit:h}){const t=K(),o=u,d=h,c=V(()=>t.properties[o.propertyId]),r=V(()=>qe(c.value.type));async function g(m){d("update:modelValue",m)}return(m,i)=>(s(),S(oe,{onHide:i[0]||(i[0]=a=>d("hide")),placement:"bottom"},{button:$(()=>[e("div",{class:"text-nowrap sb ps-1 pe-1",disabled:o.disabled},[e("span",null,b(m.$t("modals.filters.operators."+o.modelValue)),1)],8,Ns)]),popup:$(({hide:a})=>[e("div",Bs,[(s(!0),l(T,null,N(r.value,n=>(s(),l("div",{class:"hover-light p-1 rounded",style:{cursor:"pointer"},onClick:p=>{g(n),a()}},[e("a",null,b(m.$t("modals.filters.operators."+n)),1)],8,qs))),256))])]),_:1}))}});const Ks=j(Qs,[["__scopeId","data-v-21b8bb8e"]]),Ws={class:"d-flex text-nowrap overflow-hidden",style:{"font-size":"14px"}},Ys=D({__name:"FilterValueInput",props:{modelValue:{},property:{},width:{}},emits:["update:modelValue"],setup(u,{emit:h}){const t=u,o=h;function d(c){o("update:modelValue",c)}return(c,r)=>(s(),l("div",Ws,[_(Ee)(c.property.type)?(s(),S(Qe,{key:0,"model-value":t.modelValue,"onUpdate:modelValue":d,"no-wrap":!0,"auto-focus":!0,"can-create":!0,"can-customize":!0,property:t.property,teleport:!1,width:t.width,class:"sb"},null,8,["model-value","property","width"])):t.property.type==_(U).color?(s(),S(Ke,{key:1,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,rounded:!0,"min-height":22,teleport:!1,offset:2,class:"sb"},null,8,["model-value","width"])):t.property.type==_(U).number?(s(),S(We,{key:2,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,height:26,"input-offset":0,class:"sb"},null,8,["model-value","width"])):t.property.type==_(U).url?(s(),S(Ye,{key:3,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,offset:-22,class:"sb"},null,8,["model-value","width"])):t.property.type==_(U).checkbox?(s(),S(Xe,{key:4,"model-value":t.modelValue,"onUpdate:modelValue":d,label:t.property.name,width:t.width,class:"sb"},null,8,["model-value","label","width"])):t.property.type==_(U).date?(s(),S(Ze,{key:5,"model-value":t.modelValue,teleport:!1,"onUpdate:modelValue":d,width:t.width,class:"sb"},null,8,["model-value","width"])):(s(),S(Je,{key:6,"model-value":t.modelValue,"onUpdate:modelValue":d,width:t.width,offset:-22,class:"sb"},null,8,["model-value","width"]))]))}}),Xs={class:"p-0 m-0 ps-2"},Zs=D({__name:"FilterRow",props:{manager:{},filter:{}},emits:[],setup(u,{emit:h}){const t=K(),o=u,d=V(()=>t.properties[o.filter.propertyId]),c=V(()=>tt(o.filter.operator));function r(i){o.manager.updateFilter(o.filter.id,{operator:i})}function g(i){o.manager.updateFilter(o.filter.id,{value:i})}function m(i){o.manager.updateFilter(o.filter.id,{propertyId:i.id})}return(i,a)=>(s(),l(T,null,[e("td",Xs,[k(et,{"model-value":d.value,"onUpdate:modelValue":m},null,8,["model-value"])]),e("td",null,[k(Ks,{"property-id":d.value.id,"model-value":o.filter.operator,"onUpdate:modelValue":r},null,8,["property-id","model-value"])]),e("td",null,[c.value?(s(),S(Ys,{key:0,"model-value":o.filter.value,"onUpdate:modelValue":g,property:d.value,width:140,style:{width:"150px"},class:""},null,8,["model-value","property"])):x("",!0)])],64))}}),Js={style:{"max-height":"500px",overflow:"auto"}},Ge=D({__name:"AddFilterBtn",props:{group:{},manager:{}},emits:[],setup(u,{emit:h}){const t=u;function o(d){t.manager.addNewFilter(d,t.group.id),ve.filter.show()}return(d,c)=>(s(),S(oe,{placement:"auto"},{button:$(()=>[st(d.$slots,"default")]),popup:$(({hide:r})=>[e("div",Js,[k(De,{onSelect:g=>{o(g),r()},"ignore-ids":[_(Se).folders]},null,8,["onSelect","ignore-ids"])])]),_:3}))}}),Me=u=>(X("data-v-e644f737"),u=u(),Z(),u),eo={class:"filter-group"},to={class:"table table-sm"},so={style:{height:"33px"}},oo={class:""},ao={key:0,class:"m-0 p-0"},no={key:2,class:"text-secondary"},lo={class:"border rounded"},io={class:""},ro=["onClick"],co=Me(()=>e("i",{class:"bi bi-trash"},null,-1)),uo=[co],po={class:"d-flex text-secondary ms-2"},mo={class:"add-options hover-light"},_o=Me(()=>e("i",{class:"bi bi-plus"},null,-1)),vo=Me(()=>e("i",{class:"bi bi-plus"},null,-1)),ho=D({__name:"FilterGroup",props:{filter:{},manager:{},parent:{}},emits:["delete"],setup(u,{emit:h}){K();const t=u,o=V(()=>t.filter),d=V(()=>o.value.filters),c=V(()=>{let i=255-(o.value.depth+1)*5;return`background: rgb(${i},${i},${i});`});function r(i){t.manager.deleteFilter(i.id)}function g(i){t.manager.addNewFilterGroup(i)}function m(i,a){t.manager.updateFilterGroup(i,a)}return(i,a)=>(s(),l("div",eo,[e("table",to,[(s(!0),l(T,null,N(d.value,(n,p)=>(s(),l("tr",so,[e("td",oo,[p==0?(s(),l("div",ao,b(i.$t("modals.filters.where")),1)):p==1?(s(),S(Hs,{key:1,"model-value":o.value.groupOperator,"onUpdate:modelValue":a[0]||(a[0]=v=>m(o.value.id,v))},null,8,["model-value"])):(s(),l("span",no,b(i.$t("modals.filters."+o.value.groupOperator)),1))]),n.propertyId!==void 0?(s(),S(Zs,{key:0,filter:n,manager:t.manager},null,8,["filter","manager"])):(s(),l("td",{key:1,colspan:"3",style:Y(c.value)},[e("div",lo,[k(Re,{filter:n,manager:t.manager},null,8,["filter","manager"])])],4)),e("td",io,[e("span",{class:"base-btn",onClick:v=>r(n)},uo,8,ro)])]))),256))]),e("div",po,[k(Ge,{group:t.filter,manager:t.manager},{default:$(()=>[e("div",mo,[_o,te(b(i.$t("modals.filters.new_filter")),1)])]),_:1},8,["group","manager"]),e("div",{class:"add-options hover-light",onClick:a[1]||(a[1]=n=>g(o.value.id))},[vo,te(b(i.$t("modals.filters.new_group")),1)])])]))}});const Re=j(ho,[["__scopeId","data-v-e644f737"]]),go=u=>(X("data-v-56cd3bdb"),u=u(),Z(),u),fo={key:0,class:"d-flex flex-row m-0 ms-1 p-1 bg hover-light bg-medium",style:{cursor:"pointer"}},yo={key:0},bo=go(()=>e("span",{class:"text-primary"},"Text Query",-1)),$o={key:0,class:"or-separator"},ko={key:0,class:"or-separator"},wo={key:0,class:"m-1 p-1"},xo=D({__name:"MainFilterDropdown",props:{manager:Ce},emits:["update:modelValue"],setup(u,{emit:h}){const t=K(),o=u,d=I(null),c=I(null),r=V(()=>{let m=g(o.manager.state.filter),i={};return m.forEach(a=>i[a.propertyId]=a),Object.values(i)});function g(m){let i=[];for(let a of m.filters)a.isGroup?i.push(...g(a)):i.push(a);return i}return Q(()=>o.manager.state.filter.filters,()=>{o.manager.state.filter.filters.length==0&&c.value.hide()}),ue(async()=>{await ee(),ve.filter=c.value}),(m,i)=>(s(),S(oe,{ref_key:"dropdownElem",ref:c,placement:"top-start"},{button:$(()=>[e("div",null,[r.value.length||o.manager.state.query?(s(),l("div",fo,[o.manager.state.query?(s(),l("div",yo,[bo,r.value.length?(s(),l("span",$o,"|")):x("",!0)])):x("",!0),(s(!0),l(T,null,N(r.value,(a,n)=>(s(),l("div",null,[n>0?(s(),l("span",ko,"|")):x("",!0),a.propertyId==_(Se).id?(s(),S(ke,{key:1,type:_(t).properties[a.propertyId].type,style:{"margin-right":"2px"}},null,8,["type"])):x("",!0),e("span",null,b(_(t).properties[a.propertyId].name),1)]))),256))])):x("",!0)])]),popup:$(()=>[e("div",{class:"m-0 p-0",ref_key:"popupElem",ref:d},[Object.keys(_(t).properties).length>0?(s(),l("div",wo,[k(Re,{filter:o.manager.state.filter,manager:o.manager,parent:d.value},null,8,["filter","manager","parent"])])):x("",!0)],512)]),_:1},512))}});const So=j(xo,[["__scopeId","data-v-56cd3bdb"]]),Co=u=>(X("data-v-cc2f25ec"),u=u(),Z(),u),Mo={class:"d-flex flex-row filter-form"},Io={class:"pt-1 pb-1"},Vo=Co(()=>e("span",{class:"base-hover plus-btn text-secondary"},[e("i",{class:"bi bi-plus"})],-1)),Fo=D({__name:"FilterForm",props:{manager:Ce},setup(u){const h=u;return(t,o)=>(s(),l("div",Mo,[e("div",Io,b(t.$t("main.menu.filters"))+": ",1),k(So,{manager:h.manager},null,8,["manager"]),k(Ge,{manager:h.manager,group:h.manager.state.filter,class:"p-1"},{default:$(()=>[Vo]),_:1},8,["manager","group"])]))}});const zo=j(Fo,[["__scopeId","data-v-cc2f25ec"]]),To=u=>(X("data-v-012e1f38"),u=u(),Z(),u),Eo=To(()=>e("div",{class:"text-secondary p-1"},[e("span",{class:"base-hover plus-btn"},[e("i",{class:"bi bi-plus"})])],-1)),Oo={class:"p-1",style:{"max-height":"400px","overflow-y":"scroll"}},Po=D({__name:"PropertyDropdown",props:{groupIds:Array},emits:["select"],setup(u,{emit:h}){const t=u,o=h,d=I(null);return(c,r)=>(s(),S(oe,{ref_key:"dropdownElem",ref:d,"auto-focus":!1},{button:$(()=>[Eo]),popup:$(()=>[e("div",Oo,[k(De,{onClick:r[0]||(r[0]=g=>_(xe)()),onSelect:r[1]||(r[1]=g=>{o("select",g),d.value.hide()}),"ignore-ids":t.groupIds},null,8,["ignore-ids"])])]),_:1},512))}});const je=j(Po,[["__scopeId","data-v-012e1f38"]]),Do={class:"base-hover ps-1 pe-1"},Lo={class:"main"},Go=["onClick"],Ro=D({__name:"TimeUnitDropdown",props:{modelValue:{}},emits:["update:modelValue"],setup(u,{emit:h}){const t=u,o=h,d=Object.values(Le);function c(r){o("update:modelValue",r)}return(r,g)=>(s(),S(oe,null,{button:$(()=>[e("div",Do,b(t.modelValue),1)]),popup:$(({hide:m})=>[e("div",Lo,[(s(!0),l(T,null,N(_(d),i=>(s(),l("div",{class:"base-hover option",onClick:a=>{c(i),m()}},b(i),9,Go))),256))])]),_:1}))}});const jo=j(Ro,[["__scopeId","data-v-ce3e3774"]]),Ao=u=>(X("data-v-78b647dc"),u=u(),Z(),u),Uo=Ao(()=>e("i",{class:"bi bi-three-dots-vertical"},null,-1)),Ho={class:""},No={class:"d-flex ipt"},Bo={class:"ms-2",min:"1"},qo=D({__name:"GroupOptionDropdown",props:{option:{}},emits:["change"],setup(u,{emit:h}){const t=u,o=h,d=I(1),c=I(Le.Year);function r(){t.option.stepSize==d.value&&t.option.stepUnit==c.value||o("change",{stepSize:d.value,stepUnit:c.value})}function g(){d.value=t.option.stepSize??1,c.value=t.option.stepUnit}return Q(()=>t.option,g),ue(g),Q(d,()=>{(d.value<1||d.value==null||isNaN(d.value))&&(d.value=1)}),(m,i)=>(s(),S(oe,{onHide:r},{button:$(()=>[Uo]),popup:$(({hide:a,focus:n})=>[e("div",Ho,[e("div",No,[e("div",null,[pe(e("input",{type:"number","onUpdate:modelValue":i[0]||(i[0]=p=>d.value=p)},null,512),[[ge,d.value]])]),e("div",Bo,[k(jo,{modelValue:c.value,"onUpdate:modelValue":i[1]||(i[1]=p=>c.value=p),onHide:n},null,8,["modelValue","onHide"])])])])]),_:1}))}});const Qo=j(qo,[["__scopeId","data-v-78b647dc"]]),Ko={class:"d-flex flex-row group-form"},Wo={class:"pt-1 pb-1"},Yo={key:0,class:"bg-medium bg d-flex flex-row m-0 ms-1 p-0 align-items-center"},Xo={key:0,class:"bi bi-chevron-right smaller"},Zo=["onClick"],Jo=["onClick"],ea=["onClick"],ta=["onClick"],sa=["onClick"],oa=["onClick"],aa=["onClick"],na=["onClick"],la=["onClick"],ia={key:5,class:"sm-btn"},ra={key:0,class:"spinner-grow spinner-grow-sm loading ms-1"},da=D({__name:"GroupForm",props:{isLoading:Boolean,manager:ot},setup(u){const h=K(),t=u;function o(a){t.manager.setGroupOption(a),t.manager.update(!0)}function d(a){t.manager.delGroupOption(a),t.manager.update(!0)}function c(a,n){t.manager.setGroupOption(a,{direction:n}),t.manager.sortGroups(!0)}function r(a,n){t.manager.setGroupOption(a,{type:n}),t.manager.sortGroups(!0)}function g(a,n){t.manager.setGroupOption(a,n),t.manager.update(!0)}const m=V(()=>t.manager.state.groupBy.map(a=>h.properties[a])),i=V(()=>{const a=[];return t.manager.state.groupBy.forEach(n=>{a.push({option:t.manager.state.options[n],property:h.properties[n]})}),a});return(a,n)=>(s(),l("div",Ko,[e("div",Wo,b(a.$t("main.menu.groupby"))+": ",1),m.value.length?(s(),l("div",Yo,[(s(!0),l(T,null,N(i.value,(p,v)=>(s(),l(T,null,[v>0?(s(),l("i",Xo)):x("",!0),e("div",{class:"base-hover m-1 ps-1 pe-1",onClick:w=>d(p.property.id),id:"remove-group-button"},b(p.property.name),9,Zo),p.option.type==_(ie).Size?(s(),S(F,{key:1,message:"main.menu.sort.group_order_nb_tooltip"},{default:$(()=>[p.option.direction==_(se).Ascending?(s(),l("i",{key:0,class:"bi bi-sort-up-alt sm-btn",onClick:w=>r(p.property.id,_(ie).Property)},null,8,Jo)):(s(),l("i",{key:1,class:"bi bi-sort-down sm-btn",onClick:w=>r(p.property.id,_(ie).Property)},null,8,ea))]),_:2},1024)):(s(),S(F,{key:2,message:"main.menu.sort.group_order_az_tooltip"},{default:$(()=>[p.property.type==_(U).number?(s(),l(T,{key:0},[p.option.direction==_(se).Ascending?(s(),l("i",{key:0,class:"bi bi-sort-numeric-up sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,ta)):(s(),l("i",{key:1,class:"bi bi-sort-numeric-down-alt sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,sa))],64)):(s(),l(T,{key:1},[p.option.direction==_(se).Ascending?(s(),l("i",{key:0,class:"bi bi-sort-alpha-up sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,oa)):(s(),l("i",{key:1,class:"bi bi-sort-alpha-down-alt sm-btn",onClick:w=>r(p.property.id,_(ie).Size)},null,8,aa))],64))]),_:2},1024)),p.option.direction==_(se).Ascending?(s(),S(F,{key:3,message:"main.menu.sort.order_asc"},{default:$(()=>[e("i",{class:"bi bi-arrow-up sm-btn",onClick:w=>c(p.property.id,_(se).Descending)},null,8,na)]),_:2},1024)):(s(),S(F,{key:4,message:"main.menu.sort.order_desc"},{default:$(()=>[e("i",{class:"bi bi-arrow-down sm-btn",onClick:w=>c(p.property.id,_(se).Ascending)},null,8,la)]),_:2},1024)),p.property.type==_(U).date?(s(),l("div",ia,[k(Qo,{option:p.option,onChange:w=>g(p.property.id,w)},null,8,["option","onChange"])])):x("",!0)],64))),256)),t.isLoading?(s(),l("i",ra)):x("",!0)])):x("",!0),k(je,{id:"add-group-button","group-ids":t.manager.state.groupBy,onSelect:n[0]||(n[0]=p=>o(p))},null,8,["group-ids"])]))}});const ca=j(da,[["__scopeId","data-v-dcec9b5d"]]),ua={class:"d-flex flex-row sort-form"},pa={class:"pt-1 pb-1"},ma={key:0,class:"d-flex flex-row m-0 p-0 bg-medium bg ms-1 align-items-center"},_a={key:0,class:"bi bi-chevron-right smaller"},va=["onClick"],ha=["onClick"],ga=["onClick"],fa=D({__name:"SortForm",props:{manager:at},setup(u){const h=K(),t=u,o=V(()=>t.manager.state.sortBy.map(m=>({propertyId:m,direction:t.manager.state.options[m].direction}))),d=V(()=>o.value.map(m=>m.propertyId));function c(m){t.manager.setSort(m),t.manager.update(!0)}function r(m){t.manager.delSort(m),t.manager.update(!0)}function g(m,i){t.manager.setSort(m,{direction:i}),t.manager.update(!0)}return(m,i)=>(s(),l("div",ua,[e("div",pa,b(m.$t("main.menu.sort.title"))+": ",1),o.value.length?(s(),l("div",ma,[(s(!0),l(T,null,N(o.value,(a,n)=>(s(),l(T,null,[n>0?(s(),l("i",_a)):x("",!0),e("div",{class:"me-0 ms-1 ps-1 mt-1 mb-1 pe-1 base-hover",onClick:p=>r(a.propertyId)},b(_(h).properties[a.propertyId].name),9,va),a.direction==_(se).Ascending?(s(),S(F,{key:1,message:"main.menu.sort.order_asc"},{default:$(()=>[e("i",{class:"bi bi-arrow-up sm-btn",onClick:p=>g(a.propertyId,_(se).Descending)},null,8,ha)]),_:2},1024)):(s(),S(F,{key:2,message:"main.menu.sort.order_desc"},{default:$(()=>[e("i",{class:"bi bi-arrow-down sm-btn",onClick:p=>g(a.propertyId,_(se).Ascending)},null,8,ga)]),_:2},1024))],64))),256))])):x("",!0),k(je,{"group-ids":d.value,onSelect:i[0]||(i[0]=a=>c(a))},null,8,["group-ids"])]))}});const ya=j(fa,[["__scopeId","data-v-4e00ef99"]]),fe=u=>(X("data-v-a37327b6"),u=u(),Z(),u),ba=fe(()=>e("i",{class:"bi bi-clock-history me-1"},null,-1)),$a={class:"p-2"},ka={key:0,class:"border mb-1 p-1 text-center text-secondary",style:{"background-color":"#f7f7f7"}},wa={class:"border mb-1 p-1"},xa={class:"me"},Sa=fe(()=>e("span",{class:"sep ms-1 me-1"},null,-1)),Ca={key:0},Ma={key:1},Ia={class:"border mb-1 p-1",style:{"background-color":"#f7f7f7"}},Va={class:"d-flex center justify-content-center"},Fa={key:1,class:"bi bi-arrow-down text-secondary"},za=fe(()=>e("div",{style:{width:"30px"}},null,-1)),Ta={key:3,class:"bi bi-arrow-up text-secondary"},Ea={class:"border mb-1 p-1"},Oa={class:"me"},Pa=fe(()=>e("span",{class:"sep ms-1 me-1"},null,-1)),Da={key:0},La={key:1},Ga={key:1,class:"border mb-1 p-1 text-center text-secondary",style:{"background-color":"#f7f7f7"}},de=5,Ra=D({__name:"HistoryDropdown",emits:[],setup(u,{emit:h}){const t=K(),o=I(!1),d=V(()=>o.value?{backgroundColor:"blue"}:{backgroundColor:"white"}),c=V(()=>[...t.history.undo].reverse().slice(0,de)),r=V(()=>t.history.redo.slice(Math.max(t.history.redo.length-de,0)));return Q(()=>t.onUndo,()=>{console.log("changed"),o.value=!0,setTimeout(()=>o.value=!1,100)}),(g,m)=>c.value.length||r.value.length?(s(),S(oe,{key:0},{button:$(()=>[k(F,{message:"dropdown.history.info"},{default:$(()=>[e("div",{class:"d-flex sb flash",style:Y([{"font-size":"14px"},d.value])},[ba,e("div",null,b(g.$t("dropdown.history.button")),1)],4)]),_:1})]),popup:$(()=>[e("div",$a,[_(t).history.redo.length>de?(s(),l("div",ka," + "+b(_(t).history.redo.length-de),1)):x("",!0),(s(!0),l(T,null,N(r.value,i=>(s(),l("div",wa,[e("span",xa,b(new Date(i.timestamp).toLocaleTimeString("fr-Fr",{hour:"2-digit",minute:"2-digit"})),1),Sa,i.tags?(s(),l("span",Ca,b(i.tags)+" "+b(g.$t("dropdown.history.tags")),1)):x("",!0),i.values?(s(),l("span",Ma,b(i.values)+" "+b(g.$t("dropdown.history.values")),1)):x("",!0)]))),256)),e("div",Ia,[e("div",Va,[c.value.length?(s(),S(F,{key:0,message:"dropdown.history.undo"},{default:$(()=>[e("div",{class:"bi bi-arrow-down sb",onClick:m[0]||(m[0]=(...i)=>_(t).undo&&_(t).undo(...i))})]),_:1})):(s(),l("div",Fa)),za,r.value.length?(s(),S(F,{key:2,message:"dropdown.history.redo"},{default:$(()=>[e("div",{class:"bi bi-arrow-up sb",onClick:m[1]||(m[1]=(...i)=>_(t).redo&&_(t).redo(...i))})]),_:1})):(s(),l("div",Ta))])]),(s(!0),l(T,null,N(c.value,i=>(s(),l("div",Ea,[e("span",Oa,b(new Date(i.timestamp).toLocaleTimeString("fr-Fr",{hour:"2-digit",minute:"2-digit"})),1),Pa,i.tags?(s(),l("span",Da,b(i.tags)+" "+b(g.$t("dropdown.history.tags")),1)):x("",!0),i.values?(s(),l("span",La,b(i.values)+" "+b(g.$t("dropdown.history.values")),1)):x("",!0)]))),256)),_(t).history.undo.length>de?(s(),l("div",Ga," + "+b(_(t).history.undo.length-de),1)):x("",!0)])]),_:1})):x("",!0)}});const ja=j(Ra,[["__scopeId","data-v-a37327b6"]]),Ie=u=>(X("data-v-9411b625"),u=u(),Z(),u),Aa=Ie(()=>e("span",{class:"bi bi-arrow-repeat text-warning"},null,-1)),Ua=Ie(()=>e("span",{class:"bi bi-check2-all text-success"},null,-1)),Ha=Ie(()=>e("div",{style:{height:"30px"}},[e("span",{class:"bi bi-check2-all text-success small-valid"}),e("span",{class:"bi bi-arrow-repeat big-arrow text-warning",style:{opacity:"0.3"}})],-1)),Na=D({__name:"ToggleReload",emits:[],setup(u,{emit:h}){const t=re(),o=V(()=>t.getTab().autoReload?2:t.getTabManager().collection.state.isDirty?0:1);function d(){o.value==0?t.getTabManager().collection.update():o.value==1?(t.getTab().autoReload=!0,t.updateTabs()):(t.getTab().autoReload=!1,t.updateTabs())}return(c,r)=>(s(),l("div",{class:"bb font",onClick:d,style:{width:"26px",height:"30px",overflow:"hidde"}},[o.value==0?(s(),S(F,{key:0,message:"btn.reload.dirty",pos:"bottom"},{default:$(()=>[Aa]),_:1})):x("",!0),o.value==1?(s(),S(F,{key:1,message:"btn.reload.valid",pos:"bottom"},{default:$(()=>[Ua]),_:1})):x("",!0),o.value==2?(s(),S(F,{key:2,message:"btn.reload.auto",pos:"bottom"},{default:$(()=>[Ha]),_:1})):x("",!0)]))}});const Ba=j(Na,[["__scopeId","data-v-9411b625"]]),ye=u=>(X("data-v-3f54024a"),u=u(),Z(),u),qa={class:"d-flex flex-row p-2"},Qa=ye(()=>e("div",{class:"bi bi-search float-start bi-sm"},null,-1)),Ka=["placeholder"],Wa={class:"me-5 d-flex"},Ya=ye(()=>e("div",{class:"bi bi-aspect-ratio me-1"},null,-1)),Xa={class:"ms-5",style:{"font-size":"13px"}},Za=["checked"],Ja={class:"ms-1"},en={class:"ms-4"},tn=ye(()=>e("div",{class:"flex-grow-1"},null,-1)),sn=ye(()=>e("a",{href:"https://github.com/CERES-Sorbonne/Panoptic/issues/new/choose",target:"_blank",class:"bi bi-cone-striped",style:{color:"grey"}},null,-1)),on={class:"d-flex flex-wrap content-container ps-2"},an=D({__name:"ContentFilter",props:{tab:nt,computeStatus:Object},emits:["compute-ml","search-images","remove:selected"],setup(u,{emit:h}){const t=u,o=I(""),d=V(()=>Object.keys(t.tab.collection.groupManager.selectedImages.value).map(Number)),c=V(()=>d.value.length);function r(a){const n=a.target.checked;t.tab.collection.groupManager.setSha1Mode(n,!0)}function g(){o.value=t.tab.state.filterState.query}function m(){t.tab.collection.filterManager.setQuery(o.value),t.tab.collection.filterManager.update(!0)}function i(){t.tab.collection.filterManager.setQuery(""),t.tab.collection.filterManager.update(!0)}return ue(g),Q(()=>t.tab.collection.filterManager.state.query,g),(a,n)=>(s(),l(T,null,[e("div",qa,[k(F,{icon:!0,message:"main.menu.search_tooltip",iconPos:"left"},{default:$(()=>[e("div",{class:H(["d-flex flex-row search-input me-5",o.value?"border-primary":""])},[Qa,pe(e("input",{type:"text",class:"input-hidden",placeholder:a.$t("main.menu.search"),"onUpdate:modelValue":n[0]||(n[0]=p=>o.value=p),onChange:m},null,40,Ka),[[ge,o.value]]),e("div",{class:"bi-sm base-hover",style:{cursor:"pointer",padding:"0px 2px"},onClick:i},"x")],2)]),_:1}),e("div",Wa,[k(F,{message:"main.menu.grid_tooltip"},{default:$(()=>[e("i",{class:H("bi bi-grid-3x3-gap-fill me-2 btn-icon"+(t.tab.state.display=="tree"?"":" text-secondary")),onClick:n[1]||(n[1]=p=>t.tab.state.display="tree")},null,2)]),_:1}),k(F,{message:"main.menu.table_tooltip"},{default:$(()=>[e("i",{id:"toot",class:H("bi bi-table btn-icon me-2"+(t.tab.state.display=="grid"?"":" text-secondary")),onClick:n[2]||(n[2]=p=>t.tab.state.display="grid")},null,2)]),_:1}),k(F,{message:"main.menu.graph_tooltip"},{default:$(()=>[e("i",{id:"toot",class:H("bi bi-bar-chart btn-icon"+(t.tab.state.display=="graph"?"":" text-secondary")),onClick:n[3]||(n[3]=p=>t.tab.state.display="graph")},null,2)]),_:1})]),k(F,{message:"main.menu.image_size_tooltip",click:!1},{default:$(()=>[Ya]),_:1}),e("div",null,[k(lt,{min:30,max:500,modelValue:t.tab.state.imageSize,"onUpdate:modelValue":n[4]||(n[4]=p=>t.tab.state.imageSize=p)},null,8,["modelValue"])]),e("div",Xa,[k(F,{message:"main.menu.image_mode_tooltip"},{default:$(()=>[e("input",{type:"checkbox",checked:t.tab.collection.groupManager.state.sha1Mode,onChange:r},null,40,Za),e("span",Ja,b(a.$t("main.menu.image_mode")),1)]),_:1})]),e("div",en,[k(ja)]),c.value?(s(),S(it,{key:0,id:"selection-stamp",class:"ms-5","selected-images-ids":d.value,"onRemove:selected":n[5]||(n[5]=p=>t.tab.collection.groupManager.clearSelection())},null,8,["selected-images-ids"])):x("",!0),tn,k(F,{message:"main.menu.issue",class:"bb"},{default:$(()=>[sn]),_:1})]),e("div",on,[k(Ba,{class:"me-1"}),k(zo,{manager:t.tab.collection.filterManager},null,8,["manager"]),k(ca,{"is-loading":t.computeStatus.groups,manager:t.tab.collection.groupManager},null,8,["is-loading","manager"]),k(ya,{manager:t.tab.collection.sortManager},null,8,["manager"])])],64))}});const nn=j(an,[["__scopeId","data-v-3f54024a"]]),ln={class:""},rn={class:"d-flex flex-row"},dn=D({__name:"ImageRecomended",props:{pile:Object,size:{type:Number,default:100}},emits:["accept","refuse"],setup(u,{emit:h}){const t=he(),o=u,d=h,c=V(()=>`width: ${o.size}px; height: ${o.size}px;`);V(()=>`max-width: ${o.size-2}px; max-height: ${o.size-1}px;`);const r=V(()=>o.pile.images[0]);return(g,m)=>(s(),l("div",ln,[k(dt,{image:r.value},{default:$(()=>[e("div",{style:Y(c.value),class:"img-container",onClick:m[0]||(m[0]=i=>_(t).showModal(_(ne).IMAGE,{image:r.value}))},[k(rt,{image:r.value,width:o.size-2,height:o.size-1},null,8,["image","width","height"])],4)]),_:1},8,["image"]),e("div",rn,[k(F,{message:"main.recommand.accept"},{default:$(()=>[e("div",{style:Y(["width: "+o.size/2+"px;",{"font-size":"10px"}]),class:"text-center text-success validate clickable unselectable",onClick:m[1]||(m[1]=i=>d("accept",r.value))}," ✓ ",4)]),_:1}),k(F,{message:"main.recommand.refuse"},{default:$(()=>[e("div",{style:Y(["width: "+o.size/2+"px;",{"font-size":"10px"}]),class:"text-center text-danger refuse clickable unselectable",onClick:m[2]||(m[2]=i=>d("refuse",r.value))}," ✕ ",4)]),_:1})])]))}});const cn=j(dn,[["__scopeId","data-v-2ff8fded"]]),me=u=>(X("data-v-9744de99"),u=u(),Z(),u),un={class:"reco-container"},pn={class:"d-flex flex-row m-0 ps-2 center mb-1 mt-0",style:{height:"25px"}},mn=me(()=>e("span",{class:"bi bi-x-lg bb",style:{}},null,-1)),_n=[mn],vn=me(()=>e("div",{class:"b-left pe-1"},null,-1)),hn=me(()=>e("span",{class:"bi bi-arrow-down-circle bb"},null,-1)),gn=[hn],fn=me(()=>e("div",{class:"b-left pe-1"},null,-1)),yn={key:0,class:"bi bi-funnel-fill bb text-primary"},bn={key:1,class:"bi bi-funnel bb"},$n=me(()=>e("div",{class:"b-left pe-1"},null,-1)),kn={class:"text-secondary me-2"},wn={class:"flex-grow-1"},xn={class:"d-flex flex-row"},Sn={key:0,class:"separator"},Cn={class:"d-flex flex-row"},$e=10,Mn=D({__name:"RecommendedMenu",props:{imageSize:{},group:{},width:{},height:{}},emits:["scroll","close","update"],setup(u,{emit:h}){const t=re(),o=K(),d=ct(),c=u,r=h,g=I(1),m=ce([]),i=ce([]),a=ce([]),n=ce(new Set),p=I(!0);function v(M){let C=i.indexOf(M);C<0||(i.splice(C,1),y())}async function w(M){const C=[],O=[];a.forEach(A=>{if(A.value!=null){const W=o.properties[A.propertyId];let R=A.value;W.type==U.multi_tags?(R=M.properties[A.propertyId]??[],R=[...R,A.value]):W.type==U.tag&&(R=[R]),W.mode==we.id?O.push({instanceId:M.id,propertyId:W.id,value:R}):C.push({propertyId:W.id,sha1:M.sha1,value:R})}}),await o.setPropertyValues(O,C),v(M.sha1)}function f(M){n.add(M.sha1),v(M.sha1)}function y(){m.length=0;const M=i.map(C=>({sha1:C,images:o.sha1Index[C]}));E(M,m,g.value,c.imageSize,c.width)}function E(M,C,O,A,W){let R=W,L=[],z=0;for(let P=0;P=O);P++){let q=M[P];if(n.has(q.sha1))continue;let _e=A+$e;if(z+_e0&&C.lengthL.id);let C=await d.getSimilarImages({instanceIds:M});if(console.log(C),!C.instances)throw new Error("No instances in ActionResult");let O=[];const A=C.instances.scores??[];if(C.instances.ids)for(let L in C.instances.ids){const z={id:C.instances.ids[L],score:A[L]};O.push(z)}else for(let L in C.instances.sha1s){const z=C.instances.sha1s[L];for(let P of o.sha1Index[z]){const q={id:P.id,score:A[L]};O.push(q)}}if(O.sort((L,z)=>z.score-L.score),p.value){const L=t.getTabManager(),z=new Set(L.collection.groupManager.result.root.images.map(P=>P.id));O=O.filter(P=>z.has(P.id))}const W=Array.from(new Set(O.map(L=>o.instances[L.id].sha1)));a.length=0;let R=c.group;for(;R;)a.push(...R.meta.propertyValues),R=R.parent;i.length=0,i.push(...W),n.clear(),y(),r("update")}function ae(){p.value=!p.value}return ue(B),Q(()=>c.group,()=>{B(),n.clear()}),Q(()=>c.imageSize,y),Q(()=>c.width,y),Q(p,B),(M,C)=>(s(),l("div",un,[e("div",pn,[e("div",{class:"text-secondary pe-1",onClick:C[0]||(C[0]=O=>r("close"))},_n),vn,e("div",{class:"text-secondary pe-1",onClick:C[1]||(C[1]=O=>r("scroll",c.group.id))},gn),fn,e("div",{class:"text-secondary pe-1",onClick:ae},[p.value?(s(),l("span",yn)):(s(),l("span",bn))]),$n,k(F,{"icon-pos":"left",message:"main.recommand.tooltip",icon:!0},{default:$(()=>[e("span",kn,b(M.$t("main.recommand.title")),1)]),_:1}),e("div",wn,[e("div",xn,[(s(!0),l(T,null,N(a,(O,A)=>(s(),l(T,null,[k(ut,{class:"",value:O},null,8,["value"]),A(s(),l("div",null,[e("div",Cn,[(s(!0),l(T,null,N(O,A=>(s(),S(cn,{pile:A,size:c.imageSize,onAccept:w,onRefuse:f,style:Y("margin-right:"+$e+"px;")},null,8,["pile","size","style"]))),256))])]))),256))],4)]))}});const In=j(Mn,[["__scopeId","data-v-9744de99"]]);const Vn={style:{display:"flex"}},Fn={class:"info"},zn=e("img",{id:"zoomed-image",style:{display:"none",position:"absolute","z-index":"1000",width:"120px",height:"120px","pointer-events":"none"}},null,-1),Tn={__name:"LineChart",props:{chartData:{series:Array,xValues:Array,dataType:U},height:String},setup(u){const h=u,t=I(0),o=I(!1),d={};Object.keys(h.chartData.series).forEach(n=>{d[n]=!1});const c=I({markers:{size:7},legend:{showForSingleSeries:!0,onItemClick:{toggleDataSeries:!1}},xaxis:{type:h.chartData.dataType===U.date?"datetime":"numeric",categories:h.chartData.xValues},chart:{type:"area",stacked:!1,stackOnlyBar:!1,zoom:{type:"x",autoScaleYaxis:!0},animations:{animateGradually:{enabled:!1,delay:150}}},dataLabels:{enabled:!1},stroke:{curve:"straight"},tooltip:{intersect:!0,shared:!1,custom:function({series:n,seriesIndex:p,dataPointIndex:v,w}){const f=h.chartData.series[p].data[v];let y='
';f.images.forEach((B,ae)=>{ae<10&&(y+=`
`)}),y+="
";let E=`${h.chartData.series[p].name} — ${f.y} Images`;return E+=`
${y}
`,E}}}),r=()=>{c.value.chart.stacked=!c.value.chart.stacked,o.value=!o.value,t.value+=1},g=()=>{let n;c.value.chart.type==="area"?n={chart:{...c.value.chart,type:"bar"}}:n={chart:{...c.value.chart,type:"area"}},c.value={...c.value,...n},t.value+=1},m=(n,p,v)=>{const f=h.chartData.series[p];let y=Math.max(...f.data.map(E=>E.y));if(document.querySelectorAll(".apexcharts-custom-image").forEach(E=>E.remove()),d[p]){d[p]=!1;return}f.data.forEach((E,B)=>{const M=Math.floor(E.y/y*17),C=E.images.slice(0,M),O=`circle[index="${p}"][j="${B}"]`,A=document.querySelector(O),W=parseFloat(A.getAttribute("cx"));C.forEach((R,L)=>{const z=document.createElement("img");z.src=R,z.width=40,z.height=40,z.style.position="absolute";let P=W+40/1.5,q=65+L*40;z.style.left=`${P}px`,z.style.bottom=`${q}px`,z.classList.add("apexcharts-custom-image"),z.addEventListener("mouseover",_e=>i(P,q,R)),z.addEventListener("mouseout",a),n.el.appendChild(z)})}),Object.keys(d).forEach(E=>d[E]=!1),d[p]=!0};function i(n,p,v){const w=document.getElementById("zoomed-image");w.style.left=`${n+120*1.5}px`,w.src=v,w.style.bottom=`${p}px`,w.style.display="block"}function a(){const n=document.getElementById("zoomed-image");n.style.display="none"}return console.log("test"),(n,p)=>{const v=Pe("apexchart");return s(),l(T,null,[e("div",Vn,[e("button",{class:"mt-2",onClick:g},b(c.value.chart.type==="area"?n.$t("main.graph-view.histo"):n.$t("main.graph-view.curve")),1),h.chartData.series.length>1?(s(),l("button",{key:0,class:"mt-2",style:{"margin-left":"1em"},onClick:r},b(o.value?n.$t("main.graph-view.over"):n.$t("main.graph-view.stack")),1)):x("",!0)]),(s(),S(v,{style:{position:"relative"},key:t.value,height:h.height,type:c.value.chart.type,options:c.value,series:h.chartData.series,onLegendClick:m},null,8,["height","type","options","series"])),e("i",Fn,b(n.$t("main.graph-view.info")),1),zn],64)}}},En={key:1},On=D({__name:"GraphView",props:{collection:{},height:{}},emits:[],setup(u,{emit:h}){const t=K(),o=u,d=I(""),c=I(g());function r(){const m=new Set;let i=o.collection.groupManager.getGroupIterator();for(;i;){const a=i.group;if(a.id===0||a.meta.propertyValues&&a.meta.propertyValues[0].value==null){i=i.nextGroup();continue}for(let n of a.children)m.add(n.meta.propertyValues[0].value);a.children.forEach(()=>i=i.nextGroup()),i=i.nextGroup()}return m}function g(){const m={};let i,a=o.collection.groupManager.state.groupBy;if(a.length===0){d.value="Choose at least one date or numeric value to group the images by";return}const n=t.properties[a[0]],p=n.type;if(a.length>2){d.value="Only max two levels of grouping are supported";return}else if(a.length===1)m[n.name]={name:n.name,data:[]};else if(i=Array.from(r()),i.length>20){d.value="Too many curves to draw, select a subgrouping with less than 20 possible values";return}if(p!==U.number&&p!==U.date){d.value="First level of grouping needs to be a date or a numeric property";return}let v=o.collection.groupManager.getGroupIterator();const w=[];for(;v;){const f=v.group;if(f.id===0||f.meta.propertyValues&&f.meta.propertyValues[0].value==null){v=v.nextGroup();continue}let y=f.meta.propertyValues[0];const E=p===U.date?new Date(y.value).getTime():y.value;if(w.push(E),n.name in m)m[n.name].data.push({x:E,y:f.images.length,images:f.images.slice(0,20).map(B=>B.urlSmall)});else{const B=f.children.map(M=>M.meta.propertyValues[0].value),ae=i.filter(M=>!B.includes(M));for(let M of f.children){const C=M.meta.propertyValues[0].value;if(m[C]===void 0){let O=C;C in t.tags&&(O=t.tags[C].value),m[C]={data:[],name:O}}m[M.meta.propertyValues[0].value].data.push({x:E,y:M.images.length,images:M.images.slice(0,20).map(O=>O.urlSmall)})}for(let M of ae){if(m[M]===void 0){let C=M;M in t.tags&&(C=t.tags[M].value),m[M]={data:[],name:C}}m[M].data.push({x:E,y:0,images:[]})}f.children.forEach(()=>v=v.nextGroup())}v=v.nextGroup()}return d.value="",{series:Object.values(m),xValues:w,dataType:p}}return o.collection.groupManager.onChange.addListener(()=>c.value=g()),(m,i)=>(s(),l("div",{class:"",style:Y({height:o.height+"px"})},[d.value===""?(s(),S(Tn,{key:0,chartData:c.value,height:o.height-50+"px"},null,8,["chartData","height"])):(s(),l("span",En,b(d.value),1))],4))}}),Pn={key:0,class:"m-0 p-0"},Dn={key:0,style:{"margin-left":"10px"}},Ln=D({__name:"MainView",props:{tabId:Number,height:Number},setup(u){const h=re(),t=h.getTabManager(),o=u,d=I({}),c=I(!0),r=I(null),g=I(null),m=I(null),i=I(0),a=I(0),n=ce({groups:!1}),p=V(()=>t.getVisibleProperties());function v(){r.value&&g.value?i.value=o.height-r.value.clientHeight-g.value.clientHeight-5:r.value?i.value=o.height-r.value.clientHeight-5:i.value=0}t.collection.groupManager.onChange.addListener(()=>{m.value&&t.state.display=="tree"&&m.value.computeLines()});function w(y){d.value=t.collection.groupManager.result.index[y],ee(()=>v())}function f(){d.value={},ee(()=>v())}return ue(()=>{a.value=r.value.clientWidth,window.addEventListener("resize",()=>{ee(()=>{var y;a.value=((y=r.value)==null?void 0:y.clientWidth)??a.value})})}),Q(()=>t.state.imageSize,()=>ee(v)),Q(()=>o.height,async()=>{await ee(v)}),Q(t.state,y=>{h.updateTabs()},{deep:!0}),Q(()=>o.tabId,async()=>{c.value=!1,await ee(),c.value=!0}),(y,E)=>(s(),l(T,null,[e("div",{id:"main-content",ref_key:"filterElem",ref:r},[k(nn,{tab:_(t),"compute-status":n},null,8,["tab","compute-status"])],512),e("div",{ref_key:"boxElem",ref:g,class:"m-0 p-0"},[d.value.id?(s(),l("div",Pn,[k(In,{group:d.value,"image-size":_(t).state.imageSize,width:a.value,height:50,onClose:f,onScroll:m.value.scrollTo,onUpdate:E[0]||(E[0]=B=>ee(()=>v()))},null,8,["group","image-size","width","onScroll"])])):x("",!0)],512),a.value>0&&i.value>0&&c.value?(s(),l("div",Dn,[_(t).state.display=="tree"?(s(),S(pt,{key:0,"group-manager":_(t).collection.groupManager,"image-size":_(t).state.imageSize,height:i.value-0,properties:p.value,"hide-if-modal":!0,"selected-images":_(t).collection.groupManager.selectedImages,ref_key:"imageList",ref:m,width:a.value-25,onRecommend:w},null,8,["group-manager","image-size","height","properties","selected-images","width"])):x("",!0),_(t).state.display=="grid"?(s(),l("div",{key:1,style:Y({width:a.value-12+"px"}),class:"p-0 m-0 grid-container"},[k(mt,{manager:_(t).collection.groupManager,height:i.value-15,width:a.value-40,"selected-properties":p.value,class:"p-0 m-0","show-images":!0,"selected-images":_(t).collection.groupManager.selectedImages,ref_key:"imageList",ref:m,"hide-if-modal":!0},null,8,["manager","height","width","selected-properties","selected-images"])],4)):x("",!0),_(t).state.display=="graph"?(s(),S(On,{key:2,collection:_(t).collection,height:i.value-15},null,8,["collection","height"])):x("",!0)])):x("",!0)],64))}});const Gn=j(Ln,[["__scopeId","data-v-8d18a136"]]),Rn={class:"d-flex d-row",style:{cursor:"pointer"}},jn=["onMouseenter","onMouseleave"],An=["onClick"],Un=["onClick"],Hn=["onClick"],Nn=["onSubmit"],Bn=["onKeydown","onUpdate:modelValue"],qn=e("span",{class:"bi bi-plus"},null,-1),Qn=[qn],Kn={class:"lang"},Wn=e("i",{class:"bi bi-translate",style:{"margin-right":"0.5rem"}},null,-1),Yn=["value"],Xn=D({__name:"TabNav",props:{reRender:Function},setup(u){const h=re(),t=I(-1),o=I(""),d=I(null),c=u;function r(v){h.data.selectedTabId==v||m(),h.selectTab(v)}function g(v){t.value=v,o.value=h.data.tabs[v].name,ee(()=>d.value[0].focus())}function m(){t.value=-1,o.value=""}function i(v){h.addTab("New Tab")}async function a(v){confirm("Are you sure to delete Tab: "+v.name)&&await h.removeTab(v.id)}const n=ce({});I(-1);const p=["fr","en"];return(v,w)=>(s(),l("nav",null,[e("div",Rn,[(s(!0),l(T,null,N(_(h).data.tabs,f=>(s(),l("div",{class:"d-flex d-row me-2",onMouseenter:y=>n[f.id]=!0,onMouseleave:y=>n[f.id]=!1},[t.value!=f.id?(s(),l(T,{key:0},[k(F,{message:"main.menu.rename_tab_tooltip"},{default:$(()=>[e("i",{onClick:y=>g(f.id),class:H(["bi bi-pencil me-1 tab-icon hover-light",n[f.id]&&_(h).data.selectedTabId==f.id?"":"hidden"]),style:{"font-size":"10px"}},null,10,An)]),_:2},1024),e("div",{class:H(["tab-button",f.id==_(h).data.selectedTabId?" active":""]),onClick:y=>r(f.id)},[e("span",null,b(f.name),1)],10,Un),k(F,{message:"main.menu.delete_tab_tooltip"},{default:$(()=>[e("i",{onClick:y=>a(f),class:H(["btn-icon bi bi-x tab-icon hover-light",n[f.id]?"":"hidden"]),style:{"font-size":"15px"}},null,10,Hn)]),_:2},1024)],64)):(s(),l("div",{key:1,class:H(["tab-button",f.id==_(h).data.selectedTabId?" active":""])},[e("form",{onSubmit:Oe(m,["stop","prevent"])},[pe(e("input",{onFocusout:m,onKeydown:_t(m,["escape"]),type:"text",class:"text-input","onUpdate:modelValue":y=>f.name=y,ref_for:!0,ref_key:"inputElem",ref:d},null,40,Bn),[[ge,f.name]])],40,Nn)],2))],40,jn))),256)),k(F,{message:"main.menu.add_tab_tooltip"},{default:$(()=>[e("button",{class:"tab-icon hover-light ps-1 pe-1",onClick:i,id:"add-tab-button"},Qn)]),_:1}),e("div",Kn,[Wn,pe(e("select",{"onUpdate:modelValue":w[0]||(w[0]=f=>v.$i18n.locale=f),onChange:w[1]||(w[1]=f=>c.reRender())},[(s(),l(T,null,N(p,(f,y)=>e("option",{key:`Lang${y}`,value:f},b(f.toUpperCase()),9,Yn)),64))],544),[[vt,v.$i18n.locale]])])])]))}});const Ae=u=>(X("data-v-ef872353"),u=u(),Z(),u),Zn={key:0},Jn={class:"d-flex flex-row m-0 p-0 overflow-hidden"},el={class:"w-100"},tl={key:0,class:"custom-hr"},sl={key:1,class:"loading"},ol={class:"text-center"},al={key:2,class:"loading"},nl=Ae(()=>e("i",{class:"spinner-border",role:"status"},null,-1)),ll=Ae(()=>e("span",{class:"ms-1"},"Loading...",-1)),il=[nl,ll],rl=D({__name:"PanopticView",setup(u){const h=re(),t=K(),o=he(),d=I(null),c=I(null),r=I(window.innerHeight),g=I(!1),m=I(!0),i=V(()=>{var y;return r.value-(((y=c.value)==null?void 0:y.clientHeight)??0)}),a=V(()=>{var y;return(y=d.value)==null?void 0:y.filteredImages.map(E=>E.id)});let n=navigator.userAgent.indexOf("Mac OS X")!==-1;async function p(){m.value=!1,await ee(),m.value=!0}ue(async()=>{o.isProjectLoaded||ze.push("/"),ee(()=>{window.addEventListener("resize",v),v()}),window.addEventListener("keydown",y=>{y.key=="Control"&&(G.ctrl=!0),y.key=="Alt"&&(n&&(G.ctrl=!0),G.alt=!0),y.key=="Shift"&&(G.shift=!0),y.key=="ArrowLeft"&&(G.left=!0),y.key=="ArrowRight"&&(G.right=!0,console.log("keeeyy")),y.key=="Z"&&G.ctrl&&t.redo(),y.key=="z"&&G.ctrl&&t.undo()}),window.addEventListener("keyup",y=>{y.key=="Control"&&(G.ctrl=!1),y.key=="Alt"&&(n&&(G.ctrl=!1),G.alt=!1),y.key=="Shift"&&(G.shift=!1),y.key=="ArrowLeft"&&(G.left=!1),y.key=="ArrowRight"&&(G.right=!1)}),window.addEventListener("mousemove",y=>{G.ctrl=y.ctrlKey,G.alt=y.altKey,G.shift=y.shiftKey,n&&(G.ctrl=G.ctrl||G.alt)})}),ht(()=>{window.removeEventListener("resize",v)});function v(){r.value=window.innerHeight,g.value=!0}function w(){o.showModal(ne.EXPORT,a)}function f(){ze.push("/")}return(y,E)=>m.value?(s(),l("div",Zn,[d.value&&!d.value.imageList?(s(),S(gt,{key:0,tutorial:"project"})):x("",!0),(s(),l("div",{id:"panoptic",key:_(h).status.renderNb},[e("div",Jn,[_(h).status.loaded?(s(),l(T,{key:0},[e("div",null,[k(Gs,{onExport:E[0]||(E[0]=B=>w())})]),e("div",el,[e("div",{class:"ms-3",ref_key:"navElem",ref:c},[k(Xn,{"re-render":p})],512),g.value?(s(),l("div",tl)):x("",!0),k(Gn,{"tab-id":_(h).data.selectedTabId,height:i.value,ref_key:"mainViewRef",ref:d},null,8,["tab-id","height"])])],64)):_(o).isProjectLoaded?(s(),l("div",al,il)):(s(),l("div",sl,[e("div",ol,[e("div",null,b(y.$t("main.status.no_project")),1),e("div",{class:"bi bi-house p-3",onClick:f,style:{"font-size":"50px",cursor:"pointer"}})])]))])]))])):x("",!0)}});const ul=j(rl,[["__scopeId","data-v-ef872353"]]);export{ul as default}; diff --git a/panoptic_back/panoptic/html/assets/TestView-8bc8a48d.js b/panoptic_back/panoptic/html/assets/TestView-d606e433.js similarity index 98% rename from panoptic_back/panoptic/html/assets/TestView-8bc8a48d.js rename to panoptic_back/panoptic/html/assets/TestView-d606e433.js index d2a21fc2..6edaa09c 100644 --- a/panoptic_back/panoptic/html/assets/TestView-8bc8a48d.js +++ b/panoptic_back/panoptic/html/assets/TestView-d606e433.js @@ -1,3 +1,3 @@ -import{d as I,r,c as V,s as D,z as g,D as U,o as h,b as e,a as x,x as L,q as n,T as A,F as E,i as C,n as P,A as S,_ as B,B as N,l as $,C as l,e as b,E as z,G as R,H as F,I as k,J as H,U as K,N as O,K as W,L as j,R as q,t as G,O as J,Q as M,S as Q,p as Z,f as X}from"./index-c17cfbdf.js";const Y={key:0,class:"text-secondary"},ee={class:"p-1",style:{"max-width":"250px"}},te=I({__name:"TagInputDropdown",props:{property:Object,modelValue:Array,excluded:Array,canCreate:Boolean,canCustomize:Boolean,canLink:Boolean,canDelete:Boolean,autoFocus:Boolean,noWrap:Boolean,teleport:Boolean},emits:["update:modelValue","hide"],setup(i,{expose:c,emit:m}){const d=i,p=m;c({getHeight:w});const _=r(null),v=r(null),u=V(()=>d.modelValue??[]),y=V(()=>u.value.map(f=>d.property.tags[f]));function w(){return _.value==null?0:_.value.clientHeight}return(f,t)=>(h(),D(U,{"auto-focus":!1,onHide:t[1]||(t[1]=s=>p("hide")),teleport:d.teleport},{button:g(()=>[e("div",{class:P(["btn-class",d.noWrap?"text-nowrap":"text-wrap"]),ref_key:"heightElem",ref:_},[(h(!0),x(E,null,L(y.value,s=>(h(),x("span",null,[n(A,{id:s.id,class:"me-1"},null,8,["id"])]))),256)),y.value.length==0?(h(),x("span",Y,"None")):C("",!0)],2)]),popup:g(()=>[e("div",ee,[n(S,{property:d.property,"model-value":u.value,excluded:d.excluded,"can-create":d.canCreate,"can-customize":d.canCustomize,"can-link":d.canLink,"can-delete":d.canDelete,"auto-focus":d.autoFocus,"onUpdate:modelValue":t[0]||(t[0]=s=>p("update:modelValue",s)),ref_key:"inputElem",ref:v},null,8,["property","model-value","excluded","can-create","can-customize","can-link","can-delete","auto-focus"])])]),_:1},8,["teleport"]))}});const se=B(te,[["__scopeId","data-v-b59274db"]]),a=i=>(Z("data-v-039e5b52"),i=i(),X(),i),oe={key:0,class:"d-flex flex-wrap p-2"},ae={class:"item border rounded"},le=a(()=>e("h5",{class:"text-secondary"},"Date",-1)),ne=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),de={class:"mb-1"},re=a(()=>e("span",{class:"text-secondary"},"Input",-1)),ue={class:"item border rounded"},ie=a(()=>e("h5",{class:"text-secondary"},"Text",-1)),ce=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),pe={class:"mb-1"},_e=a(()=>e("span",{class:"text-secondary"},"Input",-1)),me={class:"item border rounded"},ve=a(()=>e("h5",{class:"text-secondary"},"BDInput Row Text",-1)),ye={class:"item border rounded"},he=a(()=>e("h5",{class:"text-secondary"},"Url",-1)),fe=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),xe={class:"mb-1"},Ve=a(()=>e("span",{class:"text-secondary"},"Input",-1)),we={class:"item border rounded"},be=a(()=>e("h5",{class:"text-secondary"},"Number",-1)),ge=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),ke={class:"mb-1"},Ie=a(()=>e("span",{class:"text-secondary"},"Input",-1)),Ce={class:"item border rounded"},Be=a(()=>e("h5",{class:"text-secondary"},"CellColorInput",-1)),Te={class:"item border rounded"},De=a(()=>e("h5",{class:"text-secondary"},"RowDateInput",-1)),Ue={class:"item border rounded"},Le=a(()=>e("h5",{class:"text-secondary"},"Checkbox",-1)),Ae=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),Ee={class:"mb-1"},Pe=a(()=>e("span",{class:"text-secondary"},"Input",-1)),Se={class:"item border rounded"},Ne=a(()=>e("h5",{class:"text-secondary"},"Tags",-1)),$e=I({__name:"TestView",setup(i){const c=N(),m=r(`Lorem Ipsum is simply dummy text +import{d as I,r,c as V,s as D,z as g,D as U,o as h,b as e,a as x,x as L,q as n,T as A,F as E,i as C,n as P,A as S,_ as B,B as N,l as $,C as l,e as b,E as z,G as R,H as F,I as k,J as H,U as K,N as O,K as W,L as j,R as q,t as G,O as J,Q as M,S as Q,p as Z,f as X}from"./index-9c28c371.js";const Y={key:0,class:"text-secondary"},ee={class:"p-1",style:{"max-width":"250px"}},te=I({__name:"TagInputDropdown",props:{property:Object,modelValue:Array,excluded:Array,canCreate:Boolean,canCustomize:Boolean,canLink:Boolean,canDelete:Boolean,autoFocus:Boolean,noWrap:Boolean,teleport:Boolean},emits:["update:modelValue","hide"],setup(i,{expose:c,emit:m}){const d=i,p=m;c({getHeight:w});const _=r(null),v=r(null),u=V(()=>d.modelValue??[]),y=V(()=>u.value.map(f=>d.property.tags[f]));function w(){return _.value==null?0:_.value.clientHeight}return(f,t)=>(h(),D(U,{"auto-focus":!1,onHide:t[1]||(t[1]=s=>p("hide")),teleport:d.teleport},{button:g(()=>[e("div",{class:P(["btn-class",d.noWrap?"text-nowrap":"text-wrap"]),ref_key:"heightElem",ref:_},[(h(!0),x(E,null,L(y.value,s=>(h(),x("span",null,[n(A,{id:s.id,class:"me-1"},null,8,["id"])]))),256)),y.value.length==0?(h(),x("span",Y,"None")):C("",!0)],2)]),popup:g(()=>[e("div",ee,[n(S,{property:d.property,"model-value":u.value,excluded:d.excluded,"can-create":d.canCreate,"can-customize":d.canCustomize,"can-link":d.canLink,"can-delete":d.canDelete,"auto-focus":d.autoFocus,"onUpdate:modelValue":t[0]||(t[0]=s=>p("update:modelValue",s)),ref_key:"inputElem",ref:v},null,8,["property","model-value","excluded","can-create","can-customize","can-link","can-delete","auto-focus"])])]),_:1},8,["teleport"]))}});const se=B(te,[["__scopeId","data-v-b59274db"]]),a=i=>(Z("data-v-039e5b52"),i=i(),X(),i),oe={key:0,class:"d-flex flex-wrap p-2"},ae={class:"item border rounded"},le=a(()=>e("h5",{class:"text-secondary"},"Date",-1)),ne=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),de={class:"mb-1"},re=a(()=>e("span",{class:"text-secondary"},"Input",-1)),ue={class:"item border rounded"},ie=a(()=>e("h5",{class:"text-secondary"},"Text",-1)),ce=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),pe={class:"mb-1"},_e=a(()=>e("span",{class:"text-secondary"},"Input",-1)),me={class:"item border rounded"},ve=a(()=>e("h5",{class:"text-secondary"},"BDInput Row Text",-1)),ye={class:"item border rounded"},he=a(()=>e("h5",{class:"text-secondary"},"Url",-1)),fe=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),xe={class:"mb-1"},Ve=a(()=>e("span",{class:"text-secondary"},"Input",-1)),we={class:"item border rounded"},be=a(()=>e("h5",{class:"text-secondary"},"Number",-1)),ge=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),ke={class:"mb-1"},Ie=a(()=>e("span",{class:"text-secondary"},"Input",-1)),Ce={class:"item border rounded"},Be=a(()=>e("h5",{class:"text-secondary"},"CellColorInput",-1)),Te={class:"item border rounded"},De=a(()=>e("h5",{class:"text-secondary"},"RowDateInput",-1)),Ue={class:"item border rounded"},Le=a(()=>e("h5",{class:"text-secondary"},"Checkbox",-1)),Ae=a(()=>e("span",{class:"text-secondary"},"Preview",-1)),Ee={class:"mb-1"},Pe=a(()=>e("span",{class:"text-secondary"},"Input",-1)),Se={class:"item border rounded"},Ne=a(()=>e("h5",{class:"text-secondary"},"Tags",-1)),$e=I({__name:"TestView",setup(i){const c=N(),m=r(`Lorem Ipsum is simply dummy text of the printing and typesetting industry.`),d=r("google.com"),p=r(12.3),_=r(0),v=r(!0),u=r("2024-04-04T23:26:00Z"),y=r([]),w=V(()=>c.instances[1]),f=V(()=>c.properties[3]);return $(()=>{window.addEventListener("keydown",t=>{t.key=="Control"&&(l.ctrl=!0),t.key=="Alt"&&(l.ctrl=!0,l.alt=!0),t.key=="Shift"&&(l.shift=!0),t.key=="ArrowLeft"&&(l.left=!0),t.key=="ArrowRight"&&(l.right=!0,console.log("keeeyy"))}),window.addEventListener("keyup",t=>{t.key=="Control"&&(l.ctrl=!1),t.key=="Alt"&&(l.ctrl=!1,l.alt=!1),t.key=="Shift"&&(l.shift=!1),t.key=="ArrowLeft"&&(l.left=!1),t.key=="ArrowRight"&&(l.right=!1)}),window.addEventListener("mousemove",t=>{l.ctrl=t.ctrlKey,l.alt=t.altKey,l.shift=t.shiftKey,l.ctrl=l.ctrl||l.alt})}),(t,s)=>b(c).propertyList.length?(h(),x("div",oe,[e("div",ae,[le,ne,e("div",de,[n(z,{date:u.value},null,8,["date"])]),re,e("div",null,[n(R,{modelValue:u.value,"onUpdate:modelValue":s[0]||(s[0]=o=>u.value=o)},null,8,["modelValue"])])]),e("div",ue,[ie,ce,e("div",pe,[n(F,{text:m.value},null,8,["text"])]),_e,e("div",null,[n(k,{modelValue:m.value,"onUpdate:modelValue":s[1]||(s[1]=o=>m.value=o)},null,8,["modelValue"])])]),e("div",me,[ve,n(H,{instance:w.value,"property-id":f.value.id},{default:g(({set:o,value:T})=>[n(M,{"model-value":T,"onUpdate:modelValue":o,width:200},null,8,["model-value","onUpdate:modelValue"])]),_:1},8,["instance","property-id"])]),e("div",ye,[he,fe,e("div",xe,[n(K,{url:d.value},null,8,["url"])]),Ve,e("div",null,[n(k,{modelValue:d.value,"onUpdate:modelValue":s[2]||(s[2]=o=>d.value=o),"url-mode":!0},null,8,["modelValue"])])]),e("div",we,[be,ge,e("div",ke,[n(O,{number:p.value},null,8,["number"])]),Ie,e("div",null,[n(W,{modelValue:p.value,"onUpdate:modelValue":s[3]||(s[3]=o=>p.value=o)},null,8,["modelValue"])])]),e("div",Ce,[Be,e("div",null,[n(j,{modelValue:_.value,"onUpdate:modelValue":s[4]||(s[4]=o=>_.value=o),rounded:!0},null,8,["modelValue"])])]),e("div",Te,[De,e("div",null,[n(q,{modelValue:u.value,"onUpdate:modelValue":s[5]||(s[5]=o=>u.value=o)},null,8,["modelValue"])])]),e("div",Ue,[Le,Ae,e("div",Ee,G(!!v.value),1),Pe,e("div",null,[n(J,{modelValue:v.value,"onUpdate:modelValue":s[6]||(s[6]=o=>v.value=o),label:"Checkbox"},null,8,["modelValue"])])]),e("div",Se,[Ne,e("div",null,[n(se,{property:b(c).propertyList.find(o=>o.type==b(Q).multi_tags),modelValue:y.value,"onUpdate:modelValue":s[7]||(s[7]=o=>y.value=o),"can-create":!0,"no-wrap":!0},null,8,["property","modelValue"])])])])):C("",!0)}});const Re=B($e,[["__scopeId","data-v-039e5b52"]]);export{Re as default}; diff --git a/panoptic_back/panoptic/html/assets/Tutorial-8facc104.js b/panoptic_back/panoptic/html/assets/Tutorial-513a3a94.js similarity index 98% rename from panoptic_back/panoptic/html/assets/Tutorial-8facc104.js rename to panoptic_back/panoptic/html/assets/Tutorial-513a3a94.js index 12261a1f..5950c402 100644 --- a/panoptic_back/panoptic/html/assets/Tutorial-8facc104.js +++ b/panoptic_back/panoptic/html/assets/Tutorial-513a3a94.js @@ -1 +1 @@ -import{V as I,u as B,W as $,aA as L,c as v,X as F,l as M,k as A,M as V,a6 as y,o as n,s as k,z as S,aB as z,e as l,b as E,a as m,t as u,i as r,h as R}from"./index-c17cfbdf.js";const D={class:"v-step__buttons"},O=["onClick"],W=["onClick"],X=["onClick"],q={__name:"Tutorial",props:{tutorial:{type:String,default:"home"}},setup(x){const{t}=I({useScope:"global"}),p=B(),N=$(),d=L("tours"),T=x,j=[{target:"#main-menu",content:t("tutorial.step-1"),params:{placement:"top"}},{target:"#create-project",content:t("tutorial.step-2"),hideNext:!0,params:{placement:"right"}},{target:"#select-folder",content:t("tutorial.step-3"),hideNext:!0,params:{placement:"top"}},{target:"#confirm-modal",content:t("tutorial.step-3a"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),params:{placement:"right"}},{target:"#confirm-create",hideNext:!0,content:t("tutorial.step-3b")}],P=[{target:"#add_folder",content:t("tutorial.step-4"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),params:{placement:"bottom"}},{target:"#confirm-modal",content:t("tutorial.step-4b"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),params:{placement:"bottom"}},{target:"#import",before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),content:t("tutorial.step-5"),params:{placement:"right"}},{target:"#add-property",content:t("tutorial.step-6"),hideNext:!0,params:{placement:"right"}},{target:"#select-property",content:t("tutorial.step-7"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),250)}),params:{placement:"right"}},{target:"#confirm-property",content:t("tutorial.step-8"),hideNext:!0,params:{placement:"right"}},{target:"#main-content",content:t("tutorial.step-9"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-10"),params:{placement:"bottom"}},{target:"#add-group-button",content:t("tutorial.step-11"),params:{placement:"bottom"},hideNext:!0},{target:"#main-content",content:t("tutorial.step-12"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-13"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-13a"),params:{placement:"bottom"}},{target:"#selection-stamp",content:t("tutorial.step-13b"),params:{placement:"bottom"}},{target:"#remove-group-button",content:t("tutorial.step-14"),params:{placement:"top"}},{target:"#add-tab-button",content:t("tutorial.step-14b"),params:{placement:"bottom"}},{target:"#group-action-button",content:t("tutorial.step-15"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-16"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-17"),params:{placement:"bottom"}}],i=T.tutorial==="home"?j:P;let a=parseInt(localStorage.getItem("currentStep")||"0");const b=v(()=>Array.isArray(p.data.status.projects)&&p.data.status.projects.length>0),c=v(()=>!b.value&&p.data.init||N.showTutorial);F(c,async()=>{_()}),M(()=>{_()});async function _(){c.value&&(b.value||localStorage.setItem("tutorialFinished","false"),await A(),console.log(a),a===5&&p.openModalId===V.PROPERTY&&i.length-1>a?d.myTour.start(a):d.myTour.start())}function g(o){o!==-1&&o&&(a=o)}function h(){localStorage.setItem("tutorialFinished","true")}return(o,s)=>{const C=y("v-step"),w=y("v-tour");return c.value?(n(),k(w,{key:0,name:"myTour",steps:l(i),options:{enabledButtons:{buttonPrevious:!1}}},{default:S(e=>[e.steps[e.currentStep]?(n(),k(C,{key:e.currentStep,step:e.steps[e.currentStep],"previous-step":e.previousStep,"next-step":e.nextStep,stop:e.stop,skip:e.skip,"is-first":e.isFirst,"is-last":e.isLast,labels:e.labels,id:e.currentStep},z({_:2},[l(i)[e.currentStep].hideNext===!0||e.isLast?{name:"actions",fn:S(()=>[E("div",D,[e.isLast?r("",!0):(n(),m("button",{key:0,onClick:f=>{e.skip(),g(-1),h()},class:"v-step__button v-step__button-skip"},u(o.$t("tutorial.buttons.skip")),9,O)),e.isLast?r("",!0):(n(),m("button",{key:1,onClick:f=>{e.nextStep(),g(e.currentStep+1)},class:"v-step__button v-step__button-next",style:R(l(i)[e.currentStep].hideNext?"display: none !important":"")},u(o.$t("tutorial.buttons.next")),13,W)),e.isLast?(n(),m("button",{key:2,class:"v-step__button v-step__button-stop",onClick:f=>{e.stop(),h()}},u(o.$t("tutorial.buttons.finish")),9,X)):r("",!0)])]),key:"0"}:void 0]),1032,["step","previous-step","next-step","stop","skip","is-first","is-last","labels","id"])):r("",!0)]),_:1},8,["steps"])):r("",!0)}}};export{q as _}; +import{V as I,u as B,W as $,aA as L,c as v,X as F,l as M,k as A,M as V,a6 as y,o as n,s as k,z as S,aB as z,e as l,b as E,a as m,t as u,i as r,h as R}from"./index-9c28c371.js";const D={class:"v-step__buttons"},O=["onClick"],W=["onClick"],X=["onClick"],q={__name:"Tutorial",props:{tutorial:{type:String,default:"home"}},setup(x){const{t}=I({useScope:"global"}),p=B(),N=$(),d=L("tours"),T=x,j=[{target:"#main-menu",content:t("tutorial.step-1"),params:{placement:"top"}},{target:"#create-project",content:t("tutorial.step-2"),hideNext:!0,params:{placement:"right"}},{target:"#select-folder",content:t("tutorial.step-3"),hideNext:!0,params:{placement:"top"}},{target:"#confirm-modal",content:t("tutorial.step-3a"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),params:{placement:"right"}},{target:"#confirm-create",hideNext:!0,content:t("tutorial.step-3b")}],P=[{target:"#add_folder",content:t("tutorial.step-4"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),params:{placement:"bottom"}},{target:"#confirm-modal",content:t("tutorial.step-4b"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),params:{placement:"bottom"}},{target:"#import",before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),300)}),content:t("tutorial.step-5"),params:{placement:"right"}},{target:"#add-property",content:t("tutorial.step-6"),hideNext:!0,params:{placement:"right"}},{target:"#select-property",content:t("tutorial.step-7"),hideNext:!0,before:()=>new Promise((o,s)=>{setTimeout(()=>o("foo"),250)}),params:{placement:"right"}},{target:"#confirm-property",content:t("tutorial.step-8"),hideNext:!0,params:{placement:"right"}},{target:"#main-content",content:t("tutorial.step-9"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-10"),params:{placement:"bottom"}},{target:"#add-group-button",content:t("tutorial.step-11"),params:{placement:"bottom"},hideNext:!0},{target:"#main-content",content:t("tutorial.step-12"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-13"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-13a"),params:{placement:"bottom"}},{target:"#selection-stamp",content:t("tutorial.step-13b"),params:{placement:"bottom"}},{target:"#remove-group-button",content:t("tutorial.step-14"),params:{placement:"top"}},{target:"#add-tab-button",content:t("tutorial.step-14b"),params:{placement:"bottom"}},{target:"#group-action-button",content:t("tutorial.step-15"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-16"),params:{placement:"bottom"}},{target:"#main-content",content:t("tutorial.step-17"),params:{placement:"bottom"}}],i=T.tutorial==="home"?j:P;let a=parseInt(localStorage.getItem("currentStep")||"0");const b=v(()=>Array.isArray(p.data.status.projects)&&p.data.status.projects.length>0),c=v(()=>!b.value&&p.data.init||N.showTutorial);F(c,async()=>{_()}),M(()=>{_()});async function _(){c.value&&(b.value||localStorage.setItem("tutorialFinished","false"),await A(),console.log(a),a===5&&p.openModalId===V.PROPERTY&&i.length-1>a?d.myTour.start(a):d.myTour.start())}function g(o){o!==-1&&o&&(a=o)}function h(){localStorage.setItem("tutorialFinished","true")}return(o,s)=>{const C=y("v-step"),w=y("v-tour");return c.value?(n(),k(w,{key:0,name:"myTour",steps:l(i),options:{enabledButtons:{buttonPrevious:!1}}},{default:S(e=>[e.steps[e.currentStep]?(n(),k(C,{key:e.currentStep,step:e.steps[e.currentStep],"previous-step":e.previousStep,"next-step":e.nextStep,stop:e.stop,skip:e.skip,"is-first":e.isFirst,"is-last":e.isLast,labels:e.labels,id:e.currentStep},z({_:2},[l(i)[e.currentStep].hideNext===!0||e.isLast?{name:"actions",fn:S(()=>[E("div",D,[e.isLast?r("",!0):(n(),m("button",{key:0,onClick:f=>{e.skip(),g(-1),h()},class:"v-step__button v-step__button-skip"},u(o.$t("tutorial.buttons.skip")),9,O)),e.isLast?r("",!0):(n(),m("button",{key:1,onClick:f=>{e.nextStep(),g(e.currentStep+1)},class:"v-step__button v-step__button-next",style:R(l(i)[e.currentStep].hideNext?"display: none !important":"")},u(o.$t("tutorial.buttons.next")),13,W)),e.isLast?(n(),m("button",{key:2,class:"v-step__button v-step__button-stop",onClick:f=>{e.stop(),h()}},u(o.$t("tutorial.buttons.finish")),9,X)):r("",!0)])]),key:"0"}:void 0]),1032,["step","previous-step","next-step","stop","skip","is-first","is-last","labels","id"])):r("",!0)]),_:1},8,["steps"])):r("",!0)}}};export{q as _}; diff --git a/panoptic_back/panoptic/html/assets/index-c17cfbdf.js b/panoptic_back/panoptic/html/assets/index-9c28c371.js similarity index 98% rename from panoptic_back/panoptic/html/assets/index-c17cfbdf.js rename to panoptic_back/panoptic/html/assets/index-9c28c371.js index 854c45a2..f38f243b 100644 --- a/panoptic_back/panoptic/html/assets/index-c17cfbdf.js +++ b/panoptic_back/panoptic/html/assets/index-9c28c371.js @@ -2,10 +2,10 @@ var uS=Object.defineProperty;var dS=(e,t,i)=>t in e?uS(e,t,{enumerable:!0,config * pinia v2.1.7 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let b0;const pd=e=>b0=e,y0=Symbol();function hf(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var dl;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(dl||(dl={}));function mA(){const e=Zu(!0),t=e.run(()=>ye({}));let i=[],n=[];const a=Io({install(l){pd(a),a._a=l,l.provide(y0,a),l.config.globalProperties.$pinia=a,n.forEach(c=>i.push(c)),n=[]},use(l){return!this._a&&!gA?n.push(l):i.push(l),this},_p:i,_a:null,_e:e,_s:new Map,state:t});return a}const x0=()=>{};function Bm(e,t,i,n=x0){e.push(t);const a=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),n())};return!i&&Ju()&&mp(a),a}function La(e,...t){e.slice().forEach(i=>{i(...t)})}const vA=e=>e();function ff(e,t){e instanceof Map&&t instanceof Map&&t.forEach((i,n)=>e.set(n,i)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const i in t){if(!t.hasOwnProperty(i))continue;const n=t[i],a=e[i];hf(a)&&hf(n)&&e.hasOwnProperty(i)&&!bi(n)&&!Vn(n)?e[i]=ff(a,n):e[i]=n}return e}const bA=Symbol();function yA(e){return!hf(e)||!e.hasOwnProperty(bA)}const{assign:dr}=Object;function xA(e){return!!(bi(e)&&e.effect)}function wA(e,t,i,n){const{state:a,actions:l,getters:c}=t,d=i.state.value[e];let p;function m(){d||(i.state.value[e]=a?a():{});const b=Ea(i.state.value[e]);return dr(b,l,Object.keys(c||{}).reduce((w,_)=>(w[_]=Io(we(()=>{pd(i);const C=i._s.get(e);return c[_].call(C,C)})),w),{}))}return p=w0(e,m,t,i,n,!0),p}function w0(e,t,i={},n,a,l){let c;const d=dr({actions:{}},i),p={deep:!0};let m,b,w=[],_=[],C;const I=n.state.value[e];!l&&!I&&(n.state.value[e]={}),ye({});let O;function M(se){let Q;m=b=!1,typeof se=="function"?(se(n.state.value[e]),Q={type:dl.patchFunction,storeId:e,events:C}):(ff(n.state.value[e],se),Q={type:dl.patchObject,payload:se,storeId:e,events:C});const te=O=Symbol();At().then(()=>{O===te&&(m=!0)}),b=!0,La(w,Q,n.state.value[e])}const N=l?function(){const{state:Q}=i,te=Q?Q():{};this.$patch(ce=>{dr(ce,te)})}:x0;function k(){c.stop(),w=[],_=[],n._s.delete(e)}function D(se,Q){return function(){pd(n);const te=Array.from(arguments),ce=[],oe=[];function de(re){ce.push(re)}function be(re){oe.push(re)}La(_,{args:te,name:se,store:$,after:de,onError:be});let Ce;try{Ce=Q.apply(this&&this.$id===e?this:$,te)}catch(re){throw La(oe,re),re}return Ce instanceof Promise?Ce.then(re=>(La(ce,re),re)).catch(re=>(La(oe,re),Promise.reject(re))):(La(ce,Ce),Ce)}}const P={_p:n,$id:e,$onAction:Bm.bind(null,_),$patch:M,$reset:N,$subscribe(se,Q={}){const te=Bm(w,se,Q.detached,()=>ce()),ce=c.run(()=>nt(()=>n.state.value[e],oe=>{(Q.flush==="sync"?b:m)&&se({storeId:e,type:dl.direct,events:C},oe)},dr({},p,Q)));return te},$dispose:k},$=Wt(P);n._s.set(e,$);const ee=(n._a&&n._a.runWithContext||vA)(()=>n._e.run(()=>(c=Zu()).run(t)));for(const se in ee){const Q=ee[se];if(bi(Q)&&!xA(Q)||Vn(Q))l||(I&&yA(Q)&&(bi(Q)?Q.value=I[se]:ff(Q,I[se])),n.state.value[e][se]=Q);else if(typeof Q=="function"){const te=D(se,Q);ee[se]=te,d.actions[se]=Q}}return dr($,ee),dr(Ut($),ee),Object.defineProperty($,"$state",{get:()=>n.state.value[e],set:se=>{M(Q=>{dr(Q,se)})}}),n._p.forEach(se=>{dr($,c.run(()=>se({store:$,app:n._a,pinia:n,options:d})))}),I&&l&&i.hydrate&&i.hydrate($.$state,I),m=!0,b=!0,$}function gd(e,t,i){let n,a;const l=typeof t=="function";typeof e=="string"?(n=e,a=l?i:t):(a=e,n=e.id);function c(d,p){const m=Px();return d=d||(m?Ji(y0,null):null),d&&pd(d),d=b0,d._s.has(n)||(l?w0(n,t,a,d):wA(n,a,d)),d._s.get(n)}return c.$id=n,c}const _A={home:{label:{folder:"Dossier",name:"Nom du projet",path_placeholder:"Selectionez un dossier",create:"Creer",cancel:"Annuler"},create_title:"Creation de projet",plugins:{warning:"Attention: nous ne contrôlons pas le contenu des plugins développés par des tierces",require_url:"Url requise",require_unique_name:"Choisir un nom de plugin unique",require_folder:"Choisir un dossier",error_name_not_unique:"Le nom de plugin est deja utilisé",install_panoptic_ml:"Installer le plugin de similarité",install:"Installer",load:"Installation..."},projects:{create:"Créer un nouveau projet",create_details:"Créer un nouveau projet panoptic dans un dossier.",create_button:"Créer",import:"Importer un projet",import_details:"Choisissez un dossier Panoptic existant.",import_button:"Importer"}},status:{no_project:"Aucun projet Panoptic ouvert"},nav:{folders:{title:"Dossiers",add:"Ajouter un dossier d'images",del:"Retirer",del_alert:"Retirer le dossier supprimera toutes les instances associées aux images contenues dans le dossier."},tasks:{title:"Tache de fond",done:"Fini"},properties:{title:"Propriétés",properties_tooltip:"Les différents champs associés à chaque image",import_properties_tooltip:"Importer un fichier de propriétés",export_properties_tooltip:"Exporter un fichier de propriétés",hide_property_tooltip:"Afficher / Masquer la propriété dans la vue",linked_property_tooltip:"Propriété liée à une instance d'image, pour plus d'informations lire la documentation sur les instances",hidden_property_tooltip:"Cette propriété n'est pas visible dans ce mode car liée à une instance d'image",expand_property_tooltip:"Afficher les tags",collapse_property_tooltip:"Masquer les tags",add_property:"Nouvelle propriété",delete_property:"Supprimer",open_tags:"Ouvrir modal des tags"},computed:{title:"Propriétés Panoptic",computed_tooltip:"Des propriétés non modifiables générées par panoptic","1_tooltip":"L'identifiant unique dans panoptic","2_tooltip":"Une signature unique, deux images parfaitement identiques auront le même sha1","3_tooltip":"Une signature moyenne, deux images très proches visuellement auront le même ahash","4_tooltip":"Dossier contenant l'image source","5_tooltip":"Largeur de l'image","6_tooltip":"Hauteur de l'image","7_tooltip":"Le chemin de l'image sur le disque"}},menu:{add_tab_tooltip:"Créer un nouvel onglet",rename_tab_tooltip:"Renommer l'onglet",delete_tab_tooltip:"Supprimer l'onglet",search:"Chercher par texte",search_tooltip:"Chercher des images ayant le texte cherché dans l'une de leurs propriétés.",grid_tooltip:"Passer en vue grille d'images",table_tooltip:"Passer en vue tableau",graph_tooltip:"Passer en vue graphique",image_size_tooltip:"Taille des images",all_images:"Images",sha1_images:"Instances",image_mode_tooltip:"Altérner entre les modes instance et image, en mode image, seules les propriétés communes à toutes les instances d'une image seront affichées.",selected_images:"images sélectionnées",tag_selection:"Tagger les ",remove_selection_tooltip:"Annuler la sélection",filters:"Filtrer",groupby:"Grouper",sort:{title:"Trier",group_order_az_tooltip:"Tri des groupes par nom",group_order_nb_tooltip:"Tri des groupes par nombre d'images",order_desc:"Tri par ordre décroissant",order_asc:"Tri par ordre croissant"},import_status_title:"Import",issue:"Signaler un probleme"},recommand:{title:"Propositions d'images",tooltip:"Des images considérées comme visuellement et / ou sémantiquement proches du groupe sélectionné en utilisant l'algorithme KDTree et des vecteurs d'image",accept:"Ajouter au groupe sélectionné",refuse:"Retirer des images similaires",group:"Aller au groupe"},view:{all_group:"Toutes",group_clusters:"Groupes IA",groupes_nb:"Groupes",group_clusters_tooltip:"Utilise un algorithme de machine learning (Kmeans) pour proposer des groupes temporaires par similarité d'images. Voir la documentation sur les clusters pour plus d'informations.",remove_clusters:"Fermer les groupes IA",cluster_score_tooltip:"Score de cohérence du cluster. Voir la documentation sur les clusters pour plus d'informations",instances_tooltip:"Nombre d'instances de cette image",collapse:"Réduire"},"graph-view":{histo:"Histogramme",curve:"Courbe",stack:"Empiler",over:"Superposer",info:"Cliquez sur la légende pour afficher les images de tous les points"}},SA={fs:{fast:"Accès rapide",partitions:"Disques",images:"Choisir un dossier d'images à ajouter",import:"Choisir un projet à importer",create:"Choisir l'emplacement où créer",open:"Sélectionner"},image:{similar_images:"Images similaires",similar_images_tooltip:"Des images considérées comme visuellement et / ou sémantiquement proches de l'image courante en utilisant l'algorithme KDTree et des vecteurs d'image",unique_properties:"Propriétés des instances",unique_properties_tooltip:"Affichage des propriétés liées à toutes les instances de cette image.",similarity_filter_tooltip:"Le pourcentage de similarité minimal que doivent avoir les images affichées ici. Pour plus d'information, voir la documentation sur le score de similarité.",toggle_property_tooltip:"Afficher / Masquer cette propriété dans la vue 'Images similaires'",main_filter_tooltip:"Activer / Désactiver le filtre global",fill_property_tooltip:"Tagger toutes les images similaires avec la valeur de cette propriété",history:"Historique"},properties:{title:"Nouvelle propriété",input:"Nom de la propriété",type:"Type de propriété",instance:"Propriété d'instance",image:"Propriété d'image",cancel:"Annuler",confirm:"Confirmer",text:"Texte",text_tooltip:"Du texte, ex: le contenu d'un tweet, la description d'une image",number:"Numérique",number_tooltip:"Des nombres, ex: le nombre de likes sur twitter, la largeur d'un tableau",tag:"Tag",tag_tooltip:"Un tag unique choisi parmi une liste, ex: une catégorie d'image, un lieu, une source",multi_tags:"MultiTags",multi_tags_tooltip:"Permet d'assigner un ou plusieurs tags parmi une liste, ex: des catégories, des lieux, des objets",url:"URL",url_tooltip:"Une URL cliquable, ex: le lien vers la source d'une image",date:"Date",date_tooltip:"Une date au format jj / mm / aaaa",color:"Color",color_tooltip:"Un simple carré de couleur permettant de catégoriser sans assigner de label",checkbox:"Checkbox",checkbox_tooltip:"Une case à cocher, ex: 'pertinent' / 'non pertinent', 'sensible / non sensible'"},filters:{title:"Filtres:",remove:"Supprimer",and:"et",or:"ou",where:"Conditions:",new_filter:"Filtre",new_group:"Groupe de filtres",operators:{isSet:"n'est pas vide",notSet:"est vide",equal:"=",equalNot:"≠",lower:"<",greater:">",leq:"≤",geq:"≥",startsWith:"débute par",like:"contient",notLike:"ne contiens pas",containsAny:"contient",containsNot:"ne contient pas",containsAll:"contient tous",isTrue:"oui",isFalse:"non"}},tagging:{button:"Tagger le groupe",title:"Propriétés",cancel:"Annuler",clear:"Clear",apply:"Appliquer",erase:"Effacer",erase_tooltip:"Effacer le champ pour toute la sélection",cancel_tooltip:"Annuler les changements"},tags:{filter_tree:"Afficher seulement les tags selectionnés",unselect_tree:"Annuler la selection",merge_tree:"Fusionner Tags",tree_view:"Vue en arbre",list_view:"Vue en liste",click_to_select:"Cliquez pour selectioner des tags",click_any:"Cliquez pour selectioner",col_title_all:"Tous les tags",col_title_children:"Tags enfants",col_title_siblings:"Tags frères",col_title_parents:"Tags parents"},export:{title:"Exporter les données",images:"Uniquement les images de l'onglet",properties:"Uniquement les propriétés visibles",export:"Exporter",name:"Nom de dossier",name_placeholder:"Optionel",mode_label:"Mode",mode_image:"Image",mode_instance:"Instance",selection_label:"Selection",selection_all:"Toutes",selection_selected:"Selectionnées",selection_filtered:"Filtrées",properties_label:"Propriétés",properties_all:"Toutes",properties_visible:"Visible",properties_none:"Aucune",export_images:"Inclure les images",key_label:"Identifiant",id:"ID",local_path:"Chemin relatif",global_path:"Chemin absolu"},settings:{title:"Parametres Projet"},import:{title:"Importer Fichier",help:{0:"Un fichier valide de propriétés à importer est un csv:",1:"Avec séparateur ';'",2:"Ayant comme première colonne soit:",3:"path: un chemin relatif ou absolu vers le fichier d'image",4:"id: un id panoptic (correspondant à une image déjà importée dans panoptic)",5:"Une liste de colonnes correspondant à chaque fois au nom de la propriété à donner puis à son type entre crochets.",6:"Exemple: categories[multi_tags]",7:"Dans le cas d'une propriété multi_tags, les tags devront être séparés par des virgules au sein de la colonne",8:"Tableau d'équivalence des propriétés:",9:"Nom dans panoptic",10:"Nom à l'import / export"}},first:{introduction:"Bienvenue sur Panoptic, logiciel proposant d'explorer de grands corpus d'images en les manipulant par leurs propriétés et à l'aide d'outils de machine learning. Ces derniers ne sont pas installés de base pour limiter la taille de panoptic dans le cas où ils ne vous intéresseraient pas. Il est cependant recommandé de les installer pour profiter des pleines fonctionnalités de Panoptic.",install_ml:"Installer Plugin ML"}},EA={buttons:{skip:"Passer",next:"Suivant",finish:"Terminer"},"step-1":"Bienvenue sur Panoptic, vous n'avez pas de projet pour le moment.","step-2":"Cliquez ici pour créer un nouveau projet.","step-3":"Sélectionnez ici le dossier dans lequel les données panoptic seront stockées (nb: ça n'est pas le dossier d'où proviennent les images)","step-3a":"Choisissez le dossier dans lequel créer le projet et confirmez","step-3b":"Rentrez un nom de projet puis cliquez pour finaliser et créer le projet.","step-4":"Vous n'avez pas d'images pour le moment, cliquez ici pour ajouter un dossier d'images.","step-4b":"Choisissez votre dossier d'image et cliquez ici pour confirmer","step-5":"Les images s'importent ici, et des calculs sont effectués, cela peut prendre un certain temps.","step-6":"Avant que les calculs ne soient terminés, vous pouvez créer une propriété, les propriétés servent à créer des annotations.","step-7":"Il faut choisir le type de propriété, pour cet exemple choisissez le type Label, vous pourrez survoler les autres types pour plus d'informations.","step-8":"Entrez également un nom par exemple 'catégorie' et confirmez.","step-9":"La propriété s'affiche maintenant sous toutes les images avec la valeur 'None' cliquez dessus pour modifier cette valeur, et entrez un mot clé, par exemple 'test'.","step-10":"Vous venez donc d'assigner le label 'test' à cette image. Au dela des annotations, les propriétés permettent de filtrer, grouper, et trier des images","step-11":"Vous pouvez maintenant grouper les images en appuyant sur le '+' et en sélectionnant 'catégorie'. Cela va créer deux groupes d'images 'catégorie: indéfinie' et 'catégorie: test'","step-12":"Si vous assignez la valeur 'test' à une autre image, celle ci sera automatiquement déplacée dans le groupe 'catégorie: test'","step-13":"Survolez une image du groupe 'catégorie: _indéfini' et appuyez sur l'icone de sélection en haut à gauche.","step-13a":"Sélectionnez plusieurs images de la même façon, ou maintenez SHIFT et cliquez sur l'icone de sélection d'une autre image pour sélectionner toutes les images entre les deux.","step-13b":"Vous pouvez maintenant assigner une valeur à plusieurs images en même temps, par exemple la valeur 'test2' ce qui crééra un nouveau groupe d'images; 'catégorie: test2'.","step-14":"Cliquez à nouveau sur 'catégorie' pour enlever le groupage. Les filtres et les tris fonctionnent de la même façon.","step-14b":"Cliquez ici pour créer un nouvel onglet, les filtres, groupes et tris sont propres à chaque onglet et ces dernier permettent facilement d'altérner entre des sous corpus.","step-15":"Une fois les calculs terminés, vous pouvez utiliser les fonctionnalités de machine learning de panoptic. Pour créer des groupes automatiques par exemple.","step-16":"Cliquez sur une image pour l'ouvrir en grand, sur le côté sont affichées les images similaires à cette image.","step-17":"Retrouvez des tutoriels plus détaillés sur le site du CERES: https://ceres.sorbonne-université.fr/outils/panoptic"},CA={find_similar:"Similaire",group:"Créer des clusters",execute:"Executer",filter:"Filtrer",action_images:"Action Images",action_group:"Action Groupes",import:"Importer",export:"Exporter"},AA="Tooltip to be written",kA={history:{info:"Historique des modifications",button:"Historique",values:"valeur(s) modifiée(s)",tags:"tag(s) modifié(s)",undo:"Annuler",redo:"Refaire"},action:{execute:"Execute une fonction plugin sur les instances",group:"Execute une fonction de clustering sur les instances"}},TA={reload:{auto:`Actualisation Automatique + */let b0;const pd=e=>b0=e,y0=Symbol();function hf(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var dl;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(dl||(dl={}));function mA(){const e=Zu(!0),t=e.run(()=>ye({}));let i=[],n=[];const a=Io({install(l){pd(a),a._a=l,l.provide(y0,a),l.config.globalProperties.$pinia=a,n.forEach(c=>i.push(c)),n=[]},use(l){return!this._a&&!gA?n.push(l):i.push(l),this},_p:i,_a:null,_e:e,_s:new Map,state:t});return a}const x0=()=>{};function Bm(e,t,i,n=x0){e.push(t);const a=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),n())};return!i&&Ju()&&mp(a),a}function La(e,...t){e.slice().forEach(i=>{i(...t)})}const vA=e=>e();function ff(e,t){e instanceof Map&&t instanceof Map&&t.forEach((i,n)=>e.set(n,i)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const i in t){if(!t.hasOwnProperty(i))continue;const n=t[i],a=e[i];hf(a)&&hf(n)&&e.hasOwnProperty(i)&&!bi(n)&&!Vn(n)?e[i]=ff(a,n):e[i]=n}return e}const bA=Symbol();function yA(e){return!hf(e)||!e.hasOwnProperty(bA)}const{assign:dr}=Object;function xA(e){return!!(bi(e)&&e.effect)}function wA(e,t,i,n){const{state:a,actions:l,getters:c}=t,d=i.state.value[e];let p;function m(){d||(i.state.value[e]=a?a():{});const b=Ea(i.state.value[e]);return dr(b,l,Object.keys(c||{}).reduce((w,_)=>(w[_]=Io(we(()=>{pd(i);const C=i._s.get(e);return c[_].call(C,C)})),w),{}))}return p=w0(e,m,t,i,n,!0),p}function w0(e,t,i={},n,a,l){let c;const d=dr({actions:{}},i),p={deep:!0};let m,b,w=[],_=[],C;const I=n.state.value[e];!l&&!I&&(n.state.value[e]={}),ye({});let O;function M(se){let Q;m=b=!1,typeof se=="function"?(se(n.state.value[e]),Q={type:dl.patchFunction,storeId:e,events:C}):(ff(n.state.value[e],se),Q={type:dl.patchObject,payload:se,storeId:e,events:C});const te=O=Symbol();At().then(()=>{O===te&&(m=!0)}),b=!0,La(w,Q,n.state.value[e])}const N=l?function(){const{state:Q}=i,te=Q?Q():{};this.$patch(ce=>{dr(ce,te)})}:x0;function k(){c.stop(),w=[],_=[],n._s.delete(e)}function D(se,Q){return function(){pd(n);const te=Array.from(arguments),ce=[],oe=[];function de(re){ce.push(re)}function be(re){oe.push(re)}La(_,{args:te,name:se,store:$,after:de,onError:be});let Ce;try{Ce=Q.apply(this&&this.$id===e?this:$,te)}catch(re){throw La(oe,re),re}return Ce instanceof Promise?Ce.then(re=>(La(ce,re),re)).catch(re=>(La(oe,re),Promise.reject(re))):(La(ce,Ce),Ce)}}const P={_p:n,$id:e,$onAction:Bm.bind(null,_),$patch:M,$reset:N,$subscribe(se,Q={}){const te=Bm(w,se,Q.detached,()=>ce()),ce=c.run(()=>nt(()=>n.state.value[e],oe=>{(Q.flush==="sync"?b:m)&&se({storeId:e,type:dl.direct,events:C},oe)},dr({},p,Q)));return te},$dispose:k},$=Wt(P);n._s.set(e,$);const ee=(n._a&&n._a.runWithContext||vA)(()=>n._e.run(()=>(c=Zu()).run(t)));for(const se in ee){const Q=ee[se];if(bi(Q)&&!xA(Q)||Vn(Q))l||(I&&yA(Q)&&(bi(Q)?Q.value=I[se]:ff(Q,I[se])),n.state.value[e][se]=Q);else if(typeof Q=="function"){const te=D(se,Q);ee[se]=te,d.actions[se]=Q}}return dr($,ee),dr(Ut($),ee),Object.defineProperty($,"$state",{get:()=>n.state.value[e],set:se=>{M(Q=>{dr(Q,se)})}}),n._p.forEach(se=>{dr($,c.run(()=>se({store:$,app:n._a,pinia:n,options:d})))}),I&&l&&i.hydrate&&i.hydrate($.$state,I),m=!0,b=!0,$}function gd(e,t,i){let n,a;const l=typeof t=="function";typeof e=="string"?(n=e,a=l?i:t):(a=e,n=e.id);function c(d,p){const m=Px();return d=d||(m?Ji(y0,null):null),d&&pd(d),d=b0,d._s.has(n)||(l?w0(n,t,a,d):wA(n,a,d)),d._s.get(n)}return c.$id=n,c}const _A={home:{label:{folder:"Dossier",name:"Nom du projet",path_placeholder:"Selectionez un dossier",create:"Creer",cancel:"Annuler"},create_title:"Creation de projet",plugins:{warning:"Attention: nous ne contrôlons pas le contenu des plugins développés par des tierces",require_url:"Url requise",require_unique_name:"Choisir un nom de plugin unique",require_folder:"Choisir un dossier",error_name_not_unique:"Le nom de plugin est deja utilisé",install_panoptic_ml:"Installer le plugin de similarité",install:"Installer",load:"Installation..."},projects:{create:"Créer un nouveau projet",create_details:"Créer un nouveau projet panoptic dans un dossier.",create_button:"Créer",import:"Importer un projet",import_details:"Choisissez un dossier Panoptic existant.",import_button:"Importer"}},status:{no_project:"Aucun projet Panoptic ouvert"},nav:{folders:{title:"Dossiers",add:"Ajouter un dossier d'images",del:"Retirer",del_alert:"Retirer le dossier supprimera toutes les instances associées aux images contenues dans le dossier."},tasks:{title:"Tache de fond",done:"Fini"},properties:{title:"Propriétés",properties_tooltip:"Les différents champs associés à chaque image",import_properties_tooltip:"Importer un fichier de propriétés",export_properties_tooltip:"Exporter un fichier de propriétés",hide_property_tooltip:"Afficher / Masquer la propriété dans la vue",linked_property_tooltip:"Propriété liée à une instance d'image, pour plus d'informations lire la documentation sur les instances",hidden_property_tooltip:"Cette propriété n'est pas visible dans ce mode car liée à une instance d'image",expand_property_tooltip:"Afficher les tags",collapse_property_tooltip:"Masquer les tags",add_property:"Nouvelle propriété",delete_property:"Supprimer",open_tags:"Ouvrir modal des tags"},computed:{title:"Propriétés Panoptic",computed_tooltip:"Des propriétés non modifiables générées par panoptic","1_tooltip":"L'identifiant unique dans panoptic","2_tooltip":"Une signature unique, deux images parfaitement identiques auront le même sha1","3_tooltip":"Une signature moyenne, deux images très proches visuellement auront le même ahash","4_tooltip":"Dossier contenant l'image source","5_tooltip":"Largeur de l'image","6_tooltip":"Hauteur de l'image","7_tooltip":"Le chemin de l'image sur le disque"}},menu:{add_tab_tooltip:"Créer un nouvel onglet",rename_tab_tooltip:"Renommer l'onglet",delete_tab_tooltip:"Supprimer l'onglet",search:"Chercher par texte",search_tooltip:"Chercher des images ayant le texte cherché dans l'une de leurs propriétés.",grid_tooltip:"Passer en vue grille d'images",table_tooltip:"Passer en vue tableau",graph_tooltip:"Passer en vue graphique",image_size_tooltip:"Taille des images",all_images:"Images",sha1_images:"Instances",image_mode:"Mode images uniques",image_mode_tooltip:"Altérner entre les modes instance et image, en mode image, seules les propriétés communes à toutes les instances d'une image seront affichées.",selected_images:"images sélectionnées",tag_selection:"Tagger les ",remove_selection_tooltip:"Annuler la sélection",filters:"Filtrer",groupby:"Grouper",sort:{title:"Trier",group_order_az_tooltip:"Tri des groupes par nom",group_order_nb_tooltip:"Tri des groupes par nombre d'images",order_desc:"Tri par ordre décroissant",order_asc:"Tri par ordre croissant"},import_status_title:"Import",issue:"Signaler un probleme"},recommand:{title:"Propositions d'images",tooltip:"Des images considérées comme visuellement et / ou sémantiquement proches du groupe sélectionné en utilisant l'algorithme KDTree et des vecteurs d'image",accept:"Ajouter au groupe sélectionné",refuse:"Retirer des images similaires",group:"Aller au groupe"},view:{all_group:"Toutes",group_clusters:"Groupes IA",groupes_nb:"Groupes",group_clusters_tooltip:"Utilise un algorithme de machine learning (Kmeans) pour proposer des groupes temporaires par similarité d'images. Voir la documentation sur les clusters pour plus d'informations.",remove_clusters:"Fermer les groupes IA",cluster_score_tooltip:"Score de cohérence du cluster. Voir la documentation sur les clusters pour plus d'informations",instances_tooltip:"Nombre d'instances de cette image",collapse:"Réduire"},"graph-view":{histo:"Histogramme",curve:"Courbe",stack:"Empiler",over:"Superposer",info:"Cliquez sur la légende pour afficher les images de tous les points"}},SA={fs:{fast:"Accès rapide",partitions:"Disques",images:"Choisir un dossier d'images à ajouter",import:"Choisir un projet à importer",create:"Choisir l'emplacement où créer",open:"Sélectionner"},image:{similar_images:"Images similaires",similar_images_tooltip:"Des images considérées comme visuellement et / ou sémantiquement proches de l'image courante en utilisant l'algorithme KDTree et des vecteurs d'image",unique_properties:"Propriétés des instances",unique_properties_tooltip:"Affichage des propriétés liées à toutes les instances de cette image.",similarity_filter_tooltip:"Le pourcentage de similarité minimal que doivent avoir les images affichées ici. Pour plus d'information, voir la documentation sur le score de similarité.",toggle_property_tooltip:"Afficher / Masquer cette propriété dans la vue 'Images similaires'",main_filter_tooltip:"Activer / Désactiver le filtre global",fill_property_tooltip:"Tagger toutes les images similaires avec la valeur de cette propriété",history:"Historique"},properties:{title:"Nouvelle propriété",input:"Nom de la propriété",type:"Type de propriété",instance:"Propriété d'instance",image:"Propriété d'image",cancel:"Annuler",confirm:"Confirmer",text:"Texte",text_tooltip:"Du texte, ex: le contenu d'un tweet, la description d'une image",number:"Numérique",number_tooltip:"Des nombres, ex: le nombre de likes sur twitter, la largeur d'un tableau",tag:"Tag",tag_tooltip:"Un tag unique choisi parmi une liste, ex: une catégorie d'image, un lieu, une source",multi_tags:"MultiTags",multi_tags_tooltip:"Permet d'assigner un ou plusieurs tags parmi une liste, ex: des catégories, des lieux, des objets",url:"URL",url_tooltip:"Une URL cliquable, ex: le lien vers la source d'une image",date:"Date",date_tooltip:"Une date au format jj / mm / aaaa",color:"Color",color_tooltip:"Un simple carré de couleur permettant de catégoriser sans assigner de label",checkbox:"Checkbox",checkbox_tooltip:"Une case à cocher, ex: 'pertinent' / 'non pertinent', 'sensible / non sensible'"},filters:{title:"Filtres:",remove:"Supprimer",and:"et",or:"ou",where:"Conditions:",new_filter:"Filtre",new_group:"Groupe de filtres",operators:{isSet:"n'est pas vide",notSet:"est vide",equal:"=",equalNot:"≠",lower:"<",greater:">",leq:"≤",geq:"≥",startsWith:"débute par",like:"contient",notLike:"ne contiens pas",containsAny:"contient",containsNot:"ne contient pas",containsAll:"contient tous",isTrue:"oui",isFalse:"non"}},tagging:{button:"Tagger le groupe",title:"Propriétés",cancel:"Annuler",clear:"Clear",apply:"Appliquer",erase:"Effacer",erase_tooltip:"Effacer le champ pour toute la sélection",cancel_tooltip:"Annuler les changements"},tags:{filter_tree:"Afficher seulement les tags selectionnés",unselect_tree:"Annuler la selection",merge_tree:"Fusionner Tags",tree_view:"Vue en arbre",list_view:"Vue en liste",click_to_select:"Cliquez pour selectioner des tags",click_any:"Cliquez pour selectioner",col_title_all:"Tous les tags",col_title_children:"Tags enfants",col_title_siblings:"Tags frères",col_title_parents:"Tags parents"},export:{title:"Exporter les données",images:"Uniquement les images de l'onglet",properties:"Uniquement les propriétés visibles",export:"Exporter",name:"Nom de dossier",name_placeholder:"Optionel",mode_label:"Mode",mode_image:"Image",mode_instance:"Instance",selection_label:"Selection",selection_all:"Toutes",selection_selected:"Selectionnées",selection_filtered:"Filtrées",properties_label:"Propriétés",properties_all:"Toutes",properties_visible:"Visible",properties_none:"Aucune",export_images:"Inclure les images",key_label:"Identifiant",id:"ID",local_path:"Chemin relatif",global_path:"Chemin absolu"},settings:{title:"Parametres Projet"},import:{title:"Importer Fichier",help:{0:"Un fichier valide de propriétés à importer est un csv:",1:"Avec séparateur ';'",2:"Ayant comme première colonne soit:",3:"path: un chemin relatif ou absolu vers le fichier d'image",4:"id: un id panoptic (correspondant à une image déjà importée dans panoptic)",5:"Une liste de colonnes correspondant à chaque fois au nom de la propriété à donner puis à son type entre crochets.",6:"Exemple: categories[multi_tags]",7:"Dans le cas d'une propriété multi_tags, les tags devront être séparés par des virgules au sein de la colonne",8:"Tableau d'équivalence des propriétés:",9:"Nom dans panoptic",10:"Nom à l'import / export"}},first:{introduction:"Bienvenue sur Panoptic, logiciel proposant d'explorer de grands corpus d'images en les manipulant par leurs propriétés et à l'aide d'outils de machine learning. Ces derniers ne sont pas installés de base pour limiter la taille de panoptic dans le cas où ils ne vous intéresseraient pas. Il est cependant recommandé de les installer pour profiter des pleines fonctionnalités de Panoptic.",install_ml:"Installer Plugin ML"}},EA={buttons:{skip:"Passer",next:"Suivant",finish:"Terminer"},"step-1":"Bienvenue sur Panoptic, vous n'avez pas de projet pour le moment.","step-2":"Cliquez ici pour créer un nouveau projet.","step-3":"Sélectionnez ici le dossier dans lequel les données panoptic seront stockées (nb: ça n'est pas le dossier d'où proviennent les images)","step-3a":"Choisissez le dossier dans lequel créer le projet et confirmez","step-3b":"Rentrez un nom de projet puis cliquez pour finaliser et créer le projet.","step-4":"Vous n'avez pas d'images pour le moment, cliquez ici pour ajouter un dossier d'images.","step-4b":"Choisissez votre dossier d'image et cliquez ici pour confirmer","step-5":"Les images s'importent ici, et des calculs sont effectués, cela peut prendre un certain temps.","step-6":"Avant que les calculs ne soient terminés, vous pouvez créer une propriété, les propriétés servent à créer des annotations.","step-7":"Il faut choisir le type de propriété, pour cet exemple choisissez le type Label, vous pourrez survoler les autres types pour plus d'informations.","step-8":"Entrez également un nom par exemple 'catégorie' et confirmez.","step-9":"La propriété s'affiche maintenant sous toutes les images avec la valeur 'None' cliquez dessus pour modifier cette valeur, et entrez un mot clé, par exemple 'test'.","step-10":"Vous venez donc d'assigner le label 'test' à cette image. Au dela des annotations, les propriétés permettent de filtrer, grouper, et trier des images","step-11":"Vous pouvez maintenant grouper les images en appuyant sur le '+' et en sélectionnant 'catégorie'. Cela va créer deux groupes d'images 'catégorie: indéfinie' et 'catégorie: test'","step-12":"Si vous assignez la valeur 'test' à une autre image, celle ci sera automatiquement déplacée dans le groupe 'catégorie: test'","step-13":"Survolez une image du groupe 'catégorie: _indéfini' et appuyez sur l'icone de sélection en haut à gauche.","step-13a":"Sélectionnez plusieurs images de la même façon, ou maintenez SHIFT et cliquez sur l'icone de sélection d'une autre image pour sélectionner toutes les images entre les deux.","step-13b":"Vous pouvez maintenant assigner une valeur à plusieurs images en même temps, par exemple la valeur 'test2' ce qui crééra un nouveau groupe d'images; 'catégorie: test2'.","step-14":"Cliquez à nouveau sur 'catégorie' pour enlever le groupage. Les filtres et les tris fonctionnent de la même façon.","step-14b":"Cliquez ici pour créer un nouvel onglet, les filtres, groupes et tris sont propres à chaque onglet et ces dernier permettent facilement d'altérner entre des sous corpus.","step-15":"Une fois les calculs terminés, vous pouvez utiliser les fonctionnalités de machine learning de panoptic. Pour créer des groupes automatiques par exemple.","step-16":"Cliquez sur une image pour l'ouvrir en grand, sur le côté sont affichées les images similaires à cette image.","step-17":"Retrouvez des tutoriels plus détaillés sur le site du CERES: https://ceres.sorbonne-université.fr/outils/panoptic"},CA={find_similar:"Similaire",group:"Créer des clusters",execute:"Executer",filter:"Filtrer",action_images:"Action Images",action_group:"Action Groupes",import:"Importer",export:"Exporter"},AA="Tooltip to be written",kA={history:{info:"Historique des modifications",button:"Historique",values:"valeur(s) modifiée(s)",tags:"tag(s) modifié(s)",undo:"Annuler",redo:"Refaire"},action:{execute:"Execute une fonction plugin sur les instances",group:"Execute une fonction de clustering sur les instances"}},TA={reload:{auto:`Actualisation Automatique Cliquez pour désactiver la mise à jour automatique`,valid:`Données à jour Cliquez pour activer la mise à jour automatique`,dirty:`Actualisation nécessaire -Cliquez pour actualiser`},"close-clusters":"Retirer les clusters","save-clusters":"Sauvegarde les clusters dans une propriétés tag"},IA={cancel:"Annuler",submit:"Confirmer",valid:"Valide",invalid:"Invalide",correct:"Correction"},OA={properties:{panoptic:"Propriétés Panoptic",instance:"Propriétés de l'instance",instances:"Propriété des instances",image:"Propriétés d'image",delete:"Voulez vous vraiment supprimer la propriété"}},PA="Vide...",LA="Installation...",MA="Installé",NA={main:_A,modals:SA,tutorial:EA,action:CA,tmp:AA,dropdown:kA,btn:TA,datepicker:IA,common:OA,none:PA,installing:LA,installed:MA},RA={home:{label:{folder:"Folder",name:"Project name",path_placeholder:"Select a folder",create:"Create",cancel:"Cancel"},create_title:"Create project",plugins:{warning:"Warning: we can't control the content of third party plugins",require_url:"Git URL",require_unique_name:"Unique plugin name",require_folder:"Folder selection",error_name_not_unique:"This plugin name is already taken",install_panoptic_ml:"Install PanopticML",install:"Install",load:"Installing..."},projects:{create:"Create new project",create_details:"Create a new panoptic project in a folder.",create_button:"Create",import:"Import project",import_details:"Choose an existing Panoptic folder.",import_button:"Import"}},status:{no_project:"No open Panoptic project"},nav:{folders:{title:"Folders",add:"Add an images folder",del:"Remove",del_alert:"Removing this folder will delete every images from this folder from panoptic"},tasks:{title:"Background task",done:"Done"},properties:{title:"Properties",properties_tooltip:"The various fields associated with each image",import_properties_tooltip:"Import a properties file",export_properties_tooltip:"Export a properties file",hide_property_tooltip:"Show / Hide property in view",linked_property_tooltip:"Property linked to an image instance, for more information read the documentation on instances",hidden_property_tooltip:"This property is not visible in this mode because it is linked to an image instance",expand_property_tooltip:"Show tags",collapse_property_tooltip:"Hide tags",add_property:"New property",delete_property:"Delete",open_tags:"Open tags management"},computed:{title:"Panoptic Properties",computed_tooltip:"Non-modifiable properties generated by panoptic","1_tooltip":"Unique identifier in panoptic","2_tooltip":"Unique signature, two perfectly identical images will have the same sha1","3_tooltip":"Average signature, two visually very similar images will have the same ahash","4_tooltip":"Folder containing the source image","5_tooltip":"Image width","6_tooltip":"Image height","7_tooltip":"Path of the image on disk"}},menu:{add_tab_tooltip:"Create a new tab",rename_tab_tooltip:"Rename tab",delete_tab_tooltip:"Delete tab",search:"Search by text",search_tooltip:"Search for images matching the text using the CLIP template",grid_tooltip:"Switch to image grid view",table_tooltip:"Switch to table view",graph_tooltip:"Switch to chart view",image_size_tooltip:"Image size",all_images:"Instances",sha1_images:"Images",image_mode:"Stack identical images",image_mode_tooltip:"Switch between instance and image modes, in image mode, only properties common to all instances of an image will be displayed.",selected_images:"selected images",tag_selection:"Tag the ",remove_selection_tooltip:"Cancel selection",filters:"Filter ",groupby:"Group ",sort:{title:"Sort ",group_order_az_tooltip:"Sort groups by name",group_order_nb_tooltip:"Sort groups by number of images",order_desc:"Sort by descending order",order_asc:"Sort in ascending order"},import_status_title:"Status Import",issue:"Create an Issue"},recommand:{title:"Image suggestions",tooltip:"Images considered to be visually and/or semantically related",accept:"Add to selected group",refuse:"Remove similar images",group:"Go to group"},view:{all_group:"All",group_clusters:"Clusters",groupes_nb:"Groups",group_clusters_tooltip:"Uses a machine learning algorithm (Kmeans) to propose temporary groups by image similarity. See the documentation on clusters for more information.",remove_clusters:"Close clusters",cluster_score_tooltip:"Cluster consistency score. See cluster documentation for more information",instances_tooltip:"Number of instances of this image",collapse:"Collapse"},"graph-view":{histo:"Histogram",curve:"LineChart",stack:"Stack",over:"UnStack",info:"Click on the legend to show images of all datapoints"}},DA={fs:{fast:"Quick Access",partitions:"Disks",images:"Select the folder you want to add images from",import:"Select the project folder to import",create:"Where should project folder be created ?",open:"Select"},image:{similar_images:"Similar images",similar_images_tooltip:"Images considered to be visually and/or semantically close to the current image using the KDTree algorithm and image vectors",unique_properties:"Unique properties",unique_properties_tooltip:"Display properties related to instances of this image",similarity_filter_tooltip:"The minimum similarity percentage that images displayed here must have. For more information, see the documentation on the similarity score.",toggle_property_tooltip:"Show / Hide this property in the 'Similar images' view",fill_property_tooltip:"Tag all similar images with the value of this property",history:"History",main_filter_tooltip:"Toggle global filter"},properties:{title:"New property",input:"Property name",cancel:"Cancel",confirm:"Confirm",text:"Text",text_tooltip:"Text, e.g. tweet content, image description",number:"Numeric",number_tooltip:"Numbers, e.g. the number of likes on twitter, the width of a table",tag:"Tag",tag_tooltip:"A single tag chosen from a list, e.g. an image category, a location, a source",multi_tags:"MultiTags",multi_tags_tooltip:"Like a tag but with the possibility of assigning several at the same time",url:"URL",url_tooltip:"A clickable URL, e.g. the link to the source of an image",date:"Date",date_tooltip:"A date in dd / mm / yyyy format",color:"Color",color_tooltip:"A simple colored square to categorize without assigning a label",checkbox:"Checkbox",checkbox_tooltip:"A checkbox, e.g. 'relevant' / 'irrelevant', 'sensitive / non-sensitive'",type:"Property Type",instance:"Instance Property",image:"Image Property"},filters:{title:"Filters:",remove:"Delete",and:"and",or:"or",where:"Where:",new_filter:"Filter",new_group:"Filter group",operators:{isSet:"is not empty",notSet:"is empty",equal:"=",equalNot:"≠",lower:"<",greater:">",leq:"≤",geq:"≥",startsWith:"begins with",like:"contains",notLike:"doesn't containt",containsAny:"contains",containsNot:"does not contain",containsAll:"contains all",isTrue:"is",isFalse:"is not"}},tagging:{button:"Tag the group",title:"Properties",cancel:"Cancel",clear:"Clear",apply:"Apply",erase:"Erase",erase_tooltip:"Erase this field for whole selection",cancel_tooltip:"Cancel changes"},tags:{filter_tree:"Display only selected tags",unselect_tree:"Cancel selection",merge_tree:"Merge tags",tree_view:"Tree View",list_view:"List view",click_to_select:"Click to select tags",click_any:"Click to select",col_title_all:"All tags",col_title_children:"Children tags",col_title_siblings:"Siblings tags",col_title_parents:"Parents tags"},export:{title:"Export Data",images:"Only images from the tab",properties:"Only visible properties",export:"Export",name:"Folder Name",name_placeholder:"Optional",mode_label:"Mode",mode_image:"Image",mode_instance:"Instance",selection_label:"Selection",selection_all:"All",selection_selected:"Selected",selection_filtered:"Filtered",properties_label:"Properties",properties_all:"All",properties_visible:"Visible",properties_none:"None",export_images:"Include images",key_label:"Image identifier",id:"ID",local_path:"Relative path",global_path:"Absolute path"},settings:{title:"Project Parameters"},import:{title:"Import File",help:{0:"A valid file is of type .csv and must:",1:"Be ';' separated",2:"Have as first column either:",3:"path: un relative or absolute path of the image file",4:"id: a panoptic id (linking to an already imported image inside panoptic)",5:"The remaining columns must be named like this : propertyname[property_type]",6:"For instance: categories[multi_tags]",7:"If using a multi_tags property, tags should be comma separated inside the column",8:"Names of the property types: ",9:"Name in panoptic",10:"Name to use when importing"}},first:{introduction:"Bienvenue sur Panoptic, logiciel proposant d'explorer de grands corpus d'images en les manipulant par leurs propriétés et à l'aide d'outils de machine learning. Ces derniers ne sont pas installés de base pour limiter la taille de panoptic dans le cas où ils ne vous intéresseraient pas. Il est cependant recommandé de les installer pour profiter des pleines fonctionnalités de Panoptic.",install_ml:"Install Plugin ML"}},$A={buttons:{skip:"Skip",next:"Next",finish:"Finish"},"step-1":"Welcome to Panoptic, you don't have any projects at the moment.","step-2":"Click here to create a new project.","step-3":"Select here the folder where Panoptic data will be stored (note: this is not the folder where the images come from).","step-3a":"Choose the folder to create the project in and confirm.","step-3b":"Enter a project name and click to finalize and create the project.","step-4":"You don't have any images at the moment, click here to add an image folder.","step-4b":"Choose your image folder and click here to confirm.","step-5":"Images are imported here, and calculations are performed, this may take some time.","step-6":"Before calculations are complete, you can create a property. Properties are used to create annotations.","step-7":"You need to choose the property type, for this example choose Label type, you can hover over the other types for more information.","step-8":"Also enter a name, for example 'category' and confirm.","step-9":"The property now appears under all images with the value 'None', click on it to edit this value, and enter a keyword, for example 'test'.","step-10":"So you have just assigned the label 'test' to this image. Besides annotations, properties allow filtering, grouping, and sorting of images.","step-11":"You can now group images by pressing '+' and selecting 'category'. This will create two groups of images 'category: undefined' and 'category: test'.","step-12":"If you assign the value 'test' to another image, it will automatically be moved to the 'category: test' group.","step-13":"Hover over an image in the 'category: undefined' group and click on the selection icon in the top left corner.","step-13a":"Select multiple images in the same way, or hold SHIFT and click the selection icon of another image to select all images between them.","step-13b":"You can now assign a value to multiple images at once, for example the value 'test2' which will create a new group of images; 'category: test2'.","step-14":"Click 'category' again to remove grouping. Filters and sorts work in the same way.","step-14b":"Click here to create a new tab, filters, groups, and sorts are specific to each tab and allow easy switching between sub-corpora.","step-15":"Once calculations are complete, you can use Panoptic's machine learning features. For example, to create automatic groups.","step-16":"Click on an image to open it in full size, similar images to this image are displayed on the side.","step-17":"Find more detailed tutorials on the CERES website: https://ceres.sorbonne-universite.fr/outils/panoptic"},FA={find_similar:"Similar",group:"Create Clusters",filter:"Filter",action_images:"Image Actions",action_group:"Group Actions",import:"Import",export:"Export",execute:"Run"},zA={history:{info:"History of modifications",button:"History",values:"modified values",tags:"modified tags",undo:"Undo",redo:"Redo"},action:{execute:"Run a plugin function",group:"Run a clustering function"}},HA={reload:{auto:"Hot reload, click to deactivate",valid:"Up to-date, click to activate hot-reload",dirty:"Data is not up to-date, click to reload"},"close-clusters":"Close clusters","save-clusters":"Save the clusters in a new property"},VA={cancel:"Cancel",submit:"Submit",valid:"Valid",invalid:"Invalid",correct:"Rectify"},BA="Empty...",WA="Tooltip to be written",YA={properties:{panoptic:"Panoptic properties",instance:"Instance properties",instances:"All instances properties",image:"Image properties",delete:"Do you really want to delete property"}},jA="Installing",XA="Installed",GA={main:RA,modals:DA,tutorial:$A,action:FA,dropdown:zA,btn:HA,datepicker:VA,none:BA,tmp:WA,common:YA,installing:jA,installed:XA},UA={fr:NA,en:GA};/*! +Cliquez pour actualiser`},"close-clusters":"Retirer les clusters","save-clusters":"Sauvegarde les clusters dans une propriétés tag"},IA={cancel:"Annuler",submit:"Confirmer",valid:"Valide",invalid:"Invalide",correct:"Correction"},OA={properties:{panoptic:"Propriétés Panoptic",instance:"Propriétés de l'instance",instances:"Propriété des instances",image:"Propriétés d'image",delete:"Voulez vous vraiment supprimer la propriété"}},PA="Vide...",LA="Installation...",MA="Installé",NA={main:_A,modals:SA,tutorial:EA,action:CA,tmp:AA,dropdown:kA,btn:TA,datepicker:IA,common:OA,none:PA,installing:LA,installed:MA},RA={home:{label:{folder:"Folder",name:"Project name",path_placeholder:"Select a folder",create:"Create",cancel:"Cancel"},create_title:"Create project",plugins:{warning:"Warning: we can't control the content of third party plugins",require_url:"Git URL",require_unique_name:"Unique plugin name",require_folder:"Folder selection",error_name_not_unique:"This plugin name is already taken",install_panoptic_ml:"Install PanopticML",install:"Install",load:"Installing..."},projects:{create:"Create new project",create_details:"Create a new panoptic project in a folder.",create_button:"Create",import:"Import project",import_details:"Choose an existing Panoptic folder.",import_button:"Import"}},status:{no_project:"No open Panoptic project"},nav:{folders:{title:"Folders",add:"Add an images folder",del:"Remove",del_alert:"Removing this folder will delete every images from this folder from panoptic"},tasks:{title:"Background task",done:"Done"},properties:{title:"Properties",properties_tooltip:"The various fields associated with each image",import_properties_tooltip:"Import a properties file",export_properties_tooltip:"Export a properties file",hide_property_tooltip:"Show / Hide property in view",linked_property_tooltip:"Property linked to an image instance, for more information read the documentation on instances",hidden_property_tooltip:"This property is not visible in this mode because it is linked to an image instance",expand_property_tooltip:"Show tags",collapse_property_tooltip:"Hide tags",add_property:"New property",delete_property:"Delete",open_tags:"Open tags management"},computed:{title:"Panoptic Properties",computed_tooltip:"Non-modifiable properties generated by panoptic","1_tooltip":"Unique identifier in panoptic","2_tooltip":"Unique signature, two perfectly identical images will have the same sha1","3_tooltip":"Average signature, two visually very similar images will have the same ahash","4_tooltip":"Folder containing the source image","5_tooltip":"Image width","6_tooltip":"Image height","7_tooltip":"Path of the image on disk"}},menu:{add_tab_tooltip:"Create a new tab",rename_tab_tooltip:"Rename tab",delete_tab_tooltip:"Delete tab",search:"Search by text",search_tooltip:"Search for images matching the text using the CLIP template",grid_tooltip:"Switch to image grid view",table_tooltip:"Switch to table view",graph_tooltip:"Switch to chart view",image_size_tooltip:"Image size",all_images:"Instances",sha1_images:"Images",image_mode:"Stack identical images",image_mode_tooltip:"Switch between instance and image modes, in image mode, only properties common to all instances of an image will be displayed.",selected_images:"selected images",tag_selection:"Tag the ",remove_selection_tooltip:"Cancel selection",filters:"Filter ",groupby:"Group ",sort:{title:"Sort ",group_order_az_tooltip:"Sort groups by name",group_order_nb_tooltip:"Sort groups by number of images",order_desc:"Sort by descending order",order_asc:"Sort in ascending order"},import_status_title:"Status Import",issue:"Create an Issue"},recommand:{title:"Image suggestions",tooltip:"Images considered to be visually and/or semantically related",accept:"Add to selected group",refuse:"Remove similar images",group:"Go to group"},view:{all_group:"All",group_clusters:"Clusters",groupes_nb:"Groups",group_clusters_tooltip:"Uses a machine learning algorithm (Kmeans) to propose temporary groups by image similarity. See the documentation on clusters for more information.",remove_clusters:"Close clusters",cluster_score_tooltip:"Cluster consistency score. See cluster documentation for more information",instances_tooltip:"Number of instances of this image",collapse:"Collapse"},"graph-view":{histo:"Histogram",curve:"LineChart",stack:"Stack",over:"UnStack",info:"Click on the legend to show images of all datapoints"}},DA={fs:{fast:"Quick Access",partitions:"Disks",images:"Select the folder you want to add images from",import:"Select the project folder to import",create:"Where should project folder be created ?",open:"Select"},image:{similar_images:"Similar images",similar_images_tooltip:"Images considered to be visually and/or semantically close to the current image using the KDTree algorithm and image vectors",unique_properties:"Unique properties",unique_properties_tooltip:"Display properties related to instances of this image",similarity_filter_tooltip:"The minimum similarity percentage that images displayed here must have. For more information, see the documentation on the similarity score.",toggle_property_tooltip:"Show / Hide this property in the 'Similar images' view",fill_property_tooltip:"Tag all similar images with the value of this property",history:"History",main_filter_tooltip:"Toggle global filter"},properties:{title:"New property",input:"Property name",cancel:"Cancel",confirm:"Confirm",text:"Text",text_tooltip:"Text, e.g. tweet content, image description",number:"Numeric",number_tooltip:"Numbers, e.g. the number of likes on twitter, the width of a table",tag:"Tag",tag_tooltip:"A single tag chosen from a list, e.g. an image category, a location, a source",multi_tags:"MultiTags",multi_tags_tooltip:"Like a tag but with the possibility of assigning several at the same time",url:"URL",url_tooltip:"A clickable URL, e.g. the link to the source of an image",date:"Date",date_tooltip:"A date in dd / mm / yyyy format",color:"Color",color_tooltip:"A simple colored square to categorize without assigning a label",checkbox:"Checkbox",checkbox_tooltip:"A checkbox, e.g. 'relevant' / 'irrelevant', 'sensitive / non-sensitive'",type:"Property Type",instance:"Instance Property",image:"Image Property"},filters:{title:"Filters:",remove:"Delete",and:"and",or:"or",where:"Where:",new_filter:"Filter",new_group:"Filter group",operators:{isSet:"is not empty",notSet:"is empty",equal:"=",equalNot:"≠",lower:"<",greater:">",leq:"≤",geq:"≥",startsWith:"begins with",like:"contains",notLike:"doesn't containt",containsAny:"contains",containsNot:"does not contain",containsAll:"contains all",isTrue:"is",isFalse:"is not"}},tagging:{button:"Tag the group",title:"Properties",cancel:"Cancel",clear:"Clear",apply:"Apply",erase:"Erase",erase_tooltip:"Erase this field for whole selection",cancel_tooltip:"Cancel changes"},tags:{filter_tree:"Display only selected tags",unselect_tree:"Cancel selection",merge_tree:"Merge tags",tree_view:"Tree View",list_view:"List view",click_to_select:"Click to select tags",click_any:"Click to select",col_title_all:"All tags",col_title_children:"Children tags",col_title_siblings:"Siblings tags",col_title_parents:"Parents tags"},export:{title:"Export Data",images:"Only images from the tab",properties:"Only visible properties",export:"Export",name:"Folder Name",name_placeholder:"Optional",mode_label:"Mode",mode_image:"Image",mode_instance:"Instance",selection_label:"Selection",selection_all:"All",selection_selected:"Selected",selection_filtered:"Filtered",properties_label:"Properties",properties_all:"All",properties_visible:"Visible",properties_none:"None",export_images:"Include images",key_label:"Image identifier",id:"ID",local_path:"Relative path",global_path:"Absolute path"},settings:{title:"Project Parameters"},import:{title:"Import File",help:{0:"A valid file is of type .csv and must:",1:"Be ';' separated",2:"Have as first column either:",3:"path: un relative or absolute path of the image file",4:"id: a panoptic id (linking to an already imported image inside panoptic)",5:"The remaining columns must be named like this : propertyname[property_type]",6:"For instance: categories[multi_tags]",7:"If using a multi_tags property, tags should be comma separated inside the column",8:"Names of the property types: ",9:"Name in panoptic",10:"Name to use when importing"}},first:{introduction:"Welcome to Panoptic, a program that lets you explore large corpora of images by manipulating them through their properties and using machine learning tools. The latter are not installed as standard, to limit the size of Panoptic should they not be of interest to you. However, it is recommended that you install them to benefit from Panoptic's full functionalities.",install_ml:"Install Similarity Plugin"}},$A={buttons:{skip:"Skip",next:"Next",finish:"Finish"},"step-1":"Welcome to Panoptic, you don't have any projects at the moment.","step-2":"Click here to create a new project.","step-3":"Select here the folder where Panoptic data will be stored (note: this is not the folder where the images come from).","step-3a":"Choose the folder to create the project in and confirm.","step-3b":"Enter a project name and click to finalize and create the project.","step-4":"You don't have any images at the moment, click here to add an image folder.","step-4b":"Choose your image folder and click here to confirm.","step-5":"Images are imported here, and calculations are performed, this may take some time.","step-6":"Before calculations are complete, you can create a property. Properties are used to create annotations.","step-7":"You need to choose the property type, for this example choose Label type, you can hover over the other types for more information.","step-8":"Also enter a name, for example 'category' and confirm.","step-9":"The property now appears under all images with the value 'None', click on it to edit this value, and enter a keyword, for example 'test'.","step-10":"So you have just assigned the label 'test' to this image. Besides annotations, properties allow filtering, grouping, and sorting of images.","step-11":"You can now group images by pressing '+' and selecting 'category'. This will create two groups of images 'category: undefined' and 'category: test'.","step-12":"If you assign the value 'test' to another image, it will automatically be moved to the 'category: test' group.","step-13":"Hover over an image in the 'category: undefined' group and click on the selection icon in the top left corner.","step-13a":"Select multiple images in the same way, or hold SHIFT and click the selection icon of another image to select all images between them.","step-13b":"You can now assign a value to multiple images at once, for example the value 'test2' which will create a new group of images; 'category: test2'.","step-14":"Click 'category' again to remove grouping. Filters and sorts work in the same way.","step-14b":"Click here to create a new tab, filters, groups, and sorts are specific to each tab and allow easy switching between sub-corpora.","step-15":"Once calculations are complete, you can use Panoptic's machine learning features. For example, to create automatic groups.","step-16":"Click on an image to open it in full size, similar images to this image are displayed on the side.","step-17":"Find more detailed tutorials on the CERES website: https://ceres.sorbonne-universite.fr/outils/panoptic"},FA={find_similar:"Similar",group:"Create Clusters",filter:"Filter",action_images:"Image Actions",action_group:"Group Actions",import:"Import",export:"Export",execute:"Run"},zA={history:{info:"History of modifications",button:"History",values:"modified values",tags:"modified tags",undo:"Undo",redo:"Redo"},action:{execute:"Run a plugin function",group:"Run a clustering function"}},HA={reload:{auto:"Hot reload, click to deactivate",valid:"Up to-date, click to activate hot-reload",dirty:"Data is not up to-date, click to reload"},"close-clusters":"Close clusters","save-clusters":"Save the clusters in a new property"},VA={cancel:"Cancel",submit:"Submit",valid:"Valid",invalid:"Invalid",correct:"Rectify"},BA="Empty...",WA="Tooltip to be written",YA={properties:{panoptic:"Panoptic properties",instance:"Instance properties",instances:"All instances properties",image:"Image properties",delete:"Do you really want to delete property"}},jA="Installing",XA="Installed",GA={main:RA,modals:DA,tutorial:$A,action:FA,dropdown:zA,btn:HA,datepicker:VA,none:BA,tmp:WA,common:YA,installing:jA,installed:XA},UA={fr:NA,en:GA};/*! * shared v9.4.1 * (c) 2023 kazuya kawaguchi * Released under the MIT License. @@ -31,7 +31,7 @@ Cliquez pour actualiser`},"close-clusters":"Retirer les clusters","save-clusters `).forEach(function(c){a=c.indexOf(":"),i=c.substring(0,a).trim().toLowerCase(),n=c.substring(a+1).trim(),!(!i||t[i]&&pL[i])&&(i==="set-cookie"?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)}),t},ib=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function iu(e){return e===!1||e==null?e:Ge.isArray(e)?e.map(iu):String(e)}function mL(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(e);)t[n[1]]=n[2];return t}const vL=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uh(e,t,i,n,a){if(Ge.isFunction(n))return n.call(this,t,i);if(a&&(t=i),!!Ge.isString(t)){if(Ge.isString(n))return t.indexOf(n)!==-1;if(Ge.isRegExp(n))return n.test(t)}}function bL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,n)=>i.toUpperCase()+n)}function yL(e,t){const i=Ge.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+i,{value:function(a,l,c){return this[n].call(this,t,a,l,c)},configurable:!0})})}class Ad{constructor(t){t&&this.set(t)}set(t,i,n){const a=this;function l(d,p,m){const b=jo(p);if(!b)throw new Error("header name must be a non-empty string");const w=Ge.findKey(a,b);(!w||a[w]===void 0||m===!0||m===void 0&&a[w]!==!1)&&(a[w||p]=iu(d))}const c=(d,p)=>Ge.forEach(d,(m,b)=>l(m,b,p));return Ge.isPlainObject(t)||t instanceof this.constructor?c(t,i):Ge.isString(t)&&(t=t.trim())&&!vL(t)?c(gL(t),i):t!=null&&l(i,t,n),this}get(t,i){if(t=jo(t),t){const n=Ge.findKey(this,t);if(n){const a=this[n];if(!i)return a;if(i===!0)return mL(a);if(Ge.isFunction(i))return i.call(this,a,n);if(Ge.isRegExp(i))return i.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=jo(t),t){const n=Ge.findKey(this,t);return!!(n&&this[n]!==void 0&&(!i||uh(this,this[n],n,i)))}return!1}delete(t,i){const n=this;let a=!1;function l(c){if(c=jo(c),c){const d=Ge.findKey(n,c);d&&(!i||uh(n,n[d],d,i))&&(delete n[d],a=!0)}}return Ge.isArray(t)?t.forEach(l):l(t),a}clear(t){const i=Object.keys(this);let n=i.length,a=!1;for(;n--;){const l=i[n];(!t||uh(this,this[l],l,t,!0))&&(delete this[l],a=!0)}return a}normalize(t){const i=this,n={};return Ge.forEach(this,(a,l)=>{const c=Ge.findKey(n,l);if(c){i[c]=iu(a),delete i[l];return}const d=t?bL(l):String(l).trim();d!==l&&delete i[l],i[d]=iu(a),n[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return Ge.forEach(this,(n,a)=>{n!=null&&n!==!1&&(i[a]=t&&Ge.isArray(n)?n.join(", "):n)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const n=new this(t);return i.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[ib]=this[ib]={accessors:{}}).accessors,a=this.prototype;function l(c){const d=jo(c);n[d]||(yL(a,c),n[d]=!0)}return Ge.isArray(t)?t.forEach(l):l(t),this}}Ad.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ge.reduceDescriptors(Ad.prototype,({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[i]=n}}});Ge.freezeMethods(Ad);const Yn=Ad;function dh(e,t){const i=this||rg,n=t||i,a=Yn.from(n.headers);let l=n.data;return Ge.forEach(e,function(d){l=d.call(i,l,a.normalize(),t?t.status:void 0)}),a.normalize(),l}function Lw(e){return!!(e&&e.__CANCEL__)}function ic(e,t,i){qt.call(this,e??"canceled",qt.ERR_CANCELED,t,i),this.name="CanceledError"}Ge.inherits(ic,qt,{__CANCEL__:!0});function xL(e,t,i){const n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):t(new qt("Request failed with status code "+i.status,[qt.ERR_BAD_REQUEST,qt.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}const wL=hn.hasStandardBrowserEnv?{write(e,t,i,n,a,l){const c=[e+"="+encodeURIComponent(t)];Ge.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),Ge.isString(n)&&c.push("path="+n),Ge.isString(a)&&c.push("domain="+a),l===!0&&c.push("secure"),document.cookie=c.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _L(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SL(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Mw(e,t){return e&&!_L(t)?SL(e,t):t}const EL=hn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let n;function a(l){let c=l;return t&&(i.setAttribute("href",c),c=i.href),i.setAttribute("href",c),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return n=a(window.location.href),function(c){const d=Ge.isString(c)?a(c):c;return d.protocol===n.protocol&&d.host===n.host}}():function(){return function(){return!0}}();function CL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function AL(e,t){e=e||10;const i=new Array(e),n=new Array(e);let a=0,l=0,c;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),b=n[l];c||(c=m),i[a]=p,n[a]=m;let w=l,_=0;for(;w!==a;)_+=i[w++],w=w%e;if(a=(a+1)%e,a===l&&(l=(l+1)%e),m-c{const l=a.loaded,c=a.lengthComputable?a.total:void 0,d=l-i,p=n(d),m=l<=c;i=l;const b={loaded:l,total:c,progress:c?l/c:void 0,bytes:d,rate:p||void 0,estimated:p&&c&&m?(c-l)/p:void 0,event:a};b[t?"download":"upload"]=!0,e(b)}}const kL=typeof XMLHttpRequest<"u",TL=kL&&function(e){return new Promise(function(i,n){let a=e.data;const l=Yn.from(e.headers).normalize();let{responseType:c,withXSRFToken:d}=e,p;function m(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}let b;if(Ge.isFormData(a)){if(hn.hasStandardBrowserEnv||hn.hasStandardBrowserWebWorkerEnv)l.setContentType(!1);else if((b=l.getContentType())!==!1){const[O,...M]=b?b.split(";").map(N=>N.trim()).filter(Boolean):[];l.setContentType([O||"multipart/form-data",...M].join("; "))}}let w=new XMLHttpRequest;if(e.auth){const O=e.auth.username||"",M=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";l.set("Authorization","Basic "+btoa(O+":"+M))}const _=Mw(e.baseURL,e.url);w.open(e.method.toUpperCase(),Tw(_,e.params,e.paramsSerializer),!0),w.timeout=e.timeout;function C(){if(!w)return;const O=Yn.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),N={data:!c||c==="text"||c==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:O,config:e,request:w};xL(function(D){i(D),m()},function(D){n(D),m()},N),w=null}if("onloadend"in w?w.onloadend=C:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(C)},w.onabort=function(){w&&(n(new qt("Request aborted",qt.ECONNABORTED,e,w)),w=null)},w.onerror=function(){n(new qt("Network Error",qt.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let M=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const N=e.transitional||Iw;e.timeoutErrorMessage&&(M=e.timeoutErrorMessage),n(new qt(M,N.clarifyTimeoutError?qt.ETIMEDOUT:qt.ECONNABORTED,e,w)),w=null},hn.hasStandardBrowserEnv&&(d&&Ge.isFunction(d)&&(d=d(e)),d||d!==!1&&EL(_))){const O=e.xsrfHeaderName&&e.xsrfCookieName&&wL.read(e.xsrfCookieName);O&&l.set(e.xsrfHeaderName,O)}a===void 0&&l.setContentType(null),"setRequestHeader"in w&&Ge.forEach(l.toJSON(),function(M,N){w.setRequestHeader(N,M)}),Ge.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),c&&c!=="json"&&(w.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&w.addEventListener("progress",sb(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",sb(e.onUploadProgress)),(e.cancelToken||e.signal)&&(p=O=>{w&&(n(!O||O.type?new ic(null,e,w):O),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p)));const I=CL(_);if(I&&hn.protocols.indexOf(I)===-1){n(new qt("Unsupported protocol "+I+":",qt.ERR_BAD_REQUEST,e));return}w.send(a||null)})},Mf={http:JP,xhr:TL};Ge.forEach(Mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nb=e=>`- ${e}`,IL=e=>Ge.isFunction(e)||e===null||e===!1,Nw={getAdapter:e=>{e=Ge.isArray(e)?e:[e];const{length:t}=e;let i,n;const a={};for(let l=0;l`adapter ${d} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=t?l.length>1?`since : `+l.map(nb).join(` -`):" "+nb(l[0]):"as no adapter specified";throw new qt("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n},adapters:Mf};function hh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ic(null,e)}function rb(e){return hh(e),e.headers=Yn.from(e.headers),e.data=dh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nw.getAdapter(e.adapter||rg.adapter)(e).then(function(n){return hh(e),n.data=dh.call(e,e.transformResponse,n),n.headers=Yn.from(n.headers),n},function(n){return Lw(n)||(hh(e),n&&n.response&&(n.response.data=dh.call(e,e.transformResponse,n.response),n.response.headers=Yn.from(n.response.headers))),Promise.reject(n)})}const ab=e=>e instanceof Yn?e.toJSON():e;function mo(e,t){t=t||{};const i={};function n(m,b,w){return Ge.isPlainObject(m)&&Ge.isPlainObject(b)?Ge.merge.call({caseless:w},m,b):Ge.isPlainObject(b)?Ge.merge({},b):Ge.isArray(b)?b.slice():b}function a(m,b,w){if(Ge.isUndefined(b)){if(!Ge.isUndefined(m))return n(void 0,m,w)}else return n(m,b,w)}function l(m,b){if(!Ge.isUndefined(b))return n(void 0,b)}function c(m,b){if(Ge.isUndefined(b)){if(!Ge.isUndefined(m))return n(void 0,m)}else return n(void 0,b)}function d(m,b,w){if(w in t)return n(m,b);if(w in e)return n(void 0,m)}const p={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:d,headers:(m,b)=>a(ab(m),ab(b),!0)};return Ge.forEach(Object.keys(Object.assign({},e,t)),function(b){const w=p[b]||a,_=w(e[b],t[b],b);Ge.isUndefined(_)&&w!==d||(i[b]=_)}),i}const Rw="1.6.2",ag={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ag[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ob={};ag.transitional=function(t,i,n){function a(l,c){return"[Axios v"+Rw+"] Transitional option '"+l+"'"+c+(n?". "+n:"")}return(l,c,d)=>{if(t===!1)throw new qt(a(c," has been removed"+(i?" in "+i:"")),qt.ERR_DEPRECATED);return i&&!ob[c]&&(ob[c]=!0,console.warn(a(c," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(l,c,d):!0}};function OL(e,t,i){if(typeof e!="object")throw new qt("options must be an object",qt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const l=n[a],c=t[l];if(c){const d=e[l],p=d===void 0||c(d,l,e);if(p!==!0)throw new qt("option "+l+" must be "+p,qt.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new qt("Unknown option "+l,qt.ERR_BAD_OPTION)}}const Nf={assertOptions:OL,validators:ag},ar=Nf.validators;class Ou{constructor(t){this.defaults=t,this.interceptors={request:new tb,response:new tb}}request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=mo(this.defaults,i);const{transitional:n,paramsSerializer:a,headers:l}=i;n!==void 0&&Nf.assertOptions(n,{silentJSONParsing:ar.transitional(ar.boolean),forcedJSONParsing:ar.transitional(ar.boolean),clarifyTimeoutError:ar.transitional(ar.boolean)},!1),a!=null&&(Ge.isFunction(a)?i.paramsSerializer={serialize:a}:Nf.assertOptions(a,{encode:ar.function,serialize:ar.function},!0)),i.method=(i.method||this.defaults.method||"get").toLowerCase();let c=l&&Ge.merge(l.common,l[i.method]);l&&Ge.forEach(["delete","get","head","post","put","patch","common"],I=>{delete l[I]}),i.headers=Yn.concat(c,l);const d=[];let p=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(i)===!1||(p=p&&O.synchronous,d.unshift(O.fulfilled,O.rejected))});const m=[];this.interceptors.response.forEach(function(O){m.push(O.fulfilled,O.rejected)});let b,w=0,_;if(!p){const I=[rb.bind(this),void 0];for(I.unshift.apply(I,d),I.push.apply(I,m),_=I.length,b=Promise.resolve(i);w<_;)b=b.then(I[w++],I[w++]);return b}_=d.length;let C=i;for(w=0;w<_;){const I=d[w++],O=d[w++];try{C=I(C)}catch(M){O.call(this,M);break}}try{b=rb.call(this,C)}catch(I){return Promise.reject(I)}for(w=0,_=m.length;w<_;)b=b.then(m[w++],m[w++]);return b}getUri(t){t=mo(this.defaults,t);const i=Mw(t.baseURL,t.url);return Tw(i,t.params,t.paramsSerializer)}}Ge.forEach(["delete","get","head","options"],function(t){Ou.prototype[t]=function(i,n){return this.request(mo(n||{},{method:t,url:i,data:(n||{}).data}))}});Ge.forEach(["post","put","patch"],function(t){function i(n){return function(l,c,d){return this.request(mo(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Ou.prototype[t]=i(),Ou.prototype[t+"Form"]=i(!0)});const su=Ou;class og{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(l){i=l});const n=this;this.promise.then(a=>{if(!n._listeners)return;let l=n._listeners.length;for(;l-- >0;)n._listeners[l](a);n._listeners=null}),this.promise.then=a=>{let l;const c=new Promise(d=>{n.subscribe(d),l=d}).then(a);return c.cancel=function(){n.unsubscribe(l)},c},t(function(l,c,d){n.reason||(n.reason=new ic(l,c,d),i(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}static source(){let t;return{token:new og(function(a){t=a}),cancel:t}}}const PL=og;function LL(e){return function(i){return e.apply(null,i)}}function ML(e){return Ge.isObject(e)&&e.isAxiosError===!0}const Rf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rf).forEach(([e,t])=>{Rf[t]=e});const NL=Rf;function Dw(e){const t=new su(e),i=mw(su.prototype.request,t);return Ge.extend(i,su.prototype,t,{allOwnKeys:!0}),Ge.extend(i,t,null,{allOwnKeys:!0}),i.create=function(a){return Dw(mo(e,a))},i}const Ri=Dw(rg);Ri.Axios=su;Ri.CanceledError=ic;Ri.CancelToken=PL;Ri.isCancel=Lw;Ri.VERSION=Rw;Ri.toFormData=Cd;Ri.AxiosError=qt;Ri.Cancel=Ri.CanceledError;Ri.all=function(t){return Promise.all(t)};Ri.spread=LL;Ri.isAxiosError=ML;Ri.mergeConfig=mo;Ri.AxiosHeaders=Yn;Ri.formToJSON=e=>Pw(Ge.isHTMLForm(e)?new FormData(e):e);Ri.getAdapter=Nw.getAdapter;Ri.HttpStatusCode=NL;Ri.default=Ri;const Yt=Ri;var He=(e=>(e.multi_tags="multi_tags",e.tag="tag",e.string="text",e.number="number",e.date="date",e.color="color",e.url="url",e.checkbox="checkbox",e.path="path",e.image_link="image_link",e._ahash="ahash",e._sha1="sha1",e._folders="folder",e._id="id",e._width="width",e._height="height",e))(He||{}),ki=(e=>(e.sha1="sha1",e.id="id",e))(ki||{}),Pu=(e=>(e[e.id=-1]="id",e[e.sha1=-2]="sha1",e[e.ahash=-3]="ahash",e[e.folders=-4]="folders",e[e.width=-5]="width",e[e.height=-6]="height",e))(Pu||{});function Df(e,t,i,n,a=-1){return{id:e,propertyId:t,value:i,parents:n??[],color:a}}var Hi=(e=>(e.IMAGE="image",e.IMAGE_ZOOM="image_zoom",e.PROPERTY="property",e.SHA1PILE="sha1pile",e.FOLDERTOPROP="folder_to_property",e.EXPORT="export",e.FOLDERSELECTION="explorer",e.SETTINGS="settings",e.IMPORT="import",e.TAG="tag",e.FIRSTMODAL="firstmodal",e))(Hi||{});const Mr=[{name:"red",color:"#ff8787"},{name:"pink",color:"#f783ac"},{name:"grape",color:"#da77f2"},{name:"violet",color:"#9775fa"},{name:"indigo",color:"#748ffc"},{name:"blue",color:"#4dabf7"},{name:"cyan",color:"#3bc9db"},{name:"teal",color:"#38d9a9"},{name:"green",color:"#69db7c"},{name:"lime",color:"#a9e34b"},{name:"yellow",color:"#ffd43b"},{name:"orange",color:"#ffa94d"}];var ti=(e=>(e.Year="Year",e.Month="Month",e.Week="Week",e.Day="Day",e.Hour="Hour",e.Minute="Minute",e.Second="Second",e))(ti||{});const RL={Year:1,Month:1,Week:60*60*24*7,Day:60*60*24,Hour:60*60,Minute:60,Second:1};class DL{constructor(t,i,n,a,l,c){$t(this,"images");$t(this,"state");$t(this,"filterManager");$t(this,"sortManager");$t(this,"groupManager");$t(this,"options");this.filterManager=new WL(i),this.sortManager=new ZL(n),this.groupManager=new Aa(a,l),this.state=Wt({isDirty:!1}),this.filterManager.onChange.addListener(this.onFilter.bind(this)),this.sortManager.onChange.addListener(this.onSort.bind(this)),this.groupManager.onChange.addListener(this.onGroup.bind(this)),this.filterManager.onDirty.addListener(()=>this.setDirty()),this.options=c??{autoReload:!1},yt().onChange.addListener(p=>this.updateInstances(p))}load(t,i,n){this.filterManager.load(t),this.sortManager.load(i),this.groupManager.load(n)}verifyState(){const t=yt();this.filterManager.verifyState(t.properties),this.sortManager.verifyState(t.properties),this.groupManager.verifyState(t.properties)}async setDirty(t){if(this.state.isDirty=!0,this.options.autoReload)if(t){const i=await this.filterManager.updateSelection(t);this.sortManager.updateSelection(i.updated,i.removed),this.groupManager.lastOrder=this.sortManager.result.order,this.groupManager.updateSelection(i.updated,i.removed),this.state.isDirty=!1}else this.update()}async update(t){if(this.images=t??this.images,!this.images)return;const i=await this.filterManager.filter(Ls(this.images)),n=this.sortManager.sort(i.images);this.groupManager.group(n.images,n.order,!0),this.state.isDirty=!1}onFilter(t){const i=this.sortManager.sort(t.images);this.groupManager.group(i.images,i.order,!0)}onSort(t){this.groupManager.sort(t.order,!0)}onGroup(){}updateInstances(t){this.setDirty(t)}}class $L{constructor(t){$t(this,"isLoaded");$t(this,"state");$t(this,"collection");$t(this,"onLoad");this.isLoaded=!1,this.state=Wt({}),this.collection=new DL(void 0,void 0,void 0,void 0,void 0,this.state),this.onLoad=new vo,t&&this.load(t)}async load(t){const i=yt();Object.assign(this.state,Ea(t)),t&&(this.collection.load(t.filterState,t.sortState,t.groupState),this.verifyState(),this.isLoaded=!0,await this.collection.update(i.instances),this.onLoad.emit())}verifyState(){const t=yt();this.collection.verifyState(),this.state.propertyOptions==null&&(this.state.propertyOptions={});for(let i in t.properties)this.state.propertyOptions[i]=Object.assign(Vw(),this.state.propertyOptions[i])}saveState(){Ii().updateTabs()}setVisibleProperty(t,i){this.state.visibleProperties[t]=i}isVisibleProperty(t){return this.state.visibleProperties[t]}getSha1Mode(){return this.collection.groupManager.state.sha1Mode}getVisibleProperties(){return yt().propertyList.filter(i=>this.isVisibleProperty(i.id))}getVisibleSha1Properties(){return this.getVisibleProperties().filter(t=>t.mode==ki.sha1)}}let or;ss({count:0});const $w=2,Ii=gd("projectStore",()=>{let e=0;const t=yt(),i=ye(!1),n=ss({}),a=Wt({tabs:{},selectedTabId:void 0,plugins:[],vectors:{},counter:0,settings:{}}),l=Wt({loaded:!1,projectNotOpen:!1,changed:!1,renderNb:0,onUndo:0,import:{}}),c=ye({}),d=ye(null);async function p(){console.log("init"),or||(or=new $L);let re=await mb(),Z=await vb(),U=await PM(),fe=await pM(),he=await $M();d.value=(await bb()).status,a.plugins=re,a.vectors=U,c.value=Z,a.settings=he,e+=1,m(e),H(),localStorage.getItem("tutorialFinished")!="true"&&(i.value=!0),await t.init(),await $(fe),C(),l.loaded=!0}async function m(re){for(;e==re;){const Z=await bb();if(e!=re)return;if(Z&&(Z.status&&await I(Z.status),Z.actions&&b(Z.actions),Z.plugins&&w(Z.plugins),Z.commits)){for(let U of Z.commits)t.applyCommit(U);or.collection.update()}await Gw(1e3)}}function b(re){c.value={},re.forEach(Z=>c.value[Z.id]=Z)}function w(re){a.plugins=re}function _(){Object.assign(a,{tabs:{},selectedTabId:void 0,plugins:[],vectors:{},counter:0,settings:{}}),Object.assign(l,{loaded:!1,projectNotOpen:!1,changed:!1,renderNb:0,onUndo:0,import:{}}),c.value={},d.value=null,or=void 0,e=0,t.clear()}function C(){or.verifyState()}async function I(re){d.value=re}async function O(){await At(),p()}function M(){return Q().state}async function N(re){let Z=YL();Z.name=re;const U=Math.max(-1,...Object.keys(a.tabs).map(Number))+1;Z.id=U,a.tabs[U]=Z,ph(a.tabs),await P(U)}async function k(re){if(Cs(a.tabs).length==1)await N("Tab1");else{let Z=Cs(a.tabs).sort((U,fe)=>U.id-fe.id).findIndex(U=>U.id==re);Z=Z!=0?Z-1:1,await P(Cs(a.tabs)[Z].id)}delete a.tabs[re],await ph(a.tabs)}async function D(){Object.assign(a.tabs[a.selectedTabId],or.state),await ph(a.tabs)}async function P(re){Cs(a.tabs).forEach(Z=>{Z.id==re?Z.selected=!0:Z.selected=!1}),a.selectedTabId=re,await or.load(a.tabs[a.selectedTabId]),H()}async function $(re){for(let Z of Object.values(re))Z.version==$w&&(a.tabs[Z.id]=Z);if(Object.keys(a.tabs).length==0)await N("Tab1");else{const Z=Cs(a.tabs).find(U=>U.selected);Z?await P(Z.id):await P(re[0].id)}H()}function H(){for(let re in a.tabs){const Z=a.tabs[re];Z.propertyOptions==null&&(Z.propertyOptions={});for(let U in t.properties)Z.propertyOptions[U]=Object.assign(Vw(),Z.propertyOptions[U])}}function ee(){l.renderNb+=1}async function se(re){const Z=await gM(re);return p(),Z}function Q(){return or}function te(){l.import.to_import=void 0}async function ce(){a.plugins=await mb(),c.value=await vb()}async function oe(re,Z){const U=await OM(re,Z);a.plugins=U}async function de(re){a.vectors=await LM(re)}async function be(re){const Z=await Kw(re);return Z.commit&&(t.applyCommit(Z.commit),Z.commit.properties&&Z.commit.properties.forEach(U=>M().visibleProperties[U.id]=!0)),Z}async function Ce(re){const Z=await FM(re);a.settings=Z}return{data:a,status:l,images:n,init:p,clear:_,rerender:ee,addTab:N,removeTab:k,updateTabs:D,selectTab:P,getTab:M,getTabManager:Q,updateSettings:Ce,uploadPropFile:se,clearImport:te,updatePluginInfos:ce,setPluginParams:oe,call:be,actions:c,setDefaultVectors:de,backendStatus:d,reload:O,updatePropertyOptions:H,showTutorial:i}});function l6(e){switch(e){case"contains":case"containsAll":case"containsAny":case"containsNot":case"equal":case"equalNot":case"geq":case"greater":case"leq":case"lower":case"like":case"notLike":case"startsWith":return!0;default:return!1}}function FL(e){switch(e){case He.checkbox:return["isTrue","isFalse"];case He.color:return["isSet","notSet","equal","equalNot"];case He.date:return["isSet","notSet","equal","equalNot","leq","lower","greater","geq"];case He.image_link:return["isSet","notSet","equal","equalNot"];case He.multi_tags:return["isSet","notSet","containsAll","containsAny","containsNot"];case He.number:return["isSet","notSet","equal","equalNot","leq","lower","greater","geq"];case He.path:return["isSet","notSet","equal","equalNot","startsWith","like","notLike"];case He.string:return["isSet","notSet","equal","equalNot","startsWith","like","notLike"];case He.tag:return["isSet","notSet","containsAny","containsNot"];case He.url:return["isSet","notSet","equal","equalNot","like","notLike","startsWith"];case He._ahash:case He._sha1:return["equal","equalNot","like","notLike"];case He._width:case He._height:return["equal","lower","leq","greater","geq"];case He._id:return["equal","equalNot"];default:return[]}}var zL=(e=>(e.equal="equal",e.equalNot="equalNot",e.like="like",e.notLike="notLike",e.lower="lower",e.leq="leq",e.greater="greater",e.geq="geq",e.isTrue="isTrue",e.isFalse="isFalse",e.contains="contains",e.startsWith="startsWith",e.containsAny="containsAny",e.containsAll="containsAll",e.containsNot="containsNot",e.and="and",e.or="or",e.isSet="isSet",e.notSet="notSet",e))(zL||{});const HL={geq:(e,t)=>t==null?!0:e==null?!1:e>=t,leq:(e,t)=>t==null?!0:e==null?!1:e<=t,lower:(e,t)=>t==null?!0:e==null?!1:et==null?!0:e==null?!1:e>t,and:(e,t)=>e&&t,or:(e,t)=>e||t,contains:(e,t)=>Ai(t)?!0:Ai(e)?!1:e.includes(t),containsAll:(e,t)=>{if(Ai(t))return!0;if(Ai(e))return!1;for(let i of e)for(let n of t)if(!n.has(i))return!1;return!0},containsAny:(e,t)=>{if(Ai(t))return!0;if(Ai(e))return!1;for(let i of e)for(let n of t)if(n.has(i))return!0;return!1},containsNot:(e,t)=>{if(Ai(t)||Ai(e))return!0;for(let i of e)for(let n of t)if(n.has(i))return!1;return!0},equal:(e,t)=>Ai(t)?!0:Ai(e)?!1:e==t,equalNot:(e,t)=>Ai(t)||Ai(e)?!0:e!=t,isFalse:e=>Ai(e)?!0:e==!1,isTrue:e=>e,isSet:e=>!Ai(e),notSet:e=>Ai(e),startsWith:(e,t)=>Ai(t)?!0:Ai(e)?!1:e.startsWith(t),like:(e,t)=>Ai(t)?!0:Ai(e)?!1:e.match(t),notLike:(e,t)=>Ai(t)?!0:Ai(e)?!1:!e.match(t)};function Fw(){return{filters:[],groupOperator:"and",depth:0,isGroup:!0,id:-1}}function zw(){const e=Fw();return Wt({folders:[],filter:e,query:""})}function VL(e){switch(e){case He.checkbox:return"isTrue";case He.color:case He.image_link:case He.number:case He.string:case He.path:case He.url:case He.multi_tags:case He.tag:return"isSet";case He.date:return"greater";default:return"equal"}}function Ai(e){return e===void 0||e===""||Array.isArray(e)&&e.length===0||e===null}function BL(e,t,i,n){const a=i[e.propertyId],l=t.map(b=>b.properties[a.id]),c=HL[e.operator];let d=e.value;if(ji(a.type)&&d){const b=d.map(w=>new Set([...n[w].allChildren,w]));d=new Set(b)}if(a.type==He.date){d&&(d=new Date(d));for(let[b,w]of l.entries())w&&(l[b]=new Date(w))}if(a.type==He.string){d&&(d=d.toLowerCase());for(let[b,w]of l.entries())w&&(l[b]=w.toLowerCase())}const p=[],m=[];for(let b=0;bi.instances[d]),a=[];for(let d of this.result.images)t.has(d.id)||a.push(d.id);const l=this.filterInstances(n);for(let d of l.valid)a.push(d.id);return this.result.images=a.map(d=>i.instances[d]),console.timeEnd("UpdateFilter"),{updated:new Set(l.valid.map(d=>d.id)),removed:new Set(l.reject.map(d=>d.id))}}filterInstances(t){const i=yt();let n=t;if(this.state.query){const l=this.state.query.toLocaleLowerCase();Ii();const c=Ls(i.properties),d=c.filter(m=>m.type==He.string),p=c.filter(m=>ji(m.type));n=n.filter(m=>{for(let b of d)if(m.properties[b.id]&&m.properties[b.id]&&m.properties[b.id].toLocaleLowerCase().includes(l))return!0;for(let b of p){const w=m.properties[b.id];if(!w)continue;const _=w.map(C=>i.tags[C].value.toLocaleLowerCase());for(let C of _)if(C.includes(l))return!0}return!1})}if(this.state.folders.length>0){const l=new Set(this.state.folders);n=n.filter(c=>l.has(c.folderId))}return Hw(this.state.filter,n,i.properties,i.tags)}setFolders(t){this.state.folders=t}setQuery(t){this.state.query=t}addNewFilterGroup(t=void 0){let i=Fw();if(t!=null){let l=this.filterIndex[t];if(l==null)throw"Invalid Parent !";l.filters.push(i);const c=l.filters[l.filters.length-1];return this.registerFilter(c),this.onDirty.emit(),c}const n=this.state.filter;n.filters.push(i);const a=n.filters[n.filters.length-1];return this.registerFilter(a),this.onDirty.emit(),a}addNewFilter(t,i=void 0){let n=this.createFilter(t);if(i!=null){let c=this.filterIndex[i];if(c==null)throw new Error("group is undefined");if(!c.isGroup)throw new TypeError("Parent filter is not a FilterGroup, cannot add filter to it");c.filters.push(n);const d=c.filters[c.filters.length-1];return this.registerFilter(d),this.onDirty.emit(),d}const a=this.state.filter;a.filters.push(n);const l=a.filters[a.filters.length-1];return this.registerFilter(l),this.onDirty.emit(),l}deleteFilter(t){Object.values(this.filterIndex).forEach(i=>{if(!i.isGroup)return;const n=i;n.filters=n.filters.filter(a=>a.id!=t)}),delete this.filterIndex[t],this.onDirty.emit()}updateFilter(t,i){const n=yt();if(this.filterIndex[t]==null||this.filterIndex[t].isGroup)return;const a=this.filterIndex[t];i.propertyId!=null&&this.changeFilter(a,i.propertyId);const l=n.properties[a.propertyId].type;i.operator!=null&&FL(l).includes(i.operator)&&(a.operator=i.operator),i.value?a.value=i.value:a.value=lb(l),this.onDirty.emit()}updateFilterGroup(t,i){if(this.filterIndex[t]==null||!this.filterIndex[t].isGroup)return;const n=this.filterIndex[t];n.groupOperator=i,this.onDirty.emit()}changeFilter(t,i){const n=this.createFilter(i);n.id=t.id,Object.assign(t,n)}verifyState(t){const i=n=>{const a=new Set;n.filters.forEach(l=>{if(l.isGroup)i(l);else{const c=l;(t[c.propertyId]==null||t[c.propertyId].id==Ci)&&a.add(c.id)}}),n.filters=n.filters.filter(l=>!a.has(l.id))};i(this.state.filter)}initFilterState(){const t=zw();this.state=t,this.registerFilter(this.state.filter)}registerFilter(t){return t.id>=0&&console.error("registerFilter should not receive a filter with valid id"),t.id=this.nextIndex(),this.filterIndex[t.id]=t,this.filterIndex[t.id]}createFilter(t){let n=yt().properties[t];return{propertyId:n.id,operator:VL(n.type),value:lb(n.type),id:-1}}nextIndex(){const t=Object.keys(this.filterIndex).map(Number);let i=0;return t.length&&(i=Math.max(...t)+1),i===this.lastFilterId&&(i+=1),this.lastFilterId=i,i}recursiveRegister(t){if(t.id<0?t=this.registerFilter(t):this.filterIndex[t.id]=t,!t.isGroup)return;t.filters.forEach(n=>this.recursiveRegister(n))}}function YL(){return Wt({version:$w,id:-1,name:"Tab",display:"tree",filterState:zw(),sortState:Ww(),groupState:Xw(),imageSize:100,visibleProperties:{},visibleFolders:{},selectedFolders:{},propertyOptions:{},similarityDist:.7,sha1Mode:!0,autoReload:!0})}function lb(e){switch(e){case He.checkbox:return!1;case He.color:return;case He.date:return;case He.number:return;case He.string:case He.image_link:case He.path:case He._sha1:case He.url:case He._ahash:return"";case He.multi_tags:case He.tag:return[];default:return""}}function Vw(){return{size:200}}function Cs(e){return Object.keys(e).map(t=>e[t])}function jL(e){let t=e.width/e.height;return Math.max(Math.min(2,t),1)}function cb(e){let t={};e.forEach(n=>{n.children=[],t[n.id]=n,n.count=0});let i={};return e.forEach(n=>{n.parent&&(i[n.parent]==null&&(i[n.parent]=[]),i[n.parent].push(n))}),Object.keys(i).forEach(n=>{n!=null&&i[n].forEach(a=>{t[n].children.push(a)})}),t}function XL(e){for(let t in e){const i=e[t];i.children=[]}for(let t in e){const i=e[t];i.parents.filter(n=>n>0).forEach(n=>e[n].children.push(i.id))}}const Ci=-999999999,ub="Deleted",yt=gd("dataStore",()=>{const e=new vo,t=new Set;let i=-100;const n=ss({}),a=ss({}),l=ss({}),c=ss({}),d=ye({undo:[],redo:[]}),p=ss({}),m=ye(0),b=we(()=>Object.values(n.value).filter(pe=>pe.parent==null)),w=we(()=>Cs(a.value)),_=we(()=>Cs(l.value)),C=we(()=>Cs(c.value).filter(pe=>pe.id!=Ci));async function I(){let pe=await pb();const xe=cb(pe);n.value=xe,console.time("Request");let Te=await uM();console.timeEnd("Request"),console.time("commit"),ee(Te),console.timeEnd("commit"),await Ee()}function O(){return i-=1,i}function M(){e.emit(t),t.clear()}function N(pe){for(let xe of pe){const Te=oM(xe);xe.urlSmall=el+"/image/small/"+xe.sha1,xe.urlMedium=el+"/image/medium/"+xe.sha1,xe.urlLarge=el+"/image/large/"+xe.sha1,xe.urlRaw=el+"/image/raw/"+xe.sha1,xe.containerRatio=jL(xe),a.value[xe.id]?xe.properties=Object.assign(a.value[xe.id].properties,xe.properties):(Array.isArray(p.value[xe.sha1])||(p.value[xe.sha1]=[]),p.value[xe.sha1].push(xe));for(let ie=0;iel.value[Te.id]==null);for(let Te of pe)Te.id in l.value&&(Te.tags=l.value[Te.id].tags),l.value[Te.id]=Te;xe&&Ii().getTabManager().verifyState()}function D(pe){const xe=new Set;for(let Te of pe)if(Te.id!=Ci){if(c.value[Te.id]?(Te.count=c.value[Te.id].count,w.value.forEach(ie=>t.add(ie.id))):Te.count=0,Te.parents=Te.parents.filter(ie=>ie!=0),c.value[Te.id]=Te,!(Te.propertyId in l.value)){console.warn("Property "+Te.propertyId+" must be loaded before importing tags");continue}l.value[Te.propertyId].tags||(l.value[Te.propertyId].tags={}),l.value[Te.propertyId].tags[Te.id]=Te,xe.add(Te.propertyId)}for(let Te of xe)XL(l.value[Te].tags);for(let Te of Cs(c.value))Te.allChildren=sM(Te,c.value),Te.allChildren.splice(Te.allChildren.indexOf(Te.id),1),Te.allParents=nM(Te,c.value)}async function P(pe){const xe=await dM(pe);ee(xe)}function $(pe){for(let xe of pe)xe.value!=null&&(ji(l.value[xe.propertyId].type)&&ve(a.value[xe.instanceId].properties[xe.propertyId],xe.value),a.value[xe.instanceId].properties[xe.propertyId]=xe.value,t.add(xe.instanceId))}function H(pe){for(let xe of pe)if(xe.value!=null&&p.value[xe.sha1]!=null)for(let Te of p.value[xe.sha1])ji(l.value[xe.propertyId].type)&&ve(a.value[Te.id].properties[xe.propertyId],xe.value),a.value[Te.id].properties[xe.propertyId]=xe.value,t.add(Te.id)}function ee(pe,xe){var Te,ie,j,G,le,Se;Ie(pe.instances,pe.emptyInstances),pe.emptyImageValues&&pe.emptyImageValues.forEach(Oe=>{p.value[Oe.sha1].forEach(Ye=>{ji(l.value[Oe.propertyId].type)&&ve(a.value[Ye.id].properties[Oe.propertyId],[]),delete a.value[Ye.id].properties[Oe.propertyId],t.add(Ye.id)})}),pe.emptyInstanceValues&&pe.emptyInstanceValues.forEach(Oe=>{ji(l.value[Oe.propertyId].type)&&ve(a.value[Oe.instanceId].properties[Oe.propertyId],[]),delete a.value[Oe.instanceId].properties[Oe.propertyId],t.add(Oe.instanceId)}),pe.emptyTags&&pe.emptyTags.forEach(Oe=>{c.value[Oe].id=Ci,c.value[Oe].value=ub}),(Te=pe.emptyProperties)!=null&&Te.length&&pe.emptyProperties.forEach(Oe=>{l.value[Oe].id=Ci,l.value[Oe].name=ub}),pe.emptyInstances&&pe.emptyInstances.forEach(Oe=>{a.value[Oe].id=Ci,t.add(Oe)}),(ie=pe.instances)!=null&&ie.length&&N(pe.instances),(j=pe.properties)!=null&&j.length&&k(pe.properties),(G=pe.tags)!=null&&G.length&&D(pe.tags),(le=pe.instanceValues)!=null&&le.length&&$(pe.instanceValues),(Se=pe.imageValues)!=null&&Se.length&&H(pe.imageValues),pe.history&&(d.value=pe.history),!xe&&(Mn(l),Mn(n),Mn(a),Mn(p),Mn(c),M())}function se(){n.value={},a.value={},l.value={},c.value={},p.value={},e.clear(),t.clear(),d.value={undo:[],redo:[]},m.value=0}async function Q(pe,xe,Te){xe&&(pe.undo=!0);const ie=await RM(pe);return ee(ie,Te),ie}async function te(pe,xe,Te=void 0,ie=-1){const G=await Q({tags:[{id:-1,propertyId:pe,value:xe,parents:Te??[],color:ie}]},!0,!0);return Mn(c),G.tags[0]}async function ce(pe,xe){const Te=Object.assign({},c.value[pe]);Te.parents.push(xe),await Q({tags:[Te]})}async function oe(pe,xe){const Te=Object.assign({},c.value[pe]);Te.parents=Te.parents.filter(ie=>ie!=xe),await Q({tags:[Te]})}async function de(pe,xe){if(!xe){const Te=c.value[pe];if(!confirm("Delete tag: "+Te.value+" (ID: "+pe+") ?"))return}Q({emptyTags:[pe]})}async function be(pe,xe,Te){return(await Q({properties:[{id:-1,name:pe,type:xe,mode:Te}]})).properties[0]}async function Ce(pe,xe,Te,ie){Array.isArray(xe)||(xe=[xe]);const j=l.value[pe].mode,G=[],le=[];if(j==ki.id){const Se=xe.map(Oe=>({propertyId:pe,instanceId:Oe.id,value:Te}));G.push(...Se)}if(j==ki.sha1){const Se=xe.map(Oe=>({propertyId:pe,sha1:Oe.sha1,value:Te}));le.push(...Se)}await Q({instanceValues:G,imageValues:le},!0)}async function re(pe,xe,Te){await Q({instanceValues:pe,imageValues:xe},!0)}async function Z(pe,xe,Te,ie){Array.isArray(xe)||(xe=[xe]);const j=xe.map(G=>({value:G.properties[pe]??[],img:G}));if(l.value[pe].mode==ki.id){const G=j.map(le=>({propertyId:pe,instanceId:le.img.id,value:Array.from(new Set([...le.value,...Te]))}));await Q({instanceValues:G})}else{const G=j.map(le=>({propertyId:pe,sha1:le.img.sha1,value:Array.from(new Set([...le.value,...Te]))}));await Q({imageValues:G},!0)}}async function U(pe,xe,Te){const ie=Object.assign({},c.value[pe]);xe&&(ie.value=xe),Te!=null&&(ie.color=Te),await Q({tags:[ie]})}async function fe(pe){await hM(pe);const xe=await pb(),Te=cb(xe);for(let ie of Cs(Te))ie.id in n.value&&(ie.count=n.value[ie.id].count);n.value=Te}async function he(pe,xe){const Te=ns(l.value[pe]);Te.name=xe,Q({properties:[Te]})}async function ue(pe){await Q({emptyProperties:[pe]});const xe=Ii();xe.getTabManager().verifyState(),xe.getTabManager().collection.update()}function ve(pe,xe){pe==null&&(pe=[]),xe==null&&(xe=[]),Array.isArray(pe)||(pe=[pe]),Array.isArray(xe)||(xe=[xe]);const Te=new Set(pe),ie=new Set(xe),j=xe.filter(le=>!Te.has(le)),G=pe.filter(le=>!ie.has(le));j.forEach(le=>c.value[le].count+=1),G.forEach(le=>c.value[le].count-=1)}async function Re(){if(!d.value.undo.length)return;const pe=await MM();ee(pe),m.value++}async function et(){if(!d.value.redo.length)return;const pe=await NM();ee(pe),m.value++}async function Ee(){const pe=await DM();d.value=pe}function Fe(pe){kM(pe)}async function _e(pe){await fM(pe),se(),await I()}function Ie(pe,xe){pe=pe??[],xe=xe??[];for(let Te of pe){if(a.value[Te.id]!=null)continue;let ie=n.value[Te.folderId];for(ie.count+=1,ie=n.value[ie.parent];ie;)ie.count+=1,ie=n.value[ie.parent]}for(let Te of xe){if(a.value[Te]==null)continue;let ie=n.value[Te];for(ie.count-=1,ie=n.value[ie.parent];ie;)ie.count-=1,ie=n.value[ie.parent]}}return{init:I,getTmpId:O,onChange:e,folders:n,instances:a,properties:l,tags:c,history:d,folderRoots:b,sha1Index:p,instanceList:w,propertyList:_,tagList:C,addFolder:fe,reImportFolder:Fe,deleteFolder:_e,addProperty:be,deleteProperty:ue,updateProperty:he,setPropertyValue:Ce,setTagPropertyValue:Z,setPropertyValues:re,addTag:te,deleteTagParent:oe,updateTag:U,addTagParent:ce,deleteTag:de,mergeTags:P,applyCommit:ee,sendCommit:Q,undo:Re,redo:et,onUndo:m,clear:se}});var Bw=(e=>(e[e.Ascending=1]="Ascending",e[e.Descending=-1]="Descending",e))(Bw||{});function Ww(){return Wt({sortBy:[],options:{}})}function GL(){return{direction:1}}const Yw={[He.checkbox]:e=>e?1:0,[He.color]:e=>isNaN(e)?-1:e,[He.date]:e=>e?new Date(e).getTime():0,[He.multi_tags]:e=>e?e.length:0,[He.number]:e=>e??Number.NEGATIVE_INFINITY,[He.path]:e=>e?e.toLocaleLowerCase():"",[He.string]:e=>e?e.toLocaleLowerCase():"",[He.tag]:e=>e||"",[He.url]:e=>e?e.toLocaleLowerCase():"",[He._ahash]:e=>e,[He._sha1]:e=>e,[He._folders]:(e,t)=>t[e].name,[He._height]:e=>e,[He._width]:e=>e,[He._id]:e=>e};function UL(e,t,i){let n=e.properties[t.id];const a=t.type;return a==He.tag&&(Array.isArray(n)&&n.length>0?n=t.tags[n[0]].value:n=void 0),n=Yw[a](n,i),n}function jw(e,t){return e.sort((i,n)=>$f(i,n,t)),e}function $f(e,t,i){for(let n=0;nl[w]),p=jw(Lu(d,n),a);let m=0,b=0;for(;b=e.length)return i;let l=e.length,c=l-i;for(;c>10;){const d=Math.floor(i+c/2),p=Lu([e[d]],n)[0],m=$f(t,p,a);if(m==0)return d;m<0?l=d+1:i=d,c=l-i}for(let d=i;dl.values.push(UL(a,c,n.folders))),i.push(l)}return i}class ZL{constructor(t){$t(this,"state");$t(this,"result");$t(this,"onChange");this.state=t,this.onChange=new vo,this.state||(this.state=Ww()),this.result={images:[],order:{}}}load(t){Object.assign(this.state,Ea(t)),this.clear()}clear(){this.result={images:[],order:[]}}sort(t,i){console.time("Sort");const n=yt(),a=this.state.sortBy.map(d=>n.properties[d]),l=Lu(t,a),c=this.state.sortBy.map(d=>this.state.options[d].direction==1?1:-1);jw(l,c),this.result.images=[],this.result.order={};for(let d=0;dn.properties[d]),l=this.state.sortBy.map(d=>this.state.options[d].direction==1?1:-1),c=KL(this.result.images,t,i,a,l,n.instances);this.result.images=[],this.result.order={};for(let d=0;dt[i]&&t[i].id!=Ci),Object.keys(this.state.options).filter(i=>!t[i]||t[i].id==Ci).forEach(i=>delete this.state.options[i])}}var ps=(e=>(e.All="all",e.Selection="selection",e.Property="property",e.Cluster="cluster",e.Sha1="sha1",e))(ps||{}),JL=(e=>(e[e.Size=0]="Size",e[e.Property=1]="Property",e))(JL||{});function vl(e,t,i="all"){return{id:e,key:[],images:t,type:i,children:[],depth:0,order:-1,meta:{propertyValues:[]},view:{closed:!1,selected:!1}}}function QL(e){return vl(0,e)}function eM(e,t){const i={direction:Bw.Ascending,type:1};return t[e].type==He.date&&(i.stepUnit=ti.Day),i}const db={[He.checkbox]:e=>!!e,[He.color]:e=>{if(!isNaN(e))return e},[He.date]:e=>{if(e)return e},[He.number]:e=>{if(e!=null)return e},[He.path]:e=>{if(e)return e},[He.string]:e=>{if(e)return e},[He.url]:e=>{if(e)return e},[He._ahash]:e=>e,[He._sha1]:e=>e,[He._folders]:e=>e,[He._id]:e=>e,[He._height]:e=>e,[He._width]:e=>e,[He.tag]:e=>{if(Array.isArray(e))return e},[He.multi_tags]:e=>{if(Array.isArray(e))return e}};function hb(e,t,i){if(t||(t=1),i||(i=ti.Day),e==null)return;e=new Date(e);let n=t*RL[i];if(i==ti.Second||i==ti.Minute||i==ti.Hour||i==ti.Day||i==ti.Week){n*=1e3;let a=Math.floor(e.getTime()/n),l=new Date(a*n),c=new Date(a*n+n-1);return{first:l,last:c}}if(i==ti.Year){let a=Math.floor(e.getUTCFullYear()/n),l=new Date(a*n,0,1);l=new Date(l.getTime()-l.getTimezoneOffset()*60*1e3);let c=new Date(a*n+n,0,1);return c=new Date(c.getTime()-c.getTimezoneOffset()*60*1e3),{first:l,last:c}}if(i==ti.Month){let a=e.getUTCFullYear()*12+e.getUTCMonth(),l=Math.floor(a/n)*n,c=Math.floor(l/12),d=l%12,p=new Date(c,d,1);p=new Date(p.getTime()-p.getTimezoneOffset()*60*1e3),l=Math.floor(a/n)*n+n,c=Math.floor(l/12),d=l%12;let m=new Date(c,d,1);return m=new Date(m.getTime()-m.getTimezoneOffset()*60*1e3),{first:p,last:m}}return{first:e,last:e}}function fh(e,t){const i=yt();if(e.children.length!=0){t.type==1?tM(e,t.direction,i.properties,i.folders):iM(e,t.direction);for(let n=0;n{let d=a[l.id],p=a[c.id];for(let m=0;m(i.images.length-n.images.length)*t)}function Nc(e,t){e.images.sort((i,n)=>t[i.id]-t[n.id])}function Rc(e){let t=0;const i=()=>t++,n=a=>{a.order=i(),a.children.forEach(l=>n(l))};n(e)}function Xw(){return{groupBy:[],options:{},sha1Mode:!1}}class fb{constructor(){$t(this,"index");$t(this,"idCounter");this.index=new Map,this.idCounter=1}get(t){let i=this.index;for(let n of t)i.has(n)||i.set(n,new Map),i=i.get(n);if(!i.has(null)){const n=this.idCounter;i.set(null,n),this.idCounter+=1}return i.get(null)}delete(t){let i=this.index;for(let n of t){if(!i.has(n))return;i=i.get(n)}i.delete(null)}}class Aa{constructor(t,i){$t(this,"state");$t(this,"result");$t(this,"lastOrder");$t(this,"customGroups");$t(this,"onChange");$t(this,"selectedImages");$t(this,"selection");$t(this,"iterators");t?this.state=t:this.state=Wt(Xw()),this.result={root:void 0,index:{},imageToGroups:{},valueIndex:new fb},this.customGroups={},this.onChange=new vo,this.selectedImages=i??ss({}),this.selection={lastImage:void 0,lastGroup:void 0},this.iterators=[]}load(t){Object.assign(this.state,Ea(t)),this.clear()}addUpdatedToGroups(t,i){console.time("Group Update");const n=yt();if(this.invalidateIterators(),this.state.groupBy.length>0)for(let a of t)this.addInstanceToGroups(a,n.properties,n.tags);else this.result.root.images.push(...t);if(i)for(let a of Ls(this.result.index))a.type!="cluster"&&Nc(a,i);this.result.imageToGroups={};for(let a of Object.values(this.result.index))a.children.length>0&&a.subGroupType!="sha1"||this.saveImagesToGroup(a);return Rc(this.result.root),console.timeEnd("Group Update"),this.onChange.emit(this.result),this.result}addInstanceToGroups(t,i,n){const a=[];let l=[];for(let c of this.state.groupBy){const d=i[c],p=this.state.options[d.id];let m=t.properties[c];m=db[d.type](m);const b={};if(ji(d.type)&&d.tags)for(let C of Ls(d.tags))b[C.id]=new Set(C.allParents),b[C.id].add(C.id);let w;if(d.type==He.date){const C=hb(m,p.stepSize,p.stepUnit);C&&(m=C.first.toISOString(),w=C.last)}let _=Array.isArray(m)?m:[m];if(ji(d.type)&&_[0]!==void 0){const C=new Set;for(let I of _)if(I)for(let O of b[I])C.add(O);_=Array.from(C)}if(l.length==0)a.push(..._.map(C=>[C])),l=_.map(C=>[C]);else{let C=[];for(let I of l)for(let O of _)C.push([...I,O]);a.push(...C),l=C}for(let C of l){const I=this.result.valueIndex.get(C);if(!this.result.index[I]){const M=vl(I,[],"property");let N=C[C.length-1];d.type==He.date&&(N=new Date(N));let k=[{propertyId:d.id,value:N,valueEnd:w,unit:p.stepUnit}];if(M.meta.propertyValues=k,this.regsiterGroup(M),C.length==1)this.addChildGroup(this.result.root,M),this.result.root.dirty=!0;else{const D=this.result.valueIndex.get(C.slice(0,-1)),P=this.result.index[D];this.addChildGroup(P,M),P.dirty=!0}}const O=this.result.index[I];O.images.push(t),O.dirty=!0}}}group(t,i,n,a){a=!0,a&&console.time("Group");const l=yt();this.invalidateIterators(),this.lastOrder=i;const c=this.result.index??{};this.result.root=QL(t),this.result.index={},this.result.imageToGroups={};const d=this.customGroups??{};if(this.customGroups={},this.regsiterGroup(this.result.root),this.state.groupBy.length>0&&this.computePropertySubGroup(this.result.root,this.state.groupBy,l.properties,l.tags),i)for(let b of Ls(this.result.index))Nc(b,i);for(let b of Object.values(this.result.index))b.children.length>0&&b.subGroupType!="sha1"||this.saveImagesToGroup(b);let p=!0,m=new Set(Object.keys(d).map(Number));for(;p;){p=!1;for(let b of Array.from(m))this.result.index[b]&&(this.addCustomGroups(b,d[b]),m.delete(b),p=!0)}return this.state.sha1Mode&&this.groupLeafsBySha1(),Object.keys(this.result.index).map(b=>{const w=this.result.index[b];c[b]&&(w.view=c[b].view)}),Rc(this.result.root),a&&console.timeEnd("Group"),n&&this.onChange.emit(this.result),this.result}sortGroups(t){this.invalidateIterators();for(let i of Object.values(this.result.index))i.subGroupType=="property"&&i.children.length!=0&&fh(i,this.state.options[i.children[0].meta.propertyValues[0].propertyId]);t&&this.onChange.emit()}saveImagesToGroup(t){for(let i of t.images)this.result.imageToGroups[i.id]||(this.result.imageToGroups[i.id]=[]),this.result.imageToGroups[i.id].push(t.id)}groupLeafsBySha1(){this.removeSha1Groups();for(let t of Object.values(this.result.index))t.children.length>0||this.groupBySha1(t)}removeSha1Groups(){this.invalidateIterators();for(let t of Object.values(this.result.index))t.subGroupType=="sha1"&&this.removeChildren(t)}hasResult(){return this.result.root!=null}clear(t){this.invalidateIterators(),this.result.imageToGroups={},this.result.index={},this.result.root=void 0,this.result.valueIndex=new fb,this.clearLastSelected(),this.clearSelection(),this.customGroups={},this.lastOrder={},t&&this.onChange.emit()}verifyState(t){this.state.groupBy=this.state.groupBy.filter(i=>t[i]&&t[i].id!=Ci),Object.keys(this.state.options).filter(i=>!t[i]||t[i].id==Ci).forEach(i=>delete this.state.options[i])}registerIterator(t){this.iterators.push(t)}invalidateIterators(){for(let t of this.iterators)t.isValid=!1;this.iterators=[]}removeChildren(t){t.children.forEach(i=>{delete this.result.index[i.id],i.key.length&&this.result.valueIndex.delete(i.key),this.removeImageToGroups(i)}),t.children.length=0,t.subGroupType=void 0}groupBySha1(t){t.children&&(t.children.length=0);let i=[],n={};for(let l of t.images)if(n[l.sha1])n[l.sha1].images.push(l);else{const c=[...t.key,l.sha1],d=this.result.valueIndex.get(c);n[l.sha1]=vl(d,[l],"sha1"),n[l.sha1].key=c,n[l.sha1].meta.propertyValues.push({propertyId:-1,value:l.sha1}),i.push(l.sha1)}const a=i.map(l=>n[l]);a.forEach(l=>this.regsiterGroup(l)),this.setChildGroup(t,a)}update(t){this.invalidateIterators(),this.result.root&&this.group(this.result.root.images,this.lastOrder,t,!0)}updateSelection(t,i){const n=yt();this.invalidateIterators(),this.removeSha1Groups();let a=new Set;for(let l of i)this.result.imageToGroups[l]&&this.result.imageToGroups[l].forEach(c=>a.add(c));for(let l of t)this.result.imageToGroups[l]&&this.result.imageToGroups[l].forEach(c=>a.add(c));for(let l of a){const c=this.result.index[l];c.type!="cluster"&&(c.dirty=!0,c.images=c.images.filter(d=>!i.has(d.id)&&!t.has(d.id)))}this.addUpdatedToGroups(Array.from(t).map(l=>n.instances[l]),this.lastOrder);for(let l of Ls(this.result.index)){l.images.length==0&&delete this.result.index[l.id];const c=l.children.length;l.children=l.children.filter(d=>d.images.length>0),l.children.lengthn).forEach(n=>{Nc(n,t)}),this.state.sha1Mode&&this.groupLeafsBySha1(),i&&this.onChange.emit(this.result)}setGroupOption(t,i){const n=yt();this.state.options[t]||(this.state.options[t]=eM(t,n.properties)),i&&Object.assign(this.state.options[t],i),!this.state.groupBy.includes(t)&&(this.state.groupBy.push(t),this.customGroups={})}delGroupOption(t){const i=this.state.groupBy.indexOf(t);i<0||(this.state.groupBy.splice(i,1),this.customGroups={})}addCustomGroups(t,i,n){this.invalidateIterators();const a=this.result.index[t];a&&(this.customGroups[t]=i,this.setChildGroup(a,i),a.subGroupType=="cluster"&&this.state.sha1Mode&&i.forEach(l=>{this.groupBySha1(l)}),Rc(this.result.root),n&&this.onChange.emit(this.result))}delCustomGroups(t,i){delete this.customGroups[t],this.removeChildren(this.result.index[t]),i&&this.onChange.emit(this.result)}clearCustomGroups(t){for(let i of Object.keys(this.customGroups).map(Number))this.delCustomGroups(i);t&&this.onChange.emit()}setSha1Mode(t,i){this.state.sha1Mode!=t&&(this.invalidateIterators(),this.state.sha1Mode=t,t?this.groupLeafsBySha1():this.removeSha1Groups(),i&&this.onChange.emit())}toggleGroup(t,i){this.result.index[t].view.closed=!this.result.index[t].view.closed,i&&this.onChange.emit()}openGroup(t,i){this.result.index[t].view.closed=!1,i&&this.onChange.emit()}closeGroup(t,i){this.result.index[t].view.closed=!0,i&&this.onChange.emit()}getGroupIterator(t,i){return new Nn(this,t,i)}getImageIterator(t,i,n){return new Ss(this,t,i,n)}findImageIterator(t,i){const n=yt(),a=this.result.index[t],l=n.instances[i];let c=0;return a.subGroupType=="sha1"?c=a.children.findIndex(d=>d.images[0].sha1==l.sha1):c=a.images.findIndex(d=>d.id==i),this.getImageIterator(t,c)}setChildGroup(t,i){this.removeChildren(t);for(let n of i)n.parentIdx=t.children.length,n.parent=t,n.depth=t.depth+1,t.children.push(n),this.regsiterGroup(n),n.type!="sha1"&&this.saveImagesToGroup(n);t.subGroupType=t.children.length?i[0].type:void 0,t.subGroupType=="sha1"&&this.saveImagesToGroup(t)}addChildGroup(t,i){i.parentIdx=t.children.length,i.parent=t,i.depth=t.depth+1,t.children.push(i),this.regsiterGroup(i),i.type!="sha1"&&this.saveImagesToGroup(i),t.subGroupType=t.children.length?i.type:void 0,this.removeImageToGroups(t),t.subGroupType=="sha1"&&this.saveImagesToGroup(t)}regsiterGroup(t){this.result.index[t.id]=t}computePropertySubGroup(t,i,n,a){const l=n[i[0]],c=this.state.options[l.id],d={};if(ji(l.type)&&l.tags)for(let I of Ls(l.tags))d[I.id]=new Set(I.allParents),d[I.id].add(I.id);t.subGroupType="property";let p=0,m=0,b=0,w=0;const _=[];for(let I in t.images){const O=t.images[I];let M=performance.now(),N=O.properties[l.id];w+=performance.now()-M,N=db[l.type](N),M=performance.now();let k;if(l.type==He.date){const P=hb(N,c.stepSize,c.stepUnit);P&&(N=P.first,k=P.last)}p+=performance.now()-M,M=performance.now();let D=Array.isArray(N)?N:[N];if(ji(l.type)&&D[0]!==void 0){const P=new Set;for(let $ of D)if($)for(let H of d[$])P.add(H);D=Array.from(P)}m+=performance.now()-M,M=performance.now();for(let P of D){let $=P;P&&l.type==He.date&&($=$.toISOString());const H=[...t.key,$],ee=this.result.valueIndex.get(H);if(!this.result.index[ee]){let Q=[{propertyId:l.id,value:P,valueEnd:k,unit:c.stepUnit}];const te=vl(ee,[],"property");te.meta.propertyValues=Q,te.key=H,this.regsiterGroup(te),_.push(te)}this.result.index[ee].images.push(O)}b+=performance.now()-M}const C=_;if(this.setChildGroup(t,C),i.length>1)for(let I of C)this.computePropertySubGroup(I,i.slice(1),n,a);fh(t,c)}removeImageToGroups(t){t.images.forEach(i=>{if(this.result.imageToGroups[i.id]==null)return;const n=this.result.imageToGroups[i.id].indexOf(t.id);n<0||this.result.imageToGroups[i.id].splice(n,1)})}clearSelection(){this.result.root&&this.unselectGroup(this.result.root),this.selectedImages.value={},this.clearLastSelected()}selectImageIterator(t,i=!1){i&&this._shiftSelect(t),this.selectImages(t.images.map(n=>n.id)),this.clearLastSelected(),this.selection.lastImage=t.clone()}unselectImageIterator(t){this.unselectImages(t.images.map(i=>i.id)),this.clearLastSelected()}toggleImageIterator(t,i=!1){t.images.every(a=>this.selectedImages.value[a.id])?this.unselectImageIterator(t):this.selectImageIterator(t,i)}toggleAll(){const t=this.getGroupIterator();this.toggleGroupIterator(t)}_shiftSelect(t){if(this.selection.lastImage==null)return!1;let i=this.selection.lastImage.isImageBefore(t)?this.selection.lastImage:t,n=i==t?this.selection.lastImage:t,a=[],l=i.clone();for(;l&&!n.isImageBefore(l);)l.sha1Group?a.push(...l.sha1Group.images.map(c=>c.id)):a.push(l.image.id),l=l.nextImages();return a.length?(this.selectImages(a),!0):!1}_shiftGroup(t){if(this.selection.lastGroup==null)return!1;let i=this.selection.lastGroup.isGroupBefore(t)?this.selection.lastGroup:t,n=i==t?this.selection.lastGroup:t,a=[],l=i.clone();for(;l&&!n.isGroupBefore(l);){const c=l.group;c.images.length&&a.push(...c.images.map(d=>d.id)),l=l.nextGroup()}return a.length?(this.selectImages(a),!0):!1}clearLastSelected(){this.selection.lastGroup=void 0,this.selection.lastImage=void 0}unselectImage(t){this.unselectImages([t])}selectImage(t){this.selectImages([t])}selectImages(t){t.forEach(i=>this.selectedImages.value[i]=!0),Mn(this.selectedImages)}unselectImages(t){t.forEach(i=>delete this.selectedImages.value[i]),Mn(this.selectedImages)}propagateUnselect(t){t.view.selected=!1,t.parent&&this.propagateUnselect(t.parent)}propagateSelect(t){t.children.length==0||t.subGroupType=="sha1"?t.view.selected=t.images.every(i=>this.selectedImages.value[i.id]):t.view.selected=t.children.every(i=>i.view.selected),t.parent&&this.propagateSelect(t.parent)}selectGroup(t){this.selectImages(t.images.map(i=>i.id))}unselectGroup(t){this.unselectImages(t.images.map(i=>i.id))}selectGroupIterator(t,i=!1){i&&this._shiftGroup(t),this.selectGroup(t.group),this.clearLastSelected(),this.selection.lastGroup=t.clone()}unselectGroupIterator(t){this.unselectGroup(t.group),this.clearLastSelected()}toggleGroupIterator(t,i=!1){!t.group.images.some(a=>!this.selectedImages.value[a.id])?this.unselectGroupIterator(t):this.selectGroupIterator(t,i)}}class Nn{constructor(t,i,n){$t(this,"isValid");$t(this,"group");$t(this,"manager");$t(this,"groupId");$t(this,"options");this.isValid=!0,this.manager=t,n!=null&&n.register&&this.manager.registerIterator(this),this.groupId=i??0,this.options={},n&&(this.options=n),this.group=this.getGroup()}clone(t){return new Nn(this.manager,this.groupId,t??this.options)}getGroup(){return this.manager.result.index[this.groupId]}nextGroup(){let t=this.group;if(!t.view.closed&&t.children.length>0&&t.subGroupType!="sha1")return new Nn(this.manager,t.children[0].id);let i=t.parent;for(;i!=null;){const n=i.children[t.parentIdx+1];if(n)return new Nn(this.manager,n.id);t=i,i=t.parent}}prevGroup(){var a;let t=this.group;const i=(a=t.parent)==null?void 0:a.children[t.parentIdx-1];if(i)if(i.children.length>0&&(!i.view.closed||this.options.ignoreClosed)){let l=i.children[i.children.length-1];for(;l.children.length>0&&(!l.view.closed||this.options.ignoreClosed);)l=l.children[l.children.length-1];return new Nn(this.manager,l.id)}else return new Nn(this.manager,i.id);const n=t.parent;if(n&&n.parent)return new Nn(this.manager,n.id)}isGroupBefore(t){return this.group.order0&&this.group.subGroupType!="sha1"){const c=this.nextGroup();this.groupId=c.groupId,this.group=c.group}this.images=this.getImages(),this.image=this.images[0],this.sha1Group=this.getSha1Group()}static fromGroupIterator(i,n){if(i.group.images.length!=0)return new Ss(i.manager,i.group.id,0,n)}getImages(){return this.group.subGroupType=="sha1"?this.group.children[this.imageIdx].images:[this.group.images[this.imageIdx]]}getSha1Group(){return this.group.children[this.imageIdx]}nextGroup(){let i=super.nextGroup();for(;i;){const n=i.group;if((!n.view.closed||this.options.ignoreClosed)&&(n.subGroupType=="sha1"||n.children.length==0)){const a=n.subGroupType=="sha1"?n.children.length-1:n.images.length-1;return new Ss(this.manager,i.group.id,a,this.options)}i=i.nextGroup()}}prevGroup(){let i=super.prevGroup();for(;i;){const n=i.group;if((!n.view.closed||this.options.ignoreClosed)&&(n.type=="sha1"||n.children.length==0))return new Ss(this.manager,i.group.id,0,this.options);i=i.prevGroup()}}nextImages(){let i=this.clone(),n=i.imageIdx+1;for(;i;){const a=i.group;if(a.subGroupType=="sha1"){if(a.children[n])return new Ss(this.manager,i.groupId,n,this.options)}else if(a.images[n])return new Ss(this.manager,i.groupId,n,this.options);i=i.nextGroup(),n=0}}prevImages(){let i=this.clone(),n=i.imageIdx-1;for(;i;){const a=i.group;if(a.subGroupType=="sha1"){if(a.children[n])return new Ss(this.manager,i.groupId,n,this.options)}else if(a.images[n])return new Ss(this.manager,i.groupId,n,this.options);i=i.prevGroup(),i&&(i.group.subGroupType=="sha1"?n=i.group.children.length-1:n=i.group.images.length-1)}}isImageBefore(i){return this.isGroupEqual(i)?this.imageIdx{const l=t.folders[a].children;i.push(...l),l.forEach(c=>n(c.id))};return n(e),i}const Gw=e=>new Promise(t=>setTimeout(t,e));class vo{constructor(){$t(this,"listeners");this.listeners=[]}addListener(t){this.listeners.push(t)}removeListener(t){const i=this.listeners.indexOf(t);i!==-1&&this.listeners.splice(i,1)}emit(t){this.listeners.forEach(i=>i(t))}clear(){this.listeners.length=0}}function Ff(e){const t=[];let i=e.parent;for(;i;)t.push(i),i=i.parent;return t}function sM(e,t){const i=[],n=a=>{i.push(a.id),a.children&&a.children.filter(l=>l!=Ci).forEach(l=>n(t[l]))};return n(e),i}function nM(e,t){const i=[],n=a=>{if(a)for(let l of a.parents)l!=0&&(i.push(l),n(t[l]))};return n(e),i}function Ls(e){return Object.keys(e).map(t=>e[t])}function lr(e){return e=e.toString(),e.length<2&&(e="0"+e),e}function lg(){let e=document.getElementsByClassName("v-step__button-next")[0];e&&e.click()}function ks(e){if(e===Object(e)&&!Array.isArray(e)&&typeof e!="function"){const t={};return Object.keys(e).forEach(i=>{t[rM(i)]=ks(e[i])}),t}else if(Array.isArray(e))return e.map(t=>ks(t));return e}function rM(e){return e.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))}function Rn(e){if(e===Object(e)&&!Array.isArray(e)&&typeof e!="function"){const t={};return Object.keys(e).forEach(i=>{t[aM(i)]=Rn(e[i])}),t}else if(Array.isArray(e))return e.map(t=>Rn(t));return e}function aM(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function ns(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e)){const i=[];for(const n of e)i.push(ns(n));return i}if(e instanceof Date)return new Date(e.getTime());if(e instanceof Map){const i=new Map;return e.forEach((n,a)=>{i.set(ns(a),ns(n))}),i}if(e instanceof Set){const i=new Set;return e.forEach(n=>{i.add(ns(n))}),i}const t={};for(const i in e)e.hasOwnProperty(i)&&(t[i]=ns(e[i]));return t}function oM(e){return[e.id,e.sha1,e.ahash,e.folderId,e.width,e.height,e.url]}function lM(e,t,i,n){const a={};for(let l of i)a[l.id]=[];for(let l of e)for(let c of t){let d=l.properties[c.id];if(d===void 0)continue;Array.isArray(d)||(d=[d]);const p=new Set;for(let m of d)n[m].allParents.forEach(b=>p.add(b)),p.add(m);Array.from(p).forEach(m=>{a[m].push(l)})}return a}const kd=e=>e.reduce((t,i)=>t+i,0);function Fi(e,t){let i=String(e),n="";i[0]=="-"&&(n="-",i=i.substring(1));let a=t-i.length;if(a)for(let l=0;lawait Yt.post("/folders",{path:e}),pb=async()=>(await Yt.get("/folders")).data;async function fM(e){return(await Yt.delete("/folder",{params:{folder_id:e}})).data}async function pM(){let e=await nu("tabs");return e||{}}async function ph(e){return(await zf("tabs",e)).data}const gM=async e=>{let t=new FormData;return t.append("file",e),await Yt.post("/property/file",t,{headers:{"Content-Type":"multipart/form-data"}})};async function mM(e){return(await cM("/import/upload",e)).data}async function vM(e){const t=await Yt.post("/import/confirm",e);return ks(t.data)}const bM=async(e,t,i,n,a=!1)=>{await Yt.post("/export",{name:e,images:t,properties:n,exportImages:a,key:i})};async function yM(){return(await Yt.get("/filesystem/info")).data}async function gb(e){return(await Yt.get("/filesystem/ls/"+e)).data}async function xM(e){return(await Yt.get("/filesystem/count/"+e)).data}async function wM(){return(await Yt.get("/status")).data}async function _M(e){return(await Yt.post("/load",{path:e})).data}async function SM(){return(await Yt.post("/close")).data}async function EM(e){return(await Yt.post("/delete_project",{path:e})).data}async function CM(e,t){return(await Yt.post("/create_project",{path:e,name:t})).data}async function AM(e){return(await Yt.post("/import_project",{path:e})).data}async function kM(e){return(await Yt.post("/reimport_folder",{id:e})).data}async function gh(){let e=await Yt.get("/plugins");return ks(e.data)}async function TM(e){return(await Yt.post("/plugins",e)).data}async function IM(e){return(await Yt.delete("/plugins",{params:{path:e}})).data}async function mb(){return(await Yt.get("/plugins_info")).data}async function OM(e,t){return(await Yt.post("/plugin_params",{plugin:e,params:t})).data}async function vb(){return(await Yt.get("/actions")).data}async function Kw(e){const i=(await Yt.post("/action_execute",e)).data;return i.commit&&(i.commit=ks(i.commit)),i}async function PM(){return(await Yt.get("/vectors_info")).data}async function LM(e){return(await Yt.post("/default_vectors",e)).data}async function nu(e){return(await Yt.get("/ui_data/"+e)).data}async function zf(e,t){return(await Yt.post("/ui_data",{key:e,data:t})).data}async function MM(){const e=await Yt.post("/undo");return ks(e.data)}async function NM(){const e=await Yt.post("/redo");return ks(e.data)}async function RM(e){const t=Rn(ns(e));e.instances&&(t.instances=e.instances.map(n=>Rn(n))),e.properties&&(t.properties=e.properties.map(n=>Rn(n))),e.tags&&(t.tags=e.tags.map(n=>Rn(n))),e.instanceValues&&(t.instance_values=e.instanceValues.map(n=>Rn(n))),e.imageValues&&(t.image_values=e.imageValues.map(n=>Rn(n)));const i=await Yt.post("/commit",t);return ks(i.data)}async function DM(){return(await Yt.get("/history")).data}async function bb(){const e=await Yt.get("/update");return ks(e.data)}async function $M(){const e=await Yt.get("/settings");return ks(e.data)}async function FM(e){const t=await Yt.post("/settings",Rn(e));return ks(t.data)}const zM="modulepreload",HM=function(e){return"/"+e},yb={},mh=function(t,i,n){if(!i||i.length===0)return t();const a=document.getElementsByTagName("link");return Promise.all(i.map(l=>{if(l=HM(l),l in yb)return;yb[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!n)for(let b=a.length-1;b>=0;b--){const w=a[b];if(w.href===l&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":zM,c||(m.as="script",m.crossOrigin=""),m.href=l,document.head.appendChild(m),c)return new Promise((b,w)=>{m.addEventListener("load",b),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t()).catch(l=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l})},Hf=mP({history:MO("/"),routes:[{path:"/",name:"home",component:()=>mh(()=>import("./HomeView-04d1f2e9.js"),["assets/HomeView-04d1f2e9.js","assets/Tutorial-8facc104.js","assets/Tutorial-37229e07.css","assets/HomeView-fa1e879e.css"])},{path:"/test",name:"test",component:()=>mh(()=>import("./TestView-8bc8a48d.js"),["assets/TestView-8bc8a48d.js","assets/TestView-a6608232.css"])},{path:"/view",name:"view",component:()=>mh(()=>import("./PanopticView-4be4490c.js"),["assets/PanopticView-4be4490c.js","assets/Tutorial-8facc104.js","assets/Tutorial-37229e07.css","assets/PanopticView-3bc06f64.css"])}]}),ls=gd("panopticStore",()=>{const e=Ii(),t=Wt({status:{},plugins:[],init:!1}),i=Wt({hasError:!1,error:""}),n=ye(null),a=ye(null),l=we(()=>t.status.isLoaded);async function c(){t.init=!1;try{t.status=await wM(),t.plugins=await gh(),t.init=!0,t.status.isLoaded&&e.init()}catch{setTimeout(()=>c(),1e3)}}async function d(M,N){e.clear(),N||(t.status=await _M(M)),await Hf.push("/view"),setTimeout(()=>e.init(),10)}async function p(){e.status.loaded=!1,e.clear(),t.status=await SM(),Hf.push("/")}async function m(M){t.status=await EM(M)}async function b(M,N){M=M.endsWith("\\")?M:M+"/";const k=M+N;t.status=await CM(k,N),await d(k,!0)}async function w(M){t.status=await AM(M),await d(M,!0)}function _(M,N){n.value=M,a.value=N}function C(){n.value=null,a.value=null}async function I(M){M&&(await TM(M),t.plugins=await gh())}async function O(M){console.log(M),await IM(M),t.plugins=await gh()}return{init:c,data:t,state:i,modalData:a,hideModal:C,showModal:_,openModalId:n,isProjectLoaded:l,loadProject:d,closeProject:p,deleteProject:m,createProject:b,importProject:w,addPlugin:I,delPlugin:O}});var rs="top",Ts="bottom",Is="right",as="left",Td="auto",Mo=[rs,Ts,Is,as],ya="start",bo="end",qw="clippingParents",cg="viewport",Ba="popper",Zw="reference",Vf=Mo.reduce(function(e,t){return e.concat([t+"-"+ya,t+"-"+bo])},[]),ug=[].concat(Mo,[Td]).reduce(function(e,t){return e.concat([t,t+"-"+ya,t+"-"+bo])},[]),Jw="beforeRead",Qw="read",e1="afterRead",t1="beforeMain",i1="main",s1="afterMain",n1="beforeWrite",r1="write",a1="afterWrite",o1=[Jw,Qw,e1,t1,i1,s1,n1,r1,a1];function xn(e){return e?(e.nodeName||"").toLowerCase():null}function Xs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function xa(e){var t=Xs(e).Element;return e instanceof t||e instanceof Element}function zs(e){var t=Xs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dg(e){if(typeof ShadowRoot>"u")return!1;var t=Xs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function VM(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var n=t.styles[i]||{},a=t.attributes[i]||{},l=t.elements[i];!zs(l)||!xn(l)||(Object.assign(l.style,n),Object.keys(a).forEach(function(c){var d=a[c];d===!1?l.removeAttribute(c):l.setAttribute(c,d===!0?"":d)}))})}function BM(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],l=t.attributes[n]||{},c=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:i[n]),d=c.reduce(function(p,m){return p[m]="",p},{});!zs(a)||!xn(a)||(Object.assign(a.style,d),Object.keys(l).forEach(function(p){a.removeAttribute(p)}))})}}const hg={name:"applyStyles",enabled:!0,phase:"write",fn:VM,effect:BM,requires:["computeStyles"]};function pn(e){return e.split("-")[0]}var da=Math.max,Mu=Math.min,yo=Math.round;function Bf(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function l1(){return!/^((?!chrome|android).)*safari/i.test(Bf())}function xo(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=e.getBoundingClientRect(),a=1,l=1;t&&zs(e)&&(a=e.offsetWidth>0&&yo(n.width)/e.offsetWidth||1,l=e.offsetHeight>0&&yo(n.height)/e.offsetHeight||1);var c=xa(e)?Xs(e):window,d=c.visualViewport,p=!l1()&&i,m=(n.left+(p&&d?d.offsetLeft:0))/a,b=(n.top+(p&&d?d.offsetTop:0))/l,w=n.width/a,_=n.height/l;return{width:w,height:_,top:b,right:m+w,bottom:b+_,left:m,x:m,y:b}}function fg(e){var t=xo(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function c1(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&dg(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function qn(e){return Xs(e).getComputedStyle(e)}function WM(e){return["table","td","th"].indexOf(xn(e))>=0}function Wr(e){return((xa(e)?e.ownerDocument:e.document)||window.document).documentElement}function Id(e){return xn(e)==="html"?e:e.assignedSlot||e.parentNode||(dg(e)?e.host:null)||Wr(e)}function xb(e){return!zs(e)||qn(e).position==="fixed"?null:e.offsetParent}function YM(e){var t=/firefox/i.test(Bf()),i=/Trident/i.test(Bf());if(i&&zs(e)){var n=qn(e);if(n.position==="fixed")return null}var a=Id(e);for(dg(a)&&(a=a.host);zs(a)&&["html","body"].indexOf(xn(a))<0;){var l=qn(a);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||t&&l.willChange==="filter"||t&&l.filter&&l.filter!=="none")return a;a=a.parentNode}return null}function sc(e){for(var t=Xs(e),i=xb(e);i&&WM(i)&&qn(i).position==="static";)i=xb(i);return i&&(xn(i)==="html"||xn(i)==="body"&&qn(i).position==="static")?t:i||YM(e)||t}function pg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function bl(e,t,i){return da(e,Mu(t,i))}function jM(e,t,i){var n=bl(e,t,i);return n>i?i:n}function u1(){return{top:0,right:0,bottom:0,left:0}}function d1(e){return Object.assign({},u1(),e)}function h1(e,t){return t.reduce(function(i,n){return i[n]=e,i},{})}var XM=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,d1(typeof t!="number"?t:h1(t,Mo))};function GM(e){var t,i=e.state,n=e.name,a=e.options,l=i.elements.arrow,c=i.modifiersData.popperOffsets,d=pn(i.placement),p=pg(d),m=[as,Is].indexOf(d)>=0,b=m?"height":"width";if(!(!l||!c)){var w=XM(a.padding,i),_=fg(l),C=p==="y"?rs:as,I=p==="y"?Ts:Is,O=i.rects.reference[b]+i.rects.reference[p]-c[p]-i.rects.popper[b],M=c[p]-i.rects.reference[p],N=sc(l),k=N?p==="y"?N.clientHeight||0:N.clientWidth||0:0,D=O/2-M/2,P=w[C],$=k-_[b]-w[I],H=k/2-_[b]/2+D,ee=bl(P,H,$),se=p;i.modifiersData[n]=(t={},t[se]=ee,t.centerOffset=ee-H,t)}}function UM(e){var t=e.state,i=e.options,n=i.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||c1(t.elements.popper,a)&&(t.elements.arrow=a))}const f1={name:"arrow",enabled:!0,phase:"main",fn:GM,effect:UM,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wo(e){return e.split("-")[1]}var KM={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qM(e){var t=e.x,i=e.y,n=window,a=n.devicePixelRatio||1;return{x:yo(t*a)/a||0,y:yo(i*a)/a||0}}function wb(e){var t,i=e.popper,n=e.popperRect,a=e.placement,l=e.variation,c=e.offsets,d=e.position,p=e.gpuAcceleration,m=e.adaptive,b=e.roundOffsets,w=e.isFixed,_=c.x,C=_===void 0?0:_,I=c.y,O=I===void 0?0:I,M=typeof b=="function"?b({x:C,y:O}):{x:C,y:O};C=M.x,O=M.y;var N=c.hasOwnProperty("x"),k=c.hasOwnProperty("y"),D=as,P=rs,$=window;if(m){var H=sc(i),ee="clientHeight",se="clientWidth";if(H===Xs(i)&&(H=Wr(i),qn(H).position!=="static"&&d==="absolute"&&(ee="scrollHeight",se="scrollWidth")),H=H,a===rs||(a===as||a===Is)&&l===bo){P=Ts;var Q=w&&H===$&&$.visualViewport?$.visualViewport.height:H[ee];O-=Q-n.height,O*=p?1:-1}if(a===as||(a===rs||a===Ts)&&l===bo){D=Is;var te=w&&H===$&&$.visualViewport?$.visualViewport.width:H[se];C-=te-n.width,C*=p?1:-1}}var ce=Object.assign({position:d},m&&KM),oe=b===!0?qM({x:C,y:O}):{x:C,y:O};if(C=oe.x,O=oe.y,p){var de;return Object.assign({},ce,(de={},de[P]=k?"0":"",de[D]=N?"0":"",de.transform=($.devicePixelRatio||1)<=1?"translate("+C+"px, "+O+"px)":"translate3d("+C+"px, "+O+"px, 0)",de))}return Object.assign({},ce,(t={},t[P]=k?O+"px":"",t[D]=N?C+"px":"",t.transform="",t))}function ZM(e){var t=e.state,i=e.options,n=i.gpuAcceleration,a=n===void 0?!0:n,l=i.adaptive,c=l===void 0?!0:l,d=i.roundOffsets,p=d===void 0?!0:d,m={placement:pn(t.placement),variation:wo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,wb(Object.assign({},m,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:p})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,wb(Object.assign({},m,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const gg={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ZM,data:{}};var Dc={passive:!0};function JM(e){var t=e.state,i=e.instance,n=e.options,a=n.scroll,l=a===void 0?!0:a,c=n.resize,d=c===void 0?!0:c,p=Xs(t.elements.popper),m=[].concat(t.scrollParents.reference,t.scrollParents.popper);return l&&m.forEach(function(b){b.addEventListener("scroll",i.update,Dc)}),d&&p.addEventListener("resize",i.update,Dc),function(){l&&m.forEach(function(b){b.removeEventListener("scroll",i.update,Dc)}),d&&p.removeEventListener("resize",i.update,Dc)}}const mg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:JM,data:{}};var QM={left:"right",right:"left",bottom:"top",top:"bottom"};function ru(e){return e.replace(/left|right|bottom|top/g,function(t){return QM[t]})}var eN={start:"end",end:"start"};function _b(e){return e.replace(/start|end/g,function(t){return eN[t]})}function vg(e){var t=Xs(e),i=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:i,scrollTop:n}}function bg(e){return xo(Wr(e)).left+vg(e).scrollLeft}function tN(e,t){var i=Xs(e),n=Wr(e),a=i.visualViewport,l=n.clientWidth,c=n.clientHeight,d=0,p=0;if(a){l=a.width,c=a.height;var m=l1();(m||!m&&t==="fixed")&&(d=a.offsetLeft,p=a.offsetTop)}return{width:l,height:c,x:d+bg(e),y:p}}function iN(e){var t,i=Wr(e),n=vg(e),a=(t=e.ownerDocument)==null?void 0:t.body,l=da(i.scrollWidth,i.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),c=da(i.scrollHeight,i.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),d=-n.scrollLeft+bg(e),p=-n.scrollTop;return qn(a||i).direction==="rtl"&&(d+=da(i.clientWidth,a?a.clientWidth:0)-l),{width:l,height:c,x:d,y:p}}function yg(e){var t=qn(e),i=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+a+n)}function p1(e){return["html","body","#document"].indexOf(xn(e))>=0?e.ownerDocument.body:zs(e)&&yg(e)?e:p1(Id(e))}function yl(e,t){var i;t===void 0&&(t=[]);var n=p1(e),a=n===((i=e.ownerDocument)==null?void 0:i.body),l=Xs(n),c=a?[l].concat(l.visualViewport||[],yg(n)?n:[]):n,d=t.concat(c);return a?d:d.concat(yl(Id(c)))}function Wf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function sN(e,t){var i=xo(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function Sb(e,t,i){return t===cg?Wf(tN(e,i)):xa(t)?sN(t,i):Wf(iN(Wr(e)))}function nN(e){var t=yl(Id(e)),i=["absolute","fixed"].indexOf(qn(e).position)>=0,n=i&&zs(e)?sc(e):e;return xa(n)?t.filter(function(a){return xa(a)&&c1(a,n)&&xn(a)!=="body"}):[]}function rN(e,t,i,n){var a=t==="clippingParents"?nN(e):[].concat(t),l=[].concat(a,[i]),c=l[0],d=l.reduce(function(p,m){var b=Sb(e,m,n);return p.top=da(b.top,p.top),p.right=Mu(b.right,p.right),p.bottom=Mu(b.bottom,p.bottom),p.left=da(b.left,p.left),p},Sb(e,c,n));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function g1(e){var t=e.reference,i=e.element,n=e.placement,a=n?pn(n):null,l=n?wo(n):null,c=t.x+t.width/2-i.width/2,d=t.y+t.height/2-i.height/2,p;switch(a){case rs:p={x:c,y:t.y-i.height};break;case Ts:p={x:c,y:t.y+t.height};break;case Is:p={x:t.x+t.width,y:d};break;case as:p={x:t.x-i.width,y:d};break;default:p={x:t.x,y:t.y}}var m=a?pg(a):null;if(m!=null){var b=m==="y"?"height":"width";switch(l){case ya:p[m]=p[m]-(t[b]/2-i[b]/2);break;case bo:p[m]=p[m]+(t[b]/2-i[b]/2);break}}return p}function _o(e,t){t===void 0&&(t={});var i=t,n=i.placement,a=n===void 0?e.placement:n,l=i.strategy,c=l===void 0?e.strategy:l,d=i.boundary,p=d===void 0?qw:d,m=i.rootBoundary,b=m===void 0?cg:m,w=i.elementContext,_=w===void 0?Ba:w,C=i.altBoundary,I=C===void 0?!1:C,O=i.padding,M=O===void 0?0:O,N=d1(typeof M!="number"?M:h1(M,Mo)),k=_===Ba?Zw:Ba,D=e.rects.popper,P=e.elements[I?k:_],$=rN(xa(P)?P:P.contextElement||Wr(e.elements.popper),p,b,c),H=xo(e.elements.reference),ee=g1({reference:H,element:D,strategy:"absolute",placement:a}),se=Wf(Object.assign({},D,ee)),Q=_===Ba?se:H,te={top:$.top-Q.top+N.top,bottom:Q.bottom-$.bottom+N.bottom,left:$.left-Q.left+N.left,right:Q.right-$.right+N.right},ce=e.modifiersData.offset;if(_===Ba&&ce){var oe=ce[a];Object.keys(te).forEach(function(de){var be=[Is,Ts].indexOf(de)>=0?1:-1,Ce=[rs,Ts].indexOf(de)>=0?"y":"x";te[de]+=oe[Ce]*be})}return te}function aN(e,t){t===void 0&&(t={});var i=t,n=i.placement,a=i.boundary,l=i.rootBoundary,c=i.padding,d=i.flipVariations,p=i.allowedAutoPlacements,m=p===void 0?ug:p,b=wo(n),w=b?d?Vf:Vf.filter(function(I){return wo(I)===b}):Mo,_=w.filter(function(I){return m.indexOf(I)>=0});_.length===0&&(_=w);var C=_.reduce(function(I,O){return I[O]=_o(e,{placement:O,boundary:a,rootBoundary:l,padding:c})[pn(O)],I},{});return Object.keys(C).sort(function(I,O){return C[I]-C[O]})}function oN(e){if(pn(e)===Td)return[];var t=ru(e);return[_b(e),t,_b(t)]}function lN(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=i.mainAxis,l=a===void 0?!0:a,c=i.altAxis,d=c===void 0?!0:c,p=i.fallbackPlacements,m=i.padding,b=i.boundary,w=i.rootBoundary,_=i.altBoundary,C=i.flipVariations,I=C===void 0?!0:C,O=i.allowedAutoPlacements,M=t.options.placement,N=pn(M),k=N===M,D=p||(k||!I?[ru(M)]:oN(M)),P=[M].concat(D).reduce(function(et,Ee){return et.concat(pn(Ee)===Td?aN(t,{placement:Ee,boundary:b,rootBoundary:w,padding:m,flipVariations:I,allowedAutoPlacements:O}):Ee)},[]),$=t.rects.reference,H=t.rects.popper,ee=new Map,se=!0,Q=P[0],te=0;te=0,Ce=be?"width":"height",re=_o(t,{placement:ce,boundary:b,rootBoundary:w,altBoundary:_,padding:m}),Z=be?de?Is:as:de?Ts:rs;$[Ce]>H[Ce]&&(Z=ru(Z));var U=ru(Z),fe=[];if(l&&fe.push(re[oe]<=0),d&&fe.push(re[Z]<=0,re[U]<=0),fe.every(function(et){return et})){Q=ce,se=!1;break}ee.set(ce,fe)}if(se)for(var he=I?3:1,ue=function(Ee){var Fe=P.find(function(_e){var Ie=ee.get(_e);if(Ie)return Ie.slice(0,Ee).every(function(pe){return pe})});if(Fe)return Q=Fe,"break"},ve=he;ve>0;ve--){var Re=ue(ve);if(Re==="break")break}t.placement!==Q&&(t.modifiersData[n]._skip=!0,t.placement=Q,t.reset=!0)}}const m1={name:"flip",enabled:!0,phase:"main",fn:lN,requiresIfExists:["offset"],data:{_skip:!1}};function Eb(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function Cb(e){return[rs,Is,Ts,as].some(function(t){return e[t]>=0})}function cN(e){var t=e.state,i=e.name,n=t.rects.reference,a=t.rects.popper,l=t.modifiersData.preventOverflow,c=_o(t,{elementContext:"reference"}),d=_o(t,{altBoundary:!0}),p=Eb(c,n),m=Eb(d,a,l),b=Cb(p),w=Cb(m);t.modifiersData[i]={referenceClippingOffsets:p,popperEscapeOffsets:m,isReferenceHidden:b,hasPopperEscaped:w},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":b,"data-popper-escaped":w})}const v1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:cN};function uN(e,t,i){var n=pn(e),a=[as,rs].indexOf(n)>=0?-1:1,l=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,c=l[0],d=l[1];return c=c||0,d=(d||0)*a,[as,Is].indexOf(n)>=0?{x:d,y:c}:{x:c,y:d}}function dN(e){var t=e.state,i=e.options,n=e.name,a=i.offset,l=a===void 0?[0,0]:a,c=ug.reduce(function(b,w){return b[w]=uN(w,t.rects,l),b},{}),d=c[t.placement],p=d.x,m=d.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=m),t.modifiersData[n]=c}const b1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dN};function hN(e){var t=e.state,i=e.name;t.modifiersData[i]=g1({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const xg={name:"popperOffsets",enabled:!0,phase:"read",fn:hN,data:{}};function fN(e){return e==="x"?"y":"x"}function pN(e){var t=e.state,i=e.options,n=e.name,a=i.mainAxis,l=a===void 0?!0:a,c=i.altAxis,d=c===void 0?!1:c,p=i.boundary,m=i.rootBoundary,b=i.altBoundary,w=i.padding,_=i.tether,C=_===void 0?!0:_,I=i.tetherOffset,O=I===void 0?0:I,M=_o(t,{boundary:p,rootBoundary:m,padding:w,altBoundary:b}),N=pn(t.placement),k=wo(t.placement),D=!k,P=pg(N),$=fN(P),H=t.modifiersData.popperOffsets,ee=t.rects.reference,se=t.rects.popper,Q=typeof O=="function"?O(Object.assign({},t.rects,{placement:t.placement})):O,te=typeof Q=="number"?{mainAxis:Q,altAxis:Q}:Object.assign({mainAxis:0,altAxis:0},Q),ce=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,oe={x:0,y:0};if(H){if(l){var de,be=P==="y"?rs:as,Ce=P==="y"?Ts:Is,re=P==="y"?"height":"width",Z=H[P],U=Z+M[be],fe=Z-M[Ce],he=C?-se[re]/2:0,ue=k===ya?ee[re]:se[re],ve=k===ya?-se[re]:-ee[re],Re=t.elements.arrow,et=C&&Re?fg(Re):{width:0,height:0},Ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:u1(),Fe=Ee[be],_e=Ee[Ce],Ie=bl(0,ee[re],et[re]),pe=D?ee[re]/2-he-Ie-Fe-te.mainAxis:ue-Ie-Fe-te.mainAxis,xe=D?-ee[re]/2+he+Ie+_e+te.mainAxis:ve+Ie+_e+te.mainAxis,Te=t.elements.arrow&&sc(t.elements.arrow),ie=Te?P==="y"?Te.clientTop||0:Te.clientLeft||0:0,j=(de=ce==null?void 0:ce[P])!=null?de:0,G=Z+pe-j-ie,le=Z+xe-j,Se=bl(C?Mu(U,G):U,Z,C?da(fe,le):fe);H[P]=Se,oe[P]=Se-Z}if(d){var Oe,Ye=P==="x"?rs:as,Ue=P==="x"?Ts:Is,Xe=H[$],Ve=$==="y"?"height":"width",Je=Xe+M[Ye],Ae=Xe-M[Ue],De=[rs,as].indexOf(N)!==-1,ot=(Oe=ce==null?void 0:ce[$])!=null?Oe:0,ct=De?Je:Xe-ee[Ve]-se[Ve]-ot+te.altAxis,Pt=De?Xe+ee[Ve]+se[Ve]-ot-te.altAxis:Ae,kt=C&&De?jM(ct,Xe,Pt):bl(C?ct:Je,Xe,C?Pt:Ae);H[$]=kt,oe[$]=kt-Xe}t.modifiersData[n]=oe}}const y1={name:"preventOverflow",enabled:!0,phase:"main",fn:pN,requiresIfExists:["offset"]};function gN(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function mN(e){return e===Xs(e)||!zs(e)?vg(e):gN(e)}function vN(e){var t=e.getBoundingClientRect(),i=yo(t.width)/e.offsetWidth||1,n=yo(t.height)/e.offsetHeight||1;return i!==1||n!==1}function bN(e,t,i){i===void 0&&(i=!1);var n=zs(t),a=zs(t)&&vN(t),l=Wr(t),c=xo(e,a,i),d={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(n||!n&&!i)&&((xn(t)!=="body"||yg(l))&&(d=mN(t)),zs(t)?(p=xo(t,!0),p.x+=t.clientLeft,p.y+=t.clientTop):l&&(p.x=bg(l))),{x:c.left+d.scrollLeft-p.x,y:c.top+d.scrollTop-p.y,width:c.width,height:c.height}}function yN(e){var t=new Map,i=new Set,n=[];e.forEach(function(l){t.set(l.name,l)});function a(l){i.add(l.name);var c=[].concat(l.requires||[],l.requiresIfExists||[]);c.forEach(function(d){if(!i.has(d)){var p=t.get(d);p&&a(p)}}),n.push(l)}return e.forEach(function(l){i.has(l.name)||a(l)}),n}function xN(e){var t=yN(e);return o1.reduce(function(i,n){return i.concat(t.filter(function(a){return a.phase===n}))},[])}function wN(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function _N(e){var t=e.reduce(function(i,n){var a=i[n.name];return i[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,i},{});return Object.keys(t).map(function(i){return t[i]})}var Ab={placement:"bottom",modifiers:[],strategy:"absolute"};function kb(){for(var e=arguments.length,t=new Array(e),i=0;ie instanceof Yn?e.toJSON():e;function mo(e,t){t=t||{};const i={};function n(m,b,w){return Ge.isPlainObject(m)&&Ge.isPlainObject(b)?Ge.merge.call({caseless:w},m,b):Ge.isPlainObject(b)?Ge.merge({},b):Ge.isArray(b)?b.slice():b}function a(m,b,w){if(Ge.isUndefined(b)){if(!Ge.isUndefined(m))return n(void 0,m,w)}else return n(m,b,w)}function l(m,b){if(!Ge.isUndefined(b))return n(void 0,b)}function c(m,b){if(Ge.isUndefined(b)){if(!Ge.isUndefined(m))return n(void 0,m)}else return n(void 0,b)}function d(m,b,w){if(w in t)return n(m,b);if(w in e)return n(void 0,m)}const p={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:d,headers:(m,b)=>a(ab(m),ab(b),!0)};return Ge.forEach(Object.keys(Object.assign({},e,t)),function(b){const w=p[b]||a,_=w(e[b],t[b],b);Ge.isUndefined(_)&&w!==d||(i[b]=_)}),i}const Rw="1.6.2",ag={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ag[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ob={};ag.transitional=function(t,i,n){function a(l,c){return"[Axios v"+Rw+"] Transitional option '"+l+"'"+c+(n?". "+n:"")}return(l,c,d)=>{if(t===!1)throw new qt(a(c," has been removed"+(i?" in "+i:"")),qt.ERR_DEPRECATED);return i&&!ob[c]&&(ob[c]=!0,console.warn(a(c," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(l,c,d):!0}};function OL(e,t,i){if(typeof e!="object")throw new qt("options must be an object",qt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const l=n[a],c=t[l];if(c){const d=e[l],p=d===void 0||c(d,l,e);if(p!==!0)throw new qt("option "+l+" must be "+p,qt.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new qt("Unknown option "+l,qt.ERR_BAD_OPTION)}}const Nf={assertOptions:OL,validators:ag},ar=Nf.validators;class Ou{constructor(t){this.defaults=t,this.interceptors={request:new tb,response:new tb}}request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=mo(this.defaults,i);const{transitional:n,paramsSerializer:a,headers:l}=i;n!==void 0&&Nf.assertOptions(n,{silentJSONParsing:ar.transitional(ar.boolean),forcedJSONParsing:ar.transitional(ar.boolean),clarifyTimeoutError:ar.transitional(ar.boolean)},!1),a!=null&&(Ge.isFunction(a)?i.paramsSerializer={serialize:a}:Nf.assertOptions(a,{encode:ar.function,serialize:ar.function},!0)),i.method=(i.method||this.defaults.method||"get").toLowerCase();let c=l&&Ge.merge(l.common,l[i.method]);l&&Ge.forEach(["delete","get","head","post","put","patch","common"],I=>{delete l[I]}),i.headers=Yn.concat(c,l);const d=[];let p=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(i)===!1||(p=p&&O.synchronous,d.unshift(O.fulfilled,O.rejected))});const m=[];this.interceptors.response.forEach(function(O){m.push(O.fulfilled,O.rejected)});let b,w=0,_;if(!p){const I=[rb.bind(this),void 0];for(I.unshift.apply(I,d),I.push.apply(I,m),_=I.length,b=Promise.resolve(i);w<_;)b=b.then(I[w++],I[w++]);return b}_=d.length;let C=i;for(w=0;w<_;){const I=d[w++],O=d[w++];try{C=I(C)}catch(M){O.call(this,M);break}}try{b=rb.call(this,C)}catch(I){return Promise.reject(I)}for(w=0,_=m.length;w<_;)b=b.then(m[w++],m[w++]);return b}getUri(t){t=mo(this.defaults,t);const i=Mw(t.baseURL,t.url);return Tw(i,t.params,t.paramsSerializer)}}Ge.forEach(["delete","get","head","options"],function(t){Ou.prototype[t]=function(i,n){return this.request(mo(n||{},{method:t,url:i,data:(n||{}).data}))}});Ge.forEach(["post","put","patch"],function(t){function i(n){return function(l,c,d){return this.request(mo(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Ou.prototype[t]=i(),Ou.prototype[t+"Form"]=i(!0)});const su=Ou;class og{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(l){i=l});const n=this;this.promise.then(a=>{if(!n._listeners)return;let l=n._listeners.length;for(;l-- >0;)n._listeners[l](a);n._listeners=null}),this.promise.then=a=>{let l;const c=new Promise(d=>{n.subscribe(d),l=d}).then(a);return c.cancel=function(){n.unsubscribe(l)},c},t(function(l,c,d){n.reason||(n.reason=new ic(l,c,d),i(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}static source(){let t;return{token:new og(function(a){t=a}),cancel:t}}}const PL=og;function LL(e){return function(i){return e.apply(null,i)}}function ML(e){return Ge.isObject(e)&&e.isAxiosError===!0}const Rf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rf).forEach(([e,t])=>{Rf[t]=e});const NL=Rf;function Dw(e){const t=new su(e),i=mw(su.prototype.request,t);return Ge.extend(i,su.prototype,t,{allOwnKeys:!0}),Ge.extend(i,t,null,{allOwnKeys:!0}),i.create=function(a){return Dw(mo(e,a))},i}const Ri=Dw(rg);Ri.Axios=su;Ri.CanceledError=ic;Ri.CancelToken=PL;Ri.isCancel=Lw;Ri.VERSION=Rw;Ri.toFormData=Cd;Ri.AxiosError=qt;Ri.Cancel=Ri.CanceledError;Ri.all=function(t){return Promise.all(t)};Ri.spread=LL;Ri.isAxiosError=ML;Ri.mergeConfig=mo;Ri.AxiosHeaders=Yn;Ri.formToJSON=e=>Pw(Ge.isHTMLForm(e)?new FormData(e):e);Ri.getAdapter=Nw.getAdapter;Ri.HttpStatusCode=NL;Ri.default=Ri;const Yt=Ri;var He=(e=>(e.multi_tags="multi_tags",e.tag="tag",e.string="text",e.number="number",e.date="date",e.color="color",e.url="url",e.checkbox="checkbox",e.path="path",e.image_link="image_link",e._ahash="ahash",e._sha1="sha1",e._folders="folder",e._id="id",e._width="width",e._height="height",e))(He||{}),ki=(e=>(e.sha1="sha1",e.id="id",e))(ki||{}),Pu=(e=>(e[e.id=-1]="id",e[e.sha1=-2]="sha1",e[e.ahash=-3]="ahash",e[e.folders=-4]="folders",e[e.width=-5]="width",e[e.height=-6]="height",e))(Pu||{});function Df(e,t,i,n,a=-1){return{id:e,propertyId:t,value:i,parents:n??[],color:a}}var Hi=(e=>(e.IMAGE="image",e.IMAGE_ZOOM="image_zoom",e.PROPERTY="property",e.SHA1PILE="sha1pile",e.FOLDERTOPROP="folder_to_property",e.EXPORT="export",e.FOLDERSELECTION="explorer",e.SETTINGS="settings",e.IMPORT="import",e.TAG="tag",e.FIRSTMODAL="firstmodal",e))(Hi||{});const Mr=[{name:"red",color:"#ff8787"},{name:"pink",color:"#f783ac"},{name:"grape",color:"#da77f2"},{name:"violet",color:"#9775fa"},{name:"indigo",color:"#748ffc"},{name:"blue",color:"#4dabf7"},{name:"cyan",color:"#3bc9db"},{name:"teal",color:"#38d9a9"},{name:"green",color:"#69db7c"},{name:"lime",color:"#a9e34b"},{name:"yellow",color:"#ffd43b"},{name:"orange",color:"#ffa94d"}];var ti=(e=>(e.Year="Year",e.Month="Month",e.Week="Week",e.Day="Day",e.Hour="Hour",e.Minute="Minute",e.Second="Second",e))(ti||{});const RL={Year:1,Month:1,Week:60*60*24*7,Day:60*60*24,Hour:60*60,Minute:60,Second:1};class DL{constructor(t,i,n,a,l,c){$t(this,"images");$t(this,"state");$t(this,"filterManager");$t(this,"sortManager");$t(this,"groupManager");$t(this,"options");this.filterManager=new WL(i),this.sortManager=new ZL(n),this.groupManager=new Aa(a,l),this.state=Wt({isDirty:!1}),this.filterManager.onChange.addListener(this.onFilter.bind(this)),this.sortManager.onChange.addListener(this.onSort.bind(this)),this.groupManager.onChange.addListener(this.onGroup.bind(this)),this.filterManager.onDirty.addListener(()=>this.setDirty()),this.options=c??{autoReload:!1},yt().onChange.addListener(p=>this.updateInstances(p))}load(t,i,n){this.filterManager.load(t),this.sortManager.load(i),this.groupManager.load(n)}verifyState(){const t=yt();this.filterManager.verifyState(t.properties),this.sortManager.verifyState(t.properties),this.groupManager.verifyState(t.properties)}async setDirty(t){if(this.state.isDirty=!0,this.options.autoReload)if(t){const i=await this.filterManager.updateSelection(t);this.sortManager.updateSelection(i.updated,i.removed),this.groupManager.lastOrder=this.sortManager.result.order,this.groupManager.updateSelection(i.updated,i.removed),this.state.isDirty=!1}else this.update()}async update(t){if(this.images=t??this.images,!this.images)return;const i=await this.filterManager.filter(Ls(this.images)),n=this.sortManager.sort(i.images);this.groupManager.group(n.images,n.order,!0),this.state.isDirty=!1}onFilter(t){const i=this.sortManager.sort(t.images);this.groupManager.group(i.images,i.order,!0)}onSort(t){this.groupManager.sort(t.order,!0)}onGroup(){}updateInstances(t){this.setDirty(t)}}class $L{constructor(t){$t(this,"isLoaded");$t(this,"state");$t(this,"collection");$t(this,"onLoad");this.isLoaded=!1,this.state=Wt({}),this.collection=new DL(void 0,void 0,void 0,void 0,void 0,this.state),this.onLoad=new vo,t&&this.load(t)}async load(t){const i=yt();Object.assign(this.state,Ea(t)),t&&(this.collection.load(t.filterState,t.sortState,t.groupState),this.verifyState(),this.isLoaded=!0,await this.collection.update(i.instances),this.onLoad.emit())}verifyState(){const t=yt();this.collection.verifyState(),this.state.propertyOptions==null&&(this.state.propertyOptions={});for(let i in t.properties)this.state.propertyOptions[i]=Object.assign(Vw(),this.state.propertyOptions[i])}saveState(){Ii().updateTabs()}setVisibleProperty(t,i){this.state.visibleProperties[t]=i}isVisibleProperty(t){return this.state.visibleProperties[t]}getSha1Mode(){return this.collection.groupManager.state.sha1Mode}getVisibleProperties(){return yt().propertyList.filter(i=>this.isVisibleProperty(i.id))}getVisibleSha1Properties(){return this.getVisibleProperties().filter(t=>t.mode==ki.sha1)}}let or;ss({count:0});const $w=2,Ii=gd("projectStore",()=>{let e=0;const t=yt(),i=ye(!1),n=ss({}),a=Wt({tabs:{},selectedTabId:void 0,plugins:[],vectors:{},counter:0,settings:{}}),l=Wt({loaded:!1,projectNotOpen:!1,changed:!1,renderNb:0,onUndo:0,import:{}}),c=ye({}),d=ye(null);async function p(){console.log("init"),or||(or=new $L);let re=await mb(),Z=await vb(),U=await PM(),fe=await pM(),he=await $M();d.value=(await bb()).status,a.plugins=re,a.vectors=U,c.value=Z,a.settings=he,e+=1,m(e),H(),localStorage.getItem("tutorialFinished")!="true"&&(i.value=!0),await t.init(),await $(fe),C(),l.loaded=!0}async function m(re){for(;e==re;){const Z=await bb();if(e!=re)return;if(Z&&(Z.status&&await I(Z.status),Z.actions&&b(Z.actions),Z.plugins&&w(Z.plugins),Z.commits)){for(let U of Z.commits)t.applyCommit(U);or.collection.update()}await Gw(1e3)}}function b(re){c.value={},re.forEach(Z=>c.value[Z.id]=Z)}function w(re){a.plugins=re}function _(){Object.assign(a,{tabs:{},selectedTabId:void 0,plugins:[],vectors:{},counter:0,settings:{}}),Object.assign(l,{loaded:!1,projectNotOpen:!1,changed:!1,renderNb:0,onUndo:0,import:{}}),c.value={},d.value=null,or=void 0,e=0,t.clear()}function C(){or.verifyState()}async function I(re){d.value=re}async function O(){await At(),p()}function M(){return Q().state}async function N(re){let Z=YL();Z.name=re;const U=Math.max(-1,...Object.keys(a.tabs).map(Number))+1;Z.id=U,a.tabs[U]=Z,ph(a.tabs),await P(U)}async function k(re){if(Cs(a.tabs).length==1)await N("Tab1");else{let Z=Cs(a.tabs).sort((U,fe)=>U.id-fe.id).findIndex(U=>U.id==re);Z=Z!=0?Z-1:1,await P(Cs(a.tabs)[Z].id)}delete a.tabs[re],await ph(a.tabs)}async function D(){Object.assign(a.tabs[a.selectedTabId],or.state),await ph(a.tabs)}async function P(re){Cs(a.tabs).forEach(Z=>{Z.id==re?Z.selected=!0:Z.selected=!1}),a.selectedTabId=re,await or.load(a.tabs[a.selectedTabId]),H()}async function $(re){for(let Z of Object.values(re))Z.version==$w&&(a.tabs[Z.id]=Z);if(Object.keys(a.tabs).length==0)await N("Tab1");else{const Z=Cs(a.tabs).find(U=>U.selected);Z?await P(Z.id):await P(re[0].id)}H()}function H(){for(let re in a.tabs){const Z=a.tabs[re];Z.propertyOptions==null&&(Z.propertyOptions={});for(let U in t.properties)Z.propertyOptions[U]=Object.assign(Vw(),Z.propertyOptions[U])}}function ee(){l.renderNb+=1}async function se(re){const Z=await gM(re);return p(),Z}function Q(){return or}function te(){l.import.to_import=void 0}async function ce(){a.plugins=await mb(),c.value=await vb()}async function oe(re,Z){const U=await OM(re,Z);a.plugins=U}async function de(re){a.vectors=await LM(re)}async function be(re){const Z=await Kw(re);return Z.commit&&(t.applyCommit(Z.commit),Z.commit.properties&&Z.commit.properties.forEach(U=>M().visibleProperties[U.id]=!0)),Z}async function Ce(re){const Z=await FM(re);a.settings=Z}return{data:a,status:l,images:n,init:p,clear:_,rerender:ee,addTab:N,removeTab:k,updateTabs:D,selectTab:P,getTab:M,getTabManager:Q,updateSettings:Ce,uploadPropFile:se,clearImport:te,updatePluginInfos:ce,setPluginParams:oe,call:be,actions:c,setDefaultVectors:de,backendStatus:d,reload:O,updatePropertyOptions:H,showTutorial:i}});function l6(e){switch(e){case"contains":case"containsAll":case"containsAny":case"containsNot":case"equal":case"equalNot":case"geq":case"greater":case"leq":case"lower":case"like":case"notLike":case"startsWith":return!0;default:return!1}}function FL(e){switch(e){case He.checkbox:return["isTrue","isFalse"];case He.color:return["isSet","notSet","equal","equalNot"];case He.date:return["isSet","notSet","equal","equalNot","leq","lower","greater","geq"];case He.image_link:return["isSet","notSet","equal","equalNot"];case He.multi_tags:return["isSet","notSet","containsAll","containsAny","containsNot"];case He.number:return["isSet","notSet","equal","equalNot","leq","lower","greater","geq"];case He.path:return["isSet","notSet","equal","equalNot","startsWith","like","notLike"];case He.string:return["isSet","notSet","equal","equalNot","startsWith","like","notLike"];case He.tag:return["isSet","notSet","containsAny","containsNot"];case He.url:return["isSet","notSet","equal","equalNot","like","notLike","startsWith"];case He._ahash:case He._sha1:return["equal","equalNot","like","notLike"];case He._width:case He._height:return["equal","lower","leq","greater","geq"];case He._id:return["equal","equalNot"];default:return[]}}var zL=(e=>(e.equal="equal",e.equalNot="equalNot",e.like="like",e.notLike="notLike",e.lower="lower",e.leq="leq",e.greater="greater",e.geq="geq",e.isTrue="isTrue",e.isFalse="isFalse",e.contains="contains",e.startsWith="startsWith",e.containsAny="containsAny",e.containsAll="containsAll",e.containsNot="containsNot",e.and="and",e.or="or",e.isSet="isSet",e.notSet="notSet",e))(zL||{});const HL={geq:(e,t)=>t==null?!0:e==null?!1:e>=t,leq:(e,t)=>t==null?!0:e==null?!1:e<=t,lower:(e,t)=>t==null?!0:e==null?!1:et==null?!0:e==null?!1:e>t,and:(e,t)=>e&&t,or:(e,t)=>e||t,contains:(e,t)=>Ai(t)?!0:Ai(e)?!1:e.includes(t),containsAll:(e,t)=>{if(Ai(t))return!0;if(Ai(e))return!1;for(let i of e)for(let n of t)if(!n.has(i))return!1;return!0},containsAny:(e,t)=>{if(Ai(t))return!0;if(Ai(e))return!1;for(let i of e)for(let n of t)if(n.has(i))return!0;return!1},containsNot:(e,t)=>{if(Ai(t)||Ai(e))return!0;for(let i of e)for(let n of t)if(n.has(i))return!1;return!0},equal:(e,t)=>Ai(t)?!0:Ai(e)?!1:e==t,equalNot:(e,t)=>Ai(t)||Ai(e)?!0:e!=t,isFalse:e=>Ai(e)?!0:e==!1,isTrue:e=>e,isSet:e=>!Ai(e),notSet:e=>Ai(e),startsWith:(e,t)=>Ai(t)?!0:Ai(e)?!1:e.startsWith(t),like:(e,t)=>Ai(t)?!0:Ai(e)?!1:e.match(t),notLike:(e,t)=>Ai(t)?!0:Ai(e)?!1:!e.match(t)};function Fw(){return{filters:[],groupOperator:"and",depth:0,isGroup:!0,id:-1}}function zw(){const e=Fw();return Wt({folders:[],filter:e,query:""})}function VL(e){switch(e){case He.checkbox:return"isTrue";case He.color:case He.image_link:case He.number:case He.string:case He.path:case He.url:case He.multi_tags:case He.tag:return"isSet";case He.date:return"greater";default:return"equal"}}function Ai(e){return e===void 0||e===""||Array.isArray(e)&&e.length===0||e===null}function BL(e,t,i,n){const a=i[e.propertyId],l=t.map(b=>b.properties[a.id]),c=HL[e.operator];let d=e.value;if(ji(a.type)&&d){const b=d.map(w=>new Set([...n[w].allChildren,w]));d=new Set(b)}if(a.type==He.date){d&&(d=new Date(d));for(let[b,w]of l.entries())w&&(l[b]=new Date(w))}if(a.type==He.string){d&&(d=d.toLowerCase());for(let[b,w]of l.entries())w&&(l[b]=w.toLowerCase())}const p=[],m=[];for(let b=0;bi.instances[d]),a=[];for(let d of this.result.images)t.has(d.id)||a.push(d.id);const l=this.filterInstances(n);for(let d of l.valid)a.push(d.id);return this.result.images=a.map(d=>i.instances[d]),console.timeEnd("UpdateFilter"),{updated:new Set(l.valid.map(d=>d.id)),removed:new Set(l.reject.map(d=>d.id))}}filterInstances(t){const i=yt();let n=t;if(this.state.query){const l=this.state.query.toLocaleLowerCase();Ii();const c=Ls(i.properties),d=c.filter(m=>m.type==He.string),p=c.filter(m=>ji(m.type));n=n.filter(m=>{for(let b of d)if(m.properties[b.id]&&m.properties[b.id]&&m.properties[b.id].toLocaleLowerCase().includes(l))return!0;for(let b of p){const w=m.properties[b.id];if(!w)continue;const _=w.map(C=>i.tags[C].value.toLocaleLowerCase());for(let C of _)if(C.includes(l))return!0}return!1})}if(this.state.folders.length>0){const l=new Set(this.state.folders);n=n.filter(c=>l.has(c.folderId))}return Hw(this.state.filter,n,i.properties,i.tags)}setFolders(t){this.state.folders=t}setQuery(t){this.state.query=t}addNewFilterGroup(t=void 0){let i=Fw();if(t!=null){let l=this.filterIndex[t];if(l==null)throw"Invalid Parent !";l.filters.push(i);const c=l.filters[l.filters.length-1];return this.registerFilter(c),this.onDirty.emit(),c}const n=this.state.filter;n.filters.push(i);const a=n.filters[n.filters.length-1];return this.registerFilter(a),this.onDirty.emit(),a}addNewFilter(t,i=void 0){let n=this.createFilter(t);if(i!=null){let c=this.filterIndex[i];if(c==null)throw new Error("group is undefined");if(!c.isGroup)throw new TypeError("Parent filter is not a FilterGroup, cannot add filter to it");c.filters.push(n);const d=c.filters[c.filters.length-1];return this.registerFilter(d),this.onDirty.emit(),d}const a=this.state.filter;a.filters.push(n);const l=a.filters[a.filters.length-1];return this.registerFilter(l),this.onDirty.emit(),l}deleteFilter(t){Object.values(this.filterIndex).forEach(i=>{if(!i.isGroup)return;const n=i;n.filters=n.filters.filter(a=>a.id!=t)}),delete this.filterIndex[t],this.onDirty.emit()}updateFilter(t,i){const n=yt();if(this.filterIndex[t]==null||this.filterIndex[t].isGroup)return;const a=this.filterIndex[t];i.propertyId!=null&&this.changeFilter(a,i.propertyId);const l=n.properties[a.propertyId].type;i.operator!=null&&FL(l).includes(i.operator)&&(a.operator=i.operator),i.value?a.value=i.value:a.value=lb(l),this.onDirty.emit()}updateFilterGroup(t,i){if(this.filterIndex[t]==null||!this.filterIndex[t].isGroup)return;const n=this.filterIndex[t];n.groupOperator=i,this.onDirty.emit()}changeFilter(t,i){const n=this.createFilter(i);n.id=t.id,Object.assign(t,n)}verifyState(t){const i=n=>{const a=new Set;n.filters.forEach(l=>{if(l.isGroup)i(l);else{const c=l;(t[c.propertyId]==null||t[c.propertyId].id==Ci)&&a.add(c.id)}}),n.filters=n.filters.filter(l=>!a.has(l.id))};i(this.state.filter)}initFilterState(){const t=zw();this.state=t,this.registerFilter(this.state.filter)}registerFilter(t){return t.id>=0&&console.error("registerFilter should not receive a filter with valid id"),t.id=this.nextIndex(),this.filterIndex[t.id]=t,this.filterIndex[t.id]}createFilter(t){let n=yt().properties[t];return{propertyId:n.id,operator:VL(n.type),value:lb(n.type),id:-1}}nextIndex(){const t=Object.keys(this.filterIndex).map(Number);let i=0;return t.length&&(i=Math.max(...t)+1),i===this.lastFilterId&&(i+=1),this.lastFilterId=i,i}recursiveRegister(t){if(t.id<0?t=this.registerFilter(t):this.filterIndex[t.id]=t,!t.isGroup)return;t.filters.forEach(n=>this.recursiveRegister(n))}}function YL(){return Wt({version:$w,id:-1,name:"Tab",display:"tree",filterState:zw(),sortState:Ww(),groupState:Xw(),imageSize:100,visibleProperties:{},visibleFolders:{},selectedFolders:{},propertyOptions:{},similarityDist:.7,sha1Mode:!0,autoReload:!0})}function lb(e){switch(e){case He.checkbox:return!1;case He.color:return;case He.date:return;case He.number:return;case He.string:case He.image_link:case He.path:case He._sha1:case He.url:case He._ahash:return"";case He.multi_tags:case He.tag:return[];default:return""}}function Vw(){return{size:200}}function Cs(e){return Object.keys(e).map(t=>e[t])}function jL(e){let t=e.width/e.height;return Math.max(Math.min(2,t),1)}function cb(e){let t={};e.forEach(n=>{n.children=[],t[n.id]=n,n.count=0});let i={};return e.forEach(n=>{n.parent&&(i[n.parent]==null&&(i[n.parent]=[]),i[n.parent].push(n))}),Object.keys(i).forEach(n=>{n!=null&&i[n].forEach(a=>{t[n].children.push(a)})}),t}function XL(e){for(let t in e){const i=e[t];i.children=[]}for(let t in e){const i=e[t];i.parents.filter(n=>n>0).forEach(n=>e[n].children.push(i.id))}}const Ci=-999999999,ub="Deleted",yt=gd("dataStore",()=>{const e=new vo,t=new Set;let i=-100;const n=ss({}),a=ss({}),l=ss({}),c=ss({}),d=ye({undo:[],redo:[]}),p=ss({}),m=ye(0),b=we(()=>Object.values(n.value).filter(pe=>pe.parent==null)),w=we(()=>Cs(a.value)),_=we(()=>Cs(l.value)),C=we(()=>Cs(c.value).filter(pe=>pe.id!=Ci));async function I(){let pe=await pb();const xe=cb(pe);n.value=xe,console.time("Request");let Te=await uM();console.timeEnd("Request"),console.time("commit"),ee(Te),console.timeEnd("commit"),await Ee()}function O(){return i-=1,i}function M(){e.emit(t),t.clear()}function N(pe){for(let xe of pe){const Te=oM(xe);xe.urlSmall=el+"/image/small/"+xe.sha1,xe.urlMedium=el+"/image/medium/"+xe.sha1,xe.urlLarge=el+"/image/large/"+xe.sha1,xe.urlRaw=el+"/image/raw/"+xe.sha1,xe.containerRatio=jL(xe),a.value[xe.id]?xe.properties=Object.assign(a.value[xe.id].properties,xe.properties):(Array.isArray(p.value[xe.sha1])||(p.value[xe.sha1]=[]),p.value[xe.sha1].push(xe));for(let ie=0;iel.value[Te.id]==null);for(let Te of pe)Te.id in l.value&&(Te.tags=l.value[Te.id].tags),l.value[Te.id]=Te;xe&&Ii().getTabManager().verifyState()}function D(pe){const xe=new Set;for(let Te of pe)if(Te.id!=Ci){if(c.value[Te.id]?(Te.count=c.value[Te.id].count,w.value.forEach(ie=>t.add(ie.id))):Te.count=0,Te.parents=Te.parents.filter(ie=>ie!=0),c.value[Te.id]=Te,!(Te.propertyId in l.value)){console.warn("Property "+Te.propertyId+" must be loaded before importing tags");continue}l.value[Te.propertyId].tags||(l.value[Te.propertyId].tags={}),l.value[Te.propertyId].tags[Te.id]=Te,xe.add(Te.propertyId)}for(let Te of xe)XL(l.value[Te].tags);for(let Te of Cs(c.value))Te.allChildren=sM(Te,c.value),Te.allChildren.splice(Te.allChildren.indexOf(Te.id),1),Te.allParents=nM(Te,c.value)}async function P(pe){const xe=await dM(pe);ee(xe)}function $(pe){for(let xe of pe)xe.value!=null&&(ji(l.value[xe.propertyId].type)&&ve(a.value[xe.instanceId].properties[xe.propertyId],xe.value),a.value[xe.instanceId].properties[xe.propertyId]=xe.value,t.add(xe.instanceId))}function H(pe){for(let xe of pe)if(xe.value!=null&&p.value[xe.sha1]!=null)for(let Te of p.value[xe.sha1])ji(l.value[xe.propertyId].type)&&ve(a.value[Te.id].properties[xe.propertyId],xe.value),a.value[Te.id].properties[xe.propertyId]=xe.value,t.add(Te.id)}function ee(pe,xe){var Te,ie,j,G,le,Se;Ie(pe.instances,pe.emptyInstances),pe.emptyImageValues&&pe.emptyImageValues.forEach(Oe=>{p.value[Oe.sha1].forEach(Ye=>{ji(l.value[Oe.propertyId].type)&&ve(a.value[Ye.id].properties[Oe.propertyId],[]),delete a.value[Ye.id].properties[Oe.propertyId],t.add(Ye.id)})}),pe.emptyInstanceValues&&pe.emptyInstanceValues.forEach(Oe=>{ji(l.value[Oe.propertyId].type)&&ve(a.value[Oe.instanceId].properties[Oe.propertyId],[]),delete a.value[Oe.instanceId].properties[Oe.propertyId],t.add(Oe.instanceId)}),pe.emptyTags&&pe.emptyTags.forEach(Oe=>{c.value[Oe].id=Ci,c.value[Oe].value=ub}),(Te=pe.emptyProperties)!=null&&Te.length&&pe.emptyProperties.forEach(Oe=>{l.value[Oe].id=Ci,l.value[Oe].name=ub}),pe.emptyInstances&&pe.emptyInstances.forEach(Oe=>{a.value[Oe].id=Ci,t.add(Oe)}),(ie=pe.instances)!=null&&ie.length&&N(pe.instances),(j=pe.properties)!=null&&j.length&&k(pe.properties),(G=pe.tags)!=null&&G.length&&D(pe.tags),(le=pe.instanceValues)!=null&&le.length&&$(pe.instanceValues),(Se=pe.imageValues)!=null&&Se.length&&H(pe.imageValues),pe.history&&(d.value=pe.history),!xe&&(Mn(l),Mn(n),Mn(a),Mn(p),Mn(c),M())}function se(){n.value={},a.value={},l.value={},c.value={},p.value={},e.clear(),t.clear(),d.value={undo:[],redo:[]},m.value=0}async function Q(pe,xe,Te){xe&&(pe.undo=!0);const ie=await RM(pe);return ee(ie,Te),ie}async function te(pe,xe,Te=void 0,ie=-1){const G=await Q({tags:[{id:-1,propertyId:pe,value:xe,parents:Te??[],color:ie}]},!0,!0);return Mn(c),G.tags[0]}async function ce(pe,xe){const Te=Object.assign({},c.value[pe]);Te.parents.push(xe),await Q({tags:[Te]})}async function oe(pe,xe){const Te=Object.assign({},c.value[pe]);Te.parents=Te.parents.filter(ie=>ie!=xe),await Q({tags:[Te]})}async function de(pe,xe){if(!xe){const Te=c.value[pe];if(!confirm("Delete tag: "+Te.value+" (ID: "+pe+") ?"))return}Q({emptyTags:[pe]})}async function be(pe,xe,Te){return(await Q({properties:[{id:-1,name:pe,type:xe,mode:Te}]})).properties[0]}async function Ce(pe,xe,Te,ie){Array.isArray(xe)||(xe=[xe]);const j=l.value[pe].mode,G=[],le=[];if(j==ki.id){const Se=xe.map(Oe=>({propertyId:pe,instanceId:Oe.id,value:Te}));G.push(...Se)}if(j==ki.sha1){const Se=xe.map(Oe=>({propertyId:pe,sha1:Oe.sha1,value:Te}));le.push(...Se)}await Q({instanceValues:G,imageValues:le},!0)}async function re(pe,xe,Te){await Q({instanceValues:pe,imageValues:xe},!0)}async function Z(pe,xe,Te,ie){Array.isArray(xe)||(xe=[xe]);const j=xe.map(G=>({value:G.properties[pe]??[],img:G}));if(l.value[pe].mode==ki.id){const G=j.map(le=>({propertyId:pe,instanceId:le.img.id,value:Array.from(new Set([...le.value,...Te]))}));await Q({instanceValues:G})}else{const G=j.map(le=>({propertyId:pe,sha1:le.img.sha1,value:Array.from(new Set([...le.value,...Te]))}));await Q({imageValues:G},!0)}}async function U(pe,xe,Te){const ie=Object.assign({},c.value[pe]);xe&&(ie.value=xe),Te!=null&&(ie.color=Te),await Q({tags:[ie]})}async function fe(pe){await hM(pe);const xe=await pb(),Te=cb(xe);for(let ie of Cs(Te))ie.id in n.value&&(ie.count=n.value[ie.id].count);n.value=Te}async function he(pe,xe){const Te=ns(l.value[pe]);Te.name=xe,Q({properties:[Te]})}async function ue(pe){await Q({emptyProperties:[pe]});const xe=Ii();xe.getTabManager().verifyState(),xe.getTabManager().collection.update()}function ve(pe,xe){pe==null&&(pe=[]),xe==null&&(xe=[]),Array.isArray(pe)||(pe=[pe]),Array.isArray(xe)||(xe=[xe]);const Te=new Set(pe),ie=new Set(xe),j=xe.filter(le=>!Te.has(le)),G=pe.filter(le=>!ie.has(le));j.forEach(le=>c.value[le].count+=1),G.forEach(le=>c.value[le].count-=1)}async function Re(){if(!d.value.undo.length)return;const pe=await MM();ee(pe),m.value++}async function et(){if(!d.value.redo.length)return;const pe=await NM();ee(pe),m.value++}async function Ee(){const pe=await DM();d.value=pe}function Fe(pe){kM(pe)}async function _e(pe){await fM(pe),se(),await I()}function Ie(pe,xe){pe=pe??[],xe=xe??[];for(let Te of pe){if(a.value[Te.id]!=null)continue;let ie=n.value[Te.folderId];for(ie.count+=1,ie=n.value[ie.parent];ie;)ie.count+=1,ie=n.value[ie.parent]}for(let Te of xe){if(a.value[Te]==null)continue;let ie=n.value[Te];for(ie.count-=1,ie=n.value[ie.parent];ie;)ie.count-=1,ie=n.value[ie.parent]}}return{init:I,getTmpId:O,onChange:e,folders:n,instances:a,properties:l,tags:c,history:d,folderRoots:b,sha1Index:p,instanceList:w,propertyList:_,tagList:C,addFolder:fe,reImportFolder:Fe,deleteFolder:_e,addProperty:be,deleteProperty:ue,updateProperty:he,setPropertyValue:Ce,setTagPropertyValue:Z,setPropertyValues:re,addTag:te,deleteTagParent:oe,updateTag:U,addTagParent:ce,deleteTag:de,mergeTags:P,applyCommit:ee,sendCommit:Q,undo:Re,redo:et,onUndo:m,clear:se}});var Bw=(e=>(e[e.Ascending=1]="Ascending",e[e.Descending=-1]="Descending",e))(Bw||{});function Ww(){return Wt({sortBy:[],options:{}})}function GL(){return{direction:1}}const Yw={[He.checkbox]:e=>e?1:0,[He.color]:e=>isNaN(e)?-1:e,[He.date]:e=>e?new Date(e).getTime():0,[He.multi_tags]:e=>e?e.length:0,[He.number]:e=>e??Number.NEGATIVE_INFINITY,[He.path]:e=>e?e.toLocaleLowerCase():"",[He.string]:e=>e?e.toLocaleLowerCase():"",[He.tag]:e=>e||"",[He.url]:e=>e?e.toLocaleLowerCase():"",[He._ahash]:e=>e,[He._sha1]:e=>e,[He._folders]:(e,t)=>t[e].name,[He._height]:e=>e,[He._width]:e=>e,[He._id]:e=>e};function UL(e,t,i){let n=e.properties[t.id];const a=t.type;return a==He.tag&&(Array.isArray(n)&&n.length>0?n=t.tags[n[0]].value:n=void 0),n=Yw[a](n,i),n}function jw(e,t){return e.sort((i,n)=>$f(i,n,t)),e}function $f(e,t,i){for(let n=0;nl[w]),p=jw(Lu(d,n),a);let m=0,b=0;for(;b=e.length)return i;let l=e.length,c=l-i;for(;c>10;){const d=Math.floor(i+c/2),p=Lu([e[d]],n)[0],m=$f(t,p,a);if(m==0)return d;m<0?l=d+1:i=d,c=l-i}for(let d=i;dl.values.push(UL(a,c,n.folders))),i.push(l)}return i}class ZL{constructor(t){$t(this,"state");$t(this,"result");$t(this,"onChange");this.state=t,this.onChange=new vo,this.state||(this.state=Ww()),this.result={images:[],order:{}}}load(t){Object.assign(this.state,Ea(t)),this.clear()}clear(){this.result={images:[],order:[]}}sort(t,i){console.time("Sort");const n=yt(),a=this.state.sortBy.map(d=>n.properties[d]),l=Lu(t,a),c=this.state.sortBy.map(d=>this.state.options[d].direction==1?1:-1);jw(l,c),this.result.images=[],this.result.order={};for(let d=0;dn.properties[d]),l=this.state.sortBy.map(d=>this.state.options[d].direction==1?1:-1),c=KL(this.result.images,t,i,a,l,n.instances);this.result.images=[],this.result.order={};for(let d=0;dt[i]&&t[i].id!=Ci),Object.keys(this.state.options).filter(i=>!t[i]||t[i].id==Ci).forEach(i=>delete this.state.options[i])}}var ps=(e=>(e.All="all",e.Selection="selection",e.Property="property",e.Cluster="cluster",e.Sha1="sha1",e))(ps||{}),JL=(e=>(e[e.Size=0]="Size",e[e.Property=1]="Property",e))(JL||{});function vl(e,t,i="all"){return{id:e,key:[],images:t,type:i,children:[],depth:0,order:-1,meta:{propertyValues:[]},view:{closed:!1,selected:!1}}}function QL(e){return vl(0,e)}function eM(e,t){const i={direction:Bw.Ascending,type:1};return t[e].type==He.date&&(i.stepUnit=ti.Day),i}const db={[He.checkbox]:e=>!!e,[He.color]:e=>{if(!isNaN(e))return e},[He.date]:e=>{if(e)return e},[He.number]:e=>{if(e!=null)return e},[He.path]:e=>{if(e)return e},[He.string]:e=>{if(e)return e},[He.url]:e=>{if(e)return e},[He._ahash]:e=>e,[He._sha1]:e=>e,[He._folders]:e=>e,[He._id]:e=>e,[He._height]:e=>e,[He._width]:e=>e,[He.tag]:e=>{if(Array.isArray(e))return e},[He.multi_tags]:e=>{if(Array.isArray(e))return e}};function hb(e,t,i){if(t||(t=1),i||(i=ti.Day),e==null)return;e=new Date(e);let n=t*RL[i];if(i==ti.Second||i==ti.Minute||i==ti.Hour||i==ti.Day||i==ti.Week){n*=1e3;let a=Math.floor(e.getTime()/n),l=new Date(a*n),c=new Date(a*n+n-1);return{first:l,last:c}}if(i==ti.Year){let a=Math.floor(e.getUTCFullYear()/n),l=new Date(a*n,0,1);l=new Date(l.getTime()-l.getTimezoneOffset()*60*1e3);let c=new Date(a*n+n,0,1);return c=new Date(c.getTime()-c.getTimezoneOffset()*60*1e3),{first:l,last:c}}if(i==ti.Month){let a=e.getUTCFullYear()*12+e.getUTCMonth(),l=Math.floor(a/n)*n,c=Math.floor(l/12),d=l%12,p=new Date(c,d,1);p=new Date(p.getTime()-p.getTimezoneOffset()*60*1e3),l=Math.floor(a/n)*n+n,c=Math.floor(l/12),d=l%12;let m=new Date(c,d,1);return m=new Date(m.getTime()-m.getTimezoneOffset()*60*1e3),{first:p,last:m}}return{first:e,last:e}}function fh(e,t){const i=yt();if(e.children.length!=0){t.type==1?tM(e,t.direction,i.properties,i.folders):iM(e,t.direction);for(let n=0;n{let d=a[l.id],p=a[c.id];for(let m=0;m(i.images.length-n.images.length)*t)}function Nc(e,t){e.images.sort((i,n)=>t[i.id]-t[n.id])}function Rc(e){let t=0;const i=()=>t++,n=a=>{a.order=i(),a.children.forEach(l=>n(l))};n(e)}function Xw(){return{groupBy:[],options:{},sha1Mode:!1}}class fb{constructor(){$t(this,"index");$t(this,"idCounter");this.index=new Map,this.idCounter=1}get(t){let i=this.index;for(let n of t)i.has(n)||i.set(n,new Map),i=i.get(n);if(!i.has(null)){const n=this.idCounter;i.set(null,n),this.idCounter+=1}return i.get(null)}delete(t){let i=this.index;for(let n of t){if(!i.has(n))return;i=i.get(n)}i.delete(null)}}class Aa{constructor(t,i){$t(this,"state");$t(this,"result");$t(this,"lastOrder");$t(this,"customGroups");$t(this,"onChange");$t(this,"selectedImages");$t(this,"selection");$t(this,"iterators");t?this.state=t:this.state=Wt(Xw()),this.result={root:void 0,index:{},imageToGroups:{},valueIndex:new fb},this.customGroups={},this.onChange=new vo,this.selectedImages=i??ss({}),this.selection={lastImage:void 0,lastGroup:void 0},this.iterators=[]}load(t){Object.assign(this.state,Ea(t)),this.clear()}addUpdatedToGroups(t,i){console.time("Group Update");const n=yt();if(this.invalidateIterators(),this.state.groupBy.length>0)for(let a of t)this.addInstanceToGroups(a,n.properties,n.tags);else this.result.root.images.push(...t);if(i)for(let a of Ls(this.result.index))a.type!="cluster"&&Nc(a,i);this.result.imageToGroups={};for(let a of Object.values(this.result.index))a.children.length>0&&a.subGroupType!="sha1"||this.saveImagesToGroup(a);return Rc(this.result.root),console.timeEnd("Group Update"),this.onChange.emit(this.result),this.result}addInstanceToGroups(t,i,n){const a=[];let l=[];for(let c of this.state.groupBy){const d=i[c],p=this.state.options[d.id];let m=t.properties[c];m=db[d.type](m);const b={};if(ji(d.type)&&d.tags)for(let C of Ls(d.tags))b[C.id]=new Set(C.allParents),b[C.id].add(C.id);let w;if(d.type==He.date){const C=hb(m,p.stepSize,p.stepUnit);C&&(m=C.first.toISOString(),w=C.last)}let _=Array.isArray(m)?m:[m];if(ji(d.type)&&_[0]!==void 0){const C=new Set;for(let I of _)if(I)for(let O of b[I])C.add(O);_=Array.from(C)}if(l.length==0)a.push(..._.map(C=>[C])),l=_.map(C=>[C]);else{let C=[];for(let I of l)for(let O of _)C.push([...I,O]);a.push(...C),l=C}for(let C of l){const I=this.result.valueIndex.get(C);if(!this.result.index[I]){const M=vl(I,[],"property");let N=C[C.length-1];d.type==He.date&&(N=new Date(N));let k=[{propertyId:d.id,value:N,valueEnd:w,unit:p.stepUnit}];if(M.meta.propertyValues=k,this.regsiterGroup(M),C.length==1)this.addChildGroup(this.result.root,M),this.result.root.dirty=!0;else{const D=this.result.valueIndex.get(C.slice(0,-1)),P=this.result.index[D];this.addChildGroup(P,M),P.dirty=!0}}const O=this.result.index[I];O.images.push(t),O.dirty=!0}}}group(t,i,n,a){a=!0,a&&console.time("Group");const l=yt();this.invalidateIterators(),this.lastOrder=i;const c=this.result.index??{};this.result.root=QL(t),this.result.index={},this.result.imageToGroups={};const d=this.customGroups??{};if(this.customGroups={},this.regsiterGroup(this.result.root),this.state.groupBy.length>0&&this.computePropertySubGroup(this.result.root,this.state.groupBy,l.properties,l.tags),i)for(let b of Ls(this.result.index))Nc(b,i);for(let b of Object.values(this.result.index))b.children.length>0&&b.subGroupType!="sha1"||this.saveImagesToGroup(b);let p=!0,m=new Set(Object.keys(d).map(Number));for(;p;){p=!1;for(let b of Array.from(m))this.result.index[b]&&(this.addCustomGroups(b,d[b]),m.delete(b),p=!0)}return this.state.sha1Mode&&this.groupLeafsBySha1(),Object.keys(this.result.index).map(b=>{const w=this.result.index[b];c[b]&&(w.view=c[b].view)}),Rc(this.result.root),a&&console.timeEnd("Group"),n&&this.onChange.emit(this.result),this.result}sortGroups(t){this.invalidateIterators();for(let i of Object.values(this.result.index))i.subGroupType=="property"&&i.children.length!=0&&fh(i,this.state.options[i.children[0].meta.propertyValues[0].propertyId]);t&&this.onChange.emit()}saveImagesToGroup(t){for(let i of t.images)this.result.imageToGroups[i.id]||(this.result.imageToGroups[i.id]=[]),this.result.imageToGroups[i.id].push(t.id)}groupLeafsBySha1(){this.removeSha1Groups();for(let t of Object.values(this.result.index))t.children.length>0||this.groupBySha1(t)}removeSha1Groups(){this.invalidateIterators();for(let t of Object.values(this.result.index))t.subGroupType=="sha1"&&this.removeChildren(t)}hasResult(){return this.result.root!=null}clear(t){this.invalidateIterators(),this.result.imageToGroups={},this.result.index={},this.result.root=void 0,this.result.valueIndex=new fb,this.clearLastSelected(),this.clearSelection(),this.customGroups={},this.lastOrder={},t&&this.onChange.emit()}verifyState(t){this.state.groupBy=this.state.groupBy.filter(i=>t[i]&&t[i].id!=Ci),Object.keys(this.state.options).filter(i=>!t[i]||t[i].id==Ci).forEach(i=>delete this.state.options[i])}registerIterator(t){this.iterators.push(t)}invalidateIterators(){for(let t of this.iterators)t.isValid=!1;this.iterators=[]}removeChildren(t){t.children.forEach(i=>{delete this.result.index[i.id],i.key.length&&this.result.valueIndex.delete(i.key),this.removeImageToGroups(i)}),t.children.length=0,t.subGroupType=void 0}groupBySha1(t){t.children&&(t.children.length=0);let i=[],n={};for(let l of t.images)if(n[l.sha1])n[l.sha1].images.push(l);else{const c=[...t.key,l.sha1],d=this.result.valueIndex.get(c);n[l.sha1]=vl(d,[l],"sha1"),n[l.sha1].key=c,n[l.sha1].meta.propertyValues.push({propertyId:-1,value:l.sha1}),i.push(l.sha1)}const a=i.map(l=>n[l]);a.forEach(l=>this.regsiterGroup(l)),this.setChildGroup(t,a)}update(t){this.invalidateIterators(),this.result.root&&this.group(this.result.root.images,this.lastOrder,t,!0)}updateSelection(t,i){const n=yt();this.invalidateIterators(),this.removeSha1Groups();let a=new Set;for(let l of i)this.result.imageToGroups[l]&&this.result.imageToGroups[l].forEach(c=>a.add(c));for(let l of t)this.result.imageToGroups[l]&&this.result.imageToGroups[l].forEach(c=>a.add(c));for(let l of a){const c=this.result.index[l];c.type!="cluster"&&(c.dirty=!0,c.images=c.images.filter(d=>!i.has(d.id)&&!t.has(d.id)))}this.addUpdatedToGroups(Array.from(t).map(l=>n.instances[l]),this.lastOrder);for(let l of Ls(this.result.index)){l.images.length==0&&delete this.result.index[l.id];const c=l.children.length;l.children=l.children.filter(d=>d.images.length>0),l.children.lengthn).forEach(n=>{Nc(n,t)}),this.state.sha1Mode&&this.groupLeafsBySha1(),i&&this.onChange.emit(this.result)}setGroupOption(t,i){const n=yt();this.state.options[t]||(this.state.options[t]=eM(t,n.properties)),i&&Object.assign(this.state.options[t],i),!this.state.groupBy.includes(t)&&(this.state.groupBy.push(t),this.customGroups={})}delGroupOption(t){const i=this.state.groupBy.indexOf(t);i<0||(this.state.groupBy.splice(i,1),this.customGroups={})}addCustomGroups(t,i,n){this.invalidateIterators();const a=this.result.index[t];a&&(this.customGroups[t]=i,this.setChildGroup(a,i),a.subGroupType=="cluster"&&this.state.sha1Mode&&i.forEach(l=>{this.groupBySha1(l)}),Rc(this.result.root),n&&this.onChange.emit(this.result))}delCustomGroups(t,i){delete this.customGroups[t],this.removeChildren(this.result.index[t]),i&&this.onChange.emit(this.result)}clearCustomGroups(t){for(let i of Object.keys(this.customGroups).map(Number))this.delCustomGroups(i);t&&this.onChange.emit()}setSha1Mode(t,i){this.state.sha1Mode!=t&&(this.invalidateIterators(),this.state.sha1Mode=t,t?this.groupLeafsBySha1():this.removeSha1Groups(),i&&this.onChange.emit())}toggleGroup(t,i){this.result.index[t].view.closed=!this.result.index[t].view.closed,i&&this.onChange.emit()}openGroup(t,i){this.result.index[t].view.closed=!1,i&&this.onChange.emit()}closeGroup(t,i){this.result.index[t].view.closed=!0,i&&this.onChange.emit()}getGroupIterator(t,i){return new Nn(this,t,i)}getImageIterator(t,i,n){return new Ss(this,t,i,n)}findImageIterator(t,i){const n=yt(),a=this.result.index[t],l=n.instances[i];let c=0;return a.subGroupType=="sha1"?c=a.children.findIndex(d=>d.images[0].sha1==l.sha1):c=a.images.findIndex(d=>d.id==i),this.getImageIterator(t,c)}setChildGroup(t,i){this.removeChildren(t);for(let n of i)n.parentIdx=t.children.length,n.parent=t,n.depth=t.depth+1,t.children.push(n),this.regsiterGroup(n),n.type!="sha1"&&this.saveImagesToGroup(n);t.subGroupType=t.children.length?i[0].type:void 0,t.subGroupType=="sha1"&&this.saveImagesToGroup(t)}addChildGroup(t,i){i.parentIdx=t.children.length,i.parent=t,i.depth=t.depth+1,t.children.push(i),this.regsiterGroup(i),i.type!="sha1"&&this.saveImagesToGroup(i),t.subGroupType=t.children.length?i.type:void 0,this.removeImageToGroups(t),t.subGroupType=="sha1"&&this.saveImagesToGroup(t)}regsiterGroup(t){this.result.index[t.id]=t}computePropertySubGroup(t,i,n,a){const l=n[i[0]],c=this.state.options[l.id],d={};if(ji(l.type)&&l.tags)for(let I of Ls(l.tags))d[I.id]=new Set(I.allParents),d[I.id].add(I.id);t.subGroupType="property";let p=0,m=0,b=0,w=0;const _=[];for(let I in t.images){const O=t.images[I];let M=performance.now(),N=O.properties[l.id];w+=performance.now()-M,N=db[l.type](N),M=performance.now();let k;if(l.type==He.date){const P=hb(N,c.stepSize,c.stepUnit);P&&(N=P.first,k=P.last)}p+=performance.now()-M,M=performance.now();let D=Array.isArray(N)?N:[N];if(ji(l.type)&&D[0]!==void 0){const P=new Set;for(let $ of D)if($)for(let H of d[$])P.add(H);D=Array.from(P)}m+=performance.now()-M,M=performance.now();for(let P of D){let $=P;P&&l.type==He.date&&($=$.toISOString());const H=[...t.key,$],ee=this.result.valueIndex.get(H);if(!this.result.index[ee]){let Q=[{propertyId:l.id,value:P,valueEnd:k,unit:c.stepUnit}];const te=vl(ee,[],"property");te.meta.propertyValues=Q,te.key=H,this.regsiterGroup(te),_.push(te)}this.result.index[ee].images.push(O)}b+=performance.now()-M}const C=_;if(this.setChildGroup(t,C),i.length>1)for(let I of C)this.computePropertySubGroup(I,i.slice(1),n,a);fh(t,c)}removeImageToGroups(t){t.images.forEach(i=>{if(this.result.imageToGroups[i.id]==null)return;const n=this.result.imageToGroups[i.id].indexOf(t.id);n<0||this.result.imageToGroups[i.id].splice(n,1)})}clearSelection(){this.result.root&&this.unselectGroup(this.result.root),this.selectedImages.value={},this.clearLastSelected()}selectImageIterator(t,i=!1){i&&this._shiftSelect(t),this.selectImages(t.images.map(n=>n.id)),this.clearLastSelected(),this.selection.lastImage=t.clone()}unselectImageIterator(t){this.unselectImages(t.images.map(i=>i.id)),this.clearLastSelected()}toggleImageIterator(t,i=!1){t.images.every(a=>this.selectedImages.value[a.id])?this.unselectImageIterator(t):this.selectImageIterator(t,i)}toggleAll(){const t=this.getGroupIterator();this.toggleGroupIterator(t)}_shiftSelect(t){if(this.selection.lastImage==null)return!1;let i=this.selection.lastImage.isImageBefore(t)?this.selection.lastImage:t,n=i==t?this.selection.lastImage:t,a=[],l=i.clone();for(;l&&!n.isImageBefore(l);)l.sha1Group?a.push(...l.sha1Group.images.map(c=>c.id)):a.push(l.image.id),l=l.nextImages();return a.length?(this.selectImages(a),!0):!1}_shiftGroup(t){if(this.selection.lastGroup==null)return!1;let i=this.selection.lastGroup.isGroupBefore(t)?this.selection.lastGroup:t,n=i==t?this.selection.lastGroup:t,a=[],l=i.clone();for(;l&&!n.isGroupBefore(l);){const c=l.group;c.images.length&&a.push(...c.images.map(d=>d.id)),l=l.nextGroup()}return a.length?(this.selectImages(a),!0):!1}clearLastSelected(){this.selection.lastGroup=void 0,this.selection.lastImage=void 0}unselectImage(t){this.unselectImages([t])}selectImage(t){this.selectImages([t])}selectImages(t){t.forEach(i=>this.selectedImages.value[i]=!0),Mn(this.selectedImages)}unselectImages(t){t.forEach(i=>delete this.selectedImages.value[i]),Mn(this.selectedImages)}propagateUnselect(t){t.view.selected=!1,t.parent&&this.propagateUnselect(t.parent)}propagateSelect(t){t.children.length==0||t.subGroupType=="sha1"?t.view.selected=t.images.every(i=>this.selectedImages.value[i.id]):t.view.selected=t.children.every(i=>i.view.selected),t.parent&&this.propagateSelect(t.parent)}selectGroup(t){this.selectImages(t.images.map(i=>i.id))}unselectGroup(t){this.unselectImages(t.images.map(i=>i.id))}selectGroupIterator(t,i=!1){i&&this._shiftGroup(t),this.selectGroup(t.group),this.clearLastSelected(),this.selection.lastGroup=t.clone()}unselectGroupIterator(t){this.unselectGroup(t.group),this.clearLastSelected()}toggleGroupIterator(t,i=!1){!t.group.images.some(a=>!this.selectedImages.value[a.id])?this.unselectGroupIterator(t):this.selectGroupIterator(t,i)}}class Nn{constructor(t,i,n){$t(this,"isValid");$t(this,"group");$t(this,"manager");$t(this,"groupId");$t(this,"options");this.isValid=!0,this.manager=t,n!=null&&n.register&&this.manager.registerIterator(this),this.groupId=i??0,this.options={},n&&(this.options=n),this.group=this.getGroup()}clone(t){return new Nn(this.manager,this.groupId,t??this.options)}getGroup(){return this.manager.result.index[this.groupId]}nextGroup(){let t=this.group;if(!t.view.closed&&t.children.length>0&&t.subGroupType!="sha1")return new Nn(this.manager,t.children[0].id);let i=t.parent;for(;i!=null;){const n=i.children[t.parentIdx+1];if(n)return new Nn(this.manager,n.id);t=i,i=t.parent}}prevGroup(){var a;let t=this.group;const i=(a=t.parent)==null?void 0:a.children[t.parentIdx-1];if(i)if(i.children.length>0&&(!i.view.closed||this.options.ignoreClosed)){let l=i.children[i.children.length-1];for(;l.children.length>0&&(!l.view.closed||this.options.ignoreClosed);)l=l.children[l.children.length-1];return new Nn(this.manager,l.id)}else return new Nn(this.manager,i.id);const n=t.parent;if(n&&n.parent)return new Nn(this.manager,n.id)}isGroupBefore(t){return this.group.order0&&this.group.subGroupType!="sha1"){const c=this.nextGroup();this.groupId=c.groupId,this.group=c.group}this.images=this.getImages(),this.image=this.images[0],this.sha1Group=this.getSha1Group()}static fromGroupIterator(i,n){if(i.group.images.length!=0)return new Ss(i.manager,i.group.id,0,n)}getImages(){return this.group.subGroupType=="sha1"?this.group.children[this.imageIdx].images:[this.group.images[this.imageIdx]]}getSha1Group(){return this.group.children[this.imageIdx]}nextGroup(){let i=super.nextGroup();for(;i;){const n=i.group;if((!n.view.closed||this.options.ignoreClosed)&&(n.subGroupType=="sha1"||n.children.length==0)){const a=n.subGroupType=="sha1"?n.children.length-1:n.images.length-1;return new Ss(this.manager,i.group.id,a,this.options)}i=i.nextGroup()}}prevGroup(){let i=super.prevGroup();for(;i;){const n=i.group;if((!n.view.closed||this.options.ignoreClosed)&&(n.type=="sha1"||n.children.length==0))return new Ss(this.manager,i.group.id,0,this.options);i=i.prevGroup()}}nextImages(){let i=this.clone(),n=i.imageIdx+1;for(;i;){const a=i.group;if(a.subGroupType=="sha1"){if(a.children[n])return new Ss(this.manager,i.groupId,n,this.options)}else if(a.images[n])return new Ss(this.manager,i.groupId,n,this.options);i=i.nextGroup(),n=0}}prevImages(){let i=this.clone(),n=i.imageIdx-1;for(;i;){const a=i.group;if(a.subGroupType=="sha1"){if(a.children[n])return new Ss(this.manager,i.groupId,n,this.options)}else if(a.images[n])return new Ss(this.manager,i.groupId,n,this.options);i=i.prevGroup(),i&&(i.group.subGroupType=="sha1"?n=i.group.children.length-1:n=i.group.images.length-1)}}isImageBefore(i){return this.isGroupEqual(i)?this.imageIdx{const l=t.folders[a].children;i.push(...l),l.forEach(c=>n(c.id))};return n(e),i}const Gw=e=>new Promise(t=>setTimeout(t,e));class vo{constructor(){$t(this,"listeners");this.listeners=[]}addListener(t){this.listeners.push(t)}removeListener(t){const i=this.listeners.indexOf(t);i!==-1&&this.listeners.splice(i,1)}emit(t){this.listeners.forEach(i=>i(t))}clear(){this.listeners.length=0}}function Ff(e){const t=[];let i=e.parent;for(;i;)t.push(i),i=i.parent;return t}function sM(e,t){const i=[],n=a=>{i.push(a.id),a.children&&a.children.filter(l=>l!=Ci).forEach(l=>n(t[l]))};return n(e),i}function nM(e,t){const i=[],n=a=>{if(a)for(let l of a.parents)l!=0&&(i.push(l),n(t[l]))};return n(e),i}function Ls(e){return Object.keys(e).map(t=>e[t])}function lr(e){return e=e.toString(),e.length<2&&(e="0"+e),e}function lg(){let e=document.getElementsByClassName("v-step__button-next")[0];e&&e.click()}function ks(e){if(e===Object(e)&&!Array.isArray(e)&&typeof e!="function"){const t={};return Object.keys(e).forEach(i=>{t[rM(i)]=ks(e[i])}),t}else if(Array.isArray(e))return e.map(t=>ks(t));return e}function rM(e){return e.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))}function Rn(e){if(e===Object(e)&&!Array.isArray(e)&&typeof e!="function"){const t={};return Object.keys(e).forEach(i=>{t[aM(i)]=Rn(e[i])}),t}else if(Array.isArray(e))return e.map(t=>Rn(t));return e}function aM(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function ns(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e)){const i=[];for(const n of e)i.push(ns(n));return i}if(e instanceof Date)return new Date(e.getTime());if(e instanceof Map){const i=new Map;return e.forEach((n,a)=>{i.set(ns(a),ns(n))}),i}if(e instanceof Set){const i=new Set;return e.forEach(n=>{i.add(ns(n))}),i}const t={};for(const i in e)e.hasOwnProperty(i)&&(t[i]=ns(e[i]));return t}function oM(e){return[e.id,e.sha1,e.ahash,e.folderId,e.width,e.height,e.url]}function lM(e,t,i,n){const a={};for(let l of i)a[l.id]=[];for(let l of e)for(let c of t){let d=l.properties[c.id];if(d===void 0)continue;Array.isArray(d)||(d=[d]);const p=new Set;for(let m of d)n[m].allParents.forEach(b=>p.add(b)),p.add(m);Array.from(p).forEach(m=>{a[m].push(l)})}return a}const kd=e=>e.reduce((t,i)=>t+i,0);function Fi(e,t){let i=String(e),n="";i[0]=="-"&&(n="-",i=i.substring(1));let a=t-i.length;if(a)for(let l=0;lawait Yt.post("/folders",{path:e}),pb=async()=>(await Yt.get("/folders")).data;async function fM(e){return(await Yt.delete("/folder",{params:{folder_id:e}})).data}async function pM(){let e=await nu("tabs");return e||{}}async function ph(e){return(await zf("tabs",e)).data}const gM=async e=>{let t=new FormData;return t.append("file",e),await Yt.post("/property/file",t,{headers:{"Content-Type":"multipart/form-data"}})};async function mM(e){return(await cM("/import/upload",e)).data}async function vM(e){const t=await Yt.post("/import/confirm",e);return ks(t.data)}const bM=async(e,t,i,n,a=!1)=>{await Yt.post("/export",{name:e,images:t,properties:n,exportImages:a,key:i})};async function yM(){return(await Yt.get("/filesystem/info")).data}async function gb(e){return(await Yt.get("/filesystem/ls/"+e)).data}async function xM(e){return(await Yt.get("/filesystem/count/"+e)).data}async function wM(){return(await Yt.get("/status")).data}async function _M(e){return(await Yt.post("/load",{path:e})).data}async function SM(){return(await Yt.post("/close")).data}async function EM(e){return(await Yt.post("/delete_project",{path:e})).data}async function CM(e,t){return(await Yt.post("/create_project",{path:e,name:t})).data}async function AM(e){return(await Yt.post("/import_project",{path:e})).data}async function kM(e){return(await Yt.post("/reimport_folder",{id:e})).data}async function gh(){let e=await Yt.get("/plugins");return ks(e.data)}async function TM(e){return(await Yt.post("/plugins",e)).data}async function IM(e){return(await Yt.delete("/plugins",{params:{path:e}})).data}async function mb(){return(await Yt.get("/plugins_info")).data}async function OM(e,t){return(await Yt.post("/plugin_params",{plugin:e,params:t})).data}async function vb(){return(await Yt.get("/actions")).data}async function Kw(e){const i=(await Yt.post("/action_execute",e)).data;return i.commit&&(i.commit=ks(i.commit)),i}async function PM(){return(await Yt.get("/vectors_info")).data}async function LM(e){return(await Yt.post("/default_vectors",e)).data}async function nu(e){return(await Yt.get("/ui_data/"+e)).data}async function zf(e,t){return(await Yt.post("/ui_data",{key:e,data:t})).data}async function MM(){const e=await Yt.post("/undo");return ks(e.data)}async function NM(){const e=await Yt.post("/redo");return ks(e.data)}async function RM(e){const t=Rn(ns(e));e.instances&&(t.instances=e.instances.map(n=>Rn(n))),e.properties&&(t.properties=e.properties.map(n=>Rn(n))),e.tags&&(t.tags=e.tags.map(n=>Rn(n))),e.instanceValues&&(t.instance_values=e.instanceValues.map(n=>Rn(n))),e.imageValues&&(t.image_values=e.imageValues.map(n=>Rn(n)));const i=await Yt.post("/commit",t);return ks(i.data)}async function DM(){return(await Yt.get("/history")).data}async function bb(){const e=await Yt.get("/update");return ks(e.data)}async function $M(){const e=await Yt.get("/settings");return ks(e.data)}async function FM(e){const t=await Yt.post("/settings",Rn(e));return ks(t.data)}const zM="modulepreload",HM=function(e){return"/"+e},yb={},mh=function(t,i,n){if(!i||i.length===0)return t();const a=document.getElementsByTagName("link");return Promise.all(i.map(l=>{if(l=HM(l),l in yb)return;yb[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!n)for(let b=a.length-1;b>=0;b--){const w=a[b];if(w.href===l&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":zM,c||(m.as="script",m.crossOrigin=""),m.href=l,document.head.appendChild(m),c)return new Promise((b,w)=>{m.addEventListener("load",b),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t()).catch(l=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l})},Hf=mP({history:MO("/"),routes:[{path:"/",name:"home",component:()=>mh(()=>import("./HomeView-91d06d01.js"),["assets/HomeView-91d06d01.js","assets/Tutorial-513a3a94.js","assets/Tutorial-37229e07.css","assets/HomeView-e5222f81.css"])},{path:"/test",name:"test",component:()=>mh(()=>import("./TestView-d606e433.js"),["assets/TestView-d606e433.js","assets/TestView-a6608232.css"])},{path:"/view",name:"view",component:()=>mh(()=>import("./PanopticView-f227269d.js"),["assets/PanopticView-f227269d.js","assets/Tutorial-513a3a94.js","assets/Tutorial-37229e07.css","assets/PanopticView-3bc06f64.css"])}]}),ls=gd("panopticStore",()=>{const e=Ii(),t=Wt({status:{},plugins:[],init:!1}),i=Wt({hasError:!1,error:""}),n=ye(null),a=ye(null),l=we(()=>t.status.isLoaded);async function c(){t.init=!1;try{t.status=await wM(),t.plugins=await gh(),t.init=!0,t.status.isLoaded&&e.init()}catch{setTimeout(()=>c(),1e3)}}async function d(M,N){e.clear(),N||(t.status=await _M(M)),await Hf.push("/view"),setTimeout(()=>e.init(),10)}async function p(){e.status.loaded=!1,e.clear(),t.status=await SM(),Hf.push("/")}async function m(M){t.status=await EM(M)}async function b(M,N){M=M.endsWith("\\")?M:M+"/";const k=M+N;t.status=await CM(k,N),await d(k,!0)}async function w(M){t.status=await AM(M),await d(M,!0)}function _(M,N){n.value=M,a.value=N}function C(){n.value=null,a.value=null}async function I(M){M&&(await TM(M),t.plugins=await gh())}async function O(M){console.log(M),await IM(M),t.plugins=await gh()}return{init:c,data:t,state:i,modalData:a,hideModal:C,showModal:_,openModalId:n,isProjectLoaded:l,loadProject:d,closeProject:p,deleteProject:m,createProject:b,importProject:w,addPlugin:I,delPlugin:O}});var rs="top",Ts="bottom",Is="right",as="left",Td="auto",Mo=[rs,Ts,Is,as],ya="start",bo="end",qw="clippingParents",cg="viewport",Ba="popper",Zw="reference",Vf=Mo.reduce(function(e,t){return e.concat([t+"-"+ya,t+"-"+bo])},[]),ug=[].concat(Mo,[Td]).reduce(function(e,t){return e.concat([t,t+"-"+ya,t+"-"+bo])},[]),Jw="beforeRead",Qw="read",e1="afterRead",t1="beforeMain",i1="main",s1="afterMain",n1="beforeWrite",r1="write",a1="afterWrite",o1=[Jw,Qw,e1,t1,i1,s1,n1,r1,a1];function xn(e){return e?(e.nodeName||"").toLowerCase():null}function Xs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function xa(e){var t=Xs(e).Element;return e instanceof t||e instanceof Element}function zs(e){var t=Xs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dg(e){if(typeof ShadowRoot>"u")return!1;var t=Xs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function VM(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var n=t.styles[i]||{},a=t.attributes[i]||{},l=t.elements[i];!zs(l)||!xn(l)||(Object.assign(l.style,n),Object.keys(a).forEach(function(c){var d=a[c];d===!1?l.removeAttribute(c):l.setAttribute(c,d===!0?"":d)}))})}function BM(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],l=t.attributes[n]||{},c=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:i[n]),d=c.reduce(function(p,m){return p[m]="",p},{});!zs(a)||!xn(a)||(Object.assign(a.style,d),Object.keys(l).forEach(function(p){a.removeAttribute(p)}))})}}const hg={name:"applyStyles",enabled:!0,phase:"write",fn:VM,effect:BM,requires:["computeStyles"]};function pn(e){return e.split("-")[0]}var da=Math.max,Mu=Math.min,yo=Math.round;function Bf(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function l1(){return!/^((?!chrome|android).)*safari/i.test(Bf())}function xo(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=e.getBoundingClientRect(),a=1,l=1;t&&zs(e)&&(a=e.offsetWidth>0&&yo(n.width)/e.offsetWidth||1,l=e.offsetHeight>0&&yo(n.height)/e.offsetHeight||1);var c=xa(e)?Xs(e):window,d=c.visualViewport,p=!l1()&&i,m=(n.left+(p&&d?d.offsetLeft:0))/a,b=(n.top+(p&&d?d.offsetTop:0))/l,w=n.width/a,_=n.height/l;return{width:w,height:_,top:b,right:m+w,bottom:b+_,left:m,x:m,y:b}}function fg(e){var t=xo(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function c1(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&dg(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function qn(e){return Xs(e).getComputedStyle(e)}function WM(e){return["table","td","th"].indexOf(xn(e))>=0}function Wr(e){return((xa(e)?e.ownerDocument:e.document)||window.document).documentElement}function Id(e){return xn(e)==="html"?e:e.assignedSlot||e.parentNode||(dg(e)?e.host:null)||Wr(e)}function xb(e){return!zs(e)||qn(e).position==="fixed"?null:e.offsetParent}function YM(e){var t=/firefox/i.test(Bf()),i=/Trident/i.test(Bf());if(i&&zs(e)){var n=qn(e);if(n.position==="fixed")return null}var a=Id(e);for(dg(a)&&(a=a.host);zs(a)&&["html","body"].indexOf(xn(a))<0;){var l=qn(a);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||t&&l.willChange==="filter"||t&&l.filter&&l.filter!=="none")return a;a=a.parentNode}return null}function sc(e){for(var t=Xs(e),i=xb(e);i&&WM(i)&&qn(i).position==="static";)i=xb(i);return i&&(xn(i)==="html"||xn(i)==="body"&&qn(i).position==="static")?t:i||YM(e)||t}function pg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function bl(e,t,i){return da(e,Mu(t,i))}function jM(e,t,i){var n=bl(e,t,i);return n>i?i:n}function u1(){return{top:0,right:0,bottom:0,left:0}}function d1(e){return Object.assign({},u1(),e)}function h1(e,t){return t.reduce(function(i,n){return i[n]=e,i},{})}var XM=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,d1(typeof t!="number"?t:h1(t,Mo))};function GM(e){var t,i=e.state,n=e.name,a=e.options,l=i.elements.arrow,c=i.modifiersData.popperOffsets,d=pn(i.placement),p=pg(d),m=[as,Is].indexOf(d)>=0,b=m?"height":"width";if(!(!l||!c)){var w=XM(a.padding,i),_=fg(l),C=p==="y"?rs:as,I=p==="y"?Ts:Is,O=i.rects.reference[b]+i.rects.reference[p]-c[p]-i.rects.popper[b],M=c[p]-i.rects.reference[p],N=sc(l),k=N?p==="y"?N.clientHeight||0:N.clientWidth||0:0,D=O/2-M/2,P=w[C],$=k-_[b]-w[I],H=k/2-_[b]/2+D,ee=bl(P,H,$),se=p;i.modifiersData[n]=(t={},t[se]=ee,t.centerOffset=ee-H,t)}}function UM(e){var t=e.state,i=e.options,n=i.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||c1(t.elements.popper,a)&&(t.elements.arrow=a))}const f1={name:"arrow",enabled:!0,phase:"main",fn:GM,effect:UM,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wo(e){return e.split("-")[1]}var KM={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qM(e){var t=e.x,i=e.y,n=window,a=n.devicePixelRatio||1;return{x:yo(t*a)/a||0,y:yo(i*a)/a||0}}function wb(e){var t,i=e.popper,n=e.popperRect,a=e.placement,l=e.variation,c=e.offsets,d=e.position,p=e.gpuAcceleration,m=e.adaptive,b=e.roundOffsets,w=e.isFixed,_=c.x,C=_===void 0?0:_,I=c.y,O=I===void 0?0:I,M=typeof b=="function"?b({x:C,y:O}):{x:C,y:O};C=M.x,O=M.y;var N=c.hasOwnProperty("x"),k=c.hasOwnProperty("y"),D=as,P=rs,$=window;if(m){var H=sc(i),ee="clientHeight",se="clientWidth";if(H===Xs(i)&&(H=Wr(i),qn(H).position!=="static"&&d==="absolute"&&(ee="scrollHeight",se="scrollWidth")),H=H,a===rs||(a===as||a===Is)&&l===bo){P=Ts;var Q=w&&H===$&&$.visualViewport?$.visualViewport.height:H[ee];O-=Q-n.height,O*=p?1:-1}if(a===as||(a===rs||a===Ts)&&l===bo){D=Is;var te=w&&H===$&&$.visualViewport?$.visualViewport.width:H[se];C-=te-n.width,C*=p?1:-1}}var ce=Object.assign({position:d},m&&KM),oe=b===!0?qM({x:C,y:O}):{x:C,y:O};if(C=oe.x,O=oe.y,p){var de;return Object.assign({},ce,(de={},de[P]=k?"0":"",de[D]=N?"0":"",de.transform=($.devicePixelRatio||1)<=1?"translate("+C+"px, "+O+"px)":"translate3d("+C+"px, "+O+"px, 0)",de))}return Object.assign({},ce,(t={},t[P]=k?O+"px":"",t[D]=N?C+"px":"",t.transform="",t))}function ZM(e){var t=e.state,i=e.options,n=i.gpuAcceleration,a=n===void 0?!0:n,l=i.adaptive,c=l===void 0?!0:l,d=i.roundOffsets,p=d===void 0?!0:d,m={placement:pn(t.placement),variation:wo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,wb(Object.assign({},m,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:p})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,wb(Object.assign({},m,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const gg={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ZM,data:{}};var Dc={passive:!0};function JM(e){var t=e.state,i=e.instance,n=e.options,a=n.scroll,l=a===void 0?!0:a,c=n.resize,d=c===void 0?!0:c,p=Xs(t.elements.popper),m=[].concat(t.scrollParents.reference,t.scrollParents.popper);return l&&m.forEach(function(b){b.addEventListener("scroll",i.update,Dc)}),d&&p.addEventListener("resize",i.update,Dc),function(){l&&m.forEach(function(b){b.removeEventListener("scroll",i.update,Dc)}),d&&p.removeEventListener("resize",i.update,Dc)}}const mg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:JM,data:{}};var QM={left:"right",right:"left",bottom:"top",top:"bottom"};function ru(e){return e.replace(/left|right|bottom|top/g,function(t){return QM[t]})}var eN={start:"end",end:"start"};function _b(e){return e.replace(/start|end/g,function(t){return eN[t]})}function vg(e){var t=Xs(e),i=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:i,scrollTop:n}}function bg(e){return xo(Wr(e)).left+vg(e).scrollLeft}function tN(e,t){var i=Xs(e),n=Wr(e),a=i.visualViewport,l=n.clientWidth,c=n.clientHeight,d=0,p=0;if(a){l=a.width,c=a.height;var m=l1();(m||!m&&t==="fixed")&&(d=a.offsetLeft,p=a.offsetTop)}return{width:l,height:c,x:d+bg(e),y:p}}function iN(e){var t,i=Wr(e),n=vg(e),a=(t=e.ownerDocument)==null?void 0:t.body,l=da(i.scrollWidth,i.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),c=da(i.scrollHeight,i.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),d=-n.scrollLeft+bg(e),p=-n.scrollTop;return qn(a||i).direction==="rtl"&&(d+=da(i.clientWidth,a?a.clientWidth:0)-l),{width:l,height:c,x:d,y:p}}function yg(e){var t=qn(e),i=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+a+n)}function p1(e){return["html","body","#document"].indexOf(xn(e))>=0?e.ownerDocument.body:zs(e)&&yg(e)?e:p1(Id(e))}function yl(e,t){var i;t===void 0&&(t=[]);var n=p1(e),a=n===((i=e.ownerDocument)==null?void 0:i.body),l=Xs(n),c=a?[l].concat(l.visualViewport||[],yg(n)?n:[]):n,d=t.concat(c);return a?d:d.concat(yl(Id(c)))}function Wf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function sN(e,t){var i=xo(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function Sb(e,t,i){return t===cg?Wf(tN(e,i)):xa(t)?sN(t,i):Wf(iN(Wr(e)))}function nN(e){var t=yl(Id(e)),i=["absolute","fixed"].indexOf(qn(e).position)>=0,n=i&&zs(e)?sc(e):e;return xa(n)?t.filter(function(a){return xa(a)&&c1(a,n)&&xn(a)!=="body"}):[]}function rN(e,t,i,n){var a=t==="clippingParents"?nN(e):[].concat(t),l=[].concat(a,[i]),c=l[0],d=l.reduce(function(p,m){var b=Sb(e,m,n);return p.top=da(b.top,p.top),p.right=Mu(b.right,p.right),p.bottom=Mu(b.bottom,p.bottom),p.left=da(b.left,p.left),p},Sb(e,c,n));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function g1(e){var t=e.reference,i=e.element,n=e.placement,a=n?pn(n):null,l=n?wo(n):null,c=t.x+t.width/2-i.width/2,d=t.y+t.height/2-i.height/2,p;switch(a){case rs:p={x:c,y:t.y-i.height};break;case Ts:p={x:c,y:t.y+t.height};break;case Is:p={x:t.x+t.width,y:d};break;case as:p={x:t.x-i.width,y:d};break;default:p={x:t.x,y:t.y}}var m=a?pg(a):null;if(m!=null){var b=m==="y"?"height":"width";switch(l){case ya:p[m]=p[m]-(t[b]/2-i[b]/2);break;case bo:p[m]=p[m]+(t[b]/2-i[b]/2);break}}return p}function _o(e,t){t===void 0&&(t={});var i=t,n=i.placement,a=n===void 0?e.placement:n,l=i.strategy,c=l===void 0?e.strategy:l,d=i.boundary,p=d===void 0?qw:d,m=i.rootBoundary,b=m===void 0?cg:m,w=i.elementContext,_=w===void 0?Ba:w,C=i.altBoundary,I=C===void 0?!1:C,O=i.padding,M=O===void 0?0:O,N=d1(typeof M!="number"?M:h1(M,Mo)),k=_===Ba?Zw:Ba,D=e.rects.popper,P=e.elements[I?k:_],$=rN(xa(P)?P:P.contextElement||Wr(e.elements.popper),p,b,c),H=xo(e.elements.reference),ee=g1({reference:H,element:D,strategy:"absolute",placement:a}),se=Wf(Object.assign({},D,ee)),Q=_===Ba?se:H,te={top:$.top-Q.top+N.top,bottom:Q.bottom-$.bottom+N.bottom,left:$.left-Q.left+N.left,right:Q.right-$.right+N.right},ce=e.modifiersData.offset;if(_===Ba&&ce){var oe=ce[a];Object.keys(te).forEach(function(de){var be=[Is,Ts].indexOf(de)>=0?1:-1,Ce=[rs,Ts].indexOf(de)>=0?"y":"x";te[de]+=oe[Ce]*be})}return te}function aN(e,t){t===void 0&&(t={});var i=t,n=i.placement,a=i.boundary,l=i.rootBoundary,c=i.padding,d=i.flipVariations,p=i.allowedAutoPlacements,m=p===void 0?ug:p,b=wo(n),w=b?d?Vf:Vf.filter(function(I){return wo(I)===b}):Mo,_=w.filter(function(I){return m.indexOf(I)>=0});_.length===0&&(_=w);var C=_.reduce(function(I,O){return I[O]=_o(e,{placement:O,boundary:a,rootBoundary:l,padding:c})[pn(O)],I},{});return Object.keys(C).sort(function(I,O){return C[I]-C[O]})}function oN(e){if(pn(e)===Td)return[];var t=ru(e);return[_b(e),t,_b(t)]}function lN(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=i.mainAxis,l=a===void 0?!0:a,c=i.altAxis,d=c===void 0?!0:c,p=i.fallbackPlacements,m=i.padding,b=i.boundary,w=i.rootBoundary,_=i.altBoundary,C=i.flipVariations,I=C===void 0?!0:C,O=i.allowedAutoPlacements,M=t.options.placement,N=pn(M),k=N===M,D=p||(k||!I?[ru(M)]:oN(M)),P=[M].concat(D).reduce(function(et,Ee){return et.concat(pn(Ee)===Td?aN(t,{placement:Ee,boundary:b,rootBoundary:w,padding:m,flipVariations:I,allowedAutoPlacements:O}):Ee)},[]),$=t.rects.reference,H=t.rects.popper,ee=new Map,se=!0,Q=P[0],te=0;te=0,Ce=be?"width":"height",re=_o(t,{placement:ce,boundary:b,rootBoundary:w,altBoundary:_,padding:m}),Z=be?de?Is:as:de?Ts:rs;$[Ce]>H[Ce]&&(Z=ru(Z));var U=ru(Z),fe=[];if(l&&fe.push(re[oe]<=0),d&&fe.push(re[Z]<=0,re[U]<=0),fe.every(function(et){return et})){Q=ce,se=!1;break}ee.set(ce,fe)}if(se)for(var he=I?3:1,ue=function(Ee){var Fe=P.find(function(_e){var Ie=ee.get(_e);if(Ie)return Ie.slice(0,Ee).every(function(pe){return pe})});if(Fe)return Q=Fe,"break"},ve=he;ve>0;ve--){var Re=ue(ve);if(Re==="break")break}t.placement!==Q&&(t.modifiersData[n]._skip=!0,t.placement=Q,t.reset=!0)}}const m1={name:"flip",enabled:!0,phase:"main",fn:lN,requiresIfExists:["offset"],data:{_skip:!1}};function Eb(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function Cb(e){return[rs,Is,Ts,as].some(function(t){return e[t]>=0})}function cN(e){var t=e.state,i=e.name,n=t.rects.reference,a=t.rects.popper,l=t.modifiersData.preventOverflow,c=_o(t,{elementContext:"reference"}),d=_o(t,{altBoundary:!0}),p=Eb(c,n),m=Eb(d,a,l),b=Cb(p),w=Cb(m);t.modifiersData[i]={referenceClippingOffsets:p,popperEscapeOffsets:m,isReferenceHidden:b,hasPopperEscaped:w},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":b,"data-popper-escaped":w})}const v1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:cN};function uN(e,t,i){var n=pn(e),a=[as,rs].indexOf(n)>=0?-1:1,l=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,c=l[0],d=l[1];return c=c||0,d=(d||0)*a,[as,Is].indexOf(n)>=0?{x:d,y:c}:{x:c,y:d}}function dN(e){var t=e.state,i=e.options,n=e.name,a=i.offset,l=a===void 0?[0,0]:a,c=ug.reduce(function(b,w){return b[w]=uN(w,t.rects,l),b},{}),d=c[t.placement],p=d.x,m=d.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=m),t.modifiersData[n]=c}const b1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dN};function hN(e){var t=e.state,i=e.name;t.modifiersData[i]=g1({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const xg={name:"popperOffsets",enabled:!0,phase:"read",fn:hN,data:{}};function fN(e){return e==="x"?"y":"x"}function pN(e){var t=e.state,i=e.options,n=e.name,a=i.mainAxis,l=a===void 0?!0:a,c=i.altAxis,d=c===void 0?!1:c,p=i.boundary,m=i.rootBoundary,b=i.altBoundary,w=i.padding,_=i.tether,C=_===void 0?!0:_,I=i.tetherOffset,O=I===void 0?0:I,M=_o(t,{boundary:p,rootBoundary:m,padding:w,altBoundary:b}),N=pn(t.placement),k=wo(t.placement),D=!k,P=pg(N),$=fN(P),H=t.modifiersData.popperOffsets,ee=t.rects.reference,se=t.rects.popper,Q=typeof O=="function"?O(Object.assign({},t.rects,{placement:t.placement})):O,te=typeof Q=="number"?{mainAxis:Q,altAxis:Q}:Object.assign({mainAxis:0,altAxis:0},Q),ce=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,oe={x:0,y:0};if(H){if(l){var de,be=P==="y"?rs:as,Ce=P==="y"?Ts:Is,re=P==="y"?"height":"width",Z=H[P],U=Z+M[be],fe=Z-M[Ce],he=C?-se[re]/2:0,ue=k===ya?ee[re]:se[re],ve=k===ya?-se[re]:-ee[re],Re=t.elements.arrow,et=C&&Re?fg(Re):{width:0,height:0},Ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:u1(),Fe=Ee[be],_e=Ee[Ce],Ie=bl(0,ee[re],et[re]),pe=D?ee[re]/2-he-Ie-Fe-te.mainAxis:ue-Ie-Fe-te.mainAxis,xe=D?-ee[re]/2+he+Ie+_e+te.mainAxis:ve+Ie+_e+te.mainAxis,Te=t.elements.arrow&&sc(t.elements.arrow),ie=Te?P==="y"?Te.clientTop||0:Te.clientLeft||0:0,j=(de=ce==null?void 0:ce[P])!=null?de:0,G=Z+pe-j-ie,le=Z+xe-j,Se=bl(C?Mu(U,G):U,Z,C?da(fe,le):fe);H[P]=Se,oe[P]=Se-Z}if(d){var Oe,Ye=P==="x"?rs:as,Ue=P==="x"?Ts:Is,Xe=H[$],Ve=$==="y"?"height":"width",Je=Xe+M[Ye],Ae=Xe-M[Ue],De=[rs,as].indexOf(N)!==-1,ot=(Oe=ce==null?void 0:ce[$])!=null?Oe:0,ct=De?Je:Xe-ee[Ve]-se[Ve]-ot+te.altAxis,Pt=De?Xe+ee[Ve]+se[Ve]-ot-te.altAxis:Ae,kt=C&&De?jM(ct,Xe,Pt):bl(C?ct:Je,Xe,C?Pt:Ae);H[$]=kt,oe[$]=kt-Xe}t.modifiersData[n]=oe}}const y1={name:"preventOverflow",enabled:!0,phase:"main",fn:pN,requiresIfExists:["offset"]};function gN(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function mN(e){return e===Xs(e)||!zs(e)?vg(e):gN(e)}function vN(e){var t=e.getBoundingClientRect(),i=yo(t.width)/e.offsetWidth||1,n=yo(t.height)/e.offsetHeight||1;return i!==1||n!==1}function bN(e,t,i){i===void 0&&(i=!1);var n=zs(t),a=zs(t)&&vN(t),l=Wr(t),c=xo(e,a,i),d={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(n||!n&&!i)&&((xn(t)!=="body"||yg(l))&&(d=mN(t)),zs(t)?(p=xo(t,!0),p.x+=t.clientLeft,p.y+=t.clientTop):l&&(p.x=bg(l))),{x:c.left+d.scrollLeft-p.x,y:c.top+d.scrollTop-p.y,width:c.width,height:c.height}}function yN(e){var t=new Map,i=new Set,n=[];e.forEach(function(l){t.set(l.name,l)});function a(l){i.add(l.name);var c=[].concat(l.requires||[],l.requiresIfExists||[]);c.forEach(function(d){if(!i.has(d)){var p=t.get(d);p&&a(p)}}),n.push(l)}return e.forEach(function(l){i.has(l.name)||a(l)}),n}function xN(e){var t=yN(e);return o1.reduce(function(i,n){return i.concat(t.filter(function(a){return a.phase===n}))},[])}function wN(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function _N(e){var t=e.reduce(function(i,n){var a=i[n.name];return i[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,i},{});return Object.keys(t).map(function(i){return t[i]})}var Ab={placement:"bottom",modifiers:[],strategy:"absolute"};function kb(){for(var e=arguments.length,t=new Array(e),i=0;i