@arbocollab/arbo-web-people 0.1.85-alpha.5 → 0.1.85-alpha.7

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/cjs/index.cjs.js CHANGED
@@ -205,7 +205,7 @@ var Bue;function Yt(){return Bue.apply(null,arguments)}function MHe(t){Bue=t}fun
205
205
  [`+a+"] ";for(o in arguments[0])Ir(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}Wue(t+`
206
206
  Arguments: `+Array.prototype.slice.call(r).join("")+`
207
207
  `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var Iq={};function zue(t,e){Yt.deprecationHandler!=null&&Yt.deprecationHandler(t,e),Iq[t]||(Wue(e),Iq[t]=!0)}Yt.suppressDeprecationWarnings=!1;Yt.deprecationHandler=null;function $d(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function $He(t){var e,n;for(n in t)Ir(t,n)&&(e=t[n],$d(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function e5(t,e){var n=Sp({},t),r;for(r in e)Ir(e,r)&&(Iv(t[r])&&Iv(e[r])?(n[r]={},Sp(n[r],t[r]),Sp(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Ir(t,r)&&!Ir(e,r)&&Iv(t[r])&&(n[r]=Sp({},n[r]));return n}function vW(t){t!=null&&this.set(t)}var t5;Object.keys?t5=Object.keys:t5=function(t){var e,n=[];for(e in t)Ir(t,e)&&n.push(e);return n};var PHe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function LHe(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return $d(r)?r.call(e,n):r}function Od(t,e,n){var r=""+Math.abs(t),i=e-r.length,a=t>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var yW=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,lE=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,NN={},Cb={};function In(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(Cb[t]=i),e&&(Cb[e[0]]=function(){return Od(i.apply(this,arguments),e[1],e[2])}),n&&(Cb[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function NHe(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function FHe(t){var e=t.match(yW),n,r;for(n=0,r=e.length;n<r;n++)Cb[e[n]]?e[n]=Cb[e[n]]:e[n]=NHe(e[n]);return function(i){var a="",o;for(o=0;o<r;o++)a+=$d(e[o])?e[o].call(i,t):e[o];return a}}function zT(t,e){return t.isValid()?(e=jue(e,t.localeData()),NN[e]=NN[e]||FHe(e),NN[e](t)):t.localeData().invalidDate()}function jue(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(lE.lastIndex=0;n>=0&&lE.test(t);)t=t.replace(lE,r),lE.lastIndex=0,n-=1;return t}var VHe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function BHe(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(yW).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var UHe="Invalid date";function WHe(){return this._invalidDate}var zHe="%d",jHe=/\d{1,2}/;function HHe(t){return this._ordinal.replace("%d",t)}var YHe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function qHe(t,e,n,r){var i=this._relativeTime[n];return $d(i)?i(t,e,n,r):i.replace(/%d/i,t)}function KHe(t,e){var n=this._relativeTime[t>0?"future":"past"];return $d(n)?n(e):n.replace(/%s/i,e)}var Mq={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function gu(t){return typeof t=="string"?Mq[t]||Mq[t.toLowerCase()]:void 0}function bW(t){var e={},n,r;for(r in t)Ir(t,r)&&(n=gu(r),n&&(e[n]=t[r]));return e}var GHe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ZHe(t){var e=[],n;for(n in t)Ir(t,n)&&e.push({unit:n,priority:GHe[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var Hue=/\d/,Tl=/\d\d/,Yue=/\d{3}/,_W=/\d{4}/,qC=/[+-]?\d{6}/,$i=/\d\d?/,que=/\d\d\d\d?/,Kue=/\d\d\d\d\d\d?/,KC=/\d{1,3}/,wW=/\d{1,4}/,GC=/[+-]?\d{1,6}/,j_=/\d+/,ZC=/[+-]?\d+/,QHe=/Z|[+-]\d\d:?\d\d/gi,QC=/Z|[+-]\d\d(?::?\d\d)?/gi,XHe=/[+-]?\d+(\.\d{1,3})?/,XA=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,H_=/^[1-9]\d?/,xW=/^([1-9]\d|\d)/,hO;hO={};function sn(t,e,n){hO[t]=$d(e)?e:function(r,i){return r&&n?n:e}}function JHe(t,e){return Ir(hO,t)?hO[t](e._strict,e._locale):new RegExp(e9e(t))}function e9e(t){return ph(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,a){return n||r||i||a}))}function ph(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Kl(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function gr(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Kl(e)),n}var n5={};function ii(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),Sh(e)&&(r=function(a,o){o[e]=gr(a)}),i=t.length,n=0;n<i;n++)n5[t[n]]=r}function JA(t,e){ii(t,function(n,r,i,a){i._w=i._w||{},e(n,i._w,i,a)})}function t9e(t,e,n){e!=null&&Ir(n5,t)&&n5[t](e,n._a,n,t)}function XC(t){return t%4===0&&t%100!==0||t%400===0}var ns=0,sh=1,od=2,Ka=3,uc=4,lh=5,dv=6,n9e=7,r9e=8;In("Y",0,0,function(){var t=this.year();return t<=9999?Od(t,4):"+"+t});In(0,["YY",2],0,function(){return this.year()%100});In(0,["YYYY",4],0,"year");In(0,["YYYYY",5],0,"year");In(0,["YYYYYY",6,!0],0,"year");sn("Y",ZC);sn("YY",$i,Tl);sn("YYYY",wW,_W);sn("YYYYY",GC,qC);sn("YYYYYY",GC,qC);ii(["YYYYY","YYYYYY"],ns);ii("YYYY",function(t,e){e[ns]=t.length===2?Yt.parseTwoDigitYear(t):gr(t)});ii("YY",function(t,e){e[ns]=Yt.parseTwoDigitYear(t)});ii("Y",function(t,e){e[ns]=parseInt(t,10)});function qx(t){return XC(t)?366:365}Yt.parseTwoDigitYear=function(t){return gr(t)+(gr(t)>68?1900:2e3)};var Gue=Y_("FullYear",!0);function i9e(){return XC(this.year())}function Y_(t,e){return function(n){return n!=null?(Zue(this,t,n),Yt.updateOffset(this,e),this):WS(this,t)}}function WS(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Zue(t,e,n){var r,i,a,o,s;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,o=t.month(),s=t.date(),s=s===29&&o===1&&!XC(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function a9e(t){return t=gu(t),$d(this[t])?this[t]():this}function o9e(t,e){if(typeof t=="object"){t=bW(t);var n=ZHe(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=gu(t),$d(this[t]))return this[t](e);return this}function s9e(t,e){return(t%e+e)%e}var ya;Array.prototype.indexOf?ya=Array.prototype.indexOf:ya=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function SW(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=s9e(e,12);return t+=(e-n)/12,n===1?XC(t)?29:28:31-n%7%2}In("M",["MM",2],"Mo",function(){return this.month()+1});In("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});In("MMMM",0,0,function(t){return this.localeData().months(this,t)});sn("M",$i,H_);sn("MM",$i,Tl);sn("MMM",function(t,e){return e.monthsShortRegex(t)});sn("MMMM",function(t,e){return e.monthsRegex(t)});ii(["M","MM"],function(t,e){e[sh]=gr(t)-1});ii(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[sh]=i:ar(n).invalidMonth=t});var l9e="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Que="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Xue=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,u9e=XA,c9e=XA;function d9e(t,e){return t?Ac(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Xue).test(e)?"format":"standalone"][t.month()]:Ac(this._months)?this._months:this._months.standalone}function f9e(t,e){return t?Ac(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Xue.test(e)?"format":"standalone"][t.month()]:Ac(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function h9e(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=Rd([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?e==="MMM"?(i=ya.call(this._shortMonthsParse,o),i!==-1?i:null):(i=ya.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=ya.call(this._shortMonthsParse,o),i!==-1?i:(i=ya.call(this._longMonthsParse,o),i!==-1?i:null)):(i=ya.call(this._longMonthsParse,o),i!==-1?i:(i=ya.call(this._shortMonthsParse,o),i!==-1?i:null))}function p9e(t,e,n){var r,i,a;if(this._monthsParseExact)return h9e.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Rd([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function Jue(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=gr(e);else if(e=t.localeData().monthsParse(e),!Sh(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,SW(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function ece(t){return t!=null?(Jue(this,t),Yt.updateOffset(this,!0),this):WS(this,"Month")}function m9e(){return SW(this.year(),this.month())}function g9e(t){return this._monthsParseExact?(Ir(this,"_monthsRegex")||tce.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Ir(this,"_monthsShortRegex")||(this._monthsShortRegex=u9e),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function v9e(t){return this._monthsParseExact?(Ir(this,"_monthsRegex")||tce.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Ir(this,"_monthsRegex")||(this._monthsRegex=c9e),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function tce(){function t(l,c){return c.length-l.length}var e=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=Rd([2e3,i]),o=ph(this.monthsShort(a,"")),s=ph(this.months(a,"")),e.push(o),n.push(s),r.push(s),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function y9e(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}function zS(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function pO(t,e,n){var r=7+e-n,i=(7+zS(t,0,r).getUTCDay()-e)%7;return-i+r-1}function nce(t,e,n,r,i){var a=(7+n-r)%7,o=pO(t,r,i),s=1+7*(e-1)+a+o,l,c;return s<=0?(l=t-1,c=qx(l)+s):s>qx(t)?(l=t+1,c=s-qx(t)):(l=t,c=s),{year:l,dayOfYear:c}}function jS(t,e,n){var r=pO(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=t.year()-1,a=i+mh(o,e,n)):i>mh(t.year(),e,n)?(a=i-mh(t.year(),e,n),o=t.year()+1):(o=t.year(),a=i),{week:a,year:o}}function mh(t,e,n){var r=pO(t,e,n),i=pO(t+1,e,n);return(qx(t)-r+i)/7}In("w",["ww",2],"wo","week");In("W",["WW",2],"Wo","isoWeek");sn("w",$i,H_);sn("ww",$i,Tl);sn("W",$i,H_);sn("WW",$i,Tl);JA(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=gr(t)});function b9e(t){return jS(t,this._week.dow,this._week.doy).week}var _9e={dow:0,doy:6};function w9e(){return this._week.dow}function x9e(){return this._week.doy}function S9e(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function A9e(t){var e=jS(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}In("d",0,"do","day");In("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});In("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});In("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});In("e",0,0,"weekday");In("E",0,0,"isoWeekday");sn("d",$i);sn("e",$i);sn("E",$i);sn("dd",function(t,e){return e.weekdaysMinRegex(t)});sn("ddd",function(t,e){return e.weekdaysShortRegex(t)});sn("dddd",function(t,e){return e.weekdaysRegex(t)});JA(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:ar(n).invalidWeekday=t});JA(["d","e","E"],function(t,e,n,r){e[r]=gr(t)});function k9e(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function E9e(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function AW(t,e){return t.slice(e,7).concat(t.slice(0,e))}var T9e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rce="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),D9e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),O9e=XA,C9e=XA,I9e=XA;function M9e(t,e){var n=Ac(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?AW(n,this._week.dow):t?n[t.day()]:n}function R9e(t){return t===!0?AW(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function $9e(t){return t===!0?AW(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function P9e(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Rd([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?e==="dddd"?(i=ya.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=ya.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=ya.call(this._weekdaysParse,o),i!==-1||(i=ya.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=ya.call(this._shortWeekdaysParse,o),i!==-1||(i=ya.call(this._weekdaysParse,o),i!==-1)?i:(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=ya.call(this._minWeekdaysParse,o),i!==-1||(i=ya.call(this._weekdaysParse,o),i!==-1)?i:(i=ya.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function L9e(t,e,n){var r,i,a;if(this._weekdaysParseExact)return P9e.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Rd([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function N9e(t){if(!this.isValid())return t!=null?this:NaN;var e=WS(this,"Day");return t!=null?(t=k9e(t,this.localeData()),this.add(t-e,"d")):e}function F9e(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function V9e(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=E9e(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function B9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Ir(this,"_weekdaysRegex")||(this._weekdaysRegex=O9e),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function U9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ir(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=C9e),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function W9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ir(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=I9e),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kW(){function t(f,h){return h.length-f.length}var e=[],n=[],r=[],i=[],a,o,s,l,c;for(a=0;a<7;a++)o=Rd([2e3,1]).day(a),s=ph(this.weekdaysMin(o,"")),l=ph(this.weekdaysShort(o,"")),c=ph(this.weekdays(o,"")),e.push(s),n.push(l),r.push(c),i.push(s),i.push(l),i.push(c);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function EW(){return this.hours()%12||12}function z9e(){return this.hours()||24}In("H",["HH",2],0,"hour");In("h",["hh",2],0,EW);In("k",["kk",2],0,z9e);In("hmm",0,0,function(){return""+EW.apply(this)+Od(this.minutes(),2)});In("hmmss",0,0,function(){return""+EW.apply(this)+Od(this.minutes(),2)+Od(this.seconds(),2)});In("Hmm",0,0,function(){return""+this.hours()+Od(this.minutes(),2)});In("Hmmss",0,0,function(){return""+this.hours()+Od(this.minutes(),2)+Od(this.seconds(),2)});function ice(t,e){In(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}ice("a",!0);ice("A",!1);function ace(t,e){return e._meridiemParse}sn("a",ace);sn("A",ace);sn("H",$i,xW);sn("h",$i,H_);sn("k",$i,H_);sn("HH",$i,Tl);sn("hh",$i,Tl);sn("kk",$i,Tl);sn("hmm",que);sn("hmmss",Kue);sn("Hmm",que);sn("Hmmss",Kue);ii(["H","HH"],Ka);ii(["k","kk"],function(t,e,n){var r=gr(t);e[Ka]=r===24?0:r});ii(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});ii(["h","hh"],function(t,e,n){e[Ka]=gr(t),ar(n).bigHour=!0});ii("hmm",function(t,e,n){var r=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r)),ar(n).bigHour=!0});ii("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r,2)),e[lh]=gr(t.substr(i)),ar(n).bigHour=!0});ii("Hmm",function(t,e,n){var r=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r))});ii("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r,2)),e[lh]=gr(t.substr(i))});function j9e(t){return(t+"").toLowerCase().charAt(0)==="p"}var H9e=/[ap]\.?m?\.?/i,Y9e=Y_("Hours",!0);function q9e(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var oce={calendar:PHe,longDateFormat:VHe,invalidDate:UHe,ordinal:zHe,dayOfMonthOrdinalParse:jHe,relativeTime:YHe,months:l9e,monthsShort:Que,week:_9e,weekdays:T9e,weekdaysMin:D9e,weekdaysShort:rce,meridiemParse:H9e},Vi={},D1={},HS;function K9e(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function Rq(t){return t&&t.toLowerCase().replace("_","-")}function G9e(t){for(var e=0,n,r,i,a;e<t.length;){for(a=Rq(t[e]).split("-"),n=a.length,r=Rq(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=JC(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&K9e(a,r)>=n-1)break;n--}e++}return HS}function Z9e(t){return!!(t&&t.match("^[^/\\\\]*$"))}function JC(t){var e=null,n;if(Vi[t]===void 0&&typeof module<"u"&&module&&module.exports&&Z9e(t))try{e=HS._abbr,n=require,n("./locale/"+t),Np(e)}catch{Vi[t]=null}return Vi[t]}function Np(t,e){var n;return t&&($s(e)?n=Dh(t):n=TW(t,e),n?HS=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),HS._abbr}function TW(t,e){if(e!==null){var n,r=oce;if(e.abbr=t,Vi[t]!=null)zue("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Vi[t]._config;else if(e.parentLocale!=null)if(Vi[e.parentLocale]!=null)r=Vi[e.parentLocale]._config;else if(n=JC(e.parentLocale),n!=null)r=n._config;else return D1[e.parentLocale]||(D1[e.parentLocale]=[]),D1[e.parentLocale].push({name:t,config:e}),null;return Vi[t]=new vW(e5(r,e)),D1[t]&&D1[t].forEach(function(i){TW(i.name,i.config)}),Np(t),Vi[t]}else return delete Vi[t],null}function Q9e(t,e){if(e!=null){var n,r,i=oce;Vi[t]!=null&&Vi[t].parentLocale!=null?Vi[t].set(e5(Vi[t]._config,e)):(r=JC(t),r!=null&&(i=r._config),e=e5(i,e),r==null&&(e.abbr=t),n=new vW(e),n.parentLocale=Vi[t],Vi[t]=n),Np(t)}else Vi[t]!=null&&(Vi[t].parentLocale!=null?(Vi[t]=Vi[t].parentLocale,t===Np()&&Np(t)):Vi[t]!=null&&delete Vi[t]);return Vi[t]}function Dh(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return HS;if(!Ac(t)){if(e=JC(t),e)return e;t=[t]}return G9e(t)}function X9e(){return t5(Vi)}function DW(t){var e,n=t._a;return n&&ar(t).overflow===-2&&(e=n[sh]<0||n[sh]>11?sh:n[od]<1||n[od]>SW(n[ns],n[sh])?od:n[Ka]<0||n[Ka]>24||n[Ka]===24&&(n[uc]!==0||n[lh]!==0||n[dv]!==0)?Ka:n[uc]<0||n[uc]>59?uc:n[lh]<0||n[lh]>59?lh:n[dv]<0||n[dv]>999?dv:-1,ar(t)._overflowDayOfYear&&(e<ns||e>od)&&(e=od),ar(t)._overflowWeeks&&e===-1&&(e=n9e),ar(t)._overflowWeekday&&e===-1&&(e=r9e),ar(t).overflow=e),t}var J9e=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,eYe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tYe=/Z|[+-]\d\d(?::?\d\d)?/,uE=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],FN=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],nYe=/^\/?Date\((-?\d+)/i,rYe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,iYe={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function sce(t){var e,n,r=t._i,i=J9e.exec(r)||eYe.exec(r),a,o,s,l,c=uE.length,f=FN.length;if(i){for(ar(t).iso=!0,e=0,n=c;e<n;e++)if(uE[e][1].exec(i[1])){o=uE[e][0],a=uE[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=f;e<n;e++)if(FN[e][1].exec(i[3])){s=(i[2]||" ")+FN[e][0];break}if(s==null){t._isValid=!1;return}}if(!a&&s!=null){t._isValid=!1;return}if(i[4])if(tYe.exec(i[4]))l="Z";else{t._isValid=!1;return}t._f=o+(s||"")+(l||""),CW(t)}else t._isValid=!1}function aYe(t,e,n,r,i,a){var o=[oYe(t),Que.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function oYe(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function sYe(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function lYe(t,e,n){if(t){var r=rce.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return ar(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function uYe(t,e,n){if(t)return iYe[t];if(e)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function lce(t){var e=rYe.exec(sYe(t._i)),n;if(e){if(n=aYe(e[4],e[3],e[2],e[5],e[6],e[7]),!lYe(e[1],n,t))return;t._a=n,t._tzm=uYe(e[8],e[9],e[10]),t._d=zS.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),ar(t).rfc2822=!0}else t._isValid=!1}function cYe(t){var e=nYe.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(sce(t),t._isValid===!1)delete t._isValid;else return;if(lce(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:Yt.createFromInputFallback(t)}Yt.createFromInputFallback=mu("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function rb(t,e,n){return t??e??n}function dYe(t){var e=new Date(Yt.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function OW(t){var e,n,r=[],i,a,o;if(!t._d){for(i=dYe(t),t._w&&t._a[od]==null&&t._a[sh]==null&&fYe(t),t._dayOfYear!=null&&(o=rb(t._a[ns],i[ns]),(t._dayOfYear>qx(o)||t._dayOfYear===0)&&(ar(t)._overflowDayOfYear=!0),n=zS(o,0,t._dayOfYear),t._a[sh]=n.getUTCMonth(),t._a[od]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Ka]===24&&t._a[uc]===0&&t._a[lh]===0&&t._a[dv]===0&&(t._nextDay=!0,t._a[Ka]=0),t._d=(t._useUTC?zS:y9e).apply(null,r),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ka]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==a&&(ar(t).weekdayMismatch=!0)}}function fYe(t){var e,n,r,i,a,o,s,l,c;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(a=1,o=4,n=rb(e.GG,t._a[ns],jS(Ri(),1,4).year),r=rb(e.W,1),i=rb(e.E,1),(i<1||i>7)&&(l=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,c=jS(Ri(),a,o),n=rb(e.gg,t._a[ns],c.year),r=rb(e.w,c.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+a,(e.e<0||e.e>6)&&(l=!0)):i=a),r<1||r>mh(n,a,o)?ar(t)._overflowWeeks=!0:l!=null?ar(t)._overflowWeekday=!0:(s=nce(n,r,i,a,o),t._a[ns]=s.year,t._dayOfYear=s.dayOfYear)}Yt.ISO_8601=function(){};Yt.RFC_2822=function(){};function CW(t){if(t._f===Yt.ISO_8601){sce(t);return}if(t._f===Yt.RFC_2822){lce(t);return}t._a=[],ar(t).empty=!0;var e=""+t._i,n,r,i,a,o,s=e.length,l=0,c,f;for(i=jue(t._f,t._locale).match(yW)||[],f=i.length,n=0;n<f;n++)a=i[n],r=(e.match(JHe(a,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&ar(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),l+=r.length),Cb[a]?(r?ar(t).empty=!1:ar(t).unusedTokens.push(a),t9e(a,r,t)):t._strict&&!r&&ar(t).unusedTokens.push(a);ar(t).charsLeftOver=s-l,e.length>0&&ar(t).unusedInput.push(e),t._a[Ka]<=12&&ar(t).bigHour===!0&&t._a[Ka]>0&&(ar(t).bigHour=void 0),ar(t).parsedDateParts=t._a.slice(0),ar(t).meridiem=t._meridiem,t._a[Ka]=hYe(t._locale,t._a[Ka],t._meridiem),c=ar(t).era,c!==null&&(t._a[ns]=t._locale.erasConvertYear(c,t._a[ns])),OW(t),DW(t)}function hYe(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function pYe(t){var e,n,r,i,a,o,s=!1,l=t._f.length;if(l===0){ar(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<l;i++)a=0,o=!1,e=gW({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],CW(e),mW(e)&&(o=!0),a+=ar(e).charsLeftOver,a+=ar(e).unusedTokens.length*10,ar(e).score=a,s?a<r&&(r=a,n=e):(r==null||a<r||o)&&(r=a,n=e,o&&(s=!0));Sp(t,n||e)}function mYe(t){if(!t._d){var e=bW(t._i),n=e.day===void 0?e.date:e.day;t._a=Uue([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),OW(t)}}function gYe(t){var e=new QA(DW(uce(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function uce(t){var e=t._i,n=t._f;return t._locale=t._locale||Dh(t._l),e===null||n===void 0&&e===""?YC({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),kc(e)?new QA(DW(e)):(ZA(e)?t._d=e:Ac(n)?pYe(t):n?CW(t):vYe(t),mW(t)||(t._d=null),t))}function vYe(t){var e=t._i;$s(e)?t._d=new Date(Yt.now()):ZA(e)?t._d=new Date(e.valueOf()):typeof e=="string"?cYe(t):Ac(e)?(t._a=Uue(e.slice(0),function(n){return parseInt(n,10)}),OW(t)):Iv(e)?mYe(t):Sh(e)?t._d=new Date(e):Yt.createFromInputFallback(t)}function cce(t,e,n,r,i){var a={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Iv(t)&&pW(t)||Ac(t)&&t.length===0)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=t,a._f=e,a._strict=r,gYe(a)}function Ri(t,e,n,r){return cce(t,e,n,r,!1)}var yYe=mu("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ri.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:YC()}),bYe=mu("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ri.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:YC()});function dce(t,e){var n,r;if(e.length===1&&Ac(e[0])&&(e=e[0]),!e.length)return Ri();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function _Ye(){var t=[].slice.call(arguments,0);return dce("isBefore",t)}function wYe(){var t=[].slice.call(arguments,0);return dce("isAfter",t)}var xYe=function(){return Date.now?Date.now():+new Date},O1=["year","quarter","month","week","day","hour","minute","second","millisecond"];function SYe(t){var e,n=!1,r,i=O1.length;for(e in t)if(Ir(t,e)&&!(ya.call(O1,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[O1[r]]){if(n)return!1;parseFloat(t[O1[r]])!==gr(t[O1[r]])&&(n=!0)}return!0}function AYe(){return this._isValid}function kYe(){return Cc(NaN)}function eI(t){var e=bW(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,c=e.second||0,f=e.millisecond||0;this._isValid=SYe(e),this._milliseconds=+f+c*1e3+l*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=Dh(),this._bubble()}function jT(t){return t instanceof eI}function r5(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function EYe(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),a=0,o;for(o=0;o<r;o++)gr(t[o])!==gr(e[o])&&a++;return a+i}function fce(t,e){In(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Od(~~(n/60),2)+e+Od(~~n%60,2)})}fce("Z",":");fce("ZZ","");sn("Z",QC);sn("ZZ",QC);ii(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=IW(QC,t)});var TYe=/([\+\-]|\d\d)/gi;function IW(t,e){var n=(e||"").match(t),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(TYe)||["-",0,0],a=+(i[1]*60)+gr(i[2]),a===0?0:i[0]==="+"?a:-a)}function MW(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(kc(t)||ZA(t)?t.valueOf():Ri(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Yt.updateOffset(n,!1),n):Ri(t).local()}function i5(t){return-Math.round(t._d.getTimezoneOffset())}Yt.updateOffset=function(){};function DYe(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=IW(QC,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=i5(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?mce(this,Cc(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Yt.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:i5(this)}function OYe(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function CYe(t){return this.utcOffset(0,t)}function IYe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(i5(this),"m")),this}function MYe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=IW(QHe,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function RYe(t){return this.isValid()?(t=t?Ri(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function $Ye(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function PYe(){if(!$s(this._isDSTShifted))return this._isDSTShifted;var t={},e;return gW(t,this),t=uce(t),t._a?(e=t._isUTC?Rd(t._a):Ri(t._a),this._isDSTShifted=this.isValid()&&EYe(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function LYe(){return this.isValid()?!this._isUTC:!1}function NYe(){return this.isValid()?this._isUTC:!1}function hce(){return this.isValid()?this._isUTC&&this._offset===0:!1}var FYe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,VYe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cc(t,e){var n=t,r=null,i,a,o;return jT(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:Sh(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=FYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:gr(r[od])*i,h:gr(r[Ka])*i,m:gr(r[uc])*i,s:gr(r[lh])*i,ms:gr(r5(r[dv]*1e3))*i}):(r=VYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:Ug(r[2],i),M:Ug(r[3],i),w:Ug(r[4],i),d:Ug(r[5],i),h:Ug(r[6],i),m:Ug(r[7],i),s:Ug(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=BYe(Ri(n.from),Ri(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new eI(n),jT(t)&&Ir(t,"_locale")&&(a._locale=t._locale),jT(t)&&Ir(t,"_isValid")&&(a._isValid=t._isValid),a}Cc.fn=eI.prototype;Cc.invalid=kYe;function Ug(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function $q(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function BYe(t,e){var n;return t.isValid()&&e.isValid()?(e=MW(e,t),t.isBefore(e)?n=$q(t,e):(n=$q(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function pce(t,e){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(zue(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Cc(n,r),mce(this,i,t),this}}function mce(t,e,n,r){var i=e._milliseconds,a=r5(e._days),o=r5(e._months);t.isValid()&&(r=r??!0,o&&Jue(t,WS(t,"Month")+o*n),a&&Zue(t,"Date",WS(t,"Date")+a*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&Yt.updateOffset(t,a||o))}var UYe=pce(1,"add"),WYe=pce(-1,"subtract");function gce(t){return typeof t=="string"||t instanceof String}function zYe(t){return kc(t)||ZA(t)||gce(t)||Sh(t)||HYe(t)||jYe(t)||t===null||t===void 0}function jYe(t){var e=Iv(t)&&!pW(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n=n||Ir(t,a);return e&&n}function HYe(t){var e=Ac(t),n=!1;return e&&(n=t.filter(function(r){return!Sh(r)&&gce(t)}).length===0),e&&n}function YYe(t){var e=Iv(t)&&!pW(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||Ir(t,a);return e&&n}function qYe(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function KYe(t,e){arguments.length===1&&(arguments[0]?zYe(arguments[0])?(t=arguments[0],e=void 0):YYe(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Ri(),r=MW(n,this).startOf("day"),i=Yt.calendarFormat(this,r)||"sameElse",a=e&&($d(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,Ri(n)))}function GYe(){return new QA(this)}function ZYe(t,e){var n=kc(t)?t:Ri(t);return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function QYe(t,e){var n=kc(t)?t:Ri(t);return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function XYe(t,e,n,r){var i=kc(t)?t:Ri(t),a=kc(e)?e:Ri(e);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function JYe(t,e){var n=kc(t)?t:Ri(t),r;return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function e7e(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function t7e(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function n7e(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(r=MW(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=gu(e),e){case"year":a=HT(this,r)/12;break;case"month":a=HT(this,r);break;case"quarter":a=HT(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:Kl(a)}function HT(t,e){if(t.date()<e.date())return-HT(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,a;return e-r<0?(i=t.clone().add(n-1,"months"),a=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),a=(e-r)/(i-r)),-(n+a)||0}Yt.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Yt.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function r7e(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function i7e(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?zT(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$d(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",zT(n,"Z")):zT(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function a7e(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,a;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=e+'[")]',this.format(n+r+i+a)}function o7e(t){t||(t=this.isUtc()?Yt.defaultFormatUtc:Yt.defaultFormat);var e=zT(this,t);return this.localeData().postformat(e)}function s7e(t,e){return this.isValid()&&(kc(t)&&t.isValid()||Ri(t).isValid())?Cc({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function l7e(t){return this.from(Ri(),t)}function u7e(t,e){return this.isValid()&&(kc(t)&&t.isValid()||Ri(t).isValid())?Cc({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function c7e(t){return this.to(Ri(),t)}function vce(t){var e;return t===void 0?this._locale._abbr:(e=Dh(t),e!=null&&(this._locale=e),this)}var yce=mu("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function bce(){return this._locale}var mO=1e3,Ib=60*mO,gO=60*Ib,_ce=(365*400+97)*24*gO;function Mb(t,e){return(t%e+e)%e}function wce(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-_ce:new Date(t,e,n).valueOf()}function xce(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-_ce:Date.UTC(t,e,n)}function d7e(t){var e,n;if(t=gu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xce:wce,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Mb(e+(this._isUTC?0:this.utcOffset()*Ib),gO);break;case"minute":e=this._d.valueOf(),e-=Mb(e,Ib);break;case"second":e=this._d.valueOf(),e-=Mb(e,mO);break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function f7e(t){var e,n;if(t=gu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xce:wce,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=gO-Mb(e+(this._isUTC?0:this.utcOffset()*Ib),gO)-1;break;case"minute":e=this._d.valueOf(),e+=Ib-Mb(e,Ib)-1;break;case"second":e=this._d.valueOf(),e+=mO-Mb(e,mO)-1;break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function h7e(){return this._d.valueOf()-(this._offset||0)*6e4}function p7e(){return Math.floor(this.valueOf()/1e3)}function m7e(){return new Date(this.valueOf())}function g7e(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function v7e(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function y7e(){return this.isValid()?this.toISOString():null}function b7e(){return mW(this)}function _7e(){return Sp({},ar(this))}function w7e(){return ar(this).overflow}function x7e(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}In("N",0,0,"eraAbbr");In("NN",0,0,"eraAbbr");In("NNN",0,0,"eraAbbr");In("NNNN",0,0,"eraName");In("NNNNN",0,0,"eraNarrow");In("y",["y",1],"yo","eraYear");In("y",["yy",2],0,"eraYear");In("y",["yyy",3],0,"eraYear");In("y",["yyyy",4],0,"eraYear");sn("N",RW);sn("NN",RW);sn("NNN",RW);sn("NNNN",R7e);sn("NNNNN",$7e);ii(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?ar(n).era=i:ar(n).invalidEra=t});sn("y",j_);sn("yy",j_);sn("yyy",j_);sn("yyyy",j_);sn("yo",P7e);ii(["y","yy","yyy","yyyy"],ns);ii(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[ns]=n._locale.eraYearOrdinalParse(t,i):e[ns]=parseInt(t,10)});function S7e(t,e){var n,r,i,a=this._eras||Dh("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=Yt(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=Yt(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function A7e(t,e,n){var r,i,a=this.eras(),o,s,l;for(t=t.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),l=a[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return a[r];break;case"NNNN":if(o===t)return a[r];break;case"NNNNN":if(l===t)return a[r];break}else if([o,s,l].indexOf(t)>=0)return a[r]}function k7e(t,e){var n=t.since<=t.until?1:-1;return e===void 0?Yt(t.since).year():Yt(t.since).year()+(e-t.offset)*n}function E7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function T7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function D7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function O7e(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-Yt(i[t].since).year())*n+i[t].offset;return this.year()}function C7e(t){return Ir(this,"_erasNameRegex")||$W.call(this),t?this._erasNameRegex:this._erasRegex}function I7e(t){return Ir(this,"_erasAbbrRegex")||$W.call(this),t?this._erasAbbrRegex:this._erasRegex}function M7e(t){return Ir(this,"_erasNarrowRegex")||$W.call(this),t?this._erasNarrowRegex:this._erasRegex}function RW(t,e){return e.erasAbbrRegex(t)}function R7e(t,e){return e.erasNameRegex(t)}function $7e(t,e){return e.erasNarrowRegex(t)}function P7e(t,e){return e._eraYearOrdinalRegex||j_}function $W(){var t=[],e=[],n=[],r=[],i,a,o,s,l,c=this.eras();for(i=0,a=c.length;i<a;++i)o=ph(c[i].name),s=ph(c[i].abbr),l=ph(c[i].narrow),e.push(o),t.push(s),n.push(l),r.push(o),r.push(s),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}In(0,["gg",2],0,function(){return this.weekYear()%100});In(0,["GG",2],0,function(){return this.isoWeekYear()%100});function tI(t,e){In(0,[t,t.length],0,e)}tI("gggg","weekYear");tI("ggggg","weekYear");tI("GGGG","isoWeekYear");tI("GGGGG","isoWeekYear");sn("G",ZC);sn("g",ZC);sn("GG",$i,Tl);sn("gg",$i,Tl);sn("GGGG",wW,_W);sn("gggg",wW,_W);sn("GGGGG",GC,qC);sn("ggggg",GC,qC);JA(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=gr(t)});JA(["gg","GG"],function(t,e,n,r){e[r]=Yt.parseTwoDigitYear(t)});function L7e(t){return Sce.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function N7e(t){return Sce.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function F7e(){return mh(this.year(),1,4)}function V7e(){return mh(this.isoWeekYear(),1,4)}function B7e(){var t=this.localeData()._week;return mh(this.year(),t.dow,t.doy)}function U7e(){var t=this.localeData()._week;return mh(this.weekYear(),t.dow,t.doy)}function Sce(t,e,n,r,i){var a;return t==null?jS(this,r,i).year:(a=mh(t,r,i),e>a&&(e=a),W7e.call(this,t,e,n,r,i))}function W7e(t,e,n,r,i){var a=nce(t,e,n,r,i),o=zS(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}In("Q",0,"Qo","quarter");sn("Q",Hue);ii("Q",function(t,e){e[sh]=(gr(t)-1)*3});function z7e(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}In("D",["DD",2],"Do","date");sn("D",$i,H_);sn("DD",$i,Tl);sn("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});ii(["D","DD"],od);ii("Do",function(t,e){e[od]=gr(t.match($i)[0])});var Ace=Y_("Date",!0);In("DDD",["DDDD",3],"DDDo","dayOfYear");sn("DDD",KC);sn("DDDD",Yue);ii(["DDD","DDDD"],function(t,e,n){n._dayOfYear=gr(t)});function j7e(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}In("m",["mm",2],0,"minute");sn("m",$i,xW);sn("mm",$i,Tl);ii(["m","mm"],uc);var H7e=Y_("Minutes",!1);In("s",["ss",2],0,"second");sn("s",$i,xW);sn("ss",$i,Tl);ii(["s","ss"],lh);var Y7e=Y_("Seconds",!1);In("S",0,0,function(){return~~(this.millisecond()/100)});In(0,["SS",2],0,function(){return~~(this.millisecond()/10)});In(0,["SSS",3],0,"millisecond");In(0,["SSSS",4],0,function(){return this.millisecond()*10});In(0,["SSSSS",5],0,function(){return this.millisecond()*100});In(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});In(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});In(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});In(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});sn("S",KC,Hue);sn("SS",KC,Tl);sn("SSS",KC,Yue);var Ap,kce;for(Ap="SSSS";Ap.length<=9;Ap+="S")sn(Ap,j_);function q7e(t,e){e[dv]=gr(("0."+t)*1e3)}for(Ap="S";Ap.length<=9;Ap+="S")ii(Ap,q7e);kce=Y_("Milliseconds",!1);In("z",0,0,"zoneAbbr");In("zz",0,0,"zoneName");function K7e(){return this._isUTC?"UTC":""}function G7e(){return this._isUTC?"Coordinated Universal Time":""}var Pt=QA.prototype;Pt.add=UYe;Pt.calendar=KYe;Pt.clone=GYe;Pt.diff=n7e;Pt.endOf=f7e;Pt.format=o7e;Pt.from=s7e;Pt.fromNow=l7e;Pt.to=u7e;Pt.toNow=c7e;Pt.get=a9e;Pt.invalidAt=w7e;Pt.isAfter=ZYe;Pt.isBefore=QYe;Pt.isBetween=XYe;Pt.isSame=JYe;Pt.isSameOrAfter=e7e;Pt.isSameOrBefore=t7e;Pt.isValid=b7e;Pt.lang=yce;Pt.locale=vce;Pt.localeData=bce;Pt.max=bYe;Pt.min=yYe;Pt.parsingFlags=_7e;Pt.set=o9e;Pt.startOf=d7e;Pt.subtract=WYe;Pt.toArray=g7e;Pt.toObject=v7e;Pt.toDate=m7e;Pt.toISOString=i7e;Pt.inspect=a7e;typeof Symbol<"u"&&Symbol.for!=null&&(Pt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Pt.toJSON=y7e;Pt.toString=r7e;Pt.unix=p7e;Pt.valueOf=h7e;Pt.creationData=x7e;Pt.eraName=E7e;Pt.eraNarrow=T7e;Pt.eraAbbr=D7e;Pt.eraYear=O7e;Pt.year=Gue;Pt.isLeapYear=i9e;Pt.weekYear=L7e;Pt.isoWeekYear=N7e;Pt.quarter=Pt.quarters=z7e;Pt.month=ece;Pt.daysInMonth=m9e;Pt.week=Pt.weeks=S9e;Pt.isoWeek=Pt.isoWeeks=A9e;Pt.weeksInYear=B7e;Pt.weeksInWeekYear=U7e;Pt.isoWeeksInYear=F7e;Pt.isoWeeksInISOWeekYear=V7e;Pt.date=Ace;Pt.day=Pt.days=N9e;Pt.weekday=F9e;Pt.isoWeekday=V9e;Pt.dayOfYear=j7e;Pt.hour=Pt.hours=Y9e;Pt.minute=Pt.minutes=H7e;Pt.second=Pt.seconds=Y7e;Pt.millisecond=Pt.milliseconds=kce;Pt.utcOffset=DYe;Pt.utc=CYe;Pt.local=IYe;Pt.parseZone=MYe;Pt.hasAlignedHourOffset=RYe;Pt.isDST=$Ye;Pt.isLocal=LYe;Pt.isUtcOffset=NYe;Pt.isUtc=hce;Pt.isUTC=hce;Pt.zoneAbbr=K7e;Pt.zoneName=G7e;Pt.dates=mu("dates accessor is deprecated. Use date instead.",Ace);Pt.months=mu("months accessor is deprecated. Use month instead",ece);Pt.years=mu("years accessor is deprecated. Use year instead",Gue);Pt.zone=mu("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",OYe);Pt.isDSTShifted=mu("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",PYe);function Z7e(t){return Ri(t*1e3)}function Q7e(){return Ri.apply(null,arguments).parseZone()}function Ece(t){return t}var Mr=vW.prototype;Mr.calendar=LHe;Mr.longDateFormat=BHe;Mr.invalidDate=WHe;Mr.ordinal=HHe;Mr.preparse=Ece;Mr.postformat=Ece;Mr.relativeTime=qHe;Mr.pastFuture=KHe;Mr.set=$He;Mr.eras=S7e;Mr.erasParse=A7e;Mr.erasConvertYear=k7e;Mr.erasAbbrRegex=I7e;Mr.erasNameRegex=C7e;Mr.erasNarrowRegex=M7e;Mr.months=d9e;Mr.monthsShort=f9e;Mr.monthsParse=p9e;Mr.monthsRegex=v9e;Mr.monthsShortRegex=g9e;Mr.week=b9e;Mr.firstDayOfYear=x9e;Mr.firstDayOfWeek=w9e;Mr.weekdays=M9e;Mr.weekdaysMin=$9e;Mr.weekdaysShort=R9e;Mr.weekdaysParse=L9e;Mr.weekdaysRegex=B9e;Mr.weekdaysShortRegex=U9e;Mr.weekdaysMinRegex=W9e;Mr.isPM=j9e;Mr.meridiem=q9e;function vO(t,e,n,r){var i=Dh(),a=Rd().set(r,e);return i[n](a,t)}function Tce(t,e,n){if(Sh(t)&&(e=t,t=void 0),t=t||"",e!=null)return vO(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=vO(t,r,n,"month");return i}function PW(t,e,n,r){typeof t=="boolean"?(Sh(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,Sh(e)&&(n=e,e=void 0),e=e||"");var i=Dh(),a=t?i._week.dow:0,o,s=[];if(n!=null)return vO(e,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=vO(e,(o+a)%7,r,"day");return s}function X7e(t,e){return Tce(t,e,"months")}function J7e(t,e){return Tce(t,e,"monthsShort")}function eqe(t,e,n){return PW(t,e,n,"weekdays")}function tqe(t,e,n){return PW(t,e,n,"weekdaysShort")}function nqe(t,e,n){return PW(t,e,n,"weekdaysMin")}Np("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=gr(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});Yt.lang=mu("moment.lang is deprecated. Use moment.locale instead.",Np);Yt.langData=mu("moment.langData is deprecated. Use moment.localeData instead.",Dh);var Pf=Math.abs;function rqe(){var t=this._data;return this._milliseconds=Pf(this._milliseconds),this._days=Pf(this._days),this._months=Pf(this._months),t.milliseconds=Pf(t.milliseconds),t.seconds=Pf(t.seconds),t.minutes=Pf(t.minutes),t.hours=Pf(t.hours),t.months=Pf(t.months),t.years=Pf(t.years),this}function Dce(t,e,n,r){var i=Cc(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function iqe(t,e){return Dce(this,t,e,1)}function aqe(t,e){return Dce(this,t,e,-1)}function Pq(t){return t<0?Math.floor(t):Math.ceil(t)}function oqe(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,a,o,s,l;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=Pq(a5(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=Kl(t/1e3),r.seconds=i%60,a=Kl(i/60),r.minutes=a%60,o=Kl(a/60),r.hours=o%24,e+=Kl(o/24),l=Kl(Oce(e)),n+=l,e-=Pq(a5(l)),s=Kl(n/12),n%=12,r.days=e,r.months=n,r.years=s,this}function Oce(t){return t*4800/146097}function a5(t){return t*146097/4800}function sqe(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=gu(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+Oce(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(a5(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function Oh(t){return function(){return this.as(t)}}var Cce=Oh("ms"),lqe=Oh("s"),uqe=Oh("m"),cqe=Oh("h"),dqe=Oh("d"),fqe=Oh("w"),hqe=Oh("M"),pqe=Oh("Q"),mqe=Oh("y"),gqe=Cce;function vqe(){return Cc(this)}function yqe(t){return t=gu(t),this.isValid()?this[t+"s"]():NaN}function sy(t){return function(){return this.isValid()?this._data[t]:NaN}}var bqe=sy("milliseconds"),_qe=sy("seconds"),wqe=sy("minutes"),xqe=sy("hours"),Sqe=sy("days"),Aqe=sy("months"),kqe=sy("years");function Eqe(){return Kl(this.days()/7)}var Hf=Math.round,fb={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Tqe(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Dqe(t,e,n,r){var i=Cc(t).abs(),a=Hf(i.as("s")),o=Hf(i.as("m")),s=Hf(i.as("h")),l=Hf(i.as("d")),c=Hf(i.as("M")),f=Hf(i.as("w")),h=Hf(i.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(p=p||f<=1&&["w"]||f<n.w&&["ww",f]),p=p||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h],p[2]=e,p[3]=+t>0,p[4]=r,Tqe.apply(null,p)}function Oqe(t){return t===void 0?Hf:typeof t=="function"?(Hf=t,!0):!1}function Cqe(t,e){return fb[t]===void 0?!1:e===void 0?fb[t]:(fb[t]=e,t==="s"&&(fb.ss=e-1),!0)}function Iqe(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=fb,i,a;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},fb,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),a=Dqe(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var VN=Math.abs;function Uy(t){return(t>0)-(t<0)||+t}function nI(){if(!this.isValid())return this.localeData().invalidDate();var t=VN(this._milliseconds)/1e3,e=VN(this._days),n=VN(this._months),r,i,a,o,s=this.asSeconds(),l,c,f,h;return s?(r=Kl(t/60),i=Kl(r/60),t%=60,r%=60,a=Kl(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",c=Uy(this._months)!==Uy(s)?"-":"",f=Uy(this._days)!==Uy(s)?"-":"",h=Uy(this._milliseconds)!==Uy(s)?"-":"",l+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(e?f+e+"D":"")+(i||r||t?"T":"")+(i?h+i+"H":"")+(r?h+r+"M":"")+(t?h+o+"S":"")):"P0D"}var Tr=eI.prototype;Tr.isValid=AYe;Tr.abs=rqe;Tr.add=iqe;Tr.subtract=aqe;Tr.as=sqe;Tr.asMilliseconds=Cce;Tr.asSeconds=lqe;Tr.asMinutes=uqe;Tr.asHours=cqe;Tr.asDays=dqe;Tr.asWeeks=fqe;Tr.asMonths=hqe;Tr.asQuarters=pqe;Tr.asYears=mqe;Tr.valueOf=gqe;Tr._bubble=oqe;Tr.clone=vqe;Tr.get=yqe;Tr.milliseconds=bqe;Tr.seconds=_qe;Tr.minutes=wqe;Tr.hours=xqe;Tr.days=Sqe;Tr.weeks=Eqe;Tr.months=Aqe;Tr.years=kqe;Tr.humanize=Iqe;Tr.toISOString=nI;Tr.toString=nI;Tr.toJSON=nI;Tr.locale=vce;Tr.localeData=bce;Tr.toIsoString=mu("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nI);Tr.lang=yce;In("X",0,0,"unix");In("x",0,0,"valueOf");sn("x",ZC);sn("X",XHe);ii("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});ii("x",function(t,e,n){n._d=new Date(gr(t))});//! moment.js
208
- Yt.version="2.30.1";MHe(Ri);Yt.fn=Pt;Yt.min=_Ye;Yt.max=wYe;Yt.now=xYe;Yt.utc=Rd;Yt.unix=Z7e;Yt.months=X7e;Yt.isDate=ZA;Yt.locale=Np;Yt.invalid=YC;Yt.duration=Cc;Yt.isMoment=kc;Yt.weekdays=eqe;Yt.parseZone=Q7e;Yt.localeData=Dh;Yt.isDuration=jT;Yt.monthsShort=J7e;Yt.weekdaysMin=nqe;Yt.defineLocale=TW;Yt.updateLocale=Q9e;Yt.locales=X9e;Yt.weekdaysShort=tqe;Yt.normalizeUnits=gu;Yt.relativeTimeRounding=Oqe;Yt.relativeTimeThreshold=Cqe;Yt.calendarFormat=qYe;Yt.prototype=Pt;Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const tm=T_("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{HC.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),Ice=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=jA(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=Q6(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await xn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await xn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await xn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await xn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await xn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await xn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await xn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await xn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await xn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=fr(),{basicInfo:S}=Pn(w),T=tm(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await xn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await xn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await xn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await xn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await xn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},Mqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=tm(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);zt(()=>{S("loaded")}),pee(()=>{S("loaded")});const f=hc("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:""},{showLoading:!1})},p=Dd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ge=yn();return ge||""}),v=fr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ge=l.value.permission;return{canUpdateName:ge==null?void 0:ge.has_edit_permission,canUpdateThumbnail:ge==null?void 0:ge.has_edit_permission,canArchive:ge==null?void 0:ge.has_archive_permission,canDelete:ge==null?void 0:ge.has_delete_permission,canUpdateAssignees:ge==null?void 0:ge.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ge==null?void 0:ge.has_edit_permission:0,canUpdateDate:ge==null?void 0:ge.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ge=>{o.value=!0,ge&&S("updateScene",ge)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=Ice(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ge=l.value,Ue=ge.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ge,status:ge.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value}}catch(ge){return console.error(ge),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ge=>{const Ue=r.sceneId;return await M(Ue,ge)},{getEnvVariable:me}=Al(),Ee=Z(()=>{const ge=l.value,Ue=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ge.id,entity_id:ge.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status"},te=ge.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=Uae(g);Ge(de,HC.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return xae},GirdItemSkeleton:Vue};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),Rqe=["id"];function $qe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[It(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,Rqe)}const Pqe=Nn(Mqe,[["render",$qe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),Lqe=1,Nqe=t=>{const{handleGetSceneDetail:e}=Ice(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=Ht(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(Lqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=tm(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},Fqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=pu(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=Nqe(l),v=(E,D)=>{h(E,D),r("update")};zt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ny);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=ay("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return bC},InfoVisual:Oc,GridItemSkeleton:Vue,GridItem:Pqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Vqe={key:0,class:"empty-list"},Bqe={class:"scene-item"},Uqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function Wqe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",Vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},ji({default:ze(({item:o,index:s})=>[X("div",Bqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",Uqe,[(R(),Y(wt,null,Qt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const LW=Nn(Fqe,[["render",Wqe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),Lq=400,zqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=VC(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=hh(s),c=re(!1),f=fr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||Lq),g=ks(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ny);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");ay("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:Lq,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Oc,SceneList:LW};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),jqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Hqe(t,e,n,r,i,a){return R(),Y("div",jqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Nq=Nn(zqe,[["render",Hqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Yqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=jA(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await xn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await xn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await xn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await xn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await xn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await xn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await xn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await xn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},qqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=fr();uC();const{userInfo:a}=Pn(i),{getEnvVariable:o}=Al(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Qi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:yn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await xn.downloadFileFromS3({scene_id:yn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await xn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Yqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:yn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=hc("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Qi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:yn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Qi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:yn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("sceneHub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return Tae},get TessBreadcrumb(){return vC}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Kqe={class:"breadcrumb"};function Gqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Kqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Zqe=Nn(qqe,[["render",Gqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Qqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Xqe={class:"skeleton-comment"},Jqe={class:"comment-body"},eKe={class:"body"},tKe={class:"skeleton-details"};function nKe(t,e,n,r,i,a){return R(),Y("div",Xqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Jqe,[e[0]||(e[0]=Vv('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",eKe,[X("div",tKe,[(R(!0),Y(wt,null,Qt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=Vv('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const rKe=Nn(Qqe,[["render",nKe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),Jg=new TS("CommentFile");Jg.version(1).stores({files:"++id, files "});const iKe=()=>{const t=async a=>{await Jg.files.where("id").equals(a.id).first()?await Jg.files.update(a.id,a):await Jg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await Jg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await Jg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await Jg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},aKe=T_("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),oKe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=aKe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=iKe(),p=re([]),g=re(null);Wae(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};zt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Zqe,InfoVisual:Oc,CommentSkeleton:rKe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),sKe={ref:"commentListRef",class:"recent-comment"},lKe={class:"empty-data"};function uKe(t,e,n,r,i,a){return R(),Y("div",sKe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",lKe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Cn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Qt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Cn()),r.loading?(R(),Y(wt,{key:2},Qt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const rI=Nn(oKe,[["render",uKe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),cKe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=VC(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ny);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");ay("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:rI};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function dKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const BN=Nn(cKe,[["render",dKe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),fKe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=VC(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ks(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ny);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");ay("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:rI};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function hKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const pKe=Nn(fKe,[["render",hKe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),mKe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:BN,comment_resolved:pKe,rendition:EHe,scene:Nq,people_comment:BN,chart:BN,assigned_scene:Nq},r=t,i=re(r.tabs[0].id);Ks(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=fr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ks(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hC}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),gKe={class:"tab-sections"},vKe={class:"tab"},yKe={class:"refresh-btn"};function bKe(t,e,n,r,i,a){return R(),Y("div",gKe,[X("div",vKe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},ji({_:2},[Qt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(wd(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",yKe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const _Ke=Nn(mKe,[["render",bKe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),wKe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=zae(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<Loe||c.value<700),{width:y}=hh(r),{width:v,height:b}=hh(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=hh(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),fn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};zt(()=>{P(),fn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Gs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),xKe=["id"],SKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function AKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",SKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,xKe)}const NW=Nn(wKe,[["render",AKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),kKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);o4e(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),EKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function TKe(t,e,n,r,i,a){return R(),Y("div",EKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),It(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const DKe=Nn(kKe,[["render",TKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),OKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function CKe(t,e,n,r,i,a){return R(),Re(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const IKe=Nn(OKe,[["render",CKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),MKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=pu(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return IS},get ArboTooltip(){return dr},PreferencePopup:DKe,SkeletonLoading:IKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),RKe={class:"section-title"},$Ke={class:"title"},PKe={class:"actions"},LKe={class:"counting-chip"};function NKe(t,e,n,r,i,a){return R(),Y("div",RKe,[ke(t.$slots,"title",{},()=>[X("div",$Ke,it(n.title),1)],!0),X("div",PKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Cn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Cn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",LKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Cn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const iI=Nn(MKe,[["render",NKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),FKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":jze,"target-points-tile":tje,"unresolved-tile":ije,"overdue-tile":Zze,"total-completed-tile":qze},r=ks(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=zae(),p=re(null),g=re(null),y=fr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=hh(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=RS(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:_Ke,ResizeLayout:NW,SectionTitle:iI,get BREAKPOINT_RESIZE(){return Loe}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),VKe={ref:"peopleHomeRef",class:"people-home"},BKe={ref:"topRef",class:"top"},UKe={ref:"sectionRef",class:"section-card-wrapper"},WKe={class:"section-card"};function zKe(t,e,n,r,i,a){return R(),Y("div",VKe,[X("div",BKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",UKe,[X("div",WKe,[(R(!0),Y(wt,null,Qt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(wd(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const jKe=Nn(FKe,[["render",zKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),HKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=fr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));zt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return _h},get ArboTooltip(){return dr},get ArboSkeletonLoading(){return D_}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),YKe={class:"profile-image"},qKe={class:"profile-image__main--status-avatar"},KKe={class:"profile-image__main"},GKe={key:1};function ZKe(t,e,n,r,i,a){return R(),Y("div",YKe,[X("div",qKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",KKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",GKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const QKe=Nn(HKe,[["render",ZKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),XKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=Ht({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=fr();let i=Ht({isShow:!1}),a=Ht({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await xn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=fr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=Nae(),{getEnvVariable:w}=Al(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||d5e(),ws_code:yn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=yn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),zt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||fr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return ea},get ArboTooltip(){return dr},get TessAssigneeSelect(){return k6},get ArboSkeletonLoading(){return D_},get ArboButton(){return Nt},get ArboIcon(){return qn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__main--user-select"},nGe={class:"info-detail-content__main--user-name"},rGe={key:1,class:"detail-row"},iGe={class:"icon-wrapper"},aGe={class:"content-wrapper"},oGe={class:"inline-content"},sGe={key:4,class:"inline-copy-button"},lGe={class:"info-detail-content__main--user-email"},uGe={key:1,class:"detail-row"},cGe={class:"icon-wrapper"},dGe={class:"content-wrapper"},fGe={class:"inline-content"},hGe={key:3,class:"inline-copy-button"};function pGe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},ji({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[It(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",nGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",rGe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",iGe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",aGe,[X("div",oGe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",sGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",lGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",uGe,[X("div",cGe,[he(r.ArboIcon,{name:"Email"})]),X("div",dGe,[X("div",fGe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",hGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const mGe=Nn(XKe,[["render",pGe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),gGe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=Al(),s=fr(),{selectedDataId:l}=Pn(s);function c(){const h=Qi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:yn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return dr}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),vGe={class:"link-profile-button"};function yGe(t,e,n,r,i,a){return R(),Y("div",vGe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const bGe=Nn(gGe,[["render",yGe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),_Ge=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=fr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=Al();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});zt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return mC},get ArboSkeletonLoading(){return D_},LinkProfileCopied:bGe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),wGe={class:"info-detail-content"},xGe={class:"info-detail-content__main"},SGe={class:"info-detail-content__content"},AGe={class:"info-detail-content__content--link-copy"},kGe={class:"info-detail-content__content--list-team-group"};function EGe(t,e,n,r,i,a){return R(),Y("div",wGe,[X("div",xGe,[X("div",SGe,[X("div",AGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",kGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const TGe=Nn(_Ge,[["render",EGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),DGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:mGe,SecondSectionInfo:TGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),OGe={class:"profile-content"},CGe={class:"profile-content__main"},IGe={class:"profile-content__main--first-section"},MGe={class:"profile-content__main--second-section"};function RGe(t,e,n,r,i,a){return R(),Y("div",OGe,[X("div",CGe,[X("div",IGe,[he(r.FirstSectionInfo)]),X("div",MGe,[he(r.SecondSectionInfo)])])])}const $Ge=Nn(DGe,[["render",RGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),PGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=fr();let i=1;const a=Ht({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=Al(),s=async()=>{try{a.isLoading=!0,Dd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await xn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),i_.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await xn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await xn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;zt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return D_},ProfileAvatar:QKe,ProfileInfo:$Ge};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),LGe={class:"header-content"},NGe={class:"header-content__main"},FGe={class:"header-content__profile-image"},VGe={class:"header-content__profile-image--content"},BGe={class:"header-content__profile-info"},UGe={class:"header-content__profile-info--content"};function WGe(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",LGe,[X("div",NGe,[X("div",FGe,[X("div",VGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",BGe,[X("div",UGe,[he(r.ProfileInfo)])])])])}const zGe=Nn(PGe,[["render",WGe],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),jGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=fr(),{currentTab:r}=Pn(n),i=Fae();Ks(()=>{var l;if(Al().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hC}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function HGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const YGe=Nn(jGe,[["render",HGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),qGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=pu(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function KGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[It(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Cn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[It(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Cn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),It(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Cn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Mce=Nn(qGe,[["render",KGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function o5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function GGe(t){if(Array.isArray(t))return o5(t)}function Fq(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ZGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Fq(a,r,i,o,s,"next",l)}function s(l){Fq(a,r,i,o,s,"throw",l)}o(void 0)})}}function QGe(t,e,n){return(e=rZe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
208
+ Yt.version="2.30.1";MHe(Ri);Yt.fn=Pt;Yt.min=_Ye;Yt.max=wYe;Yt.now=xYe;Yt.utc=Rd;Yt.unix=Z7e;Yt.months=X7e;Yt.isDate=ZA;Yt.locale=Np;Yt.invalid=YC;Yt.duration=Cc;Yt.isMoment=kc;Yt.weekdays=eqe;Yt.parseZone=Q7e;Yt.localeData=Dh;Yt.isDuration=jT;Yt.monthsShort=J7e;Yt.weekdaysMin=nqe;Yt.defineLocale=TW;Yt.updateLocale=Q9e;Yt.locales=X9e;Yt.weekdaysShort=tqe;Yt.normalizeUnits=gu;Yt.relativeTimeRounding=Oqe;Yt.relativeTimeThreshold=Cqe;Yt.calendarFormat=qYe;Yt.prototype=Pt;Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const tm=T_("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{HC.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),Ice=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=jA(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=Q6(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await xn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await xn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await xn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await xn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await xn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await xn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await xn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await xn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await xn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=fr(),{basicInfo:S}=Pn(w),T=tm(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await xn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await xn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await xn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await xn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await xn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},Mqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=tm(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);zt(()=>{S("loaded")}),pee(()=>{S("loaded")});const f=hc("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:""},{showLoading:!1})},p=Dd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ge=yn();return ge||""}),v=fr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ge=l.value.permission;return{canUpdateName:ge==null?void 0:ge.has_edit_permission,canUpdateThumbnail:ge==null?void 0:ge.has_edit_permission,canArchive:ge==null?void 0:ge.has_archive_permission,canDelete:ge==null?void 0:ge.has_delete_permission,canUpdateAssignees:ge==null?void 0:ge.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ge==null?void 0:ge.has_edit_permission:0,canUpdateDate:ge==null?void 0:ge.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ge=>{o.value=!0,ge&&S("updateScene",ge)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=Ice(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ge=l.value,Ue=ge.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ge,status:ge.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value}}catch(ge){return console.error(ge),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ge=>{const Ue=r.sceneId;return await M(Ue,ge)},{getEnvVariable:me}=Al(),Ee=Z(()=>{const ge=l.value,Ue=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ge.id,entity_id:ge.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status"},te=ge.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=Uae(g);Ge(de,HC.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return xae},GirdItemSkeleton:Vue};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),Rqe=["id"];function $qe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[It(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,Rqe)}const Pqe=Nn(Mqe,[["render",$qe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),Lqe=1,Nqe=t=>{const{handleGetSceneDetail:e}=Ice(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=Ht(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(Lqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=tm(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},Fqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=pu(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=Nqe(l),v=(E,D)=>{h(E,D),r("update")};zt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ny);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=ay("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return bC},InfoVisual:Oc,GridItemSkeleton:Vue,GridItem:Pqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Vqe={key:0,class:"empty-list"},Bqe={class:"scene-item"},Uqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function Wqe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",Vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},ji({default:ze(({item:o,index:s})=>[X("div",Bqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",Uqe,[(R(),Y(wt,null,Qt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const LW=Nn(Fqe,[["render",Wqe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),Lq=400,zqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=VC(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=hh(s),c=re(!1),f=fr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||Lq),g=ks(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ny);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");ay("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:Lq,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Oc,SceneList:LW};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),jqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Hqe(t,e,n,r,i,a){return R(),Y("div",jqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Nq=Nn(zqe,[["render",Hqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Yqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=jA(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await xn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await xn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await xn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await xn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await xn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await xn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await xn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await xn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},qqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=fr();uC();const{userInfo:a}=Pn(i),{getEnvVariable:o}=Al(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Qi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:yn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await xn.downloadFileFromS3({scene_id:yn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await xn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Yqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:yn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=hc("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Qi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:yn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Qi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:yn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("scene_hub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return Tae},get TessBreadcrumb(){return vC}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Kqe={class:"breadcrumb"};function Gqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Kqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Zqe=Nn(qqe,[["render",Gqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Qqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Xqe={class:"skeleton-comment"},Jqe={class:"comment-body"},eKe={class:"body"},tKe={class:"skeleton-details"};function nKe(t,e,n,r,i,a){return R(),Y("div",Xqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Jqe,[e[0]||(e[0]=Vv('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",eKe,[X("div",tKe,[(R(!0),Y(wt,null,Qt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=Vv('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const rKe=Nn(Qqe,[["render",nKe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),Jg=new TS("CommentFile");Jg.version(1).stores({files:"++id, files "});const iKe=()=>{const t=async a=>{await Jg.files.where("id").equals(a.id).first()?await Jg.files.update(a.id,a):await Jg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await Jg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await Jg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await Jg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},aKe=T_("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),oKe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=aKe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=iKe(),p=re([]),g=re(null);Wae(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};zt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Zqe,InfoVisual:Oc,CommentSkeleton:rKe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),sKe={ref:"commentListRef",class:"recent-comment"},lKe={class:"empty-data"};function uKe(t,e,n,r,i,a){return R(),Y("div",sKe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",lKe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Cn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Qt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Cn()),r.loading?(R(),Y(wt,{key:2},Qt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const rI=Nn(oKe,[["render",uKe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),cKe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=VC(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ny);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");ay("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:rI};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function dKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const BN=Nn(cKe,[["render",dKe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),fKe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=VC(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ks(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ny);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");ay("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:rI};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function hKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const pKe=Nn(fKe,[["render",hKe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),mKe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:BN,comment_resolved:pKe,rendition:EHe,scene:Nq,people_comment:BN,chart:BN,assigned_scene:Nq},r=t,i=re(r.tabs[0].id);Ks(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=fr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ks(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hC}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),gKe={class:"tab-sections"},vKe={class:"tab"},yKe={class:"refresh-btn"};function bKe(t,e,n,r,i,a){return R(),Y("div",gKe,[X("div",vKe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},ji({_:2},[Qt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(wd(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",yKe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const _Ke=Nn(mKe,[["render",bKe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),wKe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=zae(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<Loe||c.value<700),{width:y}=hh(r),{width:v,height:b}=hh(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=hh(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),fn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};zt(()=>{P(),fn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Gs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),xKe=["id"],SKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function AKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",SKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,xKe)}const NW=Nn(wKe,[["render",AKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),kKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);o4e(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),EKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function TKe(t,e,n,r,i,a){return R(),Y("div",EKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),It(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const DKe=Nn(kKe,[["render",TKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),OKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function CKe(t,e,n,r,i,a){return R(),Re(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const IKe=Nn(OKe,[["render",CKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),MKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=pu(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return IS},get ArboTooltip(){return dr},PreferencePopup:DKe,SkeletonLoading:IKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),RKe={class:"section-title"},$Ke={class:"title"},PKe={class:"actions"},LKe={class:"counting-chip"};function NKe(t,e,n,r,i,a){return R(),Y("div",RKe,[ke(t.$slots,"title",{},()=>[X("div",$Ke,it(n.title),1)],!0),X("div",PKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Cn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Cn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",LKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Cn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const iI=Nn(MKe,[["render",NKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),FKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":jze,"target-points-tile":tje,"unresolved-tile":ije,"overdue-tile":Zze,"total-completed-tile":qze},r=ks(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=zae(),p=re(null),g=re(null),y=fr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=hh(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=RS(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:_Ke,ResizeLayout:NW,SectionTitle:iI,get BREAKPOINT_RESIZE(){return Loe}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),VKe={ref:"peopleHomeRef",class:"people-home"},BKe={ref:"topRef",class:"top"},UKe={ref:"sectionRef",class:"section-card-wrapper"},WKe={class:"section-card"};function zKe(t,e,n,r,i,a){return R(),Y("div",VKe,[X("div",BKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",UKe,[X("div",WKe,[(R(!0),Y(wt,null,Qt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(wd(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const jKe=Nn(FKe,[["render",zKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),HKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=fr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));zt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return _h},get ArboTooltip(){return dr},get ArboSkeletonLoading(){return D_}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),YKe={class:"profile-image"},qKe={class:"profile-image__main--status-avatar"},KKe={class:"profile-image__main"},GKe={key:1};function ZKe(t,e,n,r,i,a){return R(),Y("div",YKe,[X("div",qKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",KKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",GKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const QKe=Nn(HKe,[["render",ZKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),XKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=Ht({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=fr();let i=Ht({isShow:!1}),a=Ht({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await xn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=fr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=Nae(),{getEnvVariable:w}=Al(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||d5e(),ws_code:yn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=yn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),zt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||fr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return ea},get ArboTooltip(){return dr},get TessAssigneeSelect(){return k6},get ArboSkeletonLoading(){return D_},get ArboButton(){return Nt},get ArboIcon(){return qn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__main--user-select"},nGe={class:"info-detail-content__main--user-name"},rGe={key:1,class:"detail-row"},iGe={class:"icon-wrapper"},aGe={class:"content-wrapper"},oGe={class:"inline-content"},sGe={key:4,class:"inline-copy-button"},lGe={class:"info-detail-content__main--user-email"},uGe={key:1,class:"detail-row"},cGe={class:"icon-wrapper"},dGe={class:"content-wrapper"},fGe={class:"inline-content"},hGe={key:3,class:"inline-copy-button"};function pGe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},ji({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[It(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",nGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",rGe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",iGe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",aGe,[X("div",oGe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",sGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",lGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",uGe,[X("div",cGe,[he(r.ArboIcon,{name:"Email"})]),X("div",dGe,[X("div",fGe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",hGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const mGe=Nn(XKe,[["render",pGe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),gGe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=Al(),s=fr(),{selectedDataId:l}=Pn(s);function c(){const h=Qi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:yn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return dr}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),vGe={class:"link-profile-button"};function yGe(t,e,n,r,i,a){return R(),Y("div",vGe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const bGe=Nn(gGe,[["render",yGe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),_Ge=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=fr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=Al();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});zt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return mC},get ArboSkeletonLoading(){return D_},LinkProfileCopied:bGe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),wGe={class:"info-detail-content"},xGe={class:"info-detail-content__main"},SGe={class:"info-detail-content__content"},AGe={class:"info-detail-content__content--link-copy"},kGe={class:"info-detail-content__content--list-team-group"};function EGe(t,e,n,r,i,a){return R(),Y("div",wGe,[X("div",xGe,[X("div",SGe,[X("div",AGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",kGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const TGe=Nn(_Ge,[["render",EGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),DGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:mGe,SecondSectionInfo:TGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),OGe={class:"profile-content"},CGe={class:"profile-content__main"},IGe={class:"profile-content__main--first-section"},MGe={class:"profile-content__main--second-section"};function RGe(t,e,n,r,i,a){return R(),Y("div",OGe,[X("div",CGe,[X("div",IGe,[he(r.FirstSectionInfo)]),X("div",MGe,[he(r.SecondSectionInfo)])])])}const $Ge=Nn(DGe,[["render",RGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),PGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=fr();let i=1;const a=Ht({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=Al(),s=async()=>{try{a.isLoading=!0,Dd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await xn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),i_.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await xn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await xn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;zt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return D_},ProfileAvatar:QKe,ProfileInfo:$Ge};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),LGe={class:"header-content"},NGe={class:"header-content__main"},FGe={class:"header-content__profile-image"},VGe={class:"header-content__profile-image--content"},BGe={class:"header-content__profile-info"},UGe={class:"header-content__profile-info--content"};function WGe(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",LGe,[X("div",NGe,[X("div",FGe,[X("div",VGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",BGe,[X("div",UGe,[he(r.ProfileInfo)])])])])}const zGe=Nn(PGe,[["render",WGe],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),jGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=fr(),{currentTab:r}=Pn(n),i=Fae();Ks(()=>{var l;if(Al().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hC}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function HGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const YGe=Nn(jGe,[["render",HGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),qGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=pu(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function KGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[It(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Cn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[It(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Cn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),It(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Cn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Mce=Nn(qGe,[["render",KGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function o5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function GGe(t){if(Array.isArray(t))return o5(t)}function Fq(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ZGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Fq(a,r,i,o,s,"next",l)}function s(l){Fq(a,r,i,o,s,"throw",l)}o(void 0)})}}function QGe(t,e,n){return(e=rZe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
209
209
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eZe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vq(Object(n),!0).forEach(function(r){QGe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vq(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function s5(){s5=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(M,C,F,W){return Object.defineProperty(M,C,{value:F,enumerable:!W,configurable:!W,writable:!W})}try{l({},"")}catch{l=function(C,F,W){return C[F]=W}}function c(M,C,F,W){var H=C&&C.prototype instanceof p?C:p,j=Object.create(H.prototype);return l(j,"_invoke",function(N,U,ee){var le=1;return function(_e,be){if(le===3)throw Error("Generator is already running");if(le===4){if(_e==="throw")throw be;return{value:t,done:!0}}for(ee.method=_e,ee.arg=be;;){var Te=ee.delegate;if(Te){var J=E(Te,ee);if(J){if(J===h)continue;return J}}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(le===1)throw le=4,ee.arg;ee.dispatchException(ee.arg)}else ee.method==="return"&&ee.abrupt("return",ee.arg);le=3;var me=f(N,U,ee);if(me.type==="normal"){if(le=ee.done?4:2,me.arg===h)continue;return{value:me.arg,done:ee.done}}me.type==="throw"&&(le=4,ee.method="throw",ee.arg=me.arg)}}}(M,F,new V(W||[])),!0),j}function f(M,C,F){try{return{type:"normal",arg:M.call(C,F)}}catch(W){return{type:"throw",arg:W}}}e.wrap=c;var h={};function p(){}function g(){}function y(){}var v={};l(v,a,function(){return this});var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==n&&r.call(w,a)&&(v=w);var S=y.prototype=p.prototype=Object.create(v);function T(M){["next","throw","return"].forEach(function(C){l(M,C,function(F){return this._invoke(C,F)})})}function _(M,C){function F(H,j,N,U){var ee=f(M[H],M,j);if(ee.type!=="throw"){var le=ee.arg,_e=le.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?C.resolve(_e.__await).then(function(be){F("next",be,N,U)},function(be){F("throw",be,N,U)}):C.resolve(_e).then(function(be){le.value=be,N(le)},function(be){return F("throw",be,N,U)})}U(ee.arg)}var W;l(this,"_invoke",function(H,j){function N(){return new C(function(U,ee){F(H,j,U,ee)})}return W=W?W.then(N,N):N()},!0)}function E(M,C){var F=C.method,W=M.i[F];if(W===t)return C.delegate=null,F==="throw"&&M.i.return&&(C.method="return",C.arg=t,E(M,C),C.method==="throw")||F!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+F+"' method")),h;var H=f(W,M.i,C.arg);if(H.type==="throw")return C.method="throw",C.arg=H.arg,C.delegate=null,h;var j=H.arg;return j?j.done?(C[M.r]=j.value,C.next=M.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,h):j:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,h)}function D(M){this.tryEntries.push(M)}function O(M){var C=M[4]||{};C.type="normal",C.arg=t,M[4]=C}function V(M){this.tryEntries=[[-1]],M.forEach(D,this),this.reset(!0)}function P(M){if(M!=null){var C=M[a];if(C)return C.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length)){var F=-1,W=function H(){for(;++F<M.length;)if(r.call(M,F))return H.value=M[F],H.done=!1,H;return H.value=t,H.done=!0,H};return W.next=W}}throw new TypeError(typeof M+" is not iterable")}return g.prototype=y,l(S,"constructor",y),l(y,"constructor",g),g.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(M){var C=typeof M=="function"&&M.constructor;return!!C&&(C===g||(C.displayName||C.name)==="GeneratorFunction")},e.mark=function(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,y):(M.__proto__=y,l(M,s,"GeneratorFunction")),M.prototype=Object.create(S),M},e.awrap=function(M){return{__await:M}},T(_.prototype),l(_.prototype,o,function(){return this}),e.AsyncIterator=_,e.async=function(M,C,F,W,H){H===void 0&&(H=Promise);var j=new _(c(M,C,F,W),H);return e.isGeneratorFunction(C)?j:j.next().then(function(N){return N.done?N.value:j.next()})},T(S),l(S,s,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),e.keys=function(M){var C=Object(M),F=[];for(var W in C)F.unshift(W);return function H(){for(;F.length;)if((W=F.pop())in C)return H.value=W,H.done=!1,H;return H.done=!0,H}},e.values=P,V.prototype={constructor:V,reset:function(M){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!M)for(var C in this)C.charAt(0)==="t"&&r.call(this,C)&&!isNaN(+C.slice(1))&&(this[C]=t)},stop:function(){this.done=!0;var M=this.tryEntries[0][4];if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var C=this;function F(le){j.type="throw",j.arg=M,C.next=le}for(var W=C.tryEntries.length-1;W>=0;--W){var H=this.tryEntries[W],j=H[4],N=this.prev,U=H[1],ee=H[2];if(H[0]===-1)return F("end"),!1;if(!U&&!ee)throw Error("try statement without catch or finally");if(H[0]!=null&&H[0]<=N){if(N<U)return this.method="next",this.arg=t,F(U),!0;if(N<ee)return F(ee),!1}}},abrupt:function(M,C){for(var F=this.tryEntries.length-1;F>=0;--F){var W=this.tryEntries[F];if(W[0]>-1&&W[0]<=this.prev&&this.prev<W[2]){var H=W;break}}H&&(M==="break"||M==="continue")&&H[0]<=C&&C<=H[2]&&(H=null);var j=H?H[4]:{};return j.type=M,j.arg=C,H?(this.method="next",this.next=H[2],h):this.complete(j)},complete:function(M,C){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&C&&(this.next=C),h},finish:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[2]===M)return this.complete(F[4],F[3]),O(F),h}},catch:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[0]===M){var W=F[4];if(W.type==="throw"){var H=W.arg;O(F)}return H}}throw Error("illegal catch attempt")},delegateYield:function(M,C,F){return this.delegate={i:P(M),r:C,n:F},this.method==="next"&&(this.arg=t),h}},e}function tZe(t){return GGe(t)||XGe(t)||iZe(t)||JGe()}function nZe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rZe(t){var e=nZe(t,"string");return typeof e=="symbol"?e:e+""}function iZe(t,e){if(t){if(typeof t=="string")return o5(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o5(t,e):void 0}}/*!
210
210
  * @kurkle/color v0.3.4
211
211
  * https://github.com/kurkle/color#readme
package/es/index.es.js CHANGED
@@ -83718,7 +83718,7 @@ const Lq = /* @__PURE__ */ Nn(Wqe, [["render", jqe], ["__scopeId", "data-v-630ee
83718
83718
  comment_id: U
83719
83719
  }
83720
83720
  });
83721
- H.ctrlKey || H.metaKey ? window.open(ee.url, "_blank") : V ? V("sceneHub", {
83721
+ H.ctrlKey || H.metaKey ? window.open(ee.url, "_blank") : V ? V("scene_hub", {
83722
83722
  sceneId: j,
83723
83723
  commentId: U
83724
83724
  }, { showLoading: !1 }) : window.location.href = ee.url;
package/npmjs.npmrc CHANGED
@@ -2,4 +2,4 @@ legacy-peer-deps=true
2
2
 
3
3
  # // Arbo npmjs
4
4
  @arbocollab:registry=https://registry.npmjs.org
5
- //registry.npmjs.org/:_authToken=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
5
+ //registry.npmjs.org/:_authToken=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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbocollab/arbo-web-people",
3
- "version": "0.1.85-alpha.5",
3
+ "version": "0.1.85-alpha.7",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
package/umd/index.umd.js CHANGED
@@ -205,7 +205,7 @@ var Yre;function Yt(){return Yre.apply(null,arguments)}function cHe(t){Yre=t}fun
205
205
  [`+a+"] ";for(o in arguments[0])Cr(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}Gre(t+`
206
206
  Arguments: `+Array.prototype.slice.call(r).join("")+`
207
207
  `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var Zre={};function Qre(t,e){Yt.deprecationHandler!=null&&Yt.deprecationHandler(t,e),Zre[t]||(Gre(e),Zre[t]=!0)}Yt.suppressDeprecationWarnings=!1,Yt.deprecationHandler=null;function pd(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function fHe(t){var e,n;for(n in t)Cr(t,n)&&(e=t[n],pd(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function $L(t,e){var n=Cp({},t),r;for(r in e)Cr(e,r)&&(wg(t[r])&&wg(e[r])?(n[r]={},Cp(n[r],t[r]),Cp(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Cr(t,r)&&!Cr(e,r)&&wg(t[r])&&(n[r]=Cp({},n[r]));return n}function PL(t){t!=null&&this.set(t)}var LL;Object.keys?LL=Object.keys:LL=function(t){var e,n=[];for(e in t)Cr(t,e)&&n.push(e);return n};var hHe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pHe(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return pd(r)?r.call(e,n):r}function md(t,e,n){var r=""+Math.abs(t),i=e-r.length,a=t>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var NL=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,mO=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,FL={},f_={};function On(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(f_[t]=i),e&&(f_[e[0]]=function(){return md(i.apply(this,arguments),e[1],e[2])}),n&&(f_[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function mHe(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function gHe(t){var e=t.match(NL),n,r;for(n=0,r=e.length;n<r;n++)f_[e[n]]?e[n]=f_[e[n]]:e[n]=mHe(e[n]);return function(i){var a="",o;for(o=0;o<r;o++)a+=pd(e[o])?e[o].call(i,t):e[o];return a}}function gO(t,e){return t.isValid()?(e=Xre(e,t.localeData()),FL[e]=FL[e]||gHe(e),FL[e](t)):t.localeData().invalidDate()}function Xre(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(mO.lastIndex=0;n>=0&&mO.test(t);)t=t.replace(mO,r),mO.lastIndex=0,n-=1;return t}var vHe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function yHe(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(NL).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var bHe="Invalid date";function _He(){return this._invalidDate}var wHe="%d",xHe=/\d{1,2}/;function SHe(t){return this._ordinal.replace("%d",t)}var AHe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function kHe(t,e,n,r){var i=this._relativeTime[n];return pd(i)?i(t,e,n,r):i.replace(/%d/i,t)}function EHe(t,e){var n=this._relativeTime[t>0?"future":"past"];return pd(n)?n(e):n.replace(/%s/i,e)}var Jre={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function nu(t){return typeof t=="string"?Jre[t]||Jre[t.toLowerCase()]:void 0}function VL(t){var e={},n,r;for(r in t)Cr(t,r)&&(n=nu(r),n&&(e[n]=t[r]));return e}var THe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function DHe(t){var e=[],n;for(n in t)Cr(t,n)&&e.push({unit:n,priority:THe[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var eie=/\d/,pl=/\d\d/,tie=/\d{3}/,BL=/\d{4}/,vO=/[+-]?\d{6}/,Ai=/\d\d?/,nie=/\d\d\d\d?/,rie=/\d\d\d\d\d\d?/,yO=/\d{1,3}/,UL=/\d{1,4}/,bO=/[+-]?\d{1,6}/,h_=/\d+/,_O=/[+-]?\d+/,OHe=/Z|[+-]\d\d:?\d\d/gi,wO=/Z|[+-]\d\d(?::?\d\d)?/gi,CHe=/[+-]?\d+(\.\d{1,3})?/,N1=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,p_=/^[1-9]\d?/,WL=/^([1-9]\d|\d)/,xO;xO={};function sn(t,e,n){xO[t]=pd(e)?e:function(r,i){return r&&n?n:e}}function IHe(t,e){return Cr(xO,t)?xO[t](e._strict,e._locale):new RegExp(MHe(t))}function MHe(t){return vf(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,a){return n||r||i||a}))}function vf(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ru(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function gr(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=ru(e)),n}var zL={};function ri(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),gf(e)&&(r=function(a,o){o[e]=gr(a)}),i=t.length,n=0;n<i;n++)zL[t[n]]=r}function F1(t,e){ri(t,function(n,r,i,a){i._w=i._w||{},e(n,i._w,i,a)})}function RHe(t,e,n){e!=null&&Cr(zL,t)&&zL[t](e,n._a,n,t)}function SO(t){return t%4===0&&t%100!==0||t%400===0}var Go=0,yf=1,gd=2,ja=3,rc=4,bf=5,xg=6,$He=7,PHe=8;On("Y",0,0,function(){var t=this.year();return t<=9999?md(t,4):"+"+t}),On(0,["YY",2],0,function(){return this.year()%100}),On(0,["YYYY",4],0,"year"),On(0,["YYYYY",5],0,"year"),On(0,["YYYYYY",6,!0],0,"year"),sn("Y",_O),sn("YY",Ai,pl),sn("YYYY",UL,BL),sn("YYYYY",bO,vO),sn("YYYYYY",bO,vO),ri(["YYYYY","YYYYYY"],Go),ri("YYYY",function(t,e){e[Go]=t.length===2?Yt.parseTwoDigitYear(t):gr(t)}),ri("YY",function(t,e){e[Go]=Yt.parseTwoDigitYear(t)}),ri("Y",function(t,e){e[Go]=parseInt(t,10)});function V1(t){return SO(t)?366:365}Yt.parseTwoDigitYear=function(t){return gr(t)+(gr(t)>68?1900:2e3)};var iie=m_("FullYear",!0);function LHe(){return SO(this.year())}function m_(t,e){return function(n){return n!=null?(aie(this,t,n),Yt.updateOffset(this,e),this):B1(this,t)}}function B1(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function aie(t,e,n){var r,i,a,o,s;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,o=t.month(),s=t.date(),s=s===29&&o===1&&!SO(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function NHe(t){return t=nu(t),pd(this[t])?this[t]():this}function FHe(t,e){if(typeof t=="object"){t=VL(t);var n=DHe(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=nu(t),pd(this[t]))return this[t](e);return this}function VHe(t,e){return(t%e+e)%e}var ba;Array.prototype.indexOf?ba=Array.prototype.indexOf:ba=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function jL(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=VHe(e,12);return t+=(e-n)/12,n===1?SO(t)?29:28:31-n%7%2}On("M",["MM",2],"Mo",function(){return this.month()+1}),On("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),On("MMMM",0,0,function(t){return this.localeData().months(this,t)}),sn("M",Ai,p_),sn("MM",Ai,pl),sn("MMM",function(t,e){return e.monthsShortRegex(t)}),sn("MMMM",function(t,e){return e.monthsRegex(t)}),ri(["M","MM"],function(t,e){e[yf]=gr(t)-1}),ri(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[yf]=i:nr(n).invalidMonth=t});var BHe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),oie="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),sie=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,UHe=N1,WHe=N1;function zHe(t,e){return t?tc(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||sie).test(e)?"format":"standalone"][t.month()]:tc(this._months)?this._months:this._months.standalone}function jHe(t,e){return t?tc(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[sie.test(e)?"format":"standalone"][t.month()]:tc(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function HHe(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=hd([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?e==="MMM"?(i=ba.call(this._shortMonthsParse,o),i!==-1?i:null):(i=ba.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=ba.call(this._shortMonthsParse,o),i!==-1?i:(i=ba.call(this._longMonthsParse,o),i!==-1?i:null)):(i=ba.call(this._longMonthsParse,o),i!==-1?i:(i=ba.call(this._shortMonthsParse,o),i!==-1?i:null))}function YHe(t,e,n){var r,i,a;if(this._monthsParseExact)return HHe.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=hd([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function lie(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=gr(e);else if(e=t.localeData().monthsParse(e),!gf(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,jL(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function uie(t){return t!=null?(lie(this,t),Yt.updateOffset(this,!0),this):B1(this,"Month")}function qHe(){return jL(this.year(),this.month())}function KHe(t){return this._monthsParseExact?(Cr(this,"_monthsRegex")||cie.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Cr(this,"_monthsShortRegex")||(this._monthsShortRegex=UHe),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function GHe(t){return this._monthsParseExact?(Cr(this,"_monthsRegex")||cie.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Cr(this,"_monthsRegex")||(this._monthsRegex=WHe),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function cie(){function t(l,c){return c.length-l.length}var e=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=hd([2e3,i]),o=vf(this.monthsShort(a,"")),s=vf(this.months(a,"")),e.push(o),n.push(s),r.push(s),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ZHe(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}function U1(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function AO(t,e,n){var r=7+e-n,i=(7+U1(t,0,r).getUTCDay()-e)%7;return-i+r-1}function die(t,e,n,r,i){var a=(7+n-r)%7,o=AO(t,r,i),s=1+7*(e-1)+a+o,l,c;return s<=0?(l=t-1,c=V1(l)+s):s>V1(t)?(l=t+1,c=s-V1(t)):(l=t,c=s),{year:l,dayOfYear:c}}function W1(t,e,n){var r=AO(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=t.year()-1,a=i+_f(o,e,n)):i>_f(t.year(),e,n)?(a=i-_f(t.year(),e,n),o=t.year()+1):(o=t.year(),a=i),{week:a,year:o}}function _f(t,e,n){var r=AO(t,e,n),i=AO(t+1,e,n);return(V1(t)-r+i)/7}On("w",["ww",2],"wo","week"),On("W",["WW",2],"Wo","isoWeek"),sn("w",Ai,p_),sn("ww",Ai,pl),sn("W",Ai,p_),sn("WW",Ai,pl),F1(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=gr(t)});function QHe(t){return W1(t,this._week.dow,this._week.doy).week}var XHe={dow:0,doy:6};function JHe(){return this._week.dow}function e9e(){return this._week.doy}function t9e(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function n9e(t){var e=W1(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}On("d",0,"do","day"),On("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),On("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),On("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),On("e",0,0,"weekday"),On("E",0,0,"isoWeekday"),sn("d",Ai),sn("e",Ai),sn("E",Ai),sn("dd",function(t,e){return e.weekdaysMinRegex(t)}),sn("ddd",function(t,e){return e.weekdaysShortRegex(t)}),sn("dddd",function(t,e){return e.weekdaysRegex(t)}),F1(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:nr(n).invalidWeekday=t}),F1(["d","e","E"],function(t,e,n,r){e[r]=gr(t)});function r9e(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function i9e(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function HL(t,e){return t.slice(e,7).concat(t.slice(0,e))}var a9e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),fie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),o9e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),s9e=N1,l9e=N1,u9e=N1;function c9e(t,e){var n=tc(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?HL(n,this._week.dow):t?n[t.day()]:n}function d9e(t){return t===!0?HL(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function f9e(t){return t===!0?HL(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function h9e(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=hd([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?e==="dddd"?(i=ba.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=ba.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=ba.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=ba.call(this._weekdaysParse,o),i!==-1||(i=ba.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=ba.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=ba.call(this._shortWeekdaysParse,o),i!==-1||(i=ba.call(this._weekdaysParse,o),i!==-1)?i:(i=ba.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=ba.call(this._minWeekdaysParse,o),i!==-1||(i=ba.call(this._weekdaysParse,o),i!==-1)?i:(i=ba.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function p9e(t,e,n){var r,i,a;if(this._weekdaysParseExact)return h9e.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=hd([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function m9e(t){if(!this.isValid())return t!=null?this:NaN;var e=B1(this,"Day");return t!=null?(t=r9e(t,this.localeData()),this.add(t-e,"d")):e}function g9e(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function v9e(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=i9e(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function y9e(t){return this._weekdaysParseExact?(Cr(this,"_weekdaysRegex")||YL.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Cr(this,"_weekdaysRegex")||(this._weekdaysRegex=s9e),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function b9e(t){return this._weekdaysParseExact?(Cr(this,"_weekdaysRegex")||YL.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Cr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=l9e),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _9e(t){return this._weekdaysParseExact?(Cr(this,"_weekdaysRegex")||YL.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Cr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=u9e),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function YL(){function t(f,h){return h.length-f.length}var e=[],n=[],r=[],i=[],a,o,s,l,c;for(a=0;a<7;a++)o=hd([2e3,1]).day(a),s=vf(this.weekdaysMin(o,"")),l=vf(this.weekdaysShort(o,"")),c=vf(this.weekdays(o,"")),e.push(s),n.push(l),r.push(c),i.push(s),i.push(l),i.push(c);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function qL(){return this.hours()%12||12}function w9e(){return this.hours()||24}On("H",["HH",2],0,"hour"),On("h",["hh",2],0,qL),On("k",["kk",2],0,w9e),On("hmm",0,0,function(){return""+qL.apply(this)+md(this.minutes(),2)}),On("hmmss",0,0,function(){return""+qL.apply(this)+md(this.minutes(),2)+md(this.seconds(),2)}),On("Hmm",0,0,function(){return""+this.hours()+md(this.minutes(),2)}),On("Hmmss",0,0,function(){return""+this.hours()+md(this.minutes(),2)+md(this.seconds(),2)});function hie(t,e){On(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}hie("a",!0),hie("A",!1);function pie(t,e){return e._meridiemParse}sn("a",pie),sn("A",pie),sn("H",Ai,WL),sn("h",Ai,p_),sn("k",Ai,p_),sn("HH",Ai,pl),sn("hh",Ai,pl),sn("kk",Ai,pl),sn("hmm",nie),sn("hmmss",rie),sn("Hmm",nie),sn("Hmmss",rie),ri(["H","HH"],ja),ri(["k","kk"],function(t,e,n){var r=gr(t);e[ja]=r===24?0:r}),ri(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ri(["h","hh"],function(t,e,n){e[ja]=gr(t),nr(n).bigHour=!0}),ri("hmm",function(t,e,n){var r=t.length-2;e[ja]=gr(t.substr(0,r)),e[rc]=gr(t.substr(r)),nr(n).bigHour=!0}),ri("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[ja]=gr(t.substr(0,r)),e[rc]=gr(t.substr(r,2)),e[bf]=gr(t.substr(i)),nr(n).bigHour=!0}),ri("Hmm",function(t,e,n){var r=t.length-2;e[ja]=gr(t.substr(0,r)),e[rc]=gr(t.substr(r))}),ri("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[ja]=gr(t.substr(0,r)),e[rc]=gr(t.substr(r,2)),e[bf]=gr(t.substr(i))});function x9e(t){return(t+"").toLowerCase().charAt(0)==="p"}var S9e=/[ap]\.?m?\.?/i,A9e=m_("Hours",!0);function k9e(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var mie={calendar:hHe,longDateFormat:vHe,invalidDate:bHe,ordinal:wHe,dayOfMonthOrdinalParse:xHe,relativeTime:AHe,months:BHe,monthsShort:oie,week:XHe,weekdays:a9e,weekdaysMin:o9e,weekdaysShort:fie,meridiemParse:S9e},Bi={},z1={},j1;function E9e(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function gie(t){return t&&t.toLowerCase().replace("_","-")}function T9e(t){for(var e=0,n,r,i,a;e<t.length;){for(a=gie(t[e]).split("-"),n=a.length,r=gie(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=kO(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&E9e(a,r)>=n-1)break;n--}e++}return j1}function D9e(t){return!!(t&&t.match("^[^/\\\\]*$"))}function kO(t){var e=null,n;if(Bi[t]===void 0&&typeof module<"u"&&module&&module.exports&&D9e(t))try{e=j1._abbr,n=require,n("./locale/"+t),Ip(e)}catch{Bi[t]=null}return Bi[t]}function Ip(t,e){var n;return t&&(Ws(e)?n=wf(t):n=KL(t,e),n?j1=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),j1._abbr}function KL(t,e){if(e!==null){var n,r=mie;if(e.abbr=t,Bi[t]!=null)Qre("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Bi[t]._config;else if(e.parentLocale!=null)if(Bi[e.parentLocale]!=null)r=Bi[e.parentLocale]._config;else if(n=kO(e.parentLocale),n!=null)r=n._config;else return z1[e.parentLocale]||(z1[e.parentLocale]=[]),z1[e.parentLocale].push({name:t,config:e}),null;return Bi[t]=new PL($L(r,e)),z1[t]&&z1[t].forEach(function(i){KL(i.name,i.config)}),Ip(t),Bi[t]}else return delete Bi[t],null}function O9e(t,e){if(e!=null){var n,r,i=mie;Bi[t]!=null&&Bi[t].parentLocale!=null?Bi[t].set($L(Bi[t]._config,e)):(r=kO(t),r!=null&&(i=r._config),e=$L(i,e),r==null&&(e.abbr=t),n=new PL(e),n.parentLocale=Bi[t],Bi[t]=n),Ip(t)}else Bi[t]!=null&&(Bi[t].parentLocale!=null?(Bi[t]=Bi[t].parentLocale,t===Ip()&&Ip(t)):Bi[t]!=null&&delete Bi[t]);return Bi[t]}function wf(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return j1;if(!tc(t)){if(e=kO(t),e)return e;t=[t]}return T9e(t)}function C9e(){return LL(Bi)}function GL(t){var e,n=t._a;return n&&nr(t).overflow===-2&&(e=n[yf]<0||n[yf]>11?yf:n[gd]<1||n[gd]>jL(n[Go],n[yf])?gd:n[ja]<0||n[ja]>24||n[ja]===24&&(n[rc]!==0||n[bf]!==0||n[xg]!==0)?ja:n[rc]<0||n[rc]>59?rc:n[bf]<0||n[bf]>59?bf:n[xg]<0||n[xg]>999?xg:-1,nr(t)._overflowDayOfYear&&(e<Go||e>gd)&&(e=gd),nr(t)._overflowWeeks&&e===-1&&(e=$He),nr(t)._overflowWeekday&&e===-1&&(e=PHe),nr(t).overflow=e),t}var I9e=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,M9e=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,R9e=/Z|[+-]\d\d(?::?\d\d)?/,EO=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ZL=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],$9e=/^\/?Date\((-?\d+)/i,P9e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,L9e={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function vie(t){var e,n,r=t._i,i=I9e.exec(r)||M9e.exec(r),a,o,s,l,c=EO.length,f=ZL.length;if(i){for(nr(t).iso=!0,e=0,n=c;e<n;e++)if(EO[e][1].exec(i[1])){o=EO[e][0],a=EO[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=f;e<n;e++)if(ZL[e][1].exec(i[3])){s=(i[2]||" ")+ZL[e][0];break}if(s==null){t._isValid=!1;return}}if(!a&&s!=null){t._isValid=!1;return}if(i[4])if(R9e.exec(i[4]))l="Z";else{t._isValid=!1;return}t._f=o+(s||"")+(l||""),XL(t)}else t._isValid=!1}function N9e(t,e,n,r,i,a){var o=[F9e(t),oie.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function F9e(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function V9e(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function B9e(t,e,n){if(t){var r=fie.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return nr(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function U9e(t,e,n){if(t)return L9e[t];if(e)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function yie(t){var e=P9e.exec(V9e(t._i)),n;if(e){if(n=N9e(e[4],e[3],e[2],e[5],e[6],e[7]),!B9e(e[1],n,t))return;t._a=n,t._tzm=U9e(e[8],e[9],e[10]),t._d=U1.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),nr(t).rfc2822=!0}else t._isValid=!1}function W9e(t){var e=$9e.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(vie(t),t._isValid===!1)delete t._isValid;else return;if(yie(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:Yt.createFromInputFallback(t)}Yt.createFromInputFallback=tu("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function g_(t,e,n){return t??e??n}function z9e(t){var e=new Date(Yt.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function QL(t){var e,n,r=[],i,a,o;if(!t._d){for(i=z9e(t),t._w&&t._a[gd]==null&&t._a[yf]==null&&j9e(t),t._dayOfYear!=null&&(o=g_(t._a[Go],i[Go]),(t._dayOfYear>V1(o)||t._dayOfYear===0)&&(nr(t)._overflowDayOfYear=!0),n=U1(o,0,t._dayOfYear),t._a[yf]=n.getUTCMonth(),t._a[gd]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[ja]===24&&t._a[rc]===0&&t._a[bf]===0&&t._a[xg]===0&&(t._nextDay=!0,t._a[ja]=0),t._d=(t._useUTC?U1:ZHe).apply(null,r),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ja]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==a&&(nr(t).weekdayMismatch=!0)}}function j9e(t){var e,n,r,i,a,o,s,l,c;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(a=1,o=4,n=g_(e.GG,t._a[Go],W1(ki(),1,4).year),r=g_(e.W,1),i=g_(e.E,1),(i<1||i>7)&&(l=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,c=W1(ki(),a,o),n=g_(e.gg,t._a[Go],c.year),r=g_(e.w,c.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+a,(e.e<0||e.e>6)&&(l=!0)):i=a),r<1||r>_f(n,a,o)?nr(t)._overflowWeeks=!0:l!=null?nr(t)._overflowWeekday=!0:(s=die(n,r,i,a,o),t._a[Go]=s.year,t._dayOfYear=s.dayOfYear)}Yt.ISO_8601=function(){},Yt.RFC_2822=function(){};function XL(t){if(t._f===Yt.ISO_8601){vie(t);return}if(t._f===Yt.RFC_2822){yie(t);return}t._a=[],nr(t).empty=!0;var e=""+t._i,n,r,i,a,o,s=e.length,l=0,c,f;for(i=Xre(t._f,t._locale).match(NL)||[],f=i.length,n=0;n<f;n++)a=i[n],r=(e.match(IHe(a,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&nr(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),l+=r.length),f_[a]?(r?nr(t).empty=!1:nr(t).unusedTokens.push(a),RHe(a,r,t)):t._strict&&!r&&nr(t).unusedTokens.push(a);nr(t).charsLeftOver=s-l,e.length>0&&nr(t).unusedInput.push(e),t._a[ja]<=12&&nr(t).bigHour===!0&&t._a[ja]>0&&(nr(t).bigHour=void 0),nr(t).parsedDateParts=t._a.slice(0),nr(t).meridiem=t._meridiem,t._a[ja]=H9e(t._locale,t._a[ja],t._meridiem),c=nr(t).era,c!==null&&(t._a[Go]=t._locale.erasConvertYear(c,t._a[Go])),QL(t),GL(t)}function H9e(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function Y9e(t){var e,n,r,i,a,o,s=!1,l=t._f.length;if(l===0){nr(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<l;i++)a=0,o=!1,e=RL({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],XL(e),IL(e)&&(o=!0),a+=nr(e).charsLeftOver,a+=nr(e).unusedTokens.length*10,nr(e).score=a,s?a<r&&(r=a,n=e):(r==null||a<r||o)&&(r=a,n=e,o&&(s=!0));Cp(t,n||e)}function q9e(t){if(!t._d){var e=VL(t._i),n=e.day===void 0?e.date:e.day;t._a=qre([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),QL(t)}}function K9e(t){var e=new L1(GL(bie(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function bie(t){var e=t._i,n=t._f;return t._locale=t._locale||wf(t._l),e===null||n===void 0&&e===""?pO({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),nc(e)?new L1(GL(e)):(P1(e)?t._d=e:tc(n)?Y9e(t):n?XL(t):G9e(t),IL(t)||(t._d=null),t))}function G9e(t){var e=t._i;Ws(e)?t._d=new Date(Yt.now()):P1(e)?t._d=new Date(e.valueOf()):typeof e=="string"?W9e(t):tc(e)?(t._a=qre(e.slice(0),function(n){return parseInt(n,10)}),QL(t)):wg(e)?q9e(t):gf(e)?t._d=new Date(e):Yt.createFromInputFallback(t)}function _ie(t,e,n,r,i){var a={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(wg(t)&&OL(t)||tc(t)&&t.length===0)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=t,a._f=e,a._strict=r,K9e(a)}function ki(t,e,n,r){return _ie(t,e,n,r,!1)}var Z9e=tu("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ki.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:pO()}),Q9e=tu("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ki.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:pO()});function wie(t,e){var n,r;if(e.length===1&&tc(e[0])&&(e=e[0]),!e.length)return ki();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function X9e(){var t=[].slice.call(arguments,0);return wie("isBefore",t)}function J9e(){var t=[].slice.call(arguments,0);return wie("isAfter",t)}var eYe=function(){return Date.now?Date.now():+new Date},H1=["year","quarter","month","week","day","hour","minute","second","millisecond"];function tYe(t){var e,n=!1,r,i=H1.length;for(e in t)if(Cr(t,e)&&!(ba.call(H1,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[H1[r]]){if(n)return!1;parseFloat(t[H1[r]])!==gr(t[H1[r]])&&(n=!0)}return!0}function nYe(){return this._isValid}function rYe(){return ic(NaN)}function TO(t){var e=VL(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,c=e.second||0,f=e.millisecond||0;this._isValid=tYe(e),this._milliseconds=+f+c*1e3+l*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=wf(),this._bubble()}function DO(t){return t instanceof TO}function JL(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function iYe(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),a=0,o;for(o=0;o<r;o++)gr(t[o])!==gr(e[o])&&a++;return a+i}function xie(t,e){On(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+md(~~(n/60),2)+e+md(~~n%60,2)})}xie("Z",":"),xie("ZZ",""),sn("Z",wO),sn("ZZ",wO),ri(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=eN(wO,t)});var aYe=/([\+\-]|\d\d)/gi;function eN(t,e){var n=(e||"").match(t),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(aYe)||["-",0,0],a=+(i[1]*60)+gr(i[2]),a===0?0:i[0]==="+"?a:-a)}function tN(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(nc(t)||P1(t)?t.valueOf():ki(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Yt.updateOffset(n,!1),n):ki(t).local()}function nN(t){return-Math.round(t._d.getTimezoneOffset())}Yt.updateOffset=function(){};function oYe(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=eN(wO,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=nN(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?Eie(this,ic(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Yt.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:nN(this)}function sYe(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function lYe(t){return this.utcOffset(0,t)}function uYe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(nN(this),"m")),this}function cYe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=eN(OHe,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function dYe(t){return this.isValid()?(t=t?ki(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function fYe(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hYe(){if(!Ws(this._isDSTShifted))return this._isDSTShifted;var t={},e;return RL(t,this),t=bie(t),t._a?(e=t._isUTC?hd(t._a):ki(t._a),this._isDSTShifted=this.isValid()&&iYe(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function pYe(){return this.isValid()?!this._isUTC:!1}function mYe(){return this.isValid()?this._isUTC:!1}function Sie(){return this.isValid()?this._isUTC&&this._offset===0:!1}var gYe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,vYe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ic(t,e){var n=t,r=null,i,a,o;return DO(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:gf(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=gYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:gr(r[gd])*i,h:gr(r[ja])*i,m:gr(r[rc])*i,s:gr(r[bf])*i,ms:gr(JL(r[xg]*1e3))*i}):(r=vYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:Sg(r[2],i),M:Sg(r[3],i),w:Sg(r[4],i),d:Sg(r[5],i),h:Sg(r[6],i),m:Sg(r[7],i),s:Sg(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=yYe(ki(n.from),ki(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new TO(n),DO(t)&&Cr(t,"_locale")&&(a._locale=t._locale),DO(t)&&Cr(t,"_isValid")&&(a._isValid=t._isValid),a}ic.fn=TO.prototype,ic.invalid=rYe;function Sg(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Aie(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function yYe(t,e){var n;return t.isValid()&&e.isValid()?(e=tN(e,t),t.isBefore(e)?n=Aie(t,e):(n=Aie(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function kie(t,e){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(Qre(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=ic(n,r),Eie(this,i,t),this}}function Eie(t,e,n,r){var i=e._milliseconds,a=JL(e._days),o=JL(e._months);t.isValid()&&(r=r??!0,o&&lie(t,B1(t,"Month")+o*n),a&&aie(t,"Date",B1(t,"Date")+a*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&Yt.updateOffset(t,a||o))}var bYe=kie(1,"add"),_Ye=kie(-1,"subtract");function Tie(t){return typeof t=="string"||t instanceof String}function wYe(t){return nc(t)||P1(t)||Tie(t)||gf(t)||SYe(t)||xYe(t)||t===null||t===void 0}function xYe(t){var e=wg(t)&&!OL(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n=n||Cr(t,a);return e&&n}function SYe(t){var e=tc(t),n=!1;return e&&(n=t.filter(function(r){return!gf(r)&&Tie(t)}).length===0),e&&n}function AYe(t){var e=wg(t)&&!OL(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||Cr(t,a);return e&&n}function kYe(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function EYe(t,e){arguments.length===1&&(arguments[0]?wYe(arguments[0])?(t=arguments[0],e=void 0):AYe(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||ki(),r=tN(n,this).startOf("day"),i=Yt.calendarFormat(this,r)||"sameElse",a=e&&(pd(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,ki(n)))}function TYe(){return new L1(this)}function DYe(t,e){var n=nc(t)?t:ki(t);return this.isValid()&&n.isValid()?(e=nu(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function OYe(t,e){var n=nc(t)?t:ki(t);return this.isValid()&&n.isValid()?(e=nu(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function CYe(t,e,n,r){var i=nc(t)?t:ki(t),a=nc(e)?e:ki(e);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function IYe(t,e){var n=nc(t)?t:ki(t),r;return this.isValid()&&n.isValid()?(e=nu(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function MYe(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function RYe(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function $Ye(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(r=tN(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=nu(e),e){case"year":a=OO(this,r)/12;break;case"month":a=OO(this,r);break;case"quarter":a=OO(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:ru(a)}function OO(t,e){if(t.date()<e.date())return-OO(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,a;return e-r<0?(i=t.clone().add(n-1,"months"),a=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),a=(e-r)/(i-r)),-(n+a)||0}Yt.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",Yt.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function PYe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function LYe(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?gO(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):pd(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",gO(n,"Z")):gO(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function NYe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,a;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=e+'[")]',this.format(n+r+i+a)}function FYe(t){t||(t=this.isUtc()?Yt.defaultFormatUtc:Yt.defaultFormat);var e=gO(this,t);return this.localeData().postformat(e)}function VYe(t,e){return this.isValid()&&(nc(t)&&t.isValid()||ki(t).isValid())?ic({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function BYe(t){return this.from(ki(),t)}function UYe(t,e){return this.isValid()&&(nc(t)&&t.isValid()||ki(t).isValid())?ic({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function WYe(t){return this.to(ki(),t)}function Die(t){var e;return t===void 0?this._locale._abbr:(e=wf(t),e!=null&&(this._locale=e),this)}var Oie=tu("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function Cie(){return this._locale}var CO=1e3,v_=60*CO,IO=60*v_,Iie=(365*400+97)*24*IO;function y_(t,e){return(t%e+e)%e}function Mie(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-Iie:new Date(t,e,n).valueOf()}function Rie(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-Iie:Date.UTC(t,e,n)}function zYe(t){var e,n;if(t=nu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Rie:Mie,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=y_(e+(this._isUTC?0:this.utcOffset()*v_),IO);break;case"minute":e=this._d.valueOf(),e-=y_(e,v_);break;case"second":e=this._d.valueOf(),e-=y_(e,CO);break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function jYe(t){var e,n;if(t=nu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Rie:Mie,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=IO-y_(e+(this._isUTC?0:this.utcOffset()*v_),IO)-1;break;case"minute":e=this._d.valueOf(),e+=v_-y_(e,v_)-1;break;case"second":e=this._d.valueOf(),e+=CO-y_(e,CO)-1;break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function HYe(){return this._d.valueOf()-(this._offset||0)*6e4}function YYe(){return Math.floor(this.valueOf()/1e3)}function qYe(){return new Date(this.valueOf())}function KYe(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function GYe(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function ZYe(){return this.isValid()?this.toISOString():null}function QYe(){return IL(this)}function XYe(){return Cp({},nr(this))}function JYe(){return nr(this).overflow}function e7e(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}On("N",0,0,"eraAbbr"),On("NN",0,0,"eraAbbr"),On("NNN",0,0,"eraAbbr"),On("NNNN",0,0,"eraName"),On("NNNNN",0,0,"eraNarrow"),On("y",["y",1],"yo","eraYear"),On("y",["yy",2],0,"eraYear"),On("y",["yyy",3],0,"eraYear"),On("y",["yyyy",4],0,"eraYear"),sn("N",rN),sn("NN",rN),sn("NNN",rN),sn("NNNN",d7e),sn("NNNNN",f7e),ri(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?nr(n).era=i:nr(n).invalidEra=t}),sn("y",h_),sn("yy",h_),sn("yyy",h_),sn("yyyy",h_),sn("yo",h7e),ri(["y","yy","yyy","yyyy"],Go),ri(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Go]=n._locale.eraYearOrdinalParse(t,i):e[Go]=parseInt(t,10)});function t7e(t,e){var n,r,i,a=this._eras||wf("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=Yt(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=Yt(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function n7e(t,e,n){var r,i,a=this.eras(),o,s,l;for(t=t.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),l=a[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return a[r];break;case"NNNN":if(o===t)return a[r];break;case"NNNNN":if(l===t)return a[r];break}else if([o,s,l].indexOf(t)>=0)return a[r]}function r7e(t,e){var n=t.since<=t.until?1:-1;return e===void 0?Yt(t.since).year():Yt(t.since).year()+(e-t.offset)*n}function i7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function a7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function o7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function s7e(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-Yt(i[t].since).year())*n+i[t].offset;return this.year()}function l7e(t){return Cr(this,"_erasNameRegex")||iN.call(this),t?this._erasNameRegex:this._erasRegex}function u7e(t){return Cr(this,"_erasAbbrRegex")||iN.call(this),t?this._erasAbbrRegex:this._erasRegex}function c7e(t){return Cr(this,"_erasNarrowRegex")||iN.call(this),t?this._erasNarrowRegex:this._erasRegex}function rN(t,e){return e.erasAbbrRegex(t)}function d7e(t,e){return e.erasNameRegex(t)}function f7e(t,e){return e.erasNarrowRegex(t)}function h7e(t,e){return e._eraYearOrdinalRegex||h_}function iN(){var t=[],e=[],n=[],r=[],i,a,o,s,l,c=this.eras();for(i=0,a=c.length;i<a;++i)o=vf(c[i].name),s=vf(c[i].abbr),l=vf(c[i].narrow),e.push(o),t.push(s),n.push(l),r.push(o),r.push(s),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}On(0,["gg",2],0,function(){return this.weekYear()%100}),On(0,["GG",2],0,function(){return this.isoWeekYear()%100});function MO(t,e){On(0,[t,t.length],0,e)}MO("gggg","weekYear"),MO("ggggg","weekYear"),MO("GGGG","isoWeekYear"),MO("GGGGG","isoWeekYear"),sn("G",_O),sn("g",_O),sn("GG",Ai,pl),sn("gg",Ai,pl),sn("GGGG",UL,BL),sn("gggg",UL,BL),sn("GGGGG",bO,vO),sn("ggggg",bO,vO),F1(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=gr(t)}),F1(["gg","GG"],function(t,e,n,r){e[r]=Yt.parseTwoDigitYear(t)});function p7e(t){return $ie.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function m7e(t){return $ie.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function g7e(){return _f(this.year(),1,4)}function v7e(){return _f(this.isoWeekYear(),1,4)}function y7e(){var t=this.localeData()._week;return _f(this.year(),t.dow,t.doy)}function b7e(){var t=this.localeData()._week;return _f(this.weekYear(),t.dow,t.doy)}function $ie(t,e,n,r,i){var a;return t==null?W1(this,r,i).year:(a=_f(t,r,i),e>a&&(e=a),_7e.call(this,t,e,n,r,i))}function _7e(t,e,n,r,i){var a=die(t,e,n,r,i),o=U1(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}On("Q",0,"Qo","quarter"),sn("Q",eie),ri("Q",function(t,e){e[yf]=(gr(t)-1)*3});function w7e(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}On("D",["DD",2],"Do","date"),sn("D",Ai,p_),sn("DD",Ai,pl),sn("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ri(["D","DD"],gd),ri("Do",function(t,e){e[gd]=gr(t.match(Ai)[0])});var Pie=m_("Date",!0);On("DDD",["DDDD",3],"DDDo","dayOfYear"),sn("DDD",yO),sn("DDDD",tie),ri(["DDD","DDDD"],function(t,e,n){n._dayOfYear=gr(t)});function x7e(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}On("m",["mm",2],0,"minute"),sn("m",Ai,WL),sn("mm",Ai,pl),ri(["m","mm"],rc);var S7e=m_("Minutes",!1);On("s",["ss",2],0,"second"),sn("s",Ai,WL),sn("ss",Ai,pl),ri(["s","ss"],bf);var A7e=m_("Seconds",!1);On("S",0,0,function(){return~~(this.millisecond()/100)}),On(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),On(0,["SSS",3],0,"millisecond"),On(0,["SSSS",4],0,function(){return this.millisecond()*10}),On(0,["SSSSS",5],0,function(){return this.millisecond()*100}),On(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),On(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),On(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),On(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),sn("S",yO,eie),sn("SS",yO,pl),sn("SSS",yO,tie);var Mp,Lie;for(Mp="SSSS";Mp.length<=9;Mp+="S")sn(Mp,h_);function k7e(t,e){e[xg]=gr(("0."+t)*1e3)}for(Mp="S";Mp.length<=9;Mp+="S")ri(Mp,k7e);Lie=m_("Milliseconds",!1),On("z",0,0,"zoneAbbr"),On("zz",0,0,"zoneName");function E7e(){return this._isUTC?"UTC":""}function T7e(){return this._isUTC?"Coordinated Universal Time":""}var Pt=L1.prototype;Pt.add=bYe,Pt.calendar=EYe,Pt.clone=TYe,Pt.diff=$Ye,Pt.endOf=jYe,Pt.format=FYe,Pt.from=VYe,Pt.fromNow=BYe,Pt.to=UYe,Pt.toNow=WYe,Pt.get=NHe,Pt.invalidAt=JYe,Pt.isAfter=DYe,Pt.isBefore=OYe,Pt.isBetween=CYe,Pt.isSame=IYe,Pt.isSameOrAfter=MYe,Pt.isSameOrBefore=RYe,Pt.isValid=QYe,Pt.lang=Oie,Pt.locale=Die,Pt.localeData=Cie,Pt.max=Q9e,Pt.min=Z9e,Pt.parsingFlags=XYe,Pt.set=FHe,Pt.startOf=zYe,Pt.subtract=_Ye,Pt.toArray=KYe,Pt.toObject=GYe,Pt.toDate=qYe,Pt.toISOString=LYe,Pt.inspect=NYe,typeof Symbol<"u"&&Symbol.for!=null&&(Pt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Pt.toJSON=ZYe,Pt.toString=PYe,Pt.unix=YYe,Pt.valueOf=HYe,Pt.creationData=e7e,Pt.eraName=i7e,Pt.eraNarrow=a7e,Pt.eraAbbr=o7e,Pt.eraYear=s7e,Pt.year=iie,Pt.isLeapYear=LHe,Pt.weekYear=p7e,Pt.isoWeekYear=m7e,Pt.quarter=Pt.quarters=w7e,Pt.month=uie,Pt.daysInMonth=qHe,Pt.week=Pt.weeks=t9e,Pt.isoWeek=Pt.isoWeeks=n9e,Pt.weeksInYear=y7e,Pt.weeksInWeekYear=b7e,Pt.isoWeeksInYear=g7e,Pt.isoWeeksInISOWeekYear=v7e,Pt.date=Pie,Pt.day=Pt.days=m9e,Pt.weekday=g9e,Pt.isoWeekday=v9e,Pt.dayOfYear=x7e,Pt.hour=Pt.hours=A9e,Pt.minute=Pt.minutes=S7e,Pt.second=Pt.seconds=A7e,Pt.millisecond=Pt.milliseconds=Lie,Pt.utcOffset=oYe,Pt.utc=lYe,Pt.local=uYe,Pt.parseZone=cYe,Pt.hasAlignedHourOffset=dYe,Pt.isDST=fYe,Pt.isLocal=pYe,Pt.isUtcOffset=mYe,Pt.isUtc=Sie,Pt.isUTC=Sie,Pt.zoneAbbr=E7e,Pt.zoneName=T7e,Pt.dates=tu("dates accessor is deprecated. Use date instead.",Pie),Pt.months=tu("months accessor is deprecated. Use month instead",uie),Pt.years=tu("years accessor is deprecated. Use year instead",iie),Pt.zone=tu("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",sYe),Pt.isDSTShifted=tu("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hYe);function D7e(t){return ki(t*1e3)}function O7e(){return ki.apply(null,arguments).parseZone()}function Nie(t){return t}var Ir=PL.prototype;Ir.calendar=pHe,Ir.longDateFormat=yHe,Ir.invalidDate=_He,Ir.ordinal=SHe,Ir.preparse=Nie,Ir.postformat=Nie,Ir.relativeTime=kHe,Ir.pastFuture=EHe,Ir.set=fHe,Ir.eras=t7e,Ir.erasParse=n7e,Ir.erasConvertYear=r7e,Ir.erasAbbrRegex=u7e,Ir.erasNameRegex=l7e,Ir.erasNarrowRegex=c7e,Ir.months=zHe,Ir.monthsShort=jHe,Ir.monthsParse=YHe,Ir.monthsRegex=GHe,Ir.monthsShortRegex=KHe,Ir.week=QHe,Ir.firstDayOfYear=e9e,Ir.firstDayOfWeek=JHe,Ir.weekdays=c9e,Ir.weekdaysMin=f9e,Ir.weekdaysShort=d9e,Ir.weekdaysParse=p9e,Ir.weekdaysRegex=y9e,Ir.weekdaysShortRegex=b9e,Ir.weekdaysMinRegex=_9e,Ir.isPM=x9e,Ir.meridiem=k9e;function RO(t,e,n,r){var i=wf(),a=hd().set(r,e);return i[n](a,t)}function Fie(t,e,n){if(gf(t)&&(e=t,t=void 0),t=t||"",e!=null)return RO(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=RO(t,r,n,"month");return i}function aN(t,e,n,r){typeof t=="boolean"?(gf(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,gf(e)&&(n=e,e=void 0),e=e||"");var i=wf(),a=t?i._week.dow:0,o,s=[];if(n!=null)return RO(e,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=RO(e,(o+a)%7,r,"day");return s}function C7e(t,e){return Fie(t,e,"months")}function I7e(t,e){return Fie(t,e,"monthsShort")}function M7e(t,e,n){return aN(t,e,n,"weekdays")}function R7e(t,e,n){return aN(t,e,n,"weekdaysShort")}function $7e(t,e,n){return aN(t,e,n,"weekdaysMin")}Ip("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=gr(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),Yt.lang=tu("moment.lang is deprecated. Use moment.locale instead.",Ip),Yt.langData=tu("moment.langData is deprecated. Use moment.localeData instead.",wf);var xf=Math.abs;function P7e(){var t=this._data;return this._milliseconds=xf(this._milliseconds),this._days=xf(this._days),this._months=xf(this._months),t.milliseconds=xf(t.milliseconds),t.seconds=xf(t.seconds),t.minutes=xf(t.minutes),t.hours=xf(t.hours),t.months=xf(t.months),t.years=xf(t.years),this}function Vie(t,e,n,r){var i=ic(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function L7e(t,e){return Vie(this,t,e,1)}function N7e(t,e){return Vie(this,t,e,-1)}function Bie(t){return t<0?Math.floor(t):Math.ceil(t)}function F7e(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,a,o,s,l;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=Bie(oN(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=ru(t/1e3),r.seconds=i%60,a=ru(i/60),r.minutes=a%60,o=ru(a/60),r.hours=o%24,e+=ru(o/24),l=ru(Uie(e)),n+=l,e-=Bie(oN(l)),s=ru(n/12),n%=12,r.days=e,r.months=n,r.years=s,this}function Uie(t){return t*4800/146097}function oN(t){return t*146097/4800}function V7e(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=nu(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+Uie(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(oN(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function Sf(t){return function(){return this.as(t)}}var Wie=Sf("ms"),B7e=Sf("s"),U7e=Sf("m"),W7e=Sf("h"),z7e=Sf("d"),j7e=Sf("w"),H7e=Sf("M"),Y7e=Sf("Q"),q7e=Sf("y"),K7e=Wie;function G7e(){return ic(this)}function Z7e(t){return t=nu(t),this.isValid()?this[t+"s"]():NaN}function Ag(t){return function(){return this.isValid()?this._data[t]:NaN}}var Q7e=Ag("milliseconds"),X7e=Ag("seconds"),J7e=Ag("minutes"),eqe=Ag("hours"),tqe=Ag("days"),nqe=Ag("months"),rqe=Ag("years");function iqe(){return ru(this.days()/7)}var Af=Math.round,b_={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function aqe(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function oqe(t,e,n,r){var i=ic(t).abs(),a=Af(i.as("s")),o=Af(i.as("m")),s=Af(i.as("h")),l=Af(i.as("d")),c=Af(i.as("M")),f=Af(i.as("w")),h=Af(i.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(p=p||f<=1&&["w"]||f<n.w&&["ww",f]),p=p||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h],p[2]=e,p[3]=+t>0,p[4]=r,aqe.apply(null,p)}function sqe(t){return t===void 0?Af:typeof t=="function"?(Af=t,!0):!1}function lqe(t,e){return b_[t]===void 0?!1:e===void 0?b_[t]:(b_[t]=e,t==="s"&&(b_.ss=e-1),!0)}function uqe(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=b_,i,a;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},b_,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),a=oqe(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var sN=Math.abs;function __(t){return(t>0)-(t<0)||+t}function $O(){if(!this.isValid())return this.localeData().invalidDate();var t=sN(this._milliseconds)/1e3,e=sN(this._days),n=sN(this._months),r,i,a,o,s=this.asSeconds(),l,c,f,h;return s?(r=ru(t/60),i=ru(r/60),t%=60,r%=60,a=ru(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",c=__(this._months)!==__(s)?"-":"",f=__(this._days)!==__(s)?"-":"",h=__(this._milliseconds)!==__(s)?"-":"",l+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(e?f+e+"D":"")+(i||r||t?"T":"")+(i?h+i+"H":"")+(r?h+r+"M":"")+(t?h+o+"S":"")):"P0D"}var kr=TO.prototype;kr.isValid=nYe,kr.abs=P7e,kr.add=L7e,kr.subtract=N7e,kr.as=V7e,kr.asMilliseconds=Wie,kr.asSeconds=B7e,kr.asMinutes=U7e,kr.asHours=W7e,kr.asDays=z7e,kr.asWeeks=j7e,kr.asMonths=H7e,kr.asQuarters=Y7e,kr.asYears=q7e,kr.valueOf=K7e,kr._bubble=F7e,kr.clone=G7e,kr.get=Z7e,kr.milliseconds=Q7e,kr.seconds=X7e,kr.minutes=J7e,kr.hours=eqe,kr.days=tqe,kr.weeks=iqe,kr.months=nqe,kr.years=rqe,kr.humanize=uqe,kr.toISOString=$O,kr.toString=$O,kr.toJSON=$O,kr.locale=Die,kr.localeData=Cie,kr.toIsoString=tu("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$O),kr.lang=Oie,On("X",0,0,"unix"),On("x",0,0,"valueOf"),sn("x",_O),sn("X",CHe),ri("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),ri("x",function(t,e,n){n._d=new Date(gr(t))});//! moment.js
208
- Yt.version="2.30.1",cHe(ki),Yt.fn=Pt,Yt.min=X9e,Yt.max=J9e,Yt.now=eYe,Yt.utc=hd,Yt.unix=D7e,Yt.months=C7e,Yt.isDate=P1,Yt.locale=Ip,Yt.invalid=pO,Yt.duration=ic,Yt.isMoment=nc,Yt.weekdays=M7e,Yt.parseZone=O7e,Yt.localeData=wf,Yt.isDuration=DO,Yt.monthsShort=I7e,Yt.weekdaysMin=$7e,Yt.defineLocale=KL,Yt.updateLocale=O9e,Yt.locales=C9e,Yt.weekdaysShort=R7e,Yt.normalizeUnits=nu,Yt.relativeTimeRounding=sqe,Yt.relativeTimeThreshold=lqe,Yt.calendarFormat=kYe,Yt.prototype=Pt,Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Rp=mb("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{hO.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),zie=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=S1(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=fd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=MP(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await bn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await bn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await bn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await bn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await bn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await bn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await bn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await bn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await bn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await bn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=cr(),{basicInfo:S}=Pn(w),T=Rp(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await bn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await bn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await bn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await bn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await bn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await bn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},cqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=Rp(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);Wt(()=>{S("loaded")}),Nj(()=>{S("loaded")});const f=Eu("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:""},{showLoading:!1})},p=fd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ve=vn();return ve||""}),v=cr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ve=l.value.permission;return{canUpdateName:ve==null?void 0:ve.has_edit_permission,canUpdateThumbnail:ve==null?void 0:ve.has_edit_permission,canArchive:ve==null?void 0:ve.has_archive_permission,canDelete:ve==null?void 0:ve.has_delete_permission,canUpdateAssignees:ve==null?void 0:ve.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ve==null?void 0:ve.has_edit_permission:0,canUpdateDate:ve==null?void 0:ve.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ve=>{o.value=!0,ve&&S("updateScene",ve)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=zie(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ve=l.value,Ue=ve.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ve,status:ve.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value}}catch(ve){return console.error(ve),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ve=>{const Ue=r.sceneId;return await M(Ue,ve)},{getEnvVariable:me}=fl(),Ee=Z(()=>{const ve=l.value,Ue=fd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ve.id,entity_id:ve.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status"},te=ve.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=mQ(g);Ge(de,hO.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return BZ},GirdItemSkeleton:jre};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),dqe=["id"];function fqe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[Ct(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,dqe)}const hqe=Nn(cqe,[["render",fqe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),pqe=1,mqe=t=>{const{handleGetSceneDetail:e}=zie(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>fd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=jt(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(pqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=Rp(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},gqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=Ml(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=mqe(l),v=(E,D)=>{h(E,D),r("update")};Wt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ig);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=gg("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return AT},InfoVisual:Zu,GridItemSkeleton:jre,GridItem:hqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),vqe={key:0,class:"empty-list"},yqe={class:"scene-item"},bqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function _qe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},Li({default:ze(({item:o,index:s})=>[X("div",yqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",bqe,[(R(),Y(wt,null,Zt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const lN=Nn(gqe,[["render",_qe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),jie=400,wqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=qD(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=of(s),c=re(!1),f=cr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||jie),g=ms(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ig);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");gg("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:jie,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Zu,SceneList:lN};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),xqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Sqe(t,e,n,r,i,a){return R(),Y("div",xqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Hie=Nn(wqe,[["render",Sqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Aqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=S1(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await bn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await bn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await bn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await bn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await bn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await bn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await bn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await bn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await bn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await bn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},kqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=cr();XE();const{userInfo:a}=Pn(i),{getEnvVariable:o}=fl(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Zi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:vn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await bn.downloadFileFromS3({scene_id:vn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await bn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Aqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:vn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=Eu("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Zi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:vn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Zi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:vn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("sceneHub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return qZ},get TessBreadcrumb(){return yT}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Eqe={class:"breadcrumb"};function Tqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Eqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Dqe=Nn(kqe,[["render",Tqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Oqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Cqe={class:"skeleton-comment"},Iqe={class:"comment-body"},Mqe={class:"body"},Rqe={class:"skeleton-details"};function $qe(t,e,n,r,i,a){return R(),Y("div",Cqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Iqe,[e[0]||(e[0]=bm('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",Mqe,[X("div",Rqe,[(R(!0),Y(wt,null,Zt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=bm('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const Pqe=Nn(Oqe,[["render",$qe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),kg=new Aw("CommentFile");kg.version(1).stores({files:"++id, files "});const Lqe=()=>{const t=async a=>{await kg.files.where("id").equals(a.id).first()?await kg.files.update(a.id,a):await kg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await kg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await kg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await kg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},Nqe=mb("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),Fqe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=Nqe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=Lqe(),p=re([]),g=re(null);vQ(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};Wt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Dqe,InfoVisual:Zu,CommentSkeleton:Pqe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),Vqe={ref:"commentListRef",class:"recent-comment"},Bqe={class:"empty-data"};function Uqe(t,e,n,r,i,a){return R(),Y("div",Vqe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",Bqe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Tn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Zt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Tn()),r.loading?(R(),Y(wt,{key:2},Zt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const PO=Nn(Fqe,[["render",Uqe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),Wqe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=qD(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ig);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");gg("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:PO};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function zqe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const uN=Nn(Wqe,[["render",zqe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),jqe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=qD(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ms(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ig);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");gg("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:PO};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function Hqe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const Yqe=Nn(jqe,[["render",Hqe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),qqe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:uN,comment_resolved:Yqe,rendition:iHe,scene:Hie,people_comment:uN,chart:uN,assigned_scene:Hie},r=t,i=re(r.tabs[0].id);Os(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=cr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ms(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hT}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Kqe={class:"tab-sections"},Gqe={class:"tab"},Zqe={class:"refresh-btn"};function Qqe(t,e,n,r,i,a){return R(),Y("div",Kqe,[X("div",Gqe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},Li({_:2},[Zt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(Bc(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",Zqe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const Xqe=Nn(qqe,[["render",Qqe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),Jqe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=yQ(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<bJ||c.value<700),{width:y}=of(r),{width:v,height:b}=of(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=of(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),dn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};Wt(()=>{P(),dn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Cs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),eKe=["id"],tKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function nKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",tKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,eKe)}const cN=Nn(Jqe,[["render",nKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),rKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);KFe(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),iKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function aKe(t,e,n,r,i,a){return R(),Y("div",iKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),Ct(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const oKe=Nn(rKe,[["render",aKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),sKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function lKe(t,e,n,r,i,a){return R(),Re(jc,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const uKe=Nn(sKe,[["render",lKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),cKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=Ml(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return Pw},get ArboTooltip(){return ur},PreferencePopup:oKe,SkeletonLoading:uKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),dKe={class:"section-title"},fKe={class:"title"},hKe={class:"actions"},pKe={class:"counting-chip"};function mKe(t,e,n,r,i,a){return R(),Y("div",dKe,[ke(t.$slots,"title",{},()=>[X("div",fKe,nt(n.title),1)],!0),X("div",hKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Tn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Tn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",pKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Tn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const LO=Nn(cKe,[["render",mKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),gKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":Sze,"target-points-tile":$ze,"unresolved-tile":Nze,"overdue-tile":Oze,"total-completed-tile":Eze},r=ms(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=yQ(),p=re(null),g=re(null),y=cr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=of(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=Bw(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:Xqe,ResizeLayout:cN,SectionTitle:LO,get BREAKPOINT_RESIZE(){return bJ}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),vKe={ref:"peopleHomeRef",class:"people-home"},yKe={ref:"topRef",class:"top"},bKe={ref:"sectionRef",class:"section-card-wrapper"},_Ke={class:"section-card"};function wKe(t,e,n,r,i,a){return R(),Y("div",vKe,[X("div",yKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",bKe,[X("div",_Ke,[(R(!0),Y(wt,null,Zt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(jc,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(Bc(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const xKe=Nn(gKe,[["render",wKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),SKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=cr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));Wt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return rf},get ArboTooltip(){return ur},get ArboSkeletonLoading(){return kb}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),AKe={class:"profile-image"},kKe={class:"profile-image__main--status-avatar"},EKe={class:"profile-image__main"},TKe={key:1};function DKe(t,e,n,r,i,a){return R(),Y("div",AKe,[X("div",kKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",EKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",TKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const OKe=Nn(SKe,[["render",DKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),CKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=jt({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=cr();let i=jt({isShow:!1}),a=jt({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await bn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=cr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=cQ(),{getEnvVariable:w}=fl(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||XBe(),ws_code:vn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=vn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),Wt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||cr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return Gi},get ArboTooltip(){return ur},get TessAssigneeSelect(){return c$},get ArboSkeletonLoading(){return kb},get ArboButton(){return Nt},get ArboIcon(){return Yn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),IKe={class:"info-detail-content"},MKe={class:"info-detail-content__main"},RKe={class:"info-detail-content__main--user-select"},$Ke={class:"info-detail-content__main--user-name"},PKe={key:1,class:"detail-row"},LKe={class:"icon-wrapper"},NKe={class:"content-wrapper"},FKe={class:"inline-content"},VKe={key:4,class:"inline-copy-button"},BKe={class:"info-detail-content__main--user-email"},UKe={key:1,class:"detail-row"},WKe={class:"icon-wrapper"},zKe={class:"content-wrapper"},jKe={class:"inline-content"},HKe={key:3,class:"inline-copy-button"};function YKe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",IKe,[X("div",MKe,[X("div",RKe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},Li({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[Ct(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",$Ke,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",PKe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",LKe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",NKe,[X("div",FKe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",VKe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",BKe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",UKe,[X("div",WKe,[he(r.ArboIcon,{name:"Email"})]),X("div",zKe,[X("div",jKe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",HKe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const qKe=Nn(CKe,[["render",YKe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),KKe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=fl(),s=cr(),{selectedDataId:l}=Pn(s);function c(){const h=Zi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:vn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return ur}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),GKe={class:"link-profile-button"};function ZKe(t,e,n,r,i,a){return R(),Y("div",GKe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const QKe=Nn(KKe,[["render",ZKe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),XKe=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=cr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=fl();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});Wt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return gT},get ArboSkeletonLoading(){return kb},LinkProfileCopied:QKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__content"},nGe={class:"info-detail-content__content--link-copy"},rGe={class:"info-detail-content__content--list-team-group"};function iGe(t,e,n,r,i,a){return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[X("div",nGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",rGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const aGe=Nn(XKe,[["render",iGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),oGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:qKe,SecondSectionInfo:aGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),sGe={class:"profile-content"},lGe={class:"profile-content__main"},uGe={class:"profile-content__main--first-section"},cGe={class:"profile-content__main--second-section"};function dGe(t,e,n,r,i,a){return R(),Y("div",sGe,[X("div",lGe,[X("div",uGe,[he(r.FirstSectionInfo)]),X("div",cGe,[he(r.SecondSectionInfo)])])])}const fGe=Nn(oGe,[["render",dGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),hGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=cr();let i=1;const a=jt({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=fl(),s=async()=>{try{a.isLoading=!0,fd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await bn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),Zb.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await bn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await bn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;Wt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return kb},ProfileAvatar:OKe,ProfileInfo:fGe};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),pGe={class:"header-content"},mGe={class:"header-content__main"},gGe={class:"header-content__profile-image"},vGe={class:"header-content__profile-image--content"},yGe={class:"header-content__profile-info"},bGe={class:"header-content__profile-info--content"};function _Ge(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",pGe,[X("div",mGe,[X("div",gGe,[X("div",vGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",yGe,[X("div",bGe,[he(r.ProfileInfo)])])])])}const wGe=Nn(hGe,[["render",_Ge],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),xGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=cr(),{currentTab:r}=Pn(n),i=dQ();Os(()=>{var l;if(fl().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hT}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function SGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const AGe=Nn(xGe,[["render",SGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),kGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=Ml(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function EGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[Ct(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Tn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[Ct(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Tn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),Ct(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Tn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Yie=Nn(kGe,[["render",EGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function dN(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function TGe(t){if(Array.isArray(t))return dN(t)}function qie(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function DGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){qie(a,r,i,o,s,"next",l)}function s(l){qie(a,r,i,o,s,"throw",l)}o(void 0)})}}function OGe(t,e,n){return(e=PGe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function CGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function IGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
208
+ Yt.version="2.30.1",cHe(ki),Yt.fn=Pt,Yt.min=X9e,Yt.max=J9e,Yt.now=eYe,Yt.utc=hd,Yt.unix=D7e,Yt.months=C7e,Yt.isDate=P1,Yt.locale=Ip,Yt.invalid=pO,Yt.duration=ic,Yt.isMoment=nc,Yt.weekdays=M7e,Yt.parseZone=O7e,Yt.localeData=wf,Yt.isDuration=DO,Yt.monthsShort=I7e,Yt.weekdaysMin=$7e,Yt.defineLocale=KL,Yt.updateLocale=O9e,Yt.locales=C9e,Yt.weekdaysShort=R7e,Yt.normalizeUnits=nu,Yt.relativeTimeRounding=sqe,Yt.relativeTimeThreshold=lqe,Yt.calendarFormat=kYe,Yt.prototype=Pt,Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Rp=mb("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{hO.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),zie=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=S1(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=fd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=MP(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await bn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await bn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await bn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await bn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await bn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await bn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await bn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await bn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await bn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await bn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=cr(),{basicInfo:S}=Pn(w),T=Rp(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await bn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await bn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await bn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await bn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await bn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await bn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},cqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=Rp(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);Wt(()=>{S("loaded")}),Nj(()=>{S("loaded")});const f=Eu("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:""},{showLoading:!1})},p=fd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ve=vn();return ve||""}),v=cr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ve=l.value.permission;return{canUpdateName:ve==null?void 0:ve.has_edit_permission,canUpdateThumbnail:ve==null?void 0:ve.has_edit_permission,canArchive:ve==null?void 0:ve.has_archive_permission,canDelete:ve==null?void 0:ve.has_delete_permission,canUpdateAssignees:ve==null?void 0:ve.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ve==null?void 0:ve.has_edit_permission:0,canUpdateDate:ve==null?void 0:ve.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ve=>{o.value=!0,ve&&S("updateScene",ve)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=zie(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ve=l.value,Ue=ve.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ve,status:ve.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value}}catch(ve){return console.error(ve),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ve=>{const Ue=r.sceneId;return await M(Ue,ve)},{getEnvVariable:me}=fl(),Ee=Z(()=>{const ve=l.value,Ue=fd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ve.id,entity_id:ve.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status"},te=ve.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=mQ(g);Ge(de,hO.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return BZ},GirdItemSkeleton:jre};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),dqe=["id"];function fqe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[Ct(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,dqe)}const hqe=Nn(cqe,[["render",fqe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),pqe=1,mqe=t=>{const{handleGetSceneDetail:e}=zie(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>fd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=jt(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(pqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=Rp(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},gqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=Ml(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=mqe(l),v=(E,D)=>{h(E,D),r("update")};Wt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ig);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=gg("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return AT},InfoVisual:Zu,GridItemSkeleton:jre,GridItem:hqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),vqe={key:0,class:"empty-list"},yqe={class:"scene-item"},bqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function _qe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},Li({default:ze(({item:o,index:s})=>[X("div",yqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",bqe,[(R(),Y(wt,null,Zt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const lN=Nn(gqe,[["render",_qe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),jie=400,wqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=qD(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=of(s),c=re(!1),f=cr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||jie),g=ms(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ig);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");gg("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:jie,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Zu,SceneList:lN};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),xqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Sqe(t,e,n,r,i,a){return R(),Y("div",xqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Hie=Nn(wqe,[["render",Sqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Aqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=S1(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await bn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await bn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await bn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await bn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await bn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await bn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await bn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await bn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await bn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await bn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},kqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=cr();XE();const{userInfo:a}=Pn(i),{getEnvVariable:o}=fl(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Zi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:vn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await bn.downloadFileFromS3({scene_id:vn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await bn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Aqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:vn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=Eu("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Zi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:vn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Zi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:vn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("scene_hub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return qZ},get TessBreadcrumb(){return yT}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Eqe={class:"breadcrumb"};function Tqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Eqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Dqe=Nn(kqe,[["render",Tqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Oqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Cqe={class:"skeleton-comment"},Iqe={class:"comment-body"},Mqe={class:"body"},Rqe={class:"skeleton-details"};function $qe(t,e,n,r,i,a){return R(),Y("div",Cqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Iqe,[e[0]||(e[0]=bm('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",Mqe,[X("div",Rqe,[(R(!0),Y(wt,null,Zt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=bm('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const Pqe=Nn(Oqe,[["render",$qe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),kg=new Aw("CommentFile");kg.version(1).stores({files:"++id, files "});const Lqe=()=>{const t=async a=>{await kg.files.where("id").equals(a.id).first()?await kg.files.update(a.id,a):await kg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await kg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await kg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await kg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},Nqe=mb("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),Fqe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=Nqe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=Lqe(),p=re([]),g=re(null);vQ(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};Wt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Dqe,InfoVisual:Zu,CommentSkeleton:Pqe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),Vqe={ref:"commentListRef",class:"recent-comment"},Bqe={class:"empty-data"};function Uqe(t,e,n,r,i,a){return R(),Y("div",Vqe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",Bqe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Tn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Zt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Tn()),r.loading?(R(),Y(wt,{key:2},Zt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const PO=Nn(Fqe,[["render",Uqe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),Wqe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=qD(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ig);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");gg("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:PO};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function zqe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const uN=Nn(Wqe,[["render",zqe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),jqe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=qD(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ms(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ig);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");gg("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:PO};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function Hqe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const Yqe=Nn(jqe,[["render",Hqe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),qqe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:uN,comment_resolved:Yqe,rendition:iHe,scene:Hie,people_comment:uN,chart:uN,assigned_scene:Hie},r=t,i=re(r.tabs[0].id);Os(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=cr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ms(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hT}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Kqe={class:"tab-sections"},Gqe={class:"tab"},Zqe={class:"refresh-btn"};function Qqe(t,e,n,r,i,a){return R(),Y("div",Kqe,[X("div",Gqe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},Li({_:2},[Zt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(Bc(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",Zqe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const Xqe=Nn(qqe,[["render",Qqe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),Jqe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=yQ(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<bJ||c.value<700),{width:y}=of(r),{width:v,height:b}=of(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=of(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),dn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};Wt(()=>{P(),dn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Cs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),eKe=["id"],tKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function nKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",tKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,eKe)}const cN=Nn(Jqe,[["render",nKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),rKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);KFe(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),iKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function aKe(t,e,n,r,i,a){return R(),Y("div",iKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),Ct(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const oKe=Nn(rKe,[["render",aKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),sKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function lKe(t,e,n,r,i,a){return R(),Re(jc,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const uKe=Nn(sKe,[["render",lKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),cKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=Ml(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return Pw},get ArboTooltip(){return ur},PreferencePopup:oKe,SkeletonLoading:uKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),dKe={class:"section-title"},fKe={class:"title"},hKe={class:"actions"},pKe={class:"counting-chip"};function mKe(t,e,n,r,i,a){return R(),Y("div",dKe,[ke(t.$slots,"title",{},()=>[X("div",fKe,nt(n.title),1)],!0),X("div",hKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Tn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Tn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",pKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Tn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const LO=Nn(cKe,[["render",mKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),gKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":Sze,"target-points-tile":$ze,"unresolved-tile":Nze,"overdue-tile":Oze,"total-completed-tile":Eze},r=ms(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=yQ(),p=re(null),g=re(null),y=cr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=of(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=Bw(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:Xqe,ResizeLayout:cN,SectionTitle:LO,get BREAKPOINT_RESIZE(){return bJ}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),vKe={ref:"peopleHomeRef",class:"people-home"},yKe={ref:"topRef",class:"top"},bKe={ref:"sectionRef",class:"section-card-wrapper"},_Ke={class:"section-card"};function wKe(t,e,n,r,i,a){return R(),Y("div",vKe,[X("div",yKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",bKe,[X("div",_Ke,[(R(!0),Y(wt,null,Zt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(jc,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(Bc(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const xKe=Nn(gKe,[["render",wKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),SKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=cr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));Wt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return rf},get ArboTooltip(){return ur},get ArboSkeletonLoading(){return kb}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),AKe={class:"profile-image"},kKe={class:"profile-image__main--status-avatar"},EKe={class:"profile-image__main"},TKe={key:1};function DKe(t,e,n,r,i,a){return R(),Y("div",AKe,[X("div",kKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",EKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",TKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const OKe=Nn(SKe,[["render",DKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),CKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=jt({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=cr();let i=jt({isShow:!1}),a=jt({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await bn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=cr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=cQ(),{getEnvVariable:w}=fl(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||XBe(),ws_code:vn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=vn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),Wt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||cr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return Gi},get ArboTooltip(){return ur},get TessAssigneeSelect(){return c$},get ArboSkeletonLoading(){return kb},get ArboButton(){return Nt},get ArboIcon(){return Yn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),IKe={class:"info-detail-content"},MKe={class:"info-detail-content__main"},RKe={class:"info-detail-content__main--user-select"},$Ke={class:"info-detail-content__main--user-name"},PKe={key:1,class:"detail-row"},LKe={class:"icon-wrapper"},NKe={class:"content-wrapper"},FKe={class:"inline-content"},VKe={key:4,class:"inline-copy-button"},BKe={class:"info-detail-content__main--user-email"},UKe={key:1,class:"detail-row"},WKe={class:"icon-wrapper"},zKe={class:"content-wrapper"},jKe={class:"inline-content"},HKe={key:3,class:"inline-copy-button"};function YKe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",IKe,[X("div",MKe,[X("div",RKe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},Li({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[Ct(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",$Ke,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",PKe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",LKe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",NKe,[X("div",FKe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",VKe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",BKe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",UKe,[X("div",WKe,[he(r.ArboIcon,{name:"Email"})]),X("div",zKe,[X("div",jKe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",HKe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const qKe=Nn(CKe,[["render",YKe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),KKe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=fl(),s=cr(),{selectedDataId:l}=Pn(s);function c(){const h=Zi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:vn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return ur}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),GKe={class:"link-profile-button"};function ZKe(t,e,n,r,i,a){return R(),Y("div",GKe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const QKe=Nn(KKe,[["render",ZKe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),XKe=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=cr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=fl();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});Wt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return gT},get ArboSkeletonLoading(){return kb},LinkProfileCopied:QKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__content"},nGe={class:"info-detail-content__content--link-copy"},rGe={class:"info-detail-content__content--list-team-group"};function iGe(t,e,n,r,i,a){return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[X("div",nGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",rGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const aGe=Nn(XKe,[["render",iGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),oGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:qKe,SecondSectionInfo:aGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),sGe={class:"profile-content"},lGe={class:"profile-content__main"},uGe={class:"profile-content__main--first-section"},cGe={class:"profile-content__main--second-section"};function dGe(t,e,n,r,i,a){return R(),Y("div",sGe,[X("div",lGe,[X("div",uGe,[he(r.FirstSectionInfo)]),X("div",cGe,[he(r.SecondSectionInfo)])])])}const fGe=Nn(oGe,[["render",dGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),hGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=cr();let i=1;const a=jt({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=fl(),s=async()=>{try{a.isLoading=!0,fd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await bn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),Zb.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await bn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await bn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;Wt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return kb},ProfileAvatar:OKe,ProfileInfo:fGe};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),pGe={class:"header-content"},mGe={class:"header-content__main"},gGe={class:"header-content__profile-image"},vGe={class:"header-content__profile-image--content"},yGe={class:"header-content__profile-info"},bGe={class:"header-content__profile-info--content"};function _Ge(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",pGe,[X("div",mGe,[X("div",gGe,[X("div",vGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",yGe,[X("div",bGe,[he(r.ProfileInfo)])])])])}const wGe=Nn(hGe,[["render",_Ge],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),xGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=cr(),{currentTab:r}=Pn(n),i=dQ();Os(()=>{var l;if(fl().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hT}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function SGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const AGe=Nn(xGe,[["render",SGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),kGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=Ml(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function EGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[Ct(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Tn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[Ct(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Tn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),Ct(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Tn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Yie=Nn(kGe,[["render",EGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function dN(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function TGe(t){if(Array.isArray(t))return dN(t)}function qie(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function DGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){qie(a,r,i,o,s,"next",l)}function s(l){qie(a,r,i,o,s,"throw",l)}o(void 0)})}}function OGe(t,e,n){return(e=PGe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function CGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function IGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
209
209
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kie(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function MGe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kie(Object(n),!0).forEach(function(r){OGe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kie(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fN(){fN=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(M,C,F,W){return Object.defineProperty(M,C,{value:F,enumerable:!W,configurable:!W,writable:!W})}try{l({},"")}catch{l=function(C,F,W){return C[F]=W}}function c(M,C,F,W){var H=C&&C.prototype instanceof p?C:p,j=Object.create(H.prototype);return l(j,"_invoke",function(N,U,ee){var le=1;return function(_e,be){if(le===3)throw Error("Generator is already running");if(le===4){if(_e==="throw")throw be;return{value:t,done:!0}}for(ee.method=_e,ee.arg=be;;){var Te=ee.delegate;if(Te){var J=E(Te,ee);if(J){if(J===h)continue;return J}}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(le===1)throw le=4,ee.arg;ee.dispatchException(ee.arg)}else ee.method==="return"&&ee.abrupt("return",ee.arg);le=3;var me=f(N,U,ee);if(me.type==="normal"){if(le=ee.done?4:2,me.arg===h)continue;return{value:me.arg,done:ee.done}}me.type==="throw"&&(le=4,ee.method="throw",ee.arg=me.arg)}}}(M,F,new V(W||[])),!0),j}function f(M,C,F){try{return{type:"normal",arg:M.call(C,F)}}catch(W){return{type:"throw",arg:W}}}e.wrap=c;var h={};function p(){}function g(){}function y(){}var v={};l(v,a,function(){return this});var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==n&&r.call(w,a)&&(v=w);var S=y.prototype=p.prototype=Object.create(v);function T(M){["next","throw","return"].forEach(function(C){l(M,C,function(F){return this._invoke(C,F)})})}function _(M,C){function F(H,j,N,U){var ee=f(M[H],M,j);if(ee.type!=="throw"){var le=ee.arg,_e=le.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?C.resolve(_e.__await).then(function(be){F("next",be,N,U)},function(be){F("throw",be,N,U)}):C.resolve(_e).then(function(be){le.value=be,N(le)},function(be){return F("throw",be,N,U)})}U(ee.arg)}var W;l(this,"_invoke",function(H,j){function N(){return new C(function(U,ee){F(H,j,U,ee)})}return W=W?W.then(N,N):N()},!0)}function E(M,C){var F=C.method,W=M.i[F];if(W===t)return C.delegate=null,F==="throw"&&M.i.return&&(C.method="return",C.arg=t,E(M,C),C.method==="throw")||F!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+F+"' method")),h;var H=f(W,M.i,C.arg);if(H.type==="throw")return C.method="throw",C.arg=H.arg,C.delegate=null,h;var j=H.arg;return j?j.done?(C[M.r]=j.value,C.next=M.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,h):j:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,h)}function D(M){this.tryEntries.push(M)}function O(M){var C=M[4]||{};C.type="normal",C.arg=t,M[4]=C}function V(M){this.tryEntries=[[-1]],M.forEach(D,this),this.reset(!0)}function P(M){if(M!=null){var C=M[a];if(C)return C.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length)){var F=-1,W=function H(){for(;++F<M.length;)if(r.call(M,F))return H.value=M[F],H.done=!1,H;return H.value=t,H.done=!0,H};return W.next=W}}throw new TypeError(typeof M+" is not iterable")}return g.prototype=y,l(S,"constructor",y),l(y,"constructor",g),g.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(M){var C=typeof M=="function"&&M.constructor;return!!C&&(C===g||(C.displayName||C.name)==="GeneratorFunction")},e.mark=function(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,y):(M.__proto__=y,l(M,s,"GeneratorFunction")),M.prototype=Object.create(S),M},e.awrap=function(M){return{__await:M}},T(_.prototype),l(_.prototype,o,function(){return this}),e.AsyncIterator=_,e.async=function(M,C,F,W,H){H===void 0&&(H=Promise);var j=new _(c(M,C,F,W),H);return e.isGeneratorFunction(C)?j:j.next().then(function(N){return N.done?N.value:j.next()})},T(S),l(S,s,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),e.keys=function(M){var C=Object(M),F=[];for(var W in C)F.unshift(W);return function H(){for(;F.length;)if((W=F.pop())in C)return H.value=W,H.done=!1,H;return H.done=!0,H}},e.values=P,V.prototype={constructor:V,reset:function(M){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!M)for(var C in this)C.charAt(0)==="t"&&r.call(this,C)&&!isNaN(+C.slice(1))&&(this[C]=t)},stop:function(){this.done=!0;var M=this.tryEntries[0][4];if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var C=this;function F(le){j.type="throw",j.arg=M,C.next=le}for(var W=C.tryEntries.length-1;W>=0;--W){var H=this.tryEntries[W],j=H[4],N=this.prev,U=H[1],ee=H[2];if(H[0]===-1)return F("end"),!1;if(!U&&!ee)throw Error("try statement without catch or finally");if(H[0]!=null&&H[0]<=N){if(N<U)return this.method="next",this.arg=t,F(U),!0;if(N<ee)return F(ee),!1}}},abrupt:function(M,C){for(var F=this.tryEntries.length-1;F>=0;--F){var W=this.tryEntries[F];if(W[0]>-1&&W[0]<=this.prev&&this.prev<W[2]){var H=W;break}}H&&(M==="break"||M==="continue")&&H[0]<=C&&C<=H[2]&&(H=null);var j=H?H[4]:{};return j.type=M,j.arg=C,H?(this.method="next",this.next=H[2],h):this.complete(j)},complete:function(M,C){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&C&&(this.next=C),h},finish:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[2]===M)return this.complete(F[4],F[3]),O(F),h}},catch:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[0]===M){var W=F[4];if(W.type==="throw"){var H=W.arg;O(F)}return H}}throw Error("illegal catch attempt")},delegateYield:function(M,C,F){return this.delegate={i:P(M),r:C,n:F},this.method==="next"&&(this.arg=t),h}},e}function RGe(t){return TGe(t)||CGe(t)||LGe(t)||IGe()}function $Ge(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function PGe(t){var e=$Ge(t,"string");return typeof e=="symbol"?e:e+""}function LGe(t,e){if(t){if(typeof t=="string")return dN(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dN(t,e):void 0}}/*!
210
210
  * @kurkle/color v0.3.4
211
211
  * https://github.com/kurkle/color#readme