@qualityunit/liveagent-ticket-grid 0.0.2 → 0.0.4
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 +4 -4
- package/dist/index.html +0 -1
- package/package.json +1 -1
- package/dist/assets/index.css +0 -1
package/dist/assets/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var Tn=Object.defineProperty;var Cn=(t,e,n)=>e in t?Tn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var qe=(t,e,n)=>(Cn(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function H(){}function We(t,e){for(const n in e)t[n]=e[n];return t}function vt(t){return t()}function Rt(){return Object.create(null)}function _e(t){t.forEach(vt)}function Fe(t){return typeof t=="function"}function x(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let xe;function gt(t,e){return xe||(xe=document.createElement("a")),xe.href=e,t===xe.href}function rn(t){return Object.keys(t).length===0}function me(t,...e){if(t==null)return H;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ie(t,e,n){t.$$.on_destroy.push(me(e,n))}function Ge(t,e,n,i){if(t){const r=sn(t,e,n,i);return t[0](r)}}function sn(t,e,n,i){return t[1]&&i?We(n.ctx.slice(),t[1](i(e))):n.ctx}function Ee(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function $e(t,e,n,i,r,s){if(r){const o=sn(e,n,i,s);t.p(o,r)}}function ze(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function Ln(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Ot(t,e){const n={};e=new Set(e);for(const i in t)!e.has(i)&&i[0]!=="$"&&(n[i]=t[i]);return n}function ke(t){return t??""}function Te(t,e,n){return t.set(n),e}const Sn=["",!0,1,"true","contenteditable"];function R(t,e){t.appendChild(e)}function F(t,e,n){t.insertBefore(e,n||null)}function M(t){t.parentNode&&t.parentNode.removeChild(t)}function bt(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function G(t){return document.createElement(t)}function Dn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ne(t){return document.createTextNode(t)}function P(){return ne(" ")}function nt(){return ne("")}function de(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function An(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function D(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Nn=["width","height"];function Ft(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set&&Nn.indexOf(i)===-1?t[i]=e[i]:D(t,i,e[i])}function Mt(t,e){for(const n in e)D(t,n,e[n])}function Rn(t){return Array.from(t.childNodes)}function re(t,e){e=""+e,t.data!==e&&(t.data=e)}function On(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Fn(t,e,n){~Sn.indexOf(n)?On(t,e):re(t,e)}function ut(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function be(t,e,n){t.classList[n?"add":"remove"](e)}function Mn(t){const e={};for(const n of t)e[n.name]=n.value;return e}function Gt(t,e){return new t(e)}let Ye;function Ue(t){Ye=t}function wt(){if(!Ye)throw new Error("Function called outside component initialization");return Ye}function on(t){wt().$$.on_mount.push(t)}function ve(t,e){return wt().$$.context.set(t,e),e}function we(t){return wt().$$.context.get(t)}const Ne=[],et=[];let Oe=[];const Et=[],Gn=Promise.resolve();let ht=!1;function En(){ht||(ht=!0,Gn.then(pe))}function mt(t){Oe.push(t)}const ct=new Set;let De=0;function pe(){if(De!==0)return;const t=Ye;do{try{for(;De<Ne.length;){const e=Ne[De];De++,Ue(e),$n(e.$$)}}catch(e){throw Ne.length=0,De=0,e}for(Ue(null),Ne.length=0,De=0;et.length;)et.pop()();for(let e=0;e<Oe.length;e+=1){const n=Oe[e];ct.has(n)||(ct.add(n),n())}Oe.length=0}while(Ne.length);for(;Et.length;)Et.pop()();ht=!1,ct.clear(),Ue(t)}function $n(t){if(t.fragment!==null){t.update(),_e(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(mt)}}function zn(t){const e=[],n=[];Oe.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),Oe=e}const je=new Set;let Ce;function le(){Ce={r:0,c:[],p:Ce}}function ue(){Ce.r||_e(Ce.c),Ce=Ce.p}function w(t,e){t&&t.i&&(je.delete(t),t.i(e))}function S(t,e,n,i){if(t&&t.o){if(je.has(t))return;je.add(t),Ce.c.push(()=>{je.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function In(t,e){S(t,1,1,()=>{e.delete(t.key)})}function Kn(t,e,n,i,r,s,o,a,u,l,c,f){let d=t.length,g=s.length,m=d;const _={};for(;m--;)_[t[m].key]=m;const b=[],O=new Map,C=new Map,A=[];for(m=g;m--;){const N=f(r,s,m),Q=n(N);let V=o.get(Q);V?i&&A.push(()=>V.p(N,e)):(V=l(Q,N),V.c()),O.set(Q,b[m]=V),Q in _&&C.set(Q,Math.abs(m-_[Q]))}const p=new Set,L=new Set;function I(N){w(N,1),N.m(a,c),o.set(N.key,N),c=N.first,g--}for(;d&&g;){const N=b[g-1],Q=t[d-1],V=N.key,J=Q.key;N===Q?(c=N.first,d--,g--):O.has(J)?!o.has(V)||p.has(V)?I(N):L.has(J)?d--:C.get(V)>C.get(J)?(L.add(V),I(N)):(p.add(J),d--):(u(Q,o),d--)}for(;d--;){const N=t[d];O.has(N.key)||u(N,o)}for(;g;)I(b[g-1]);return _e(A),b}function an(t,e){const n={},i={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(i[u]=1);for(const u in a)r[u]||(n[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in i)o in n||(n[o]=void 0);return n}function Y(t){t&&t.c()}function W(t,e,n,i){const{fragment:r,after_update:s}=t.$$;r&&r.m(e,n),i||mt(()=>{const o=t.$$.on_mount.map(vt).filter(Fe);t.$$.on_destroy?t.$$.on_destroy.push(...o):_e(o),t.$$.on_mount=[]}),s.forEach(mt)}function U(t,e){const n=t.$$;n.fragment!==null&&(zn(n.after_update),_e(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Bn(t,e){t.$$.dirty[0]===-1&&(Ne.push(t),En(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(t,e,n,i,r,s,o,a=[-1]){const u=Ye;Ue(t);const l=t.$$={fragment:null,ctx:[],props:s,update:H,not_equal:r,bound:Rt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Rt(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=n?n(t,e.props||{},(f,d,...g)=>{const m=g.length?g[0]:d;return l.ctx&&r(l.ctx[f],l.ctx[f]=m)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](m),c&&Bn(t,f)),d}):[],l.update(),c=!0,_e(l.before_update),l.fragment=i?i(l.ctx):!1,e.target){if(e.hydrate){const f=Rn(e.target);l.fragment&&l.fragment.l(f),f.forEach(M)}else l.fragment&&l.fragment.c();e.intro&&w(t.$$.fragment),W(t,e.target,e.anchor,e.customElement),pe()}Ue(u)}let ln;typeof HTMLElement=="function"&&(ln=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(vt).filter(Fe);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){_e(this.$$.on_disconnect)}$destroy(){U(this,1),this.$destroy=H}$on(t,e){if(!Fe(e))return H;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!rn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class te{$destroy(){U(this,1),this.$destroy=H}$on(e,n){if(!Fe(n))return H;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!rn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Vn(t){let e,n=[{width:t[1]},{height:t[1]},{"stroke-width":"0"},{class:t[2]},t[0].a,t[4],{xmlns:"http://www.w3.org/2000/svg"}],i={};for(let r=0;r<n.length;r+=1)i=We(i,n[r]);return{c(){e=Dn("svg"),Mt(e,i)},m(r,s){F(r,e,s),e.innerHTML=t[3]},p(r,[s]){s&8&&(e.innerHTML=r[3]),Mt(e,i=an(n,[s&2&&{width:r[1]},s&2&&{height:r[1]},{"stroke-width":"0"},s&4&&{class:r[2]},s&1&&r[0].a,s&16&&r[4],{xmlns:"http://www.w3.org/2000/svg"}]))},i:H,o:H,d(r){r&&M(e)}}}function Jn(t,e,n){let{src:i}=e,{size:r="1em"}=e,{color:s=void 0}=e,{title:o=void 0}=e,{className:a=""}=e,u,l;return t.$$set=c=>{"src"in c&&n(0,i=c.src),"size"in c&&n(1,r=c.size),"color"in c&&n(5,s=c.color),"title"in c&&n(6,o=c.title),"className"in c&&n(2,a=c.className)},t.$$.update=()=>{t.$$.dirty&33&&(n(4,l={}),s&&(i.a.stroke!=="none"&&n(4,l.stroke=s,l),i.a.fill!=="none"&&n(4,l.fill=s,l))),t.$$.dirty&65&&n(3,u=(o?`<title>${o}</title>`:"")+i.c)},[i,r,a,u,l,s,o]}let it=class extends te{constructor(e){super(),j(this,e,Jn,Vn,x,{src:0,size:1,color:5,title:6,className:2})}};const Un={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M18.2 13.3l-6.2-6.3-6.2 6.3c-.2.2-.3.5-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7z"></path>'},Hn={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z"></path>'},Wn={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M5.8 9.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.4-.3.7s.1.5.3.7z"></path>'};function $t(t,e,n){const i=t.slice();return i[14]=e[n],i}function zt(t){let e,n,i,r;const s=[Pn,Yn],o=[];function a(u,l){return u[4]===u[14].sortable?0:1}return e=a(t),n=o[e]=s[e](t),{c(){n.c(),i=nt()},m(u,l){o[e].m(u,l),F(u,i,l),r=!0},p(u,l){let c=e;e=a(u),e===c?o[e].p(u,l):(le(),S(o[c],1,1,()=>{o[c]=null}),ue(),n=o[e],n?n.p(u,l):(n=o[e]=s[e](u),n.c()),w(n,1),n.m(i.parentNode,i))},i(u){r||(w(n),r=!0)},o(u){S(n),r=!1},d(u){o[e].d(u),u&&M(i)}}}function Yn(t){let e,n;return e=new it({props:{src:Hn}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Pn(t){let e,n,i,r;const s=[Zn,Qn],o=[];function a(u,l){return u[3]?0:1}return e=a(t),n=o[e]=s[e](t),{c(){n.c(),i=nt()},m(u,l){o[e].m(u,l),F(u,i,l),r=!0},p(u,l){let c=e;e=a(u),e===c?o[e].p(u,l):(le(),S(o[c],1,1,()=>{o[c]=null}),ue(),n=o[e],n?n.p(u,l):(n=o[e]=s[e](u),n.c()),w(n,1),n.m(i.parentNode,i))},i(u){r||(w(n),r=!0)},o(u){S(n),r=!1},d(u){o[e].d(u),u&&M(i)}}}function Qn(t){let e,n;return e=new it({props:{src:Wn}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Zn(t){let e,n;return e=new it({props:{src:Un}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function It(t,e){let n,i,r,s=e[14].name+"",o,a,u,l,c,f=e[14].sortable&&zt(e);function d(){return e[12](e[14])}return{key:t,first:null,c(){n=G("button"),i=G("div"),f&&f.c(),r=P(),o=ne(s),a=P(),D(i,"class","content svelte-19b9z6b"),D(n,"class","svelte-19b9z6b"),be(n,"sortable",e[14].sortable),be(n,"sorted",e[4]===e[14].sortable),be(n,"reversed",e[4]===e[14].sortable&&!e[3]),this.first=n},m(g,m){F(g,n,m),R(n,i),f&&f.m(i,null),R(i,r),R(i,o),R(n,a),u=!0,l||(c=de(n,"click",d),l=!0)},p(g,m){e=g,e[14].sortable?f?(f.p(e,m),m&64&&w(f,1)):(f=zt(e),f.c(),w(f,1),f.m(i,r)):f&&(le(),S(f,1,1,()=>{f=null}),ue()),(!u||m&64)&&s!==(s=e[14].name+"")&&re(o,s),(!u||m&64)&&be(n,"sortable",e[14].sortable),(!u||m&80)&&be(n,"sorted",e[4]===e[14].sortable),(!u||m&88)&&be(n,"reversed",e[4]===e[14].sortable&&!e[3])},i(g){u||(w(f),u=!0)},o(g){S(f),u=!1},d(g){g&&M(n),f&&f.d(),l=!1,c()}}}function Xn(t){let e,n,i,r,s=[],o=new Map,a,u,l,c=t[6];const f=d=>d[14];for(let d=0;d<c.length;d+=1){let g=$t(t,c,d),m=f(g);o.set(m,s[d]=It(m,g))}return{c(){e=G("div"),n=G("div"),i=G("input"),r=P();for(let d=0;d<s.length;d+=1)s[d].c();D(i,"type","checkbox"),D(n,"class","headCheckbox svelte-19b9z6b"),D(e,"class","Head svelte-19b9z6b")},m(d,g){F(d,e,g),R(e,n),R(n,i),i.checked=t[5],R(e,r);for(let m=0;m<s.length;m+=1)s[m]&&s[m].m(e,null);a=!0,u||(l=[de(i,"change",t[11]),de(i,"click",t[7])],u=!0)},p(d,[g]){g&32&&(i.checked=d[5]),g&1112&&(c=d[6],le(),s=Kn(s,g,f,1,d,c,o,e,In,It,null,$t),ue())},i(d){if(!a){for(let g=0;g<c.length;g+=1)w(s[g]);a=!0}},o(d){for(let g=0;g<s.length;g+=1)S(s[g]);a=!1},d(d){d&&M(e);for(let g=0;g<s.length;g+=1)s[g].d();u=!1,_e(l)}}}function qn(t,e,n){let i,r,s,o=H,a=()=>(o(),o=me(_,N=>n(5,s=N)),_),u,l=H,c=()=>(l(),l=me(b,N=>n(13,u=N)),b),f,d=H,g=()=>(d(),d=me(m,N=>n(6,f=N)),m);t.$$.on_destroy.push(()=>o()),t.$$.on_destroy.push(()=>l()),t.$$.on_destroy.push(()=>d());let{columns:m}=e;g();let{selectedAll:_}=e;a();let{data:b}=e;c();function O(){Te(b,u=u.map(N=>(N.__selected=!s,N)),u)}const C=we("sort");ie(t,C,N=>n(4,r=N));const A=we("direction");ie(t,A,N=>n(3,i=N));const p=N=>{N.sortable&&(r===N.sortable?i?A.set(!1):A.set(!0):(C.set(N.sortable),A.set(!0)))};function L(){s=this.checked,_.set(s)}const I=N=>p(N);return t.$$set=N=>{"columns"in N&&g(n(0,m=N.columns)),"selectedAll"in N&&a(n(1,_=N.selectedAll)),"data"in N&&c(n(2,b=N.data))},[m,_,b,i,r,s,f,O,C,A,p,L,I]}class xn extends te{constructor(e){super(),j(this,e,qn,Xn,x,{columns:0,selectedAll:1,data:2})}}function _t(t){switch(t){case"A":return"var(--ticket-status-answered-background)";case"T":return"var(--ticket-status-chat-background)";case"P":return"var(--ticket-status-phone-background)";case"X":return"var(--ticket-status-deleted-background)";case"B":return"";case"I":return"var(--ticket-status-deleted-background)";case"R":return"var(--ticket-status-resolved-background)";case"N":return"var(--ticket-status-new-background)";case"C":return"var(--ticket-status-open-background)";case"W":return"var(--ticket-status-postponed-background)"}}function Kt(t,e,n){const i=t.slice();return i[9]=e[n],i[10]=e,i[11]=n,i}function Bt(t,e,n){const i=t.slice();return i[12]=e[n],i}function Vt(t){let e,n,i;var r=t[12].renderer;function s(o){return{props:{column:o[12],row:o[9]}}}return r&&(e=Gt(r,s(t))),{c(){e&&Y(e.$$.fragment),n=nt()},m(o,a){e&&W(e,o,a),F(o,n,a),i=!0},p(o,a){const u={};if(a&1&&(u.column=o[12]),a&8&&(u.row=o[9]),a&1&&r!==(r=o[12].renderer)){if(e){le();const l=e;S(l.$$.fragment,1,0,()=>{U(l,1)}),ue()}r?(e=Gt(r,s(o)),Y(e.$$.fragment),w(e.$$.fragment,1),W(e,n.parentNode,n)):e=null}else r&&e.$set(u)},i(o){i||(e&&w(e.$$.fragment,o),i=!0)},o(o){e&&S(e.$$.fragment,o),i=!1},d(o){o&&M(n),e&&U(e,o)}}}function Jt(t){let e,n,i,r,s,o,a,u,l,c,f;function d(){t[6].call(s,t[11])}let g=t[0],m=[];for(let C=0;C<g.length;C+=1)m[C]=Vt(Bt(t,g,C));const _=C=>S(m[C],1,1,()=>{m[C]=null});function b(){return t[7](t[9])}function O(...C){return t[8](t[9],...C)}return{c(){e=G("div"),n=G("div"),i=G("div"),r=P(),s=G("input"),a=P();for(let C=0;C<m.length;C+=1)m[C].c();D(i,"class","StatusBar svelte-1q51p0"),ut(i,"background-color",_t(t[9].status)),D(s,"type","checkbox"),s.__value=o=t[9].conversationid,s.value=s.__value,D(s,"class","svelte-1q51p0"),D(n,"class","Checkbox svelte-1q51p0"),ut(n,"position","relative"),D(e,"class",u="Row "+(t[3][t[11]].__selected?"Selected":"")+" svelte-1q51p0")},m(C,A){F(C,e,A),R(e,n),R(n,i),R(n,r),R(n,s),s.checked=t[3][t[11]].__selected,R(e,a);for(let p=0;p<m.length;p+=1)m[p]&&m[p].m(e,null);l=!0,c||(f=[de(s,"change",d),de(s,"click",An(ei)),de(e,"click",b),de(e,"mousedown",O)],c=!0)},p(C,A){if(t=C,(!l||A&8)&&ut(i,"background-color",_t(t[9].status)),(!l||A&8&&o!==(o=t[9].conversationid))&&(s.__value=o,s.value=s.__value),A&8&&(s.checked=t[3][t[11]].__selected),A&9){g=t[0];let p;for(p=0;p<g.length;p+=1){const L=Bt(t,g,p);m[p]?(m[p].p(L,A),w(m[p],1)):(m[p]=Vt(L),m[p].c(),w(m[p],1),m[p].m(e,null))}for(le(),p=g.length;p<m.length;p+=1)_(p);ue()}(!l||A&8&&u!==(u="Row "+(t[3][t[11]].__selected?"Selected":"")+" svelte-1q51p0"))&&D(e,"class",u)},i(C){if(!l){for(let A=0;A<g.length;A+=1)w(m[A]);l=!0}},o(C){m=m.filter(Boolean);for(let A=0;A<m.length;A+=1)S(m[A]);l=!1},d(C){C&&M(e),bt(m,C),c=!1,_e(f)}}}function jn(t){let e,n,i,r=t[3],s=[];for(let l=0;l<r.length;l+=1)s[l]=Jt(Kt(t,r,l));const o=l=>S(s[l],1,1,()=>{s[l]=null}),a=t[5].default,u=Ge(a,t,t[4],null);return{c(){e=G("div");for(let l=0;l<s.length;l+=1)s[l].c();n=P(),u&&u.c(),D(e,"class","Body")},m(l,c){F(l,e,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);R(e,n),u&&u.m(e,null),i=!0},p(l,[c]){if(c&13){r=l[3];let f;for(f=0;f<r.length;f+=1){const d=Kt(l,r,f);s[f]?(s[f].p(d,c),w(s[f],1)):(s[f]=Jt(d),s[f].c(),w(s[f],1),s[f].m(e,n))}for(le(),f=r.length;f<s.length;f+=1)o(f);ue()}u&&u.p&&(!i||c&16)&&$e(u,a,l,l[4],i?Ee(a,l[4],c,null):ze(l[4]),null)},i(l){if(!i){for(let c=0;c<r.length;c+=1)w(s[c]);w(u,l),i=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)S(s[c]);S(u,l),i=!1},d(l){l&&M(e),bt(s,l),u&&u.d(l)}}}const ei=()=>{};function ti(t,e,n){let i,r=H,s=()=>(r(),r=me(l,m=>n(3,i=m)),l);t.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=e,{columns:u}=e,{data:l}=e;s();let{middleclickhandler:c}=e;function f(m){i[m].__selected=this.checked,l.set(i)}const d=m=>location.assign("#Conversation;id="+m.conversationid),g=(m,_)=>{_.button===1&&c&&(c(m.conversationid),_.preventDefault(),_.stopPropagation())};return t.$$set=m=>{"columns"in m&&n(0,u=m.columns),"data"in m&&s(n(1,l=m.data)),"middleclickhandler"in m&&n(2,c=m.middleclickhandler),"$$scope"in m&&n(4,a=m.$$scope)},[u,l,c,i,a,o,f,d,g]}class ni extends te{constructor(e){super(),j(this,e,ti,jn,x,{columns:0,data:1,middleclickhandler:2})}}const Ae=[];function kt(t,e){return{subscribe:oe(t,e).subscribe}}function oe(t,e=H){let n;const i=new Set;function r(a){if(x(t,a)&&(t=a,n)){const u=!Ae.length;for(const l of i)l[1](),Ae.push(l,t);if(u){for(let l=0;l<Ae.length;l+=2)Ae[l][0](Ae[l+1]);Ae.length=0}}}function s(a){r(a(t))}function o(a,u=H){const l=[a,u];return i.add(l),i.size===1&&(n=e(r)||H),a(t),()=>{i.delete(l),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:o}}function ii(t,e,n){const i=!Array.isArray(t),r=i?[t]:t,s=e.length<2;return kt(n,o=>{let a=!1;const u=[];let l=0,c=H;const f=()=>{if(l)return;c();const g=e(i?u[0]:u,o);s?o(g):c=Fe(g)?g:H},d=r.map((g,m)=>me(g,_=>{u[m]=_,l&=~(1<<m),a&&f()},()=>{l|=1<<m}));return a=!0,f(),function(){_e(d),c(),a=!1}})}const ri={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"}}},si={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:ri,warnOnMissingMessages:!0},oi=si;let un;function tt(){return un}function ai(t){return un=t}function Pe(){return oi}function Ut(t){return t.split("-").map((e,n,i)=>i.slice(0,n+1).join("-")).reverse()}function Qe(t,e=Pe().fallbackLocale){const n=Ut(t);return e?[...new Set([...n,...Ut(e)])]:n}let Tt;const rt=oe({});function li(t){return Tt[t]||null}function Ct(t){return t in Tt}function ui(t,e){if(Ct(t)){const n=li(t);if(e in n)return n[e];const i=e.split(".");let r=n;for(let s=0;s<i.length;s++){if(typeof r[i[s]]!="object")return r[i[s]]||null;r=r[i[s]]}return r}return null}function ci(t){if(t==null)return null;const e=Qe(t);for(let n=0;n<e.length;n++){const i=e[n];if(Ct(i))return i}return null}function fi(t,...e){rt.update(n=>(n[t]=Object.assign(n[t]||{},...e),n))}rt.subscribe(t=>Tt=t);const Ht=oe(!1),Lt={};function di(t){Lt[t]=new Set}function gi(t){delete Lt[t]}function He(t){return Lt[t]}function hi(t){return Qe(t).reverse().map(e=>{const n=He(e);return[e,n?[...n]:[]]}).filter(([,e])=>e.length>0)}function St(t){return Qe(t).reverse().some(He)}const Ve={};function cn(t){if(!St(t))return Promise.resolve();if(t in Ve)return Ve[t];const e=hi(t);if(e.length===0)return Promise.resolve();const n=setTimeout(()=>Ht.set(!0),Pe().loadingDelay);return Ve[t]=Promise.all(e.map(([i,r])=>Promise.all(r.map(s=>s())).then(s=>{gi(i),s=s.map(o=>o.default||o),fi(i,...s)}))).then(()=>{clearTimeout(n),Ht.set(!1),delete Ve[t]}),Ve[t]}function Wt(t,e){He(t)||di(t);const n=He(t);He(t).has(e)||(Ct(t)||rt.update(i=>(i[t]={},i)),n.add(e))}const Ie=oe("");Ie.subscribe(t=>{ai(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const pt=Ie.set;Ie.set=t=>ci(t)&&St(t)?cn(t).then(()=>pt(t)):pt(t);Ie.update=t=>{let e=tt();t(e),pt(e)};function mi(t){const{formats:e,...n}=t,i=t.initialLocale||t.fallbackLocale,r=Pe();return Object.assign(r,n,{initialLocale:i}),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)),Ie.set(i)}const Le={},_i=(t,e,n)=>n&&(e in Le||(Le[e]={}),t in Le[e]||(Le[e][t]=n),n),pi=(t,e)=>{if(e==null)return;if(e in Le&&t in Le[e])return Le[e][t];const n=Qe(e);for(let i=0;i<n.length;i++){const r=n[i],s=ui(r,t);if(s)return _i(t,e,s)}},yi=(t,e,n={})=>{const i=typeof e=="string"?e:e.id,r=typeof e=="string"?n:e,{values:s,locale:o=t||tt(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=pi(i,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(Pe().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${i}" was not found in "${Qe(o).join('", "')}".${St(tt())?`
|
|
1
|
+
var Tn=Object.defineProperty;var Cn=(t,e,i)=>e in t?Tn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var Xe=(t,e,i)=>(Cn(t,typeof e!="symbol"?e+"":e,i),i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function W(){}function We(t,e){for(const i in e)t[i]=e[i];return t}function bt(t){return t()}function Rt(){return Object.create(null)}function me(t){t.forEach(bt)}function Fe(t){return typeof t=="function"}function X(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let je;function ht(t,e){return je||(je=document.createElement("a")),je.href=e,t===je.href}function rn(t){return Object.keys(t).length===0}function _e(t,...e){if(t==null)return W;const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function ne(t,e,i){t.$$.on_destroy.push(_e(e,i))}function Ge(t,e,i,n){if(t){const r=sn(t,e,i,n);return t[0](r)}}function sn(t,e,i,n){return t[1]&&n?We(i.ctx.slice(),t[1](n(e))):i.ctx}function Ee(t,e,i,n){if(t[2]&&n){const r=t[2](n(i));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function $e(t,e,i,n,r,s){if(r){const o=sn(e,i,n,s);t.p(o,r)}}function Ie(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let n=0;n<i;n++)e[n]=-1;return e}return-1}function Ln(t){const e={};for(const i in t)i[0]!=="$"&&(e[i]=t[i]);return e}function Ot(t,e){const i={};e=new Set(e);for(const n in t)!e.has(n)&&n[0]!=="$"&&(i[n]=t[n]);return i}function Te(t){return t??""}function Ce(t,e,i){return t.set(i),e}const Sn=["",!0,1,"true","contenteditable"];function O(t,e){t.appendChild(e)}function ie(t,e,i){const n=Dn(t);if(!n.getElementById(e)){const r=F("style");r.id=e,r.textContent=i,Nn(n,r)}}function Dn(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Nn(t,e){return O(t.head||t,e),e.sheet}function M(t,e,i){t.insertBefore(e,i||null)}function G(t){t.parentNode&&t.parentNode.removeChild(t)}function wt(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function F(t){return document.createElement(t)}function An(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function te(t){return document.createTextNode(t)}function Y(){return te(" ")}function it(){return te("")}function de(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function Rn(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function D(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const On=["width","height"];function zt(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:i[n]&&i[n].set&&On.indexOf(n)===-1?t[n]=e[n]:D(t,n,e[n])}function Ft(t,e){for(const i in e)D(t,i,e[i])}function zn(t){return Array.from(t.childNodes)}function re(t,e){e=""+e,t.data!==e&&(t.data=e)}function Fn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Mn(t,e,i){~Sn.indexOf(i)?Fn(t,e):re(t,e)}function ct(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function we(t,e,i){t.classList[i?"add":"remove"](e)}function Gn(t){const e={};for(const i of t)e[i.name]=i.value;return e}function Mt(t,e){return new t(e)}let Ye;function He(t){Ye=t}function kt(){if(!Ye)throw new Error("Function called outside component initialization");return Ye}function on(t){kt().$$.on_mount.push(t)}function be(t,e){return kt().$$.context.set(t,e),e}function ke(t){return kt().$$.context.get(t)}const Re=[],tt=[];let ze=[];const Gt=[],En=Promise.resolve();let mt=!1;function $n(){mt||(mt=!0,En.then(he))}function pt(t){ze.push(t)}const ft=new Set;let Ne=0;function he(){if(Ne!==0)return;const t=Ye;do{try{for(;Ne<Re.length;){const e=Re[Ne];Ne++,He(e),In(e.$$)}}catch(e){throw Re.length=0,Ne=0,e}for(He(null),Re.length=0,Ne=0;tt.length;)tt.pop()();for(let e=0;e<ze.length;e+=1){const i=ze[e];ft.has(i)||(ft.add(i),i())}ze.length=0}while(Re.length);for(;Gt.length;)Gt.pop()();mt=!1,ft.clear(),He(t)}function In(t){if(t.fragment!==null){t.update(),me(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(pt)}}function Kn(t){const e=[],i=[];ze.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),ze=e}const et=new Set;let Le;function ce(){Le={r:0,c:[],p:Le}}function fe(){Le.r||me(Le.c),Le=Le.p}function k(t,e){t&&t.i&&(et.delete(t),t.i(e))}function L(t,e,i,n){if(t&&t.o){if(et.has(t))return;et.add(t),Le.c.push(()=>{et.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function Bn(t,e){L(t,1,1,()=>{e.delete(t.key)})}function Vn(t,e,i,n,r,s,o,a,u,l,c,f){let d=t.length,g=s.length,m=d;const p={};for(;m--;)p[t[m].key]=m;const b=[],z=new Map,C=new Map,N=[];for(m=g;m--;){const A=f(r,s,m),q=i(A);let V=o.get(q);V?n&&N.push(()=>V.p(A,e)):(V=l(q,A),V.c()),z.set(q,b[m]=V),q in p&&C.set(q,Math.abs(m-p[q]))}const _=new Set,S=new Set;function I(A){k(A,1),A.m(a,c),o.set(A.key,A),c=A.first,g--}for(;d&&g;){const A=b[g-1],q=t[d-1],V=A.key,$=q.key;A===q?(c=A.first,d--,g--):z.has($)?!o.has(V)||_.has(V)?I(A):S.has($)?d--:C.get(V)>C.get($)?(S.add(V),I(A)):(_.add($),d--):(u(q,o),d--)}for(;d--;){const A=t[d];z.has(A.key)||u(A,o)}for(;g;)I(b[g-1]);return me(N),b}function an(t,e){const i={},n={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(n[u]=1);for(const u in a)r[u]||(i[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in n)o in i||(i[o]=void 0);return i}function U(t){t&&t.c()}function H(t,e,i,n){const{fragment:r,after_update:s}=t.$$;r&&r.m(e,i),n||pt(()=>{const o=t.$$.on_mount.map(bt).filter(Fe);t.$$.on_destroy?t.$$.on_destroy.push(...o):me(o),t.$$.on_mount=[]}),s.forEach(pt)}function x(t,e){const i=t.$$;i.fragment!==null&&(Kn(i.after_update),me(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function Jn(t,e){t.$$.dirty[0]===-1&&(Re.push(t),$n(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(t,e,i,n,r,s,o,a=[-1]){const u=Ye;He(t);const l=t.$$={fragment:null,ctx:[],props:s,update:W,not_equal:r,bound:Rt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Rt(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(t,e.props||{},(f,d,...g)=>{const m=g.length?g[0]:d;return l.ctx&&r(l.ctx[f],l.ctx[f]=m)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](m),c&&Jn(t,f)),d}):[],l.update(),c=!0,me(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const f=zn(e.target);l.fragment&&l.fragment.l(f),f.forEach(G)}else l.fragment&&l.fragment.c();e.intro&&k(t.$$.fragment),H(t,e.target,e.anchor,e.customElement),he()}He(u)}let ln;typeof HTMLElement=="function"&&(ln=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(bt).filter(Fe);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,i){this[t]=i}disconnectedCallback(){me(this.$$.on_disconnect)}$destroy(){x(this,1),this.$destroy=W}$on(t,e){if(!Fe(e))return W;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(e),()=>{const n=i.indexOf(e);n!==-1&&i.splice(n,1)}}$set(t){this.$$set&&!rn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class ee{$destroy(){x(this,1),this.$destroy=W}$on(e,i){if(!Fe(i))return W;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!rn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function xn(t){let e,i=[{width:t[1]},{height:t[1]},{"stroke-width":"0"},{class:t[2]},t[0].a,t[4],{xmlns:"http://www.w3.org/2000/svg"}],n={};for(let r=0;r<i.length;r+=1)n=We(n,i[r]);return{c(){e=An("svg"),Ft(e,n)},m(r,s){M(r,e,s),e.innerHTML=t[3]},p(r,[s]){s&8&&(e.innerHTML=r[3]),Ft(e,n=an(i,[s&2&&{width:r[1]},s&2&&{height:r[1]},{"stroke-width":"0"},s&4&&{class:r[2]},s&1&&r[0].a,s&16&&r[4],{xmlns:"http://www.w3.org/2000/svg"}]))},i:W,o:W,d(r){r&&G(e)}}}function Hn(t,e,i){let{src:n}=e,{size:r="1em"}=e,{color:s=void 0}=e,{title:o=void 0}=e,{className:a=""}=e,u,l;return t.$$set=c=>{"src"in c&&i(0,n=c.src),"size"in c&&i(1,r=c.size),"color"in c&&i(5,s=c.color),"title"in c&&i(6,o=c.title),"className"in c&&i(2,a=c.className)},t.$$.update=()=>{t.$$.dirty&33&&(i(4,l={}),s&&(n.a.stroke!=="none"&&i(4,l.stroke=s,l),n.a.fill!=="none"&&i(4,l.fill=s,l))),t.$$.dirty&65&&i(3,u=(o?`<title>${o}</title>`:"")+n.c)},[n,r,a,u,l,s,o]}let rt=class extends ee{constructor(e){super(),j(this,e,Hn,xn,X,{src:0,size:1,color:5,title:6,className:2})}};const Un={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M18.2 13.3l-6.2-6.3-6.2 6.3c-.2.2-.3.5-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7z"></path>'},Wn={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z"></path>'},Yn={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M5.8 9.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.4-.3.7s.1.5.3.7z"></path>'};function qn(t){ie(t,"svelte-19b9z6b",".Head.svelte-19b9z6b{display:none}.headCheckbox.svelte-19b9z6b{width:20px}.content.svelte-19b9z6b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}button.svelte-19b9z6b{border:none;background:none;font-size:13px;font-weight:400;color:var(--department-bg-color)}@media screen and (min-width: 768px){.Head.svelte-19b9z6b{display:grid;grid-template-columns:60px 1fr 3fr 1fr;position:sticky;top:0;color:var(--panel_text_color);font-size:14px;font-family:'Roboto', sans-serif}}@media(min-width: 1300px){.Head.svelte-19b9z6b{grid-template-columns:60px 260px auto 230px}}.sortable.svelte-19b9z6b{cursor:pointer}")}function Et(t,e,i){const n=t.slice();return n[14]=e[i],n}function $t(t){let e,i,n,r;const s=[Qn,Pn],o=[];function a(u,l){return u[4]===u[14].sortable?0:1}return e=a(t),i=o[e]=s[e](t),{c(){i.c(),n=it()},m(u,l){o[e].m(u,l),M(u,n,l),r=!0},p(u,l){let c=e;e=a(u),e===c?o[e].p(u,l):(ce(),L(o[c],1,1,()=>{o[c]=null}),fe(),i=o[e],i?i.p(u,l):(i=o[e]=s[e](u),i.c()),k(i,1),i.m(n.parentNode,n))},i(u){r||(k(i),r=!0)},o(u){L(i),r=!1},d(u){o[e].d(u),u&&G(n)}}}function Pn(t){let e,i;return e=new rt({props:{src:Wn}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p:W,i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Qn(t){let e,i,n,r;const s=[Xn,Zn],o=[];function a(u,l){return u[3]?0:1}return e=a(t),i=o[e]=s[e](t),{c(){i.c(),n=it()},m(u,l){o[e].m(u,l),M(u,n,l),r=!0},p(u,l){let c=e;e=a(u),e===c?o[e].p(u,l):(ce(),L(o[c],1,1,()=>{o[c]=null}),fe(),i=o[e],i?i.p(u,l):(i=o[e]=s[e](u),i.c()),k(i,1),i.m(n.parentNode,n))},i(u){r||(k(i),r=!0)},o(u){L(i),r=!1},d(u){o[e].d(u),u&&G(n)}}}function Zn(t){let e,i;return e=new rt({props:{src:Yn}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p:W,i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Xn(t){let e,i;return e=new rt({props:{src:Un}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p:W,i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function It(t,e){let i,n,r,s=e[14].name+"",o,a,u,l,c,f=e[14].sortable&&$t(e);function d(){return e[12](e[14])}return{key:t,first:null,c(){i=F("button"),n=F("div"),f&&f.c(),r=Y(),o=te(s),a=Y(),D(n,"class","content svelte-19b9z6b"),D(i,"class","svelte-19b9z6b"),we(i,"sortable",e[14].sortable),we(i,"sorted",e[4]===e[14].sortable),we(i,"reversed",e[4]===e[14].sortable&&!e[3]),this.first=i},m(g,m){M(g,i,m),O(i,n),f&&f.m(n,null),O(n,r),O(n,o),O(i,a),u=!0,l||(c=de(i,"click",d),l=!0)},p(g,m){e=g,e[14].sortable?f?(f.p(e,m),m&64&&k(f,1)):(f=$t(e),f.c(),k(f,1),f.m(n,r)):f&&(ce(),L(f,1,1,()=>{f=null}),fe()),(!u||m&64)&&s!==(s=e[14].name+"")&&re(o,s),(!u||m&64)&&we(i,"sortable",e[14].sortable),(!u||m&80)&&we(i,"sorted",e[4]===e[14].sortable),(!u||m&88)&&we(i,"reversed",e[4]===e[14].sortable&&!e[3])},i(g){u||(k(f),u=!0)},o(g){L(f),u=!1},d(g){g&&G(i),f&&f.d(),l=!1,c()}}}function jn(t){let e,i,n,r,s=[],o=new Map,a,u,l,c=t[6];const f=d=>d[14];for(let d=0;d<c.length;d+=1){let g=Et(t,c,d),m=f(g);o.set(m,s[d]=It(m,g))}return{c(){e=F("div"),i=F("div"),n=F("input"),r=Y();for(let d=0;d<s.length;d+=1)s[d].c();D(n,"type","checkbox"),D(i,"class","headCheckbox svelte-19b9z6b"),D(e,"class","Head svelte-19b9z6b")},m(d,g){M(d,e,g),O(e,i),O(i,n),n.checked=t[5],O(e,r);for(let m=0;m<s.length;m+=1)s[m]&&s[m].m(e,null);a=!0,u||(l=[de(n,"change",t[11]),de(n,"click",t[7])],u=!0)},p(d,[g]){g&32&&(n.checked=d[5]),g&1112&&(c=d[6],ce(),s=Vn(s,g,f,1,d,c,o,e,Bn,It,null,Et),fe())},i(d){if(!a){for(let g=0;g<c.length;g+=1)k(s[g]);a=!0}},o(d){for(let g=0;g<s.length;g+=1)L(s[g]);a=!1},d(d){d&&G(e);for(let g=0;g<s.length;g+=1)s[g].d();u=!1,me(l)}}}function ei(t,e,i){let n,r,s,o=W,a=()=>(o(),o=_e(p,A=>i(5,s=A)),p),u,l=W,c=()=>(l(),l=_e(b,A=>i(13,u=A)),b),f,d=W,g=()=>(d(),d=_e(m,A=>i(6,f=A)),m);t.$$.on_destroy.push(()=>o()),t.$$.on_destroy.push(()=>l()),t.$$.on_destroy.push(()=>d());let{columns:m}=e;g();let{selectedAll:p}=e;a();let{data:b}=e;c();function z(){Ce(b,u=u.map(A=>(A.__selected=!s,A)),u)}const C=ke("sort");ne(t,C,A=>i(4,r=A));const N=ke("direction");ne(t,N,A=>i(3,n=A));const _=A=>{A.sortable&&(r===A.sortable?n?N.set(!1):N.set(!0):(C.set(A.sortable),N.set(!0)))};function S(){s=this.checked,p.set(s)}const I=A=>_(A);return t.$$set=A=>{"columns"in A&&g(i(0,m=A.columns)),"selectedAll"in A&&a(i(1,p=A.selectedAll)),"data"in A&&c(i(2,b=A.data))},[m,p,b,n,r,s,f,z,C,N,_,S,I]}class ti extends ee{constructor(e){super(),j(this,e,ei,jn,X,{columns:0,selectedAll:1,data:2},qn)}}function _t(t){switch(t){case"A":return"var(--ticket-status-answered-background)";case"T":return"var(--ticket-status-chat-background)";case"P":return"var(--ticket-status-phone-background)";case"X":return"var(--ticket-status-deleted-background)";case"B":return"";case"I":return"var(--ticket-status-deleted-background)";case"R":return"var(--ticket-status-resolved-background)";case"N":return"var(--ticket-status-new-background)";case"C":return"var(--ticket-status-open-background)";case"W":return"var(--ticket-status-postponed-background)"}}function ni(t){ie(t,"svelte-1q51p0",'.Row.svelte-1q51p0{display:grid;grid-template-columns:1fr;border-radius:12px;box-shadow:0 0 5px 2px rgb(0 0 0 / 0.2)}.Row.svelte-1q51p0:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-1q51p0{background-color:var(--menu-selected-bg) !important}.StatusBar.svelte-1q51p0{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px}input.svelte-1q51p0{position:absolute;top:40%;left:40%}@media screen and (min-width: 768px){.Row.svelte-1q51p0{display:grid;grid-template-columns:60px 1fr 3fr 1fr;height:80px}.Checkbox.svelte-1q51p0{position:relative}}@media(min-width: 1300px){.Row.svelte-1q51p0{grid-template-columns:60px 260px auto 230px}}')}function Kt(t,e,i){const n=t.slice();return n[9]=e[i],n[10]=e,n[11]=i,n}function Bt(t,e,i){const n=t.slice();return n[12]=e[i],n}function Vt(t){let e,i,n;var r=t[12].renderer;function s(o){return{props:{column:o[12],row:o[9]}}}return r&&(e=Mt(r,s(t))),{c(){e&&U(e.$$.fragment),i=it()},m(o,a){e&&H(e,o,a),M(o,i,a),n=!0},p(o,a){const u={};if(a&1&&(u.column=o[12]),a&8&&(u.row=o[9]),a&1&&r!==(r=o[12].renderer)){if(e){ce();const l=e;L(l.$$.fragment,1,0,()=>{x(l,1)}),fe()}r?(e=Mt(r,s(o)),U(e.$$.fragment),k(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else r&&e.$set(u)},i(o){n||(e&&k(e.$$.fragment,o),n=!0)},o(o){e&&L(e.$$.fragment,o),n=!1},d(o){o&&G(i),e&&x(e,o)}}}function Jt(t){let e,i,n,r,s,o,a,u,l,c,f;function d(){t[6].call(s,t[11])}let g=t[0],m=[];for(let C=0;C<g.length;C+=1)m[C]=Vt(Bt(t,g,C));const p=C=>L(m[C],1,1,()=>{m[C]=null});function b(){return t[7](t[9])}function z(...C){return t[8](t[9],...C)}return{c(){e=F("div"),i=F("div"),n=F("div"),r=Y(),s=F("input"),a=Y();for(let C=0;C<m.length;C+=1)m[C].c();D(n,"class","StatusBar svelte-1q51p0"),ct(n,"background-color",_t(t[9].status)),D(s,"type","checkbox"),s.__value=o=t[9].conversationid,s.value=s.__value,D(s,"class","svelte-1q51p0"),D(i,"class","Checkbox svelte-1q51p0"),ct(i,"position","relative"),D(e,"class",u="Row "+(t[3][t[11]].__selected?"Selected":"")+" svelte-1q51p0")},m(C,N){M(C,e,N),O(e,i),O(i,n),O(i,r),O(i,s),s.checked=t[3][t[11]].__selected,O(e,a);for(let _=0;_<m.length;_+=1)m[_]&&m[_].m(e,null);l=!0,c||(f=[de(s,"change",d),de(s,"click",Rn(ri)),de(e,"click",b),de(e,"mousedown",z)],c=!0)},p(C,N){if(t=C,(!l||N&8)&&ct(n,"background-color",_t(t[9].status)),(!l||N&8&&o!==(o=t[9].conversationid))&&(s.__value=o,s.value=s.__value),N&8&&(s.checked=t[3][t[11]].__selected),N&9){g=t[0];let _;for(_=0;_<g.length;_+=1){const S=Bt(t,g,_);m[_]?(m[_].p(S,N),k(m[_],1)):(m[_]=Vt(S),m[_].c(),k(m[_],1),m[_].m(e,null))}for(ce(),_=g.length;_<m.length;_+=1)p(_);fe()}(!l||N&8&&u!==(u="Row "+(t[3][t[11]].__selected?"Selected":"")+" svelte-1q51p0"))&&D(e,"class",u)},i(C){if(!l){for(let N=0;N<g.length;N+=1)k(m[N]);l=!0}},o(C){m=m.filter(Boolean);for(let N=0;N<m.length;N+=1)L(m[N]);l=!1},d(C){C&&G(e),wt(m,C),c=!1,me(f)}}}function ii(t){let e,i,n,r=t[3],s=[];for(let l=0;l<r.length;l+=1)s[l]=Jt(Kt(t,r,l));const o=l=>L(s[l],1,1,()=>{s[l]=null}),a=t[5].default,u=Ge(a,t,t[4],null);return{c(){e=F("div");for(let l=0;l<s.length;l+=1)s[l].c();i=Y(),u&&u.c(),D(e,"class","Body")},m(l,c){M(l,e,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);O(e,i),u&&u.m(e,null),n=!0},p(l,[c]){if(c&13){r=l[3];let f;for(f=0;f<r.length;f+=1){const d=Kt(l,r,f);s[f]?(s[f].p(d,c),k(s[f],1)):(s[f]=Jt(d),s[f].c(),k(s[f],1),s[f].m(e,i))}for(ce(),f=r.length;f<s.length;f+=1)o(f);fe()}u&&u.p&&(!n||c&16)&&$e(u,a,l,l[4],n?Ee(a,l[4],c,null):Ie(l[4]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)k(s[c]);k(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)L(s[c]);L(u,l),n=!1},d(l){l&&G(e),wt(s,l),u&&u.d(l)}}}const ri=()=>{};function si(t,e,i){let n,r=W,s=()=>(r(),r=_e(l,m=>i(3,n=m)),l);t.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=e,{columns:u}=e,{data:l}=e;s();let{middleclickhandler:c}=e;function f(m){n[m].__selected=this.checked,l.set(n)}const d=m=>location.assign("#Conversation;id="+m.conversationid),g=(m,p)=>{p.button===1&&c&&(c(m.conversationid),p.preventDefault(),p.stopPropagation())};return t.$$set=m=>{"columns"in m&&i(0,u=m.columns),"data"in m&&s(i(1,l=m.data)),"middleclickhandler"in m&&i(2,c=m.middleclickhandler),"$$scope"in m&&i(4,a=m.$$scope)},[u,l,c,n,a,o,f,d,g]}class oi extends ee{constructor(e){super(),j(this,e,si,ii,X,{columns:0,data:1,middleclickhandler:2},ni)}}const Ae=[];function ai(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=W){let i;const n=new Set;function r(a){if(X(t,a)&&(t=a,i)){const u=!Ae.length;for(const l of n)l[1](),Ae.push(l,t);if(u){for(let l=0;l<Ae.length;l+=2)Ae[l][0](Ae[l+1]);Ae.length=0}}}function s(a){r(a(t))}function o(a,u=W){const l=[a,u];return n.add(l),n.size===1&&(i=e(r)||W),a(t),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}function li(t,e,i){const n=!Array.isArray(t),r=n?[t]:t,s=e.length<2;return ai(i,o=>{let a=!1;const u=[];let l=0,c=W;const f=()=>{if(l)return;c();const g=e(n?u[0]:u,o);s?o(g):c=Fe(g)?g:W},d=r.map((g,m)=>_e(g,p=>{u[m]=p,l&=~(1<<m),a&&f()},()=>{l|=1<<m}));return a=!0,f(),function(){me(d),c(),a=!1}})}const ui={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"}}},ci={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:ui,warnOnMissingMessages:!0},fi=ci;let un;function nt(){return un}function di(t){return un=t}function qe(){return fi}function xt(t){return t.split("-").map((e,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Pe(t,e=qe().fallbackLocale){const i=xt(t);return e?[...new Set([...i,...xt(e)])]:i}let Tt;const st=ae({});function gi(t){return Tt[t]||null}function Ct(t){return t in Tt}function hi(t,e){if(Ct(t)){const i=gi(t);if(e in i)return i[e];const n=e.split(".");let r=i;for(let s=0;s<n.length;s++){if(typeof r[n[s]]!="object")return r[n[s]]||null;r=r[n[s]]}return r}return null}function mi(t){if(t==null)return null;const e=Pe(t);for(let i=0;i<e.length;i++){const n=e[i];if(Ct(n))return n}return null}function pi(t,...e){st.update(i=>(i[t]=Object.assign(i[t]||{},...e),i))}st.subscribe(t=>Tt=t);const Ht=ae(!1),Lt={};function _i(t){Lt[t]=new Set}function yi(t){delete Lt[t]}function Ue(t){return Lt[t]}function vi(t){return Pe(t).reverse().map(e=>{const i=Ue(e);return[e,i?[...i]:[]]}).filter(([,e])=>e.length>0)}function St(t){return Pe(t).reverse().some(Ue)}const Je={};function cn(t){if(!St(t))return Promise.resolve();if(t in Je)return Je[t];const e=vi(t);if(e.length===0)return Promise.resolve();const i=setTimeout(()=>Ht.set(!0),qe().loadingDelay);return Je[t]=Promise.all(e.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{yi(n),s=s.map(o=>o.default||o),pi(n,...s)}))).then(()=>{clearTimeout(i),Ht.set(!1),delete Je[t]}),Je[t]}function Ut(t,e){Ue(t)||_i(t);const i=Ue(t);Ue(t).has(e)||(Ct(t)||st.update(n=>(n[t]={},n)),i.add(e))}const Ke=ae("");Ke.subscribe(t=>{di(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const yt=Ke.set;Ke.set=t=>mi(t)&&St(t)?cn(t).then(()=>yt(t)):yt(t);Ke.update=t=>{let e=nt();t(e),yt(e)};function bi(t){const{formats:e,...i}=t,n=t.initialLocale||t.fallbackLocale,r=qe();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)),Ke.set(n)}const Se={},wi=(t,e,i)=>i&&(e in Se||(Se[e]={}),t in Se[e]||(Se[e][t]=i),i),ki=(t,e)=>{if(e==null)return;if(e in Se&&t in Se[e])return Se[e][t];const i=Pe(e);for(let n=0;n<i.length;n++){const r=i[n],s=hi(r,t);if(s)return wi(t,e,s)}},Ti=(t,e,i={})=>{const n=typeof e=="string"?e:e.id,r=typeof e=="string"?i:e,{values:s,locale:o=t||nt(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=ki(n,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(qe().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${n}" was not found in "${Pe(o).join('", "')}".${St(nt())?`
|
|
2
2
|
|
|
3
|
-
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||i)},Ze=ii([Ie,rt],([t])=>yi.bind(null,t));function vi(t){return cn(t||tt()||Pe().initialLocale)}function bi(t){let e,n,i;return{c(){e=G("div"),n=G("p"),i=ne(t[0]),D(e,"class","svelte-7bt636")},m(r,s){F(r,e,s),R(e,n),R(n,i)},p(r,[s]){s&1&&re(i,r[0])},i:H,o:H,d(r){r&&M(e)}}}function wi(t,e,n){let i,r,s,o,a;ie(t,Ze,m=>n(8,o=m));let u,l=we("loading");ie(t,l,m=>n(7,s=m));let c=we("cursor");ie(t,c,m=>n(6,r=m));let f=we("data");ie(t,f,m=>n(5,i=m));let d=we("error");ie(t,d,m=>n(9,a=m));function g(m,_,b){return a?o("Loading failed. Please try again later."):m?"Loading...":_==null?b.length===0?o("No results match your filter. Try broadening the search criteria."):"All data loaded":"Load more data"}return t.$$.update=()=>{t.$$.dirty&224&&n(0,u=g(s,r,i))},[u,l,c,f,d,i,r,s]}class ki extends te{constructor(e){super(),j(this,e,wi,bi,x,{})}}function Ti(t){let e,n,i,r,s,o;return i=new ki({}),{c(){e=G("div"),n=G("div"),Y(i.$$.fragment),D(n,"class","load svelte-1fwehqj"),D(e,"class","load svelte-1fwehqj")},m(a,u){F(a,e,u),R(e,n),W(i,n,null),t[8](n),r=!0,s||(o=de(n,"click",function(){Fe(t[2])&&t[2].apply(this,arguments)}),s=!0)},p(a,u){t=a},i(a){r||(w(i.$$.fragment,a),r=!0)},o(a){S(i.$$.fragment,a),r=!1},d(a){a&&M(e),U(i),t[8](null),s=!1,o()}}}function Ci(t){let e,n,i,r,s;return n=new xn({props:{columns:t[1],data:t[0],selectedAll:t[4]}}),r=new ni({props:{columns:t[7],data:t[0],middleclickhandler:t[3],$$slots:{default:[Ti]},$$scope:{ctx:t}}}),{c(){e=G("div"),Y(n.$$.fragment),i=P(),Y(r.$$.fragment),D(e,"class","container svelte-1fwehqj")},m(o,a){F(o,e,a),W(n,e,null),R(e,i),W(r,e,null),t[9](e),s=!0},p(o,[a]){const u={};a&2&&(u.columns=o[1]),a&1&&(u.data=o[0]),a&16&&(u.selectedAll=o[4]),n.$set(u);const l={};a&128&&(l.columns=o[7]),a&1&&(l.data=o[0]),a&8&&(l.middleclickhandler=o[3]),a&1060&&(l.$$scope={dirty:a,ctx:o}),r.$set(l)},i(o){s||(w(n.$$.fragment,o),w(r.$$.fragment,o),s=!0)},o(o){S(n.$$.fragment,o),S(r.$$.fragment,o),s=!1},d(o){o&&M(e),U(n),U(r),t[9](null)}}}function Li(t,e,n){let i,r=H,s=()=>(r(),r=me(a,_=>n(7,i=_)),a);t.$$.on_destroy.push(()=>r());let{data:o}=e,{columns:a}=e;s();let{loadMore:u}=e,{middleclickhandler:l}=e,{selectedAll:c}=e,f,d;on(()=>{const _=new IntersectionObserver(b=>{b[0].isIntersecting&&u()},{root:d,threshold:.5});return _.observe(f),()=>_.unobserve(f)});function g(_){et[_?"unshift":"push"](()=>{f=_,n(5,f)})}function m(_){et[_?"unshift":"push"](()=>{d=_,n(6,d)})}return t.$$set=_=>{"data"in _&&n(0,o=_.data),"columns"in _&&s(n(1,a=_.columns)),"loadMore"in _&&n(2,u=_.loadMore),"middleclickhandler"in _&&n(3,l=_.middleclickhandler),"selectedAll"in _&&n(4,c=_.selectedAll)},[o,a,u,l,c,f,d,i,g,m]}class Si extends te{constructor(e){super(),j(this,e,Li,Ci,x,{data:0,columns:1,loadMore:2,middleclickhandler:3,selectedAll:4})}}let ft=class{constructor(e,n,i){qe(this,"renderer");qe(this,"name");qe(this,"sortable");this.name=e,this.renderer=n,this.sortable=i}};var Re=globalThis&&globalThis.__awaiter||function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};const Di="https://localhost/api/v3".replace(/\/+$/,"");class Dt{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Di}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||fn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:()=>Re(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Ai=new Dt;class st{constructor(e=Ai){this.configuration=e,this.fetchApi=(n,i)=>Re(this,void 0,void 0,function*(){let r={url:n,init:i};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new Fi(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const n=this.clone();return n.middleware=n.middleware.concat(...e),n}withPreMiddleware(...e){const n=e.map(i=>({pre:i}));return this.withMiddleware(...n)}withPostMiddleware(...e){const n=e.map(i=>({post:i}));return this.withMiddleware(...n)}isJsonMime(e){return e?st.jsonRegex.test(e):!1}request(e,n){return Re(this,void 0,void 0,function*(){const{url:i,init:r}=yield this.createFetchParams(e,n),s=yield this.fetchApi(i,r);if(s&&s.status>=200&&s.status<300)return s;throw new Oi(s,"Response returned an error code")})}createFetchParams(e,n){return Re(this,void 0,void 0,function*(){let i=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof n=="function"?n:()=>Re(this,void 0,void 0,function*(){return n}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:Ri(a.body)||a.body instanceof URLSearchParams||Ni(a.body)?a.body:JSON.stringify(a.body)});return{url:i,init:u}})}clone(){const e=this.constructor,n=new e(this.configuration);return n.middleware=this.middleware.slice(),n}}st.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Ni(t){return typeof Blob<"u"&&t instanceof Blob}function Ri(t){return typeof FormData<"u"&&t instanceof FormData}class Oi extends Error{constructor(e,n){super(n),this.response=e,this.name="ResponseError"}}class Fi extends Error{constructor(e,n){super(n),this.cause=e,this.name="FetchError"}}class Yt extends Error{constructor(e,n){super(n),this.field=e,this.name="RequiredError"}}function h(t,e){const n=t[e];return n!=null}function fn(t,e=""){return Object.keys(t).map(n=>dn(n,t[n],e)).filter(n=>n.length>0).join("&")}function dn(t,e,n=""){const i=n+(n.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${r}`}if(e instanceof Set){const r=Array.from(e);return dn(t,r,n)}return e instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?fn(e,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(e))}`}class X{constructor(e,n=i=>i){this.raw=e,this.transformer=n}value(){return Re(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Mi(t){return Gi(t)}function Gi(t,e){return t==null?t:{departmentid:h(t,"departmentid")?t.departmentid:void 0,onlineStatus:h(t,"online_status")?t.online_status:void 0,presetStatus:h(t,"preset_status")?t.preset_status:void 0}}function Ei(t){return $i(t)}function $i(t,e){return t==null?t:{agentid:h(t,"agentid")?t.agentid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,username:h(t,"username")?t.username:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,roleid:h(t,"roleid")?t.roleid:void 0,departmentsStatuses:h(t,"departments_statuses")?t.departments_statuses.map(Mi):void 0,twofa:h(t,"twofa")?t.twofa:void 0,lastPswdChange:h(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:h(t,"userstatus")?t.userstatus:void 0}}function zi(t){return Ii(t)}function Ii(t,e){return t==null?t:{conversationid:h(t,"conversationid")?t.conversationid:void 0,datechanged:h(t,"datechanged")?new Date(t.datechanged):void 0,status:h(t,"status")?t.status:void 0,preview:h(t,"preview")?t.preview:void 0,subject:h(t,"subject")?t.subject:void 0,departmentname:h(t,"departmentname")?t.departmentname:void 0,agentname:h(t,"agentname")?t.agentname:void 0,tags:h(t,"tags")?t.tags:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,emails:h(t,"emails")?t.emails:void 0,city:h(t,"city")?t.city:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,rstatus:h(t,"rstatus")?t.rstatus:void 0,statusdatestarted:h(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:h(t,"chat_order")?t.chat_order:void 0}}function Ki(t){return Bi(t)}function Bi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,name:h(t,"name")?t.name:void 0,type:h(t,"type")?t.type:void 0,onlineCode:h(t,"online_code")?t.online_code:void 0,offlineCode:h(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:h(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:h(t,"offline_code_css")?t.offline_code_css:void 0,provide:h(t,"provide")?t.provide:void 0,impressions:h(t,"impressions")?t.impressions:void 0,tickets:h(t,"tickets")?t.tickets:void 0,status:h(t,"status")?t.status:void 0,lastDisplayTime:h(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:h(t,"last_display_url")?t.last_display_url:void 0}}function he(t){return Vi(t)}function Vi(t,e){return t==null?t:{count:h(t,"count")?t.count:void 0}}function Ji(t){return Ui(t)}function Ui(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,name:h(t,"name")?t.name:void 0,agentCount:h(t,"agent_count")?t.agent_count:void 0}}function Hi(t){return Wi(t)}function Wi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,logid:h(t,"logid")?t.logid:void 0,line:h(t,"line")?t.line:void 0,filename:h(t,"filename")?t.filename:void 0,created:h(t,"created")?t.created:void 0,level:h(t,"level")?t.level:void 0,type:h(t,"type")?t.type:void 0,message:h(t,"message")?t.message:void 0,ip:h(t,"ip")?t.ip:void 0,groupid:h(t,"groupid")?t.groupid:void 0}}function Yi(t){return Pi(t)}function Pi(t,e){return t==null?t:{agentid:h(t,"agentid")?t.agentid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,chats:h(t,"chats")?t.chats:void 0}}function Qi(t){return Zi(t)}function Zi(t,e){return t==null?t:{name:h(t,"name")?t.name:void 0,code:h(t,"code")?t.code:void 0,engName:h(t,"eng_name")?t.eng_name:void 0,translated:h(t,"translated")?t.translated:void 0,isDefault:h(t,"is_default")?t.is_default:void 0,active:h(t,"active")?t.active:void 0,isCustom:h(t,"is_custom")?t.is_custom:void 0,isBuiltIn:h(t,"is_builtIn")?t.is_builtIn:void 0}}function Xi(t){return qi(t)}function qi(t,e){return t==null?t:{codeName:h(t,"code_name")?t.code_name:void 0,name:h(t,"name")?t.name:void 0,description:h(t,"description")?t.description:void 0,active:h(t,"active")?t.active:void 0,help:h(t,"help")?t.help:void 0,multiple:h(t,"multiple")?t.multiple:void 0,configFile:h(t,"config_file")?t.config_file:void 0,price:h(t,"price")?t.price:void 0,legacyIntegration:h(t,"legacy_integration")?t.legacy_integration:void 0}}function dt(t){return xi(t)}function xi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,conversationid:h(t,"conversationid")?t.conversationid:void 0,code:h(t,"code")?t.code:void 0,slaTicketId:h(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:h(t,"departmentid")?t.departmentid:void 0,departmentName:h(t,"department_name")?t.department_name:void 0,levelid:h(t,"levelid")?t.levelid:void 0,slaLevelName:h(t,"sla_level_name")?t.sla_level_name:void 0,sla:h(t,"sla")?t.sla:void 0,dateCreated:h(t,"date_created")?t.date_created:void 0,dateClosed:h(t,"date_closed")?t.date_closed:void 0,dateDue:h(t,"date_due")?t.date_due:void 0,slaLevelId:h(t,"sla_level_id")?t.sla_level_id:void 0,slaType:h(t,"sla_type")?new Date(t.sla_type):void 0,agentid:h(t,"agentid")?t.agentid:void 0,agentFirstname:h(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:h(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:h(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:h(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:h(t,"req_firstname")?t.req_firstname:void 0,reqLastname:h(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:h(t,"req_systemname")?t.req_systemname:void 0,reqContactName:h(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:h(t,"req_avatar_url")?t.req_avatar_url:void 0}}function Pt(t){return ji(t)}function ji(t,e){return t==null?t:{tagid:h(t,"tagid")?t.tagid:void 0,name:h(t,"name")?t.name:void 0,type:h(t,"type")?t.type:void 0,color:h(t,"color")?t.color:void 0,backgroundcolor:h(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:h(t,"is_public")?t.is_public:void 0}}function gn(t){return er(t)}function er(t,e){return t==null?t:{conversationid:h(t,"conversationid")?t.conversationid:void 0,code:h(t,"code")?t.code:void 0,datecreated:h(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:h(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:h(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:h(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:h(t,"rorder")?t.rorder:void 0,datedue:h(t,"datedue")?new Date(t.datedue):void 0,datereopen:h(t,"datereopen")?new Date(t.datereopen):void 0,status:h(t,"status")?t.status:void 0,channelType:h(t,"channel_type")?t.channel_type:void 0,departmentid:h(t,"departmentid")?t.departmentid:void 0,agentid:h(t,"agentid")?t.agentid:void 0,preview:h(t,"preview")?t.preview:void 0,subject:h(t,"subject")?t.subject:void 0,departmentname:h(t,"departmentname")?t.departmentname:void 0,agentname:h(t,"agentname")?t.agentname:void 0,tags:h(t,"tags")?t.tags:void 0,messagegroupsIn:h(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:h(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:h(t,"contactid")?t.contactid:void 0,parentContactid:h(t,"parent_contactid")?t.parent_contactid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,emails:h(t,"emails")?t.emails:void 0,phones:h(t,"phones")?t.phones:void 0,jobPosition:h(t,"job_position")?t.job_position:void 0,contactType:h(t,"contact_type")?t.contact_type:void 0,city:h(t,"city")?t.city:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,timeOffset:h(t,"time_offset")?t.time_offset:void 0,gender:h(t,"gender")?t.gender:void 0,levelid:h(t,"levelid")?t.levelid:void 0,groups:h(t,"groups")?t.groups:void 0,contactStatus:h(t,"contact_status")?t.contact_status:void 0,company:h(t,"company")?t.company:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,userid:h(t,"userid")?t.userid:void 0,roleid:h(t,"roleid")?t.roleid:void 0,userstatus:h(t,"userstatus")?t.userstatus:void 0,accountuserstatus:h(t,"accountuserstatus")?t.accountuserstatus:void 0,description:h(t,"description")?t.description:void 0,note:h(t,"note")?t.note:void 0,lastActivity:h(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:h(t,"tagnames")?t.tagnames:void 0,groupnames:h(t,"groupnames")?t.groupnames:void 0}}function tr(t){return nr(t)}function nr(t,e){return t==null?t:{cursor:h(t,"cursor")?t.cursor:void 0,rows:h(t,"rows")?t.rows.map(gn):void 0}}function ir(t){return rr(t)}function rr(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,agentid:h(t,"agentid")?t.agentid:void 0,agent:h(t,"agent")?t.agent:void 0,conversationid:h(t,"conversationid")?t.conversationid:void 0,ticket:h(t,"ticket")?t.ticket:void 0,parentContactid:h(t,"parent_contactid")?t.parent_contactid:void 0,company:h(t,"company")?t.company:void 0,contactid:h(t,"contactid")?t.contactid:void 0,customer:h(t,"customer")?t.customer:void 0,customerFirstname:h(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:h(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:h(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:h(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:h(t,"reportdate")?t.reportdate:void 0,reportedtime:h(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:h(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:h(t,"spenttime")?t.spenttime:void 0,dateinvoiced:h(t,"dateinvoiced")?t.dateinvoiced:void 0,note:h(t,"note")?t.note:void 0,type:h(t,"type")?t.type:void 0}}var E=globalThis&&globalThis.__awaiter||function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};class hn extends st{getAgentsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Ei))})}getAgentsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,n)).value()})}getAgentsGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getAgentsGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,n)).value()})}getCallsSlaLogGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(dt))})}getCallsSlaLogGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,n)).value()})}getCallsSlaLogGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getCallsSlaLogGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,n)).value()})}getChatsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(zi))})}getChatsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,n)).value()})}getChatsGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getChatsGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,n)).value()})}getChatsSlaLogGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(dt))})}getChatsSlaLogGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,n)).value()})}getChatsSlaLogGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getChatsSlaLogGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,n)).value()})}getContactWidgetsCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getContactWidgetsCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,n)).value()})}getContactWidgetsListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Ki))})}getContactWidgetsList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,n)).value()})}getCustomerGroupsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Pt))})}getCustomerGroupsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,n)).value()})}getDepartmensGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getDepartmensGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,n)).value()})}getDepartmentsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Ji))})}getDepartmentsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,n)).value()})}getEventLogsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Hi))})}getEventLogsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,n)).value()})}getEventLogsGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getEventLogsGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,n)).value()})}getInviteAgentsGridListRaw(e,n){return E(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Yt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Yi))})}getInviteAgentsGridList(e,n){return E(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,n)).value()})}getLanguagesGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Qi))})}getLanguagesGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,n)).value()})}getLanguagesGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getLanguagesGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,n)).value()})}getPlugindGridListRaw(e,n){return E(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Yt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const i={};e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.pluginPurpose!==void 0&&(i.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Xi))})}getPlugindGridList(e,n){return E(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,n)).value()})}getTagsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(Pt))})}getTagsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,n)).value()})}getTicketsGridDatasetRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:i},n);return new X(s,o=>tr(o))})}getTicketsGridDataset(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,n)).value()})}getTicketsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(gn))})}getTicketsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,n)).value()})}getTicketsGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getTicketsGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,n)).value()})}getTicketsSlaLogGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(dt))})}getTicketsSlaLogGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,n)).value()})}getTicketsSlaLogGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getTicketsSlaLogGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,n)).value()})}getTimeReportsGridListRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.sortField!==void 0&&(i._sortField=e.sortField),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:i},n);return new X(s,o=>o.map(ir))})}getTimeReportsGridList(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,n)).value()})}getTimeReportsGridListCountRaw(e,n){return E(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:i},n);return new X(s,o=>he(o))})}getTimeReportsGridListCount(e={},n){return E(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,n)).value()})}}const Qt={Asc:"ASC",Desc:"DESC"},sr={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"};class or{constructor(e){const n=new Dt({apiKey:e,basePath:"https://hosted.la.localhost/LiveAgent/server/api/v3"});this.api=new hn(n),this.tags=oe({})}async load(){let e=await this.api.getTagsGridList();e=e.reduce((n,i)=>(n[i.tagid]=i,n),{}),this.tags.set(e)}}function Zt(t){let e,n=(t[2]??"many")+"",i;return{c(){e=ne("of "),i=ne(n)},m(r,s){F(r,e,s),F(r,i,s)},p(r,s){s&4&&n!==(n=(r[2]??"many")+"")&&re(i,n)},d(r){r&&M(e),r&&M(i)}}}function ar(t){let e,n,i=t[3].length+"",r,s,o,a,u,l=t[4]&&Zt(t);return{c(){e=G("span"),n=ne("Showing "),r=ne(i),s=P(),l&&l.c(),o=ne(`
|
|
3
|
+
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||n)},Qe=li([Ke,st],([t])=>Ti.bind(null,t));function Ci(t){return cn(t||nt()||qe().initialLocale)}function Li(t){ie(t,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Si(t){let e,i,n;return{c(){e=F("div"),i=F("p"),n=te(t[0]),D(e,"class","svelte-7bt636")},m(r,s){M(r,e,s),O(e,i),O(i,n)},p(r,[s]){s&1&&re(n,r[0])},i:W,o:W,d(r){r&&G(e)}}}function Di(t,e,i){let n,r,s,o,a;ne(t,Qe,m=>i(8,o=m));let u,l=ke("loading");ne(t,l,m=>i(7,s=m));let c=ke("cursor");ne(t,c,m=>i(6,r=m));let f=ke("data");ne(t,f,m=>i(5,n=m));let d=ke("error");ne(t,d,m=>i(9,a=m));function g(m,p,b){return a?o("Loading failed. Please try again later."):m?"Loading...":p==null?b.length===0?o("No results match your filter. Try broadening the search criteria."):"All data loaded":"Load more data"}return t.$$.update=()=>{t.$$.dirty&224&&i(0,u=g(s,r,n))},[u,l,c,f,d,n,r,s]}class Ni extends ee{constructor(e){super(),j(this,e,Di,Si,X,{},Li)}}function Ai(t){ie(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 Ri(t){let e,i,n,r,s,o;return n=new Ni({}),{c(){e=F("div"),i=F("div"),U(n.$$.fragment),D(i,"class","load svelte-1fwehqj"),D(e,"class","load svelte-1fwehqj")},m(a,u){M(a,e,u),O(e,i),H(n,i,null),t[8](i),r=!0,s||(o=de(i,"click",function(){Fe(t[2])&&t[2].apply(this,arguments)}),s=!0)},p(a,u){t=a},i(a){r||(k(n.$$.fragment,a),r=!0)},o(a){L(n.$$.fragment,a),r=!1},d(a){a&&G(e),x(n),t[8](null),s=!1,o()}}}function Oi(t){let e,i,n,r,s;return i=new ti({props:{columns:t[1],data:t[0],selectedAll:t[4]}}),r=new oi({props:{columns:t[7],data:t[0],middleclickhandler:t[3],$$slots:{default:[Ri]},$$scope:{ctx:t}}}),{c(){e=F("div"),U(i.$$.fragment),n=Y(),U(r.$$.fragment),D(e,"class","container svelte-1fwehqj")},m(o,a){M(o,e,a),H(i,e,null),O(e,n),H(r,e,null),t[9](e),s=!0},p(o,[a]){const u={};a&2&&(u.columns=o[1]),a&1&&(u.data=o[0]),a&16&&(u.selectedAll=o[4]),i.$set(u);const l={};a&128&&(l.columns=o[7]),a&1&&(l.data=o[0]),a&8&&(l.middleclickhandler=o[3]),a&1060&&(l.$$scope={dirty:a,ctx:o}),r.$set(l)},i(o){s||(k(i.$$.fragment,o),k(r.$$.fragment,o),s=!0)},o(o){L(i.$$.fragment,o),L(r.$$.fragment,o),s=!1},d(o){o&&G(e),x(i),x(r),t[9](null)}}}function zi(t,e,i){let n,r=W,s=()=>(r(),r=_e(a,p=>i(7,n=p)),a);t.$$.on_destroy.push(()=>r());let{data:o}=e,{columns:a}=e;s();let{loadMore:u}=e,{middleclickhandler:l}=e,{selectedAll:c}=e,f,d;on(()=>{const p=new IntersectionObserver(b=>{b[0].isIntersecting&&u()},{root:d,threshold:.5});return p.observe(f),()=>p.unobserve(f)});function g(p){tt[p?"unshift":"push"](()=>{f=p,i(5,f)})}function m(p){tt[p?"unshift":"push"](()=>{d=p,i(6,d)})}return t.$$set=p=>{"data"in p&&i(0,o=p.data),"columns"in p&&s(i(1,a=p.columns)),"loadMore"in p&&i(2,u=p.loadMore),"middleclickhandler"in p&&i(3,l=p.middleclickhandler),"selectedAll"in p&&i(4,c=p.selectedAll)},[o,a,u,l,c,f,d,n,g,m]}class Fi extends ee{constructor(e){super(),j(this,e,zi,Oi,X,{data:0,columns:1,loadMore:2,middleclickhandler:3,selectedAll:4},Ai)}}let dt=class{constructor(e,i,n){Xe(this,"renderer");Xe(this,"name");Xe(this,"sortable");this.name=e,this.renderer=i,this.sortable=n}};var Oe=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};const Mi="https://localhost/api/v3".replace(/\/+$/,"");class Dt{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Mi}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||fn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:()=>Oe(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Gi=new Dt;class ot{constructor(e=Gi){this.configuration=e,this.fetchApi=(i,n)=>Oe(this,void 0,void 0,function*(){let r={url:i,init:n};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new Ki(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const i=this.clone();return i.middleware=i.middleware.concat(...e),i}withPreMiddleware(...e){const i=e.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...e){const i=e.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(e){return e?ot.jsonRegex.test(e):!1}request(e,i){return Oe(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(e,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new Ii(s,"Response returned an error code")})}createFetchParams(e,i){return Oe(this,void 0,void 0,function*(){let n=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Oe(this,void 0,void 0,function*(){return i}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:$i(a.body)||a.body instanceof URLSearchParams||Ei(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const e=this.constructor,i=new e(this.configuration);return i.middleware=this.middleware.slice(),i}}ot.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Ei(t){return typeof Blob<"u"&&t instanceof Blob}function $i(t){return typeof FormData<"u"&&t instanceof FormData}class Ii extends Error{constructor(e,i){super(i),this.response=e,this.name="ResponseError"}}class Ki extends Error{constructor(e,i){super(i),this.cause=e,this.name="FetchError"}}class Wt extends Error{constructor(e,i){super(i),this.field=e,this.name="RequiredError"}}function h(t,e){const i=t[e];return i!=null}function fn(t,e=""){return Object.keys(t).map(i=>dn(i,t[i],e)).filter(i=>i.length>0).join("&")}function dn(t,e,i=""){const n=i+(i.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(e instanceof Set){const r=Array.from(e);return dn(t,r,i)}return e instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?fn(e,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(e))}`}class Q{constructor(e,i=n=>n){this.raw=e,this.transformer=i}value(){return Oe(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Bi(t){return Vi(t)}function Vi(t,e){return t==null?t:{departmentid:h(t,"departmentid")?t.departmentid:void 0,onlineStatus:h(t,"online_status")?t.online_status:void 0,presetStatus:h(t,"preset_status")?t.preset_status:void 0}}function Ji(t){return xi(t)}function xi(t,e){return t==null?t:{agentid:h(t,"agentid")?t.agentid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,username:h(t,"username")?t.username:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,roleid:h(t,"roleid")?t.roleid:void 0,departmentsStatuses:h(t,"departments_statuses")?t.departments_statuses.map(Bi):void 0,twofa:h(t,"twofa")?t.twofa:void 0,lastPswdChange:h(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:h(t,"userstatus")?t.userstatus:void 0}}function Hi(t){return Ui(t)}function Ui(t,e){return t==null?t:{conversationid:h(t,"conversationid")?t.conversationid:void 0,datechanged:h(t,"datechanged")?new Date(t.datechanged):void 0,status:h(t,"status")?t.status:void 0,preview:h(t,"preview")?t.preview:void 0,subject:h(t,"subject")?t.subject:void 0,departmentname:h(t,"departmentname")?t.departmentname:void 0,agentname:h(t,"agentname")?t.agentname:void 0,tags:h(t,"tags")?t.tags:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,emails:h(t,"emails")?t.emails:void 0,city:h(t,"city")?t.city:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,rstatus:h(t,"rstatus")?t.rstatus:void 0,statusdatestarted:h(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:h(t,"chat_order")?t.chat_order:void 0}}function Wi(t){return Yi(t)}function Yi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,name:h(t,"name")?t.name:void 0,type:h(t,"type")?t.type:void 0,onlineCode:h(t,"online_code")?t.online_code:void 0,offlineCode:h(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:h(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:h(t,"offline_code_css")?t.offline_code_css:void 0,provide:h(t,"provide")?t.provide:void 0,impressions:h(t,"impressions")?t.impressions:void 0,tickets:h(t,"tickets")?t.tickets:void 0,status:h(t,"status")?t.status:void 0,lastDisplayTime:h(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:h(t,"last_display_url")?t.last_display_url:void 0}}function ge(t){return qi(t)}function qi(t,e){return t==null?t:{count:h(t,"count")?t.count:void 0}}function Pi(t){return Qi(t)}function Qi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,name:h(t,"name")?t.name:void 0,agentCount:h(t,"agent_count")?t.agent_count:void 0}}function Zi(t){return Xi(t)}function Xi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,logid:h(t,"logid")?t.logid:void 0,line:h(t,"line")?t.line:void 0,filename:h(t,"filename")?t.filename:void 0,created:h(t,"created")?t.created:void 0,level:h(t,"level")?t.level:void 0,type:h(t,"type")?t.type:void 0,message:h(t,"message")?t.message:void 0,ip:h(t,"ip")?t.ip:void 0,groupid:h(t,"groupid")?t.groupid:void 0}}function ji(t){return er(t)}function er(t,e){return t==null?t:{agentid:h(t,"agentid")?t.agentid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,chats:h(t,"chats")?t.chats:void 0}}function tr(t){return nr(t)}function nr(t,e){return t==null?t:{name:h(t,"name")?t.name:void 0,code:h(t,"code")?t.code:void 0,engName:h(t,"eng_name")?t.eng_name:void 0,translated:h(t,"translated")?t.translated:void 0,isDefault:h(t,"is_default")?t.is_default:void 0,active:h(t,"active")?t.active:void 0,isCustom:h(t,"is_custom")?t.is_custom:void 0,isBuiltIn:h(t,"is_builtIn")?t.is_builtIn:void 0}}function ir(t){return rr(t)}function rr(t,e){return t==null?t:{codeName:h(t,"code_name")?t.code_name:void 0,name:h(t,"name")?t.name:void 0,description:h(t,"description")?t.description:void 0,active:h(t,"active")?t.active:void 0,help:h(t,"help")?t.help:void 0,multiple:h(t,"multiple")?t.multiple:void 0,configFile:h(t,"config_file")?t.config_file:void 0,price:h(t,"price")?t.price:void 0,legacyIntegration:h(t,"legacy_integration")?t.legacy_integration:void 0}}function gt(t){return sr(t)}function sr(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,conversationid:h(t,"conversationid")?t.conversationid:void 0,code:h(t,"code")?t.code:void 0,slaTicketId:h(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:h(t,"departmentid")?t.departmentid:void 0,departmentName:h(t,"department_name")?t.department_name:void 0,levelid:h(t,"levelid")?t.levelid:void 0,slaLevelName:h(t,"sla_level_name")?t.sla_level_name:void 0,sla:h(t,"sla")?t.sla:void 0,dateCreated:h(t,"date_created")?t.date_created:void 0,dateClosed:h(t,"date_closed")?t.date_closed:void 0,dateDue:h(t,"date_due")?t.date_due:void 0,slaLevelId:h(t,"sla_level_id")?t.sla_level_id:void 0,slaType:h(t,"sla_type")?new Date(t.sla_type):void 0,agentid:h(t,"agentid")?t.agentid:void 0,agentFirstname:h(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:h(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:h(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:h(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:h(t,"req_firstname")?t.req_firstname:void 0,reqLastname:h(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:h(t,"req_systemname")?t.req_systemname:void 0,reqContactName:h(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:h(t,"req_avatar_url")?t.req_avatar_url:void 0}}function Yt(t){return or(t)}function or(t,e){return t==null?t:{tagid:h(t,"tagid")?t.tagid:void 0,name:h(t,"name")?t.name:void 0,type:h(t,"type")?t.type:void 0,color:h(t,"color")?t.color:void 0,backgroundcolor:h(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:h(t,"is_public")?t.is_public:void 0}}function gn(t){return ar(t)}function ar(t,e){return t==null?t:{conversationid:h(t,"conversationid")?t.conversationid:void 0,code:h(t,"code")?t.code:void 0,datecreated:h(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:h(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:h(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:h(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:h(t,"rorder")?t.rorder:void 0,datedue:h(t,"datedue")?new Date(t.datedue):void 0,datereopen:h(t,"datereopen")?new Date(t.datereopen):void 0,status:h(t,"status")?t.status:void 0,channelType:h(t,"channel_type")?t.channel_type:void 0,departmentid:h(t,"departmentid")?t.departmentid:void 0,agentid:h(t,"agentid")?t.agentid:void 0,preview:h(t,"preview")?t.preview:void 0,subject:h(t,"subject")?t.subject:void 0,departmentname:h(t,"departmentname")?t.departmentname:void 0,agentname:h(t,"agentname")?t.agentname:void 0,tags:h(t,"tags")?t.tags:void 0,messagegroupsIn:h(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:h(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:h(t,"contactid")?t.contactid:void 0,parentContactid:h(t,"parent_contactid")?t.parent_contactid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,emails:h(t,"emails")?t.emails:void 0,phones:h(t,"phones")?t.phones:void 0,jobPosition:h(t,"job_position")?t.job_position:void 0,contactType:h(t,"contact_type")?t.contact_type:void 0,city:h(t,"city")?t.city:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,timeOffset:h(t,"time_offset")?t.time_offset:void 0,gender:h(t,"gender")?t.gender:void 0,levelid:h(t,"levelid")?t.levelid:void 0,groups:h(t,"groups")?t.groups:void 0,contactStatus:h(t,"contact_status")?t.contact_status:void 0,company:h(t,"company")?t.company:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,userid:h(t,"userid")?t.userid:void 0,roleid:h(t,"roleid")?t.roleid:void 0,userstatus:h(t,"userstatus")?t.userstatus:void 0,accountuserstatus:h(t,"accountuserstatus")?t.accountuserstatus:void 0,description:h(t,"description")?t.description:void 0,note:h(t,"note")?t.note:void 0,lastActivity:h(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:h(t,"tagnames")?t.tagnames:void 0,groupnames:h(t,"groupnames")?t.groupnames:void 0}}function lr(t){return ur(t)}function ur(t,e){return t==null?t:{cursor:h(t,"cursor")?t.cursor:void 0,rows:h(t,"rows")?t.rows.map(gn):void 0}}function cr(t){return fr(t)}function fr(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,agentid:h(t,"agentid")?t.agentid:void 0,agent:h(t,"agent")?t.agent:void 0,conversationid:h(t,"conversationid")?t.conversationid:void 0,ticket:h(t,"ticket")?t.ticket:void 0,parentContactid:h(t,"parent_contactid")?t.parent_contactid:void 0,company:h(t,"company")?t.company:void 0,contactid:h(t,"contactid")?t.contactid:void 0,customer:h(t,"customer")?t.customer:void 0,customerFirstname:h(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:h(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:h(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:h(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:h(t,"reportdate")?t.reportdate:void 0,reportedtime:h(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:h(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:h(t,"spenttime")?t.spenttime:void 0,dateinvoiced:h(t,"dateinvoiced")?t.dateinvoiced:void 0,note:h(t,"note")?t.note:void 0,type:h(t,"type")?t.type:void 0}}var E=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};class hn extends ot{getAgentsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(Ji))})}getAgentsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,i)).value()})}getAgentsGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getAgentsGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,i)).value()})}getCallsSlaLogGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(gt))})}getCallsSlaLogGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,i)).value()})}getCallsSlaLogGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getCallsSlaLogGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,i)).value()})}getChatsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(Hi))})}getChatsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,i)).value()})}getChatsGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getChatsGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,i)).value()})}getChatsSlaLogGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(gt))})}getChatsSlaLogGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,i)).value()})}getChatsSlaLogGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getChatsSlaLogGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,i)).value()})}getContactWidgetsCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getContactWidgetsCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,i)).value()})}getContactWidgetsListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(Wi))})}getContactWidgetsList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,i)).value()})}getCustomerGroupsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(Yt))})}getCustomerGroupsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,i)).value()})}getDepartmensGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getDepartmensGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,i)).value()})}getDepartmentsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(Pi))})}getDepartmentsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,i)).value()})}getEventLogsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(Zi))})}getEventLogsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,i)).value()})}getEventLogsGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getEventLogsGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,i)).value()})}getInviteAgentsGridListRaw(e,i){return E(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Wt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(ji))})}getInviteAgentsGridList(e,i){return E(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,i)).value()})}getLanguagesGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(tr))})}getLanguagesGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,i)).value()})}getLanguagesGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getLanguagesGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,i)).value()})}getPlugindGridListRaw(e,i){return E(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Wt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.pluginPurpose!==void 0&&(n.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(ir))})}getPlugindGridList(e,i){return E(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,i)).value()})}getTagsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(Yt))})}getTagsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,i)).value()})}getTicketsGridDatasetRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:n},i);return new Q(s,o=>lr(o))})}getTicketsGridDataset(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,i)).value()})}getTicketsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(gn))})}getTicketsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,i)).value()})}getTicketsGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getTicketsGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,i)).value()})}getTicketsSlaLogGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(gt))})}getTicketsSlaLogGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,i)).value()})}getTicketsSlaLogGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getTicketsSlaLogGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,i)).value()})}getTimeReportsGridListRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.sortField!==void 0&&(n._sortField=e.sortField),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:n},i);return new Q(s,o=>o.map(cr))})}getTimeReportsGridList(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,i)).value()})}getTimeReportsGridListCountRaw(e,i){return E(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new Q(s,o=>ge(o))})}getTimeReportsGridListCount(e={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,i)).value()})}}const qt={Asc:"ASC",Desc:"DESC"},dr={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"};class gr{constructor(e,i){const n=new Dt({apiKey:e,basePath:i+"/api/v3"});this.api=new hn(n),this.tags=ae({})}async load(){let e=await this.api.getTagsGridList();e=e.reduce((i,n)=>(i[n.tagid]=n,i),{}),this.tags.set(e)}}function hr(t){ie(t,"svelte-xoajdi","span.svelte-xoajdi{margin-right:10px}")}function Pt(t){let e,i=(t[2]??"many")+"",n;return{c(){e=te("of "),n=te(i)},m(r,s){M(r,e,s),M(r,n,s)},p(r,s){s&4&&i!==(i=(r[2]??"many")+"")&&re(n,i)},d(r){r&&G(e),r&&G(n)}}}function mr(t){let e,i,n=t[3].length+"",r,s,o,a,u,l=t[4]&&Pt(t);return{c(){e=F("span"),i=te("Showing "),r=te(n),s=Y(),l&&l.c(),o=te(`
|
|
4
4
|
results
|
|
5
|
-
`),D(e,"class","svelte-xoajdi")},m(c,f){
|
|
5
|
+
`),D(e,"class","svelte-xoajdi")},m(c,f){M(c,e,f),O(e,i),O(e,r),O(e,s),l&&l.m(e,null),O(e,o),a||(u=de(e,"click",t[5]),a=!0)},p(c,[f]){f&8&&n!==(n=c[3].length+"")&&re(r,n),c[4]?l?l.p(c,f):(l=Pt(c),l.c(),l.m(e,o)):l&&(l.d(1),l=null)},i:W,o:W,d(c){c&&G(e),l&&l.d(),a=!1,u()}}}function pr(t,e,i){let n,r=W,s=()=>(r(),r=_e(l,p=>i(3,n=p)),l),o,a=W,u=()=>(a(),a=_e(c,p=>i(4,o=p)),c);t.$$.on_destroy.push(()=>r()),t.$$.on_destroy.push(()=>a());let{data:l}=e;s();let{cursor:c}=e;u();let{filter:f}=e,d=null;function g(){i(2,d=null)}async function m(){let b=await ke("api").getTicketsGridListCount({filters:f,timezoneOffset:new Date().getTimezoneOffset()});i(2,d=b.count)}return t.$$set=p=>{"data"in p&&s(i(0,l=p.data)),"cursor"in p&&u(i(1,c=p.cursor)),"filter"in p&&i(6,f=p.filter)},t.$$.update=()=>{t.$$.dirty&64&&f&&g()},[l,c,d,n,o,m,f]}class _r extends ee{constructor(e){super(),j(this,e,pr,mr,X,{data:0,cursor:1,filter:6},hr)}}const yr=()=>{const t=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],e=Math.floor(Math.random()*t.length);return t[e]},vr=t=>{let e=t.split(" ");return e.length>1?e=e.shift().charAt(0)+e.pop().charAt(0):e=t.substring(0,2),e.toUpperCase()};function br(t){ie(t,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function wr(t){let e;return{c(){e=F("div"),e.textContent=`${t[10]}`,D(e,"class","innerInitials svelte-hbozhk")},m(i,n){M(i,e,n)},p:W,d(i){i&&G(e)}}}function kr(t){let e,i,n,r,s,o;return{c(){e=F("div"),i=F("img"),D(i,"alt",""),D(i,"class",Te("innerImage")+" svelte-hbozhk"),ht(i.src,n=t[2])||D(i,"src",n),D(e,"class",r=Te(t[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){M(a,e,u),O(e,i),s||(o=[de(i,"error",t[15]),de(i,"load",t[16])],s=!0)},p(a,u){u&4&&!ht(i.src,n=a[2])&&D(i,"src",n),u&256&&r!==(r=Te(a[8]?"imageLoading":"")+" svelte-hbozhk")&&D(e,"class",r)},d(a){a&&G(e),s=!1,me(o)}}}function Tr(t){let e,i;function n(o,a){return o[2]&&!o[7]?kr:wr}let r=n(t),s=r(t);return{c(){e=F("div"),s.c(),D(e,"aria-label",t[1]),D(e,"class","wrapper svelte-hbozhk"),D(e,"style",i=t[0]+"--borderRadius:"+(t[6]?0:t[5])+"; --size:"+t[4]+"; --bgColor:"+t[9]+"; --src:"+t[2]+"; --textColor:"+t[3]+"; --abbrLength:"+t[11])},m(o,a){M(o,e,a),s.m(e,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(e,null))),a&2&&D(e,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&D(e,"style",i)},i:W,o:W,d(o){o&&G(e),s.d()}}}function Cr(t,e,i){let{style:n=""}=e,{name:r="Avatar"}=e,{initials:s}=e,{src:o}=e,{bgColor:a="lightGrey"}=e,{textColor:u="white"}=e,{size:l="50px"}=e,{borderRadius:c="50%"}=e,{square:f=!1}=e,{randomBgColor:d=!1}=e;const g=d?yr():a,m=s||vr(r),p=m.length;let b=!1,z=!0;const C=()=>i(7,b=!0),N=()=>i(8,z=!1);return t.$$set=_=>{"style"in _&&i(0,n=_.style),"name"in _&&i(1,r=_.name),"initials"in _&&i(12,s=_.initials),"src"in _&&i(2,o=_.src),"bgColor"in _&&i(13,a=_.bgColor),"textColor"in _&&i(3,u=_.textColor),"size"in _&&i(4,l=_.size),"borderRadius"in _&&i(5,c=_.borderRadius),"square"in _&&i(6,f=_.square),"randomBgColor"in _&&i(14,d=_.randomBgColor)},[n,r,o,u,l,c,f,b,z,g,m,p,s,a,d,C,N]}class Lr extends ee{constructor(e){super(),j(this,e,Cr,Tr,X,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},br)}}var mn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pn={exports:{}},_n={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(i,n){return i<<n|i>>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return e.rotl(i,8)&16711935|e.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=e.endian(i[n]);return i},randomBytes:function(i){for(var n=[];i>0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],r=0,s=0;r<i.length;r++,s+=8)n[s>>>5]|=i[r]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],r=0;r<i.length*32;r+=8)n.push(i[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(i){for(var n=[],r=0;r<i.length;r++)n.push((i[r]>>>4).toString(16)),n.push((i[r]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],r=0;r<i.length;r+=2)n.push(parseInt(i.substr(r,2),16));return n},bytesToBase64:function(i){for(var n=[],r=0;r<i.length;r+=3)for(var s=i[r]<<16|i[r+1]<<8|i[r+2],o=0;o<4;o++)r*8+o*6<=i.length*8?n.push(t.charAt(s>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<i.length;s=++r%4)s!=0&&n.push((t.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(i.charAt(r))>>>6-s*2);return n}};_n.exports=e})();var Sr=_n.exports,vt={utf8:{stringToBytes:function(t){return vt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(vt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i)&255);return e},bytesToString:function(t){for(var e=[],i=0;i<t.length;i++)e.push(String.fromCharCode(t[i]));return e.join("")}}},Qt=vt;/*!
|
|
6
6
|
* Determine if an object is a Buffer
|
|
7
7
|
*
|
|
8
8
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/var yr=function(t){return t!=null&&(yn(t)||vr(t)||!!t._isBuffer)};function yn(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"&&yn(t.slice(0,0))}(function(){var t=pr,e=Xt.utf8,n=yr,i=Xt.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=i.stringToBytes(s):s=e.stringToBytes(s):n(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,f=-1732584194,d=271733878,g=0;g<a.length;g++)a[g]=(a[g]<<8|a[g]>>>24)&16711935|(a[g]<<24|a[g]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,_=r._gg,b=r._hh,O=r._ii,g=0;g<a.length;g+=16){var C=l,A=c,p=f,L=d;l=m(l,c,f,d,a[g+0],7,-680876936),d=m(d,l,c,f,a[g+1],12,-389564586),f=m(f,d,l,c,a[g+2],17,606105819),c=m(c,f,d,l,a[g+3],22,-1044525330),l=m(l,c,f,d,a[g+4],7,-176418897),d=m(d,l,c,f,a[g+5],12,1200080426),f=m(f,d,l,c,a[g+6],17,-1473231341),c=m(c,f,d,l,a[g+7],22,-45705983),l=m(l,c,f,d,a[g+8],7,1770035416),d=m(d,l,c,f,a[g+9],12,-1958414417),f=m(f,d,l,c,a[g+10],17,-42063),c=m(c,f,d,l,a[g+11],22,-1990404162),l=m(l,c,f,d,a[g+12],7,1804603682),d=m(d,l,c,f,a[g+13],12,-40341101),f=m(f,d,l,c,a[g+14],17,-1502002290),c=m(c,f,d,l,a[g+15],22,1236535329),l=_(l,c,f,d,a[g+1],5,-165796510),d=_(d,l,c,f,a[g+6],9,-1069501632),f=_(f,d,l,c,a[g+11],14,643717713),c=_(c,f,d,l,a[g+0],20,-373897302),l=_(l,c,f,d,a[g+5],5,-701558691),d=_(d,l,c,f,a[g+10],9,38016083),f=_(f,d,l,c,a[g+15],14,-660478335),c=_(c,f,d,l,a[g+4],20,-405537848),l=_(l,c,f,d,a[g+9],5,568446438),d=_(d,l,c,f,a[g+14],9,-1019803690),f=_(f,d,l,c,a[g+3],14,-187363961),c=_(c,f,d,l,a[g+8],20,1163531501),l=_(l,c,f,d,a[g+13],5,-1444681467),d=_(d,l,c,f,a[g+2],9,-51403784),f=_(f,d,l,c,a[g+7],14,1735328473),c=_(c,f,d,l,a[g+12],20,-1926607734),l=b(l,c,f,d,a[g+5],4,-378558),d=b(d,l,c,f,a[g+8],11,-2022574463),f=b(f,d,l,c,a[g+11],16,1839030562),c=b(c,f,d,l,a[g+14],23,-35309556),l=b(l,c,f,d,a[g+1],4,-1530992060),d=b(d,l,c,f,a[g+4],11,1272893353),f=b(f,d,l,c,a[g+7],16,-155497632),c=b(c,f,d,l,a[g+10],23,-1094730640),l=b(l,c,f,d,a[g+13],4,681279174),d=b(d,l,c,f,a[g+0],11,-358537222),f=b(f,d,l,c,a[g+3],16,-722521979),c=b(c,f,d,l,a[g+6],23,76029189),l=b(l,c,f,d,a[g+9],4,-640364487),d=b(d,l,c,f,a[g+12],11,-421815835),f=b(f,d,l,c,a[g+15],16,530742520),c=b(c,f,d,l,a[g+2],23,-995338651),l=O(l,c,f,d,a[g+0],6,-198630844),d=O(d,l,c,f,a[g+7],10,1126891415),f=O(f,d,l,c,a[g+14],15,-1416354905),c=O(c,f,d,l,a[g+5],21,-57434055),l=O(l,c,f,d,a[g+12],6,1700485571),d=O(d,l,c,f,a[g+3],10,-1894986606),f=O(f,d,l,c,a[g+10],15,-1051523),c=O(c,f,d,l,a[g+1],21,-2054922799),l=O(l,c,f,d,a[g+8],6,1873313359),d=O(d,l,c,f,a[g+15],10,-30611744),f=O(f,d,l,c,a[g+6],15,-1560198380),c=O(c,f,d,l,a[g+13],21,1309151649),l=O(l,c,f,d,a[g+4],6,-145523070),d=O(d,l,c,f,a[g+11],10,-1120210379),f=O(f,d,l,c,a[g+2],15,718787259),c=O(c,f,d,l,a[g+9],21,-343485551),l=l+C>>>0,c=c+A>>>0,f=f+p>>>0,d=d+L>>>0}return t.endian([l,c,f,d])};r._ff=function(s,o,a,u,l,c,f){var d=s+(o&a|~o&u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._gg=function(s,o,a,u,l,c,f){var d=s+(o&u|a&~u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._hh=function(s,o,a,u,l,c,f){var d=s+(o^a^u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._ii=function(s,o,a,u,l,c,f){var d=s+(a^(o|~u))+(l>>>0)+f;return(d<<c|d>>>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?i.bytesToString(a):t.bytesToHex(a)}})();var br=_n.exports;const wr=At(br);function kr(t){return[...t].reduce((e,n)=>Math.imul(31,e)+n.charCodeAt(0)|0,0)}function Tr(t){let e,n,i;const r=t[2].default,s=Ge(r,t,t[1],null);return{c(){e=G("div"),s&&s.c(),D(e,"class",n="Column "+t[0]+" svelte-i7rqh4")},m(o,a){F(o,e,a),s&&s.m(e,null),i=!0},p(o,[a]){s&&s.p&&(!i||a&2)&&$e(s,r,o,o[1],i?Ee(r,o[1],a,null):ze(o[1]),null),(!i||a&1&&n!==(n="Column "+o[0]+" svelte-i7rqh4"))&&D(e,"class",n)},i(o){i||(w(s,o),i=!0)},o(o){S(s,o),i=!1},d(o){o&&M(e),s&&s.d(o)}}}function Cr(t,e,n){let{$$slots:i={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&n(0,s=o.className),"$$scope"in o&&n(1,r=o.$$scope)},[s,r,i]}class Nt extends te{constructor(e){super(),j(this,e,Cr,Tr,x,{className:0})}}function Lr(t){let e,n,i,r,s,o;const a=t[4].default,u=Ge(a,t,t[3],null);return{c(){e=G("div"),u&&u.c(),n=P(),i=G("span"),r=ne(t[0]),D(i,"class","text"),D(e,"class",s="Tag "+t[1]+" svelte-7jeavi"),D(e,"style",t[2])},m(l,c){F(l,e,c),u&&u.m(e,null),R(e,n),R(e,i),R(i,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&$e(u,a,l,l[3],o?Ee(a,l[3],c,null):ze(l[3]),null),(!o||c&1)&&re(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-7jeavi"))&&D(e,"class",s),(!o||c&4)&&D(e,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){S(u,l),o=!1},d(l){l&&M(e),u&&u.d(l)}}}function Sr(t,e,n){let{$$slots:i={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return console.log("test halo"),t.$$set=u=>{"text"in u&&n(0,s=u.text),"className"in u&&n(1,o=u.className),"style"in u&&n(2,a=u.style),"$$scope"in u&&n(3,r=u.$$scope)},[s,o,a,r,i]}class ot extends te{constructor(e){super(),j(this,e,Sr,Lr,x,{text:0,className:1,style:2})}}function Dr(t){let e,n;return{c(){e=G("span"),D(e,"class",n=ke(`Icon ${t[0]} ${t[1]}`)+" svelte-yh1nwn")},m(i,r){F(i,e,r)},p(i,[r]){r&3&&n!==(n=ke(`Icon ${i[0]} ${i[1]}`)+" svelte-yh1nwn")&&D(e,"class",n)},i:H,o:H,d(i){i&&M(e)}}}function Ar(t,e,n){let{className:i=""}=e,{iconVariable:r}=e;return t.$$set=s=>{"className"in s&&n(0,i=s.className),"iconVariable"in s&&n(1,r=s.iconVariable)},[i,r]}class Me extends te{constructor(e){super(),j(this,e,Ar,Dr,x,{className:0,iconVariable:1})}}function Nr(t){let e,n;return e=new Me({props:{iconVariable:t[2]}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.iconVariable=i[2]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Rr(t){let e,n;return e=new ot({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Nr]},$$scope:{ctx:t}}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.text=i[0]),r&2&&(s.style=i[1]),r&36&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Or(t,e,n){let{text:i}=e,{className:r=""}=e,{style:s=""}=e,{iconVariable:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&n(0,i=u.text),"className"in u&&n(4,r=u.className),"style"in u&&n(1,s=u.style),"iconVariable"in u&&n(2,o=u.iconVariable)},[i,s,o,a,r]}class at extends te{constructor(e){super(),j(this,e,Or,Rr,x,{text:0,className:4,style:1,iconVariable:2})}}function Fr(t){let e,n,i,r,s,o,a,u,l=t[0].emails+"",c,f,d,g;return n=new _r({props:{bgColor:"rgb("+t[4]+","+t[5]+","+t[6]+")",name:t[2],src:t[3]}}),d=new at({props:{text:t[7],className:t[7]==="Company"?"CompanyTag":"NoCompanyTag",iconVariable:"la-companies"}}),{c(){e=G("div"),Y(n.$$.fragment),i=P(),r=G("div"),s=G("div"),o=ne(t[2]),a=P(),u=G("div"),c=ne(l),f=P(),Y(d.$$.fragment),D(e,"class","avatar svelte-1vpgajt"),D(s,"class","name svelte-1vpgajt"),D(u,"class","email svelte-1vpgajt"),D(r,"class","texts svelte-1vpgajt")},m(m,_){F(m,e,_),W(n,e,null),F(m,i,_),F(m,r,_),R(r,s),R(s,o),R(r,a),R(r,u),R(u,c),R(r,f),W(d,r,null),g=!0},p(m,_){const b={};_&16&&(b.bgColor="rgb("+m[4]+","+m[5]+","+m[6]+")"),_&4&&(b.name=m[2]),_&8&&(b.src=m[3]),n.$set(b),(!g||_&4)&&re(o,m[2]),(!g||_&1)&&l!==(l=m[0].emails+"")&&re(c,l)},i(m){g||(w(n.$$.fragment,m),w(d.$$.fragment,m),g=!0)},o(m){S(n.$$.fragment,m),S(d.$$.fragment,m),g=!1},d(m){m&&M(e),U(n),m&&M(i),m&&M(r),U(d)}}}function Mr(t){let e,n;return e=new Nt({props:{className:t[1],$$slots:{default:[Fr]},$$scope:{ctx:t}}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,[r]){const s={};r&2&&(s.className=i[1]),r&541&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Gr(t,e,n){let{row:i}=e,{className:r="userColumn"}=e,s=i.firstname+" "+i.lastname;s.trim()||(s=i.systemName);let o=i.avatarUrl;o||(o="https://www.gravatar.com/avatar/"+wr(i.emails[0]??"")+"?s=200&d=404");let a=kr(s+i.emails),u=(a&16711680)>>16,l=(a&65280)>>8,c=a&255;u+l+c<150&&(u=150),u+l+c>400&&(u=0);let f=i.company==="Y"?"Company":"No Company";return t.$$set=d=>{"row"in d&&n(0,i=d.row),"className"in d&&n(1,r=d.className)},[i,r,s,o,u,l,c,f]}class Er extends te{constructor(e){super(),j(this,e,Gr,Mr,x,{row:0,className:1})}}function $r(t){let e,n;return e=new ot({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,[r]){const s={};r&6&&(s.style="color: #"+i[2]+"; background: #"+i[1]),r&1&&(s.text=i[0]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function zr(t,e,n){let i,r,s,o,{tagId:a}=e,u=we("tagsMap");return ie(t,u,l=>n(5,o=l)),t.$$set=l=>{"tagId"in l&&n(4,a=l.tagId)},t.$$.update=()=>{var l,c,f;t.$$.dirty&48&&n(2,i=((l=o[a])==null?void 0:l.color)??0),t.$$.dirty&48&&n(1,r=((c=o[a])==null?void 0:c.backgroundcolor)??0),t.$$.dirty&48&&n(0,s=((f=o[a])==null?void 0:f.name)??"")},[s,r,i,u,a,o]}class Ir extends te{constructor(e){super(),j(this,e,zr,$r,x,{tagId:4})}}function qt(t,e,n){const i=t.slice();return i[1]=e[n],i}function xt(t){let e,n;return e=new Ir({props:{tagId:t[1]}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.tagId=i[1]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Kr(t){let e,n,i=t[0],r=[];for(let o=0;o<i.length;o+=1)r[o]=xt(qt(t,i,o));const s=o=>S(r[o],1,1,()=>{r[o]=null});return{c(){e=G("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){F(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);n=!0},p(o,[a]){if(a&1){i=o[0];let u;for(u=0;u<i.length;u+=1){const l=qt(o,i,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=xt(l),r[u].c(),w(r[u],1),r[u].m(e,null))}for(le(),u=i.length;u<r.length;u+=1)s(u);ue()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)w(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)S(r[a]);n=!1},d(o){o&&M(e),bt(r,o)}}}function Br(t,e,n){let{tags:i}=e;return t.$$set=r=>{"tags"in r&&n(0,i=r.tags)},[i]}class Vr extends te{constructor(e){super(),j(this,e,Br,Kr,x,{tags:0})}}function Jr(t){let e,n;return e=new at({props:{className:t[2][t[0]].text,style:t[1],text:t[2][t[0]].text,iconVariable:t[2][t[0]].icon}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.className=i[2][i[0]].text),r&2&&(s.style=i[1]),r&1&&(s.text=i[2][i[0]].text),r&1&&(s.iconVariable=i[2][i[0]].icon),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Ur(t,e,n){let i;ie(t,Ze,a=>n(3,i=a));let{status:r}=e;const s={A:{text:i("Answered"),icon:"la-ticket-answered"},T:{text:i("Chatting"),icon:"la-chatting"},P:{text:i("Calling"),icon:"la-call"},X:{text:i("Deleted"),icon:"la-ticket-deleted"},B:{text:i("Spam"),icon:"la-spam"},I:{text:i("Init"),icon:""},R:{text:i("Resolved"),icon:"la-ticket-resolved"},N:{text:i("New"),icon:"la-ticket-new"},C:{text:i("Open"),icon:"la-ticket-open"},W:{text:i("Postponed"),icon:"la-ticket-postponed"}};let{style:o=`background-color: ${s[r]?_t(r):"defaultColor"}; color: white;`}=e;return t.$$set=a=>{"status"in a&&n(0,r=a.status),"style"in a&&n(1,o=a.style)},[r,o,s]}class Hr extends te{constructor(e){super(),j(this,e,Ur,Jr,x,{status:0,style:1})}}function Wr(t){let e,n,i,r;n=new Me({props:{iconVariable:t[2]}});const s=t[8].default,o=Ge(s,t,t[7],null);return{c(){e=G("div"),Y(n.$$.fragment),i=P(),o&&o.c(),D(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){F(a,e,u),W(n,e,null),F(a,i,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconVariable=a[2]),n.$set(l),o&&o.p&&(!r||u&128)&&$e(o,s,a,a[7],r?Ee(s,a[7],u,null):ze(a[7]),null)},i(a){r||(w(n.$$.fragment,a),w(o,a),r=!0)},o(a){S(n.$$.fragment,a),S(o,a),r=!1},d(a){a&&M(e),U(n),a&&M(i),o&&o.d(a)}}}function Yr(t){let e,n;return e=new at({props:{style:t[3],text:t[0],iconVariable:t[2],className:"Combined"}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&8&&(s.style=i[3]),r&1&&(s.text=i[0]),r&4&&(s.iconVariable=i[2]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Pr(t){let e,n,i,r,s,o;const a=[Yr,Wr],u=[];function l(c,f){return c[0]!==""?0:1}return n=l(t),i=u[n]=a[n](t),s=new ot({props:{style:t[4],text:t[1]}}),{c(){e=G("div"),i.c(),r=P(),Y(s.$$.fragment),D(e,"class",ke(t[5])+" svelte-1wdh20c")},m(c,f){F(c,e,f),u[n].m(e,null),R(e,r),W(s,e,null),o=!0},p(c,[f]){let d=n;n=l(c),n===d?u[n].p(c,f):(le(),S(u[d],1,1,()=>{u[d]=null}),ue(),i=u[n],i?i.p(c,f):(i=u[n]=a[n](c),i.c()),w(i,1),i.m(e,r));const g={};f&16&&(g.style=c[4]),f&2&&(g.text=c[1]),s.$set(g)},i(c){o||(w(i),w(s.$$.fragment,c),o=!0)},o(c){S(i),S(s.$$.fragment,c),o=!1},d(c){c&&M(e),u[n].d(),U(s)}}}function Qr(t,e,n){let{$$slots:i={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconVariable: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 f=`CombinedTag ${u}`;return t.$$set=d=>{"iconText"in d&&n(0,s=d.iconText),"tagText"in d&&n(1,o=d.tagText),"iconVariable"in d&&n(2,a=d.iconVariable),"className"in d&&n(6,u=d.className),"$$scope"in d&&n(7,r=d.$$scope)},[s,o,a,l,c,f,u,r,i]}class vn extends te{constructor(e){super(),j(this,e,Qr,Pr,x,{iconText:0,tagText:1,iconVariable:2,className:6})}}function Zr(t){let e,n;return e=new at({props:{className:"Department",text:t[0].departmentname,iconVariable:".la-department"}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.text=i[0].departmentname),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Xr(t){let e,n;return e=new vn({props:{className:"Department",tagText:t[0].agentname,iconVariable:"la-department",iconText:t[0].departmentname}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.tagText=i[0].agentname),r&1&&(s.iconText=i[0].departmentname),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function qr(t){let e,n=t[0].subject+"",i,r,s,o=t[0].preview+"",a,u,l,c,f,d,g,m,_,b,O;c=new Hr({props:{status:t[0].status}});const C=[Xr,Zr],A=[];function p(L,I){return I&1&&(d=null),d==null&&(d=L[0].agentname.trim()!==""),d?0:1}return g=p(t,-1),m=A[g]=C[g](t),b=new Vr({props:{tags:t[0].tags}}),{c(){e=G("h1"),i=ne(n),r=P(),s=G("p"),a=ne(o),u=P(),l=G("div"),Y(c.$$.fragment),f=P(),m.c(),_=P(),Y(b.$$.fragment),D(e,"class","subject svelte-nfaksv"),D(s,"class","preview svelte-nfaksv"),D(l,"class","additional svelte-nfaksv")},m(L,I){F(L,e,I),R(e,i),F(L,r,I),F(L,s,I),R(s,a),F(L,u,I),F(L,l,I),W(c,l,null),R(l,f),A[g].m(l,null),R(l,_),W(b,l,null),O=!0},p(L,I){(!O||I&1)&&n!==(n=L[0].subject+"")&&re(i,n),(!O||I&1)&&o!==(o=L[0].preview+"")&&re(a,o);const N={};I&1&&(N.status=L[0].status),c.$set(N);let Q=g;g=p(L,I),g===Q?A[g].p(L,I):(le(),S(A[Q],1,1,()=>{A[Q]=null}),ue(),m=A[g],m?m.p(L,I):(m=A[g]=C[g](L),m.c()),w(m,1),m.m(l,_));const V={};I&1&&(V.tags=L[0].tags),b.$set(V)},i(L){O||(w(c.$$.fragment,L),w(m),w(b.$$.fragment,L),O=!0)},o(L){S(c.$$.fragment,L),S(m),S(b.$$.fragment,L),O=!1},d(L){L&&M(e),L&&M(r),L&&M(s),L&&M(u),L&&M(l),U(c),A[g].d(),U(b)}}}function xr(t){let e,n;return e=new Nt({props:{className:t[1],$$slots:{default:[qr]},$$scope:{ctx:t}}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,[r]){const s={};r&2&&(s.className=i[1]),r&5&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function jr(t,e,n){let{row:i}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&n(0,i=s.row),"className"in s&&n(1,r=s.className)},[i,r]}class es extends te{constructor(e){super(),j(this,e,jr,xr,x,{row:0,className:1})}}var bn={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(mn,function(){var n=1e3,i=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",f="month",d="quarter",g="year",m="date",_="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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,C={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(z){var T=["th","st","nd","rd"],k=z%100;return"["+z+(T[(k-20)%10]||T[k]||T[0])+"]"}},A=function(z,T,k){var v=String(z);return!v||v.length>=T?z:""+Array(T+1-v.length).join(k)+z},p={s:A,z:function(z){var T=-z.utcOffset(),k=Math.abs(T),v=Math.floor(k/60),y=k%60;return(T<=0?"+":"-")+A(v,2,"0")+":"+A(y,2,"0")},m:function z(T,k){if(T.date()<k.date())return-z(k,T);var v=12*(k.year()-T.year())+(k.month()-T.month()),y=T.clone().add(v,f),K=k-y<0,B=T.clone().add(v+(K?-1:1),f);return+(-(v+(k-y)/(K?y-B:B-y))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:f,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:d}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},L="en",I={};I[L]=C;var N=function(z){return z instanceof ge},Q=function z(T,k,v){var y;if(!T)return L;if(typeof T=="string"){var K=T.toLowerCase();I[K]&&(y=K),k&&(I[K]=k,y=K);var B=T.split("-");if(!y&&B.length>1)return z(B[0])}else{var Z=T.name;I[Z]=T,y=Z}return!v&&y&&(L=y),y||!v&&L},V=function(z,T){if(N(z))return z.clone();var k=typeof T=="object"?T:{};return k.date=z,k.args=arguments,new ge(k)},J=p;J.l=Q,J.i=N,J.w=function(z,T){return V(z,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var ge=function(){function z(k){this.$L=Q(k.locale,null,!0),this.parse(k)}var T=z.prototype;return T.parse=function(k){this.$d=function(v){var y=v.date,K=v.utc;if(y===null)return new Date(NaN);if(J.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var B=y.match(b);if(B){var Z=B[2]-1||0,q=(B[7]||"0").substring(0,3);return K?new Date(Date.UTC(B[1],Z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,q)):new Date(B[1],Z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,q)}}return new Date(y)}(k),this.$x=k.x||{},this.init()},T.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},T.$utils=function(){return J},T.isValid=function(){return this.$d.toString()!==_},T.isSame=function(k,v){var y=V(k);return this.startOf(v)<=y&&y<=this.endOf(v)},T.isAfter=function(k,v){return V(k)<this.startOf(v)},T.isBefore=function(k,v){return this.endOf(v)<V(k)},T.$g=function(k,v,y){return J.u(k)?this[v]:this.set(y,k)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(k,v){var y=this,K=!!J.u(v)||v,B=J.p(k),Z=function(Se,ae){var ye=J.w(y.$u?Date.UTC(y.$y,ae,Se):new Date(y.$y,ae,Se),y);return K?ye:ye.endOf(l)},q=function(Se,ae){return J.w(y.toDate()[Se].apply(y.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(ae)),y)},ee=this.$W,$=this.$M,se=this.$D,fe="set"+(this.$u?"UTC":"");switch(B){case g:return K?Z(1,0):Z(31,11);case f:return K?Z(1,$):Z(0,$+1);case c:var Ke=this.$locale().weekStart||0,Be=(ee<Ke?ee+7:ee)-Ke;return Z(K?se-Be:se+(6-Be),$);case l:case m:return q(fe+"Hours",0);case u:return q(fe+"Minutes",1);case a:return q(fe+"Seconds",2);case o:return q(fe+"Milliseconds",3);default:return this.clone()}},T.endOf=function(k){return this.startOf(k,!1)},T.$set=function(k,v){var y,K=J.p(k),B="set"+(this.$u?"UTC":""),Z=(y={},y[l]=B+"Date",y[m]=B+"Date",y[f]=B+"Month",y[g]=B+"FullYear",y[u]=B+"Hours",y[a]=B+"Minutes",y[o]=B+"Seconds",y[s]=B+"Milliseconds",y)[K],q=K===l?this.$D+(v-this.$W):v;if(K===f||K===g){var ee=this.clone().set(m,1);ee.$d[Z](q),ee.init(),this.$d=ee.set(m,Math.min(this.$D,ee.daysInMonth())).$d}else Z&&this.$d[Z](q);return this.init(),this},T.set=function(k,v){return this.clone().$set(k,v)},T.get=function(k){return this[J.p(k)]()},T.add=function(k,v){var y,K=this;k=Number(k);var B=J.p(v),Z=function($){var se=V(K);return J.w(se.date(se.date()+Math.round($*k)),K)};if(B===f)return this.set(f,this.$M+k);if(B===g)return this.set(g,this.$y+k);if(B===l)return Z(1);if(B===c)return Z(7);var q=(y={},y[a]=i,y[u]=r,y[o]=n,y)[B]||1,ee=this.$d.getTime()+k*q;return J.w(ee,this)},T.subtract=function(k,v){return this.add(-1*k,v)},T.format=function(k){var v=this,y=this.$locale();if(!this.isValid())return y.invalidDate||_;var K=k||"YYYY-MM-DDTHH:mm:ssZ",B=J.z(this),Z=this.$H,q=this.$m,ee=this.$M,$=y.weekdays,se=y.months,fe=function(ae,ye,lt,Xe){return ae&&(ae[ye]||ae(v,K))||lt[ye].slice(0,Xe)},Ke=function(ae){return J.s(Z%12||12,ae,"0")},Be=y.meridiem||function(ae,ye,lt){var Xe=ae<12?"AM":"PM";return lt?Xe.toLowerCase():Xe},Se={YY:String(this.$y).slice(-2),YYYY:J.s(this.$y,4,"0"),M:ee+1,MM:J.s(ee+1,2,"0"),MMM:fe(y.monthsShort,ee,se,3),MMMM:fe(se,ee),D:this.$D,DD:J.s(this.$D,2,"0"),d:String(this.$W),dd:fe(y.weekdaysMin,this.$W,$,2),ddd:fe(y.weekdaysShort,this.$W,$,3),dddd:$[this.$W],H:String(Z),HH:J.s(Z,2,"0"),h:Ke(1),hh:Ke(2),a:Be(Z,q,!0),A:Be(Z,q,!1),m:String(q),mm:J.s(q,2,"0"),s:String(this.$s),ss:J.s(this.$s,2,"0"),SSS:J.s(this.$ms,3,"0"),Z:B};return K.replace(O,function(ae,ye){return ye||Se[ae]||B.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(k,v,y){var K,B=J.p(v),Z=V(k),q=(Z.utcOffset()-this.utcOffset())*i,ee=this-Z,$=J.m(this,Z);return $=(K={},K[g]=$/12,K[f]=$,K[d]=$/3,K[c]=(ee-q)/6048e5,K[l]=(ee-q)/864e5,K[u]=ee/r,K[a]=ee/i,K[o]=ee/n,K)[B]||ee,y?$:J.a($)},T.daysInMonth=function(){return this.endOf(f).$D},T.$locale=function(){return I[this.$L]},T.locale=function(k,v){if(!k)return this.$L;var y=this.clone(),K=Q(k,v,!0);return K&&(y.$L=K),y},T.clone=function(){return J.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()},z}(),ce=ge.prototype;return V.prototype=ce,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",f],["$y",g],["$D",m]].forEach(function(z){ce[z[1]]=function(T){return this.$g(T,z[0],z[1])}}),V.extend=function(z,T){return z.$i||(z(T,ge,V),z.$i=!0),V},V.locale=Q,V.isDayjs=N,V.unix=function(z){return V(1e3*z)},V.en=I[L],V.Ls=I,V.p={},V})})(bn);var ts=bn.exports;const Je=At(ts);var wn={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(mn,function(){return function(n,i,r){n=n||{};var s=i.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,f,d){return s.fromToBase(l,c,f,d)}r.en.relativeTime=o,s.fromToBase=function(l,c,f,d,g){for(var m,_,b,O=f.$locale().relativeTime||o,C=n.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"}],A=C.length,p=0;p<A;p+=1){var L=C[p];L.d&&(m=d?r(l).diff(f,L.d,!0):f.diff(l,L.d,!0));var I=(n.rounding||Math.round)(Math.abs(m));if(b=m>0,I<=L.r||!L.r){I<=1&&p>0&&(L=C[p-1]);var N=O[L.l];g&&(I=g(""+I)),_=typeof N=="string"?N.replace("%d",I):N(I,c,L.l,b);break}}if(c)return _;var Q=b?O.future:O.past;return typeof Q=="function"?Q(_):Q.replace("%s",_)},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)}}})})(wn);var ns=wn.exports;const is=At(ns);Je.extend(is);function rs(t){let e,n,i=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<i.length;s+=1)r=We(r,i[s]);return{c(){e=G("time"),n=ne(t[0]),Ft(e,r)},m(s,o){F(s,e,o),R(e,n)},p(s,[o]){o&1&&Fn(n,s[0],r.contenteditable),Ft(e,r=an(i,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:H,o:H,d(s){s&&M(e)}}}function ss(t,e,n){let i;const r=["timestamp","format","relative","live","formatted"];let s=Ot(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,f;const d=60*1e3;return on(()=>(u&&l!==!1&&(f=setInterval(()=>{n(0,c=Je(o).from())},Math.abs(typeof l=="number"?l:d))),()=>{typeof f=="number"&&clearInterval(f)})),t.$$set=g=>{e=We(We({},e),Ln(g)),n(3,s=Ot(e,r)),"timestamp"in g&&n(1,o=g.timestamp),"format"in g&&n(4,a=g.format),"relative"in g&&n(5,u=g.relative),"live"in g&&n(6,l=g.live),"formatted"in g&&n(0,c=g.formatted)},t.$$.update=()=>{t.$$.dirty&50&&n(0,c=u?Je(o).from():Je(o).format(a)),t.$$.dirty&50&&n(2,i=u?Je(o).format(a):void 0)},[c,o,i,s,a,u,l]}class os extends te{constructor(e){super(),j(this,e,ss,rs,x,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function as(t){let e;return{c(){e=G("span"),e.textContent="Invalid data",D(e,"class","invalid svelte-1o3wy2t")},m(n,i){F(n,e,i)},p:H,i:H,o:H,d(n){n&&M(e)}}}function ls(t){let e,n;return e=new os({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.style=i[2]),r&1&&(s.timestamp=i[0]),r&2&&(s.format=i[1]),r&8&&(s.relative=i[3]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function us(t){let e,n,i,r,s;const o=[ls,as],a=[];function u(l,c){return c&1&&(n=null),n==null&&(n=l[0]instanceof Date&&!isNaN(l[0].getTime())),n?0:1}return i=u(t,-1),r=a[i]=o[i](t),{c(){e=G("div"),r.c(),D(e,"class","Date svelte-1o3wy2t")},m(l,c){F(l,e,c),a[i].m(e,null),s=!0},p(l,[c]){let f=i;i=u(l,c),i===f?a[i].p(l,c):(le(),S(a[f],1,1,()=>{a[f]=null}),ue(),r=a[i],r?r.p(l,c):(r=a[i]=o[i](l),r.c()),w(r,1),r.m(e,null))},i(l){s||(w(r),s=!0)},o(l){S(r),s=!1},d(l){l&&M(e),a[i].d()}}}function cs(t,e,n){let{data:i}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&n(0,i=a.data),"format"in a&&n(1,r=a.format),"style"in a&&n(2,s=a.style),"relative"in a&&n(3,o=a.relative)},[i,r,s,o]}class kn extends te{constructor(e){super(),j(this,e,cs,us,x,{data:0,format:1,style:2,relative:3})}}function fs(t){let e,n;return e=new kn({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.data=i[1]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function ds(t){let e,n;return e=new vn({props:{iconVariable:t[3],tagText:t[0],className:t[2],$$slots:{default:[fs]},$$scope:{ctx:t}}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,[r]){const s={};r&8&&(s.iconVariable=i[3]),r&1&&(s.tagText=i[0]),r&4&&(s.className=i[2]),r&34&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function gs(t,e,n){let i,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(n(2,o="SLATag Pending"),"la-sla"):(n(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&n(0,r=u.tagText),"due"in u&&n(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&n(3,i=a(s))},[r,s,o,i]}class hs extends te{constructor(e){super(),j(this,e,gs,ds,x,{tagText:0,due:1})}}function ms(t){let e,n;return e=new ot({props:{text:"No SLA",className:"SLA"}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function _s(t){let e,n;return e=new hs({props:{tagText:"First answer",due:t[1].datedue}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.due=i[1].datedue),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function ps(t){let e,n=t[1].code+"",i,r,s,o,a,u,l=t[1].messagegroupsIn+"",c,f,d,g,m,_,b=t[1].messagegroupsOut+"",O,C,A,p,L,I,N,Q,V,J,ge,ce;o=new Me({props:{iconVariable:"la-incoming"}}),g=new Me({props:{iconVariable:"la-outgoing"}}),I=new kn({props:{data:t[1].datecreated,format:t[2]}});const z=[_s,ms],T=[];function k(v,y){return y&2&&(Q=null),Q==null&&(Q=v[1].datedue instanceof Date&&!isNaN(v[1].datedue)),Q?0:1}return V=k(t,-1),J=T[V]=z[V](t),{c(){e=G("span"),i=ne(n),r=P(),s=G("div"),Y(o.$$.fragment),a=P(),u=G("span"),c=ne(l),f=P(),d=G("div"),Y(g.$$.fragment),m=P(),_=G("span"),O=ne(b),C=P(),A=G("div"),p=G("span"),p.textContent=`${t[3]}:`,L=P(),Y(I.$$.fragment),N=P(),J.c(),ge=nt(),D(e,"class","TicketId svelte-rl80em"),D(s,"class","Communication incomingMessages svelte-rl80em"),D(d,"class","Communication outgoingMessages svelte-rl80em"),D(A,"class","Created svelte-rl80em")},m(v,y){F(v,e,y),R(e,i),F(v,r,y),F(v,s,y),W(o,s,null),R(s,a),R(s,u),R(u,c),F(v,f,y),F(v,d,y),W(g,d,null),R(d,m),R(d,_),R(_,O),F(v,C,y),F(v,A,y),R(A,p),R(A,L),W(I,A,null),F(v,N,y),T[V].m(v,y),F(v,ge,y),ce=!0},p(v,y){(!ce||y&2)&&n!==(n=v[1].code+"")&&re(i,n),(!ce||y&2)&&l!==(l=v[1].messagegroupsIn+"")&&re(c,l),(!ce||y&2)&&b!==(b=v[1].messagegroupsOut+"")&&re(O,b);const K={};y&2&&(K.data=v[1].datecreated),y&4&&(K.format=v[2]),I.$set(K);let B=V;V=k(v,y),V===B?T[V].p(v,y):(le(),S(T[B],1,1,()=>{T[B]=null}),ue(),J=T[V],J?J.p(v,y):(J=T[V]=z[V](v),J.c()),w(J,1),J.m(ge.parentNode,ge))},i(v){ce||(w(o.$$.fragment,v),w(g.$$.fragment,v),w(I.$$.fragment,v),w(J),ce=!0)},o(v){S(o.$$.fragment,v),S(g.$$.fragment,v),S(I.$$.fragment,v),S(J),ce=!1},d(v){v&&M(e),v&&M(r),v&&M(s),U(o),v&&M(f),v&&M(d),U(g),v&&M(C),v&&M(A),U(I),v&&M(N),T[V].d(v),v&&M(ge)}}}function ys(t){let e,n;return e=new Nt({props:{className:t[0],$$slots:{default:[ps]},$$scope:{ctx:t}}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.className=i[0]),r&38&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function vs(t,e,n){let i;ie(t,Ze,u=>n(4,i=u));let{className:r="importanceColumn"}=e,{row:s}=e,{format:o="YYYY-MM-DD HH:mm:ss"}=e;const a=i("Created");return t.$$set=u=>{"className"in u&&n(0,r=u.className),"row"in u&&n(1,s=u.row),"format"in u&&n(2,o=u.format)},[r,s,o,a]}class bs extends te{constructor(e){super(),j(this,e,vs,ys,x,{className:0,row:1,format:2})}}const ws={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M19.5 12.473c0-1.948-.618-3.397-2.066-4.844-.391-.39-1.023-.39-1.414 0-.391.391-.391 1.024 0 1.415 1.079 1.078 1.48 2.007 1.48 3.429 0 1.469-.572 2.85-1.611 3.888-1.004 1.003-2.078 1.502-3.428 1.593l1.246-1.247c.391-.391.391-1.023 0-1.414s-1.023-.391-1.414 0l-3.707 3.707 3.707 3.707c.195.195.451.293.707.293s.512-.098.707-.293c.391-.391.391-1.023 0-1.414l-1.337-1.336c1.923-.082 3.542-.792 4.933-2.181 1.417-1.416 2.197-3.299 2.197-5.303zM6.5 12.5c0-1.469.572-2.85 1.611-3.889 1.009-1.009 2.092-1.508 3.457-1.594l-1.275 1.275c-.391.391-.391 1.023 0 1.414.195.196.451.294.707.294s.512-.098.707-.293l3.707-3.707-3.707-3.707c-.391-.391-1.023-.391-1.414 0s-.391 1.023 0 1.414l1.311 1.311c-1.914.086-3.525.796-4.907 2.179-1.417 1.416-2.197 3.299-2.197 5.303 0 1.948.618 3.397 2.066 4.844.195.195.451.292.707.292s.512-.098.707-.293c.391-.391.391-1.024 0-1.415-1.079-1.077-1.48-2.006-1.48-3.428z"></path>'};function ks(t){let e,n,i,r,s;const o=t[4].default,a=Ge(o,t,t[3],null);return{c(){e=G("button"),a&&a.c(),D(e,"class",n=ke(t[0])+" svelte-10fvxzv")},m(u,l){F(u,e,l),a&&a.m(e,null),i=!0,r||(s=de(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!i||l&8)&&$e(a,o,u,u[3],i?Ee(o,u[3],l,null):ze(u[3]),null),(!i||l&1&&n!==(n=ke(u[0])+" svelte-10fvxzv"))&&D(e,"class",n)},i(u){i||(w(a,u),i=!0)},o(u){S(a,u),i=!1},d(u){u&&M(e),a&&a.d(u),r=!1,s()}}}function Ts(t,e,n){let{$$slots:i={},$$scope:r}=e,{onAction:s=()=>{}}=e,{className:o=""}=e;function a(){s()}return t.$$set=u=>{"onAction"in u&&n(2,s=u.onAction),"className"in u&&n(0,o=u.className),"$$scope"in u&&n(3,r=u.$$scope)},[o,a,s,r,i]}class jt extends te{constructor(e){super(),j(this,e,Ts,ks,x,{onAction:2,className:0})}}function Cs(t){let e,n,i=t[0]("Change filter")+"",r,s;return e=new Me({props:{className:"FilterIcon",iconVariable:"la-tune"}}),{c(){Y(e.$$.fragment),n=P(),r=ne(i)},m(o,a){W(e,o,a),F(o,n,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&i!==(i=o[0]("Change filter")+"")&&re(r,i)},i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){S(e.$$.fragment,o),s=!1},d(o){U(e,o),o&&M(n),o&&M(r)}}}function Ls(t){let e,n,i=t[0]("Configure chat button")+"",r,s;return e=new Me({props:{className:"ConfigureIcon",iconVariable:"la-configuration"}}),{c(){Y(e.$$.fragment),n=P(),r=ne(i)},m(o,a){W(e,o,a),F(o,n,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&i!==(i=o[0]("Configure chat button")+"")&&re(r,i)},i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){S(e.$$.fragment,o),s=!1},d(o){U(e,o),o&&M(n),o&&M(r)}}}function Ss(t){let e,n,i,r,s,o=t[0]("No tickets found")+"",a,u,l,c=t[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",f,d,g,m,_,b,O;return m=new jt({props:{className:"Filter",$$slots:{default:[Cs]},$$scope:{ctx:t}}}),b=new jt({props:{className:"Configure",$$slots:{default:[Ls]},$$scope:{ctx:t}}}),{c(){e=G("div"),n=G("img"),r=P(),s=G("h1"),a=ne(o),u=P(),l=G("p"),f=ne(c),d=P(),g=G("div"),Y(m.$$.fragment),_=P(),Y(b.$$.fragment),D(n,"alt","No results placeholder"),gt(n.src,i="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||D(n,"src",i),D(n,"class","svelte-19qi61t"),D(s,"class","svelte-19qi61t"),D(l,"class","svelte-19qi61t"),D(g,"class","Buttons"),D(e,"class","NoTickets svelte-19qi61t")},m(C,A){F(C,e,A),R(e,n),R(e,r),R(e,s),R(s,a),R(e,u),R(e,l),R(l,f),R(e,d),R(e,g),W(m,g,null),R(g,_),W(b,g,null),O=!0},p(C,[A]){(!O||A&1)&&o!==(o=C[0]("No tickets found")+"")&&re(a,o),(!O||A&1)&&c!==(c=C[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&re(f,c);const p={};A&3&&(p.$$scope={dirty:A,ctx:C}),m.$set(p);const L={};A&3&&(L.$$scope={dirty:A,ctx:C}),b.$set(L)},i(C){O||(w(m.$$.fragment,C),w(b.$$.fragment,C),O=!0)},o(C){S(m.$$.fragment,C),S(b.$$.fragment,C),O=!1},d(C){C&&M(e),U(m),U(b)}}}function Ds(t,e,n){let i;return ie(t,Ze,r=>n(0,i=r)),[i]}class As extends te{constructor(e){super(),j(this,e,Ds,Ss,x,{})}}function Ns(t){let e,n;return e=new Si({props:{columns:t[4],data:t[9],loadMore:t[15],middleclickhandler:t[1],selectedAll:t[8]}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r[0]&16&&(s.columns=i[4]),r[0]&2&&(s.middleclickhandler=i[1]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Rs(t){let e,n;return e=new As({}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function Os(t){let e,n,i,r,s,o,a,u,l,c,f,d,g,m;const _=t[21].default,b=Ge(_,t,t[20],null);r=new ur({props:{cursor:t[14],data:t[9],filter:t[0]}}),a=new it({props:{size:"20px",src:ws}});const O=[Rs,Ns],C=[];function A(p,L){return!p[6]&&!p[5]?0:1}return c=A(t),f=C[c]=O[c](t),{c(){e=G("main"),n=G("div"),b&&b.c(),i=P(),Y(r.$$.fragment),s=P(),o=G("button"),Y(a.$$.fragment),l=P(),f.c(),D(o,"title",u=t[3]("Reload")),D(o,"class","svelte-150fgq2"),be(o,"loading",t[5]),D(n,"class","tools svelte-150fgq2"),D(e,"class","svelte-150fgq2")},m(p,L){F(p,e,L),R(e,n),b&&b.m(n,null),R(n,i),W(r,n,null),R(n,s),R(n,o),W(a,o,null),R(e,l),C[c].m(e,null),d=!0,g||(m=de(o,"click",t[22]),g=!0)},p(p,L){b&&b.p&&(!d||L[0]&1048576)&&$e(b,_,p,p[20],d?Ee(_,p[20],L,null):ze(p[20]),null);const I={};L[0]&1&&(I.filter=p[0]),r.$set(I),(!d||L[0]&8&&u!==(u=p[3]("Reload")))&&D(o,"title",u),(!d||L[0]&32)&&be(o,"loading",p[5]);let N=c;c=A(p),c===N?C[c].p(p,L):(le(),S(C[N],1,1,()=>{C[N]=null}),ue(),f=C[c],f?f.p(p,L):(f=C[c]=O[c](p),f.c()),w(f,1),f.m(e,null))},i(p){d||(w(b,p),w(r.$$.fragment,p),w(a.$$.fragment,p),w(f),d=!0)},o(p){S(b,p),S(r.$$.fragment,p),S(a.$$.fragment,p),S(f),d=!1},d(p){p&&M(e),b&&b.d(p),U(r),U(a),C[c].d(),g=!1,m()}}}function Fs(t,e,n){let i,r,s,o,a,u,l=H,c=()=>(l(),l=me(I,$=>n(28,u=$)),I),f,d,g,m;ie(t,Ze,$=>n(3,g=$)),t.$$.on_destroy.push(()=>l());let{$$slots:_={},$$scope:b}=e,O,{apikey:C}=e,{filters:A}=e,{middleclickhandler:p}=e,{selectionHandler:L}=e;const I=kt("");c();let N=oe({});ie(t,N,$=>n(19,d=$));let Q=oe(!1);ie(t,Q,$=>n(18,f=$));let V=new or(C);V.load(),ve("tagsMap",V.tags);let J=oe(null);ve("error",J);const ge=new Dt({apiKey:C,basePath:u}),ce=new hn(ge);ve("api",ce);const z=oe([]);ie(t,z,$=>n(25,s=$));const T=oe(!1);ie(t,T,$=>n(6,m=$)),ve("data",z);const k=oe(sr.Rorder);ie(t,k,$=>n(26,o=$));const v=oe(!0);ie(t,v,$=>n(27,a=$));const y=oe(!1);ie(t,y,$=>n(5,i=$)),ve("loading",y);const K=oe(null);ie(t,K,$=>n(24,r=$)),ve("cursor",K);let B=!1,Z=()=>({perPage:20,sortDir:a?Qt.Asc:Qt.Desc,filters:A,sortField:o,cursor:r||""}),q=async($=!1)=>{if(!i&&!(!r&&B&&!$)){Te(y,i=!0,i),$===!0&&(Te(K,r=null,r),B=!1);try{const fe=await(await ce.getTicketsGridDatasetRaw(Z())).value();$===!0&&Te(z,s=[],s),Te(z,s=s.concat(fe.rows),s),fe.rows.length>0&&T.set(!0),Te(K,r=fe.cursor,r),B=!0}catch(se){J.set(se.toString())}Te(y,i=!1,i)}};v.subscribe(async()=>{await q(!0)}),k.subscribe(async()=>{await q(!0)}),ve("direction",v),ve("sort",k),z.subscribe($=>{N.set($.filter(se=>se.__selected??!1).map(se=>se.conversationid))});const ee=()=>q(!0);return t.$$set=$=>{"apikey"in $&&n(16,C=$.apikey),"filters"in $&&n(0,A=$.filters),"middleclickhandler"in $&&n(1,p=$.middleclickhandler),"selectionHandler"in $&&n(17,L=$.selectionHandler),"$$scope"in $&&n(20,b=$.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8&&n(4,O=oe([new ft(g("User"),Er,!1),new ft(g("Status"),es,!1),new ft(g("Importance"),bs,!0)])),t.$$.dirty[0]&917504&&L(d,f),t.$$.dirty[0]&1&&A&&q(!0)},[A,p,I,g,O,i,m,N,Q,z,T,k,v,y,K,q,C,L,f,d,b,_,ee]}class Ms extends te{constructor(e){super(),j(this,e,Fs,Os,x,{apikey:16,filters:0,middleclickhandler:1,selectionHandler:17,basePath:2},null,[-1,-1])}get basePath(){return this.$$.ctx[2]}}const Gs="modulepreload",Es=function(t){return"/"+t},en={},tn=function(e,n,i){if(!n||n.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=Es(s),s in en)return;en[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!i)for(let c=r.length-1;c>=0;c--){const f=r[c];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Gs,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())};function $s(){Wt("en",()=>tn(()=>import("./en.js"),[])),Wt("sk",()=>tn(()=>import("./sk.js"),[]))}function nn(t){let e,n;return e=new Ms({props:{apikey:t[0],filters:t[1],middleclickhandler:t[2],selectionHandler:t[5],$$slots:{default:[zs]},$$scope:{ctx:t}}}),{c(){Y(e.$$.fragment)},m(i,r){W(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.apikey=i[0]),r&2&&(s.filters=i[1]),r&4&&(s.middleclickhandler=i[2]),r&1024&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){U(e,i)}}}function zs(t){let e;return{c(){e=G("slot")},m(n,i){F(n,e,i)},p:H,d(n){n&&M(e)}}}function Is(t){let e,n,i,r,s=t[0]&&nn(t);return{c(){s&&s.c(),e=P(),n=G("link"),this.c=H,D(n,"rel","stylesheet"),D(n,"href",i=t[4]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),F(o,e,a),F(o,n,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&w(s,1)):(s=nn(o),s.c(),w(s,1),s.m(e.parentNode,e)):s&&(le(),S(s,1,1,()=>{s=null}),ue()),(!r||a&16&&i!==(i=o[4]+"/themes/agent/_common_templates/icons_mapping.css"))&&D(n,"href",i)},i(o){r||(w(s),r=!0)},o(o){S(s),r=!1},d(o){s&&s.d(o),o&&M(e),o&&M(n)}}}function Ks(t,e,n){let i,r=H,s=()=>(r(),r=me(g,_=>n(4,i=_)),g);t.$$.on_destroy.push(()=>r()),$s();let{lang:o="sk"}=e,{apikey:a}=e,{filters:u='[["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:l}=e,{selectionhandler:c}=e,{selectionMap:f={}}=e,{selectedAll:d=!1}=e;const g=kt("");s(),mi({initialLocale:o,fallbackLocale:"en"}),vi();function m(_,b){n(6,f=_),n(7,d=b),c&&c(_,b)}return t.$$set=_=>{"lang"in _&&n(8,o=_.lang),"apikey"in _&&n(0,a=_.apikey),"filters"in _&&n(1,u=_.filters),"middleclickhandler"in _&&n(2,l=_.middleclickhandler),"selectionhandler"in _&&n(9,c=_.selectionhandler),"selectionMap"in _&&n(6,f=_.selectionMap),"selectedAll"in _&&n(7,d=_.selectedAll)},[a,u,l,g,i,m,f,d,o,c]}class Bs extends ln{constructor(e){super(),j(this,{target:this.shadowRoot,props:Mn(this.attributes),customElement:!0},Ks,Is,x,{lang:8,apikey:0,filters:1,middleclickhandler:2,selectionhandler:9,selectionMap:6,selectedAll:7,basePath:3},null),e&&(e.target&&F(e.target,this,e.anchor),e.props&&(this.$set(e.props),pe()))}static get observedAttributes(){return["lang","apikey","filters","middleclickhandler","selectionhandler","selectionMap","selectedAll","basePath"]}get lang(){return this.$$.ctx[8]}set lang(e){this.$$set({lang:e}),pe()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),pe()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),pe()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),pe()}get selectionhandler(){return this.$$.ctx[9]}set selectionhandler(e){this.$$set({selectionhandler:e}),pe()}get selectionMap(){return this.$$.ctx[6]}set selectionMap(e){this.$$set({selectionMap:e}),pe()}get selectedAll(){return this.$$.ctx[7]}set selectedAll(e){this.$$set({selectedAll:e}),pe()}get basePath(){return this.$$.ctx[3]}}customElements.define("tickets-table",Bs);
|
|
10
|
+
*/var Dr=function(t){return t!=null&&(yn(t)||Nr(t)||!!t._isBuffer)};function yn(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Nr(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&yn(t.slice(0,0))}(function(){var t=Sr,e=Qt.utf8,i=Dr,n=Qt.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,f=-1732584194,d=271733878,g=0;g<a.length;g++)a[g]=(a[g]<<8|a[g]>>>24)&16711935|(a[g]<<24|a[g]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,p=r._gg,b=r._hh,z=r._ii,g=0;g<a.length;g+=16){var C=l,N=c,_=f,S=d;l=m(l,c,f,d,a[g+0],7,-680876936),d=m(d,l,c,f,a[g+1],12,-389564586),f=m(f,d,l,c,a[g+2],17,606105819),c=m(c,f,d,l,a[g+3],22,-1044525330),l=m(l,c,f,d,a[g+4],7,-176418897),d=m(d,l,c,f,a[g+5],12,1200080426),f=m(f,d,l,c,a[g+6],17,-1473231341),c=m(c,f,d,l,a[g+7],22,-45705983),l=m(l,c,f,d,a[g+8],7,1770035416),d=m(d,l,c,f,a[g+9],12,-1958414417),f=m(f,d,l,c,a[g+10],17,-42063),c=m(c,f,d,l,a[g+11],22,-1990404162),l=m(l,c,f,d,a[g+12],7,1804603682),d=m(d,l,c,f,a[g+13],12,-40341101),f=m(f,d,l,c,a[g+14],17,-1502002290),c=m(c,f,d,l,a[g+15],22,1236535329),l=p(l,c,f,d,a[g+1],5,-165796510),d=p(d,l,c,f,a[g+6],9,-1069501632),f=p(f,d,l,c,a[g+11],14,643717713),c=p(c,f,d,l,a[g+0],20,-373897302),l=p(l,c,f,d,a[g+5],5,-701558691),d=p(d,l,c,f,a[g+10],9,38016083),f=p(f,d,l,c,a[g+15],14,-660478335),c=p(c,f,d,l,a[g+4],20,-405537848),l=p(l,c,f,d,a[g+9],5,568446438),d=p(d,l,c,f,a[g+14],9,-1019803690),f=p(f,d,l,c,a[g+3],14,-187363961),c=p(c,f,d,l,a[g+8],20,1163531501),l=p(l,c,f,d,a[g+13],5,-1444681467),d=p(d,l,c,f,a[g+2],9,-51403784),f=p(f,d,l,c,a[g+7],14,1735328473),c=p(c,f,d,l,a[g+12],20,-1926607734),l=b(l,c,f,d,a[g+5],4,-378558),d=b(d,l,c,f,a[g+8],11,-2022574463),f=b(f,d,l,c,a[g+11],16,1839030562),c=b(c,f,d,l,a[g+14],23,-35309556),l=b(l,c,f,d,a[g+1],4,-1530992060),d=b(d,l,c,f,a[g+4],11,1272893353),f=b(f,d,l,c,a[g+7],16,-155497632),c=b(c,f,d,l,a[g+10],23,-1094730640),l=b(l,c,f,d,a[g+13],4,681279174),d=b(d,l,c,f,a[g+0],11,-358537222),f=b(f,d,l,c,a[g+3],16,-722521979),c=b(c,f,d,l,a[g+6],23,76029189),l=b(l,c,f,d,a[g+9],4,-640364487),d=b(d,l,c,f,a[g+12],11,-421815835),f=b(f,d,l,c,a[g+15],16,530742520),c=b(c,f,d,l,a[g+2],23,-995338651),l=z(l,c,f,d,a[g+0],6,-198630844),d=z(d,l,c,f,a[g+7],10,1126891415),f=z(f,d,l,c,a[g+14],15,-1416354905),c=z(c,f,d,l,a[g+5],21,-57434055),l=z(l,c,f,d,a[g+12],6,1700485571),d=z(d,l,c,f,a[g+3],10,-1894986606),f=z(f,d,l,c,a[g+10],15,-1051523),c=z(c,f,d,l,a[g+1],21,-2054922799),l=z(l,c,f,d,a[g+8],6,1873313359),d=z(d,l,c,f,a[g+15],10,-30611744),f=z(f,d,l,c,a[g+6],15,-1560198380),c=z(c,f,d,l,a[g+13],21,1309151649),l=z(l,c,f,d,a[g+4],6,-145523070),d=z(d,l,c,f,a[g+11],10,-1120210379),f=z(f,d,l,c,a[g+2],15,718787259),c=z(c,f,d,l,a[g+9],21,-343485551),l=l+C>>>0,c=c+N>>>0,f=f+_>>>0,d=d+S>>>0}return t.endian([l,c,f,d])};r._ff=function(s,o,a,u,l,c,f){var d=s+(o&a|~o&u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._gg=function(s,o,a,u,l,c,f){var d=s+(o&u|a&~u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._hh=function(s,o,a,u,l,c,f){var d=s+(o^a^u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._ii=function(s,o,a,u,l,c,f){var d=s+(a^(o|~u))+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._blocksize=16,r._digestsize=16,pn.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 Ar=pn.exports;const Rr=Nt(Ar);function Or(t){return[...t].reduce((e,i)=>Math.imul(31,e)+i.charCodeAt(0)|0,0)}function zr(t){ie(t,"svelte-i7rqh4",".Column.svelte-i7rqh4{padding-bottom:5px;padding-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function Fr(t){let e,i,n;const r=t[2].default,s=Ge(r,t,t[1],null);return{c(){e=F("div"),s&&s.c(),D(e,"class",i="Column "+t[0]+" svelte-i7rqh4")},m(o,a){M(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&$e(s,r,o,o[1],n?Ee(r,o[1],a,null):Ie(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-i7rqh4"))&&D(e,"class",i)},i(o){n||(k(s,o),n=!0)},o(o){L(s,o),n=!1},d(o){o&&G(e),s&&s.d(o)}}}function Mr(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 At extends ee{constructor(e){super(),j(this,e,Mr,Fr,X,{className:0},zr)}}function Gr(t){ie(t,"svelte-7jeavi",'.Tag.svelte-7jeavi{display:inline-block;color:var(--department-bg-color);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-7jeavi:before{font-family:"la-icon-font"}.SLA.svelte-7jeavi{border:1px solid #CFD6DD;border-radius:4px}')}function Er(t){let e,i,n,r,s,o;const a=t[4].default,u=Ge(a,t,t[3],null);return{c(){e=F("div"),u&&u.c(),i=Y(),n=F("span"),r=te(t[0]),D(n,"class","text"),D(e,"class",s="Tag "+t[1]+" svelte-7jeavi"),D(e,"style",t[2])},m(l,c){M(l,e,c),u&&u.m(e,null),O(e,i),O(e,n),O(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&$e(u,a,l,l[3],o?Ee(a,l[3],c,null):Ie(l[3]),null),(!o||c&1)&&re(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-7jeavi"))&&D(e,"class",s),(!o||c&4)&&D(e,"style",l[2])},i(l){o||(k(u,l),o=!0)},o(l){L(u,l),o=!1},d(l){l&&G(e),u&&u.d(l)}}}function $r(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return console.log("test halo"),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 at extends ee{constructor(e){super(),j(this,e,$r,Er,X,{text:0,className:1,style:2},Gr)}}function Ir(t){ie(t,"svelte-yh1nwn",".Icon.svelte-yh1nwn:before{font-family:'la-icon-font';display:inline-block;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function Kr(t){let e,i;return{c(){e=F("span"),D(e,"class",i=Te(`Icon ${t[0]} ${t[1]}`)+" svelte-yh1nwn")},m(n,r){M(n,e,r)},p(n,[r]){r&3&&i!==(i=Te(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&D(e,"class",i)},i:W,o:W,d(n){n&&G(e)}}}function Br(t,e,i){let{className:n=""}=e,{iconVariable:r}=e;return t.$$set=s=>{"className"in s&&i(0,n=s.className),"iconVariable"in s&&i(1,r=s.iconVariable)},[n,r]}class Me extends ee{constructor(e){super(),j(this,e,Br,Kr,X,{className:0,iconVariable:1},Ir)}}function Vr(t){ie(t,"svelte-xnu6kx","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Jr(t){let e,i;return e=new Me({props:{iconVariable:t[2]}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconVariable=n[2]),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function xr(t){let e,i;return e=new at({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Jr]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(n,r){H(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||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Hr(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconVariable: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),"iconVariable"in u&&i(2,o=u.iconVariable)},[n,s,o,a,r]}class lt extends ee{constructor(e){super(),j(this,e,Hr,xr,X,{text:0,className:4,style:1,iconVariable:2},Vr)}}function Ur(t){ie(t,"svelte-1vpgajt",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}.Tag.NoCompanyTag{background-color:white;color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-1vpgajt{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-1vpgajt{font-size:13px;line-height:20px;font-weight:bold}.email.svelte-1vpgajt{font-size:13px;line-height:20px}.texts.svelte-1vpgajt{display:flex;flex-direction:column;justify-content:center}")}function Wr(t){let e,i,n,r,s,o,a,u,l=t[0].emails+"",c,f,d,g;return i=new Lr({props:{bgColor:"rgb("+t[4]+","+t[5]+","+t[6]+")",name:t[2],src:t[3]}}),d=new lt({props:{text:t[7],className:t[7]==="Company"?"CompanyTag":"NoCompanyTag",iconVariable:"la-companies"}}),{c(){e=F("div"),U(i.$$.fragment),n=Y(),r=F("div"),s=F("div"),o=te(t[2]),a=Y(),u=F("div"),c=te(l),f=Y(),U(d.$$.fragment),D(e,"class","avatar svelte-1vpgajt"),D(s,"class","name svelte-1vpgajt"),D(u,"class","email svelte-1vpgajt"),D(r,"class","texts svelte-1vpgajt")},m(m,p){M(m,e,p),H(i,e,null),M(m,n,p),M(m,r,p),O(r,s),O(s,o),O(r,a),O(r,u),O(u,c),O(r,f),H(d,r,null),g=!0},p(m,p){const b={};p&16&&(b.bgColor="rgb("+m[4]+","+m[5]+","+m[6]+")"),p&4&&(b.name=m[2]),p&8&&(b.src=m[3]),i.$set(b),(!g||p&4)&&re(o,m[2]),(!g||p&1)&&l!==(l=m[0].emails+"")&&re(c,l)},i(m){g||(k(i.$$.fragment,m),k(d.$$.fragment,m),g=!0)},o(m){L(i.$$.fragment,m),L(d.$$.fragment,m),g=!1},d(m){m&&G(e),x(i),m&&G(n),m&&G(r),x(d)}}}function Yr(t){let e,i;return e=new At({props:{className:t[1],$$slots:{default:[Wr]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&541&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function qr(t,e,i){let{row:n}=e,{className:r="userColumn"}=e,s=n.firstname+" "+n.lastname;s.trim()||(s=n.systemName);let o=n.avatarUrl;o||(o="https://www.gravatar.com/avatar/"+Rr(n.emails[0]??"")+"?s=200&d=404");let a=Or(s+n.emails),u=(a&16711680)>>16,l=(a&65280)>>8,c=a&255;u+l+c<150&&(u=150),u+l+c>400&&(u=0);let f=n.company==="Y"?"Company":"No Company";return t.$$set=d=>{"row"in d&&i(0,n=d.row),"className"in d&&i(1,r=d.className)},[n,r,s,o,u,l,c,f]}class Pr extends ee{constructor(e){super(),j(this,e,qr,Yr,X,{row:0,className:1},Ur)}}function Qr(t){ie(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function Zr(t){let e,i;return e=new at({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){U(e.$$.fragment)},m(n,r){H(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||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Xr(t,e,i){let n,r,s,o,{tagId:a}=e,u=ke("tagsMap");return ne(t,u,l=>i(5,o=l)),t.$$set=l=>{"tagId"in l&&i(4,a=l.tagId)},t.$$.update=()=>{var l,c,f;t.$$.dirty&48&&i(2,n=((l=o[a])==null?void 0:l.color)??0),t.$$.dirty&48&&i(1,r=((c=o[a])==null?void 0:c.backgroundcolor)??0),t.$$.dirty&48&&i(0,s=((f=o[a])==null?void 0:f.name)??"")},[s,r,n,u,a,o]}class jr extends ee{constructor(e){super(),j(this,e,Xr,Zr,X,{tagId:4},Qr)}}function Zt(t,e,i){const n=t.slice();return n[1]=e[i],n}function Xt(t){let e,i;return e=new jr({props:{tagId:t[1]}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function es(t){let e,i,n=t[0],r=[];for(let o=0;o<n.length;o+=1)r[o]=Xt(Zt(t,n,o));const s=o=>L(r[o],1,1,()=>{r[o]=null});return{c(){e=F("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){M(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=o[0];let u;for(u=0;u<n.length;u+=1){const l=Zt(o,n,u);r[u]?(r[u].p(l,a),k(r[u],1)):(r[u]=Xt(l),r[u].c(),k(r[u],1),r[u].m(e,null))}for(ce(),u=n.length;u<r.length;u+=1)s(u);fe()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)k(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)L(r[a]);i=!1},d(o){o&&G(e),wt(r,o)}}}function ts(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class ns extends ee{constructor(e){super(),j(this,e,ts,es,X,{tags:0})}}function is(t){let e,i;return e=new lt({props:{className:t[2][t[0]].text,style:t[1],text:t[2][t[0]].text,iconVariable:t[2][t[0]].icon}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[2][n[0]].text),r&2&&(s.style=n[1]),r&1&&(s.text=n[2][n[0]].text),r&1&&(s.iconVariable=n[2][n[0]].icon),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function rs(t,e,i){let n;ne(t,Qe,a=>i(3,n=a));let{status:r}=e;const s={A:{text:n("Answered"),icon:"la-ticket-answered"},T:{text:n("Chatting"),icon:"la-chatting"},P:{text:n("Calling"),icon:"la-call"},X:{text:n("Deleted"),icon:"la-ticket-deleted"},B:{text:n("Spam"),icon:"la-spam"},I:{text:n("Init"),icon:""},R:{text:n("Resolved"),icon:"la-ticket-resolved"},N:{text:n("New"),icon:"la-ticket-new"},C:{text:n("Open"),icon:"la-ticket-open"},W:{text:n("Postponed"),icon:"la-ticket-postponed"}};let{style:o=`background-color: ${s[r]?_t(r):"defaultColor"}; color: white;`}=e;return t.$$set=a=>{"status"in a&&i(0,r=a.status),"style"in a&&i(1,o=a.style)},[r,o,s]}class ss extends ee{constructor(e){super(),j(this,e,rs,is,X,{status:0,style:1})}}function os(t){ie(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 as(t){let e,i,n,r;i=new Me({props:{iconVariable:t[2]}});const s=t[8].default,o=Ge(s,t,t[7],null);return{c(){e=F("div"),U(i.$$.fragment),n=Y(),o&&o.c(),D(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){M(a,e,u),H(i,e,null),M(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconVariable=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&$e(o,s,a,a[7],r?Ee(s,a[7],u,null):Ie(a[7]),null)},i(a){r||(k(i.$$.fragment,a),k(o,a),r=!0)},o(a){L(i.$$.fragment,a),L(o,a),r=!1},d(a){a&&G(e),x(i),a&&G(n),o&&o.d(a)}}}function ls(t){let e,i;return e=new lt({props:{style:t[3],text:t[0],iconVariable:t[2],className:"Combined"}}),{c(){U(e.$$.fragment)},m(n,r){H(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.iconVariable=n[2]),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function us(t){let e,i,n,r,s,o;const a=[ls,as],u=[];function l(c,f){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new at({props:{style:t[4],text:t[1]}}),{c(){e=F("div"),n.c(),r=Y(),U(s.$$.fragment),D(e,"class",Te(t[5])+" svelte-1wdh20c")},m(c,f){M(c,e,f),u[i].m(e,null),O(e,r),H(s,e,null),o=!0},p(c,[f]){let d=i;i=l(c),i===d?u[i].p(c,f):(ce(),L(u[d],1,1,()=>{u[d]=null}),fe(),n=u[i],n?n.p(c,f):(n=u[i]=a[i](c),n.c()),k(n,1),n.m(e,r));const g={};f&16&&(g.style=c[4]),f&2&&(g.text=c[1]),s.$set(g)},i(c){o||(k(n),k(s.$$.fragment,c),o=!0)},o(c){L(n),L(s.$$.fragment,c),o=!1},d(c){c&&G(e),u[i].d(),x(s)}}}function cs(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconVariable: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 f=`CombinedTag ${u}`;return t.$$set=d=>{"iconText"in d&&i(0,s=d.iconText),"tagText"in d&&i(1,o=d.tagText),"iconVariable"in d&&i(2,a=d.iconVariable),"className"in d&&i(6,u=d.className),"$$scope"in d&&i(7,r=d.$$scope)},[s,o,a,l,c,f,u,r,n]}class vn extends ee{constructor(e){super(),j(this,e,cs,us,X,{iconText:0,tagText:1,iconVariable:2,className:6},os)}}function fs(t){ie(t,"svelte-nfaksv",".subject.svelte-nfaksv{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-nfaksv{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.additional.svelte-nfaksv{display:flex}")}function ds(t){let e,i;return e=new lt({props:{className:"Department",text:t[0].departmentname,iconVariable:".la-department"}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function gs(t){let e,i;return e=new vn({props:{className:"Department",tagText:t[0].agentname,iconVariable:"la-department",iconText:t[0].departmentname}}),{c(){U(e.$$.fragment)},m(n,r){H(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||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function hs(t){let e,i=t[0].subject+"",n,r,s,o=t[0].preview+"",a,u,l,c,f,d,g,m,p,b,z;c=new ss({props:{status:t[0].status}});const C=[gs,ds],N=[];function _(S,I){return I&1&&(d=null),d==null&&(d=S[0].agentname.trim()!==""),d?0:1}return g=_(t,-1),m=N[g]=C[g](t),b=new ns({props:{tags:t[0].tags}}),{c(){e=F("h1"),n=te(i),r=Y(),s=F("p"),a=te(o),u=Y(),l=F("div"),U(c.$$.fragment),f=Y(),m.c(),p=Y(),U(b.$$.fragment),D(e,"class","subject svelte-nfaksv"),D(s,"class","preview svelte-nfaksv"),D(l,"class","additional svelte-nfaksv")},m(S,I){M(S,e,I),O(e,n),M(S,r,I),M(S,s,I),O(s,a),M(S,u,I),M(S,l,I),H(c,l,null),O(l,f),N[g].m(l,null),O(l,p),H(b,l,null),z=!0},p(S,I){(!z||I&1)&&i!==(i=S[0].subject+"")&&re(n,i),(!z||I&1)&&o!==(o=S[0].preview+"")&&re(a,o);const A={};I&1&&(A.status=S[0].status),c.$set(A);let q=g;g=_(S,I),g===q?N[g].p(S,I):(ce(),L(N[q],1,1,()=>{N[q]=null}),fe(),m=N[g],m?m.p(S,I):(m=N[g]=C[g](S),m.c()),k(m,1),m.m(l,p));const V={};I&1&&(V.tags=S[0].tags),b.$set(V)},i(S){z||(k(c.$$.fragment,S),k(m),k(b.$$.fragment,S),z=!0)},o(S){L(c.$$.fragment,S),L(m),L(b.$$.fragment,S),z=!1},d(S){S&&G(e),S&&G(r),S&&G(s),S&&G(u),S&&G(l),x(c),N[g].d(),x(b)}}}function ms(t){let e,i;return e=new At({props:{className:t[1],$$slots:{default:[hs]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(n,r){H(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||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function ps(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 _s extends ee{constructor(e){super(),j(this,e,ps,ms,X,{row:0,className:1},fs)}}var bn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(mn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",f="month",d="quarter",g="year",m="date",p="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,z=/\[([^\]]+)]|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,C={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(K){var T=["th","st","nd","rd"],w=K%100;return"["+K+(T[(w-20)%10]||T[w]||T[0])+"]"}},N=function(K,T,w){var v=String(K);return!v||v.length>=T?K:""+Array(T+1-v.length).join(w)+K},_={s:N,z:function(K){var T=-K.utcOffset(),w=Math.abs(T),v=Math.floor(w/60),y=w%60;return(T<=0?"+":"-")+N(v,2,"0")+":"+N(y,2,"0")},m:function K(T,w){if(T.date()<w.date())return-K(w,T);var v=12*(w.year()-T.year())+(w.month()-T.month()),y=T.clone().add(v,f),B=w-y<0,J=T.clone().add(v+(B?-1:1),f);return+(-(v+(w-y)/(B?y-J:J-y))||0)},a:function(K){return K<0?Math.ceil(K)||0:Math.floor(K)},p:function(K){return{M:f,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:d}[K]||String(K||"").toLowerCase().replace(/s$/,"")},u:function(K){return K===void 0}},S="en",I={};I[S]=C;var A=function(K){return K instanceof le},q=function K(T,w,v){var y;if(!T)return S;if(typeof T=="string"){var B=T.toLowerCase();I[B]&&(y=B),w&&(I[B]=w,y=B);var J=T.split("-");if(!y&&J.length>1)return K(J[0])}else{var R=T.name;I[R]=T,y=R}return!v&&y&&(S=y),y||!v&&S},V=function(K,T){if(A(K))return K.clone();var w=typeof T=="object"?T:{};return w.date=K,w.args=arguments,new le(w)},$=_;$.l=q,$.i=A,$.w=function(K,T){return V(K,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var le=function(){function K(w){this.$L=q(w.locale,null,!0),this.parse(w)}var T=K.prototype;return T.parse=function(w){this.$d=function(v){var y=v.date,B=v.utc;if(y===null)return new Date(NaN);if($.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var J=y.match(b);if(J){var R=J[2]-1||0,P=(J[7]||"0").substring(0,3);return B?new Date(Date.UTC(J[1],R,J[3]||1,J[4]||0,J[5]||0,J[6]||0,P)):new Date(J[1],R,J[3]||1,J[4]||0,J[5]||0,J[6]||0,P)}}return new Date(y)}(w),this.$x=w.x||{},this.init()},T.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},T.$utils=function(){return $},T.isValid=function(){return this.$d.toString()!==p},T.isSame=function(w,v){var y=V(w);return this.startOf(v)<=y&&y<=this.endOf(v)},T.isAfter=function(w,v){return V(w)<this.startOf(v)},T.isBefore=function(w,v){return this.endOf(v)<V(w)},T.$g=function(w,v,y){return $.u(w)?this[v]:this.set(y,w)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(w,v){var y=this,B=!!$.u(v)||v,J=$.p(w),R=function(De,ue){var ve=$.w(y.$u?Date.UTC(y.$y,ue,De):new Date(y.$y,ue,De),y);return B?ve:ve.endOf(l)},P=function(De,ue){return $.w(y.toDate()[De].apply(y.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(ue)),y)},Z=this.$W,se=this.$M,ye=this.$D,pe="set"+(this.$u?"UTC":"");switch(J){case g:return B?R(1,0):R(31,11);case f:return B?R(1,se):R(0,se+1);case c:var Be=this.$locale().weekStart||0,Ve=(Z<Be?Z+7:Z)-Be;return R(B?ye-Ve:ye+(6-Ve),se);case l:case m:return P(pe+"Hours",0);case u:return P(pe+"Minutes",1);case a:return P(pe+"Seconds",2);case o:return P(pe+"Milliseconds",3);default:return this.clone()}},T.endOf=function(w){return this.startOf(w,!1)},T.$set=function(w,v){var y,B=$.p(w),J="set"+(this.$u?"UTC":""),R=(y={},y[l]=J+"Date",y[m]=J+"Date",y[f]=J+"Month",y[g]=J+"FullYear",y[u]=J+"Hours",y[a]=J+"Minutes",y[o]=J+"Seconds",y[s]=J+"Milliseconds",y)[B],P=B===l?this.$D+(v-this.$W):v;if(B===f||B===g){var Z=this.clone().set(m,1);Z.$d[R](P),Z.init(),this.$d=Z.set(m,Math.min(this.$D,Z.daysInMonth())).$d}else R&&this.$d[R](P);return this.init(),this},T.set=function(w,v){return this.clone().$set(w,v)},T.get=function(w){return this[$.p(w)]()},T.add=function(w,v){var y,B=this;w=Number(w);var J=$.p(v),R=function(se){var ye=V(B);return $.w(ye.date(ye.date()+Math.round(se*w)),B)};if(J===f)return this.set(f,this.$M+w);if(J===g)return this.set(g,this.$y+w);if(J===l)return R(1);if(J===c)return R(7);var P=(y={},y[a]=n,y[u]=r,y[o]=i,y)[J]||1,Z=this.$d.getTime()+w*P;return $.w(Z,this)},T.subtract=function(w,v){return this.add(-1*w,v)},T.format=function(w){var v=this,y=this.$locale();if(!this.isValid())return y.invalidDate||p;var B=w||"YYYY-MM-DDTHH:mm:ssZ",J=$.z(this),R=this.$H,P=this.$m,Z=this.$M,se=y.weekdays,ye=y.months,pe=function(ue,ve,ut,Ze){return ue&&(ue[ve]||ue(v,B))||ut[ve].slice(0,Ze)},Be=function(ue){return $.s(R%12||12,ue,"0")},Ve=y.meridiem||function(ue,ve,ut){var Ze=ue<12?"AM":"PM";return ut?Ze.toLowerCase():Ze},De={YY:String(this.$y).slice(-2),YYYY:$.s(this.$y,4,"0"),M:Z+1,MM:$.s(Z+1,2,"0"),MMM:pe(y.monthsShort,Z,ye,3),MMMM:pe(ye,Z),D:this.$D,DD:$.s(this.$D,2,"0"),d:String(this.$W),dd:pe(y.weekdaysMin,this.$W,se,2),ddd:pe(y.weekdaysShort,this.$W,se,3),dddd:se[this.$W],H:String(R),HH:$.s(R,2,"0"),h:Be(1),hh:Be(2),a:Ve(R,P,!0),A:Ve(R,P,!1),m:String(P),mm:$.s(P,2,"0"),s:String(this.$s),ss:$.s(this.$s,2,"0"),SSS:$.s(this.$ms,3,"0"),Z:J};return B.replace(z,function(ue,ve){return ve||De[ue]||J.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(w,v,y){var B,J=$.p(v),R=V(w),P=(R.utcOffset()-this.utcOffset())*n,Z=this-R,se=$.m(this,R);return se=(B={},B[g]=se/12,B[f]=se,B[d]=se/3,B[c]=(Z-P)/6048e5,B[l]=(Z-P)/864e5,B[u]=Z/r,B[a]=Z/n,B[o]=Z/i,B)[J]||Z,y?se:$.a(se)},T.daysInMonth=function(){return this.endOf(f).$D},T.$locale=function(){return I[this.$L]},T.locale=function(w,v){if(!w)return this.$L;var y=this.clone(),B=q(w,v,!0);return B&&(y.$L=B),y},T.clone=function(){return $.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()},K}(),oe=le.prototype;return V.prototype=oe,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",f],["$y",g],["$D",m]].forEach(function(K){oe[K[1]]=function(T){return this.$g(T,K[0],K[1])}}),V.extend=function(K,T){return K.$i||(K(T,le,V),K.$i=!0),V},V.locale=q,V.isDayjs=A,V.unix=function(K){return V(1e3*K)},V.en=I[S],V.Ls=I,V.p={},V})})(bn);var ys=bn.exports;const xe=Nt(ys);var wn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(mn,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,f,d){return s.fromToBase(l,c,f,d)}r.en.relativeTime=o,s.fromToBase=function(l,c,f,d,g){for(var m,p,b,z=f.$locale().relativeTime||o,C=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"}],N=C.length,_=0;_<N;_+=1){var S=C[_];S.d&&(m=d?r(l).diff(f,S.d,!0):f.diff(l,S.d,!0));var I=(i.rounding||Math.round)(Math.abs(m));if(b=m>0,I<=S.r||!S.r){I<=1&&_>0&&(S=C[_-1]);var A=z[S.l];g&&(I=g(""+I)),p=typeof A=="string"?A.replace("%d",I):A(I,c,S.l,b);break}}if(c)return p;var q=b?z.future:z.past;return typeof q=="function"?q(p):q.replace("%s",p)},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)}}})})(wn);var vs=wn.exports;const bs=Nt(vs);xe.extend(bs);function ws(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=We(r,n[s]);return{c(){e=F("time"),i=te(t[0]),zt(e,r)},m(s,o){M(s,e,o),O(e,i)},p(s,[o]){o&1&&Mn(i,s[0],r.contenteditable),zt(e,r=an(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:W,o:W,d(s){s&&G(e)}}}function ks(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Ot(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,f;const d=60*1e3;return on(()=>(u&&l!==!1&&(f=setInterval(()=>{i(0,c=xe(o).from())},Math.abs(typeof l=="number"?l:d))),()=>{typeof f=="number"&&clearInterval(f)})),t.$$set=g=>{e=We(We({},e),Ln(g)),i(3,s=Ot(e,r)),"timestamp"in g&&i(1,o=g.timestamp),"format"in g&&i(4,a=g.format),"relative"in g&&i(5,u=g.relative),"live"in g&&i(6,l=g.live),"formatted"in g&&i(0,c=g.formatted)},t.$$.update=()=>{t.$$.dirty&50&&i(0,c=u?xe(o).from():xe(o).format(a)),t.$$.dirty&50&&i(2,n=u?xe(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Ts extends ee{constructor(e){super(),j(this,e,ks,ws,X,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Cs(t){ie(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Ls(t){let e;return{c(){e=F("span"),e.textContent="Invalid data",D(e,"class","invalid svelte-1o3wy2t")},m(i,n){M(i,e,n)},p:W,i:W,o:W,d(i){i&&G(e)}}}function Ss(t){let e,i;return e=new Ts({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){U(e.$$.fragment)},m(n,r){H(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||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Ds(t){let e,i,n,r,s;const o=[Ss,Ls],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=F("div"),r.c(),D(e,"class","Date svelte-1o3wy2t")},m(l,c){M(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let f=n;n=u(l,c),n===f?a[n].p(l,c):(ce(),L(a[f],1,1,()=>{a[f]=null}),fe(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),k(r,1),r.m(e,null))},i(l){s||(k(r),s=!0)},o(l){L(r),s=!1},d(l){l&&G(e),a[n].d()}}}function Ns(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 kn extends ee{constructor(e){super(),j(this,e,Ns,Ds,X,{data:0,format:1,style:2,relative:3},Cs)}}function As(t){let e,i;return e=new kn({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Rs(t){let e,i;return e=new vn({props:{iconVariable:t[3],tagText:t[0],className:t[2],$$slots:{default:[As]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconVariable=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||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Os(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 zs extends ee{constructor(e){super(),j(this,e,Os,Rs,X,{tagText:0,due:1})}}function Fs(t){ie(t,"svelte-rl80em",".TicketId.svelte-rl80em{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-rl80em{font-size:13px;line-height:20px}.Communication.svelte-rl80em{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}")}function Ms(t){let e,i;return e=new at({props:{text:"No SLA",className:"SLA"}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p:W,i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Gs(t){let e,i;return e=new zs({props:{tagText:"First answer",due:t[1].datedue}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Es(t){let e,i=t[1].code+"",n,r,s,o,a,u,l=t[1].messagegroupsIn+"",c,f,d,g,m,p,b=t[1].messagegroupsOut+"",z,C,N,_,S,I,A,q,V,$,le,oe;o=new Me({props:{iconVariable:"la-incoming"}}),g=new Me({props:{iconVariable:"la-outgoing"}}),I=new kn({props:{data:t[1].datecreated,format:t[2]}});const K=[Gs,Ms],T=[];function w(v,y){return y&2&&(q=null),q==null&&(q=v[1].datedue instanceof Date&&!isNaN(v[1].datedue)),q?0:1}return V=w(t,-1),$=T[V]=K[V](t),{c(){e=F("span"),n=te(i),r=Y(),s=F("div"),U(o.$$.fragment),a=Y(),u=F("span"),c=te(l),f=Y(),d=F("div"),U(g.$$.fragment),m=Y(),p=F("span"),z=te(b),C=Y(),N=F("div"),_=F("span"),_.textContent=`${t[3]}:`,S=Y(),U(I.$$.fragment),A=Y(),$.c(),le=it(),D(e,"class","TicketId svelte-rl80em"),D(s,"class","Communication incomingMessages svelte-rl80em"),D(d,"class","Communication outgoingMessages svelte-rl80em"),D(N,"class","Created svelte-rl80em")},m(v,y){M(v,e,y),O(e,n),M(v,r,y),M(v,s,y),H(o,s,null),O(s,a),O(s,u),O(u,c),M(v,f,y),M(v,d,y),H(g,d,null),O(d,m),O(d,p),O(p,z),M(v,C,y),M(v,N,y),O(N,_),O(N,S),H(I,N,null),M(v,A,y),T[V].m(v,y),M(v,le,y),oe=!0},p(v,y){(!oe||y&2)&&i!==(i=v[1].code+"")&&re(n,i),(!oe||y&2)&&l!==(l=v[1].messagegroupsIn+"")&&re(c,l),(!oe||y&2)&&b!==(b=v[1].messagegroupsOut+"")&&re(z,b);const B={};y&2&&(B.data=v[1].datecreated),y&4&&(B.format=v[2]),I.$set(B);let J=V;V=w(v,y),V===J?T[V].p(v,y):(ce(),L(T[J],1,1,()=>{T[J]=null}),fe(),$=T[V],$?$.p(v,y):($=T[V]=K[V](v),$.c()),k($,1),$.m(le.parentNode,le))},i(v){oe||(k(o.$$.fragment,v),k(g.$$.fragment,v),k(I.$$.fragment,v),k($),oe=!0)},o(v){L(o.$$.fragment,v),L(g.$$.fragment,v),L(I.$$.fragment,v),L($),oe=!1},d(v){v&&G(e),v&&G(r),v&&G(s),x(o),v&&G(f),v&&G(d),x(g),v&&G(C),v&&G(N),x(I),v&&G(A),T[V].d(v),v&&G(le)}}}function $s(t){let e,i;return e=new At({props:{className:t[0],$$slots:{default:[Es]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&38&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Is(t,e,i){let n;ne(t,Qe,u=>i(4,n=u));let{className:r="importanceColumn"}=e,{row:s}=e,{format:o="YYYY-MM-DD HH:mm:ss"}=e;const a=n("Created");return t.$$set=u=>{"className"in u&&i(0,r=u.className),"row"in u&&i(1,s=u.row),"format"in u&&i(2,o=u.format)},[r,s,o,a]}class Ks extends ee{constructor(e){super(),j(this,e,Is,$s,X,{className:0,row:1,format:2},Fs)}}const Bs={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M19.5 12.473c0-1.948-.618-3.397-2.066-4.844-.391-.39-1.023-.39-1.414 0-.391.391-.391 1.024 0 1.415 1.079 1.078 1.48 2.007 1.48 3.429 0 1.469-.572 2.85-1.611 3.888-1.004 1.003-2.078 1.502-3.428 1.593l1.246-1.247c.391-.391.391-1.023 0-1.414s-1.023-.391-1.414 0l-3.707 3.707 3.707 3.707c.195.195.451.293.707.293s.512-.098.707-.293c.391-.391.391-1.023 0-1.414l-1.337-1.336c1.923-.082 3.542-.792 4.933-2.181 1.417-1.416 2.197-3.299 2.197-5.303zM6.5 12.5c0-1.469.572-2.85 1.611-3.889 1.009-1.009 2.092-1.508 3.457-1.594l-1.275 1.275c-.391.391-.391 1.023 0 1.414.195.196.451.294.707.294s.512-.098.707-.293l3.707-3.707-3.707-3.707c-.391-.391-1.023-.391-1.414 0s-.391 1.023 0 1.414l1.311 1.311c-1.914.086-3.525.796-4.907 2.179-1.417 1.416-2.197 3.299-2.197 5.303 0 1.948.618 3.397 2.066 4.844.195.195.451.292.707.292s.512-.098.707-.293c.391-.391.391-1.024 0-1.415-1.079-1.077-1.48-2.006-1.48-3.428z"></path>'};function Vs(t){ie(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=Ge(o,t,t[3],null);return{c(){e=F("button"),a&&a.c(),D(e,"class",i=Te(t[0])+" svelte-10fvxzv")},m(u,l){M(u,e,l),a&&a.m(e,null),n=!0,r||(s=de(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&$e(a,o,u,u[3],n?Ee(o,u[3],l,null):Ie(u[3]),null),(!n||l&1&&i!==(i=Te(u[0])+" svelte-10fvxzv"))&&D(e,"class",i)},i(u){n||(k(a,u),n=!0)},o(u){L(a,u),n=!1},d(u){u&&G(e),a&&a.d(u),r=!1,s()}}}function xs(t,e,i){let{$$slots:n={},$$scope:r}=e,{onAction:s=()=>{}}=e,{className:o=""}=e;function a(){s()}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 jt extends ee{constructor(e){super(),j(this,e,xs,Js,X,{onAction:2,className:0},Vs)}}function Hs(t){ie(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 Us(t){let e,i,n=t[0]("Change filter")+"",r,s;return e=new Me({props:{className:"FilterIcon",iconVariable:"la-tune"}}),{c(){U(e.$$.fragment),i=Y(),r=te(n)},m(o,a){H(e,o,a),M(o,i,a),M(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Change filter")+"")&&re(r,n)},i(o){s||(k(e.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),s=!1},d(o){x(e,o),o&&G(i),o&&G(r)}}}function Ws(t){let e,i,n=t[0]("Configure chat button")+"",r,s;return e=new Me({props:{className:"ConfigureIcon",iconVariable:"la-configuration"}}),{c(){U(e.$$.fragment),i=Y(),r=te(n)},m(o,a){H(e,o,a),M(o,i,a),M(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Configure chat button")+"")&&re(r,n)},i(o){s||(k(e.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),s=!1},d(o){x(e,o),o&&G(i),o&&G(r)}}}function Ys(t){let e,i,n,r,s,o=t[0]("No tickets found")+"",a,u,l,c=t[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",f,d,g,m,p,b,z;return m=new jt({props:{className:"Filter",$$slots:{default:[Us]},$$scope:{ctx:t}}}),b=new jt({props:{className:"Configure",$$slots:{default:[Ws]},$$scope:{ctx:t}}}),{c(){e=F("div"),i=F("img"),r=Y(),s=F("h1"),a=te(o),u=Y(),l=F("p"),f=te(c),d=Y(),g=F("div"),U(m.$$.fragment),p=Y(),U(b.$$.fragment),D(i,"alt","No results placeholder"),ht(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||D(i,"src",n),D(i,"class","svelte-19qi61t"),D(s,"class","svelte-19qi61t"),D(l,"class","svelte-19qi61t"),D(g,"class","Buttons"),D(e,"class","NoTickets svelte-19qi61t")},m(C,N){M(C,e,N),O(e,i),O(e,r),O(e,s),O(s,a),O(e,u),O(e,l),O(l,f),O(e,d),O(e,g),H(m,g,null),O(g,p),H(b,g,null),z=!0},p(C,[N]){(!z||N&1)&&o!==(o=C[0]("No tickets found")+"")&&re(a,o),(!z||N&1)&&c!==(c=C[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&re(f,c);const _={};N&3&&(_.$$scope={dirty:N,ctx:C}),m.$set(_);const S={};N&3&&(S.$$scope={dirty:N,ctx:C}),b.$set(S)},i(C){z||(k(m.$$.fragment,C),k(b.$$.fragment,C),z=!0)},o(C){L(m.$$.fragment,C),L(b.$$.fragment,C),z=!1},d(C){C&&G(e),x(m),x(b)}}}function qs(t,e,i){let n;return ne(t,Qe,r=>i(0,n=r)),[n]}class Ps extends ee{constructor(e){super(),j(this,e,qs,Ys,X,{},Hs)}}function Qs(t){ie(t,"svelte-150fgq2","main.svelte-150fgq2{height:100%;display:flex;flex-direction:column}.tools.svelte-150fgq2{display:flex;align-items:center;justify-content:right;padding:0 30px}button.svelte-150fgq2{border:none;background:none;padding:0;margin:0;height:20px;width:20px}.loading.svelte-150fgq2{animation-name:svelte-150fgq2-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-150fgq2-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}")}function Zs(t){let e,i;return e=new Fi({props:{columns:t[3],data:t[8],loadMore:t[14],middleclickhandler:t[1],selectedAll:t[7]}}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p(n,r){const s={};r[0]&8&&(s.columns=n[3]),r[0]&2&&(s.middleclickhandler=n[1]),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function Xs(t){let e,i;return e=new Ps({}),{c(){U(e.$$.fragment)},m(n,r){H(e,n,r),i=!0},p:W,i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function js(t){let e,i,n,r,s,o,a,u,l,c,f,d,g,m;const p=t[21].default,b=Ge(p,t,t[20],null);r=new _r({props:{cursor:t[13],data:t[8],filter:t[0]}}),a=new rt({props:{size:"20px",src:Bs}});const z=[Xs,Zs],C=[];function N(_,S){return!_[5]&&!_[4]?0:1}return c=N(t),f=C[c]=z[c](t),{c(){e=F("main"),i=F("div"),b&&b.c(),n=Y(),U(r.$$.fragment),s=Y(),o=F("button"),U(a.$$.fragment),l=Y(),f.c(),D(o,"title",u=t[2]("Reload")),D(o,"class","svelte-150fgq2"),we(o,"loading",t[4]),D(i,"class","tools svelte-150fgq2"),D(e,"class","svelte-150fgq2")},m(_,S){M(_,e,S),O(e,i),b&&b.m(i,null),O(i,n),H(r,i,null),O(i,s),O(i,o),H(a,o,null),O(e,l),C[c].m(e,null),d=!0,g||(m=de(o,"click",t[22]),g=!0)},p(_,S){b&&b.p&&(!d||S[0]&1048576)&&$e(b,p,_,_[20],d?Ee(p,_[20],S,null):Ie(_[20]),null);const I={};S[0]&1&&(I.filter=_[0]),r.$set(I),(!d||S[0]&4&&u!==(u=_[2]("Reload")))&&D(o,"title",u),(!d||S[0]&16)&&we(o,"loading",_[4]);let A=c;c=N(_),c===A?C[c].p(_,S):(ce(),L(C[A],1,1,()=>{C[A]=null}),fe(),f=C[c],f?f.p(_,S):(f=C[c]=z[c](_),f.c()),k(f,1),f.m(e,null))},i(_){d||(k(b,_),k(r.$$.fragment,_),k(a.$$.fragment,_),k(f),d=!0)},o(_){L(b,_),L(r.$$.fragment,_),L(a.$$.fragment,_),L(f),d=!1},d(_){_&&G(e),b&&b.d(_),x(r),x(a),C[c].d(),g=!1,m()}}}function eo(t,e,i){let n,r,s,o,a,u,l,c,f;ne(t,Qe,R=>i(2,c=R));let{$$slots:d={},$$scope:g}=e,m,{apikey:p}=e,{filters:b}=e,{middleclickhandler:z}=e,{selectionHandler:C}=e,{basePath:N}=e,_=ae({});ne(t,_,R=>i(19,l=R));let S=ae(!1);ne(t,S,R=>i(18,u=R));let I=new gr(p,N);I.load(),be("tagsMap",I.tags);let A=ae(null);be("error",A);const q=new Dt({apiKey:p,basePath:N+"/api/v3"}),V=new hn(q);be("api",V);const $=ae([]);ne(t,$,R=>i(25,s=R));const le=ae(!1);ne(t,le,R=>i(5,f=R)),be("data",$);const oe=ae(dr.Rorder);ne(t,oe,R=>i(26,o=R));const K=ae(!0);ne(t,K,R=>i(27,a=R));const T=ae(!1);ne(t,T,R=>i(4,n=R)),be("loading",T);const w=ae(null);ne(t,w,R=>i(24,r=R)),be("cursor",w);let v=!1,y=()=>({perPage:20,sortDir:a?qt.Asc:qt.Desc,filters:b,sortField:o,cursor:r||""}),B=async(R=!1)=>{if(!n&&!(!r&&v&&!R)){Ce(T,n=!0,n),R===!0&&(Ce(w,r=null,r),v=!1);try{const Z=await(await V.getTicketsGridDatasetRaw(y())).value();R===!0&&Ce($,s=[],s),Ce($,s=s.concat(Z.rows),s),Z.rows.length>0&&le.set(!0),Ce(w,r=Z.cursor,r),v=!0}catch(P){A.set(P.toString())}Ce(T,n=!1,n)}};K.subscribe(async()=>{await B(!0)}),oe.subscribe(async()=>{await B(!0)}),be("direction",K),be("sort",oe),$.subscribe(R=>{_.set(R.filter(P=>P.__selected??!1).map(P=>P.conversationid))});const J=()=>B(!0);return t.$$set=R=>{"apikey"in R&&i(15,p=R.apikey),"filters"in R&&i(0,b=R.filters),"middleclickhandler"in R&&i(1,z=R.middleclickhandler),"selectionHandler"in R&&i(16,C=R.selectionHandler),"basePath"in R&&i(17,N=R.basePath),"$$scope"in R&&i(20,g=R.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&4&&i(3,m=ae([new dt(c("User"),Pr,!1),new dt(c("Status"),_s,!1),new dt(c("Importance"),Ks,!0)])),t.$$.dirty[0]&851968&&C(l,u),t.$$.dirty[0]&1&&b&&B(!0)},[b,z,c,m,n,f,_,S,$,le,oe,K,T,w,B,p,C,N,u,l,g,d,J]}class to extends ee{constructor(e){super(),j(this,e,eo,js,X,{apikey:15,filters:0,middleclickhandler:1,selectionHandler:16,basePath:17},Qs,[-1,-1])}}const no="modulepreload",io=function(t){return"/"+t},en={},tn=function(e,i,n){if(!i||i.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=io(s),s in en)return;en[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const f=r[c];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":no,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())};function ro(){Ut("en",()=>tn(()=>import("./en.js"),[])),Ut("sk",()=>tn(()=>import("./sk.js"),[]))}function nn(t){let e,i;return e=new to({props:{apikey:t[0],basePath:t[3],filters:t[1],middleclickhandler:t[2],selectionHandler:t[4],$$slots:{default:[so]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(n,r){H(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&512&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(k(e.$$.fragment,n),i=!0)},o(n){L(e.$$.fragment,n),i=!1},d(n){x(e,n)}}}function so(t){let e;return{c(){e=F("slot")},m(i,n){M(i,e,n)},p:W,d(i){i&&G(e)}}}function oo(t){let e,i,n,r,s=t[0]&&t[3]&&nn(t);return{c(){s&&s.c(),e=Y(),i=F("link"),this.c=W,D(i,"rel","stylesheet"),D(i,"href",n=t[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),M(o,e,a),M(o,i,a),r=!0},p(o,[a]){o[0]&&o[3]?s?(s.p(o,a),a&9&&k(s,1)):(s=nn(o),s.c(),k(s,1),s.m(e.parentNode,e)):s&&(ce(),L(s,1,1,()=>{s=null}),fe()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&D(i,"href",n)},i(o){r||(k(s),r=!0)},o(o){L(s),r=!1},d(o){s&&s.d(o),o&&G(e),o&&G(i)}}}function ao(t,e,i){ro();let{lang:n="sk"}=e,{apikey:r}=e,{filters:s='[["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:o}=e,{selectionhandler:a}=e,{selectionMap:u={}}=e,{selectedAll:l=!1}=e,{basepath:c}=e;bi({initialLocale:n,fallbackLocale:"en"}),Ci();function f(d,g){i(5,u=d),i(6,l=g),a&&a(d,g)}return t.$$set=d=>{"lang"in d&&i(7,n=d.lang),"apikey"in d&&i(0,r=d.apikey),"filters"in d&&i(1,s=d.filters),"middleclickhandler"in d&&i(2,o=d.middleclickhandler),"selectionhandler"in d&&i(8,a=d.selectionhandler),"selectionMap"in d&&i(5,u=d.selectionMap),"selectedAll"in d&&i(6,l=d.selectedAll),"basepath"in d&&i(3,c=d.basepath)},[r,s,o,c,f,u,l,n,a]}class lo extends ln{constructor(e){super(),j(this,{target:this.shadowRoot,props:Gn(this.attributes),customElement:!0},ao,oo,X,{lang:7,apikey:0,filters:1,middleclickhandler:2,selectionhandler:8,selectionMap:5,selectedAll:6,basepath:3},null),e&&(e.target&&M(e.target,this,e.anchor),e.props&&(this.$set(e.props),he()))}static get observedAttributes(){return["lang","apikey","filters","middleclickhandler","selectionhandler","selectionMap","selectedAll","basepath"]}get lang(){return this.$$.ctx[7]}set lang(e){this.$$set({lang:e}),he()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),he()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),he()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),he()}get selectionhandler(){return this.$$.ctx[8]}set selectionhandler(e){this.$$set({selectionhandler:e}),he()}get selectionMap(){return this.$$.ctx[5]}set selectionMap(e){this.$$set({selectionMap:e}),he()}get selectedAll(){return this.$$.ctx[6]}set selectedAll(e){this.$$set({selectedAll:e}),he()}get basepath(){return this.$$.ctx[3]}set basepath(e){this.$$set({basepath:e}),he()}}customElements.define("tickets-table",lo);
|
package/dist/index.html
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Vite + Svelte + TS</title>
|
|
8
8
|
<script type="module" crossorigin src="/assets/index.js"></script>
|
|
9
|
-
<link rel="stylesheet" href="/assets/index.css">
|
|
10
9
|
</head>
|
|
11
10
|
<body style="height: 500px;">
|
|
12
11
|
<tickets-table apikey="S_j5rpz8qvmtzx70fymhbb09nvhpk1yrr3">
|
package/package.json
CHANGED
package/dist/assets/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.Head.svelte-19b9z6b{display:none}.headCheckbox.svelte-19b9z6b{width:20px}.content.svelte-19b9z6b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}button.svelte-19b9z6b{border:none;background:none;font-size:13px;font-weight:400;color:var(--department-bg-color)}@media screen and (min-width: 768px){.Head.svelte-19b9z6b{display:grid;grid-template-columns:60px 1fr 3fr 1fr;position:sticky;top:0;color:var(--panel_text_color);font-size:14px;font-family:Roboto,sans-serif}}@media (min-width: 1300px){.Head.svelte-19b9z6b{grid-template-columns:60px 260px auto 230px}}.sortable.svelte-19b9z6b{cursor:pointer}.Row.svelte-1q51p0{display:grid;grid-template-columns:1fr;border-radius:12px;box-shadow:0 0 5px 2px #0003}.Row.svelte-1q51p0:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-1q51p0{background-color:var(--menu-selected-bg)!important}.StatusBar.svelte-1q51p0{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px}input.svelte-1q51p0{position:absolute;top:40%;left:40%}@media screen and (min-width: 768px){.Row.svelte-1q51p0{display:grid;grid-template-columns:60px 1fr 3fr 1fr;height:80px}.Checkbox.svelte-1q51p0{position:relative}}@media (min-width: 1300px){.Row.svelte-1q51p0{grid-template-columns:60px 260px auto 230px}}div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}.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%}}span.svelte-xoajdi{margin-right:10px}.wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + .5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk:before{content:"";display:block;height:100%;width:100%;background:linear-gradient(90deg,transparent,#ffffff38,transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}.Column.svelte-i7rqh4{padding-bottom:5px;padding-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Tag.svelte-7jeavi{display:inline-block;color:var(--department-bg-color);text-align:center;font-size:12px;font-weight:700;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-7jeavi:before{font-family:la-icon-font}.SLA.svelte-7jeavi{border:1px solid #CFD6DD;border-radius:4px}.Icon.svelte-yh1nwn:before{font-family:la-icon-font;display:inline-block;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;font-size:1em}div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:#fff}.Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}.Tag.NoCompanyTag{background-color:#fff;color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-1vpgajt{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-1vpgajt{font-size:13px;line-height:20px;font-weight:700}.email.svelte-1vpgajt{font-size:13px;line-height:20px}.texts.svelte-1vpgajt{display:flex;flex-direction:column;justify-content:center}.Tag.TicketTag{font-size:12px;font-weight:700;padding:2px 10px}.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)}.subject.svelte-nfaksv{font-size:13px;font-weight:700;line-height:20px;margin:0}.preview.svelte-nfaksv{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.additional.svelte-nfaksv{display:flex}.invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}.TicketId.svelte-rl80em{font-weight:700;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-rl80em{font-size:13px;line-height:20px}.Communication.svelte-rl80em{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}.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}img.svelte-19qi61t{max-width:300px}main.svelte-150fgq2{height:100%;display:flex;flex-direction:column}.tools.svelte-150fgq2{display:flex;align-items:center;justify-content:right;padding:0 30px}button.svelte-150fgq2{border:none;background:none;padding:0;margin:0;height:20px;width:20px}.loading.svelte-150fgq2{animation-name:svelte-150fgq2-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-150fgq2-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|