import{S as e}from"./p-CAus4tQt.js";const t=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys()){const s=e.get(t).filter((e=>{const t=e.deref();return t&&(!("isConnected"in(s=t))||s.isConnected);var s}));e.set(t,s)}})(...t)}),2e3)}})(),s=e.forceUpdate,n=e.getRenderingRef,o=(e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)},r=(e,r)=>{const a=((e,t=(e,t)=>e!==t)=>{const s=()=>{return("function"==typeof(t=e)?t():t)??{};var t},n=s();let r=new Map(Object.entries(n));const a="undefined"!=typeof Proxy,i=a?null:{},l={dispose:[],get:[],set:[],reset:[]},c=new Map,u=()=>{r=new Map(Object.entries(s())),a||w(),l.reset.forEach((e=>e()))},d=e=>(l.get.forEach((t=>t(e))),r.get(e)),g=(e,s)=>{const n=r.get(e);t(s,n,e)&&(r.set(e,s),a||S(e),l.set.forEach((t=>t(e,s,n))))},f=a?new Proxy(n,{get:(e,t)=>d(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>r.has(t),set:(e,t,s)=>(g(t,s),!0)}):(w(),i),p=(e,t)=>(l[e].push(t),()=>{o(l[e],t)});function S(e){!a&&i&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:()=>d(e),set(t){g(e,t)}}))}function w(){if(a||!i)return;const e=new Set(r.keys());for(const t of Object.keys(i))e.has(t)||delete i[t];for(const t of e)S(t)}return{state:f,get:d,set:g,on:p,onChange:(e,t)=>{const n=(s,n)=>{s===e&&t(n)},o=()=>{const n=s();t(n[e])},r=p("set",n),a=p("reset",o);return c.set(t,{setHandler:n,resetHandler:o,propName:e}),()=>{r(),a(),c.delete(t)}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(p("set",t.set)),t.get&&e.push(p("get",t.get)),t.reset&&e.push(p("reset",t.reset)),t.dispose&&e.push(p("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{l.dispose.forEach((e=>e())),u()},reset:u,forceUpdate:e=>{const t=r.get(e);l.set.forEach((s=>s(e,t,t)))},removeListener:(e,t)=>{const s=c.get(t);s&&s.propName===e&&(o(l.set,s.setHandler),o(l.reset,s.resetHandler),c.delete(t))}}})(e,r);return a.use((()=>{if("function"!=typeof n||"function"!=typeof s)return{};const e=s,o=n,r=new Map;return{dispose:()=>r.clear(),get:e=>{const t=o();t&&((e,t,s)=>{let n=e.get(t);n||(n=[],e.set(t,n)),n.some((e=>e.deref()===s))||n.push(new WeakRef(s))})(r,e,t)},set:s=>{const n=r.get(s);if(n){const t=n.filter((t=>{const s=t.deref();return!!s&&e(s)}));r.set(s,t)}t(r)},reset:()=>{r.forEach((t=>{t.forEach((t=>{const s=t.deref();s&&e(s)}))})),t(r)}}})()),a},a=r({language:"en",theme:"light",businessId:null,shopId:null,accessToken:null,isProduction:!1,timeZone:null,translationSettings:{is_auto:!1,target_language:null,exclude_languages:[]},isNotConnected:!1,isZwiz:!1,connectionList:[],memberList:[],zrmzApiUrl:null,openChatByFilter:null,package:null,isShowWarningNotification:"granted"!==window.Notification?.permission,zwizSyncMessage:!1}),i=r({messages:[],reads:[],loadedKeys:new Set,readsMap:{}}),l=r({filterChat:void 0,filterConfig:void 0,filterType:"quick"}),c=r({statuses:[]}),u=r({tags:[]}),d=r({chats:[],loadedKeys:new Set,loading:!1}),g=r({user:null}),f=r({userAddress:null}),p=r({selectedChat:null,isSyncingTag:!1,isSyncingMessage:!1,isSearchMessage:!1}),S=r({selectedMessageToReply:null}),w=r({mode:"undefined"!=typeof window?window.innerWidth<=600?"mobile":window.innerWidth<=1024?"tablet":"desktop":"desktop"}),m=r({isShowProfile:!1,isSelectTab:"profile"}),b=r({filters:[],selectedFilter:null,loading:!1}),y=r({isEdit:!1}),h=r({translatedMessages:{},translatedMessagesMeta:{}}),M=r({originalText:""}),C=r({jobs:[]}),T=r({}),j=r({connections:null}),k=r({users:[],groups:[],ticketStatusSettings:[]}),v=r({}),O=r({usage:0});var _=Object.freeze({__proto__:null,businessStore:k,chatInputStore:M,chatLanguageStore:y,chatsStore:d,configStore:a,connectionJobsStore:C,customFiltersStore:b,deviceModeStore:w,filterChatsStore:l,messagesStore:i,platformConnectionsStore:j,profilePanelStore:m,selectedChatStore:p,selectedMessageToReplyStore:S,sessionTokensStore:v,statusesStore:c,storageUsageStore:O,tagsStore:u,translateStore:h,userAddressStore:f,userInfosStore:T,userStore:g});export{v as a,b,y as c,w as d,k as e,c as f,u as g,g as h,O as i,T as j,S as k,p as l,m,i as n,l as o,j as p,C as q,a as r,_ as s,h as t,f as u,d as v,M as w,r as x}