@qualityunit/liveagent-ticket-grid 0.0.34 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.js +3 -3
- package/package.json +1 -1
package/dist/assets/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var Fn=Object.defineProperty;var An=(t,e,i)=>e in t?Fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ge=(t,e,i)=>(An(t,typeof e!="symbol"?e+"":e,i),i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function Q(){}function at(t,e){for(const i in e)t[i]=e[i];return t}function on(t){return t()}function At(){return Object.create(null)}function Ce(t){t.forEach(on)}function Ct(t){return typeof t=="function"}function q(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let rt;function _t(t,e){return t===e?!0:(rt||(rt=document.createElement("a")),rt.href=e,t===rt.href)}function Gn(t){return Object.keys(t).length===0}function an(t,...e){if(t==null){for(const n of e)n(void 0);return Q}const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function he(t){let e;return an(t,i=>e=i)(),e}function re(t,e,i){t.$$.on_destroy.push(an(e,i))}function Ie(t,e,i,n){if(t){const r=ln(t,e,i,n);return t[0](r)}}function ln(t,e,i,n){return t[1]&&n?at(i.ctx.slice(),t[1](n(e))):i.ctx}function Be(t,e,i,n){if(t[2]&&n){const r=t[2](n(i));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function Ke(t,e,i,n,r,s){if(r){const o=ln(e,i,n,s);t.p(o,r)}}function Je(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let n=0;n<i;n++)e[n]=-1;return e}return-1}function zn(t){const e={};for(const i in t)i[0]!=="$"&&(e[i]=t[i]);return e}function Gt(t,e){const i={};e=new Set(e);for(const n in t)!e.has(n)&&n[0]!=="$"&&(i[n]=t[n]);return i}function fe(t){return t??""}function un(t,e,i){return t.set(i),e}const En=["",!0,1,"true","contenteditable"];function y(t,e){t.appendChild(e)}function oe(t,e,i){const n=Mn(t);if(!n.getElementById(e)){const r=k("style");r.id=e,r.textContent=i,In(n,r)}}function Mn(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function In(t,e){return y(t.head||t,e),e.sheet}function N(t,e,i){t.insertBefore(e,i||null)}function D(t){t.parentNode&&t.parentNode.removeChild(t)}function Lt(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function k(t){return document.createElement(t)}function se(t){return document.createTextNode(t)}function U(){return se(" ")}function tt(){return se("")}function ae(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function yt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function v(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const Bn=["width","height"];function zt(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:i[n]&&i[n].set&&Bn.indexOf(n)===-1?t[n]=e[n]:v(t,n,e[n])}function Kn(t){return Array.from(t.childNodes)}function le(t,e){e=""+e,t.data!==e&&(t.data=e)}function Jn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Un(t,e,i){~En.indexOf(i)?Jn(t,e):le(t,e)}function Et(t,e){t.value=e??""}function mt(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function Mt(t,e,i){t.classList.toggle(e,!!i)}function Wn(t,e,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:i,cancelable:n})}function Hn(t){const e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}let qe;function Ve(t){qe=t}function cn(){if(!qe)throw new Error("Function called outside component initialization");return qe}function ct(t){cn().$$.on_mount.push(t)}function dn(){const t=cn();return(e,i,{cancelable:n=!1}={})=>{const r=t.$$.callbacks[e];if(r){const s=Wn(e,i,{cancelable:n});return r.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}const Re=[],ze=[];let Ae=[];const It=[],Yn=Promise.resolve();let bt=!1;function Pn(){bt||(bt=!0,Yn.then(Se))}function wt(t){Ae.push(t)}const pt=new Set;let Oe=0;function Se(){if(Oe!==0)return;const t=qe;do{try{for(;Oe<Re.length;){const e=Re[Oe];Oe++,Ve(e),Vn(e.$$)}}catch(e){throw Re.length=0,Oe=0,e}for(Ve(null),Re.length=0,Oe=0;ze.length;)ze.pop()();for(let e=0;e<Ae.length;e+=1){const i=Ae[e];pt.has(i)||(pt.add(i),i())}Ae.length=0}while(Re.length);for(;It.length;)It.pop()();bt=!1,pt.clear(),Ve(t)}function Vn(t){if(t.fragment!==null){t.update(),Ce(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(wt)}}function Qn(t){const e=[],i=[];Ae.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),Ae=e}const st=new Set;let De;function _e(){De={r:0,c:[],p:De}}function ye(){De.r||Ce(De.c),De=De.p}function b(t,e){t&&t.i&&(st.delete(t),t.i(e))}function $(t,e,i,n){if(t&&t.o){if(st.has(t))return;st.add(t),De.c.push(()=>{st.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function Ee(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Zn(t,e){const i={},n={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(n[u]=1);for(const u in a)r[u]||(i[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in n)o in i||(i[o]=void 0);return i}function I(t){t&&t.c()}function E(t,e,i){const{fragment:n,after_update:r}=t.$$;n&&n.m(e,i),wt(()=>{const s=t.$$.on_mount.map(on).filter(Ct);t.$$.on_destroy?t.$$.on_destroy.push(...s):Ce(s),t.$$.on_mount=[]}),r.forEach(wt)}function M(t,e){const i=t.$$;i.fragment!==null&&(Qn(i.after_update),Ce(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function Xn(t,e){t.$$.dirty[0]===-1&&(Re.push(t),Pn(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ee(t,e,i,n,r,s,o=null,a=[-1]){const u=qe;Ve(t);const l=t.$$={fragment:null,ctx:[],props:s,update:Q,not_equal:r,bound:At(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:At(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(t,e.props||{},(d,f,...h)=>{const p=h.length?h[0]:f;return l.ctx&&r(l.ctx[d],l.ctx[d]=p)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](p),c&&Xn(t,d)),f}):[],l.update(),c=!0,Ce(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const d=Kn(e.target);l.fragment&&l.fragment.l(d),d.forEach(D)}else l.fragment&&l.fragment.c();e.intro&&b(t.$$.fragment),E(t,e.target,e.anchor),Se()}Ve(u)}let fn;typeof HTMLElement=="function"&&(fn=class extends HTMLElement{constructor(e,i,n){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(e,i,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){const r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,n)}removeEventListener(e,i,n){if(super.removeEventListener(e,i,n),this.$$c){const r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return()=>{let a;return{c:function(){a=k("slot"),o!=="default"&&v(a,"name",o)},m:function(c,d){N(c,a,d)},d:function(c){c&&D(a)}}}};var e=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Hn(this);for(const o of this.$$s)o in r&&(n[o]=[i(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=ot(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=ot(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const a of this.$$l[o]){const u=this.$$c.$on(o,a);this.$$l_u.set(a,u)}this.$$l={}}}attributeChangedCallback(e,i,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ot(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function ot(t,e,i,n){var s;const r=(s=i[t])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!i[t])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function qn(t,e,i,n,r,s){let o=class extends fn{constructor(){super(t,i,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var l;u=ot(a,u,e),this.$$d[a]=u,(l=this.$$c)==null||l.$set({[a]:u})}})}),n.forEach(a=>{Object.defineProperty(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),s&&(o=s(o)),t.element=o,o}class te{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){M(this,1),this.$destroy=Q}$on(e,i){if(!Ct(i))return Q;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Gn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const jn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(jn);function ei(t){oe(t,"svelte-uqg1eo",".Icon.svelte-uqg1eo:before{font-family:'la-icon-font';display:inline-block;margin:0;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function ti(t){let e,i;return{c(){e=k("span"),v(e,"class",i=fe(`Icon ${t[0]} ${t[1]}`)+" svelte-uqg1eo")},m(n,r){N(n,e,r)},p(n,[r]){r&3&&i!==(i=fe(`Icon ${n[0]} ${n[1]}`)+" svelte-uqg1eo")&&v(e,"class",i)},i:Q,o:Q,d(n){n&&D(e)}}}function ni(t,e,i){let{className:n=""}=e,{iconLaClassName:r}=e;return t.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class $e extends te{constructor(e){super(),ee(this,e,ni,ti,q,{className:0,iconLaClassName:1},ei)}}const xe=[];function ce(t,e=Q){let i;const n=new Set;function r(a){if(q(t,a)&&(t=a,i)){const u=!xe.length;for(const l of n)l[1](),xe.push(l,t);if(u){for(let l=0;l<xe.length;l+=2)xe[l][0](xe[l+1]);xe.length=0}}}function s(a){r(a(t))}function o(a,u=Q){const l=[a,u];return n.add(l),n.size===1&&(i=e(r,s)||Q),a(t),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}var Fe=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};const ii="https://localhost/api/v3".replace(/\/+$/,"");class St{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:ii}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||gn}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:()=>Fe(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const ri=new St;class dt{constructor(e=ri){this.configuration=e,this.fetchApi=(i,n)=>Fe(this,void 0,void 0,function*(){let r={url:i,init:n};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new li(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const i=this.clone();return i.middleware=i.middleware.concat(...e),i}withPreMiddleware(...e){const i=e.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...e){const i=e.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(e){return e?dt.jsonRegex.test(e):!1}request(e,i){return Fe(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(e,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new ai(s,"Response returned an error code")})}createFetchParams(e,i){return Fe(this,void 0,void 0,function*(){let n=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Fe(this,void 0,void 0,function*(){return i}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:oi(a.body)||a.body instanceof URLSearchParams||si(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const e=this.constructor,i=new e(this.configuration);return i.middleware=this.middleware.slice(),i}}dt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function si(t){return typeof Blob<"u"&&t instanceof Blob}function oi(t){return typeof FormData<"u"&&t instanceof FormData}class ai extends Error{constructor(e,i){super(i),this.response=e,this.name="ResponseError"}}class li extends Error{constructor(e,i){super(i),this.cause=e,this.name="FetchError"}}class Bt extends Error{constructor(e,i){super(i),this.field=e,this.name="RequiredError"}}function g(t,e){const i=t[e];return i!=null}function gn(t,e=""){return Object.keys(t).map(i=>hn(i,t[i],e)).filter(i=>i.length>0).join("&")}function hn(t,e,i=""){const n=i+(i.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(e instanceof Set){const r=Array.from(e);return hn(t,r,i)}return e instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?gn(e,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(e))}`}class j{constructor(e,i=n=>n){this.raw=e,this.transformer=i}value(){return Fe(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function ui(t){return ci(t)}function ci(t,e){return t==null?t:{departmentid:g(t,"departmentid")?t.departmentid:void 0,onlineStatus:g(t,"online_status")?t.online_status:void 0,presetStatus:g(t,"preset_status")?t.preset_status:void 0}}function di(t){return fi(t)}function fi(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,username:g(t,"username")?t.username:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,roleid:g(t,"roleid")?t.roleid:void 0,departmentsStatuses:g(t,"departments_statuses")?t.departments_statuses.map(ui):void 0,twofa:g(t,"twofa")?t.twofa:void 0,lastPswdChange:g(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0}}function gi(t){return hi(t)}function hi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,status:g(t,"status")?t.status:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,rstatus:g(t,"rstatus")?t.rstatus:void 0,statusdatestarted:g(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:g(t,"chat_order")?t.chat_order:void 0}}function mi(t){return pi(t)}function pi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,onlineCode:g(t,"online_code")?t.online_code:void 0,offlineCode:g(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:g(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:g(t,"offline_code_css")?t.offline_code_css:void 0,provide:g(t,"provide")?t.provide:void 0,impressions:g(t,"impressions")?t.impressions:void 0,tickets:g(t,"tickets")?t.tickets:void 0,status:g(t,"status")?t.status:void 0,lastDisplayTime:g(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:g(t,"last_display_url")?t.last_display_url:void 0}}function pe(t){return vi(t)}function vi(t,e){return t==null?t:{count:g(t,"count")?t.count:void 0}}function _i(t){return yi(t)}function yi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,agentCount:g(t,"agent_count")?t.agent_count:void 0}}function bi(t){return wi(t)}function wi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,logid:g(t,"logid")?t.logid:void 0,line:g(t,"line")?t.line:void 0,filename:g(t,"filename")?t.filename:void 0,created:g(t,"created")?t.created:void 0,level:g(t,"level")?t.level:void 0,type:g(t,"type")?t.type:void 0,message:g(t,"message")?t.message:void 0,ip:g(t,"ip")?t.ip:void 0,groupid:g(t,"groupid")?t.groupid:void 0}}function ki(t){return $i(t)}function $i(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,chats:g(t,"chats")?t.chats:void 0}}function Ti(t){return Ci(t)}function Ci(t,e){return t==null?t:{name:g(t,"name")?t.name:void 0,code:g(t,"code")?t.code:void 0,engName:g(t,"eng_name")?t.eng_name:void 0,translated:g(t,"translated")?t.translated:void 0,isDefault:g(t,"is_default")?t.is_default:void 0,active:g(t,"active")?t.active:void 0,isCustom:g(t,"is_custom")?t.is_custom:void 0,isBuiltIn:g(t,"is_builtIn")?t.is_builtIn:void 0}}function Li(t){return Si(t)}function Si(t,e){return t==null?t:{codeName:g(t,"code_name")?t.code_name:void 0,name:g(t,"name")?t.name:void 0,description:g(t,"description")?t.description:void 0,active:g(t,"active")?t.active:void 0,help:g(t,"help")?t.help:void 0,multiple:g(t,"multiple")?t.multiple:void 0,configFile:g(t,"config_file")?t.config_file:void 0,price:g(t,"price")?t.price:void 0,legacyIntegration:g(t,"legacy_integration")?t.legacy_integration:void 0}}function vt(t){return Di(t)}function Di(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,slaTicketId:g(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,departmentName:g(t,"department_name")?t.department_name:void 0,levelid:g(t,"levelid")?t.levelid:void 0,slaLevelName:g(t,"sla_level_name")?t.sla_level_name:void 0,sla:g(t,"sla")?t.sla:void 0,dateCreated:g(t,"date_created")?t.date_created:void 0,dateClosed:g(t,"date_closed")?t.date_closed:void 0,dateDue:g(t,"date_due")?t.date_due:void 0,slaLevelId:g(t,"sla_level_id")?t.sla_level_id:void 0,slaType:g(t,"sla_type")?new Date(t.sla_type):void 0,agentid:g(t,"agentid")?t.agentid:void 0,agentFirstname:g(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:g(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:g(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:g(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:g(t,"req_firstname")?t.req_firstname:void 0,reqLastname:g(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:g(t,"req_systemname")?t.req_systemname:void 0,reqContactName:g(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:g(t,"req_avatar_url")?t.req_avatar_url:void 0}}function Kt(t){return Ni(t)}function Ni(t,e){return t==null?t:{tagid:g(t,"tagid")?t.tagid:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,color:g(t,"color")?t.color:void 0,backgroundcolor:g(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:g(t,"is_public")?t.is_public:void 0}}function mn(t){return Oi(t)}function Oi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,datecreated:g(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:g(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:g(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:g(t,"rorder")?t.rorder:void 0,datedue:g(t,"datedue")?new Date(t.datedue):void 0,datereopen:g(t,"datereopen")?new Date(t.datereopen):void 0,status:g(t,"status")?t.status:void 0,channelType:g(t,"channel_type")?t.channel_type:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,agentid:g(t,"agentid")?t.agentid:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,messagegroupsIn:g(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:g(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:g(t,"contactid")?t.contactid:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,phones:g(t,"phones")?t.phones:void 0,jobPosition:g(t,"job_position")?t.job_position:void 0,contactType:g(t,"contact_type")?t.contact_type:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,timeOffset:g(t,"time_offset")?t.time_offset:void 0,gender:g(t,"gender")?t.gender:void 0,levelid:g(t,"levelid")?t.levelid:void 0,groups:g(t,"groups")?t.groups:void 0,contactStatus:g(t,"contact_status")?t.contact_status:void 0,company:g(t,"company")?t.company:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,userid:g(t,"userid")?t.userid:void 0,roleid:g(t,"roleid")?t.roleid:void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0,accountuserstatus:g(t,"accountuserstatus")?t.accountuserstatus:void 0,description:g(t,"description")?t.description:void 0,note:g(t,"note")?t.note:void 0,lastActivity:g(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:g(t,"tagnames")?t.tagnames:void 0,groupnames:g(t,"groupnames")?t.groupnames:void 0}}function xi(t){return Ri(t)}function Ri(t,e){return t==null?t:{cursor:g(t,"cursor")?t.cursor:void 0,rows:g(t,"rows")?t.rows.map(mn):void 0}}function Fi(t){return Ai(t)}function Ai(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,agentid:g(t,"agentid")?t.agentid:void 0,agent:g(t,"agent")?t.agent:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,ticket:g(t,"ticket")?t.ticket:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,company:g(t,"company")?t.company:void 0,contactid:g(t,"contactid")?t.contactid:void 0,customer:g(t,"customer")?t.customer:void 0,customerFirstname:g(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:g(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:g(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:g(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:g(t,"reportdate")?t.reportdate:void 0,reportedtime:g(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:g(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:g(t,"spenttime")?t.spenttime:void 0,dateinvoiced:g(t,"dateinvoiced")?t.dateinvoiced:void 0,note:g(t,"note")?t.note:void 0,type:g(t,"type")?t.type:void 0}}var F=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};class pn extends dt{getAgentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(di))})}getAgentsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,i)).value()})}getAgentsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getAgentsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,i)).value()})}getCallsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getCallsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,i)).value()})}getCallsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getCallsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,i)).value()})}getChatsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(gi))})}getChatsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,i)).value()})}getChatsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,i)).value()})}getChatsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getChatsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,i)).value()})}getChatsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,i)).value()})}getContactWidgetsCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getContactWidgetsCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,i)).value()})}getContactWidgetsListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mi))})}getContactWidgetsList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,i)).value()})}getCustomerGroupsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getCustomerGroupsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,i)).value()})}getDepartmensGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getDepartmensGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,i)).value()})}getDepartmentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_i))})}getDepartmentsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,i)).value()})}getEventLogsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(bi))})}getEventLogsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,i)).value()})}getEventLogsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getEventLogsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,i)).value()})}getInviteAgentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Bt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(ki))})}getInviteAgentsGridList(e,i){return F(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,i)).value()})}getLanguagesGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ti))})}getLanguagesGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,i)).value()})}getLanguagesGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getLanguagesGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,i)).value()})}getPlugindGridListRaw(e,i){return F(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Bt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.pluginPurpose!==void 0&&(n.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Li))})}getPlugindGridList(e,i){return F(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,i)).value()})}getTagsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getTagsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,i)).value()})}getTicketsGridDatasetRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:n},i);return new j(s,o=>xi(o))})}getTicketsGridDataset(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,i)).value()})}getTicketsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mn))})}getTicketsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,i)).value()})}getTicketsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,i)).value()})}getTicketsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getTicketsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,i)).value()})}getTicketsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,i)).value()})}getTimeReportsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.sortField!==void 0&&(n._sortField=e.sortField),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Fi))})}getTimeReportsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,i)).value()})}getTimeReportsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTimeReportsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,i)).value()})}}const Jt={Asc:"ASC",Desc:"DESC"},He={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"},Gi={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"},Qe=ce(!1),vn=ce([]),lt=ce(null),je=ce(null),Ge=ce(!1),Ze=ce(!1),zi=ce({}),ve=ce([]),_n=ce(null),Ne=ce(null),et=ce(!0),Dt=ce(Gi.Rorder),yn=ce([]);function A(t){return he(yn)[t]||t}function Ei(t){oe(t,"svelte-864uvw","span.svelte-864uvw{margin-right:5px}.Selection.svelte-864uvw{color:var(--ticket-status-chat-background);background-color:var(--menu-selected-bg);padding:6px 10px;border-radius:4px;font-size:12px;font-style:normal;font-weight:700;line-height:20px}.text.svelte-864uvw{font-family:'Roboto', sans-serif;font-size:12px;line-height:20px}.many.svelte-864uvw{color:var(--main-textcolor);padding:2px 12px;border:1px solid var(--menu-hover-bg);border-radius:4px;font-weight:700;font-size:13px;font-family:'Roboto', sans-serif;line-height:20px;cursor:pointer}.many.loading.svelte-864uvw{border:none;padding:2px 0}")}function Mi(t){let e,i=A("Displaying ")+t[6].length+" "+A("of"),n,r,s,o=(t[1]?A("Loading.."):t[0]??A("many"))+"",a,u,l,c;return{c(){e=k("span"),n=se(i),r=U(),s=k("span"),a=se(o),v(e,"class","text svelte-864uvw"),v(s,"class",u=fe(t[2])+" svelte-864uvw")},m(d,f){N(d,e,f),y(e,n),N(d,r,f),N(d,s,f),y(s,a),l||(c=ae(s,"click",t[7]),l=!0)},p(d,f){f&64&&i!==(i=A("Displaying ")+d[6].length+" "+A("of"))&&le(n,i),f&3&&o!==(o=(d[1]?A("Loading.."):d[0]??A("many"))+"")&&le(a,o),f&4&&u!==(u=fe(d[2])+" svelte-864uvw")&&v(s,"class",u)},d(d){d&&(D(e),D(r),D(s)),l=!1,c()}}}function Ii(t){let e;return{c(){e=k("span"),e.textContent=`${A("Loading...")}`,v(e,"class","text svelte-864uvw")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function Bi(t){let e;function i(s,o){return s[3]?Ui:s[4].length===1?Ji:Ki}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Ki(t){let e,i=t[4].length+" rows selected",n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" rows selected")&&le(n,i)},d(r){r&&D(e)}}}function Ji(t){let e,i=t[4].length+" row selected",n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" row selected")&&le(n,i)},d(r){r&&D(e)}}}function Ui(t){let e;function i(s,o){return s[4].length>0?Hi:Wi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Wi(t){let e;return{c(){e=k("span"),e.textContent=`${A("all rows selected")}`,v(e,"class","Selection svelte-864uvw")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function Hi(t){let e;function i(s,o){return s[4].length===1?Pi:Yi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Yi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("rows"),n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("rows"))&&le(n,i)},d(r){r&&D(e)}}}function Pi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("row"),n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("row"))&&le(n,i)},d(r){r&&D(e)}}}function Vi(t){let e;function i(s,o){return s[3]||s[4].length>0?Bi:s[5]?Ii:Mi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},i:Q,o:Q,d(s){s&&D(e),r.d(s)}}}function Qi(t,e,i){let n,r,s,o,a,u;re(t,je,p=>i(8,n=p)),re(t,lt,p=>i(9,r=p)),re(t,Qe,p=>i(3,s=p)),re(t,vn,p=>i(4,o=p)),re(t,Ge,p=>i(5,a=p)),re(t,ve,p=>i(6,u=p));let l=null,c=!1,d="many";function f(){i(0,l=null)}async function h(){i(2,d="many loading"),i(1,c=!0);let p=await r.getTicketsGridListCount({filters:n,timezoneOffset:new Date().getTimezoneOffset()});i(0,l=p.count),i(1,c=!1)}return t.$$.update=()=>{t.$$.dirty&256&&n&&f()},[l,c,d,s,o,a,u,h,n]}class Zi extends te{constructor(e){super(),ee(this,e,Qi,Vi,q,{},Ei)}}async function Me(t=!1){if(!(he(Ge)||!he(lt))&&(t&&(Ne.set(null),Ze.set(!1)),!(!he(Ne)&&he(Ze)))){Ge.set(!0);try{const i=await(await he(lt).getTicketsGridDatasetRaw(Xi())).value();t&&ve.set([]),ve.set([...he(ve),...i.rows]),Ne.set(i.cursor),Ze.set(!0)}catch(e){_n.set(e.toString())}Ge.set(!1)}}function Xi(){return{perPage:20,sortDir:he(et)?Jt.Asc:Jt.Desc,filters:he(je),sortField:he(Dt),cursor:he(Ne)?he(Ne):""}}function qi(t){oe(t,"svelte-7v4n24",".Head.svelte-7v4n24.svelte-7v4n24{display:none}.headCheckbox.svelte-7v4n24.svelte-7v4n24{width:20px}button.svelte-7v4n24.svelte-7v4n24{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-7v4n24.svelte-7v4n24{font-size:16px;cursor:pointer}.rightPanel.svelte-7v4n24.svelte-7v4n24{margin-left:auto}.Sorting.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.sortButton.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-7v4n24.svelte-7v4n24{animation-name:svelte-7v4n24-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-7v4n24-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-7v4n24.svelte-7v4n24{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin:6px 23px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif}.headCheckbox.svelte-7v4n24 input[type=checkbox].svelte-7v4n24{vertical-align:middle;cursor:pointer}}")}function ji(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-down"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function er(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-up"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function tr(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,p,w,C,m,R,Y;const J=[er,ji],O=[];function W(Z,B){return Z[2]?0:1}return l=W(t),c=O[l]=J[l](t),h=new Zi({}),C=new $e({props:{iconLaClassName:"la-refresh"}}),{c(){e=k("div"),i=k("div"),n=k("input"),r=U(),s=k("button"),o=se(t[0]),a=U(),u=k("button"),c.c(),d=U(),f=k("div"),I(h.$$.fragment),p=U(),w=k("button"),I(C.$$.fragment),v(n,"type","checkbox"),v(n,"class","svelte-7v4n24"),v(i,"class","headCheckbox svelte-7v4n24"),v(s,"class","Sorting svelte-7v4n24"),v(u,"class","sortButton svelte-7v4n24"),v(w,"class","spinner svelte-7v4n24"),v(w,"title",A("Reload")),Mt(w,"loading",t[4]),v(f,"class","rightPanel svelte-7v4n24"),v(e,"class","Head svelte-7v4n24")},m(Z,B){N(Z,e,B),y(e,i),y(i,n),n.checked=t[3],y(e,r),y(e,s),y(s,o),t[9](s),y(e,a),y(e,u),O[l].m(u,null),y(e,d),y(e,f),E(h,f,null),y(f,p),y(f,w),E(C,w,null),m=!0,R||(Y=[ae(n,"change",t[8]),ae(n,"click",t[5]),ae(s,"click",t[7]),ae(u,"click",t[10]),ae(w,"click",t[11])],R=!0)},p(Z,[B]){B&8&&(n.checked=Z[3]),(!m||B&1)&&le(o,Z[0]);let ne=l;l=W(Z),l!==ne&&(_e(),$(O[ne],1,1,()=>{O[ne]=null}),ye(),c=O[l],c||(c=O[l]=J[l](Z),c.c()),b(c,1),c.m(u,null)),(!m||B&16)&&Mt(w,"loading",Z[4])},i(Z){m||(b(c),b(h.$$.fragment,Z),b(C.$$.fragment,Z),m=!0)},o(Z){$(c),$(h.$$.fragment,Z),$(C.$$.fragment,Z),m=!1},d(Z){Z&&D(e),t[9](null),O[l].d(),M(h),M(C),R=!1,Ce(Y)}}}function nr(t,e,i){let n,r,s;re(t,et,R=>i(2,n=R)),re(t,Qe,R=>i(3,r=R)),re(t,Ge,R=>i(4,s=R));let{currentFilter:o}=e;const a=dn();let u,l,c;function d(){Qe.set(!r),ve.update(R=>R.map(Y=>({...Y,__selected:r})))}const f=()=>{un(et,n=!n,n)};function h(){u=l.getBoundingClientRect(),c=`position: absolute; top: ${u.bottom-58}px; left: ${u.left-265}px;`,a("openModal",{dialogStyles:c})}function p(){r=this.checked,Qe.set(r)}function w(R){ze[R?"unshift":"push"](()=>{l=R,i(1,l)})}const C=()=>f(),m=()=>Me(!0);return t.$$set=R=>{"currentFilter"in R&&i(0,o=R.currentFilter)},[o,l,n,r,s,d,f,h,p,w,C,m]}class ir extends te{constructor(e){super(),ee(this,e,nr,tr,q,{currentFilter:0},qi)}}function ut(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)"}}const rr=()=>{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]},sr=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 or(t){oe(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 ar(t){let e;return{c(){e=k("div"),e.textContent=`${t[10]}`,v(e,"class","innerInitials svelte-hbozhk")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function lr(t){let e,i,n,r,s,o;return{c(){e=k("div"),i=k("img"),v(i,"alt",""),v(i,"class",fe("innerImage")+" svelte-hbozhk"),_t(i.src,n=t[2])||v(i,"src",n),v(e,"class",r=fe(t[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){N(a,e,u),y(e,i),s||(o=[ae(i,"error",t[15]),ae(i,"load",t[16])],s=!0)},p(a,u){u&4&&!_t(i.src,n=a[2])&&v(i,"src",n),u&256&&r!==(r=fe(a[8]?"imageLoading":"")+" svelte-hbozhk")&&v(e,"class",r)},d(a){a&&D(e),s=!1,Ce(o)}}}function ur(t){let e,i;function n(o,a){return o[2]&&!o[7]?lr:ar}let r=n(t),s=r(t);return{c(){e=k("div"),s.c(),v(e,"aria-label",t[1]),v(e,"class","wrapper svelte-hbozhk"),v(e,"style",i=t[0]+"--borderRadius:"+(t[6]?0:t[5])+"; --size:"+t[4]+"; --bgColor:"+t[9]+"; --src:"+t[2]+"; --textColor:"+t[3]+"; --abbrLength:"+t[11])},m(o,a){N(o,e,a),s.m(e,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(e,null))),a&2&&v(e,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&v(e,"style",i)},i:Q,o:Q,d(o){o&&D(e),s.d()}}}function cr(t,e,i){let{style:n=""}=e,{name:r="Avatar"}=e,{initials:s}=e,{src:o}=e,{bgColor:a="lightGrey"}=e,{textColor:u="white"}=e,{size:l="50px"}=e,{borderRadius:c="50%"}=e,{square:d=!1}=e,{randomBgColor:f=!1}=e;const h=f?rr():a,p=s||sr(r),w=p.length;let C=!1,m=!0;const R=()=>i(7,C=!0),Y=()=>i(8,m=!1);return t.$$set=J=>{"style"in J&&i(0,n=J.style),"name"in J&&i(1,r=J.name),"initials"in J&&i(12,s=J.initials),"src"in J&&i(2,o=J.src),"bgColor"in J&&i(13,a=J.bgColor),"textColor"in J&&i(3,u=J.textColor),"size"in J&&i(4,l=J.size),"borderRadius"in J&&i(5,c=J.borderRadius),"square"in J&&i(6,d=J.square),"randomBgColor"in J&&i(14,f=J.randomBgColor)},[n,r,o,u,l,c,d,C,m,h,p,w,s,a,f,R,Y]}class dr extends te{constructor(e){super(),ee(this,e,cr,ur,q,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},or)}}var bn=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 wn={exports:{}},kn={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(i,n){return i<<n|i>>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return e.rotl(i,8)&16711935|e.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=e.endian(i[n]);return i},randomBytes:function(i){for(var n=[];i>0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],r=0,s=0;r<i.length;r++,s+=8)n[s>>>5]|=i[r]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],r=0;r<i.length*32;r+=8)n.push(i[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(i){for(var n=[],r=0;r<i.length;r++)n.push((i[r]>>>4).toString(16)),n.push((i[r]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],r=0;r<i.length;r+=2)n.push(parseInt(i.substr(r,2),16));return n},bytesToBase64:function(i){for(var n=[],r=0;r<i.length;r+=3)for(var s=i[r]<<16|i[r+1]<<8|i[r+2],o=0;o<4;o++)r*8+o*6<=i.length*8?n.push(t.charAt(s>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<i.length;s=++r%4)s!=0&&n.push((t.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(i.charAt(r))>>>6-s*2);return n}};kn.exports=e})();var fr=kn.exports,kt={utf8:{stringToBytes:function(t){return kt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(kt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i)&255);return e},bytesToString:function(t){for(var e=[],i=0;i<t.length;i++)e.push(String.fromCharCode(t[i]));return e.join("")}}},Ut=kt;/*!
|
|
1
|
+
var Rn=Object.defineProperty;var An=(t,e,i)=>e in t?Rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ge=(t,e,i)=>(An(t,typeof e!="symbol"?e+"":e,i),i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function Q(){}function at(t,e){for(const i in e)t[i]=e[i];return t}function on(t){return t()}function At(){return Object.create(null)}function Ce(t){t.forEach(on)}function Ct(t){return typeof t=="function"}function q(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let rt;function vt(t,e){return t===e?!0:(rt||(rt=document.createElement("a")),rt.href=e,t===rt.href)}function Gn(t){return Object.keys(t).length===0}function an(t,...e){if(t==null){for(const n of e)n(void 0);return Q}const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function he(t){let e;return an(t,i=>e=i)(),e}function re(t,e,i){t.$$.on_destroy.push(an(e,i))}function Me(t,e,i,n){if(t){const r=ln(t,e,i,n);return t[0](r)}}function ln(t,e,i,n){return t[1]&&n?at(i.ctx.slice(),t[1](n(e))):i.ctx}function Ie(t,e,i,n){if(t[2]&&n){const r=t[2](n(i));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function Be(t,e,i,n,r,s){if(r){const o=ln(e,i,n,s);t.p(o,r)}}function Ke(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let n=0;n<i;n++)e[n]=-1;return e}return-1}function zn(t){const e={};for(const i in t)i[0]!=="$"&&(e[i]=t[i]);return e}function Gt(t,e){const i={};e=new Set(e);for(const n in t)!e.has(n)&&n[0]!=="$"&&(i[n]=t[n]);return i}function fe(t){return t??""}function un(t,e,i){return t.set(i),e}const En=["",!0,1,"true","contenteditable"];function y(t,e){t.appendChild(e)}function oe(t,e,i){const n=Mn(t);if(!n.getElementById(e)){const r=k("style");r.id=e,r.textContent=i,In(n,r)}}function Mn(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function In(t,e){return y(t.head||t,e),e.sheet}function N(t,e,i){t.insertBefore(e,i||null)}function D(t){t.parentNode&&t.parentNode.removeChild(t)}function Lt(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function k(t){return document.createElement(t)}function se(t){return document.createTextNode(t)}function U(){return se(" ")}function tt(){return se("")}function ae(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function yt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function _(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const Bn=["width","height"];function zt(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:i[n]&&i[n].set&&Bn.indexOf(n)===-1?t[n]=e[n]:_(t,n,e[n])}function Kn(t){return Array.from(t.childNodes)}function le(t,e){e=""+e,t.data!==e&&(t.data=e)}function Jn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Un(t,e,i){~En.indexOf(i)?Jn(t,e):le(t,e)}function Et(t,e){t.value=e??""}function mt(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function Mt(t,e,i){t.classList.toggle(e,!!i)}function Wn(t,e,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:i,cancelable:n})}function Hn(t){const e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}let Xe;function Pe(t){Xe=t}function cn(){if(!Xe)throw new Error("Function called outside component initialization");return Xe}function ct(t){cn().$$.on_mount.push(t)}function dn(){const t=cn();return(e,i,{cancelable:n=!1}={})=>{const r=t.$$.callbacks[e];if(r){const s=Wn(e,i,{cancelable:n});return r.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}const xe=[],ze=[];let Ae=[];const It=[],Yn=Promise.resolve();let bt=!1;function Pn(){bt||(bt=!0,Yn.then(Se))}function wt(t){Ae.push(t)}const pt=new Set;let Oe=0;function Se(){if(Oe!==0)return;const t=Xe;do{try{for(;Oe<xe.length;){const e=xe[Oe];Oe++,Pe(e),Vn(e.$$)}}catch(e){throw xe.length=0,Oe=0,e}for(Pe(null),xe.length=0,Oe=0;ze.length;)ze.pop()();for(let e=0;e<Ae.length;e+=1){const i=Ae[e];pt.has(i)||(pt.add(i),i())}Ae.length=0}while(xe.length);for(;It.length;)It.pop()();bt=!1,pt.clear(),Pe(t)}function Vn(t){if(t.fragment!==null){t.update(),Ce(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(wt)}}function Qn(t){const e=[],i=[];Ae.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),Ae=e}const st=new Set;let De;function ve(){De={r:0,c:[],p:De}}function ye(){De.r||Ce(De.c),De=De.p}function b(t,e){t&&t.i&&(st.delete(t),t.i(e))}function $(t,e,i,n){if(t&&t.o){if(st.has(t))return;st.add(t),De.c.push(()=>{st.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function Ee(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Zn(t,e){const i={},n={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(n[u]=1);for(const u in a)r[u]||(i[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in n)o in i||(i[o]=void 0);return i}function I(t){t&&t.c()}function E(t,e,i){const{fragment:n,after_update:r}=t.$$;n&&n.m(e,i),wt(()=>{const s=t.$$.on_mount.map(on).filter(Ct);t.$$.on_destroy?t.$$.on_destroy.push(...s):Ce(s),t.$$.on_mount=[]}),r.forEach(wt)}function M(t,e){const i=t.$$;i.fragment!==null&&(Qn(i.after_update),Ce(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function Xn(t,e){t.$$.dirty[0]===-1&&(xe.push(t),Pn(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ee(t,e,i,n,r,s,o=null,a=[-1]){const u=Xe;Pe(t);const l=t.$$={fragment:null,ctx:[],props:s,update:Q,not_equal:r,bound:At(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:At(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(t,e.props||{},(d,f,...h)=>{const p=h.length?h[0]:f;return l.ctx&&r(l.ctx[d],l.ctx[d]=p)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](p),c&&Xn(t,d)),f}):[],l.update(),c=!0,Ce(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const d=Kn(e.target);l.fragment&&l.fragment.l(d),d.forEach(D)}else l.fragment&&l.fragment.c();e.intro&&b(t.$$.fragment),E(t,e.target,e.anchor),Se()}Pe(u)}let fn;typeof HTMLElement=="function"&&(fn=class extends HTMLElement{constructor(e,i,n){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(e,i,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){const r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,n)}removeEventListener(e,i,n){if(super.removeEventListener(e,i,n),this.$$c){const r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return()=>{let a;return{c:function(){a=k("slot"),o!=="default"&&_(a,"name",o)},m:function(c,d){N(c,a,d)},d:function(c){c&&D(a)}}}};var e=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Hn(this);for(const o of this.$$s)o in r&&(n[o]=[i(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=ot(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=ot(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const a of this.$$l[o]){const u=this.$$c.$on(o,a);this.$$l_u.set(a,u)}this.$$l={}}}attributeChangedCallback(e,i,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ot(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function ot(t,e,i,n){var s;const r=(s=i[t])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!i[t])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function qn(t,e,i,n,r,s){let o=class extends fn{constructor(){super(t,i,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var l;u=ot(a,u,e),this.$$d[a]=u,(l=this.$$c)==null||l.$set({[a]:u})}})}),n.forEach(a=>{Object.defineProperty(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),s&&(o=s(o)),t.element=o,o}class te{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){M(this,1),this.$destroy=Q}$on(e,i){if(!Ct(i))return Q;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Gn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const jn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(jn);function ei(t){oe(t,"svelte-uqg1eo",".Icon.svelte-uqg1eo:before{font-family:'la-icon-font';display:inline-block;margin:0;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function ti(t){let e,i;return{c(){e=k("span"),_(e,"class",i=fe(`Icon ${t[0]} ${t[1]}`)+" svelte-uqg1eo")},m(n,r){N(n,e,r)},p(n,[r]){r&3&&i!==(i=fe(`Icon ${n[0]} ${n[1]}`)+" svelte-uqg1eo")&&_(e,"class",i)},i:Q,o:Q,d(n){n&&D(e)}}}function ni(t,e,i){let{className:n=""}=e,{iconLaClassName:r}=e;return t.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class $e extends te{constructor(e){super(),ee(this,e,ni,ti,q,{className:0,iconLaClassName:1},ei)}}const Fe=[];function ce(t,e=Q){let i;const n=new Set;function r(a){if(q(t,a)&&(t=a,i)){const u=!Fe.length;for(const l of n)l[1](),Fe.push(l,t);if(u){for(let l=0;l<Fe.length;l+=2)Fe[l][0](Fe[l+1]);Fe.length=0}}}function s(a){r(a(t))}function o(a,u=Q){const l=[a,u];return n.add(l),n.size===1&&(i=e(r,s)||Q),a(t),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}var Re=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};const ii="https://localhost/api/v3".replace(/\/+$/,"");class St{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:ii}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||gn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:()=>Re(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const ri=new St;class dt{constructor(e=ri){this.configuration=e,this.fetchApi=(i,n)=>Re(this,void 0,void 0,function*(){let r={url:i,init:n};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new li(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const i=this.clone();return i.middleware=i.middleware.concat(...e),i}withPreMiddleware(...e){const i=e.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...e){const i=e.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(e){return e?dt.jsonRegex.test(e):!1}request(e,i){return Re(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(e,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new ai(s,"Response returned an error code")})}createFetchParams(e,i){return Re(this,void 0,void 0,function*(){let n=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Re(this,void 0,void 0,function*(){return i}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:oi(a.body)||a.body instanceof URLSearchParams||si(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const e=this.constructor,i=new e(this.configuration);return i.middleware=this.middleware.slice(),i}}dt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function si(t){return typeof Blob<"u"&&t instanceof Blob}function oi(t){return typeof FormData<"u"&&t instanceof FormData}class ai extends Error{constructor(e,i){super(i),this.response=e,this.name="ResponseError"}}class li extends Error{constructor(e,i){super(i),this.cause=e,this.name="FetchError"}}class Bt extends Error{constructor(e,i){super(i),this.field=e,this.name="RequiredError"}}function g(t,e){const i=t[e];return i!=null}function gn(t,e=""){return Object.keys(t).map(i=>hn(i,t[i],e)).filter(i=>i.length>0).join("&")}function hn(t,e,i=""){const n=i+(i.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(e instanceof Set){const r=Array.from(e);return hn(t,r,i)}return e instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?gn(e,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(e))}`}class j{constructor(e,i=n=>n){this.raw=e,this.transformer=i}value(){return Re(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function ui(t){return ci(t)}function ci(t,e){return t==null?t:{departmentid:g(t,"departmentid")?t.departmentid:void 0,onlineStatus:g(t,"online_status")?t.online_status:void 0,presetStatus:g(t,"preset_status")?t.preset_status:void 0}}function di(t){return fi(t)}function fi(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,username:g(t,"username")?t.username:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,roleid:g(t,"roleid")?t.roleid:void 0,departmentsStatuses:g(t,"departments_statuses")?t.departments_statuses.map(ui):void 0,twofa:g(t,"twofa")?t.twofa:void 0,lastPswdChange:g(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0}}function gi(t){return hi(t)}function hi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,status:g(t,"status")?t.status:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,rstatus:g(t,"rstatus")?t.rstatus:void 0,statusdatestarted:g(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:g(t,"chat_order")?t.chat_order:void 0}}function mi(t){return pi(t)}function pi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,onlineCode:g(t,"online_code")?t.online_code:void 0,offlineCode:g(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:g(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:g(t,"offline_code_css")?t.offline_code_css:void 0,provide:g(t,"provide")?t.provide:void 0,impressions:g(t,"impressions")?t.impressions:void 0,tickets:g(t,"tickets")?t.tickets:void 0,status:g(t,"status")?t.status:void 0,lastDisplayTime:g(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:g(t,"last_display_url")?t.last_display_url:void 0}}function pe(t){return _i(t)}function _i(t,e){return t==null?t:{count:g(t,"count")?t.count:void 0}}function vi(t){return yi(t)}function yi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,agentCount:g(t,"agent_count")?t.agent_count:void 0}}function bi(t){return wi(t)}function wi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,logid:g(t,"logid")?t.logid:void 0,line:g(t,"line")?t.line:void 0,filename:g(t,"filename")?t.filename:void 0,created:g(t,"created")?t.created:void 0,level:g(t,"level")?t.level:void 0,type:g(t,"type")?t.type:void 0,message:g(t,"message")?t.message:void 0,ip:g(t,"ip")?t.ip:void 0,groupid:g(t,"groupid")?t.groupid:void 0}}function ki(t){return $i(t)}function $i(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,chats:g(t,"chats")?t.chats:void 0}}function Ti(t){return Ci(t)}function Ci(t,e){return t==null?t:{name:g(t,"name")?t.name:void 0,code:g(t,"code")?t.code:void 0,engName:g(t,"eng_name")?t.eng_name:void 0,translated:g(t,"translated")?t.translated:void 0,isDefault:g(t,"is_default")?t.is_default:void 0,active:g(t,"active")?t.active:void 0,isCustom:g(t,"is_custom")?t.is_custom:void 0,isBuiltIn:g(t,"is_builtIn")?t.is_builtIn:void 0}}function Li(t){return Si(t)}function Si(t,e){return t==null?t:{codeName:g(t,"code_name")?t.code_name:void 0,name:g(t,"name")?t.name:void 0,description:g(t,"description")?t.description:void 0,active:g(t,"active")?t.active:void 0,help:g(t,"help")?t.help:void 0,multiple:g(t,"multiple")?t.multiple:void 0,configFile:g(t,"config_file")?t.config_file:void 0,price:g(t,"price")?t.price:void 0,legacyIntegration:g(t,"legacy_integration")?t.legacy_integration:void 0}}function _t(t){return Di(t)}function Di(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,slaTicketId:g(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,departmentName:g(t,"department_name")?t.department_name:void 0,levelid:g(t,"levelid")?t.levelid:void 0,slaLevelName:g(t,"sla_level_name")?t.sla_level_name:void 0,sla:g(t,"sla")?t.sla:void 0,dateCreated:g(t,"date_created")?t.date_created:void 0,dateClosed:g(t,"date_closed")?t.date_closed:void 0,dateDue:g(t,"date_due")?t.date_due:void 0,slaLevelId:g(t,"sla_level_id")?t.sla_level_id:void 0,slaType:g(t,"sla_type")?new Date(t.sla_type):void 0,agentid:g(t,"agentid")?t.agentid:void 0,agentFirstname:g(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:g(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:g(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:g(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:g(t,"req_firstname")?t.req_firstname:void 0,reqLastname:g(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:g(t,"req_systemname")?t.req_systemname:void 0,reqContactName:g(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:g(t,"req_avatar_url")?t.req_avatar_url:void 0}}function Kt(t){return Ni(t)}function Ni(t,e){return t==null?t:{tagid:g(t,"tagid")?t.tagid:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,color:g(t,"color")?t.color:void 0,backgroundcolor:g(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:g(t,"is_public")?t.is_public:void 0}}function mn(t){return Oi(t)}function Oi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,datecreated:g(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:g(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:g(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:g(t,"rorder")?t.rorder:void 0,datedue:g(t,"datedue")?new Date(t.datedue):void 0,datereopen:g(t,"datereopen")?new Date(t.datereopen):void 0,status:g(t,"status")?t.status:void 0,channelType:g(t,"channel_type")?t.channel_type:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,agentid:g(t,"agentid")?t.agentid:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,messagegroupsIn:g(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:g(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:g(t,"contactid")?t.contactid:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,phones:g(t,"phones")?t.phones:void 0,jobPosition:g(t,"job_position")?t.job_position:void 0,contactType:g(t,"contact_type")?t.contact_type:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,timeOffset:g(t,"time_offset")?t.time_offset:void 0,gender:g(t,"gender")?t.gender:void 0,levelid:g(t,"levelid")?t.levelid:void 0,groups:g(t,"groups")?t.groups:void 0,contactStatus:g(t,"contact_status")?t.contact_status:void 0,company:g(t,"company")?t.company:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,userid:g(t,"userid")?t.userid:void 0,roleid:g(t,"roleid")?t.roleid:void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0,accountuserstatus:g(t,"accountuserstatus")?t.accountuserstatus:void 0,description:g(t,"description")?t.description:void 0,note:g(t,"note")?t.note:void 0,lastActivity:g(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:g(t,"tagnames")?t.tagnames:void 0,groupnames:g(t,"groupnames")?t.groupnames:void 0}}function Fi(t){return xi(t)}function xi(t,e){return t==null?t:{cursor:g(t,"cursor")?t.cursor:void 0,rows:g(t,"rows")?t.rows.map(mn):void 0}}function Ri(t){return Ai(t)}function Ai(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,agentid:g(t,"agentid")?t.agentid:void 0,agent:g(t,"agent")?t.agent:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,ticket:g(t,"ticket")?t.ticket:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,company:g(t,"company")?t.company:void 0,contactid:g(t,"contactid")?t.contactid:void 0,customer:g(t,"customer")?t.customer:void 0,customerFirstname:g(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:g(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:g(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:g(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:g(t,"reportdate")?t.reportdate:void 0,reportedtime:g(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:g(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:g(t,"spenttime")?t.spenttime:void 0,dateinvoiced:g(t,"dateinvoiced")?t.dateinvoiced:void 0,note:g(t,"note")?t.note:void 0,type:g(t,"type")?t.type:void 0}}var R=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};class pn extends dt{getAgentsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(di))})}getAgentsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,i)).value()})}getAgentsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getAgentsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,i)).value()})}getCallsSlaLogGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_t))})}getCallsSlaLogGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,i)).value()})}getCallsSlaLogGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getCallsSlaLogGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,i)).value()})}getChatsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(gi))})}getChatsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,i)).value()})}getChatsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,i)).value()})}getChatsSlaLogGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_t))})}getChatsSlaLogGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,i)).value()})}getChatsSlaLogGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsSlaLogGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,i)).value()})}getContactWidgetsCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getContactWidgetsCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,i)).value()})}getContactWidgetsListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mi))})}getContactWidgetsList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,i)).value()})}getCustomerGroupsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getCustomerGroupsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,i)).value()})}getDepartmensGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getDepartmensGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,i)).value()})}getDepartmentsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vi))})}getDepartmentsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,i)).value()})}getEventLogsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(bi))})}getEventLogsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,i)).value()})}getEventLogsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getEventLogsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,i)).value()})}getInviteAgentsGridListRaw(e,i){return R(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Bt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(ki))})}getInviteAgentsGridList(e,i){return R(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,i)).value()})}getLanguagesGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ti))})}getLanguagesGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,i)).value()})}getLanguagesGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getLanguagesGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,i)).value()})}getPlugindGridListRaw(e,i){return R(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Bt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.pluginPurpose!==void 0&&(n.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Li))})}getPlugindGridList(e,i){return R(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,i)).value()})}getTagsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getTagsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,i)).value()})}getTicketsGridDatasetRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:n},i);return new j(s,o=>Fi(o))})}getTicketsGridDataset(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,i)).value()})}getTicketsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mn))})}getTicketsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,i)).value()})}getTicketsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,i)).value()})}getTicketsSlaLogGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_t))})}getTicketsSlaLogGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,i)).value()})}getTicketsSlaLogGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsSlaLogGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,i)).value()})}getTimeReportsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.sortField!==void 0&&(n._sortField=e.sortField),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ri))})}getTimeReportsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,i)).value()})}getTimeReportsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTimeReportsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,i)).value()})}}const Jt={Asc:"ASC",Desc:"DESC"},We={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"},Gi={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"},Ve=ce(!1),_n=ce([]),lt=ce(null),qe=ce(null),Ge=ce(!1),Qe=ce(!1),zi=ce({}),_e=ce([]),vn=ce(null),Ne=ce(null),je=ce(!0),Dt=ce(Gi.Rorder),yn=ce([]);function A(t){return he(yn)[t]||t}function Ei(t){oe(t,"svelte-864uvw","span.svelte-864uvw{margin-right:5px}.Selection.svelte-864uvw{color:var(--ticket-status-chat-background);background-color:var(--menu-selected-bg);padding:6px 10px;border-radius:4px;font-size:12px;font-style:normal;font-weight:700;line-height:20px}.text.svelte-864uvw{font-family:'Roboto', sans-serif;font-size:12px;line-height:20px}.many.svelte-864uvw{color:var(--main-textcolor);padding:2px 12px;border:1px solid var(--menu-hover-bg);border-radius:4px;font-weight:700;font-size:13px;font-family:'Roboto', sans-serif;line-height:20px;cursor:pointer}.many.loading.svelte-864uvw{border:none;padding:2px 0}")}function Mi(t){let e,i=A("Displaying ")+t[6].length+" "+A("of"),n,r,s,o=(t[1]?A("Loading.."):t[0]??A("many"))+"",a,u,l,c;return{c(){e=k("span"),n=se(i),r=U(),s=k("span"),a=se(o),_(e,"class","text svelte-864uvw"),_(s,"class",u=fe(t[2])+" svelte-864uvw")},m(d,f){N(d,e,f),y(e,n),N(d,r,f),N(d,s,f),y(s,a),l||(c=ae(s,"click",t[7]),l=!0)},p(d,f){f&64&&i!==(i=A("Displaying ")+d[6].length+" "+A("of"))&&le(n,i),f&3&&o!==(o=(d[1]?A("Loading.."):d[0]??A("many"))+"")&&le(a,o),f&4&&u!==(u=fe(d[2])+" svelte-864uvw")&&_(s,"class",u)},d(d){d&&(D(e),D(r),D(s)),l=!1,c()}}}function Ii(t){let e;return{c(){e=k("span"),e.textContent=`${A("Loading...")}`,_(e,"class","text svelte-864uvw")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function Bi(t){let e;function i(s,o){return s[3]?Ui:s[4].length===1?Ji:Ki}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Ki(t){let e,i=t[4].length+" rows selected",n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" rows selected")&&le(n,i)},d(r){r&&D(e)}}}function Ji(t){let e,i=t[4].length+" row selected",n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" row selected")&&le(n,i)},d(r){r&&D(e)}}}function Ui(t){let e;function i(s,o){return s[4].length>0?Hi:Wi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Wi(t){let e;return{c(){e=k("span"),e.textContent=`${A("all rows selected")}`,_(e,"class","Selection svelte-864uvw")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function Hi(t){let e;function i(s,o){return s[4].length===1?Pi:Yi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Yi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("rows"),n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("rows"))&&le(n,i)},d(r){r&&D(e)}}}function Pi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("row"),n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("row"))&&le(n,i)},d(r){r&&D(e)}}}function Vi(t){let e;function i(s,o){return s[3]||s[4].length>0?Bi:s[5]?Ii:Mi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},i:Q,o:Q,d(s){s&&D(e),r.d(s)}}}function Qi(t,e,i){let n,r,s,o,a,u;re(t,qe,p=>i(8,n=p)),re(t,lt,p=>i(9,r=p)),re(t,Ve,p=>i(3,s=p)),re(t,_n,p=>i(4,o=p)),re(t,Ge,p=>i(5,a=p)),re(t,_e,p=>i(6,u=p));let l=null,c=!1,d="many";function f(){i(0,l=null)}async function h(){i(2,d="many loading"),i(1,c=!0);let p=await r.getTicketsGridListCount({filters:n,timezoneOffset:new Date().getTimezoneOffset()});i(0,l=p.count),i(1,c=!1)}return t.$$.update=()=>{t.$$.dirty&256&&n&&f()},[l,c,d,s,o,a,u,h,n]}class Zi extends te{constructor(e){super(),ee(this,e,Qi,Vi,q,{},Ei)}}async function et(t=!1){if(!(he(Ge)||!he(lt))&&(t&&(Ne.set(null),Qe.set(!1)),!(!he(Ne)&&he(Qe)))){Ge.set(!0);try{const i=await(await he(lt).getTicketsGridDatasetRaw(Xi())).value();t&&_e.set([]),_e.set([...he(_e),...i.rows]),Ne.set(i.cursor),Qe.set(!0)}catch(e){vn.set(e.toString())}Ge.set(!1)}}function Xi(){return{perPage:20,sortDir:he(je)?Jt.Asc:Jt.Desc,filters:he(qe),sortField:he(Dt),cursor:he(Ne)?he(Ne):""}}function qi(t){oe(t,"svelte-44l4of",".Head.svelte-44l4of.svelte-44l4of{display:none}.headCheckbox.svelte-44l4of.svelte-44l4of{width:20px}button.svelte-44l4of.svelte-44l4of{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-44l4of.svelte-44l4of{font-size:16px;cursor:pointer}.rightPanel.svelte-44l4of.svelte-44l4of{margin-inline-start:auto}.Sorting.svelte-44l4of.svelte-44l4of{cursor:pointer;text-align:left;font-weight:bold}.sortButton.svelte-44l4of.svelte-44l4of{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-44l4of.svelte-44l4of{animation-name:svelte-44l4of-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-44l4of-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-44l4of.svelte-44l4of{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin:6px 23px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif}.headCheckbox.svelte-44l4of input[type=checkbox].svelte-44l4of{vertical-align:middle;cursor:pointer}}")}function ji(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-down"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function er(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-up"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function tr(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,p,w,C,m,x,Y;const J=[er,ji],O=[];function W(Z,B){return Z[2]?0:1}return l=W(t),c=O[l]=J[l](t),h=new Zi({}),C=new $e({props:{iconLaClassName:"la-refresh"}}),{c(){e=k("div"),i=k("div"),n=k("input"),r=U(),s=k("button"),o=se(t[0]),a=U(),u=k("button"),c.c(),d=U(),f=k("div"),I(h.$$.fragment),p=U(),w=k("button"),I(C.$$.fragment),_(n,"type","checkbox"),_(n,"class","svelte-44l4of"),_(i,"class","headCheckbox svelte-44l4of"),_(s,"class","Sorting svelte-44l4of"),_(u,"class","sortButton svelte-44l4of"),_(w,"class","spinner svelte-44l4of"),_(w,"title",A("Reload")),Mt(w,"loading",t[4]),_(f,"class","rightPanel svelte-44l4of"),_(e,"class","Head svelte-44l4of")},m(Z,B){N(Z,e,B),y(e,i),y(i,n),n.checked=t[3],y(e,r),y(e,s),y(s,o),t[9](s),y(e,a),y(e,u),O[l].m(u,null),y(e,d),y(e,f),E(h,f,null),y(f,p),y(f,w),E(C,w,null),m=!0,x||(Y=[ae(n,"change",t[8]),ae(n,"click",t[5]),ae(s,"click",t[7]),ae(u,"click",t[10]),ae(w,"click",t[11])],x=!0)},p(Z,[B]){B&8&&(n.checked=Z[3]),(!m||B&1)&&le(o,Z[0]);let ne=l;l=W(Z),l!==ne&&(ve(),$(O[ne],1,1,()=>{O[ne]=null}),ye(),c=O[l],c||(c=O[l]=J[l](Z),c.c()),b(c,1),c.m(u,null)),(!m||B&16)&&Mt(w,"loading",Z[4])},i(Z){m||(b(c),b(h.$$.fragment,Z),b(C.$$.fragment,Z),m=!0)},o(Z){$(c),$(h.$$.fragment,Z),$(C.$$.fragment,Z),m=!1},d(Z){Z&&D(e),t[9](null),O[l].d(),M(h),M(C),x=!1,Ce(Y)}}}function nr(t,e,i){let n,r,s;re(t,je,x=>i(2,n=x)),re(t,Ve,x=>i(3,r=x)),re(t,Ge,x=>i(4,s=x));let{currentFilter:o}=e;const a=dn();let u,l,c;function d(){Ve.set(!r),_e.update(x=>x.map(Y=>({...Y,__selected:r})))}const f=()=>{un(je,n=!n,n)};function h(){u=l.getBoundingClientRect(),c=`position: absolute; top: ${u.bottom-58}px; left: ${u.left-265}px;`,a("openModal",{dialogStyles:c})}function p(){r=this.checked,Ve.set(r)}function w(x){ze[x?"unshift":"push"](()=>{l=x,i(1,l)})}const C=()=>f(),m=()=>et(!0);return t.$$set=x=>{"currentFilter"in x&&i(0,o=x.currentFilter)},[o,l,n,r,s,d,f,h,p,w,C,m]}class ir extends te{constructor(e){super(),ee(this,e,nr,tr,q,{currentFilter:0},qi)}}function ut(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)"}}const rr=()=>{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]},sr=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 or(t){oe(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 ar(t){let e;return{c(){e=k("div"),e.textContent=`${t[10]}`,_(e,"class","innerInitials svelte-hbozhk")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function lr(t){let e,i,n,r,s,o;return{c(){e=k("div"),i=k("img"),_(i,"alt",""),_(i,"class",fe("innerImage")+" svelte-hbozhk"),vt(i.src,n=t[2])||_(i,"src",n),_(e,"class",r=fe(t[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){N(a,e,u),y(e,i),s||(o=[ae(i,"error",t[15]),ae(i,"load",t[16])],s=!0)},p(a,u){u&4&&!vt(i.src,n=a[2])&&_(i,"src",n),u&256&&r!==(r=fe(a[8]?"imageLoading":"")+" svelte-hbozhk")&&_(e,"class",r)},d(a){a&&D(e),s=!1,Ce(o)}}}function ur(t){let e,i;function n(o,a){return o[2]&&!o[7]?lr:ar}let r=n(t),s=r(t);return{c(){e=k("div"),s.c(),_(e,"aria-label",t[1]),_(e,"class","wrapper svelte-hbozhk"),_(e,"style",i=t[0]+"--borderRadius:"+(t[6]?0:t[5])+"; --size:"+t[4]+"; --bgColor:"+t[9]+"; --src:"+t[2]+"; --textColor:"+t[3]+"; --abbrLength:"+t[11])},m(o,a){N(o,e,a),s.m(e,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(e,null))),a&2&&_(e,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&_(e,"style",i)},i:Q,o:Q,d(o){o&&D(e),s.d()}}}function cr(t,e,i){let{style:n=""}=e,{name:r="Avatar"}=e,{initials:s}=e,{src:o}=e,{bgColor:a="lightGrey"}=e,{textColor:u="white"}=e,{size:l="50px"}=e,{borderRadius:c="50%"}=e,{square:d=!1}=e,{randomBgColor:f=!1}=e;const h=f?rr():a,p=s||sr(r),w=p.length;let C=!1,m=!0;const x=()=>i(7,C=!0),Y=()=>i(8,m=!1);return t.$$set=J=>{"style"in J&&i(0,n=J.style),"name"in J&&i(1,r=J.name),"initials"in J&&i(12,s=J.initials),"src"in J&&i(2,o=J.src),"bgColor"in J&&i(13,a=J.bgColor),"textColor"in J&&i(3,u=J.textColor),"size"in J&&i(4,l=J.size),"borderRadius"in J&&i(5,c=J.borderRadius),"square"in J&&i(6,d=J.square),"randomBgColor"in J&&i(14,f=J.randomBgColor)},[n,r,o,u,l,c,d,C,m,h,p,w,s,a,f,x,Y]}class dr extends te{constructor(e){super(),ee(this,e,cr,ur,q,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},or)}}var bn=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 wn={exports:{}},kn={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(i,n){return i<<n|i>>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return e.rotl(i,8)&16711935|e.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=e.endian(i[n]);return i},randomBytes:function(i){for(var n=[];i>0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],r=0,s=0;r<i.length;r++,s+=8)n[s>>>5]|=i[r]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],r=0;r<i.length*32;r+=8)n.push(i[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(i){for(var n=[],r=0;r<i.length;r++)n.push((i[r]>>>4).toString(16)),n.push((i[r]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],r=0;r<i.length;r+=2)n.push(parseInt(i.substr(r,2),16));return n},bytesToBase64:function(i){for(var n=[],r=0;r<i.length;r+=3)for(var s=i[r]<<16|i[r+1]<<8|i[r+2],o=0;o<4;o++)r*8+o*6<=i.length*8?n.push(t.charAt(s>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<i.length;s=++r%4)s!=0&&n.push((t.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(i.charAt(r))>>>6-s*2);return n}};kn.exports=e})();var fr=kn.exports,kt={utf8:{stringToBytes:function(t){return kt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(kt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i)&255);return e},bytesToString:function(t){for(var e=[],i=0;i<t.length;i++)e.push(String.fromCharCode(t[i]));return e.join("")}}},Ut=kt;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/var gr=function(t){return t!=null&&($n(t)||hr(t)||!!t._isBuffer)};function $n(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function hr(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&$n(t.slice(0,0))}(function(){var t=fr,e=Ut.utf8,i=gr,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=t.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=271733878,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var p=r._ff,w=r._gg,C=r._hh,m=r._ii,h=0;h<a.length;h+=16){var R=l,Y=c,J=d,O=f;l=p(l,c,d,f,a[h+0],7,-680876936),f=p(f,l,c,d,a[h+1],12,-389564586),d=p(d,f,l,c,a[h+2],17,606105819),c=p(c,d,f,l,a[h+3],22,-1044525330),l=p(l,c,d,f,a[h+4],7,-176418897),f=p(f,l,c,d,a[h+5],12,1200080426),d=p(d,f,l,c,a[h+6],17,-1473231341),c=p(c,d,f,l,a[h+7],22,-45705983),l=p(l,c,d,f,a[h+8],7,1770035416),f=p(f,l,c,d,a[h+9],12,-1958414417),d=p(d,f,l,c,a[h+10],17,-42063),c=p(c,d,f,l,a[h+11],22,-1990404162),l=p(l,c,d,f,a[h+12],7,1804603682),f=p(f,l,c,d,a[h+13],12,-40341101),d=p(d,f,l,c,a[h+14],17,-1502002290),c=p(c,d,f,l,a[h+15],22,1236535329),l=w(l,c,d,f,a[h+1],5,-165796510),f=w(f,l,c,d,a[h+6],9,-1069501632),d=w(d,f,l,c,a[h+11],14,643717713),c=w(c,d,f,l,a[h+0],20,-373897302),l=w(l,c,d,f,a[h+5],5,-701558691),f=w(f,l,c,d,a[h+10],9,38016083),d=w(d,f,l,c,a[h+15],14,-660478335),c=w(c,d,f,l,a[h+4],20,-405537848),l=w(l,c,d,f,a[h+9],5,568446438),f=w(f,l,c,d,a[h+14],9,-1019803690),d=w(d,f,l,c,a[h+3],14,-187363961),c=w(c,d,f,l,a[h+8],20,1163531501),l=w(l,c,d,f,a[h+13],5,-1444681467),f=w(f,l,c,d,a[h+2],9,-51403784),d=w(d,f,l,c,a[h+7],14,1735328473),c=w(c,d,f,l,a[h+12],20,-1926607734),l=C(l,c,d,f,a[h+5],4,-378558),f=C(f,l,c,d,a[h+8],11,-2022574463),d=C(d,f,l,c,a[h+11],16,1839030562),c=C(c,d,f,l,a[h+14],23,-35309556),l=C(l,c,d,f,a[h+1],4,-1530992060),f=C(f,l,c,d,a[h+4],11,1272893353),d=C(d,f,l,c,a[h+7],16,-155497632),c=C(c,d,f,l,a[h+10],23,-1094730640),l=C(l,c,d,f,a[h+13],4,681279174),f=C(f,l,c,d,a[h+0],11,-358537222),d=C(d,f,l,c,a[h+3],16,-722521979),c=C(c,d,f,l,a[h+6],23,76029189),l=C(l,c,d,f,a[h+9],4,-640364487),f=C(f,l,c,d,a[h+12],11,-421815835),d=C(d,f,l,c,a[h+15],16,530742520),c=C(c,d,f,l,a[h+2],23,-995338651),l=m(l,c,d,f,a[h+0],6,-198630844),f=m(f,l,c,d,a[h+7],10,1126891415),d=m(d,f,l,c,a[h+14],15,-1416354905),c=m(c,d,f,l,a[h+5],21,-57434055),l=m(l,c,d,f,a[h+12],6,1700485571),f=m(f,l,c,d,a[h+3],10,-1894986606),d=m(d,f,l,c,a[h+10],15,-1051523),c=m(c,d,f,l,a[h+1],21,-2054922799),l=m(l,c,d,f,a[h+8],6,1873313359),f=m(f,l,c,d,a[h+15],10,-30611744),d=m(d,f,l,c,a[h+6],15,-1560198380),c=m(c,d,f,l,a[h+13],21,1309151649),l=m(l,c,d,f,a[h+4],6,-145523070),f=m(f,l,c,d,a[h+11],10,-1120210379),d=m(d,f,l,c,a[h+2],15,718787259),c=m(c,d,f,l,a[h+9],21,-343485551),l=l+R>>>0,c=c+Y>>>0,d=d+J>>>0,f=f+O>>>0}return t.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,wn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=t.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):t.bytesToHex(a)}})();var mr=wn.exports;const pr=Nt(mr);function vr(t){return[...t].reduce((e,i)=>Math.imul(31,e)+i.charCodeAt(0)|0,0)}function _r(t){oe(t,"svelte-in3p8g",".Column.svelte-in3p8g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(min-width: 768px){.Column.importanceColumn.svelte-in3p8g{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}}")}function yr(t){let e,i,n;const r=t[2].default,s=Ie(r,t,t[1],null);return{c(){e=k("div"),s&&s.c(),v(e,"class",i="Column "+t[0]+" svelte-in3p8g")},m(o,a){N(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Ke(s,r,o,o[1],n?Be(r,o[1],a,null):Je(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-in3p8g"))&&v(e,"class",i)},i(o){n||(b(s,o),n=!0)},o(o){$(s,o),n=!1},d(o){o&&D(e),s&&s.d(o)}}}function br(t,e,i){let{$$slots:n={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class Ot extends te{constructor(e){super(),ee(this,e,br,yr,q,{className:0},_r)}}function wr(t){oe(t,"svelte-1d2a8s6",'.Tag.svelte-1d2a8s6{display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-1d2a8s6:before{font-family:"la-icon-font"}.SLA.svelte-1d2a8s6{border:1px solid #CFD6DD;border-radius:4px}')}function kr(t){let e,i,n,r,s,o;const a=t[4].default,u=Ie(a,t,t[3],null);return{c(){e=k("div"),u&&u.c(),i=U(),n=k("span"),r=se(t[0]),v(n,"class","text"),v(e,"class",s="Tag "+t[1]+" svelte-1d2a8s6"),v(e,"style",t[2])},m(l,c){N(l,e,c),u&&u.m(e,null),y(e,i),y(e,n),y(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Ke(u,a,l,l[3],o?Be(a,l[3],c,null):Je(l[3]),null),(!o||c&1)&&le(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&v(e,"class",s),(!o||c&4)&&v(e,"style",l[2])},i(l){o||(b(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&D(e),u&&u.d(l)}}}function $r(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return t.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class ft extends te{constructor(e){super(),ee(this,e,$r,kr,q,{text:0,className:1,style:2},wr)}}function Tr(t){oe(t,"svelte-1ify73x","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}.IconTag .Icon{display:flex;align-items:center;justify-content:center;font-size:16px;width:16px;height:16px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Cr(t){let e,i;return e=new $e({props:{iconLaClassName:t[2]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Lr(t){let e,i;return e=new ft({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Cr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Sr(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconLaClassName:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class gt extends te{constructor(e){super(),ee(this,e,Sr,Lr,q,{text:0,className:4,style:1,iconLaClassName:2},Tr)}}function Dr(t){oe(t,"svelte-416m4x",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-416m4x{display:none}.companyTag.svelte-416m4x{display:none}.name.svelte-416m4x{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;margin-right:6px;border-right:1px solid var(--main-textcolor)}.no.name.svelte-416m4x{display:none;border-right:none}.email.svelte-416m4x{font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.texts.svelte-416m4x{display:flex;flex-direction:row;justify-content:flex-start;overflow:hidden}@media(min-width: 900px){.avatar.svelte-416m4x{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-416m4x{padding:0;border:none}.email.svelte-416m4x{padding:0}.companyTag.svelte-416m4x{display:flex}.texts.svelte-416m4x{display:flex;flex-direction:column;justify-content:center}}")}function Wt(t){let e,i;return e=new dr({props:{bgColor:t[5](t[0]),name:t[3](t[0]),src:t[4](t[0])}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[5](n[0])),r&1&&(s.name=n[3](n[0])),r&1&&(s.src=n[4](n[0])),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Nr(t){let e,i=[t[5](t[0]),t[3](t[0]),t[4](t[0])],n,r,s,o,a,u,l,c=t[0].emails+"",d,f,h,p,w,C=Wt(t);return p=new gt({props:{text:t[0].company==="Y"?"Company":A("No Company"),className:(t[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){e=k("div"),C.c(),n=U(),r=k("div"),s=k("div"),o=se(t[2]),u=U(),l=k("div"),d=se(c),f=U(),h=k("div"),I(p.$$.fragment),v(e,"class","avatar svelte-416m4x"),v(s,"class",a=fe(t[2]?"name":"no name")+" svelte-416m4x"),v(l,"class","email svelte-416m4x"),v(h,"class","companyTag svelte-416m4x"),v(r,"class","texts svelte-416m4x")},m(m,R){N(m,e,R),C.m(e,null),N(m,n,R),N(m,r,R),y(r,s),y(s,o),y(r,u),y(r,l),y(l,d),y(r,f),y(r,h),E(p,h,null),w=!0},p(m,R){R&1&&q(i,i=[m[5](m[0]),m[3](m[0]),m[4](m[0])])?(_e(),$(C,1,1,Q),ye(),C=Wt(m),C.c(),b(C,1),C.m(e,null)):C.p(m,R),(!w||R&4)&&le(o,m[2]),(!w||R&4&&a!==(a=fe(m[2]?"name":"no name")+" svelte-416m4x"))&&v(s,"class",a),(!w||R&1)&&c!==(c=m[0].emails+"")&&le(d,c);const Y={};R&1&&(Y.text=m[0].company==="Y"?"Company":A("No Company")),R&1&&(Y.className=(m[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),p.$set(Y)},i(m){w||(b(C),b(p.$$.fragment,m),w=!0)},o(m){$(C),$(p.$$.fragment,m),w=!1},d(m){m&&(D(e),D(n),D(r)),C.d(m),M(p)}}}function Or(t){let e,i;return e=new Ot({props:{className:t[1],$$slots:{default:[Nr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&69&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function xr(t,e,i){let n,{row:r}=e,{className:s="userColumn"}=e;function o(l){if(!l)return"";let c=l.firstname+" "+l.lastname;return c.trim()||(c=l.systemName),c}function a(l){let c=l.avatarUrl;return c||(c="https://www.gravatar.com/avatar/"+pr(l.emails[0]??"")+"?s=200&d=404"),c}function u(l){let c;l?c=vr(o(l)+l.emails):c=Math.floor(Math.random()*16777215);let d=(c&16711680)>>16,f=(c&65280)>>8,h=c&255;return d+f+h<150&&(d=150),d+f+h>400&&(d=0),`rgb(${d},${f},${h})`}return t.$$set=l=>{"row"in l&&i(0,r=l.row),"className"in l&&i(1,s=l.className)},t.$$.update=()=>{t.$$.dirty&1&&i(2,n=r.name)},[r,s,n,o,a,u]}class Rr extends te{constructor(e){super(),ee(this,e,xr,Or,q,{row:0,className:1},Dr)}}var Tn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(bn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",h="year",p="date",w="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,R={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var L=["th","st","nd","rd"],_=z%100;return"["+z+(L[(_-20)%10]||L[_]||L[0])+"]"}},Y=function(z,L,_){var S=String(z);return!S||S.length>=L?z:""+Array(L+1-S.length).join(_)+z},J={s:Y,z:function(z){var L=-z.utcOffset(),_=Math.abs(L),S=Math.floor(_/60),T=_%60;return(L<=0?"+":"-")+Y(S,2,"0")+":"+Y(T,2,"0")},m:function z(L,_){if(L.date()<_.date())return-z(_,L);var S=12*(_.year()-L.year())+(_.month()-L.month()),T=L.clone().add(S,d),G=_-T<0,K=L.clone().add(S+(G?-1:1),d);return+(-(S+(_-T)/(G?T-K:K-T))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:d,y:h,w:c,d:l,D:p,h:u,m:a,s:o,ms:s,Q:f}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},O="en",W={};W[O]=R;var Z="$isDayjsObject",B=function(z){return z instanceof be||!(!z||!z[Z])},ne=function z(L,_,S){var T;if(!L)return O;if(typeof L=="string"){var G=L.toLowerCase();W[G]&&(T=G),_&&(W[G]=_,T=G);var K=L.split("-");if(!T&&K.length>1)return z(K[0])}else{var V=L.name;W[V]=L,T=V}return!S&&T&&(O=T),T||!S&&O},X=function(z,L){if(B(z))return z.clone();var _=typeof L=="object"?L:{};return _.date=z,_.args=arguments,new be(_)},P=J;P.l=ne,P.i=B,P.w=function(z,L){return X(z,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var be=function(){function z(_){this.$L=ne(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[Z]=!0}var L=z.prototype;return L.parse=function(_){this.$d=function(S){var T=S.date,G=S.utc;if(T===null)return new Date(NaN);if(P.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var K=T.match(C);if(K){var V=K[2]-1||0,ie=(K[7]||"0").substring(0,3);return G?new Date(Date.UTC(K[1],V,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ie)):new Date(K[1],V,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ie)}}return new Date(T)}(_),this.init()},L.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},L.$utils=function(){return P},L.isValid=function(){return this.$d.toString()!==w},L.isSame=function(_,S){var T=X(_);return this.startOf(S)<=T&&T<=this.endOf(S)},L.isAfter=function(_,S){return X(_)<this.startOf(S)},L.isBefore=function(_,S){return this.endOf(S)<X(_)},L.$g=function(_,S,T){return P.u(_)?this[S]:this.set(T,_)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(_,S){var T=this,G=!!P.u(S)||S,K=P.p(_),V=function(Le,de){var Te=P.w(T.$u?Date.UTC(T.$y,de,Le):new Date(T.$y,de,Le),T);return G?Te:Te.endOf(l)},ie=function(Le,de){return P.w(T.toDate()[Le].apply(T.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(de)),T)},x=this.$W,H=this.$M,ue=this.$D,ke="set"+(this.$u?"UTC":"");switch(K){case h:return G?V(1,0):V(31,11);case d:return G?V(1,H):V(0,H+1);case c:var me=this.$locale().weekStart||0,Ue=(x<me?x+7:x)-me;return V(G?ue-Ue:ue+(6-Ue),H);case l:case p:return ie(ke+"Hours",0);case u:return ie(ke+"Minutes",1);case a:return ie(ke+"Seconds",2);case o:return ie(ke+"Milliseconds",3);default:return this.clone()}},L.endOf=function(_){return this.startOf(_,!1)},L.$set=function(_,S){var T,G=P.p(_),K="set"+(this.$u?"UTC":""),V=(T={},T[l]=K+"Date",T[p]=K+"Date",T[d]=K+"Month",T[h]=K+"FullYear",T[u]=K+"Hours",T[a]=K+"Minutes",T[o]=K+"Seconds",T[s]=K+"Milliseconds",T)[G],ie=G===l?this.$D+(S-this.$W):S;if(G===d||G===h){var x=this.clone().set(p,1);x.$d[V](ie),x.init(),this.$d=x.set(p,Math.min(this.$D,x.daysInMonth())).$d}else V&&this.$d[V](ie);return this.init(),this},L.set=function(_,S){return this.clone().$set(_,S)},L.get=function(_){return this[P.p(_)]()},L.add=function(_,S){var T,G=this;_=Number(_);var K=P.p(S),V=function(H){var ue=X(G);return P.w(ue.date(ue.date()+Math.round(H*_)),G)};if(K===d)return this.set(d,this.$M+_);if(K===h)return this.set(h,this.$y+_);if(K===l)return V(1);if(K===c)return V(7);var ie=(T={},T[a]=n,T[u]=r,T[o]=i,T)[K]||1,x=this.$d.getTime()+_*ie;return P.w(x,this)},L.subtract=function(_,S){return this.add(-1*_,S)},L.format=function(_){var S=this,T=this.$locale();if(!this.isValid())return T.invalidDate||w;var G=_||"YYYY-MM-DDTHH:mm:ssZ",K=P.z(this),V=this.$H,ie=this.$m,x=this.$M,H=T.weekdays,ue=T.months,ke=T.meridiem,me=function(de,Te,We,it){return de&&(de[Te]||de(S,G))||We[Te].slice(0,it)},Ue=function(de){return P.s(V%12||12,de,"0")},Le=ke||function(de,Te,We){var it=de<12?"AM":"PM";return We?it.toLowerCase():it};return G.replace(m,function(de,Te){return Te||function(We){switch(We){case"YY":return String(S.$y).slice(-2);case"YYYY":return P.s(S.$y,4,"0");case"M":return x+1;case"MM":return P.s(x+1,2,"0");case"MMM":return me(T.monthsShort,x,ue,3);case"MMMM":return me(ue,x);case"D":return S.$D;case"DD":return P.s(S.$D,2,"0");case"d":return String(S.$W);case"dd":return me(T.weekdaysMin,S.$W,H,2);case"ddd":return me(T.weekdaysShort,S.$W,H,3);case"dddd":return H[S.$W];case"H":return String(V);case"HH":return P.s(V,2,"0");case"h":return Ue(1);case"hh":return Ue(2);case"a":return Le(V,ie,!0);case"A":return Le(V,ie,!1);case"m":return String(ie);case"mm":return P.s(ie,2,"0");case"s":return String(S.$s);case"ss":return P.s(S.$s,2,"0");case"SSS":return P.s(S.$ms,3,"0");case"Z":return K}return null}(de)||K.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(_,S,T){var G,K=this,V=P.p(S),ie=X(_),x=(ie.utcOffset()-this.utcOffset())*n,H=this-ie,ue=function(){return P.m(K,ie)};switch(V){case h:G=ue()/12;break;case d:G=ue();break;case f:G=ue()/3;break;case c:G=(H-x)/6048e5;break;case l:G=(H-x)/864e5;break;case u:G=H/r;break;case a:G=H/n;break;case o:G=H/i;break;default:G=H}return T?G:P.a(G)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return W[this.$L]},L.locale=function(_,S){if(!_)return this.$L;var T=this.clone(),G=ne(_,S,!0);return G&&(T.$L=G),T},L.clone=function(){return P.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},z}(),we=be.prototype;return X.prototype=we,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",p]].forEach(function(z){we[z[1]]=function(L){return this.$g(L,z[0],z[1])}}),X.extend=function(z,L){return z.$i||(z(L,be,X),z.$i=!0),X},X.locale=ne,X.isDayjs=B,X.unix=function(z){return X(1e3*z)},X.en=W[O],X.Ls=W,X.p={},X})})(Tn);var Fr=Tn.exports;const Pe=Nt(Fr);var Cn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(bn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,h){for(var p,w,C,m=d.$locale().relativeTime||o,R=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=R.length,J=0;J<Y;J+=1){var O=R[J];O.d&&(p=f?r(l).diff(d,O.d,!0):d.diff(l,O.d,!0));var W=(i.rounding||Math.round)(Math.abs(p));if(C=p>0,W<=O.r||!O.r){W<=1&&J>0&&(O=R[J-1]);var Z=m[O.l];h&&(W=h(""+W)),w=typeof Z=="string"?Z.replace("%d",W):Z(W,c,O.l,C);break}}if(c)return w;var B=C?m.future:m.past;return typeof B=="function"?B(w):B.replace("%s",w)},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)}}})})(Cn);var Ar=Cn.exports;const Gr=Nt(Ar);Pe.extend(Gr);function zr(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=at(r,n[s]);return{c(){e=k("time"),i=se(t[0]),zt(e,r)},m(s,o){N(s,e,o),y(e,i)},p(s,[o]){o&1&&Un(i,s[0],r.contenteditable),zt(e,r=Zn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Q,o:Q,d(s){s&&D(e)}}}function Er(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Gt(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,d;const f=60*1e3;return ct(()=>()=>clearInterval(d)),t.$$set=h=>{e=at(at({},e),zn(h)),i(3,s=Gt(e,r)),"timestamp"in h&&i(1,o=h.timestamp),"format"in h&&i(4,a=h.format),"relative"in h&&i(5,u=h.relative),"live"in h&&i(6,l=h.live),"formatted"in h&&i(0,c=h.formatted)},t.$$.update=()=>{t.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Pe(o).from())},Math.abs(typeof l=="number"?l:f))),t.$$.dirty&50&&i(0,c=u?Pe(o).from():Pe(o).format(a)),t.$$.dirty&50&&i(2,n=u?Pe(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Mr extends te{constructor(e){super(),ee(this,e,Er,zr,q,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Ir(t){oe(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Br(t){let e;return{c(){e=k("span"),e.textContent=`${A("Invalid data")}`,v(e,"class","invalid svelte-1o3wy2t")},m(i,n){N(i,e,n)},p:Q,i:Q,o:Q,d(i){i&&D(e)}}}function Kr(t){let e,i;return e=new Mr({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Jr(t){let e,i,n,r,s;const o=[Kr,Br],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(t,-1),r=a[n]=o[n](t),{c(){e=k("div"),r.c(),v(e,"class","Date svelte-1o3wy2t")},m(l,c){N(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(_e(),$(a[d],1,1,()=>{a[d]=null}),ye(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),b(r,1),r.m(e,null))},i(l){s||(b(r),s=!0)},o(l){$(r),s=!1},d(l){l&&D(e),a[n].d()}}}function Ur(t,e,i){let{data:n}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&i(0,n=a.data),"format"in a&&i(1,r=a.format),"style"in a&&i(2,s=a.style),"relative"in a&&i(3,o=a.relative)},[n,r,s,o]}class $t extends te{constructor(e){super(),ee(this,e,Ur,Jr,q,{data:0,format:1,style:2,relative:3},Ir)}}function Wr(t){oe(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function Hr(t){let e,i,n,r;i=new $e({props:{iconLaClassName:t[2]}});const s=t[8].default,o=Ie(s,t,t[7],null);return{c(){e=k("div"),I(i.$$.fragment),n=U(),o&&o.c(),v(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){N(a,e,u),E(i,e,null),N(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Ke(o,s,a,a[7],r?Be(s,a[7],u,null):Je(a[7]),null)},i(a){r||(b(i.$$.fragment,a),b(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(D(e),D(n)),M(i),o&&o.d(a)}}}function Yr(t){let e,i;return e=new gt({props:{style:t[3],text:t[0],iconLaClassName:t[2],className:"Combined"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Pr(t){let e,i,n,r,s,o;const a=[Yr,Hr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new ft({props:{style:t[4],text:t[1]}}),{c(){e=k("div"),n.c(),r=U(),I(s.$$.fragment),v(e,"class",fe(t[5])+" svelte-1wdh20c")},m(c,d){N(c,e,d),u[i].m(e,null),y(e,r),E(s,e,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(_e(),$(u[f],1,1,()=>{u[f]=null}),ye(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),b(n,1),n.m(e,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(b(n),b(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&D(e),u[i].d(),M(s)}}}function Vr(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconLaClassName:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return t.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class Ln extends te{constructor(e){super(),ee(this,e,Vr,Pr,q,{iconText:0,tagText:1,iconLaClassName:2,className:6},Wr)}}function Qr(t){let e,i;return e=new $t({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Zr(t){let e,i;return e=new Ln({props:{iconLaClassName:t[3],tagText:t[0],className:t[2],$$slots:{default:[Qr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Xr(t,e,i){let n,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class qr extends te{constructor(e){super(),ee(this,e,Xr,Zr,q,{tagText:0,due:1})}}function jr(t){oe(t,"svelte-nbfjry",".TicketId.svelte-nbfjry{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-nbfjry{font-size:13px;line-height:20px}.Communication.svelte-nbfjry{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}.ticketDetails.svelte-nbfjry{display:flex;align-items:center;justify-content:space-between}@media(min-width: 900px){.Changed.svelte-nbfjry{display:none}}")}function es(t){let e,i;return e=new ft({props:{text:A("No SLA"),className:"SLA"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p:Q,i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ts(t){let e,i;return e=new qr({props:{tagText:"First answer",due:t[1].datedue}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ns(t){let e,i,n=t[1].code+"",r,s,o,a,u,l,c,d=t[1].messagegroupsIn+"",f,h,p,w,C,m,R=t[1].messagegroupsOut+"",Y,J,O,W,Z,B,ne,X,P,be,we,z,L,_,S,T,G;u=new $e({props:{iconLaClassName:"la-incoming"}}),w=new $e({props:{iconLaClassName:"la-outgoing"}}),B=new $t({props:{data:t[1].datecreated,format:t[2]}}),we=new $t({props:{data:t[1].datechanged,format:t[2]}});const K=[ts,es],V=[];function ie(x,H){return H&2&&(L=null),L==null&&(L=x[1].datedue instanceof Date&&!isNaN(x[1].datedue)),L?0:1}return _=ie(t,-1),S=V[_]=K[_](t),{c(){e=k("div"),i=k("span"),r=se(n),s=U(),o=k("div"),a=k("div"),I(u.$$.fragment),l=U(),c=k("span"),f=se(d),h=U(),p=k("div"),I(w.$$.fragment),C=U(),m=k("span"),Y=se(R),J=U(),O=k("div"),W=k("span"),W.textContent=`${A("Created")}:`,Z=U(),I(B.$$.fragment),ne=U(),X=k("div"),P=k("span"),P.textContent=`${A("Changed")}:`,be=U(),I(we.$$.fragment),z=U(),S.c(),T=tt(),v(i,"class","TicketId svelte-nbfjry"),v(a,"class","Communication incomingMessages svelte-nbfjry"),v(p,"class","Communication outgoingMessages svelte-nbfjry"),v(o,"class","arrows"),v(e,"class","ticketDetails svelte-nbfjry"),v(O,"class","Created svelte-nbfjry"),v(X,"class","Changed svelte-nbfjry")},m(x,H){N(x,e,H),y(e,i),y(i,r),y(e,s),y(e,o),y(o,a),E(u,a,null),y(a,l),y(a,c),y(c,f),y(o,h),y(o,p),E(w,p,null),y(p,C),y(p,m),y(m,Y),N(x,J,H),N(x,O,H),y(O,W),y(O,Z),E(B,O,null),N(x,ne,H),N(x,X,H),y(X,P),y(X,be),E(we,X,null),N(x,z,H),V[_].m(x,H),N(x,T,H),G=!0},p(x,H){(!G||H&2)&&n!==(n=x[1].code+"")&&le(r,n),(!G||H&2)&&d!==(d=x[1].messagegroupsIn+"")&&le(f,d),(!G||H&2)&&R!==(R=x[1].messagegroupsOut+"")&&le(Y,R);const ue={};H&2&&(ue.data=x[1].datecreated),H&4&&(ue.format=x[2]),B.$set(ue);const ke={};H&2&&(ke.data=x[1].datechanged),H&4&&(ke.format=x[2]),we.$set(ke);let me=_;_=ie(x,H),_===me?V[_].p(x,H):(_e(),$(V[me],1,1,()=>{V[me]=null}),ye(),S=V[_],S?S.p(x,H):(S=V[_]=K[_](x),S.c()),b(S,1),S.m(T.parentNode,T))},i(x){G||(b(u.$$.fragment,x),b(w.$$.fragment,x),b(B.$$.fragment,x),b(we.$$.fragment,x),b(S),G=!0)},o(x){$(u.$$.fragment,x),$(w.$$.fragment,x),$(B.$$.fragment,x),$(we.$$.fragment,x),$(S),G=!1},d(x){x&&(D(e),D(J),D(O),D(ne),D(X),D(z),D(T)),M(u),M(w),M(B),M(we),V[_].d(x)}}}function is(t){let e,i;return e=new Ot({props:{className:t[0],$$slots:{default:[ns]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&14&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function rs(t,e,i){let{className:n="importanceColumn"}=e,{row:r}=e,{format:s="YYYY-MM-DD HH:mm:ss"}=e;return t.$$set=o=>{"className"in o&&i(0,n=o.className),"row"in o&&i(1,r=o.row),"format"in o&&i(2,s=o.format)},[n,r,s]}class ss extends te{constructor(e){super(),ee(this,e,rs,is,q,{className:0,row:1,format:2},jr)}}function os(t){oe(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function as(t){let e,i;return e=new ft({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]),r&1&&(s.text=n[0]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ls(t,e,i){let n,r,s,{tagId:o}=e;return t.$$set=a=>{"tagId"in a&&i(3,o=a.tagId)},t.$$.update=()=>{var a,u,l;t.$$.dirty&8&&i(2,n=((a=translateags[o])==null?void 0:a.color)??0),t.$$.dirty&8&&i(1,r=((u=translateags[o])==null?void 0:u.backgroundcolor)??0),t.$$.dirty&8&&i(0,s=((l=translateags[o])==null?void 0:l.name)??"")},[s,r,n,o]}class us extends te{constructor(e){super(),ee(this,e,ls,as,q,{tagId:3},os)}}function Ht(t,e,i){const n=t.slice();return n[1]=e[i],n}function Yt(t){let e,i;return e=new us({props:{tagId:t[1]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function cs(t){let e,i,n=Ee(t[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(t,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){e=k("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){N(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),b(r[u],1)):(r[u]=Yt(l),r[u].c(),b(r[u],1),r[u].m(e,null))}for(_e(),u=n.length;u<r.length;u+=1)s(u);ye()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)b(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)$(r[a]);i=!1},d(o){o&&D(e),Lt(r,o)}}}function ds(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class fs extends te{constructor(e){super(),ee(this,e,ds,cs,q,{tags:0})}}function gs(t){oe(t,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function hs(t){let e,i;return e=new gt({props:{className:t[1][t[0]].text,style:"color: white; background-color: "+ut(t[0]),text:t[1][t[0]].text,iconLaClassName:t[1][t[0]].icon}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ut(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ms(t,e,i){let{status:n}=e;const r={A:{text:A("Answered"),icon:"la-ticket-answered"},T:{text:A("Chatting"),icon:"la-chatting"},P:{text:A("Calling"),icon:"la-call"},X:{text:A("Deleted"),icon:"la-ticket-deleted"},B:{text:A("Spam"),icon:"la-spam"},I:{text:A("Init"),icon:""},R:{text:A("Resolved"),icon:"la-ticket-resolved"},N:{text:A("New"),icon:"la-ticket-new"},C:{text:A("Open"),icon:"la-ticket-open"},W:{text:A("Postponed"),icon:"la-ticket-postponed"}};return t.$$set=s=>{"status"in s&&i(0,n=s.status)},[n,r]}class ps extends te{constructor(e){super(),ee(this,e,ms,hs,q,{status:0},gs)}}function vs(t){oe(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 _s(t){let e,i;return e=new gt({props:{className:"Department",text:t[0].departmentname,iconLaClassName:"la-department"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ys(t){let e,i;return e=new Ln({props:{className:"Department",tagText:t[0].agentname,iconLaClassName:"la-department",iconText:t[0].departmentname}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function bs(t){let e,i=t[0].subject+"",n,r,s,o=t[0].preview+"",a,u,l,c,d,f,h,p,w,C,m;c=new ps({props:{status:t[0].status}});const R=[ys,_s],Y=[];function J(O,W){return W&1&&(f=null),f==null&&(f=O[0].agentname.trim()!==""),f?0:1}return h=J(t,-1),p=Y[h]=R[h](t),C=new fs({props:{tags:t[0].tags}}),{c(){e=k("h1"),n=se(i),r=U(),s=k("p"),a=se(o),u=U(),l=k("div"),I(c.$$.fragment),d=U(),p.c(),w=U(),I(C.$$.fragment),v(e,"class","subject svelte-nfaksv"),v(s,"class","preview svelte-nfaksv"),v(l,"class","additional svelte-nfaksv")},m(O,W){N(O,e,W),y(e,n),N(O,r,W),N(O,s,W),y(s,a),N(O,u,W),N(O,l,W),E(c,l,null),y(l,d),Y[h].m(l,null),y(l,w),E(C,l,null),m=!0},p(O,W){(!m||W&1)&&i!==(i=O[0].subject+"")&&le(n,i),(!m||W&1)&&o!==(o=O[0].preview+"")&&le(a,o);const Z={};W&1&&(Z.status=O[0].status),c.$set(Z);let B=h;h=J(O,W),h===B?Y[h].p(O,W):(_e(),$(Y[B],1,1,()=>{Y[B]=null}),ye(),p=Y[h],p?p.p(O,W):(p=Y[h]=R[h](O),p.c()),b(p,1),p.m(l,w));const ne={};W&1&&(ne.tags=O[0].tags),C.$set(ne)},i(O){m||(b(c.$$.fragment,O),b(p),b(C.$$.fragment,O),m=!0)},o(O){$(c.$$.fragment,O),$(p),$(C.$$.fragment,O),m=!1},d(O){O&&(D(e),D(r),D(s),D(u),D(l)),M(c),Y[h].d(),M(C)}}}function ws(t){let e,i;return e=new Ot({props:{className:t[1],$$slots:{default:[bs]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ks(t,e,i){let{row:n}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class $s extends te{constructor(e){super(),ee(this,e,ks,ws,q,{row:0,className:1},vs)}}function Ts(t){oe(t,"svelte-76dgfl",`.Row.svelte-76dgfl.svelte-76dgfl{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
6
|
+
*/var gr=function(t){return t!=null&&($n(t)||hr(t)||!!t._isBuffer)};function $n(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function hr(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&$n(t.slice(0,0))}(function(){var t=fr,e=Ut.utf8,i=gr,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=t.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=271733878,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var p=r._ff,w=r._gg,C=r._hh,m=r._ii,h=0;h<a.length;h+=16){var x=l,Y=c,J=d,O=f;l=p(l,c,d,f,a[h+0],7,-680876936),f=p(f,l,c,d,a[h+1],12,-389564586),d=p(d,f,l,c,a[h+2],17,606105819),c=p(c,d,f,l,a[h+3],22,-1044525330),l=p(l,c,d,f,a[h+4],7,-176418897),f=p(f,l,c,d,a[h+5],12,1200080426),d=p(d,f,l,c,a[h+6],17,-1473231341),c=p(c,d,f,l,a[h+7],22,-45705983),l=p(l,c,d,f,a[h+8],7,1770035416),f=p(f,l,c,d,a[h+9],12,-1958414417),d=p(d,f,l,c,a[h+10],17,-42063),c=p(c,d,f,l,a[h+11],22,-1990404162),l=p(l,c,d,f,a[h+12],7,1804603682),f=p(f,l,c,d,a[h+13],12,-40341101),d=p(d,f,l,c,a[h+14],17,-1502002290),c=p(c,d,f,l,a[h+15],22,1236535329),l=w(l,c,d,f,a[h+1],5,-165796510),f=w(f,l,c,d,a[h+6],9,-1069501632),d=w(d,f,l,c,a[h+11],14,643717713),c=w(c,d,f,l,a[h+0],20,-373897302),l=w(l,c,d,f,a[h+5],5,-701558691),f=w(f,l,c,d,a[h+10],9,38016083),d=w(d,f,l,c,a[h+15],14,-660478335),c=w(c,d,f,l,a[h+4],20,-405537848),l=w(l,c,d,f,a[h+9],5,568446438),f=w(f,l,c,d,a[h+14],9,-1019803690),d=w(d,f,l,c,a[h+3],14,-187363961),c=w(c,d,f,l,a[h+8],20,1163531501),l=w(l,c,d,f,a[h+13],5,-1444681467),f=w(f,l,c,d,a[h+2],9,-51403784),d=w(d,f,l,c,a[h+7],14,1735328473),c=w(c,d,f,l,a[h+12],20,-1926607734),l=C(l,c,d,f,a[h+5],4,-378558),f=C(f,l,c,d,a[h+8],11,-2022574463),d=C(d,f,l,c,a[h+11],16,1839030562),c=C(c,d,f,l,a[h+14],23,-35309556),l=C(l,c,d,f,a[h+1],4,-1530992060),f=C(f,l,c,d,a[h+4],11,1272893353),d=C(d,f,l,c,a[h+7],16,-155497632),c=C(c,d,f,l,a[h+10],23,-1094730640),l=C(l,c,d,f,a[h+13],4,681279174),f=C(f,l,c,d,a[h+0],11,-358537222),d=C(d,f,l,c,a[h+3],16,-722521979),c=C(c,d,f,l,a[h+6],23,76029189),l=C(l,c,d,f,a[h+9],4,-640364487),f=C(f,l,c,d,a[h+12],11,-421815835),d=C(d,f,l,c,a[h+15],16,530742520),c=C(c,d,f,l,a[h+2],23,-995338651),l=m(l,c,d,f,a[h+0],6,-198630844),f=m(f,l,c,d,a[h+7],10,1126891415),d=m(d,f,l,c,a[h+14],15,-1416354905),c=m(c,d,f,l,a[h+5],21,-57434055),l=m(l,c,d,f,a[h+12],6,1700485571),f=m(f,l,c,d,a[h+3],10,-1894986606),d=m(d,f,l,c,a[h+10],15,-1051523),c=m(c,d,f,l,a[h+1],21,-2054922799),l=m(l,c,d,f,a[h+8],6,1873313359),f=m(f,l,c,d,a[h+15],10,-30611744),d=m(d,f,l,c,a[h+6],15,-1560198380),c=m(c,d,f,l,a[h+13],21,1309151649),l=m(l,c,d,f,a[h+4],6,-145523070),f=m(f,l,c,d,a[h+11],10,-1120210379),d=m(d,f,l,c,a[h+2],15,718787259),c=m(c,d,f,l,a[h+9],21,-343485551),l=l+x>>>0,c=c+Y>>>0,d=d+J>>>0,f=f+O>>>0}return t.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,wn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=t.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):t.bytesToHex(a)}})();var mr=wn.exports;const pr=Nt(mr);function _r(t){return[...t].reduce((e,i)=>Math.imul(31,e)+i.charCodeAt(0)|0,0)}function vr(t){oe(t,"svelte-in3p8g",".Column.svelte-in3p8g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(min-width: 768px){.Column.importanceColumn.svelte-in3p8g{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}}")}function yr(t){let e,i,n;const r=t[2].default,s=Me(r,t,t[1],null);return{c(){e=k("div"),s&&s.c(),_(e,"class",i="Column "+t[0]+" svelte-in3p8g")},m(o,a){N(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Be(s,r,o,o[1],n?Ie(r,o[1],a,null):Ke(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-in3p8g"))&&_(e,"class",i)},i(o){n||(b(s,o),n=!0)},o(o){$(s,o),n=!1},d(o){o&&D(e),s&&s.d(o)}}}function br(t,e,i){let{$$slots:n={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class Ot extends te{constructor(e){super(),ee(this,e,br,yr,q,{className:0},vr)}}function wr(t){oe(t,"svelte-1d2a8s6",'.Tag.svelte-1d2a8s6{display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-1d2a8s6:before{font-family:"la-icon-font"}.SLA.svelte-1d2a8s6{border:1px solid #CFD6DD;border-radius:4px}')}function kr(t){let e,i,n,r,s,o;const a=t[4].default,u=Me(a,t,t[3],null);return{c(){e=k("div"),u&&u.c(),i=U(),n=k("span"),r=se(t[0]),_(n,"class","text"),_(e,"class",s="Tag "+t[1]+" svelte-1d2a8s6"),_(e,"style",t[2])},m(l,c){N(l,e,c),u&&u.m(e,null),y(e,i),y(e,n),y(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?Ie(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&le(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&_(e,"class",s),(!o||c&4)&&_(e,"style",l[2])},i(l){o||(b(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&D(e),u&&u.d(l)}}}function $r(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return t.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class ft extends te{constructor(e){super(),ee(this,e,$r,kr,q,{text:0,className:1,style:2},wr)}}function Tr(t){oe(t,"svelte-1ify73x","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}.IconTag .Icon{display:flex;align-items:center;justify-content:center;font-size:16px;width:16px;height:16px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Cr(t){let e,i;return e=new $e({props:{iconLaClassName:t[2]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Lr(t){let e,i;return e=new ft({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Cr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Sr(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconLaClassName:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class gt extends te{constructor(e){super(),ee(this,e,Sr,Lr,q,{text:0,className:4,style:1,iconLaClassName:2},Tr)}}function Dr(t){oe(t,"svelte-416m4x",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-416m4x{display:none}.companyTag.svelte-416m4x{display:none}.name.svelte-416m4x{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;margin-right:6px;border-right:1px solid var(--main-textcolor)}.no.name.svelte-416m4x{display:none;border-right:none}.email.svelte-416m4x{font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.texts.svelte-416m4x{display:flex;flex-direction:row;justify-content:flex-start;overflow:hidden}@media(min-width: 900px){.avatar.svelte-416m4x{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-416m4x{padding:0;border:none}.email.svelte-416m4x{padding:0}.companyTag.svelte-416m4x{display:flex}.texts.svelte-416m4x{display:flex;flex-direction:column;justify-content:center}}")}function Wt(t){let e,i;return e=new dr({props:{bgColor:t[5](t[0]),name:t[3](t[0]),src:t[4](t[0])}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[5](n[0])),r&1&&(s.name=n[3](n[0])),r&1&&(s.src=n[4](n[0])),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Nr(t){let e,i=[t[5](t[0]),t[3](t[0]),t[4](t[0])],n,r,s,o,a,u,l,c=t[0].emails+"",d,f,h,p,w,C=Wt(t);return p=new gt({props:{text:t[0].company==="Y"?"Company":A("No Company"),className:(t[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){e=k("div"),C.c(),n=U(),r=k("div"),s=k("div"),o=se(t[2]),u=U(),l=k("div"),d=se(c),f=U(),h=k("div"),I(p.$$.fragment),_(e,"class","avatar svelte-416m4x"),_(s,"class",a=fe(t[2]?"name":"no name")+" svelte-416m4x"),_(l,"class","email svelte-416m4x"),_(h,"class","companyTag svelte-416m4x"),_(r,"class","texts svelte-416m4x")},m(m,x){N(m,e,x),C.m(e,null),N(m,n,x),N(m,r,x),y(r,s),y(s,o),y(r,u),y(r,l),y(l,d),y(r,f),y(r,h),E(p,h,null),w=!0},p(m,x){x&1&&q(i,i=[m[5](m[0]),m[3](m[0]),m[4](m[0])])?(ve(),$(C,1,1,Q),ye(),C=Wt(m),C.c(),b(C,1),C.m(e,null)):C.p(m,x),(!w||x&4)&&le(o,m[2]),(!w||x&4&&a!==(a=fe(m[2]?"name":"no name")+" svelte-416m4x"))&&_(s,"class",a),(!w||x&1)&&c!==(c=m[0].emails+"")&&le(d,c);const Y={};x&1&&(Y.text=m[0].company==="Y"?"Company":A("No Company")),x&1&&(Y.className=(m[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),p.$set(Y)},i(m){w||(b(C),b(p.$$.fragment,m),w=!0)},o(m){$(C),$(p.$$.fragment,m),w=!1},d(m){m&&(D(e),D(n),D(r)),C.d(m),M(p)}}}function Or(t){let e,i;return e=new Ot({props:{className:t[1],$$slots:{default:[Nr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&69&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Fr(t,e,i){let n,{row:r}=e,{className:s="userColumn"}=e;function o(l){if(!l)return"";let c=l.firstname+" "+l.lastname;return c.trim()||(c=l.systemName),c}function a(l){let c=l.avatarUrl;return c||(c="https://www.gravatar.com/avatar/"+pr(l.emails[0]??"")+"?s=200&d=404"),c}function u(l){let c;l?c=_r(o(l)+l.emails):c=Math.floor(Math.random()*16777215);let d=(c&16711680)>>16,f=(c&65280)>>8,h=c&255;return d+f+h<150&&(d=150),d+f+h>400&&(d=0),`rgb(${d},${f},${h})`}return t.$$set=l=>{"row"in l&&i(0,r=l.row),"className"in l&&i(1,s=l.className)},t.$$.update=()=>{t.$$.dirty&1&&i(2,n=r.name)},[r,s,n,o,a,u]}class xr extends te{constructor(e){super(),ee(this,e,Fr,Or,q,{row:0,className:1},Dr)}}var Tn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(bn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",h="year",p="date",w="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var L=["th","st","nd","rd"],v=z%100;return"["+z+(L[(v-20)%10]||L[v]||L[0])+"]"}},Y=function(z,L,v){var S=String(z);return!S||S.length>=L?z:""+Array(L+1-S.length).join(v)+z},J={s:Y,z:function(z){var L=-z.utcOffset(),v=Math.abs(L),S=Math.floor(v/60),T=v%60;return(L<=0?"+":"-")+Y(S,2,"0")+":"+Y(T,2,"0")},m:function z(L,v){if(L.date()<v.date())return-z(v,L);var S=12*(v.year()-L.year())+(v.month()-L.month()),T=L.clone().add(S,d),G=v-T<0,K=L.clone().add(S+(G?-1:1),d);return+(-(S+(v-T)/(G?T-K:K-T))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:d,y:h,w:c,d:l,D:p,h:u,m:a,s:o,ms:s,Q:f}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},O="en",W={};W[O]=x;var Z="$isDayjsObject",B=function(z){return z instanceof be||!(!z||!z[Z])},ne=function z(L,v,S){var T;if(!L)return O;if(typeof L=="string"){var G=L.toLowerCase();W[G]&&(T=G),v&&(W[G]=v,T=G);var K=L.split("-");if(!T&&K.length>1)return z(K[0])}else{var V=L.name;W[V]=L,T=V}return!S&&T&&(O=T),T||!S&&O},X=function(z,L){if(B(z))return z.clone();var v=typeof L=="object"?L:{};return v.date=z,v.args=arguments,new be(v)},P=J;P.l=ne,P.i=B,P.w=function(z,L){return X(z,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var be=function(){function z(v){this.$L=ne(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[Z]=!0}var L=z.prototype;return L.parse=function(v){this.$d=function(S){var T=S.date,G=S.utc;if(T===null)return new Date(NaN);if(P.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var K=T.match(C);if(K){var V=K[2]-1||0,ie=(K[7]||"0").substring(0,3);return G?new Date(Date.UTC(K[1],V,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ie)):new Date(K[1],V,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ie)}}return new Date(T)}(v),this.init()},L.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},L.$utils=function(){return P},L.isValid=function(){return this.$d.toString()!==w},L.isSame=function(v,S){var T=X(v);return this.startOf(S)<=T&&T<=this.endOf(S)},L.isAfter=function(v,S){return X(v)<this.startOf(S)},L.isBefore=function(v,S){return this.endOf(S)<X(v)},L.$g=function(v,S,T){return P.u(v)?this[S]:this.set(T,v)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(v,S){var T=this,G=!!P.u(S)||S,K=P.p(v),V=function(Le,de){var Te=P.w(T.$u?Date.UTC(T.$y,de,Le):new Date(T.$y,de,Le),T);return G?Te:Te.endOf(l)},ie=function(Le,de){return P.w(T.toDate()[Le].apply(T.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(de)),T)},F=this.$W,H=this.$M,ue=this.$D,ke="set"+(this.$u?"UTC":"");switch(K){case h:return G?V(1,0):V(31,11);case d:return G?V(1,H):V(0,H+1);case c:var me=this.$locale().weekStart||0,Je=(F<me?F+7:F)-me;return V(G?ue-Je:ue+(6-Je),H);case l:case p:return ie(ke+"Hours",0);case u:return ie(ke+"Minutes",1);case a:return ie(ke+"Seconds",2);case o:return ie(ke+"Milliseconds",3);default:return this.clone()}},L.endOf=function(v){return this.startOf(v,!1)},L.$set=function(v,S){var T,G=P.p(v),K="set"+(this.$u?"UTC":""),V=(T={},T[l]=K+"Date",T[p]=K+"Date",T[d]=K+"Month",T[h]=K+"FullYear",T[u]=K+"Hours",T[a]=K+"Minutes",T[o]=K+"Seconds",T[s]=K+"Milliseconds",T)[G],ie=G===l?this.$D+(S-this.$W):S;if(G===d||G===h){var F=this.clone().set(p,1);F.$d[V](ie),F.init(),this.$d=F.set(p,Math.min(this.$D,F.daysInMonth())).$d}else V&&this.$d[V](ie);return this.init(),this},L.set=function(v,S){return this.clone().$set(v,S)},L.get=function(v){return this[P.p(v)]()},L.add=function(v,S){var T,G=this;v=Number(v);var K=P.p(S),V=function(H){var ue=X(G);return P.w(ue.date(ue.date()+Math.round(H*v)),G)};if(K===d)return this.set(d,this.$M+v);if(K===h)return this.set(h,this.$y+v);if(K===l)return V(1);if(K===c)return V(7);var ie=(T={},T[a]=n,T[u]=r,T[o]=i,T)[K]||1,F=this.$d.getTime()+v*ie;return P.w(F,this)},L.subtract=function(v,S){return this.add(-1*v,S)},L.format=function(v){var S=this,T=this.$locale();if(!this.isValid())return T.invalidDate||w;var G=v||"YYYY-MM-DDTHH:mm:ssZ",K=P.z(this),V=this.$H,ie=this.$m,F=this.$M,H=T.weekdays,ue=T.months,ke=T.meridiem,me=function(de,Te,Ue,it){return de&&(de[Te]||de(S,G))||Ue[Te].slice(0,it)},Je=function(de){return P.s(V%12||12,de,"0")},Le=ke||function(de,Te,Ue){var it=de<12?"AM":"PM";return Ue?it.toLowerCase():it};return G.replace(m,function(de,Te){return Te||function(Ue){switch(Ue){case"YY":return String(S.$y).slice(-2);case"YYYY":return P.s(S.$y,4,"0");case"M":return F+1;case"MM":return P.s(F+1,2,"0");case"MMM":return me(T.monthsShort,F,ue,3);case"MMMM":return me(ue,F);case"D":return S.$D;case"DD":return P.s(S.$D,2,"0");case"d":return String(S.$W);case"dd":return me(T.weekdaysMin,S.$W,H,2);case"ddd":return me(T.weekdaysShort,S.$W,H,3);case"dddd":return H[S.$W];case"H":return String(V);case"HH":return P.s(V,2,"0");case"h":return Je(1);case"hh":return Je(2);case"a":return Le(V,ie,!0);case"A":return Le(V,ie,!1);case"m":return String(ie);case"mm":return P.s(ie,2,"0");case"s":return String(S.$s);case"ss":return P.s(S.$s,2,"0");case"SSS":return P.s(S.$ms,3,"0");case"Z":return K}return null}(de)||K.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(v,S,T){var G,K=this,V=P.p(S),ie=X(v),F=(ie.utcOffset()-this.utcOffset())*n,H=this-ie,ue=function(){return P.m(K,ie)};switch(V){case h:G=ue()/12;break;case d:G=ue();break;case f:G=ue()/3;break;case c:G=(H-F)/6048e5;break;case l:G=(H-F)/864e5;break;case u:G=H/r;break;case a:G=H/n;break;case o:G=H/i;break;default:G=H}return T?G:P.a(G)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return W[this.$L]},L.locale=function(v,S){if(!v)return this.$L;var T=this.clone(),G=ne(v,S,!0);return G&&(T.$L=G),T},L.clone=function(){return P.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},z}(),we=be.prototype;return X.prototype=we,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",p]].forEach(function(z){we[z[1]]=function(L){return this.$g(L,z[0],z[1])}}),X.extend=function(z,L){return z.$i||(z(L,be,X),z.$i=!0),X},X.locale=ne,X.isDayjs=B,X.unix=function(z){return X(1e3*z)},X.en=W[O],X.Ls=W,X.p={},X})})(Tn);var Rr=Tn.exports;const Ye=Nt(Rr);var Cn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(bn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,h){for(var p,w,C,m=d.$locale().relativeTime||o,x=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=x.length,J=0;J<Y;J+=1){var O=x[J];O.d&&(p=f?r(l).diff(d,O.d,!0):d.diff(l,O.d,!0));var W=(i.rounding||Math.round)(Math.abs(p));if(C=p>0,W<=O.r||!O.r){W<=1&&J>0&&(O=x[J-1]);var Z=m[O.l];h&&(W=h(""+W)),w=typeof Z=="string"?Z.replace("%d",W):Z(W,c,O.l,C);break}}if(c)return w;var B=C?m.future:m.past;return typeof B=="function"?B(w):B.replace("%s",w)},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)}}})})(Cn);var Ar=Cn.exports;const Gr=Nt(Ar);Ye.extend(Gr);function zr(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=at(r,n[s]);return{c(){e=k("time"),i=se(t[0]),zt(e,r)},m(s,o){N(s,e,o),y(e,i)},p(s,[o]){o&1&&Un(i,s[0],r.contenteditable),zt(e,r=Zn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Q,o:Q,d(s){s&&D(e)}}}function Er(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Gt(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,d;const f=60*1e3;return ct(()=>()=>clearInterval(d)),t.$$set=h=>{e=at(at({},e),zn(h)),i(3,s=Gt(e,r)),"timestamp"in h&&i(1,o=h.timestamp),"format"in h&&i(4,a=h.format),"relative"in h&&i(5,u=h.relative),"live"in h&&i(6,l=h.live),"formatted"in h&&i(0,c=h.formatted)},t.$$.update=()=>{t.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Ye(o).from())},Math.abs(typeof l=="number"?l:f))),t.$$.dirty&50&&i(0,c=u?Ye(o).from():Ye(o).format(a)),t.$$.dirty&50&&i(2,n=u?Ye(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Mr extends te{constructor(e){super(),ee(this,e,Er,zr,q,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Ir(t){oe(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Br(t){let e;return{c(){e=k("span"),e.textContent=`${A("Invalid data")}`,_(e,"class","invalid svelte-1o3wy2t")},m(i,n){N(i,e,n)},p:Q,i:Q,o:Q,d(i){i&&D(e)}}}function Kr(t){let e,i;return e=new Mr({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Jr(t){let e,i,n,r,s;const o=[Kr,Br],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(t,-1),r=a[n]=o[n](t),{c(){e=k("div"),r.c(),_(e,"class","Date svelte-1o3wy2t")},m(l,c){N(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(ve(),$(a[d],1,1,()=>{a[d]=null}),ye(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),b(r,1),r.m(e,null))},i(l){s||(b(r),s=!0)},o(l){$(r),s=!1},d(l){l&&D(e),a[n].d()}}}function Ur(t,e,i){let{data:n}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&i(0,n=a.data),"format"in a&&i(1,r=a.format),"style"in a&&i(2,s=a.style),"relative"in a&&i(3,o=a.relative)},[n,r,s,o]}class $t extends te{constructor(e){super(),ee(this,e,Ur,Jr,q,{data:0,format:1,style:2,relative:3},Ir)}}function Wr(t){oe(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function Hr(t){let e,i,n,r;i=new $e({props:{iconLaClassName:t[2]}});const s=t[8].default,o=Me(s,t,t[7],null);return{c(){e=k("div"),I(i.$$.fragment),n=U(),o&&o.c(),_(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){N(a,e,u),E(i,e,null),N(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Be(o,s,a,a[7],r?Ie(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(b(i.$$.fragment,a),b(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(D(e),D(n)),M(i),o&&o.d(a)}}}function Yr(t){let e,i;return e=new gt({props:{style:t[3],text:t[0],iconLaClassName:t[2],className:"Combined"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Pr(t){let e,i,n,r,s,o;const a=[Yr,Hr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new ft({props:{style:t[4],text:t[1]}}),{c(){e=k("div"),n.c(),r=U(),I(s.$$.fragment),_(e,"class",fe(t[5])+" svelte-1wdh20c")},m(c,d){N(c,e,d),u[i].m(e,null),y(e,r),E(s,e,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(ve(),$(u[f],1,1,()=>{u[f]=null}),ye(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),b(n,1),n.m(e,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(b(n),b(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&D(e),u[i].d(),M(s)}}}function Vr(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconLaClassName:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return t.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class Ln extends te{constructor(e){super(),ee(this,e,Vr,Pr,q,{iconText:0,tagText:1,iconLaClassName:2,className:6},Wr)}}function Qr(t){let e,i;return e=new $t({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Zr(t){let e,i;return e=new Ln({props:{iconLaClassName:t[3],tagText:t[0],className:t[2],$$slots:{default:[Qr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Xr(t,e,i){let n,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class qr extends te{constructor(e){super(),ee(this,e,Xr,Zr,q,{tagText:0,due:1})}}function jr(t){oe(t,"svelte-nbfjry",".TicketId.svelte-nbfjry{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-nbfjry{font-size:13px;line-height:20px}.Communication.svelte-nbfjry{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}.ticketDetails.svelte-nbfjry{display:flex;align-items:center;justify-content:space-between}@media(min-width: 900px){.Changed.svelte-nbfjry{display:none}}")}function es(t){let e,i;return e=new ft({props:{text:A("No SLA"),className:"SLA"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p:Q,i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ts(t){let e,i;return e=new qr({props:{tagText:"First answer",due:t[1].datedue}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ns(t){let e,i,n=t[1].code+"",r,s,o,a,u,l,c,d=t[1].messagegroupsIn+"",f,h,p,w,C,m,x=t[1].messagegroupsOut+"",Y,J,O,W,Z,B,ne,X,P,be,we,z,L,v,S,T,G;u=new $e({props:{iconLaClassName:"la-incoming"}}),w=new $e({props:{iconLaClassName:"la-outgoing"}}),B=new $t({props:{data:t[1].datecreated,format:t[2]}}),we=new $t({props:{data:t[1].datechanged,format:t[2]}});const K=[ts,es],V=[];function ie(F,H){return H&2&&(L=null),L==null&&(L=F[1].datedue instanceof Date&&!isNaN(F[1].datedue)),L?0:1}return v=ie(t,-1),S=V[v]=K[v](t),{c(){e=k("div"),i=k("span"),r=se(n),s=U(),o=k("div"),a=k("div"),I(u.$$.fragment),l=U(),c=k("span"),f=se(d),h=U(),p=k("div"),I(w.$$.fragment),C=U(),m=k("span"),Y=se(x),J=U(),O=k("div"),W=k("span"),W.textContent=`${A("Created")}:`,Z=U(),I(B.$$.fragment),ne=U(),X=k("div"),P=k("span"),P.textContent=`${A("Changed")}:`,be=U(),I(we.$$.fragment),z=U(),S.c(),T=tt(),_(i,"class","TicketId svelte-nbfjry"),_(a,"class","Communication incomingMessages svelte-nbfjry"),_(p,"class","Communication outgoingMessages svelte-nbfjry"),_(o,"class","arrows"),_(e,"class","ticketDetails svelte-nbfjry"),_(O,"class","Created svelte-nbfjry"),_(X,"class","Changed svelte-nbfjry")},m(F,H){N(F,e,H),y(e,i),y(i,r),y(e,s),y(e,o),y(o,a),E(u,a,null),y(a,l),y(a,c),y(c,f),y(o,h),y(o,p),E(w,p,null),y(p,C),y(p,m),y(m,Y),N(F,J,H),N(F,O,H),y(O,W),y(O,Z),E(B,O,null),N(F,ne,H),N(F,X,H),y(X,P),y(X,be),E(we,X,null),N(F,z,H),V[v].m(F,H),N(F,T,H),G=!0},p(F,H){(!G||H&2)&&n!==(n=F[1].code+"")&&le(r,n),(!G||H&2)&&d!==(d=F[1].messagegroupsIn+"")&&le(f,d),(!G||H&2)&&x!==(x=F[1].messagegroupsOut+"")&&le(Y,x);const ue={};H&2&&(ue.data=F[1].datecreated),H&4&&(ue.format=F[2]),B.$set(ue);const ke={};H&2&&(ke.data=F[1].datechanged),H&4&&(ke.format=F[2]),we.$set(ke);let me=v;v=ie(F,H),v===me?V[v].p(F,H):(ve(),$(V[me],1,1,()=>{V[me]=null}),ye(),S=V[v],S?S.p(F,H):(S=V[v]=K[v](F),S.c()),b(S,1),S.m(T.parentNode,T))},i(F){G||(b(u.$$.fragment,F),b(w.$$.fragment,F),b(B.$$.fragment,F),b(we.$$.fragment,F),b(S),G=!0)},o(F){$(u.$$.fragment,F),$(w.$$.fragment,F),$(B.$$.fragment,F),$(we.$$.fragment,F),$(S),G=!1},d(F){F&&(D(e),D(J),D(O),D(ne),D(X),D(z),D(T)),M(u),M(w),M(B),M(we),V[v].d(F)}}}function is(t){let e,i;return e=new Ot({props:{className:t[0],$$slots:{default:[ns]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&14&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function rs(t,e,i){let{className:n="importanceColumn"}=e,{row:r}=e,{format:s="YYYY-MM-DD HH:mm:ss"}=e;return t.$$set=o=>{"className"in o&&i(0,n=o.className),"row"in o&&i(1,r=o.row),"format"in o&&i(2,s=o.format)},[n,r,s]}class ss extends te{constructor(e){super(),ee(this,e,rs,is,q,{className:0,row:1,format:2},jr)}}function os(t){oe(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function as(t){let e,i;return e=new ft({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]),r&1&&(s.text=n[0]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ls(t,e,i){let n,r,s,{tagId:o}=e;return t.$$set=a=>{"tagId"in a&&i(3,o=a.tagId)},t.$$.update=()=>{var a,u,l;t.$$.dirty&8&&i(2,n=((a=translateags[o])==null?void 0:a.color)??0),t.$$.dirty&8&&i(1,r=((u=translateags[o])==null?void 0:u.backgroundcolor)??0),t.$$.dirty&8&&i(0,s=((l=translateags[o])==null?void 0:l.name)??"")},[s,r,n,o]}class us extends te{constructor(e){super(),ee(this,e,ls,as,q,{tagId:3},os)}}function Ht(t,e,i){const n=t.slice();return n[1]=e[i],n}function Yt(t){let e,i;return e=new us({props:{tagId:t[1]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function cs(t){let e,i,n=Ee(t[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(t,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){e=k("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){N(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),b(r[u],1)):(r[u]=Yt(l),r[u].c(),b(r[u],1),r[u].m(e,null))}for(ve(),u=n.length;u<r.length;u+=1)s(u);ye()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)b(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)$(r[a]);i=!1},d(o){o&&D(e),Lt(r,o)}}}function ds(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class fs extends te{constructor(e){super(),ee(this,e,ds,cs,q,{tags:0})}}function gs(t){oe(t,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function hs(t){let e,i;return e=new gt({props:{className:t[1][t[0]].text,style:"color: white; background-color: "+ut(t[0]),text:t[1][t[0]].text,iconLaClassName:t[1][t[0]].icon}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ut(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ms(t,e,i){let{status:n}=e;const r={A:{text:A("Answered"),icon:"la-ticket-answered"},T:{text:A("Chatting"),icon:"la-chatting"},P:{text:A("Calling"),icon:"la-call"},X:{text:A("Deleted"),icon:"la-ticket-deleted"},B:{text:A("Spam"),icon:"la-spam"},I:{text:A("Init"),icon:""},R:{text:A("Resolved"),icon:"la-ticket-resolved"},N:{text:A("New"),icon:"la-ticket-new"},C:{text:A("Open"),icon:"la-ticket-open"},W:{text:A("Postponed"),icon:"la-ticket-postponed"}};return t.$$set=s=>{"status"in s&&i(0,n=s.status)},[n,r]}class ps extends te{constructor(e){super(),ee(this,e,ms,hs,q,{status:0},gs)}}function _s(t){oe(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 vs(t){let e,i;return e=new gt({props:{className:"Department",text:t[0].departmentname,iconLaClassName:"la-department"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ys(t){let e,i;return e=new Ln({props:{className:"Department",tagText:t[0].agentname,iconLaClassName:"la-department",iconText:t[0].departmentname}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function bs(t){let e,i=t[0].subject+"",n,r,s,o=t[0].preview+"",a,u,l,c,d,f,h,p,w,C,m;c=new ps({props:{status:t[0].status}});const x=[ys,vs],Y=[];function J(O,W){return W&1&&(f=null),f==null&&(f=O[0].agentname.trim()!==""),f?0:1}return h=J(t,-1),p=Y[h]=x[h](t),C=new fs({props:{tags:t[0].tags}}),{c(){e=k("h1"),n=se(i),r=U(),s=k("p"),a=se(o),u=U(),l=k("div"),I(c.$$.fragment),d=U(),p.c(),w=U(),I(C.$$.fragment),_(e,"class","subject svelte-nfaksv"),_(s,"class","preview svelte-nfaksv"),_(l,"class","additional svelte-nfaksv")},m(O,W){N(O,e,W),y(e,n),N(O,r,W),N(O,s,W),y(s,a),N(O,u,W),N(O,l,W),E(c,l,null),y(l,d),Y[h].m(l,null),y(l,w),E(C,l,null),m=!0},p(O,W){(!m||W&1)&&i!==(i=O[0].subject+"")&&le(n,i),(!m||W&1)&&o!==(o=O[0].preview+"")&&le(a,o);const Z={};W&1&&(Z.status=O[0].status),c.$set(Z);let B=h;h=J(O,W),h===B?Y[h].p(O,W):(ve(),$(Y[B],1,1,()=>{Y[B]=null}),ye(),p=Y[h],p?p.p(O,W):(p=Y[h]=x[h](O),p.c()),b(p,1),p.m(l,w));const ne={};W&1&&(ne.tags=O[0].tags),C.$set(ne)},i(O){m||(b(c.$$.fragment,O),b(p),b(C.$$.fragment,O),m=!0)},o(O){$(c.$$.fragment,O),$(p),$(C.$$.fragment,O),m=!1},d(O){O&&(D(e),D(r),D(s),D(u),D(l)),M(c),Y[h].d(),M(C)}}}function ws(t){let e,i;return e=new Ot({props:{className:t[1],$$slots:{default:[bs]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ks(t,e,i){let{row:n}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class $s extends te{constructor(e){super(),ee(this,e,ks,ws,q,{row:0,className:1},_s)}}function Ts(t){oe(t,"svelte-76dgfl",`.Row.svelte-76dgfl.svelte-76dgfl{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
7
7
|
"checkbox status"
|
|
8
8
|
"checkbox importance";border-radius:12px;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.10);border-bottom:1px solid var(--menu-selected-bg);padding-top:6px;padding-bottom:6px;margin-bottom:6px;background-color:var(--main-background)}.Row.svelte-76dgfl.svelte-76dgfl:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-76dgfl.svelte-76dgfl{background-color:var(--menu-selected-bg) !important}.UserColumn.svelte-76dgfl.svelte-76dgfl{grid-area:user}.StatusColumn.svelte-76dgfl.svelte-76dgfl{grid-area:status;display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-76dgfl.svelte-76dgfl{grid-area:importance}.Checkbox.svelte-76dgfl.svelte-76dgfl{grid-area:checkbox;position:relative}.StatusBar.svelte-76dgfl.svelte-76dgfl{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px;transition:width 0.1s ease}.Row.svelte-76dgfl:hover .StatusBar.svelte-76dgfl{width:10px}input.svelte-76dgfl.svelte-76dgfl{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-76dgfl.svelte-76dgfl{display:grid;grid-template-areas:"checkbox user importance"
|
|
9
|
-
"checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px;column-gap:6px}}@media(min-width: 900px){.Row.svelte-76dgfl.svelte-76dgfl{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 180px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-76dgfl.svelte-76dgfl{grid-template-columns:60px 260px auto 230px}}`)}function Pt(t,e,i){const n=t.slice();return n[9]=e[i],n[10]=e,n[11]=i,n}function Vt(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,p,w,C,m,R,Y;function J(){t[5].call(s,t[11])}function O(...B){return t[6](t[11],...B)}l=new Rr({props:{row:t[9]}}),f=new $s({props:{row:t[9]}}),w=new ss({props:{row:t[9]}});function W(){return t[7](t[9])}function Z(...B){return t[8](t[9],...B)}return{c(){e=k("div"),i=k("div"),n=k("div"),r=U(),s=k("input"),a=U(),u=k("div"),I(l.$$.fragment),c=U(),d=k("div"),I(f.$$.fragment),h=U(),p=k("div"),I(w.$$.fragment),v(n,"class","StatusBar svelte-76dgfl"),mt(n,"background-color",ut(t[9].status)),v(s,"type","checkbox"),s.__value=o=t[9].conversationid,Et(s,s.__value),v(s,"class","svelte-76dgfl"),v(i,"class","Checkbox svelte-76dgfl"),mt(i,"position","relative"),v(u,"class","UserColumn svelte-76dgfl"),v(d,"class","StatusColumn svelte-76dgfl"),v(p,"class","ImportanceColumn svelte-76dgfl"),v(e,"class",C="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-76dgfl")},m(B,ne){N(B,e,ne),y(e,i),y(i,n),y(i,r),y(i,s),s.checked=t[1][t[11]].__selected,y(e,a),y(e,u),E(l,u,null),y(e,c),y(e,d),E(f,d,null),y(e,h),y(e,p),E(w,p,null),m=!0,R||(Y=[ae(s,"change",J),ae(s,"click",yt(O)),ae(i,"click",yt(Ls)),ae(e,"click",W),ae(e,"mousedown",Z)],R=!0)},p(B,ne){t=B,(!m||ne&2)&&mt(n,"background-color",ut(t[9].status)),(!m||ne&2&&o!==(o=t[9].conversationid))&&(s.__value=o,Et(s,s.__value)),ne&2&&(s.checked=t[1][t[11]].__selected);const X={};ne&2&&(X.row=t[9]),l.$set(X);const P={};ne&2&&(P.row=t[9]),f.$set(P);const be={};ne&2&&(be.row=t[9]),w.$set(be),(!m||ne&2&&C!==(C="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-76dgfl"))&&v(e,"class",C)},i(B){m||(b(l.$$.fragment,B),b(f.$$.fragment,B),b(w.$$.fragment,B),m=!0)},o(B){$(l.$$.fragment,B),$(f.$$.fragment,B),$(w.$$.fragment,B),m=!1},d(B){B&&D(e),M(l),M(f),M(w),R=!1,Ce(Y)}}}function Cs(t){let e,i,n,r=Ee(t[1]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(t,r,l));const o=l=>$(s[l],1,1,()=>{s[l]=null}),a=t[4].default,u=Ie(a,t,t[3],null);return{c(){e=k("div");for(let l=0;l<s.length;l+=1)s[l].c();i=U(),u&&u.c(),v(e,"class","Body")},m(l,c){N(l,e,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(e,null);y(e,i),u&&u.m(e,null),n=!0},p(l,[c]){if(c&7){r=Ee(l[1]);let d;for(d=0;d<r.length;d+=1){const f=Pt(l,r,d);s[d]?(s[d].p(f,c),b(s[d],1)):(s[d]=Vt(f),s[d].c(),b(s[d],1),s[d].m(e,i))}for(_e(),d=r.length;d<s.length;d+=1)o(d);ye()}u&&u.p&&(!n||c&8)&&Ke(u,a,l,l[3],n?Be(a,l[3],c,null):Je(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)b(s[c]);b(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)$(s[c]);$(u,l),n=!1},d(l){l&&D(e),Lt(s,l),u&&u.d(l)}}}const Ls=()=>{};function Ss(t,e,i){let n;re(t,ve,f=>i(1,n=f));let{$$slots:r={},$$scope:s}=e,{middleclickhandler:o}=e;function a(f,h){if(f.shiftKey){let p=n.findIndex(w=>w.__selected);if(p!==-1){let w=Math.min(p,h),C=Math.max(p,h);for(let m=w;m<=C;m++)un(ve,n[m].__selected=!0,n)}}}function u(f){n[f].__selected=this.checked,ve.set(n)}const l=(f,h)=>a(h,f),c=f=>location.assign("#Conversation;id="+f.conversationid),d=(f,h)=>{h.button===1&&o&&(o(f.conversationid),h.preventDefault(),h.stopPropagation())};return t.$$set=f=>{"middleclickhandler"in f&&i(0,o=f.middleclickhandler),"$$scope"in f&&i(3,s=f.$$scope)},[o,n,a,s,r,u,l,c,d]}class Ds extends te{constructor(e){super(),ee(this,e,Ss,Cs,q,{middleclickhandler:0},Ts)}}function Ns(t){oe(t,"svelte-1nok758","div.svelte-1nok758{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Os(t){let e,i,n;return{c(){e=k("div"),i=k("p"),n=se(t[0]),v(e,"class","svelte-1nok758")},m(r,s){N(r,e,s),y(e,i),y(i,n)},p(r,[s]){s&1&&le(n,r[0])},i:Q,o:Q,d(r){r&&D(e)}}}function xs(t,e,i){let n,r,s,o,a;return re(t,Ne,u=>i(1,r=u)),re(t,ve,u=>i(2,s=u)),re(t,_n,u=>i(3,o=u)),re(t,Ge,u=>i(4,a=u)),t.$$.update=()=>{t.$$.dirty&30&&i(0,n=a?A("Loading..."):o?A("Loading failed. Please try again later."):!s||s.length===0?A("No results match your filter. Try broadening the search criteria."):r==null?A("All data loaded"):A("Load more data"))},[n,r,s,o,a]}class Rs extends te{constructor(e){super(),ee(this,e,xs,Os,q,{},Ns)}}function Fs(t){oe(t,"svelte-1srt8g7",`button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0 0 0 30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.radio-option.svelte-1srt8g7 input[type="radio"].svelte-1srt8g7{display:none}.radio-option.svelte-1srt8g7.svelte-1srt8g7{display:flex;align-items:center;position:relative;width:calc(100% - 8px);padding:6px 10px;color:var(--main-textcolor);cursor:pointer}.radio-option.svelte-1srt8g7.svelte-1srt8g7::before{content:'';display:inline-block;width:16px;height:16px;margin-right:10px;border-radius:50%;border:2px solid var(--menu-selected-bg);background-color:white}.selected.svelte-1srt8g7.svelte-1srt8g7{font-weight:700}.selected.svelte-1srt8g7.svelte-1srt8g7::before{width:10px;height:10px;border:5px solid var(--ticket-status-chat-background)}.radio-option.svelte-1srt8g7.svelte-1srt8g7:hover{background:var(--menu-hover-bg)}.Title.svelte-1srt8g7.svelte-1srt8g7{width:100%;margin:4px 0 12px 10px;color:var(--main-textcolor);font-size:13px;font-style:normal;font-weight:700;line-height:20px;font-family:'Roboto', sans-serif}.Title.svelte-1srt8g7.svelte-1srt8g7::after{content:'';position:absolute;left:10px;right:10px;bottom:calc(100% - 37px);height:1px;background-color:var(--menu-selected-bg)}.modal.svelte-1srt8g7.svelte-1srt8g7{min-width:200px;display:flex;flex-direction:column;align-items:flex-start;margin:0;padding:4px;background-color:var(--main-background);border:none;border-radius:6px;overflow:hidden;z-index:99999;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}`)}function Qt(t,e,i){const n=t.slice();return n[8]=e[i],n}function Zt(t){let e,i,n,r,s=t[8].label+"",o,a,u,l,c;return{c(){e=k("label"),i=k("input"),r=U(),o=se(s),a=U(),v(i,"type","radio"),v(i,"name","sorting"),i.value=t[8].value,i.checked=n=t[0]&&t[0].value===t[8].value,v(i,"class","svelte-1srt8g7"),v(e,"class",u=fe(t[0].value===t[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")},m(d,f){N(d,e,f),y(e,i),y(e,r),y(e,o),y(e,a),l||(c=ae(i,"click",t[4]),l=!0)},p(d,f){f&1&&n!==(n=d[0]&&d[0].value===d[8].value)&&(i.checked=n),f&1&&u!==(u=fe(d[0].value===d[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")&&v(e,"class",u)},d(d){d&&D(e),l=!1,c()}}}function As(t){let e,i,n,r=Ee(t[3]),s=[];for(let o=0;o<r.length;o+=1)s[o]=Zt(Qt(t,r,o));return{c(){e=k("dialog"),i=k("span"),i.textContent=`${A("Sort by")}`,n=U();for(let o=0;o<s.length;o+=1)s[o].c();v(i,"class","Title svelte-1srt8g7"),v(e,"class","modal svelte-1srt8g7"),v(e,"style",t[1])},m(o,a){N(o,e,a),y(e,i),y(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null);t[6](e)},p(o,[a]){if(a&25){r=Ee(o[3]);let u;for(u=0;u<r.length;u+=1){const l=Qt(o,r,u);s[u]?s[u].p(l,a):(s[u]=Zt(l),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=r.length}a&2&&v(e,"style",o[1])},i:Q,o:Q,d(o){o&&D(e),Lt(s,o),t[6](null)}}}function Gs(t,e,i){let{currentFilter:n}=e,{closeModal:r=()=>u.close()}=e,{style:s=""}=e;const o=dn(),a=[{value:"Datedue",label:A("Importance"),sort:He.Datedue,dir:!1},{value:"Created-newest",label:A("Date created - Newest"),sort:He.Datecreated,dir:!1},{value:"Created-oldest",label:A("Date created - Oldest"),sort:He.Datecreated,dir:!0},{value:"Changed-newest",label:A("Date changed - Newest"),sort:He.Datechanged,dir:!1},{value:"Changed-oldest",label:A("Date changed - Oldest"),sort:He.Datechanged,dir:!0}];let u;function l(d){const f=a.find(h=>h.value===d.target.value);i(0,n=f),o("filterChange",{option:f}),r()}function c(d){ze[d?"unshift":"push"](()=>{u=d,i(2,u)})}return t.$$set=d=>{"currentFilter"in d&&i(0,n=d.currentFilter),"closeModal"in d&&i(5,r=d.closeModal),"style"in d&&i(1,s=d.style)},[n,s,u,a,l,r,c]}class zs extends te{constructor(e){super(),ee(this,e,Gs,As,q,{currentFilter:0,closeModal:5,style:1},Fs)}}function Es(t){oe(t,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function Ms(t){let e,i,n;return{c(){e=k("div"),v(e,"class","backdrop svelte-657q9o")},m(r,s){N(r,e,s),i||(n=ae(e,"click",yt(function(){Ct(t[0])&&t[0].apply(this,arguments)})),i=!0)},p(r,[s]){t=r},i:Q,o:Q,d(r){r&&D(e),i=!1,n()}}}function Is(t,e,i){let{onClick:n}=e;return t.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class Bs extends te{constructor(e){super(),ee(this,e,Is,Ms,q,{onClick:0},Es)}}function Ks(t){oe(t,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function Js(t){let e,i,n,r,s,o;return n=new Rs({}),{c(){e=k("div"),i=k("div"),I(n.$$.fragment),v(i,"class","load svelte-1fwehqj"),v(e,"class","load svelte-1fwehqj")},m(a,u){N(a,e,u),y(e,i),E(n,i,null),t[11](i),r=!0,s||(o=ae(i,"click",t[12]),s=!0)},p:Q,i(a){r||(b(n.$$.fragment,a),r=!0)},o(a){$(n.$$.fragment,a),r=!1},d(a){a&&D(e),M(n),t[11](null),s=!1,o()}}}function Xt(t){let e,i,n,r;return e=new zs({props:{closeModal:t[8],currentFilter:t[5],style:t[4]}}),e.$on("filterChange",t[10]),n=new Bs({props:{onClick:t[8]}}),{c(){I(e.$$.fragment),i=U(),I(n.$$.fragment)},m(s,o){E(e,s,o),N(s,i,o),E(n,s,o),r=!0},p(s,o){const a={};o&32&&(a.currentFilter=s[5]),o&16&&(a.style=s[4]),e.$set(a)},i(s){r||(b(e.$$.fragment,s),b(n.$$.fragment,s),r=!0)},o(s){$(e.$$.fragment,s),$(n.$$.fragment,s),r=!1},d(s){s&&D(i),M(e,s),M(n,s)}}}function Us(t){let e,i,n,r,s,o;i=new ir({props:{currentFilter:t[5].label}}),i.$on("openModal",t[9]),r=new Ds({props:{middleclickhandler:t[0],$$slots:{default:[Js]},$$scope:{ctx:t}}});let a=t[3]&&Xt(t);return{c(){e=k("div"),I(i.$$.fragment),n=U(),I(r.$$.fragment),s=U(),a&&a.c(),v(e,"class","container svelte-1fwehqj")},m(u,l){N(u,e,l),E(i,e,null),y(e,n),E(r,e,null),y(e,s),a&&a.m(e,null),t[13](e),o=!0},p(u,[l]){const c={};l&32&&(c.currentFilter=u[5].label),i.$set(c);const d={};l&1&&(d.middleclickhandler=u[0]),l&16578&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[3]?a?(a.p(u,l),l&8&&b(a,1)):(a=Xt(u),a.c(),b(a,1),a.m(e,null)):a&&(_e(),$(a,1,1,()=>{a=null}),ye())},i(u){o||(b(i.$$.fragment,u),b(r.$$.fragment,u),b(a),o=!0)},o(u){$(i.$$.fragment,u),$(r.$$.fragment,u),$(a),o=!1},d(u){u&&D(e),M(i),M(r),a&&a.d(),t[13](null)}}}function Ws(t,e,i){let n,r,s;re(t,Ze,m=>i(6,r=m)),re(t,Ne,m=>i(7,s=m));let{middleclickhandler:o}=e,a,u,l=!1,c="";ct(()=>{const m=localStorage.getItem("TicketGridCurrentFilter");m&&i(5,n=JSON.parse(m));const R=new IntersectionObserver(Y=>{Y[0].isIntersecting&&Me()},{root:u,threshold:.5});return R.observe(a),()=>R.unobserve(a)});function d(){i(3,l=!1)}function f(m){i(3,l=!0),i(4,c=m.detail.dialogStyles)}function h(m){d(),console.log("filter changed: "+m.detail.option.sort+" "+m.detail.option.dir),m.detail.option.value!==n.value&&(i(5,n=m.detail.option),localStorage.setItem("TicketGridCurrentFilter",JSON.stringify(n)),et.set(n.dir),Dt.set(n.sort))}function p(m){ze[m?"unshift":"push"](()=>{a=m,i(1,a)})}const w=()=>Me(r&&!s);function C(m){ze[m?"unshift":"push"](()=>{u=m,i(2,u)})}return t.$$set=m=>{"middleclickhandler"in m&&i(0,o=m.middleclickhandler)},i(5,n={value:"Datedue",label:"Importance"}),[o,a,u,l,c,n,r,s,d,f,h,p,w,C]}class Hs extends te{constructor(e){super(),ee(this,e,Ws,Us,q,{middleclickhandler:0},Ks)}}class Ys{constructor(e,i){const n=new St({apiKey:e,basePath:i+"/api/v3"});this.api=new pn(n)}async load(){let e=await this.api.getTagsGridList();e=e.reduce((i,n)=>(i[n.tagid]=n,i),{}),zi.set(e)}}function Ps(t){oe(t,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function Vs(t){let e,i,n,r,s;const o=t[4].default,a=Ie(o,t,t[3],null);return{c(){e=k("button"),a&&a.c(),v(e,"class",i=fe(t[0])+" svelte-10fvxzv")},m(u,l){N(u,e,l),a&&a.m(e,null),n=!0,r||(s=ae(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Ke(a,o,u,u[3],n?Be(o,u[3],l,null):Je(u[3]),null),(!n||l&1&&i!==(i=fe(u[0])+" svelte-10fvxzv"))&&v(e,"class",i)},i(u){n||(b(a,u),n=!0)},o(u){$(a,u),n=!1},d(u){u&&D(e),a&&a.d(u),r=!1,s()}}}function Qs(t,e,i){let{$$slots:n={},$$scope:r}=e,{onAction:s=u=>{}}=e,{className:o=""}=e;function a(u){s(u)}return t.$$set=u=>{"onAction"in u&&i(2,s=u.onAction),"className"in u&&i(0,o=u.className),"$$scope"in u&&i(3,r=u.$$scope)},[o,a,s,r,n]}class qt extends te{constructor(e){super(),ee(this,e,Qs,Vs,q,{onAction:2,className:0},Ps)}}function Zs(t){oe(t,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function Xs(t){let e,i,n=A("Change filter")+"",r,s;return e=new $e({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){I(e.$$.fragment),i=U(),r=se(n)},m(o,a){E(e,o,a),N(o,i,a),N(o,r,a),s=!0},p:Q,i(o){s||(b(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),M(e,o)}}}function qs(t){let e,i,n=A("Configure chat button")+"",r,s;return e=new $e({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){I(e.$$.fragment),i=U(),r=se(n)},m(o,a){E(e,o,a),N(o,i,a),N(o,r,a),s=!0},p:Q,i(o){s||(b(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),M(e,o)}}}function js(t){let e,i,n,r,s,o,a,u,l,c,d,f,h;return c=new qt({props:{className:"Filter",onAction:t[0],$$slots:{default:[Xs]},$$scope:{ctx:t}}}),f=new qt({props:{className:"Configure",$$slots:{default:[qs]},$$scope:{ctx:t}}}),{c(){e=k("div"),i=k("img"),r=U(),s=k("h1"),s.textContent=`${A("No tickets found")}`,o=U(),a=k("p"),a.textContent=`${A("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")}`,u=U(),l=k("div"),I(c.$$.fragment),d=U(),I(f.$$.fragment),v(i,"alt","No results placeholder"),_t(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||v(i,"src",n),v(i,"class","svelte-19qi61t"),v(s,"class","svelte-19qi61t"),v(a,"class","svelte-19qi61t"),v(l,"class","Buttons"),v(e,"class","NoTickets svelte-19qi61t")},m(p,w){N(p,e,w),y(e,i),y(e,r),y(e,s),y(e,o),y(e,a),y(e,u),y(e,l),E(c,l,null),y(l,d),E(f,l,null),h=!0},p(p,[w]){const C={};w&2&&(C.$$scope={dirty:w,ctx:p}),c.$set(C);const m={};w&2&&(m.$$scope={dirty:w,ctx:p}),f.$set(m)},i(p){h||(b(c.$$.fragment,p),b(f.$$.fragment,p),h=!0)},o(p){$(c.$$.fragment,p),$(f.$$.fragment,p),h=!1},d(p){p&&D(e),M(c),M(f)}}}function eo(t){return[()=>Me(!0)]}class to extends te{constructor(e){super(),ee(this,e,eo,js,q,{},Zs)}}function no(t){oe(t,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function io(t){let e,i;return e=new Hs({props:{middleclickhandler:t[0]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.middleclickhandler=n[0]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ro(t){let e,i;return e=new to({}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p:Q,i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function so(t){let e,i,n,r;const s=[ro,io],o=[];function a(u,l){return!u[1].length&&u[2]?0:1}return i=a(t),n=o[i]=s[i](t),{c(){e=k("main"),n.c(),v(e,"class","svelte-14f2ism")},m(u,l){N(u,e,l),o[i].m(e,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(_e(),$(o[c],1,1,()=>{o[c]=null}),ye(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),b(n,1),n.m(e,null))},i(u){r||(b(n),r=!0)},o(u){$(n),r=!1},d(u){u&&D(e),o[i].d()}}}function oo(t,e,i){let n,r,s,o,a,u;re(t,Qe,f=>i(8,n=f)),re(t,je,f=>i(5,r=f)),re(t,Dt,f=>i(6,s=f)),re(t,et,f=>i(7,o=f)),re(t,ve,f=>i(1,a=f)),re(t,Ze,f=>i(2,u=f));let{apikey:l}=e,{middleclickhandler:c}=e,{basePath:d}=e;return ct(async()=>{await new Ys(l,d).load();const f=new pn(new St({apiKey:l,basePath:d+"/api/v3"}));lt.set(f),await Me(!0)}),ve.subscribe(f=>{vn.set(n?f.filter(h=>!h.__selected).map(h=>h.conversationid):f.filter(h=>h.__selected).map(h=>h.conversationid))}),t.$$set=f=>{"apikey"in f&&i(3,l=f.apikey),"middleclickhandler"in f&&i(0,c=f.middleclickhandler),"basePath"in f&&i(4,d=f.basePath)},t.$$.update=()=>{t.$$.dirty&224&&(o||s||r)&&Me(!0)},[c,a,u,l,d,r,s,o]}class ao extends te{constructor(e){super(),ee(this,e,oo,so,q,{apikey:3,middleclickhandler:0,basePath:4},no)}}const lo={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"}}},uo={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:lo,warnOnMissingMessages:!0},co=uo;let Sn;function Dn(){return Sn}function fo(t){return Sn=t}function ht(){return co}function jt(t){return t.split("-").map((e,i,n)=>n.slice(0,i+1).join("-")).reverse()}function xt(t,e=ht().fallbackLocale){const i=jt(t);return e?[...new Set([...i,...jt(e)])]:i}let Nn;const Rt=ce({});function On(t){return t in Nn}function go(t){if(t==null)return null;const e=xt(t);for(let i=0;i<e.length;i++){const n=e[i];if(On(n))return n}return null}function ho(t,...e){Rt.update(i=>(i[t]=Object.assign(i[t]||{},...e),i))}Rt.subscribe(t=>Nn=t);const en=ce(!1),Ft={};function mo(t){Ft[t]=new Set}function po(t){delete Ft[t]}function Xe(t){return Ft[t]}function vo(t){return xt(t).reverse().map(e=>{const i=Xe(e);return[e,i?[...i]:[]]}).filter(([,e])=>e.length>0)}function xn(t){return xt(t).reverse().some(Xe)}const Ye={};function Rn(t){if(!xn(t))return Promise.resolve();if(t in Ye)return Ye[t];const e=vo(t);if(e.length===0)return Promise.resolve();const i=setTimeout(()=>en.set(!0),ht().loadingDelay);return Ye[t]=Promise.all(e.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{po(n),s=s.map(o=>o.default||o),ho(n,...s)}))).then(()=>{clearTimeout(i),en.set(!1),delete Ye[t]}),Ye[t]}function tn(t,e){Xe(t)||mo(t);const i=Xe(t);Xe(t).has(e)||(On(t)||Rt.update(n=>(n[t]={},n)),i.add(e))}const nt=ce("");nt.subscribe(t=>{fo(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const Tt=nt.set;nt.set=t=>go(t)&&xn(t)?Rn(t).then(()=>Tt(t)):Tt(t);nt.update=t=>{let e=Dn();t(e),Tt(e)};function _o(t){const{formats:e,...i}=t,n=t.initialLocale||t.fallbackLocale,r=ht();return Object.assign(r,i,{initialLocale:n}),e&&("number"in e&&Object.assign(r.formats.number,e.number),"date"in e&&Object.assign(r.formats.date,e.date),"time"in e&&Object.assign(r.formats.time,e.time)),nt.set(n)}function yo(t){return Rn(t||Dn()||ht().initialLocale)}const bo="modulepreload",wo=function(t){return"/"+t},nn={},rn=function(e,i,n){if(!i||i.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=wo(s),s in nn)return;nn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":bo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function ko(){tn("en",()=>rn(()=>import("./en.js"),[])),tn("sk",()=>rn(()=>import("./sk.js"),[]))}function sn(t){let e,i;return e=new ao({props:{apikey:t[0],basePath:t[3],filters:t[1],middleclickhandler:t[2],$$slots:{default:[$o]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.apikey=n[0]),r&8&&(s.basePath=n[3]),r&2&&(s.filters=n[1]),r&4&&(s.middleclickhandler=n[2]),r&64&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function $o(t){let e;const i=t[5].default,n=Ie(i,t,t[6],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&64)&&Ke(n,i,r,r[6],e?Be(i,r[6],s,null):Je(r[6]),null)},i(r){e||(b(n,r),e=!0)},o(r){$(n,r),e=!1},d(r){n&&n.d(r)}}}function To(t){let e,i,n,r,s=t[0]&&sn(t);return{c(){s&&s.c(),e=U(),i=k("link"),v(i,"rel","stylesheet"),v(i,"href",n=t[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),N(o,e,a),N(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&b(s,1)):(s=sn(o),s.c(),b(s,1),s.m(e.parentNode,e)):s&&(_e(),$(s,1,1,()=>{s=null}),ye()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&v(i,"href",n)},i(o){r||(b(s),r=!0)},o(o){$(s),r=!1},d(o){o&&(D(e),D(i)),s&&s.d(o)}}}function Co(t){const e={};return t.forEach(i=>{if(i.length===2){const[n,r]=i;e[n]=r}}),e}function Lo(t,e,i){let{$$slots:n={},$$scope:r}=e;ko();let{lang:s="sk"}=e,{apikey:o}=e,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=e,{middleclickhandler:u}=e,{basepath:l}=e;return ct(()=>{je.set(a);const c=localStorage.getItem("la-dictionary-a");if(c)try{const d=JSON.parse(c);yn.set(Co(d[3][1]))}catch(d){console.error("Error parsing translation data:",d)}}),_o({initialLocale:s,fallbackLocale:"en"}),yo(),t.$$set=c=>{"lang"in c&&i(4,s=c.lang),"apikey"in c&&i(0,o=c.apikey),"filters"in c&&i(1,a=c.filters),"middleclickhandler"in c&&i(2,u=c.middleclickhandler),"basepath"in c&&i(3,l=c.basepath),"$$scope"in c&&i(6,r=c.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&a&&je.set(a)},[o,a,u,l,s,n,r]}class So extends te{constructor(e){super(),ee(this,e,Lo,To,q,{lang:4,apikey:0,filters:1,middleclickhandler:2,basepath:3})}get lang(){return this.$$.ctx[4]}set lang(e){this.$$set({lang:e}),Se()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),Se()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),Se()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),Se()}get basepath(){return this.$$.ctx[3]}set basepath(e){this.$$set({basepath:e}),Se()}}customElements.define("tickets-table",qn(So,{lang:{},apikey:{},filters:{},middleclickhandler:{},basepath:{}},["default"],[],!0));
|
|
9
|
+
"checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px;column-gap:6px}}@media(min-width: 900px){.Row.svelte-76dgfl.svelte-76dgfl{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 180px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-76dgfl.svelte-76dgfl{grid-template-columns:60px 260px auto 230px}}`)}function Pt(t,e,i){const n=t.slice();return n[9]=e[i],n[10]=e,n[11]=i,n}function Vt(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,p,w,C,m,x,Y;function J(){t[5].call(s,t[11])}function O(...B){return t[6](t[11],...B)}l=new xr({props:{row:t[9]}}),f=new $s({props:{row:t[9]}}),w=new ss({props:{row:t[9]}});function W(){return t[7](t[9])}function Z(...B){return t[8](t[9],...B)}return{c(){e=k("div"),i=k("div"),n=k("div"),r=U(),s=k("input"),a=U(),u=k("div"),I(l.$$.fragment),c=U(),d=k("div"),I(f.$$.fragment),h=U(),p=k("div"),I(w.$$.fragment),_(n,"class","StatusBar svelte-76dgfl"),mt(n,"background-color",ut(t[9].status)),_(s,"type","checkbox"),s.__value=o=t[9].conversationid,Et(s,s.__value),_(s,"class","svelte-76dgfl"),_(i,"class","Checkbox svelte-76dgfl"),mt(i,"position","relative"),_(u,"class","UserColumn svelte-76dgfl"),_(d,"class","StatusColumn svelte-76dgfl"),_(p,"class","ImportanceColumn svelte-76dgfl"),_(e,"class",C="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-76dgfl")},m(B,ne){N(B,e,ne),y(e,i),y(i,n),y(i,r),y(i,s),s.checked=t[1][t[11]].__selected,y(e,a),y(e,u),E(l,u,null),y(e,c),y(e,d),E(f,d,null),y(e,h),y(e,p),E(w,p,null),m=!0,x||(Y=[ae(s,"change",J),ae(s,"click",yt(O)),ae(i,"click",yt(Ls)),ae(e,"click",W),ae(e,"mousedown",Z)],x=!0)},p(B,ne){t=B,(!m||ne&2)&&mt(n,"background-color",ut(t[9].status)),(!m||ne&2&&o!==(o=t[9].conversationid))&&(s.__value=o,Et(s,s.__value)),ne&2&&(s.checked=t[1][t[11]].__selected);const X={};ne&2&&(X.row=t[9]),l.$set(X);const P={};ne&2&&(P.row=t[9]),f.$set(P);const be={};ne&2&&(be.row=t[9]),w.$set(be),(!m||ne&2&&C!==(C="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-76dgfl"))&&_(e,"class",C)},i(B){m||(b(l.$$.fragment,B),b(f.$$.fragment,B),b(w.$$.fragment,B),m=!0)},o(B){$(l.$$.fragment,B),$(f.$$.fragment,B),$(w.$$.fragment,B),m=!1},d(B){B&&D(e),M(l),M(f),M(w),x=!1,Ce(Y)}}}function Cs(t){let e,i,n,r=Ee(t[1]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(t,r,l));const o=l=>$(s[l],1,1,()=>{s[l]=null}),a=t[4].default,u=Me(a,t,t[3],null);return{c(){e=k("div");for(let l=0;l<s.length;l+=1)s[l].c();i=U(),u&&u.c(),_(e,"class","Body")},m(l,c){N(l,e,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(e,null);y(e,i),u&&u.m(e,null),n=!0},p(l,[c]){if(c&7){r=Ee(l[1]);let d;for(d=0;d<r.length;d+=1){const f=Pt(l,r,d);s[d]?(s[d].p(f,c),b(s[d],1)):(s[d]=Vt(f),s[d].c(),b(s[d],1),s[d].m(e,i))}for(ve(),d=r.length;d<s.length;d+=1)o(d);ye()}u&&u.p&&(!n||c&8)&&Be(u,a,l,l[3],n?Ie(a,l[3],c,null):Ke(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)b(s[c]);b(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)$(s[c]);$(u,l),n=!1},d(l){l&&D(e),Lt(s,l),u&&u.d(l)}}}const Ls=()=>{};function Ss(t,e,i){let n;re(t,_e,f=>i(1,n=f));let{$$slots:r={},$$scope:s}=e,{middleclickhandler:o}=e;function a(f,h){if(f.shiftKey){let p=n.findIndex(w=>w.__selected);if(p!==-1){let w=Math.min(p,h),C=Math.max(p,h);for(let m=w;m<=C;m++)un(_e,n[m].__selected=!0,n)}}}function u(f){n[f].__selected=this.checked,_e.set(n)}const l=(f,h)=>a(h,f),c=f=>location.assign("#Conversation;id="+f.conversationid),d=(f,h)=>{h.button===1&&o&&(o(f.conversationid),h.preventDefault(),h.stopPropagation())};return t.$$set=f=>{"middleclickhandler"in f&&i(0,o=f.middleclickhandler),"$$scope"in f&&i(3,s=f.$$scope)},[o,n,a,s,r,u,l,c,d]}class Ds extends te{constructor(e){super(),ee(this,e,Ss,Cs,q,{middleclickhandler:0},Ts)}}function Ns(t){oe(t,"svelte-1nok758","div.svelte-1nok758{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Os(t){let e,i,n;return{c(){e=k("div"),i=k("p"),n=se(t[0]),_(e,"class","svelte-1nok758")},m(r,s){N(r,e,s),y(e,i),y(i,n)},p(r,[s]){s&1&&le(n,r[0])},i:Q,o:Q,d(r){r&&D(e)}}}function Fs(t,e,i){let n,r,s,o,a;return re(t,Ne,u=>i(1,r=u)),re(t,_e,u=>i(2,s=u)),re(t,vn,u=>i(3,o=u)),re(t,Ge,u=>i(4,a=u)),t.$$.update=()=>{t.$$.dirty&30&&i(0,n=a?A("Loading..."):o?A("Loading failed. Please try again later."):!s||s.length===0?A("No results match your filter. Try broadening the search criteria."):r==null?A("All data loaded"):A("Load more data"))},[n,r,s,o,a]}class xs extends te{constructor(e){super(),ee(this,e,Fs,Os,q,{},Ns)}}function Rs(t){oe(t,"svelte-1srt8g7",`button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0 0 0 30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.radio-option.svelte-1srt8g7 input[type="radio"].svelte-1srt8g7{display:none}.radio-option.svelte-1srt8g7.svelte-1srt8g7{display:flex;align-items:center;position:relative;width:calc(100% - 8px);padding:6px 10px;color:var(--main-textcolor);cursor:pointer}.radio-option.svelte-1srt8g7.svelte-1srt8g7::before{content:'';display:inline-block;width:16px;height:16px;margin-right:10px;border-radius:50%;border:2px solid var(--menu-selected-bg);background-color:white}.selected.svelte-1srt8g7.svelte-1srt8g7{font-weight:700}.selected.svelte-1srt8g7.svelte-1srt8g7::before{width:10px;height:10px;border:5px solid var(--ticket-status-chat-background)}.radio-option.svelte-1srt8g7.svelte-1srt8g7:hover{background:var(--menu-hover-bg)}.Title.svelte-1srt8g7.svelte-1srt8g7{width:100%;margin:4px 0 12px 10px;color:var(--main-textcolor);font-size:13px;font-style:normal;font-weight:700;line-height:20px;font-family:'Roboto', sans-serif}.Title.svelte-1srt8g7.svelte-1srt8g7::after{content:'';position:absolute;left:10px;right:10px;bottom:calc(100% - 37px);height:1px;background-color:var(--menu-selected-bg)}.modal.svelte-1srt8g7.svelte-1srt8g7{min-width:200px;display:flex;flex-direction:column;align-items:flex-start;margin:0;padding:4px;background-color:var(--main-background);border:none;border-radius:6px;overflow:hidden;z-index:99999;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}`)}function Qt(t,e,i){const n=t.slice();return n[8]=e[i],n}function Zt(t){let e,i,n,r,s=t[8].label+"",o,a,u,l,c;return{c(){e=k("label"),i=k("input"),r=U(),o=se(s),a=U(),_(i,"type","radio"),_(i,"name","sorting"),i.value=t[8].value,i.checked=n=t[0]&&t[0].value===t[8].value,_(i,"class","svelte-1srt8g7"),_(e,"class",u=fe(t[0].value===t[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")},m(d,f){N(d,e,f),y(e,i),y(e,r),y(e,o),y(e,a),l||(c=ae(i,"click",t[4]),l=!0)},p(d,f){f&1&&n!==(n=d[0]&&d[0].value===d[8].value)&&(i.checked=n),f&1&&u!==(u=fe(d[0].value===d[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")&&_(e,"class",u)},d(d){d&&D(e),l=!1,c()}}}function As(t){let e,i,n,r=Ee(t[3]),s=[];for(let o=0;o<r.length;o+=1)s[o]=Zt(Qt(t,r,o));return{c(){e=k("dialog"),i=k("span"),i.textContent=`${A("Sort by")}`,n=U();for(let o=0;o<s.length;o+=1)s[o].c();_(i,"class","Title svelte-1srt8g7"),_(e,"class","modal svelte-1srt8g7"),_(e,"style",t[1])},m(o,a){N(o,e,a),y(e,i),y(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null);t[6](e)},p(o,[a]){if(a&25){r=Ee(o[3]);let u;for(u=0;u<r.length;u+=1){const l=Qt(o,r,u);s[u]?s[u].p(l,a):(s[u]=Zt(l),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=r.length}a&2&&_(e,"style",o[1])},i:Q,o:Q,d(o){o&&D(e),Lt(s,o),t[6](null)}}}function Gs(t,e,i){let{currentFilter:n}=e,{closeModal:r=()=>u.close()}=e,{style:s=""}=e;const o=dn(),a=[{value:"Datedue",label:A("Importance"),sort:We.Datedue,dir:!1},{value:"Created-newest",label:A("Date created - Newest"),sort:We.Datecreated,dir:!1},{value:"Created-oldest",label:A("Date created - Oldest"),sort:We.Datecreated,dir:!0},{value:"Changed-newest",label:A("Date changed - Newest"),sort:We.Datechanged,dir:!1},{value:"Changed-oldest",label:A("Date changed - Oldest"),sort:We.Datechanged,dir:!0}];let u;function l(d){const f=a.find(h=>h.value===d.target.value);i(0,n=f),o("filterChange",{option:f}),r()}function c(d){ze[d?"unshift":"push"](()=>{u=d,i(2,u)})}return t.$$set=d=>{"currentFilter"in d&&i(0,n=d.currentFilter),"closeModal"in d&&i(5,r=d.closeModal),"style"in d&&i(1,s=d.style)},[n,s,u,a,l,r,c]}class zs extends te{constructor(e){super(),ee(this,e,Gs,As,q,{currentFilter:0,closeModal:5,style:1},Rs)}}function Es(t){oe(t,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function Ms(t){let e,i,n;return{c(){e=k("div"),_(e,"class","backdrop svelte-657q9o")},m(r,s){N(r,e,s),i||(n=ae(e,"click",yt(function(){Ct(t[0])&&t[0].apply(this,arguments)})),i=!0)},p(r,[s]){t=r},i:Q,o:Q,d(r){r&&D(e),i=!1,n()}}}function Is(t,e,i){let{onClick:n}=e;return t.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class Bs extends te{constructor(e){super(),ee(this,e,Is,Ms,q,{onClick:0},Es)}}function Ks(t){oe(t,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function Js(t){let e,i,n,r,s,o;return n=new xs({}),{c(){e=k("div"),i=k("div"),I(n.$$.fragment),_(i,"class","load svelte-1fwehqj"),_(e,"class","load svelte-1fwehqj")},m(a,u){N(a,e,u),y(e,i),E(n,i,null),t[11](i),r=!0,s||(o=ae(i,"click",t[12]),s=!0)},p:Q,i(a){r||(b(n.$$.fragment,a),r=!0)},o(a){$(n.$$.fragment,a),r=!1},d(a){a&&D(e),M(n),t[11](null),s=!1,o()}}}function Xt(t){let e,i,n,r;return e=new zs({props:{closeModal:t[8],currentFilter:t[5],style:t[4]}}),e.$on("filterChange",t[10]),n=new Bs({props:{onClick:t[8]}}),{c(){I(e.$$.fragment),i=U(),I(n.$$.fragment)},m(s,o){E(e,s,o),N(s,i,o),E(n,s,o),r=!0},p(s,o){const a={};o&32&&(a.currentFilter=s[5]),o&16&&(a.style=s[4]),e.$set(a)},i(s){r||(b(e.$$.fragment,s),b(n.$$.fragment,s),r=!0)},o(s){$(e.$$.fragment,s),$(n.$$.fragment,s),r=!1},d(s){s&&D(i),M(e,s),M(n,s)}}}function Us(t){let e,i,n,r,s,o;i=new ir({props:{currentFilter:t[5].label}}),i.$on("openModal",t[9]),r=new Ds({props:{middleclickhandler:t[0],$$slots:{default:[Js]},$$scope:{ctx:t}}});let a=t[3]&&Xt(t);return{c(){e=k("div"),I(i.$$.fragment),n=U(),I(r.$$.fragment),s=U(),a&&a.c(),_(e,"class","container svelte-1fwehqj")},m(u,l){N(u,e,l),E(i,e,null),y(e,n),E(r,e,null),y(e,s),a&&a.m(e,null),t[13](e),o=!0},p(u,[l]){const c={};l&32&&(c.currentFilter=u[5].label),i.$set(c);const d={};l&1&&(d.middleclickhandler=u[0]),l&16578&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[3]?a?(a.p(u,l),l&8&&b(a,1)):(a=Xt(u),a.c(),b(a,1),a.m(e,null)):a&&(ve(),$(a,1,1,()=>{a=null}),ye())},i(u){o||(b(i.$$.fragment,u),b(r.$$.fragment,u),b(a),o=!0)},o(u){$(i.$$.fragment,u),$(r.$$.fragment,u),$(a),o=!1},d(u){u&&D(e),M(i),M(r),a&&a.d(),t[13](null)}}}function Ws(t,e,i){let n,r,s;re(t,Qe,m=>i(6,r=m)),re(t,Ne,m=>i(7,s=m));let{middleclickhandler:o}=e,a,u,l=!1,c="";ct(()=>{const m=localStorage.getItem("TicketGridCurrentFilter");m&&i(5,n=JSON.parse(m));const x=new IntersectionObserver(Y=>{Y[0].isIntersecting&&et()},{root:u,threshold:.5});return x.observe(a),()=>x.unobserve(a)});function d(){i(3,l=!1)}function f(m){i(3,l=!0),i(4,c=m.detail.dialogStyles)}function h(m){d(),console.log("filter changed: "+m.detail.option.sort+" "+m.detail.option.dir),m.detail.option.value!==n.value&&(i(5,n=m.detail.option),localStorage.setItem("TicketGridCurrentFilter",JSON.stringify(n)),je.set(n.dir),Dt.set(n.sort))}function p(m){ze[m?"unshift":"push"](()=>{a=m,i(1,a)})}const w=()=>et(r&&!s);function C(m){ze[m?"unshift":"push"](()=>{u=m,i(2,u)})}return t.$$set=m=>{"middleclickhandler"in m&&i(0,o=m.middleclickhandler)},i(5,n={value:"Datedue",label:"Importance"}),[o,a,u,l,c,n,r,s,d,f,h,p,w,C]}class Hs extends te{constructor(e){super(),ee(this,e,Ws,Us,q,{middleclickhandler:0},Ks)}}class Ys{constructor(e,i){const n=new St({apiKey:e,basePath:i+"/api/v3"});this.api=new pn(n)}async load(){let e=await this.api.getTagsGridList();e=e.reduce((i,n)=>(i[n.tagid]=n,i),{}),zi.set(e)}}function Ps(t){oe(t,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function Vs(t){let e,i,n,r,s;const o=t[4].default,a=Me(o,t,t[3],null);return{c(){e=k("button"),a&&a.c(),_(e,"class",i=fe(t[0])+" svelte-10fvxzv")},m(u,l){N(u,e,l),a&&a.m(e,null),n=!0,r||(s=ae(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Be(a,o,u,u[3],n?Ie(o,u[3],l,null):Ke(u[3]),null),(!n||l&1&&i!==(i=fe(u[0])+" svelte-10fvxzv"))&&_(e,"class",i)},i(u){n||(b(a,u),n=!0)},o(u){$(a,u),n=!1},d(u){u&&D(e),a&&a.d(u),r=!1,s()}}}function Qs(t,e,i){let{$$slots:n={},$$scope:r}=e,{onAction:s=u=>{}}=e,{className:o=""}=e;function a(u){s(u)}return t.$$set=u=>{"onAction"in u&&i(2,s=u.onAction),"className"in u&&i(0,o=u.className),"$$scope"in u&&i(3,r=u.$$scope)},[o,a,s,r,n]}class qt extends te{constructor(e){super(),ee(this,e,Qs,Vs,q,{onAction:2,className:0},Ps)}}function Zs(t){oe(t,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function Xs(t){let e,i,n=A("Change filter")+"",r,s;return e=new $e({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){I(e.$$.fragment),i=U(),r=se(n)},m(o,a){E(e,o,a),N(o,i,a),N(o,r,a),s=!0},p:Q,i(o){s||(b(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),M(e,o)}}}function qs(t){let e,i,n=A("Configure chat button")+"",r,s;return e=new $e({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){I(e.$$.fragment),i=U(),r=se(n)},m(o,a){E(e,o,a),N(o,i,a),N(o,r,a),s=!0},p:Q,i(o){s||(b(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),M(e,o)}}}function js(t){let e,i,n,r,s,o,a,u,l,c,d,f,h;return c=new qt({props:{className:"Filter",onAction:t[0],$$slots:{default:[Xs]},$$scope:{ctx:t}}}),f=new qt({props:{className:"Configure",onAction:t[1],$$slots:{default:[qs]},$$scope:{ctx:t}}}),{c(){e=k("div"),i=k("img"),r=U(),s=k("h1"),s.textContent=`${A("No tickets found")}`,o=U(),a=k("p"),a.textContent=`${A("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")}`,u=U(),l=k("div"),I(c.$$.fragment),d=U(),I(f.$$.fragment),_(i,"alt","No results placeholder"),vt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||_(i,"src",n),_(i,"class","svelte-19qi61t"),_(s,"class","svelte-19qi61t"),_(a,"class","svelte-19qi61t"),_(l,"class","Buttons"),_(e,"class","NoTickets svelte-19qi61t")},m(p,w){N(p,e,w),y(e,i),y(e,r),y(e,s),y(e,o),y(e,a),y(e,u),y(e,l),E(c,l,null),y(l,d),E(f,l,null),h=!0},p(p,[w]){const C={};w&4&&(C.$$scope={dirty:w,ctx:p}),c.$set(C);const m={};w&4&&(m.$$scope={dirty:w,ctx:p}),f.$set(m)},i(p){h||(b(c.$$.fragment,p),b(f.$$.fragment,p),h=!0)},o(p){$(c.$$.fragment,p),$(f.$$.fragment,p),h=!1},d(p){p&&D(e),M(c),M(f)}}}function eo(){window.showCustomFilter?window.showCustomFilter():console.error("GWT function 'showCustomFilter' is not defined or exposed.")}function to(t){return[()=>eo(),()=>window.location.hash="Chat-Buttons"]}class no extends te{constructor(e){super(),ee(this,e,to,js,q,{},Zs)}}function io(t){oe(t,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function ro(t){let e,i;return e=new Hs({props:{middleclickhandler:t[0]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.middleclickhandler=n[0]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function so(t){let e,i;return e=new no({}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p:Q,i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function oo(t){let e,i,n,r;const s=[so,ro],o=[];function a(u,l){return!u[1].length&&u[2]?0:1}return i=a(t),n=o[i]=s[i](t),{c(){e=k("main"),n.c(),_(e,"class","svelte-14f2ism")},m(u,l){N(u,e,l),o[i].m(e,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(ve(),$(o[c],1,1,()=>{o[c]=null}),ye(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),b(n,1),n.m(e,null))},i(u){r||(b(n),r=!0)},o(u){$(n),r=!1},d(u){u&&D(e),o[i].d()}}}function ao(t,e,i){let n,r,s,o,a,u;re(t,Ve,f=>i(8,n=f)),re(t,qe,f=>i(5,r=f)),re(t,Dt,f=>i(6,s=f)),re(t,je,f=>i(7,o=f)),re(t,_e,f=>i(1,a=f)),re(t,Qe,f=>i(2,u=f));let{apikey:l}=e,{middleclickhandler:c}=e,{basePath:d}=e;return ct(async()=>{await new Ys(l,d).load();const f=new pn(new St({apiKey:l,basePath:d+"/api/v3"}));lt.set(f),await et(!0)}),_e.subscribe(f=>{_n.set(n?f.filter(h=>!h.__selected).map(h=>h.conversationid):f.filter(h=>h.__selected).map(h=>h.conversationid))}),t.$$set=f=>{"apikey"in f&&i(3,l=f.apikey),"middleclickhandler"in f&&i(0,c=f.middleclickhandler),"basePath"in f&&i(4,d=f.basePath)},t.$$.update=()=>{t.$$.dirty&224&&(o||s||r)&&et(!0)},[c,a,u,l,d,r,s,o]}class lo extends te{constructor(e){super(),ee(this,e,ao,oo,q,{apikey:3,middleclickhandler:0,basePath:4},io)}}const uo={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"}}},co={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:uo,warnOnMissingMessages:!0},fo=co;let Sn;function Dn(){return Sn}function go(t){return Sn=t}function ht(){return fo}function jt(t){return t.split("-").map((e,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Ft(t,e=ht().fallbackLocale){const i=jt(t);return e?[...new Set([...i,...jt(e)])]:i}let Nn;const xt=ce({});function On(t){return t in Nn}function ho(t){if(t==null)return null;const e=Ft(t);for(let i=0;i<e.length;i++){const n=e[i];if(On(n))return n}return null}function mo(t,...e){xt.update(i=>(i[t]=Object.assign(i[t]||{},...e),i))}xt.subscribe(t=>Nn=t);const en=ce(!1),Rt={};function po(t){Rt[t]=new Set}function _o(t){delete Rt[t]}function Ze(t){return Rt[t]}function vo(t){return Ft(t).reverse().map(e=>{const i=Ze(e);return[e,i?[...i]:[]]}).filter(([,e])=>e.length>0)}function Fn(t){return Ft(t).reverse().some(Ze)}const He={};function xn(t){if(!Fn(t))return Promise.resolve();if(t in He)return He[t];const e=vo(t);if(e.length===0)return Promise.resolve();const i=setTimeout(()=>en.set(!0),ht().loadingDelay);return He[t]=Promise.all(e.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{_o(n),s=s.map(o=>o.default||o),mo(n,...s)}))).then(()=>{clearTimeout(i),en.set(!1),delete He[t]}),He[t]}function tn(t,e){Ze(t)||po(t);const i=Ze(t);Ze(t).has(e)||(On(t)||xt.update(n=>(n[t]={},n)),i.add(e))}const nt=ce("");nt.subscribe(t=>{go(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const Tt=nt.set;nt.set=t=>ho(t)&&Fn(t)?xn(t).then(()=>Tt(t)):Tt(t);nt.update=t=>{let e=Dn();t(e),Tt(e)};function yo(t){const{formats:e,...i}=t,n=t.initialLocale||t.fallbackLocale,r=ht();return Object.assign(r,i,{initialLocale:n}),e&&("number"in e&&Object.assign(r.formats.number,e.number),"date"in e&&Object.assign(r.formats.date,e.date),"time"in e&&Object.assign(r.formats.time,e.time)),nt.set(n)}function bo(t){return xn(t||Dn()||ht().initialLocale)}const wo="modulepreload",ko=function(t){return"/"+t},nn={},rn=function(e,i,n){if(!i||i.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=ko(s),s in nn)return;nn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":wo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function $o(){tn("en",()=>rn(()=>import("./en.js"),[])),tn("sk",()=>rn(()=>import("./sk.js"),[]))}function sn(t){let e,i;return e=new lo({props:{apikey:t[0],basePath:t[3],filters:t[1],middleclickhandler:t[2],$$slots:{default:[To]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.apikey=n[0]),r&8&&(s.basePath=n[3]),r&2&&(s.filters=n[1]),r&4&&(s.middleclickhandler=n[2]),r&64&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function To(t){let e;const i=t[5].default,n=Me(i,t,t[6],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&64)&&Be(n,i,r,r[6],e?Ie(i,r[6],s,null):Ke(r[6]),null)},i(r){e||(b(n,r),e=!0)},o(r){$(n,r),e=!1},d(r){n&&n.d(r)}}}function Co(t){let e,i,n,r,s=t[0]&&sn(t);return{c(){s&&s.c(),e=U(),i=k("link"),_(i,"rel","stylesheet"),_(i,"href",n=t[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),N(o,e,a),N(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&b(s,1)):(s=sn(o),s.c(),b(s,1),s.m(e.parentNode,e)):s&&(ve(),$(s,1,1,()=>{s=null}),ye()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&_(i,"href",n)},i(o){r||(b(s),r=!0)},o(o){$(s),r=!1},d(o){o&&(D(e),D(i)),s&&s.d(o)}}}function Lo(t){const e={};return t.forEach(i=>{if(i.length===2){const[n,r]=i;e[n]=r}}),e}function So(t,e,i){let{$$slots:n={},$$scope:r}=e;$o();let{lang:s="sk"}=e,{apikey:o}=e,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=e,{middleclickhandler:u}=e,{basepath:l}=e;return ct(()=>{qe.set(a);const c=localStorage.getItem("la-dictionary-a");if(c)try{const d=JSON.parse(c);yn.set(Lo(d[3][1]))}catch(d){console.error("Error parsing translation data:",d)}}),yo({initialLocale:s,fallbackLocale:"en"}),bo(),t.$$set=c=>{"lang"in c&&i(4,s=c.lang),"apikey"in c&&i(0,o=c.apikey),"filters"in c&&i(1,a=c.filters),"middleclickhandler"in c&&i(2,u=c.middleclickhandler),"basepath"in c&&i(3,l=c.basepath),"$$scope"in c&&i(6,r=c.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&a&&qe.set(a)},[o,a,u,l,s,n,r]}class Do extends te{constructor(e){super(),ee(this,e,So,Co,q,{lang:4,apikey:0,filters:1,middleclickhandler:2,basepath:3})}get lang(){return this.$$.ctx[4]}set lang(e){this.$$set({lang:e}),Se()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),Se()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),Se()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),Se()}get basepath(){return this.$$.ctx[3]}set basepath(e){this.$$set({basepath:e}),Se()}}customElements.define("tickets-table",qn(Do,{lang:{},apikey:{},filters:{},middleclickhandler:{},basepath:{}},["default"],[],!0));
|