@qualityunit/liveagent-ticket-grid 0.0.46 → 0.0.48
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/dist/assets/index.js +1 -1
- package/package.json +1 -1
package/dist/assets/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var zn=Object.defineProperty;var Gn=(t,e,i)=>e in t?zn(t,e,{enumerable:!0,config
|
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/var _r=function(t){return t!=null&&(Tn(t)||vr(t)||!!t._isBuffer)};function Tn(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function vr(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Tn(t.slice(0,0))}(function(){var t=pr,e=Ut.utf8,i=_r,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=t.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=271733878,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,v=r._gg,S=r._hh,p=r._ii,h=0;h<a.length;h+=16){var L=l,H=c,R=d,P=f;l=m(l,c,d,f,a[h+0],7,-680876936),f=m(f,l,c,d,a[h+1],12,-389564586),d=m(d,f,l,c,a[h+2],17,606105819),c=m(c,d,f,l,a[h+3],22,-1044525330),l=m(l,c,d,f,a[h+4],7,-176418897),f=m(f,l,c,d,a[h+5],12,1200080426),d=m(d,f,l,c,a[h+6],17,-1473231341),c=m(c,d,f,l,a[h+7],22,-45705983),l=m(l,c,d,f,a[h+8],7,1770035416),f=m(f,l,c,d,a[h+9],12,-1958414417),d=m(d,f,l,c,a[h+10],17,-42063),c=m(c,d,f,l,a[h+11],22,-1990404162),l=m(l,c,d,f,a[h+12],7,1804603682),f=m(f,l,c,d,a[h+13],12,-40341101),d=m(d,f,l,c,a[h+14],17,-1502002290),c=m(c,d,f,l,a[h+15],22,1236535329),l=v(l,c,d,f,a[h+1],5,-165796510),f=v(f,l,c,d,a[h+6],9,-1069501632),d=v(d,f,l,c,a[h+11],14,643717713),c=v(c,d,f,l,a[h+0],20,-373897302),l=v(l,c,d,f,a[h+5],5,-701558691),f=v(f,l,c,d,a[h+10],9,38016083),d=v(d,f,l,c,a[h+15],14,-660478335),c=v(c,d,f,l,a[h+4],20,-405537848),l=v(l,c,d,f,a[h+9],5,568446438),f=v(f,l,c,d,a[h+14],9,-1019803690),d=v(d,f,l,c,a[h+3],14,-187363961),c=v(c,d,f,l,a[h+8],20,1163531501),l=v(l,c,d,f,a[h+13],5,-1444681467),f=v(f,l,c,d,a[h+2],9,-51403784),d=v(d,f,l,c,a[h+7],14,1735328473),c=v(c,d,f,l,a[h+12],20,-1926607734),l=S(l,c,d,f,a[h+5],4,-378558),f=S(f,l,c,d,a[h+8],11,-2022574463),d=S(d,f,l,c,a[h+11],16,1839030562),c=S(c,d,f,l,a[h+14],23,-35309556),l=S(l,c,d,f,a[h+1],4,-1530992060),f=S(f,l,c,d,a[h+4],11,1272893353),d=S(d,f,l,c,a[h+7],16,-155497632),c=S(c,d,f,l,a[h+10],23,-1094730640),l=S(l,c,d,f,a[h+13],4,681279174),f=S(f,l,c,d,a[h+0],11,-358537222),d=S(d,f,l,c,a[h+3],16,-722521979),c=S(c,d,f,l,a[h+6],23,76029189),l=S(l,c,d,f,a[h+9],4,-640364487),f=S(f,l,c,d,a[h+12],11,-421815835),d=S(d,f,l,c,a[h+15],16,530742520),c=S(c,d,f,l,a[h+2],23,-995338651),l=p(l,c,d,f,a[h+0],6,-198630844),f=p(f,l,c,d,a[h+7],10,1126891415),d=p(d,f,l,c,a[h+14],15,-1416354905),c=p(c,d,f,l,a[h+5],21,-57434055),l=p(l,c,d,f,a[h+12],6,1700485571),f=p(f,l,c,d,a[h+3],10,-1894986606),d=p(d,f,l,c,a[h+10],15,-1051523),c=p(c,d,f,l,a[h+1],21,-2054922799),l=p(l,c,d,f,a[h+8],6,1873313359),f=p(f,l,c,d,a[h+15],10,-30611744),d=p(d,f,l,c,a[h+6],15,-1560198380),c=p(c,d,f,l,a[h+13],21,1309151649),l=p(l,c,d,f,a[h+4],6,-145523070),f=p(f,l,c,d,a[h+11],10,-1120210379),d=p(d,f,l,c,a[h+2],15,718787259),c=p(c,d,f,l,a[h+9],21,-343485551),l=l+L>>>0,c=c+H>>>0,d=d+R>>>0,f=f+P>>>0}return t.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,$n.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=t.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):t.bytesToHex(a)}})();var yr=$n.exports;const br=Dt(yr);function wr(t){return[...t].reduce((e,i)=>Math.imul(31,e)+i.charCodeAt(0)|0,0)}function kr(t){oe(t,"svelte-1rap1nb",".Column.svelte-1rap1nb{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(min-width: 768px){.Column.importanceColumn.svelte-1rap1nb{display:flex;flex-direction:column;justify-content:space-around;align-items:flex-start}.Column.statusColumn.svelte-1rap1nb{display:flex;flex-direction:column;justify-content:space-around;align-items:flex-start}}")}function $r(t){let e,i,n;const r=t[2].default,s=Me(r,t,t[1],null);return{c(){e=k("div"),s&&s.c(),_(e,"class",i="Column "+t[0]+" svelte-1rap1nb")},m(o,a){x(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Be(s,r,o,o[1],n?Ie(r,o[1],a,null):Ke(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1rap1nb"))&&_(e,"class",i)},i(o){n||(w(s,o),n=!0)},o(o){$(s,o),n=!1},d(o){o&&D(e),s&&s.d(o)}}}function Cr(t,e,i){let{$$slots:n={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class xt extends te{constructor(e){super(),ee(this,e,Cr,$r,q,{className:0},kr)}}function Tr(t){oe(t,"svelte-1ujeu71",`.Tag.svelte-1ujeu71{display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-1ujeu71:before{font-family:"la-icon-font"}.SLA.svelte-1ujeu71{border:1px solid var(--main-lighter-textcolor);border-radius:4px;color:var(--main-lighter-textcolor)
|
|
7
|
-
}`)}function Lr(t){let e,i,n,r,s,o;const a=t[4].default,u=Me(a,t,t[3],null);return{c(){e=k("div"),u&&u.c(),i=W(),n=k("span"),r=se(t[0]),_(n,"class","text"),_(e,"class",s="Tag "+t[1]+" svelte-1ujeu71"),_(e,"style",t[2])},m(l,c){x(l,e,c),u&&u.m(e,null),b(e,i),b(e,n),b(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?Ie(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&le(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1ujeu71"))&&_(e,"class",s),(!o||c&4)&&_(e,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&D(e),u&&u.d(l)}}}function Sr(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return t.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class ft extends te{constructor(e){super(),ee(this,e,Sr,Lr,q,{text:0,className:1,style:2},Tr)}}function Nr(t){oe(t,"svelte-1ify73x","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}.IconTag .Icon{display:flex;align-items:center;justify-content:center;font-size:16px;width:16px;height:16px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Dr(t){let e,i;return e=new $e({props:{iconLaClassName:t[2]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function xr(t){let e,i;return e=new ft({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Dr]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Or(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconLaClassName:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class gt extends te{constructor(e){super(),ee(this,e,Or,xr,q,{text:0,className:4,style:1,iconLaClassName:2},Nr)}}function Fr(t){oe(t,"svelte-z82bt4",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-z82bt4{display:none}.companyTag.svelte-z82bt4{display:none}.name.svelte-z82bt4{font-size:13px;line-height:20px;font-weight:bold;padding-right:8px;margin-right:6px;position:relative}.name.svelte-z82bt4::after{content:'';display:block;height:14px;width:1px;background-color:var(--main-textcolor);position:absolute;right:0;top:15%}.no.name.svelte-z82bt4{font-weight:400;color:var(--main-lighter-textcolor)}.email.svelte-z82bt4{font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.texts.svelte-z82bt4{display:flex;flex-direction:row;justify-content:flex-start;overflow:hidden}@media(min-width: 900px){.avatar.svelte-z82bt4{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-z82bt4{padding:0;border:none}.name.svelte-z82bt4::after{display:none}.email.svelte-z82bt4{padding:0}.companyTag.svelte-z82bt4{display:flex}.texts.svelte-z82bt4{display:flex;flex-direction:column;justify-content:space-around}}")}function Wt(t){let e,i;const n=[t[2]];let r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return e=new mr({props:r}),{c(){K(e.$$.fragment)},m(s,o){M(e,s,o),i=!0},p(s,o){const a=o&4?fn(n,[qn(s[2])]):{};e.$set(a)},i(s){i||(w(e.$$.fragment,s),i=!0)},o(s){$(e.$$.fragment,s),i=!1},d(s){I(e,s)}}}function Rr(t){let e,i=t[2].name,n,r,s,o=(t[3]!==void 0?t[3]:"No name")+"",a,u,l,c,d=t[0].emails+"",f,h,m,v,S,p=Wt(t);return v=new gt({props:{text:t[0].company==="Y"?"Company":A("No Company"),className:(t[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){e=k("div"),p.c(),n=W(),r=k("div"),s=k("div"),a=se(o),l=W(),c=k("div"),f=se(d),h=W(),m=k("div"),K(v.$$.fragment),_(e,"class","avatar svelte-z82bt4"),_(s,"class",u=ce(t[3]?"name":"no name")+" svelte-z82bt4"),_(c,"class","email svelte-z82bt4"),_(m,"class","companyTag svelte-z82bt4"),_(r,"class","texts svelte-z82bt4")},m(L,H){x(L,e,H),p.m(e,null),x(L,n,H),x(L,r,H),b(r,s),b(s,a),b(r,l),b(r,c),b(c,f),b(r,h),b(r,m),M(v,m,null),S=!0},p(L,H){H&4&&q(i,i=L[2].name)?(ve(),$(p,1,1,Z),ye(),p=Wt(L),p.c(),w(p,1),p.m(e,null)):p.p(L,H),(!S||H&8)&&o!==(o=(L[3]!==void 0?L[3]:"No name")+"")&&le(a,o),(!S||H&8&&u!==(u=ce(L[3]?"name":"no name")+" svelte-z82bt4"))&&_(s,"class",u),(!S||H&1)&&d!==(d=L[0].emails+"")&&le(f,d);const R={};H&1&&(R.text=L[0].company==="Y"?"Company":A("No Company")),H&1&&(R.className=(L[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),v.$set(R)},i(L){S||(w(p),w(v.$$.fragment,L),S=!0)},o(L){$(p),$(v.$$.fragment,L),S=!1},d(L){L&&(D(e),D(n),D(r)),p.d(L),I(v)}}}function Ar(t){let e,i;return e=new xt({props:{className:t[1],$$slots:{default:[Rr]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&141&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function zr(t,e,i){if(!t)return(i[0]+i[1]).toUpperCase();let n=t[0];return e&&(n+=e[0]),n}function Gr(t,e,i){let n,r,{row:s}=e,{className:o="userColumn"}=e;function a(c,d,f){if(!c)return"";let h=c+" "+d;return h.trim()||(h=f),h}function u(c,d){let f=c;return f||(f="https://www.gravatar.com/avatar/"+br(d[0]??"")+"?s=200&d=404"),f}function l(c,d,f,h){let m;h?m=wr(a(c,d,h)+f):m=Math.floor(Math.random()*16777215);let v=(m&16711680)>>16,S=(m&65280)>>8,p=m&255;return v+S+p<150&&(v=150),v+S+p>400&&(v=0),`rgb(${v},${S},${p})`}return console.log(s.systemName),t.$$set=c=>{"row"in c&&i(0,s=c.row),"className"in c&&i(1,o=c.className)},t.$$.update=()=>{t.$$.dirty&1&&i(3,n=s.name),t.$$.dirty&1&&i(2,r={bgColor:l(s.firstname,s.lastname,s.emails,s.systemName),name:a(s.firstname,s.lastname,s.systemName),src:u(s.avatarUrl,s.emails),initials:zr(s.firstname,s.lastname,s.systemName)})},[s,o,r,n]}class Er extends te{constructor(e){super(),ee(this,e,Gr,Ar,q,{row:0,className:1},Fr)}}var Ln={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(kn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",h="year",m="date",v="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var T=["th","st","nd","rd"],y=E%100;return"["+E+(T[(y-20)%10]||T[y]||T[0])+"]"}},H=function(E,T,y){var N=String(E);return!N||N.length>=T?E:""+Array(T+1-N.length).join(y)+E},R={s:H,z:function(E){var T=-E.utcOffset(),y=Math.abs(T),N=Math.floor(y/60),C=y%60;return(T<=0?"+":"-")+H(N,2,"0")+":"+H(C,2,"0")},m:function E(T,y){if(T.date()<y.date())return-E(y,T);var N=12*(y.year()-T.year())+(y.month()-T.month()),C=T.clone().add(N,d),G=y-C<0,J=T.clone().add(N+(G?-1:1),d);return+(-(N+(y-C)/(G?C-J:J-C))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:h,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},P="en",z={};z[P]=L;var B="$isDayjsObject",U=function(E){return E instanceof be||!(!E||!E[B])},ne=function E(T,y,N){var C;if(!T)return P;if(typeof T=="string"){var G=T.toLowerCase();z[G]&&(C=G),y&&(z[G]=y,C=G);var J=T.split("-");if(!C&&J.length>1)return E(J[0])}else{var Q=T.name;z[Q]=T,C=Q}return!N&&C&&(P=C),C||!N&&P},X=function(E,T){if(U(E))return E.clone();var y=typeof T=="object"?T:{};return y.date=E,y.args=arguments,new be(y)},V=R;V.l=ne,V.i=U,V.w=function(E,T){return X(E,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var be=function(){function E(y){this.$L=ne(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[B]=!0}var T=E.prototype;return T.parse=function(y){this.$d=function(N){var C=N.date,G=N.utc;if(C===null)return new Date(NaN);if(V.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var J=C.match(S);if(J){var Q=J[2]-1||0,ie=(J[7]||"0").substring(0,3);return G?new Date(Date.UTC(J[1],Q,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)):new Date(J[1],Q,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)}}return new Date(C)}(y),this.init()},T.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},T.$utils=function(){return V},T.isValid=function(){return this.$d.toString()!==v},T.isSame=function(y,N){var C=X(y);return this.startOf(N)<=C&&C<=this.endOf(N)},T.isAfter=function(y,N){return X(y)<this.startOf(N)},T.isBefore=function(y,N){return this.endOf(N)<X(y)},T.$g=function(y,N,C){return V.u(y)?this[N]:this.set(C,y)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(y,N){var C=this,G=!!V.u(N)||N,J=V.p(y),Q=function(Le,fe){var Ce=V.w(C.$u?Date.UTC(C.$y,fe,Le):new Date(C.$y,fe,Le),C);return G?Ce:Ce.endOf(l)},ie=function(Le,fe){return V.w(C.toDate()[Le].apply(C.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(fe)),C)},O=this.$W,Y=this.$M,ue=this.$D,ke="set"+(this.$u?"UTC":"");switch(J){case h:return G?Q(1,0):Q(31,11);case d:return G?Q(1,Y):Q(0,Y+1);case c:var me=this.$locale().weekStart||0,Je=(O<me?O+7:O)-me;return Q(G?ue-Je:ue+(6-Je),Y);case l:case m:return ie(ke+"Hours",0);case u:return ie(ke+"Minutes",1);case a:return ie(ke+"Seconds",2);case o:return ie(ke+"Milliseconds",3);default:return this.clone()}},T.endOf=function(y){return this.startOf(y,!1)},T.$set=function(y,N){var C,G=V.p(y),J="set"+(this.$u?"UTC":""),Q=(C={},C[l]=J+"Date",C[m]=J+"Date",C[d]=J+"Month",C[h]=J+"FullYear",C[u]=J+"Hours",C[a]=J+"Minutes",C[o]=J+"Seconds",C[s]=J+"Milliseconds",C)[G],ie=G===l?this.$D+(N-this.$W):N;if(G===d||G===h){var O=this.clone().set(m,1);O.$d[Q](ie),O.init(),this.$d=O.set(m,Math.min(this.$D,O.daysInMonth())).$d}else Q&&this.$d[Q](ie);return this.init(),this},T.set=function(y,N){return this.clone().$set(y,N)},T.get=function(y){return this[V.p(y)]()},T.add=function(y,N){var C,G=this;y=Number(y);var J=V.p(N),Q=function(Y){var ue=X(G);return V.w(ue.date(ue.date()+Math.round(Y*y)),G)};if(J===d)return this.set(d,this.$M+y);if(J===h)return this.set(h,this.$y+y);if(J===l)return Q(1);if(J===c)return Q(7);var ie=(C={},C[a]=n,C[u]=r,C[o]=i,C)[J]||1,O=this.$d.getTime()+y*ie;return V.w(O,this)},T.subtract=function(y,N){return this.add(-1*y,N)},T.format=function(y){var N=this,C=this.$locale();if(!this.isValid())return C.invalidDate||v;var G=y||"YYYY-MM-DDTHH:mm:ssZ",J=V.z(this),Q=this.$H,ie=this.$m,O=this.$M,Y=C.weekdays,ue=C.months,ke=C.meridiem,me=function(fe,Ce,Ue,rt){return fe&&(fe[Ce]||fe(N,G))||Ue[Ce].slice(0,rt)},Je=function(fe){return V.s(Q%12||12,fe,"0")},Le=ke||function(fe,Ce,Ue){var rt=fe<12?"AM":"PM";return Ue?rt.toLowerCase():rt};return G.replace(p,function(fe,Ce){return Ce||function(Ue){switch(Ue){case"YY":return String(N.$y).slice(-2);case"YYYY":return V.s(N.$y,4,"0");case"M":return O+1;case"MM":return V.s(O+1,2,"0");case"MMM":return me(C.monthsShort,O,ue,3);case"MMMM":return me(ue,O);case"D":return N.$D;case"DD":return V.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return me(C.weekdaysMin,N.$W,Y,2);case"ddd":return me(C.weekdaysShort,N.$W,Y,3);case"dddd":return Y[N.$W];case"H":return String(Q);case"HH":return V.s(Q,2,"0");case"h":return Je(1);case"hh":return Je(2);case"a":return Le(Q,ie,!0);case"A":return Le(Q,ie,!1);case"m":return String(ie);case"mm":return V.s(ie,2,"0");case"s":return String(N.$s);case"ss":return V.s(N.$s,2,"0");case"SSS":return V.s(N.$ms,3,"0");case"Z":return J}return null}(fe)||J.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(y,N,C){var G,J=this,Q=V.p(N),ie=X(y),O=(ie.utcOffset()-this.utcOffset())*n,Y=this-ie,ue=function(){return V.m(J,ie)};switch(Q){case h:G=ue()/12;break;case d:G=ue();break;case f:G=ue()/3;break;case c:G=(Y-O)/6048e5;break;case l:G=(Y-O)/864e5;break;case u:G=Y/r;break;case a:G=Y/n;break;case o:G=Y/i;break;default:G=Y}return C?G:V.a(G)},T.daysInMonth=function(){return this.endOf(d).$D},T.$locale=function(){return z[this.$L]},T.locale=function(y,N){if(!y)return this.$L;var C=this.clone(),G=ne(y,N,!0);return G&&(C.$L=G),C},T.clone=function(){return V.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},E}(),we=be.prototype;return X.prototype=we,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",m]].forEach(function(E){we[E[1]]=function(T){return this.$g(T,E[0],E[1])}}),X.extend=function(E,T){return E.$i||(E(T,be,X),E.$i=!0),X},X.locale=ne,X.isDayjs=U,X.unix=function(E){return X(1e3*E)},X.en=z[P],X.Ls=z,X.p={},X})})(Ln);var Mr=Ln.exports;const Ye=Dt(Mr);var Sn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(kn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,h){for(var m,v,S,p=d.$locale().relativeTime||o,L=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],H=L.length,R=0;R<H;R+=1){var P=L[R];P.d&&(m=f?r(l).diff(d,P.d,!0):d.diff(l,P.d,!0));var z=(i.rounding||Math.round)(Math.abs(m));if(S=m>0,z<=P.r||!P.r){z<=1&&R>0&&(P=L[R-1]);var B=p[P.l];h&&(z=h(""+z)),v=typeof B=="string"?B.replace("%d",z):B(z,c,P.l,S);break}}if(c)return v;var U=S?p.future:p.past;return typeof U=="function"?U(v):U.replace("%s",v)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(Sn);var Ir=Sn.exports;const Br=Dt(Ir);Ye.extend(Br);function Kr(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return{c(){e=k("time"),i=se(t[0]),Gt(e,r)},m(s,o){x(s,e,o),b(e,i)},p(s,[o]){o&1&&Hn(i,s[0],r.contenteditable),Gt(e,r=fn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Z,o:Z,d(s){s&&D(e)}}}function Jr(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=zt(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,d;const f=60*1e3;return ct(()=>()=>clearInterval(d)),t.$$set=h=>{e=Xe(Xe({},e),Mn(h)),i(3,s=zt(e,r)),"timestamp"in h&&i(1,o=h.timestamp),"format"in h&&i(4,a=h.format),"relative"in h&&i(5,u=h.relative),"live"in h&&i(6,l=h.live),"formatted"in h&&i(0,c=h.formatted)},t.$$.update=()=>{t.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Ye(o).from())},Math.abs(typeof l=="number"?l:f))),t.$$.dirty&50&&i(0,c=u?Ye(o).from():Ye(o).format(a)),t.$$.dirty&50&&i(2,n=u?Ye(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Ur extends te{constructor(e){super(),ee(this,e,Jr,Kr,q,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Wr(t){oe(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Hr(t){let e;return{c(){e=k("span"),e.textContent=`${A("Invalid data")}`,_(e,"class","invalid svelte-1o3wy2t")},m(i,n){x(i,e,n)},p:Z,i:Z,o:Z,d(i){i&&D(e)}}}function Yr(t){let e,i;return e=new Ur({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Pr(t){let e,i,n,r,s;const o=[Yr,Hr],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(t,-1),r=a[n]=o[n](t),{c(){e=k("div"),r.c(),_(e,"class","Date svelte-1o3wy2t")},m(l,c){x(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(ve(),$(a[d],1,1,()=>{a[d]=null}),ye(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),w(r,1),r.m(e,null))},i(l){s||(w(r),s=!0)},o(l){$(r),s=!1},d(l){l&&D(e),a[n].d()}}}function Vr(t,e,i){let{data:n}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&i(0,n=a.data),"format"in a&&i(1,r=a.format),"style"in a&&i(2,s=a.style),"relative"in a&&i(3,o=a.relative)},[n,r,s,o]}class $t extends te{constructor(e){super(),ee(this,e,Vr,Pr,q,{data:0,format:1,style:2,relative:3},Wr)}}function Qr(t){oe(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function Zr(t){let e,i,n,r;i=new $e({props:{iconLaClassName:t[2]}});const s=t[8].default,o=Me(s,t,t[7],null);return{c(){e=k("div"),K(i.$$.fragment),n=W(),o&&o.c(),_(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){x(a,e,u),M(i,e,null),x(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Be(o,s,a,a[7],r?Ie(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(w(i.$$.fragment,a),w(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(D(e),D(n)),I(i),o&&o.d(a)}}}function Xr(t){let e,i;return e=new gt({props:{style:t[3],text:t[0],iconLaClassName:t[2],className:"Combined"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function qr(t){let e,i,n,r,s,o;const a=[Xr,Zr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new ft({props:{style:t[4],text:t[1]}}),{c(){e=k("div"),n.c(),r=W(),K(s.$$.fragment),_(e,"class",ce(t[5])+" svelte-1wdh20c")},m(c,d){x(c,e,d),u[i].m(e,null),b(e,r),M(s,e,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(ve(),$(u[f],1,1,()=>{u[f]=null}),ye(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),w(n,1),n.m(e,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(w(n),w(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&D(e),u[i].d(),I(s)}}}function jr(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconLaClassName:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return t.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class Nn extends te{constructor(e){super(),ee(this,e,jr,qr,q,{iconText:0,tagText:1,iconLaClassName:2,className:6},Qr)}}function es(t){let e,i;return e=new $t({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ts(t){let e,i;return e=new Nn({props:{iconLaClassName:t[3],tagText:t[0],className:t[2],$$slots:{default:[es]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ns(t,e,i){let n,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class is extends te{constructor(e){super(),ee(this,e,ns,ts,q,{tagText:0,due:1})}}function rs(t){oe(t,"svelte-1xhpy1i",".TicketId.svelte-1xhpy1i{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-1xhpy1i{font-size:13px;line-height:20px}.Communication.svelte-1xhpy1i{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}.ticketDetails.svelte-1xhpy1i{display:flex;align-items:center}@media(min-width: 900px){.Changed.svelte-1xhpy1i{display:none}}")}function ss(t){let e,i;return e=new ft({props:{text:A("No SLA"),className:"SLA"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p:Z,i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function os(t){let e,i;return e=new is({props:{tagText:"First answer",due:t[1].datedue}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function as(t){let e,i,n=t[1].code+"",r,s,o,a,u,l,c,d=t[1].messagegroupsIn+"",f,h,m,v,S,p,L=t[1].messagegroupsOut+"",H,R,P,z,B,U,ne,X,V,be,we,E,T,y,N,C,G;u=new $e({props:{iconLaClassName:"la-incoming"}}),v=new $e({props:{iconLaClassName:"la-outgoing"}}),U=new $t({props:{data:t[1].datecreated,format:t[2]}}),we=new $t({props:{data:t[1].datechanged,format:t[2]}});const J=[os,ss],Q=[];function ie(O,Y){return Y&2&&(T=null),T==null&&(T=O[1].datedue instanceof Date&&!isNaN(O[1].datedue)),T?0:1}return y=ie(t,-1),N=Q[y]=J[y](t),{c(){e=k("div"),i=k("span"),r=se(n),s=W(),o=k("div"),a=k("div"),K(u.$$.fragment),l=W(),c=k("span"),f=se(d),h=W(),m=k("div"),K(v.$$.fragment),S=W(),p=k("span"),H=se(L),R=W(),P=k("div"),z=k("span"),z.textContent=`${A("Created")}:`,B=W(),K(U.$$.fragment),ne=W(),X=k("div"),V=k("span"),V.textContent=`${A("Changed")}:`,be=W(),K(we.$$.fragment),E=W(),N.c(),C=nt(),_(i,"class","TicketId svelte-1xhpy1i"),_(a,"class","Communication incomingMessages svelte-1xhpy1i"),_(m,"class","Communication outgoingMessages svelte-1xhpy1i"),_(o,"class","arrows"),_(e,"class","ticketDetails svelte-1xhpy1i"),_(P,"class","Created svelte-1xhpy1i"),_(X,"class","Changed svelte-1xhpy1i")},m(O,Y){x(O,e,Y),b(e,i),b(i,r),b(e,s),b(e,o),b(o,a),M(u,a,null),b(a,l),b(a,c),b(c,f),b(o,h),b(o,m),M(v,m,null),b(m,S),b(m,p),b(p,H),x(O,R,Y),x(O,P,Y),b(P,z),b(P,B),M(U,P,null),x(O,ne,Y),x(O,X,Y),b(X,V),b(X,be),M(we,X,null),x(O,E,Y),Q[y].m(O,Y),x(O,C,Y),G=!0},p(O,Y){(!G||Y&2)&&n!==(n=O[1].code+"")&&le(r,n),(!G||Y&2)&&d!==(d=O[1].messagegroupsIn+"")&&le(f,d),(!G||Y&2)&&L!==(L=O[1].messagegroupsOut+"")&&le(H,L);const ue={};Y&2&&(ue.data=O[1].datecreated),Y&4&&(ue.format=O[2]),U.$set(ue);const ke={};Y&2&&(ke.data=O[1].datechanged),Y&4&&(ke.format=O[2]),we.$set(ke);let me=y;y=ie(O,Y),y===me?Q[y].p(O,Y):(ve(),$(Q[me],1,1,()=>{Q[me]=null}),ye(),N=Q[y],N?N.p(O,Y):(N=Q[y]=J[y](O),N.c()),w(N,1),N.m(C.parentNode,C))},i(O){G||(w(u.$$.fragment,O),w(v.$$.fragment,O),w(U.$$.fragment,O),w(we.$$.fragment,O),w(N),G=!0)},o(O){$(u.$$.fragment,O),$(v.$$.fragment,O),$(U.$$.fragment,O),$(we.$$.fragment,O),$(N),G=!1},d(O){O&&(D(e),D(R),D(P),D(ne),D(X),D(E),D(C)),I(u),I(v),I(U),I(we),Q[y].d(O)}}}function ls(t){let e,i;return e=new xt({props:{className:t[0],$$slots:{default:[as]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&14&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function us(t,e,i){let{className:n="importanceColumn"}=e,{row:r}=e,{format:s="YYYY-MM-DD HH:mm:ss"}=e;return t.$$set=o=>{"className"in o&&i(0,n=o.className),"row"in o&&i(1,r=o.row),"format"in o&&i(2,s=o.format)},[n,r,s]}class cs extends te{constructor(e){super(),ee(this,e,us,ls,q,{className:0,row:1,format:2},rs)}}function ds(t){oe(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function fs(t){let e,i;return e=new ft({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]),r&1&&(s.text=n[0]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function gs(t,e,i){let n,r,s,o;re(t,yn,u=>i(4,o=u));let{tagId:a}=e;return t.$$set=u=>{"tagId"in u&&i(3,a=u.tagId)},t.$$.update=()=>{var u,l,c;t.$$.dirty&24&&i(2,n=((u=o[a])==null?void 0:u.color)??0),t.$$.dirty&24&&i(1,r=((l=o[a])==null?void 0:l.backgroundcolor)??0),t.$$.dirty&24&&i(0,s=((c=o[a])==null?void 0:c.name)??"")},[s,r,n,a,o]}class hs extends te{constructor(e){super(),ee(this,e,gs,fs,q,{tagId:3},ds)}}function Ht(t,e,i){const n=t.slice();return n[1]=e[i],n}function Yt(t){let e,i;return e=new hs({props:{tagId:t[1]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ms(t){let e,i,n=Ee(t[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(t,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){e=k("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){x(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=Yt(l),r[u].c(),w(r[u],1),r[u].m(e,null))}for(ve(),u=n.length;u<r.length;u+=1)s(u);ye()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)w(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)$(r[a]);i=!1},d(o){o&&D(e),Lt(r,o)}}}function ps(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class _s extends te{constructor(e){super(),ee(this,e,ps,ms,q,{tags:0})}}function vs(t){oe(t,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function ys(t){let e,i;return e=new gt({props:{className:t[1][t[0]].text,style:"color: white; background-color: "+ut(t[0]),text:t[1][t[0]].text,iconLaClassName:t[1][t[0]].icon}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ut(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function bs(t,e,i){let{status:n}=e;const r={A:{text:A("Answered"),icon:"la-ticket-answered"},T:{text:A("Chatting"),icon:"la-chatting"},P:{text:A("Calling"),icon:"la-call"},X:{text:A("Deleted"),icon:"la-ticket-deleted"},B:{text:A("Spam"),icon:"la-spam"},I:{text:A("Init"),icon:""},R:{text:A("Resolved"),icon:"la-ticket-resolved"},N:{text:A("New"),icon:"la-ticket-new"},C:{text:A("Open"),icon:"la-ticket-open"},W:{text:A("Postponed"),icon:"la-ticket-postponed"}};return t.$$set=s=>{"status"in s&&i(0,n=s.status)},[n,r]}class ws extends te{constructor(e){super(),ee(this,e,bs,ys,q,{status:0},vs)}}function ks(t){oe(t,"svelte-6lvx50",".subject.svelte-6lvx50{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-6lvx50{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.no-text.svelte-6lvx50{color:var(--main-lighter-textcolor)}.additional.svelte-6lvx50{display:flex}")}function $s(t){let e,i;return e=new gt({props:{className:"Department",text:t[0].departmentname,iconLaClassName:"la-department"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Cs(t){let e,i;return e=new Nn({props:{className:"Department",tagText:t[0].agentname,iconLaClassName:"la-department",iconText:t[0].departmentname}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Ts(t){let e,i=t[0].subject+"",n,r,s,o=(t[0].preview?t[0].preview:A("No text for preview"))+"",a,u,l,c,d,f,h,m,v,S,p,L;d=new ws({props:{status:t[0].status}});const H=[Cs,$s],R=[];function P(z,B){return B&1&&(h=null),h==null&&(h=z[0].agentname.trim()!==""),h?0:1}return m=P(t,-1),v=R[m]=H[m](t),p=new _s({props:{tags:t[0].tags}}),{c(){e=k("h1"),n=se(i),r=W(),s=k("p"),a=se(o),l=W(),c=k("div"),K(d.$$.fragment),f=W(),v.c(),S=W(),K(p.$$.fragment),_(e,"class","subject svelte-6lvx50"),_(s,"class",u=ce(t[0].preview?"preview":"preview no-text")+" svelte-6lvx50"),_(c,"class","additional svelte-6lvx50")},m(z,B){x(z,e,B),b(e,n),x(z,r,B),x(z,s,B),b(s,a),x(z,l,B),x(z,c,B),M(d,c,null),b(c,f),R[m].m(c,null),b(c,S),M(p,c,null),L=!0},p(z,B){(!L||B&1)&&i!==(i=z[0].subject+"")&&le(n,i),(!L||B&1)&&o!==(o=(z[0].preview?z[0].preview:A("No text for preview"))+"")&&le(a,o),(!L||B&1&&u!==(u=ce(z[0].preview?"preview":"preview no-text")+" svelte-6lvx50"))&&_(s,"class",u);const U={};B&1&&(U.status=z[0].status),d.$set(U);let ne=m;m=P(z,B),m===ne?R[m].p(z,B):(ve(),$(R[ne],1,1,()=>{R[ne]=null}),ye(),v=R[m],v?v.p(z,B):(v=R[m]=H[m](z),v.c()),w(v,1),v.m(c,S));const X={};B&1&&(X.tags=z[0].tags),p.$set(X)},i(z){L||(w(d.$$.fragment,z),w(v),w(p.$$.fragment,z),L=!0)},o(z){$(d.$$.fragment,z),$(v),$(p.$$.fragment,z),L=!1},d(z){z&&(D(e),D(r),D(s),D(l),D(c)),I(d),R[m].d(),I(p)}}}function Ls(t){let e,i;return e=new xt({props:{className:t[1],$$slots:{default:[Ts]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Ss(t,e,i){let{row:n}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class Ns extends te{constructor(e){super(),ee(this,e,Ss,Ls,q,{row:0,className:1},ks)}}function Ds(t){oe(t,"svelte-hfkbdu",`.Row.svelte-hfkbdu.svelte-hfkbdu{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
7
|
+
}`)}function Lr(t){let e,i,n,r,s,o;const a=t[4].default,u=Me(a,t,t[3],null);return{c(){e=k("div"),u&&u.c(),i=W(),n=k("span"),r=se(t[0]),_(n,"class","text"),_(e,"class",s="Tag "+t[1]+" svelte-1ujeu71"),_(e,"style",t[2])},m(l,c){x(l,e,c),u&&u.m(e,null),b(e,i),b(e,n),b(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?Ie(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&le(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1ujeu71"))&&_(e,"class",s),(!o||c&4)&&_(e,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&D(e),u&&u.d(l)}}}function Sr(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return t.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class ft extends te{constructor(e){super(),ee(this,e,Sr,Lr,q,{text:0,className:1,style:2},Tr)}}function Nr(t){oe(t,"svelte-1ify73x","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}.IconTag .Icon{display:flex;align-items:center;justify-content:center;font-size:16px;width:16px;height:16px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Dr(t){let e,i;return e=new $e({props:{iconLaClassName:t[2]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function xr(t){let e,i;return e=new ft({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Dr]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Or(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconLaClassName:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class gt extends te{constructor(e){super(),ee(this,e,Or,xr,q,{text:0,className:4,style:1,iconLaClassName:2},Nr)}}function Fr(t){oe(t,"svelte-z82bt4",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-z82bt4{display:none}.companyTag.svelte-z82bt4{display:none}.name.svelte-z82bt4{font-size:13px;line-height:20px;font-weight:bold;padding-right:8px;margin-right:6px;position:relative}.name.svelte-z82bt4::after{content:'';display:block;height:14px;width:1px;background-color:var(--main-textcolor);position:absolute;right:0;top:15%}.no.name.svelte-z82bt4{font-weight:400;color:var(--main-lighter-textcolor)}.email.svelte-z82bt4{font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.texts.svelte-z82bt4{display:flex;flex-direction:row;justify-content:flex-start;overflow:hidden}@media(min-width: 900px){.avatar.svelte-z82bt4{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-z82bt4{padding:0;border:none}.name.svelte-z82bt4::after{display:none}.email.svelte-z82bt4{padding:0}.companyTag.svelte-z82bt4{display:flex}.texts.svelte-z82bt4{display:flex;flex-direction:column;justify-content:space-around}}")}function Wt(t){let e,i;const n=[t[2]];let r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return e=new mr({props:r}),{c(){K(e.$$.fragment)},m(s,o){M(e,s,o),i=!0},p(s,o){const a=o&4?fn(n,[qn(s[2])]):{};e.$set(a)},i(s){i||(w(e.$$.fragment,s),i=!0)},o(s){$(e.$$.fragment,s),i=!1},d(s){I(e,s)}}}function Rr(t){let e,i=t[2].name,n,r,s,o=(t[3]!==void 0?t[3]:"No name")+"",a,u,l,c,d=t[0].emails+"",f,h,m,v,S,p=Wt(t);return v=new gt({props:{text:t[0].company==="Y"?"Company":A("No Company"),className:(t[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){e=k("div"),p.c(),n=W(),r=k("div"),s=k("div"),a=se(o),l=W(),c=k("div"),f=se(d),h=W(),m=k("div"),K(v.$$.fragment),_(e,"class","avatar svelte-z82bt4"),_(s,"class",u=ce(t[3]?"name":"no name")+" svelte-z82bt4"),_(c,"class","email svelte-z82bt4"),_(m,"class","companyTag svelte-z82bt4"),_(r,"class","texts svelte-z82bt4")},m(L,H){x(L,e,H),p.m(e,null),x(L,n,H),x(L,r,H),b(r,s),b(s,a),b(r,l),b(r,c),b(c,f),b(r,h),b(r,m),M(v,m,null),S=!0},p(L,H){H&4&&q(i,i=L[2].name)?(ve(),$(p,1,1,Z),ye(),p=Wt(L),p.c(),w(p,1),p.m(e,null)):p.p(L,H),(!S||H&8)&&o!==(o=(L[3]!==void 0?L[3]:"No name")+"")&&le(a,o),(!S||H&8&&u!==(u=ce(L[3]?"name":"no name")+" svelte-z82bt4"))&&_(s,"class",u),(!S||H&1)&&d!==(d=L[0].emails+"")&&le(f,d);const R={};H&1&&(R.text=L[0].company==="Y"?"Company":A("No Company")),H&1&&(R.className=(L[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),v.$set(R)},i(L){S||(w(p),w(v.$$.fragment,L),S=!0)},o(L){$(p),$(v.$$.fragment,L),S=!1},d(L){L&&(D(e),D(n),D(r)),p.d(L),I(v)}}}function Ar(t){let e,i;return e=new xt({props:{className:t[1],$$slots:{default:[Rr]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&141&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function zr(t,e,i){if(!t)return(i[0]+i[1]).toUpperCase();let n=t[0];return e&&(n+=e[0]),n}function Gr(t,e,i){let n,r,{row:s}=e,{className:o="userColumn"}=e;function a(c,d,f){if(!c)return"";let h=c+" "+d;return h.trim()||(h=f),h}function u(c,d){let f=c;return f||(f="https://www.gravatar.com/avatar/"+br(d[0]??"")+"?s=200&d=404"),f}function l(c,d,f,h){let m;h?m=wr(a(c,d,h)+f):m=Math.floor(Math.random()*16777215);let v=(m&16711680)>>16,S=(m&65280)>>8,p=m&255;return v+S+p<150&&(v=150),v+S+p>400&&(v=0),`rgb(${v},${S},${p})`}return t.$$set=c=>{"row"in c&&i(0,s=c.row),"className"in c&&i(1,o=c.className)},t.$$.update=()=>{t.$$.dirty&1&&i(3,n=s.name),t.$$.dirty&1&&i(2,r={bgColor:l(s.firstname,s.lastname,s.emails,s.systemName),name:a(s.firstname,s.lastname,s.systemName),src:u(s.avatarUrl,s.emails),initials:zr(s.firstname,s.lastname,s.systemName)})},[s,o,r,n]}class Er extends te{constructor(e){super(),ee(this,e,Gr,Ar,q,{row:0,className:1},Fr)}}var Ln={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(kn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",h="year",m="date",v="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var T=["th","st","nd","rd"],y=E%100;return"["+E+(T[(y-20)%10]||T[y]||T[0])+"]"}},H=function(E,T,y){var N=String(E);return!N||N.length>=T?E:""+Array(T+1-N.length).join(y)+E},R={s:H,z:function(E){var T=-E.utcOffset(),y=Math.abs(T),N=Math.floor(y/60),C=y%60;return(T<=0?"+":"-")+H(N,2,"0")+":"+H(C,2,"0")},m:function E(T,y){if(T.date()<y.date())return-E(y,T);var N=12*(y.year()-T.year())+(y.month()-T.month()),C=T.clone().add(N,d),G=y-C<0,J=T.clone().add(N+(G?-1:1),d);return+(-(N+(y-C)/(G?C-J:J-C))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:h,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},P="en",z={};z[P]=L;var B="$isDayjsObject",U=function(E){return E instanceof be||!(!E||!E[B])},ne=function E(T,y,N){var C;if(!T)return P;if(typeof T=="string"){var G=T.toLowerCase();z[G]&&(C=G),y&&(z[G]=y,C=G);var J=T.split("-");if(!C&&J.length>1)return E(J[0])}else{var Q=T.name;z[Q]=T,C=Q}return!N&&C&&(P=C),C||!N&&P},X=function(E,T){if(U(E))return E.clone();var y=typeof T=="object"?T:{};return y.date=E,y.args=arguments,new be(y)},V=R;V.l=ne,V.i=U,V.w=function(E,T){return X(E,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var be=function(){function E(y){this.$L=ne(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[B]=!0}var T=E.prototype;return T.parse=function(y){this.$d=function(N){var C=N.date,G=N.utc;if(C===null)return new Date(NaN);if(V.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var J=C.match(S);if(J){var Q=J[2]-1||0,ie=(J[7]||"0").substring(0,3);return G?new Date(Date.UTC(J[1],Q,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)):new Date(J[1],Q,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)}}return new Date(C)}(y),this.init()},T.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},T.$utils=function(){return V},T.isValid=function(){return this.$d.toString()!==v},T.isSame=function(y,N){var C=X(y);return this.startOf(N)<=C&&C<=this.endOf(N)},T.isAfter=function(y,N){return X(y)<this.startOf(N)},T.isBefore=function(y,N){return this.endOf(N)<X(y)},T.$g=function(y,N,C){return V.u(y)?this[N]:this.set(C,y)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(y,N){var C=this,G=!!V.u(N)||N,J=V.p(y),Q=function(Le,fe){var Ce=V.w(C.$u?Date.UTC(C.$y,fe,Le):new Date(C.$y,fe,Le),C);return G?Ce:Ce.endOf(l)},ie=function(Le,fe){return V.w(C.toDate()[Le].apply(C.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(fe)),C)},O=this.$W,Y=this.$M,ue=this.$D,ke="set"+(this.$u?"UTC":"");switch(J){case h:return G?Q(1,0):Q(31,11);case d:return G?Q(1,Y):Q(0,Y+1);case c:var me=this.$locale().weekStart||0,Je=(O<me?O+7:O)-me;return Q(G?ue-Je:ue+(6-Je),Y);case l:case m:return ie(ke+"Hours",0);case u:return ie(ke+"Minutes",1);case a:return ie(ke+"Seconds",2);case o:return ie(ke+"Milliseconds",3);default:return this.clone()}},T.endOf=function(y){return this.startOf(y,!1)},T.$set=function(y,N){var C,G=V.p(y),J="set"+(this.$u?"UTC":""),Q=(C={},C[l]=J+"Date",C[m]=J+"Date",C[d]=J+"Month",C[h]=J+"FullYear",C[u]=J+"Hours",C[a]=J+"Minutes",C[o]=J+"Seconds",C[s]=J+"Milliseconds",C)[G],ie=G===l?this.$D+(N-this.$W):N;if(G===d||G===h){var O=this.clone().set(m,1);O.$d[Q](ie),O.init(),this.$d=O.set(m,Math.min(this.$D,O.daysInMonth())).$d}else Q&&this.$d[Q](ie);return this.init(),this},T.set=function(y,N){return this.clone().$set(y,N)},T.get=function(y){return this[V.p(y)]()},T.add=function(y,N){var C,G=this;y=Number(y);var J=V.p(N),Q=function(Y){var ue=X(G);return V.w(ue.date(ue.date()+Math.round(Y*y)),G)};if(J===d)return this.set(d,this.$M+y);if(J===h)return this.set(h,this.$y+y);if(J===l)return Q(1);if(J===c)return Q(7);var ie=(C={},C[a]=n,C[u]=r,C[o]=i,C)[J]||1,O=this.$d.getTime()+y*ie;return V.w(O,this)},T.subtract=function(y,N){return this.add(-1*y,N)},T.format=function(y){var N=this,C=this.$locale();if(!this.isValid())return C.invalidDate||v;var G=y||"YYYY-MM-DDTHH:mm:ssZ",J=V.z(this),Q=this.$H,ie=this.$m,O=this.$M,Y=C.weekdays,ue=C.months,ke=C.meridiem,me=function(fe,Ce,Ue,rt){return fe&&(fe[Ce]||fe(N,G))||Ue[Ce].slice(0,rt)},Je=function(fe){return V.s(Q%12||12,fe,"0")},Le=ke||function(fe,Ce,Ue){var rt=fe<12?"AM":"PM";return Ue?rt.toLowerCase():rt};return G.replace(p,function(fe,Ce){return Ce||function(Ue){switch(Ue){case"YY":return String(N.$y).slice(-2);case"YYYY":return V.s(N.$y,4,"0");case"M":return O+1;case"MM":return V.s(O+1,2,"0");case"MMM":return me(C.monthsShort,O,ue,3);case"MMMM":return me(ue,O);case"D":return N.$D;case"DD":return V.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return me(C.weekdaysMin,N.$W,Y,2);case"ddd":return me(C.weekdaysShort,N.$W,Y,3);case"dddd":return Y[N.$W];case"H":return String(Q);case"HH":return V.s(Q,2,"0");case"h":return Je(1);case"hh":return Je(2);case"a":return Le(Q,ie,!0);case"A":return Le(Q,ie,!1);case"m":return String(ie);case"mm":return V.s(ie,2,"0");case"s":return String(N.$s);case"ss":return V.s(N.$s,2,"0");case"SSS":return V.s(N.$ms,3,"0");case"Z":return J}return null}(fe)||J.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(y,N,C){var G,J=this,Q=V.p(N),ie=X(y),O=(ie.utcOffset()-this.utcOffset())*n,Y=this-ie,ue=function(){return V.m(J,ie)};switch(Q){case h:G=ue()/12;break;case d:G=ue();break;case f:G=ue()/3;break;case c:G=(Y-O)/6048e5;break;case l:G=(Y-O)/864e5;break;case u:G=Y/r;break;case a:G=Y/n;break;case o:G=Y/i;break;default:G=Y}return C?G:V.a(G)},T.daysInMonth=function(){return this.endOf(d).$D},T.$locale=function(){return z[this.$L]},T.locale=function(y,N){if(!y)return this.$L;var C=this.clone(),G=ne(y,N,!0);return G&&(C.$L=G),C},T.clone=function(){return V.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},E}(),we=be.prototype;return X.prototype=we,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",m]].forEach(function(E){we[E[1]]=function(T){return this.$g(T,E[0],E[1])}}),X.extend=function(E,T){return E.$i||(E(T,be,X),E.$i=!0),X},X.locale=ne,X.isDayjs=U,X.unix=function(E){return X(1e3*E)},X.en=z[P],X.Ls=z,X.p={},X})})(Ln);var Mr=Ln.exports;const Ye=Dt(Mr);var Sn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(kn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,h){for(var m,v,S,p=d.$locale().relativeTime||o,L=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],H=L.length,R=0;R<H;R+=1){var P=L[R];P.d&&(m=f?r(l).diff(d,P.d,!0):d.diff(l,P.d,!0));var z=(i.rounding||Math.round)(Math.abs(m));if(S=m>0,z<=P.r||!P.r){z<=1&&R>0&&(P=L[R-1]);var B=p[P.l];h&&(z=h(""+z)),v=typeof B=="string"?B.replace("%d",z):B(z,c,P.l,S);break}}if(c)return v;var U=S?p.future:p.past;return typeof U=="function"?U(v):U.replace("%s",v)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(Sn);var Ir=Sn.exports;const Br=Dt(Ir);Ye.extend(Br);function Kr(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return{c(){e=k("time"),i=se(t[0]),Gt(e,r)},m(s,o){x(s,e,o),b(e,i)},p(s,[o]){o&1&&Hn(i,s[0],r.contenteditable),Gt(e,r=fn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Z,o:Z,d(s){s&&D(e)}}}function Jr(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=zt(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,d;const f=60*1e3;return ct(()=>()=>clearInterval(d)),t.$$set=h=>{e=Xe(Xe({},e),Mn(h)),i(3,s=zt(e,r)),"timestamp"in h&&i(1,o=h.timestamp),"format"in h&&i(4,a=h.format),"relative"in h&&i(5,u=h.relative),"live"in h&&i(6,l=h.live),"formatted"in h&&i(0,c=h.formatted)},t.$$.update=()=>{t.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Ye(o).from())},Math.abs(typeof l=="number"?l:f))),t.$$.dirty&50&&i(0,c=u?Ye(o).from():Ye(o).format(a)),t.$$.dirty&50&&i(2,n=u?Ye(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Ur extends te{constructor(e){super(),ee(this,e,Jr,Kr,q,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Wr(t){oe(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Hr(t){let e;return{c(){e=k("span"),e.textContent=`${A("Invalid data")}`,_(e,"class","invalid svelte-1o3wy2t")},m(i,n){x(i,e,n)},p:Z,i:Z,o:Z,d(i){i&&D(e)}}}function Yr(t){let e,i;return e=new Ur({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Pr(t){let e,i,n,r,s;const o=[Yr,Hr],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(t,-1),r=a[n]=o[n](t),{c(){e=k("div"),r.c(),_(e,"class","Date svelte-1o3wy2t")},m(l,c){x(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(ve(),$(a[d],1,1,()=>{a[d]=null}),ye(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),w(r,1),r.m(e,null))},i(l){s||(w(r),s=!0)},o(l){$(r),s=!1},d(l){l&&D(e),a[n].d()}}}function Vr(t,e,i){let{data:n}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&i(0,n=a.data),"format"in a&&i(1,r=a.format),"style"in a&&i(2,s=a.style),"relative"in a&&i(3,o=a.relative)},[n,r,s,o]}class $t extends te{constructor(e){super(),ee(this,e,Vr,Pr,q,{data:0,format:1,style:2,relative:3},Wr)}}function Qr(t){oe(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function Zr(t){let e,i,n,r;i=new $e({props:{iconLaClassName:t[2]}});const s=t[8].default,o=Me(s,t,t[7],null);return{c(){e=k("div"),K(i.$$.fragment),n=W(),o&&o.c(),_(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){x(a,e,u),M(i,e,null),x(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Be(o,s,a,a[7],r?Ie(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(w(i.$$.fragment,a),w(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(D(e),D(n)),I(i),o&&o.d(a)}}}function Xr(t){let e,i;return e=new gt({props:{style:t[3],text:t[0],iconLaClassName:t[2],className:"Combined"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function qr(t){let e,i,n,r,s,o;const a=[Xr,Zr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new ft({props:{style:t[4],text:t[1]}}),{c(){e=k("div"),n.c(),r=W(),K(s.$$.fragment),_(e,"class",ce(t[5])+" svelte-1wdh20c")},m(c,d){x(c,e,d),u[i].m(e,null),b(e,r),M(s,e,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(ve(),$(u[f],1,1,()=>{u[f]=null}),ye(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),w(n,1),n.m(e,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(w(n),w(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&D(e),u[i].d(),I(s)}}}function jr(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconLaClassName:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return t.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class Nn extends te{constructor(e){super(),ee(this,e,jr,qr,q,{iconText:0,tagText:1,iconLaClassName:2,className:6},Qr)}}function es(t){let e,i;return e=new $t({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ts(t){let e,i;return e=new Nn({props:{iconLaClassName:t[3],tagText:t[0],className:t[2],$$slots:{default:[es]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ns(t,e,i){let n,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class is extends te{constructor(e){super(),ee(this,e,ns,ts,q,{tagText:0,due:1})}}function rs(t){oe(t,"svelte-1xhpy1i",".TicketId.svelte-1xhpy1i{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-1xhpy1i{font-size:13px;line-height:20px}.Communication.svelte-1xhpy1i{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}.ticketDetails.svelte-1xhpy1i{display:flex;align-items:center}@media(min-width: 900px){.Changed.svelte-1xhpy1i{display:none}}")}function ss(t){let e,i;return e=new ft({props:{text:A("No SLA"),className:"SLA"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p:Z,i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function os(t){let e,i;return e=new is({props:{tagText:"First answer",due:t[1].datedue}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function as(t){let e,i,n=t[1].code+"",r,s,o,a,u,l,c,d=t[1].messagegroupsIn+"",f,h,m,v,S,p,L=t[1].messagegroupsOut+"",H,R,P,z,B,U,ne,X,V,be,we,E,T,y,N,C,G;u=new $e({props:{iconLaClassName:"la-incoming"}}),v=new $e({props:{iconLaClassName:"la-outgoing"}}),U=new $t({props:{data:t[1].datecreated,format:t[2]}}),we=new $t({props:{data:t[1].datechanged,format:t[2]}});const J=[os,ss],Q=[];function ie(O,Y){return Y&2&&(T=null),T==null&&(T=O[1].datedue instanceof Date&&!isNaN(O[1].datedue)),T?0:1}return y=ie(t,-1),N=Q[y]=J[y](t),{c(){e=k("div"),i=k("span"),r=se(n),s=W(),o=k("div"),a=k("div"),K(u.$$.fragment),l=W(),c=k("span"),f=se(d),h=W(),m=k("div"),K(v.$$.fragment),S=W(),p=k("span"),H=se(L),R=W(),P=k("div"),z=k("span"),z.textContent=`${A("Created")}:`,B=W(),K(U.$$.fragment),ne=W(),X=k("div"),V=k("span"),V.textContent=`${A("Changed")}:`,be=W(),K(we.$$.fragment),E=W(),N.c(),C=nt(),_(i,"class","TicketId svelte-1xhpy1i"),_(a,"class","Communication incomingMessages svelte-1xhpy1i"),_(m,"class","Communication outgoingMessages svelte-1xhpy1i"),_(o,"class","arrows"),_(e,"class","ticketDetails svelte-1xhpy1i"),_(P,"class","Created svelte-1xhpy1i"),_(X,"class","Changed svelte-1xhpy1i")},m(O,Y){x(O,e,Y),b(e,i),b(i,r),b(e,s),b(e,o),b(o,a),M(u,a,null),b(a,l),b(a,c),b(c,f),b(o,h),b(o,m),M(v,m,null),b(m,S),b(m,p),b(p,H),x(O,R,Y),x(O,P,Y),b(P,z),b(P,B),M(U,P,null),x(O,ne,Y),x(O,X,Y),b(X,V),b(X,be),M(we,X,null),x(O,E,Y),Q[y].m(O,Y),x(O,C,Y),G=!0},p(O,Y){(!G||Y&2)&&n!==(n=O[1].code+"")&&le(r,n),(!G||Y&2)&&d!==(d=O[1].messagegroupsIn+"")&&le(f,d),(!G||Y&2)&&L!==(L=O[1].messagegroupsOut+"")&&le(H,L);const ue={};Y&2&&(ue.data=O[1].datecreated),Y&4&&(ue.format=O[2]),U.$set(ue);const ke={};Y&2&&(ke.data=O[1].datechanged),Y&4&&(ke.format=O[2]),we.$set(ke);let me=y;y=ie(O,Y),y===me?Q[y].p(O,Y):(ve(),$(Q[me],1,1,()=>{Q[me]=null}),ye(),N=Q[y],N?N.p(O,Y):(N=Q[y]=J[y](O),N.c()),w(N,1),N.m(C.parentNode,C))},i(O){G||(w(u.$$.fragment,O),w(v.$$.fragment,O),w(U.$$.fragment,O),w(we.$$.fragment,O),w(N),G=!0)},o(O){$(u.$$.fragment,O),$(v.$$.fragment,O),$(U.$$.fragment,O),$(we.$$.fragment,O),$(N),G=!1},d(O){O&&(D(e),D(R),D(P),D(ne),D(X),D(E),D(C)),I(u),I(v),I(U),I(we),Q[y].d(O)}}}function ls(t){let e,i;return e=new xt({props:{className:t[0],$$slots:{default:[as]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&14&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function us(t,e,i){let{className:n="importanceColumn"}=e,{row:r}=e,{format:s="YYYY-MM-DD HH:mm:ss"}=e;return t.$$set=o=>{"className"in o&&i(0,n=o.className),"row"in o&&i(1,r=o.row),"format"in o&&i(2,s=o.format)},[n,r,s]}class cs extends te{constructor(e){super(),ee(this,e,us,ls,q,{className:0,row:1,format:2},rs)}}function ds(t){oe(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function fs(t){let e,i;return e=new ft({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]),r&1&&(s.text=n[0]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function gs(t,e,i){let n,r,s,o;re(t,yn,u=>i(4,o=u));let{tagId:a}=e;return t.$$set=u=>{"tagId"in u&&i(3,a=u.tagId)},t.$$.update=()=>{var u,l,c;t.$$.dirty&24&&i(2,n=((u=o[a])==null?void 0:u.color)??0),t.$$.dirty&24&&i(1,r=((l=o[a])==null?void 0:l.backgroundcolor)??0),t.$$.dirty&24&&i(0,s=((c=o[a])==null?void 0:c.name)??"")},[s,r,n,a,o]}class hs extends te{constructor(e){super(),ee(this,e,gs,fs,q,{tagId:3},ds)}}function Ht(t,e,i){const n=t.slice();return n[1]=e[i],n}function Yt(t){let e,i;return e=new hs({props:{tagId:t[1]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ms(t){let e,i,n=Ee(t[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(t,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){e=k("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){x(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=Yt(l),r[u].c(),w(r[u],1),r[u].m(e,null))}for(ve(),u=n.length;u<r.length;u+=1)s(u);ye()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)w(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)$(r[a]);i=!1},d(o){o&&D(e),Lt(r,o)}}}function ps(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class _s extends te{constructor(e){super(),ee(this,e,ps,ms,q,{tags:0})}}function vs(t){oe(t,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function ys(t){let e,i;return e=new gt({props:{className:t[1][t[0]].text,style:"color: white; background-color: "+ut(t[0]),text:t[1][t[0]].text,iconLaClassName:t[1][t[0]].icon}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ut(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function bs(t,e,i){let{status:n}=e;const r={A:{text:A("Answered"),icon:"la-ticket-answered"},T:{text:A("Chatting"),icon:"la-chatting"},P:{text:A("Calling"),icon:"la-call"},X:{text:A("Deleted"),icon:"la-ticket-deleted"},B:{text:A("Spam"),icon:"la-spam"},I:{text:A("Init"),icon:""},R:{text:A("Resolved"),icon:"la-ticket-resolved"},N:{text:A("New"),icon:"la-ticket-new"},C:{text:A("Open"),icon:"la-ticket-open"},W:{text:A("Postponed"),icon:"la-ticket-postponed"}};return t.$$set=s=>{"status"in s&&i(0,n=s.status)},[n,r]}class ws extends te{constructor(e){super(),ee(this,e,bs,ys,q,{status:0},vs)}}function ks(t){oe(t,"svelte-6lvx50",".subject.svelte-6lvx50{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-6lvx50{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.no-text.svelte-6lvx50{color:var(--main-lighter-textcolor)}.additional.svelte-6lvx50{display:flex}")}function $s(t){let e,i;return e=new gt({props:{className:"Department",text:t[0].departmentname,iconLaClassName:"la-department"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Cs(t){let e,i;return e=new Nn({props:{className:"Department",tagText:t[0].agentname,iconLaClassName:"la-department",iconText:t[0].departmentname}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Ts(t){let e,i=t[0].subject+"",n,r,s,o=(t[0].preview?t[0].preview:A("No text for preview"))+"",a,u,l,c,d,f,h,m,v,S,p,L;d=new ws({props:{status:t[0].status}});const H=[Cs,$s],R=[];function P(z,B){return B&1&&(h=null),h==null&&(h=z[0].agentname.trim()!==""),h?0:1}return m=P(t,-1),v=R[m]=H[m](t),p=new _s({props:{tags:t[0].tags}}),{c(){e=k("h1"),n=se(i),r=W(),s=k("p"),a=se(o),l=W(),c=k("div"),K(d.$$.fragment),f=W(),v.c(),S=W(),K(p.$$.fragment),_(e,"class","subject svelte-6lvx50"),_(s,"class",u=ce(t[0].preview?"preview":"preview no-text")+" svelte-6lvx50"),_(c,"class","additional svelte-6lvx50")},m(z,B){x(z,e,B),b(e,n),x(z,r,B),x(z,s,B),b(s,a),x(z,l,B),x(z,c,B),M(d,c,null),b(c,f),R[m].m(c,null),b(c,S),M(p,c,null),L=!0},p(z,B){(!L||B&1)&&i!==(i=z[0].subject+"")&&le(n,i),(!L||B&1)&&o!==(o=(z[0].preview?z[0].preview:A("No text for preview"))+"")&&le(a,o),(!L||B&1&&u!==(u=ce(z[0].preview?"preview":"preview no-text")+" svelte-6lvx50"))&&_(s,"class",u);const U={};B&1&&(U.status=z[0].status),d.$set(U);let ne=m;m=P(z,B),m===ne?R[m].p(z,B):(ve(),$(R[ne],1,1,()=>{R[ne]=null}),ye(),v=R[m],v?v.p(z,B):(v=R[m]=H[m](z),v.c()),w(v,1),v.m(c,S));const X={};B&1&&(X.tags=z[0].tags),p.$set(X)},i(z){L||(w(d.$$.fragment,z),w(v),w(p.$$.fragment,z),L=!0)},o(z){$(d.$$.fragment,z),$(v),$(p.$$.fragment,z),L=!1},d(z){z&&(D(e),D(r),D(s),D(l),D(c)),I(d),R[m].d(),I(p)}}}function Ls(t){let e,i;return e=new xt({props:{className:t[1],$$slots:{default:[Ts]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Ss(t,e,i){let{row:n}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class Ns extends te{constructor(e){super(),ee(this,e,Ss,Ls,q,{row:0,className:1},ks)}}function Ds(t){oe(t,"svelte-hfkbdu",`.Row.svelte-hfkbdu.svelte-hfkbdu{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
8
8
|
"checkbox status"
|
|
9
9
|
"checkbox importance";border-radius:12px;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.10);border-bottom:1px solid var(--menu-selected-bg);padding-top:6px;padding-bottom:6px;margin-bottom:6px;background-color:var(--main-background)}.Row.svelte-hfkbdu.svelte-hfkbdu:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-hfkbdu.svelte-hfkbdu{background-color:var(--menu-selected-bg) !important}.UserColumn.svelte-hfkbdu.svelte-hfkbdu{grid-area:user}.StatusColumn.svelte-hfkbdu.svelte-hfkbdu{grid-area:status;display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-hfkbdu.svelte-hfkbdu{grid-area:importance}.Checkbox.svelte-hfkbdu.svelte-hfkbdu{grid-area:checkbox;position:relative}.StatusBar.svelte-hfkbdu.svelte-hfkbdu{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px;transition:width 0.1s ease}.Row.svelte-hfkbdu:hover .StatusBar.svelte-hfkbdu{width:10px}input.svelte-hfkbdu.svelte-hfkbdu{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-hfkbdu.svelte-hfkbdu{display:grid;grid-template-areas:"checkbox user importance"
|
|
10
10
|
"checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px;column-gap:6px}}@media(min-width: 900px){.Row.svelte-hfkbdu.svelte-hfkbdu{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 180px auto 190px;height:72px}}@media(min-width: 1300px){.Row.svelte-hfkbdu.svelte-hfkbdu{grid-template-columns:60px 260px auto 230px}}`)}function Pt(t,e,i){const n=t.slice();return n[9]=e[i],n[10]=e,n[11]=i,n}function Vt(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,m,v,S,p,L,H;function R(){t[5].call(s,t[11])}function P(...U){return t[6](t[11],...U)}l=new Er({props:{row:t[9]}}),f=new Ns({props:{row:t[9]}}),v=new cs({props:{row:t[9]}});function z(){return t[7](t[9])}function B(...U){return t[8](t[9],...U)}return{c(){e=k("div"),i=k("div"),n=k("div"),r=W(),s=k("input"),a=W(),u=k("div"),K(l.$$.fragment),c=W(),d=k("div"),K(f.$$.fragment),h=W(),m=k("div"),K(v.$$.fragment),_(n,"class","StatusBar svelte-hfkbdu"),mt(n,"background-color",ut(t[9].status)),_(s,"type","checkbox"),s.__value=o=t[9].conversationid,Et(s,s.__value),_(s,"class","svelte-hfkbdu"),_(i,"class","Checkbox svelte-hfkbdu"),mt(i,"position","relative"),_(u,"class","UserColumn svelte-hfkbdu"),_(d,"class","StatusColumn svelte-hfkbdu"),_(m,"class","ImportanceColumn svelte-hfkbdu"),_(e,"class",S="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-hfkbdu")},m(U,ne){x(U,e,ne),b(e,i),b(i,n),b(i,r),b(i,s),s.checked=t[1][t[11]].__selected,b(e,a),b(e,u),M(l,u,null),b(e,c),b(e,d),M(f,d,null),b(e,h),b(e,m),M(v,m,null),p=!0,L||(H=[ae(s,"change",R),ae(s,"click",yt(P)),ae(i,"click",yt(Os)),ae(e,"click",z),ae(e,"mousedown",B)],L=!0)},p(U,ne){t=U,(!p||ne&2)&&mt(n,"background-color",ut(t[9].status)),(!p||ne&2&&o!==(o=t[9].conversationid))&&(s.__value=o,Et(s,s.__value)),ne&2&&(s.checked=t[1][t[11]].__selected);const X={};ne&2&&(X.row=t[9]),l.$set(X);const V={};ne&2&&(V.row=t[9]),f.$set(V);const be={};ne&2&&(be.row=t[9]),v.$set(be),(!p||ne&2&&S!==(S="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-hfkbdu"))&&_(e,"class",S)},i(U){p||(w(l.$$.fragment,U),w(f.$$.fragment,U),w(v.$$.fragment,U),p=!0)},o(U){$(l.$$.fragment,U),$(f.$$.fragment,U),$(v.$$.fragment,U),p=!1},d(U){U&&D(e),I(l),I(f),I(v),L=!1,Te(H)}}}function xs(t){let e,i,n,r=Ee(t[1]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(t,r,l));const o=l=>$(s[l],1,1,()=>{s[l]=null}),a=t[4].default,u=Me(a,t,t[3],null);return{c(){e=k("div");for(let l=0;l<s.length;l+=1)s[l].c();i=W(),u&&u.c(),_(e,"class","Body")},m(l,c){x(l,e,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(e,null);b(e,i),u&&u.m(e,null),n=!0},p(l,[c]){if(c&7){r=Ee(l[1]);let d;for(d=0;d<r.length;d+=1){const f=Pt(l,r,d);s[d]?(s[d].p(f,c),w(s[d],1)):(s[d]=Vt(f),s[d].c(),w(s[d],1),s[d].m(e,i))}for(ve(),d=r.length;d<s.length;d+=1)o(d);ye()}u&&u.p&&(!n||c&8)&&Be(u,a,l,l[3],n?Ie(a,l[3],c,null):Ke(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)w(s[c]);w(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)$(s[c]);$(u,l),n=!1},d(l){l&&D(e),Lt(s,l),u&&u.d(l)}}}const Os=()=>{};function Fs(t,e,i){let n;re(t,_e,f=>i(1,n=f));let{$$slots:r={},$$scope:s}=e,{middleclickhandler:o}=e;function a(f,h){if(f.shiftKey){let m=n.findIndex(v=>v.__selected);if(m!==-1){let v=Math.min(m,h),S=Math.max(m,h);for(let p=v;p<=S;p++)un(_e,n[p].__selected=!0,n)}}}function u(f){n[f].__selected=this.checked,_e.set(n)}const l=(f,h)=>a(h,f),c=f=>location.assign("#Conversation;id="+f.conversationid),d=(f,h)=>{h.button===1&&o&&(o(f.conversationid),h.preventDefault(),h.stopPropagation())};return t.$$set=f=>{"middleclickhandler"in f&&i(0,o=f.middleclickhandler),"$$scope"in f&&i(3,s=f.$$scope)},[o,n,a,s,r,u,l,c,d]}class Rs extends te{constructor(e){super(),ee(this,e,Fs,xs,q,{middleclickhandler:0},Ds)}}function As(t){oe(t,"svelte-1nok758","div.svelte-1nok758{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function zs(t){let e,i,n;return{c(){e=k("div"),i=k("p"),n=se(t[0]),_(e,"class","svelte-1nok758")},m(r,s){x(r,e,s),b(e,i),b(i,n)},p(r,[s]){s&1&&le(n,r[0])},i:Z,o:Z,d(r){r&&D(e)}}}function Gs(t,e,i){let n,r,s,o,a;return re(t,De,u=>i(1,r=u)),re(t,_e,u=>i(2,s=u)),re(t,bn,u=>i(3,o=u)),re(t,ze,u=>i(4,a=u)),t.$$.update=()=>{t.$$.dirty&30&&i(0,n=a?A("Loading..."):o?A("Loading failed. Please try again later."):!s||s.length===0?A("No results match your filter. Try broadening the search criteria."):r==null?A("All data loaded"):A("Load more data"))},[n,r,s,o,a]}class Es extends te{constructor(e){super(),ee(this,e,Gs,zs,q,{},As)}}function Ms(t){oe(t,"svelte-1srt8g7",`button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0 0 0 30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.radio-option.svelte-1srt8g7 input[type="radio"].svelte-1srt8g7{display:none}.radio-option.svelte-1srt8g7.svelte-1srt8g7{display:flex;align-items:center;position:relative;width:calc(100% - 8px);padding:6px 10px;color:var(--main-textcolor);cursor:pointer}.radio-option.svelte-1srt8g7.svelte-1srt8g7::before{content:'';display:inline-block;width:16px;height:16px;margin-right:10px;border-radius:50%;border:2px solid var(--menu-selected-bg);background-color:white}.selected.svelte-1srt8g7.svelte-1srt8g7{font-weight:700}.selected.svelte-1srt8g7.svelte-1srt8g7::before{width:10px;height:10px;border:5px solid var(--ticket-status-chat-background)}.radio-option.svelte-1srt8g7.svelte-1srt8g7:hover{background:var(--menu-hover-bg)}.Title.svelte-1srt8g7.svelte-1srt8g7{width:100%;margin:4px 0 12px 10px;color:var(--main-textcolor);font-size:13px;font-style:normal;font-weight:700;line-height:20px;font-family:'Roboto', sans-serif}.Title.svelte-1srt8g7.svelte-1srt8g7::after{content:'';position:absolute;left:10px;right:10px;bottom:calc(100% - 37px);height:1px;background-color:var(--menu-selected-bg)}.modal.svelte-1srt8g7.svelte-1srt8g7{min-width:200px;display:flex;flex-direction:column;align-items:flex-start;margin:0;padding:4px;background-color:var(--main-background);border:none;border-radius:6px;overflow:hidden;z-index:99999;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}`)}function Qt(t,e,i){const n=t.slice();return n[8]=e[i],n}function Zt(t){let e,i,n,r,s=t[8].label+"",o,a,u,l,c;return{c(){e=k("label"),i=k("input"),r=W(),o=se(s),a=W(),_(i,"type","radio"),_(i,"name","sorting"),i.value=t[8].value,i.checked=n=t[0]&&t[0].value===t[8].value,_(i,"class","svelte-1srt8g7"),_(e,"class",u=ce(t[0].value===t[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")},m(d,f){x(d,e,f),b(e,i),b(e,r),b(e,o),b(e,a),l||(c=ae(i,"click",t[4]),l=!0)},p(d,f){f&1&&n!==(n=d[0]&&d[0].value===d[8].value)&&(i.checked=n),f&1&&u!==(u=ce(d[0].value===d[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")&&_(e,"class",u)},d(d){d&&D(e),l=!1,c()}}}function Is(t){let e,i,n,r=Ee(t[3]),s=[];for(let o=0;o<r.length;o+=1)s[o]=Zt(Qt(t,r,o));return{c(){e=k("dialog"),i=k("span"),i.textContent=`${A("Sort by")}`,n=W();for(let o=0;o<s.length;o+=1)s[o].c();_(i,"class","Title svelte-1srt8g7"),_(e,"class","modal svelte-1srt8g7"),_(e,"style",t[1])},m(o,a){x(o,e,a),b(e,i),b(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null);t[6](e)},p(o,[a]){if(a&25){r=Ee(o[3]);let u;for(u=0;u<r.length;u+=1){const l=Qt(o,r,u);s[u]?s[u].p(l,a):(s[u]=Zt(l),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=r.length}a&2&&_(e,"style",o[1])},i:Z,o:Z,d(o){o&&D(e),Lt(s,o),t[6](null)}}}function Bs(t,e,i){let{currentFilter:n}=e,{closeModal:r=()=>u.close()}=e,{style:s=""}=e;const o=dn(),a=[{value:"Datedue",label:A("Importance"),sort:We.Datedue,dir:!1},{value:"Created-newest",label:A("Date created - Newest"),sort:We.Datecreated,dir:!1},{value:"Created-oldest",label:A("Date created - Oldest"),sort:We.Datecreated,dir:!0},{value:"Changed-newest",label:A("Date changed - Newest"),sort:We.Datechanged,dir:!1},{value:"Changed-oldest",label:A("Date changed - Oldest"),sort:We.Datechanged,dir:!0}];let u;function l(d){const f=a.find(h=>h.value===d.target.value);i(0,n=f),o("filterChange",{option:f}),r()}function c(d){Ge[d?"unshift":"push"](()=>{u=d,i(2,u)})}return t.$$set=d=>{"currentFilter"in d&&i(0,n=d.currentFilter),"closeModal"in d&&i(5,r=d.closeModal),"style"in d&&i(1,s=d.style)},[n,s,u,a,l,r,c]}class Ks extends te{constructor(e){super(),ee(this,e,Bs,Is,q,{currentFilter:0,closeModal:5,style:1},Ms)}}function Js(t){oe(t,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function Us(t){let e,i,n;return{c(){e=k("div"),_(e,"class","backdrop svelte-657q9o")},m(r,s){x(r,e,s),i||(n=ae(e,"click",yt(function(){Tt(t[0])&&t[0].apply(this,arguments)})),i=!0)},p(r,[s]){t=r},i:Z,o:Z,d(r){r&&D(e),i=!1,n()}}}function Ws(t,e,i){let{onClick:n}=e;return t.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class Hs extends te{constructor(e){super(),ee(this,e,Ws,Us,q,{onClick:0},Js)}}function Ys(t){oe(t,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function Ps(t){let e,i,n,r,s,o;return n=new Es({}),{c(){e=k("div"),i=k("div"),K(n.$$.fragment),_(i,"class","load svelte-1fwehqj"),_(e,"class","load svelte-1fwehqj")},m(a,u){x(a,e,u),b(e,i),M(n,i,null),t[11](i),r=!0,s||(o=ae(i,"click",t[12]),s=!0)},p:Z,i(a){r||(w(n.$$.fragment,a),r=!0)},o(a){$(n.$$.fragment,a),r=!1},d(a){a&&D(e),I(n),t[11](null),s=!1,o()}}}function Xt(t){let e,i,n,r;return e=new Ks({props:{closeModal:t[8],currentFilter:t[5],style:t[4]}}),e.$on("filterChange",t[10]),n=new Hs({props:{onClick:t[8]}}),{c(){K(e.$$.fragment),i=W(),K(n.$$.fragment)},m(s,o){M(e,s,o),x(s,i,o),M(n,s,o),r=!0},p(s,o){const a={};o&32&&(a.currentFilter=s[5]),o&16&&(a.style=s[4]),e.$set(a)},i(s){r||(w(e.$$.fragment,s),w(n.$$.fragment,s),r=!0)},o(s){$(e.$$.fragment,s),$(n.$$.fragment,s),r=!1},d(s){s&&D(i),I(e,s),I(n,s)}}}function Vs(t){let e,i,n,r,s,o;i=new rr({props:{currentFilter:t[5].label}}),i.$on("openModal",t[9]),r=new Rs({props:{middleclickhandler:t[0],$$slots:{default:[Ps]},$$scope:{ctx:t}}});let a=t[3]&&Xt(t);return{c(){e=k("div"),K(i.$$.fragment),n=W(),K(r.$$.fragment),s=W(),a&&a.c(),_(e,"class","container svelte-1fwehqj")},m(u,l){x(u,e,l),M(i,e,null),b(e,n),M(r,e,null),b(e,s),a&&a.m(e,null),t[13](e),o=!0},p(u,[l]){const c={};l&32&&(c.currentFilter=u[5].label),i.$set(c);const d={};l&1&&(d.middleclickhandler=u[0]),l&16578&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[3]?a?(a.p(u,l),l&8&&w(a,1)):(a=Xt(u),a.c(),w(a,1),a.m(e,null)):a&&(ve(),$(a,1,1,()=>{a=null}),ye())},i(u){o||(w(i.$$.fragment,u),w(r.$$.fragment,u),w(a),o=!0)},o(u){$(i.$$.fragment,u),$(r.$$.fragment,u),$(a),o=!1},d(u){u&&D(e),I(i),I(r),a&&a.d(),t[13](null)}}}function Qs(t,e,i){let n,r,s;re(t,Qe,p=>i(6,r=p)),re(t,De,p=>i(7,s=p));let{middleclickhandler:o}=e,a,u,l=!1,c="";ct(()=>{const p=localStorage.getItem("TicketGridCurrentFilter");p&&i(5,n=JSON.parse(p));const L=new IntersectionObserver(H=>{H[0].isIntersecting&&tt()},{root:u,threshold:.5});return L.observe(a),()=>L.unobserve(a)});function d(){i(3,l=!1)}function f(p){i(3,l=!0),i(4,c=p.detail.dialogStyles)}function h(p){d(),console.log("filter changed: "+p.detail.option.sort+" "+p.detail.option.dir),p.detail.option.value!==n.value&&(i(5,n=p.detail.option),localStorage.setItem("TicketGridCurrentFilter",JSON.stringify(n)),et.set(n.dir),Nt.set(n.sort))}function m(p){Ge[p?"unshift":"push"](()=>{a=p,i(1,a)})}const v=()=>tt(r&&!s);function S(p){Ge[p?"unshift":"push"](()=>{u=p,i(2,u)})}return t.$$set=p=>{"middleclickhandler"in p&&i(0,o=p.middleclickhandler)},i(5,n={value:"Datedue",label:"Importance"}),[o,a,u,l,c,n,r,s,d,f,h,m,v,S]}class Zs extends te{constructor(e){super(),ee(this,e,Qs,Vs,q,{middleclickhandler:0},Ys)}}class Xs{constructor(e,i){const n=new St({apiKey:e,basePath:i+"/api/v3"});this.api=new _n(n)}async load(){let e=await this.api.getTagsGridList();e=e.reduce((i,n)=>(i[n.tagid]=n,i),{}),yn.set(e)}}function qs(t){oe(t,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function js(t){let e,i,n,r,s;const o=t[4].default,a=Me(o,t,t[3],null);return{c(){e=k("button"),a&&a.c(),_(e,"class",i=ce(t[0])+" svelte-10fvxzv")},m(u,l){x(u,e,l),a&&a.m(e,null),n=!0,r||(s=ae(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Be(a,o,u,u[3],n?Ie(o,u[3],l,null):Ke(u[3]),null),(!n||l&1&&i!==(i=ce(u[0])+" svelte-10fvxzv"))&&_(e,"class",i)},i(u){n||(w(a,u),n=!0)},o(u){$(a,u),n=!1},d(u){u&&D(e),a&&a.d(u),r=!1,s()}}}function eo(t,e,i){let{$$slots:n={},$$scope:r}=e,{onAction:s=u=>{}}=e,{className:o=""}=e;function a(u){s(u)}return t.$$set=u=>{"onAction"in u&&i(2,s=u.onAction),"className"in u&&i(0,o=u.className),"$$scope"in u&&i(3,r=u.$$scope)},[o,a,s,r,n]}class qt extends te{constructor(e){super(),ee(this,e,eo,js,q,{onAction:2,className:0},qs)}}function to(t){oe(t,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function no(t){let e,i,n=A("Change filter")+"",r,s;return e=new $e({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){K(e.$$.fragment),i=W(),r=se(n)},m(o,a){M(e,o,a),x(o,i,a),x(o,r,a),s=!0},p:Z,i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),I(e,o)}}}function io(t){let e,i,n=A("Configure chat button")+"",r,s;return e=new $e({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){K(e.$$.fragment),i=W(),r=se(n)},m(o,a){M(e,o,a),x(o,i,a),x(o,r,a),s=!0},p:Z,i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),I(e,o)}}}function ro(t){let e,i,n,r,s,o,a,u,l,c,d,f,h;return c=new qt({props:{className:"Filter",onAction:t[0],$$slots:{default:[no]},$$scope:{ctx:t}}}),f=new qt({props:{className:"Configure",onAction:t[1],$$slots:{default:[io]},$$scope:{ctx:t}}}),{c(){e=k("div"),i=k("img"),r=W(),s=k("h1"),s.textContent=`${A("No tickets found")}`,o=W(),a=k("p"),a.textContent=`${A("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")}`,u=W(),l=k("div"),K(c.$$.fragment),d=W(),K(f.$$.fragment),_(i,"alt","No results placeholder"),vt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||_(i,"src",n),_(i,"class","svelte-19qi61t"),_(s,"class","svelte-19qi61t"),_(a,"class","svelte-19qi61t"),_(l,"class","Buttons"),_(e,"class","NoTickets svelte-19qi61t")},m(m,v){x(m,e,v),b(e,i),b(e,r),b(e,s),b(e,o),b(e,a),b(e,u),b(e,l),M(c,l,null),b(l,d),M(f,l,null),h=!0},p(m,[v]){const S={};v&4&&(S.$$scope={dirty:v,ctx:m}),c.$set(S);const p={};v&4&&(p.$$scope={dirty:v,ctx:m}),f.$set(p)},i(m){h||(w(c.$$.fragment,m),w(f.$$.fragment,m),h=!0)},o(m){$(c.$$.fragment,m),$(f.$$.fragment,m),h=!1},d(m){m&&D(e),I(c),I(f)}}}function so(){window.showCustomFilter?window.showCustomFilter():console.error("GWT function 'showCustomFilter' is not defined or exposed.")}function oo(t){return[()=>so(),()=>window.location.hash="Chat-Buttons"]}class ao extends te{constructor(e){super(),ee(this,e,oo,ro,q,{},to)}}function lo(t){oe(t,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function uo(t){let e,i;return e=new Zs({props:{middleclickhandler:t[0]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.middleclickhandler=n[0]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function co(t){let e,i;return e=new ao({}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p:Z,i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function fo(t){let e,i,n,r;const s=[co,uo],o=[];function a(u,l){return!u[1].length&&u[2]?0:1}return i=a(t),n=o[i]=s[i](t),{c(){e=k("main"),n.c(),_(e,"class","svelte-14f2ism")},m(u,l){x(u,e,l),o[i].m(e,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(ve(),$(o[c],1,1,()=>{o[c]=null}),ye(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),w(n,1),n.m(e,null))},i(u){r||(w(n),r=!0)},o(u){$(n),r=!1},d(u){u&&D(e),o[i].d()}}}function go(t,e,i){let n,r,s,o,a,u;re(t,Ve,f=>i(8,n=f)),re(t,je,f=>i(5,r=f)),re(t,Nt,f=>i(6,s=f)),re(t,et,f=>i(7,o=f)),re(t,_e,f=>i(1,a=f)),re(t,Qe,f=>i(2,u=f));let{apikey:l}=e,{middleclickhandler:c}=e,{basePath:d}=e;return ct(async()=>{await new Xs(l,d).load();const f=new _n(new St({apiKey:l,basePath:d+"/api/v3"}));lt.set(f),await tt(!0)}),_e.subscribe(f=>{vn.set(n?f.filter(h=>!h.__selected).map(h=>h.conversationid):f.filter(h=>h.__selected).map(h=>h.conversationid))}),t.$$set=f=>{"apikey"in f&&i(3,l=f.apikey),"middleclickhandler"in f&&i(0,c=f.middleclickhandler),"basePath"in f&&i(4,d=f.basePath)},t.$$.update=()=>{t.$$.dirty&224&&(o||s||r)&&tt(!0)},[c,a,u,l,d,r,s,o]}class ho extends te{constructor(e){super(),ee(this,e,go,fo,q,{apikey:3,middleclickhandler:0,basePath:4},lo)}}const mo={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},po={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:mo,warnOnMissingMessages:!0},_o=po;let Dn;function xn(){return Dn}function vo(t){return Dn=t}function ht(){return _o}function jt(t){return t.split("-").map((e,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Ot(t,e=ht().fallbackLocale){const i=jt(t);return e?[...new Set([...i,...jt(e)])]:i}let On;const Ft=de({});function Fn(t){return t in On}function yo(t){if(t==null)return null;const e=Ot(t);for(let i=0;i<e.length;i++){const n=e[i];if(Fn(n))return n}return null}function bo(t,...e){Ft.update(i=>(i[t]=Object.assign(i[t]||{},...e),i))}Ft.subscribe(t=>On=t);const en=de(!1),Rt={};function wo(t){Rt[t]=new Set}function ko(t){delete Rt[t]}function Ze(t){return Rt[t]}function $o(t){return Ot(t).reverse().map(e=>{const i=Ze(e);return[e,i?[...i]:[]]}).filter(([,e])=>e.length>0)}function Rn(t){return Ot(t).reverse().some(Ze)}const He={};function An(t){if(!Rn(t))return Promise.resolve();if(t in He)return He[t];const e=$o(t);if(e.length===0)return Promise.resolve();const i=setTimeout(()=>en.set(!0),ht().loadingDelay);return He[t]=Promise.all(e.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{ko(n),s=s.map(o=>o.default||o),bo(n,...s)}))).then(()=>{clearTimeout(i),en.set(!1),delete He[t]}),He[t]}function tn(t,e){Ze(t)||wo(t);const i=Ze(t);Ze(t).has(e)||(Fn(t)||Ft.update(n=>(n[t]={},n)),i.add(e))}const it=de("");it.subscribe(t=>{vo(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const Ct=it.set;it.set=t=>yo(t)&&Rn(t)?An(t).then(()=>Ct(t)):Ct(t);it.update=t=>{let e=xn();t(e),Ct(e)};function Co(t){const{formats:e,...i}=t,n=t.initialLocale||t.fallbackLocale,r=ht();return Object.assign(r,i,{initialLocale:n}),e&&("number"in e&&Object.assign(r.formats.number,e.number),"date"in e&&Object.assign(r.formats.date,e.date),"time"in e&&Object.assign(r.formats.time,e.time)),it.set(n)}function To(t){return An(t||xn()||ht().initialLocale)}const Lo="modulepreload",So=function(t){return"/"+t},nn={},rn=function(e,i,n){if(!i||i.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=So(s),s in nn)return;nn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Lo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function No(){tn("en",()=>rn(()=>import("./en.js"),[])),tn("sk",()=>rn(()=>import("./sk.js"),[]))}function sn(t){let e,i;return e=new ho({props:{apikey:t[0],basePath:t[3],filters:t[1],middleclickhandler:t[2],$$slots:{default:[Do]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.apikey=n[0]),r&8&&(s.basePath=n[3]),r&2&&(s.filters=n[1]),r&4&&(s.middleclickhandler=n[2]),r&64&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Do(t){let e;const i=t[5].default,n=Me(i,t,t[6],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&64)&&Be(n,i,r,r[6],e?Ie(i,r[6],s,null):Ke(r[6]),null)},i(r){e||(w(n,r),e=!0)},o(r){$(n,r),e=!1},d(r){n&&n.d(r)}}}function xo(t){let e,i,n,r,s=t[0]&&sn(t);return{c(){s&&s.c(),e=W(),i=k("link"),_(i,"rel","stylesheet"),_(i,"href",n=t[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),x(o,e,a),x(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&w(s,1)):(s=sn(o),s.c(),w(s,1),s.m(e.parentNode,e)):s&&(ve(),$(s,1,1,()=>{s=null}),ye()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&_(i,"href",n)},i(o){r||(w(s),r=!0)},o(o){$(s),r=!1},d(o){o&&(D(e),D(i)),s&&s.d(o)}}}function Oo(t){const e={};return t.forEach(i=>{if(i.length===2){const[n,r]=i;e[n]=r}}),e}function Fo(t,e,i){let{$$slots:n={},$$scope:r}=e;No();let{lang:s="sk"}=e,{apikey:o}=e,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=e,{middleclickhandler:u}=e,{basepath:l}=e;return ct(()=>{je.set(a);const c=localStorage.getItem("la-dictionary-a");if(c)try{const d=JSON.parse(c);wn.set(Oo(d[3][1]))}catch(d){console.error("Error parsing translation data:",d)}}),Co({initialLocale:s,fallbackLocale:"en"}),To(),t.$$set=c=>{"lang"in c&&i(4,s=c.lang),"apikey"in c&&i(0,o=c.apikey),"filters"in c&&i(1,a=c.filters),"middleclickhandler"in c&&i(2,u=c.middleclickhandler),"basepath"in c&&i(3,l=c.basepath),"$$scope"in c&&i(6,r=c.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&a&&je.set(a)},[o,a,u,l,s,n,r]}class Ro extends te{constructor(e){super(),ee(this,e,Fo,xo,q,{lang:4,apikey:0,filters:1,middleclickhandler:2,basepath:3})}get lang(){return this.$$.ctx[4]}set lang(e){this.$$set({lang:e}),Se()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),Se()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),Se()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),Se()}get basepath(){return this.$$.ctx[3]}set basepath(e){this.$$set({basepath:e}),Se()}}customElements.define("tickets-table",ei(Ro,{lang:{},apikey:{},filters:{},middleclickhandler:{},basepath:{}},["default"],[],!0));
|