@arbocollab/arbo-web-scene 0.26.9-alpha.11 → 0.26.9-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.es.js +3 -17
- package/package.json +1 -1
- package/umd/index.umd.js +2 -16
package/es/index.es.js
CHANGED
|
@@ -11928,7 +11928,7 @@ const uYt = (e, t) => {
|
|
|
11928
11928
|
(s = (o = e == null ? void 0 : e.config) == null ? void 0 : o.globalProperties) == null || s.setStoreValue("scene", "setCurrentSceneTabId", a);
|
|
11929
11929
|
}
|
|
11930
11930
|
return e.config.globalProperties.setStoreValue = r, e.config.globalProperties.handleSetTab = i, { handleSetTab: i };
|
|
11931
|
-
}, cYt = "0.26.9-alpha.
|
|
11931
|
+
}, cYt = "0.26.9-alpha.13", dYt = {
|
|
11932
11932
|
"@arbocollab/arbo-chart-component": "1.0.1",
|
|
11933
11933
|
"@arbocollab/arbo-comment-utils": "1.0.1",
|
|
11934
11934
|
"@arbocollab/arbo-common-utils": "npm:@arbocollab/arbo-common-utils@1.0.14",
|
|
@@ -345901,21 +345901,6 @@ function lBi(e, t, n, r, i, a) {
|
|
|
345901
345901
|
class: "rendition-item",
|
|
345902
345902
|
onClick: () => r.handleSelectKey(l)
|
|
345903
345903
|
}, [
|
|
345904
|
-
Be(` <TessRenditionCard
|
|
345905
|
-
:ref="(ref: any) => (renditionCardRefs[key] = ref)"
|
|
345906
|
-
:active="key === currentIdRendition"
|
|
345907
|
-
:rendition-data="renditionList[key]"
|
|
345908
|
-
:can-delete="permission.deleteRendition"
|
|
345909
|
-
:has-new-comment="Boolean(renditionList[key].has_new_comment)"
|
|
345910
|
-
:is-read-only="false"
|
|
345911
|
-
:tooltip="renditionList[key].name || ''"
|
|
345912
|
-
:disabled="false"
|
|
345913
|
-
:scene-id="sceneId"
|
|
345914
|
-
:take-id="takeId"
|
|
345915
|
-
@copy="handleCopyLink"
|
|
345916
|
-
@delete="handleDeleteRendition"
|
|
345917
|
-
@on-click="handleSelectKey"
|
|
345918
|
-
/> `),
|
|
345919
345904
|
(L(), Ke(o, en({
|
|
345920
345905
|
id: r.renditionList[l].id,
|
|
345921
345906
|
ref_for: !0,
|
|
@@ -345925,10 +345910,11 @@ function lBi(e, t, n, r, i, a) {
|
|
|
345925
345910
|
index: l
|
|
345926
345911
|
}, { ref_for: !0 }, r.createRenditionCardProps(r.renditionList[l]), {
|
|
345927
345912
|
onOpenReview: () => r.handleOpenInReview(l),
|
|
345913
|
+
isSelected: n.currentIdRendition === l,
|
|
345928
345914
|
onOnClick: r.handleSelectKey,
|
|
345929
345915
|
onCopy: (c) => r.handleCopy(r.renditionList[l].id, c),
|
|
345930
345916
|
onDelete: () => r.handleDeleteRendition(l)
|
|
345931
|
-
}), null, 16, ["id", "ref-key", "index", "onOpenReview", "onCopy", "onDelete"]))
|
|
345917
|
+
}), null, 16, ["id", "ref-key", "index", "onOpenReview", "isSelected", "onCopy", "onDelete"]))
|
|
345932
345918
|
], 8, aBi))),
|
|
345933
345919
|
128
|
|
345934
345920
|
/* KEYED_FRAGMENT */
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -37,7 +37,7 @@ Only state can be modified.`);o[0]="$state",WR=!1,r.set(a,o,r.state.value),WR=!0
|
|
|
37
37
|
Found in store "${T.$id}".`),m&&a&&n.hydrate&&n.hydrate(T.$state,m),u=!0,c=!0,T}/*! #__NO_SIDE_EFFECTS__ */function t1(e,t,n){let r;const i=typeof t=="function";r=i?n:t;function a(o,s){const l=X_();if(o=(We.env.NODE_ENV==="test"&&k6&&k6._testing?null:o)||(l?li(F3e,null):null),o&&D6(o),We.env.NODE_ENV!=="production"&&!k6)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
38
38
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
39
39
|
This will fail in production.`);o=k6,o._s.has(e)||(i?qce(e,t,r,o):e4e(e,r,o),We.env.NODE_ENV!=="production"&&(a._pinia=o));const u=o._s.get(e);if(We.env.NODE_ENV!=="production"&&s){const c="__hot:"+e,d=i?qce(c,t,r,o,!0):e4e(c,Ky({},r),o,!0);s._hotUpdate(d),delete o.state.value[c],o._s.delete(c)}if(We.env.NODE_ENV!=="production"&&dT){const c=Ni();if(c&&c.proxy&&!s){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return a.$id=e,a}function _r(e){const t=vi(e),n={};for(const r in t){const i=t[r];i.effect?n[r]=W({get:()=>e[r],set(a){e[r]=a}}):(jr(i)||Nu(i))&&(n[r]=Xo(e,r))}return n}function s9t(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let EG;function Gce(){Gce.init||(Gce.init=!0,EG=s9t()!==-1)}var xG={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Gce(),kt(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",EG&&this.$el.appendChild(e),e.data="about:blank",EG||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!EG&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const l9t=B8t();F8t("data-v-b329ee4c");const u9t={class:"resize-observer",tabindex:"-1"};L8t();const c9t=l9t((e,t,n,r,i,a)=>(L(),Ke("div",u9t)));xG.render=c9t,xG.__scopeId="data-v-b329ee4c",xG.__file="src/components/ResizeObserver.vue";function TG(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?TG=function(t){return typeof t}:TG=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},TG(e)}function d9t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f9t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h9t(e,t,n){return t&&f9t(e.prototype,t),e}function t4e(e){return p9t(e)||m9t(e)||g9t(e)||v9t()}function p9t(e){if(Array.isArray(e))return Kce(e)}function m9t(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function g9t(e,t){if(e){if(typeof e=="string")return Kce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kce(e,t)}}function Kce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v9t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
40
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y9t(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function b9t(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=function(l){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];if(a=c,!(r&&l===i)){var h=n.leading;typeof h=="function"&&(h=h(l,i)),(!r||l!==i)&&h&&e.apply(void 0,[l].concat(t4e(a))),i=l,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[l].concat(t4e(a))),r=0},t)}};return o._clear=function(){clearTimeout(r),r=null},o}function n4e(e,t){if(e===t)return!0;if(TG(e)==="object"){for(var n in e)if(!n4e(e[n],t[n]))return!1;return!0}return!1}var w9t=function(){function e(t,n,r){d9t(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return h9t(e,[{key:"createObserver",value:function(n,r){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=y9t(n),this.callback=function(s,l){i.options.callback(s,l),s&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},o=a.leading;this.callback=b9t(this.callback,this.options.throttle,{leading:function(l){return o==="both"||o==="visible"&&l||o==="hidden"&&!l}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(s){var l=s[0];if(s.length>1){var u=s.find(function(d){return d.isIntersecting});u&&(l=u)}if(i.callback){var c=l.isIntersecting&&l.intersectionRatio>=i.threshold;if(c===i.oldResult)return;i.oldResult=c,i.callback(c,l)}},this.options.intersection),kt(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function r4e(e,t,n){var r=t.value;if(r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new w9t(e,r,n);e._vue_visibilityState=i}}function _9t(e,t,n){var r=t.value,i=t.oldValue;if(!n4e(r,i)){var a=e._vue_visibilityState;if(!r){i4e(e);return}a?a.createObserver(r,n):r4e(e,{value:r},n)}}function i4e(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var C9t={beforeMount:r4e,updated:_9t,unmounted:i4e};function S9t(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}var a4e={itemsLimit:1e3},E9t=/(auto|scroll)/;function o4e(e,t){return e.parentNode===null?t:o4e(e.parentNode,t.concat([e]))}var Yce=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},x9t=function(t){return Yce(t,"overflow")+Yce(t,"overflow-y")+Yce(t,"overflow-x")},T9t=function(t){return E9t.test(x9t(t))};function s4e(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=o4e(e.parentNode,[]),n=0;n<t.length;n+=1)if(T9t(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function Zce(e){"@babel/helpers - typeof";return Zce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zce(e)}var l4e={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function u4e(){return this.items.length&&Zce(this.items[0])!=="object"}var Xce=!1;if(typeof window<"u"){Xce=!1;try{var k9t=Object.defineProperty({},"passive",{get:function(){Xce=!0}});window.addEventListener("test",null,k9t)}catch{}}let D9t=0;var A6={name:"RecycleScroller",components:{ResizeObserver:xG},directives:{ObserveVisibility:C9t},props:{...l4e,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize;let i=1e4,a=0,o;for(let s=0,l=t.length;s<l;s++)o=t[s][n]||r,o<i&&(i=o),a+=o,e[s]={accumulator:a,size:o};return this.$_computedMinItemSize=i,e}return[]},simpleArray:u4e,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,i=t.length;r<i;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,i){const a=Hs({id:D9t++,index:t,used:!0,key:r,type:i}),o=XMe({item:n,position:0,nr:a});return e.push(o),o},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,o=this.typeField,s=this.simpleArray?null:this.keyField,l=this.items,u=l.length,c=this.sizes,d=this.$_views,h=this.$_unusedViews,f=this.pool,m=this.itemIndexByKey;let g,b,w,_,C;if(!u)g=b=_=C=w=0;else if(this.$_prerender)g=_=0,b=C=Math.min(this.prerender,l.length),w=null;else{const D=this.getScroll();if(t){let R=D.start-this.$_lastUpdateScrollPosition;if(R<0&&(R=-R),n===null&&R<a||R<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=D.start;const A=this.buffer;D.start-=A,D.end+=A;let B=0;if(this.$refs.before&&(B=this.$refs.before.scrollHeight,D.start-=B),this.$refs.after){const R=this.$refs.after.scrollHeight;D.end+=R}if(n===null){let R,$=0,N=u-1,M=~~(u/2),H;do H=M,R=c[M].accumulator,R<D.start?$=M:M<u-1&&c[M+1].accumulator>D.start&&(N=M),M=~~(($+N)/2);while(M!==H);for(M<0&&(M=0),g=M,w=c[u-1].accumulator,b=M;b<u&&c[b].accumulator<D.end;b++);for(b===-1?b=l.length-1:(b++,b>u&&(b=u)),_=g;_<u&&B+c[_].accumulator<D.start;_++);for(C=_;C<u&&B+c[C].accumulator<D.end;C++);}else{g=~~(D.start/n*r);const R=g%r;g-=R,b=Math.ceil(D.end/n*r),_=Math.max(0,Math.floor((D.start-B)/n*r)),C=Math.floor((D.end-B)/n*r),g<0&&(g=0),b>u&&(b=u),_<0&&(_=0),C>u&&(C=u),w=Math.ceil(u/r)*n}}b-g>a4e.itemsLimit&&this.itemsLimitError(),this.totalSize=w;let v;const x=g<=this.$_endIndex&&b>=this.$_startIndex;if(x)for(let D=0,A=f.length;D<A;D++)v=f[D],v.nr.used&&(e&&(v.nr.index=m[v.item[s]]),(v.nr.index==null||v.nr.index<g||v.nr.index>=b)&&this.unuseView(v));const E=x?null:new Map;let T,O,k;for(let D=g;D<b;D++){T=l[D];const A=s?T[s]:T;if(A==null)throw new Error(`Key is ${A} on item (keyField is '${s}')`);if(v=d.get(A),!n&&!c[D].size){v&&this.unuseView(v);continue}O=T[o];let B=h.get(O),R=!1;if(!v)x?B&&B.length?v=B.pop():v=this.addView(f,D,T,A,O):(k=E.get(O)||0,(!B||k>=B.length)&&(v=this.addView(f,D,T,A,O),this.unuseView(v,!0),B=h.get(O)),v=B[k],E.set(O,k+1)),d.delete(v.nr.key),v.nr.used=!0,v.nr.index=D,v.nr.key=A,v.nr.type=O,d.set(A,v),R=!0;else if(!v.nr.used&&(v.nr.used=!0,R=!0,B)){const $=B.indexOf(v);$!==-1&&B.splice($,1)}v.item=T,R&&(D===l.length-1&&this.$emit("scroll-end"),D===0&&this.$emit("scroll-start")),n===null?(v.position=c[D-1].accumulator,v.offset=0):(v.position=Math.floor(D/r)*n,v.offset=D%r*i)}return this.$_startIndex=g,this.$_endIndex=b,this.emitUpdate&&this.$emit("update",g,b,_,C),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=s4e(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let r;if(this.pageMode){const i=e.getBoundingClientRect(),a=n?i.height:i.width;let o=-(n?i.top:i.left),s=n?window.innerHeight:window.innerWidth;o<0&&(s+=o,o=0),o+s>a&&(s=a-o),r={start:o,end:o+s}}else n?r={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:r={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Xce?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,i;if(this.pageMode){const a=s4e(this.$el),o=a.tagName==="HTML"?0:a[t.scroll],s=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,i=e+o+u}else n=this.$el,r=t.scroll,i=e;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const A9t={key:0,ref:"before",class:"vue-recycle-scroller__slot"},O9t={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function I9t(e,t,n,r,i,a){const o=ei("ResizeObserver"),s=Va("observe-visibility");return dt((L(),te("div",{class:ve(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...l)=>a.handleScroll&&a.handleScroll(...l))},[e.$slots.before?(L(),te("div",A9t,[ot(e.$slots,"before")],512)):Be("v-if",!0),(L(),Ke(Lf(n.listTag),{ref:"wrapper",style:tn({[e.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:ve(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:Ie(()=>[(L(!0),te(Vt,null,pn(i.pool,l=>(L(),Ke(Lf(n.itemTag),Qt({key:l.nr.id,style:i.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${l.position}px) translate${e.direction==="vertical"?"X":"Y"}(${l.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===l.nr.key}]]},Y8t(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=l.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:Ie(()=>[ot(e.$slots,"default",{item:l.item,index:l.nr.index,active:l.nr.used})]),_:2},1040,["style","class"]))),128)),ot(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(L(),te("div",O9t,[ot(e.$slots,"after")],512)):Be("v-if",!0),Se(o,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[s,a.handleVisibilityChange]])}A6.render=I9t,A6.__file="src/components/RecycleScroller.vue";var kG={name:"DynamicScroller",components:{RecycleScroller:A6},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(const t of e)if(t.target&&t.target.$_vs_onResize){let n,r;if(t.borderBoxSize){const i=t.borderBoxSize[0];n=i.inlineSize,r=i.blockSize}else n=t.contentRect.width,r=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...l4e,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:u4e,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){const s=t[o],l=r?o:s[n];let u=i[l];typeof u>"u"&&!this.$_undefinedMap[l]&&(u=0),e.push({item:s,id:l,size:u})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){const n=this.$el.scrollTop;let r=0,i=0;const a=Math.min(e.length,t.length);for(let s=0;s<a&&!(r>=n);s++)r+=t[s].size||this.minItemSize,i+=e[s].size||this.minItemSize;const o=i-r;o!==0&&(this.$el.scrollTop+=o)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=S9t()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(e){const t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){const n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;const t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function $9t(e,t,n,r,i,a){const o=ei("RecycleScroller");return L(),Ke(o,Qt({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:Ie(({item:s,index:l,active:u})=>[ot(e.$slots,"default",Co(Uo({item:s.item,index:l,active:u,itemWithSize:s})))]),before:Ie(()=>[ot(e.$slots,"before")]),after:Ie(()=>[ot(e.$slots,"after")]),empty:Ie(()=>[ot(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}kG.render=$9t,kG.__file="src/components/DynamicScroller.vue";var Jce={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){const t=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){const n=~~(this.vscrollParent.direction==="vertical"?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return ll(this.tag,this.$slots.default())}};Jce.__file="src/components/DynamicScrollerItem.vue";function R9t(e,t){e.component("".concat(t,"recycle-scroller"),A6),e.component("".concat(t,"RecycleScroller"),A6),e.component("".concat(t,"dynamic-scroller"),kG),e.component("".concat(t,"DynamicScroller"),kG),e.component("".concat(t,"dynamic-scroller-item"),Jce),e.component("".concat(t,"DynamicScrollerItem"),Jce)}var P9t={version:"2.0.0-beta.8",install:function(t,n){var r=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in r)typeof r[i]<"u"&&(a4e[i]=r[i]);r.installComponents&&R9t(t,r.componentsPrefix)}};const M9t=(e,t)=>{const n=a=>t._s.get(a),r=(a,o,s)=>{const l=n(a);return l&&o in l?(l[o](s),!0):(console.warn(`[initWebScene] Store "${a}" or dispactcher "${o}" not found`),!1)};function i(a){var o,s;(s=(o=e==null?void 0:e.config)==null?void 0:o.globalProperties)==null||s.setStoreValue("scene","setCurrentSceneTabId",a)}return e.config.globalProperties.setStoreValue=r,e.config.globalProperties.handleSetTab=i,{handleSetTab:i}},N9t="0.26.9-alpha.11",F9t={"@arbocollab/arbo-chart-component":"1.0.1","@arbocollab/arbo-comment-utils":"1.0.1","@arbocollab/arbo-common-utils":"npm:@arbocollab/arbo-common-utils@1.0.14","@arbocollab/arbo-media-player-component":"0.0.38","@arbocollab/arbo-table-component":"1.0.1","@arbocollab/arbo-ui-components":"npm:@arbocollab/arbo-ui-components-beta@0.0.378-alpha.40","@arbocollab/arbo-calendar-component":"0.0.51","@arbocollab/arbo-metric-table":"npm:@arbocollab/arbo-metric-table@0.0.24","@arbocollab/ag-grid-ui-components":"0.0.53","@vueuse/core":"^10.11.1","@ctrl/tinycolor":"^4.2.0",axios:"^1.7.2","date-fns":"^4.1.0","date-fns-tz":"^3.2.0",dayjs:"^1.11.11",dexie:"4.0.10","js-cookie":"^3.0.5",pinia:"^3.0.3","prettier-plugin-stylus":"^0.1.0","sanitize-html":"^2.15.0","vite-bundle-visualizer":"^1.2.1","vite-plugin-html":"^3.2.2",vue:"^3.5.18","vue-draggable-next":"^2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.5.1","vue-virtual-scroller":"^2.0.0-beta.8"};var ji=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L9t(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var c4e={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ji,function(){/*! *****************************************************************************
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y9t(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function b9t(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=function(l){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];if(a=c,!(r&&l===i)){var h=n.leading;typeof h=="function"&&(h=h(l,i)),(!r||l!==i)&&h&&e.apply(void 0,[l].concat(t4e(a))),i=l,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[l].concat(t4e(a))),r=0},t)}};return o._clear=function(){clearTimeout(r),r=null},o}function n4e(e,t){if(e===t)return!0;if(TG(e)==="object"){for(var n in e)if(!n4e(e[n],t[n]))return!1;return!0}return!1}var w9t=function(){function e(t,n,r){d9t(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return h9t(e,[{key:"createObserver",value:function(n,r){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=y9t(n),this.callback=function(s,l){i.options.callback(s,l),s&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},o=a.leading;this.callback=b9t(this.callback,this.options.throttle,{leading:function(l){return o==="both"||o==="visible"&&l||o==="hidden"&&!l}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(s){var l=s[0];if(s.length>1){var u=s.find(function(d){return d.isIntersecting});u&&(l=u)}if(i.callback){var c=l.isIntersecting&&l.intersectionRatio>=i.threshold;if(c===i.oldResult)return;i.oldResult=c,i.callback(c,l)}},this.options.intersection),kt(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function r4e(e,t,n){var r=t.value;if(r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new w9t(e,r,n);e._vue_visibilityState=i}}function _9t(e,t,n){var r=t.value,i=t.oldValue;if(!n4e(r,i)){var a=e._vue_visibilityState;if(!r){i4e(e);return}a?a.createObserver(r,n):r4e(e,{value:r},n)}}function i4e(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var C9t={beforeMount:r4e,updated:_9t,unmounted:i4e};function S9t(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}var a4e={itemsLimit:1e3},E9t=/(auto|scroll)/;function o4e(e,t){return e.parentNode===null?t:o4e(e.parentNode,t.concat([e]))}var Yce=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},x9t=function(t){return Yce(t,"overflow")+Yce(t,"overflow-y")+Yce(t,"overflow-x")},T9t=function(t){return E9t.test(x9t(t))};function s4e(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=o4e(e.parentNode,[]),n=0;n<t.length;n+=1)if(T9t(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function Zce(e){"@babel/helpers - typeof";return Zce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zce(e)}var l4e={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function u4e(){return this.items.length&&Zce(this.items[0])!=="object"}var Xce=!1;if(typeof window<"u"){Xce=!1;try{var k9t=Object.defineProperty({},"passive",{get:function(){Xce=!0}});window.addEventListener("test",null,k9t)}catch{}}let D9t=0;var A6={name:"RecycleScroller",components:{ResizeObserver:xG},directives:{ObserveVisibility:C9t},props:{...l4e,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize;let i=1e4,a=0,o;for(let s=0,l=t.length;s<l;s++)o=t[s][n]||r,o<i&&(i=o),a+=o,e[s]={accumulator:a,size:o};return this.$_computedMinItemSize=i,e}return[]},simpleArray:u4e,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,i=t.length;r<i;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,i){const a=Hs({id:D9t++,index:t,used:!0,key:r,type:i}),o=XMe({item:n,position:0,nr:a});return e.push(o),o},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,o=this.typeField,s=this.simpleArray?null:this.keyField,l=this.items,u=l.length,c=this.sizes,d=this.$_views,h=this.$_unusedViews,f=this.pool,m=this.itemIndexByKey;let g,b,w,_,C;if(!u)g=b=_=C=w=0;else if(this.$_prerender)g=_=0,b=C=Math.min(this.prerender,l.length),w=null;else{const D=this.getScroll();if(t){let R=D.start-this.$_lastUpdateScrollPosition;if(R<0&&(R=-R),n===null&&R<a||R<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=D.start;const A=this.buffer;D.start-=A,D.end+=A;let B=0;if(this.$refs.before&&(B=this.$refs.before.scrollHeight,D.start-=B),this.$refs.after){const R=this.$refs.after.scrollHeight;D.end+=R}if(n===null){let R,$=0,N=u-1,M=~~(u/2),H;do H=M,R=c[M].accumulator,R<D.start?$=M:M<u-1&&c[M+1].accumulator>D.start&&(N=M),M=~~(($+N)/2);while(M!==H);for(M<0&&(M=0),g=M,w=c[u-1].accumulator,b=M;b<u&&c[b].accumulator<D.end;b++);for(b===-1?b=l.length-1:(b++,b>u&&(b=u)),_=g;_<u&&B+c[_].accumulator<D.start;_++);for(C=_;C<u&&B+c[C].accumulator<D.end;C++);}else{g=~~(D.start/n*r);const R=g%r;g-=R,b=Math.ceil(D.end/n*r),_=Math.max(0,Math.floor((D.start-B)/n*r)),C=Math.floor((D.end-B)/n*r),g<0&&(g=0),b>u&&(b=u),_<0&&(_=0),C>u&&(C=u),w=Math.ceil(u/r)*n}}b-g>a4e.itemsLimit&&this.itemsLimitError(),this.totalSize=w;let v;const x=g<=this.$_endIndex&&b>=this.$_startIndex;if(x)for(let D=0,A=f.length;D<A;D++)v=f[D],v.nr.used&&(e&&(v.nr.index=m[v.item[s]]),(v.nr.index==null||v.nr.index<g||v.nr.index>=b)&&this.unuseView(v));const E=x?null:new Map;let T,O,k;for(let D=g;D<b;D++){T=l[D];const A=s?T[s]:T;if(A==null)throw new Error(`Key is ${A} on item (keyField is '${s}')`);if(v=d.get(A),!n&&!c[D].size){v&&this.unuseView(v);continue}O=T[o];let B=h.get(O),R=!1;if(!v)x?B&&B.length?v=B.pop():v=this.addView(f,D,T,A,O):(k=E.get(O)||0,(!B||k>=B.length)&&(v=this.addView(f,D,T,A,O),this.unuseView(v,!0),B=h.get(O)),v=B[k],E.set(O,k+1)),d.delete(v.nr.key),v.nr.used=!0,v.nr.index=D,v.nr.key=A,v.nr.type=O,d.set(A,v),R=!0;else if(!v.nr.used&&(v.nr.used=!0,R=!0,B)){const $=B.indexOf(v);$!==-1&&B.splice($,1)}v.item=T,R&&(D===l.length-1&&this.$emit("scroll-end"),D===0&&this.$emit("scroll-start")),n===null?(v.position=c[D-1].accumulator,v.offset=0):(v.position=Math.floor(D/r)*n,v.offset=D%r*i)}return this.$_startIndex=g,this.$_endIndex=b,this.emitUpdate&&this.$emit("update",g,b,_,C),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=s4e(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let r;if(this.pageMode){const i=e.getBoundingClientRect(),a=n?i.height:i.width;let o=-(n?i.top:i.left),s=n?window.innerHeight:window.innerWidth;o<0&&(s+=o,o=0),o+s>a&&(s=a-o),r={start:o,end:o+s}}else n?r={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:r={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Xce?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,i;if(this.pageMode){const a=s4e(this.$el),o=a.tagName==="HTML"?0:a[t.scroll],s=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,i=e+o+u}else n=this.$el,r=t.scroll,i=e;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const A9t={key:0,ref:"before",class:"vue-recycle-scroller__slot"},O9t={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function I9t(e,t,n,r,i,a){const o=ei("ResizeObserver"),s=Va("observe-visibility");return dt((L(),te("div",{class:ve(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...l)=>a.handleScroll&&a.handleScroll(...l))},[e.$slots.before?(L(),te("div",A9t,[ot(e.$slots,"before")],512)):Be("v-if",!0),(L(),Ke(Lf(n.listTag),{ref:"wrapper",style:tn({[e.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:ve(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:Ie(()=>[(L(!0),te(Vt,null,pn(i.pool,l=>(L(),Ke(Lf(n.itemTag),Qt({key:l.nr.id,style:i.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${l.position}px) translate${e.direction==="vertical"?"X":"Y"}(${l.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===l.nr.key}]]},Y8t(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=l.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:Ie(()=>[ot(e.$slots,"default",{item:l.item,index:l.nr.index,active:l.nr.used})]),_:2},1040,["style","class"]))),128)),ot(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(L(),te("div",O9t,[ot(e.$slots,"after")],512)):Be("v-if",!0),Se(o,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[s,a.handleVisibilityChange]])}A6.render=I9t,A6.__file="src/components/RecycleScroller.vue";var kG={name:"DynamicScroller",components:{RecycleScroller:A6},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(const t of e)if(t.target&&t.target.$_vs_onResize){let n,r;if(t.borderBoxSize){const i=t.borderBoxSize[0];n=i.inlineSize,r=i.blockSize}else n=t.contentRect.width,r=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...l4e,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:u4e,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){const s=t[o],l=r?o:s[n];let u=i[l];typeof u>"u"&&!this.$_undefinedMap[l]&&(u=0),e.push({item:s,id:l,size:u})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){const n=this.$el.scrollTop;let r=0,i=0;const a=Math.min(e.length,t.length);for(let s=0;s<a&&!(r>=n);s++)r+=t[s].size||this.minItemSize,i+=e[s].size||this.minItemSize;const o=i-r;o!==0&&(this.$el.scrollTop+=o)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=S9t()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(e){const t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){const n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;const t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function $9t(e,t,n,r,i,a){const o=ei("RecycleScroller");return L(),Ke(o,Qt({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:Ie(({item:s,index:l,active:u})=>[ot(e.$slots,"default",Co(Uo({item:s.item,index:l,active:u,itemWithSize:s})))]),before:Ie(()=>[ot(e.$slots,"before")]),after:Ie(()=>[ot(e.$slots,"after")]),empty:Ie(()=>[ot(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}kG.render=$9t,kG.__file="src/components/DynamicScroller.vue";var Jce={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){const t=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){const n=~~(this.vscrollParent.direction==="vertical"?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return ll(this.tag,this.$slots.default())}};Jce.__file="src/components/DynamicScrollerItem.vue";function R9t(e,t){e.component("".concat(t,"recycle-scroller"),A6),e.component("".concat(t,"RecycleScroller"),A6),e.component("".concat(t,"dynamic-scroller"),kG),e.component("".concat(t,"DynamicScroller"),kG),e.component("".concat(t,"dynamic-scroller-item"),Jce),e.component("".concat(t,"DynamicScrollerItem"),Jce)}var P9t={version:"2.0.0-beta.8",install:function(t,n){var r=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in r)typeof r[i]<"u"&&(a4e[i]=r[i]);r.installComponents&&R9t(t,r.componentsPrefix)}};const M9t=(e,t)=>{const n=a=>t._s.get(a),r=(a,o,s)=>{const l=n(a);return l&&o in l?(l[o](s),!0):(console.warn(`[initWebScene] Store "${a}" or dispactcher "${o}" not found`),!1)};function i(a){var o,s;(s=(o=e==null?void 0:e.config)==null?void 0:o.globalProperties)==null||s.setStoreValue("scene","setCurrentSceneTabId",a)}return e.config.globalProperties.setStoreValue=r,e.config.globalProperties.handleSetTab=i,{handleSetTab:i}},N9t="0.26.9-alpha.13",F9t={"@arbocollab/arbo-chart-component":"1.0.1","@arbocollab/arbo-comment-utils":"1.0.1","@arbocollab/arbo-common-utils":"npm:@arbocollab/arbo-common-utils@1.0.14","@arbocollab/arbo-media-player-component":"0.0.38","@arbocollab/arbo-table-component":"1.0.1","@arbocollab/arbo-ui-components":"npm:@arbocollab/arbo-ui-components-beta@0.0.378-alpha.40","@arbocollab/arbo-calendar-component":"0.0.51","@arbocollab/arbo-metric-table":"npm:@arbocollab/arbo-metric-table@0.0.24","@arbocollab/ag-grid-ui-components":"0.0.53","@vueuse/core":"^10.11.1","@ctrl/tinycolor":"^4.2.0",axios:"^1.7.2","date-fns":"^4.1.0","date-fns-tz":"^3.2.0",dayjs:"^1.11.11",dexie:"4.0.10","js-cookie":"^3.0.5",pinia:"^3.0.3","prettier-plugin-stylus":"^0.1.0","sanitize-html":"^2.15.0","vite-bundle-visualizer":"^1.2.1","vite-plugin-html":"^3.2.2",vue:"^3.5.18","vue-draggable-next":"^2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.5.1","vue-virtual-scroller":"^2.0.0-beta.8"};var ji=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L9t(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var c4e={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ji,function(){/*! *****************************************************************************
|
|
41
41
|
Copyright (c) Microsoft Corporation.
|
|
42
42
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
43
43
|
purpose with or without fee is hereby granted.
|
|
@@ -1261,21 +1261,7 @@ ${OB(t)}`),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),
|
|
|
1261
1261
|
* @author RubaXa <trash@rubaxa.org>
|
|
1262
1262
|
* @author owenm <owen23355@gmail.com>
|
|
1263
1263
|
* @license MIT
|
|
1264
|
-
*/function XBt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XBt(Object(n),!0).forEach(function(r){bRi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XBt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ple(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ple=function(t){return typeof t}:Ple=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ple(e)}function bRi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ux(){return Ux=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ux.apply(this,arguments)}function wRi(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _Ri(e,t){if(e==null)return{};var n=wRi(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var CRi="1.14.0";function jx(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Hx=jx(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),wW=jx(/Edge/i),JBt=jx(/firefox/i),_W=jx(/safari/i)&&!jx(/chrome/i)&&!jx(/android/i),QBt=jx(/iP(ad|od|hone)/i),SRi=jx(/chrome/i)&&jx(/android/i),e6t={capture:!1,passive:!1};function Ns(e,t,n){e.addEventListener(t,n,!Hx&&e6t)}function os(e,t,n){e.removeEventListener(t,n,!Hx&&e6t)}function Mle(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function ERi(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function pS(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Mle(e,t):Mle(e,t))||r&&e===n)return e;if(e===n)break}while(e=ERi(e))}return null}var t6t=/\s+/g;function Ry(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(t6t," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(t6t," ")}}function ga(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function $B(e,t){var n="";if(typeof e=="string")n=e;else do{var r=ga(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function n6t(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function mS(){var e=document.scrollingElement;return e||document.documentElement}function Pf(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,l,u,c,d;if(e!==window&&e.parentNode&&e!==mS()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,l=a.bottom,u=a.right,c=a.height,d=a.width):(o=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!Hx))do if(i&&i.getBoundingClientRect&&(ga(i,"transform")!=="none"||n&&ga(i,"position")!=="static")){var h=i.getBoundingClientRect();o-=h.top+parseInt(ga(i,"border-top-width")),s-=h.left+parseInt(ga(i,"border-left-width")),l=o+a.height,u=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var f=$B(i||e),m=f&&f.a,g=f&&f.d;f&&(o/=g,s/=m,d/=m,c/=g,l=o+c,u=s+d)}return{top:o,left:s,bottom:l,right:u,width:d,height:c}}}function r6t(e,t,n){for(var r=_D(e,!0),i=Pf(e)[t];r;){var a=Pf(r)[n],o=void 0;if(o=i>=a,!o)return r;if(r===mS())break;r=_D(r,!1)}return!1}function RB(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!=="none"&&o[a]!==va.ghost&&(r||o[a]!==va.dragged)&&pS(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function tPe(e,t){for(var n=e.lastElementChild;n&&(n===va.ghost||ga(n,"display")==="none"||t&&!Mle(n,t));)n=n.previousElementSibling;return n||null}function F0(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==va.clone&&(!t||Mle(e,t))&&n++;return n}function i6t(e){var t=0,n=0,r=mS();if(e)do{var i=$B(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function xRi(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function _D(e,t){if(!e||!e.getBoundingClientRect)return mS();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ga(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return mS();if(r||t)return n;r=!0}}while(n=n.parentNode);return mS()}function TRi(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function nPe(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var CW;function a6t(e,t){return function(){if(!CW){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),CW=setTimeout(function(){CW=void 0},t)}}}function kRi(){clearTimeout(CW),CW=void 0}function o6t(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function s6t(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Py="Sortable"+new Date().getTime();function DRi(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(ga(i,"display")==="none"||i===va.ghost)){e.push({target:i,rect:Pf(i)});var a=hS({},e[e.length-1].rect);if(i.thisAnimationDuration){var o=$B(i,!0);o&&(a.top-=o.f,a.left-=o.e)}i.fromRect=a}})}},addAnimationState:function(r){e.push(r)},removeAnimationState:function(r){e.splice(xRi(e,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var a=!1,o=0;e.forEach(function(s){var l=0,u=s.target,c=u.fromRect,d=Pf(u),h=u.prevFromRect,f=u.prevToRect,m=s.rect,g=$B(u,!0);g&&(d.top-=g.f,d.left-=g.e),u.toRect=d,u.thisAnimationDuration&&nPe(h,d)&&!nPe(c,d)&&(m.top-d.top)/(m.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(l=ORi(m,h,f,i.options)),nPe(d,c)||(u.prevFromRect=c,u.prevToRect=d,l||(l=i.options.animation),i.animate(u,m,d,l)),l&&(a=!0,o=Math.max(o,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),a?t=setTimeout(function(){typeof r=="function"&&r()},o):typeof r=="function"&&r(),e=[]},animate:function(r,i,a,o){if(o){ga(r,"transition",""),ga(r,"transform","");var s=$B(this.el),l=s&&s.a,u=s&&s.d,c=(i.left-a.left)/(l||1),d=(i.top-a.top)/(u||1);r.animatingX=!!c,r.animatingY=!!d,ga(r,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=ARi(r),ga(r,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),ga(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){ga(r,"transition",""),ga(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},o)}}}}function ARi(e){return e.offsetWidth}function ORi(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var PB=[],rPe={initializeByDefault:!0},SW={mount:function(t){for(var n in rPe)rPe.hasOwnProperty(n)&&!(n in t)&&(t[n]=rPe[n]);PB.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),PB.push(t)},pluginEvent:function(t,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var a=t+"Global";PB.forEach(function(o){n[o.pluginName]&&(n[o.pluginName][a]&&n[o.pluginName][a](hS({sortable:n},r)),n.options[o.pluginName]&&n[o.pluginName][t]&&n[o.pluginName][t](hS({sortable:n},r)))})},initializePlugins:function(t,n,r,i){PB.forEach(function(s){var l=s.pluginName;if(!(!t.options[l]&&!s.initializeByDefault)){var u=new s(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,Ux(r,u.defaults)}});for(var a in t.options)if(t.options.hasOwnProperty(a)){var o=this.modifyOption(t,a,t.options[a]);typeof o<"u"&&(t.options[a]=o)}},getEventProperties:function(t,n){var r={};return PB.forEach(function(i){typeof i.eventProperties=="function"&&Ux(r,i.eventProperties.call(n[i.pluginName],t))}),r},modifyOption:function(t,n,r){var i;return PB.forEach(function(a){t[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[n]=="function"&&(i=a.optionListeners[n].call(t[a.pluginName],r))}),i}};function IRi(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,o=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[Py],!!t){var g,b=t.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Hx&&!wW?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=o||n,g.from=s||n,g.item=i||n,g.clone=a,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var _=hS(hS({},m),SW.getEventProperties(r,t));for(var C in _)g[C]=_[C];n&&n.dispatchEvent(g),b[w]&&b[w].call(t,g)}}var $Ri=["evt"],Zg=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,a=_Ri(r,$Ri);SW.pluginEvent.bind(va)(t,n,hS({dragEl:kr,parentEl:od,ghostEl:no,rootEl:Ju,nextEl:fR,lastDownEl:Nle,cloneEl:sd,cloneHidden:CD,dragStarted:xW,putSortable:jh,activeSortable:va.active,originalEvent:i,oldIndex:MB,oldDraggableIndex:EW,newIndex:My,newDraggableIndex:SD,hideGhostForTarget:p6t,unhideGhostForTarget:m6t,cloneNowHidden:function(){CD=!0},cloneNowShown:function(){CD=!1},dispatchSortableEvent:function(s){Bm({sortable:n,name:s,originalEvent:i})}},a))};function Bm(e){IRi(hS({putSortable:jh,cloneEl:sd,targetEl:kr,rootEl:Ju,oldIndex:MB,oldDraggableIndex:EW,newIndex:My,newDraggableIndex:SD},e))}var kr,od,no,Ju,fR,Nle,sd,CD,MB,My,EW,SD,Fle,jh,NB=!1,Lle=!1,Ble=[],hR,V_,iPe,aPe,l6t,u6t,xW,FB,TW,kW=!1,Vle=!1,Ule,tm,oPe=[],sPe=!1,jle=[],Hle=typeof document<"u",zle=QBt,c6t=wW||Hx?"cssFloat":"float",RRi=Hle&&!SRi&&!QBt&&"draggable"in document.createElement("div"),d6t=function(){if(Hle){if(Hx)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),f6t=function(t,n){var r=ga(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=RB(t,0,n),o=RB(t,1,n),s=a&&ga(a),l=o&&ga(o),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Pf(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Pf(o).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var d=s.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=i&&r[c6t]==="none"||o&&r[c6t]==="none"&&u+c>i)?"vertical":"horizontal"},PRi=function(t,n,r){var i=r?t.left:t.top,a=r?t.right:t.bottom,o=r?t.width:t.height,s=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return i===s||a===l||i+o/2===s+u/2},MRi=function(t,n){var r;return Ble.some(function(i){var a=i[Py].options.emptyInsertThreshold;if(!(!a||tPe(i))){var o=Pf(i),s=t>=o.left-a&&t<=o.right+a,l=n>=o.top-a&&n<=o.bottom+a;if(s&&l)return r=i}}),r},h6t=function(t){function n(a,o){return function(s,l,u,c){var d=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(o||d))return!0;if(a==null||a===!1)return!1;if(o&&a==="clone")return a;if(typeof a=="function")return n(a(s,l,u,c),o)(s,l,u,c);var h=(o?s:l).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var r={},i=t.group;(!i||Ple(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},p6t=function(){!d6t&&no&&ga(no,"display","none")},m6t=function(){!d6t&&no&&ga(no,"display","")};Hle&&document.addEventListener("click",function(e){if(Lle)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Lle=!1,!1},!0);var pR=function(t){if(kr){t=t.touches?t.touches[0]:t;var n=MRi(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[Py]._onDragOver(r)}}},NRi=function(t){kr&&kr.parentNode[Py]._isOutsideThisEl(t.target)};function va(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ux({},t),e[Py]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return f6t(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,s){o.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:va.supportPointer!==!1&&"PointerEvent"in window&&!_W,emptyInsertThreshold:5};SW.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);h6t(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:RRi,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Ns(e,"pointerdown",this._onTapStart):(Ns(e,"mousedown",this._onTapStart),Ns(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ns(e,"dragover",this),Ns(e,"dragenter",this)),Ble.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ux(this,DRi())}va.prototype={constructor:va,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(FB=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,kr):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,a=i.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=i.filter;if(zRi(r),!kr&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&_W&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=pS(l,i.draggable,r,!1),!(l&&l.animated)&&Nle!==l)){if(MB=F0(l),EW=F0(l,i.draggable),typeof c=="function"){if(c.call(this,t,l,this)){Bm({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),Zg("filter",n,{evt:t}),a&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=pS(u,d.trim(),r,!1),d)return Bm({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:r,toEl:r}),Zg("filter",n,{evt:t}),!0}),c)){a&&t.cancelable&&t.preventDefault();return}i.handle&&!pS(u,i.handle,r,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,n,r){var i=this,a=i.el,o=i.options,s=a.ownerDocument,l;if(r&&!kr&&r.parentNode===a){var u=Pf(r);if(Ju=a,kr=r,od=kr.parentNode,fR=kr.nextSibling,Nle=r,Fle=o.group,va.dragged=kr,hR={target:kr,clientX:(n||t).clientX,clientY:(n||t).clientY},l6t=hR.clientX-u.left,u6t=hR.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,kr.style["will-change"]="all",l=function(){if(Zg("delayEnded",i,{evt:t}),va.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!JBt&&i.nativeDraggable&&(kr.draggable=!0),i._triggerDragStart(t,n),Bm({sortable:i,name:"choose",originalEvent:t}),Ry(kr,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){n6t(kr,c.trim(),lPe)}),Ns(s,"dragover",pR),Ns(s,"mousemove",pR),Ns(s,"touchmove",pR),Ns(s,"mouseup",i._onDrop),Ns(s,"touchend",i._onDrop),Ns(s,"touchcancel",i._onDrop),JBt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,kr.draggable=!0),Zg("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(wW||Hx))){if(va.eventCanceled){this._onDrop();return}Ns(s,"mouseup",i._disableDelayedDrag),Ns(s,"touchend",i._disableDelayedDrag),Ns(s,"touchcancel",i._disableDelayedDrag),Ns(s,"mousemove",i._delayedDragTouchMoveHandler),Ns(s,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&Ns(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){kr&&lPe(kr),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;os(t,"mouseup",this._disableDelayedDrag),os(t,"touchend",this._disableDelayedDrag),os(t,"touchcancel",this._disableDelayedDrag),os(t,"mousemove",this._delayedDragTouchMoveHandler),os(t,"touchmove",this._delayedDragTouchMoveHandler),os(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Ns(document,"pointermove",this._onTouchMove):n?Ns(document,"touchmove",this._onTouchMove):Ns(document,"mousemove",this._onTouchMove):(Ns(kr,"dragend",this),Ns(Ju,"dragstart",this._onDragStart));try{document.selection?qle(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(NB=!1,Ju&&kr){Zg("dragStarted",this,{evt:n}),this.nativeDraggable&&Ns(document,"dragover",NRi);var r=this.options;!t&&Ry(kr,r.dragClass,!1),Ry(kr,r.ghostClass,!0),va.active=this,t&&this._appendGhost(),Bm({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(V_){this._lastX=V_.clientX,this._lastY=V_.clientY,p6t();for(var t=document.elementFromPoint(V_.clientX,V_.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(V_.clientX,V_.clientY),t!==n);)n=t;if(kr.parentNode[Py]._isOutsideThisEl(t),n)do{if(n[Py]){var r=void 0;if(r=n[Py]._onDragOver({clientX:V_.clientX,clientY:V_.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);m6t()}},_onTouchMove:function(t){if(hR){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,a=t.touches?t.touches[0]:t,o=no&&$B(no,!0),s=no&&o&&o.a,l=no&&o&&o.d,u=zle&&tm&&i6t(tm),c=(a.clientX-hR.clientX+i.x)/(s||1)+(u?u[0]-oPe[0]:0)/(s||1),d=(a.clientY-hR.clientY+i.y)/(l||1)+(u?u[1]-oPe[1]:0)/(l||1);if(!va.active&&!NB){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(no){o?(o.e+=c-(iPe||0),o.f+=d-(aPe||0)):o={a:1,b:0,c:0,d:1,e:c,f:d};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");ga(no,"webkitTransform",h),ga(no,"mozTransform",h),ga(no,"msTransform",h),ga(no,"transform",h),iPe=c,aPe=d,V_=a}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!no){var t=this.options.fallbackOnBody?document.body:Ju,n=Pf(kr,!0,zle,!0,t),r=this.options;if(zle){for(tm=t;ga(tm,"position")==="static"&&ga(tm,"transform")==="none"&&tm!==document;)tm=tm.parentNode;tm!==document.body&&tm!==document.documentElement?(tm===document&&(tm=mS()),n.top+=tm.scrollTop,n.left+=tm.scrollLeft):tm=mS(),oPe=i6t(tm)}no=kr.cloneNode(!0),Ry(no,r.ghostClass,!1),Ry(no,r.fallbackClass,!0),Ry(no,r.dragClass,!0),ga(no,"transition",""),ga(no,"transform",""),ga(no,"box-sizing","border-box"),ga(no,"margin",0),ga(no,"top",n.top),ga(no,"left",n.left),ga(no,"width",n.width),ga(no,"height",n.height),ga(no,"opacity","0.8"),ga(no,"position",zle?"absolute":"fixed"),ga(no,"zIndex","100000"),ga(no,"pointerEvents","none"),va.ghost=no,t.appendChild(no),ga(no,"transform-origin",l6t/parseInt(no.style.width)*100+"% "+u6t/parseInt(no.style.height)*100+"%")}},_onDragStart:function(t,n){var r=this,i=t.dataTransfer,a=r.options;if(Zg("dragStart",this,{evt:t}),va.eventCanceled){this._onDrop();return}Zg("setupClone",this),va.eventCanceled||(sd=s6t(kr),sd.draggable=!1,sd.style["will-change"]="",this._hideClone(),Ry(sd,this.options.chosenClass,!1),va.clone=sd),r.cloneId=qle(function(){Zg("clone",r),!va.eventCanceled&&(r.options.removeCloneOnHide||Ju.insertBefore(sd,kr),r._hideClone(),Bm({sortable:r,name:"clone"}))}),!n&&Ry(kr,a.dragClass,!0),n?(Lle=!0,r._loopId=setInterval(r._emulateDragOver,50)):(os(document,"mouseup",r._onDrop),os(document,"touchend",r._onDrop),os(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",a.setData&&a.setData.call(r,i,kr)),Ns(document,"drop",r),ga(kr,"transform","translateZ(0)")),NB=!0,r._dragStartId=qle(r._dragStarted.bind(r,n,t)),Ns(document,"selectstart",r),xW=!0,_W&&ga(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,r=t.target,i,a,o,s=this.options,l=s.group,u=va.active,c=Fle===l,d=s.sort,h=jh||u,f,m=this,g=!1;if(sPe)return;function b(G,ne){Zg(G,m,hS({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:o,dragRect:i,targetRect:a,canSort:d,fromSortable:h,target:r,completed:_,onMove:function(Q,U){return Wle(Ju,n,kr,i,Q,Pf(Q),t,U)},changed:C},ne))}function w(){b("dragOverAnimationCapture"),m.captureAnimationState(),m!==h&&h.captureAnimationState()}function _(G){return b("dragOverCompleted",{insertion:G}),G&&(c?u._hideClone():u._showClone(m),m!==h&&(Ry(kr,jh?jh.options.ghostClass:u.options.ghostClass,!1),Ry(kr,s.ghostClass,!0)),jh!==m&&m!==va.active?jh=m:m===va.active&&jh&&(jh=null),h===m&&(m._ignoreWhileAnimating=r),m.animateAll(function(){b("dragOverAnimationComplete"),m._ignoreWhileAnimating=null}),m!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(r===kr&&!kr.animated||r===n&&!r.animated)&&(FB=null),!s.dragoverBubble&&!t.rootEl&&r!==document&&(kr.parentNode[Py]._isOutsideThisEl(t.target),!G&&pR(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function C(){My=F0(kr),SD=F0(kr,s.draggable),Bm({sortable:m,name:"change",toEl:n,newIndex:My,newDraggableIndex:SD,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=pS(r,s.draggable,n,!0),b("dragOver"),va.eventCanceled)return g;if(kr.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||m._ignoreWhileAnimating===r)return _(!1);if(Lle=!1,u&&!s.disabled&&(c?d||(o=od!==Ju):jh===this||(this.lastPutMode=Fle.checkPull(this,u,kr,t))&&l.checkPut(this,u,kr,t))){if(f=this._getDirection(t,r)==="vertical",i=Pf(kr),b("dragOverValid"),va.eventCanceled)return g;if(o)return od=Ju,w(),this._hideClone(),b("revert"),va.eventCanceled||(fR?Ju.insertBefore(kr,fR):Ju.appendChild(kr)),_(!0);var v=tPe(n,s.draggable);if(!v||VRi(t,f,this)&&!v.animated){if(v===kr)return _(!1);if(v&&n===t.target&&(r=v),r&&(a=Pf(r)),Wle(Ju,n,kr,i,r,a,t,!!r)!==!1)return w(),n.appendChild(kr),od=n,C(),_(!0)}else if(v&&BRi(t,f,this)){var x=RB(n,0,s,!0);if(x===kr)return _(!1);if(r=x,a=Pf(r),Wle(Ju,n,kr,i,r,a,t,!1)!==!1)return w(),n.insertBefore(kr,x),od=n,C(),_(!0)}else if(r.parentNode===n){a=Pf(r);var E=0,T,O=kr.parentNode!==n,k=!PRi(kr.animated&&kr.toRect||i,r.animated&&r.toRect||a,f),D=f?"top":"left",A=r6t(r,"top","top")||r6t(kr,"top","top"),B=A?A.scrollTop:void 0;FB!==r&&(T=a[D],kW=!1,Vle=!k&&s.invertSwap||O),E=URi(t,r,a,f,k?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Vle,FB===r);var R;if(E!==0){var $=F0(kr);do $-=E,R=od.children[$];while(R&&(ga(R,"display")==="none"||R===no))}if(E===0||R===r)return _(!1);FB=r,TW=E;var N=r.nextElementSibling,M=!1;M=E===1;var H=Wle(Ju,n,kr,i,r,a,t,M);if(H!==!1)return(H===1||H===-1)&&(M=H===1),sPe=!0,setTimeout(LRi,30),w(),M&&!N?n.appendChild(kr):r.parentNode.insertBefore(kr,M?N:r),A&&o6t(A,0,B-A.scrollTop),od=kr.parentNode,T!==void 0&&!Vle&&(Ule=Math.abs(T-Pf(r)[D])),C(),_(!0)}if(n.contains(kr))return _(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){os(document,"mousemove",this._onTouchMove),os(document,"touchmove",this._onTouchMove),os(document,"pointermove",this._onTouchMove),os(document,"dragover",pR),os(document,"mousemove",pR),os(document,"touchmove",pR)},_offUpEvents:function(){var t=this.el.ownerDocument;os(t,"mouseup",this._onDrop),os(t,"touchend",this._onDrop),os(t,"pointerup",this._onDrop),os(t,"touchcancel",this._onDrop),os(document,"selectstart",this)},_onDrop:function(t){var n=this.el,r=this.options;if(My=F0(kr),SD=F0(kr,r.draggable),Zg("drop",this,{evt:t}),od=kr&&kr.parentNode,My=F0(kr),SD=F0(kr,r.draggable),va.eventCanceled){this._nulling();return}NB=!1,Vle=!1,kW=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),uPe(this.cloneId),uPe(this._dragStartId),this.nativeDraggable&&(os(document,"drop",this),os(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_W&&ga(document.body,"user-select",""),ga(kr,"transform",""),t&&(xW&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),no&&no.parentNode&&no.parentNode.removeChild(no),(Ju===od||jh&&jh.lastPutMode!=="clone")&&sd&&sd.parentNode&&sd.parentNode.removeChild(sd),kr&&(this.nativeDraggable&&os(kr,"dragend",this),lPe(kr),kr.style["will-change"]="",xW&&!NB&&Ry(kr,jh?jh.options.ghostClass:this.options.ghostClass,!1),Ry(kr,this.options.chosenClass,!1),Bm({sortable:this,name:"unchoose",toEl:od,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ju!==od?(My>=0&&(Bm({rootEl:od,name:"add",toEl:od,fromEl:Ju,originalEvent:t}),Bm({sortable:this,name:"remove",toEl:od,originalEvent:t}),Bm({rootEl:od,name:"sort",toEl:od,fromEl:Ju,originalEvent:t}),Bm({sortable:this,name:"sort",toEl:od,originalEvent:t})),jh&&jh.save()):My!==MB&&My>=0&&(Bm({sortable:this,name:"update",toEl:od,originalEvent:t}),Bm({sortable:this,name:"sort",toEl:od,originalEvent:t})),va.active&&((My==null||My===-1)&&(My=MB,SD=EW),Bm({sortable:this,name:"end",toEl:od,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Zg("nulling",this),Ju=kr=od=no=fR=sd=Nle=CD=hR=V_=xW=My=SD=MB=EW=FB=TW=jh=Fle=va.dragged=va.ghost=va.clone=va.active=null,jle.forEach(function(t){t.checked=!0}),jle.length=iPe=aPe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":kr&&(this._onDragOver(t),FRi(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,a=r.length,o=this.options;i<a;i++)n=r[i],pS(n,o.draggable,this.el,!1)&&t.push(n.getAttribute(o.dataIdAttr)||HRi(n));return t},sort:function(t,n){var r={},i=this.el;this.toArray().forEach(function(a,o){var s=i.children[o];pS(s,this.options.draggable,i,!1)&&(r[a]=s)},this),n&&this.captureAnimationState(),t.forEach(function(a){r[a]&&(i.removeChild(r[a]),i.appendChild(r[a]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return pS(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var r=this.options;if(n===void 0)return r[t];var i=SW.modifyOption(this,t,n);typeof i<"u"?r[t]=i:r[t]=n,t==="group"&&h6t(r)},destroy:function(){Zg("destroy",this);var t=this.el;t[Py]=null,os(t,"mousedown",this._onTapStart),os(t,"touchstart",this._onTapStart),os(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(os(t,"dragover",this),os(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ble.splice(Ble.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!CD){if(Zg("hideClone",this),va.eventCanceled)return;ga(sd,"display","none"),this.options.removeCloneOnHide&&sd.parentNode&&sd.parentNode.removeChild(sd),CD=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(CD){if(Zg("showClone",this),va.eventCanceled)return;kr.parentNode==Ju&&!this.options.group.revertClone?Ju.insertBefore(sd,kr):fR?Ju.insertBefore(sd,fR):Ju.appendChild(sd),this.options.group.revertClone&&this.animate(kr,sd),ga(sd,"display",""),CD=!1}}};function FRi(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Wle(e,t,n,r,i,a,o,s){var l,u=e[Py],c=u.options.onMove,d;return window.CustomEvent&&!Hx&&!wW?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=i||t,l.relatedRect=a||Pf(t),l.willInsertAfter=s,l.originalEvent=o,e.dispatchEvent(l),c&&(d=c.call(u,l,o)),d}function lPe(e){e.draggable=!1}function LRi(){sPe=!1}function BRi(e,t,n){var r=Pf(RB(n.el,0,n.options,!0)),i=10;return t?e.clientX<r.left-i||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-i||e.clientY<r.bottom&&e.clientX<r.left}function VRi(e,t,n){var r=Pf(tPe(n.el,n.options.draggable)),i=10;return t?e.clientX>r.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function URi(e,t,n,r,i,a,o,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,d=r?n.bottom:n.right,h=!1;if(!o){if(s&&Ule<u*i){if(!kW&&(TW===1?l>c+u*a/2:l<d-u*a/2)&&(kW=!0),kW)h=!0;else if(TW===1?l<c+Ule:l>d-Ule)return-TW}else if(l>c+u*(1-i)/2&&l<d-u*(1-i)/2)return jRi(t)}return h=h||o,h&&(l<c+u*a/2||l>d-u*a/2)?l>c+u/2?1:-1:0}function jRi(e){return F0(kr)<F0(e)?1:-1}function HRi(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function zRi(e){jle.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&jle.push(r)}}function qle(e){return setTimeout(e,0)}function uPe(e){return clearTimeout(e)}Hle&&Ns(document,"touchmove",function(e){(va.active||NB)&&e.cancelable&&e.preventDefault()}),va.utils={on:Ns,off:os,css:ga,find:n6t,is:function(t,n){return!!pS(t,n,t,!1)},extend:TRi,throttle:a6t,closest:pS,toggleClass:Ry,clone:s6t,index:F0,nextTick:qle,cancelNextTick:uPe,detectDirection:f6t,getChild:RB},va.get=function(e){return e[Py]},va.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(va.utils=hS(hS({},va.utils),r.utils)),SW.mount(r)})},va.create=function(e,t){return new va(e,t)},va.version=CRi;var af=[],DW,cPe,dPe=!1,fPe,hPe,Gle,AW;function WRi(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?Ns(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ns(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Ns(document,"touchmove",this._handleFallbackAutoScroll):Ns(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?os(document,"dragover",this._handleAutoScroll):(os(document,"pointermove",this._handleFallbackAutoScroll),os(document,"touchmove",this._handleFallbackAutoScroll),os(document,"mousemove",this._handleFallbackAutoScroll)),g6t(),Kle(),kRi()},nulling:function(){Gle=cPe=DW=dPe=AW=fPe=hPe=null,af.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var i=this,a=(n.touches?n.touches[0]:n).clientX,o=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(a,o);if(Gle=n,r||this.options.forceAutoScrollFallback||wW||Hx||_W){pPe(n,this.options,s,r);var l=_D(s,!0);dPe&&(!AW||a!==fPe||o!==hPe)&&(AW&&g6t(),AW=setInterval(function(){var u=_D(document.elementFromPoint(a,o),!0);u!==l&&(l=u,Kle()),pPe(n,i.options,u,r)},10),fPe=a,hPe=o)}else{if(!this.options.bubbleScroll||_D(s,!0)===mS()){Kle();return}pPe(n,this.options,_D(s,!1),!1)}}},Ux(e,{pluginName:"scroll",initializeByDefault:!0})}function Kle(){af.forEach(function(e){clearInterval(e.pid)}),af=[]}function g6t(){clearInterval(AW)}var pPe=a6t(function(e,t,n,r){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,l=mS(),u=!1,c;cPe!==n&&(cPe=n,Kle(),DW=t.scroll,c=t.scrollFn,DW===!0&&(DW=_D(n,!0)));var d=0,h=DW;do{var f=h,m=Pf(f),g=m.top,b=m.bottom,w=m.left,_=m.right,C=m.width,v=m.height,x=void 0,E=void 0,T=f.scrollWidth,O=f.scrollHeight,k=ga(f),D=f.scrollLeft,A=f.scrollTop;f===l?(x=C<T&&(k.overflowX==="auto"||k.overflowX==="scroll"||k.overflowX==="visible"),E=v<O&&(k.overflowY==="auto"||k.overflowY==="scroll"||k.overflowY==="visible")):(x=C<T&&(k.overflowX==="auto"||k.overflowX==="scroll"),E=v<O&&(k.overflowY==="auto"||k.overflowY==="scroll"));var B=x&&(Math.abs(_-i)<=o&&D+C<T)-(Math.abs(w-i)<=o&&!!D),R=E&&(Math.abs(b-a)<=o&&A+v<O)-(Math.abs(g-a)<=o&&!!A);if(!af[d])for(var $=0;$<=d;$++)af[$]||(af[$]={});(af[d].vx!=B||af[d].vy!=R||af[d].el!==f)&&(af[d].el=f,af[d].vx=B,af[d].vy=R,clearInterval(af[d].pid),(B!=0||R!=0)&&(u=!0,af[d].pid=setInterval((function(){r&&this.layer===0&&va.active._onTouchMove(Gle);var N=af[this.layer].vy?af[this.layer].vy*s:0,M=af[this.layer].vx?af[this.layer].vx*s:0;typeof c=="function"&&c.call(va.dragged.parentNode[Py],M,N,e,Gle,af[this.layer].el)!=="continue"||o6t(af[this.layer].el,M,N)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=_D(h,!1)));dPe=u}},30),v6t=function(t){var n=t.originalEvent,r=t.putSortable,i=t.dragEl,a=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=r||a;s();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(d)&&(o("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function mPe(){}mPe.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=RB(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:v6t},Ux(mPe,{pluginName:"revertOnSpill"});function gPe(){}gPe.prototype={onSpill:function(t){var n=t.dragEl,r=t.putSortable,i=r||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:v6t},Ux(gPe,{pluginName:"removeOnSpill"}),va.mount(new WRi),va.mount(gPe,mPe);function qRi(e,t){return Object.values(e).indexOf(t)}function GRi(e,t,n,r){if(!e)return[];const i=Object.values(e),a=t.length-r;return[...t].map((s,l)=>l>=a?i.length:i.indexOf(s))}function KRi(e){return["transition-group","TransitionGroup"].includes(e)}function y6t(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?KRi(t.name):!1}function YRi(e,t){return t?{...t.props,...t.attrs}:e}const vPe=["Start","Add","Remove","Update","End"],yPe=["Choose","Unchoose","Sort","Filter","Clone"],ZRi=["Move",...vPe,...yPe].map(e=>"on"+e);let bPe=null;const b6t=ct({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...vPe.map(e=>e.toLowerCase()),...yPe.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:r}){const i=q(!1),a=q(!1),o=q(0),s=q(0),l=q([]),u=q(null),c=q(null),d=W(()=>e.list?e.list:e.modelValue),h=Ni();function f(){return e.component?ei(e.component):e.tag}function m(F){if(c.value)for(const X in F){const ie=YBt(X);ZRi.indexOf(ie)===-1&&c.value.option(ie,F[X])}}function g(){var F;return((F=h==null?void 0:h.proxy)==null?void 0:F.$el.children)||[]}async function b(){var F;await kt(),l.value=GRi(g(),((F=h==null?void 0:h.proxy)==null?void 0:F.$el.children)||[],i.value,s.value)}function w(F){const X=qRi(g()||[],F);if(X===-1)return null;const ie=d.value?d.value[X]:null;return{index:X,element:ie}}function _(F){kt(()=>t("change",F))}function C(F){if(e.list){F(e.list);return}const X=[...e.modelValue||[]];F(X),t("update:modelValue",X)}function v(...F){C(ie=>ie.splice(...F))}function x(F,X){C(pe=>pe.splice(X,0,pe.splice(F,1)[0]))}function E(F){const X=l.value,ie=X.length;return F>ie-1?ie:X[F]}function T(){var X,ie;return n.default&&((ie=(X=n.default()[0])==null?void 0:X.component)==null?void 0:ie.proxy)||null}function O(F){if(!e.noTransitionOnDrag||!i.value)return;const X=g();X[F]&&(X[F].data=null);const ie=T();ie&&(ie.children=[],ie.kept=void 0)}function k(F){b(),u.value=w(F.item),u.value&&(F.item._underlying_vm_=e.clone(u.value.element),bPe=F.item)}function D(F){const X=F.item._underlying_vm_;if(X===void 0)return;ePe(F.item);const ie=E(F.newIndex);v(ie,0,X),b(),_({added:{element:X,newIndex:ie}})}function A(F){var ie;if(ZBt((ie=h==null?void 0:h.proxy)==null?void 0:ie.$el,F.item,F.oldIndex),F.pullMode==="clone"){ePe(F.clone);return}if(!u.value)return;const X=u.value.index;v(X,1),O(X),_({removed:{element:u.value.element,oldIndex:X}})}function B(F){var pe,ce;ePe(F.item),ZBt(F.from,F.item,F.oldIndex);const X=(pe=u.value)==null?void 0:pe.index,ie=E(F.newIndex);x(X,ie),_({moved:{element:(ce=u.value)==null?void 0:ce.element,oldIndex:X,newIndex:ie}})}function R(F,X){Object.prototype.hasOwnProperty.call(F,X)&&(F[X]+=o.value)}function $(F){return F.__draggable_component__}function N({to:F,related:X}){const ie=$(F);if(!ie)return{component:ie};const pe=ie.realList,ce={list:pe,component:ie};if(F!==X&&pe&&ie.getUnderlyingVm){const K=ie.getUnderlyingVm(X);if(K)return Object.assign(K,ce)}return ce}function M(F,X){const ie=[...X.to.children].filter(Y=>Y.style.display!=="none");if(ie.length===0)return 0;const pe=ie.indexOf(X.related),ce=F.component.getVmIndex(pe);return ie.indexOf(bPe)!==-1||!X.willInsertAfter?ce:ce+1}const H=()=>{var ce,K;const F={};vPe.forEach(Y=>{F["on"+Y]=ne(Y)}),yPe.forEach(Y=>{F["on"+Y]=G.bind(null,Y)});const X=Object.keys(r).reduce((Y,we)=>(Y[YBt(we)]=r[we],Y),{}),ie=Object.assign({},X,F,{onMove:(Y,we)=>re(Y,we)});"draggable"in ie||(ie.draggable=">*");const pe=((ce=h==null?void 0:h.proxy)==null?void 0:ce.$el.nodeType)===1?h.proxy.$el:((K=h==null?void 0:h.proxy)==null?void 0:K.$el.parentElement)||null;pe&&(c.value=new va(pe,ie),pe.__draggable_component__=h==null?void 0:h.proxy,b())};function G(F,X){kt(()=>t(F.toLowerCase(),X))}function ne(F){return X=>{if(d.value!==null){const ie="onDrag"+F,pe=U[ie];pe&&pe(X)}G(F,X)}}function re(F,X){const ie=e.move;if(!ie||!d.value)return!0;const pe=N(F),ce=u.value,K=M(pe,F);ce&&Object.assign(ce,{futureIndex:K});const Y=Object.assign({},F,{relatedContext:pe,draggedContext:ce});return ie(Y,X)}function Q(){b(),bPe=null}const U={onDragStart:k,onDragAdd:D,onDragRemove:A,onDragUpdate:B,onDragMove:re,onDragEnd:Q};return dn(()=>{H()}),e.list!==null&&e.modelValue!==null&&gRi.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:a,headerOffset:o,footerOffset:s,transitionMode:i,computeIndexes:b,updateOptions:m,getChildrenNodes:g,getUnderlyingVm:w,emitChanges:_,alterList:C,spliceList:v,updatePosition:x,getVmIndex:E,getComponent:T,resetTransitionData:O,onDragStart:k,onDragAdd:D,onDragRemove:A,onDragUpdate:B,updateProperty:R,onDragMove:re,onDragEnd:Q,mounted:H,context:u,sortableInstance:c,getRelatedContextFromMoveEvent:N,getTargetedComponent:$,computeFutureIndex:M}},render(){const e=this.getTag(),t=YRi(this.$attrs,this.componentData);if(typeof e=="string"){const r=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return r?(this.transitionMode=y6t(r),ll(e,t,r)):ll(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const r=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=y6t(r||[])}return ll(e,t,n)}}),XRi=ct({__name:"VisualWrapper",props:{name:{type:String,required:!0},h:{type:[Number,String],required:!1,default:180},w:{type:[Number,String],required:!1,default:180}},setup(e,{expose:t}){t();const n=e,r=W(()=>({height:typeof n.h=="number"?`${n.h}px`:n.h,width:typeof n.w=="number"?`${n.w}px`:n.w})),i={props:n,styles:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function JRi(e,t,n,r,i,a){const o=ei("ArboIcon");return L(),te("div",{class:"visual-wrapper flex items-center justify-center",style:tn(r.styles)},[Se(o,{name:n.name,type:"visual"},null,8,["name"])],4)}const QRi=pi(XRi,[["render",JRi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/common/VisualWrapper.vue"]]),Yle=250;var w6t=(e=>(e[e.UPLOAD_FILE=0]="UPLOAD_FILE",e[e.UPLOAD_IN_PROGRESS=1]="UPLOAD_IN_PROGRESS",e[e.UPLOAD_SUCCESS=2]="UPLOAD_SUCCESS",e[e.UPLOAD_FAILED=3]="UPLOAD_FAILED",e))(w6t||{});const ePi=ct({__name:"ModalAddRendition",emits:["upload-success","upload-failed","close"],setup(e,{expose:t,emit:n}){t();const{t:r}=rw(),{upLoadFile:i,createNewRendition:a,uploadNewFileInNewRendition:o,checkLengthAndTypeRendition:s}=Zie(),l=n,u=M2(),c=Bl(),{updateSceneAPI:d}=Y1(),{allStatus:h,status:f}=_r(c),{fileReference:m,numberOfRendition:g}=_r(u),b=or({name:`Rendition ${g.value+1}`,description:""});ut(g,Y=>{b.name=`Rendition ${Y+1}`},{immediate:!0});const w=q(0),_=q(null),C=q(!1),v=q(kXr),x=q(!0),E=W(()=>{let Y=!1;switch(w.value){case 0:Y=!b.name.trim()||!m.value.length||m.value.length>5;break;case 1:Y=!0;break;case 2:Y=!$.value;break}return Y}),T=q(!1),O=q(),k=W({get:()=>m.value??[],set:Y=>{m.value&&(m.value=Y)}}),D=W(()=>c.allStatus),A=q(D.value),B=async Y=>{Y?A.value=D.value.filter(we=>we.name.toLowerCase().includes(Y.toLowerCase())):A.value=D.value},{permission:R}=Up(),$=W(()=>R.value.updateStatus),{getSceneData:N}=c,M=async Y=>{var ue;if(!$.value)return;const we=(ue=h==null?void 0:h.value)==null?void 0:ue.find(Ve=>Ve.id===Y);we&&((await d({template_flow_status_id:we.id})).success?(O.value=Y,setTimeout(async()=>{await N()},1e3)):O.value=f.value),l("close")},H=()=>{T.value=!0};ut(k,Y=>{w.value>1||Y.length>0&&H()},{deep:!0,immediate:!0}),ut(T,Y=>{Y&&(b.name=`Rendition ${g.value+1}`)},{immediate:!0});const G=async()=>{var Y;try{w.value=1;const we=m.value.map(Xe=>Xe.originFile),ue=await i(we);if(!ue.length)throw new Error("Upload failed");const Ve=ue.map(Xe=>({name:Xe.name,type:Xe.type,mimetype:Xe.mimetype,accept_type:Xe.accept_type,path:Xe.path,thumbnail:Xe.thumbnail}));let Pe=[];Pe=[{...b,attachments:Ve}];const $e=await a(Pe),Re=$e.success?{textCancelBtn:"No, thanks",textConfirmBtn:"Update status"}:{textCancelBtn:"",textConfirmBtn:"Try again"};v.value.splice(2,1,Re),$e.success?(x.value=!0,w.value=2,l("upload-success",(Y=$e.data)==null?void 0:Y.data.map(Xe=>Xe.id))):(x.value=!1,w.value=3,l("upload-failed"))}catch{w.value=3,l("upload-failed")}},ne=async()=>{switch(w.value){case 0:G();break;case 1:break;case 2:await M(O.value),re();break;case 3:re();break}},re=()=>{m.value=[],T.value=!1,w.value=0,b.name="",T.value=!1},Q=Y=>{const we=m.value.findIndex(ue=>ue.url===Y);we>-1&&m.value.splice(we,1)},U=async Y=>{var Pe,$e;const we=(Pe=m.value[0])==null?void 0:Pe.originFile.type,ue=Y.target;if(!(($e=ue.files)!=null&&$e.length))return;const Ve=s(void 0,ue.files,we,m.value.length);o(Ve)},F=async Y=>{const we=["Backspace","ArrowLeft","ArrowRight"];b.name.length>=Yle&&!we.includes(Y.key)&&(Y.preventDefault(),Y.stopPropagation())},X=()=>{b.name.length>Yle&&(b.name=b.name.slice(0,Yle))},ie=async Y=>{if(O.value=Y,$.value)O.value=Y;else throw new Error("Permission denied")},pe=()=>{re(),l("close")},ce=()=>{var Y;(Y=_.value)==null||Y.click()};ut(f,()=>{O.value=f.value},{immediate:!0}),Kr(()=>{re()});const K={t:r,upLoadFile:i,createNewRendition:a,uploadNewFileInNewRendition:o,checkLengthAndTypeRendition:s,emits:l,maxLengthNameRendition:Yle,renditionStore:u,sceneStore:c,updateSceneAPI:d,allStatus:h,status:f,fileReference:m,numberOfRendition:g,formState:b,UploadStep:w6t,currentStep:w,fileInput:_,isLoading:C,textButton:v,isUploadSuccess:x,isBtnDisable:E,isShow:T,_status:O,listFileRendition:k,_allStatus:D,listStatus:A,handleSearch:B,permission:R,canUpdate:$,getSceneData:N,handleUpdateStatus:M,show:H,handleUploadStep:G,handleNextStep:ne,reset:re,removeFile:Q,handleFileChange:U,handleChangeNameRendition:F,handleInput:X,handleSelectStatus:ie,closeModal:pe,triggerFileUpload:ce,get VueDraggableNext(){return b6t},get STEPS(){return DXr},VisualWrapper:QRi};return Object.defineProperty(K,"__isScriptSetup",{enumerable:!1,value:!0}),K}}),tPi={class:"flex justify-center relative w-full"},nPi={class:"text-[24px] font-bold"},rPi={class:"-mt-6"},iPi={class:"flex justify-center w-full"},aPi={class:"stepper"},oPi={key:0,class:"check"},sPi={key:1,class:"text-[12px]"},lPi={key:0,class:"line"},uPi={key:0,class:"mt-4"},cPi={class:"flex gap-2"},dPi={class:"relative w-[40%] shadow-md bg-cover aspect-ratio rounded-md overflow-hidden"},fPi=["src"],hPi={class:"flex-1"},pPi={class:"text-center text-sm"},mPi={class:"overflow-auto"},gPi={class:"flex justify-center"},vPi={key:0,class:"loader"},yPi={class:"text-start"},bPi={for:"rendition-file-upload",class:"sr-only"},wPi={key:1},_Pi={class:"text-lg font-bold text-center mt-3"},CPi={class:"h-[220px] p-4 flex justify-center"},SPi={class:"text sx text-center"},EPi={key:2},xPi={class:"text-lg font-bold text-center mt-3"},TPi={class:"h-[220px] p-4 flex justify-center"},kPi={class:"text sx text-center"},DPi={key:0,class:"relative"},APi={key:3},OPi={class:"h-[220px] p-4 flex justify-center"},IPi={class:"text sx text-center"};function $Pi(e,t,n,r,i,a){const o=ei("arbo-button"),s=ei("ArboInput"),l=ei("TessReviewFileCard"),u=ei("TessStatusSelect"),c=ei("ArboTooltip"),d=ei("arbo-modal");return L(),Ke(d,Qt({show:r.isShow},{...r.textButton[r.currentStep]},{disable:r.isBtnDisable,icon:"''",class:"modal-add-rendition",onConfirmed:r.handleNextStep,onHidden:r.closeModal}),{header:Ie(()=>[he("div",tPi,[he("p",nPi,wt(r.t("rendition.create_rendition")),1),he("div",{class:"absolute -right-8 -top-4",onClick:r.closeModal},[Se(o,{"prefix-tooltip":"Close","prefix-icon":"Xmark",type:"tertiary",label:""})])])]),"main-icon":Ie(()=>[...t[3]||(t[3]=[he("div",null,null,-1)])]),default:Ie(()=>[ot(e.$slots,"default",{},()=>[he("div",rPi,[he("div",iPi,[he("div",aPi,[(L(!0),te(Vt,null,pn(r.STEPS,(h,f)=>(L(),te("div",{key:f,class:"step"},[he("div",{class:ve(["circle",{active:f<=r.currentStep}])},[f<r.currentStep?(L(),te("span",oPi,"✓")):(L(),te("span",sPi,wt(f+1),1))],2),f<r.STEPS.length-1?(L(),te("div",lPi)):Be("v-if",!0)]))),128))])])]),he("div",null,[r.currentStep===0?(L(),te("div",uPi,[he("div",cPi,[he("div",dPi,[r.fileReference[0]?(L(),te("img",{key:0,loading:"lazy",class:"absolute top-0 left-0 w-full h-full object-cover",src:r.fileReference[0].url,alt:""},null,8,fPi)):Be("v-if",!0)]),he("div",hPi,[Se(s,{modelValue:r.formState.name,"onUpdate:modelValue":t[0]||(t[0]=h=>r.formState.name=h),placeholder:r.t("rendition.placeHolder"),class:"rendition-name-input","onInput:keyDown":r.handleChangeNameRendition,"onInput:change":r.handleInput},null,8,["modelValue","placeholder"])])]),he("p",pPi,wt(r.t("rendition.drag_files")),1),he("div",mPi,[Se(r.VueDraggableNext,{modelValue:r.listFileRendition,"onUpdate:modelValue":t[1]||(t[1]=h=>r.listFileRendition=h),class:"dragArea list-group w-full flex flex-col gap-2"},{default:Ie(()=>[(L(!0),te(Vt,null,pn(r.listFileRendition,(h,f)=>(L(),te("div",{key:f,class:"w-full"},[Se(l,{"ready-only":!1,"thumbnail-url":h.url,"thumbnail-name":h.name,"is-unaccepted":!1,class:"rendition-review-card",onDeleteCard:()=>{r.removeFile(h.url)}},null,8,["thumbnail-url","thumbnail-name","onDeleteCard"])]))),128))]),_:1},8,["modelValue"])]),he("div",gPi,[r.isLoading?(L(),te("div",vPi)):Be("v-if",!0)]),he("div",yPi,[he("span",{class:ve(`text-[#3C9BFA] text-sm mt-2 cursor-pointer ${r.fileReference.length>=5?"pointer-events-none text-gray-600":""}`),onClick:r.triggerFileUpload},wt(r.t("rendition.upload_more")),3),he("label",bPi,wt(r.t("rendition.upload_more")),1),he("input",{id:"rendition-file-upload",ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:r.handleFileChange},null,544)])])):r.currentStep===1?(L(),te("div",wPi,[he("div",_Pi,wt(r.t("rendition.upload_in_progress")),1),he("div",CPi,[Se(r.VisualWrapper,{name:"UploadInProgress"})]),he("p",SPi,[Mt(wt(r.t("rendition.keep_open_the_modal")),1),t[4]||(t[4]=he("br",null,null,-1)),Mt(" "+wt(r.t("rendition.uploading_background")),1)])])):r.currentStep===2?(L(),te("div",EPi,[he("div",xPi,wt(r.isUploadSuccess?r.t("rendition.upload_successful"):r.t("rendition.upload_ failed")),1),he("div",TPi,[Se(r.VisualWrapper,{name:r.isUploadSuccess?"Successful1":"Unsuccessful1"},null,8,["name"])]),he("p",kPi,wt(r.isUploadSuccess?r.t("rendition.update_status_char"):r.t("rendition.update_fail")),1),r.isUploadSuccess?(L(),te("div",DPi,[Se(c,{content:r.canUpdate?"":"Uh Oh! You don't have access.",class:"!w-full","hide-on-click":!1},{default:Ie(()=>[Se(u,{modelValue:r._status,"onUpdate:modelValue":[t[2]||(t[2]=h=>r._status=h),r.handleSelectStatus],options:r.allStatus,"is-unaccepted":!1,class:"rendition-change-status","is-clearable":!1,onSearch:r.handleSearch},null,8,["modelValue","options"])]),_:1},8,["content"])])):Be("v-if",!0)])):r.currentStep===3?(L(),te("div",APi,[he("div",OPi,[Se(r.VisualWrapper,{name:"Unsuccessful1"})]),he("p",IPi,wt(r.t("rendition.update_fail")),1)])):Be("v-if",!0)])],!0)]),_:3},16,["show","disable"])}const RPi=pi(ePi,[["render",$Pi],["__scopeId","data-v-bd8166b7"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/ModalAddRendition.vue"]]),PPi=ct({__name:"RenditionFiles",props:{isLoading:{type:Boolean,required:!0},description:{type:String,required:!0},currentIdRendition:{type:String,required:!0},activeItem:{type:String,required:!0},renditionFiles:{type:Array,required:!0},updateRenditionDescriptionFnc:{type:Function,required:!0}},emits:["triggerFileUpload","addNewFileToSelectedRendition","handleRemoveFile","update:currentIdRendition","updateDescription","selectRenditionFile"],setup(e,{expose:t,emit:n}){t();const{changeSortOrderApi:r}=$2e(),i=e,a=n,o=q(i.description||""),{permission:s}=Up(),l=q(!1),u=my().getEnvVariable("DELAY_SAVE")||3e3;ut(o,zf(async v=>{if(l.value){l.value=!1;return}await i.updateRenditionDescriptionFnc(v)||(l.value=!0,o.value=i.description)},Number(u)),{immediate:!1});const c=()=>{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept=OXr.join(","),v.style.display="none",v.addEventListener("change",b),v.click()},d=q([]),h=W(()=>(i.renditionFiles??[]).reduce((E,T)=>(E[T.id]=T,E),{})),{getRenditionDetail:f}=Zie(),m=W(()=>{var v;return((v=d.value)==null?void 0:v.length)??0});ut(()=>i.renditionFiles,()=>{var v;d.value=((v=i.renditionFiles)==null?void 0:v.map(x=>x.id))??[],i.renditionFiles.forEach(x=>{h.value[x.id]=x})},{immediate:!0,deep:!0});const g=async()=>{try{const v=Array.from(new Set(d.value));if(i.currentIdRendition)if(await r(i.currentIdRendition,v))f(i.currentIdRendition);else throw new Error("Update failed.")}catch{Wa().showMessage("Update failed.","error")}},b=v=>{a("addNewFileToSelectedRendition",v)},C={changeSortOrderApi:r,props:i,emits:a,description:o,permission:s,revertDescription:l,DELAY_MS:u,triggerFileUpload:c,renditionAttachmentIds:d,renditionAttachments:h,getRenditionDetail:f,numberOfFiles:m,updateSorting:g,handleChangeFile:b,handleRemoveFile:v=>{var x;((x=Object.keys(h.value))==null?void 0:x.length)<2?Wa().showMessage("Cannot be deleted. Each rendition must have at least one file","error"):a("handleRemoveFile",v)},handleClickCard:v=>{const x=String(v);a("selectRenditionFile",x)},get VueDraggableNext(){return b6t}};return Object.defineProperty(C,"__isScriptSetup",{enumerable:!1,value:!0}),C}}),MPi={class:"rendition-files"},NPi={class:"my-2 flex justify-between"},FPi={class:"w-max"},LPi={class:"list-file"},BPi={class:"flex justify-center mt-2"},VPi={key:0,class:"loader"};function UPi(e,t,n,r,i,a){const o=ei("TessNonInteractiveChip"),s=ei("ArboTooltip"),l=ei("TessReviewFileCard"),u=ei("ArboButton");return L(),te("div",MPi,[he("div",NPi,[t[1]||(t[1]=he("div",{class:"flex items-center justify-between flex-1"},[he("span",{class:"font-lato text-[14px] font-bold leading-[18px] flex-1"},"Review files")],-1)),he("div",FPi,[Se(s,{delay:[300,0],"hide-on-click":!1,content:`${r.numberOfFiles} review files`},{default:Ie(()=>[Se(o,{"component-styles":{background:"#F3F5F8"},icon:"File",label:String(r.numberOfFiles)},null,8,["label"])]),_:1},8,["content"])])]),he("div",LPi,[Se(r.VueDraggableNext,{modelValue:r.renditionAttachmentIds,"onUpdate:modelValue":t[0]||(t[0]=c=>r.renditionAttachmentIds=c),"item-key":"id",class:"flex flex-col gap-2",disabled:!r.permission.addReviewFiles,onChange:r.updateSorting},{default:Ie(()=>[(L(!0),te(Vt,null,pn(r.renditionAttachmentIds,c=>{var d,h;return L(),te("div",{key:c},[Se(l,{"disable-drag":!r.permission.addReviewFiles,"read-only":!r.permission.deleteReviewFiles,class:ve({selected:r.renditionAttachments[c].id==n.activeItem}),"thumbnail-url":(d=r.renditionAttachments[c])==null?void 0:d.thumbnail,"thumbnail-name":(h=r.renditionAttachments[c])==null?void 0:h.name,"shared-styles":{"--review-card--background":"#F3F5F8"},onClick:f=>r.handleClickCard(c),onDeleteCard:()=>{r.handleRemoveFile(c)}},null,8,["disable-drag","read-only","class","thumbnail-url","thumbnail-name","onClick","onDeleteCard"])])}),128))]),_:1},8,["modelValue","disabled"])]),he("div",BPi,[n.isLoading?(L(),te("div",VPi)):Be("v-if",!0)]),r.permission.addReviewFiles?(L(),Ke(u,Qt({key:0},{prefixIcon:"Plus",type:"secondary",class:"actions-item",label:"Add more review files"},{disable:r.numberOfFiles>=5,class:"w-full",onClick:r.triggerFileUpload}),null,16,["disable"])):Be("v-if",!0)])}const jPi=pi(PPi,[["render",UPi],["__scopeId","data-v-e25366db"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionFiles.vue"]]),HPi=ct({__name:"RenditionList",props:{statusFetching:{type:String,required:!0},currentIdRendition:{type:String,required:!0},loadingMoreRendition:{type:Boolean,required:!0},totalRenditionPage:{type:Number,required:!0},initPage:{type:Number,required:!1}},emits:["handleCreateNewRendition","selectRendition","copyLink","deleteRendition","loadOlderRendition","loadNewerRendition"],setup(e,{expose:t,emit:n}){const r=M2(),i=q({}),{renditionList:a}=_r(r),o=n,{permission:s}=Up(),l=Bl(),{sceneId:u,takeId:c}=_r(l),d=e,h=q(),f=q(null),m=B=>{const R=fc(),$=BO("BASE_REVIEW_URL"),N=lfe({type:"review_rendition",config:{reviewDomain:$,ws_code:R,scene_id:u.value,rendition_id:B,take_id:c.value}}).url;window.open(N,"_blank")},g=(B,R)=>{},b=B=>{const R=JSON.parse(JSON.stringify(B));return R.entity_path=[],{data:R,permission:{canDelete:s.value.deleteRendition,canOpenReview:!0,canOpenSceneHub:!0},config:{sceneId:u.value,takeId:c.value,wsCode:fc(),baseDomain:BO("BASE_URL")},hasNewComment:B.has_new_comment,actived:!1,type:"scene-hub"}},w=B=>{o("deleteRendition",B)},_=B=>{var R;h!=null&&h.value&&((R=h.value)==null||R.clearFile()),o("handleCreateNewRendition",B)},C=B=>{o("selectRendition",B)},v=W(()=>{const B=Object.keys(a.value).map(R=>a.value[R]);return B.sort((R,$)=>new Date($.created_at).getTime()-new Date(R.created_at).getTime()),B.map(R=>R.id)}),x=()=>{var B;(B=h.value)==null||B.clearFile()},E=or({start:(d==null?void 0:d.initPage)||pT,end:(d==null?void 0:d.initPage)||pT,total:1,loading:!1});ut(()=>d.totalRenditionPage,B=>{E.total=B});const T=async(B,R)=>{const $=document.getElementById(`rendition_${B}`);$&&kt(()=>{setTimeout(()=>{$==null||$.scrollIntoView(),R&&($==null||$.classList.add("highlight"),setTimeout(()=>{$==null||$.classList.remove("highlight")},3e3))},1e3)})},O=Yie(),{redirectConfig:k}=_r(O);ut(()=>d.currentIdRendition,()=>{var B,R,$;(B=k.value)!=null&&B.renditionConfig&&(($=(R=k.value)==null?void 0:R.renditionConfig)==null?void 0:$.renditionId)===d.currentIdRendition&&kt(()=>{var N;(N=d.currentIdRendition)!=null&&N.trim()&&T(d.currentIdRendition,!0)})},{immediate:!0}),dn(()=>{var B;iV(f.value,async()=>{E.loading||E.start<=1||(E.start=E.start-1,E.loading=!0,o("loadNewerRendition",E.start),E.loading=!1)},{distance:10,direction:"top",canLoadMore:()=>E.start>1&&!E.loading}),iV(f.value,async()=>{E.loading&&E.end>=E.total||(E.end=E.end+1,E.loading=!0,o("loadOlderRendition",E.end),E.loading=!1)},{distance:10,direction:"bottom",canLoadMore:()=>E.end<E.total&&!E.loading}),(B=f.value)==null||B.addEventListener("scroll",()=>{Object.values(i.value).forEach(R=>{var $;($=R==null?void 0:R.hidePopup)==null||$.call(R)})})});const D=()=>{E.start=pT,E.end=pT,E.total=pT};t({elementRef:f,clearFile:x,reset:D});const A={renditionStore:r,renditionCardRefs:i,renditionList:a,emits:o,permission:s,sceneStore:l,sceneId:u,takeId:c,props:d,uploadRef:h,elementRef:f,handleOpenInReview:m,handleCopy:g,createRenditionCardProps:b,handleDeleteRendition:w,handleCreateNewRendition:_,handleSelectKey:C,renditionIds:v,clearFile:x,page:E,gotoRendition:T,redirectStore:O,redirectConfig:k,handleResetList:D,UploadRenditionFiles:R2e,get STATUS_FETCH(){return E_}};return Object.defineProperty(A,"__isScriptSetup",{enumerable:!1,value:!0}),A}}),zPi={class:"flex flex-col justify-between rendition-list"},WPi={key:0,class:"rendition-upload-new"},qPi={ref:"elementRef",class:"flex-1 overflow-y-auto overflow-x-hidden"},GPi={key:0,class:"flex flex-col gap-y-2"},KPi=["id","onClick"],YPi={key:1,class:"flex flex-col gap-y-2"},ZPi={key:2,class:"h-10 flex justify-center items-center"};function XPi(e,t,n,r,i,a){const o=ei("RenditionCardV2"),s=ei("ArboSkeletonLoading");return L(),te("div",zPi,[r.permission.createRendition?(L(),te("div",WPi,[Se(r.UploadRenditionFiles,{ref:"uploadRef","rendition-id":void 0,type:"small",onHandleCreateNewRendition:r.handleCreateNewRendition},null,512)])):Be("v-if",!0),he("div",qPi,[n.statusFetching!==r.STATUS_FETCH.LOADING?(L(),te("div",GPi,[(L(!0),te(Vt,null,pn(r.renditionIds,(l,u)=>(L(),te("div",{id:`rendition_${l}`,key:l,class:"rendition-item",onClick:()=>r.handleSelectKey(l)},[Be(` <TessRenditionCard
|
|
1265
|
-
:ref="(ref: any) => (renditionCardRefs[key] = ref)"
|
|
1266
|
-
:active="key === currentIdRendition"
|
|
1267
|
-
:rendition-data="renditionList[key]"
|
|
1268
|
-
:can-delete="permission.deleteRendition"
|
|
1269
|
-
:has-new-comment="Boolean(renditionList[key].has_new_comment)"
|
|
1270
|
-
:is-read-only="false"
|
|
1271
|
-
:tooltip="renditionList[key].name || ''"
|
|
1272
|
-
:disabled="false"
|
|
1273
|
-
:scene-id="sceneId"
|
|
1274
|
-
:take-id="takeId"
|
|
1275
|
-
@copy="handleCopyLink"
|
|
1276
|
-
@delete="handleDeleteRendition"
|
|
1277
|
-
@on-click="handleSelectKey"
|
|
1278
|
-
/> `),(L(),Ke(o,Qt({id:r.renditionList[l].id,ref_for:!0,ref:"sceneRef",key:`rendition-item-${r.renditionList[l].id}`,"ref-key":`rendition-item-${r.renditionList[l].id}`,index:l},{ref_for:!0},r.createRenditionCardProps(r.renditionList[l]),{onOpenReview:()=>r.handleOpenInReview(l),onOnClick:r.handleSelectKey,onCopy:c=>r.handleCopy(r.renditionList[l].id,c),onDelete:()=>r.handleDeleteRendition(l)}),null,16,["id","ref-key","index","onOpenReview","onCopy","onDelete"]))],8,KPi))),128))])):(L(),te("div",YPi,[(L(),te(Vt,null,pn(5,l=>he("div",{key:l},[Se(s,{width:"144px"})])),64))])),n.loadingMoreRendition?(L(),te("div",ZPi,[...t[0]||(t[0]=[he("div",{class:"loader"},null,-1)])])):Be("v-if",!0)],512)])}const JPi=pi(HPi,[["render",XPi],["__scopeId","data-v-fecfea63"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionList.vue"]]),QPi=ct({__name:"RenditionNodata",setup(e,{expose:t}){const{permission:n}=Up(),{t:r}=rw(),i=Bl(),{sceneData:a}=_r(i),{getEnvVariable:o}=my(),s=()=>{if(!a.value)return;const{entity_id:m,id:g}=a.value,b=o("BASE_REVIEW_URL"),w=Cd({type:"review_scene",config:{reviewDomain:b,ws_code:fc(),scene_id:g,take_id:m}});window.open(w.url,"_blank")},l=q(),u=()=>{var m;(m=l.value)==null||m.clearFile()},c=I3(),{hasOpenPermission:d}=_r(c),h=W(()=>d.value.review);t({clearFile:u});const f={permission:n,t:r,sceneStore:i,sceneData:a,getEnvVariable:o,redirectToArboReview:s,uploadRef:l,clearFile:u,permissionStore:c,hasOpenPermission:d,canOpenRendition:h,EmptyData:l9,UploadRenditionFiles:R2e};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),eMi={class:"rendition-no-data"},tMi={class:"flex justify-center items-center"},nMi={key:1,class:"upload"};function rMi(e,t,n,r,i,a){const o=ei("ArboButton");return L(),te("div",eMi,[he("div",{class:ve(["rendition-no-data-container",{"no-open-in":!r.canOpenRendition}])},[r.canOpenRendition?(L(),Ke(o,{key:0,label:r.t("common.open_in_new_review"),class:"w-ful",style:{width:"100%"},type:"secondary",onClick:r.redirectToArboReview},null,8,["label"])):Be("v-if",!0),he("div",tMi,[Se(r.EmptyData,{type:"rendition",class:"max-w-[600px]"})]),r.permission.createRendition?(L(),te("div",nMi,[Se(r.UploadRenditionFiles,{ref:"uploadRef",type:"default"},null,512)])):Be("v-if",!0)],2)])}const iMi=pi(QPi,[["render",rMi],["__scopeId","data-v-51d1de48"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionNodata.vue"]]),aMi={},oMi={class:"flex-col h-full w-full"};function sMi(e,t){return L(),te("div",oMi,[...t[0]||(t[0]=[NR('<div class="flex flex-row w-full p-4 gap-4 h-full overflow-hidden" data-v-6fa8c2fc><div class="w-[197px] flex flex-col mr-4" data-v-6fa8c2fc><div class="h-[62px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div><div class="flex-1 flex flex-col gap-1" data-v-6fa8c2fc><div class="h-[172px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div></div></div><div class="flex flex-col gap-4 flex-1" data-v-6fa8c2fc><div class="flex w-full flex-col gap-1" data-v-6fa8c2fc><div class="h-[36px] frame white:bg-gray-700 w-full border-b" data-v-6fa8c2fc></div><div class="flex items-center justify-center w-full frame white:bg-gray-700 animate-pulse aspect-[16/9]" data-v-6fa8c2fc><svg class="w-20 h-24 text-gray-400 white:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18" data-v-6fa8c2fc><path d="M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" data-v-6fa8c2fc></path></svg></div></div><div class="flex flex-col" data-v-6fa8c2fc><div class="h-[68px] frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div><div class="flex flex-row justify-between items-center" data-v-6fa8c2fc><div class="h-5 frame white:bg-gray-700 w-44 max-w-[50%]" data-v-6fa8c2fc></div><div class="h-8 frame white:bg-gray-700 w-[104px]" data-v-6fa8c2fc></div></div><div class="h-9 frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div></div></div></div><span class="sr-only" data-v-6fa8c2fc>Loading...</span>',2)])])}const lMi=pi(aMi,[["render",sMi],["__scopeId","data-v-6fa8c2fc"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionSkeletonLoading.vue"]]),uMi=ct({__name:"SceneRendition",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=n,{getRenditions:i,upLoadFile:a,removeFile:o,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:c,deleteRendition:d,getRenditionDetail:h}=Zie(),{getEnvVariable:f}=my(),m=Bl(),g=M2(),b=Ng(),w=I3(),_=Yie(),{sceneData:C,currentIdRendition:v,currentSceneTabId:x}=_r(m),{renditionList:E,numberOfRendition:T}=_r(g),{commentRenditionId:O}=_r(b),{hasOpenPermission:k}=_r(w),{redirectConfig:D}=_r(_),A=q(!1),B=q(E_.LOADING),R=q(!1),$=q(),N=q(),M=q(pT),H=q(0),G=q(),ne=q(0),re=q(!1),Q=q(),U=q(),F=q(),X=q(""),ie=W(()=>{if(k.value.review)return{label:"Open Review",icon:"PenRuler",tooltip:"Open current rendition in Review"}}),pe=W(()=>{var lt;return((lt=E.value[v.value])==null?void 0:lt.attachments.map(ze=>({...ze})))??[]}),ce=W(()=>{const Je=pe.value??[];let lt=[];return lt=Je==null?void 0:Je.map(ze=>{var Rt,Jt;const Ne={type:(ze==null?void 0:ze.accept_type)||"",src:(ze==null?void 0:ze.path)??"",id:ze==null?void 0:ze.id,framePerSecond:24,poster:ze==null?void 0:ze.thumbnail,fileType:ze.mimetype||"",name:ze.name||"",fileId:ze.id||""};if((ze==null?void 0:ze.accept_type)=="video"&&(Ne.fileType=="video/quicktime"&&(Ne.fileType=""),Ne.poster=ze.thumbnail,ze!=null&&ze.metadata)){const qt=((Jt=(Rt=ze.metadata)==null?void 0:Rt.avg_frame_rate)==null?void 0:Jt.split("/"))??void 0;qt&&(Ne.framePerSecond=Number((Number(qt[0])/Number(qt[1])).toFixed(2)))}return Ne}),lt}),K=W(()=>{var Je;return((Je=E.value[v.value])==null?void 0:Je.name)??""}),Y=()=>{const Je=$.value;if(!Je||window.innerWidth>1560)return{};const lt=Je.getBoundingClientRect();return{"max-height":(window.innerHeight-lt.top-lt.height-72).toFixed(0)+"px"}},we=Je=>{Je&&(v.value=Je,E.value[Je]&&(E.value[Je].has_new_comment=0))},ue=async(Je,lt=!1)=>{var Ne,Rt,Jt,qt;const ze=await i(Je,lt?we:void 0);return ze!=null&&ze.success&&((Rt=(Ne=ze.data)==null?void 0:Ne.data)!=null&&Rt.length?(ne.value=+ze.data.meta.total,B.value=E_.SUCCESS):Object.keys(E.value).length||(B.value=E_.NO_DATA),T.value=Number(((qt=(Jt=ze==null?void 0:ze.data)==null?void 0:Jt.meta)==null?void 0:qt.total)??0)),ze},Ve=Je=>{var lt;(lt=E.value[Je])!=null&<.has_new_comment&&(E.value[Je].has_new_comment=0),Je!==v.value&&(v.value=Je,O.value=Je)},Pe=async Je=>{try{if(R.value=!0,!await d(Je))return;T.value--;const ze=Object.keys(E.value),Ne=ze[0],Rt=ze[ze.length-1];$e(Ne,Rt)}catch(lt){console.error("handleDeleteRendition",lt)}finally{R.value=!1}},$e=async(Je,lt)=>{if(!Je){B.value=E_.NO_DATA;return}ne.value--,lt&&(Q.value=lt),Re(!0)},Re=async Je=>{var lt;Je||(B.value=E_.LOADING),E.value={},await ue({page:pT,per_page:Q0}),(lt=G.value)==null||lt.reset()},Xe=async(Je=1)=>{var Ne;re.value=!0;const lt=await ue({page:Je,per_page:Q0,first_item_rendition_id:Q.value}),ze=lt==null?void 0:lt.data;H.value=Number((Ne=ze==null?void 0:ze.meta)==null?void 0:Ne.last_page),re.value=!1},rt=Je=>{var lt;return l({renditionId:v.value,renditionName:Je,description:((lt=E.value[v.value])==null?void 0:lt.description)??""})},nt=Je=>l({renditionId:v.value,renditionName:K.value,description:Je}),Le=async(Je,lt)=>{const ze=E.value[v.value],Ne=JSON.parse(JSON.stringify(E.value[v.value])),Rt={renditionId:v.value,renditionName:ze.name,description:ze.description??""},Jt=lt.replace(/^<p>|<\/p>$/g,"");if(Je===f4e.description){if(!lt){Wa().showMessage("Update failed.","error");return}Rt.renditionName=K.value,Rt.description=Jt}else Je===f4e.renditionName&&(Rt.renditionName=Jt);await l(Rt)==!0?E.value[v.value].description=Rt.description:E.value[v.value].description=String(Ne.description)},J=zf(Je=>{rt(Je)},500),fe=async Je=>{R.value=!0,await o(Je,v.value),R.value=!1},Ge=Je=>{const lt=c(void 0,Je);lt.length?u(lt):Wa().showMessage("Please select the correct file format and the same file type","error")},at=async Je=>{const lt=Je.target,ze=c(v.value,lt.files);try{if(ze.length){A.value=!0;const Ne=await a(ze),Rt=Ne.map(({name:Jt,mimetype:qt,accept_type:sn,path:$n,thumbnail:yt,type:Tt,metadata:Pt})=>({name:Jt,type:Tt,mimetype:qt,accept_type:sn,path:$n,thumbnail:yt,metadata:Pt}));if(Ne.length){const Jt={data:Rt};await s(v.value,Jt)||(Wa().showMessage("Some files are not generated thumbnail, please try again later","error"),setTimeout(()=>{h(v.value)},15e3))}}}catch(Ne){console.error(Ne)}finally{A.value=!1}},Ze=async Je=>{const lt=c(void 0,Je);lt.length?u(lt):Wa().showMessage("Please select the correct file format and the same file type","error")},it=()=>{var Je,lt,ze;console.log("Clearing temporary files",(Je=G.value)==null?void 0:Je.clearFile),(lt=G.value)==null||lt.clearFile(),(ze=F.value)==null||ze.clearFile()},ft=()=>{var Je,lt;B.value===E_.NO_DATA?(Je=F.value)==null||Je.clearFile():(lt=G.value)==null||lt.clearFile()},vt=async(Je,lt)=>{const ze=lt||1;try{if(B.value==E_.NO_DATA){let Ne=!1;T.value==1&&(Ne=!0),await ue({page:ze,per_page:Q0},Ne)}else{const Ne=await h(Je);Ne&&(E.value={[Je]:Ne,...E.value})}}catch(Ne){console.error("handleUploadSuccessNewRendition",Ne)}finally{B.value=E_.SUCCESS}},mt=Je=>{var ze,Ne,Rt;const lt=(ze=ce.value.find(Jt=>Jt.id==Je))==null?void 0:ze.src;(Ne=U.value)!=null&&Ne.selectPreviewItem&<&&((Rt=U.value)==null||Rt.selectPreviewItem(lt))},jt=Je=>{X.value=Je.state.id},yn=()=>{h(v.value)},bn=Je=>{Wa().showMessage(Je==null?void 0:Je.message,"error")},zt=Je=>{const lt=dm(),ze=Cd({type:"hub_rendition",config:{baseDomain:f("BASE_URL"),rendition_id:Je||"",scene_id:lt||"",ws_code:fc()}}).url;PQn(ze)},ln=()=>{var lt;const Je=Cd({type:"review_rendition",config:{ws_code:fc(),scene_id:dm(),rendition_id:v.value,reviewDomain:f("BASE_REVIEW_URL"),take_id:((lt=C.value)==null?void 0:lt.entity_id)||""}});window.open(Je.url,"_blank")},ae=async(Je,lt)=>{var qt,sn;const ze=((qt=ce.value.find($n=>$n.src===Je))==null?void 0:qt.name)||"",Ne=((sn=pe.value.find($n=>$n.name===ze))==null?void 0:sn.mimetype)||"",Rt=await h(v.value,!1),Jt=Rt==null?void 0:Rt.attachments.find($n=>$n.name===ze);return{src:(Jt==null?void 0:Jt.path)||"",type:Ne,name:(Jt==null?void 0:Jt.name)||""}};ut([()=>v.value,()=>x.value],()=>{x.value=="rendition"&&(O.value=v.value)},{immediate:!0,deep:!0}),ut(()=>{var Je;return(Je=D.value)==null?void 0:Je.renditionConfig},()=>{}),rV($,zf(()=>{N.value=Y()},17)),Go(async()=>{var ze,Ne,Rt;B.value=E_.LOADING;const Je=(ze=D==null?void 0:D.value)==null?void 0:ze.renditionConfig;Je&&Je.renditionId&&(M.value=Number(Je==null?void 0:Je.page)||pT);const lt=await ue({page:M.value,per_page:Q0,first_item_rendition_id:Q.value});lt!=null&<.success&&(H.value=Number((Rt=(Ne=lt.data)==null?void 0:Ne.meta)==null?void 0:Rt.last_page),v.value=(Je==null?void 0:Je.renditionId)||Object.keys(E.value)[0],r("loaded"))}),zs(()=>{O.value=void 0}),t({handleReloadPage:Re,addFiles:Je=>{Ge(Je)}});const Ae={emits:r,getRenditions:i,upLoadFile:a,removeFile:o,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:c,deleteRendition:d,getRenditionDetail:h,getEnvVariable:f,sceneStore:m,renditionStore:g,commentStore:b,permissionStore:w,commentRedirect:_,sceneData:C,currentIdRendition:v,currentSceneTabId:x,renditionList:E,numberOfRendition:T,commentRenditionId:O,hasOpenPermission:k,redirectConfig:D,isLoading:A,statusFetching:B,isDeleting:R,renditionPlayerRef:$,calculatedHeight:N,initPage:M,totalRenditionPage:H,childComponentRef:G,totalRendition:ne,loadingMoreRendition:re,lastRenditionIdpPayload:Q,arboMediaPlayerRef:U,noDataRenditionRef:F,currentItemPlay:X,openReviewBtnConfig:ie,currentRenditionFile:pe,renditionFiles:ce,renditionName:K,calculateHeight:Y,callBackSetIdActive:we,getListRendition:ue,handleChangeRendition:Ve,handleDeleteRendition:Pe,deleteRenditionSuccess:$e,handleReloadPage:Re,handleLoadMoreRendition:Xe,updateRenditionNameFnc:rt,updateRenditionDescriptionFnc:nt,handleChangeInfoRendition:Le,handleChangeName:J,handleRemoveFile:fe,addFileToNewRendition:Ge,addNewFileToSelectedRendition:at,handleFileChange:Ze,clearTemporaryFiles:it,clearFile:ft,handleUploadSuccessNewRendition:vt,handleSelectRenditionFile:mt,handleChangeItemPlay:jt,reloadRenditionItem:yn,handleVideoError:bn,handleCopyLink:zt,handleOpenInArboReview:ln,requestNewLink:ae,SceneRenditionV2:Iki,RenditionDescription:Nki,get ArboMediaPlayer(){return Rle},ModalAddRendition:RPi,RenditionFiles:jPi,RenditionList:JPi,CategoryHeader:iie,RenditionNodata:iMi,get STATUS_FETCH(){return E_},RenderSkeletonLoading:lMi};return Object.defineProperty(Ae,"__isScriptSetup",{enumerable:!1,value:!0}),Ae}}),cMi={class:"flex flex-1 justify-end-end"},dMi={class:"bg-white w-full h-full rendition-main min-h-full min-w-[637px] max-h-full"},fMi={key:0,class:"flex gap-x-[16px] px-4 pb-4 flex-1 h-[calc(100%_-_36px)] max-h-[calc(100vh_-_240px)]"},hMi={key:0,class:"rendition-media"},pMi={ref:"renditionPlayerRef",class:"rendition-preview"};function mMi(e,t,n,r,i,a){const o=ei("TessNonInteractiveChip"),s=ei("ArboTooltip");return L(),te(Vt,null,[r.statusFetching===r.STATUS_FETCH.LOADING?(L(),Ke(r.RenderSkeletonLoading,{key:0})):r.statusFetching===r.STATUS_FETCH.NO_DATA?(L(),Ke(r.RenditionNodata,{key:1,ref:"noDataRenditionRef"},null,512)):(L(),Ke(r.SceneRenditionV2,{key:2},{header:Ie(()=>[Se(r.CategoryHeader,{title:"Renditions",onRefresh:r.handleReloadPage},{default:Ie(()=>[he("div",cMi,[Se(s,{delay:[300,0],"hide-on-click":!1,content:`${String(r.numberOfRendition)} renditions`},{default:Ie(()=>[Se(o,{"component-styles":{background:"#F3F5F8"},icon:"Clapperboard",label:String(r.numberOfRendition)},null,8,["label"])]),_:1},8,["content"])])]),_:1})]),list:Ie(()=>[Se(r.RenditionList,{ref:"childComponentRef","init-page":r.initPage,class:ve(["rendition-list",`${r.statusFetching===r.STATUS_FETCH.SUCCESS?"opacity-100":"opacity-0"} `]),"total-rendition-page":r.totalRenditionPage,"rendition-list":r.renditionList,"status-fetching":r.statusFetching,"current-id-rendition":r.currentIdRendition,"loading-more-rendition":r.loadingMoreRendition,onLoadNewerRendition:r.handleLoadMoreRendition,onLoadOlderRendition:r.handleLoadMoreRendition,onHandleCreateNewRendition:r.handleFileChange,onSelectRendition:r.handleChangeRendition,onCopyLink:r.handleCopyLink,onDeleteRendition:r.handleDeleteRendition},null,8,["init-page","total-rendition-page","class","rendition-list","status-fetching","current-id-rendition","loading-more-rendition"])]),player:Ie(({height:l,width:u})=>[Se(r.ArboMediaPlayer,Qt({ref:"arboMediaPlayerRef",name:r.renditionName||"","list-items":r.renditionFiles},{openIn:r.openReviewBtnConfig},{"request-new-link":r.requestNewLink,onChangeName:r.handleChangeName,onOpenInArboReview:r.handleOpenInArboReview,onOnErrorVideo:r.reloadRenditionItem,onChange:r.handleChangeItemPlay,onOnError:r.handleVideoError,style:{"--media-player-height":l+"px","--media-player-width":u+"px",height:l+"px",width:u+"px"}}),null,16,["name","list-items","onChangeName","style"])]),files:Ie(()=>{var l,u;return[Se(r.RenditionFiles,{style:tn({...r.calculatedHeight}),description:((u=(l=r.renditionList)==null?void 0:l[r.currentIdRendition])==null?void 0:u.description)||"","is-loading":r.isLoading,"rendition-files":r.currentRenditionFile,"active-item":r.currentItemPlay,"current-id-rendition":r.currentIdRendition,"update-rendition-description-fnc":r.updateRenditionDescriptionFnc,"onUpdate:currentIdRendition":r.handleChangeRendition,onUpdateDescription:r.handleChangeInfoRendition,onAddNewFileToSelectedRendition:r.addNewFileToSelectedRendition,onHandleRemoveFile:r.handleRemoveFile,onSelectRenditionFile:r.handleSelectRenditionFile},null,8,["style","description","is-loading","rendition-files","active-item","current-id-rendition"])]}),description:Ie(({height:l})=>{var u,c;return[Se(r.RenditionDescription,{description:((c=(u=r.renditionList)==null?void 0:u[r.currentIdRendition])==null?void 0:c.description)||"","update-rendition-description-fnc":r.updateRenditionDescriptionFnc,height:l},null,8,["description","height"])]}),_:1})),dt(he("div",dMi,[he("template",null,[r.statusFetching===r.STATUS_FETCH.SUCCESS?(L(),te("div",fMi,[r.statusFetching===r.STATUS_FETCH.SUCCESS?(L(),te("div",hMi,[he("div",pMi,null,512)])):Be("v-if",!0)])):Be("v-if",!0)])],512),[[ui,!1]]),(L(),Ke(Y0,{to:"body"},[Se(r.ModalAddRendition,{onUploadSuccess:r.handleUploadSuccessNewRendition,onUploadFailed:r.clearTemporaryFiles,onClose:r.clearFile})]))],64)}const gMi=pi(uMi,[["render",mMi],["__scopeId","data-v-3734fddd"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRendition.vue"]]),vMi=ct({__name:"SceneRenditions",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=q(),i=()=>{var h;(h=r.value)==null||h.handleReloadPage()};t({addFiles:(h,f)=>{var m;(m=r.value)==null||m.addFiles(h,f)}});const a=Ng(),{currentCommentTab:o}=_r(a),s=M2(),{numberOfRendition:l}=_r(s);zq(()=>{l.value===0&&(o.value=Ko.Scene)});const u=n,d={renditionView:r,handleReload:i,commentStore:a,currentCommentTab:o,renditionStore:s,numberOfRendition:l,emits:u,handleLoaded:()=>{u("loaded")},RenditionSelect:gMi,NetworkWrapper:Kie};return Object.defineProperty(d,"__isScriptSetup",{enumerable:!1,value:!0}),d}});function yMi(e,t,n,r,i,a){return L(),Ke(r.NetworkWrapper,{type:"rendition","handle-reload":r.handleReload,"auto-reload":!0},{view:Ie(()=>[Se(r.RenditionSelect,{ref:"renditionView",onLoaded:r.handleLoaded},null,512)]),_:1})}const bMi=pi(vMi,[["render",yMi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRenditions.vue"]]),wMi={},_Mi={class:"comment-skeleton-editor"};function CMi(e,t){return L(),te("div",_Mi,[Be(" Top Toolbar "),t[0]||(t[0]=NR('<div class="toolbar" data-v-fa8089b1><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div></div>',1)),Be(" Main Content Area "),Be(" Right Side Scrollbar "),Be(" Bottom Right Send Button "),t[1]||(t[1]=he("div",{class:"send-btn skeleton-animation"},null,-1))])}const SMi=pi(wMi,[["render",CMi],["__scopeId","data-v-fa8089b1"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/comments/EditorSkeleton.vue"]]),EMi=ct({__name:"BodySkeleton",setup(e,{expose:t}){t();const n=ra,r=q(!0),i=()=>{r.value=!r.value},a=q(null);ut(r,s=>{a.value&&kt(()=>{a.value.scrollLeft=0})});const o={vTooltip:n,isSShowComments:r,toggleSidebar:i,bodySkeletonRef:a,get Icon(){return sr},get TessButton(){return pr},CommentSkeleton:Xkt,EditorSkeleton:SMi};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),xMi={"body-skeleton":"_body-skeleton_c0npo_1","comment-collapsed":"_comment-collapsed_c0npo_12","comment-sidebar":"_comment-sidebar_c0npo_35","arbo-comments":"_arbo-comments_c0npo_27","menu-section":"_menu-section_c0npo_46","main-content-section":"_main-content-section_c0npo_54","main-content":"_main-content_c0npo_54",row:"_row_c0npo_72","comment-section":"_comment-section_c0npo_86","comment-section-skeleton":"_comment-section-skeleton_c0npo_93"},TMi={class:"flex flex-col align-bottom justify-end",style:{gap:"8px"}};function kMi(e,t,n,r,i,a){return L(),te("div",{ref:"bodySkeletonRef",class:ve([e.$style["body-skeleton"],r.isSShowComments?"":e.$style["comment-collapsed"]])},[he("div",{class:ve(e.$style["menu-section"])},[ot(e.$slots,"menu",{},()=>[t[0]||(t[0]=NR('<div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div>',6))])],2),ot(e.$slots,"content",{},()=>[he("div",{class:ve(e.$style["main-content-section"])},[he("div",{class:ve(["white-bg flex flex-col",e.$style["main-content"]])},[...t[1]||(t[1]=[NR('<div class="flex-row justify-between"><div class="btn long-btn small-btn skeleton-animation"></div><div class="btn icon-btn small-btn skeleton-animation"></div></div><div class="grid-card-row"><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div></div><div class="flex-row flex-1 h-full justify-end align-bottom"><div class="card card-long skeleton-animation rounded-[0]"></div></div>',3)])],2)],2)]),he("div",{class:ve(e.$style["comment-sidebar"])},[dt((L(),Ke(r.TessButton,{variant:["icon","secondary"],onClick:r.toggleSidebar},{default:Ie(()=>[Se(r.Icon,{src:r.isSShowComments?"ChevronRight":"Comments"},null,8,["src"])]),_:1})),[[r.vTooltip,{content:r.isSShowComments?"Collapse":"Chat"}]])],2),dt(he("div",{class:ve(e.$style["comment-section"])},[ot(e.$slots,"comments",{},()=>[he("div",{class:ve(e.$style["comment-section-skeleton"])},[t[3]||(t[3]=he("div",{class:"skeleton-animation"},null,-1)),t[4]||(t[4]=he("div",{class:"flex-row justify-between"},[he("div",{class:"skeleton-animation"}),he("div",{class:"btn icon-btn skeleton-animation"})],-1)),he("div",TMi,[Se(r.CommentSkeleton),Se(r.CommentSkeleton),t[2]||(t[2]=he("div",{class:"btn small-btn skeleton-animation"},null,-1))]),Se(r.EditorSkeleton)],2)])],2),[[ui,r.isSShowComments]])],2)}const DMi=pi(EMi,[["render",kMi],["__cssModules",{$style:xMi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/layouts/BodySkeleton.vue"]]),LB="home",AMi=ct({__name:"SceneTab",props:{loading:{type:Boolean,required:!0}},setup(e,{expose:t}){t();const n=ra,r={ADD_RENDITION:"addRendition",MANAGE_RENDITION:"manageRendition",VIEW_ALL_ACTIVITIES:"viewAllActivities"},i=Bl(),{getSceneData:a}=i,{currentSceneTabId:o}=_r(i),s=q(!1),l=q(!1),u=q(),c=q(),{permission:d}=Up(),h={info:MKr,metric:_ki,rendition:bMi,log:Ati,home:fKr},f=Im(),{dashboardActionQueue:m}=_r(f),g=Ng(),b=n$(),{connectState:w,isConnect:_}=_r(b),{commentRenditionId:C,isCommentHeaderReady:v}=_r(g),x=async H=>{o.value=H,w.value.logs=_.value,w.value.rendition=_.value,w.value.metric=_.value},E=H=>{o.value=H},T=(H,G)=>{u.value.addFiles(H,G)},O=W(()=>!!(o.value==="rendition"&&d.value.createRendition)),k=(H,G)=>{var ne;l.value=!1,(ne=c.value)!=null&&ne.addFiles&&c.value.addFiles(H,G)},D=()=>{l.value=!1},A=()=>{l.value=!0},B=()=>{l.value=!1,E("rendition")};ut(o,(H,G)=>{H=="info"&&G!="info"?a():H=="rendition"&&kt(()=>{var ne;(ne=c.value)==null||ne.handleReloadPage()})}),ut(o,H=>{if(H)try{const G=new URLSearchParams(window.location.search),ne=Object.fromEntries(G.entries()),re=new URL(window.location.href);H&&H!==LB?re.searchParams.set("tab",H):re.searchParams.delete("tab"),s.value&&H!=="rendition"&&(ne.renditionId||ne.renditionPage)?(re.searchParams.delete("renditionId"),re.searchParams.delete("renditionPage")):C.value="",window.history.replaceState({},"",re.toString())}catch(G){console.error("Error updating URL parameters:",G)}}),ut(m,H=>{if(H){switch(H){case r.ADD_RENDITION:l.value=!0;break;case r.MANAGE_RENDITION:E("rendition");break;case r.VIEW_ALL_ACTIVITIES:E("log");break;default:console.warn("Unknown dashboard action:",H)}m.value=void 0}},{deep:!0});const R={HOME:{id:"home",tooltipName:"Home",icon:"House",disable:!1},RENDITION:{id:"rendition",tooltipName:"Renditions",icon:"Clapperboard"},METRIC:{id:"metric",tooltipName:"Metrics",icon:"SquareRootVariable"},INFO:{id:"info",tooltipName:"Information",icon:"Info",disable:!1},LOG:{id:"log",tooltipName:"Activity log",icon:"Book"}};Go(()=>{try{const H=new URLSearchParams(window.location.search),G=Object.fromEntries(H.entries());if(o.value||(o.value=LB),G.tab&&G.tab!==LB)if(Object.values(R).map(re=>re.id).includes(G.tab)){const re=G.tab;E(re)}else console.warn("Invalid tab parameter in URL:",G.tab),o.value=LB}catch(H){console.error("Error initializing tab from URL:",H),o.value=LB}finally{s.value=!0}});const $=e,N={tabs:Object.values(R).map(H=>({...H,name:""})),keyLabel:"name",keyTooltip:"tooltipName",keyIcon:"icon",keyContent:"content",keyValue:"id",keyDisable:"disable",position:"left",value:""},M={vTooltip:n,DASHBOARD_ACTIONS:r,DEFAULT_TAB:LB,sceneStore:i,getSceneData:a,currentSceneTabId:o,isMounted:s,isOpenNewRendition:l,commentRef:u,mainRef:c,permission:d,components:h,dashboardStore:f,dashboardActionQueue:m,commentStore:g,connectionStore:b,connectState:w,isConnect:_,commentRenditionId:C,isCommentHeaderReady:v,handleChangeTab:x,clickOnTab:E,handleAddFileComment:T,canDropRenditionFile:O,handleAddFileMain:k,handleCloseModal:D,handleCreateNewRendition:A,handleUploadFileRendition:B,TAB_CONFIG:R,props:$,tabProps:N,get TessButton(){return pr},get Icon(){return sr},DropArea:F5r,MenuTabs:U5r,Comments:TXr,AddNewRenditionModal:BXr,BodySkeleton:DMi};return Object.defineProperty(M,"__isScriptSetup",{enumerable:!1,value:!0}),M}}),OMi={key:0,class:"add-rendition-button"},IMi={class:"main-content-area"};function $Mi(e,t,n,r,i,a){const o=ei("arbo-icon");return L(),te(Vt,null,[Se(r.BodySkeleton,null,cs({_:2},[n.loading?void 0:{name:"menu",fn:Ie(()=>[Se(r.MenuTabs,{"current-tab":r.currentSceneTabId,onChange:r.handleChangeTab},null,8,["current-tab"]),r.permission.createRendition?(L(),te("div",OMi,[dt((L(),Ke(r.TessButton,{variant:["icon","primary"],onClick:r.handleCreateNewRendition},{default:Ie(()=>[Se(r.Icon,{src:"CirclePlus"})]),_:1})),[[r.vTooltip,{content:"Create rendition"}]])])):Be("v-if",!0)]),key:"0"},n.loading?void 0:{name:"content",fn:Ie(()=>[(L(),Ke(r.DropArea,{key:r.currentSceneTabId,"file-type":["video/quicktime","image/jpg","video/mp4","video/quicktime","video/mpeg","image/jpeg","image/png"],"can-drop":r.canDropRenditionFile,"size-limit":5e7,"allow-mixed-file-type":!1,"is-rendition-file":!0,"error-message":{SIZE:"File exceeds 50MB.",TYPE:"File format not supported.",DIFF:"Mixed file formats are not supported."},onAddFile:r.handleAddFileMain},{icon:Ie(()=>[Se(o,{name:"Upload",size:"84px",class:"icon"})]),text:Ie(()=>[...t[1]||(t[1]=[Mt("Drop review file here to create a new rendition.",-1)])]),main:Ie(()=>[he("div",IMi,[r.currentSceneTabId!=null?(L(),Ke(H8t,{key:0},[(L(),Ke(Lf(r.components[r.currentSceneTabId]),{ref:"mainRef",onLoaded:t[0]||(t[0]=s=>r.isCommentHeaderReady=!0)},null,544))],1024)):Be("v-if",!0)])]),_:1},8,["can-drop"]))]),key:"1"},n.loading?void 0:{name:"comments",fn:Ie(()=>[r.isCommentHeaderReady?(L(),Ke(r.Comments,{key:0,ref:"commentRef"},null,512)):Be("v-if",!0)]),key:"2"}]),1024),(L(),Ke(Y0,{to:"body"},[Se(r.AddNewRenditionModal,Qt({opened:r.isOpenNewRendition},{onClose:r.handleCloseModal,onUpload:r.handleUploadFileRendition}),null,16)]))],64)}const RMi=pi(AMi,[["render",$Mi],["__scopeId","data-v-3900bb7c"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-tab/SceneTab.vue"]]),PMi=ct({__name:"ShareSnackBar",setup(e,{expose:t}){t();const n=Wa(),{notifications:r}=_r(n),i=W(()=>[...r.value]),a=f=>f.trim().startsWith("<svg"),o=q("Copy"),s=()=>{setTimeout(()=>{o.value="Copy"},3e3)},l=f=>{navigator.clipboard.writeText(f).then(()=>{o.value="Copied",s()},()=>{o.value="Copy failed",s()})},u=q(new Set),h={notificationStore:n,notifications:r,showNotifications:i,isSvgString:a,tooltip:o,resetTooltip:s,handleCopyError:l,hoveredNotifications:u,onMouseEnter:f=>{var m;u.value.add(f),(m=n.pauseAutoDismiss)==null||m.call(n,f)},onMouseLeave:f=>{var m;u.value.delete(f),(m=n.resumeAutoDismiss)==null||m.call(n,f)},get Button(){return fi},get Icon(){return Ca}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),MMi={"notification-wrapper":"_notification-wrapper_r53ju_1","notification-item":"_notification-item_r53ju_15","notification--success":"_notification--success_r53ju_30","notification--error":"_notification--error_r53ju_36","close-btn":"_close-btn_r53ju_42","notification--info":"_notification--info_r53ju_45","notification--warning":"_notification--warning_r53ju_52","notification--interactive":"_notification--interactive_r53ju_59","snackbar-type":"_snackbar-type_r53ju_67",snackbar__message:"_snackbar__message_r53ju_76",message:"_message_r53ju_89","error-message":"_error-message_r53ju_97",snackbar__icon:"_snackbar__icon_r53ju_103","actions-notification":"_actions-notification_r53ju_112","icon-draw":"_icon-draw_r53ju_120","copy-btn":"_copy-btn_r53ju_128","arbo__icon-btn":"_arbo__icon-btn_r53ju_137"},NMi=["onMouseenter","onMouseleave"],FMi=["innerHTML"],LMi=["innerHTML"];function BMi(e,t,n,r,i,a){const o=Va("contrast");return L(),Ke(yce,{name:"list",tag:"div",class:ve(["notification-center",e.$style["notification-wrapper"]])},{default:Ie(()=>[(L(!0),te(Vt,null,pn(r.showNotifications,s=>{var l;return dt((L(),te("div",{key:s.id,class:ve([e.$style["notification-item"],e.$style[`notification--${s.type||"info"}`],!(s!=null&&s.actions)||((l=s==null?void 0:s.actions)==null?void 0:l.length)==0?e.$style["snackbar-type"]:""]),onMouseenter:u=>r.onMouseEnter(s.id),onMouseleave:u=>r.onMouseLeave(s.id)},[he("p",{class:ve(e.$style.snackbar__message)},[he("span",{class:ve(e.$style.snackbar__icon)},[!s.icon&&s.type=="success"?(L(),Ke(r.Icon,{key:0,name:"CircleCheck"})):Be("v-if",!0),!s.icon&&s.type=="interactive"?(L(),Ke(r.Icon,{key:1,name:"CircleCheck"})):!s.icon&&s.type=="error"?(L(),Ke(r.Icon,{key:2,name:"CircleXMark"})):!s.icon&&s.type=="info"?(L(),Ke(r.Icon,{key:3,name:"Info"})):s.icon&&r.isSvgString(s.icon)?(L(),te("i",{key:4,class:ve(e.$style["icon-draw"]),innerHTML:s.icon},null,10,FMi)):s.icon&&!r.isSvgString(s.icon)?(L(),Ke(r.Icon,{key:5,src:s.icon,color:"var(--primary-color)"},null,8,["src"])):Be("v-if",!0)],2),he("span",{class:ve(e.$style["error-message"])},[he("span",{class:ve(e.$style.message),innerHTML:s.message},null,10,LMi)],2)],2),s.type!=="interactive"?(L(),Ke(r.Button,{key:0,type:"secondary",class:ve([e.$style["copy-btn"],"copy-snackbar-btn"]),"prefix-icon":"Copy","prefix-tooltip":r.tooltip,label:"",size:"24",style:{minWidth:"24px",width:"24px",height:"24px",padding:"0"},onClick:u=>r.handleCopyError(s.message)},null,8,["class","prefix-tooltip","onClick"])):Be("v-if",!0)],42,NMi)),[[o]])}),128))]),_:1},8,["class"])}const VMi=pi(PMi,[["render",BMi],["__cssModules",{$style:MMi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/snackbar/ShareSnackBar.vue"]]),UMi=ct({__name:"PopupLayout",props:{popupName:{type:String,required:!0},showOverlay:{type:Boolean,required:!1,default:!0},overlayOpacity:{type:Number,required:!1,default:.5},closeOnOverlayClick:{type:Boolean,required:!1,default:!0},closeOnEscape:{type:Boolean,required:!1,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const r=e,{popupRef:i,show:a,hide:o,isVisible:s}=Cdt({useTrigger:!1,arrow:!1,centered:!0,showOverlay:r.showOverlay,overlayOpacity:r.overlayOpacity,closeOnOverlayClick:r.closeOnOverlayClick,appendTo:()=>document.body}),l=d=>{r.closeOnEscape&&d.key==="Escape"&&s.value&&o()};dn(()=>{document.addEventListener("keydown",l)}),Kr(()=>{document.removeEventListener("keydown",l)}),t({show:a,hide:o,isVisible:s});const u=n;ut(()=>s.value,d=>{u(d?"shown":"hidden")});const c={props:r,popupRef:i,show:a,hide:o,isVisible:s,handleEscape:l,emits:u,get TessButton(){return pr},get Icon(){return sr}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),jMi={popupContainer:"_popupContainer_1ha71_1",popupWrapper:"_popupWrapper_1ha71_5",popupFadeIn:"_popupFadeIn_1ha71_1",header:"_header_1ha71_18","header-title":"_header-title_1ha71_32",body:"_body_1ha71_42",footer:"_footer_1ha71_51"},HMi={style:{display:"flex","align-items":"center",gap:"20px"}};function zMi(e,t,n,r,i,a){const o=Va("tooltip");return L(),te("div",{ref:"popupRef",class:ve(e.$style.popupContainer)},[he("div",{class:ve(e.$style.popupWrapper)},[he("div",{class:ve(e.$style.header)},[he("span",{class:ve(e.$style["header-title"])},[ot(e.$slots,"header",{},()=>[Mt(wt(n.popupName),1)])],2),he("div",HMi,[ot(e.$slots,"actions"),dt((L(),Ke(r.TessButton,{variant:["icon","tertiary"],size:"small",onClick:r.hide,"aria-label":"Close popup"},{default:Ie(()=>[Se(r.Icon,{src:"Xmark",size:"9",color:"#6B6B6B"})]),_:1},8,["onClick"])),[[o,"Close"]])])],2),he("div",{class:ve(e.$style.body)},[ot(e.$slots,"default")],2),Be(` <div :class="$style['footer']">
|
|
1264
|
+
*/function XBt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XBt(Object(n),!0).forEach(function(r){bRi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XBt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ple(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ple=function(t){return typeof t}:Ple=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ple(e)}function bRi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ux(){return Ux=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ux.apply(this,arguments)}function wRi(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _Ri(e,t){if(e==null)return{};var n=wRi(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var CRi="1.14.0";function jx(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Hx=jx(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),wW=jx(/Edge/i),JBt=jx(/firefox/i),_W=jx(/safari/i)&&!jx(/chrome/i)&&!jx(/android/i),QBt=jx(/iP(ad|od|hone)/i),SRi=jx(/chrome/i)&&jx(/android/i),e6t={capture:!1,passive:!1};function Ns(e,t,n){e.addEventListener(t,n,!Hx&&e6t)}function os(e,t,n){e.removeEventListener(t,n,!Hx&&e6t)}function Mle(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function ERi(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function pS(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Mle(e,t):Mle(e,t))||r&&e===n)return e;if(e===n)break}while(e=ERi(e))}return null}var t6t=/\s+/g;function Ry(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(t6t," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(t6t," ")}}function ga(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function $B(e,t){var n="";if(typeof e=="string")n=e;else do{var r=ga(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function n6t(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function mS(){var e=document.scrollingElement;return e||document.documentElement}function Pf(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,l,u,c,d;if(e!==window&&e.parentNode&&e!==mS()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,l=a.bottom,u=a.right,c=a.height,d=a.width):(o=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!Hx))do if(i&&i.getBoundingClientRect&&(ga(i,"transform")!=="none"||n&&ga(i,"position")!=="static")){var h=i.getBoundingClientRect();o-=h.top+parseInt(ga(i,"border-top-width")),s-=h.left+parseInt(ga(i,"border-left-width")),l=o+a.height,u=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var f=$B(i||e),m=f&&f.a,g=f&&f.d;f&&(o/=g,s/=m,d/=m,c/=g,l=o+c,u=s+d)}return{top:o,left:s,bottom:l,right:u,width:d,height:c}}}function r6t(e,t,n){for(var r=_D(e,!0),i=Pf(e)[t];r;){var a=Pf(r)[n],o=void 0;if(o=i>=a,!o)return r;if(r===mS())break;r=_D(r,!1)}return!1}function RB(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!=="none"&&o[a]!==va.ghost&&(r||o[a]!==va.dragged)&&pS(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function tPe(e,t){for(var n=e.lastElementChild;n&&(n===va.ghost||ga(n,"display")==="none"||t&&!Mle(n,t));)n=n.previousElementSibling;return n||null}function F0(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==va.clone&&(!t||Mle(e,t))&&n++;return n}function i6t(e){var t=0,n=0,r=mS();if(e)do{var i=$B(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function xRi(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function _D(e,t){if(!e||!e.getBoundingClientRect)return mS();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ga(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return mS();if(r||t)return n;r=!0}}while(n=n.parentNode);return mS()}function TRi(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function nPe(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var CW;function a6t(e,t){return function(){if(!CW){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),CW=setTimeout(function(){CW=void 0},t)}}}function kRi(){clearTimeout(CW),CW=void 0}function o6t(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function s6t(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Py="Sortable"+new Date().getTime();function DRi(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(ga(i,"display")==="none"||i===va.ghost)){e.push({target:i,rect:Pf(i)});var a=hS({},e[e.length-1].rect);if(i.thisAnimationDuration){var o=$B(i,!0);o&&(a.top-=o.f,a.left-=o.e)}i.fromRect=a}})}},addAnimationState:function(r){e.push(r)},removeAnimationState:function(r){e.splice(xRi(e,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var a=!1,o=0;e.forEach(function(s){var l=0,u=s.target,c=u.fromRect,d=Pf(u),h=u.prevFromRect,f=u.prevToRect,m=s.rect,g=$B(u,!0);g&&(d.top-=g.f,d.left-=g.e),u.toRect=d,u.thisAnimationDuration&&nPe(h,d)&&!nPe(c,d)&&(m.top-d.top)/(m.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(l=ORi(m,h,f,i.options)),nPe(d,c)||(u.prevFromRect=c,u.prevToRect=d,l||(l=i.options.animation),i.animate(u,m,d,l)),l&&(a=!0,o=Math.max(o,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),a?t=setTimeout(function(){typeof r=="function"&&r()},o):typeof r=="function"&&r(),e=[]},animate:function(r,i,a,o){if(o){ga(r,"transition",""),ga(r,"transform","");var s=$B(this.el),l=s&&s.a,u=s&&s.d,c=(i.left-a.left)/(l||1),d=(i.top-a.top)/(u||1);r.animatingX=!!c,r.animatingY=!!d,ga(r,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=ARi(r),ga(r,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),ga(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){ga(r,"transition",""),ga(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},o)}}}}function ARi(e){return e.offsetWidth}function ORi(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var PB=[],rPe={initializeByDefault:!0},SW={mount:function(t){for(var n in rPe)rPe.hasOwnProperty(n)&&!(n in t)&&(t[n]=rPe[n]);PB.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),PB.push(t)},pluginEvent:function(t,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var a=t+"Global";PB.forEach(function(o){n[o.pluginName]&&(n[o.pluginName][a]&&n[o.pluginName][a](hS({sortable:n},r)),n.options[o.pluginName]&&n[o.pluginName][t]&&n[o.pluginName][t](hS({sortable:n},r)))})},initializePlugins:function(t,n,r,i){PB.forEach(function(s){var l=s.pluginName;if(!(!t.options[l]&&!s.initializeByDefault)){var u=new s(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,Ux(r,u.defaults)}});for(var a in t.options)if(t.options.hasOwnProperty(a)){var o=this.modifyOption(t,a,t.options[a]);typeof o<"u"&&(t.options[a]=o)}},getEventProperties:function(t,n){var r={};return PB.forEach(function(i){typeof i.eventProperties=="function"&&Ux(r,i.eventProperties.call(n[i.pluginName],t))}),r},modifyOption:function(t,n,r){var i;return PB.forEach(function(a){t[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[n]=="function"&&(i=a.optionListeners[n].call(t[a.pluginName],r))}),i}};function IRi(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,o=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[Py],!!t){var g,b=t.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Hx&&!wW?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=o||n,g.from=s||n,g.item=i||n,g.clone=a,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var _=hS(hS({},m),SW.getEventProperties(r,t));for(var C in _)g[C]=_[C];n&&n.dispatchEvent(g),b[w]&&b[w].call(t,g)}}var $Ri=["evt"],Zg=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,a=_Ri(r,$Ri);SW.pluginEvent.bind(va)(t,n,hS({dragEl:kr,parentEl:od,ghostEl:no,rootEl:Ju,nextEl:fR,lastDownEl:Nle,cloneEl:sd,cloneHidden:CD,dragStarted:xW,putSortable:jh,activeSortable:va.active,originalEvent:i,oldIndex:MB,oldDraggableIndex:EW,newIndex:My,newDraggableIndex:SD,hideGhostForTarget:p6t,unhideGhostForTarget:m6t,cloneNowHidden:function(){CD=!0},cloneNowShown:function(){CD=!1},dispatchSortableEvent:function(s){Bm({sortable:n,name:s,originalEvent:i})}},a))};function Bm(e){IRi(hS({putSortable:jh,cloneEl:sd,targetEl:kr,rootEl:Ju,oldIndex:MB,oldDraggableIndex:EW,newIndex:My,newDraggableIndex:SD},e))}var kr,od,no,Ju,fR,Nle,sd,CD,MB,My,EW,SD,Fle,jh,NB=!1,Lle=!1,Ble=[],hR,V_,iPe,aPe,l6t,u6t,xW,FB,TW,kW=!1,Vle=!1,Ule,tm,oPe=[],sPe=!1,jle=[],Hle=typeof document<"u",zle=QBt,c6t=wW||Hx?"cssFloat":"float",RRi=Hle&&!SRi&&!QBt&&"draggable"in document.createElement("div"),d6t=function(){if(Hle){if(Hx)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),f6t=function(t,n){var r=ga(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=RB(t,0,n),o=RB(t,1,n),s=a&&ga(a),l=o&&ga(o),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Pf(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Pf(o).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var d=s.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=i&&r[c6t]==="none"||o&&r[c6t]==="none"&&u+c>i)?"vertical":"horizontal"},PRi=function(t,n,r){var i=r?t.left:t.top,a=r?t.right:t.bottom,o=r?t.width:t.height,s=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return i===s||a===l||i+o/2===s+u/2},MRi=function(t,n){var r;return Ble.some(function(i){var a=i[Py].options.emptyInsertThreshold;if(!(!a||tPe(i))){var o=Pf(i),s=t>=o.left-a&&t<=o.right+a,l=n>=o.top-a&&n<=o.bottom+a;if(s&&l)return r=i}}),r},h6t=function(t){function n(a,o){return function(s,l,u,c){var d=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(o||d))return!0;if(a==null||a===!1)return!1;if(o&&a==="clone")return a;if(typeof a=="function")return n(a(s,l,u,c),o)(s,l,u,c);var h=(o?s:l).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var r={},i=t.group;(!i||Ple(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},p6t=function(){!d6t&&no&&ga(no,"display","none")},m6t=function(){!d6t&&no&&ga(no,"display","")};Hle&&document.addEventListener("click",function(e){if(Lle)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Lle=!1,!1},!0);var pR=function(t){if(kr){t=t.touches?t.touches[0]:t;var n=MRi(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[Py]._onDragOver(r)}}},NRi=function(t){kr&&kr.parentNode[Py]._isOutsideThisEl(t.target)};function va(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ux({},t),e[Py]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return f6t(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,s){o.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:va.supportPointer!==!1&&"PointerEvent"in window&&!_W,emptyInsertThreshold:5};SW.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);h6t(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:RRi,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Ns(e,"pointerdown",this._onTapStart):(Ns(e,"mousedown",this._onTapStart),Ns(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ns(e,"dragover",this),Ns(e,"dragenter",this)),Ble.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ux(this,DRi())}va.prototype={constructor:va,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(FB=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,kr):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,a=i.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=i.filter;if(zRi(r),!kr&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&_W&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=pS(l,i.draggable,r,!1),!(l&&l.animated)&&Nle!==l)){if(MB=F0(l),EW=F0(l,i.draggable),typeof c=="function"){if(c.call(this,t,l,this)){Bm({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),Zg("filter",n,{evt:t}),a&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=pS(u,d.trim(),r,!1),d)return Bm({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:r,toEl:r}),Zg("filter",n,{evt:t}),!0}),c)){a&&t.cancelable&&t.preventDefault();return}i.handle&&!pS(u,i.handle,r,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,n,r){var i=this,a=i.el,o=i.options,s=a.ownerDocument,l;if(r&&!kr&&r.parentNode===a){var u=Pf(r);if(Ju=a,kr=r,od=kr.parentNode,fR=kr.nextSibling,Nle=r,Fle=o.group,va.dragged=kr,hR={target:kr,clientX:(n||t).clientX,clientY:(n||t).clientY},l6t=hR.clientX-u.left,u6t=hR.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,kr.style["will-change"]="all",l=function(){if(Zg("delayEnded",i,{evt:t}),va.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!JBt&&i.nativeDraggable&&(kr.draggable=!0),i._triggerDragStart(t,n),Bm({sortable:i,name:"choose",originalEvent:t}),Ry(kr,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){n6t(kr,c.trim(),lPe)}),Ns(s,"dragover",pR),Ns(s,"mousemove",pR),Ns(s,"touchmove",pR),Ns(s,"mouseup",i._onDrop),Ns(s,"touchend",i._onDrop),Ns(s,"touchcancel",i._onDrop),JBt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,kr.draggable=!0),Zg("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(wW||Hx))){if(va.eventCanceled){this._onDrop();return}Ns(s,"mouseup",i._disableDelayedDrag),Ns(s,"touchend",i._disableDelayedDrag),Ns(s,"touchcancel",i._disableDelayedDrag),Ns(s,"mousemove",i._delayedDragTouchMoveHandler),Ns(s,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&Ns(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){kr&&lPe(kr),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;os(t,"mouseup",this._disableDelayedDrag),os(t,"touchend",this._disableDelayedDrag),os(t,"touchcancel",this._disableDelayedDrag),os(t,"mousemove",this._delayedDragTouchMoveHandler),os(t,"touchmove",this._delayedDragTouchMoveHandler),os(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Ns(document,"pointermove",this._onTouchMove):n?Ns(document,"touchmove",this._onTouchMove):Ns(document,"mousemove",this._onTouchMove):(Ns(kr,"dragend",this),Ns(Ju,"dragstart",this._onDragStart));try{document.selection?qle(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(NB=!1,Ju&&kr){Zg("dragStarted",this,{evt:n}),this.nativeDraggable&&Ns(document,"dragover",NRi);var r=this.options;!t&&Ry(kr,r.dragClass,!1),Ry(kr,r.ghostClass,!0),va.active=this,t&&this._appendGhost(),Bm({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(V_){this._lastX=V_.clientX,this._lastY=V_.clientY,p6t();for(var t=document.elementFromPoint(V_.clientX,V_.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(V_.clientX,V_.clientY),t!==n);)n=t;if(kr.parentNode[Py]._isOutsideThisEl(t),n)do{if(n[Py]){var r=void 0;if(r=n[Py]._onDragOver({clientX:V_.clientX,clientY:V_.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);m6t()}},_onTouchMove:function(t){if(hR){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,a=t.touches?t.touches[0]:t,o=no&&$B(no,!0),s=no&&o&&o.a,l=no&&o&&o.d,u=zle&&tm&&i6t(tm),c=(a.clientX-hR.clientX+i.x)/(s||1)+(u?u[0]-oPe[0]:0)/(s||1),d=(a.clientY-hR.clientY+i.y)/(l||1)+(u?u[1]-oPe[1]:0)/(l||1);if(!va.active&&!NB){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(no){o?(o.e+=c-(iPe||0),o.f+=d-(aPe||0)):o={a:1,b:0,c:0,d:1,e:c,f:d};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");ga(no,"webkitTransform",h),ga(no,"mozTransform",h),ga(no,"msTransform",h),ga(no,"transform",h),iPe=c,aPe=d,V_=a}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!no){var t=this.options.fallbackOnBody?document.body:Ju,n=Pf(kr,!0,zle,!0,t),r=this.options;if(zle){for(tm=t;ga(tm,"position")==="static"&&ga(tm,"transform")==="none"&&tm!==document;)tm=tm.parentNode;tm!==document.body&&tm!==document.documentElement?(tm===document&&(tm=mS()),n.top+=tm.scrollTop,n.left+=tm.scrollLeft):tm=mS(),oPe=i6t(tm)}no=kr.cloneNode(!0),Ry(no,r.ghostClass,!1),Ry(no,r.fallbackClass,!0),Ry(no,r.dragClass,!0),ga(no,"transition",""),ga(no,"transform",""),ga(no,"box-sizing","border-box"),ga(no,"margin",0),ga(no,"top",n.top),ga(no,"left",n.left),ga(no,"width",n.width),ga(no,"height",n.height),ga(no,"opacity","0.8"),ga(no,"position",zle?"absolute":"fixed"),ga(no,"zIndex","100000"),ga(no,"pointerEvents","none"),va.ghost=no,t.appendChild(no),ga(no,"transform-origin",l6t/parseInt(no.style.width)*100+"% "+u6t/parseInt(no.style.height)*100+"%")}},_onDragStart:function(t,n){var r=this,i=t.dataTransfer,a=r.options;if(Zg("dragStart",this,{evt:t}),va.eventCanceled){this._onDrop();return}Zg("setupClone",this),va.eventCanceled||(sd=s6t(kr),sd.draggable=!1,sd.style["will-change"]="",this._hideClone(),Ry(sd,this.options.chosenClass,!1),va.clone=sd),r.cloneId=qle(function(){Zg("clone",r),!va.eventCanceled&&(r.options.removeCloneOnHide||Ju.insertBefore(sd,kr),r._hideClone(),Bm({sortable:r,name:"clone"}))}),!n&&Ry(kr,a.dragClass,!0),n?(Lle=!0,r._loopId=setInterval(r._emulateDragOver,50)):(os(document,"mouseup",r._onDrop),os(document,"touchend",r._onDrop),os(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",a.setData&&a.setData.call(r,i,kr)),Ns(document,"drop",r),ga(kr,"transform","translateZ(0)")),NB=!0,r._dragStartId=qle(r._dragStarted.bind(r,n,t)),Ns(document,"selectstart",r),xW=!0,_W&&ga(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,r=t.target,i,a,o,s=this.options,l=s.group,u=va.active,c=Fle===l,d=s.sort,h=jh||u,f,m=this,g=!1;if(sPe)return;function b(G,ne){Zg(G,m,hS({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:o,dragRect:i,targetRect:a,canSort:d,fromSortable:h,target:r,completed:_,onMove:function(Q,U){return Wle(Ju,n,kr,i,Q,Pf(Q),t,U)},changed:C},ne))}function w(){b("dragOverAnimationCapture"),m.captureAnimationState(),m!==h&&h.captureAnimationState()}function _(G){return b("dragOverCompleted",{insertion:G}),G&&(c?u._hideClone():u._showClone(m),m!==h&&(Ry(kr,jh?jh.options.ghostClass:u.options.ghostClass,!1),Ry(kr,s.ghostClass,!0)),jh!==m&&m!==va.active?jh=m:m===va.active&&jh&&(jh=null),h===m&&(m._ignoreWhileAnimating=r),m.animateAll(function(){b("dragOverAnimationComplete"),m._ignoreWhileAnimating=null}),m!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(r===kr&&!kr.animated||r===n&&!r.animated)&&(FB=null),!s.dragoverBubble&&!t.rootEl&&r!==document&&(kr.parentNode[Py]._isOutsideThisEl(t.target),!G&&pR(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function C(){My=F0(kr),SD=F0(kr,s.draggable),Bm({sortable:m,name:"change",toEl:n,newIndex:My,newDraggableIndex:SD,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=pS(r,s.draggable,n,!0),b("dragOver"),va.eventCanceled)return g;if(kr.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||m._ignoreWhileAnimating===r)return _(!1);if(Lle=!1,u&&!s.disabled&&(c?d||(o=od!==Ju):jh===this||(this.lastPutMode=Fle.checkPull(this,u,kr,t))&&l.checkPut(this,u,kr,t))){if(f=this._getDirection(t,r)==="vertical",i=Pf(kr),b("dragOverValid"),va.eventCanceled)return g;if(o)return od=Ju,w(),this._hideClone(),b("revert"),va.eventCanceled||(fR?Ju.insertBefore(kr,fR):Ju.appendChild(kr)),_(!0);var v=tPe(n,s.draggable);if(!v||VRi(t,f,this)&&!v.animated){if(v===kr)return _(!1);if(v&&n===t.target&&(r=v),r&&(a=Pf(r)),Wle(Ju,n,kr,i,r,a,t,!!r)!==!1)return w(),n.appendChild(kr),od=n,C(),_(!0)}else if(v&&BRi(t,f,this)){var x=RB(n,0,s,!0);if(x===kr)return _(!1);if(r=x,a=Pf(r),Wle(Ju,n,kr,i,r,a,t,!1)!==!1)return w(),n.insertBefore(kr,x),od=n,C(),_(!0)}else if(r.parentNode===n){a=Pf(r);var E=0,T,O=kr.parentNode!==n,k=!PRi(kr.animated&&kr.toRect||i,r.animated&&r.toRect||a,f),D=f?"top":"left",A=r6t(r,"top","top")||r6t(kr,"top","top"),B=A?A.scrollTop:void 0;FB!==r&&(T=a[D],kW=!1,Vle=!k&&s.invertSwap||O),E=URi(t,r,a,f,k?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Vle,FB===r);var R;if(E!==0){var $=F0(kr);do $-=E,R=od.children[$];while(R&&(ga(R,"display")==="none"||R===no))}if(E===0||R===r)return _(!1);FB=r,TW=E;var N=r.nextElementSibling,M=!1;M=E===1;var H=Wle(Ju,n,kr,i,r,a,t,M);if(H!==!1)return(H===1||H===-1)&&(M=H===1),sPe=!0,setTimeout(LRi,30),w(),M&&!N?n.appendChild(kr):r.parentNode.insertBefore(kr,M?N:r),A&&o6t(A,0,B-A.scrollTop),od=kr.parentNode,T!==void 0&&!Vle&&(Ule=Math.abs(T-Pf(r)[D])),C(),_(!0)}if(n.contains(kr))return _(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){os(document,"mousemove",this._onTouchMove),os(document,"touchmove",this._onTouchMove),os(document,"pointermove",this._onTouchMove),os(document,"dragover",pR),os(document,"mousemove",pR),os(document,"touchmove",pR)},_offUpEvents:function(){var t=this.el.ownerDocument;os(t,"mouseup",this._onDrop),os(t,"touchend",this._onDrop),os(t,"pointerup",this._onDrop),os(t,"touchcancel",this._onDrop),os(document,"selectstart",this)},_onDrop:function(t){var n=this.el,r=this.options;if(My=F0(kr),SD=F0(kr,r.draggable),Zg("drop",this,{evt:t}),od=kr&&kr.parentNode,My=F0(kr),SD=F0(kr,r.draggable),va.eventCanceled){this._nulling();return}NB=!1,Vle=!1,kW=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),uPe(this.cloneId),uPe(this._dragStartId),this.nativeDraggable&&(os(document,"drop",this),os(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_W&&ga(document.body,"user-select",""),ga(kr,"transform",""),t&&(xW&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),no&&no.parentNode&&no.parentNode.removeChild(no),(Ju===od||jh&&jh.lastPutMode!=="clone")&&sd&&sd.parentNode&&sd.parentNode.removeChild(sd),kr&&(this.nativeDraggable&&os(kr,"dragend",this),lPe(kr),kr.style["will-change"]="",xW&&!NB&&Ry(kr,jh?jh.options.ghostClass:this.options.ghostClass,!1),Ry(kr,this.options.chosenClass,!1),Bm({sortable:this,name:"unchoose",toEl:od,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ju!==od?(My>=0&&(Bm({rootEl:od,name:"add",toEl:od,fromEl:Ju,originalEvent:t}),Bm({sortable:this,name:"remove",toEl:od,originalEvent:t}),Bm({rootEl:od,name:"sort",toEl:od,fromEl:Ju,originalEvent:t}),Bm({sortable:this,name:"sort",toEl:od,originalEvent:t})),jh&&jh.save()):My!==MB&&My>=0&&(Bm({sortable:this,name:"update",toEl:od,originalEvent:t}),Bm({sortable:this,name:"sort",toEl:od,originalEvent:t})),va.active&&((My==null||My===-1)&&(My=MB,SD=EW),Bm({sortable:this,name:"end",toEl:od,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Zg("nulling",this),Ju=kr=od=no=fR=sd=Nle=CD=hR=V_=xW=My=SD=MB=EW=FB=TW=jh=Fle=va.dragged=va.ghost=va.clone=va.active=null,jle.forEach(function(t){t.checked=!0}),jle.length=iPe=aPe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":kr&&(this._onDragOver(t),FRi(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,a=r.length,o=this.options;i<a;i++)n=r[i],pS(n,o.draggable,this.el,!1)&&t.push(n.getAttribute(o.dataIdAttr)||HRi(n));return t},sort:function(t,n){var r={},i=this.el;this.toArray().forEach(function(a,o){var s=i.children[o];pS(s,this.options.draggable,i,!1)&&(r[a]=s)},this),n&&this.captureAnimationState(),t.forEach(function(a){r[a]&&(i.removeChild(r[a]),i.appendChild(r[a]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return pS(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var r=this.options;if(n===void 0)return r[t];var i=SW.modifyOption(this,t,n);typeof i<"u"?r[t]=i:r[t]=n,t==="group"&&h6t(r)},destroy:function(){Zg("destroy",this);var t=this.el;t[Py]=null,os(t,"mousedown",this._onTapStart),os(t,"touchstart",this._onTapStart),os(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(os(t,"dragover",this),os(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ble.splice(Ble.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!CD){if(Zg("hideClone",this),va.eventCanceled)return;ga(sd,"display","none"),this.options.removeCloneOnHide&&sd.parentNode&&sd.parentNode.removeChild(sd),CD=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(CD){if(Zg("showClone",this),va.eventCanceled)return;kr.parentNode==Ju&&!this.options.group.revertClone?Ju.insertBefore(sd,kr):fR?Ju.insertBefore(sd,fR):Ju.appendChild(sd),this.options.group.revertClone&&this.animate(kr,sd),ga(sd,"display",""),CD=!1}}};function FRi(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Wle(e,t,n,r,i,a,o,s){var l,u=e[Py],c=u.options.onMove,d;return window.CustomEvent&&!Hx&&!wW?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=i||t,l.relatedRect=a||Pf(t),l.willInsertAfter=s,l.originalEvent=o,e.dispatchEvent(l),c&&(d=c.call(u,l,o)),d}function lPe(e){e.draggable=!1}function LRi(){sPe=!1}function BRi(e,t,n){var r=Pf(RB(n.el,0,n.options,!0)),i=10;return t?e.clientX<r.left-i||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-i||e.clientY<r.bottom&&e.clientX<r.left}function VRi(e,t,n){var r=Pf(tPe(n.el,n.options.draggable)),i=10;return t?e.clientX>r.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function URi(e,t,n,r,i,a,o,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,d=r?n.bottom:n.right,h=!1;if(!o){if(s&&Ule<u*i){if(!kW&&(TW===1?l>c+u*a/2:l<d-u*a/2)&&(kW=!0),kW)h=!0;else if(TW===1?l<c+Ule:l>d-Ule)return-TW}else if(l>c+u*(1-i)/2&&l<d-u*(1-i)/2)return jRi(t)}return h=h||o,h&&(l<c+u*a/2||l>d-u*a/2)?l>c+u/2?1:-1:0}function jRi(e){return F0(kr)<F0(e)?1:-1}function HRi(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function zRi(e){jle.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&jle.push(r)}}function qle(e){return setTimeout(e,0)}function uPe(e){return clearTimeout(e)}Hle&&Ns(document,"touchmove",function(e){(va.active||NB)&&e.cancelable&&e.preventDefault()}),va.utils={on:Ns,off:os,css:ga,find:n6t,is:function(t,n){return!!pS(t,n,t,!1)},extend:TRi,throttle:a6t,closest:pS,toggleClass:Ry,clone:s6t,index:F0,nextTick:qle,cancelNextTick:uPe,detectDirection:f6t,getChild:RB},va.get=function(e){return e[Py]},va.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(va.utils=hS(hS({},va.utils),r.utils)),SW.mount(r)})},va.create=function(e,t){return new va(e,t)},va.version=CRi;var af=[],DW,cPe,dPe=!1,fPe,hPe,Gle,AW;function WRi(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?Ns(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ns(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Ns(document,"touchmove",this._handleFallbackAutoScroll):Ns(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?os(document,"dragover",this._handleAutoScroll):(os(document,"pointermove",this._handleFallbackAutoScroll),os(document,"touchmove",this._handleFallbackAutoScroll),os(document,"mousemove",this._handleFallbackAutoScroll)),g6t(),Kle(),kRi()},nulling:function(){Gle=cPe=DW=dPe=AW=fPe=hPe=null,af.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var i=this,a=(n.touches?n.touches[0]:n).clientX,o=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(a,o);if(Gle=n,r||this.options.forceAutoScrollFallback||wW||Hx||_W){pPe(n,this.options,s,r);var l=_D(s,!0);dPe&&(!AW||a!==fPe||o!==hPe)&&(AW&&g6t(),AW=setInterval(function(){var u=_D(document.elementFromPoint(a,o),!0);u!==l&&(l=u,Kle()),pPe(n,i.options,u,r)},10),fPe=a,hPe=o)}else{if(!this.options.bubbleScroll||_D(s,!0)===mS()){Kle();return}pPe(n,this.options,_D(s,!1),!1)}}},Ux(e,{pluginName:"scroll",initializeByDefault:!0})}function Kle(){af.forEach(function(e){clearInterval(e.pid)}),af=[]}function g6t(){clearInterval(AW)}var pPe=a6t(function(e,t,n,r){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,l=mS(),u=!1,c;cPe!==n&&(cPe=n,Kle(),DW=t.scroll,c=t.scrollFn,DW===!0&&(DW=_D(n,!0)));var d=0,h=DW;do{var f=h,m=Pf(f),g=m.top,b=m.bottom,w=m.left,_=m.right,C=m.width,v=m.height,x=void 0,E=void 0,T=f.scrollWidth,O=f.scrollHeight,k=ga(f),D=f.scrollLeft,A=f.scrollTop;f===l?(x=C<T&&(k.overflowX==="auto"||k.overflowX==="scroll"||k.overflowX==="visible"),E=v<O&&(k.overflowY==="auto"||k.overflowY==="scroll"||k.overflowY==="visible")):(x=C<T&&(k.overflowX==="auto"||k.overflowX==="scroll"),E=v<O&&(k.overflowY==="auto"||k.overflowY==="scroll"));var B=x&&(Math.abs(_-i)<=o&&D+C<T)-(Math.abs(w-i)<=o&&!!D),R=E&&(Math.abs(b-a)<=o&&A+v<O)-(Math.abs(g-a)<=o&&!!A);if(!af[d])for(var $=0;$<=d;$++)af[$]||(af[$]={});(af[d].vx!=B||af[d].vy!=R||af[d].el!==f)&&(af[d].el=f,af[d].vx=B,af[d].vy=R,clearInterval(af[d].pid),(B!=0||R!=0)&&(u=!0,af[d].pid=setInterval((function(){r&&this.layer===0&&va.active._onTouchMove(Gle);var N=af[this.layer].vy?af[this.layer].vy*s:0,M=af[this.layer].vx?af[this.layer].vx*s:0;typeof c=="function"&&c.call(va.dragged.parentNode[Py],M,N,e,Gle,af[this.layer].el)!=="continue"||o6t(af[this.layer].el,M,N)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=_D(h,!1)));dPe=u}},30),v6t=function(t){var n=t.originalEvent,r=t.putSortable,i=t.dragEl,a=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=r||a;s();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(d)&&(o("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function mPe(){}mPe.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=RB(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:v6t},Ux(mPe,{pluginName:"revertOnSpill"});function gPe(){}gPe.prototype={onSpill:function(t){var n=t.dragEl,r=t.putSortable,i=r||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:v6t},Ux(gPe,{pluginName:"removeOnSpill"}),va.mount(new WRi),va.mount(gPe,mPe);function qRi(e,t){return Object.values(e).indexOf(t)}function GRi(e,t,n,r){if(!e)return[];const i=Object.values(e),a=t.length-r;return[...t].map((s,l)=>l>=a?i.length:i.indexOf(s))}function KRi(e){return["transition-group","TransitionGroup"].includes(e)}function y6t(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?KRi(t.name):!1}function YRi(e,t){return t?{...t.props,...t.attrs}:e}const vPe=["Start","Add","Remove","Update","End"],yPe=["Choose","Unchoose","Sort","Filter","Clone"],ZRi=["Move",...vPe,...yPe].map(e=>"on"+e);let bPe=null;const b6t=ct({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...vPe.map(e=>e.toLowerCase()),...yPe.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:r}){const i=q(!1),a=q(!1),o=q(0),s=q(0),l=q([]),u=q(null),c=q(null),d=W(()=>e.list?e.list:e.modelValue),h=Ni();function f(){return e.component?ei(e.component):e.tag}function m(F){if(c.value)for(const X in F){const ie=YBt(X);ZRi.indexOf(ie)===-1&&c.value.option(ie,F[X])}}function g(){var F;return((F=h==null?void 0:h.proxy)==null?void 0:F.$el.children)||[]}async function b(){var F;await kt(),l.value=GRi(g(),((F=h==null?void 0:h.proxy)==null?void 0:F.$el.children)||[],i.value,s.value)}function w(F){const X=qRi(g()||[],F);if(X===-1)return null;const ie=d.value?d.value[X]:null;return{index:X,element:ie}}function _(F){kt(()=>t("change",F))}function C(F){if(e.list){F(e.list);return}const X=[...e.modelValue||[]];F(X),t("update:modelValue",X)}function v(...F){C(ie=>ie.splice(...F))}function x(F,X){C(pe=>pe.splice(X,0,pe.splice(F,1)[0]))}function E(F){const X=l.value,ie=X.length;return F>ie-1?ie:X[F]}function T(){var X,ie;return n.default&&((ie=(X=n.default()[0])==null?void 0:X.component)==null?void 0:ie.proxy)||null}function O(F){if(!e.noTransitionOnDrag||!i.value)return;const X=g();X[F]&&(X[F].data=null);const ie=T();ie&&(ie.children=[],ie.kept=void 0)}function k(F){b(),u.value=w(F.item),u.value&&(F.item._underlying_vm_=e.clone(u.value.element),bPe=F.item)}function D(F){const X=F.item._underlying_vm_;if(X===void 0)return;ePe(F.item);const ie=E(F.newIndex);v(ie,0,X),b(),_({added:{element:X,newIndex:ie}})}function A(F){var ie;if(ZBt((ie=h==null?void 0:h.proxy)==null?void 0:ie.$el,F.item,F.oldIndex),F.pullMode==="clone"){ePe(F.clone);return}if(!u.value)return;const X=u.value.index;v(X,1),O(X),_({removed:{element:u.value.element,oldIndex:X}})}function B(F){var pe,ce;ePe(F.item),ZBt(F.from,F.item,F.oldIndex);const X=(pe=u.value)==null?void 0:pe.index,ie=E(F.newIndex);x(X,ie),_({moved:{element:(ce=u.value)==null?void 0:ce.element,oldIndex:X,newIndex:ie}})}function R(F,X){Object.prototype.hasOwnProperty.call(F,X)&&(F[X]+=o.value)}function $(F){return F.__draggable_component__}function N({to:F,related:X}){const ie=$(F);if(!ie)return{component:ie};const pe=ie.realList,ce={list:pe,component:ie};if(F!==X&&pe&&ie.getUnderlyingVm){const K=ie.getUnderlyingVm(X);if(K)return Object.assign(K,ce)}return ce}function M(F,X){const ie=[...X.to.children].filter(Y=>Y.style.display!=="none");if(ie.length===0)return 0;const pe=ie.indexOf(X.related),ce=F.component.getVmIndex(pe);return ie.indexOf(bPe)!==-1||!X.willInsertAfter?ce:ce+1}const H=()=>{var ce,K;const F={};vPe.forEach(Y=>{F["on"+Y]=ne(Y)}),yPe.forEach(Y=>{F["on"+Y]=G.bind(null,Y)});const X=Object.keys(r).reduce((Y,we)=>(Y[YBt(we)]=r[we],Y),{}),ie=Object.assign({},X,F,{onMove:(Y,we)=>re(Y,we)});"draggable"in ie||(ie.draggable=">*");const pe=((ce=h==null?void 0:h.proxy)==null?void 0:ce.$el.nodeType)===1?h.proxy.$el:((K=h==null?void 0:h.proxy)==null?void 0:K.$el.parentElement)||null;pe&&(c.value=new va(pe,ie),pe.__draggable_component__=h==null?void 0:h.proxy,b())};function G(F,X){kt(()=>t(F.toLowerCase(),X))}function ne(F){return X=>{if(d.value!==null){const ie="onDrag"+F,pe=U[ie];pe&&pe(X)}G(F,X)}}function re(F,X){const ie=e.move;if(!ie||!d.value)return!0;const pe=N(F),ce=u.value,K=M(pe,F);ce&&Object.assign(ce,{futureIndex:K});const Y=Object.assign({},F,{relatedContext:pe,draggedContext:ce});return ie(Y,X)}function Q(){b(),bPe=null}const U={onDragStart:k,onDragAdd:D,onDragRemove:A,onDragUpdate:B,onDragMove:re,onDragEnd:Q};return dn(()=>{H()}),e.list!==null&&e.modelValue!==null&&gRi.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:a,headerOffset:o,footerOffset:s,transitionMode:i,computeIndexes:b,updateOptions:m,getChildrenNodes:g,getUnderlyingVm:w,emitChanges:_,alterList:C,spliceList:v,updatePosition:x,getVmIndex:E,getComponent:T,resetTransitionData:O,onDragStart:k,onDragAdd:D,onDragRemove:A,onDragUpdate:B,updateProperty:R,onDragMove:re,onDragEnd:Q,mounted:H,context:u,sortableInstance:c,getRelatedContextFromMoveEvent:N,getTargetedComponent:$,computeFutureIndex:M}},render(){const e=this.getTag(),t=YRi(this.$attrs,this.componentData);if(typeof e=="string"){const r=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return r?(this.transitionMode=y6t(r),ll(e,t,r)):ll(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const r=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=y6t(r||[])}return ll(e,t,n)}}),XRi=ct({__name:"VisualWrapper",props:{name:{type:String,required:!0},h:{type:[Number,String],required:!1,default:180},w:{type:[Number,String],required:!1,default:180}},setup(e,{expose:t}){t();const n=e,r=W(()=>({height:typeof n.h=="number"?`${n.h}px`:n.h,width:typeof n.w=="number"?`${n.w}px`:n.w})),i={props:n,styles:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function JRi(e,t,n,r,i,a){const o=ei("ArboIcon");return L(),te("div",{class:"visual-wrapper flex items-center justify-center",style:tn(r.styles)},[Se(o,{name:n.name,type:"visual"},null,8,["name"])],4)}const QRi=pi(XRi,[["render",JRi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/common/VisualWrapper.vue"]]),Yle=250;var w6t=(e=>(e[e.UPLOAD_FILE=0]="UPLOAD_FILE",e[e.UPLOAD_IN_PROGRESS=1]="UPLOAD_IN_PROGRESS",e[e.UPLOAD_SUCCESS=2]="UPLOAD_SUCCESS",e[e.UPLOAD_FAILED=3]="UPLOAD_FAILED",e))(w6t||{});const ePi=ct({__name:"ModalAddRendition",emits:["upload-success","upload-failed","close"],setup(e,{expose:t,emit:n}){t();const{t:r}=rw(),{upLoadFile:i,createNewRendition:a,uploadNewFileInNewRendition:o,checkLengthAndTypeRendition:s}=Zie(),l=n,u=M2(),c=Bl(),{updateSceneAPI:d}=Y1(),{allStatus:h,status:f}=_r(c),{fileReference:m,numberOfRendition:g}=_r(u),b=or({name:`Rendition ${g.value+1}`,description:""});ut(g,Y=>{b.name=`Rendition ${Y+1}`},{immediate:!0});const w=q(0),_=q(null),C=q(!1),v=q(kXr),x=q(!0),E=W(()=>{let Y=!1;switch(w.value){case 0:Y=!b.name.trim()||!m.value.length||m.value.length>5;break;case 1:Y=!0;break;case 2:Y=!$.value;break}return Y}),T=q(!1),O=q(),k=W({get:()=>m.value??[],set:Y=>{m.value&&(m.value=Y)}}),D=W(()=>c.allStatus),A=q(D.value),B=async Y=>{Y?A.value=D.value.filter(we=>we.name.toLowerCase().includes(Y.toLowerCase())):A.value=D.value},{permission:R}=Up(),$=W(()=>R.value.updateStatus),{getSceneData:N}=c,M=async Y=>{var ue;if(!$.value)return;const we=(ue=h==null?void 0:h.value)==null?void 0:ue.find(Ve=>Ve.id===Y);we&&((await d({template_flow_status_id:we.id})).success?(O.value=Y,setTimeout(async()=>{await N()},1e3)):O.value=f.value),l("close")},H=()=>{T.value=!0};ut(k,Y=>{w.value>1||Y.length>0&&H()},{deep:!0,immediate:!0}),ut(T,Y=>{Y&&(b.name=`Rendition ${g.value+1}`)},{immediate:!0});const G=async()=>{var Y;try{w.value=1;const we=m.value.map(Xe=>Xe.originFile),ue=await i(we);if(!ue.length)throw new Error("Upload failed");const Ve=ue.map(Xe=>({name:Xe.name,type:Xe.type,mimetype:Xe.mimetype,accept_type:Xe.accept_type,path:Xe.path,thumbnail:Xe.thumbnail}));let Pe=[];Pe=[{...b,attachments:Ve}];const $e=await a(Pe),Re=$e.success?{textCancelBtn:"No, thanks",textConfirmBtn:"Update status"}:{textCancelBtn:"",textConfirmBtn:"Try again"};v.value.splice(2,1,Re),$e.success?(x.value=!0,w.value=2,l("upload-success",(Y=$e.data)==null?void 0:Y.data.map(Xe=>Xe.id))):(x.value=!1,w.value=3,l("upload-failed"))}catch{w.value=3,l("upload-failed")}},ne=async()=>{switch(w.value){case 0:G();break;case 1:break;case 2:await M(O.value),re();break;case 3:re();break}},re=()=>{m.value=[],T.value=!1,w.value=0,b.name="",T.value=!1},Q=Y=>{const we=m.value.findIndex(ue=>ue.url===Y);we>-1&&m.value.splice(we,1)},U=async Y=>{var Pe,$e;const we=(Pe=m.value[0])==null?void 0:Pe.originFile.type,ue=Y.target;if(!(($e=ue.files)!=null&&$e.length))return;const Ve=s(void 0,ue.files,we,m.value.length);o(Ve)},F=async Y=>{const we=["Backspace","ArrowLeft","ArrowRight"];b.name.length>=Yle&&!we.includes(Y.key)&&(Y.preventDefault(),Y.stopPropagation())},X=()=>{b.name.length>Yle&&(b.name=b.name.slice(0,Yle))},ie=async Y=>{if(O.value=Y,$.value)O.value=Y;else throw new Error("Permission denied")},pe=()=>{re(),l("close")},ce=()=>{var Y;(Y=_.value)==null||Y.click()};ut(f,()=>{O.value=f.value},{immediate:!0}),Kr(()=>{re()});const K={t:r,upLoadFile:i,createNewRendition:a,uploadNewFileInNewRendition:o,checkLengthAndTypeRendition:s,emits:l,maxLengthNameRendition:Yle,renditionStore:u,sceneStore:c,updateSceneAPI:d,allStatus:h,status:f,fileReference:m,numberOfRendition:g,formState:b,UploadStep:w6t,currentStep:w,fileInput:_,isLoading:C,textButton:v,isUploadSuccess:x,isBtnDisable:E,isShow:T,_status:O,listFileRendition:k,_allStatus:D,listStatus:A,handleSearch:B,permission:R,canUpdate:$,getSceneData:N,handleUpdateStatus:M,show:H,handleUploadStep:G,handleNextStep:ne,reset:re,removeFile:Q,handleFileChange:U,handleChangeNameRendition:F,handleInput:X,handleSelectStatus:ie,closeModal:pe,triggerFileUpload:ce,get VueDraggableNext(){return b6t},get STEPS(){return DXr},VisualWrapper:QRi};return Object.defineProperty(K,"__isScriptSetup",{enumerable:!1,value:!0}),K}}),tPi={class:"flex justify-center relative w-full"},nPi={class:"text-[24px] font-bold"},rPi={class:"-mt-6"},iPi={class:"flex justify-center w-full"},aPi={class:"stepper"},oPi={key:0,class:"check"},sPi={key:1,class:"text-[12px]"},lPi={key:0,class:"line"},uPi={key:0,class:"mt-4"},cPi={class:"flex gap-2"},dPi={class:"relative w-[40%] shadow-md bg-cover aspect-ratio rounded-md overflow-hidden"},fPi=["src"],hPi={class:"flex-1"},pPi={class:"text-center text-sm"},mPi={class:"overflow-auto"},gPi={class:"flex justify-center"},vPi={key:0,class:"loader"},yPi={class:"text-start"},bPi={for:"rendition-file-upload",class:"sr-only"},wPi={key:1},_Pi={class:"text-lg font-bold text-center mt-3"},CPi={class:"h-[220px] p-4 flex justify-center"},SPi={class:"text sx text-center"},EPi={key:2},xPi={class:"text-lg font-bold text-center mt-3"},TPi={class:"h-[220px] p-4 flex justify-center"},kPi={class:"text sx text-center"},DPi={key:0,class:"relative"},APi={key:3},OPi={class:"h-[220px] p-4 flex justify-center"},IPi={class:"text sx text-center"};function $Pi(e,t,n,r,i,a){const o=ei("arbo-button"),s=ei("ArboInput"),l=ei("TessReviewFileCard"),u=ei("TessStatusSelect"),c=ei("ArboTooltip"),d=ei("arbo-modal");return L(),Ke(d,Qt({show:r.isShow},{...r.textButton[r.currentStep]},{disable:r.isBtnDisable,icon:"''",class:"modal-add-rendition",onConfirmed:r.handleNextStep,onHidden:r.closeModal}),{header:Ie(()=>[he("div",tPi,[he("p",nPi,wt(r.t("rendition.create_rendition")),1),he("div",{class:"absolute -right-8 -top-4",onClick:r.closeModal},[Se(o,{"prefix-tooltip":"Close","prefix-icon":"Xmark",type:"tertiary",label:""})])])]),"main-icon":Ie(()=>[...t[3]||(t[3]=[he("div",null,null,-1)])]),default:Ie(()=>[ot(e.$slots,"default",{},()=>[he("div",rPi,[he("div",iPi,[he("div",aPi,[(L(!0),te(Vt,null,pn(r.STEPS,(h,f)=>(L(),te("div",{key:f,class:"step"},[he("div",{class:ve(["circle",{active:f<=r.currentStep}])},[f<r.currentStep?(L(),te("span",oPi,"✓")):(L(),te("span",sPi,wt(f+1),1))],2),f<r.STEPS.length-1?(L(),te("div",lPi)):Be("v-if",!0)]))),128))])])]),he("div",null,[r.currentStep===0?(L(),te("div",uPi,[he("div",cPi,[he("div",dPi,[r.fileReference[0]?(L(),te("img",{key:0,loading:"lazy",class:"absolute top-0 left-0 w-full h-full object-cover",src:r.fileReference[0].url,alt:""},null,8,fPi)):Be("v-if",!0)]),he("div",hPi,[Se(s,{modelValue:r.formState.name,"onUpdate:modelValue":t[0]||(t[0]=h=>r.formState.name=h),placeholder:r.t("rendition.placeHolder"),class:"rendition-name-input","onInput:keyDown":r.handleChangeNameRendition,"onInput:change":r.handleInput},null,8,["modelValue","placeholder"])])]),he("p",pPi,wt(r.t("rendition.drag_files")),1),he("div",mPi,[Se(r.VueDraggableNext,{modelValue:r.listFileRendition,"onUpdate:modelValue":t[1]||(t[1]=h=>r.listFileRendition=h),class:"dragArea list-group w-full flex flex-col gap-2"},{default:Ie(()=>[(L(!0),te(Vt,null,pn(r.listFileRendition,(h,f)=>(L(),te("div",{key:f,class:"w-full"},[Se(l,{"ready-only":!1,"thumbnail-url":h.url,"thumbnail-name":h.name,"is-unaccepted":!1,class:"rendition-review-card",onDeleteCard:()=>{r.removeFile(h.url)}},null,8,["thumbnail-url","thumbnail-name","onDeleteCard"])]))),128))]),_:1},8,["modelValue"])]),he("div",gPi,[r.isLoading?(L(),te("div",vPi)):Be("v-if",!0)]),he("div",yPi,[he("span",{class:ve(`text-[#3C9BFA] text-sm mt-2 cursor-pointer ${r.fileReference.length>=5?"pointer-events-none text-gray-600":""}`),onClick:r.triggerFileUpload},wt(r.t("rendition.upload_more")),3),he("label",bPi,wt(r.t("rendition.upload_more")),1),he("input",{id:"rendition-file-upload",ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:r.handleFileChange},null,544)])])):r.currentStep===1?(L(),te("div",wPi,[he("div",_Pi,wt(r.t("rendition.upload_in_progress")),1),he("div",CPi,[Se(r.VisualWrapper,{name:"UploadInProgress"})]),he("p",SPi,[Mt(wt(r.t("rendition.keep_open_the_modal")),1),t[4]||(t[4]=he("br",null,null,-1)),Mt(" "+wt(r.t("rendition.uploading_background")),1)])])):r.currentStep===2?(L(),te("div",EPi,[he("div",xPi,wt(r.isUploadSuccess?r.t("rendition.upload_successful"):r.t("rendition.upload_ failed")),1),he("div",TPi,[Se(r.VisualWrapper,{name:r.isUploadSuccess?"Successful1":"Unsuccessful1"},null,8,["name"])]),he("p",kPi,wt(r.isUploadSuccess?r.t("rendition.update_status_char"):r.t("rendition.update_fail")),1),r.isUploadSuccess?(L(),te("div",DPi,[Se(c,{content:r.canUpdate?"":"Uh Oh! You don't have access.",class:"!w-full","hide-on-click":!1},{default:Ie(()=>[Se(u,{modelValue:r._status,"onUpdate:modelValue":[t[2]||(t[2]=h=>r._status=h),r.handleSelectStatus],options:r.allStatus,"is-unaccepted":!1,class:"rendition-change-status","is-clearable":!1,onSearch:r.handleSearch},null,8,["modelValue","options"])]),_:1},8,["content"])])):Be("v-if",!0)])):r.currentStep===3?(L(),te("div",APi,[he("div",OPi,[Se(r.VisualWrapper,{name:"Unsuccessful1"})]),he("p",IPi,wt(r.t("rendition.update_fail")),1)])):Be("v-if",!0)])],!0)]),_:3},16,["show","disable"])}const RPi=pi(ePi,[["render",$Pi],["__scopeId","data-v-bd8166b7"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/ModalAddRendition.vue"]]),PPi=ct({__name:"RenditionFiles",props:{isLoading:{type:Boolean,required:!0},description:{type:String,required:!0},currentIdRendition:{type:String,required:!0},activeItem:{type:String,required:!0},renditionFiles:{type:Array,required:!0},updateRenditionDescriptionFnc:{type:Function,required:!0}},emits:["triggerFileUpload","addNewFileToSelectedRendition","handleRemoveFile","update:currentIdRendition","updateDescription","selectRenditionFile"],setup(e,{expose:t,emit:n}){t();const{changeSortOrderApi:r}=$2e(),i=e,a=n,o=q(i.description||""),{permission:s}=Up(),l=q(!1),u=my().getEnvVariable("DELAY_SAVE")||3e3;ut(o,zf(async v=>{if(l.value){l.value=!1;return}await i.updateRenditionDescriptionFnc(v)||(l.value=!0,o.value=i.description)},Number(u)),{immediate:!1});const c=()=>{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept=OXr.join(","),v.style.display="none",v.addEventListener("change",b),v.click()},d=q([]),h=W(()=>(i.renditionFiles??[]).reduce((E,T)=>(E[T.id]=T,E),{})),{getRenditionDetail:f}=Zie(),m=W(()=>{var v;return((v=d.value)==null?void 0:v.length)??0});ut(()=>i.renditionFiles,()=>{var v;d.value=((v=i.renditionFiles)==null?void 0:v.map(x=>x.id))??[],i.renditionFiles.forEach(x=>{h.value[x.id]=x})},{immediate:!0,deep:!0});const g=async()=>{try{const v=Array.from(new Set(d.value));if(i.currentIdRendition)if(await r(i.currentIdRendition,v))f(i.currentIdRendition);else throw new Error("Update failed.")}catch{Wa().showMessage("Update failed.","error")}},b=v=>{a("addNewFileToSelectedRendition",v)},C={changeSortOrderApi:r,props:i,emits:a,description:o,permission:s,revertDescription:l,DELAY_MS:u,triggerFileUpload:c,renditionAttachmentIds:d,renditionAttachments:h,getRenditionDetail:f,numberOfFiles:m,updateSorting:g,handleChangeFile:b,handleRemoveFile:v=>{var x;((x=Object.keys(h.value))==null?void 0:x.length)<2?Wa().showMessage("Cannot be deleted. Each rendition must have at least one file","error"):a("handleRemoveFile",v)},handleClickCard:v=>{const x=String(v);a("selectRenditionFile",x)},get VueDraggableNext(){return b6t}};return Object.defineProperty(C,"__isScriptSetup",{enumerable:!1,value:!0}),C}}),MPi={class:"rendition-files"},NPi={class:"my-2 flex justify-between"},FPi={class:"w-max"},LPi={class:"list-file"},BPi={class:"flex justify-center mt-2"},VPi={key:0,class:"loader"};function UPi(e,t,n,r,i,a){const o=ei("TessNonInteractiveChip"),s=ei("ArboTooltip"),l=ei("TessReviewFileCard"),u=ei("ArboButton");return L(),te("div",MPi,[he("div",NPi,[t[1]||(t[1]=he("div",{class:"flex items-center justify-between flex-1"},[he("span",{class:"font-lato text-[14px] font-bold leading-[18px] flex-1"},"Review files")],-1)),he("div",FPi,[Se(s,{delay:[300,0],"hide-on-click":!1,content:`${r.numberOfFiles} review files`},{default:Ie(()=>[Se(o,{"component-styles":{background:"#F3F5F8"},icon:"File",label:String(r.numberOfFiles)},null,8,["label"])]),_:1},8,["content"])])]),he("div",LPi,[Se(r.VueDraggableNext,{modelValue:r.renditionAttachmentIds,"onUpdate:modelValue":t[0]||(t[0]=c=>r.renditionAttachmentIds=c),"item-key":"id",class:"flex flex-col gap-2",disabled:!r.permission.addReviewFiles,onChange:r.updateSorting},{default:Ie(()=>[(L(!0),te(Vt,null,pn(r.renditionAttachmentIds,c=>{var d,h;return L(),te("div",{key:c},[Se(l,{"disable-drag":!r.permission.addReviewFiles,"read-only":!r.permission.deleteReviewFiles,class:ve({selected:r.renditionAttachments[c].id==n.activeItem}),"thumbnail-url":(d=r.renditionAttachments[c])==null?void 0:d.thumbnail,"thumbnail-name":(h=r.renditionAttachments[c])==null?void 0:h.name,"shared-styles":{"--review-card--background":"#F3F5F8"},onClick:f=>r.handleClickCard(c),onDeleteCard:()=>{r.handleRemoveFile(c)}},null,8,["disable-drag","read-only","class","thumbnail-url","thumbnail-name","onClick","onDeleteCard"])])}),128))]),_:1},8,["modelValue","disabled"])]),he("div",BPi,[n.isLoading?(L(),te("div",VPi)):Be("v-if",!0)]),r.permission.addReviewFiles?(L(),Ke(u,Qt({key:0},{prefixIcon:"Plus",type:"secondary",class:"actions-item",label:"Add more review files"},{disable:r.numberOfFiles>=5,class:"w-full",onClick:r.triggerFileUpload}),null,16,["disable"])):Be("v-if",!0)])}const jPi=pi(PPi,[["render",UPi],["__scopeId","data-v-e25366db"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionFiles.vue"]]),HPi=ct({__name:"RenditionList",props:{statusFetching:{type:String,required:!0},currentIdRendition:{type:String,required:!0},loadingMoreRendition:{type:Boolean,required:!0},totalRenditionPage:{type:Number,required:!0},initPage:{type:Number,required:!1}},emits:["handleCreateNewRendition","selectRendition","copyLink","deleteRendition","loadOlderRendition","loadNewerRendition"],setup(e,{expose:t,emit:n}){const r=M2(),i=q({}),{renditionList:a}=_r(r),o=n,{permission:s}=Up(),l=Bl(),{sceneId:u,takeId:c}=_r(l),d=e,h=q(),f=q(null),m=B=>{const R=fc(),$=BO("BASE_REVIEW_URL"),N=lfe({type:"review_rendition",config:{reviewDomain:$,ws_code:R,scene_id:u.value,rendition_id:B,take_id:c.value}}).url;window.open(N,"_blank")},g=(B,R)=>{},b=B=>{const R=JSON.parse(JSON.stringify(B));return R.entity_path=[],{data:R,permission:{canDelete:s.value.deleteRendition,canOpenReview:!0,canOpenSceneHub:!0},config:{sceneId:u.value,takeId:c.value,wsCode:fc(),baseDomain:BO("BASE_URL")},hasNewComment:B.has_new_comment,actived:!1,type:"scene-hub"}},w=B=>{o("deleteRendition",B)},_=B=>{var R;h!=null&&h.value&&((R=h.value)==null||R.clearFile()),o("handleCreateNewRendition",B)},C=B=>{o("selectRendition",B)},v=W(()=>{const B=Object.keys(a.value).map(R=>a.value[R]);return B.sort((R,$)=>new Date($.created_at).getTime()-new Date(R.created_at).getTime()),B.map(R=>R.id)}),x=()=>{var B;(B=h.value)==null||B.clearFile()},E=or({start:(d==null?void 0:d.initPage)||pT,end:(d==null?void 0:d.initPage)||pT,total:1,loading:!1});ut(()=>d.totalRenditionPage,B=>{E.total=B});const T=async(B,R)=>{const $=document.getElementById(`rendition_${B}`);$&&kt(()=>{setTimeout(()=>{$==null||$.scrollIntoView(),R&&($==null||$.classList.add("highlight"),setTimeout(()=>{$==null||$.classList.remove("highlight")},3e3))},1e3)})},O=Yie(),{redirectConfig:k}=_r(O);ut(()=>d.currentIdRendition,()=>{var B,R,$;(B=k.value)!=null&&B.renditionConfig&&(($=(R=k.value)==null?void 0:R.renditionConfig)==null?void 0:$.renditionId)===d.currentIdRendition&&kt(()=>{var N;(N=d.currentIdRendition)!=null&&N.trim()&&T(d.currentIdRendition,!0)})},{immediate:!0}),dn(()=>{var B;iV(f.value,async()=>{E.loading||E.start<=1||(E.start=E.start-1,E.loading=!0,o("loadNewerRendition",E.start),E.loading=!1)},{distance:10,direction:"top",canLoadMore:()=>E.start>1&&!E.loading}),iV(f.value,async()=>{E.loading&&E.end>=E.total||(E.end=E.end+1,E.loading=!0,o("loadOlderRendition",E.end),E.loading=!1)},{distance:10,direction:"bottom",canLoadMore:()=>E.end<E.total&&!E.loading}),(B=f.value)==null||B.addEventListener("scroll",()=>{Object.values(i.value).forEach(R=>{var $;($=R==null?void 0:R.hidePopup)==null||$.call(R)})})});const D=()=>{E.start=pT,E.end=pT,E.total=pT};t({elementRef:f,clearFile:x,reset:D});const A={renditionStore:r,renditionCardRefs:i,renditionList:a,emits:o,permission:s,sceneStore:l,sceneId:u,takeId:c,props:d,uploadRef:h,elementRef:f,handleOpenInReview:m,handleCopy:g,createRenditionCardProps:b,handleDeleteRendition:w,handleCreateNewRendition:_,handleSelectKey:C,renditionIds:v,clearFile:x,page:E,gotoRendition:T,redirectStore:O,redirectConfig:k,handleResetList:D,UploadRenditionFiles:R2e,get STATUS_FETCH(){return E_}};return Object.defineProperty(A,"__isScriptSetup",{enumerable:!1,value:!0}),A}}),zPi={class:"flex flex-col justify-between rendition-list"},WPi={key:0,class:"rendition-upload-new"},qPi={ref:"elementRef",class:"flex-1 overflow-y-auto overflow-x-hidden"},GPi={key:0,class:"flex flex-col gap-y-2"},KPi=["id","onClick"],YPi={key:1,class:"flex flex-col gap-y-2"},ZPi={key:2,class:"h-10 flex justify-center items-center"};function XPi(e,t,n,r,i,a){const o=ei("RenditionCardV2"),s=ei("ArboSkeletonLoading");return L(),te("div",zPi,[r.permission.createRendition?(L(),te("div",WPi,[Se(r.UploadRenditionFiles,{ref:"uploadRef","rendition-id":void 0,type:"small",onHandleCreateNewRendition:r.handleCreateNewRendition},null,512)])):Be("v-if",!0),he("div",qPi,[n.statusFetching!==r.STATUS_FETCH.LOADING?(L(),te("div",GPi,[(L(!0),te(Vt,null,pn(r.renditionIds,(l,u)=>(L(),te("div",{id:`rendition_${l}`,key:l,class:"rendition-item",onClick:()=>r.handleSelectKey(l)},[(L(),Ke(o,Qt({id:r.renditionList[l].id,ref_for:!0,ref:"sceneRef",key:`rendition-item-${r.renditionList[l].id}`,"ref-key":`rendition-item-${r.renditionList[l].id}`,index:l},{ref_for:!0},r.createRenditionCardProps(r.renditionList[l]),{onOpenReview:()=>r.handleOpenInReview(l),isSelected:n.currentIdRendition===l,onOnClick:r.handleSelectKey,onCopy:c=>r.handleCopy(r.renditionList[l].id,c),onDelete:()=>r.handleDeleteRendition(l)}),null,16,["id","ref-key","index","onOpenReview","isSelected","onCopy","onDelete"]))],8,KPi))),128))])):(L(),te("div",YPi,[(L(),te(Vt,null,pn(5,l=>he("div",{key:l},[Se(s,{width:"144px"})])),64))])),n.loadingMoreRendition?(L(),te("div",ZPi,[...t[0]||(t[0]=[he("div",{class:"loader"},null,-1)])])):Be("v-if",!0)],512)])}const JPi=pi(HPi,[["render",XPi],["__scopeId","data-v-fecfea63"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionList.vue"]]),QPi=ct({__name:"RenditionNodata",setup(e,{expose:t}){const{permission:n}=Up(),{t:r}=rw(),i=Bl(),{sceneData:a}=_r(i),{getEnvVariable:o}=my(),s=()=>{if(!a.value)return;const{entity_id:m,id:g}=a.value,b=o("BASE_REVIEW_URL"),w=Cd({type:"review_scene",config:{reviewDomain:b,ws_code:fc(),scene_id:g,take_id:m}});window.open(w.url,"_blank")},l=q(),u=()=>{var m;(m=l.value)==null||m.clearFile()},c=I3(),{hasOpenPermission:d}=_r(c),h=W(()=>d.value.review);t({clearFile:u});const f={permission:n,t:r,sceneStore:i,sceneData:a,getEnvVariable:o,redirectToArboReview:s,uploadRef:l,clearFile:u,permissionStore:c,hasOpenPermission:d,canOpenRendition:h,EmptyData:l9,UploadRenditionFiles:R2e};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),eMi={class:"rendition-no-data"},tMi={class:"flex justify-center items-center"},nMi={key:1,class:"upload"};function rMi(e,t,n,r,i,a){const o=ei("ArboButton");return L(),te("div",eMi,[he("div",{class:ve(["rendition-no-data-container",{"no-open-in":!r.canOpenRendition}])},[r.canOpenRendition?(L(),Ke(o,{key:0,label:r.t("common.open_in_new_review"),class:"w-ful",style:{width:"100%"},type:"secondary",onClick:r.redirectToArboReview},null,8,["label"])):Be("v-if",!0),he("div",tMi,[Se(r.EmptyData,{type:"rendition",class:"max-w-[600px]"})]),r.permission.createRendition?(L(),te("div",nMi,[Se(r.UploadRenditionFiles,{ref:"uploadRef",type:"default"},null,512)])):Be("v-if",!0)],2)])}const iMi=pi(QPi,[["render",rMi],["__scopeId","data-v-51d1de48"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionNodata.vue"]]),aMi={},oMi={class:"flex-col h-full w-full"};function sMi(e,t){return L(),te("div",oMi,[...t[0]||(t[0]=[NR('<div class="flex flex-row w-full p-4 gap-4 h-full overflow-hidden" data-v-6fa8c2fc><div class="w-[197px] flex flex-col mr-4" data-v-6fa8c2fc><div class="h-[62px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div><div class="flex-1 flex flex-col gap-1" data-v-6fa8c2fc><div class="h-[172px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px]" data-v-6fa8c2fc></div></div></div><div class="flex flex-col gap-4 flex-1" data-v-6fa8c2fc><div class="flex w-full flex-col gap-1" data-v-6fa8c2fc><div class="h-[36px] frame white:bg-gray-700 w-full border-b" data-v-6fa8c2fc></div><div class="flex items-center justify-center w-full frame white:bg-gray-700 animate-pulse aspect-[16/9]" data-v-6fa8c2fc><svg class="w-20 h-24 text-gray-400 white:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18" data-v-6fa8c2fc><path d="M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" data-v-6fa8c2fc></path></svg></div></div><div class="flex flex-col" data-v-6fa8c2fc><div class="h-[68px] frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div><div class="flex flex-row justify-between items-center" data-v-6fa8c2fc><div class="h-5 frame white:bg-gray-700 w-44 max-w-[50%]" data-v-6fa8c2fc></div><div class="h-8 frame white:bg-gray-700 w-[104px]" data-v-6fa8c2fc></div></div><div class="h-9 frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full" data-v-6fa8c2fc></div></div></div></div><span class="sr-only" data-v-6fa8c2fc>Loading...</span>',2)])])}const lMi=pi(aMi,[["render",sMi],["__scopeId","data-v-6fa8c2fc"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionSkeletonLoading.vue"]]),uMi=ct({__name:"SceneRendition",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=n,{getRenditions:i,upLoadFile:a,removeFile:o,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:c,deleteRendition:d,getRenditionDetail:h}=Zie(),{getEnvVariable:f}=my(),m=Bl(),g=M2(),b=Ng(),w=I3(),_=Yie(),{sceneData:C,currentIdRendition:v,currentSceneTabId:x}=_r(m),{renditionList:E,numberOfRendition:T}=_r(g),{commentRenditionId:O}=_r(b),{hasOpenPermission:k}=_r(w),{redirectConfig:D}=_r(_),A=q(!1),B=q(E_.LOADING),R=q(!1),$=q(),N=q(),M=q(pT),H=q(0),G=q(),ne=q(0),re=q(!1),Q=q(),U=q(),F=q(),X=q(""),ie=W(()=>{if(k.value.review)return{label:"Open Review",icon:"PenRuler",tooltip:"Open current rendition in Review"}}),pe=W(()=>{var lt;return((lt=E.value[v.value])==null?void 0:lt.attachments.map(ze=>({...ze})))??[]}),ce=W(()=>{const Je=pe.value??[];let lt=[];return lt=Je==null?void 0:Je.map(ze=>{var Rt,Jt;const Ne={type:(ze==null?void 0:ze.accept_type)||"",src:(ze==null?void 0:ze.path)??"",id:ze==null?void 0:ze.id,framePerSecond:24,poster:ze==null?void 0:ze.thumbnail,fileType:ze.mimetype||"",name:ze.name||"",fileId:ze.id||""};if((ze==null?void 0:ze.accept_type)=="video"&&(Ne.fileType=="video/quicktime"&&(Ne.fileType=""),Ne.poster=ze.thumbnail,ze!=null&&ze.metadata)){const qt=((Jt=(Rt=ze.metadata)==null?void 0:Rt.avg_frame_rate)==null?void 0:Jt.split("/"))??void 0;qt&&(Ne.framePerSecond=Number((Number(qt[0])/Number(qt[1])).toFixed(2)))}return Ne}),lt}),K=W(()=>{var Je;return((Je=E.value[v.value])==null?void 0:Je.name)??""}),Y=()=>{const Je=$.value;if(!Je||window.innerWidth>1560)return{};const lt=Je.getBoundingClientRect();return{"max-height":(window.innerHeight-lt.top-lt.height-72).toFixed(0)+"px"}},we=Je=>{Je&&(v.value=Je,E.value[Je]&&(E.value[Je].has_new_comment=0))},ue=async(Je,lt=!1)=>{var Ne,Rt,Jt,qt;const ze=await i(Je,lt?we:void 0);return ze!=null&&ze.success&&((Rt=(Ne=ze.data)==null?void 0:Ne.data)!=null&&Rt.length?(ne.value=+ze.data.meta.total,B.value=E_.SUCCESS):Object.keys(E.value).length||(B.value=E_.NO_DATA),T.value=Number(((qt=(Jt=ze==null?void 0:ze.data)==null?void 0:Jt.meta)==null?void 0:qt.total)??0)),ze},Ve=Je=>{var lt;(lt=E.value[Je])!=null&<.has_new_comment&&(E.value[Je].has_new_comment=0),Je!==v.value&&(v.value=Je,O.value=Je)},Pe=async Je=>{try{if(R.value=!0,!await d(Je))return;T.value--;const ze=Object.keys(E.value),Ne=ze[0],Rt=ze[ze.length-1];$e(Ne,Rt)}catch(lt){console.error("handleDeleteRendition",lt)}finally{R.value=!1}},$e=async(Je,lt)=>{if(!Je){B.value=E_.NO_DATA;return}ne.value--,lt&&(Q.value=lt),Re(!0)},Re=async Je=>{var lt;Je||(B.value=E_.LOADING),E.value={},await ue({page:pT,per_page:Q0}),(lt=G.value)==null||lt.reset()},Xe=async(Je=1)=>{var Ne;re.value=!0;const lt=await ue({page:Je,per_page:Q0,first_item_rendition_id:Q.value}),ze=lt==null?void 0:lt.data;H.value=Number((Ne=ze==null?void 0:ze.meta)==null?void 0:Ne.last_page),re.value=!1},rt=Je=>{var lt;return l({renditionId:v.value,renditionName:Je,description:((lt=E.value[v.value])==null?void 0:lt.description)??""})},nt=Je=>l({renditionId:v.value,renditionName:K.value,description:Je}),Le=async(Je,lt)=>{const ze=E.value[v.value],Ne=JSON.parse(JSON.stringify(E.value[v.value])),Rt={renditionId:v.value,renditionName:ze.name,description:ze.description??""},Jt=lt.replace(/^<p>|<\/p>$/g,"");if(Je===f4e.description){if(!lt){Wa().showMessage("Update failed.","error");return}Rt.renditionName=K.value,Rt.description=Jt}else Je===f4e.renditionName&&(Rt.renditionName=Jt);await l(Rt)==!0?E.value[v.value].description=Rt.description:E.value[v.value].description=String(Ne.description)},J=zf(Je=>{rt(Je)},500),fe=async Je=>{R.value=!0,await o(Je,v.value),R.value=!1},Ge=Je=>{const lt=c(void 0,Je);lt.length?u(lt):Wa().showMessage("Please select the correct file format and the same file type","error")},at=async Je=>{const lt=Je.target,ze=c(v.value,lt.files);try{if(ze.length){A.value=!0;const Ne=await a(ze),Rt=Ne.map(({name:Jt,mimetype:qt,accept_type:sn,path:$n,thumbnail:yt,type:Tt,metadata:Pt})=>({name:Jt,type:Tt,mimetype:qt,accept_type:sn,path:$n,thumbnail:yt,metadata:Pt}));if(Ne.length){const Jt={data:Rt};await s(v.value,Jt)||(Wa().showMessage("Some files are not generated thumbnail, please try again later","error"),setTimeout(()=>{h(v.value)},15e3))}}}catch(Ne){console.error(Ne)}finally{A.value=!1}},Ze=async Je=>{const lt=c(void 0,Je);lt.length?u(lt):Wa().showMessage("Please select the correct file format and the same file type","error")},it=()=>{var Je,lt,ze;console.log("Clearing temporary files",(Je=G.value)==null?void 0:Je.clearFile),(lt=G.value)==null||lt.clearFile(),(ze=F.value)==null||ze.clearFile()},ft=()=>{var Je,lt;B.value===E_.NO_DATA?(Je=F.value)==null||Je.clearFile():(lt=G.value)==null||lt.clearFile()},vt=async(Je,lt)=>{const ze=lt||1;try{if(B.value==E_.NO_DATA){let Ne=!1;T.value==1&&(Ne=!0),await ue({page:ze,per_page:Q0},Ne)}else{const Ne=await h(Je);Ne&&(E.value={[Je]:Ne,...E.value})}}catch(Ne){console.error("handleUploadSuccessNewRendition",Ne)}finally{B.value=E_.SUCCESS}},mt=Je=>{var ze,Ne,Rt;const lt=(ze=ce.value.find(Jt=>Jt.id==Je))==null?void 0:ze.src;(Ne=U.value)!=null&&Ne.selectPreviewItem&<&&((Rt=U.value)==null||Rt.selectPreviewItem(lt))},jt=Je=>{X.value=Je.state.id},yn=()=>{h(v.value)},bn=Je=>{Wa().showMessage(Je==null?void 0:Je.message,"error")},zt=Je=>{const lt=dm(),ze=Cd({type:"hub_rendition",config:{baseDomain:f("BASE_URL"),rendition_id:Je||"",scene_id:lt||"",ws_code:fc()}}).url;PQn(ze)},ln=()=>{var lt;const Je=Cd({type:"review_rendition",config:{ws_code:fc(),scene_id:dm(),rendition_id:v.value,reviewDomain:f("BASE_REVIEW_URL"),take_id:((lt=C.value)==null?void 0:lt.entity_id)||""}});window.open(Je.url,"_blank")},ae=async(Je,lt)=>{var qt,sn;const ze=((qt=ce.value.find($n=>$n.src===Je))==null?void 0:qt.name)||"",Ne=((sn=pe.value.find($n=>$n.name===ze))==null?void 0:sn.mimetype)||"",Rt=await h(v.value,!1),Jt=Rt==null?void 0:Rt.attachments.find($n=>$n.name===ze);return{src:(Jt==null?void 0:Jt.path)||"",type:Ne,name:(Jt==null?void 0:Jt.name)||""}};ut([()=>v.value,()=>x.value],()=>{x.value=="rendition"&&(O.value=v.value)},{immediate:!0,deep:!0}),ut(()=>{var Je;return(Je=D.value)==null?void 0:Je.renditionConfig},()=>{}),rV($,zf(()=>{N.value=Y()},17)),Go(async()=>{var ze,Ne,Rt;B.value=E_.LOADING;const Je=(ze=D==null?void 0:D.value)==null?void 0:ze.renditionConfig;Je&&Je.renditionId&&(M.value=Number(Je==null?void 0:Je.page)||pT);const lt=await ue({page:M.value,per_page:Q0,first_item_rendition_id:Q.value});lt!=null&<.success&&(H.value=Number((Rt=(Ne=lt.data)==null?void 0:Ne.meta)==null?void 0:Rt.last_page),v.value=(Je==null?void 0:Je.renditionId)||Object.keys(E.value)[0],r("loaded"))}),zs(()=>{O.value=void 0}),t({handleReloadPage:Re,addFiles:Je=>{Ge(Je)}});const Ae={emits:r,getRenditions:i,upLoadFile:a,removeFile:o,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:c,deleteRendition:d,getRenditionDetail:h,getEnvVariable:f,sceneStore:m,renditionStore:g,commentStore:b,permissionStore:w,commentRedirect:_,sceneData:C,currentIdRendition:v,currentSceneTabId:x,renditionList:E,numberOfRendition:T,commentRenditionId:O,hasOpenPermission:k,redirectConfig:D,isLoading:A,statusFetching:B,isDeleting:R,renditionPlayerRef:$,calculatedHeight:N,initPage:M,totalRenditionPage:H,childComponentRef:G,totalRendition:ne,loadingMoreRendition:re,lastRenditionIdpPayload:Q,arboMediaPlayerRef:U,noDataRenditionRef:F,currentItemPlay:X,openReviewBtnConfig:ie,currentRenditionFile:pe,renditionFiles:ce,renditionName:K,calculateHeight:Y,callBackSetIdActive:we,getListRendition:ue,handleChangeRendition:Ve,handleDeleteRendition:Pe,deleteRenditionSuccess:$e,handleReloadPage:Re,handleLoadMoreRendition:Xe,updateRenditionNameFnc:rt,updateRenditionDescriptionFnc:nt,handleChangeInfoRendition:Le,handleChangeName:J,handleRemoveFile:fe,addFileToNewRendition:Ge,addNewFileToSelectedRendition:at,handleFileChange:Ze,clearTemporaryFiles:it,clearFile:ft,handleUploadSuccessNewRendition:vt,handleSelectRenditionFile:mt,handleChangeItemPlay:jt,reloadRenditionItem:yn,handleVideoError:bn,handleCopyLink:zt,handleOpenInArboReview:ln,requestNewLink:ae,SceneRenditionV2:Iki,RenditionDescription:Nki,get ArboMediaPlayer(){return Rle},ModalAddRendition:RPi,RenditionFiles:jPi,RenditionList:JPi,CategoryHeader:iie,RenditionNodata:iMi,get STATUS_FETCH(){return E_},RenderSkeletonLoading:lMi};return Object.defineProperty(Ae,"__isScriptSetup",{enumerable:!1,value:!0}),Ae}}),cMi={class:"flex flex-1 justify-end-end"},dMi={class:"bg-white w-full h-full rendition-main min-h-full min-w-[637px] max-h-full"},fMi={key:0,class:"flex gap-x-[16px] px-4 pb-4 flex-1 h-[calc(100%_-_36px)] max-h-[calc(100vh_-_240px)]"},hMi={key:0,class:"rendition-media"},pMi={ref:"renditionPlayerRef",class:"rendition-preview"};function mMi(e,t,n,r,i,a){const o=ei("TessNonInteractiveChip"),s=ei("ArboTooltip");return L(),te(Vt,null,[r.statusFetching===r.STATUS_FETCH.LOADING?(L(),Ke(r.RenderSkeletonLoading,{key:0})):r.statusFetching===r.STATUS_FETCH.NO_DATA?(L(),Ke(r.RenditionNodata,{key:1,ref:"noDataRenditionRef"},null,512)):(L(),Ke(r.SceneRenditionV2,{key:2},{header:Ie(()=>[Se(r.CategoryHeader,{title:"Renditions",onRefresh:r.handleReloadPage},{default:Ie(()=>[he("div",cMi,[Se(s,{delay:[300,0],"hide-on-click":!1,content:`${String(r.numberOfRendition)} renditions`},{default:Ie(()=>[Se(o,{"component-styles":{background:"#F3F5F8"},icon:"Clapperboard",label:String(r.numberOfRendition)},null,8,["label"])]),_:1},8,["content"])])]),_:1})]),list:Ie(()=>[Se(r.RenditionList,{ref:"childComponentRef","init-page":r.initPage,class:ve(["rendition-list",`${r.statusFetching===r.STATUS_FETCH.SUCCESS?"opacity-100":"opacity-0"} `]),"total-rendition-page":r.totalRenditionPage,"rendition-list":r.renditionList,"status-fetching":r.statusFetching,"current-id-rendition":r.currentIdRendition,"loading-more-rendition":r.loadingMoreRendition,onLoadNewerRendition:r.handleLoadMoreRendition,onLoadOlderRendition:r.handleLoadMoreRendition,onHandleCreateNewRendition:r.handleFileChange,onSelectRendition:r.handleChangeRendition,onCopyLink:r.handleCopyLink,onDeleteRendition:r.handleDeleteRendition},null,8,["init-page","total-rendition-page","class","rendition-list","status-fetching","current-id-rendition","loading-more-rendition"])]),player:Ie(({height:l,width:u})=>[Se(r.ArboMediaPlayer,Qt({ref:"arboMediaPlayerRef",name:r.renditionName||"","list-items":r.renditionFiles},{openIn:r.openReviewBtnConfig},{"request-new-link":r.requestNewLink,onChangeName:r.handleChangeName,onOpenInArboReview:r.handleOpenInArboReview,onOnErrorVideo:r.reloadRenditionItem,onChange:r.handleChangeItemPlay,onOnError:r.handleVideoError,style:{"--media-player-height":l+"px","--media-player-width":u+"px",height:l+"px",width:u+"px"}}),null,16,["name","list-items","onChangeName","style"])]),files:Ie(()=>{var l,u;return[Se(r.RenditionFiles,{style:tn({...r.calculatedHeight}),description:((u=(l=r.renditionList)==null?void 0:l[r.currentIdRendition])==null?void 0:u.description)||"","is-loading":r.isLoading,"rendition-files":r.currentRenditionFile,"active-item":r.currentItemPlay,"current-id-rendition":r.currentIdRendition,"update-rendition-description-fnc":r.updateRenditionDescriptionFnc,"onUpdate:currentIdRendition":r.handleChangeRendition,onUpdateDescription:r.handleChangeInfoRendition,onAddNewFileToSelectedRendition:r.addNewFileToSelectedRendition,onHandleRemoveFile:r.handleRemoveFile,onSelectRenditionFile:r.handleSelectRenditionFile},null,8,["style","description","is-loading","rendition-files","active-item","current-id-rendition"])]}),description:Ie(({height:l})=>{var u,c;return[Se(r.RenditionDescription,{description:((c=(u=r.renditionList)==null?void 0:u[r.currentIdRendition])==null?void 0:c.description)||"","update-rendition-description-fnc":r.updateRenditionDescriptionFnc,height:l},null,8,["description","height"])]}),_:1})),dt(he("div",dMi,[he("template",null,[r.statusFetching===r.STATUS_FETCH.SUCCESS?(L(),te("div",fMi,[r.statusFetching===r.STATUS_FETCH.SUCCESS?(L(),te("div",hMi,[he("div",pMi,null,512)])):Be("v-if",!0)])):Be("v-if",!0)])],512),[[ui,!1]]),(L(),Ke(Y0,{to:"body"},[Se(r.ModalAddRendition,{onUploadSuccess:r.handleUploadSuccessNewRendition,onUploadFailed:r.clearTemporaryFiles,onClose:r.clearFile})]))],64)}const gMi=pi(uMi,[["render",mMi],["__scopeId","data-v-3734fddd"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRendition.vue"]]),vMi=ct({__name:"SceneRenditions",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=q(),i=()=>{var h;(h=r.value)==null||h.handleReloadPage()};t({addFiles:(h,f)=>{var m;(m=r.value)==null||m.addFiles(h,f)}});const a=Ng(),{currentCommentTab:o}=_r(a),s=M2(),{numberOfRendition:l}=_r(s);zq(()=>{l.value===0&&(o.value=Ko.Scene)});const u=n,d={renditionView:r,handleReload:i,commentStore:a,currentCommentTab:o,renditionStore:s,numberOfRendition:l,emits:u,handleLoaded:()=>{u("loaded")},RenditionSelect:gMi,NetworkWrapper:Kie};return Object.defineProperty(d,"__isScriptSetup",{enumerable:!1,value:!0}),d}});function yMi(e,t,n,r,i,a){return L(),Ke(r.NetworkWrapper,{type:"rendition","handle-reload":r.handleReload,"auto-reload":!0},{view:Ie(()=>[Se(r.RenditionSelect,{ref:"renditionView",onLoaded:r.handleLoaded},null,512)]),_:1})}const bMi=pi(vMi,[["render",yMi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRenditions.vue"]]),wMi={},_Mi={class:"comment-skeleton-editor"};function CMi(e,t){return L(),te("div",_Mi,[Be(" Top Toolbar "),t[0]||(t[0]=NR('<div class="toolbar" data-v-fa8089b1><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div></div>',1)),Be(" Main Content Area "),Be(" Right Side Scrollbar "),Be(" Bottom Right Send Button "),t[1]||(t[1]=he("div",{class:"send-btn skeleton-animation"},null,-1))])}const SMi=pi(wMi,[["render",CMi],["__scopeId","data-v-fa8089b1"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/comments/EditorSkeleton.vue"]]),EMi=ct({__name:"BodySkeleton",setup(e,{expose:t}){t();const n=ra,r=q(!0),i=()=>{r.value=!r.value},a=q(null);ut(r,s=>{a.value&&kt(()=>{a.value.scrollLeft=0})});const o={vTooltip:n,isSShowComments:r,toggleSidebar:i,bodySkeletonRef:a,get Icon(){return sr},get TessButton(){return pr},CommentSkeleton:Xkt,EditorSkeleton:SMi};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),xMi={"body-skeleton":"_body-skeleton_c0npo_1","comment-collapsed":"_comment-collapsed_c0npo_12","comment-sidebar":"_comment-sidebar_c0npo_35","arbo-comments":"_arbo-comments_c0npo_27","menu-section":"_menu-section_c0npo_46","main-content-section":"_main-content-section_c0npo_54","main-content":"_main-content_c0npo_54",row:"_row_c0npo_72","comment-section":"_comment-section_c0npo_86","comment-section-skeleton":"_comment-section-skeleton_c0npo_93"},TMi={class:"flex flex-col align-bottom justify-end",style:{gap:"8px"}};function kMi(e,t,n,r,i,a){return L(),te("div",{ref:"bodySkeletonRef",class:ve([e.$style["body-skeleton"],r.isSShowComments?"":e.$style["comment-collapsed"]])},[he("div",{class:ve(e.$style["menu-section"])},[ot(e.$slots,"menu",{},()=>[t[0]||(t[0]=NR('<div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div>',6))])],2),ot(e.$slots,"content",{},()=>[he("div",{class:ve(e.$style["main-content-section"])},[he("div",{class:ve(["white-bg flex flex-col",e.$style["main-content"]])},[...t[1]||(t[1]=[NR('<div class="flex-row justify-between"><div class="btn long-btn small-btn skeleton-animation"></div><div class="btn icon-btn small-btn skeleton-animation"></div></div><div class="grid-card-row"><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div></div><div class="flex-row flex-1 h-full justify-end align-bottom"><div class="card card-long skeleton-animation rounded-[0]"></div></div>',3)])],2)],2)]),he("div",{class:ve(e.$style["comment-sidebar"])},[dt((L(),Ke(r.TessButton,{variant:["icon","secondary"],onClick:r.toggleSidebar},{default:Ie(()=>[Se(r.Icon,{src:r.isSShowComments?"ChevronRight":"Comments"},null,8,["src"])]),_:1})),[[r.vTooltip,{content:r.isSShowComments?"Collapse":"Chat"}]])],2),dt(he("div",{class:ve(e.$style["comment-section"])},[ot(e.$slots,"comments",{},()=>[he("div",{class:ve(e.$style["comment-section-skeleton"])},[t[3]||(t[3]=he("div",{class:"skeleton-animation"},null,-1)),t[4]||(t[4]=he("div",{class:"flex-row justify-between"},[he("div",{class:"skeleton-animation"}),he("div",{class:"btn icon-btn skeleton-animation"})],-1)),he("div",TMi,[Se(r.CommentSkeleton),Se(r.CommentSkeleton),t[2]||(t[2]=he("div",{class:"btn small-btn skeleton-animation"},null,-1))]),Se(r.EditorSkeleton)],2)])],2),[[ui,r.isSShowComments]])],2)}const DMi=pi(EMi,[["render",kMi],["__cssModules",{$style:xMi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/layouts/BodySkeleton.vue"]]),LB="home",AMi=ct({__name:"SceneTab",props:{loading:{type:Boolean,required:!0}},setup(e,{expose:t}){t();const n=ra,r={ADD_RENDITION:"addRendition",MANAGE_RENDITION:"manageRendition",VIEW_ALL_ACTIVITIES:"viewAllActivities"},i=Bl(),{getSceneData:a}=i,{currentSceneTabId:o}=_r(i),s=q(!1),l=q(!1),u=q(),c=q(),{permission:d}=Up(),h={info:MKr,metric:_ki,rendition:bMi,log:Ati,home:fKr},f=Im(),{dashboardActionQueue:m}=_r(f),g=Ng(),b=n$(),{connectState:w,isConnect:_}=_r(b),{commentRenditionId:C,isCommentHeaderReady:v}=_r(g),x=async H=>{o.value=H,w.value.logs=_.value,w.value.rendition=_.value,w.value.metric=_.value},E=H=>{o.value=H},T=(H,G)=>{u.value.addFiles(H,G)},O=W(()=>!!(o.value==="rendition"&&d.value.createRendition)),k=(H,G)=>{var ne;l.value=!1,(ne=c.value)!=null&&ne.addFiles&&c.value.addFiles(H,G)},D=()=>{l.value=!1},A=()=>{l.value=!0},B=()=>{l.value=!1,E("rendition")};ut(o,(H,G)=>{H=="info"&&G!="info"?a():H=="rendition"&&kt(()=>{var ne;(ne=c.value)==null||ne.handleReloadPage()})}),ut(o,H=>{if(H)try{const G=new URLSearchParams(window.location.search),ne=Object.fromEntries(G.entries()),re=new URL(window.location.href);H&&H!==LB?re.searchParams.set("tab",H):re.searchParams.delete("tab"),s.value&&H!=="rendition"&&(ne.renditionId||ne.renditionPage)?(re.searchParams.delete("renditionId"),re.searchParams.delete("renditionPage")):C.value="",window.history.replaceState({},"",re.toString())}catch(G){console.error("Error updating URL parameters:",G)}}),ut(m,H=>{if(H){switch(H){case r.ADD_RENDITION:l.value=!0;break;case r.MANAGE_RENDITION:E("rendition");break;case r.VIEW_ALL_ACTIVITIES:E("log");break;default:console.warn("Unknown dashboard action:",H)}m.value=void 0}},{deep:!0});const R={HOME:{id:"home",tooltipName:"Home",icon:"House",disable:!1},RENDITION:{id:"rendition",tooltipName:"Renditions",icon:"Clapperboard"},METRIC:{id:"metric",tooltipName:"Metrics",icon:"SquareRootVariable"},INFO:{id:"info",tooltipName:"Information",icon:"Info",disable:!1},LOG:{id:"log",tooltipName:"Activity log",icon:"Book"}};Go(()=>{try{const H=new URLSearchParams(window.location.search),G=Object.fromEntries(H.entries());if(o.value||(o.value=LB),G.tab&&G.tab!==LB)if(Object.values(R).map(re=>re.id).includes(G.tab)){const re=G.tab;E(re)}else console.warn("Invalid tab parameter in URL:",G.tab),o.value=LB}catch(H){console.error("Error initializing tab from URL:",H),o.value=LB}finally{s.value=!0}});const $=e,N={tabs:Object.values(R).map(H=>({...H,name:""})),keyLabel:"name",keyTooltip:"tooltipName",keyIcon:"icon",keyContent:"content",keyValue:"id",keyDisable:"disable",position:"left",value:""},M={vTooltip:n,DASHBOARD_ACTIONS:r,DEFAULT_TAB:LB,sceneStore:i,getSceneData:a,currentSceneTabId:o,isMounted:s,isOpenNewRendition:l,commentRef:u,mainRef:c,permission:d,components:h,dashboardStore:f,dashboardActionQueue:m,commentStore:g,connectionStore:b,connectState:w,isConnect:_,commentRenditionId:C,isCommentHeaderReady:v,handleChangeTab:x,clickOnTab:E,handleAddFileComment:T,canDropRenditionFile:O,handleAddFileMain:k,handleCloseModal:D,handleCreateNewRendition:A,handleUploadFileRendition:B,TAB_CONFIG:R,props:$,tabProps:N,get TessButton(){return pr},get Icon(){return sr},DropArea:F5r,MenuTabs:U5r,Comments:TXr,AddNewRenditionModal:BXr,BodySkeleton:DMi};return Object.defineProperty(M,"__isScriptSetup",{enumerable:!1,value:!0}),M}}),OMi={key:0,class:"add-rendition-button"},IMi={class:"main-content-area"};function $Mi(e,t,n,r,i,a){const o=ei("arbo-icon");return L(),te(Vt,null,[Se(r.BodySkeleton,null,cs({_:2},[n.loading?void 0:{name:"menu",fn:Ie(()=>[Se(r.MenuTabs,{"current-tab":r.currentSceneTabId,onChange:r.handleChangeTab},null,8,["current-tab"]),r.permission.createRendition?(L(),te("div",OMi,[dt((L(),Ke(r.TessButton,{variant:["icon","primary"],onClick:r.handleCreateNewRendition},{default:Ie(()=>[Se(r.Icon,{src:"CirclePlus"})]),_:1})),[[r.vTooltip,{content:"Create rendition"}]])])):Be("v-if",!0)]),key:"0"},n.loading?void 0:{name:"content",fn:Ie(()=>[(L(),Ke(r.DropArea,{key:r.currentSceneTabId,"file-type":["video/quicktime","image/jpg","video/mp4","video/quicktime","video/mpeg","image/jpeg","image/png"],"can-drop":r.canDropRenditionFile,"size-limit":5e7,"allow-mixed-file-type":!1,"is-rendition-file":!0,"error-message":{SIZE:"File exceeds 50MB.",TYPE:"File format not supported.",DIFF:"Mixed file formats are not supported."},onAddFile:r.handleAddFileMain},{icon:Ie(()=>[Se(o,{name:"Upload",size:"84px",class:"icon"})]),text:Ie(()=>[...t[1]||(t[1]=[Mt("Drop review file here to create a new rendition.",-1)])]),main:Ie(()=>[he("div",IMi,[r.currentSceneTabId!=null?(L(),Ke(H8t,{key:0},[(L(),Ke(Lf(r.components[r.currentSceneTabId]),{ref:"mainRef",onLoaded:t[0]||(t[0]=s=>r.isCommentHeaderReady=!0)},null,544))],1024)):Be("v-if",!0)])]),_:1},8,["can-drop"]))]),key:"1"},n.loading?void 0:{name:"comments",fn:Ie(()=>[r.isCommentHeaderReady?(L(),Ke(r.Comments,{key:0,ref:"commentRef"},null,512)):Be("v-if",!0)]),key:"2"}]),1024),(L(),Ke(Y0,{to:"body"},[Se(r.AddNewRenditionModal,Qt({opened:r.isOpenNewRendition},{onClose:r.handleCloseModal,onUpload:r.handleUploadFileRendition}),null,16)]))],64)}const RMi=pi(AMi,[["render",$Mi],["__scopeId","data-v-3900bb7c"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-tab/SceneTab.vue"]]),PMi=ct({__name:"ShareSnackBar",setup(e,{expose:t}){t();const n=Wa(),{notifications:r}=_r(n),i=W(()=>[...r.value]),a=f=>f.trim().startsWith("<svg"),o=q("Copy"),s=()=>{setTimeout(()=>{o.value="Copy"},3e3)},l=f=>{navigator.clipboard.writeText(f).then(()=>{o.value="Copied",s()},()=>{o.value="Copy failed",s()})},u=q(new Set),h={notificationStore:n,notifications:r,showNotifications:i,isSvgString:a,tooltip:o,resetTooltip:s,handleCopyError:l,hoveredNotifications:u,onMouseEnter:f=>{var m;u.value.add(f),(m=n.pauseAutoDismiss)==null||m.call(n,f)},onMouseLeave:f=>{var m;u.value.delete(f),(m=n.resumeAutoDismiss)==null||m.call(n,f)},get Button(){return fi},get Icon(){return Ca}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),MMi={"notification-wrapper":"_notification-wrapper_r53ju_1","notification-item":"_notification-item_r53ju_15","notification--success":"_notification--success_r53ju_30","notification--error":"_notification--error_r53ju_36","close-btn":"_close-btn_r53ju_42","notification--info":"_notification--info_r53ju_45","notification--warning":"_notification--warning_r53ju_52","notification--interactive":"_notification--interactive_r53ju_59","snackbar-type":"_snackbar-type_r53ju_67",snackbar__message:"_snackbar__message_r53ju_76",message:"_message_r53ju_89","error-message":"_error-message_r53ju_97",snackbar__icon:"_snackbar__icon_r53ju_103","actions-notification":"_actions-notification_r53ju_112","icon-draw":"_icon-draw_r53ju_120","copy-btn":"_copy-btn_r53ju_128","arbo__icon-btn":"_arbo__icon-btn_r53ju_137"},NMi=["onMouseenter","onMouseleave"],FMi=["innerHTML"],LMi=["innerHTML"];function BMi(e,t,n,r,i,a){const o=Va("contrast");return L(),Ke(yce,{name:"list",tag:"div",class:ve(["notification-center",e.$style["notification-wrapper"]])},{default:Ie(()=>[(L(!0),te(Vt,null,pn(r.showNotifications,s=>{var l;return dt((L(),te("div",{key:s.id,class:ve([e.$style["notification-item"],e.$style[`notification--${s.type||"info"}`],!(s!=null&&s.actions)||((l=s==null?void 0:s.actions)==null?void 0:l.length)==0?e.$style["snackbar-type"]:""]),onMouseenter:u=>r.onMouseEnter(s.id),onMouseleave:u=>r.onMouseLeave(s.id)},[he("p",{class:ve(e.$style.snackbar__message)},[he("span",{class:ve(e.$style.snackbar__icon)},[!s.icon&&s.type=="success"?(L(),Ke(r.Icon,{key:0,name:"CircleCheck"})):Be("v-if",!0),!s.icon&&s.type=="interactive"?(L(),Ke(r.Icon,{key:1,name:"CircleCheck"})):!s.icon&&s.type=="error"?(L(),Ke(r.Icon,{key:2,name:"CircleXMark"})):!s.icon&&s.type=="info"?(L(),Ke(r.Icon,{key:3,name:"Info"})):s.icon&&r.isSvgString(s.icon)?(L(),te("i",{key:4,class:ve(e.$style["icon-draw"]),innerHTML:s.icon},null,10,FMi)):s.icon&&!r.isSvgString(s.icon)?(L(),Ke(r.Icon,{key:5,src:s.icon,color:"var(--primary-color)"},null,8,["src"])):Be("v-if",!0)],2),he("span",{class:ve(e.$style["error-message"])},[he("span",{class:ve(e.$style.message),innerHTML:s.message},null,10,LMi)],2)],2),s.type!=="interactive"?(L(),Ke(r.Button,{key:0,type:"secondary",class:ve([e.$style["copy-btn"],"copy-snackbar-btn"]),"prefix-icon":"Copy","prefix-tooltip":r.tooltip,label:"",size:"24",style:{minWidth:"24px",width:"24px",height:"24px",padding:"0"},onClick:u=>r.handleCopyError(s.message)},null,8,["class","prefix-tooltip","onClick"])):Be("v-if",!0)],42,NMi)),[[o]])}),128))]),_:1},8,["class"])}const VMi=pi(PMi,[["render",BMi],["__cssModules",{$style:MMi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/snackbar/ShareSnackBar.vue"]]),UMi=ct({__name:"PopupLayout",props:{popupName:{type:String,required:!0},showOverlay:{type:Boolean,required:!1,default:!0},overlayOpacity:{type:Number,required:!1,default:.5},closeOnOverlayClick:{type:Boolean,required:!1,default:!0},closeOnEscape:{type:Boolean,required:!1,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const r=e,{popupRef:i,show:a,hide:o,isVisible:s}=Cdt({useTrigger:!1,arrow:!1,centered:!0,showOverlay:r.showOverlay,overlayOpacity:r.overlayOpacity,closeOnOverlayClick:r.closeOnOverlayClick,appendTo:()=>document.body}),l=d=>{r.closeOnEscape&&d.key==="Escape"&&s.value&&o()};dn(()=>{document.addEventListener("keydown",l)}),Kr(()=>{document.removeEventListener("keydown",l)}),t({show:a,hide:o,isVisible:s});const u=n;ut(()=>s.value,d=>{u(d?"shown":"hidden")});const c={props:r,popupRef:i,show:a,hide:o,isVisible:s,handleEscape:l,emits:u,get TessButton(){return pr},get Icon(){return sr}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),jMi={popupContainer:"_popupContainer_1ha71_1",popupWrapper:"_popupWrapper_1ha71_5",popupFadeIn:"_popupFadeIn_1ha71_1",header:"_header_1ha71_18","header-title":"_header-title_1ha71_32",body:"_body_1ha71_42",footer:"_footer_1ha71_51"},HMi={style:{display:"flex","align-items":"center",gap:"20px"}};function zMi(e,t,n,r,i,a){const o=Va("tooltip");return L(),te("div",{ref:"popupRef",class:ve(e.$style.popupContainer)},[he("div",{class:ve(e.$style.popupWrapper)},[he("div",{class:ve(e.$style.header)},[he("span",{class:ve(e.$style["header-title"])},[ot(e.$slots,"header",{},()=>[Mt(wt(n.popupName),1)])],2),he("div",HMi,[ot(e.$slots,"actions"),dt((L(),Ke(r.TessButton,{variant:["icon","tertiary"],size:"small",onClick:r.hide,"aria-label":"Close popup"},{default:Ie(()=>[Se(r.Icon,{src:"Xmark",size:"9",color:"#6B6B6B"})]),_:1},8,["onClick"])),[[o,"Close"]])])],2),he("div",{class:ve(e.$style.body)},[ot(e.$slots,"default")],2),Be(` <div :class="$style['footer']">
|
|
1279
1265
|
<slot name="footer"></slot>
|
|
1280
1266
|
</div> `)],2)],2)}const WMi=pi(UMi,[["render",zMi],["__cssModules",{$style:jMi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/layouts/PopupLayout.vue"]]);var _6t=(e=>(e.LOADING="LOADING",e.LOADED="LOADED",e.ERROR="ERROR",e))(_6t||{});const C6t=3,qMi=ct({__name:"PreviewMediaModal",emits:["close"],setup(e,{expose:t,emit:n}){t();const r=ra,i=n,a=Ng(),{getCommnetAuthor:o}=a,{refreshCommentDetail:s}=I2e(),l=Wa(),u=q(null),c=q(null),d=q("LOADING"),h=q(null),f=q(null),m=q(0),g=q(void 0),b=q(void 0),w=q(""),_=W(()=>c.value!==null),C=W(()=>{var F;return((F=c.value)==null?void 0:F.name)??""}),v=W(()=>C.value||"Preview Media"),x=W(()=>({loading:d.value==="LOADING",error:d.value==="ERROR",loaded:d.value==="LOADED"})),E=W(()=>{var F,X,ie,pe,ce;return{type:T((F=c.value)==null?void 0:F.type),src:((X=c.value)==null?void 0:X.url)??"",poster:((ie=c.value)==null?void 0:ie.thumbnail)??"",framePerSecond:24,fileType:((pe=c.value)==null?void 0:pe.fileType)||"",name:((ce=c.value)==null?void 0:ce.name)??""}});ut(_,F=>{var X;F?(X=u.value)==null||X.show():D()});const T=F=>{const X=(F||"").toLowerCase();return X.includes("image")?"image":X.includes("pdf")?"pdf":"video"},O=W(()=>{var F;return"Uploaded by "+(((F=g.value)==null?void 0:F.name)||"Unknown")+(b.value?" on "+b.value:"")}),k=F=>{if(!F||typeof F!="string")return!1;const X=F.toLowerCase();return X.includes("/")?X.startsWith("video/")||X.startsWith("image/")||X==="application/pdf":nde.includes(X)},D=()=>{c.value=null,d.value="LOADING",h.value=null,m.value=0,i("close")},A=async()=>{var pe,ce,K,Y;const F=await s(w.value),X=(pe=F==null?void 0:F.attachments)==null?void 0:pe.find(we=>{var ue;return we.name===((ue=c.value)==null?void 0:ue.name)});return T((ce=c.value)==null?void 0:ce.type)==="pdf"&&c.value&&X?(c.value.url=String(X.path),c.value.thumbnail="",""):{src:(X==null?void 0:X.path)||"",type:((K=c.value)==null?void 0:K.fileType)||"",name:((Y=c.value)==null?void 0:Y.name)||""}},B=async(F,X)=>{if(!F||!X){l.showMessage("Invalid file information for download","error");return}try{const ie=await fetch(X);if(!ie.ok)throw new Error(`Network response was not ok: ${ie.status} ${ie.statusText}`);const pe=await ie.blob(),ce=URL.createObjectURL(pe),K=document.createElement("a");K.href=ce,K.download=F,K.click(),URL.revokeObjectURL(ce),l.showMessage("Download started","success")}catch(ie){mr(ie,"downloadFile");const pe=ie instanceof TypeError?"Failed to download file (possible CORS restriction)":"Failed to download file";l.showMessage(pe,"error")}},R=async F=>{var X;try{if(console.log("Received broadcast message:",F),!k(F.mimeType)){B(F.name,((X=F.data)==null?void 0:X.url)||F.url);return}const ie=T(F.mimeType);console.log("Previewing file:",F.name,"of type:",ie),d.value="LOADING",h.value=null,w.value=F.commentId,c.value={name:F.name,url:ie==="image"?F.data.thumbnail:F.data.path,type:ie,thumbnail:F.data.thumbnail,fileType:F.mimeType=="video/quicktime"?"":F.mimeType};const pe=`${F.commentId}_${F.name}`,ce=await o(pe);g.value=ce==null?void 0:ce.user,b.value=Hv(ce==null?void 0:ce.created_on),d.value="LOADED"}catch(ie){mr(ie,"handleBroadcastMessage"),h.value="Failed to process file data",d.value="ERROR"}},$=()=>{try{if(typeof window>"u"||typeof BroadcastChannel>"u")return;const F=document.querySelector("main[id]"),X=F==null?void 0:F.getAttribute("id");if(!X)return;f.value=new BroadcastChannel(`file-upload-channel-${X}`),f.value.onmessage=async ie=>{try{await R(ie.data)}catch(pe){mr(pe,"onmessage")}},f.value.onmessageerror=ie=>{mr(ie,"BroadcastChannel message error"),h.value="Failed to receive message from communication channel",d.value="ERROR"}}catch(F){mr(F,"setupBroadcastChannel"),h.value="Failed to setup communication channel",d.value="ERROR"}},N=()=>{if(f.value){try{f.value.close()}catch(F){mr(F,"cleanupBroadcastChannel")}f.value=null}},M=()=>{if(m.value>=C6t){l.showMessage("Maximum retry attempts reached","error");return}m.value++,d.value="LOADING",h.value=null,N(),$()},H=(F="media-player")=>{const ie=window.innerWidth,pe=window.innerHeight,ce=16/9;let K=ie*.75,Y=pe*.75;return K<Y*ce?Y=Number(Number(K/ce).toFixed(0)):Y<K/ce&&(K=Number(Number(Y*ce).toFixed(0))),{[`--${F}--width`]:`${K}px`,[`--${F}--height`]:`${Y}px`}},G=q({"--media-player--width":"0px","--media-player--height":"0px"}),ne=()=>{G.value=H("media-player")},re=q({"--modal--width":"0px","--modal--height":"0px"}),Q=()=>{const[F,X]=[Number(G.value["--media-player--width"].replace("px","")),Number(G.value["--media-player--height"].replace("px",""))];return{"--modal--width":`${F+56}px`,"--modal--height":`${X+68+12+28}px`}};ut(G,F=>{re.value=Q()},{immediate:!0,deep:!0}),dn(()=>{$(),ne(),window.addEventListener("resize",ne)}),zs(()=>{N(),window.removeEventListener("resize",ne)});const U={vTooltip:r,LoadingState:_6t,emit:i,commentStore:a,getCommnetAuthor:o,refreshCommentDetail:s,notificationStore:l,popupRef:u,previewDetails:c,loading:d,errorDetails:h,broadcastChannel:f,retryCount:m,maxRetries:C6t,author:g,createdOn:b,parentId:w,opened:_,fileName:C,displayFileName:v,showState:x,resourceURL:E,convertType:T,authorString:O,isPreviewable:k,handleCloseModal:D,requestNewLink:A,downloadFile:B,handleBroadcastMessage:R,setupBroadcastChannel:$,cleanupBroadcastChannel:N,retryLoad:M,dimensionEstimation:H,mediaDimensions:G,updateModalWidth:ne,modalDimensions:re,calculateModalDimension:Q,get TessButton(){return pr},get ArboMediaPlayer(){return Rle},PopupLayout:WMi};return Object.defineProperty(U,"__isScriptSetup",{enumerable:!1,value:!0}),U}}),GMi={class:"header-tilte"},KMi={style:{"max-width":"calc(-180px + 60vw)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"inline-block"}},YMi={key:0,style:{"font-size":"12px",color:"#6b6b6b","max-width":"calc(-180px + 60vw)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"inline-block"}},ZMi={ref:"innerContent",class:"arbo-preview-media-modal"},XMi={key:0,class:"arbo-preview-media-modal__loading"},JMi={class:"arbo-preview-media-modal__error"};function QMi(e,t,n,r,i,a){const o=ei("Icon");return L(),Ke(r.PopupLayout,{ref:"popupRef","popup-name":r.displayFileName,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,class:"media-preview-v1",style:tn({width:"var(--modal--width)",height:"var(--modal--height)",aspectRatio:"16/9",...r.modalDimensions}),onHidden:r.handleCloseModal},{header:Ie(()=>[he("div",GMi,[dt((L(),te("span",KMi,[Mt(wt(r.displayFileName),1)])),[[r.vTooltip,{content:r.displayFileName,delay:[1e3,0]}]]),r.author||r.createdOn?dt((L(),te("span",YMi,[Mt(wt(r.authorString),1)])),[[r.vTooltip,{content:r.authorString,delay:[1e3,0]}]]):Be("v-if",!0)])]),actions:Ie(()=>[dt((L(),Ke(r.TessButton,{variant:"secondary","aria-label":"Download file",onClick:t[0]||(t[0]=s=>r.downloadFile(r.fileName,r.resourceURL.src))},{prefix:Ie(()=>[Se(o,{src:"Download"})]),default:Ie(()=>[t[1]||(t[1]=he("span",{style:{"margin-right":"4px"}},null,-1)),t[2]||(t[2]=Mt(" Download ",-1))]),_:1})),[[r.vTooltip,"Download"]])]),default:Ie(()=>[he("div",ZMi,[Be(" Loading State "),r.showState.loading?(L(),te("div",XMi,[...t[3]||(t[3]=[he("div",{class:"skeleton arbo-preview-media-modal__skeleton"},null,-1)])])):r.showState.error?(L(),te(Vt,{key:1},[Be(" Error State "),he("div",JMi,[t[5]||(t[5]=he("span",{class:"arbo-preview-media-modal__error-title"}," The media could not be loaded ",-1)),t[6]||(t[6]=he("span",{class:"arbo-preview-media-modal__error-hint"}," Either the server or network failed, or the format is not supported. ",-1)),Se(r.TessButton,{variant:"secondary",onClick:r.retryLoad},{default:Ie(()=>[...t[4]||(t[4]=[Mt(" Retry ",-1)])]),_:1})])],2112)):r.showState.loaded?(L(),te(Vt,{key:2},[Be(" Loaded State "),Se(r.ArboMediaPlayer,Qt({style:r.mediaDimensions},{listItems:[r.resourceURL],isReviewFile:!1,name:r.fileName,type:r.resourceURL.type,requestNewLink:r.requestNewLink}),null,16,["style"])],2112)):Be("v-if",!0),Be(` <pre
|
|
1281
1267
|
style="
|