@qualityunit/liveagent-ticket-grid 0.0.14 → 0.0.18
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 -6
- package/package.json +1 -1
package/dist/assets/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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 Xe(e,t){for(const i in t)e[i]=t[i];return e}function pt(e){return e()}function Lt(){return Object.create(null)}function he(e){e.forEach(pt)}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 Pe;function ct(e,t){return Pe||(Pe=document.createElement("a")),Pe.href=t,e===Pe.href}function Qt(e){return Object.keys(e).length===0}function ye(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(ye(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?Xe(i.ctx.slice(),e[1](n(t))):i.ctx}function Ge(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 ze(e,t,i,n,r,s){if(r){const o=Zt(t,i,n,s);e.p(o,r)}}function Me(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 hn(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function Nt(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 ke(e){return e??""}function ge(e,t,i){return e.set(i),t}const mn=["",!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 yn(){return q("")}function ue(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function St(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 vn=["width","height"];function Dt(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&&vn.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 wn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function kn(e,t,i){~mn.indexOf(i)?wn(e,t):ie(e,t)}function at(e,t,i,n){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function At(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 _t(){if(!Ye)throw new Error("Function called outside component initialization");return Ye}function qt(e){_t().$$.on_mount.push(e)}function Ne(e,t){return _t().$$.context.set(e,t),t}function Re(e){return _t().$$.context.get(e)}const Ae=[],je=[];let Fe=[];const Rt=[],Cn=Promise.resolve();let dt=!1;function Ln(){dt||(dt=!0,Cn.then(fe))}function ft(e){Fe.push(e)}const lt=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),Nn(t.$$)}}catch(t){throw Ae.length=0,Se=0,t}for(Ue(null),Ae.length=0,Se=0;je.length;)je.pop()();for(let t=0;t<Fe.length;t+=1){const i=Fe[t];lt.has(i)||(lt.add(i),i())}Fe.length=0}while(Ae.length);for(;Rt.length;)Rt.pop()();dt=!1,lt.clear(),Ue(e)}function Nn(e){if(e.fragment!==null){e.update(),he(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ft)}}function Sn(e){const t=[],i=[];Fe.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),Fe=t}const qe=new Set;let Te;function me(){Te={r:0,c:[],p:Te}}function pe(){Te.r||he(Te.c),Te=Te.p}function S(e,t){e&&e.i&&(qe.delete(e),e.i(t))}function R(e,t,i,n){if(e&&e.o){if(qe.has(e))return;qe.add(e),Te.c.push(()=>{qe.delete(e),n&&(i&&e.d(1),n())}),e.o(t)}else n&&n()}function Dn(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 W(e){e&&e.c()}function H(e,t,i,n){const{fragment:r,after_update:s}=e.$$;r&&r.m(t,i),n||ft(()=>{const o=e.$$.on_mount.map(pt).filter(We);e.$$.on_destroy?e.$$.on_destroy.push(...o):he(o),e.$$.on_mount=[]}),s.forEach(ft)}function U(e,t){const i=e.$$;i.fragment!==null&&(Sn(i.after_update),he(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function An(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:Lt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Lt(),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&&An(e,d)),f}):[],l.update(),c=!0,he(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(pt).filter(We);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){he(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 Rn(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 On(e){let t,i;return{c(){t=$("span"),N(t,"class",i=ke(`Icon ${e[0]} ${e[1]}`)+" svelte-yh1nwn")},m(n,r){B(n,t,r)},p(n,[r]){r&3&&i!==(i=ke(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&N(t,"class",i)},i:V,o:V,d(n){n&&J(t)}}}function Fn(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 ve extends te{constructor(t){super(),ee(this,t,Fn,On,j,{className:0,iconLaClassName:1},Rn)}}const De=[];function $n(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 $n(i,o=>{let a=!1;const u=[];let l=0,c=V;const d=()=>{if(l)return;c();const g=t(n?u[0]:u,o);s?o(g):c=We(g)?g:V},f=r.map((g,m)=>ye(g,p=>{u[m]=p,l&=~(1<<m),a&&d()},()=>{l|=1<<m}));return a=!0,d(),function(){he(f),c(),a=!1}})}const zn={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"}}},Mn={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:zn,warnOnMissingMessages:!0},En=Mn;let jt;function et(){return jt}function xn(e){return jt=e}function Ve(){return En}function Ot(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Qe(e,t=Ve().fallbackLocale){const i=Ot(e);return t?[...new Set([...i,...Ot(t)])]:i}let yt;const nt=ce({});function In(e){return yt[e]||null}function vt(e){return e in yt}function Kn(e,t){if(vt(e)){const i=In(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 Bn(e){if(e==null)return null;const t=Qe(e);for(let i=0;i<t.length;i++){const n=t[i];if(vt(n))return n}return null}function Jn(e,...t){nt.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}nt.subscribe(e=>yt=e);const Ft=ce(!1),bt={};function Un(e){bt[e]=new Set}function Hn(e){delete bt[e]}function He(e){return bt[e]}function Wn(e){return Qe(e).reverse().map(t=>{const i=He(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function wt(e){return Qe(e).reverse().some(He)}const Be={};function en(e){if(!wt(e))return Promise.resolve();if(e in Be)return Be[e];const t=Wn(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>Ft.set(!0),Ve().loadingDelay);return Be[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{Hn(n),s=s.map(o=>o.default||o),Jn(n,...s)}))).then(()=>{clearTimeout(i),Ft.set(!1),delete Be[e]}),Be[e]}function $t(e,t){He(e)||Un(e);const i=He(e);He(e).has(t)||(vt(e)||nt.update(n=>(n[e]={},n)),i.add(t))}const Ee=ce("");Ee.subscribe(e=>{xn(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const gt=Ee.set;Ee.set=e=>Bn(e)&&wt(e)?en(e).then(()=>gt(e)):gt(e);Ee.update=e=>{let t=et();e(t),gt(t)};function Yn(e){const{formats:t,...i}=e,n=e.initialLocale||e.fallbackLocale,r=Ve();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={},Vn=(e,t,i)=>i&&(t in Ce||(Ce[t]={}),e in Ce[t]||(Ce[t][e]=i),i),Qn=(e,t)=>{if(t==null)return;if(t in Ce&&e in Ce[t])return Ce[t][e];const i=Qe(t);for(let n=0;n<i.length;n++){const r=i[n],s=Kn(r,e);if(s)return Vn(e,t,s)}},Zn=(e,t,i={})=>{const n=typeof t=="string"?t:t.id,r=typeof t=="string"?i:t,{values:s,locale:o=e||et(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=Qn(n,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(Ve().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${n}" was not found in "${Qe(o).join('", "')}".${wt(et())?`
|
|
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 je(e,t){for(const i in t)e[i]=t[i];return e}function pt(e){return e()}function Lt(){return Object.create(null)}function he(e){e.forEach(pt)}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 qe;function dt(e,t){return qe||(qe=document.createElement("a")),qe.href=t,e===qe.href}function Qt(e){return Object.keys(e).length===0}function ye(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(ye(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?je(i.ctx.slice(),e[1](n(t))):i.ctx}function Ge(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 ze(e,t,i,n,r,s){if(r){const o=Zt(t,i,n,s);e.p(o,r)}}function Me(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 hn(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function Nt(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 ke(e){return e??""}function ge(e,t,i){return e.set(i),t}const mn=["",!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 yn(){return q("")}function ue(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function St(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 vn=["width","height"];function Dt(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&&vn.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 wn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function kn(e,t,i){~mn.indexOf(i)?wn(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 At(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 _t(){if(!Ye)throw new Error("Function called outside component initialization");return Ye}function qt(e){_t().$$.on_mount.push(e)}function Ne(e,t){return _t().$$.context.set(e,t),t}function Re(e){return _t().$$.context.get(e)}const Ae=[],et=[];let Fe=[];const Rt=[],Cn=Promise.resolve();let ft=!1;function Ln(){ft||(ft=!0,Cn.then(fe))}function gt(e){Fe.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),Nn(t.$$)}}catch(t){throw Ae.length=0,Se=0,t}for(Ue(null),Ae.length=0,Se=0;et.length;)et.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(;Rt.length;)Rt.pop()();ft=!1,ut.clear(),Ue(e)}function Nn(e){if(e.fragment!==null){e.update(),he(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(gt)}}function Sn(e){const t=[],i=[];Fe.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),Fe=t}const Xe=new Set;let Te;function me(){Te={r:0,c:[],p:Te}}function pe(){Te.r||he(Te.c),Te=Te.p}function S(e,t){e&&e.i&&(Xe.delete(e),e.i(t))}function R(e,t,i,n){if(e&&e.o){if(Xe.has(e))return;Xe.add(e),Te.c.push(()=>{Xe.delete(e),n&&(i&&e.d(1),n())}),e.o(t)}else n&&n()}function Dn(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 W(e){e&&e.c()}function H(e,t,i,n){const{fragment:r,after_update:s}=e.$$;r&&r.m(t,i),n||gt(()=>{const o=e.$$.on_mount.map(pt).filter(We);e.$$.on_destroy?e.$$.on_destroy.push(...o):he(o),e.$$.on_mount=[]}),s.forEach(gt)}function U(e,t){const i=e.$$;i.fragment!==null&&(Sn(i.after_update),he(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function An(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:Lt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Lt(),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&&An(e,d)),f}):[],l.update(),c=!0,he(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(pt).filter(We);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){he(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 Rn(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 On(e){let t,i;return{c(){t=$("span"),N(t,"class",i=ke(`Icon ${e[0]} ${e[1]}`)+" svelte-yh1nwn")},m(n,r){B(n,t,r)},p(n,[r]){r&3&&i!==(i=ke(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&N(t,"class",i)},i:V,o:V,d(n){n&&J(t)}}}function Fn(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 ve extends te{constructor(t){super(),ee(this,t,Fn,On,j,{className:0,iconLaClassName:1},Rn)}}const De=[];function $n(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 $n(i,o=>{let a=!1;const u=[];let l=0,c=V;const d=()=>{if(l)return;c();const g=t(n?u[0]:u,o);s?o(g):c=We(g)?g:V},f=r.map((g,m)=>ye(g,p=>{u[m]=p,l&=~(1<<m),a&&d()},()=>{l|=1<<m}));return a=!0,d(),function(){he(f),c(),a=!1}})}const zn={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"}}},Mn={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:zn,warnOnMissingMessages:!0},En=Mn;let jt;function tt(){return jt}function In(e){return jt=e}function Qe(){return En}function Ot(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Ze(e,t=Qe().fallbackLocale){const i=Ot(e);return t?[...new Set([...i,...Ot(t)])]:i}let yt;const it=ce({});function xn(e){return yt[e]||null}function vt(e){return e in yt}function Kn(e,t){if(vt(e)){const i=xn(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 Bn(e){if(e==null)return null;const t=Ze(e);for(let i=0;i<t.length;i++){const n=t[i];if(vt(n))return n}return null}function Jn(e,...t){it.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}it.subscribe(e=>yt=e);const Ft=ce(!1),bt={};function Un(e){bt[e]=new Set}function Hn(e){delete bt[e]}function He(e){return bt[e]}function Wn(e){return Ze(e).reverse().map(t=>{const i=He(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function wt(e){return Ze(e).reverse().some(He)}const Be={};function en(e){if(!wt(e))return Promise.resolve();if(e in Be)return Be[e];const t=Wn(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>Ft.set(!0),Qe().loadingDelay);return Be[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{Hn(n),s=s.map(o=>o.default||o),Jn(n,...s)}))).then(()=>{clearTimeout(i),Ft.set(!1),delete Be[e]}),Be[e]}function $t(e,t){He(e)||Un(e);const i=He(e);He(e).has(t)||(vt(e)||it.update(n=>(n[e]={},n)),i.add(t))}const Ee=ce("");Ee.subscribe(e=>{In(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const ht=Ee.set;Ee.set=e=>Bn(e)&&wt(e)?en(e).then(()=>ht(e)):ht(e);Ee.update=e=>{let t=tt();e(t),ht(t)};function Yn(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)),Ee.set(n)}const Ce={},Vn=(e,t,i)=>i&&(t in Ce||(Ce[t]={}),e in Ce[t]||(Ce[t][e]=i),i),Qn=(e,t)=>{if(t==null)return;if(t in Ce&&e in Ce[t])return Ce[t][e];const i=Ze(t);for(let n=0;n<i.length;n++){const r=i[n],s=Kn(r,e);if(s)return Vn(e,t,s)}},Zn=(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=Qn(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 "${Ze(o).join('", "')}".${wt(tt())?`
|
|
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)},Ie=Gn([Ee,it],([e])=>Zn.bind(null,e));function Pn(e){return en(e||tt()||Qe().initialLocale)}function qn(e){se(e,"svelte-1dh1n9d",".Head.svelte-1dh1n9d{display:none}.headCheckbox.svelte-1dh1n9d{width:20px}.user.svelte-1dh1n9d{display:none;text-align:left}button.svelte-1dh1n9d{border:none;background:none;font-size:13px;font-weight:400;color:var(--department-bg-color)}.status.svelte-1dh1n9d{text-align:left}.importance.svelte-1dh1n9d{cursor:pointer;text-align:left}@media screen and (min-width: 768px){.Head.svelte-1dh1n9d{display:grid;grid-template-columns:60px 3fr 1fr;position:sticky;top:0;color:var(--panel_text_color);font-size:14px;font-family:'Roboto', sans-serif}}@media(min-width: 900px){.Head.svelte-1dh1n9d{grid-template-columns:60px 170px auto 190px}.user.svelte-1dh1n9d{display:block}}@media(min-width: 1300px){.Head.svelte-1dh1n9d{grid-template-columns:60px 260px auto 230px}}")}function Xn(e){let t,i;return t=new ve({props:{iconLaClassName:"la-move-down"}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function jn(e){let t,i;return t=new ve({props:{iconLaClassName:"la-move-up"}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},i(n){i||(S(t.$$.fragment,n),i=!0)},o(n){R(t.$$.fragment,n),i=!1},d(n){U(t,n)}}}function ei(e){let t,i,n,r,s,o=e[5]("User")+"",a,u,l,c=e[5]("Status")+"",d,f,g,m,p,T,b=e[5]("Importance")+"",v,O,D,F;const I=[jn,Xn],x=[];function Q(A,G){return A[3]?0:1}return m=Q(e),p=x[m]=I[m](e),{c(){t=$("div"),i=$("div"),n=$("input"),r=Y(),s=$("button"),a=q(o),u=Y(),l=$("button"),d=q(c),f=Y(),g=$("button"),p.c(),T=Y(),v=q(b),N(n,"type","checkbox"),N(i,"class","headCheckbox svelte-1dh1n9d"),N(s,"class","user svelte-1dh1n9d"),s.disabled=!0,N(l,"class","status svelte-1dh1n9d"),l.disabled=!0,N(g,"class","importance svelte-1dh1n9d"),N(t,"class","Head svelte-1dh1n9d")},m(A,G){B(A,t,G),C(t,i),C(i,n),n.checked=e[4],C(t,r),C(t,s),C(s,a),C(t,u),C(t,l),C(l,d),C(t,f),C(t,g),x[m].m(g,null),C(g,T),C(g,v),O=!0,D||(F=[ue(n,"change",e[8]),ue(n,"click",e[6]),ue(g,"click",e[9])],D=!0)},p(A,[G]){G&16&&(n.checked=A[4]),(!O||G&32)&&o!==(o=A[5]("User")+"")&&ie(a,o),(!O||G&32)&&c!==(c=A[5]("Status")+"")&&ie(d,c);let K=m;m=Q(A),m!==K&&(me(),R(x[K],1,1,()=>{x[K]=null}),pe(),p=x[m],p||(p=x[m]=I[m](A),p.c()),S(p,1),p.m(g,T)),(!O||G&32)&&b!==(b=A[5]("Importance")+"")&&ie(v,b)},i(A){O||(S(p),O=!0)},o(A){R(p),O=!1},d(A){A&&J(t),x[m].d(),D=!1,he(F)}}}function ti(e,t,i){let n,r=V,s=()=>(r(),r=ye(g,D=>i(3,n=D)),g),o,a=V,u=()=>(a(),a=ye(m,D=>i(4,o=D)),m),l,c=V,d=()=>(c(),c=ye(p,D=>i(10,l=D)),p),f;oe(e,Ie,D=>i(5,f=D)),e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>a()),e.$$.on_destroy.push(()=>c());let{direction:g}=t;s();let{selectedAll:m}=t;u();let{data:p}=t;d();function T(){ge(p,l=l.map(D=>(D.__selected=!o,D)),l)}const b=()=>{ge(g,n=!n,n)};function v(){o=this.checked,m.set(o)}const O=()=>b();return e.$$set=D=>{"direction"in D&&s(i(0,g=D.direction)),"selectedAll"in D&&u(i(1,m=D.selectedAll)),"data"in D&&d(i(2,p=D.data))},[g,m,p,n,o,f,T,b,v,O]}class ni extends te{constructor(t){super(),ee(this,t,ti,ei,j,{direction:0,selectedAll:1,data:2},qn)}}function nt(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 ii=()=>{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]},ri=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 si(e){se(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 oi(e){let t;return{c(){t=$("div"),t.textContent=`${e[10]}`,N(t,"class","innerInitials svelte-hbozhk")},m(i,n){B(i,t,n)},p:V,d(i){i&&J(t)}}}function ai(e){let t,i,n,r,s,o;return{c(){t=$("div"),i=$("img"),N(i,"alt",""),N(i,"class",ke("innerImage")+" svelte-hbozhk"),dt(i.src,n=e[2])||N(i,"src",n),N(t,"class",r=ke(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){B(a,t,u),C(t,i),s||(o=[ue(i,"error",e[15]),ue(i,"load",e[16])],s=!0)},p(a,u){u&4&&!dt(i.src,n=a[2])&&N(i,"src",n),u&256&&r!==(r=ke(a[8]?"imageLoading":"")+" svelte-hbozhk")&&N(t,"class",r)},d(a){a&&J(t),s=!1,he(o)}}}function li(e){let t,i;function n(o,a){return o[2]&&!o[7]?ai:oi}let r=n(e),s=r(e);return{c(){t=$("div"),s.c(),N(t,"aria-label",e[1]),N(t,"class","wrapper svelte-hbozhk"),N(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){B(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&&N(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])&&N(t,"style",i)},i:V,o:V,d(o){o&&J(t),s.d()}}}function ui(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?ii():a,m=s||ri(r),p=m.length;let T=!1,b=!0;const v=()=>i(7,T=!0),O=()=>i(8,b=!1);return e.$$set=D=>{"style"in D&&i(0,n=D.style),"name"in D&&i(1,r=D.name),"initials"in D&&i(12,s=D.initials),"src"in D&&i(2,o=D.src),"bgColor"in D&&i(13,a=D.bgColor),"textColor"in D&&i(3,u=D.textColor),"size"in D&&i(4,l=D.size),"borderRadius"in D&&i(5,c=D.borderRadius),"square"in D&&i(6,d=D.square),"randomBgColor"in D&&i(14,f=D.randomBgColor)},[n,r,o,u,l,c,d,T,b,g,m,p,s,a,f,v,O]}class ci extends te{constructor(t){super(),ee(this,t,ui,li,j,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},si)}}var tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}},rn={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}};rn.exports=t})();var di=rn.exports,mt={utf8:{stringToBytes:function(e){return mt.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(mt.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("")}}},Gt=mt;/*!
|
|
4
4
|
* Determine if an object is a Buffer
|
|
5
5
|
*
|
|
6
6
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
7
7
|
* @license MIT
|
|
8
|
-
*/var fi=function(e){return e!=null&&(sn(e)||gi(e)||!!e._isBuffer)};function sn(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function gi(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&sn(e.slice(0,0))}(function(){var e=di,t=Gt.utf8,i=fi,n=Gt.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,p=r._gg,T=r._hh,b=r._ii,g=0;g<a.length;g+=16){var v=l,O=c,D=d,F=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=p(l,c,d,f,a[g+1],5,-165796510),f=p(f,l,c,d,a[g+6],9,-1069501632),d=p(d,f,l,c,a[g+11],14,643717713),c=p(c,d,f,l,a[g+0],20,-373897302),l=p(l,c,d,f,a[g+5],5,-701558691),f=p(f,l,c,d,a[g+10],9,38016083),d=p(d,f,l,c,a[g+15],14,-660478335),c=p(c,d,f,l,a[g+4],20,-405537848),l=p(l,c,d,f,a[g+9],5,568446438),f=p(f,l,c,d,a[g+14],9,-1019803690),d=p(d,f,l,c,a[g+3],14,-187363961),c=p(c,d,f,l,a[g+8],20,1163531501),l=p(l,c,d,f,a[g+13],5,-1444681467),f=p(f,l,c,d,a[g+2],9,-51403784),d=p(d,f,l,c,a[g+7],14,1735328473),c=p(c,d,f,l,a[g+12],20,-1926607734),l=T(l,c,d,f,a[g+5],4,-378558),f=T(f,l,c,d,a[g+8],11,-2022574463),d=T(d,f,l,c,a[g+11],16,1839030562),c=T(c,d,f,l,a[g+14],23,-35309556),l=T(l,c,d,f,a[g+1],4,-1530992060),f=T(f,l,c,d,a[g+4],11,1272893353),d=T(d,f,l,c,a[g+7],16,-155497632),c=T(c,d,f,l,a[g+10],23,-1094730640),l=T(l,c,d,f,a[g+13],4,681279174),f=T(f,l,c,d,a[g+0],11,-358537222),d=T(d,f,l,c,a[g+3],16,-722521979),c=T(c,d,f,l,a[g+6],23,76029189),l=T(l,c,d,f,a[g+9],4,-640364487),f=T(f,l,c,d,a[g+12],11,-421815835),d=T(d,f,l,c,a[g+15],16,530742520),c=T(c,d,f,l,a[g+2],23,-995338651),l=b(l,c,d,f,a[g+0],6,-198630844),f=b(f,l,c,d,a[g+7],10,1126891415),d=b(d,f,l,c,a[g+14],15,-1416354905),c=b(c,d,f,l,a[g+5],21,-57434055),l=b(l,c,d,f,a[g+12],6,1700485571),f=b(f,l,c,d,a[g+3],10,-1894986606),d=b(d,f,l,c,a[g+10],15,-1051523),c=b(c,d,f,l,a[g+1],21,-2054922799),l=b(l,c,d,f,a[g+8],6,1873313359),f=b(f,l,c,d,a[g+15],10,-30611744),d=b(d,f,l,c,a[g+6],15,-1560198380),c=b(c,d,f,l,a[g+13],21,1309151649),l=b(l,c,d,f,a[g+4],6,-145523070),f=b(f,l,c,d,a[g+11],10,-1120210379),d=b(d,f,l,c,a[g+2],15,718787259),c=b(c,d,f,l,a[g+9],21,-343485551),l=l+v>>>0,c=c+O>>>0,d=d+D>>>0,f=f+F>>>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,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 hi=nn.exports;const mi=kt(hi);function pi(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function _i(e){se(e,"svelte-1p23x6g",".Column.svelte-1p23x6g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function yi(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)&&ze(s,r,o,o[1],n?Ge(r,o[1],a,null):Me(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 vi(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 Tt extends te{constructor(t){super(),ee(this,t,vi,yi,j,{className:0},_i)}}function bi(e){se(e,"svelte-7jeavi",'.Tag.svelte-7jeavi{display:inline-block;color:var(--department-bg-color);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-7jeavi:before{font-family:"la-icon-font"}.SLA.svelte-7jeavi{border:1px solid #CFD6DD;border-radius:4px}')}function wi(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-7jeavi"),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)&&ze(u,a,l,l[3],o?Ge(a,l[3],c,null):Me(l[3]),null),(!o||c&1)&&ie(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-7jeavi"))&&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 ki(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 it extends te{constructor(t){super(),ee(this,t,ki,wi,j,{text:0,className:1,style:2},bi)}}function Ti(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 Ci(e){let t,i;return t=new ve({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 Li(e){let t,i;return t=new it({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[Ci]},$$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 Ni(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 rt extends te{constructor(t){super(),ee(this,t,Ni,Li,j,{text:0,className:4,style:1,iconLaClassName:2},Ti)}}function Si(e){se(e,"svelte-1cewolh",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}.Tag.NoCompanyTag{background-color:white;color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-1cewolh{display:none}.companyTag.svelte-1cewolh{display:none}.name.svelte-1cewolh{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;border-right:1px solid var(--main-textcolor)}.email.svelte-1cewolh{font-size:13px;line-height:20px;padding-left:6px}.texts.svelte-1cewolh{display:flex;flex-direction:row;justify-content:flex-start}@media(min-width: 900px){.avatar.svelte-1cewolh{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-1cewolh{padding:0;border:none}.email.svelte-1cewolh{padding:0}.companyTag.svelte-1cewolh{display:flex}.texts.svelte-1cewolh{display:flex;flex-direction:column;justify-content:center}}")}function zt(e){let t,i;return t=new ci({props:{bgColor:e[3](),name:mt(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.name=mt(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 Di(e){let t,i=e[0],n,r,s,o,a,u=e[0].emails+"",l,c,d,f,g,m=zt(e);return f=new rt({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"),m.c(),n=Y(),r=$("div"),s=$("div"),s.textContent=`${name}`,o=Y(),a=$("div"),l=q(u),c=Y(),d=$("div"),W(f.$$.fragment),N(t,"class","avatar svelte-1cewolh"),N(s,"class","name svelte-1cewolh"),N(a,"class","email svelte-1cewolh"),N(d,"class","companyTag svelte-1cewolh"),N(r,"class","texts svelte-1cewolh")},m(p,T){B(p,t,T),m.m(t,null),B(p,n,T),B(p,r,T),C(r,s),C(r,o),C(r,a),C(a,l),C(r,c),C(r,d),H(f,d,null),g=!0},p(p,T){T&1&&j(i,i=p[0])?(me(),R(m,1,1,V),pe(),m=zt(p),m.c(),S(m,1),m.m(t,null)):m.p(p,T),(!g||T&1)&&u!==(u=p[0].emails+"")&&ie(l,u);const b={};T&1&&(b.text=p[0].company==="Y"?"Company":"No Company"),T&1&&(b.className=(p[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),f.$set(b)},i(p){g||(S(m),S(f.$$.fragment,p),g=!0)},o(p){R(m),R(f.$$.fragment,p),g=!1},d(p){p&&J(t),m.d(p),p&&J(n),p&&J(r),U(f)}}}function Ai(e){let t,i;return t=new Tt({props:{className:e[1],$$slots:{default:[Di]},$$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 mt(e){if(!e)return"";let t=e.firstname+" "+e.lastname;return t.trim()||(t=e.systemName),t}function Ri(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/"+mi(a.emails[0]??"")+"?s=200&d=404"),u}function o(a){let u;a?u=pi(mt(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 Oi extends te{constructor(t){super(),ee(this,t,Ri,Ai,j,{row:0,className:1},Si)}}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",f="quarter",g="year",m="date",p="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,v={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(M){var w=["th","st","nd","rd"],L=M%100;return"["+M+(w[(L-20)%10]||w[L]||w[0])+"]"}},O=function(M,w,L){var _=String(M);return!_||_.length>=w?M:""+Array(w+1-_.length).join(L)+M},D={s:O,z:function(M){var w=-M.utcOffset(),L=Math.abs(w),_=Math.floor(L/60),y=L%60;return(w<=0?"+":"-")+O(_,2,"0")+":"+O(y,2,"0")},m:function M(w,L){if(w.date()<L.date())return-M(L,w);var _=12*(L.year()-w.year())+(L.month()-w.month()),y=w.clone().add(_,d),k=L-y<0,z=w.clone().add(_+(k?-1:1),d);return+(-(_+(L-y)/(k?y-z:z-y))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:d,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},F="en",x={};x[F]=v;var I=function(M){return M instanceof K},Q=function M(w,L,_){var y;if(!w)return F;if(typeof w=="string"){var k=w.toLowerCase();x[k]&&(y=k),L&&(x[k]=L,y=k);var z=w.split("-");if(!y&&z.length>1)return M(z[0])}else{var Z=w.name;x[Z]=w,y=Z}return!_&&y&&(F=y),y||!_&&F},A=function(M,w){if(I(M))return M.clone();var L=typeof w=="object"?w:{};return L.date=M,L.args=arguments,new K(L)},G=D;G.l=Q,G.i=I,G.w=function(M,w){return A(M,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var K=function(){function M(L){this.$L=Q(L.locale,null,!0),this.parse(L)}var w=M.prototype;return w.parse=function(L){this.$d=function(_){var y=_.date,k=_.utc;if(y===null)return new Date(NaN);if(G.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var z=y.match(T);if(z){var Z=z[2]-1||0,re=(z[7]||"0").substring(0,3);return k?new Date(Date.UTC(z[1],Z,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)):new Date(z[1],Z,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)}}return new Date(y)}(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 G},w.isValid=function(){return this.$d.toString()!==p},w.isSame=function(L,_){var y=A(L);return this.startOf(_)<=y&&y<=this.endOf(_)},w.isAfter=function(L,_){return A(L)<this.startOf(_)},w.isBefore=function(L,_){return this.endOf(_)<A(L)},w.$g=function(L,_,y){return G.u(L)?this[_]:this.set(y,L)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(L,_){var y=this,k=!!G.u(_)||_,z=G.p(L),Z=function(Le,le){var we=G.w(y.$u?Date.UTC(y.$y,le,Le):new Date(y.$y,le,Le),y);return k?we:we.endOf(l)},re=function(Le,le){return G.w(y.toDate()[Le].apply(y.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(le)),y)},ne=this.$W,ae=this.$M,be=this.$D,_e="set"+(this.$u?"UTC":"");switch(z){case g:return k?Z(1,0):Z(31,11);case d:return k?Z(1,ae):Z(0,ae+1);case c:var Ie=this.$locale().weekStart||0,Ke=(ne<Ie?ne+7:ne)-Ie;return Z(k?be-Ke:be+(6-Ke),ae);case l:case m: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 y,k=G.p(L),z="set"+(this.$u?"UTC":""),Z=(y={},y[l]=z+"Date",y[m]=z+"Date",y[d]=z+"Month",y[g]=z+"FullYear",y[u]=z+"Hours",y[a]=z+"Minutes",y[o]=z+"Seconds",y[s]=z+"Milliseconds",y)[k],re=k===l?this.$D+(_-this.$W):_;if(k===d||k===g){var ne=this.clone().set(m,1);ne.$d[Z](re),ne.init(),this.$d=ne.set(m,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[G.p(L)]()},w.add=function(L,_){var y,k=this;L=Number(L);var z=G.p(_),Z=function(ae){var be=A(k);return G.w(be.date(be.date()+Math.round(ae*L)),k)};if(z===d)return this.set(d,this.$M+L);if(z===g)return this.set(g,this.$y+L);if(z===l)return Z(1);if(z===c)return Z(7);var re=(y={},y[a]=n,y[u]=r,y[o]=i,y)[z]||1,ne=this.$d.getTime()+L*re;return G.w(ne,this)},w.subtract=function(L,_){return this.add(-1*L,_)},w.format=function(L){var _=this,y=this.$locale();if(!this.isValid())return y.invalidDate||p;var k=L||"YYYY-MM-DDTHH:mm:ssZ",z=G.z(this),Z=this.$H,re=this.$m,ne=this.$M,ae=y.weekdays,be=y.months,_e=function(le,we,ot,Ze){return le&&(le[we]||le(_,k))||ot[we].slice(0,Ze)},Ie=function(le){return G.s(Z%12||12,le,"0")},Ke=y.meridiem||function(le,we,ot){var Ze=le<12?"AM":"PM";return ot?Ze.toLowerCase():Ze},Le={YY:String(this.$y).slice(-2),YYYY:G.s(this.$y,4,"0"),M:ne+1,MM:G.s(ne+1,2,"0"),MMM:_e(y.monthsShort,ne,be,3),MMMM:_e(be,ne),D:this.$D,DD:G.s(this.$D,2,"0"),d:String(this.$W),dd:_e(y.weekdaysMin,this.$W,ae,2),ddd:_e(y.weekdaysShort,this.$W,ae,3),dddd:ae[this.$W],H:String(Z),HH:G.s(Z,2,"0"),h:Ie(1),hh:Ie(2),a:Ke(Z,re,!0),A:Ke(Z,re,!1),m:String(re),mm:G.s(re,2,"0"),s:String(this.$s),ss:G.s(this.$s,2,"0"),SSS:G.s(this.$ms,3,"0"),Z:z};return k.replace(b,function(le,we){return we||Le[le]||z.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(L,_,y){var k,z=G.p(_),Z=A(L),re=(Z.utcOffset()-this.utcOffset())*n,ne=this-Z,ae=G.m(this,Z);return ae=(k={},k[g]=ae/12,k[d]=ae,k[f]=ae/3,k[c]=(ne-re)/6048e5,k[l]=(ne-re)/864e5,k[u]=ne/r,k[a]=ne/n,k[o]=ne/i,k)[z]||ne,y?ae:G.a(ae)},w.daysInMonth=function(){return this.endOf(d).$D},w.$locale=function(){return x[this.$L]},w.locale=function(L,_){if(!L)return this.$L;var y=this.clone(),k=Q(L,_,!0);return k&&(y.$L=k),y},w.clone=function(){return G.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()},M}(),P=K.prototype;return A.prototype=P,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",g],["$D",m]].forEach(function(M){P[M[1]]=function(w){return this.$g(w,M[0],M[1])}}),A.extend=function(M,w){return M.$i||(M(w,K,A),M.$i=!0),A},A.locale=Q,A.isDayjs=I,A.unix=function(M){return A(1e3*M)},A.en=x[F],A.Ls=x,A.p={},A})})(on);var Fi=on.exports;const Je=kt(Fi);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,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,g){for(var m,p,T,b=d.$locale().relativeTime||o,v=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=v.length,D=0;D<O;D+=1){var F=v[D];F.d&&(m=f?r(l).diff(d,F.d,!0):d.diff(l,F.d,!0));var x=(i.rounding||Math.round)(Math.abs(m));if(T=m>0,x<=F.r||!F.r){x<=1&&D>0&&(F=v[D-1]);var I=b[F.l];g&&(x=g(""+x)),p=typeof I=="string"?I.replace("%d",x):I(x,c,F.l,T);break}}if(c)return p;var Q=T?b.future:b.past;return typeof Q=="function"?Q(p):Q.replace("%s",p)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(an);var $i=an.exports;const Gi=kt($i);Je.extend(Gi);function zi(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return{c(){t=$("time"),i=q(e[0]),Dt(t,r)},m(s,o){B(s,t,o),C(t,i)},p(s,[o]){o&1&&kn(i,s[0],r.contenteditable),Dt(t,r=Dn(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 Mi(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Nt(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 qt(()=>(u&&l!==!1&&(d=setInterval(()=>{i(0,c=Je(o).from())},Math.abs(typeof l=="number"?l:f))),()=>{typeof d=="number"&&clearInterval(d)})),e.$$set=g=>{t=Xe(Xe({},t),hn(g)),i(3,s=Nt(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&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 Ei extends te{constructor(t){super(),ee(this,t,Mi,zi,j,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function xi(e){se(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Ii(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 Ki(e){let t,i;return t=new Ei({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 Bi(e){let t,i,n,r,s;const o=[Ki,Ii],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):(me(),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 Ji(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,Ji,Bi,j,{data:0,format:1,style:2,relative:3},xi)}}function Ui(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 Hi(e){let t,i,n,r;i=new ve({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)&&ze(o,s,a,a[7],r?Ge(s,a[7],u,null):Me(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 Wi(e){let t,i;return t=new rt({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 Yi(e){let t,i,n,r,s,o;const a=[Wi,Hi],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(e),n=u[i]=a[i](e),s=new it({props:{style:e[4],text:e[1]}}),{c(){t=$("div"),n.c(),r=Y(),W(s.$$.fragment),N(t,"class",ke(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 f=i;i=l(c),i===f?u[i].p(c,d):(me(),R(u[f],1,1,()=>{u[f]=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 g={};d&16&&(g.style=c[4]),d&2&&(g.text=c[1]),s.$set(g)},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 Vi(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 un extends te{constructor(t){super(),ee(this,t,Vi,Yi,j,{iconText:0,tagText:1,iconLaClassName:2,className:6},Ui)}}function Qi(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 Zi(e){let t,i;return t=new un({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[Qi]},$$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 Pi(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 qi extends te{constructor(t){super(),ee(this,t,Pi,Zi,j,{tagText:0,due:1})}}function Xi(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 ji(e){let t,i;return t=new it({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 er(e){let t,i;return t=new qi({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 tr(e){let t,i=e[1].code+"",n,r,s,o,a,u,l=e[1].messagegroupsIn+"",c,d,f,g,m,p,T=e[1].messagegroupsOut+"",b,v,O,D,F,x,I,Q,A,G,K,P;o=new ve({props:{iconLaClassName:"la-incoming"}}),g=new ve({props:{iconLaClassName:"la-outgoing"}}),x=new ln({props:{data:e[1].datecreated,format:e[2]}});const M=[er,ji],w=[];function L(_,y){return y&2&&(Q=null),Q==null&&(Q=_[1].datedue instanceof Date&&!isNaN(_[1].datedue)),Q?0:1}return A=L(e,-1),G=w[A]=M[A](e),{c(){t=$("span"),n=q(i),r=Y(),s=$("div"),W(o.$$.fragment),a=Y(),u=$("span"),c=q(l),d=Y(),f=$("div"),W(g.$$.fragment),m=Y(),p=$("span"),b=q(T),v=Y(),O=$("div"),D=$("span"),D.textContent=`${e[3]}:`,F=Y(),W(x.$$.fragment),I=Y(),G.c(),K=yn(),N(t,"class","TicketId svelte-rl80em"),N(s,"class","Communication incomingMessages svelte-rl80em"),N(f,"class","Communication outgoingMessages svelte-rl80em"),N(O,"class","Created svelte-rl80em")},m(_,y){B(_,t,y),C(t,n),B(_,r,y),B(_,s,y),H(o,s,null),C(s,a),C(s,u),C(u,c),B(_,d,y),B(_,f,y),H(g,f,null),C(f,m),C(f,p),C(p,b),B(_,v,y),B(_,O,y),C(O,D),C(O,F),H(x,O,null),B(_,I,y),w[A].m(_,y),B(_,K,y),P=!0},p(_,y){(!P||y&2)&&i!==(i=_[1].code+"")&&ie(n,i),(!P||y&2)&&l!==(l=_[1].messagegroupsIn+"")&&ie(c,l),(!P||y&2)&&T!==(T=_[1].messagegroupsOut+"")&&ie(b,T);const k={};y&2&&(k.data=_[1].datecreated),y&4&&(k.format=_[2]),x.$set(k);let z=A;A=L(_,y),A===z?w[A].p(_,y):(me(),R(w[z],1,1,()=>{w[z]=null}),pe(),G=w[A],G?G.p(_,y):(G=w[A]=M[A](_),G.c()),S(G,1),G.m(K.parentNode,K))},i(_){P||(S(o.$$.fragment,_),S(g.$$.fragment,_),S(x.$$.fragment,_),S(G),P=!0)},o(_){R(o.$$.fragment,_),R(g.$$.fragment,_),R(x.$$.fragment,_),R(G),P=!1},d(_){_&&J(t),_&&J(r),_&&J(s),U(o),_&&J(d),_&&J(f),U(g),_&&J(v),_&&J(O),U(x),_&&J(I),w[A].d(_),_&&J(K)}}}function nr(e){let t,i;return t=new Tt({props:{className:e[0],$$slots:{default:[tr]},$$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 ir(e,t,i){let n;oe(e,xe,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 rr extends te{constructor(t){super(),ee(this,t,ir,nr,j,{className:0,row:1,format:2},Xi)}}function sr(e){se(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function or(e){let t,i;return t=new it({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 ar(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 lr extends te{constructor(t){super(),ee(this,t,ar,or,j,{tagId:4},sr)}}function Mt(e,t,i){const n=e.slice();return n[1]=t[i],n}function Et(e){let t,i;return t=new lr({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 ur(e){let t,i,n=e[0],r=[];for(let o=0;o<n.length;o+=1)r[o]=Et(Mt(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=Mt(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(me(),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 cr(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class dr extends te{constructor(t){super(),ee(this,t,cr,ur,j,{tags:0})}}function fr(e){se(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function gr(e){let t,i;return t=new rt({props:{className:e[1][e[0]].text,style:"color: white; background-color: "+tt(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: "+tt(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 hr(e,t,i){let n;oe(e,xe,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 mr extends te{constructor(t){super(),ee(this,t,hr,gr,j,{status:0},fr)}}function pr(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 _r(e){let t,i;return t=new rt({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 yr(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 vr(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,d,f,g,m,p,T,b;c=new mr({props:{status:e[0].status}});const v=[yr,_r],O=[];function D(F,x){return x&1&&(f=null),f==null&&(f=F[0].agentname.trim()!==""),f?0:1}return g=D(e,-1),m=O[g]=v[g](e),T=new dr({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(),m.c(),p=Y(),W(T.$$.fragment),N(t,"class","subject svelte-nfaksv"),N(s,"class","preview svelte-nfaksv"),N(l,"class","additional svelte-nfaksv")},m(F,x){B(F,t,x),C(t,n),B(F,r,x),B(F,s,x),C(s,a),B(F,u,x),B(F,l,x),H(c,l,null),C(l,d),O[g].m(l,null),C(l,p),H(T,l,null),b=!0},p(F,x){(!b||x&1)&&i!==(i=F[0].subject+"")&&ie(n,i),(!b||x&1)&&o!==(o=F[0].preview+"")&&ie(a,o);const I={};x&1&&(I.status=F[0].status),c.$set(I);let Q=g;g=D(F,x),g===Q?O[g].p(F,x):(me(),R(O[Q],1,1,()=>{O[Q]=null}),pe(),m=O[g],m?m.p(F,x):(m=O[g]=v[g](F),m.c()),S(m,1),m.m(l,p));const A={};x&1&&(A.tags=F[0].tags),T.$set(A)},i(F){b||(S(c.$$.fragment,F),S(m),S(T.$$.fragment,F),b=!0)},o(F){R(c.$$.fragment,F),R(m),R(T.$$.fragment,F),b=!1},d(F){F&&J(t),F&&J(r),F&&J(s),F&&J(u),F&&J(l),U(c),O[g].d(),U(T)}}}function br(e){let t,i;return t=new Tt({props:{className:e[1],$$slots:{default:[vr]},$$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 wr(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 kr extends te{constructor(t){super(),ee(this,t,wr,br,j,{row:0,className:1},pr)}}function Tr(e){se(e,"svelte-1cy1emj",`.Row.svelte-1cy1emj{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
8
|
+
*/var fi=function(e){return e!=null&&(sn(e)||gi(e)||!!e._isBuffer)};function sn(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function gi(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&sn(e.slice(0,0))}(function(){var e=di,t=Gt.utf8,i=fi,n=Gt.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,p=r._gg,T=r._hh,b=r._ii,g=0;g<a.length;g+=16){var v=l,O=c,D=d,F=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=p(l,c,d,f,a[g+1],5,-165796510),f=p(f,l,c,d,a[g+6],9,-1069501632),d=p(d,f,l,c,a[g+11],14,643717713),c=p(c,d,f,l,a[g+0],20,-373897302),l=p(l,c,d,f,a[g+5],5,-701558691),f=p(f,l,c,d,a[g+10],9,38016083),d=p(d,f,l,c,a[g+15],14,-660478335),c=p(c,d,f,l,a[g+4],20,-405537848),l=p(l,c,d,f,a[g+9],5,568446438),f=p(f,l,c,d,a[g+14],9,-1019803690),d=p(d,f,l,c,a[g+3],14,-187363961),c=p(c,d,f,l,a[g+8],20,1163531501),l=p(l,c,d,f,a[g+13],5,-1444681467),f=p(f,l,c,d,a[g+2],9,-51403784),d=p(d,f,l,c,a[g+7],14,1735328473),c=p(c,d,f,l,a[g+12],20,-1926607734),l=T(l,c,d,f,a[g+5],4,-378558),f=T(f,l,c,d,a[g+8],11,-2022574463),d=T(d,f,l,c,a[g+11],16,1839030562),c=T(c,d,f,l,a[g+14],23,-35309556),l=T(l,c,d,f,a[g+1],4,-1530992060),f=T(f,l,c,d,a[g+4],11,1272893353),d=T(d,f,l,c,a[g+7],16,-155497632),c=T(c,d,f,l,a[g+10],23,-1094730640),l=T(l,c,d,f,a[g+13],4,681279174),f=T(f,l,c,d,a[g+0],11,-358537222),d=T(d,f,l,c,a[g+3],16,-722521979),c=T(c,d,f,l,a[g+6],23,76029189),l=T(l,c,d,f,a[g+9],4,-640364487),f=T(f,l,c,d,a[g+12],11,-421815835),d=T(d,f,l,c,a[g+15],16,530742520),c=T(c,d,f,l,a[g+2],23,-995338651),l=b(l,c,d,f,a[g+0],6,-198630844),f=b(f,l,c,d,a[g+7],10,1126891415),d=b(d,f,l,c,a[g+14],15,-1416354905),c=b(c,d,f,l,a[g+5],21,-57434055),l=b(l,c,d,f,a[g+12],6,1700485571),f=b(f,l,c,d,a[g+3],10,-1894986606),d=b(d,f,l,c,a[g+10],15,-1051523),c=b(c,d,f,l,a[g+1],21,-2054922799),l=b(l,c,d,f,a[g+8],6,1873313359),f=b(f,l,c,d,a[g+15],10,-30611744),d=b(d,f,l,c,a[g+6],15,-1560198380),c=b(c,d,f,l,a[g+13],21,1309151649),l=b(l,c,d,f,a[g+4],6,-145523070),f=b(f,l,c,d,a[g+11],10,-1120210379),d=b(d,f,l,c,a[g+2],15,718787259),c=b(c,d,f,l,a[g+9],21,-343485551),l=l+v>>>0,c=c+O>>>0,d=d+D>>>0,f=f+F>>>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,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 hi=nn.exports;const mi=kt(hi);function pi(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function _i(e){se(e,"svelte-1p23x6g",".Column.svelte-1p23x6g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function yi(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)&&ze(s,r,o,o[1],n?Ge(r,o[1],a,null):Me(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 vi(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 Tt extends te{constructor(t){super(),ee(this,t,vi,yi,j,{className:0},_i)}}function bi(e){se(e,"svelte-7jeavi",'.Tag.svelte-7jeavi{display:inline-block;color:var(--department-bg-color);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-7jeavi:before{font-family:"la-icon-font"}.SLA.svelte-7jeavi{border:1px solid #CFD6DD;border-radius:4px}')}function wi(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-7jeavi"),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)&&ze(u,a,l,l[3],o?Ge(a,l[3],c,null):Me(l[3]),null),(!o||c&1)&&ie(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-7jeavi"))&&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 ki(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,ki,wi,j,{text:0,className:1,style:2},bi)}}function Ti(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 Ci(e){let t,i;return t=new ve({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 Li(e){let t,i;return t=new rt({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[Ci]},$$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 Ni(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,Ni,Li,j,{text:0,className:4,style:1,iconLaClassName:2},Ti)}}function Si(e){se(e,"svelte-1cewolh",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}.Tag.NoCompanyTag{background-color:white;color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-1cewolh{display:none}.companyTag.svelte-1cewolh{display:none}.name.svelte-1cewolh{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;border-right:1px solid var(--main-textcolor)}.email.svelte-1cewolh{font-size:13px;line-height:20px;padding-left:6px}.texts.svelte-1cewolh{display:flex;flex-direction:row;justify-content:flex-start}@media(min-width: 900px){.avatar.svelte-1cewolh{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-1cewolh{padding:0;border:none}.email.svelte-1cewolh{padding:0}.companyTag.svelte-1cewolh{display:flex}.texts.svelte-1cewolh{display:flex;flex-direction:column;justify-content:center}}")}function zt(e){let t,i;return t=new ci({props:{bgColor:e[3](e[0]),name:Ve(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=Ve(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 Di(e){let t,i=[e[3](e[0]),Ve(e[0]),e[2](e[0])],n,r,s,o,a,u=e[0].emails+"",l,c,d,f,g,m=zt(e);return f=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"),m.c(),n=Y(),r=$("div"),s=$("div"),s.textContent=`${name}`,o=Y(),a=$("div"),l=q(u),c=Y(),d=$("div"),W(f.$$.fragment),N(t,"class","avatar svelte-1cewolh"),N(s,"class","name svelte-1cewolh"),N(a,"class","email svelte-1cewolh"),N(d,"class","companyTag svelte-1cewolh"),N(r,"class","texts svelte-1cewolh")},m(p,T){B(p,t,T),m.m(t,null),B(p,n,T),B(p,r,T),C(r,s),C(r,o),C(r,a),C(a,l),C(r,c),C(r,d),H(f,d,null),g=!0},p(p,T){T&1&&j(i,i=[p[3](p[0]),Ve(p[0]),p[2](p[0])])?(me(),R(m,1,1,V),pe(),m=zt(p),m.c(),S(m,1),m.m(t,null)):m.p(p,T),(!g||T&1)&&u!==(u=p[0].emails+"")&&ie(l,u);const b={};T&1&&(b.text=p[0].company==="Y"?"Company":"No Company"),T&1&&(b.className=(p[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),f.$set(b)},i(p){g||(S(m),S(f.$$.fragment,p),g=!0)},o(p){R(m),R(f.$$.fragment,p),g=!1},d(p){p&&J(t),m.d(p),p&&J(n),p&&J(r),U(f)}}}function Ai(e){let t,i;return t=new Tt({props:{className:e[1],$$slots:{default:[Di]},$$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 Ve(e){if(!e)return"";let t=e.firstname+" "+e.lastname;return t.trim()||(t=e.systemName),t}function Ri(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/"+mi(a.emails[0]??"")+"?s=200&d=404"),u}function o(a){let u;a?u=pi(Ve(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 Oi extends te{constructor(t){super(),ee(this,t,Ri,Ai,j,{row:0,className:1},Si)}}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",f="quarter",g="year",m="date",p="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,v={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(M){var w=["th","st","nd","rd"],L=M%100;return"["+M+(w[(L-20)%10]||w[L]||w[0])+"]"}},O=function(M,w,L){var _=String(M);return!_||_.length>=w?M:""+Array(w+1-_.length).join(L)+M},D={s:O,z:function(M){var w=-M.utcOffset(),L=Math.abs(w),_=Math.floor(L/60),y=L%60;return(w<=0?"+":"-")+O(_,2,"0")+":"+O(y,2,"0")},m:function M(w,L){if(w.date()<L.date())return-M(L,w);var _=12*(L.year()-w.year())+(L.month()-w.month()),y=w.clone().add(_,d),k=L-y<0,z=w.clone().add(_+(k?-1:1),d);return+(-(_+(L-y)/(k?y-z:z-y))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:d,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},F="en",I={};I[F]=v;var x=function(M){return M instanceof K},Q=function M(w,L,_){var y;if(!w)return F;if(typeof w=="string"){var k=w.toLowerCase();I[k]&&(y=k),L&&(I[k]=L,y=k);var z=w.split("-");if(!y&&z.length>1)return M(z[0])}else{var Z=w.name;I[Z]=w,y=Z}return!_&&y&&(F=y),y||!_&&F},A=function(M,w){if(x(M))return M.clone();var L=typeof w=="object"?w:{};return L.date=M,L.args=arguments,new K(L)},G=D;G.l=Q,G.i=x,G.w=function(M,w){return A(M,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var K=function(){function M(L){this.$L=Q(L.locale,null,!0),this.parse(L)}var w=M.prototype;return w.parse=function(L){this.$d=function(_){var y=_.date,k=_.utc;if(y===null)return new Date(NaN);if(G.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var z=y.match(T);if(z){var Z=z[2]-1||0,re=(z[7]||"0").substring(0,3);return k?new Date(Date.UTC(z[1],Z,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)):new Date(z[1],Z,z[3]||1,z[4]||0,z[5]||0,z[6]||0,re)}}return new Date(y)}(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 G},w.isValid=function(){return this.$d.toString()!==p},w.isSame=function(L,_){var y=A(L);return this.startOf(_)<=y&&y<=this.endOf(_)},w.isAfter=function(L,_){return A(L)<this.startOf(_)},w.isBefore=function(L,_){return this.endOf(_)<A(L)},w.$g=function(L,_,y){return G.u(L)?this[_]:this.set(y,L)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(L,_){var y=this,k=!!G.u(_)||_,z=G.p(L),Z=function(Le,le){var we=G.w(y.$u?Date.UTC(y.$y,le,Le):new Date(y.$y,le,Le),y);return k?we:we.endOf(l)},re=function(Le,le){return G.w(y.toDate()[Le].apply(y.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(le)),y)},ne=this.$W,ae=this.$M,be=this.$D,_e="set"+(this.$u?"UTC":"");switch(z){case g:return k?Z(1,0):Z(31,11);case d:return k?Z(1,ae):Z(0,ae+1);case c:var xe=this.$locale().weekStart||0,Ke=(ne<xe?ne+7:ne)-xe;return Z(k?be-Ke:be+(6-Ke),ae);case l:case m: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 y,k=G.p(L),z="set"+(this.$u?"UTC":""),Z=(y={},y[l]=z+"Date",y[m]=z+"Date",y[d]=z+"Month",y[g]=z+"FullYear",y[u]=z+"Hours",y[a]=z+"Minutes",y[o]=z+"Seconds",y[s]=z+"Milliseconds",y)[k],re=k===l?this.$D+(_-this.$W):_;if(k===d||k===g){var ne=this.clone().set(m,1);ne.$d[Z](re),ne.init(),this.$d=ne.set(m,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[G.p(L)]()},w.add=function(L,_){var y,k=this;L=Number(L);var z=G.p(_),Z=function(ae){var be=A(k);return G.w(be.date(be.date()+Math.round(ae*L)),k)};if(z===d)return this.set(d,this.$M+L);if(z===g)return this.set(g,this.$y+L);if(z===l)return Z(1);if(z===c)return Z(7);var re=(y={},y[a]=n,y[u]=r,y[o]=i,y)[z]||1,ne=this.$d.getTime()+L*re;return G.w(ne,this)},w.subtract=function(L,_){return this.add(-1*L,_)},w.format=function(L){var _=this,y=this.$locale();if(!this.isValid())return y.invalidDate||p;var k=L||"YYYY-MM-DDTHH:mm:ssZ",z=G.z(this),Z=this.$H,re=this.$m,ne=this.$M,ae=y.weekdays,be=y.months,_e=function(le,we,at,Pe){return le&&(le[we]||le(_,k))||at[we].slice(0,Pe)},xe=function(le){return G.s(Z%12||12,le,"0")},Ke=y.meridiem||function(le,we,at){var Pe=le<12?"AM":"PM";return at?Pe.toLowerCase():Pe},Le={YY:String(this.$y).slice(-2),YYYY:G.s(this.$y,4,"0"),M:ne+1,MM:G.s(ne+1,2,"0"),MMM:_e(y.monthsShort,ne,be,3),MMMM:_e(be,ne),D:this.$D,DD:G.s(this.$D,2,"0"),d:String(this.$W),dd:_e(y.weekdaysMin,this.$W,ae,2),ddd:_e(y.weekdaysShort,this.$W,ae,3),dddd:ae[this.$W],H:String(Z),HH:G.s(Z,2,"0"),h:xe(1),hh:xe(2),a:Ke(Z,re,!0),A:Ke(Z,re,!1),m:String(re),mm:G.s(re,2,"0"),s:String(this.$s),ss:G.s(this.$s,2,"0"),SSS:G.s(this.$ms,3,"0"),Z:z};return k.replace(b,function(le,we){return we||Le[le]||z.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(L,_,y){var k,z=G.p(_),Z=A(L),re=(Z.utcOffset()-this.utcOffset())*n,ne=this-Z,ae=G.m(this,Z);return ae=(k={},k[g]=ae/12,k[d]=ae,k[f]=ae/3,k[c]=(ne-re)/6048e5,k[l]=(ne-re)/864e5,k[u]=ne/r,k[a]=ne/n,k[o]=ne/i,k)[z]||ne,y?ae:G.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 y=this.clone(),k=Q(L,_,!0);return k&&(y.$L=k),y},w.clone=function(){return G.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()},M}(),P=K.prototype;return A.prototype=P,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",g],["$D",m]].forEach(function(M){P[M[1]]=function(w){return this.$g(w,M[0],M[1])}}),A.extend=function(M,w){return M.$i||(M(w,K,A),M.$i=!0),A},A.locale=Q,A.isDayjs=x,A.unix=function(M){return A(1e3*M)},A.en=I[F],A.Ls=I,A.p={},A})})(on);var Fi=on.exports;const Je=kt(Fi);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,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,g){for(var m,p,T,b=d.$locale().relativeTime||o,v=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=v.length,D=0;D<O;D+=1){var F=v[D];F.d&&(m=f?r(l).diff(d,F.d,!0):d.diff(l,F.d,!0));var I=(i.rounding||Math.round)(Math.abs(m));if(T=m>0,I<=F.r||!F.r){I<=1&&D>0&&(F=v[D-1]);var x=b[F.l];g&&(I=g(""+I)),p=typeof x=="string"?x.replace("%d",I):x(I,c,F.l,T);break}}if(c)return p;var Q=T?b.future:b.past;return typeof Q=="function"?Q(p):Q.replace("%s",p)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(an);var $i=an.exports;const Gi=kt($i);Je.extend(Gi);function zi(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=je(r,n[s]);return{c(){t=$("time"),i=q(e[0]),Dt(t,r)},m(s,o){B(s,t,o),C(t,i)},p(s,[o]){o&1&&kn(i,s[0],r.contenteditable),Dt(t,r=Dn(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 Mi(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Nt(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 qt(()=>(u&&l!==!1&&(d=setInterval(()=>{i(0,c=Je(o).from())},Math.abs(typeof l=="number"?l:f))),()=>{typeof d=="number"&&clearInterval(d)})),e.$$set=g=>{t=je(je({},t),hn(g)),i(3,s=Nt(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&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 Ei extends te{constructor(t){super(),ee(this,t,Mi,zi,j,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Ii(e){se(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function xi(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 Ki(e){let t,i;return t=new Ei({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 Bi(e){let t,i,n,r,s;const o=[Ki,xi],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):(me(),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 Ji(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,Ji,Bi,j,{data:0,format:1,style:2,relative:3},Ii)}}function Ui(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 Hi(e){let t,i,n,r;i=new ve({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)&&ze(o,s,a,a[7],r?Ge(s,a[7],u,null):Me(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 Wi(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 Yi(e){let t,i,n,r,s,o;const a=[Wi,Hi],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",ke(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 f=i;i=l(c),i===f?u[i].p(c,d):(me(),R(u[f],1,1,()=>{u[f]=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 g={};d&16&&(g.style=c[4]),d&2&&(g.text=c[1]),s.$set(g)},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 Vi(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 un extends te{constructor(t){super(),ee(this,t,Vi,Yi,j,{iconText:0,tagText:1,iconLaClassName:2,className:6},Ui)}}function Qi(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 Zi(e){let t,i;return t=new un({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[Qi]},$$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 Pi(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 qi extends te{constructor(t){super(),ee(this,t,Pi,Zi,j,{tagText:0,due:1})}}function Xi(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 ji(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 er(e){let t,i;return t=new qi({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 tr(e){let t,i=e[1].code+"",n,r,s,o,a,u,l=e[1].messagegroupsIn+"",c,d,f,g,m,p,T=e[1].messagegroupsOut+"",b,v,O,D,F,I,x,Q,A,G,K,P;o=new ve({props:{iconLaClassName:"la-incoming"}}),g=new ve({props:{iconLaClassName:"la-outgoing"}}),I=new ln({props:{data:e[1].datecreated,format:e[2]}});const M=[er,ji],w=[];function L(_,y){return y&2&&(Q=null),Q==null&&(Q=_[1].datedue instanceof Date&&!isNaN(_[1].datedue)),Q?0:1}return A=L(e,-1),G=w[A]=M[A](e),{c(){t=$("span"),n=q(i),r=Y(),s=$("div"),W(o.$$.fragment),a=Y(),u=$("span"),c=q(l),d=Y(),f=$("div"),W(g.$$.fragment),m=Y(),p=$("span"),b=q(T),v=Y(),O=$("div"),D=$("span"),D.textContent=`${e[3]}:`,F=Y(),W(I.$$.fragment),x=Y(),G.c(),K=yn(),N(t,"class","TicketId svelte-rl80em"),N(s,"class","Communication incomingMessages svelte-rl80em"),N(f,"class","Communication outgoingMessages svelte-rl80em"),N(O,"class","Created svelte-rl80em")},m(_,y){B(_,t,y),C(t,n),B(_,r,y),B(_,s,y),H(o,s,null),C(s,a),C(s,u),C(u,c),B(_,d,y),B(_,f,y),H(g,f,null),C(f,m),C(f,p),C(p,b),B(_,v,y),B(_,O,y),C(O,D),C(O,F),H(I,O,null),B(_,x,y),w[A].m(_,y),B(_,K,y),P=!0},p(_,y){(!P||y&2)&&i!==(i=_[1].code+"")&&ie(n,i),(!P||y&2)&&l!==(l=_[1].messagegroupsIn+"")&&ie(c,l),(!P||y&2)&&T!==(T=_[1].messagegroupsOut+"")&&ie(b,T);const k={};y&2&&(k.data=_[1].datecreated),y&4&&(k.format=_[2]),I.$set(k);let z=A;A=L(_,y),A===z?w[A].p(_,y):(me(),R(w[z],1,1,()=>{w[z]=null}),pe(),G=w[A],G?G.p(_,y):(G=w[A]=M[A](_),G.c()),S(G,1),G.m(K.parentNode,K))},i(_){P||(S(o.$$.fragment,_),S(g.$$.fragment,_),S(I.$$.fragment,_),S(G),P=!0)},o(_){R(o.$$.fragment,_),R(g.$$.fragment,_),R(I.$$.fragment,_),R(G),P=!1},d(_){_&&J(t),_&&J(r),_&&J(s),U(o),_&&J(d),_&&J(f),U(g),_&&J(v),_&&J(O),U(I),_&&J(x),w[A].d(_),_&&J(K)}}}function nr(e){let t,i;return t=new Tt({props:{className:e[0],$$slots:{default:[tr]},$$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 ir(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 rr extends te{constructor(t){super(),ee(this,t,ir,nr,j,{className:0,row:1,format:2},Xi)}}function sr(e){se(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function or(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 ar(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 lr extends te{constructor(t){super(),ee(this,t,ar,or,j,{tagId:4},sr)}}function Mt(e,t,i){const n=e.slice();return n[1]=t[i],n}function Et(e){let t,i;return t=new lr({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 ur(e){let t,i,n=e[0],r=[];for(let o=0;o<n.length;o+=1)r[o]=Et(Mt(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=Mt(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(me(),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 cr(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class dr extends te{constructor(t){super(),ee(this,t,cr,ur,j,{tags:0})}}function fr(e){se(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function gr(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 hr(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 mr extends te{constructor(t){super(),ee(this,t,hr,gr,j,{status:0},fr)}}function pr(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 _r(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 yr(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 vr(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,d,f,g,m,p,T,b;c=new mr({props:{status:e[0].status}});const v=[yr,_r],O=[];function D(F,I){return I&1&&(f=null),f==null&&(f=F[0].agentname.trim()!==""),f?0:1}return g=D(e,-1),m=O[g]=v[g](e),T=new dr({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(),m.c(),p=Y(),W(T.$$.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[g].m(l,null),C(l,p),H(T,l,null),b=!0},p(F,I){(!b||I&1)&&i!==(i=F[0].subject+"")&&ie(n,i),(!b||I&1)&&o!==(o=F[0].preview+"")&&ie(a,o);const x={};I&1&&(x.status=F[0].status),c.$set(x);let Q=g;g=D(F,I),g===Q?O[g].p(F,I):(me(),R(O[Q],1,1,()=>{O[Q]=null}),pe(),m=O[g],m?m.p(F,I):(m=O[g]=v[g](F),m.c()),S(m,1),m.m(l,p));const A={};I&1&&(A.tags=F[0].tags),T.$set(A)},i(F){b||(S(c.$$.fragment,F),S(m),S(T.$$.fragment,F),b=!0)},o(F){R(c.$$.fragment,F),R(m),R(T.$$.fragment,F),b=!1},d(F){F&&J(t),F&&J(r),F&&J(s),F&&J(u),F&&J(l),U(c),O[g].d(),U(T)}}}function br(e){let t,i;return t=new Tt({props:{className:e[1],$$slots:{default:[vr]},$$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 wr(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 kr extends te{constructor(t){super(),ee(this,t,wr,br,j,{row:0,className:1},pr)}}function Tr(e){se(e,"svelte-1cy1emj",`.Row.svelte-1cy1emj{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
9
9
|
"checkbox status"
|
|
10
10
|
"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-1cy1emj:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-1cy1emj{background-color:var(--menu-selected-bg) !important}.UserColumn.svelte-1cy1emj{grid-area:user}.StatusColumn.svelte-1cy1emj{grid-area:status;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-1cy1emj{grid-area:importance}.Checkbox.svelte-1cy1emj{grid-area:checkbox;position:relative}.StatusBar.svelte-1cy1emj{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px}input.svelte-1cy1emj{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-1cy1emj{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-1cy1emj{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 170px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-1cy1emj{grid-template-columns:60px 260px auto 230px}}`)}function xt(e,t,i){const n=e.slice();return n[8]=t[i],n[9]=t,n[10]=i,n}function It(e){let t,i,n,r,s,o,a,u,l,c,d,f,g,m,p,T,b,v,O;function D(){e[5].call(s,e[10])}l=new Oi({props:{row:e[8]}}),f=new kr({props:{row:e[8]}}),p=new rr({props:{row:e[8]}});function F(){return e[6](e[8])}function x(...I){return e[7](e[8],...I)}return{c(){t=$("div"),i=$("div"),n=$("div"),r=Y(),s=$("input"),a=Y(),u=$("div"),W(l.$$.fragment),c=Y(),d=$("div"),W(f.$$.fragment),g=Y(),m=$("div"),W(p.$$.fragment),N(n,"class","StatusBar svelte-1cy1emj"),at(n,"background-color",tt(e[8].status)),N(s,"type","checkbox"),s.__value=o=e[8].conversationid,s.value=s.__value,N(s,"class","svelte-1cy1emj"),N(i,"class","Checkbox svelte-1cy1emj"),at(i,"position","relative"),N(u,"class","UserColumn svelte-1cy1emj"),N(d,"class","StatusColumn svelte-1cy1emj"),N(m,"class","ImportanceColumn svelte-1cy1emj"),N(t,"class",T="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-1cy1emj")},m(I,Q){B(I,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(f,d,null),C(t,g),C(t,m),H(p,m,null),b=!0,v||(O=[ue(s,"change",D),ue(s,"click",St(Lr)),ue(i,"click",St(Nr)),ue(t,"click",F),ue(t,"mousedown",x)],v=!0)},p(I,Q){e=I,(!b||Q&4)&&at(n,"background-color",tt(e[8].status)),(!b||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 G={};Q&4&&(G.row=e[8]),f.$set(G);const K={};Q&4&&(K.row=e[8]),p.$set(K),(!b||Q&4&&T!==(T="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-1cy1emj"))&&N(t,"class",T)},i(I){b||(S(l.$$.fragment,I),S(f.$$.fragment,I),S(p.$$.fragment,I),b=!0)},o(I){R(l.$$.fragment,I),R(f.$$.fragment,I),R(p.$$.fragment,I),b=!1},d(I){I&&J(t),U(l),U(f),U(p),v=!1,he(O)}}}function Cr(e){let t,i,n,r=e[2],s=[];for(let l=0;l<r.length;l+=1)s[l]=It(xt(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 f=xt(l,r,d);s[d]?(s[d].p(f,c),S(s[d],1)):(s[d]=It(f),s[d].c(),S(s[d],1),s[d].m(t,i))}for(me(),d=r.length;d<s.length;d+=1)o(d);pe()}u&&u.p&&(!n||c&8)&&ze(u,a,l,l[3],n?Ge(a,l[3],c,null):Me(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 Lr=()=>{},Nr=()=>{};function Sr(e,t,i){let n,r=V,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 Dr extends te{constructor(t){super(),ee(this,t,Sr,Cr,j,{data:0,middleclickhandler:1},Tr)}}function Ar(e){se(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Rr(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 Or(e,t,i){let n,r,s,o,a;oe(e,xe,m=>i(8,o=m));let u,l=Re("loading");oe(e,l,m=>i(7,s=m));let c=Re("cursor");oe(e,c,m=>i(6,r=m));let d=Re("data");oe(e,d,m=>i(5,n=m));let f=Re("error");oe(e,f,m=>i(9,a=m));function g(m,p,T){return a?o("Loading failed. Please try again later."):m?"Loading...":p==null?T.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=g(s,r,n))},[u,l,c,d,f,n,r,s]}class Fr extends te{constructor(t){super(),ee(this,t,Or,Rr,j,{},Ar)}}function $r(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 Fr({}),{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 zr(e){let t,i,n,r,s;return i=new ni({props:{direction:e[4],data:e[0],selectedAll:e[3]}}),r=new Dr({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 Mr(e,t,i){let n,r=V,s=()=>(r(),r=ye(f,v=>i(9,n=v)),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 g,m;qt(()=>{const v=new IntersectionObserver(O=>{O[0].isIntersecting&&a(!1)},{root:m,threshold:.5});return v.observe(g),()=>v.unobserve(g)});function p(v){je[v?"unshift":"push"](()=>{g=v,i(7,g)})}const T=()=>a(d&&!n);function b(v){je[v?"unshift":"push"](()=>{m=v,i(8,m)})}return e.$$set=v=>{"data"in v&&i(0,o=v.data),"loadMore"in v&&i(1,a=v.loadMore),"middleclickhandler"in v&&i(2,u=v.middleclickhandler),"selectedAll"in v&&i(3,l=v.selectedAll),"direction"in v&&i(4,c=v.direction),"loaded"in v&&i(5,d=v.loaded),"cursor"in v&&s(i(6,f=v.cursor))},[o,a,u,l,c,d,f,g,m,n,p,T,b]}class Er extends te{constructor(t){super(),ee(this,t,Mr,zr,j,{data:0,loadMore:1,middleclickhandler:2,selectedAll:3,direction:4,loaded:5,cursor:6},$r)}}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 xr="https://localhost/api/v3".replace(/\/+$/,"");class Ct{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:xr}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 Ir=new Ct;class st{constructor(t=Ir){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 Ur(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?st.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 Jr(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:Br(a.body)||a.body instanceof URLSearchParams||Kr(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}}st.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Kr(e){return typeof Blob<"u"&&e instanceof Blob}function Br(e){return typeof FormData<"u"&&e instanceof FormData}class Jr extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class Ur 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 h(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 Hr(e){return Wr(e)}function Wr(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 Yr(e){return Vr(e)}function Vr(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(Hr):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 Qr(e){return Zr(e)}function Zr(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 Pr(e){return qr(e)}function qr(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 de(e){return Xr(e)}function Xr(e,t){return e==null?e:{count:h(e,"count")?e.count:void 0}}function jr(e){return es(e)}function es(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 ts(e){return ns(e)}function ns(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 is(e){return rs(e)}function rs(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 ss(e){return os(e)}function os(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 as(e){return ls(e)}function ls(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 ut(e){return us(e)}function us(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 Bt(e){return cs(e)}function cs(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 fn(e){return ds(e)}function ds(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 fs(e){return gs(e)}function gs(e,t){return e==null?e:{cursor:h(e,"cursor")?e.cursor:void 0,rows:h(e,"rows")?e.rows.map(fn):void 0}}function hs(e){return ms(e)}function ms(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 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 st{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(Yr))})}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(ut))})}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(Qr))})}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(ut))})}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(Pr))})}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(jr))})}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(ts))})}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(is))})}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(ss))})}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(as))})}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=>fs(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(ut))})}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(hs))})}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"},ps={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 _s{constructor(t,i){const n=new Ct({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 ys(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 vs(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(`
|
|
11
|
+
"checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px}}@media(min-width: 900px){.Row.svelte-1cy1emj{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 170px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-1cy1emj{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,f,g,m,p,T,b,v,O;function D(){e[5].call(s,e[10])}l=new Oi({props:{row:e[8]}}),f=new kr({props:{row:e[8]}}),p=new rr({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(f.$$.fragment),g=Y(),m=$("div"),W(p.$$.fragment),N(n,"class","StatusBar svelte-1cy1emj"),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-1cy1emj"),N(i,"class","Checkbox svelte-1cy1emj"),lt(i,"position","relative"),N(u,"class","UserColumn svelte-1cy1emj"),N(d,"class","StatusColumn svelte-1cy1emj"),N(m,"class","ImportanceColumn svelte-1cy1emj"),N(t,"class",T="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-1cy1emj")},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(f,d,null),C(t,g),C(t,m),H(p,m,null),b=!0,v||(O=[ue(s,"change",D),ue(s,"click",St(Lr)),ue(i,"click",St(Nr)),ue(t,"click",F),ue(t,"mousedown",I)],v=!0)},p(x,Q){e=x,(!b||Q&4)&<(n,"background-color",nt(e[8].status)),(!b||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 G={};Q&4&&(G.row=e[8]),f.$set(G);const K={};Q&4&&(K.row=e[8]),p.$set(K),(!b||Q&4&&T!==(T="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-1cy1emj"))&&N(t,"class",T)},i(x){b||(S(l.$$.fragment,x),S(f.$$.fragment,x),S(p.$$.fragment,x),b=!0)},o(x){R(l.$$.fragment,x),R(f.$$.fragment,x),R(p.$$.fragment,x),b=!1},d(x){x&&J(t),U(l),U(f),U(p),v=!1,he(O)}}}function Cr(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 f=It(l,r,d);s[d]?(s[d].p(f,c),S(s[d],1)):(s[d]=xt(f),s[d].c(),S(s[d],1),s[d].m(t,i))}for(me(),d=r.length;d<s.length;d+=1)o(d);pe()}u&&u.p&&(!n||c&8)&&ze(u,a,l,l[3],n?Ge(a,l[3],c,null):Me(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 Lr=()=>{},Nr=()=>{};function Sr(e,t,i){let n,r=V,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 Dr extends te{constructor(t){super(),ee(this,t,Sr,Cr,j,{data:0,middleclickhandler:1},Tr)}}function Ar(e){se(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Rr(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 Or(e,t,i){let n,r,s,o,a;oe(e,Ie,m=>i(8,o=m));let u,l=Re("loading");oe(e,l,m=>i(7,s=m));let c=Re("cursor");oe(e,c,m=>i(6,r=m));let d=Re("data");oe(e,d,m=>i(5,n=m));let f=Re("error");oe(e,f,m=>i(9,a=m));function g(m,p,T){return a?o("Loading failed. Please try again later."):m?"Loading...":p==null?T.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=g(s,r,n))},[u,l,c,d,f,n,r,s]}class Fr extends te{constructor(t){super(),ee(this,t,Or,Rr,j,{},Ar)}}function $r(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 Fr({}),{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 zr(e){let t,i,n,r,s;return i=new ni({props:{direction:e[4],data:e[0],selectedAll:e[3]}}),r=new Dr({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 Mr(e,t,i){let n,r=V,s=()=>(r(),r=ye(f,v=>i(9,n=v)),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 g,m;qt(()=>{const v=new IntersectionObserver(O=>{O[0].isIntersecting&&a(!1)},{root:m,threshold:.5});return v.observe(g),()=>v.unobserve(g)});function p(v){et[v?"unshift":"push"](()=>{g=v,i(7,g)})}const T=()=>a(d&&!n);function b(v){et[v?"unshift":"push"](()=>{m=v,i(8,m)})}return e.$$set=v=>{"data"in v&&i(0,o=v.data),"loadMore"in v&&i(1,a=v.loadMore),"middleclickhandler"in v&&i(2,u=v.middleclickhandler),"selectedAll"in v&&i(3,l=v.selectedAll),"direction"in v&&i(4,c=v.direction),"loaded"in v&&i(5,d=v.loaded),"cursor"in v&&s(i(6,f=v.cursor))},[o,a,u,l,c,d,f,g,m,n,p,T,b]}class Er extends te{constructor(t){super(),ee(this,t,Mr,zr,j,{data:0,loadMore:1,middleclickhandler:2,selectedAll:3,direction:4,loaded:5,cursor:6},$r)}}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 Ir="https://localhost/api/v3".replace(/\/+$/,"");class Ct{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Ir}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 xr=new Ct;class ot{constructor(t=xr){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 Ur(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 Jr(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:Br(a.body)||a.body instanceof URLSearchParams||Kr(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 Kr(e){return typeof Blob<"u"&&e instanceof Blob}function Br(e){return typeof FormData<"u"&&e instanceof FormData}class Jr extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class Ur 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 h(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 Hr(e){return Wr(e)}function Wr(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 Yr(e){return Vr(e)}function Vr(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(Hr):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 Qr(e){return Zr(e)}function Zr(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 Pr(e){return qr(e)}function qr(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 de(e){return Xr(e)}function Xr(e,t){return e==null?e:{count:h(e,"count")?e.count:void 0}}function jr(e){return es(e)}function es(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 ts(e){return ns(e)}function ns(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 is(e){return rs(e)}function rs(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 ss(e){return os(e)}function os(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 as(e){return ls(e)}function ls(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 ct(e){return us(e)}function us(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 Bt(e){return cs(e)}function cs(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 fn(e){return ds(e)}function ds(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 fs(e){return gs(e)}function gs(e,t){return e==null?e:{cursor:h(e,"cursor")?e.cursor:void 0,rows:h(e,"rows")?e.rows.map(fn):void 0}}function hs(e){return ms(e)}function ms(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 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(Yr))})}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(Qr))})}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(Pr))})}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(jr))})}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(ts))})}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(is))})}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(ss))})}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(as))})}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=>fs(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(hs))})}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"},ps={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 _s{constructor(t,i){const n=new Ct({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 ys(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 vs(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
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 bs(e,t,i){let n,r=V,s=()=>(r(),r=ye(l,p=>i(3,n=p)),l),o,a=V,u=()=>(a(),a=ye(c,p=>i(4,o=p)),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 T=await Re("api").getTicketsGridListCount({filters:d,timezoneOffset:new Date().getTimezoneOffset()});i(2,f=T.count)}return e.$$set=p=>{"data"in p&&s(i(0,l=p.data)),"cursor"in p&&u(i(1,c=p.cursor)),"filter"in p&&i(6,d=p.filter)},e.$$.update=()=>{e.$$.dirty&64&&d&&g()},[l,c,f,n,o,m,d]}class ws extends te{constructor(t){super(),ee(this,t,bs,vs,j,{data:0,cursor:1,filter:6},ys)}}function ks(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 Ts(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=ke(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)&&ze(a,o,u,u[3],n?Ge(o,u[3],l,null):Me(u[3]),null),(!n||l&1&&i!==(i=ke(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 Cs(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,Cs,Ts,j,{onAction:2,className:0},ks)}}function Ls(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 Ns(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new ve({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 Ss(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new ve({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 Ds(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,p,T,b;return m=new Ht({props:{className:"Filter",$$slots:{default:[Ns]},$$scope:{ctx:e}}}),T=new Ht({props:{className:"Configure",$$slots:{default:[Ss]},$$scope:{ctx:e}}}),{c(){t=$("div"),i=$("img"),r=Y(),s=$("h1"),a=q(o),u=Y(),l=$("p"),d=q(c),f=Y(),g=$("div"),W(m.$$.fragment),p=Y(),W(T.$$.fragment),N(i,"alt","No results placeholder"),
|
|
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 bs(e,t,i){let n,r=V,s=()=>(r(),r=ye(l,p=>i(3,n=p)),l),o,a=V,u=()=>(a(),a=ye(c,p=>i(4,o=p)),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 T=await Re("api").getTicketsGridListCount({filters:d,timezoneOffset:new Date().getTimezoneOffset()});i(2,f=T.count)}return e.$$set=p=>{"data"in p&&s(i(0,l=p.data)),"cursor"in p&&u(i(1,c=p.cursor)),"filter"in p&&i(6,d=p.filter)},e.$$.update=()=>{e.$$.dirty&64&&d&&g()},[l,c,f,n,o,m,d]}class ws extends te{constructor(t){super(),ee(this,t,bs,vs,j,{data:0,cursor:1,filter:6},ys)}}function ks(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 Ts(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=ke(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)&&ze(a,o,u,u[3],n?Ge(o,u[3],l,null):Me(u[3]),null),(!n||l&1&&i!==(i=ke(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 Cs(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,Cs,Ts,j,{onAction:2,className:0},ks)}}function Ls(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 Ns(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new ve({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 Ss(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new ve({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 Ds(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,p,T,b;return m=new Ht({props:{className:"Filter",$$slots:{default:[Ns]},$$scope:{ctx:e}}}),T=new Ht({props:{className:"Configure",$$slots:{default:[Ss]},$$scope:{ctx:e}}}),{c(){t=$("div"),i=$("img"),r=Y(),s=$("h1"),a=q(o),u=Y(),l=$("p"),d=q(c),f=Y(),g=$("div"),W(m.$$.fragment),p=Y(),W(T.$$.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(g,"class","Buttons"),N(t,"class","NoTickets svelte-19qi61t")},m(v,O){B(v,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,f),C(t,g),H(m,g,null),C(g,p),H(T,g,null),b=!0},p(v,[O]){(!b||O&1)&&o!==(o=v[0]("No tickets found")+"")&&ie(a,o),(!b||O&1)&&c!==(c=v[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:v}),m.$set(D);const F={};O&3&&(F.$$scope={dirty:O,ctx:v}),T.$set(F)},i(v){b||(S(m.$$.fragment,v),S(T.$$.fragment,v),b=!0)},o(v){R(m.$$.fragment,v),R(T.$$.fragment,v),b=!1},d(v){v&&J(t),U(m),U(T)}}}function As(e,t,i){let n;return oe(e,Ie,r=>i(0,n=r)),[n]}class Rs extends te{constructor(t){super(),ee(this,t,As,Ds,j,{},Ls)}}function Os(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 Fs(e){let t,i;return t=new Er({props:{direction:e[12],data:e[10],loaded:e[2],loadMore:e[15],cursor:e[14],middleclickhandler:e[1],selectedAll:e[8]}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.loaded=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 $s(e){let t,i;return t=new Rs({}),{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,f,g,m,p,T,b,v,O,D,F;const I=e[22].default,x=$e(I,e,e[21],null);d=new ws({props:{cursor:e[14],data:e[10],filter:e[0]}}),m=new ve({props:{iconLaClassName:"la-refresh"}});const Q=[$s,Fs],A=[];function G(K,P){return!K[5].length&&!K[3]?0:1}return b=G(e),v=A[b]=Q[b](e),{c(){t=$("main"),i=q("Cursor: "),n=q(e[4]),r=q(`
|
|
14
14
|
Loading: `),s=q(e[3]),o=q(`
|
|
15
|
-
Loaded: `),a=q(e[2]),u=Y(),l=$("div"),
|
|
15
|
+
Loaded: `),a=q(e[2]),u=Y(),l=$("div"),x&&x.c(),c=Y(),W(d.$$.fragment),f=Y(),g=$("button"),W(m.$$.fragment),T=Y(),v.c(),N(g,"title",p=e[6]("Reload")),N(g,"class","svelte-150fgq2"),At(g,"loading",e[3]),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,f),C(l,g),H(m,g,null),C(t,T),A[b].m(t,null),O=!0,D||(F=ue(g,"click",e[23]),D=!0)},p(K,[P]){(!O||P&16)&&ie(n,K[4]),(!O||P&8)&&ie(s,K[3]),(!O||P&4)&&ie(a,K[2]),x&&x.p&&(!O||P&2097152)&&ze(x,I,K,K[21],O?Ge(I,K[21],P,null):Me(K[21]),null);const M={};P&1&&(M.filter=K[0]),d.$set(M),(!O||P&64&&p!==(p=K[6]("Reload")))&&N(g,"title",p),(!O||P&8)&&At(g,"loading",K[3]);let w=b;b=G(K),b===w?A[b].p(K,P):(me(),R(A[w],1,1,()=>{A[w]=null}),pe(),v=A[b],v?v.p(K,P):(v=A[b]=Q[b](K),v.c()),S(v,1),v.m(t,null))},i(K){O||(S(x,K),S(d.$$.fragment,K),S(m.$$.fragment,K),S(v),O=!0)},o(K){R(x,K),R(d.$$.fragment,K),R(m.$$.fragment,K),R(v),O=!1},d(K){K&&J(t),x&&x.d(K),U(d),U(m),A[b].d(),D=!1,F()}}}function zs(e,t,i){let n,r,s,o,a,u,l,c,d;oe(e,Ie,k=>i(6,d=k));let{$$slots:f={},$$scope:g}=t,{apikey:m}=t,{filters:p}=t,{middleclickhandler:T}=t,{selectionHandler:b}=t,{basePath:v}=t,O=ce({});oe(e,O,k=>i(19,n=k));let D=ce(!1);oe(e,D,k=>i(20,c=k));let F=new _s(m,v);F.load(),Ne("tagsMap",F.tags);let I=ce(null);oe(e,I,k=>i(24,s=k)),Ne("error",I);const x=new Ct({apiKey:m,basePath:v+"/api/v3"}),Q=new gn(x);Ne("api",Q);const A=ce([]);oe(e,A,k=>i(5,a=k)),Ne("data",A);const G=ce(ps.Rorder);oe(e,G,k=>i(25,u=k));const K=ce(!0);oe(e,K,k=>i(26,l=k));const P=ce(!1);oe(e,P,k=>i(3,r=k)),Ne("loading",P);const M=ce(null);oe(e,M,k=>i(4,o=k)),Ne("cursor",M);let w=!1,L=()=>({perPage:20,sortDir:l?Jt.Asc:Jt.Desc,filters:p,sortField:u,cursor:o||""}),_=async(k=!1)=>{if(!r&&(k===!0&&(ge(M,o=null,o),i(2,w=!1)),!(!o&&w))){ge(P,r=!0,r);try{const z=await Q.getTicketsGridDatasetRaw(L());console.log("Loaded tickets response: ",z);const Z=await z.value();k===!0&&ge(A,a=[],a),ge(A,a=a.concat(Z.rows),a),ge(M,o=Z.cursor,o),console.log("Loaded tickets value: ",Z),console.log("Loaded tickets: ",Z.rows.length,"cursor: ",Z.cursor),i(2,w=!0)}catch(z){console.error("Loading tickets failed: ",z),ge(I,s=z.toString(),s)}ge(P,r=!1,r)}};K.subscribe(async()=>{await _(!0)}),G.subscribe(async()=>{await _(!0)}),A.subscribe(k=>{ge(O,n=k.filter(z=>z.__selected??!1).map(z=>z.conversationid),n)});const y=()=>_(!0);return e.$$set=k=>{"apikey"in k&&i(16,m=k.apikey),"filters"in k&&i(0,p=k.filters),"middleclickhandler"in k&&i(1,T=k.middleclickhandler),"selectionHandler"in k&&i(17,b=k.selectionHandler),"basePath"in k&&i(18,v=k.basePath),"$$scope"in k&&i(21,g=k.$$scope)},e.$$.update=()=>{e.$$.dirty&1703936&&b(n,c),e.$$.dirty&1&&p&&_(!0)},[p,T,w,r,o,a,d,O,D,I,A,G,K,P,M,_,m,b,v,n,c,g,f,y]}class Ms extends te{constructor(t){super(),ee(this,t,zs,Gs,j,{apikey:16,filters:0,middleclickhandler:1,selectionHandler:17,basePath:18},Os)}}const Es="modulepreload",Is=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=Is(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":Es,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 xs(){$t("en",()=>Yt(()=>import("./en.js"),[])),$t("sk",()=>Yt(()=>import("./sk.js"),[]))}function Vt(e){let t,i;return t=new Ms({props:{apikey:e[0],basePath:e[3],filters:e[1],middleclickhandler:e[2],selectionHandler:e[4],$$slots:{default:[Ks]},$$scope:{ctx:e}}}),{c(){W(t.$$.fragment)},m(n,r){H(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.apikey=n[0]),r&8&&(s.basePath=n[3]),r&2&&(s.filters=n[1]),r&4&&(s.middleclickhandler=n[2]),r&512&&(s.$$scope={dirty:r,ctx:n}),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 Ks(e){let t;return{c(){t=$("slot")},m(i,n){B(i,t,n)},p:V,d(i){i&&J(t)}}}function Bs(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&&(me(),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 Js(e,t,i){xs();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;Yn({initialLocale:n,fallbackLocale:"en"}),Pn();function d(f,g){i(5,u=f),i(6,l=g),a&&a(f,g)}return e.$$set=f=>{"lang"in f&&i(7,n=f.lang),"apikey"in f&&i(0,r=f.apikey),"filters"in f&&i(1,s=f.filters),"middleclickhandler"in f&&i(2,o=f.middleclickhandler),"selectionhandler"in f&&i(8,a=f.selectionhandler),"selectionMap"in f&&i(5,u=f.selectionMap),"selectedAll"in f&&i(6,l=f.selectedAll),"basepath"in f&&i(3,c=f.basepath)},[r,s,o,c,d,u,l,n,a]}class Us extends Xt{constructor(t){super(),ee(this,{target:this.shadowRoot,props:Tn(this.attributes),customElement:!0},Js,Bs,j,{lang:7,apikey:0,filters:1,middleclickhandler:2,selectionhandler:8,selectionMap:5,selectedAll:6,basepath:3},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"]}get lang(){return this.$$.ctx[7]}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[8]}set selectionhandler(t){this.$$set({selectionhandler:t}),fe()}get selectionMap(){return this.$$.ctx[5]}set selectionMap(t){this.$$set({selectionMap:t}),fe()}get selectedAll(){return this.$$.ctx[6]}set selectedAll(t){this.$$set({selectedAll:t}),fe()}get basepath(){return this.$$.ctx[3]}set basepath(t){this.$$set({basepath:t}),fe()}}customElements.define("tickets-table",Us);
|