sm-click-library-ui 0.0.38 → 0.0.39

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.
@@ -2197,7 +2197,7 @@ const Us = { class: "w-full relative text-current" }, $s = { class: "flex cursor
2197
2197
  ])) : O("", !0),
2198
2198
  n.value && n.value.status !== void 0 ? (b(), _("div", er, [
2199
2199
  m("div", {
2200
- class: B([{ "bg-red-500/80": n.value.status === !1, "bg-green-500": n.value.status === !0, "bg-purple-500": n.value.status === "Offline" }, "w-5 h-5 text-xs shadow flex shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer group-hover:w-auto group-hover:px-2 transition-all duration-200 ease-in-out"])
2200
+ class: B([{ "bg-red-500": n.value.status === !1, "bg-green-500": n.value.status === !0, "bg-purple-500": n.value.status === "Offline" }, "w-5 h-5 text-xs shadow flex shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer group-hover:w-auto group-hover:px-2 transition-all duration-200 ease-in-out"])
2201
2201
  }, [
2202
2202
  m("div", tr, N(n.value.status === !0 ? "Conectada" : n.value.status === !1 ? "Desconectada" : "Indefinida"), 1)
2203
2203
  ], 2)
@@ -3,4 +3,4 @@
3
3
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const n=new this(t);return o.forEach(r=>n.set(r)),n}static accessor(t){const n=(this[He]=this[He]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=$(a);n[c]||(Un(r,a),n[c]=!0)}return l.isArray(t)?t.forEach(s):s(t),this}}x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(x.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[o]=n}}}),l.freezeMethods(x);function ie(e,t){const o=this||I,n=t||o,r=x.from(n.headers);let s=n.data;return l.forEach(e,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function ve(e){return!!(e&&e.__CANCEL__)}function P(e,t,o){g.call(this,e??"canceled",g.ERR_CANCELED,t,o),this.name="CanceledError"}l.inherits(P,g,{__CANCEL__:!0});function Je(e,t,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):t(new g("Request failed with status code "+o.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function zn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qn(e,t){e=e||10;const o=new Array(e),n=new Array(e);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(h){const f=Date.now(),d=n[s];a||(a=f),o[r]=h,n[r]=f;let u=s,w=0;for(;u!==r;)w+=o[u++],u=u%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),f-a<t)return;const p=d&&f-d;return p?Math.round(w*1e3/p):void 0}}function Hn(e,t){let o=0;const n=1e3/t;let r=null;return function(){const a=this===!0,c=Date.now();if(a||c-o>n)return r&&(clearTimeout(r),r=null),o=c,e.apply(null,arguments);r||(r=setTimeout(()=>(r=null,o=Date.now(),e.apply(null,arguments)),n-(c-o)))}}const K=(e,t,o=3)=>{let n=0;const r=qn(50,250);return Hn(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,h=a-n,f=r(h),d=a<=c;n=a;const u={loaded:a,total:c,progress:c?a/c:void 0,bytes:h,rate:f||void 0,estimated:f&&c&&d?(c-a)/f:void 0,event:s,lengthComputable:c!=null};u[t?"download":"upload"]=!0,e(u)},o)},vn=N.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let n;function r(s){let a=s;return t&&(o.setAttribute("href",a),a=o.href),o.setAttribute("href",a),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return n=r(window.location.href),function(a){const c=l.isString(a)?r(a):a;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}(),Jn=N.hasStandardBrowserEnv?{write(e,t,o,n,r,s){const a=[e+"="+encodeURIComponent(t)];l.isNumber(o)&&a.push("expires="+new Date(o).toGMTString()),l.isString(n)&&a.push("path="+n),l.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ze(e,t){return e&&!Zn(t)?Wn(e,t):t}const We=e=>e instanceof x?{...e}:e;function A(e,t){t=t||{};const o={};function n(f,d,u){return l.isPlainObject(f)&&l.isPlainObject(d)?l.merge.call({caseless:u},f,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function r(f,d,u){if(l.isUndefined(d)){if(!l.isUndefined(f))return n(void 0,f,u)}else return n(f,d,u)}function s(f,d){if(!l.isUndefined(d))return n(void 0,d)}function a(f,d){if(l.isUndefined(d)){if(!l.isUndefined(f))return n(void 0,f)}else return n(void 0,d)}function c(f,d,u){if(u in t)return n(f,d);if(u in e)return n(void 0,f)}const h={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(f,d)=>r(We(f),We(d),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(d){const u=h[d]||r,w=u(e[d],t[d],d);l.isUndefined(w)&&u!==c||(o[d]=w)}),o}const Ke=e=>{const t=A({},e);let{data:o,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:c}=t;t.headers=a=x.from(a),t.url=$e(Ze(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let h;if(l.isFormData(o)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((h=a.getContentType())!==!1){const[f,...d]=h?h.split(";").map(u=>u.trim()).filter(Boolean):[];a.setContentType([f||"multipart/form-data",...d].join("; "))}}if(N.hasStandardBrowserEnv&&(n&&l.isFunction(n)&&(n=n(t)),n||n!==!1&&vn(t.url))){const f=r&&s&&Jn.read(s);f&&a.set(r,f)}return t},Kn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,n){const r=Ke(e);let s=r.data;const a=x.from(r.headers).normalize();let{responseType:c}=r,h;function f(){r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function u(){if(!d)return;const p=x.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),y={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:p,config:e,request:d};Je(function(S){o(S),f()},function(S){n(S),f()},y),d=null}"onloadend"in d?d.onloadend=u:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(u)},d.onabort=function(){d&&(n(new g("Request aborted",g.ECONNABORTED,r,d)),d=null)},d.onerror=function(){n(new g("Network Error",g.ERR_NETWORK,r,d)),d=null},d.ontimeout=function(){let m=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const y=r.transitional||ze;r.timeoutErrorMessage&&(m=r.timeoutErrorMessage),n(new g(m,y.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,r,d)),d=null},s===void 0&&a.setContentType(null),"setRequestHeader"in d&&l.forEach(a.toJSON(),function(m,y){d.setRequestHeader(y,m)}),l.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),c&&c!=="json"&&(d.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&d.addEventListener("progress",K(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",K(r.onUploadProgress)),(r.cancelToken||r.signal)&&(h=p=>{d&&(n(!p||p.type?new P(null,e,d):p),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const w=zn(r.url);if(w&&N.protocols.indexOf(w)===-1){n(new g("Unsupported protocol "+w+":",g.ERR_BAD_REQUEST,e));return}d.send(s||null)})},Gn=(e,t)=>{let o=new AbortController,n;const r=function(h){if(!n){n=!0,a();const f=h instanceof Error?h:this.reason;o.abort(f instanceof g?f:new P(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{r(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(h=>{h&&(h.removeEventListener?h.removeEventListener("abort",r):h.unsubscribe(r))}),e=null)};e.forEach(h=>h&&h.addEventListener&&h.addEventListener("abort",r));const{signal:c}=o;return c.unsubscribe=a,[c,()=>{s&&clearTimeout(s),s=null}]},Xn=function*(e,t){let o=e.byteLength;if(!t||o<t){yield e;return}let n=0,r;for(;n<o;)r=n+t,yield e.slice(n,r),n=r},Yn=async function*(e,t,o){for await(const n of e)yield*Xn(ArrayBuffer.isView(n)?n:await o(String(n)),t)},Ge=(e,t,o,n,r)=>{const s=Yn(e,t,r);let a=0;return new ReadableStream({type:"bytes",async pull(c){const{done:h,value:f}=await s.next();if(h){c.close(),n();return}let d=f.byteLength;o&&o(a+=d),c.enqueue(new Uint8Array(f))},cancel(c){return n(c),s.return()}},{highWaterMark:2})},Xe=(e,t)=>{const o=e!=null;return n=>setTimeout(()=>t({lengthComputable:o,total:e,loaded:n}))},G=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ye=G&&typeof ReadableStream=="function",ae=G&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Qn=Ye&&(()=>{let e=!1;const t=new Request(N.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Qe=64*1024,le=Ye&&!!(()=>{try{return l.isReadableStream(new Response("").body)}catch{}})(),X={stream:le&&(e=>e.body)};G&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!X[t]&&(X[t]=l.isFunction(e[t])?o=>o[t]():(o,n)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,n)})})})(new Response);const eo=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(l.isArrayBufferView(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await ae(e)).byteLength},to=async(e,t)=>{const o=l.toFiniteNumber(e.getContentLength());return o??eo(t)},ce={http:Cn,xhr:Kn,fetch:G&&(async e=>{let{url:t,method:o,data:n,signal:r,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:h,responseType:f,headers:d,withCredentials:u="same-origin",fetchOptions:w}=Ke(e);f=f?(f+"").toLowerCase():"text";let[p,m]=r||s||a?Gn([r,s],a):[],y,b;const S=()=>{!y&&setTimeout(()=>{p&&p.unsubscribe()}),y=!0};let R;try{if(h&&Qn&&o!=="get"&&o!=="head"&&(R=await to(d,n))!==0){let B=new Request(t,{method:"POST",body:n,duplex:"half"}),V;l.isFormData(n)&&(V=B.headers.get("content-type"))&&d.setContentType(V),B.body&&(n=Ge(B.body,Qe,Xe(R,K(h)),null,ae))}l.isString(u)||(u=u?"cors":"omit"),b=new Request(t,{...w,signal:p,method:o.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",withCredentials:u});let E=await fetch(b);const U=le&&(f==="stream"||f==="response");if(le&&(c||U)){const B={};["status","statusText","headers"].forEach(at=>{B[at]=E[at]});const V=l.toFiniteNumber(E.headers.get("content-length"));E=new Response(Ge(E.body,Qe,c&&Xe(V,K(c,!0)),U&&S,ae),B)}f=f||"text";let Wo=await X[l.findKey(X,f)||"text"](E,e);return!U&&S(),m&&m(),await new Promise((B,V)=>{Je(B,V,{data:Wo,headers:x.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:b})})}catch(E){throw S(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,b),{cause:E.cause||E}):g.from(E,E&&E.code,e,b)}})};l.forEach(ce,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const et=e=>`- ${e}`,no=e=>l.isFunction(e)||e===null||e===!1,tt={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let o,n;const r={};for(let s=0;s<t;s++){o=e[s];let a;if(n=o,!no(o)&&(n=ce[(a=String(o)).toLowerCase()],n===void 0))throw new g(`Unknown adapter '${a}'`);if(n)break;r[a||"#"+s]=n}if(!n){const s=Object.entries(r).map(([c,h])=>`adapter ${c} `+(h===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
4
4
  `+s.map(et).join(`
5
5
  `):" "+et(s[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:ce};function de(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new P(null,e)}function nt(e){return de(e),e.headers=x.from(e.headers),e.data=ie.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt.getAdapter(e.adapter||I.adapter)(e).then(function(n){return de(e),n.data=ie.call(e,e.transformResponse,n),n.headers=x.from(n.headers),n},function(n){return ve(n)||(de(e),n&&n.response&&(n.response.data=ie.call(e,e.transformResponse,n.response),n.response.headers=x.from(n.response.headers))),Promise.reject(n)})}const ot="1.7.2",ue={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ue[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const rt={};ue.transitional=function(t,o,n){function r(s,a){return"[Axios v"+ot+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,c)=>{if(t===!1)throw new g(r(a," has been removed"+(o?" in "+o:"")),g.ERR_DEPRECATED);return o&&!rt[a]&&(rt[a]=!0,console.warn(r(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,a,c):!0}};function oo(e,t,o){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let r=n.length;for(;r-- >0;){const s=n[r],a=t[s];if(a){const c=e[s],h=c===void 0||a(c,s,e);if(h!==!0)throw new g("option "+s+" must be "+h,g.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new g("Unknown option "+s,g.ERR_BAD_OPTION)}}const fe={assertOptions:oo,validators:ue},O=fe.validators;class T{constructor(t){this.defaults=t,this.interceptors={request:new Ue,response:new Ue}}async request(t,o){try{return await this._request(t,o)}catch(n){if(n instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+s):n.stack=s}catch{}}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=A(this.defaults,o);const{transitional:n,paramsSerializer:r,headers:s}=o;n!==void 0&&fe.assertOptions(n,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1),r!=null&&(l.isFunction(r)?o.paramsSerializer={serialize:r}:fe.assertOptions(r,{encode:O.function,serialize:O.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&l.merge(s.common,s[o.method]);s&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),o.headers=x.concat(a,s);const c=[];let h=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(o)===!1||(h=h&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let d,u=0,w;if(!h){const m=[nt.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,f),w=m.length,d=Promise.resolve(o);u<w;)d=d.then(m[u++],m[u++]);return d}w=c.length;let p=o;for(u=0;u<w;){const m=c[u++],y=c[u++];try{p=m(p)}catch(b){y.call(this,b);break}}try{d=nt.call(this,p)}catch(m){return Promise.reject(m)}for(u=0,w=f.length;u<w;)d=d.then(f[u++],f[u++]);return d}getUri(t){t=A(this.defaults,t);const o=Ze(t.baseURL,t.url);return $e(o,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){T.prototype[t]=function(o,n){return this.request(A(n||{},{method:t,url:o,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function o(n){return function(s,a,c){return this.request(A(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}T.prototype[t]=o(),T.prototype[t+"Form"]=o(!0)});class he{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const n=this;this.promise.then(r=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](r);n._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{n.subscribe(c),s=c}).then(r);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,c){n.reason||(n.reason=new P(s,a,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new he(function(r){t=r}),cancel:t}}}function ro(e){return function(o){return e.apply(null,o)}}function so(e){return l.isObject(e)&&e.isAxiosError===!0}const pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pe).forEach(([e,t])=>{pe[t]=e});function st(e){const t=new T(e),o=Ce(T.prototype.request,t);return l.extend(o,T.prototype,t,{allOwnKeys:!0}),l.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return st(A(e,r))},o}const _=st(I);_.Axios=T,_.CanceledError=P,_.CancelToken=he,_.isCancel=ve,_.VERSION=ot,_.toFormData=Z,_.AxiosError=g,_.Cancel=_.CanceledError,_.all=function(t){return Promise.all(t)},_.spread=ro,_.isAxiosError=so,_.mergeConfig=A,_.AxiosHeaders=x,_.formToJSON=e=>qe(l.isHTMLForm(e)?new FormData(e):e),_.getAdapter=tt.getAdapter,_.HttpStatusCode=pe,_.default=_;const io={class:"w-full relative text-current"},ao={class:"flex cursor-pointer justify-between items-center"},lo={key:0},co={key:0},uo={key:1,class:"flex items-center gap-2"},fo={class:"flex gap-3 items-center flex-shrink-0"},ho={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},po=[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],mo={key:1,class:"relative"},wo=i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),yo={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-5 h-5 absolute -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},go=[i.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],Eo={key:2,class:"relative group"},_o={class:"hidden my-auto text-center font-semibold group-hover:inline-block"},bo={class:"w-full"},So={key:1,class:"flex items-center gap-2 justify-center"},xo=i.createElementVNode("svg",{"aria-hidden":"true",class:"inline w-5 h-5 text-blue-300 animate-spin fill-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),Co={class:"flex px-4 items-center gap-2"},ko=[i.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[i.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)],No=[i.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 9-7 7-7-7"},null,-1)],Ro={key:0,class:"rounded-b-lg overflow-y-auto max-h-[200px] absolute top-[48px] w-full z-20 text-sm shadow shadow-black dark:shadow-gray-400 bg-base-300 p-2"},Oo={class:"gap-2 flex flex-col"},Bo={class:"select-none cursor-pointer w-full"},Ao=["onClick","disabled"],To={class:"flex w-full items-center pl-2 gap-3"},Lo={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},Po=[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],Vo={key:1,class:"relative"},Do=i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),Fo={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-4 h-4 absolute flex-shrink-0 -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},jo=[i.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],Mo={key:2,class:"w-6 h-6 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},Io=[i.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)],$o={class:"w-full te text-center"},Uo={key:3,class:"relative group"},zo={class:"my-auto text-center mx-auto font-semibold group-hover:inline-block"},qo={key:4,class:"flex justify-center"},Ho=[i.createElementVNode("div",{class:"h-5 w-5 mr-8 border-t-transparent border-solid animate-spin rounded-full border-white border-4"},null,-1)],vo={class:"flex min-w-[150px] text-sm text-center items-center my-auto flex-shrink-0 px-1 justify-center"},Jo={key:1,class:"p-4"},it={__name:"index",props:{modelValue:{type:Object,default:null},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzIyMzQwMjYxLCJpYXQiOjE3MjIyNTM4NjEsImp0aSI6IjViZGRmMjJiMWIyMDRmMDQ5MWEwZWFjNzIyYjZiNTFiIiwidXNlcl9pZCI6IjYyNGRmZTIzLTkyZDAtNDNmMS04MDYxLWEyMzIxZjJiNWViYiJ9.ck1s6mHEzJ0IQNmEJGxCd2jdFC6r0oIMgClP5l5nbdI"},type:{type:String},webhooks:{type:Boolean,default:void 0},url:{type:String,default:"http://localhost:8000/v1/api/instances/instance/"},status_url:{type:String,default:"http://localhost:8000/v1/api/instances/status_instance/"}},emits:["update:modelValue","function"],setup(e,{emit:t}){const o=i.ref(!1),n=i.ref(null),r=i.ref(!0),s=e,a=t,c=i.ref(null);async function h(){try{let u=s.url,w=s.status_url;const m=await _.get(`${u}`,{headers:{Authorization:`Bearer ${s.token}`}});c.value=m.data,c.value.forEach(async y=>{y.isLoading=!0;try{(await _.get(`${w}?instance=${y.id}`,{headers:{Authorization:`Bearer ${s.token}`}})).data.instance_status!=="Disconnected"?y.status=!0:y.status=!1}catch{y.status="Offline"}y.isLoading=!1})}catch(u){console.log(u)}r.value=!1}function f(u){a("function",u)}i.watch(()=>s.modelValue,u=>{n.value=u},{immediate:!0}),i.watch(n,u=>{a("update:modelValue",u)}),i.onMounted(async()=>{await h()});function d(u){if(u=u.replace(/\D/g,""),u.length>=12&&u.startsWith("55"))return"+"+u.slice(0,2)+" "+u.slice(2,4)+" "+u.slice(4,9)+"-"+u.slice(9);if(u.length===11)return"+55 "+u.slice(0,2)+" "+u.slice(2,7)+"-"+u.slice(7);if(u.length===10){const w=u.slice(0,2),p=u.slice(2);return"+55 "+w+" "+p.slice(0,5)+"-"+p.slice(5)}else return u}return(u,w)=>(i.openBlock(),i.createElementBlock("main",io,[i.createElementVNode("div",{class:i.normalizeClass([{"rounded-b-none":o.value},"rounded-lg shadow dark:shadow-gray-400 shadow-gray-900 dark:bg-base-100 bg-base-100 text-center"])},[i.createElementVNode("div",ao,[i.createElementVNode("p",{onClick:w[0]||(w[0]=p=>o.value=!o.value),class:"w-full p-3 px-4 select-none"},[r.value?(i.openBlock(),i.createElementBlock("div",So,[xo,i.createTextVNode("Carregando instâncias...")])):(i.openBlock(),i.createElementBlock("div",lo,[n.value?(i.openBlock(),i.createElementBlock("span",uo,[i.createElementVNode("header",fo,[n.value.type==="whatsapp-qrcode"?(i.openBlock(),i.createElementBlock("svg",ho,po)):n.value.type==="whatsapp-api-official"?(i.openBlock(),i.createElementBlock("div",mo,[wo,(i.openBlock(),i.createElementBlock("svg",yo,go))])):i.createCommentVNode("",!0),n.value&&n.value.status!==void 0?(i.openBlock(),i.createElementBlock("div",Eo,[i.createElementVNode("div",{class:i.normalizeClass([{"bg-red-500/80":n.value.status===!1,"bg-green-500":n.value.status===!0,"bg-purple-500":n.value.status==="Offline"},"w-5 h-5 text-xs shadow flex shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer group-hover:w-auto group-hover:px-2 transition-all duration-200 ease-in-out"])},[i.createElementVNode("div",_o,i.toDisplayString(n.value.status===!0?"Conectada":n.value.status===!1?"Desconectada":"Indefinida"),1)],2)])):i.createCommentVNode("",!0)]),i.createElementVNode("div",bo,i.toDisplayString(n.value.name),1)])):(i.openBlock(),i.createElementBlock("span",co,i.toDisplayString(c.value?c.value.length:"Sem")+" Instâncias disponíveis",1))]))]),i.createElementVNode("footer",Co,[i.createElementVNode("button",{onClick:w[1]||(w[1]=p=>(n.value=null,o.value=!1))},ko),i.createElementVNode("button",{onClick:w[2]||(w[2]=p=>o.value=!o.value)},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass([{"rotate-180":o.value},"w-4 h-4 ease-out transition"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},No,2))])])])],2),o.value?(i.openBlock(),i.createElementBlock("nav",Ro,[i.createElementVNode("ul",Oo,[c.value.length>0?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(c.value,(p,m)=>(i.openBlock(),i.createElementBlock("li",Bo,[i.createElementVNode("button",{class:i.normalizeClass([n.value&&n.value.id===p.id?"bg-base-100":"bg-base-200 hover:bg-base-100","flex rounded-md justify-between items-center p-2 px-1 w-full"]),onClick:y=>(n.value=p,o.value=!1,f(n.value)),disabled:n.value&&n.value.id===p.id||e.type&&p.type!==e.type||e.webhooks!==void 0&&e.webhooks!==p.webhooks},[i.createElementVNode("div",To,[p.type==="whatsapp-qrcode"?(i.openBlock(),i.createElementBlock("svg",Lo,Po)):p.type==="whatsapp-api-official"?(i.openBlock(),i.createElementBlock("div",Vo,[Do,(i.openBlock(),i.createElementBlock("svg",Fo,jo))])):i.createCommentVNode("",!0),e.type&&p.type!==e.type||e.webhooks!==void 0&&e.webhooks!==p.webhooks?(i.openBlock(),i.createElementBlock("svg",Mo,Io)):i.createCommentVNode("",!0),i.createElementVNode("p",$o,i.toDisplayString(p.name),1),p.isLoading?(i.openBlock(),i.createElementBlock("div",qo,Ho)):(i.openBlock(),i.createElementBlock("div",Uo,[i.createElementVNode("div",{class:i.normalizeClass([{"bg-red-500":p.status===!1,"bg-green-500":p.status===!0,"bg-purple-500":p.status==="Offline"},"text-xs w-[100px] py-1 shadow flex justify-start shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer transition-all duration-200 ease-in-out"])},[i.createElementVNode("div",zo,i.toDisplayString(p.status===!0?"Conectada":p.status===!1?"Desconectada":"Indefinida"),1)],2)]))]),i.createElementVNode("div",vo,[i.createElementVNode("div",null,i.toDisplayString(p.telephone?d(p.telephone):""),1)])],10,Ao)]))),256)):(i.openBlock(),i.createElementBlock("div",Jo," Sem instâncias disponíveis"))])])):i.createCommentVNode("",!0)]))}};function Zo(e){e.component("primarySelect",_e),e.component("simpleModal",Se),e.component("simpleCard",xe),e.component("instanceSelect",it)}return{install:Zo,primarySelect:_e,simpleModal:Se,simpleCard:xe,instanceSelect:it}});
6
+ `+s):n.stack=s}catch{}}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=A(this.defaults,o);const{transitional:n,paramsSerializer:r,headers:s}=o;n!==void 0&&fe.assertOptions(n,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1),r!=null&&(l.isFunction(r)?o.paramsSerializer={serialize:r}:fe.assertOptions(r,{encode:O.function,serialize:O.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&l.merge(s.common,s[o.method]);s&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),o.headers=x.concat(a,s);const c=[];let h=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(o)===!1||(h=h&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let d,u=0,w;if(!h){const m=[nt.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,f),w=m.length,d=Promise.resolve(o);u<w;)d=d.then(m[u++],m[u++]);return d}w=c.length;let p=o;for(u=0;u<w;){const m=c[u++],y=c[u++];try{p=m(p)}catch(b){y.call(this,b);break}}try{d=nt.call(this,p)}catch(m){return Promise.reject(m)}for(u=0,w=f.length;u<w;)d=d.then(f[u++],f[u++]);return d}getUri(t){t=A(this.defaults,t);const o=Ze(t.baseURL,t.url);return $e(o,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){T.prototype[t]=function(o,n){return this.request(A(n||{},{method:t,url:o,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function o(n){return function(s,a,c){return this.request(A(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}T.prototype[t]=o(),T.prototype[t+"Form"]=o(!0)});class he{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const n=this;this.promise.then(r=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](r);n._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{n.subscribe(c),s=c}).then(r);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,c){n.reason||(n.reason=new P(s,a,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new he(function(r){t=r}),cancel:t}}}function ro(e){return function(o){return e.apply(null,o)}}function so(e){return l.isObject(e)&&e.isAxiosError===!0}const pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pe).forEach(([e,t])=>{pe[t]=e});function st(e){const t=new T(e),o=Ce(T.prototype.request,t);return l.extend(o,T.prototype,t,{allOwnKeys:!0}),l.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return st(A(e,r))},o}const _=st(I);_.Axios=T,_.CanceledError=P,_.CancelToken=he,_.isCancel=ve,_.VERSION=ot,_.toFormData=Z,_.AxiosError=g,_.Cancel=_.CanceledError,_.all=function(t){return Promise.all(t)},_.spread=ro,_.isAxiosError=so,_.mergeConfig=A,_.AxiosHeaders=x,_.formToJSON=e=>qe(l.isHTMLForm(e)?new FormData(e):e),_.getAdapter=tt.getAdapter,_.HttpStatusCode=pe,_.default=_;const io={class:"w-full relative text-current"},ao={class:"flex cursor-pointer justify-between items-center"},lo={key:0},co={key:0},uo={key:1,class:"flex items-center gap-2"},fo={class:"flex gap-3 items-center flex-shrink-0"},ho={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},po=[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],mo={key:1,class:"relative"},wo=i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),yo={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-5 h-5 absolute -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},go=[i.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],Eo={key:2,class:"relative group"},_o={class:"hidden my-auto text-center font-semibold group-hover:inline-block"},bo={class:"w-full"},So={key:1,class:"flex items-center gap-2 justify-center"},xo=i.createElementVNode("svg",{"aria-hidden":"true",class:"inline w-5 h-5 text-blue-300 animate-spin fill-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),Co={class:"flex px-4 items-center gap-2"},ko=[i.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[i.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)],No=[i.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 9-7 7-7-7"},null,-1)],Ro={key:0,class:"rounded-b-lg overflow-y-auto max-h-[200px] absolute top-[48px] w-full z-20 text-sm shadow shadow-black dark:shadow-gray-400 bg-base-300 p-2"},Oo={class:"gap-2 flex flex-col"},Bo={class:"select-none cursor-pointer w-full"},Ao=["onClick","disabled"],To={class:"flex w-full items-center pl-2 gap-3"},Lo={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},Po=[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],Vo={key:1,class:"relative"},Do=i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},[i.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),Fo={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-4 h-4 absolute flex-shrink-0 -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},jo=[i.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],Mo={key:2,class:"w-6 h-6 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},Io=[i.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)],$o={class:"w-full te text-center"},Uo={key:3,class:"relative group"},zo={class:"my-auto text-center mx-auto font-semibold group-hover:inline-block"},qo={key:4,class:"flex justify-center"},Ho=[i.createElementVNode("div",{class:"h-5 w-5 mr-8 border-t-transparent border-solid animate-spin rounded-full border-white border-4"},null,-1)],vo={class:"flex min-w-[150px] text-sm text-center items-center my-auto flex-shrink-0 px-1 justify-center"},Jo={key:1,class:"p-4"},it={__name:"index",props:{modelValue:{type:Object,default:null},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzIyMzQwMjYxLCJpYXQiOjE3MjIyNTM4NjEsImp0aSI6IjViZGRmMjJiMWIyMDRmMDQ5MWEwZWFjNzIyYjZiNTFiIiwidXNlcl9pZCI6IjYyNGRmZTIzLTkyZDAtNDNmMS04MDYxLWEyMzIxZjJiNWViYiJ9.ck1s6mHEzJ0IQNmEJGxCd2jdFC6r0oIMgClP5l5nbdI"},type:{type:String},webhooks:{type:Boolean,default:void 0},url:{type:String,default:"http://localhost:8000/v1/api/instances/instance/"},status_url:{type:String,default:"http://localhost:8000/v1/api/instances/status_instance/"}},emits:["update:modelValue","function"],setup(e,{emit:t}){const o=i.ref(!1),n=i.ref(null),r=i.ref(!0),s=e,a=t,c=i.ref(null);async function h(){try{let u=s.url,w=s.status_url;const m=await _.get(`${u}`,{headers:{Authorization:`Bearer ${s.token}`}});c.value=m.data,c.value.forEach(async y=>{y.isLoading=!0;try{(await _.get(`${w}?instance=${y.id}`,{headers:{Authorization:`Bearer ${s.token}`}})).data.instance_status!=="Disconnected"?y.status=!0:y.status=!1}catch{y.status="Offline"}y.isLoading=!1})}catch(u){console.log(u)}r.value=!1}function f(u){a("function",u)}i.watch(()=>s.modelValue,u=>{n.value=u},{immediate:!0}),i.watch(n,u=>{a("update:modelValue",u)}),i.onMounted(async()=>{await h()});function d(u){if(u=u.replace(/\D/g,""),u.length>=12&&u.startsWith("55"))return"+"+u.slice(0,2)+" "+u.slice(2,4)+" "+u.slice(4,9)+"-"+u.slice(9);if(u.length===11)return"+55 "+u.slice(0,2)+" "+u.slice(2,7)+"-"+u.slice(7);if(u.length===10){const w=u.slice(0,2),p=u.slice(2);return"+55 "+w+" "+p.slice(0,5)+"-"+p.slice(5)}else return u}return(u,w)=>(i.openBlock(),i.createElementBlock("main",io,[i.createElementVNode("div",{class:i.normalizeClass([{"rounded-b-none":o.value},"rounded-lg shadow dark:shadow-gray-400 shadow-gray-900 dark:bg-base-100 bg-base-100 text-center"])},[i.createElementVNode("div",ao,[i.createElementVNode("p",{onClick:w[0]||(w[0]=p=>o.value=!o.value),class:"w-full p-3 px-4 select-none"},[r.value?(i.openBlock(),i.createElementBlock("div",So,[xo,i.createTextVNode("Carregando instâncias...")])):(i.openBlock(),i.createElementBlock("div",lo,[n.value?(i.openBlock(),i.createElementBlock("span",uo,[i.createElementVNode("header",fo,[n.value.type==="whatsapp-qrcode"?(i.openBlock(),i.createElementBlock("svg",ho,po)):n.value.type==="whatsapp-api-official"?(i.openBlock(),i.createElementBlock("div",mo,[wo,(i.openBlock(),i.createElementBlock("svg",yo,go))])):i.createCommentVNode("",!0),n.value&&n.value.status!==void 0?(i.openBlock(),i.createElementBlock("div",Eo,[i.createElementVNode("div",{class:i.normalizeClass([{"bg-red-500":n.value.status===!1,"bg-green-500":n.value.status===!0,"bg-purple-500":n.value.status==="Offline"},"w-5 h-5 text-xs shadow flex shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer group-hover:w-auto group-hover:px-2 transition-all duration-200 ease-in-out"])},[i.createElementVNode("div",_o,i.toDisplayString(n.value.status===!0?"Conectada":n.value.status===!1?"Desconectada":"Indefinida"),1)],2)])):i.createCommentVNode("",!0)]),i.createElementVNode("div",bo,i.toDisplayString(n.value.name),1)])):(i.openBlock(),i.createElementBlock("span",co,i.toDisplayString(c.value?c.value.length:"Sem")+" Instâncias disponíveis",1))]))]),i.createElementVNode("footer",Co,[i.createElementVNode("button",{onClick:w[1]||(w[1]=p=>(n.value=null,o.value=!1))},ko),i.createElementVNode("button",{onClick:w[2]||(w[2]=p=>o.value=!o.value)},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass([{"rotate-180":o.value},"w-4 h-4 ease-out transition"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},No,2))])])])],2),o.value?(i.openBlock(),i.createElementBlock("nav",Ro,[i.createElementVNode("ul",Oo,[c.value.length>0?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(c.value,(p,m)=>(i.openBlock(),i.createElementBlock("li",Bo,[i.createElementVNode("button",{class:i.normalizeClass([n.value&&n.value.id===p.id?"bg-base-100":"bg-base-200 hover:bg-base-100","flex rounded-md justify-between items-center p-2 px-1 w-full"]),onClick:y=>(n.value=p,o.value=!1,f(n.value)),disabled:n.value&&n.value.id===p.id||e.type&&p.type!==e.type||e.webhooks!==void 0&&e.webhooks!==p.webhooks},[i.createElementVNode("div",To,[p.type==="whatsapp-qrcode"?(i.openBlock(),i.createElementBlock("svg",Lo,Po)):p.type==="whatsapp-api-official"?(i.openBlock(),i.createElementBlock("div",Vo,[Do,(i.openBlock(),i.createElementBlock("svg",Fo,jo))])):i.createCommentVNode("",!0),e.type&&p.type!==e.type||e.webhooks!==void 0&&e.webhooks!==p.webhooks?(i.openBlock(),i.createElementBlock("svg",Mo,Io)):i.createCommentVNode("",!0),i.createElementVNode("p",$o,i.toDisplayString(p.name),1),p.isLoading?(i.openBlock(),i.createElementBlock("div",qo,Ho)):(i.openBlock(),i.createElementBlock("div",Uo,[i.createElementVNode("div",{class:i.normalizeClass([{"bg-red-500":p.status===!1,"bg-green-500":p.status===!0,"bg-purple-500":p.status==="Offline"},"text-xs w-[100px] py-1 shadow flex justify-start shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer transition-all duration-200 ease-in-out"])},[i.createElementVNode("div",zo,i.toDisplayString(p.status===!0?"Conectada":p.status===!1?"Desconectada":"Indefinida"),1)],2)]))]),i.createElementVNode("div",vo,[i.createElementVNode("div",null,i.toDisplayString(p.telephone?d(p.telephone):""),1)])],10,Ao)]))),256)):(i.openBlock(),i.createElementBlock("div",Jo," Sem instâncias disponíveis"))])])):i.createCommentVNode("",!0)]))}};function Zo(e){e.component("primarySelect",_e),e.component("simpleModal",Se),e.component("simpleCard",xe),e.component("instanceSelect",it)}return{install:Zo,primarySelect:_e,simpleModal:Se,simpleCard:xe,instanceSelect:it}});
package/dist/tailwind.css CHANGED
@@ -788,9 +788,6 @@ video {
788
788
  --tw-bg-opacity: 1;
789
789
  background-color: rgb(239 68 68 / var(--tw-bg-opacity));
790
790
  }
791
- .bg-red-500\/80 {
792
- background-color: rgb(239 68 68 / 0.8);
793
- }
794
791
  .fill-gray-600 {
795
792
  fill: #4b5563;
796
793
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
- "version": "0.0.38",
7
+ "version": "0.0.39",
8
8
  "main": "dist/sm-click-library-ui.es.js",
9
9
  "module": "dist/sm-click-library-ui.umd.js",
10
10
  "private": false,