@qualityunit/liveagent-ticket-grid 0.0.22 → 0.0.26
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 +6 -8
- package/package.json +10 -10
package/dist/assets/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 V(){}function et(e,t){for(const i in t)e[i]=t[i];return e}function _t(e){return e()}function Nt(){return Object.create(null)}function me(e){e.forEach(_t)}function We(e){return typeof e=="function"}function j(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Xe;function dt(e,t){return Xe||(Xe=document.createElement("a")),Xe.href=t,e===Xe.href}function Qt(e){return Object.keys(e).length===0}function ve(e,...t){if(e==null)return V;const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function oe(e,t,i){e.$$.on_destroy.push(ve(t,i))}function $e(e,t,i,n){if(e){const r=Zt(e,t,i,n);return e[0](r)}}function Zt(e,t,i,n){return e[1]&&n?et(i.ctx.slice(),e[1](n(t))):i.ctx}function ze(e,t,i,n){if(e[2]&&n){const r=e[2](n(i));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function Me(e,t,i,n,r,s){if(r){const o=Zt(t,i,n,s);e.p(o,r)}}function Ge(e){if(e.ctx.length>32){const t=[],i=e.ctx.length/32;for(let n=0;n<i;n++)t[n]=-1;return t}return-1}function mn(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function St(e,t){const i={};t=new Set(t);for(const n in e)!t.has(n)&&n[0]!=="$"&&(i[n]=e[n]);return i}function we(e){return e??""}function ge(e,t,i){return e.set(i),t}const hn=["",!0,1,"true","contenteditable"];function C(e,t){e.appendChild(t)}function se(e,t,i){const n=pn(e);if(!n.getElementById(t)){const r=$("style");r.id=t,r.textContent=i,_n(n,r)}}function pn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function _n(e,t){return C(e.head||e,t),t.sheet}function B(e,t,i){e.insertBefore(t,i||null)}function J(e){e.parentNode&&e.parentNode.removeChild(e)}function Pt(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function $(e){return document.createElement(e)}function q(e){return document.createTextNode(e)}function Y(){return q(" ")}function vn(){return q("")}function ue(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function Dt(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function N(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}const yn=["width","height"];function At(e,t){const i=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in t)t[n]==null?e.removeAttribute(n):n==="style"?e.style.cssText=t[n]:n==="__value"?e.value=e[n]=t[n]:i[n]&&i[n].set&&yn.indexOf(n)===-1?e[n]=t[n]:N(e,n,t[n])}function bn(e){return Array.from(e.childNodes)}function ie(e,t){t=""+t,e.data!==t&&(e.data=t)}function kn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function wn(e,t,i){~hn.indexOf(i)?kn(e,t):ie(e,t)}function lt(e,t,i,n){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function Rt(e,t,i){e.classList[i?"add":"remove"](t)}function Tn(e){const t={};for(const i of e)t[i.name]=i.value;return t}let Ye;function Ue(e){Ye=e}function vt(){if(!Ye)throw new Error("Function called outside component initialization");return Ye}function qt(e){vt().$$.on_mount.push(e)}function Ne(e,t){return vt().$$.context.set(e,t),t}function Re(e){return vt().$$.context.get(e)}const Ae=[],Ve=[];let Fe=[];const ft=[],Cn=Promise.resolve();let gt=!1;function Ln(){gt||(gt=!0,Cn.then(fe))}function mt(e){Fe.push(e)}function Nn(e){ft.push(e)}const ut=new Set;let Se=0;function fe(){if(Se!==0)return;const e=Ye;do{try{for(;Se<Ae.length;){const t=Ae[Se];Se++,Ue(t),Sn(t.$$)}}catch(t){throw Ae.length=0,Se=0,t}for(Ue(null),Ae.length=0,Se=0;Ve.length;)Ve.pop()();for(let t=0;t<Fe.length;t+=1){const i=Fe[t];ut.has(i)||(ut.add(i),i())}Fe.length=0}while(Ae.length);for(;ft.length;)ft.pop()();gt=!1,ut.clear(),Ue(e)}function Sn(e){if(e.fragment!==null){e.update(),me(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(mt)}}function Dn(e){const t=[],i=[];Fe.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),Fe=t}const je=new Set;let Te;function he(){Te={r:0,c:[],p:Te}}function pe(){Te.r||me(Te.c),Te=Te.p}function S(e,t){e&&e.i&&(je.delete(e),e.i(t))}function R(e,t,i,n){if(e&&e.o){if(je.has(e))return;je.add(e),Te.c.push(()=>{je.delete(e),n&&(i&&e.d(1),n())}),e.o(t)}else n&&n()}function An(e,t){const i={},n={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[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);e[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 Rn(e,t,i){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))}function W(e){e&&e.c()}function H(e,t,i,n){const{fragment:r,after_update:s}=e.$$;r&&r.m(t,i),n||mt(()=>{const o=e.$$.on_mount.map(_t).filter(We);e.$$.on_destroy?e.$$.on_destroy.push(...o):me(o),e.$$.on_mount=[]}),s.forEach(mt)}function U(e,t){const i=e.$$;i.fragment!==null&&(Dn(i.after_update),me(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function On(e,t){e.$$.dirty[0]===-1&&(Ae.push(e),Ln(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ee(e,t,i,n,r,s,o,a=[-1]){const u=Ye;Ue(e);const l=e.$$={fragment:null,ctx:[],props:s,update:V,not_equal:r,bound:Nt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Nt(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(e,t.props||{},(d,g,...f)=>{const p=f.length?f[0]:g;return l.ctx&&r(l.ctx[d],l.ctx[d]=p)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](p),c&&On(e,d)),g}):[],l.update(),c=!0,me(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const d=bn(t.target);l.fragment&&l.fragment.l(d),d.forEach(J)}else l.fragment&&l.fragment.c();t.intro&&S(e.$$.fragment),H(e,t.target,t.anchor,t.customElement),fe()}Ue(u)}let Xt;typeof HTMLElement=="function"&&(Xt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(_t).filter(We);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){me(this.$$.on_disconnect)}$destroy(){U(this,1),this.$destroy=V}$on(e,t){if(!We(t))return V;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const n=i.indexOf(t);n!==-1&&i.splice(n,1)}}$set(e){this.$$set&&!Qt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class te{$destroy(){U(this,1),this.$destroy=V}$on(t,i){if(!We(i))return V;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!Qt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Fn(e){se(e,"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 $n(e){let t,i;return{c(){t=$("span"),N(t,"class",i=we(`Icon ${e[0]} ${e[1]}`)+" svelte-yh1nwn")},m(n,r){B(n,t,r)},p(n,[r]){r&3&&i!==(i=we(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&N(t,"class",i)},i:V,o:V,d(n){n&&J(t)}}}function zn(e,t,i){let{className:n=""}=t,{iconLaClassName:r}=t;return e.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class ye extends te{constructor(t){super(),ee(this,t,zn,$n,j,{className:0,iconLaClassName:1},Fn)}}const De=[];function Mn(e,t){return{subscribe:ce(e,t).subscribe}}function ce(e,t=V){let i;const n=new Set;function r(a){if(j(e,a)&&(e=a,i)){const u=!De.length;for(const l of n)l[1](),De.push(l,e);if(u){for(let l=0;l<De.length;l+=2)De[l][0](De[l+1]);De.length=0}}}function s(a){r(a(e))}function o(a,u=V){const l=[a,u];return n.add(l),n.size===1&&(i=t(r)||V),a(e),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}function Gn(e,t,i){const n=!Array.isArray(e),r=n?[e]:e,s=t.length<2;return Mn(i,o=>{let a=!1;const u=[];let l=0,c=V;const d=()=>{if(l)return;c();const f=t(n?u[0]:u,o);s?o(f):c=We(f)?f:V},g=r.map((f,p)=>ve(f,h=>{u[p]=h,l&=~(1<<p),a&&d()},()=>{l|=1<<p}));return a=!0,d(),function(){me(g),c(),a=!1}})}const En={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"}}},In={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:En,warnOnMissingMessages:!0},xn=In;let jt;function tt(){return jt}function Kn(e){return jt=e}function Ze(){return xn}function Ot(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Pe(e,t=Ze().fallbackLocale){const i=Ot(e);return t?[...new Set([...i,...Ot(t)])]:i}let yt;const it=ce({});function Bn(e){return yt[e]||null}function bt(e){return e in yt}function Jn(e,t){if(bt(e)){const i=Bn(e);if(t in i)return i[t];const n=t.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 Un(e){if(e==null)return null;const t=Pe(e);for(let i=0;i<t.length;i++){const n=t[i];if(bt(n))return n}return null}function Hn(e,...t){it.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}it.subscribe(e=>yt=e);const Ft=ce(!1),kt={};function Wn(e){kt[e]=new Set}function Yn(e){delete kt[e]}function He(e){return kt[e]}function Vn(e){return Pe(e).reverse().map(t=>{const i=He(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function wt(e){return Pe(e).reverse().some(He)}const Be={};function en(e){if(!wt(e))return Promise.resolve();if(e in Be)return Be[e];const t=Vn(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>Ft.set(!0),Ze().loadingDelay);return Be[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{Yn(n),s=s.map(o=>o.default||o),Hn(n,...s)}))).then(()=>{clearTimeout(i),Ft.set(!1),delete Be[e]}),Be[e]}function $t(e,t){He(e)||Wn(e);const i=He(e);He(e).has(t)||(bt(e)||it.update(n=>(n[e]={},n)),i.add(t))}const Ee=ce("");Ee.subscribe(e=>{Kn(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const ht=Ee.set;Ee.set=e=>Un(e)&&wt(e)?en(e).then(()=>ht(e)):ht(e);Ee.update=e=>{let t=tt();e(t),ht(t)};function Qn(e){const{formats:t,...i}=e,n=e.initialLocale||e.fallbackLocale,r=Ze();return Object.assign(r,i,{initialLocale:n}),t&&("number"in t&&Object.assign(r.formats.number,t.number),"date"in t&&Object.assign(r.formats.date,t.date),"time"in t&&Object.assign(r.formats.time,t.time)),Ee.set(n)}const Ce={},Zn=(e,t,i)=>i&&(t in Ce||(Ce[t]={}),e in Ce[t]||(Ce[t][e]=i),i),Pn=(e,t)=>{if(t==null)return;if(t in Ce&&e in Ce[t])return Ce[t][e];const i=Pe(t);for(let n=0;n<i.length;n++){const r=i[n],s=Jn(r,e);if(s)return Zn(e,t,s)}},qn=(e,t,i={})=>{const n=typeof t=="string"?t:t.id,r=typeof t=="string"?i:t,{values:s,locale:o=e||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=Pn(n,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(Ze().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${n}" was not found in "${Pe(o).join('", "')}".${wt(tt())?`
|
|
1
|
+
var kn=Object.defineProperty;var Tn=(e,t,i)=>t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var ge=(e,t,i)=>(Tn(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 Q(){}function rt(e,t){for(const i in t)e[i]=t[i];return e}function nn(e){return e()}function Rt(){return Object.create(null)}function we(e){e.forEach(nn)}function at(e){return typeof e=="function"}function Z(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let tt;function pt(e,t){return e===t?!0:(tt||(tt=document.createElement("a")),tt.href=t,e===tt.href)}function Cn(e){return Object.keys(e).length===0}function ye(e,...t){if(e==null){for(const n of t)n(void 0);return Q}const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function ne(e,t,i){e.$$.on_destroy.push(ye(t,i))}function xe(e,t,i,n){if(e){const r=rn(e,t,i,n);return e[0](r)}}function rn(e,t,i,n){return e[1]&&n?rt(i.ctx.slice(),e[1](n(t))):i.ctx}function Ie(e,t,i,n){if(e[2]&&n){const r=e[2](n(i));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function Be(e,t,i,n,r,s){if(r){const o=rn(t,i,n,s);e.p(o,r)}}function Ke(e){if(e.ctx.length>32){const t=[],i=e.ctx.length/32;for(let n=0;n<i;n++)t[n]=-1;return t}return-1}function $n(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function Mt(e,t){const i={};t=new Set(t);for(const n in e)!t.has(n)&&n[0]!=="$"&&(i[n]=e[n]);return i}function Ce(e){return e??""}function _e(e,t,i){return e.set(i),t}const Ln=["",!0,1,"true","contenteditable"];function S(e,t){e.appendChild(t)}function ie(e,t,i){const n=Sn(e);if(!n.getElementById(t)){const r=D("style");r.id=t,r.textContent=i,Nn(n,r)}}function Sn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Nn(e,t){return S(e.head||e,t),t.sheet}function F(e,t,i){e.insertBefore(t,i||null)}function R(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function D(e){return document.createElement(e)}function te(e){return document.createTextNode(e)}function P(){return te(" ")}function Dn(){return te("")}function le(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function _t(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function T(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}const An=["width","height"];function Ft(e,t){const i=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in t)t[n]==null?e.removeAttribute(n):n==="style"?e.style.cssText=t[n]:n==="__value"?e.value=e[n]=t[n]:i[n]&&i[n].set&&An.indexOf(n)===-1?e[n]=t[n]:T(e,n,t[n])}function On(e){return Array.from(e.childNodes)}function oe(e,t){t=""+t,e.data!==t&&(e.data=t)}function Rn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Mn(e,t,i){~Ln.indexOf(i)?Rn(e,t):oe(e,t)}function Gt(e,t){e.value=t??""}function gt(e,t,i,n){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function zt(e,t,i){e.classList.toggle(t,!!i)}function Fn(e,t,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:n})}function Gn(e){const t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}let Qe;function Pe(e){Qe=e}function lt(){if(!Qe)throw new Error("Function called outside component initialization");return Qe}function sn(e){lt().$$.on_mount.push(e)}function on(){const e=lt();return(t,i,{cancelable:n=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Fn(t,i,{cancelable:n});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function Ne(e,t){return lt().$$.context.set(e,t),t}function Te(e){return lt().$$.context.get(e)}const Fe=[],Ze=[];let ze=[];const vt=[],zn=Promise.resolve();let yt=!1;function En(){yt||(yt=!0,zn.then(ve))}function bt(e){ze.push(e)}function xn(e){vt.push(e)}const ht=new Set;let Re=0;function ve(){if(Re!==0)return;const e=Qe;do{try{for(;Re<Fe.length;){const t=Fe[Re];Re++,Pe(t),In(t.$$)}}catch(t){throw Fe.length=0,Re=0,t}for(Pe(null),Fe.length=0,Re=0;Ze.length;)Ze.pop()();for(let t=0;t<ze.length;t+=1){const i=ze[t];ht.has(i)||(ht.add(i),i())}ze.length=0}while(Fe.length);for(;vt.length;)vt.pop()();yt=!1,ht.clear(),Pe(e)}function In(e){if(e.fragment!==null){e.update(),we(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(bt)}}function Bn(e){const t=[],i=[];ze.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),ze=t}const nt=new Set;let De;function he(){De={r:0,c:[],p:De}}function me(){De.r||we(De.c),De=De.p}function w(e,t){e&&e.i&&(nt.delete(e),e.i(t))}function L(e,t,i,n){if(e&&e.o){if(nt.has(e))return;nt.add(e),De.c.push(()=>{nt.delete(e),n&&(i&&e.d(1),n())}),e.o(t)}else n&&n()}function Ee(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Kn(e,t){const i={},n={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[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);e[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 Jn(e,t,i){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))}function H(e){e&&e.c()}function B(e,t,i){const{fragment:n,after_update:r}=e.$$;n&&n.m(t,i),bt(()=>{const s=e.$$.on_mount.map(nn).filter(at);e.$$.on_destroy?e.$$.on_destroy.push(...s):we(s),e.$$.on_mount=[]}),r.forEach(bt)}function K(e,t){const i=e.$$;i.fragment!==null&&(Bn(i.after_update),we(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function Un(e,t){e.$$.dirty[0]===-1&&(Fe.push(e),En(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function j(e,t,i,n,r,s,o=null,a=[-1]){const u=Qe;Pe(e);const l=e.$$={fragment:null,ctx:[],props:s,update:Q,not_equal:r,bound:Rt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Rt(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(e,t.props||{},(d,f,...g)=>{const m=g.length?g[0]:f;return l.ctx&&r(l.ctx[d],l.ctx[d]=m)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](m),c&&Un(e,d)),f}):[],l.update(),c=!0,we(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const d=On(t.target);l.fragment&&l.fragment.l(d),d.forEach(R)}else l.fragment&&l.fragment.c();t.intro&&w(e.$$.fragment),B(e,t.target,t.anchor),ve()}Pe(u)}let an;typeof HTMLElement=="function"&&(an=class extends HTMLElement{constructor(t,i,n){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(t,i,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(i),this.$$c){const r=this.$$c.$on(t,i);this.$$l_u.set(i,r)}super.addEventListener(t,i,n)}removeEventListener(t,i,n){if(super.removeEventListener(t,i,n),this.$$c){const r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return()=>{let a;return{c:function(){a=D("slot"),o!=="default"&&T(a,"name",o)},m:function(c,d){F(c,a,d)},d:function(c){c&&R(a)}}}};var t=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Gn(this);for(const o of this.$$s)o in r&&(n[o]=[i(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=it(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=it(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const a of this.$$l[o]){const u=this.$$c.$on(o,a);this.$$l_u.set(a,u)}this.$$l={}}}attributeChangedCallback(t,i,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=it(t,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===t||!this.$$p_d[i].attribute&&i.toLowerCase()===t)||t}});function it(e,t,i,n){var s;const r=(s=i[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Hn(e,t,i,n,r,s){let o=class extends an{constructor(){super(e,i,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).forEach(a=>{Object.defineProperty(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var l;u=it(a,u,t),this.$$d[a]=u,(l=this.$$c)==null||l.$set({[a]:u})}})}),n.forEach(a=>{Object.defineProperty(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),s&&(o=s(o)),e.element=o,o}class ee{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){K(this,1),this.$destroy=Q}$on(t,i){if(!at(i))return Q;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!Cn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Wn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Wn);function Yn(e){ie(e,"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 Pn(e){let t,i;return{c(){t=D("span"),T(t,"class",i=Ce(`Icon ${e[0]} ${e[1]}`)+" svelte-yh1nwn")},m(n,r){F(n,t,r)},p(n,[r]){r&3&&i!==(i=Ce(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&T(t,"class",i)},i:Q,o:Q,d(n){n&&R(t)}}}function Vn(e,t,i){let{className:n=""}=t,{iconLaClassName:r}=t;return e.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class be extends ee{constructor(t){super(),j(this,t,Vn,Pn,Z,{className:0,iconLaClassName:1},Yn)}}const Me=[];function Qn(e,t){return{subscribe:ce(e,t).subscribe}}function ce(e,t=Q){let i;const n=new Set;function r(a){if(Z(e,a)&&(e=a,i)){const u=!Me.length;for(const l of n)l[1](),Me.push(l,e);if(u){for(let l=0;l<Me.length;l+=2)Me[l][0](Me[l+1]);Me.length=0}}}function s(a){r(a(e))}function o(a,u=Q){const l=[a,u];return n.add(l),n.size===1&&(i=t(r,s)||Q),a(e),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}function Zn(e,t,i){const n=!Array.isArray(e),r=n?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return Qn(i,(o,a)=>{let u=!1;const l=[];let c=0,d=Q;const f=()=>{if(c)return;d();const m=t(n?l[0]:l,o,a);s?o(m):d=at(m)?m:Q},g=r.map((m,_)=>ye(m,y=>{l[_]=y,c&=~(1<<_),u&&f()},()=>{c|=1<<_}));return u=!0,f(),function(){we(g),d(),u=!1}})}const Xn={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"}}},qn={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:Xn,warnOnMissingMessages:!0},jn=qn;let ln;function st(){return ln}function ei(e){return ln=e}function qe(){return jn}function Et(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function je(e,t=qe().fallbackLocale){const i=Et(e);return t?[...new Set([...i,...Et(t)])]:i}let $t;const ut=ce({});function ti(e){return $t[e]||null}function Lt(e){return e in $t}function ni(e,t){if(Lt(e)){const i=ti(e);if(t in i)return i[t];const n=t.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 ii(e){if(e==null)return null;const t=je(e);for(let i=0;i<t.length;i++){const n=t[i];if(Lt(n))return n}return null}function ri(e,...t){ut.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}ut.subscribe(e=>$t=e);const xt=ce(!1),St={};function si(e){St[e]=new Set}function oi(e){delete St[e]}function Ve(e){return St[e]}function ai(e){return je(e).reverse().map(t=>{const i=Ve(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function Nt(e){return je(e).reverse().some(Ve)}const We={};function un(e){if(!Nt(e))return Promise.resolve();if(e in We)return We[e];const t=ai(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>xt.set(!0),qe().loadingDelay);return We[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{oi(n),s=s.map(o=>o.default||o),ri(n,...s)}))).then(()=>{clearTimeout(i),xt.set(!1),delete We[e]}),We[e]}function It(e,t){Ve(e)||si(e);const i=Ve(e);Ve(e).has(t)||(Lt(e)||ut.update(n=>(n[e]={},n)),i.add(t))}const Je=ce("");Je.subscribe(e=>{ei(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const wt=Je.set;Je.set=e=>ii(e)&&Nt(e)?un(e).then(()=>wt(e)):wt(e);Je.update=e=>{let t=st();e(t),wt(t)};function li(e){const{formats:t,...i}=e,n=e.initialLocale||e.fallbackLocale,r=qe();return Object.assign(r,i,{initialLocale:n}),t&&("number"in t&&Object.assign(r.formats.number,t.number),"date"in t&&Object.assign(r.formats.date,t.date),"time"in t&&Object.assign(r.formats.time,t.time)),Je.set(n)}const Ae={},ui=(e,t,i)=>i&&(t in Ae||(Ae[t]={}),e in Ae[t]||(Ae[t][e]=i),i),ci=(e,t)=>{if(t==null)return;if(t in Ae&&e in Ae[t])return Ae[t][e];const i=je(t);for(let n=0;n<i.length;n++){const r=i[n],s=ni(r,e);if(s)return ui(e,t,s)}},di=(e,t,i={})=>{const n=typeof t=="string"?t:t.id,r=typeof t=="string"?i:t,{values:s,locale:o=e||st(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=ci(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 "${je(o).join('", "')}".${Nt(st())?`
|
|
2
2
|
|
|
3
|
-
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||n)}
|
|
3
|
+
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||n)},$e=Zn([Je,ut],([e])=>di.bind(null,e));function fi(e){return un(e||st()||qe().initialLocale)}function gi(e){ie(e,"svelte-xoajdi","span.svelte-xoajdi{margin-right:10px}")}function Bt(e){let t,i=(e[2]??"many")+"",n;return{c(){t=te("of "),n=te(i)},m(r,s){F(r,t,s),F(r,n,s)},p(r,s){s&4&&i!==(i=(r[2]??"many")+"")&&oe(n,i)},d(r){r&&(R(t),R(n))}}}function hi(e){let t,i,n=e[3].length+"",r,s,o,a,u,l=e[4]&&Bt(e);return{c(){t=D("span"),i=te("Showing "),r=te(n),s=P(),l&&l.c(),o=te(`
|
|
4
|
+
results
|
|
5
|
+
`),T(t,"class","svelte-xoajdi")},m(c,d){F(c,t,d),S(t,i),S(t,r),S(t,s),l&&l.m(t,null),S(t,o),a||(u=le(t,"click",e[5]),a=!0)},p(c,[d]){d&8&&n!==(n=c[3].length+"")&&oe(r,n),c[4]?l?l.p(c,d):(l=Bt(c),l.c(),l.m(t,o)):l&&(l.d(1),l=null)},i:Q,o:Q,d(c){c&&R(t),l&&l.d(),a=!1,u()}}}function mi(e,t,i){let n,r=Q,s=()=>(r(),r=ye(l,_=>i(3,n=_)),l),o,a=Q,u=()=>(a(),a=ye(c,_=>i(4,o=_)),c);e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>a());let{data:l}=t;s();let{cursor:c}=t;u();let{filter:d}=t,f=null;function g(){i(2,f=null)}async function m(){let y=await Te("api").getTicketsGridListCount({filters:d,timezoneOffset:new Date().getTimezoneOffset()});i(2,f=y.count)}return e.$$set=_=>{"data"in _&&s(i(0,l=_.data)),"cursor"in _&&u(i(1,c=_.cursor)),"filter"in _&&i(6,d=_.filter)},e.$$.update=()=>{e.$$.dirty&64&&d&&g()},[l,c,f,n,o,m,d]}class pi extends ee{constructor(t){super(),j(this,t,mi,hi,Z,{data:0,cursor:1,filter:6},gi)}}function _i(e){ie(e,"svelte-7v4n24",".Head.svelte-7v4n24.svelte-7v4n24{display:none}.headCheckbox.svelte-7v4n24.svelte-7v4n24{width:20px}button.svelte-7v4n24.svelte-7v4n24{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-7v4n24.svelte-7v4n24{font-size:16px;cursor:pointer}.rightPanel.svelte-7v4n24.svelte-7v4n24{margin-left:auto}.Sorting.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.sortButton.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-7v4n24.svelte-7v4n24{animation-name:svelte-7v4n24-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-7v4n24-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-7v4n24.svelte-7v4n24{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin:6px 23px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif}.headCheckbox.svelte-7v4n24 input[type=checkbox].svelte-7v4n24{vertical-align:middle;cursor:pointer}}")}function vi(e){let t,i;return t=new be({props:{iconLaClassName:"la-move-down"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function yi(e){let t,i;return t=new be({props:{iconLaClassName:"la-move-up"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function bi(e){let t,i,n,r,s,o=e[7]("Importance")+"",a,u,l,c,d,f,g,m,_,y,v,x,O,G,A;const k=[yi,vi],J=[];function V(z,E){return z[5]?0:1}return c=V(e),d=J[c]=k[c](e),m=new pi({props:{cursor:e[3],data:e[2],filter:e[4]}}),v=new be({props:{iconLaClassName:"la-refresh"}}),{c(){t=D("div"),i=D("div"),n=D("input"),r=P(),s=D("button"),a=te(o),u=P(),l=D("button"),d.c(),f=P(),g=D("div"),H(m.$$.fragment),_=P(),y=D("button"),H(v.$$.fragment),T(n,"type","checkbox"),T(n,"class","svelte-7v4n24"),T(i,"class","headCheckbox svelte-7v4n24"),T(s,"class","Sorting svelte-7v4n24"),T(l,"class","sortButton svelte-7v4n24"),T(y,"class","spinner svelte-7v4n24"),T(y,"title",x=e[7]("Reload")),zt(y,"loading",e[8]),T(g,"class","rightPanel svelte-7v4n24"),T(t,"class","Head svelte-7v4n24")},m(z,E){F(z,t,E),S(t,i),S(i,n),n.checked=e[6],S(t,r),S(t,s),S(s,a),S(t,u),S(t,l),J[c].m(l,null),S(t,f),S(t,g),B(m,g,null),S(g,_),S(g,y),B(v,y,null),O=!0,G||(A=[le(n,"change",e[14]),le(n,"click",e[11]),le(s,"click",e[12]),le(l,"click",e[15]),le(y,"click",e[16])],G=!0)},p(z,[E]){E&64&&(n.checked=z[6]),(!O||E&128)&&o!==(o=z[7]("Importance")+"")&&oe(a,o);let I=c;c=V(z),c!==I&&(he(),L(J[I],1,1,()=>{J[I]=null}),me(),d=J[c],d||(d=J[c]=k[c](z),d.c()),w(d,1),d.m(l,null));const W={};E&8&&(W.cursor=z[3]),E&4&&(W.data=z[2]),E&16&&(W.filter=z[4]),m.$set(W),(!O||E&128&&x!==(x=z[7]("Reload")))&&T(y,"title",x),(!O||E&256)&&zt(y,"loading",z[8])},i(z){O||(w(d),w(m.$$.fragment,z),w(v.$$.fragment,z),O=!0)},o(z){L(d),L(m.$$.fragment,z),L(v.$$.fragment,z),O=!1},d(z){z&&R(t),J[c].d(),K(m),K(v),G=!1,we(A)}}}function wi(e,t,i){let n,r=Q,s=()=>(r(),r=ye(m,W=>i(5,n=W)),m),o,a=Q,u=()=>(a(),a=ye(_,W=>i(6,o=W)),_),l,c=Q,d=()=>(c(),c=ye(y,W=>i(17,l=W)),y),f,g;ne(e,$e,W=>i(7,f=W)),e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>a()),e.$$.on_destroy.push(()=>c());let{direction:m}=t;s();let{selectedAll:_}=t;u();let{data:y}=t;d();let{cursor:v}=t,{filters:x}=t;const O=Te("loadMoreFunction"),G=Te("loading");ne(e,G,W=>i(8,g=W));const A=on();function k(){_e(y,l=l.map(W=>(W.__selected=!o,W)),l)}function J(){A("openModal")}const V=()=>{_e(m,n=!n,n)};function z(){o=this.checked,_.set(o)}const E=()=>V(),I=()=>O(!0);return e.$$set=W=>{"direction"in W&&s(i(0,m=W.direction)),"selectedAll"in W&&u(i(1,_=W.selectedAll)),"data"in W&&d(i(2,y=W.data)),"cursor"in W&&i(3,v=W.cursor),"filters"in W&&i(4,x=W.filters)},[m,_,y,v,x,n,o,f,g,O,G,k,J,V,z,E,I]}class ki extends ee{constructor(t){super(),j(this,t,wi,bi,Z,{direction:0,selectedAll:1,data:2,cursor:3,filters:4},_i)}}function ot(e){switch(e){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)"}}const Ti=()=>{const e=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],t=Math.floor(Math.random()*e.length);return e[t]},Ci=e=>{let t=e.split(" ");return t.length>1?t=t.shift().charAt(0)+t.pop().charAt(0):t=e.substring(0,2),t.toUpperCase()};function $i(e){ie(e,"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 Li(e){let t;return{c(){t=D("div"),t.textContent=`${e[10]}`,T(t,"class","innerInitials svelte-hbozhk")},m(i,n){F(i,t,n)},p:Q,d(i){i&&R(t)}}}function Si(e){let t,i,n,r,s,o;return{c(){t=D("div"),i=D("img"),T(i,"alt",""),T(i,"class",Ce("innerImage")+" svelte-hbozhk"),pt(i.src,n=e[2])||T(i,"src",n),T(t,"class",r=Ce(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){F(a,t,u),S(t,i),s||(o=[le(i,"error",e[15]),le(i,"load",e[16])],s=!0)},p(a,u){u&4&&!pt(i.src,n=a[2])&&T(i,"src",n),u&256&&r!==(r=Ce(a[8]?"imageLoading":"")+" svelte-hbozhk")&&T(t,"class",r)},d(a){a&&R(t),s=!1,we(o)}}}function Ni(e){let t,i;function n(o,a){return o[2]&&!o[7]?Si:Li}let r=n(e),s=r(e);return{c(){t=D("div"),s.c(),T(t,"aria-label",e[1]),T(t,"class","wrapper svelte-hbozhk"),T(t,"style",i=e[0]+"--borderRadius:"+(e[6]?0:e[5])+"; --size:"+e[4]+"; --bgColor:"+e[9]+"; --src:"+e[2]+"; --textColor:"+e[3]+"; --abbrLength:"+e[11])},m(o,a){F(o,t,a),s.m(t,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(t,null))),a&2&&T(t,"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])&&T(t,"style",i)},i:Q,o:Q,d(o){o&&R(t),s.d()}}}function Di(e,t,i){let{style:n=""}=t,{name:r="Avatar"}=t,{initials:s}=t,{src:o}=t,{bgColor:a="lightGrey"}=t,{textColor:u="white"}=t,{size:l="50px"}=t,{borderRadius:c="50%"}=t,{square:d=!1}=t,{randomBgColor:f=!1}=t;const g=f?Ti():a,m=s||Ci(r),_=m.length;let y=!1,v=!0;const x=()=>i(7,y=!0),O=()=>i(8,v=!1);return e.$$set=G=>{"style"in G&&i(0,n=G.style),"name"in G&&i(1,r=G.name),"initials"in G&&i(12,s=G.initials),"src"in G&&i(2,o=G.src),"bgColor"in G&&i(13,a=G.bgColor),"textColor"in G&&i(3,u=G.textColor),"size"in G&&i(4,l=G.size),"borderRadius"in G&&i(5,c=G.borderRadius),"square"in G&&i(6,d=G.square),"randomBgColor"in G&&i(14,f=G.randomBgColor)},[n,r,o,u,l,c,d,y,v,g,m,_,s,a,f,x,O]}class Ai extends ee{constructor(t){super(),j(this,t,Di,Ni,Z,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},$i)}}var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dn={exports:{}},fn={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={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 t.rotl(i,8)&16711935|t.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=t.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(e.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((e.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(i.charAt(r))>>>6-s*2);return n}};fn.exports=t})();var Oi=fn.exports,kt={utf8:{stringToBytes:function(e){return kt.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(kt.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i)&255);return t},bytesToString:function(e){for(var t=[],i=0;i<e.length;i++)t.push(String.fromCharCode(e[i]));return t.join("")}}},Kt=kt;/*!
|
|
4
6
|
* Determine if an object is a Buffer
|
|
5
7
|
*
|
|
6
8
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
7
9
|
* @license MIT
|
|
8
|
-
*/var mi=function(e){return e!=null&&(sn(e)||hi(e)||!!e._isBuffer)};function sn(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function hi(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&sn(e.slice(0,0))}(function(){var e=gi,t=zt.utf8,i=mi,n=zt.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=t.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,g=271733878,f=0;f<a.length;f++)a[f]=(a[f]<<8|a[f]>>>24)&16711935|(a[f]<<24|a[f]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var p=r._ff,h=r._gg,b=r._hh,k=r._ii,f=0;f<a.length;f+=16){var y=l,O=c,D=d,F=g;l=p(l,c,d,g,a[f+0],7,-680876936),g=p(g,l,c,d,a[f+1],12,-389564586),d=p(d,g,l,c,a[f+2],17,606105819),c=p(c,d,g,l,a[f+3],22,-1044525330),l=p(l,c,d,g,a[f+4],7,-176418897),g=p(g,l,c,d,a[f+5],12,1200080426),d=p(d,g,l,c,a[f+6],17,-1473231341),c=p(c,d,g,l,a[f+7],22,-45705983),l=p(l,c,d,g,a[f+8],7,1770035416),g=p(g,l,c,d,a[f+9],12,-1958414417),d=p(d,g,l,c,a[f+10],17,-42063),c=p(c,d,g,l,a[f+11],22,-1990404162),l=p(l,c,d,g,a[f+12],7,1804603682),g=p(g,l,c,d,a[f+13],12,-40341101),d=p(d,g,l,c,a[f+14],17,-1502002290),c=p(c,d,g,l,a[f+15],22,1236535329),l=h(l,c,d,g,a[f+1],5,-165796510),g=h(g,l,c,d,a[f+6],9,-1069501632),d=h(d,g,l,c,a[f+11],14,643717713),c=h(c,d,g,l,a[f+0],20,-373897302),l=h(l,c,d,g,a[f+5],5,-701558691),g=h(g,l,c,d,a[f+10],9,38016083),d=h(d,g,l,c,a[f+15],14,-660478335),c=h(c,d,g,l,a[f+4],20,-405537848),l=h(l,c,d,g,a[f+9],5,568446438),g=h(g,l,c,d,a[f+14],9,-1019803690),d=h(d,g,l,c,a[f+3],14,-187363961),c=h(c,d,g,l,a[f+8],20,1163531501),l=h(l,c,d,g,a[f+13],5,-1444681467),g=h(g,l,c,d,a[f+2],9,-51403784),d=h(d,g,l,c,a[f+7],14,1735328473),c=h(c,d,g,l,a[f+12],20,-1926607734),l=b(l,c,d,g,a[f+5],4,-378558),g=b(g,l,c,d,a[f+8],11,-2022574463),d=b(d,g,l,c,a[f+11],16,1839030562),c=b(c,d,g,l,a[f+14],23,-35309556),l=b(l,c,d,g,a[f+1],4,-1530992060),g=b(g,l,c,d,a[f+4],11,1272893353),d=b(d,g,l,c,a[f+7],16,-155497632),c=b(c,d,g,l,a[f+10],23,-1094730640),l=b(l,c,d,g,a[f+13],4,681279174),g=b(g,l,c,d,a[f+0],11,-358537222),d=b(d,g,l,c,a[f+3],16,-722521979),c=b(c,d,g,l,a[f+6],23,76029189),l=b(l,c,d,g,a[f+9],4,-640364487),g=b(g,l,c,d,a[f+12],11,-421815835),d=b(d,g,l,c,a[f+15],16,530742520),c=b(c,d,g,l,a[f+2],23,-995338651),l=k(l,c,d,g,a[f+0],6,-198630844),g=k(g,l,c,d,a[f+7],10,1126891415),d=k(d,g,l,c,a[f+14],15,-1416354905),c=k(c,d,g,l,a[f+5],21,-57434055),l=k(l,c,d,g,a[f+12],6,1700485571),g=k(g,l,c,d,a[f+3],10,-1894986606),d=k(d,g,l,c,a[f+10],15,-1051523),c=k(c,d,g,l,a[f+1],21,-2054922799),l=k(l,c,d,g,a[f+8],6,1873313359),g=k(g,l,c,d,a[f+15],10,-30611744),d=k(d,g,l,c,a[f+6],15,-1560198380),c=k(c,d,g,l,a[f+13],21,1309151649),l=k(l,c,d,g,a[f+4],6,-145523070),g=k(g,l,c,d,a[f+11],10,-1120210379),d=k(d,g,l,c,a[f+2],15,718787259),c=k(c,d,g,l,a[f+9],21,-343485551),l=l+y>>>0,c=c+O>>>0,d=d+D>>>0,g=g+F>>>0}return e.endian([l,c,d,g])};r._ff=function(s,o,a,u,l,c,d){var g=s+(o&a|~o&u)+(l>>>0)+d;return(g<<c|g>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var g=s+(o&u|a&~u)+(l>>>0)+d;return(g<<c|g>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var g=s+(o^a^u)+(l>>>0)+d;return(g<<c|g>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var g=s+(a^(o|~u))+(l>>>0)+d;return(g<<c|g>>>32-c)+o},r._blocksize=16,r._digestsize=16,nn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):e.bytesToHex(a)}})();var pi=nn.exports;const _i=Tt(pi);function vi(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function yi(e){se(e,"svelte-1p23x6g",".Column.svelte-1p23x6g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function bi(e){let t,i,n;const r=e[2].default,s=$e(r,e,e[1],null);return{c(){t=$("div"),s&&s.c(),N(t,"class",i="Column "+e[0]+" svelte-1p23x6g")},m(o,a){B(o,t,a),s&&s.m(t,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Me(s,r,o,o[1],n?ze(r,o[1],a,null):Ge(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1p23x6g"))&&N(t,"class",i)},i(o){n||(S(s,o),n=!0)},o(o){R(s,o),n=!1},d(o){o&&J(t),s&&s.d(o)}}}function ki(e,t,i){let{$$slots:n={},$$scope:r}=t,{className:s=""}=t;return e.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class Ct extends te{constructor(t){super(),ee(this,t,ki,bi,j,{className:0},yi)}}function wi(e){se(e,"svelte-1d2a8s6",'.Tag.svelte-1d2a8s6{display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-1d2a8s6:before{font-family:"la-icon-font"}.SLA.svelte-1d2a8s6{border:1px solid #CFD6DD;border-radius:4px}')}function Ti(e){let t,i,n,r,s,o;const a=e[4].default,u=$e(a,e,e[3],null);return{c(){t=$("div"),u&&u.c(),i=Y(),n=$("span"),r=q(e[0]),N(n,"class","text"),N(t,"class",s="Tag "+e[1]+" svelte-1d2a8s6"),N(t,"style",e[2])},m(l,c){B(l,t,c),u&&u.m(t,null),C(t,i),C(t,n),C(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Me(u,a,l,l[3],o?ze(a,l[3],c,null):Ge(l[3]),null),(!o||c&1)&&ie(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&N(t,"class",s),(!o||c&4)&&N(t,"style",l[2])},i(l){o||(S(u,l),o=!0)},o(l){R(u,l),o=!1},d(l){l&&J(t),u&&u.d(l)}}}function Ci(e,t,i){let{$$slots:n={},$$scope:r}=t,{text:s}=t,{className:o=""}=t,{style:a=""}=t;return e.$$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 rt extends te{constructor(t){super(),ee(this,t,Ci,Ti,j,{text:0,className:1,style:2},wi)}}function Li(e){se(e,"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 Ni(e){let t,i;return t=new ye({props:{iconLaClassName:e[2]}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Si(e){let t,i;return t=new rt({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[Ni]},$$scope:{ctx:e}}}),{c(){W(t.$$.fragment)},m(n,r){H(t,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}),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Di(e,t,i){let{text:n}=t,{className:r=""}=t,{style:s=""}=t,{iconLaClassName:o}=t,a=`IconTag ${r}`;return e.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class st extends te{constructor(t){super(),ee(this,t,Di,Si,j,{text:0,className:4,style:1,iconLaClassName:2},Li)}}function Ai(e){se(e,"svelte-d2fkh2",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-d2fkh2{display:none}.companyTag.svelte-d2fkh2{display:none}.name.svelte-d2fkh2{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;border-right:1px solid var(--main-textcolor)}.email.svelte-d2fkh2{font-size:13px;line-height:20px;padding-left:6px}.texts.svelte-d2fkh2{display:flex;flex-direction:row;justify-content:flex-start}@media(min-width: 900px){.avatar.svelte-d2fkh2{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-d2fkh2{padding:0;border:none}.email.svelte-d2fkh2{padding:0}.companyTag.svelte-d2fkh2{display:flex}.texts.svelte-d2fkh2{display:flex;flex-direction:column;justify-content:center}}")}function Mt(e){let t,i;return t=new fi({props:{bgColor:e[3](e[0]),name:Qe(e[0]),src:e[2](e[0])}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[3](n[0])),r&1&&(s.name=Qe(n[0])),r&1&&(s.src=n[2](n[0])),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Ri(e){let t,i=[e[3](e[0]),Qe(e[0]),e[2](e[0])],n,r,s,o,a,u=e[0].emails+"",l,c,d,g,f,p=Mt(e);return g=new st({props:{text:e[0].company==="Y"?"Company":"No Company",className:(e[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){t=$("div"),p.c(),n=Y(),r=$("div"),s=$("div"),s.textContent=`${name}`,o=Y(),a=$("div"),l=q(u),c=Y(),d=$("div"),W(g.$$.fragment),N(t,"class","avatar svelte-d2fkh2"),N(s,"class","name svelte-d2fkh2"),N(a,"class","email svelte-d2fkh2"),N(d,"class","companyTag svelte-d2fkh2"),N(r,"class","texts svelte-d2fkh2")},m(h,b){B(h,t,b),p.m(t,null),B(h,n,b),B(h,r,b),C(r,s),C(r,o),C(r,a),C(a,l),C(r,c),C(r,d),H(g,d,null),f=!0},p(h,b){b&1&&j(i,i=[h[3](h[0]),Qe(h[0]),h[2](h[0])])?(he(),R(p,1,1,V),pe(),p=Mt(h),p.c(),S(p,1),p.m(t,null)):p.p(h,b),(!f||b&1)&&u!==(u=h[0].emails+"")&&ie(l,u);const k={};b&1&&(k.text=h[0].company==="Y"?"Company":"No Company"),b&1&&(k.className=(h[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),g.$set(k)},i(h){f||(S(p),S(g.$$.fragment,h),f=!0)},o(h){R(p),R(g.$$.fragment,h),f=!1},d(h){h&&J(t),p.d(h),h&&J(n),h&&J(r),U(g)}}}function Oi(e){let t,i;return t=new Ct({props:{className:e[1],$$slots:{default:[Ri]},$$scope:{ctx:e}}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&17&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Qe(e){if(!e)return"";let t=e.firstname+" "+e.lastname;return t.trim()||(t=e.systemName),t}function Fi(e,t,i){let{row:n}=t,{className:r="userColumn"}=t;function s(a){let u=a.avatarUrl;return u||(u="https://www.gravatar.com/avatar/"+_i(a.emails[0]??"")+"?s=200&d=404"),u}function o(a){let u;a?u=vi(Qe(a)+a.emails):u=Math.floor(Math.random()*16777215);let l=(u&16711680)>>16,c=(u&65280)>>8,d=u&255;return l+c+d<150&&(l=150),l+c+d>400&&(l=0),`rgb(${l},${c},${d})`}return e.$$set=a=>{"row"in a&&i(0,n=a.row),"className"in a&&i(1,r=a.className)},[n,r,s,o]}class $i extends te{constructor(t){super(),ee(this,t,Fi,Oi,j,{row:0,className:1},Ai)}}var on={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(tn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",g="quarter",f="year",p="date",h="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|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,y={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(G){var w=["th","st","nd","rd"],L=G%100;return"["+G+(w[(L-20)%10]||w[L]||w[0])+"]"}},O=function(G,w,L){var _=String(G);return!_||_.length>=w?G:""+Array(w+1-_.length).join(L)+G},D={s:O,z:function(G){var w=-G.utcOffset(),L=Math.abs(w),_=Math.floor(L/60),v=L%60;return(w<=0?"+":"-")+O(_,2,"0")+":"+O(v,2,"0")},m:function G(w,L){if(w.date()<L.date())return-G(L,w);var _=12*(L.year()-w.year())+(L.month()-w.month()),v=w.clone().add(_,d),T=L-v<0,M=w.clone().add(_+(T?-1:1),d);return+(-(_+(L-v)/(T?v-M:M-v))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:d,y:f,w:c,d:l,D:p,h:u,m:a,s:o,ms:s,Q:g}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},F="en",I={};I[F]=y;var x=function(G){return G instanceof K},Q=function G(w,L,_){var v;if(!w)return F;if(typeof w=="string"){var T=w.toLowerCase();I[T]&&(v=T),L&&(I[T]=L,v=T);var M=w.split("-");if(!v&&M.length>1)return G(M[0])}else{var Z=w.name;I[Z]=w,v=Z}return!_&&v&&(F=v),v||!_&&F},A=function(G,w){if(x(G))return G.clone();var L=typeof w=="object"?w:{};return L.date=G,L.args=arguments,new K(L)},z=D;z.l=Q,z.i=x,z.w=function(G,w){return A(G,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var K=function(){function G(L){this.$L=Q(L.locale,null,!0),this.parse(L)}var w=G.prototype;return w.parse=function(L){this.$d=function(_){var v=_.date,T=_.utc;if(v===null)return new Date(NaN);if(z.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var M=v.match(b);if(M){var Z=M[2]-1||0,re=(M[7]||"0").substring(0,3);return T?new Date(Date.UTC(M[1],Z,M[3]||1,M[4]||0,M[5]||0,M[6]||0,re)):new Date(M[1],Z,M[3]||1,M[4]||0,M[5]||0,M[6]||0,re)}}return new Date(v)}(L),this.$x=L.x||{},this.init()},w.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},w.$utils=function(){return z},w.isValid=function(){return this.$d.toString()!==h},w.isSame=function(L,_){var v=A(L);return this.startOf(_)<=v&&v<=this.endOf(_)},w.isAfter=function(L,_){return A(L)<this.startOf(_)},w.isBefore=function(L,_){return this.endOf(_)<A(L)},w.$g=function(L,_,v){return z.u(L)?this[_]:this.set(v,L)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(L,_){var v=this,T=!!z.u(_)||_,M=z.p(L),Z=function(Le,le){var ke=z.w(v.$u?Date.UTC(v.$y,le,Le):new Date(v.$y,le,Le),v);return T?ke:ke.endOf(l)},re=function(Le,le){return z.w(v.toDate()[Le].apply(v.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(le)),v)},ne=this.$W,ae=this.$M,be=this.$D,_e="set"+(this.$u?"UTC":"");switch(M){case f:return T?Z(1,0):Z(31,11);case d:return T?Z(1,ae):Z(0,ae+1);case c:var xe=this.$locale().weekStart||0,Ke=(ne<xe?ne+7:ne)-xe;return Z(T?be-Ke:be+(6-Ke),ae);case l:case p:return re(_e+"Hours",0);case u:return re(_e+"Minutes",1);case a:return re(_e+"Seconds",2);case o:return re(_e+"Milliseconds",3);default:return this.clone()}},w.endOf=function(L){return this.startOf(L,!1)},w.$set=function(L,_){var v,T=z.p(L),M="set"+(this.$u?"UTC":""),Z=(v={},v[l]=M+"Date",v[p]=M+"Date",v[d]=M+"Month",v[f]=M+"FullYear",v[u]=M+"Hours",v[a]=M+"Minutes",v[o]=M+"Seconds",v[s]=M+"Milliseconds",v)[T],re=T===l?this.$D+(_-this.$W):_;if(T===d||T===f){var ne=this.clone().set(p,1);ne.$d[Z](re),ne.init(),this.$d=ne.set(p,Math.min(this.$D,ne.daysInMonth())).$d}else Z&&this.$d[Z](re);return this.init(),this},w.set=function(L,_){return this.clone().$set(L,_)},w.get=function(L){return this[z.p(L)]()},w.add=function(L,_){var v,T=this;L=Number(L);var M=z.p(_),Z=function(ae){var be=A(T);return z.w(be.date(be.date()+Math.round(ae*L)),T)};if(M===d)return this.set(d,this.$M+L);if(M===f)return this.set(f,this.$y+L);if(M===l)return Z(1);if(M===c)return Z(7);var re=(v={},v[a]=n,v[u]=r,v[o]=i,v)[M]||1,ne=this.$d.getTime()+L*re;return z.w(ne,this)},w.subtract=function(L,_){return this.add(-1*L,_)},w.format=function(L){var _=this,v=this.$locale();if(!this.isValid())return v.invalidDate||h;var T=L||"YYYY-MM-DDTHH:mm:ssZ",M=z.z(this),Z=this.$H,re=this.$m,ne=this.$M,ae=v.weekdays,be=v.months,_e=function(le,ke,at,qe){return le&&(le[ke]||le(_,T))||at[ke].slice(0,qe)},xe=function(le){return z.s(Z%12||12,le,"0")},Ke=v.meridiem||function(le,ke,at){var qe=le<12?"AM":"PM";return at?qe.toLowerCase():qe},Le={YY:String(this.$y).slice(-2),YYYY:z.s(this.$y,4,"0"),M:ne+1,MM:z.s(ne+1,2,"0"),MMM:_e(v.monthsShort,ne,be,3),MMMM:_e(be,ne),D:this.$D,DD:z.s(this.$D,2,"0"),d:String(this.$W),dd:_e(v.weekdaysMin,this.$W,ae,2),ddd:_e(v.weekdaysShort,this.$W,ae,3),dddd:ae[this.$W],H:String(Z),HH:z.s(Z,2,"0"),h:xe(1),hh:xe(2),a:Ke(Z,re,!0),A:Ke(Z,re,!1),m:String(re),mm:z.s(re,2,"0"),s:String(this.$s),ss:z.s(this.$s,2,"0"),SSS:z.s(this.$ms,3,"0"),Z:M};return T.replace(k,function(le,ke){return ke||Le[le]||M.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(L,_,v){var T,M=z.p(_),Z=A(L),re=(Z.utcOffset()-this.utcOffset())*n,ne=this-Z,ae=z.m(this,Z);return ae=(T={},T[f]=ae/12,T[d]=ae,T[g]=ae/3,T[c]=(ne-re)/6048e5,T[l]=(ne-re)/864e5,T[u]=ne/r,T[a]=ne/n,T[o]=ne/i,T)[M]||ne,v?ae:z.a(ae)},w.daysInMonth=function(){return this.endOf(d).$D},w.$locale=function(){return I[this.$L]},w.locale=function(L,_){if(!L)return this.$L;var v=this.clone(),T=Q(L,_,!0);return T&&(v.$L=T),v},w.clone=function(){return z.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},G}(),P=K.prototype;return A.prototype=P,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",f],["$D",p]].forEach(function(G){P[G[1]]=function(w){return this.$g(w,G[0],G[1])}}),A.extend=function(G,w){return G.$i||(G(w,K,A),G.$i=!0),A},A.locale=Q,A.isDayjs=x,A.unix=function(G){return A(1e3*G)},A.en=I[F],A.Ls=I,A.p={},A})})(on);var zi=on.exports;const Je=Tt(zi);var an={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(tn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,g){return s.fromToBase(l,c,d,g)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,g,f){for(var p,h,b,k=d.$locale().relativeTime||o,y=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"}],O=y.length,D=0;D<O;D+=1){var F=y[D];F.d&&(p=g?r(l).diff(d,F.d,!0):d.diff(l,F.d,!0));var I=(i.rounding||Math.round)(Math.abs(p));if(b=p>0,I<=F.r||!F.r){I<=1&&D>0&&(F=y[D-1]);var x=k[F.l];f&&(I=f(""+I)),h=typeof x=="string"?x.replace("%d",I):x(I,c,F.l,b);break}}if(c)return h;var Q=b?k.future:k.past;return typeof Q=="function"?Q(h):Q.replace("%s",h)},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)}}})})(an);var Mi=an.exports;const Gi=Tt(Mi);Je.extend(Gi);function Ei(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=et(r,n[s]);return{c(){t=$("time"),i=q(e[0]),At(t,r)},m(s,o){B(s,t,o),C(t,i)},p(s,[o]){o&1&&wn(i,s[0],r.contenteditable),At(t,r=An(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:V,o:V,d(s){s&&J(t)}}}function Ii(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=St(t,r),{timestamp:o=new Date().toISOString()}=t,{format:a="MMM DD, YYYY"}=t,{relative:u=!1}=t,{live:l=!1}=t,{formatted:c=""}=t,d;const g=60*1e3;return qt(()=>(u&&l!==!1&&(d=setInterval(()=>{i(0,c=Je(o).from())},Math.abs(typeof l=="number"?l:g))),()=>{typeof d=="number"&&clearInterval(d)})),e.$$set=f=>{t=et(et({},t),mn(f)),i(3,s=St(t,r)),"timestamp"in f&&i(1,o=f.timestamp),"format"in f&&i(4,a=f.format),"relative"in f&&i(5,u=f.relative),"live"in f&&i(6,l=f.live),"formatted"in f&&i(0,c=f.formatted)},e.$$.update=()=>{e.$$.dirty&50&&i(0,c=u?Je(o).from():Je(o).format(a)),e.$$.dirty&50&&i(2,n=u?Je(o).format(a):void 0)},[c,o,n,s,a,u,l]}class xi extends te{constructor(t){super(),ee(this,t,Ii,Ei,j,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Ki(e){se(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Bi(e){let t;return{c(){t=$("span"),t.textContent="Invalid data",N(t,"class","invalid svelte-1o3wy2t")},m(i,n){B(i,t,n)},p:V,i:V,o:V,d(i){i&&J(t)}}}function Ji(e){let t,i;return t=new xi({props:{style:e[2],timestamp:e[0],format:e[1],relative:e[3]}}),{c(){W(t.$$.fragment)},m(n,r){H(t,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]),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Ui(e){let t,i,n,r,s;const o=[Ji,Bi],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(e,-1),r=a[n]=o[n](e),{c(){t=$("div"),r.c(),N(t,"class","Date svelte-1o3wy2t")},m(l,c){B(l,t,c),a[n].m(t,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(he(),R(a[d],1,1,()=>{a[d]=null}),pe(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),S(r,1),r.m(t,null))},i(l){s||(S(r),s=!0)},o(l){R(r),s=!1},d(l){l&&J(t),a[n].d()}}}function Hi(e,t,i){let{data:n}=t,{format:r=""}=t,{style:s=""}=t,{relative:o=!1}=t;return e.$$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 ln extends te{constructor(t){super(),ee(this,t,Hi,Ui,j,{data:0,format:1,style:2,relative:3},Ki)}}function Wi(e){se(e,"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 Yi(e){let t,i,n,r;i=new ye({props:{iconLaClassName:e[2]}});const s=e[8].default,o=$e(s,e,e[7],null);return{c(){t=$("div"),W(i.$$.fragment),n=Y(),o&&o.c(),N(t,"class","IconWrapper svelte-1wdh20c")},m(a,u){B(a,t,u),H(i,t,null),B(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Me(o,s,a,a[7],r?ze(s,a[7],u,null):Ge(a[7]),null)},i(a){r||(S(i.$$.fragment,a),S(o,a),r=!0)},o(a){R(i.$$.fragment,a),R(o,a),r=!1},d(a){a&&J(t),U(i),a&&J(n),o&&o.d(a)}}}function Vi(e){let t,i;return t=new st({props:{style:e[3],text:e[0],iconLaClassName:e[2],className:"Combined"}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Qi(e){let t,i,n,r,s,o;const a=[Vi,Yi],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(e),n=u[i]=a[i](e),s=new rt({props:{style:e[4],text:e[1]}}),{c(){t=$("div"),n.c(),r=Y(),W(s.$$.fragment),N(t,"class",we(e[5])+" svelte-1wdh20c")},m(c,d){B(c,t,d),u[i].m(t,null),C(t,r),H(s,t,null),o=!0},p(c,[d]){let g=i;i=l(c),i===g?u[i].p(c,d):(he(),R(u[g],1,1,()=>{u[g]=null}),pe(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),S(n,1),n.m(t,r));const f={};d&16&&(f.style=c[4]),d&2&&(f.text=c[1]),s.$set(f)},i(c){o||(S(n),S(s.$$.fragment,c),o=!0)},o(c){R(n),R(s.$$.fragment,c),o=!1},d(c){c&&J(t),u[i].d(),U(s)}}}function Zi(e,t,i){let{$$slots:n={},$$scope:r}=t,{iconText:s=""}=t,{tagText:o}=t,{iconLaClassName:a}=t,{className:u}=t,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return e.$$set=g=>{"iconText"in g&&i(0,s=g.iconText),"tagText"in g&&i(1,o=g.tagText),"iconLaClassName"in g&&i(2,a=g.iconLaClassName),"className"in g&&i(6,u=g.className),"$$scope"in g&&i(7,r=g.$$scope)},[s,o,a,l,c,d,u,r,n]}class un extends te{constructor(t){super(),ee(this,t,Zi,Qi,j,{iconText:0,tagText:1,iconLaClassName:2,className:6},Wi)}}function Pi(e){let t,i;return t=new ln({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:e[1],relative:!0}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function qi(e){let t,i;return t=new un({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[Pi]},$$scope:{ctx:e}}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Xi(e,t,i){let n,{tagText:r}=t,{due:s}=t,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return e.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},e.$$.update=()=>{e.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class ji extends te{constructor(t){super(),ee(this,t,Xi,qi,j,{tagText:0,due:1})}}function er(e){se(e,"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 tr(e){let t,i;return t=new rt({props:{text:"No SLA",className:"SLA"}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p:V,i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function nr(e){let t,i;return t=new ji({props:{tagText:"First answer",due:e[1].datedue}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function ir(e){let t,i=e[1].code+"",n,r,s,o,a,u,l=e[1].messagegroupsIn+"",c,d,g,f,p,h,b=e[1].messagegroupsOut+"",k,y,O,D,F,I,x,Q,A,z,K,P;o=new ye({props:{iconLaClassName:"la-incoming"}}),f=new ye({props:{iconLaClassName:"la-outgoing"}}),I=new ln({props:{data:e[1].datecreated,format:e[2]}});const G=[nr,tr],w=[];function L(_,v){return v&2&&(Q=null),Q==null&&(Q=_[1].datedue instanceof Date&&!isNaN(_[1].datedue)),Q?0:1}return A=L(e,-1),z=w[A]=G[A](e),{c(){t=$("span"),n=q(i),r=Y(),s=$("div"),W(o.$$.fragment),a=Y(),u=$("span"),c=q(l),d=Y(),g=$("div"),W(f.$$.fragment),p=Y(),h=$("span"),k=q(b),y=Y(),O=$("div"),D=$("span"),D.textContent=`${e[3]}:`,F=Y(),W(I.$$.fragment),x=Y(),z.c(),K=vn(),N(t,"class","TicketId svelte-rl80em"),N(s,"class","Communication incomingMessages svelte-rl80em"),N(g,"class","Communication outgoingMessages svelte-rl80em"),N(O,"class","Created svelte-rl80em")},m(_,v){B(_,t,v),C(t,n),B(_,r,v),B(_,s,v),H(o,s,null),C(s,a),C(s,u),C(u,c),B(_,d,v),B(_,g,v),H(f,g,null),C(g,p),C(g,h),C(h,k),B(_,y,v),B(_,O,v),C(O,D),C(O,F),H(I,O,null),B(_,x,v),w[A].m(_,v),B(_,K,v),P=!0},p(_,v){(!P||v&2)&&i!==(i=_[1].code+"")&&ie(n,i),(!P||v&2)&&l!==(l=_[1].messagegroupsIn+"")&&ie(c,l),(!P||v&2)&&b!==(b=_[1].messagegroupsOut+"")&&ie(k,b);const T={};v&2&&(T.data=_[1].datecreated),v&4&&(T.format=_[2]),I.$set(T);let M=A;A=L(_,v),A===M?w[A].p(_,v):(he(),R(w[M],1,1,()=>{w[M]=null}),pe(),z=w[A],z?z.p(_,v):(z=w[A]=G[A](_),z.c()),S(z,1),z.m(K.parentNode,K))},i(_){P||(S(o.$$.fragment,_),S(f.$$.fragment,_),S(I.$$.fragment,_),S(z),P=!0)},o(_){R(o.$$.fragment,_),R(f.$$.fragment,_),R(I.$$.fragment,_),R(z),P=!1},d(_){_&&J(t),_&&J(r),_&&J(s),U(o),_&&J(d),_&&J(g),U(f),_&&J(y),_&&J(O),U(I),_&&J(x),w[A].d(_),_&&J(K)}}}function rr(e){let t,i;return t=new Ct({props:{className:e[0],$$slots:{default:[ir]},$$scope:{ctx:e}}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&38&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function sr(e,t,i){let n;oe(e,Ie,u=>i(4,n=u));let{className:r="importanceColumn"}=t,{row:s}=t,{format:o="YYYY-MM-DD HH:mm:ss"}=t;const a=n("Created");return e.$$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 or extends te{constructor(t){super(),ee(this,t,sr,rr,j,{className:0,row:1,format:2},er)}}function ar(e){se(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function lr(e){let t,i;return t=new rt({props:{style:"color: #"+e[2]+"; background: #"+e[1],text:e[0],className:"TicketTag"}}),{c(){W(t.$$.fragment)},m(n,r){H(t,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]),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function ur(e,t,i){let n,r,s,o,{tagId:a}=t,u=Re("tagsMap");return oe(e,u,l=>i(5,o=l)),e.$$set=l=>{"tagId"in l&&i(4,a=l.tagId)},e.$$.update=()=>{var l,c,d;e.$$.dirty&48&&i(2,n=((l=o[a])==null?void 0:l.color)??0),e.$$.dirty&48&&i(1,r=((c=o[a])==null?void 0:c.backgroundcolor)??0),e.$$.dirty&48&&i(0,s=((d=o[a])==null?void 0:d.name)??"")},[s,r,n,u,a,o]}class cr extends te{constructor(t){super(),ee(this,t,ur,lr,j,{tagId:4},ar)}}function Gt(e,t,i){const n=e.slice();return n[1]=t[i],n}function Et(e){let t,i;return t=new cr({props:{tagId:e[1]}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function dr(e){let t,i,n=e[0],r=[];for(let o=0;o<n.length;o+=1)r[o]=Et(Gt(e,n,o));const s=o=>R(r[o],1,1,()=>{r[o]=null});return{c(){t=$("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){B(o,t,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(t,null);i=!0},p(o,[a]){if(a&1){n=o[0];let u;for(u=0;u<n.length;u+=1){const l=Gt(o,n,u);r[u]?(r[u].p(l,a),S(r[u],1)):(r[u]=Et(l),r[u].c(),S(r[u],1),r[u].m(t,null))}for(he(),u=n.length;u<r.length;u+=1)s(u);pe()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)S(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)R(r[a]);i=!1},d(o){o&&J(t),Pt(r,o)}}}function fr(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class gr extends te{constructor(t){super(),ee(this,t,fr,dr,j,{tags:0})}}function mr(e){se(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function hr(e){let t,i;return t=new st({props:{className:e[1][e[0]].text,style:"color: white; background-color: "+nt(e[0]),text:e[1][e[0]].text,iconLaClassName:e[1][e[0]].icon}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+nt(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function pr(e,t,i){let n;oe(e,Ie,o=>i(2,n=o));let{status:r}=t;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"}};return e.$$set=o=>{"status"in o&&i(0,r=o.status)},[r,s]}class _r extends te{constructor(t){super(),ee(this,t,pr,hr,j,{status:0},mr)}}function vr(e){se(e,"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 yr(e){let t,i;return t=new st({props:{className:"Department",text:e[0].departmentname,iconLaClassName:"la-department"}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function br(e){let t,i;return t=new un({props:{className:"Department",tagText:e[0].agentname,iconLaClassName:"la-department",iconText:e[0].departmentname}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function kr(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,d,g,f,p,h,b,k;c=new _r({props:{status:e[0].status}});const y=[br,yr],O=[];function D(F,I){return I&1&&(g=null),g==null&&(g=F[0].agentname.trim()!==""),g?0:1}return f=D(e,-1),p=O[f]=y[f](e),b=new gr({props:{tags:e[0].tags}}),{c(){t=$("h1"),n=q(i),r=Y(),s=$("p"),a=q(o),u=Y(),l=$("div"),W(c.$$.fragment),d=Y(),p.c(),h=Y(),W(b.$$.fragment),N(t,"class","subject svelte-nfaksv"),N(s,"class","preview svelte-nfaksv"),N(l,"class","additional svelte-nfaksv")},m(F,I){B(F,t,I),C(t,n),B(F,r,I),B(F,s,I),C(s,a),B(F,u,I),B(F,l,I),H(c,l,null),C(l,d),O[f].m(l,null),C(l,h),H(b,l,null),k=!0},p(F,I){(!k||I&1)&&i!==(i=F[0].subject+"")&&ie(n,i),(!k||I&1)&&o!==(o=F[0].preview+"")&&ie(a,o);const x={};I&1&&(x.status=F[0].status),c.$set(x);let Q=f;f=D(F,I),f===Q?O[f].p(F,I):(he(),R(O[Q],1,1,()=>{O[Q]=null}),pe(),p=O[f],p?p.p(F,I):(p=O[f]=y[f](F),p.c()),S(p,1),p.m(l,h));const A={};I&1&&(A.tags=F[0].tags),b.$set(A)},i(F){k||(S(c.$$.fragment,F),S(p),S(b.$$.fragment,F),k=!0)},o(F){R(c.$$.fragment,F),R(p),R(b.$$.fragment,F),k=!1},d(F){F&&J(t),F&&J(r),F&&J(s),F&&J(u),F&&J(l),U(c),O[f].d(),U(b)}}}function wr(e){let t,i;return t=new Ct({props:{className:e[1],$$slots:{default:[kr]},$$scope:{ctx:e}}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Tr(e,t,i){let{row:n}=t,{className:r="statusColumn"}=t;return e.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class Cr extends te{constructor(t){super(),ee(this,t,Tr,wr,j,{row:0,className:1},vr)}}function Lr(e){se(e,"svelte-8pmpj5",`.Row.svelte-8pmpj5{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
10
|
+
*/var Ri=function(e){return e!=null&&(gn(e)||Mi(e)||!!e._isBuffer)};function gn(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Mi(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&gn(e.slice(0,0))}(function(){var e=Oi,t=Kt.utf8,i=Ri,n=Kt.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=t.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=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,y=r._hh,v=r._ii,g=0;g<a.length;g+=16){var x=l,O=c,G=d,A=f;l=m(l,c,d,f,a[g+0],7,-680876936),f=m(f,l,c,d,a[g+1],12,-389564586),d=m(d,f,l,c,a[g+2],17,606105819),c=m(c,d,f,l,a[g+3],22,-1044525330),l=m(l,c,d,f,a[g+4],7,-176418897),f=m(f,l,c,d,a[g+5],12,1200080426),d=m(d,f,l,c,a[g+6],17,-1473231341),c=m(c,d,f,l,a[g+7],22,-45705983),l=m(l,c,d,f,a[g+8],7,1770035416),f=m(f,l,c,d,a[g+9],12,-1958414417),d=m(d,f,l,c,a[g+10],17,-42063),c=m(c,d,f,l,a[g+11],22,-1990404162),l=m(l,c,d,f,a[g+12],7,1804603682),f=m(f,l,c,d,a[g+13],12,-40341101),d=m(d,f,l,c,a[g+14],17,-1502002290),c=m(c,d,f,l,a[g+15],22,1236535329),l=_(l,c,d,f,a[g+1],5,-165796510),f=_(f,l,c,d,a[g+6],9,-1069501632),d=_(d,f,l,c,a[g+11],14,643717713),c=_(c,d,f,l,a[g+0],20,-373897302),l=_(l,c,d,f,a[g+5],5,-701558691),f=_(f,l,c,d,a[g+10],9,38016083),d=_(d,f,l,c,a[g+15],14,-660478335),c=_(c,d,f,l,a[g+4],20,-405537848),l=_(l,c,d,f,a[g+9],5,568446438),f=_(f,l,c,d,a[g+14],9,-1019803690),d=_(d,f,l,c,a[g+3],14,-187363961),c=_(c,d,f,l,a[g+8],20,1163531501),l=_(l,c,d,f,a[g+13],5,-1444681467),f=_(f,l,c,d,a[g+2],9,-51403784),d=_(d,f,l,c,a[g+7],14,1735328473),c=_(c,d,f,l,a[g+12],20,-1926607734),l=y(l,c,d,f,a[g+5],4,-378558),f=y(f,l,c,d,a[g+8],11,-2022574463),d=y(d,f,l,c,a[g+11],16,1839030562),c=y(c,d,f,l,a[g+14],23,-35309556),l=y(l,c,d,f,a[g+1],4,-1530992060),f=y(f,l,c,d,a[g+4],11,1272893353),d=y(d,f,l,c,a[g+7],16,-155497632),c=y(c,d,f,l,a[g+10],23,-1094730640),l=y(l,c,d,f,a[g+13],4,681279174),f=y(f,l,c,d,a[g+0],11,-358537222),d=y(d,f,l,c,a[g+3],16,-722521979),c=y(c,d,f,l,a[g+6],23,76029189),l=y(l,c,d,f,a[g+9],4,-640364487),f=y(f,l,c,d,a[g+12],11,-421815835),d=y(d,f,l,c,a[g+15],16,530742520),c=y(c,d,f,l,a[g+2],23,-995338651),l=v(l,c,d,f,a[g+0],6,-198630844),f=v(f,l,c,d,a[g+7],10,1126891415),d=v(d,f,l,c,a[g+14],15,-1416354905),c=v(c,d,f,l,a[g+5],21,-57434055),l=v(l,c,d,f,a[g+12],6,1700485571),f=v(f,l,c,d,a[g+3],10,-1894986606),d=v(d,f,l,c,a[g+10],15,-1051523),c=v(c,d,f,l,a[g+1],21,-2054922799),l=v(l,c,d,f,a[g+8],6,1873313359),f=v(f,l,c,d,a[g+15],10,-30611744),d=v(d,f,l,c,a[g+6],15,-1560198380),c=v(c,d,f,l,a[g+13],21,1309151649),l=v(l,c,d,f,a[g+4],6,-145523070),f=v(f,l,c,d,a[g+11],10,-1120210379),d=v(d,f,l,c,a[g+2],15,718787259),c=v(c,d,f,l,a[g+9],21,-343485551),l=l+x>>>0,c=c+O>>>0,d=d+G>>>0,f=f+A>>>0}return e.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,dn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):e.bytesToHex(a)}})();var Fi=dn.exports;const Gi=Dt(Fi);function zi(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function Ei(e){ie(e,"svelte-1p23x6g",".Column.svelte-1p23x6g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function xi(e){let t,i,n;const r=e[2].default,s=xe(r,e,e[1],null);return{c(){t=D("div"),s&&s.c(),T(t,"class",i="Column "+e[0]+" svelte-1p23x6g")},m(o,a){F(o,t,a),s&&s.m(t,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Be(s,r,o,o[1],n?Ie(r,o[1],a,null):Ke(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1p23x6g"))&&T(t,"class",i)},i(o){n||(w(s,o),n=!0)},o(o){L(s,o),n=!1},d(o){o&&R(t),s&&s.d(o)}}}function Ii(e,t,i){let{$$slots:n={},$$scope:r}=t,{className:s=""}=t;return e.$$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(t){super(),j(this,t,Ii,xi,Z,{className:0},Ei)}}function Bi(e){ie(e,"svelte-1d2a8s6",'.Tag.svelte-1d2a8s6{display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-1d2a8s6:before{font-family:"la-icon-font"}.SLA.svelte-1d2a8s6{border:1px solid #CFD6DD;border-radius:4px}')}function Ki(e){let t,i,n,r,s,o;const a=e[4].default,u=xe(a,e,e[3],null);return{c(){t=D("div"),u&&u.c(),i=P(),n=D("span"),r=te(e[0]),T(n,"class","text"),T(t,"class",s="Tag "+e[1]+" svelte-1d2a8s6"),T(t,"style",e[2])},m(l,c){F(l,t,c),u&&u.m(t,null),S(t,i),S(t,n),S(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?Ie(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&oe(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&T(t,"class",s),(!o||c&4)&&T(t,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){L(u,l),o=!1},d(l){l&&R(t),u&&u.d(l)}}}function Ji(e,t,i){let{$$slots:n={},$$scope:r}=t,{text:s}=t,{className:o=""}=t,{style:a=""}=t;return e.$$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 ct extends ee{constructor(t){super(),j(this,t,Ji,Ki,Z,{text:0,className:1,style:2},Bi)}}function Ui(e){ie(e,"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 Hi(e){let t,i;return t=new be({props:{iconLaClassName:e[2]}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Wi(e){let t,i;return t=new ct({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[Hi]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(t,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}),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Yi(e,t,i){let{text:n}=t,{className:r=""}=t,{style:s=""}=t,{iconLaClassName:o}=t,a=`IconTag ${r}`;return e.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class dt extends ee{constructor(t){super(),j(this,t,Yi,Wi,Z,{text:0,className:4,style:1,iconLaClassName:2},Ui)}}function Pi(e){ie(e,"svelte-d2fkh2",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-d2fkh2{display:none}.companyTag.svelte-d2fkh2{display:none}.name.svelte-d2fkh2{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;border-right:1px solid var(--main-textcolor)}.email.svelte-d2fkh2{font-size:13px;line-height:20px;padding-left:6px}.texts.svelte-d2fkh2{display:flex;flex-direction:row;justify-content:flex-start}@media(min-width: 900px){.avatar.svelte-d2fkh2{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-d2fkh2{padding:0;border:none}.email.svelte-d2fkh2{padding:0}.companyTag.svelte-d2fkh2{display:flex}.texts.svelte-d2fkh2{display:flex;flex-direction:column;justify-content:center}}")}function Jt(e){let t,i;return t=new Ai({props:{bgColor:e[4](e[0]),name:Xe(e[0]),src:e[3](e[0])}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[4](n[0])),r&1&&(s.name=Xe(n[0])),r&1&&(s.src=n[3](n[0])),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Vi(e){let t,i=[e[4](e[0]),Xe(e[0]),e[3](e[0])],n,r,s,o,a,u=e[0].emails+"",l,c,d,f,g,m=Jt(e);return f=new dt({props:{text:e[0].company==="Y"?"Company":e[2]("No Company"),className:(e[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){t=D("div"),m.c(),n=P(),r=D("div"),s=D("div"),s.textContent=`${name}`,o=P(),a=D("div"),l=te(u),c=P(),d=D("div"),H(f.$$.fragment),T(t,"class","avatar svelte-d2fkh2"),T(s,"class","name svelte-d2fkh2"),T(a,"class","email svelte-d2fkh2"),T(d,"class","companyTag svelte-d2fkh2"),T(r,"class","texts svelte-d2fkh2")},m(_,y){F(_,t,y),m.m(t,null),F(_,n,y),F(_,r,y),S(r,s),S(r,o),S(r,a),S(a,l),S(r,c),S(r,d),B(f,d,null),g=!0},p(_,y){y&1&&Z(i,i=[_[4](_[0]),Xe(_[0]),_[3](_[0])])?(he(),L(m,1,1,Q),me(),m=Jt(_),m.c(),w(m,1),m.m(t,null)):m.p(_,y),(!g||y&1)&&u!==(u=_[0].emails+"")&&oe(l,u);const v={};y&5&&(v.text=_[0].company==="Y"?"Company":_[2]("No Company")),y&1&&(v.className=(_[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),f.$set(v)},i(_){g||(w(m),w(f.$$.fragment,_),g=!0)},o(_){L(m),L(f.$$.fragment,_),g=!1},d(_){_&&(R(t),R(n),R(r)),m.d(_),K(f)}}}function Qi(e){let t,i;return t=new At({props:{className:e[1],$$slots:{default:[Vi]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&37&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Xe(e){if(!e)return"";let t=e.firstname+" "+e.lastname;return t.trim()||(t=e.systemName),t}function Zi(e,t,i){let n;ne(e,$e,u=>i(2,n=u));let{row:r}=t,{className:s="userColumn"}=t;function o(u){let l=u.avatarUrl;return l||(l="https://www.gravatar.com/avatar/"+Gi(u.emails[0]??"")+"?s=200&d=404"),l}function a(u){let l;u?l=zi(Xe(u)+u.emails):l=Math.floor(Math.random()*16777215);let c=(l&16711680)>>16,d=(l&65280)>>8,f=l&255;return c+d+f<150&&(c=150),c+d+f>400&&(c=0),`rgb(${c},${d},${f})`}return e.$$set=u=>{"row"in u&&i(0,r=u.row),"className"in u&&i(1,s=u.className)},[r,s,n,o,a]}class Xi extends ee{constructor(t){super(),j(this,t,Zi,Qi,Z,{row:0,className:1},Pi)}}var hn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(cn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",g="year",m="date",_="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,x={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(b){var C=["th","st","nd","rd"],p=b%100;return"["+b+(C[(p-20)%10]||C[p]||C[0])+"]"}},O=function(b,C,p){var $=String(b);return!$||$.length>=C?b:""+Array(C+1-$.length).join(p)+b},G={s:O,z:function(b){var C=-b.utcOffset(),p=Math.abs(C),$=Math.floor(p/60),N=p%60;return(C<=0?"+":"-")+O($,2,"0")+":"+O(N,2,"0")},m:function b(C,p){if(C.date()<p.date())return-b(p,C);var $=12*(p.year()-C.year())+(p.month()-C.month()),N=C.clone().add($,d),U=p-N<0,Y=C.clone().add($+(U?-1:1),d);return+(-($+(p-N)/(U?N-Y:Y-N))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return{M:d,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},A="en",k={};k[A]=x;var J="$isDayjsObject",V=function(b){return b instanceof W||!(!b||!b[J])},z=function b(C,p,$){var N;if(!C)return A;if(typeof C=="string"){var U=C.toLowerCase();k[U]&&(N=U),p&&(k[U]=p,N=U);var Y=C.split("-");if(!N&&Y.length>1)return b(Y[0])}else{var q=C.name;k[q]=C,N=q}return!$&&N&&(A=N),N||!$&&A},E=function(b,C){if(V(b))return b.clone();var p=typeof C=="object"?C:{};return p.date=b,p.args=arguments,new W(p)},I=G;I.l=z,I.i=V,I.w=function(b,C){return E(b,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var W=function(){function b(p){this.$L=z(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[J]=!0}var C=b.prototype;return C.parse=function(p){this.$d=function($){var N=$.date,U=$.utc;if(N===null)return new Date(NaN);if(I.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var Y=N.match(y);if(Y){var q=Y[2]-1||0,re=(Y[7]||"0").substring(0,3);return U?new Date(Date.UTC(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,re)):new Date(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,re)}}return new Date(N)}(p),this.init()},C.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},C.$utils=function(){return I},C.isValid=function(){return this.$d.toString()!==_},C.isSame=function(p,$){var N=E(p);return this.startOf($)<=N&&N<=this.endOf($)},C.isAfter=function(p,$){return E(p)<this.startOf($)},C.isBefore=function(p,$){return this.endOf($)<E(p)},C.$g=function(p,$,N){return I.u(p)?this[$]:this.set(N,p)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(p,$){var N=this,U=!!I.u($)||$,Y=I.p(p),q=function(Se,ue){var ke=I.w(N.$u?Date.UTC(N.$y,ue,Se):new Date(N.$y,ue,Se),N);return U?ke:ke.endOf(l)},re=function(Se,ue){return I.w(N.toDate()[Se].apply(N.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(ue)),N)},se=this.$W,ae=this.$M,fe=this.$D,Oe="set"+(this.$u?"UTC":"");switch(Y){case g:return U?q(1,0):q(31,11);case d:return U?q(1,ae):q(0,ae+1);case c:var Le=this.$locale().weekStart||0,Ue=(se<Le?se+7:se)-Le;return q(U?fe-Ue:fe+(6-Ue),ae);case l:case m:return re(Oe+"Hours",0);case u:return re(Oe+"Minutes",1);case a:return re(Oe+"Seconds",2);case o:return re(Oe+"Milliseconds",3);default:return this.clone()}},C.endOf=function(p){return this.startOf(p,!1)},C.$set=function(p,$){var N,U=I.p(p),Y="set"+(this.$u?"UTC":""),q=(N={},N[l]=Y+"Date",N[m]=Y+"Date",N[d]=Y+"Month",N[g]=Y+"FullYear",N[u]=Y+"Hours",N[a]=Y+"Minutes",N[o]=Y+"Seconds",N[s]=Y+"Milliseconds",N)[U],re=U===l?this.$D+($-this.$W):$;if(U===d||U===g){var se=this.clone().set(m,1);se.$d[q](re),se.init(),this.$d=se.set(m,Math.min(this.$D,se.daysInMonth())).$d}else q&&this.$d[q](re);return this.init(),this},C.set=function(p,$){return this.clone().$set(p,$)},C.get=function(p){return this[I.p(p)]()},C.add=function(p,$){var N,U=this;p=Number(p);var Y=I.p($),q=function(ae){var fe=E(U);return I.w(fe.date(fe.date()+Math.round(ae*p)),U)};if(Y===d)return this.set(d,this.$M+p);if(Y===g)return this.set(g,this.$y+p);if(Y===l)return q(1);if(Y===c)return q(7);var re=(N={},N[a]=n,N[u]=r,N[o]=i,N)[Y]||1,se=this.$d.getTime()+p*re;return I.w(se,this)},C.subtract=function(p,$){return this.add(-1*p,$)},C.format=function(p){var $=this,N=this.$locale();if(!this.isValid())return N.invalidDate||_;var U=p||"YYYY-MM-DDTHH:mm:ssZ",Y=I.z(this),q=this.$H,re=this.$m,se=this.$M,ae=N.weekdays,fe=N.months,Oe=N.meridiem,Le=function(ue,ke,He,et){return ue&&(ue[ke]||ue($,U))||He[ke].slice(0,et)},Ue=function(ue){return I.s(q%12||12,ue,"0")},Se=Oe||function(ue,ke,He){var et=ue<12?"AM":"PM";return He?et.toLowerCase():et};return U.replace(v,function(ue,ke){return ke||function(He){switch(He){case"YY":return String($.$y).slice(-2);case"YYYY":return I.s($.$y,4,"0");case"M":return se+1;case"MM":return I.s(se+1,2,"0");case"MMM":return Le(N.monthsShort,se,fe,3);case"MMMM":return Le(fe,se);case"D":return $.$D;case"DD":return I.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Le(N.weekdaysMin,$.$W,ae,2);case"ddd":return Le(N.weekdaysShort,$.$W,ae,3);case"dddd":return ae[$.$W];case"H":return String(q);case"HH":return I.s(q,2,"0");case"h":return Ue(1);case"hh":return Ue(2);case"a":return Se(q,re,!0);case"A":return Se(q,re,!1);case"m":return String(re);case"mm":return I.s(re,2,"0");case"s":return String($.$s);case"ss":return I.s($.$s,2,"0");case"SSS":return I.s($.$ms,3,"0");case"Z":return Y}return null}(ue)||Y.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(p,$,N){var U,Y=this,q=I.p($),re=E(p),se=(re.utcOffset()-this.utcOffset())*n,ae=this-re,fe=function(){return I.m(Y,re)};switch(q){case g:U=fe()/12;break;case d:U=fe();break;case f:U=fe()/3;break;case c:U=(ae-se)/6048e5;break;case l:U=(ae-se)/864e5;break;case u:U=ae/r;break;case a:U=ae/n;break;case o:U=ae/i;break;default:U=ae}return N?U:I.a(U)},C.daysInMonth=function(){return this.endOf(d).$D},C.$locale=function(){return k[this.$L]},C.locale=function(p,$){if(!p)return this.$L;var N=this.clone(),U=z(p,$,!0);return U&&(N.$L=U),N},C.clone=function(){return I.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},b}(),de=W.prototype;return E.prototype=de,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",g],["$D",m]].forEach(function(b){de[b[1]]=function(C){return this.$g(C,b[0],b[1])}}),E.extend=function(b,C){return b.$i||(b(C,W,E),b.$i=!0),E},E.locale=z,E.isDayjs=V,E.unix=function(b){return E(1e3*b)},E.en=k[A],E.Ls=k,E.p={},E})})(hn);var qi=hn.exports;const Ye=Dt(qi);var mn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(cn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,g){for(var m,_,y,v=d.$locale().relativeTime||o,x=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"}],O=x.length,G=0;G<O;G+=1){var A=x[G];A.d&&(m=f?r(l).diff(d,A.d,!0):d.diff(l,A.d,!0));var k=(i.rounding||Math.round)(Math.abs(m));if(y=m>0,k<=A.r||!A.r){k<=1&&G>0&&(A=x[G-1]);var J=v[A.l];g&&(k=g(""+k)),_=typeof J=="string"?J.replace("%d",k):J(k,c,A.l,y);break}}if(c)return _;var V=y?v.future:v.past;return typeof V=="function"?V(_):V.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)}}})})(mn);var ji=mn.exports;const er=Dt(ji);Ye.extend(er);function tr(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=rt(r,n[s]);return{c(){t=D("time"),i=te(e[0]),Ft(t,r)},m(s,o){F(s,t,o),S(t,i)},p(s,[o]){o&1&&Mn(i,s[0],r.contenteditable),Ft(t,r=Kn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Q,o:Q,d(s){s&&R(t)}}}function nr(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Mt(t,r),{timestamp:o=new Date().toISOString()}=t,{format:a="MMM DD, YYYY"}=t,{relative:u=!1}=t,{live:l=!1}=t,{formatted:c=""}=t,d;const f=60*1e3;return sn(()=>()=>clearInterval(d)),e.$$set=g=>{t=rt(rt({},t),$n(g)),i(3,s=Mt(t,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)},e.$$.update=()=>{e.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Ye(o).from())},Math.abs(typeof l=="number"?l:f))),e.$$.dirty&50&&i(0,c=u?Ye(o).from():Ye(o).format(a)),e.$$.dirty&50&&i(2,n=u?Ye(o).format(a):void 0)},[c,o,n,s,a,u,l]}class ir extends ee{constructor(t){super(),j(this,t,nr,tr,Z,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function rr(e){ie(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function sr(e){let t,i=e[4]("Invalid data")+"",n;return{c(){t=D("span"),n=te(i),T(t,"class","invalid svelte-1o3wy2t")},m(r,s){F(r,t,s),S(t,n)},p(r,s){s&16&&i!==(i=r[4]("Invalid data")+"")&&oe(n,i)},i:Q,o:Q,d(r){r&&R(t)}}}function or(e){let t,i;return t=new ir({props:{style:e[2],timestamp:e[0],format:e[1],relative:e[3]}}),{c(){H(t.$$.fragment)},m(n,r){B(t,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]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function ar(e){let t,i,n,r,s;const o=[or,sr],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(e,-1),r=a[n]=o[n](e),{c(){t=D("div"),r.c(),T(t,"class","Date svelte-1o3wy2t")},m(l,c){F(l,t,c),a[n].m(t,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(he(),L(a[d],1,1,()=>{a[d]=null}),me(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),w(r,1),r.m(t,null))},i(l){s||(w(r),s=!0)},o(l){L(r),s=!1},d(l){l&&R(t),a[n].d()}}}function lr(e,t,i){let n;ne(e,$e,u=>i(4,n=u));let{data:r}=t,{format:s=""}=t,{style:o=""}=t,{relative:a=!1}=t;return e.$$set=u=>{"data"in u&&i(0,r=u.data),"format"in u&&i(1,s=u.format),"style"in u&&i(2,o=u.style),"relative"in u&&i(3,a=u.relative)},[r,s,o,a,n]}class pn extends ee{constructor(t){super(),j(this,t,lr,ar,Z,{data:0,format:1,style:2,relative:3},rr)}}function ur(e){ie(e,"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 cr(e){let t,i,n,r;i=new be({props:{iconLaClassName:e[2]}});const s=e[8].default,o=xe(s,e,e[7],null);return{c(){t=D("div"),H(i.$$.fragment),n=P(),o&&o.c(),T(t,"class","IconWrapper svelte-1wdh20c")},m(a,u){F(a,t,u),B(i,t,null),F(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Be(o,s,a,a[7],r?Ie(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(w(i.$$.fragment,a),w(o,a),r=!0)},o(a){L(i.$$.fragment,a),L(o,a),r=!1},d(a){a&&(R(t),R(n)),K(i),o&&o.d(a)}}}function dr(e){let t,i;return t=new dt({props:{style:e[3],text:e[0],iconLaClassName:e[2],className:"Combined"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function fr(e){let t,i,n,r,s,o;const a=[dr,cr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(e),n=u[i]=a[i](e),s=new ct({props:{style:e[4],text:e[1]}}),{c(){t=D("div"),n.c(),r=P(),H(s.$$.fragment),T(t,"class",Ce(e[5])+" svelte-1wdh20c")},m(c,d){F(c,t,d),u[i].m(t,null),S(t,r),B(s,t,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(he(),L(u[f],1,1,()=>{u[f]=null}),me(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),w(n,1),n.m(t,r));const g={};d&16&&(g.style=c[4]),d&2&&(g.text=c[1]),s.$set(g)},i(c){o||(w(n),w(s.$$.fragment,c),o=!0)},o(c){L(n),L(s.$$.fragment,c),o=!1},d(c){c&&R(t),u[i].d(),K(s)}}}function gr(e,t,i){let{$$slots:n={},$$scope:r}=t,{iconText:s=""}=t,{tagText:o}=t,{iconLaClassName:a}=t,{className:u}=t,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return e.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class _n extends ee{constructor(t){super(),j(this,t,gr,fr,Z,{iconText:0,tagText:1,iconLaClassName:2,className:6},ur)}}function hr(e){let t,i;return t=new pn({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:e[1],relative:!0}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function mr(e){let t,i;return t=new _n({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[hr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function pr(e,t,i){let n,{tagText:r}=t,{due:s}=t,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return e.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},e.$$.update=()=>{e.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class _r extends ee{constructor(t){super(),j(this,t,pr,mr,Z,{tagText:0,due:1})}}function vr(e){ie(e,"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 yr(e){let t,i;return t=new ct({props:{text:e[3]("No SLA"),className:"SLA"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.text=n[3]("No SLA")),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function br(e){let t,i;return t=new _r({props:{tagText:"First answer",due:e[1].datedue}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function wr(e){let t,i=e[1].code+"",n,r,s,o,a,u,l=e[1].messagegroupsIn+"",c,d,f,g,m,_,y=e[1].messagegroupsOut+"",v,x,O,G,A,k,J,V,z,E,I,W;o=new be({props:{iconLaClassName:"la-incoming"}}),g=new be({props:{iconLaClassName:"la-outgoing"}}),k=new pn({props:{data:e[1].datecreated,format:e[2]}});const de=[br,yr],b=[];function C(p,$){return $&2&&(V=null),V==null&&(V=p[1].datedue instanceof Date&&!isNaN(p[1].datedue)),V?0:1}return z=C(e,-1),E=b[z]=de[z](e),{c(){t=D("span"),n=te(i),r=P(),s=D("div"),H(o.$$.fragment),a=P(),u=D("span"),c=te(l),d=P(),f=D("div"),H(g.$$.fragment),m=P(),_=D("span"),v=te(y),x=P(),O=D("div"),G=D("span"),G.textContent=`${e[4]}:`,A=P(),H(k.$$.fragment),J=P(),E.c(),I=Dn(),T(t,"class","TicketId svelte-rl80em"),T(s,"class","Communication incomingMessages svelte-rl80em"),T(f,"class","Communication outgoingMessages svelte-rl80em"),T(O,"class","Created svelte-rl80em")},m(p,$){F(p,t,$),S(t,n),F(p,r,$),F(p,s,$),B(o,s,null),S(s,a),S(s,u),S(u,c),F(p,d,$),F(p,f,$),B(g,f,null),S(f,m),S(f,_),S(_,v),F(p,x,$),F(p,O,$),S(O,G),S(O,A),B(k,O,null),F(p,J,$),b[z].m(p,$),F(p,I,$),W=!0},p(p,$){(!W||$&2)&&i!==(i=p[1].code+"")&&oe(n,i),(!W||$&2)&&l!==(l=p[1].messagegroupsIn+"")&&oe(c,l),(!W||$&2)&&y!==(y=p[1].messagegroupsOut+"")&&oe(v,y);const N={};$&2&&(N.data=p[1].datecreated),$&4&&(N.format=p[2]),k.$set(N);let U=z;z=C(p,$),z===U?b[z].p(p,$):(he(),L(b[U],1,1,()=>{b[U]=null}),me(),E=b[z],E?E.p(p,$):(E=b[z]=de[z](p),E.c()),w(E,1),E.m(I.parentNode,I))},i(p){W||(w(o.$$.fragment,p),w(g.$$.fragment,p),w(k.$$.fragment,p),w(E),W=!0)},o(p){L(o.$$.fragment,p),L(g.$$.fragment,p),L(k.$$.fragment,p),L(E),W=!1},d(p){p&&(R(t),R(r),R(s),R(d),R(f),R(x),R(O),R(J),R(I)),K(o),K(g),K(k),b[z].d(p)}}}function kr(e){let t,i;return t=new At({props:{className:e[0],$$slots:{default:[wr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&46&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Tr(e,t,i){let n;ne(e,$e,u=>i(3,n=u));let{className:r="importanceColumn"}=t,{row:s}=t,{format:o="YYYY-MM-DD HH:mm:ss"}=t;const a=n("Created");return e.$$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,n,a]}class Cr extends ee{constructor(t){super(),j(this,t,Tr,kr,Z,{className:0,row:1,format:2},vr)}}function $r(e){ie(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function Lr(e){let t,i;return t=new ct({props:{style:"color: #"+e[2]+"; background: #"+e[1],text:e[0],className:"TicketTag"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,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]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Sr(e,t,i){let n,r,s,o,{tagId:a}=t,u=Te("tagsMap");return ne(e,u,l=>i(5,o=l)),e.$$set=l=>{"tagId"in l&&i(4,a=l.tagId)},e.$$.update=()=>{var l,c,d;e.$$.dirty&48&&i(2,n=((l=o[a])==null?void 0:l.color)??0),e.$$.dirty&48&&i(1,r=((c=o[a])==null?void 0:c.backgroundcolor)??0),e.$$.dirty&48&&i(0,s=((d=o[a])==null?void 0:d.name)??"")},[s,r,n,u,a,o]}class Nr extends ee{constructor(t){super(),j(this,t,Sr,Lr,Z,{tagId:4},$r)}}function Ut(e,t,i){const n=e.slice();return n[1]=t[i],n}function Ht(e){let t,i;return t=new Nr({props:{tagId:e[1]}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Dr(e){let t,i,n=Ee(e[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Ht(Ut(e,n,o));const s=o=>L(r[o],1,1,()=>{r[o]=null});return{c(){t=D("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){F(o,t,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(t,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ut(o,n,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=Ht(l),r[u].c(),w(r[u],1),r[u].m(t,null))}for(he(),u=n.length;u<r.length;u+=1)s(u);me()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)w(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)L(r[a]);i=!1},d(o){o&&R(t),Ct(r,o)}}}function Ar(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class Or extends ee{constructor(t){super(),j(this,t,Ar,Dr,Z,{tags:0})}}function Rr(e){ie(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function Mr(e){let t,i;return t=new dt({props:{className:e[1][e[0]].text,style:"color: white; background-color: "+ot(e[0]),text:e[1][e[0]].text,iconLaClassName:e[1][e[0]].icon}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ot(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Fr(e,t,i){let n;ne(e,$e,o=>i(2,n=o));let{status:r}=t;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"}};return e.$$set=o=>{"status"in o&&i(0,r=o.status)},[r,s]}class Gr extends ee{constructor(t){super(),j(this,t,Fr,Mr,Z,{status:0},Rr)}}function zr(e){ie(e,"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 Er(e){let t,i;return t=new dt({props:{className:"Department",text:e[0].departmentname,iconLaClassName:"la-department"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function xr(e){let t,i;return t=new _n({props:{className:"Department",tagText:e[0].agentname,iconLaClassName:"la-department",iconText:e[0].departmentname}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Ir(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,d,f,g,m,_,y,v;c=new Gr({props:{status:e[0].status}});const x=[xr,Er],O=[];function G(A,k){return k&1&&(f=null),f==null&&(f=A[0].agentname.trim()!==""),f?0:1}return g=G(e,-1),m=O[g]=x[g](e),y=new Or({props:{tags:e[0].tags}}),{c(){t=D("h1"),n=te(i),r=P(),s=D("p"),a=te(o),u=P(),l=D("div"),H(c.$$.fragment),d=P(),m.c(),_=P(),H(y.$$.fragment),T(t,"class","subject svelte-nfaksv"),T(s,"class","preview svelte-nfaksv"),T(l,"class","additional svelte-nfaksv")},m(A,k){F(A,t,k),S(t,n),F(A,r,k),F(A,s,k),S(s,a),F(A,u,k),F(A,l,k),B(c,l,null),S(l,d),O[g].m(l,null),S(l,_),B(y,l,null),v=!0},p(A,k){(!v||k&1)&&i!==(i=A[0].subject+"")&&oe(n,i),(!v||k&1)&&o!==(o=A[0].preview+"")&&oe(a,o);const J={};k&1&&(J.status=A[0].status),c.$set(J);let V=g;g=G(A,k),g===V?O[g].p(A,k):(he(),L(O[V],1,1,()=>{O[V]=null}),me(),m=O[g],m?m.p(A,k):(m=O[g]=x[g](A),m.c()),w(m,1),m.m(l,_));const z={};k&1&&(z.tags=A[0].tags),y.$set(z)},i(A){v||(w(c.$$.fragment,A),w(m),w(y.$$.fragment,A),v=!0)},o(A){L(c.$$.fragment,A),L(m),L(y.$$.fragment,A),v=!1},d(A){A&&(R(t),R(r),R(s),R(u),R(l)),K(c),O[g].d(),K(y)}}}function Br(e){let t,i;return t=new At({props:{className:e[1],$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Kr(e,t,i){let{row:n}=t,{className:r="statusColumn"}=t;return e.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class Jr extends ee{constructor(t){super(),j(this,t,Kr,Br,Z,{row:0,className:1},zr)}}function Ur(e){ie(e,"svelte-8pmpj5",`.Row.svelte-8pmpj5{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
9
11
|
"checkbox status"
|
|
10
12
|
"checkbox importance";border-radius:12px;box-shadow:0 0 5px 2px rgb(0 0 0 / 0.2);padding-top:6px;padding-bottom:6px}.Row.svelte-8pmpj5:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-8pmpj5{background-color:var(--menu-selected-bg) !important}.UserColumn.svelte-8pmpj5{grid-area:user}.StatusColumn.svelte-8pmpj5{grid-area:status;display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-8pmpj5{grid-area:importance}.Checkbox.svelte-8pmpj5{grid-area:checkbox;position:relative}.StatusBar.svelte-8pmpj5{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px}input.svelte-8pmpj5{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-8pmpj5{display:grid;grid-template-areas:"checkbox user importance"
|
|
11
|
-
"checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px}}@media(min-width: 900px){.Row.svelte-8pmpj5{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 170px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-8pmpj5{grid-template-columns:60px 260px auto 230px}}`)}function It(e,t,i){const n=e.slice();return n[8]=t[i],n[9]=t,n[10]=i,n}function xt(e){let t,i,n,r,s,o,a,u,l,c,d,g,f,p,h,b,k,y,O;function D(){e[5].call(s,e[10])}l=new $i({props:{row:e[8]}}),g=new Cr({props:{row:e[8]}}),h=new or({props:{row:e[8]}});function F(){return e[6](e[8])}function I(...x){return e[7](e[8],...x)}return{c(){t=$("div"),i=$("div"),n=$("div"),r=Y(),s=$("input"),a=Y(),u=$("div"),W(l.$$.fragment),c=Y(),d=$("div"),W(g.$$.fragment),f=Y(),p=$("div"),W(h.$$.fragment),N(n,"class","StatusBar svelte-8pmpj5"),lt(n,"background-color",nt(e[8].status)),N(s,"type","checkbox"),s.__value=o=e[8].conversationid,s.value=s.__value,N(s,"class","svelte-8pmpj5"),N(i,"class","Checkbox svelte-8pmpj5"),lt(i,"position","relative"),N(u,"class","UserColumn svelte-8pmpj5"),N(d,"class","StatusColumn svelte-8pmpj5"),N(p,"class","ImportanceColumn svelte-8pmpj5"),N(t,"class",b="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5")},m(x,Q){B(x,t,Q),C(t,i),C(i,n),C(i,r),C(i,s),s.checked=e[2][e[10]].__selected,C(t,a),C(t,u),H(l,u,null),C(t,c),C(t,d),H(g,d,null),C(t,f),C(t,p),H(h,p,null),k=!0,y||(O=[ue(s,"change",D),ue(s,"click",Dt(Sr)),ue(i,"click",Dt(Dr)),ue(t,"click",F),ue(t,"mousedown",I)],y=!0)},p(x,Q){e=x,(!k||Q&4)&<(n,"background-color",nt(e[8].status)),(!k||Q&4&&o!==(o=e[8].conversationid))&&(s.__value=o,s.value=s.__value),Q&4&&(s.checked=e[2][e[10]].__selected);const A={};Q&4&&(A.row=e[8]),l.$set(A);const z={};Q&4&&(z.row=e[8]),g.$set(z);const K={};Q&4&&(K.row=e[8]),h.$set(K),(!k||Q&4&&b!==(b="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5"))&&N(t,"class",b)},i(x){k||(S(l.$$.fragment,x),S(g.$$.fragment,x),S(h.$$.fragment,x),k=!0)},o(x){R(l.$$.fragment,x),R(g.$$.fragment,x),R(h.$$.fragment,x),k=!1},d(x){x&&J(t),U(l),U(g),U(h),y=!1,me(O)}}}function Nr(e){let t,i,n,r=e[2],s=[];for(let l=0;l<r.length;l+=1)s[l]=xt(It(e,r,l));const o=l=>R(s[l],1,1,()=>{s[l]=null}),a=e[4].default,u=$e(a,e,e[3],null);return{c(){t=$("div");for(let l=0;l<s.length;l+=1)s[l].c();i=Y(),u&&u.c(),N(t,"class","Body")},m(l,c){B(l,t,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(t,null);C(t,i),u&&u.m(t,null),n=!0},p(l,[c]){if(c&6){r=l[2];let d;for(d=0;d<r.length;d+=1){const g=It(l,r,d);s[d]?(s[d].p(g,c),S(s[d],1)):(s[d]=xt(g),s[d].c(),S(s[d],1),s[d].m(t,i))}for(he(),d=r.length;d<s.length;d+=1)o(d);pe()}u&&u.p&&(!n||c&8)&&Me(u,a,l,l[3],n?ze(a,l[3],c,null):Ge(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)S(s[c]);S(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)R(s[c]);R(u,l),n=!1},d(l){l&&J(t),Pt(s,l),u&&u.d(l)}}}const Sr=()=>{},Dr=()=>{};function Ar(e,t,i){let n,r=V,s=()=>(r(),r=ve(u,f=>i(2,n=f)),u);e.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=t,{data:u}=t;s();let{middleclickhandler:l}=t;function c(f){n[f].__selected=this.checked,u.set(n)}const d=f=>location.assign("#Conversation;id="+f.conversationid),g=(f,p)=>{p.button===1&&l&&(l(f.conversationid),p.preventDefault(),p.stopPropagation())};return e.$$set=f=>{"data"in f&&s(i(0,u=f.data)),"middleclickhandler"in f&&i(1,l=f.middleclickhandler),"$$scope"in f&&i(3,a=f.$$scope)},[u,l,n,a,o,c,d,g]}class Rr extends te{constructor(t){super(),ee(this,t,Ar,Nr,j,{data:0,middleclickhandler:1},Lr)}}function Or(e){se(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Fr(e){let t,i,n;return{c(){t=$("div"),i=$("p"),n=q(e[0]),N(t,"class","svelte-7bt636")},m(r,s){B(r,t,s),C(t,i),C(i,n)},p(r,[s]){s&1&&ie(n,r[0])},i:V,o:V,d(r){r&&J(t)}}}function $r(e,t,i){let n,r,s,o,a;oe(e,Ie,p=>i(8,o=p));let u,l=Re("loading");oe(e,l,p=>i(7,s=p));let c=Re("cursor");oe(e,c,p=>i(6,r=p));let d=Re("data");oe(e,d,p=>i(5,n=p));let g=Re("error");oe(e,g,p=>i(9,a=p));function f(p,h,b){return a?o("Loading failed. Please try again later."):p?"Loading...":h==null?b.length===0?o("No results match your filter. Try broadening the search criteria."):"All data loaded":"Load more data"}return e.$$.update=()=>{e.$$.dirty&224&&i(0,u=f(s,r,n))},[u,l,c,d,g,n,r,s]}class zr extends te{constructor(t){super(),ee(this,t,$r,Fr,j,{},Or)}}function Mr(e){se(e,"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 Gr(e){let t,i,n,r,s,o;return n=new zr({}),{c(){t=$("div"),i=$("div"),W(n.$$.fragment),N(i,"class","load svelte-1fwehqj"),N(t,"class","load svelte-1fwehqj")},m(a,u){B(a,t,u),C(t,i),H(n,i,null),e[10](i),r=!0,s||(o=ue(i,"click",e[11]),s=!0)},p:V,i(a){r||(S(n.$$.fragment,a),r=!0)},o(a){R(n.$$.fragment,a),r=!1},d(a){a&&J(t),U(n),e[10](null),s=!1,o()}}}function Er(e){let t,i,n,r,s;return i=new ri({props:{direction:e[4],data:e[0],selectedAll:e[3]}}),r=new Rr({props:{data:e[0],middleclickhandler:e[2],$$slots:{default:[Gr]},$$scope:{ctx:e}}}),{c(){t=$("div"),W(i.$$.fragment),n=Y(),W(r.$$.fragment),N(t,"class","container svelte-1fwehqj")},m(o,a){B(o,t,a),H(i,t,null),C(t,n),H(r,t,null),e[12](t),s=!0},p(o,[a]){const u={};a&16&&(u.direction=o[4]),a&1&&(u.data=o[0]),a&8&&(u.selectedAll=o[3]),i.$set(u);const l={};a&1&&(l.data=o[0]),a&4&&(l.middleclickhandler=o[2]),a&8866&&(l.$$scope={dirty:a,ctx:o}),r.$set(l)},i(o){s||(S(i.$$.fragment,o),S(r.$$.fragment,o),s=!0)},o(o){R(i.$$.fragment,o),R(r.$$.fragment,o),s=!1},d(o){o&&J(t),U(i),U(r),e[12](null)}}}function Ir(e,t,i){let n,r=V,s=()=>(r(),r=ve(g,y=>i(9,n=y)),g);e.$$.on_destroy.push(()=>r());let{data:o}=t,{loadMore:a}=t,{middleclickhandler:u}=t,{selectedAll:l}=t,{direction:c}=t,{loaded:d}=t,{cursor:g}=t;s();let f,p;qt(()=>{const y=new IntersectionObserver(O=>{O[0].isIntersecting&&a(!1)},{root:p,threshold:.5});return y.observe(f),()=>y.unobserve(f)});function h(y){Ve[y?"unshift":"push"](()=>{f=y,i(7,f)})}const b=()=>a(d&&!n);function k(y){Ve[y?"unshift":"push"](()=>{p=y,i(8,p)})}return e.$$set=y=>{"data"in y&&i(0,o=y.data),"loadMore"in y&&i(1,a=y.loadMore),"middleclickhandler"in y&&i(2,u=y.middleclickhandler),"selectedAll"in y&&i(3,l=y.selectedAll),"direction"in y&&i(4,c=y.direction),"loaded"in y&&i(5,d=y.loaded),"cursor"in y&&s(i(6,g=y.cursor))},[o,a,u,l,c,d,g,f,p,n,h,b,k]}class xr extends te{constructor(t){super(),ee(this,t,Ir,Er,j,{data:0,loadMore:1,middleclickhandler:2,selectedAll:3,direction:4,loaded:5,cursor:6},Mr)}}var Oe=globalThis&&globalThis.__awaiter||function(e,t,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(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};const Kr="https://localhost/api/v3".replace(/\/+$/,"");class Lt{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Kr}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||cn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:()=>Oe(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Br=new Lt;class ot{constructor(t=Br){this.configuration=t,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 Wr(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=t.middleware}withMiddleware(...t){const i=this.clone();return i.middleware=i.middleware.concat(...t),i}withPreMiddleware(...t){const i=t.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...t){const i=t.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(t){return t?ot.jsonRegex.test(t):!1}request(t,i){return Oe(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(t,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new Hr(s,"Response returned an error code")})}createFetchParams(t,i){return Oe(this,void 0,void 0,function*(){let n=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(t.query));const r=Object.assign({},this.configuration.headers,t.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:t.method,headers:r,body:t.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:t})),u=Object.assign(Object.assign({},a),{body:Ur(a.body)||a.body instanceof URLSearchParams||Jr(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const t=this.constructor,i=new t(this.configuration);return i.middleware=this.middleware.slice(),i}}ot.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Jr(e){return typeof Blob<"u"&&e instanceof Blob}function Ur(e){return typeof FormData<"u"&&e instanceof FormData}class Hr extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class Wr extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class Kt extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function m(e,t){const i=e[t];return i!=null}function cn(e,t=""){return Object.keys(e).map(i=>dn(i,e[i],t)).filter(i=>i.length>0).join("&")}function dn(e,t,i=""){const n=i+(i.length?`[${e}]`:e);if(t instanceof Array){const r=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(t instanceof Set){const r=Array.from(t);return dn(e,r,i)}return t instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?cn(t,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(t))}`}class X{constructor(t,i=n=>n){this.raw=t,this.transformer=i}value(){return Oe(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Yr(e){return Vr(e)}function Vr(e,t){return e==null?e:{departmentid:m(e,"departmentid")?e.departmentid:void 0,onlineStatus:m(e,"online_status")?e.online_status:void 0,presetStatus:m(e,"preset_status")?e.preset_status:void 0}}function Qr(e){return Zr(e)}function Zr(e,t){return e==null?e:{agentid:m(e,"agentid")?e.agentid:void 0,firstname:m(e,"firstname")?e.firstname:void 0,lastname:m(e,"lastname")?e.lastname:void 0,systemName:m(e,"system_name")?e.system_name:void 0,username:m(e,"username")?e.username:void 0,countrycode:m(e,"countrycode")?e.countrycode:void 0,avatarUrl:m(e,"avatar_url")?e.avatar_url:void 0,roleid:m(e,"roleid")?e.roleid:void 0,departmentsStatuses:m(e,"departments_statuses")?e.departments_statuses.map(Yr):void 0,twofa:m(e,"twofa")?e.twofa:void 0,lastPswdChange:m(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:m(e,"userstatus")?e.userstatus:void 0}}function Pr(e){return qr(e)}function qr(e,t){return e==null?e:{conversationid:m(e,"conversationid")?e.conversationid:void 0,datechanged:m(e,"datechanged")?new Date(e.datechanged):void 0,status:m(e,"status")?e.status:void 0,preview:m(e,"preview")?e.preview:void 0,subject:m(e,"subject")?e.subject:void 0,departmentname:m(e,"departmentname")?e.departmentname:void 0,agentname:m(e,"agentname")?e.agentname:void 0,tags:m(e,"tags")?e.tags:void 0,firstname:m(e,"firstname")?e.firstname:void 0,lastname:m(e,"lastname")?e.lastname:void 0,systemName:m(e,"system_name")?e.system_name:void 0,emails:m(e,"emails")?e.emails:void 0,city:m(e,"city")?e.city:void 0,countrycode:m(e,"countrycode")?e.countrycode:void 0,avatarUrl:m(e,"avatar_url")?e.avatar_url:void 0,rstatus:m(e,"rstatus")?e.rstatus:void 0,statusdatestarted:m(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:m(e,"chat_order")?e.chat_order:void 0}}function Xr(e){return jr(e)}function jr(e,t){return e==null?e:{id:m(e,"id")?e.id:void 0,name:m(e,"name")?e.name:void 0,type:m(e,"type")?e.type:void 0,onlineCode:m(e,"online_code")?e.online_code:void 0,offlineCode:m(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:m(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:m(e,"offline_code_css")?e.offline_code_css:void 0,provide:m(e,"provide")?e.provide:void 0,impressions:m(e,"impressions")?e.impressions:void 0,tickets:m(e,"tickets")?e.tickets:void 0,status:m(e,"status")?e.status:void 0,lastDisplayTime:m(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:m(e,"last_display_url")?e.last_display_url:void 0}}function de(e){return es(e)}function es(e,t){return e==null?e:{count:m(e,"count")?e.count:void 0}}function ts(e){return ns(e)}function ns(e,t){return e==null?e:{id:m(e,"id")?e.id:void 0,name:m(e,"name")?e.name:void 0,agentCount:m(e,"agent_count")?e.agent_count:void 0}}function is(e){return rs(e)}function rs(e,t){return e==null?e:{id:m(e,"id")?e.id:void 0,logid:m(e,"logid")?e.logid:void 0,line:m(e,"line")?e.line:void 0,filename:m(e,"filename")?e.filename:void 0,created:m(e,"created")?e.created:void 0,level:m(e,"level")?e.level:void 0,type:m(e,"type")?e.type:void 0,message:m(e,"message")?e.message:void 0,ip:m(e,"ip")?e.ip:void 0,groupid:m(e,"groupid")?e.groupid:void 0}}function ss(e){return os(e)}function os(e,t){return e==null?e:{agentid:m(e,"agentid")?e.agentid:void 0,firstname:m(e,"firstname")?e.firstname:void 0,lastname:m(e,"lastname")?e.lastname:void 0,systemName:m(e,"system_name")?e.system_name:void 0,avatarUrl:m(e,"avatar_url")?e.avatar_url:void 0,chats:m(e,"chats")?e.chats:void 0}}function as(e){return ls(e)}function ls(e,t){return e==null?e:{name:m(e,"name")?e.name:void 0,code:m(e,"code")?e.code:void 0,engName:m(e,"eng_name")?e.eng_name:void 0,translated:m(e,"translated")?e.translated:void 0,isDefault:m(e,"is_default")?e.is_default:void 0,active:m(e,"active")?e.active:void 0,isCustom:m(e,"is_custom")?e.is_custom:void 0,isBuiltIn:m(e,"is_builtIn")?e.is_builtIn:void 0}}function us(e){return cs(e)}function cs(e,t){return e==null?e:{codeName:m(e,"code_name")?e.code_name:void 0,name:m(e,"name")?e.name:void 0,description:m(e,"description")?e.description:void 0,active:m(e,"active")?e.active:void 0,help:m(e,"help")?e.help:void 0,multiple:m(e,"multiple")?e.multiple:void 0,configFile:m(e,"config_file")?e.config_file:void 0,price:m(e,"price")?e.price:void 0,legacyIntegration:m(e,"legacy_integration")?e.legacy_integration:void 0}}function ct(e){return ds(e)}function ds(e,t){return e==null?e:{id:m(e,"id")?e.id:void 0,conversationid:m(e,"conversationid")?e.conversationid:void 0,code:m(e,"code")?e.code:void 0,slaTicketId:m(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:m(e,"departmentid")?e.departmentid:void 0,departmentName:m(e,"department_name")?e.department_name:void 0,levelid:m(e,"levelid")?e.levelid:void 0,slaLevelName:m(e,"sla_level_name")?e.sla_level_name:void 0,sla:m(e,"sla")?e.sla:void 0,dateCreated:m(e,"date_created")?e.date_created:void 0,dateClosed:m(e,"date_closed")?e.date_closed:void 0,dateDue:m(e,"date_due")?e.date_due:void 0,slaLevelId:m(e,"sla_level_id")?e.sla_level_id:void 0,slaType:m(e,"sla_type")?new Date(e.sla_type):void 0,agentid:m(e,"agentid")?e.agentid:void 0,agentFirstname:m(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:m(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:m(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:m(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:m(e,"req_firstname")?e.req_firstname:void 0,reqLastname:m(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:m(e,"req_systemname")?e.req_systemname:void 0,reqContactName:m(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:m(e,"req_avatar_url")?e.req_avatar_url:void 0}}function Bt(e){return fs(e)}function fs(e,t){return e==null?e:{tagid:m(e,"tagid")?e.tagid:void 0,name:m(e,"name")?e.name:void 0,type:m(e,"type")?e.type:void 0,color:m(e,"color")?e.color:void 0,backgroundcolor:m(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:m(e,"is_public")?e.is_public:void 0}}function fn(e){return gs(e)}function gs(e,t){return e==null?e:{conversationid:m(e,"conversationid")?e.conversationid:void 0,code:m(e,"code")?e.code:void 0,datecreated:m(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:m(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:m(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:m(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:m(e,"rorder")?e.rorder:void 0,datedue:m(e,"datedue")?new Date(e.datedue):void 0,datereopen:m(e,"datereopen")?new Date(e.datereopen):void 0,status:m(e,"status")?e.status:void 0,channelType:m(e,"channel_type")?e.channel_type:void 0,departmentid:m(e,"departmentid")?e.departmentid:void 0,agentid:m(e,"agentid")?e.agentid:void 0,preview:m(e,"preview")?e.preview:void 0,subject:m(e,"subject")?e.subject:void 0,departmentname:m(e,"departmentname")?e.departmentname:void 0,agentname:m(e,"agentname")?e.agentname:void 0,tags:m(e,"tags")?e.tags:void 0,messagegroupsIn:m(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:m(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:m(e,"contactid")?e.contactid:void 0,parentContactid:m(e,"parent_contactid")?e.parent_contactid:void 0,firstname:m(e,"firstname")?e.firstname:void 0,lastname:m(e,"lastname")?e.lastname:void 0,systemName:m(e,"system_name")?e.system_name:void 0,emails:m(e,"emails")?e.emails:void 0,phones:m(e,"phones")?e.phones:void 0,jobPosition:m(e,"job_position")?e.job_position:void 0,contactType:m(e,"contact_type")?e.contact_type:void 0,city:m(e,"city")?e.city:void 0,countrycode:m(e,"countrycode")?e.countrycode:void 0,timeOffset:m(e,"time_offset")?e.time_offset:void 0,gender:m(e,"gender")?e.gender:void 0,levelid:m(e,"levelid")?e.levelid:void 0,groups:m(e,"groups")?e.groups:void 0,contactStatus:m(e,"contact_status")?e.contact_status:void 0,company:m(e,"company")?e.company:void 0,avatarUrl:m(e,"avatar_url")?e.avatar_url:void 0,userid:m(e,"userid")?e.userid:void 0,roleid:m(e,"roleid")?e.roleid:void 0,userstatus:m(e,"userstatus")?e.userstatus:void 0,accountuserstatus:m(e,"accountuserstatus")?e.accountuserstatus:void 0,description:m(e,"description")?e.description:void 0,note:m(e,"note")?e.note:void 0,lastActivity:m(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:m(e,"tagnames")?e.tagnames:void 0,groupnames:m(e,"groupnames")?e.groupnames:void 0}}function ms(e){return hs(e)}function hs(e,t){return e==null?e:{cursor:m(e,"cursor")?e.cursor:void 0,rows:m(e,"rows")?e.rows.map(fn):void 0}}function ps(e){return _s(e)}function _s(e,t){return e==null?e:{id:m(e,"id")?e.id:void 0,agentid:m(e,"agentid")?e.agentid:void 0,agent:m(e,"agent")?e.agent:void 0,conversationid:m(e,"conversationid")?e.conversationid:void 0,ticket:m(e,"ticket")?e.ticket:void 0,parentContactid:m(e,"parent_contactid")?e.parent_contactid:void 0,company:m(e,"company")?e.company:void 0,contactid:m(e,"contactid")?e.contactid:void 0,customer:m(e,"customer")?e.customer:void 0,customerFirstname:m(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:m(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:m(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:m(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:m(e,"reportdate")?e.reportdate:void 0,reportedtime:m(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:m(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:m(e,"spenttime")?e.spenttime:void 0,dateinvoiced:m(e,"dateinvoiced")?e.dateinvoiced:void 0,note:m(e,"note")?e.note:void 0,type:m(e,"type")?e.type:void 0}}var E=globalThis&&globalThis.__awaiter||function(e,t,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(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};class gn extends ot{getAgentsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(Qr))})}getAgentsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,i)).value()})}getAgentsGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getAgentsGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,i)).value()})}getCallsSlaLogGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(ct))})}getCallsSlaLogGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,i)).value()})}getCallsSlaLogGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getCallsSlaLogGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,i)).value()})}getChatsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(Pr))})}getChatsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,i)).value()})}getChatsGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getChatsGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,i)).value()})}getChatsSlaLogGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(ct))})}getChatsSlaLogGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,i)).value()})}getChatsSlaLogGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getChatsSlaLogGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,i)).value()})}getContactWidgetsCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getContactWidgetsCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,i)).value()})}getContactWidgetsListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 X(s,o=>o.map(Xr))})}getContactWidgetsList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,i)).value()})}getCustomerGroupsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 X(s,o=>o.map(Bt))})}getCustomerGroupsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,i)).value()})}getDepartmensGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getDepartmensGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,i)).value()})}getDepartmentsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(ts))})}getDepartmentsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,i)).value()})}getEventLogsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(is))})}getEventLogsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,i)).value()})}getEventLogsGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getEventLogsGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,i)).value()})}getInviteAgentsGridListRaw(t,i){return E(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new Kt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.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(t.departmentId))),method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(ss))})}getInviteAgentsGridList(t,i){return E(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,i)).value()})}getLanguagesGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(as))})}getLanguagesGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,i)).value()})}getLanguagesGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getLanguagesGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,i)).value()})}getPlugindGridListRaw(t,i){return E(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new Kt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.pluginPurpose!==void 0&&(n.pluginPurpose=t.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 X(s,o=>o.map(us))})}getPlugindGridList(t,i){return E(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,i)).value()})}getTagsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 X(s,o=>o.map(Bt))})}getTagsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,i)).value()})}getTicketsGridDatasetRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>ms(o))})}getTicketsGridDataset(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,i)).value()})}getTicketsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(fn))})}getTicketsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,i)).value()})}getTicketsGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>de(o))})}getTicketsGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,i)).value()})}getTicketsSlaLogGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(ct))})}getTicketsSlaLogGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,i)).value()})}getTicketsSlaLogGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getTicketsSlaLogGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,i)).value()})}getTimeReportsGridListRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.sortField!==void 0&&(n._sortField=t.sortField),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 X(s,o=>o.map(ps))})}getTimeReportsGridList(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,i)).value()})}getTimeReportsGridListCountRaw(t,i){return E(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>de(o))})}getTimeReportsGridListCount(t={},i){return E(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,i)).value()})}}const Jt={Asc:"ASC",Desc:"DESC"},vs={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 ys{constructor(t,i){const n=new Lt({apiKey:t,basePath:i+"/api/v3"});this.api=new gn(n),this.tags=ce({})}async load(){let t=await this.api.getTagsGridList();t=t.reduce((i,n)=>(i[n.tagid]=n,i),{}),this.tags.set(t)}}function bs(e){se(e,"svelte-xoajdi","span.svelte-xoajdi{margin-right:10px}")}function Ut(e){let t,i=(e[2]??"many")+"",n;return{c(){t=q("of "),n=q(i)},m(r,s){B(r,t,s),B(r,n,s)},p(r,s){s&4&&i!==(i=(r[2]??"many")+"")&&ie(n,i)},d(r){r&&J(t),r&&J(n)}}}function ks(e){let t,i,n=e[3].length+"",r,s,o,a,u,l=e[4]&&Ut(e);return{c(){t=$("span"),i=q("Showing "),r=q(n),s=Y(),l&&l.c(),o=q(`
|
|
12
|
-
results
|
|
13
|
-
`),N(t,"class","svelte-xoajdi")},m(c,d){B(c,t,d),C(t,i),C(t,r),C(t,s),l&&l.m(t,null),C(t,o),a||(u=ue(t,"click",e[5]),a=!0)},p(c,[d]){d&8&&n!==(n=c[3].length+"")&&ie(r,n),c[4]?l?l.p(c,d):(l=Ut(c),l.c(),l.m(t,o)):l&&(l.d(1),l=null)},i:V,o:V,d(c){c&&J(t),l&&l.d(),a=!1,u()}}}function ws(e,t,i){let n,r=V,s=()=>(r(),r=ve(l,h=>i(3,n=h)),l),o,a=V,u=()=>(a(),a=ve(c,h=>i(4,o=h)),c);e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>a());let{data:l}=t;s();let{cursor:c}=t;u();let{filter:d}=t,g=null;function f(){i(2,g=null)}async function p(){let b=await Re("api").getTicketsGridListCount({filters:d,timezoneOffset:new Date().getTimezoneOffset()});i(2,g=b.count)}return e.$$set=h=>{"data"in h&&s(i(0,l=h.data)),"cursor"in h&&u(i(1,c=h.cursor)),"filter"in h&&i(6,d=h.filter)},e.$$.update=()=>{e.$$.dirty&64&&d&&f()},[l,c,g,n,o,p,d]}class Ts extends te{constructor(t){super(),ee(this,t,ws,ks,j,{data:0,cursor:1,filter:6},bs)}}function Cs(e){se(e,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function Ls(e){let t,i,n,r,s;const o=e[4].default,a=$e(o,e,e[3],null);return{c(){t=$("button"),a&&a.c(),N(t,"class",i=we(e[0])+" svelte-10fvxzv")},m(u,l){B(u,t,l),a&&a.m(t,null),n=!0,r||(s=ue(t,"click",e[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Me(a,o,u,u[3],n?ze(o,u[3],l,null):Ge(u[3]),null),(!n||l&1&&i!==(i=we(u[0])+" svelte-10fvxzv"))&&N(t,"class",i)},i(u){n||(S(a,u),n=!0)},o(u){R(a,u),n=!1},d(u){u&&J(t),a&&a.d(u),r=!1,s()}}}function Ns(e,t,i){let{$$slots:n={},$$scope:r}=t,{onAction:s=()=>{}}=t,{className:o=""}=t;function a(){s()}return e.$$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 Ht extends te{constructor(t){super(),ee(this,t,Ns,Ls,j,{onAction:2,className:0},Cs)}}function Ss(e){se(e,"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 Ds(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new ye({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){W(t.$$.fragment),i=Y(),r=q(n)},m(o,a){H(t,o,a),B(o,i,a),B(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Change filter")+"")&&ie(r,n)},i(o){s||(S(t.$$.fragment,o),s=!0)},o(o){R(t.$$.fragment,o),s=!1},d(o){U(t,o),o&&J(i),o&&J(r)}}}function As(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new ye({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){W(t.$$.fragment),i=Y(),r=q(n)},m(o,a){H(t,o,a),B(o,i,a),B(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Configure chat button")+"")&&ie(r,n)},i(o){s||(S(t.$$.fragment,o),s=!0)},o(o){R(t.$$.fragment,o),s=!1},d(o){U(t,o),o&&J(i),o&&J(r)}}}function Rs(e){let t,i,n,r,s,o=e[0]("No tickets found")+"",a,u,l,c=e[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",d,g,f,p,h,b,k;return p=new Ht({props:{className:"Filter",$$slots:{default:[Ds]},$$scope:{ctx:e}}}),b=new Ht({props:{className:"Configure",$$slots:{default:[As]},$$scope:{ctx:e}}}),{c(){t=$("div"),i=$("img"),r=Y(),s=$("h1"),a=q(o),u=Y(),l=$("p"),d=q(c),g=Y(),f=$("div"),W(p.$$.fragment),h=Y(),W(b.$$.fragment),N(i,"alt","No results placeholder"),dt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||N(i,"src",n),N(i,"class","svelte-19qi61t"),N(s,"class","svelte-19qi61t"),N(l,"class","svelte-19qi61t"),N(f,"class","Buttons"),N(t,"class","NoTickets svelte-19qi61t")},m(y,O){B(y,t,O),C(t,i),C(t,r),C(t,s),C(s,a),C(t,u),C(t,l),C(l,d),C(t,g),C(t,f),H(p,f,null),C(f,h),H(b,f,null),k=!0},p(y,[O]){(!k||O&1)&&o!==(o=y[0]("No tickets found")+"")&&ie(a,o),(!k||O&1)&&c!==(c=y[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&ie(d,c);const D={};O&3&&(D.$$scope={dirty:O,ctx:y}),p.$set(D);const F={};O&3&&(F.$$scope={dirty:O,ctx:y}),b.$set(F)},i(y){k||(S(p.$$.fragment,y),S(b.$$.fragment,y),k=!0)},o(y){R(p.$$.fragment,y),R(b.$$.fragment,y),k=!1},d(y){y&&J(t),U(p),U(b)}}}function Os(e,t,i){let n;return oe(e,Ie,r=>i(0,n=r)),[n]}class Fs extends te{constructor(t){super(),ee(this,t,Os,Rs,j,{},Ss)}}function $s(e){se(e,"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(e){let t,i;return t=new xr({props:{direction:e[13],data:e[11],loaded:e[3],loadMore:e[2],cursor:e[15],middleclickhandler:e[1],selectedAll:e[9]}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.loaded=n[3]),r&4&&(s.loadMore=n[2]),r&2&&(s.middleclickhandler=n[1]),t.$set(s)},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Ms(e){let t,i;return t=new Fs({}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p:V,i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function Gs(e){let t,i,n,r,s,o,a,u,l,c,d,g,f,p,h,b,k,y,O,D,F;const I=e[22].default,x=$e(I,e,e[21],null);d=new Ts({props:{cursor:e[15],data:e[11],filter:e[0]}}),p=new ye({props:{iconLaClassName:"la-refresh"}});const Q=[Ms,zs],A=[];function z(K,P){return!K[6].length&&!K[4]?0:1}return k=z(e),y=A[k]=Q[k](e),{c(){t=$("main"),i=q("Cursor: "),n=q(e[5]),r=q(`
|
|
14
|
-
Loading: `),s=q(e[4]),o=q(`
|
|
15
|
-
Loaded: `),a=q(e[3]),u=Y(),l=$("div"),x&&x.c(),c=Y(),W(d.$$.fragment),g=Y(),f=$("button"),W(p.$$.fragment),b=Y(),y.c(),N(f,"title",h=e[7]("Reload")),N(f,"class","svelte-150fgq2"),Rt(f,"loading",e[4]),N(l,"class","tools svelte-150fgq2"),N(t,"class","svelte-150fgq2")},m(K,P){B(K,t,P),C(t,i),C(t,n),C(t,r),C(t,s),C(t,o),C(t,a),C(t,u),C(t,l),x&&x.m(l,null),C(l,c),H(d,l,null),C(l,g),C(l,f),H(p,f,null),C(t,b),A[k].m(t,null),O=!0,D||(F=ue(f,"click",e[23]),D=!0)},p(K,[P]){(!O||P&32)&&ie(n,K[5]),(!O||P&16)&&ie(s,K[4]),(!O||P&8)&&ie(a,K[3]),x&&x.p&&(!O||P&2097152)&&Me(x,I,K,K[21],O?ze(I,K[21],P,null):Ge(K[21]),null);const G={};P&1&&(G.filter=K[0]),d.$set(G),(!O||P&128&&h!==(h=K[7]("Reload")))&&N(f,"title",h),(!O||P&16)&&Rt(f,"loading",K[4]);let w=k;k=z(K),k===w?A[k].p(K,P):(he(),R(A[w],1,1,()=>{A[w]=null}),pe(),y=A[k],y?y.p(K,P):(y=A[k]=Q[k](K),y.c()),S(y,1),y.m(t,null))},i(K){O||(S(x,K),S(d.$$.fragment,K),S(p.$$.fragment,K),S(y),O=!0)},o(K){R(x,K),R(d.$$.fragment,K),R(p.$$.fragment,K),R(y),O=!1},d(K){K&&J(t),x&&x.d(K),U(d),U(p),A[k].d(),D=!1,F()}}}function Es(e,t,i){let n,r,s,o,a,u,l,c,d;oe(e,Ie,T=>i(7,d=T));let{$$slots:g={},$$scope:f}=t,{apikey:p}=t,{filters:h}=t,{middleclickhandler:b}=t,{selectionHandler:k}=t,{basePath:y}=t,O=ce({});oe(e,O,T=>i(19,n=T));let D=ce(!1);oe(e,D,T=>i(20,c=T));let F=new ys(p,y);F.load(),Ne("tagsMap",F.tags);let I=ce(null);oe(e,I,T=>i(24,s=T)),Ne("error",I);const x=new Lt({apiKey:p,basePath:y+"/api/v3"}),Q=new gn(x);Ne("api",Q);const A=ce([]);oe(e,A,T=>i(6,a=T)),Ne("data",A);const z=ce(vs.Rorder);oe(e,z,T=>i(25,u=T));const K=ce(!0);oe(e,K,T=>i(26,l=T));const P=ce(!1);oe(e,P,T=>i(4,r=T)),Ne("loading",P);const G=ce(null);oe(e,G,T=>i(5,o=T)),Ne("cursor",G);let w=!1,L=()=>({perPage:20,sortDir:l?Jt.Asc:Jt.Desc,filters:h,sortField:u,cursor:o||""}),{loadMore:_=async(T=!1)=>{if(!r&&(T===!0&&(ge(G,o=null,o),i(3,w=!1)),!(!o&&w))){ge(P,r=!0,r);try{const M=await Q.getTicketsGridDatasetRaw(L());console.log("Loaded tickets response: ",M);const Z=await M.value();T===!0&&ge(A,a=[],a),ge(A,a=a.concat(Z.rows),a),ge(G,o=Z.cursor,o),console.log("Loaded tickets value: ",Z),console.log("Loaded tickets: ",Z.rows.length,"cursor: ",Z.cursor),i(3,w=!0)}catch(M){console.error("Loading tickets failed: ",M),ge(I,s=M.toString(),s)}ge(P,r=!1,r)}}}=t;K.subscribe(async()=>{await _(!0)}),z.subscribe(async()=>{await _(!0)}),A.subscribe(T=>{ge(O,n=T.filter(M=>M.__selected??!1).map(M=>M.conversationid),n)});const v=()=>_(!0);return e.$$set=T=>{"apikey"in T&&i(16,p=T.apikey),"filters"in T&&i(0,h=T.filters),"middleclickhandler"in T&&i(1,b=T.middleclickhandler),"selectionHandler"in T&&i(17,k=T.selectionHandler),"basePath"in T&&i(18,y=T.basePath),"loadMore"in T&&i(2,_=T.loadMore),"$$scope"in T&&i(21,f=T.$$scope)},e.$$.update=()=>{e.$$.dirty&1703936&&k(n,c),e.$$.dirty&5&&h&&_(!0)},[h,b,_,w,r,o,a,d,O,D,I,A,z,K,P,G,p,k,y,n,c,f,g,v]}class Is extends te{constructor(t){super(),ee(this,t,Es,Gs,j,{apikey:16,filters:0,middleclickhandler:1,selectionHandler:17,basePath:18,loadMore:2},$s)}}const xs="modulepreload",Ks=function(e){return"/"+e},Wt={},Yt=function(t,i,n){if(!i||i.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=Ks(s),s in Wt)return;Wt[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":xs,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t())};function Bs(){$t("en",()=>Yt(()=>import("./en.js"),[])),$t("sk",()=>Yt(()=>import("./sk.js"),[]))}function Vt(e){let t,i,n;function r(o){e[11](o)}let s={apikey:e[0],basePath:e[3],filters:e[1],middleclickhandler:e[2],selectionHandler:e[5],$$slots:{default:[Js]},$$scope:{ctx:e}};return e[4]!==void 0&&(s.loadMore=e[4]),t=new Is({props:s}),Ve.push(()=>Rn(t,"loadMore",r)),{c(){W(t.$$.fragment)},m(o,a){H(t,o,a),n=!0},p(o,a){const u={};a&1&&(u.apikey=o[0]),a&8&&(u.basePath=o[3]),a&2&&(u.filters=o[1]),a&4&&(u.middleclickhandler=o[2]),a&4096&&(u.$$scope={dirty:a,ctx:o}),!i&&a&16&&(i=!0,u.loadMore=o[4],Nn(()=>i=!1)),t.$set(u)},i(o){n||(S(t.$$.fragment,o),n=!0)},o(o){R(t.$$.fragment,o),n=!1},d(o){U(t,o)}}}function Js(e){let t;return{c(){t=$("slot")},m(i,n){B(i,t,n)},p:V,d(i){i&&J(t)}}}function Us(e){let t,i,n,r,s=e[0]&&Vt(e);return{c(){s&&s.c(),t=Y(),i=$("link"),this.c=V,N(i,"rel","stylesheet"),N(i,"href",n=e[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),B(o,t,a),B(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&S(s,1)):(s=Vt(o),s.c(),S(s,1),s.m(t.parentNode,t)):s&&(he(),R(s,1,1,()=>{s=null}),pe()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&N(i,"href",n)},i(o){r||(S(s),r=!0)},o(o){R(s),r=!1},d(o){s&&s.d(o),o&&J(t),o&&J(i)}}}function Hs(e,t,i){Bs();let{lang:n="sk"}=t,{apikey:r}=t,{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"]]'}=t,{middleclickhandler:o}=t,{selectionhandler:a}=t,{selectionMap:u={}}=t,{selectedAll:l=!1}=t,{basepath:c}=t,d;const g=function(h=!1){d&&d(h)};Qn({initialLocale:n,fallbackLocale:"en"}),Xn();function f(h,b){i(6,u=h),i(7,l=b),a&&a(h,b)}function p(h){d=h,i(4,d)}return e.$$set=h=>{"lang"in h&&i(8,n=h.lang),"apikey"in h&&i(0,r=h.apikey),"filters"in h&&i(1,s=h.filters),"middleclickhandler"in h&&i(2,o=h.middleclickhandler),"selectionhandler"in h&&i(9,a=h.selectionhandler),"selectionMap"in h&&i(6,u=h.selectionMap),"selectedAll"in h&&i(7,l=h.selectedAll),"basepath"in h&&i(3,c=h.basepath)},[r,s,o,c,d,f,u,l,n,a,g,p]}class Ws extends Xt{constructor(t){super(),ee(this,{target:this.shadowRoot,props:Tn(this.attributes),customElement:!0},Hs,Us,j,{lang:8,apikey:0,filters:1,middleclickhandler:2,selectionhandler:9,selectionMap:6,selectedAll:7,basepath:3,reload:10},null),t&&(t.target&&B(t.target,this,t.anchor),t.props&&(this.$set(t.props),fe()))}static get observedAttributes(){return["lang","apikey","filters","middleclickhandler","selectionhandler","selectionMap","selectedAll","basepath","reload"]}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),fe()}get apikey(){return this.$$.ctx[0]}set apikey(t){this.$$set({apikey:t}),fe()}get filters(){return this.$$.ctx[1]}set filters(t){this.$$set({filters:t}),fe()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(t){this.$$set({middleclickhandler:t}),fe()}get selectionhandler(){return this.$$.ctx[9]}set selectionhandler(t){this.$$set({selectionhandler:t}),fe()}get selectionMap(){return this.$$.ctx[6]}set selectionMap(t){this.$$set({selectionMap:t}),fe()}get selectedAll(){return this.$$.ctx[7]}set selectedAll(t){this.$$set({selectedAll:t}),fe()}get basepath(){return this.$$.ctx[3]}set basepath(t){this.$$set({basepath:t}),fe()}get reload(){return this.$$.ctx[10]}}customElements.define("tickets-table",Ws);
|
|
13
|
+
"checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px}}@media(min-width: 900px){.Row.svelte-8pmpj5{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 170px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-8pmpj5{grid-template-columns:60px 260px auto 230px}}`)}function Wt(e,t,i){const n=e.slice();return n[8]=t[i],n[9]=t,n[10]=i,n}function Yt(e){let t,i,n,r,s,o,a,u,l,c,d,f,g,m,_,y,v,x,O;function G(){e[5].call(s,e[10])}l=new Xi({props:{row:e[8]}}),f=new Jr({props:{row:e[8]}}),_=new Cr({props:{row:e[8]}});function A(){return e[6](e[8])}function k(...J){return e[7](e[8],...J)}return{c(){t=D("div"),i=D("div"),n=D("div"),r=P(),s=D("input"),a=P(),u=D("div"),H(l.$$.fragment),c=P(),d=D("div"),H(f.$$.fragment),g=P(),m=D("div"),H(_.$$.fragment),T(n,"class","StatusBar svelte-8pmpj5"),gt(n,"background-color",ot(e[8].status)),T(s,"type","checkbox"),s.__value=o=e[8].conversationid,Gt(s,s.__value),T(s,"class","svelte-8pmpj5"),T(i,"class","Checkbox svelte-8pmpj5"),gt(i,"position","relative"),T(u,"class","UserColumn svelte-8pmpj5"),T(d,"class","StatusColumn svelte-8pmpj5"),T(m,"class","ImportanceColumn svelte-8pmpj5"),T(t,"class",y="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5")},m(J,V){F(J,t,V),S(t,i),S(i,n),S(i,r),S(i,s),s.checked=e[2][e[10]].__selected,S(t,a),S(t,u),B(l,u,null),S(t,c),S(t,d),B(f,d,null),S(t,g),S(t,m),B(_,m,null),v=!0,x||(O=[le(s,"change",G),le(s,"click",_t(Wr)),le(i,"click",_t(Yr)),le(t,"click",A),le(t,"mousedown",k)],x=!0)},p(J,V){e=J,(!v||V&4)&>(n,"background-color",ot(e[8].status)),(!v||V&4&&o!==(o=e[8].conversationid))&&(s.__value=o,Gt(s,s.__value)),V&4&&(s.checked=e[2][e[10]].__selected);const z={};V&4&&(z.row=e[8]),l.$set(z);const E={};V&4&&(E.row=e[8]),f.$set(E);const I={};V&4&&(I.row=e[8]),_.$set(I),(!v||V&4&&y!==(y="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5"))&&T(t,"class",y)},i(J){v||(w(l.$$.fragment,J),w(f.$$.fragment,J),w(_.$$.fragment,J),v=!0)},o(J){L(l.$$.fragment,J),L(f.$$.fragment,J),L(_.$$.fragment,J),v=!1},d(J){J&&R(t),K(l),K(f),K(_),x=!1,we(O)}}}function Hr(e){let t,i,n,r=Ee(e[2]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Yt(Wt(e,r,l));const o=l=>L(s[l],1,1,()=>{s[l]=null}),a=e[4].default,u=xe(a,e,e[3],null);return{c(){t=D("div");for(let l=0;l<s.length;l+=1)s[l].c();i=P(),u&&u.c(),T(t,"class","Body")},m(l,c){F(l,t,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(t,null);S(t,i),u&&u.m(t,null),n=!0},p(l,[c]){if(c&6){r=Ee(l[2]);let d;for(d=0;d<r.length;d+=1){const f=Wt(l,r,d);s[d]?(s[d].p(f,c),w(s[d],1)):(s[d]=Yt(f),s[d].c(),w(s[d],1),s[d].m(t,i))}for(he(),d=r.length;d<s.length;d+=1)o(d);me()}u&&u.p&&(!n||c&8)&&Be(u,a,l,l[3],n?Ie(a,l[3],c,null):Ke(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)w(s[c]);w(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)L(s[c]);L(u,l),n=!1},d(l){l&&R(t),Ct(s,l),u&&u.d(l)}}}const Wr=()=>{},Yr=()=>{};function Pr(e,t,i){let n,r=Q,s=()=>(r(),r=ye(u,g=>i(2,n=g)),u);e.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=t,{data:u}=t;s();let{middleclickhandler:l}=t;function c(g){n[g].__selected=this.checked,u.set(n)}const d=g=>location.assign("#Conversation;id="+g.conversationid),f=(g,m)=>{m.button===1&&l&&(l(g.conversationid),m.preventDefault(),m.stopPropagation())};return e.$$set=g=>{"data"in g&&s(i(0,u=g.data)),"middleclickhandler"in g&&i(1,l=g.middleclickhandler),"$$scope"in g&&i(3,a=g.$$scope)},[u,l,n,a,o,c,d,f]}class Vr extends ee{constructor(t){super(),j(this,t,Pr,Hr,Z,{data:0,middleclickhandler:1},Ur)}}function Qr(e){ie(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Zr(e){let t,i,n;return{c(){t=D("div"),i=D("p"),n=te(e[0]),T(t,"class","svelte-7bt636")},m(r,s){F(r,t,s),S(t,i),S(i,n)},p(r,[s]){s&1&&oe(n,r[0])},i:Q,o:Q,d(r){r&&R(t)}}}function Xr(e,t,i){let n,r,s,o,a;ne(e,$e,m=>i(8,o=m));let u,l=Te("loading");ne(e,l,m=>i(7,s=m));let c=Te("cursor");ne(e,c,m=>i(6,r=m));let d=Te("data");ne(e,d,m=>i(5,n=m));let f=Te("error");ne(e,f,m=>i(9,a=m));function g(m,_,y){return a?o("Loading failed. Please try again later."):m?o("Loading..."):_==null?y.length===0?o("No results match your filter. Try broadening the search criteria."):o("All data loaded"):o("Load more data")}return e.$$.update=()=>{e.$$.dirty&224&&i(0,u=g(s,r,n))},[u,l,c,d,f,n,r,s]}class qr extends ee{constructor(t){super(),j(this,t,Xr,Zr,Z,{},Qr)}}function jr(e){ie(e,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function es(e){let t,i,n,r,s;const o=e[4].default,a=xe(o,e,e[3],null);return{c(){t=D("button"),a&&a.c(),T(t,"class",i=Ce(e[0])+" svelte-10fvxzv")},m(u,l){F(u,t,l),a&&a.m(t,null),n=!0,r||(s=le(t,"click",e[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Be(a,o,u,u[3],n?Ie(o,u[3],l,null):Ke(u[3]),null),(!n||l&1&&i!==(i=Ce(u[0])+" svelte-10fvxzv"))&&T(t,"class",i)},i(u){n||(w(a,u),n=!0)},o(u){L(a,u),n=!1},d(u){u&&R(t),a&&a.d(u),r=!1,s()}}}function ts(e,t,i){let{$$slots:n={},$$scope:r}=t,{onAction:s=()=>{}}=t,{className:o=""}=t;function a(){s()}return e.$$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 Tt extends ee{constructor(t){super(),j(this,t,ts,es,Z,{onAction:2,className:0},jr)}}function ns(e){ie(e,"svelte-5dux4v","button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0;margin-left:30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.Title.svelte-5dux4v{font-size:13px;font-style:normal;font-weight:700;line-height:20px;margin:4px 0 8px 10px;font-family:'Roboto', sans-serif}.modal.svelte-5dux4v{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);min-width:200px;display:flex;flex-direction:column;align-items:flex-start;padding:4px;background-color:white;border-radius:6px;overflow:hidden;z-index:110;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}")}function Pt(e,t,i){const n=e.slice();return n[7]=t[i],n}function is(e){let t=e[7].label+"",i,n;return{c(){i=te(t),n=P()},m(r,s){F(r,i,s),F(r,n,s)},p:Q,d(r){r&&(R(i),R(n))}}}function Vt(e){let t,i;function n(){return e[5](e[7])}return t=new Tt({props:{className:e[0]===e[7].value?"SortingButton Selected":"SortingButton",onAction:n,$$slots:{default:[is]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(r,s){B(t,r,s),i=!0},p(r,s){e=r;const o={};s&1&&(o.className=e[0]===e[7].value?"SortingButton Selected":"SortingButton"),s&1024&&(o.$$scope={dirty:s,ctx:e}),t.$set(o)},i(r){i||(w(t.$$.fragment,r),i=!0)},o(r){L(t.$$.fragment,r),i=!1},d(r){K(t,r)}}}function rs(e){let t,i,n=e[1]("Sort by")+"",r,s,o,a=Ee(e[2]),u=[];for(let c=0;c<a.length;c+=1)u[c]=Vt(Pt(e,a,c));const l=c=>L(u[c],1,1,()=>{u[c]=null});return{c(){t=D("div"),i=D("span"),r=te(n),s=P();for(let c=0;c<u.length;c+=1)u[c].c();T(i,"class","Title svelte-5dux4v"),T(t,"class","modal svelte-5dux4v")},m(c,d){F(c,t,d),S(t,i),S(i,r),S(t,s);for(let f=0;f<u.length;f+=1)u[f]&&u[f].m(t,null);o=!0},p(c,[d]){if((!o||d&2)&&n!==(n=c[1]("Sort by")+"")&&oe(r,n),d&13){a=Ee(c[2]);let f;for(f=0;f<a.length;f+=1){const g=Pt(c,a,f);u[f]?(u[f].p(g,d),w(u[f],1)):(u[f]=Vt(g),u[f].c(),w(u[f],1),u[f].m(t,null))}for(he(),f=a.length;f<u.length;f+=1)l(f);me()}},i(c){if(!o){for(let d=0;d<a.length;d+=1)w(u[d]);o=!0}},o(c){u=u.filter(Boolean);for(let d=0;d<u.length;d+=1)L(u[d]);o=!1},d(c){c&&R(t),Ct(u,c)}}}function ss(e,t,i){let n;ne(e,$e,c=>i(1,n=c));let{currentValue:r="importance"}=t,{closeModal:s=()=>{}}=t;const o=on(),a=[{value:"importance",label:n("Importance")},{value:"created-newest",label:n("Date created - Newest")},{value:"created-oldest",label:n("Date created - Oldest")},{value:"changed-newest",label:n("Date changed - Newest")},{value:"changed-oldest",label:n("Date changed - Oldest")}];function u(c){i(0,r=c),o("change",{value:c}),s()}const l=c=>u(c.value);return e.$$set=c=>{"currentValue"in c&&i(0,r=c.currentValue),"closeModal"in c&&i(4,s=c.closeModal)},[r,n,a,u,s,l]}class os extends ee{constructor(t){super(),j(this,t,ss,rs,Z,{currentValue:0,closeModal:4},ns)}}function as(e){ie(e,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function ls(e){let t,i,n;return{c(){t=D("div"),T(t,"class","backdrop svelte-657q9o")},m(r,s){F(r,t,s),i||(n=le(t,"click",_t(function(){at(e[0])&&e[0].apply(this,arguments)})),i=!0)},p(r,[s]){e=r},i:Q,o:Q,d(r){r&&R(t),i=!1,n()}}}function us(e,t,i){let{onClick:n}=t;return e.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class cs extends ee{constructor(t){super(),j(this,t,us,ls,Z,{onClick:0},as)}}function ds(e){ie(e,"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 fs(e){let t,i,n,r,s,o;return n=new qr({}),{c(){t=D("div"),i=D("div"),H(n.$$.fragment),T(i,"class","load svelte-1fwehqj"),T(t,"class","load svelte-1fwehqj")},m(a,u){F(a,t,u),S(t,i),B(n,i,null),e[14](i),r=!0,s||(o=le(i,"click",e[15]),s=!0)},p:Q,i(a){r||(w(n.$$.fragment,a),r=!0)},o(a){L(n.$$.fragment,a),r=!1},d(a){a&&R(t),K(n),e[14](null),s=!1,o()}}}function Qt(e){let t,i,n,r;return t=new os({props:{closeModal:e[12]}}),t.$on("change",hs),n=new cs({props:{onClick:e[12]}}),{c(){H(t.$$.fragment),i=P(),H(n.$$.fragment)},m(s,o){B(t,s,o),F(s,i,o),B(n,s,o),r=!0},p:Q,i(s){r||(w(t.$$.fragment,s),w(n.$$.fragment,s),r=!0)},o(s){L(t.$$.fragment,s),L(n.$$.fragment,s),r=!1},d(s){s&&R(i),K(t,s),K(n,s)}}}function gs(e){let t,i,n,r,s,o;i=new ki({props:{direction:e[4],data:e[0],selectedAll:e[3],cursor:e[6],filters:e[7]}}),i.$on("openModal",e[13]),r=new Vr({props:{data:e[0],middleclickhandler:e[2],$$slots:{default:[fs]},$$scope:{ctx:e}}});let a=e[10]&&Qt(e);return{c(){t=D("div"),H(i.$$.fragment),n=P(),H(r.$$.fragment),s=P(),a&&a.c(),T(t,"class","container svelte-1fwehqj")},m(u,l){F(u,t,l),B(i,t,null),S(t,n),B(r,t,null),S(t,s),a&&a.m(t,null),e[16](t),o=!0},p(u,[l]){const c={};l&16&&(c.direction=u[4]),l&1&&(c.data=u[0]),l&8&&(c.selectedAll=u[3]),l&64&&(c.cursor=u[6]),l&128&&(c.filters=u[7]),i.$set(c);const d={};l&1&&(d.data=u[0]),l&4&&(d.middleclickhandler=u[2]),l&133410&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[10]?a?(a.p(u,l),l&1024&&w(a,1)):(a=Qt(u),a.c(),w(a,1),a.m(t,null)):a&&(he(),L(a,1,1,()=>{a=null}),me())},i(u){o||(w(i.$$.fragment,u),w(r.$$.fragment,u),w(a),o=!0)},o(u){L(i.$$.fragment,u),L(r.$$.fragment,u),L(a),o=!1},d(u){u&&R(t),K(i),K(r),a&&a.d(),e[16](null)}}}function hs(e){let t=e.detail.value;console.log(t)}function ms(e,t,i){let n,r=Q,s=()=>(r(),r=ye(f,k=>i(11,n=k)),f);e.$$.on_destroy.push(()=>r());let{data:o}=t,{loadMore:a}=t,{middleclickhandler:u}=t,{selectedAll:l}=t,{direction:c}=t,{loaded:d}=t,{cursor:f}=t;s();let{filters:g}=t,m,_,y=!1;function v(){i(10,y=!y)}function x(){i(10,y=!0)}sn(()=>{const k=new IntersectionObserver(J=>{J[0].isIntersecting&&a(!1)},{root:_,threshold:.5});return k.observe(m),()=>k.unobserve(m)});function O(k){Ze[k?"unshift":"push"](()=>{m=k,i(8,m)})}const G=()=>a(d&&!n);function A(k){Ze[k?"unshift":"push"](()=>{_=k,i(9,_)})}return e.$$set=k=>{"data"in k&&i(0,o=k.data),"loadMore"in k&&i(1,a=k.loadMore),"middleclickhandler"in k&&i(2,u=k.middleclickhandler),"selectedAll"in k&&i(3,l=k.selectedAll),"direction"in k&&i(4,c=k.direction),"loaded"in k&&i(5,d=k.loaded),"cursor"in k&&s(i(6,f=k.cursor)),"filters"in k&&i(7,g=k.filters)},[o,a,u,l,c,d,f,g,m,_,y,n,v,x,O,G,A]}class ps extends ee{constructor(t){super(),j(this,t,ms,gs,Z,{data:0,loadMore:1,middleclickhandler:2,selectedAll:3,direction:4,loaded:5,cursor:6,filters:7},ds)}}var Ge=globalThis&&globalThis.__awaiter||function(e,t,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(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};const _s="https://localhost/api/v3".replace(/\/+$/,"");class Ot{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:_s}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||vn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:()=>Ge(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const vs=new Ot;class ft{constructor(t=vs){this.configuration=t,this.fetchApi=(i,n)=>Ge(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 ks(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=t.middleware}withMiddleware(...t){const i=this.clone();return i.middleware=i.middleware.concat(...t),i}withPreMiddleware(...t){const i=t.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...t){const i=t.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(t){return t?ft.jsonRegex.test(t):!1}request(t,i){return Ge(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(t,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new ws(s,"Response returned an error code")})}createFetchParams(t,i){return Ge(this,void 0,void 0,function*(){let n=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(t.query));const r=Object.assign({},this.configuration.headers,t.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Ge(this,void 0,void 0,function*(){return i}),o={method:t.method,headers:r,body:t.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:t})),u=Object.assign(Object.assign({},a),{body:bs(a.body)||a.body instanceof URLSearchParams||ys(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const t=this.constructor,i=new t(this.configuration);return i.middleware=this.middleware.slice(),i}}ft.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ys(e){return typeof Blob<"u"&&e instanceof Blob}function bs(e){return typeof FormData<"u"&&e instanceof FormData}class ws extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class ks extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class Zt extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function h(e,t){const i=e[t];return i!=null}function vn(e,t=""){return Object.keys(e).map(i=>yn(i,e[i],t)).filter(i=>i.length>0).join("&")}function yn(e,t,i=""){const n=i+(i.length?`[${e}]`:e);if(t instanceof Array){const r=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(t instanceof Set){const r=Array.from(t);return yn(e,r,i)}return t instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?vn(t,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(t))}`}class X{constructor(t,i=n=>n){this.raw=t,this.transformer=i}value(){return Ge(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Ts(e){return Cs(e)}function Cs(e,t){return e==null?e:{departmentid:h(e,"departmentid")?e.departmentid:void 0,onlineStatus:h(e,"online_status")?e.online_status:void 0,presetStatus:h(e,"preset_status")?e.preset_status:void 0}}function $s(e){return Ls(e)}function Ls(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,username:h(e,"username")?e.username:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,roleid:h(e,"roleid")?e.roleid:void 0,departmentsStatuses:h(e,"departments_statuses")?e.departments_statuses.map(Ts):void 0,twofa:h(e,"twofa")?e.twofa:void 0,lastPswdChange:h(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0}}function Ss(e){return Ns(e)}function Ns(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,status:h(e,"status")?e.status:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,rstatus:h(e,"rstatus")?e.rstatus:void 0,statusdatestarted:h(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:h(e,"chat_order")?e.chat_order:void 0}}function Ds(e){return As(e)}function As(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,onlineCode:h(e,"online_code")?e.online_code:void 0,offlineCode:h(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:h(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:h(e,"offline_code_css")?e.offline_code_css:void 0,provide:h(e,"provide")?e.provide:void 0,impressions:h(e,"impressions")?e.impressions:void 0,tickets:h(e,"tickets")?e.tickets:void 0,status:h(e,"status")?e.status:void 0,lastDisplayTime:h(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:h(e,"last_display_url")?e.last_display_url:void 0}}function pe(e){return Os(e)}function Os(e,t){return e==null?e:{count:h(e,"count")?e.count:void 0}}function Rs(e){return Ms(e)}function Ms(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,agentCount:h(e,"agent_count")?e.agent_count:void 0}}function Fs(e){return Gs(e)}function Gs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,logid:h(e,"logid")?e.logid:void 0,line:h(e,"line")?e.line:void 0,filename:h(e,"filename")?e.filename:void 0,created:h(e,"created")?e.created:void 0,level:h(e,"level")?e.level:void 0,type:h(e,"type")?e.type:void 0,message:h(e,"message")?e.message:void 0,ip:h(e,"ip")?e.ip:void 0,groupid:h(e,"groupid")?e.groupid:void 0}}function zs(e){return Es(e)}function Es(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,chats:h(e,"chats")?e.chats:void 0}}function xs(e){return Is(e)}function Is(e,t){return e==null?e:{name:h(e,"name")?e.name:void 0,code:h(e,"code")?e.code:void 0,engName:h(e,"eng_name")?e.eng_name:void 0,translated:h(e,"translated")?e.translated:void 0,isDefault:h(e,"is_default")?e.is_default:void 0,active:h(e,"active")?e.active:void 0,isCustom:h(e,"is_custom")?e.is_custom:void 0,isBuiltIn:h(e,"is_builtIn")?e.is_builtIn:void 0}}function Bs(e){return Ks(e)}function Ks(e,t){return e==null?e:{codeName:h(e,"code_name")?e.code_name:void 0,name:h(e,"name")?e.name:void 0,description:h(e,"description")?e.description:void 0,active:h(e,"active")?e.active:void 0,help:h(e,"help")?e.help:void 0,multiple:h(e,"multiple")?e.multiple:void 0,configFile:h(e,"config_file")?e.config_file:void 0,price:h(e,"price")?e.price:void 0,legacyIntegration:h(e,"legacy_integration")?e.legacy_integration:void 0}}function mt(e){return Js(e)}function Js(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,slaTicketId:h(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,departmentName:h(e,"department_name")?e.department_name:void 0,levelid:h(e,"levelid")?e.levelid:void 0,slaLevelName:h(e,"sla_level_name")?e.sla_level_name:void 0,sla:h(e,"sla")?e.sla:void 0,dateCreated:h(e,"date_created")?e.date_created:void 0,dateClosed:h(e,"date_closed")?e.date_closed:void 0,dateDue:h(e,"date_due")?e.date_due:void 0,slaLevelId:h(e,"sla_level_id")?e.sla_level_id:void 0,slaType:h(e,"sla_type")?new Date(e.sla_type):void 0,agentid:h(e,"agentid")?e.agentid:void 0,agentFirstname:h(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:h(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:h(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:h(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:h(e,"req_firstname")?e.req_firstname:void 0,reqLastname:h(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:h(e,"req_systemname")?e.req_systemname:void 0,reqContactName:h(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:h(e,"req_avatar_url")?e.req_avatar_url:void 0}}function Xt(e){return Us(e)}function Us(e,t){return e==null?e:{tagid:h(e,"tagid")?e.tagid:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,color:h(e,"color")?e.color:void 0,backgroundcolor:h(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:h(e,"is_public")?e.is_public:void 0}}function bn(e){return Hs(e)}function Hs(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,datecreated:h(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:h(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:h(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:h(e,"rorder")?e.rorder:void 0,datedue:h(e,"datedue")?new Date(e.datedue):void 0,datereopen:h(e,"datereopen")?new Date(e.datereopen):void 0,status:h(e,"status")?e.status:void 0,channelType:h(e,"channel_type")?e.channel_type:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,agentid:h(e,"agentid")?e.agentid:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,messagegroupsIn:h(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:h(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:h(e,"contactid")?e.contactid:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,phones:h(e,"phones")?e.phones:void 0,jobPosition:h(e,"job_position")?e.job_position:void 0,contactType:h(e,"contact_type")?e.contact_type:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,timeOffset:h(e,"time_offset")?e.time_offset:void 0,gender:h(e,"gender")?e.gender:void 0,levelid:h(e,"levelid")?e.levelid:void 0,groups:h(e,"groups")?e.groups:void 0,contactStatus:h(e,"contact_status")?e.contact_status:void 0,company:h(e,"company")?e.company:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,userid:h(e,"userid")?e.userid:void 0,roleid:h(e,"roleid")?e.roleid:void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0,accountuserstatus:h(e,"accountuserstatus")?e.accountuserstatus:void 0,description:h(e,"description")?e.description:void 0,note:h(e,"note")?e.note:void 0,lastActivity:h(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:h(e,"tagnames")?e.tagnames:void 0,groupnames:h(e,"groupnames")?e.groupnames:void 0}}function Ws(e){return Ys(e)}function Ys(e,t){return e==null?e:{cursor:h(e,"cursor")?e.cursor:void 0,rows:h(e,"rows")?e.rows.map(bn):void 0}}function Ps(e){return Vs(e)}function Vs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,agentid:h(e,"agentid")?e.agentid:void 0,agent:h(e,"agent")?e.agent:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,ticket:h(e,"ticket")?e.ticket:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,company:h(e,"company")?e.company:void 0,contactid:h(e,"contactid")?e.contactid:void 0,customer:h(e,"customer")?e.customer:void 0,customerFirstname:h(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:h(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:h(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:h(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:h(e,"reportdate")?e.reportdate:void 0,reportedtime:h(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:h(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:h(e,"spenttime")?e.spenttime:void 0,dateinvoiced:h(e,"dateinvoiced")?e.dateinvoiced:void 0,note:h(e,"note")?e.note:void 0,type:h(e,"type")?e.type:void 0}}var M=globalThis&&globalThis.__awaiter||function(e,t,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(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};class wn extends ft{getAgentsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map($s))})}getAgentsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,i)).value()})}getAgentsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getAgentsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,i)).value()})}getCallsSlaLogGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(mt))})}getCallsSlaLogGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,i)).value()})}getCallsSlaLogGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getCallsSlaLogGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,i)).value()})}getChatsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(Ss))})}getChatsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,i)).value()})}getChatsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getChatsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,i)).value()})}getChatsSlaLogGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(mt))})}getChatsSlaLogGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,i)).value()})}getChatsSlaLogGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getChatsSlaLogGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,i)).value()})}getContactWidgetsCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getContactWidgetsCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,i)).value()})}getContactWidgetsListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 X(s,o=>o.map(Ds))})}getContactWidgetsList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,i)).value()})}getCustomerGroupsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 X(s,o=>o.map(Xt))})}getCustomerGroupsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,i)).value()})}getDepartmensGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getDepartmensGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,i)).value()})}getDepartmentsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(Rs))})}getDepartmentsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,i)).value()})}getEventLogsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(Fs))})}getEventLogsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,i)).value()})}getEventLogsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getEventLogsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,i)).value()})}getInviteAgentsGridListRaw(t,i){return M(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new Zt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.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(t.departmentId))),method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(zs))})}getInviteAgentsGridList(t,i){return M(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,i)).value()})}getLanguagesGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(xs))})}getLanguagesGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,i)).value()})}getLanguagesGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getLanguagesGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,i)).value()})}getPlugindGridListRaw(t,i){return M(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new Zt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.pluginPurpose!==void 0&&(n.pluginPurpose=t.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 X(s,o=>o.map(Bs))})}getPlugindGridList(t,i){return M(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,i)).value()})}getTagsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 X(s,o=>o.map(Xt))})}getTagsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,i)).value()})}getTicketsGridDatasetRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>Ws(o))})}getTicketsGridDataset(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,i)).value()})}getTicketsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(bn))})}getTicketsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,i)).value()})}getTicketsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>pe(o))})}getTicketsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,i)).value()})}getTicketsSlaLogGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(mt))})}getTicketsSlaLogGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,i)).value()})}getTicketsSlaLogGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getTicketsSlaLogGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,i)).value()})}getTimeReportsGridListRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.sortField!==void 0&&(n._sortField=t.sortField),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 X(s,o=>o.map(Ps))})}getTimeReportsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,i)).value()})}getTimeReportsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getTimeReportsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,i)).value()})}}const qt={Asc:"ASC",Desc:"DESC"},Qs={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 Zs{constructor(t,i){const n=new Ot({apiKey:t,basePath:i+"/api/v3"});this.api=new wn(n),this.tags=ce({})}async load(){let t=await this.api.getTagsGridList();t=t.reduce((i,n)=>(i[n.tagid]=n,i),{}),this.tags.set(t)}}function Xs(e){ie(e,"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 qs(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new be({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){H(t.$$.fragment),i=P(),r=te(n)},m(o,a){B(t,o,a),F(o,i,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Change filter")+"")&&oe(r,n)},i(o){s||(w(t.$$.fragment,o),s=!0)},o(o){L(t.$$.fragment,o),s=!1},d(o){o&&(R(i),R(r)),K(t,o)}}}function js(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new be({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){H(t.$$.fragment),i=P(),r=te(n)},m(o,a){B(t,o,a),F(o,i,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Configure chat button")+"")&&oe(r,n)},i(o){s||(w(t.$$.fragment,o),s=!0)},o(o){L(t.$$.fragment,o),s=!1},d(o){o&&(R(i),R(r)),K(t,o)}}}function eo(e){let t,i,n,r,s,o=e[0]("No tickets found")+"",a,u,l,c=e[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",d,f,g,m,_,y,v;return m=new Tt({props:{className:"Filter",$$slots:{default:[qs]},$$scope:{ctx:e}}}),y=new Tt({props:{className:"Configure",$$slots:{default:[js]},$$scope:{ctx:e}}}),{c(){t=D("div"),i=D("img"),r=P(),s=D("h1"),a=te(o),u=P(),l=D("p"),d=te(c),f=P(),g=D("div"),H(m.$$.fragment),_=P(),H(y.$$.fragment),T(i,"alt","No results placeholder"),pt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||T(i,"src",n),T(i,"class","svelte-19qi61t"),T(s,"class","svelte-19qi61t"),T(l,"class","svelte-19qi61t"),T(g,"class","Buttons"),T(t,"class","NoTickets svelte-19qi61t")},m(x,O){F(x,t,O),S(t,i),S(t,r),S(t,s),S(s,a),S(t,u),S(t,l),S(l,d),S(t,f),S(t,g),B(m,g,null),S(g,_),B(y,g,null),v=!0},p(x,[O]){(!v||O&1)&&o!==(o=x[0]("No tickets found")+"")&&oe(a,o),(!v||O&1)&&c!==(c=x[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&oe(d,c);const G={};O&3&&(G.$$scope={dirty:O,ctx:x}),m.$set(G);const A={};O&3&&(A.$$scope={dirty:O,ctx:x}),y.$set(A)},i(x){v||(w(m.$$.fragment,x),w(y.$$.fragment,x),v=!0)},o(x){L(m.$$.fragment,x),L(y.$$.fragment,x),v=!1},d(x){x&&R(t),K(m),K(y)}}}function to(e,t,i){let n;return ne(e,$e,r=>i(0,n=r)),[n]}class no extends ee{constructor(t){super(),j(this,t,to,eo,Z,{},Xs)}}function io(e){ie(e,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function ro(e){let t,i;return t=new ps({props:{direction:e[11],data:e[9],loaded:e[3],loadMore:e[2],cursor:e[13],middleclickhandler:e[1],selectedAll:e[7],filters:e[0]}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.loaded=n[3]),r&4&&(s.loadMore=n[2]),r&2&&(s.middleclickhandler=n[1]),r&1&&(s.filters=n[0]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function so(e){let t,i;return t=new no({}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p:Q,i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function oo(e){let t,i,n,r;const s=[so,ro],o=[];function a(u,l){return!u[5].length&&!u[4]?0:1}return i=a(e),n=o[i]=s[i](e),{c(){t=D("main"),n.c(),T(t,"class","svelte-14f2ism")},m(u,l){F(u,t,l),o[i].m(t,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(he(),L(o[c],1,1,()=>{o[c]=null}),me(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),w(n,1),n.m(t,null))},i(u){r||(w(n),r=!0)},o(u){L(n),r=!1},d(u){u&&R(t),o[i].d()}}}function ao(e,t,i){let n,r,s,o,a,u,l,c,{apikey:d}=t,{filters:f}=t,{middleclickhandler:g}=t,{selectionHandler:m}=t,{basePath:_}=t,y=ce({});ne(e,y,b=>i(17,n=b));let v=ce(!1);ne(e,v,b=>i(18,c=b));let x=new Zs(d,_);x.load(),Ne("tagsMap",x.tags);let O=ce(null);ne(e,O,b=>i(19,s=b)),Ne("error",O);const G=new Ot({apiKey:d,basePath:_+"/api/v3"}),A=new wn(G);Ne("api",A);const k=ce([]);ne(e,k,b=>i(5,a=b)),Ne("data",k);const J=ce(Qs.Rorder);ne(e,J,b=>i(21,u=b));const V=ce(!0);ne(e,V,b=>i(22,l=b));const z=ce(!1);ne(e,z,b=>i(4,r=b)),Ne("loading",z);const E=ce(null);ne(e,E,b=>i(20,o=b)),Ne("cursor",E);let I=!1,W=()=>({perPage:20,sortDir:l?qt.Asc:qt.Desc,filters:f,sortField:u,cursor:o||""}),{loadMore:de=async(b=!1)=>{if(!r&&(b===!0&&(_e(E,o=null,o),i(3,I=!1)),!(!o&&I))){_e(z,r=!0,r);try{const C=await A.getTicketsGridDatasetRaw(W());console.log("Loaded tickets response: ",C);const p=await C.value();b===!0&&_e(k,a=[],a),_e(k,a=a.concat(p.rows),a),_e(E,o=p.cursor,o),console.log("Loaded tickets value: ",p),console.log("Loaded tickets: ",p.rows.length,"cursor: ",p.cursor),i(3,I=!0)}catch(C){console.error("Loading tickets failed: ",C),_e(O,s=C.toString(),s)}_e(z,r=!1,r)}}}=t;return V.subscribe(async()=>{await de(!0)}),J.subscribe(async()=>{await de(!0)}),k.subscribe(b=>{_e(y,n=b.filter(C=>C.__selected??!1).map(C=>C.conversationid),n)}),Ne("loadMoreFunction",de),e.$$set=b=>{"apikey"in b&&i(14,d=b.apikey),"filters"in b&&i(0,f=b.filters),"middleclickhandler"in b&&i(1,g=b.middleclickhandler),"selectionHandler"in b&&i(15,m=b.selectionHandler),"basePath"in b&&i(16,_=b.basePath),"loadMore"in b&&i(2,de=b.loadMore)},e.$$.update=()=>{e.$$.dirty&425984&&m(n,c),e.$$.dirty&5&&f&&de(!0)},[f,g,de,I,r,a,y,v,O,k,J,V,z,E,d,m,_,n,c]}class lo extends ee{constructor(t){super(),j(this,t,ao,oo,Z,{apikey:14,filters:0,middleclickhandler:1,selectionHandler:15,basePath:16,loadMore:2},io)}}const uo="modulepreload",co=function(e){return"/"+e},jt={},en=function(t,i,n){if(!i||i.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=co(s),s in jt)return;jt[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":uo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function fo(){It("en",()=>en(()=>import("./en.js"),[])),It("sk",()=>en(()=>import("./sk.js"),[]))}function tn(e){let t,i,n;function r(o){e[12](o)}let s={apikey:e[0],basePath:e[3],filters:e[1],middleclickhandler:e[2],selectionHandler:e[5],$$slots:{default:[go]},$$scope:{ctx:e}};return e[4]!==void 0&&(s.loadMore=e[4]),t=new lo({props:s}),Ze.push(()=>Jn(t,"loadMore",r)),{c(){H(t.$$.fragment)},m(o,a){B(t,o,a),n=!0},p(o,a){const u={};a&1&&(u.apikey=o[0]),a&8&&(u.basePath=o[3]),a&2&&(u.filters=o[1]),a&4&&(u.middleclickhandler=o[2]),a&8192&&(u.$$scope={dirty:a,ctx:o}),!i&&a&16&&(i=!0,u.loadMore=o[4],xn(()=>i=!1)),t.$set(u)},i(o){n||(w(t.$$.fragment,o),n=!0)},o(o){L(t.$$.fragment,o),n=!1},d(o){K(t,o)}}}function go(e){let t;const i=e[11].default,n=xe(i,e,e[13],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),t=!0},p(r,s){n&&n.p&&(!t||s&8192)&&Be(n,i,r,r[13],t?Ie(i,r[13],s,null):Ke(r[13]),null)},i(r){t||(w(n,r),t=!0)},o(r){L(n,r),t=!1},d(r){n&&n.d(r)}}}function ho(e){let t,i,n,r,s=e[0]&&tn(e);return{c(){s&&s.c(),t=P(),i=D("link"),T(i,"rel","stylesheet"),T(i,"href",n=e[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),F(o,t,a),F(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&w(s,1)):(s=tn(o),s.c(),w(s,1),s.m(t.parentNode,t)):s&&(he(),L(s,1,1,()=>{s=null}),me()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&T(i,"href",n)},i(o){r||(w(s),r=!0)},o(o){L(s),r=!1},d(o){o&&(R(t),R(i)),s&&s.d(o)}}}function mo(e,t,i){let{$$slots:n={},$$scope:r}=t;fo();let{lang:s="sk"}=t,{apikey:o}=t,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=t,{middleclickhandler:u}=t,{selectionhandler:l}=t,{selectionMap:c={}}=t,{selectedAll:d=!1}=t,{basepath:f}=t,g;const m=function(v=!1){g&&g(v)};li({initialLocale:s,fallbackLocale:"en"}),fi();function _(v,x){i(6,c=v),i(7,d=x),l&&l(v,x)}function y(v){g=v,i(4,g)}return e.$$set=v=>{"lang"in v&&i(8,s=v.lang),"apikey"in v&&i(0,o=v.apikey),"filters"in v&&i(1,a=v.filters),"middleclickhandler"in v&&i(2,u=v.middleclickhandler),"selectionhandler"in v&&i(9,l=v.selectionhandler),"selectionMap"in v&&i(6,c=v.selectionMap),"selectedAll"in v&&i(7,d=v.selectedAll),"basepath"in v&&i(3,f=v.basepath),"$$scope"in v&&i(13,r=v.$$scope)},[o,a,u,f,g,_,c,d,s,l,m,n,y,r]}class po extends ee{constructor(t){super(),j(this,t,mo,ho,Z,{lang:8,apikey:0,filters:1,middleclickhandler:2,selectionhandler:9,selectionMap:6,selectedAll:7,basepath:3,reload:10})}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),ve()}get apikey(){return this.$$.ctx[0]}set apikey(t){this.$$set({apikey:t}),ve()}get filters(){return this.$$.ctx[1]}set filters(t){this.$$set({filters:t}),ve()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(t){this.$$set({middleclickhandler:t}),ve()}get selectionhandler(){return this.$$.ctx[9]}set selectionhandler(t){this.$$set({selectionhandler:t}),ve()}get selectionMap(){return this.$$.ctx[6]}set selectionMap(t){this.$$set({selectionMap:t}),ve()}get selectedAll(){return this.$$.ctx[7]}set selectedAll(t){this.$$set({selectedAll:t}),ve()}get basepath(){return this.$$.ctx[3]}set basepath(t){this.$$set({basepath:t}),ve()}get reload(){return this.$$.ctx[10]}}customElements.define("tickets-table",Hn(po,{lang:{},apikey:{},filters:{},middleclickhandler:{},selectionhandler:{},selectionMap:{},selectedAll:{type:"Boolean"},basepath:{}},["default"],["reload"],!0));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qualityunit/liveagent-ticket-grid",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.26",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"dist/"
|
|
14
14
|
],
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@sveltejs/vite-plugin-svelte": "^2.
|
|
17
|
-
"@tsconfig/svelte": "^
|
|
18
|
-
"svelte": "^
|
|
19
|
-
"svelte-check": "^3.
|
|
20
|
-
"svelte-time": "^0.
|
|
21
|
-
"tslib": "^2.
|
|
22
|
-
"typescript": "^5.
|
|
23
|
-
"vite": "^4.
|
|
16
|
+
"@sveltejs/vite-plugin-svelte": "^2.5.3",
|
|
17
|
+
"@tsconfig/svelte": "^5.0.2",
|
|
18
|
+
"svelte": "^4.2.8",
|
|
19
|
+
"svelte-check": "^3.6.2",
|
|
20
|
+
"svelte-time": "^0.8.0",
|
|
21
|
+
"tslib": "^2.6.2",
|
|
22
|
+
"typescript": "^5.3.3",
|
|
23
|
+
"vite": "^4.0.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@qualityunit/liveagent-api": "^0.0.4",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"md5": "^2.3.0",
|
|
29
29
|
"svelte-avatar": "^1.2.0",
|
|
30
30
|
"svelte-icons-pack": "^2.1.0",
|
|
31
|
-
"svelte-intl-precompile": "^0.12.
|
|
31
|
+
"svelte-intl-precompile": "^0.12.3"
|
|
32
32
|
},
|
|
33
33
|
"description": "Ticket grid component for LiveAgent",
|
|
34
34
|
"main": "svelte.config.js",
|