@qualityunit/liveagent-ticket-grid 0.0.1

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/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # Svelte + TS + Vite
2
+
3
+ This template should help get you started developing with Svelte and TypeScript in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
8
+
9
+ ## Need an official Svelte framework?
10
+
11
+ Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
12
+
13
+ ## Technical considerations
14
+
15
+ **Why use this over SvelteKit?**
16
+
17
+ - It brings its own routing solution which might not be preferable for some users.
18
+ - It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
19
+
20
+ This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
21
+
22
+ Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
23
+
24
+ **Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
25
+
26
+ Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
27
+
28
+ **Why include `.vscode/extensions.json`?**
29
+
30
+ Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
31
+
32
+ **Why enable `allowJs` in the TS template?**
33
+
34
+ While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
35
+
36
+ **Why is HMR not preserving my local component state?**
37
+
38
+ HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
39
+
40
+ If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
41
+
42
+ ```ts
43
+ // store.ts
44
+ // An extremely simple external store
45
+ import { writable } from 'svelte/store'
46
+ export default writable(0)
47
+ ```
@@ -0,0 +1 @@
1
+ const e={};export{e as default};
@@ -0,0 +1,10 @@
1
+ var Cn=Object.defineProperty;var Ln=(t,e,n)=>e in t?Cn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Xe=(t,e,n)=>(Ln(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function H(){}function We(t,e){for(const n in e)t[n]=e[n];return t}function bt(t){return t()}function Ot(){return Object.create(null)}function _e(t){t.forEach(bt)}function Fe(t){return typeof t=="function"}function X(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let je;function ht(t,e){return je||(je=document.createElement("a")),je.href=e,t===je.href}function sn(t){return Object.keys(t).length===0}function pe(t,...e){if(t==null)return H;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ie(t,e,n){t.$$.on_destroy.push(pe(e,n))}function Ge(t,e,n,i){if(t){const r=on(t,e,n,i);return t[0](r)}}function on(t,e,n,i){return t[1]&&i?We(n.ctx.slice(),t[1](i(e))):n.ctx}function $e(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function Ee(t,e,n,i,r,s){if(r){const o=on(e,n,i,s);t.p(o,r)}}function Ie(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function Sn(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function zt(t,e){const n={};e=new Set(e);for(const i in t)!e.has(i)&&i[0]!=="$"&&(n[i]=t[i]);return n}function Te(t){return t??""}function Ce(t,e,n){return t.set(n),e}const Dn=["",!0,1,"true","contenteditable"];function R(t,e){t.appendChild(e)}function re(t,e,n){const i=An(t);if(!i.getElementById(e)){const r=z("style");r.id=e,r.textContent=n,Nn(i,r)}}function An(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Nn(t,e){return R(t.head||t,e),e.sheet}function F(t,e,n){t.insertBefore(e,n||null)}function M(t){t.parentNode&&t.parentNode.removeChild(t)}function wt(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function z(t){return document.createElement(t)}function Rn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ne(t){return document.createTextNode(t)}function Y(){return ne(" ")}function it(){return ne("")}function ge(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function On(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function D(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const zn=["width","height"];function Ft(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set&&zn.indexOf(i)===-1?t[i]=e[i]:D(t,i,e[i])}function Mt(t,e){for(const n in e)D(t,n,e[n])}function Fn(t){return Array.from(t.childNodes)}function se(t,e){e=""+e,t.data!==e&&(t.data=e)}function Mn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Gn(t,e,n){~Dn.indexOf(n)?Mn(t,e):se(t,e)}function ct(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function we(t,e,n){t.classList[n?"add":"remove"](e)}function $n(t){const e={};for(const n of t)e[n.name]=n.value;return e}function Gt(t,e){return new t(e)}let Ye;function He(t){Ye=t}function kt(){if(!Ye)throw new Error("Function called outside component initialization");return Ye}function an(t){kt().$$.on_mount.push(t)}function be(t,e){return kt().$$.context.set(t,e),e}function ke(t){return kt().$$.context.get(t)}const Re=[],tt=[];let ze=[];const $t=[],En=Promise.resolve();let mt=!1;function In(){mt||(mt=!0,En.then(ve))}function pt(t){ze.push(t)}const ft=new Set;let Ae=0;function ve(){if(Ae!==0)return;const t=Ye;do{try{for(;Ae<Re.length;){const e=Re[Ae];Ae++,He(e),Kn(e.$$)}}catch(e){throw Re.length=0,Ae=0,e}for(He(null),Re.length=0,Ae=0;tt.length;)tt.pop()();for(let e=0;e<ze.length;e+=1){const n=ze[e];ft.has(n)||(ft.add(n),n())}ze.length=0}while(Re.length);for(;$t.length;)$t.pop()();mt=!1,ft.clear(),He(t)}function Kn(t){if(t.fragment!==null){t.update(),_e(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(pt)}}function Bn(t){const e=[],n=[];ze.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),ze=e}const et=new Set;let Le;function ue(){Le={r:0,c:[],p:Le}}function ce(){Le.r||_e(Le.c),Le=Le.p}function w(t,e){t&&t.i&&(et.delete(t),t.i(e))}function S(t,e,n,i){if(t&&t.o){if(et.has(t))return;et.add(t),Le.c.push(()=>{et.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function xn(t,e){S(t,1,1,()=>{e.delete(t.key)})}function Vn(t,e,n,i,r,s,o,a,u,l,c,f){let d=t.length,g=s.length,m=d;const p={};for(;m--;)p[t[m].key]=m;const b=[],O=new Map,C=new Map,A=[];for(m=g;m--;){const N=f(r,s,m),q=n(N);let x=o.get(q);x?i&&A.push(()=>x.p(N,e)):(x=l(q,N),x.c()),O.set(q,b[m]=x),q in p&&C.set(q,Math.abs(m-p[q]))}const _=new Set,L=new Set;function I(N){w(N,1),N.m(a,c),o.set(N.key,N),c=N.first,g--}for(;d&&g;){const N=b[g-1],q=t[d-1],x=N.key,V=q.key;N===q?(c=N.first,d--,g--):O.has(V)?!o.has(x)||_.has(x)?I(N):L.has(V)?d--:C.get(x)>C.get(V)?(L.add(x),I(N)):(_.add(V),d--):(u(q,o),d--)}for(;d--;){const N=t[d];O.has(N.key)||u(N,o)}for(;g;)I(b[g-1]);return _e(A),b}function ln(t,e){const n={},i={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(i[u]=1);for(const u in a)r[u]||(n[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in i)o in n||(n[o]=void 0);return n}function W(t){t&&t.c()}function U(t,e,n,i){const{fragment:r,after_update:s}=t.$$;r&&r.m(e,n),i||pt(()=>{const o=t.$$.on_mount.map(bt).filter(Fe);t.$$.on_destroy?t.$$.on_destroy.push(...o):_e(o),t.$$.on_mount=[]}),s.forEach(pt)}function J(t,e){const n=t.$$;n.fragment!==null&&(Bn(n.after_update),_e(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Jn(t,e){t.$$.dirty[0]===-1&&(Re.push(t),In(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(t,e,n,i,r,s,o,a=[-1]){const u=Ye;He(t);const l=t.$$={fragment:null,ctx:[],props:s,update:H,not_equal:r,bound:Ot(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Ot(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=n?n(t,e.props||{},(f,d,...g)=>{const m=g.length?g[0]:d;return l.ctx&&r(l.ctx[f],l.ctx[f]=m)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](m),c&&Jn(t,f)),d}):[],l.update(),c=!0,_e(l.before_update),l.fragment=i?i(l.ctx):!1,e.target){if(e.hydrate){const f=Fn(e.target);l.fragment&&l.fragment.l(f),f.forEach(M)}else l.fragment&&l.fragment.c();e.intro&&w(t.$$.fragment),U(t,e.target,e.anchor,e.customElement),ve()}He(u)}let un;typeof HTMLElement=="function"&&(un=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(bt).filter(Fe);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){_e(this.$$.on_disconnect)}$destroy(){J(this,1),this.$destroy=H}$on(t,e){if(!Fe(e))return H;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!sn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class te{$destroy(){J(this,1),this.$destroy=H}$on(e,n){if(!Fe(n))return H;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!sn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Hn(t){let e,n=[{width:t[1]},{height:t[1]},{"stroke-width":"0"},{class:t[2]},t[0].a,t[4],{xmlns:"http://www.w3.org/2000/svg"}],i={};for(let r=0;r<n.length;r+=1)i=We(i,n[r]);return{c(){e=Rn("svg"),Mt(e,i)},m(r,s){F(r,e,s),e.innerHTML=t[3]},p(r,[s]){s&8&&(e.innerHTML=r[3]),Mt(e,i=ln(n,[s&2&&{width:r[1]},s&2&&{height:r[1]},{"stroke-width":"0"},s&4&&{class:r[2]},s&1&&r[0].a,s&16&&r[4],{xmlns:"http://www.w3.org/2000/svg"}]))},i:H,o:H,d(r){r&&M(e)}}}function Un(t,e,n){let{src:i}=e,{size:r="1em"}=e,{color:s=void 0}=e,{title:o=void 0}=e,{className:a=""}=e,u,l;return t.$$set=c=>{"src"in c&&n(0,i=c.src),"size"in c&&n(1,r=c.size),"color"in c&&n(5,s=c.color),"title"in c&&n(6,o=c.title),"className"in c&&n(2,a=c.className)},t.$$.update=()=>{t.$$.dirty&33&&(n(4,l={}),s&&(i.a.stroke!=="none"&&n(4,l.stroke=s,l),i.a.fill!=="none"&&n(4,l.fill=s,l))),t.$$.dirty&65&&n(3,u=(o?`<title>${o}</title>`:"")+i.c)},[i,r,a,u,l,s,o]}let rt=class extends te{constructor(e){super(),j(this,e,Un,Hn,X,{src:0,size:1,color:5,title:6,className:2})}};const Wn={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M18.2 13.3l-6.2-6.3-6.2 6.3c-.2.2-.3.5-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7z"></path>'},Yn={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z"></path>'},qn={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M5.8 9.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.4-.3.7s.1.5.3.7z"></path>'};function Pn(t){re(t,"svelte-19b9z6b",".Head.svelte-19b9z6b{display:none}.headCheckbox.svelte-19b9z6b{width:20px}.content.svelte-19b9z6b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}button.svelte-19b9z6b{border:none;background:none;font-size:13px;font-weight:400;color:var(--department-bg-color)}@media screen and (min-width: 768px){.Head.svelte-19b9z6b{display:grid;grid-template-columns:60px 1fr 3fr 1fr;position:sticky;top:0;color:var(--panel_text_color);font-size:14px;font-family:'Roboto', sans-serif}}@media(min-width: 1300px){.Head.svelte-19b9z6b{grid-template-columns:60px 260px auto 230px}}.sortable.svelte-19b9z6b{cursor:pointer}")}function Et(t,e,n){const i=t.slice();return i[14]=e[n],i}function It(t){let e,n,i,r;const s=[Zn,Qn],o=[];function a(u,l){return u[4]===u[14].sortable?0:1}return e=a(t),n=o[e]=s[e](t),{c(){n.c(),i=it()},m(u,l){o[e].m(u,l),F(u,i,l),r=!0},p(u,l){let c=e;e=a(u),e===c?o[e].p(u,l):(ue(),S(o[c],1,1,()=>{o[c]=null}),ce(),n=o[e],n?n.p(u,l):(n=o[e]=s[e](u),n.c()),w(n,1),n.m(i.parentNode,i))},i(u){r||(w(n),r=!0)},o(u){S(n),r=!1},d(u){o[e].d(u),u&&M(i)}}}function Qn(t){let e,n;return e=new rt({props:{src:Yn}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Zn(t){let e,n,i,r;const s=[jn,Xn],o=[];function a(u,l){return u[3]?0:1}return e=a(t),n=o[e]=s[e](t),{c(){n.c(),i=it()},m(u,l){o[e].m(u,l),F(u,i,l),r=!0},p(u,l){let c=e;e=a(u),e===c?o[e].p(u,l):(ue(),S(o[c],1,1,()=>{o[c]=null}),ce(),n=o[e],n?n.p(u,l):(n=o[e]=s[e](u),n.c()),w(n,1),n.m(i.parentNode,i))},i(u){r||(w(n),r=!0)},o(u){S(n),r=!1},d(u){o[e].d(u),u&&M(i)}}}function Xn(t){let e,n;return e=new rt({props:{src:qn}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function jn(t){let e,n;return e=new rt({props:{src:Wn}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Kt(t,e){let n,i,r,s=e[14].name+"",o,a,u,l,c,f=e[14].sortable&&It(e);function d(){return e[12](e[14])}return{key:t,first:null,c(){n=z("button"),i=z("div"),f&&f.c(),r=Y(),o=ne(s),a=Y(),D(i,"class","content svelte-19b9z6b"),D(n,"class","svelte-19b9z6b"),we(n,"sortable",e[14].sortable),we(n,"sorted",e[4]===e[14].sortable),we(n,"reversed",e[4]===e[14].sortable&&!e[3]),this.first=n},m(g,m){F(g,n,m),R(n,i),f&&f.m(i,null),R(i,r),R(i,o),R(n,a),u=!0,l||(c=ge(n,"click",d),l=!0)},p(g,m){e=g,e[14].sortable?f?(f.p(e,m),m&64&&w(f,1)):(f=It(e),f.c(),w(f,1),f.m(i,r)):f&&(ue(),S(f,1,1,()=>{f=null}),ce()),(!u||m&64)&&s!==(s=e[14].name+"")&&se(o,s),(!u||m&64)&&we(n,"sortable",e[14].sortable),(!u||m&80)&&we(n,"sorted",e[4]===e[14].sortable),(!u||m&88)&&we(n,"reversed",e[4]===e[14].sortable&&!e[3])},i(g){u||(w(f),u=!0)},o(g){S(f),u=!1},d(g){g&&M(n),f&&f.d(),l=!1,c()}}}function ei(t){let e,n,i,r,s=[],o=new Map,a,u,l,c=t[6];const f=d=>d[14];for(let d=0;d<c.length;d+=1){let g=Et(t,c,d),m=f(g);o.set(m,s[d]=Kt(m,g))}return{c(){e=z("div"),n=z("div"),i=z("input"),r=Y();for(let d=0;d<s.length;d+=1)s[d].c();D(i,"type","checkbox"),D(n,"class","headCheckbox svelte-19b9z6b"),D(e,"class","Head svelte-19b9z6b")},m(d,g){F(d,e,g),R(e,n),R(n,i),i.checked=t[5],R(e,r);for(let m=0;m<s.length;m+=1)s[m]&&s[m].m(e,null);a=!0,u||(l=[ge(i,"change",t[11]),ge(i,"click",t[7])],u=!0)},p(d,[g]){g&32&&(i.checked=d[5]),g&1112&&(c=d[6],ue(),s=Vn(s,g,f,1,d,c,o,e,xn,Kt,null,Et),ce())},i(d){if(!a){for(let g=0;g<c.length;g+=1)w(s[g]);a=!0}},o(d){for(let g=0;g<s.length;g+=1)S(s[g]);a=!1},d(d){d&&M(e);for(let g=0;g<s.length;g+=1)s[g].d();u=!1,_e(l)}}}function ti(t,e,n){let i,r,s,o=H,a=()=>(o(),o=pe(p,N=>n(5,s=N)),p),u,l=H,c=()=>(l(),l=pe(b,N=>n(13,u=N)),b),f,d=H,g=()=>(d(),d=pe(m,N=>n(6,f=N)),m);t.$$.on_destroy.push(()=>o()),t.$$.on_destroy.push(()=>l()),t.$$.on_destroy.push(()=>d());let{columns:m}=e;g();let{selectedAll:p}=e;a();let{data:b}=e;c();function O(){Ce(b,u=u.map(N=>(N.__selected=!s,N)),u)}const C=ke("sort");ie(t,C,N=>n(4,r=N));const A=ke("direction");ie(t,A,N=>n(3,i=N));const _=N=>{N.sortable&&(r===N.sortable?i?A.set(!1):A.set(!0):(C.set(N.sortable),A.set(!0)))};function L(){s=this.checked,p.set(s)}const I=N=>_(N);return t.$$set=N=>{"columns"in N&&g(n(0,m=N.columns)),"selectedAll"in N&&a(n(1,p=N.selectedAll)),"data"in N&&c(n(2,b=N.data))},[m,p,b,i,r,s,f,O,C,A,_,L,I]}class ni extends te{constructor(e){super(),j(this,e,ti,ei,X,{columns:0,selectedAll:1,data:2},Pn)}}function _t(t){switch(t){case"A":return"var(--ticket-status-answered-background)";case"T":return"var(--ticket-status-chat-background)";case"P":return"var(--ticket-status-phone-background)";case"X":return"var(--ticket-status-deleted-background)";case"B":return"";case"I":return"var(--ticket-status-deleted-background)";case"R":return"var(--ticket-status-resolved-background)";case"N":return"var(--ticket-status-new-background)";case"C":return"var(--ticket-status-open-background)";case"W":return"var(--ticket-status-postponed-background)"}}function ii(t){re(t,"svelte-1q51p0",'.Row.svelte-1q51p0{display:grid;grid-template-columns:1fr;border-radius:12px;box-shadow:0 0 5px 2px rgb(0 0 0 / 0.2)}.Row.svelte-1q51p0:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-1q51p0{background-color:var(--menu-selected-bg) !important}.StatusBar.svelte-1q51p0{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px}input.svelte-1q51p0{position:absolute;top:40%;left:40%}@media screen and (min-width: 768px){.Row.svelte-1q51p0{display:grid;grid-template-columns:60px 1fr 3fr 1fr;height:80px}.Checkbox.svelte-1q51p0{position:relative}}@media(min-width: 1300px){.Row.svelte-1q51p0{grid-template-columns:60px 260px auto 230px}}')}function Bt(t,e,n){const i=t.slice();return i[9]=e[n],i[10]=e,i[11]=n,i}function xt(t,e,n){const i=t.slice();return i[12]=e[n],i}function Vt(t){let e,n,i;var r=t[12].renderer;function s(o){return{props:{column:o[12],row:o[9]}}}return r&&(e=Gt(r,s(t))),{c(){e&&W(e.$$.fragment),n=it()},m(o,a){e&&U(e,o,a),F(o,n,a),i=!0},p(o,a){const u={};if(a&1&&(u.column=o[12]),a&8&&(u.row=o[9]),a&1&&r!==(r=o[12].renderer)){if(e){ue();const l=e;S(l.$$.fragment,1,0,()=>{J(l,1)}),ce()}r?(e=Gt(r,s(o)),W(e.$$.fragment),w(e.$$.fragment,1),U(e,n.parentNode,n)):e=null}else r&&e.$set(u)},i(o){i||(e&&w(e.$$.fragment,o),i=!0)},o(o){e&&S(e.$$.fragment,o),i=!1},d(o){o&&M(n),e&&J(e,o)}}}function Jt(t){let e,n,i,r,s,o,a,u,l,c,f;function d(){t[6].call(s,t[11])}let g=t[0],m=[];for(let C=0;C<g.length;C+=1)m[C]=Vt(xt(t,g,C));const p=C=>S(m[C],1,1,()=>{m[C]=null});function b(){return t[7](t[9])}function O(...C){return t[8](t[9],...C)}return{c(){e=z("div"),n=z("div"),i=z("div"),r=Y(),s=z("input"),a=Y();for(let C=0;C<m.length;C+=1)m[C].c();D(i,"class","StatusBar svelte-1q51p0"),ct(i,"background-color",_t(t[9].status)),D(s,"type","checkbox"),s.__value=o=t[9].conversationid,s.value=s.__value,D(s,"class","svelte-1q51p0"),D(n,"class","Checkbox svelte-1q51p0"),ct(n,"position","relative"),D(e,"class",u="Row "+(t[3][t[11]].__selected?"Selected":"")+" svelte-1q51p0")},m(C,A){F(C,e,A),R(e,n),R(n,i),R(n,r),R(n,s),s.checked=t[3][t[11]].__selected,R(e,a);for(let _=0;_<m.length;_+=1)m[_]&&m[_].m(e,null);l=!0,c||(f=[ge(s,"change",d),ge(s,"click",On(si)),ge(e,"click",b),ge(e,"mousedown",O)],c=!0)},p(C,A){if(t=C,(!l||A&8)&&ct(i,"background-color",_t(t[9].status)),(!l||A&8&&o!==(o=t[9].conversationid))&&(s.__value=o,s.value=s.__value),A&8&&(s.checked=t[3][t[11]].__selected),A&9){g=t[0];let _;for(_=0;_<g.length;_+=1){const L=xt(t,g,_);m[_]?(m[_].p(L,A),w(m[_],1)):(m[_]=Vt(L),m[_].c(),w(m[_],1),m[_].m(e,null))}for(ue(),_=g.length;_<m.length;_+=1)p(_);ce()}(!l||A&8&&u!==(u="Row "+(t[3][t[11]].__selected?"Selected":"")+" svelte-1q51p0"))&&D(e,"class",u)},i(C){if(!l){for(let A=0;A<g.length;A+=1)w(m[A]);l=!0}},o(C){m=m.filter(Boolean);for(let A=0;A<m.length;A+=1)S(m[A]);l=!1},d(C){C&&M(e),wt(m,C),c=!1,_e(f)}}}function ri(t){let e,n,i,r=t[3],s=[];for(let l=0;l<r.length;l+=1)s[l]=Jt(Bt(t,r,l));const o=l=>S(s[l],1,1,()=>{s[l]=null}),a=t[5].default,u=Ge(a,t,t[4],null);return{c(){e=z("div");for(let l=0;l<s.length;l+=1)s[l].c();n=Y(),u&&u.c(),D(e,"class","Body")},m(l,c){F(l,e,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);R(e,n),u&&u.m(e,null),i=!0},p(l,[c]){if(c&13){r=l[3];let f;for(f=0;f<r.length;f+=1){const d=Bt(l,r,f);s[f]?(s[f].p(d,c),w(s[f],1)):(s[f]=Jt(d),s[f].c(),w(s[f],1),s[f].m(e,n))}for(ue(),f=r.length;f<s.length;f+=1)o(f);ce()}u&&u.p&&(!i||c&16)&&Ee(u,a,l,l[4],i?$e(a,l[4],c,null):Ie(l[4]),null)},i(l){if(!i){for(let c=0;c<r.length;c+=1)w(s[c]);w(u,l),i=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)S(s[c]);S(u,l),i=!1},d(l){l&&M(e),wt(s,l),u&&u.d(l)}}}const si=()=>{};function oi(t,e,n){let i,r=H,s=()=>(r(),r=pe(l,m=>n(3,i=m)),l);t.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=e,{columns:u}=e,{data:l}=e;s();let{middleclickhandler:c}=e;function f(m){i[m].__selected=this.checked,l.set(i)}const d=m=>location.assign("#Conversation;id="+m.conversationid),g=(m,p)=>{p.button===1&&c&&(c(m.conversationid),p.preventDefault(),p.stopPropagation())};return t.$$set=m=>{"columns"in m&&n(0,u=m.columns),"data"in m&&s(n(1,l=m.data)),"middleclickhandler"in m&&n(2,c=m.middleclickhandler),"$$scope"in m&&n(4,a=m.$$scope)},[u,l,c,i,a,o,f,d,g]}class ai extends te{constructor(e){super(),j(this,e,oi,ri,X,{columns:0,data:1,middleclickhandler:2},ii)}}const Ne=[];function Tt(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=H){let n;const i=new Set;function r(a){if(X(t,a)&&(t=a,n)){const u=!Ne.length;for(const l of i)l[1](),Ne.push(l,t);if(u){for(let l=0;l<Ne.length;l+=2)Ne[l][0](Ne[l+1]);Ne.length=0}}}function s(a){r(a(t))}function o(a,u=H){const l=[a,u];return i.add(l),i.size===1&&(n=e(r)||H),a(t),()=>{i.delete(l),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:o}}function li(t,e,n){const i=!Array.isArray(t),r=i?[t]:t,s=e.length<2;return Tt(n,o=>{let a=!1;const u=[];let l=0,c=H;const f=()=>{if(l)return;c();const g=e(i?u[0]:u,o);s?o(g):c=Fe(g)?g:H},d=r.map((g,m)=>pe(g,p=>{u[m]=p,l&=~(1<<m),a&&f()},()=>{l|=1<<m}));return a=!0,f(),function(){_e(d),c(),a=!1}})}const ui={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},ci={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:ui,warnOnMissingMessages:!0},fi=ci;let cn;function nt(){return cn}function di(t){return cn=t}function qe(){return fi}function Ht(t){return t.split("-").map((e,n,i)=>i.slice(0,n+1).join("-")).reverse()}function Pe(t,e=qe().fallbackLocale){const n=Ht(t);return e?[...new Set([...n,...Ht(e)])]:n}let Ct;const st=ae({});function gi(t){return Ct[t]||null}function Lt(t){return t in Ct}function hi(t,e){if(Lt(t)){const n=gi(t);if(e in n)return n[e];const i=e.split(".");let r=n;for(let s=0;s<i.length;s++){if(typeof r[i[s]]!="object")return r[i[s]]||null;r=r[i[s]]}return r}return null}function mi(t){if(t==null)return null;const e=Pe(t);for(let n=0;n<e.length;n++){const i=e[n];if(Lt(i))return i}return null}function pi(t,...e){st.update(n=>(n[t]=Object.assign(n[t]||{},...e),n))}st.subscribe(t=>Ct=t);const Ut=ae(!1),St={};function _i(t){St[t]=new Set}function vi(t){delete St[t]}function Ue(t){return St[t]}function yi(t){return Pe(t).reverse().map(e=>{const n=Ue(e);return[e,n?[...n]:[]]}).filter(([,e])=>e.length>0)}function Dt(t){return Pe(t).reverse().some(Ue)}const Ve={};function fn(t){if(!Dt(t))return Promise.resolve();if(t in Ve)return Ve[t];const e=yi(t);if(e.length===0)return Promise.resolve();const n=setTimeout(()=>Ut.set(!0),qe().loadingDelay);return Ve[t]=Promise.all(e.map(([i,r])=>Promise.all(r.map(s=>s())).then(s=>{vi(i),s=s.map(o=>o.default||o),pi(i,...s)}))).then(()=>{clearTimeout(n),Ut.set(!1),delete Ve[t]}),Ve[t]}function Wt(t,e){Ue(t)||_i(t);const n=Ue(t);Ue(t).has(e)||(Lt(t)||st.update(i=>(i[t]={},i)),n.add(e))}const Ke=ae("");Ke.subscribe(t=>{di(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const vt=Ke.set;Ke.set=t=>mi(t)&&Dt(t)?fn(t).then(()=>vt(t)):vt(t);Ke.update=t=>{let e=nt();t(e),vt(e)};function bi(t){const{formats:e,...n}=t,i=t.initialLocale||t.fallbackLocale,r=qe();return Object.assign(r,n,{initialLocale:i}),e&&("number"in e&&Object.assign(r.formats.number,e.number),"date"in e&&Object.assign(r.formats.date,e.date),"time"in e&&Object.assign(r.formats.time,e.time)),Ke.set(i)}const Se={},wi=(t,e,n)=>n&&(e in Se||(Se[e]={}),t in Se[e]||(Se[e][t]=n),n),ki=(t,e)=>{if(e==null)return;if(e in Se&&t in Se[e])return Se[e][t];const n=Pe(e);for(let i=0;i<n.length;i++){const r=n[i],s=hi(r,t);if(s)return wi(t,e,s)}},Ti=(t,e,n={})=>{const i=typeof e=="string"?e:e.id,r=typeof e=="string"?n:e,{values:s,locale:o=t||nt(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=ki(i,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 "${i}" was not found in "${Pe(o).join('", "')}".${Dt(nt())?`
2
+
3
+ Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||i)},Qe=li([Ke,st],([t])=>Ti.bind(null,t));function Ci(t){return fn(t||nt()||qe().initialLocale)}function Li(t){re(t,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Si(t){let e,n,i;return{c(){e=z("div"),n=z("p"),i=ne(t[0]),D(e,"class","svelte-7bt636")},m(r,s){F(r,e,s),R(e,n),R(n,i)},p(r,[s]){s&1&&se(i,r[0])},i:H,o:H,d(r){r&&M(e)}}}function Di(t,e,n){let i,r,s,o,a;ie(t,Qe,m=>n(8,o=m));let u,l=ke("loading");ie(t,l,m=>n(7,s=m));let c=ke("cursor");ie(t,c,m=>n(6,r=m));let f=ke("data");ie(t,f,m=>n(5,i=m));let d=ke("error");ie(t,d,m=>n(9,a=m));function g(m,p,b){return a?o("Loading failed. Please try again later."):m?"Loading...":p==null?b.length===0?o("No results match your filter. Try broadening the search criteria."):"All data loaded":"Load more data"}return t.$$.update=()=>{t.$$.dirty&224&&n(0,u=g(s,r,i))},[u,l,c,f,d,i,r,s]}class Ai extends te{constructor(e){super(),j(this,e,Di,Si,X,{},Li)}}function Ni(t){re(t,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function Ri(t){let e,n,i,r,s,o;return i=new Ai({}),{c(){e=z("div"),n=z("div"),W(i.$$.fragment),D(n,"class","load svelte-1fwehqj"),D(e,"class","load svelte-1fwehqj")},m(a,u){F(a,e,u),R(e,n),U(i,n,null),t[8](n),r=!0,s||(o=ge(n,"click",function(){Fe(t[2])&&t[2].apply(this,arguments)}),s=!0)},p(a,u){t=a},i(a){r||(w(i.$$.fragment,a),r=!0)},o(a){S(i.$$.fragment,a),r=!1},d(a){a&&M(e),J(i),t[8](null),s=!1,o()}}}function Oi(t){let e,n,i,r,s;return n=new ni({props:{columns:t[1],data:t[0],selectedAll:t[4]}}),r=new ai({props:{columns:t[7],data:t[0],middleclickhandler:t[3],$$slots:{default:[Ri]},$$scope:{ctx:t}}}),{c(){e=z("div"),W(n.$$.fragment),i=Y(),W(r.$$.fragment),D(e,"class","container svelte-1fwehqj")},m(o,a){F(o,e,a),U(n,e,null),R(e,i),U(r,e,null),t[9](e),s=!0},p(o,[a]){const u={};a&2&&(u.columns=o[1]),a&1&&(u.data=o[0]),a&16&&(u.selectedAll=o[4]),n.$set(u);const l={};a&128&&(l.columns=o[7]),a&1&&(l.data=o[0]),a&8&&(l.middleclickhandler=o[3]),a&1060&&(l.$$scope={dirty:a,ctx:o}),r.$set(l)},i(o){s||(w(n.$$.fragment,o),w(r.$$.fragment,o),s=!0)},o(o){S(n.$$.fragment,o),S(r.$$.fragment,o),s=!1},d(o){o&&M(e),J(n),J(r),t[9](null)}}}function zi(t,e,n){let i,r=H,s=()=>(r(),r=pe(a,p=>n(7,i=p)),a);t.$$.on_destroy.push(()=>r());let{data:o}=e,{columns:a}=e;s();let{loadMore:u}=e,{middleclickhandler:l}=e,{selectedAll:c}=e,f,d;an(()=>{const p=new IntersectionObserver(b=>{b[0].isIntersecting&&u()},{root:d,threshold:.5});return p.observe(f),()=>p.unobserve(f)});function g(p){tt[p?"unshift":"push"](()=>{f=p,n(5,f)})}function m(p){tt[p?"unshift":"push"](()=>{d=p,n(6,d)})}return t.$$set=p=>{"data"in p&&n(0,o=p.data),"columns"in p&&s(n(1,a=p.columns)),"loadMore"in p&&n(2,u=p.loadMore),"middleclickhandler"in p&&n(3,l=p.middleclickhandler),"selectedAll"in p&&n(4,c=p.selectedAll)},[o,a,u,l,c,f,d,i,g,m]}class Fi extends te{constructor(e){super(),j(this,e,zi,Oi,X,{data:0,columns:1,loadMore:2,middleclickhandler:3,selectedAll:4},Ni)}}let dt=class{constructor(e,n,i){Xe(this,"renderer");Xe(this,"name");Xe(this,"sortable");this.name=e,this.renderer=n,this.sortable=i}};var Oe=globalThis&&globalThis.__awaiter||function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};const Mi="https://localhost/api/v3".replace(/\/+$/,"");class At{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Mi}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||dn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:()=>Oe(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Gi=new At;class ot{constructor(e=Gi){this.configuration=e,this.fetchApi=(n,i)=>Oe(this,void 0,void 0,function*(){let r={url:n,init:i};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new Ki(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const n=this.clone();return n.middleware=n.middleware.concat(...e),n}withPreMiddleware(...e){const n=e.map(i=>({pre:i}));return this.withMiddleware(...n)}withPostMiddleware(...e){const n=e.map(i=>({post:i}));return this.withMiddleware(...n)}isJsonMime(e){return e?ot.jsonRegex.test(e):!1}request(e,n){return Oe(this,void 0,void 0,function*(){const{url:i,init:r}=yield this.createFetchParams(e,n),s=yield this.fetchApi(i,r);if(s&&s.status>=200&&s.status<300)return s;throw new Ii(s,"Response returned an error code")})}createFetchParams(e,n){return Oe(this,void 0,void 0,function*(){let i=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof n=="function"?n:()=>Oe(this,void 0,void 0,function*(){return n}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:Ei(a.body)||a.body instanceof URLSearchParams||$i(a.body)?a.body:JSON.stringify(a.body)});return{url:i,init:u}})}clone(){const e=this.constructor,n=new e(this.configuration);return n.middleware=this.middleware.slice(),n}}ot.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function $i(t){return typeof Blob<"u"&&t instanceof Blob}function Ei(t){return typeof FormData<"u"&&t instanceof FormData}class Ii extends Error{constructor(e,n){super(n),this.response=e,this.name="ResponseError"}}class Ki extends Error{constructor(e,n){super(n),this.cause=e,this.name="FetchError"}}class Yt extends Error{constructor(e,n){super(n),this.field=e,this.name="RequiredError"}}function h(t,e){const n=t[e];return n!=null}function dn(t,e=""){return Object.keys(t).map(n=>gn(n,t[n],e)).filter(n=>n.length>0).join("&")}function gn(t,e,n=""){const i=n+(n.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${r}`}if(e instanceof Set){const r=Array.from(e);return gn(t,r,n)}return e instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?dn(e,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(e))}`}class Q{constructor(e,n=i=>i){this.raw=e,this.transformer=n}value(){return Oe(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Bi(t){return xi(t)}function xi(t,e){return t==null?t:{departmentid:h(t,"departmentid")?t.departmentid:void 0,onlineStatus:h(t,"online_status")?t.online_status:void 0,presetStatus:h(t,"preset_status")?t.preset_status:void 0}}function Vi(t){return Ji(t)}function Ji(t,e){return t==null?t:{agentid:h(t,"agentid")?t.agentid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,username:h(t,"username")?t.username:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,roleid:h(t,"roleid")?t.roleid:void 0,departmentsStatuses:h(t,"departments_statuses")?t.departments_statuses.map(Bi):void 0,twofa:h(t,"twofa")?t.twofa:void 0,lastPswdChange:h(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:h(t,"userstatus")?t.userstatus:void 0}}function Hi(t){return Ui(t)}function Ui(t,e){return t==null?t:{conversationid:h(t,"conversationid")?t.conversationid:void 0,datechanged:h(t,"datechanged")?new Date(t.datechanged):void 0,status:h(t,"status")?t.status:void 0,preview:h(t,"preview")?t.preview:void 0,subject:h(t,"subject")?t.subject:void 0,departmentname:h(t,"departmentname")?t.departmentname:void 0,agentname:h(t,"agentname")?t.agentname:void 0,tags:h(t,"tags")?t.tags:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,emails:h(t,"emails")?t.emails:void 0,city:h(t,"city")?t.city:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,rstatus:h(t,"rstatus")?t.rstatus:void 0,statusdatestarted:h(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:h(t,"chat_order")?t.chat_order:void 0}}function Wi(t){return Yi(t)}function Yi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,name:h(t,"name")?t.name:void 0,type:h(t,"type")?t.type:void 0,onlineCode:h(t,"online_code")?t.online_code:void 0,offlineCode:h(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:h(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:h(t,"offline_code_css")?t.offline_code_css:void 0,provide:h(t,"provide")?t.provide:void 0,impressions:h(t,"impressions")?t.impressions:void 0,tickets:h(t,"tickets")?t.tickets:void 0,status:h(t,"status")?t.status:void 0,lastDisplayTime:h(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:h(t,"last_display_url")?t.last_display_url:void 0}}function me(t){return qi(t)}function qi(t,e){return t==null?t:{count:h(t,"count")?t.count:void 0}}function Pi(t){return Qi(t)}function Qi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,name:h(t,"name")?t.name:void 0,agentCount:h(t,"agent_count")?t.agent_count:void 0}}function Zi(t){return Xi(t)}function Xi(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,logid:h(t,"logid")?t.logid:void 0,line:h(t,"line")?t.line:void 0,filename:h(t,"filename")?t.filename:void 0,created:h(t,"created")?t.created:void 0,level:h(t,"level")?t.level:void 0,type:h(t,"type")?t.type:void 0,message:h(t,"message")?t.message:void 0,ip:h(t,"ip")?t.ip:void 0,groupid:h(t,"groupid")?t.groupid:void 0}}function ji(t){return er(t)}function er(t,e){return t==null?t:{agentid:h(t,"agentid")?t.agentid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,chats:h(t,"chats")?t.chats:void 0}}function tr(t){return nr(t)}function nr(t,e){return t==null?t:{name:h(t,"name")?t.name:void 0,code:h(t,"code")?t.code:void 0,engName:h(t,"eng_name")?t.eng_name:void 0,translated:h(t,"translated")?t.translated:void 0,isDefault:h(t,"is_default")?t.is_default:void 0,active:h(t,"active")?t.active:void 0,isCustom:h(t,"is_custom")?t.is_custom:void 0,isBuiltIn:h(t,"is_builtIn")?t.is_builtIn:void 0}}function ir(t){return rr(t)}function rr(t,e){return t==null?t:{codeName:h(t,"code_name")?t.code_name:void 0,name:h(t,"name")?t.name:void 0,description:h(t,"description")?t.description:void 0,active:h(t,"active")?t.active:void 0,help:h(t,"help")?t.help:void 0,multiple:h(t,"multiple")?t.multiple:void 0,configFile:h(t,"config_file")?t.config_file:void 0,price:h(t,"price")?t.price:void 0,legacyIntegration:h(t,"legacy_integration")?t.legacy_integration:void 0}}function gt(t){return sr(t)}function sr(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,conversationid:h(t,"conversationid")?t.conversationid:void 0,code:h(t,"code")?t.code:void 0,slaTicketId:h(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:h(t,"departmentid")?t.departmentid:void 0,departmentName:h(t,"department_name")?t.department_name:void 0,levelid:h(t,"levelid")?t.levelid:void 0,slaLevelName:h(t,"sla_level_name")?t.sla_level_name:void 0,sla:h(t,"sla")?t.sla:void 0,dateCreated:h(t,"date_created")?t.date_created:void 0,dateClosed:h(t,"date_closed")?t.date_closed:void 0,dateDue:h(t,"date_due")?t.date_due:void 0,slaLevelId:h(t,"sla_level_id")?t.sla_level_id:void 0,slaType:h(t,"sla_type")?new Date(t.sla_type):void 0,agentid:h(t,"agentid")?t.agentid:void 0,agentFirstname:h(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:h(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:h(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:h(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:h(t,"req_firstname")?t.req_firstname:void 0,reqLastname:h(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:h(t,"req_systemname")?t.req_systemname:void 0,reqContactName:h(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:h(t,"req_avatar_url")?t.req_avatar_url:void 0}}function qt(t){return or(t)}function or(t,e){return t==null?t:{tagid:h(t,"tagid")?t.tagid:void 0,name:h(t,"name")?t.name:void 0,type:h(t,"type")?t.type:void 0,color:h(t,"color")?t.color:void 0,backgroundcolor:h(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:h(t,"is_public")?t.is_public:void 0}}function hn(t){return ar(t)}function ar(t,e){return t==null?t:{conversationid:h(t,"conversationid")?t.conversationid:void 0,code:h(t,"code")?t.code:void 0,datecreated:h(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:h(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:h(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:h(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:h(t,"rorder")?t.rorder:void 0,datedue:h(t,"datedue")?new Date(t.datedue):void 0,datereopen:h(t,"datereopen")?new Date(t.datereopen):void 0,status:h(t,"status")?t.status:void 0,channelType:h(t,"channel_type")?t.channel_type:void 0,departmentid:h(t,"departmentid")?t.departmentid:void 0,agentid:h(t,"agentid")?t.agentid:void 0,preview:h(t,"preview")?t.preview:void 0,subject:h(t,"subject")?t.subject:void 0,departmentname:h(t,"departmentname")?t.departmentname:void 0,agentname:h(t,"agentname")?t.agentname:void 0,tags:h(t,"tags")?t.tags:void 0,messagegroupsIn:h(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:h(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:h(t,"contactid")?t.contactid:void 0,parentContactid:h(t,"parent_contactid")?t.parent_contactid:void 0,firstname:h(t,"firstname")?t.firstname:void 0,lastname:h(t,"lastname")?t.lastname:void 0,systemName:h(t,"system_name")?t.system_name:void 0,emails:h(t,"emails")?t.emails:void 0,phones:h(t,"phones")?t.phones:void 0,jobPosition:h(t,"job_position")?t.job_position:void 0,contactType:h(t,"contact_type")?t.contact_type:void 0,city:h(t,"city")?t.city:void 0,countrycode:h(t,"countrycode")?t.countrycode:void 0,timeOffset:h(t,"time_offset")?t.time_offset:void 0,gender:h(t,"gender")?t.gender:void 0,levelid:h(t,"levelid")?t.levelid:void 0,groups:h(t,"groups")?t.groups:void 0,contactStatus:h(t,"contact_status")?t.contact_status:void 0,company:h(t,"company")?t.company:void 0,avatarUrl:h(t,"avatar_url")?t.avatar_url:void 0,userid:h(t,"userid")?t.userid:void 0,roleid:h(t,"roleid")?t.roleid:void 0,userstatus:h(t,"userstatus")?t.userstatus:void 0,accountuserstatus:h(t,"accountuserstatus")?t.accountuserstatus:void 0,description:h(t,"description")?t.description:void 0,note:h(t,"note")?t.note:void 0,lastActivity:h(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:h(t,"tagnames")?t.tagnames:void 0,groupnames:h(t,"groupnames")?t.groupnames:void 0}}function lr(t){return ur(t)}function ur(t,e){return t==null?t:{cursor:h(t,"cursor")?t.cursor:void 0,rows:h(t,"rows")?t.rows.map(hn):void 0}}function cr(t){return fr(t)}function fr(t,e){return t==null?t:{id:h(t,"id")?t.id:void 0,agentid:h(t,"agentid")?t.agentid:void 0,agent:h(t,"agent")?t.agent:void 0,conversationid:h(t,"conversationid")?t.conversationid:void 0,ticket:h(t,"ticket")?t.ticket:void 0,parentContactid:h(t,"parent_contactid")?t.parent_contactid:void 0,company:h(t,"company")?t.company:void 0,contactid:h(t,"contactid")?t.contactid:void 0,customer:h(t,"customer")?t.customer:void 0,customerFirstname:h(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:h(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:h(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:h(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:h(t,"reportdate")?t.reportdate:void 0,reportedtime:h(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:h(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:h(t,"spenttime")?t.spenttime:void 0,dateinvoiced:h(t,"dateinvoiced")?t.dateinvoiced:void 0,note:h(t,"note")?t.note:void 0,type:h(t,"type")?t.type:void 0}}var G=globalThis&&globalThis.__awaiter||function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};class mn extends ot{getAgentsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(Vi))})}getAgentsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,n)).value()})}getAgentsGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getAgentsGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,n)).value()})}getCallsSlaLogGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(gt))})}getCallsSlaLogGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,n)).value()})}getCallsSlaLogGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getCallsSlaLogGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,n)).value()})}getChatsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(Hi))})}getChatsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,n)).value()})}getChatsGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getChatsGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,n)).value()})}getChatsSlaLogGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(gt))})}getChatsSlaLogGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,n)).value()})}getChatsSlaLogGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getChatsSlaLogGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,n)).value()})}getContactWidgetsCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getContactWidgetsCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,n)).value()})}getContactWidgetsListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(Wi))})}getContactWidgetsList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,n)).value()})}getCustomerGroupsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(qt))})}getCustomerGroupsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,n)).value()})}getDepartmensGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getDepartmensGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,n)).value()})}getDepartmentsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(Pi))})}getDepartmentsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,n)).value()})}getEventLogsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(Zi))})}getEventLogsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,n)).value()})}getEventLogsGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getEventLogsGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,n)).value()})}getInviteAgentsGridListRaw(e,n){return G(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Yt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(ji))})}getInviteAgentsGridList(e,n){return G(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,n)).value()})}getLanguagesGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(tr))})}getLanguagesGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,n)).value()})}getLanguagesGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getLanguagesGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,n)).value()})}getPlugindGridListRaw(e,n){return G(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Yt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const i={};e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.pluginPurpose!==void 0&&(i.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(ir))})}getPlugindGridList(e,n){return G(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,n)).value()})}getTagsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(qt))})}getTagsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,n)).value()})}getTicketsGridDatasetRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:i},n);return new Q(s,o=>lr(o))})}getTicketsGridDataset(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,n)).value()})}getTicketsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(hn))})}getTicketsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,n)).value()})}getTicketsGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getTicketsGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,n)).value()})}getTicketsSlaLogGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor),e.sortField!==void 0&&(i._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(gt))})}getTicketsSlaLogGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,n)).value()})}getTicketsSlaLogGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getTicketsSlaLogGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,n)).value()})}getTimeReportsGridListRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.perPage!==void 0&&(i._perPage=e.perPage),e.sortDir!==void 0&&(i._sortDir=e.sortDir),e.sortField!==void 0&&(i._sortField=e.sortField),e.filters!==void 0&&(i._filters=e.filters),e.cursor!==void 0&&(i._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:i},n);return new Q(s,o=>o.map(cr))})}getTimeReportsGridList(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,n)).value()})}getTimeReportsGridListCountRaw(e,n){return G(this,void 0,void 0,function*(){const i={};e.filters!==void 0&&(i._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:i},n);return new Q(s,o=>me(o))})}getTimeReportsGridListCount(e={},n){return G(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,n)).value()})}}const Pt={Asc:"ASC",Desc:"DESC"},dr={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"};class gr{constructor(e){const n=new At({apiKey:e,basePath:"https://hosted.la.localhost/LiveAgent/server/api/v3"});this.api=new mn(n),this.tags=ae({})}async load(){let e=await this.api.getTagsGridList();e=e.reduce((n,i)=>(n[i.tagid]=i,n),{}),this.tags.set(e)}}function hr(t){re(t,"svelte-xoajdi","span.svelte-xoajdi{margin-right:10px}")}function Qt(t){let e,n=(t[2]??"many")+"",i;return{c(){e=ne("of "),i=ne(n)},m(r,s){F(r,e,s),F(r,i,s)},p(r,s){s&4&&n!==(n=(r[2]??"many")+"")&&se(i,n)},d(r){r&&M(e),r&&M(i)}}}function mr(t){let e,n,i=t[3].length+"",r,s,o,a,u,l=t[4]&&Qt(t);return{c(){e=z("span"),n=ne("Showing "),r=ne(i),s=Y(),l&&l.c(),o=ne(`
4
+ results
5
+ `),D(e,"class","svelte-xoajdi")},m(c,f){F(c,e,f),R(e,n),R(e,r),R(e,s),l&&l.m(e,null),R(e,o),a||(u=ge(e,"click",t[5]),a=!0)},p(c,[f]){f&8&&i!==(i=c[3].length+"")&&se(r,i),c[4]?l?l.p(c,f):(l=Qt(c),l.c(),l.m(e,o)):l&&(l.d(1),l=null)},i:H,o:H,d(c){c&&M(e),l&&l.d(),a=!1,u()}}}function pr(t,e,n){let i,r=H,s=()=>(r(),r=pe(l,p=>n(3,i=p)),l),o,a=H,u=()=>(a(),a=pe(c,p=>n(4,o=p)),c);t.$$.on_destroy.push(()=>r()),t.$$.on_destroy.push(()=>a());let{data:l}=e;s();let{cursor:c}=e;u();let{filter:f}=e,d=null;function g(){n(2,d=null)}async function m(){let b=await ke("api").getTicketsGridListCount({filters:f,timezoneOffset:new Date().getTimezoneOffset()});n(2,d=b.count)}return t.$$set=p=>{"data"in p&&s(n(0,l=p.data)),"cursor"in p&&u(n(1,c=p.cursor)),"filter"in p&&n(6,f=p.filter)},t.$$.update=()=>{t.$$.dirty&64&&f&&g()},[l,c,d,i,o,m,f]}class _r extends te{constructor(e){super(),j(this,e,pr,mr,X,{data:0,cursor:1,filter:6},hr)}}const vr=()=>{const t=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],e=Math.floor(Math.random()*t.length);return t[e]},yr=t=>{let e=t.split(" ");return e.length>1?e=e.shift().charAt(0)+e.pop().charAt(0):e=t.substring(0,2),e.toUpperCase()};function br(t){re(t,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function wr(t){let e;return{c(){e=z("div"),e.textContent=`${t[10]}`,D(e,"class","innerInitials svelte-hbozhk")},m(n,i){F(n,e,i)},p:H,d(n){n&&M(e)}}}function kr(t){let e,n,i,r,s,o;return{c(){e=z("div"),n=z("img"),D(n,"alt",""),D(n,"class",Te("innerImage")+" svelte-hbozhk"),ht(n.src,i=t[2])||D(n,"src",i),D(e,"class",r=Te(t[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){F(a,e,u),R(e,n),s||(o=[ge(n,"error",t[15]),ge(n,"load",t[16])],s=!0)},p(a,u){u&4&&!ht(n.src,i=a[2])&&D(n,"src",i),u&256&&r!==(r=Te(a[8]?"imageLoading":"")+" svelte-hbozhk")&&D(e,"class",r)},d(a){a&&M(e),s=!1,_e(o)}}}function Tr(t){let e,n;function i(o,a){return o[2]&&!o[7]?kr:wr}let r=i(t),s=r(t);return{c(){e=z("div"),s.c(),D(e,"aria-label",t[1]),D(e,"class","wrapper svelte-hbozhk"),D(e,"style",n=t[0]+"--borderRadius:"+(t[6]?0:t[5])+"; --size:"+t[4]+"; --bgColor:"+t[9]+"; --src:"+t[2]+"; --textColor:"+t[3]+"; --abbrLength:"+t[11])},m(o,a){F(o,e,a),s.m(e,null)},p(o,[a]){r===(r=i(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(e,null))),a&2&&D(e,"aria-label",o[1]),a&125&&n!==(n=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&D(e,"style",n)},i:H,o:H,d(o){o&&M(e),s.d()}}}function Cr(t,e,n){let{style:i=""}=e,{name:r="Avatar"}=e,{initials:s}=e,{src:o}=e,{bgColor:a="lightGrey"}=e,{textColor:u="white"}=e,{size:l="50px"}=e,{borderRadius:c="50%"}=e,{square:f=!1}=e,{randomBgColor:d=!1}=e;const g=d?vr():a,m=s||yr(r),p=m.length;let b=!1,O=!0;const C=()=>n(7,b=!0),A=()=>n(8,O=!1);return t.$$set=_=>{"style"in _&&n(0,i=_.style),"name"in _&&n(1,r=_.name),"initials"in _&&n(12,s=_.initials),"src"in _&&n(2,o=_.src),"bgColor"in _&&n(13,a=_.bgColor),"textColor"in _&&n(3,u=_.textColor),"size"in _&&n(4,l=_.size),"borderRadius"in _&&n(5,c=_.borderRadius),"square"in _&&n(6,f=_.square),"randomBgColor"in _&&n(14,d=_.randomBgColor)},[i,r,o,u,l,c,f,b,O,g,m,p,s,a,d,C,A]}class Lr extends te{constructor(e){super(),j(this,e,Cr,Tr,X,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},br)}}var pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _n={exports:{}},vn={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return e.rotl(n,8)&16711935|e.rotl(n,24)&4278255360;for(var i=0;i<n.length;i++)n[i]=e.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(n){for(var i=[],r=0,s=0;r<n.length;r++,s+=8)i[s>>>5]|=n[r]<<24-s%32;return i},wordsToBytes:function(n){for(var i=[],r=0;r<n.length*32;r+=8)i.push(n[r>>>5]>>>24-r%32&255);return i},bytesToHex:function(n){for(var i=[],r=0;r<n.length;r++)i.push((n[r]>>>4).toString(16)),i.push((n[r]&15).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],r=0;r<n.length;r+=2)i.push(parseInt(n.substr(r,2),16));return i},bytesToBase64:function(n){for(var i=[],r=0;r<n.length;r+=3)for(var s=n[r]<<16|n[r+1]<<8|n[r+2],o=0;o<4;o++)r*8+o*6<=n.length*8?i.push(t.charAt(s>>>6*(3-o)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],r=0,s=0;r<n.length;s=++r%4)s!=0&&i.push((t.indexOf(n.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(n.charAt(r))>>>6-s*2);return i}};vn.exports=e})();var Sr=vn.exports,yt={utf8:{stringToBytes:function(t){return yt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(yt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(t.charCodeAt(n)&255);return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}},Zt=yt;/*!
6
+ * Determine if an object is a Buffer
7
+ *
8
+ * @author Feross Aboukhadijeh <https://feross.org>
9
+ * @license MIT
10
+ */var Dr=function(t){return t!=null&&(yn(t)||Ar(t)||!!t._isBuffer)};function yn(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Ar(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&yn(t.slice(0,0))}(function(){var t=Sr,e=Zt.utf8,n=Dr,i=Zt.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=i.stringToBytes(s):s=e.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=t.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,f=-1732584194,d=271733878,g=0;g<a.length;g++)a[g]=(a[g]<<8|a[g]>>>24)&16711935|(a[g]<<24|a[g]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,p=r._gg,b=r._hh,O=r._ii,g=0;g<a.length;g+=16){var C=l,A=c,_=f,L=d;l=m(l,c,f,d,a[g+0],7,-680876936),d=m(d,l,c,f,a[g+1],12,-389564586),f=m(f,d,l,c,a[g+2],17,606105819),c=m(c,f,d,l,a[g+3],22,-1044525330),l=m(l,c,f,d,a[g+4],7,-176418897),d=m(d,l,c,f,a[g+5],12,1200080426),f=m(f,d,l,c,a[g+6],17,-1473231341),c=m(c,f,d,l,a[g+7],22,-45705983),l=m(l,c,f,d,a[g+8],7,1770035416),d=m(d,l,c,f,a[g+9],12,-1958414417),f=m(f,d,l,c,a[g+10],17,-42063),c=m(c,f,d,l,a[g+11],22,-1990404162),l=m(l,c,f,d,a[g+12],7,1804603682),d=m(d,l,c,f,a[g+13],12,-40341101),f=m(f,d,l,c,a[g+14],17,-1502002290),c=m(c,f,d,l,a[g+15],22,1236535329),l=p(l,c,f,d,a[g+1],5,-165796510),d=p(d,l,c,f,a[g+6],9,-1069501632),f=p(f,d,l,c,a[g+11],14,643717713),c=p(c,f,d,l,a[g+0],20,-373897302),l=p(l,c,f,d,a[g+5],5,-701558691),d=p(d,l,c,f,a[g+10],9,38016083),f=p(f,d,l,c,a[g+15],14,-660478335),c=p(c,f,d,l,a[g+4],20,-405537848),l=p(l,c,f,d,a[g+9],5,568446438),d=p(d,l,c,f,a[g+14],9,-1019803690),f=p(f,d,l,c,a[g+3],14,-187363961),c=p(c,f,d,l,a[g+8],20,1163531501),l=p(l,c,f,d,a[g+13],5,-1444681467),d=p(d,l,c,f,a[g+2],9,-51403784),f=p(f,d,l,c,a[g+7],14,1735328473),c=p(c,f,d,l,a[g+12],20,-1926607734),l=b(l,c,f,d,a[g+5],4,-378558),d=b(d,l,c,f,a[g+8],11,-2022574463),f=b(f,d,l,c,a[g+11],16,1839030562),c=b(c,f,d,l,a[g+14],23,-35309556),l=b(l,c,f,d,a[g+1],4,-1530992060),d=b(d,l,c,f,a[g+4],11,1272893353),f=b(f,d,l,c,a[g+7],16,-155497632),c=b(c,f,d,l,a[g+10],23,-1094730640),l=b(l,c,f,d,a[g+13],4,681279174),d=b(d,l,c,f,a[g+0],11,-358537222),f=b(f,d,l,c,a[g+3],16,-722521979),c=b(c,f,d,l,a[g+6],23,76029189),l=b(l,c,f,d,a[g+9],4,-640364487),d=b(d,l,c,f,a[g+12],11,-421815835),f=b(f,d,l,c,a[g+15],16,530742520),c=b(c,f,d,l,a[g+2],23,-995338651),l=O(l,c,f,d,a[g+0],6,-198630844),d=O(d,l,c,f,a[g+7],10,1126891415),f=O(f,d,l,c,a[g+14],15,-1416354905),c=O(c,f,d,l,a[g+5],21,-57434055),l=O(l,c,f,d,a[g+12],6,1700485571),d=O(d,l,c,f,a[g+3],10,-1894986606),f=O(f,d,l,c,a[g+10],15,-1051523),c=O(c,f,d,l,a[g+1],21,-2054922799),l=O(l,c,f,d,a[g+8],6,1873313359),d=O(d,l,c,f,a[g+15],10,-30611744),f=O(f,d,l,c,a[g+6],15,-1560198380),c=O(c,f,d,l,a[g+13],21,1309151649),l=O(l,c,f,d,a[g+4],6,-145523070),d=O(d,l,c,f,a[g+11],10,-1120210379),f=O(f,d,l,c,a[g+2],15,718787259),c=O(c,f,d,l,a[g+9],21,-343485551),l=l+C>>>0,c=c+A>>>0,f=f+_>>>0,d=d+L>>>0}return t.endian([l,c,f,d])};r._ff=function(s,o,a,u,l,c,f){var d=s+(o&a|~o&u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._gg=function(s,o,a,u,l,c,f){var d=s+(o&u|a&~u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._hh=function(s,o,a,u,l,c,f){var d=s+(o^a^u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._ii=function(s,o,a,u,l,c,f){var d=s+(a^(o|~u))+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._blocksize=16,r._digestsize=16,_n.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=t.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?i.bytesToString(a):t.bytesToHex(a)}})();var Nr=_n.exports;const Rr=Nt(Nr);function Or(t){return[...t].reduce((e,n)=>Math.imul(31,e)+n.charCodeAt(0)|0,0)}function zr(t){re(t,"svelte-i7rqh4",".Column.svelte-i7rqh4{padding-bottom:5px;padding-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function Fr(t){let e,n,i;const r=t[2].default,s=Ge(r,t,t[1],null);return{c(){e=z("div"),s&&s.c(),D(e,"class",n="Column "+t[0]+" svelte-i7rqh4")},m(o,a){F(o,e,a),s&&s.m(e,null),i=!0},p(o,[a]){s&&s.p&&(!i||a&2)&&Ee(s,r,o,o[1],i?$e(r,o[1],a,null):Ie(o[1]),null),(!i||a&1&&n!==(n="Column "+o[0]+" svelte-i7rqh4"))&&D(e,"class",n)},i(o){i||(w(s,o),i=!0)},o(o){S(s,o),i=!1},d(o){o&&M(e),s&&s.d(o)}}}function Mr(t,e,n){let{$$slots:i={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&n(0,s=o.className),"$$scope"in o&&n(1,r=o.$$scope)},[s,r,i]}class Rt extends te{constructor(e){super(),j(this,e,Mr,Fr,X,{className:0},zr)}}function Gr(t){re(t,"svelte-7jeavi",'.Tag.svelte-7jeavi{display:inline-block;color:var(--department-bg-color);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-7jeavi:before{font-family:"la-icon-font"}.SLA.svelte-7jeavi{border:1px solid #CFD6DD;border-radius:4px}')}function $r(t){let e,n,i,r,s,o;const a=t[4].default,u=Ge(a,t,t[3],null);return{c(){e=z("div"),u&&u.c(),n=Y(),i=z("span"),r=ne(t[0]),D(i,"class","text"),D(e,"class",s="Tag "+t[1]+" svelte-7jeavi"),D(e,"style",t[2])},m(l,c){F(l,e,c),u&&u.m(e,null),R(e,n),R(e,i),R(i,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Ee(u,a,l,l[3],o?$e(a,l[3],c,null):Ie(l[3]),null),(!o||c&1)&&se(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-7jeavi"))&&D(e,"class",s),(!o||c&4)&&D(e,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){S(u,l),o=!1},d(l){l&&M(e),u&&u.d(l)}}}function Er(t,e,n){let{$$slots:i={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return console.log("test halo"),t.$$set=u=>{"text"in u&&n(0,s=u.text),"className"in u&&n(1,o=u.className),"style"in u&&n(2,a=u.style),"$$scope"in u&&n(3,r=u.$$scope)},[s,o,a,r,i]}class at extends te{constructor(e){super(),j(this,e,Er,$r,X,{text:0,className:1,style:2},Gr)}}function Ir(t){re(t,"svelte-yh1nwn",".Icon.svelte-yh1nwn:before{font-family:'la-icon-font';display:inline-block;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function Kr(t){let e,n;return{c(){e=z("span"),D(e,"class",n=Te(`Icon ${t[0]} ${t[1]}`)+" svelte-yh1nwn")},m(i,r){F(i,e,r)},p(i,[r]){r&3&&n!==(n=Te(`Icon ${i[0]} ${i[1]}`)+" svelte-yh1nwn")&&D(e,"class",n)},i:H,o:H,d(i){i&&M(e)}}}function Br(t,e,n){let{className:i=""}=e,{iconVariable:r}=e;return t.$$set=s=>{"className"in s&&n(0,i=s.className),"iconVariable"in s&&n(1,r=s.iconVariable)},[i,r]}class Me extends te{constructor(e){super(),j(this,e,Br,Kr,X,{className:0,iconVariable:1},Ir)}}function xr(t){re(t,"svelte-xnu6kx","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Vr(t){let e,n;return e=new Me({props:{iconVariable:t[2]}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.iconVariable=i[2]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Jr(t){let e,n;return e=new at({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Vr]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.text=i[0]),r&2&&(s.style=i[1]),r&36&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Hr(t,e,n){let{text:i}=e,{className:r=""}=e,{style:s=""}=e,{iconVariable:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&n(0,i=u.text),"className"in u&&n(4,r=u.className),"style"in u&&n(1,s=u.style),"iconVariable"in u&&n(2,o=u.iconVariable)},[i,s,o,a,r]}class lt extends te{constructor(e){super(),j(this,e,Hr,Jr,X,{text:0,className:4,style:1,iconVariable:2},xr)}}function Ur(t){re(t,"svelte-1vpgajt",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}.Tag.NoCompanyTag{background-color:white;color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-1vpgajt{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-1vpgajt{font-size:13px;line-height:20px;font-weight:bold}.email.svelte-1vpgajt{font-size:13px;line-height:20px}.texts.svelte-1vpgajt{display:flex;flex-direction:column;justify-content:center}")}function Wr(t){let e,n,i,r,s,o,a,u,l=t[0].emails+"",c,f,d,g;return n=new Lr({props:{bgColor:"rgb("+t[4]+","+t[5]+","+t[6]+")",name:t[2],src:t[3]}}),d=new lt({props:{text:t[7],className:t[7]==="Company"?"CompanyTag":"NoCompanyTag",iconVariable:"la-companies"}}),{c(){e=z("div"),W(n.$$.fragment),i=Y(),r=z("div"),s=z("div"),o=ne(t[2]),a=Y(),u=z("div"),c=ne(l),f=Y(),W(d.$$.fragment),D(e,"class","avatar svelte-1vpgajt"),D(s,"class","name svelte-1vpgajt"),D(u,"class","email svelte-1vpgajt"),D(r,"class","texts svelte-1vpgajt")},m(m,p){F(m,e,p),U(n,e,null),F(m,i,p),F(m,r,p),R(r,s),R(s,o),R(r,a),R(r,u),R(u,c),R(r,f),U(d,r,null),g=!0},p(m,p){const b={};p&16&&(b.bgColor="rgb("+m[4]+","+m[5]+","+m[6]+")"),p&4&&(b.name=m[2]),p&8&&(b.src=m[3]),n.$set(b),(!g||p&4)&&se(o,m[2]),(!g||p&1)&&l!==(l=m[0].emails+"")&&se(c,l)},i(m){g||(w(n.$$.fragment,m),w(d.$$.fragment,m),g=!0)},o(m){S(n.$$.fragment,m),S(d.$$.fragment,m),g=!1},d(m){m&&M(e),J(n),m&&M(i),m&&M(r),J(d)}}}function Yr(t){let e,n;return e=new Rt({props:{className:t[1],$$slots:{default:[Wr]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,[r]){const s={};r&2&&(s.className=i[1]),r&541&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function qr(t,e,n){let{row:i}=e,{className:r="userColumn"}=e,s=i.firstname+" "+i.lastname;s.trim()||(s=i.systemName);let o=i.avatarUrl;o||(o="https://www.gravatar.com/avatar/"+Rr(i.emails[0]??"")+"?s=200&d=404");let a=Or(s+i.emails),u=(a&16711680)>>16,l=(a&65280)>>8,c=a&255;u+l+c<150&&(u=150),u+l+c>400&&(u=0);let f=i.company==="Y"?"Company":"No Company";return t.$$set=d=>{"row"in d&&n(0,i=d.row),"className"in d&&n(1,r=d.className)},[i,r,s,o,u,l,c,f]}class Pr extends te{constructor(e){super(),j(this,e,qr,Yr,X,{row:0,className:1},Ur)}}function Qr(t){re(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function Zr(t){let e,n;return e=new at({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,[r]){const s={};r&6&&(s.style="color: #"+i[2]+"; background: #"+i[1]),r&1&&(s.text=i[0]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Xr(t,e,n){let i,r,s,o,{tagId:a}=e,u=ke("tagsMap");return ie(t,u,l=>n(5,o=l)),t.$$set=l=>{"tagId"in l&&n(4,a=l.tagId)},t.$$.update=()=>{var l,c,f;t.$$.dirty&48&&n(2,i=((l=o[a])==null?void 0:l.color)??0),t.$$.dirty&48&&n(1,r=((c=o[a])==null?void 0:c.backgroundcolor)??0),t.$$.dirty&48&&n(0,s=((f=o[a])==null?void 0:f.name)??"")},[s,r,i,u,a,o]}class jr extends te{constructor(e){super(),j(this,e,Xr,Zr,X,{tagId:4},Qr)}}function Xt(t,e,n){const i=t.slice();return i[1]=e[n],i}function jt(t){let e,n;return e=new jr({props:{tagId:t[1]}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.tagId=i[1]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function es(t){let e,n,i=t[0],r=[];for(let o=0;o<i.length;o+=1)r[o]=jt(Xt(t,i,o));const s=o=>S(r[o],1,1,()=>{r[o]=null});return{c(){e=z("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){F(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);n=!0},p(o,[a]){if(a&1){i=o[0];let u;for(u=0;u<i.length;u+=1){const l=Xt(o,i,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=jt(l),r[u].c(),w(r[u],1),r[u].m(e,null))}for(ue(),u=i.length;u<r.length;u+=1)s(u);ce()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)w(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)S(r[a]);n=!1},d(o){o&&M(e),wt(r,o)}}}function ts(t,e,n){let{tags:i}=e;return t.$$set=r=>{"tags"in r&&n(0,i=r.tags)},[i]}class ns extends te{constructor(e){super(),j(this,e,ts,es,X,{tags:0})}}function is(t){let e,n;return e=new lt({props:{className:t[2][t[0]].text,style:t[1],text:t[2][t[0]].text,iconVariable:t[2][t[0]].icon}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.className=i[2][i[0]].text),r&2&&(s.style=i[1]),r&1&&(s.text=i[2][i[0]].text),r&1&&(s.iconVariable=i[2][i[0]].icon),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function rs(t,e,n){let i;ie(t,Qe,a=>n(3,i=a));let{status:r}=e;const s={A:{text:i("Answered"),icon:"la-ticket-answered"},T:{text:i("Chatting"),icon:"la-chatting"},P:{text:i("Calling"),icon:"la-call"},X:{text:i("Deleted"),icon:"la-ticket-deleted"},B:{text:i("Spam"),icon:"la-spam"},I:{text:i("Init"),icon:""},R:{text:i("Resolved"),icon:"la-ticket-resolved"},N:{text:i("New"),icon:"la-ticket-new"},C:{text:i("Open"),icon:"la-ticket-open"},W:{text:i("Postponed"),icon:"la-ticket-postponed"}};let{style:o=`background-color: ${s[r]?_t(r):"defaultColor"}; color: white;`}=e;return t.$$set=a=>{"status"in a&&n(0,r=a.status),"style"in a&&n(1,o=a.style)},[r,o,s]}class ss extends te{constructor(e){super(),j(this,e,rs,is,X,{status:0,style:1})}}function os(t){re(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function as(t){let e,n,i,r;n=new Me({props:{iconVariable:t[2]}});const s=t[8].default,o=Ge(s,t,t[7],null);return{c(){e=z("div"),W(n.$$.fragment),i=Y(),o&&o.c(),D(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){F(a,e,u),U(n,e,null),F(a,i,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconVariable=a[2]),n.$set(l),o&&o.p&&(!r||u&128)&&Ee(o,s,a,a[7],r?$e(s,a[7],u,null):Ie(a[7]),null)},i(a){r||(w(n.$$.fragment,a),w(o,a),r=!0)},o(a){S(n.$$.fragment,a),S(o,a),r=!1},d(a){a&&M(e),J(n),a&&M(i),o&&o.d(a)}}}function ls(t){let e,n;return e=new lt({props:{style:t[3],text:t[0],iconVariable:t[2],className:"Combined"}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&8&&(s.style=i[3]),r&1&&(s.text=i[0]),r&4&&(s.iconVariable=i[2]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function us(t){let e,n,i,r,s,o;const a=[ls,as],u=[];function l(c,f){return c[0]!==""?0:1}return n=l(t),i=u[n]=a[n](t),s=new at({props:{style:t[4],text:t[1]}}),{c(){e=z("div"),i.c(),r=Y(),W(s.$$.fragment),D(e,"class",Te(t[5])+" svelte-1wdh20c")},m(c,f){F(c,e,f),u[n].m(e,null),R(e,r),U(s,e,null),o=!0},p(c,[f]){let d=n;n=l(c),n===d?u[n].p(c,f):(ue(),S(u[d],1,1,()=>{u[d]=null}),ce(),i=u[n],i?i.p(c,f):(i=u[n]=a[n](c),i.c()),w(i,1),i.m(e,r));const g={};f&16&&(g.style=c[4]),f&2&&(g.text=c[1]),s.$set(g)},i(c){o||(w(i),w(s.$$.fragment,c),o=!0)},o(c){S(i),S(s.$$.fragment,c),o=!1},d(c){c&&M(e),u[n].d(),J(s)}}}function cs(t,e,n){let{$$slots:i={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconVariable:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let f=`CombinedTag ${u}`;return t.$$set=d=>{"iconText"in d&&n(0,s=d.iconText),"tagText"in d&&n(1,o=d.tagText),"iconVariable"in d&&n(2,a=d.iconVariable),"className"in d&&n(6,u=d.className),"$$scope"in d&&n(7,r=d.$$scope)},[s,o,a,l,c,f,u,r,i]}class bn extends te{constructor(e){super(),j(this,e,cs,us,X,{iconText:0,tagText:1,iconVariable:2,className:6},os)}}function fs(t){re(t,"svelte-nfaksv",".subject.svelte-nfaksv{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-nfaksv{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.additional.svelte-nfaksv{display:flex}")}function ds(t){let e,n;return e=new lt({props:{className:"Department",text:t[0].departmentname,iconVariable:".la-department"}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.text=i[0].departmentname),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function gs(t){let e,n;return e=new bn({props:{className:"Department",tagText:t[0].agentname,iconVariable:"la-department",iconText:t[0].departmentname}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.tagText=i[0].agentname),r&1&&(s.iconText=i[0].departmentname),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function hs(t){let e,n=t[0].subject+"",i,r,s,o=t[0].preview+"",a,u,l,c,f,d,g,m,p,b,O;c=new ss({props:{status:t[0].status}});const C=[gs,ds],A=[];function _(L,I){return I&1&&(d=null),d==null&&(d=L[0].agentname.trim()!==""),d?0:1}return g=_(t,-1),m=A[g]=C[g](t),b=new ns({props:{tags:t[0].tags}}),{c(){e=z("h1"),i=ne(n),r=Y(),s=z("p"),a=ne(o),u=Y(),l=z("div"),W(c.$$.fragment),f=Y(),m.c(),p=Y(),W(b.$$.fragment),D(e,"class","subject svelte-nfaksv"),D(s,"class","preview svelte-nfaksv"),D(l,"class","additional svelte-nfaksv")},m(L,I){F(L,e,I),R(e,i),F(L,r,I),F(L,s,I),R(s,a),F(L,u,I),F(L,l,I),U(c,l,null),R(l,f),A[g].m(l,null),R(l,p),U(b,l,null),O=!0},p(L,I){(!O||I&1)&&n!==(n=L[0].subject+"")&&se(i,n),(!O||I&1)&&o!==(o=L[0].preview+"")&&se(a,o);const N={};I&1&&(N.status=L[0].status),c.$set(N);let q=g;g=_(L,I),g===q?A[g].p(L,I):(ue(),S(A[q],1,1,()=>{A[q]=null}),ce(),m=A[g],m?m.p(L,I):(m=A[g]=C[g](L),m.c()),w(m,1),m.m(l,p));const x={};I&1&&(x.tags=L[0].tags),b.$set(x)},i(L){O||(w(c.$$.fragment,L),w(m),w(b.$$.fragment,L),O=!0)},o(L){S(c.$$.fragment,L),S(m),S(b.$$.fragment,L),O=!1},d(L){L&&M(e),L&&M(r),L&&M(s),L&&M(u),L&&M(l),J(c),A[g].d(),J(b)}}}function ms(t){let e,n;return e=new Rt({props:{className:t[1],$$slots:{default:[hs]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,[r]){const s={};r&2&&(s.className=i[1]),r&5&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function ps(t,e,n){let{row:i}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&n(0,i=s.row),"className"in s&&n(1,r=s.className)},[i,r]}class _s extends te{constructor(e){super(),j(this,e,ps,ms,X,{row:0,className:1},fs)}}var wn={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(pn,function(){var n=1e3,i=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",f="month",d="quarter",g="year",m="date",p="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var T=["th","st","nd","rd"],k=E%100;return"["+E+(T[(k-20)%10]||T[k]||T[0])+"]"}},A=function(E,T,k){var y=String(E);return!y||y.length>=T?E:""+Array(T+1-y.length).join(k)+E},_={s:A,z:function(E){var T=-E.utcOffset(),k=Math.abs(T),y=Math.floor(k/60),v=k%60;return(T<=0?"+":"-")+A(y,2,"0")+":"+A(v,2,"0")},m:function E(T,k){if(T.date()<k.date())return-E(k,T);var y=12*(k.year()-T.year())+(k.month()-T.month()),v=T.clone().add(y,f),K=k-v<0,B=T.clone().add(y+(K?-1:1),f);return+(-(y+(k-v)/(K?v-B:B-v))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:f,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},L="en",I={};I[L]=C;var N=function(E){return E instanceof he},q=function E(T,k,y){var v;if(!T)return L;if(typeof T=="string"){var K=T.toLowerCase();I[K]&&(v=K),k&&(I[K]=k,v=K);var B=T.split("-");if(!v&&B.length>1)return E(B[0])}else{var P=T.name;I[P]=T,v=P}return!y&&v&&(L=v),v||!y&&L},x=function(E,T){if(N(E))return E.clone();var k=typeof T=="object"?T:{};return k.date=E,k.args=arguments,new he(k)},V=_;V.l=q,V.i=N,V.w=function(E,T){return x(E,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var he=function(){function E(k){this.$L=q(k.locale,null,!0),this.parse(k)}var T=E.prototype;return T.parse=function(k){this.$d=function(y){var v=y.date,K=y.utc;if(v===null)return new Date(NaN);if(V.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var B=v.match(b);if(B){var P=B[2]-1||0,Z=(B[7]||"0").substring(0,3);return K?new Date(Date.UTC(B[1],P,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Z)):new Date(B[1],P,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Z)}}return new Date(v)}(k),this.$x=k.x||{},this.init()},T.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},T.$utils=function(){return V},T.isValid=function(){return this.$d.toString()!==p},T.isSame=function(k,y){var v=x(k);return this.startOf(y)<=v&&v<=this.endOf(y)},T.isAfter=function(k,y){return x(k)<this.startOf(y)},T.isBefore=function(k,y){return this.endOf(y)<x(k)},T.$g=function(k,y,v){return V.u(k)?this[y]:this.set(v,k)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(k,y){var v=this,K=!!V.u(y)||y,B=V.p(k),P=function(De,le){var ye=V.w(v.$u?Date.UTC(v.$y,le,De):new Date(v.$y,le,De),v);return K?ye:ye.endOf(l)},Z=function(De,le){return V.w(v.toDate()[De].apply(v.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(le)),v)},ee=this.$W,$=this.$M,oe=this.$D,de="set"+(this.$u?"UTC":"");switch(B){case g:return K?P(1,0):P(31,11);case f:return K?P(1,$):P(0,$+1);case c:var Be=this.$locale().weekStart||0,xe=(ee<Be?ee+7:ee)-Be;return P(K?oe-xe:oe+(6-xe),$);case l:case m:return Z(de+"Hours",0);case u:return Z(de+"Minutes",1);case a:return Z(de+"Seconds",2);case o:return Z(de+"Milliseconds",3);default:return this.clone()}},T.endOf=function(k){return this.startOf(k,!1)},T.$set=function(k,y){var v,K=V.p(k),B="set"+(this.$u?"UTC":""),P=(v={},v[l]=B+"Date",v[m]=B+"Date",v[f]=B+"Month",v[g]=B+"FullYear",v[u]=B+"Hours",v[a]=B+"Minutes",v[o]=B+"Seconds",v[s]=B+"Milliseconds",v)[K],Z=K===l?this.$D+(y-this.$W):y;if(K===f||K===g){var ee=this.clone().set(m,1);ee.$d[P](Z),ee.init(),this.$d=ee.set(m,Math.min(this.$D,ee.daysInMonth())).$d}else P&&this.$d[P](Z);return this.init(),this},T.set=function(k,y){return this.clone().$set(k,y)},T.get=function(k){return this[V.p(k)]()},T.add=function(k,y){var v,K=this;k=Number(k);var B=V.p(y),P=function($){var oe=x(K);return V.w(oe.date(oe.date()+Math.round($*k)),K)};if(B===f)return this.set(f,this.$M+k);if(B===g)return this.set(g,this.$y+k);if(B===l)return P(1);if(B===c)return P(7);var Z=(v={},v[a]=i,v[u]=r,v[o]=n,v)[B]||1,ee=this.$d.getTime()+k*Z;return V.w(ee,this)},T.subtract=function(k,y){return this.add(-1*k,y)},T.format=function(k){var y=this,v=this.$locale();if(!this.isValid())return v.invalidDate||p;var K=k||"YYYY-MM-DDTHH:mm:ssZ",B=V.z(this),P=this.$H,Z=this.$m,ee=this.$M,$=v.weekdays,oe=v.months,de=function(le,ye,ut,Ze){return le&&(le[ye]||le(y,K))||ut[ye].slice(0,Ze)},Be=function(le){return V.s(P%12||12,le,"0")},xe=v.meridiem||function(le,ye,ut){var Ze=le<12?"AM":"PM";return ut?Ze.toLowerCase():Ze},De={YY:String(this.$y).slice(-2),YYYY:V.s(this.$y,4,"0"),M:ee+1,MM:V.s(ee+1,2,"0"),MMM:de(v.monthsShort,ee,oe,3),MMMM:de(oe,ee),D:this.$D,DD:V.s(this.$D,2,"0"),d:String(this.$W),dd:de(v.weekdaysMin,this.$W,$,2),ddd:de(v.weekdaysShort,this.$W,$,3),dddd:$[this.$W],H:String(P),HH:V.s(P,2,"0"),h:Be(1),hh:Be(2),a:xe(P,Z,!0),A:xe(P,Z,!1),m:String(Z),mm:V.s(Z,2,"0"),s:String(this.$s),ss:V.s(this.$s,2,"0"),SSS:V.s(this.$ms,3,"0"),Z:B};return K.replace(O,function(le,ye){return ye||De[le]||B.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(k,y,v){var K,B=V.p(y),P=x(k),Z=(P.utcOffset()-this.utcOffset())*i,ee=this-P,$=V.m(this,P);return $=(K={},K[g]=$/12,K[f]=$,K[d]=$/3,K[c]=(ee-Z)/6048e5,K[l]=(ee-Z)/864e5,K[u]=ee/r,K[a]=ee/i,K[o]=ee/n,K)[B]||ee,v?$:V.a($)},T.daysInMonth=function(){return this.endOf(f).$D},T.$locale=function(){return I[this.$L]},T.locale=function(k,y){if(!k)return this.$L;var v=this.clone(),K=q(k,y,!0);return K&&(v.$L=K),v},T.clone=function(){return V.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},E}(),fe=he.prototype;return x.prototype=fe,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",f],["$y",g],["$D",m]].forEach(function(E){fe[E[1]]=function(T){return this.$g(T,E[0],E[1])}}),x.extend=function(E,T){return E.$i||(E(T,he,x),E.$i=!0),x},x.locale=q,x.isDayjs=N,x.unix=function(E){return x(1e3*E)},x.en=I[L],x.Ls=I,x.p={},x})})(wn);var vs=wn.exports;const Je=Nt(vs);var kn={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(pn,function(){return function(n,i,r){n=n||{};var s=i.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,f,d){return s.fromToBase(l,c,f,d)}r.en.relativeTime=o,s.fromToBase=function(l,c,f,d,g){for(var m,p,b,O=f.$locale().relativeTime||o,C=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],A=C.length,_=0;_<A;_+=1){var L=C[_];L.d&&(m=d?r(l).diff(f,L.d,!0):f.diff(l,L.d,!0));var I=(n.rounding||Math.round)(Math.abs(m));if(b=m>0,I<=L.r||!L.r){I<=1&&_>0&&(L=C[_-1]);var N=O[L.l];g&&(I=g(""+I)),p=typeof N=="string"?N.replace("%d",I):N(I,c,L.l,b);break}}if(c)return p;var q=b?O.future:O.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)}}})})(kn);var ys=kn.exports;const bs=Nt(ys);Je.extend(bs);function ws(t){let e,n,i=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<i.length;s+=1)r=We(r,i[s]);return{c(){e=z("time"),n=ne(t[0]),Ft(e,r)},m(s,o){F(s,e,o),R(e,n)},p(s,[o]){o&1&&Gn(n,s[0],r.contenteditable),Ft(e,r=ln(i,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:H,o:H,d(s){s&&M(e)}}}function ks(t,e,n){let i;const r=["timestamp","format","relative","live","formatted"];let s=zt(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,f;const d=60*1e3;return an(()=>(u&&l!==!1&&(f=setInterval(()=>{n(0,c=Je(o).from())},Math.abs(typeof l=="number"?l:d))),()=>{typeof f=="number"&&clearInterval(f)})),t.$$set=g=>{e=We(We({},e),Sn(g)),n(3,s=zt(e,r)),"timestamp"in g&&n(1,o=g.timestamp),"format"in g&&n(4,a=g.format),"relative"in g&&n(5,u=g.relative),"live"in g&&n(6,l=g.live),"formatted"in g&&n(0,c=g.formatted)},t.$$.update=()=>{t.$$.dirty&50&&n(0,c=u?Je(o).from():Je(o).format(a)),t.$$.dirty&50&&n(2,i=u?Je(o).format(a):void 0)},[c,o,i,s,a,u,l]}class Ts extends te{constructor(e){super(),j(this,e,ks,ws,X,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Cs(t){re(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Ls(t){let e;return{c(){e=z("span"),e.textContent="Invalid data",D(e,"class","invalid svelte-1o3wy2t")},m(n,i){F(n,e,i)},p:H,i:H,o:H,d(n){n&&M(e)}}}function Ss(t){let e,n;return e=new Ts({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.style=i[2]),r&1&&(s.timestamp=i[0]),r&2&&(s.format=i[1]),r&8&&(s.relative=i[3]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Ds(t){let e,n,i,r,s;const o=[Ss,Ls],a=[];function u(l,c){return c&1&&(n=null),n==null&&(n=l[0]instanceof Date&&!isNaN(l[0].getTime())),n?0:1}return i=u(t,-1),r=a[i]=o[i](t),{c(){e=z("div"),r.c(),D(e,"class","Date svelte-1o3wy2t")},m(l,c){F(l,e,c),a[i].m(e,null),s=!0},p(l,[c]){let f=i;i=u(l,c),i===f?a[i].p(l,c):(ue(),S(a[f],1,1,()=>{a[f]=null}),ce(),r=a[i],r?r.p(l,c):(r=a[i]=o[i](l),r.c()),w(r,1),r.m(e,null))},i(l){s||(w(r),s=!0)},o(l){S(r),s=!1},d(l){l&&M(e),a[i].d()}}}function As(t,e,n){let{data:i}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&n(0,i=a.data),"format"in a&&n(1,r=a.format),"style"in a&&n(2,s=a.style),"relative"in a&&n(3,o=a.relative)},[i,r,s,o]}class Tn extends te{constructor(e){super(),j(this,e,As,Ds,X,{data:0,format:1,style:2,relative:3},Cs)}}function Ns(t){let e,n;return e=new Tn({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.data=i[1]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Rs(t){let e,n;return e=new bn({props:{iconVariable:t[3],tagText:t[0],className:t[2],$$slots:{default:[Ns]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,[r]){const s={};r&8&&(s.iconVariable=i[3]),r&1&&(s.tagText=i[0]),r&4&&(s.className=i[2]),r&34&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Os(t,e,n){let i,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(n(2,o="SLATag Pending"),"la-sla"):(n(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&n(0,r=u.tagText),"due"in u&&n(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&n(3,i=a(s))},[r,s,o,i]}class zs extends te{constructor(e){super(),j(this,e,Os,Rs,X,{tagText:0,due:1})}}function Fs(t){re(t,"svelte-rl80em",".TicketId.svelte-rl80em{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-rl80em{font-size:13px;line-height:20px}.Communication.svelte-rl80em{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}")}function Ms(t){let e,n;return e=new at({props:{text:"No SLA",className:"SLA"}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Gs(t){let e,n;return e=new zs({props:{tagText:"First answer",due:t[1].datedue}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.due=i[1].datedue),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function $s(t){let e,n=t[1].code+"",i,r,s,o,a,u,l=t[1].messagegroupsIn+"",c,f,d,g,m,p,b=t[1].messagegroupsOut+"",O,C,A,_,L,I,N,q,x,V,he,fe;o=new Me({props:{iconVariable:"la-incoming"}}),g=new Me({props:{iconVariable:"la-outgoing"}}),I=new Tn({props:{data:t[1].datecreated,format:t[2]}});const E=[Gs,Ms],T=[];function k(y,v){return v&2&&(q=null),q==null&&(q=y[1].datedue instanceof Date&&!isNaN(y[1].datedue)),q?0:1}return x=k(t,-1),V=T[x]=E[x](t),{c(){e=z("span"),i=ne(n),r=Y(),s=z("div"),W(o.$$.fragment),a=Y(),u=z("span"),c=ne(l),f=Y(),d=z("div"),W(g.$$.fragment),m=Y(),p=z("span"),O=ne(b),C=Y(),A=z("div"),_=z("span"),_.textContent=`${t[3]}:`,L=Y(),W(I.$$.fragment),N=Y(),V.c(),he=it(),D(e,"class","TicketId svelte-rl80em"),D(s,"class","Communication incomingMessages svelte-rl80em"),D(d,"class","Communication outgoingMessages svelte-rl80em"),D(A,"class","Created svelte-rl80em")},m(y,v){F(y,e,v),R(e,i),F(y,r,v),F(y,s,v),U(o,s,null),R(s,a),R(s,u),R(u,c),F(y,f,v),F(y,d,v),U(g,d,null),R(d,m),R(d,p),R(p,O),F(y,C,v),F(y,A,v),R(A,_),R(A,L),U(I,A,null),F(y,N,v),T[x].m(y,v),F(y,he,v),fe=!0},p(y,v){(!fe||v&2)&&n!==(n=y[1].code+"")&&se(i,n),(!fe||v&2)&&l!==(l=y[1].messagegroupsIn+"")&&se(c,l),(!fe||v&2)&&b!==(b=y[1].messagegroupsOut+"")&&se(O,b);const K={};v&2&&(K.data=y[1].datecreated),v&4&&(K.format=y[2]),I.$set(K);let B=x;x=k(y,v),x===B?T[x].p(y,v):(ue(),S(T[B],1,1,()=>{T[B]=null}),ce(),V=T[x],V?V.p(y,v):(V=T[x]=E[x](y),V.c()),w(V,1),V.m(he.parentNode,he))},i(y){fe||(w(o.$$.fragment,y),w(g.$$.fragment,y),w(I.$$.fragment,y),w(V),fe=!0)},o(y){S(o.$$.fragment,y),S(g.$$.fragment,y),S(I.$$.fragment,y),S(V),fe=!1},d(y){y&&M(e),y&&M(r),y&&M(s),J(o),y&&M(f),y&&M(d),J(g),y&&M(C),y&&M(A),J(I),y&&M(N),T[x].d(y),y&&M(he)}}}function Es(t){let e,n;return e=new Rt({props:{className:t[0],$$slots:{default:[$s]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.className=i[0]),r&38&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Is(t,e,n){let i;ie(t,Qe,u=>n(4,i=u));let{className:r="importanceColumn"}=e,{row:s}=e,{format:o="YYYY-MM-DD HH:mm:ss"}=e;const a=i("Created");return t.$$set=u=>{"className"in u&&n(0,r=u.className),"row"in u&&n(1,s=u.row),"format"in u&&n(2,o=u.format)},[r,s,o,a]}class Ks extends te{constructor(e){super(),j(this,e,Is,Es,X,{className:0,row:1,format:2},Fs)}}const Bs={a:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},c:'<path d="M19.5 12.473c0-1.948-.618-3.397-2.066-4.844-.391-.39-1.023-.39-1.414 0-.391.391-.391 1.024 0 1.415 1.079 1.078 1.48 2.007 1.48 3.429 0 1.469-.572 2.85-1.611 3.888-1.004 1.003-2.078 1.502-3.428 1.593l1.246-1.247c.391-.391.391-1.023 0-1.414s-1.023-.391-1.414 0l-3.707 3.707 3.707 3.707c.195.195.451.293.707.293s.512-.098.707-.293c.391-.391.391-1.023 0-1.414l-1.337-1.336c1.923-.082 3.542-.792 4.933-2.181 1.417-1.416 2.197-3.299 2.197-5.303zM6.5 12.5c0-1.469.572-2.85 1.611-3.889 1.009-1.009 2.092-1.508 3.457-1.594l-1.275 1.275c-.391.391-.391 1.023 0 1.414.195.196.451.294.707.294s.512-.098.707-.293l3.707-3.707-3.707-3.707c-.391-.391-1.023-.391-1.414 0s-.391 1.023 0 1.414l1.311 1.311c-1.914.086-3.525.796-4.907 2.179-1.417 1.416-2.197 3.299-2.197 5.303 0 1.948.618 3.397 2.066 4.844.195.195.451.292.707.292s.512-.098.707-.293c.391-.391.391-1.024 0-1.415-1.079-1.077-1.48-2.006-1.48-3.428z"></path>'};function xs(t){re(t,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function Vs(t){let e,n,i,r,s;const o=t[4].default,a=Ge(o,t,t[3],null);return{c(){e=z("button"),a&&a.c(),D(e,"class",n=Te(t[0])+" svelte-10fvxzv")},m(u,l){F(u,e,l),a&&a.m(e,null),i=!0,r||(s=ge(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!i||l&8)&&Ee(a,o,u,u[3],i?$e(o,u[3],l,null):Ie(u[3]),null),(!i||l&1&&n!==(n=Te(u[0])+" svelte-10fvxzv"))&&D(e,"class",n)},i(u){i||(w(a,u),i=!0)},o(u){S(a,u),i=!1},d(u){u&&M(e),a&&a.d(u),r=!1,s()}}}function Js(t,e,n){let{$$slots:i={},$$scope:r}=e,{onAction:s=()=>{}}=e,{className:o=""}=e;function a(){s()}return t.$$set=u=>{"onAction"in u&&n(2,s=u.onAction),"className"in u&&n(0,o=u.className),"$$scope"in u&&n(3,r=u.$$scope)},[o,a,s,r,i]}class en extends te{constructor(e){super(),j(this,e,Js,Vs,X,{onAction:2,className:0},xs)}}function Hs(t){re(t,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function Us(t){let e,n,i=t[0]("Change filter")+"",r,s;return e=new Me({props:{className:"FilterIcon",iconVariable:"la-tune"}}),{c(){W(e.$$.fragment),n=Y(),r=ne(i)},m(o,a){U(e,o,a),F(o,n,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&i!==(i=o[0]("Change filter")+"")&&se(r,i)},i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){S(e.$$.fragment,o),s=!1},d(o){J(e,o),o&&M(n),o&&M(r)}}}function Ws(t){let e,n,i=t[0]("Configure chat button")+"",r,s;return e=new Me({props:{className:"ConfigureIcon",iconVariable:"la-configuration"}}),{c(){W(e.$$.fragment),n=Y(),r=ne(i)},m(o,a){U(e,o,a),F(o,n,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&i!==(i=o[0]("Configure chat button")+"")&&se(r,i)},i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){S(e.$$.fragment,o),s=!1},d(o){J(e,o),o&&M(n),o&&M(r)}}}function Ys(t){let e,n,i,r,s,o=t[0]("No tickets found")+"",a,u,l,c=t[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",f,d,g,m,p,b,O;return m=new en({props:{className:"Filter",$$slots:{default:[Us]},$$scope:{ctx:t}}}),b=new en({props:{className:"Configure",$$slots:{default:[Ws]},$$scope:{ctx:t}}}),{c(){e=z("div"),n=z("img"),r=Y(),s=z("h1"),a=ne(o),u=Y(),l=z("p"),f=ne(c),d=Y(),g=z("div"),W(m.$$.fragment),p=Y(),W(b.$$.fragment),D(n,"alt","No results placeholder"),ht(n.src,i="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||D(n,"src",i),D(n,"class","svelte-19qi61t"),D(s,"class","svelte-19qi61t"),D(l,"class","svelte-19qi61t"),D(g,"class","Buttons"),D(e,"class","NoTickets svelte-19qi61t")},m(C,A){F(C,e,A),R(e,n),R(e,r),R(e,s),R(s,a),R(e,u),R(e,l),R(l,f),R(e,d),R(e,g),U(m,g,null),R(g,p),U(b,g,null),O=!0},p(C,[A]){(!O||A&1)&&o!==(o=C[0]("No tickets found")+"")&&se(a,o),(!O||A&1)&&c!==(c=C[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&se(f,c);const _={};A&3&&(_.$$scope={dirty:A,ctx:C}),m.$set(_);const L={};A&3&&(L.$$scope={dirty:A,ctx:C}),b.$set(L)},i(C){O||(w(m.$$.fragment,C),w(b.$$.fragment,C),O=!0)},o(C){S(m.$$.fragment,C),S(b.$$.fragment,C),O=!1},d(C){C&&M(e),J(m),J(b)}}}function qs(t,e,n){let i;return ie(t,Qe,r=>n(0,i=r)),[i]}class Ps extends te{constructor(e){super(),j(this,e,qs,Ys,X,{},Hs)}}function Qs(t){re(t,"svelte-150fgq2","main.svelte-150fgq2{height:100%;display:flex;flex-direction:column}.tools.svelte-150fgq2{display:flex;align-items:center;justify-content:right;padding:0 30px}button.svelte-150fgq2{border:none;background:none;padding:0;margin:0;height:20px;width:20px}.loading.svelte-150fgq2{animation-name:svelte-150fgq2-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-150fgq2-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}")}function Zs(t){let e,n;return e=new Fi({props:{columns:t[4],data:t[9],loadMore:t[15],middleclickhandler:t[1],selectedAll:t[8]}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r[0]&16&&(s.columns=i[4]),r[0]&2&&(s.middleclickhandler=i[1]),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Xs(t){let e,n;return e=new Ps({}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p:H,i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function js(t){let e,n,i,r,s,o,a,u,l,c,f,d,g,m;const p=t[21].default,b=Ge(p,t,t[20],null);r=new _r({props:{cursor:t[14],data:t[9],filter:t[0]}}),a=new rt({props:{size:"20px",src:Bs}});const O=[Xs,Zs],C=[];function A(_,L){return!_[6]&&!_[5]?0:1}return c=A(t),f=C[c]=O[c](t),{c(){e=z("main"),n=z("div"),b&&b.c(),i=Y(),W(r.$$.fragment),s=Y(),o=z("button"),W(a.$$.fragment),l=Y(),f.c(),D(o,"title",u=t[3]("Reload")),D(o,"class","svelte-150fgq2"),we(o,"loading",t[5]),D(n,"class","tools svelte-150fgq2"),D(e,"class","svelte-150fgq2")},m(_,L){F(_,e,L),R(e,n),b&&b.m(n,null),R(n,i),U(r,n,null),R(n,s),R(n,o),U(a,o,null),R(e,l),C[c].m(e,null),d=!0,g||(m=ge(o,"click",t[22]),g=!0)},p(_,L){b&&b.p&&(!d||L[0]&1048576)&&Ee(b,p,_,_[20],d?$e(p,_[20],L,null):Ie(_[20]),null);const I={};L[0]&1&&(I.filter=_[0]),r.$set(I),(!d||L[0]&8&&u!==(u=_[3]("Reload")))&&D(o,"title",u),(!d||L[0]&32)&&we(o,"loading",_[5]);let N=c;c=A(_),c===N?C[c].p(_,L):(ue(),S(C[N],1,1,()=>{C[N]=null}),ce(),f=C[c],f?f.p(_,L):(f=C[c]=O[c](_),f.c()),w(f,1),f.m(e,null))},i(_){d||(w(b,_),w(r.$$.fragment,_),w(a.$$.fragment,_),w(f),d=!0)},o(_){S(b,_),S(r.$$.fragment,_),S(a.$$.fragment,_),S(f),d=!1},d(_){_&&M(e),b&&b.d(_),J(r),J(a),C[c].d(),g=!1,m()}}}function eo(t,e,n){let i,r,s,o,a,u,l=H,c=()=>(l(),l=pe(I,$=>n(28,u=$)),I),f,d,g,m;ie(t,Qe,$=>n(3,g=$)),t.$$.on_destroy.push(()=>l());let{$$slots:p={},$$scope:b}=e,O,{apikey:C}=e,{filters:A}=e,{middleclickhandler:_}=e,{selectionHandler:L}=e;const I=Tt("");c();let N=ae({});ie(t,N,$=>n(19,d=$));let q=ae(!1);ie(t,q,$=>n(18,f=$));let x=new gr(C);x.load(),be("tagsMap",x.tags);let V=ae(null);be("error",V);const he=new At({apiKey:C,basePath:u||"https://hosted.la.localhost/LiveAgent/server/api/v3"}),fe=new mn(he);be("api",fe);const E=ae([]);ie(t,E,$=>n(25,s=$));const T=ae(!1);ie(t,T,$=>n(6,m=$)),be("data",E);const k=ae(dr.Rorder);ie(t,k,$=>n(26,o=$));const y=ae(!0);ie(t,y,$=>n(27,a=$));const v=ae(!1);ie(t,v,$=>n(5,i=$)),be("loading",v);const K=ae(null);ie(t,K,$=>n(24,r=$)),be("cursor",K);let B=!1,P=()=>({perPage:20,sortDir:a?Pt.Asc:Pt.Desc,filters:A,sortField:o,cursor:r||""}),Z=async($=!1)=>{if(!i&&!(!r&&B&&!$)){Ce(v,i=!0,i),$===!0&&(Ce(K,r=null,r),B=!1);try{const de=await(await fe.getTicketsGridDatasetRaw(P())).value();$===!0&&Ce(E,s=[],s),Ce(E,s=s.concat(de.rows),s),de.rows.length>0&&T.set(!0),Ce(K,r=de.cursor,r),B=!0}catch(oe){V.set(oe.toString())}Ce(v,i=!1,i)}};y.subscribe(async()=>{await Z(!0)}),k.subscribe(async()=>{await Z(!0)}),be("direction",y),be("sort",k),E.subscribe($=>{N.set($.filter(oe=>oe.__selected??!1).map(oe=>oe.conversationid))});const ee=()=>Z(!0);return t.$$set=$=>{"apikey"in $&&n(16,C=$.apikey),"filters"in $&&n(0,A=$.filters),"middleclickhandler"in $&&n(1,_=$.middleclickhandler),"selectionHandler"in $&&n(17,L=$.selectionHandler),"$$scope"in $&&n(20,b=$.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8&&n(4,O=ae([new dt(g("User"),Pr,!1),new dt(g("Status"),_s,!1),new dt(g("Importance"),Ks,!0)])),t.$$.dirty[0]&917504&&L(d,f),t.$$.dirty[0]&1&&A&&Z(!0)},[A,_,I,g,O,i,m,N,q,E,T,k,y,v,K,Z,C,L,f,d,b,p,ee]}class to extends te{constructor(e){super(),j(this,e,eo,js,X,{apikey:16,filters:0,middleclickhandler:1,selectionHandler:17,basePath:2},Qs,[-1,-1])}get basePath(){return this.$$.ctx[2]}}const no="modulepreload",io=function(t){return"/"+t},tn={},nn=function(e,n,i){if(!n||n.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=io(s),s in tn)return;tn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!i)for(let c=r.length-1;c>=0;c--){const f=r[c];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":no,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())};function ro(){Wt("en",()=>nn(()=>import("./en.js"),[])),Wt("sk",()=>nn(()=>import("./sk.js"),[]))}function rn(t){let e,n;return e=new to({props:{apikey:t[0],filters:t[1],middleclickhandler:t[2],selectionHandler:t[5],$$slots:{default:[so]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(i,r){U(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.apikey=i[0]),r&2&&(s.filters=i[1]),r&4&&(s.middleclickhandler=i[2]),r&1024&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(w(e.$$.fragment,i),n=!0)},o(i){S(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function so(t){let e;return{c(){e=z("slot")},m(n,i){F(n,e,i)},p:H,d(n){n&&M(e)}}}function oo(t){let e,n,i,r,s=t[0]&&rn(t);return{c(){s&&s.c(),e=Y(),n=z("link"),this.c=H,D(n,"rel","stylesheet"),D(n,"href",i=t[4]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),F(o,e,a),F(o,n,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&w(s,1)):(s=rn(o),s.c(),w(s,1),s.m(e.parentNode,e)):s&&(ue(),S(s,1,1,()=>{s=null}),ce()),(!r||a&16&&i!==(i=o[4]+"/themes/agent/_common_templates/icons_mapping.css"))&&D(n,"href",i)},i(o){r||(w(s),r=!0)},o(o){S(s),r=!1},d(o){s&&s.d(o),o&&M(e),o&&M(n)}}}function ao(t,e,n){let i,r=H,s=()=>(r(),r=pe(g,p=>n(4,i=p)),g);t.$$.on_destroy.push(()=>r()),ro();let{lang:o="sk"}=e,{apikey:a}=e,{filters:u='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=e,{middleclickhandler:l}=e,{selectionhandler:c}=e,{selectionMap:f={}}=e,{selectedAll:d=!1}=e;const g=Tt("");s(),bi({initialLocale:o,fallbackLocale:"en"}),Ci();function m(p,b){n(6,f=p),n(7,d=b),c&&c(p,b)}return t.$$set=p=>{"lang"in p&&n(8,o=p.lang),"apikey"in p&&n(0,a=p.apikey),"filters"in p&&n(1,u=p.filters),"middleclickhandler"in p&&n(2,l=p.middleclickhandler),"selectionhandler"in p&&n(9,c=p.selectionhandler),"selectionMap"in p&&n(6,f=p.selectionMap),"selectedAll"in p&&n(7,d=p.selectedAll)},[a,u,l,g,i,m,f,d,o,c]}class lo extends un{constructor(e){super(),j(this,{target:this.shadowRoot,props:$n(this.attributes),customElement:!0},ao,oo,X,{lang:8,apikey:0,filters:1,middleclickhandler:2,selectionhandler:9,selectionMap:6,selectedAll:7,basePath:3},null),e&&(e.target&&F(e.target,this,e.anchor),e.props&&(this.$set(e.props),ve()))}static get observedAttributes(){return["lang","apikey","filters","middleclickhandler","selectionhandler","selectionMap","selectedAll","basePath"]}get lang(){return this.$$.ctx[8]}set lang(e){this.$$set({lang:e}),ve()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),ve()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),ve()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),ve()}get selectionhandler(){return this.$$.ctx[9]}set selectionhandler(e){this.$$set({selectionhandler:e}),ve()}get selectionMap(){return this.$$.ctx[6]}set selectionMap(e){this.$$set({selectionMap:e}),ve()}get selectedAll(){return this.$$.ctx[7]}set selectedAll(e){this.$$set({selectedAll:e}),ve()}get basePath(){return this.$$.ctx[3]}}customElements.define("tickets-table",lo);
@@ -0,0 +1 @@
1
+ const e={Reload:"Nacitaj",Done:"Hotovo",Edit:"Uprav","Date changed":"Datum zmeny","No results match your filter. Try broadening the search criteria.":"Vášmu filtru nezodpovedajú žiadne výsledky. Pokúste sa rozšíriť vyhľadávanie."};export{e as default};
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite + Svelte + TS</title>
8
+ <script type="module" crossorigin src="/assets/index.js"></script>
9
+ </head>
10
+ <body style="height: 500px;">
11
+ <tickets-table apikey="S_j5rpz8qvmtzx70fymhbb09nvhpk1yrr3">
12
+ <input type="search" placeholder="hladaj">
13
+ </tickets-table>
14
+
15
+ </body>
16
+ </html>
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@qualityunit/liveagent-ticket-grid",
3
+ "private": false,
4
+ "version": "0.0.1",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview",
10
+ "check": "svelte-check --tsconfig ./tsconfig.json"
11
+ },
12
+ "files": [
13
+ "dist/"
14
+ ],
15
+ "devDependencies": {
16
+ "@sveltejs/vite-plugin-svelte": "^2.0.4",
17
+ "@tsconfig/svelte": "^4.0.1",
18
+ "svelte": "^3.58.0",
19
+ "svelte-check": "^3.3.1",
20
+ "svelte-time": "^0.7.2",
21
+ "tslib": "^2.5.0",
22
+ "typescript": "^5.0.2",
23
+ "vite": "^4.3.9"
24
+ },
25
+ "dependencies": {
26
+ "@qualityunit/liveagent-api": "^0.0.4",
27
+ "blueimp-md5": "^2.19.0",
28
+ "md5": "^2.3.0",
29
+ "svelte-avatar": "^1.2.0",
30
+ "svelte-icons-pack": "^2.1.0",
31
+ "svelte-intl-precompile": "^0.12.1"
32
+ },
33
+ "description": "Ticket grid component for LiveAgent",
34
+ "main": "svelte.config.js",
35
+ "author": "QualityUnit",
36
+ "license": "ISC"
37
+ }
@@ -0,0 +1,7 @@
1
+ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
2
+
3
+ export default {
4
+ // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
5
+ // for more information about preprocessors
6
+ preprocess: vitePreprocess(),
7
+ }