oasis-chat 0.2.1 → 0.2.3

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/index.cjs.js CHANGED
@@ -3,5 +3,5 @@
3
3
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Fe]=this[Fe]={accessors:{}}).accessors,s=this.prototype;function a(c){const u=I(c);r[u]||(Wn(s,c),r[u]=!0)}return f.isArray(t)?t.forEach(a):a(t),this}};D.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(D.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});f.freezeMethods(D);function ve(e,t){const n=this||_,r=t||n,s=D.from(r.headers);let a=r.data;return f.forEach(e,function(u){a=u.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function lt(e){return!!(e&&e.__CANCEL__)}function Z(e,t,n){P.call(this,e??"canceled",P.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(Z,P,{__CANCEL__:!0});function dt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new P("Request failed with status code "+n.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function gn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ln(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,c;return t=t!==void 0?t:1e3,function(d){const o=Date.now(),i=r[a];c||(c=o),n[s]=d,r[s]=o;let z=a,w=0;for(;z!==s;)w+=n[z++],z=z%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),o-c<t)return;const H=i&&o-i;return H?Math.round(w*1e3/H):void 0}}function En(e,t){let n=0,r=1e3/t,s,a;const c=(o,i=Date.now())=>{n=i,s=null,a&&(clearTimeout(a),a=null),e(...o)};return[(...o)=>{const i=Date.now(),z=i-n;z>=r?c(o,i):(s=o,a||(a=setTimeout(()=>{a=null,c(s)},r-z)))},()=>s&&c(s)]}const ae=(e,t,n=3)=>{let r=0;const s=Ln(50,250);return En(a=>{const c=a.loaded,u=a.lengthComputable?a.total:void 0,d=c-r,o=s(d),i=c<=u;r=c;const z={loaded:c,total:u,progress:u?c/u:void 0,bytes:d,rate:o||void 0,estimated:o&&u&&i?(u-c)/o:void 0,event:a,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(z)},n)},Be=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ve=e=>(...t)=>f.asap(()=>e(...t)),Fn=X.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,X.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(X.origin),X.navigator&&/(msie|trident)/i.test(X.navigator.userAgent)):()=>!0,Bn=X.hasStandardBrowserEnv?{write(e,t,n,r,s,a,c){if(typeof document>"u")return;const u=[`${e}=${encodeURIComponent(t)}`];f.isNumber(n)&&u.push(`expires=${new Date(n).toUTCString()}`),f.isString(r)&&u.push(`path=${r}`),f.isString(s)&&u.push(`domain=${s}`),a===!0&&u.push("secure"),f.isString(c)&&u.push(`SameSite=${c}`),document.cookie=u.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Rn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zt(e,t,n){let r=!Vn(t);return e&&(r||n==!1)?Rn(e,t):t}const Re=e=>e instanceof D?{...e}:e;function B(e,t){t=t||{};const n={};function r(o,i,z,w){return f.isPlainObject(o)&&f.isPlainObject(i)?f.merge.call({caseless:w},o,i):f.isPlainObject(i)?f.merge({},i):f.isArray(i)?i.slice():i}function s(o,i,z,w){if(f.isUndefined(i)){if(!f.isUndefined(o))return r(void 0,o,z,w)}else return r(o,i,z,w)}function a(o,i){if(!f.isUndefined(i))return r(void 0,i)}function c(o,i){if(f.isUndefined(i)){if(!f.isUndefined(o))return r(void 0,o)}else return r(void 0,i)}function u(o,i,z){if(z in t)return r(o,i);if(z in e)return r(void 0,o)}const d={url:a,method:a,data:a,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:u,headers:(o,i,z)=>s(Re(o),Re(i),z,!0)};return f.forEach(Object.keys({...e,...t}),function(i){const z=d[i]||s,w=z(e[i],t[i],i);f.isUndefined(w)&&z!==u||(n[i]=w)}),n}const xt=e=>{const t=B({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:a,headers:c,auth:u}=t;if(t.headers=c=D.from(c),t.url=ft(zt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&c.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),f.isFormData(n)){if(X.hasStandardBrowserEnv||X.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(f.isFunction(n.getHeaders)){const d=n.getHeaders(),o=["content-type","content-length"];Object.entries(d).forEach(([i,z])=>{o.includes(i.toLowerCase())&&c.set(i,z)})}}if(X.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&Fn(t.url))){const d=s&&a&&Bn.read(a);d&&c.set(s,d)}return t},qn=typeof XMLHttpRequest<"u",Cn=qn&&function(e){return new Promise(function(n,r){const s=xt(e);let a=s.data;const c=D.from(s.headers).normalize();let{responseType:u,onUploadProgress:d,onDownloadProgress:o}=s,i,z,w,H,l;function v(){H&&H(),l&&l(),s.cancelToken&&s.cancelToken.unsubscribe(i),s.signal&&s.signal.removeEventListener("abort",i)}let x=new XMLHttpRequest;x.open(s.method.toUpperCase(),s.url,!0),x.timeout=s.timeout;function m(){if(!x)return;const O=D.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),y={data:!u||u==="text"||u==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:O,config:e,request:x};dt(function(A){n(A),v()},function(A){r(A),v()},y),x=null}"onloadend"in x?x.onloadend=m:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(m)},x.onabort=function(){x&&(r(new P("Request aborted",P.ECONNABORTED,e,x)),x=null)},x.onerror=function(N){const y=N&&N.message?N.message:"Network Error",g=new P(y,P.ERR_NETWORK,e,x);g.event=N||null,r(g),x=null},x.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const y=s.transitional||ut;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),r(new P(N,y.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,x)),x=null},a===void 0&&c.setContentType(null),"setRequestHeader"in x&&f.forEach(c.toJSON(),function(N,y){x.setRequestHeader(y,N)}),f.isUndefined(s.withCredentials)||(x.withCredentials=!!s.withCredentials),u&&u!=="json"&&(x.responseType=s.responseType),o&&([w,l]=ae(o,!0),x.addEventListener("progress",w)),d&&x.upload&&([z,H]=ae(d),x.upload.addEventListener("progress",z),x.upload.addEventListener("loadend",H)),(s.cancelToken||s.signal)&&(i=O=>{x&&(r(!O||O.type?new Z(null,e,x):O),x.abort(),x=null)},s.cancelToken&&s.cancelToken.subscribe(i),s.signal&&(s.signal.aborted?i():s.signal.addEventListener("abort",i)));const h=gn(s.url);if(h&&X.protocols.indexOf(h)===-1){r(new P("Unsupported protocol "+h+":",P.ERR_BAD_REQUEST,e));return}x.send(a||null)})},Zn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const a=function(o){if(!s){s=!0,u();const i=o instanceof Error?o:this.reason;r.abort(i instanceof P?i:new Z(i instanceof Error?i.message:i))}};let c=t&&setTimeout(()=>{c=null,a(new P(`timeout ${t} of ms exceeded`,P.ETIMEDOUT))},t);const u=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(o=>{o.unsubscribe?o.unsubscribe(a):o.removeEventListener("abort",a)}),e=null)};e.forEach(o=>o.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>f.asap(u),d}},kn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Un=async function*(e,t){for await(const n of In(e))yield*kn(n,t)},In=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},qe=(e,t,n,r)=>{const s=Un(e,t);let a=0,c,u=d=>{c||(c=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:o,value:i}=await s.next();if(o){u(),d.close();return}let z=i.byteLength;if(n){let w=a+=z;n(w)}d.enqueue(new Uint8Array(i))}catch(o){throw u(o),o}},cancel(d){return u(d),s.return()}},{highWaterMark:2})},Ce=64*1024,{isFunction:ne}=f,Sn=(({Request:e,Response:t})=>({Request:e,Response:t}))(f.global),{ReadableStream:Ze,TextEncoder:ke}=f.global,Ue=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jn=e=>{e=f.merge.call({skipUndefined:!0},Sn,e);const{fetch:t,Request:n,Response:r}=e,s=t?ne(t):typeof fetch=="function",a=ne(n),c=ne(r);if(!s)return!1;const u=s&&ne(Ze),d=s&&(typeof ke=="function"?(l=>v=>l.encode(v))(new ke):async l=>new Uint8Array(await new n(l).arrayBuffer())),o=a&&u&&Ue(()=>{let l=!1;const v=new n(X.origin,{body:new Ze,method:"POST",get duplex(){return l=!0,"half"}}).headers.has("Content-Type");return l&&!v}),i=c&&u&&Ue(()=>f.isReadableStream(new r("").body)),z={stream:i&&(l=>l.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!z[l]&&(z[l]=(v,x)=>{let m=v&&v[l];if(m)return m.call(v);throw new P(`Response type '${l}' is not supported`,P.ERR_NOT_SUPPORT,x)})});const w=async l=>{if(l==null)return 0;if(f.isBlob(l))return l.size;if(f.isSpecCompliantForm(l))return(await new n(X.origin,{method:"POST",body:l}).arrayBuffer()).byteLength;if(f.isArrayBufferView(l)||f.isArrayBuffer(l))return l.byteLength;if(f.isURLSearchParams(l)&&(l=l+""),f.isString(l))return(await d(l)).byteLength},H=async(l,v)=>{const x=f.toFiniteNumber(l.getContentLength());return x??w(v)};return async l=>{let{url:v,method:x,data:m,signal:h,cancelToken:O,timeout:N,onDownloadProgress:y,onUploadProgress:g,responseType:A,headers:de,withCredentials:$="same-origin",fetchOptions:Ae}=xt(l),ye=t||fetch;A=A?(A+"").toLowerCase():"text";let ee=Zn([h,O&&O.toAbortSignal()],N),k=null;const L=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()});let Te;try{if(g&&o&&x!=="get"&&x!=="head"&&(Te=await H(de,m))!==0){let W=new n(v,{method:"POST",body:m,duplex:"half"}),V;if(f.isFormData(m)&&(V=W.headers.get("content-type"))&&de.setContentType(V),W.body){const[ze,te]=Be(Te,ae(Ve(g)));m=qe(W.body,Ce,ze,te)}}f.isString($)||($=$?"include":"omit");const Y=a&&"credentials"in n.prototype,Ye={...Ae,signal:ee,method:x.toUpperCase(),headers:de.normalize().toJSON(),body:m,duplex:"half",credentials:Y?$:void 0};k=a&&new n(v,Ye);let G=await(a?ye(k,Ae):ye(v,Ye));const Me=i&&(A==="stream"||A==="response");if(i&&(y||Me&&L)){const W={};["status","statusText","headers"].forEach(Ge=>{W[Ge]=G[Ge]});const V=f.toFiniteNumber(G.headers.get("content-length")),[ze,te]=y&&Be(V,ae(Ve(y),!0))||[];G=new r(qe(G.body,Ce,ze,()=>{te&&te(),L&&L()}),W)}A=A||"text";let jt=await z[f.findKey(z,A)||"text"](G,l);return!Me&&L&&L(),await new Promise((W,V)=>{dt(W,V,{data:jt,headers:D.from(G.headers),status:G.status,statusText:G.statusText,config:l,request:k})})}catch(Y){throw L&&L(),Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)?Object.assign(new P("Network Error",P.ERR_NETWORK,l,k),{cause:Y.cause||Y}):P.from(Y,Y&&Y.code,l,k)}}},Kn=new Map,vt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let c=a.length,u=c,d,o,i=Kn;for(;u--;)d=a[u],o=i.get(d),o===void 0&&i.set(d,o=u?new Map:Jn(t)),i=o;return o};vt();const he={http:zn,xhr:Cn,fetch:{get:vt}};f.forEach(he,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ie=e=>`- ${e}`,Qn=e=>f.isFunction(e)||e===null||e===!1;function _n(e,t){e=f.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let c=0;c<n;c++){r=e[c];let u;if(s=r,!Qn(r)&&(s=he[(u=String(r)).toLowerCase()],s===void 0))throw new P(`Unknown adapter '${u}'`);if(s&&(f.isFunction(s)||(s=s.get(t))))break;a[u||"#"+c]=s}if(!s){const c=Object.entries(a).map(([d,o])=>`adapter ${d} `+(o===!1?"is not supported by the environment":"is not available in the build"));let u=n?c.length>1?`since :
4
4
  `+c.map(Ie).join(`
5
5
  `):" "+Ie(c[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return s}const Pt={getAdapter:_n,adapters:he};function Pe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Z(null,e)}function Se(e){return Pe(e),e.headers=D.from(e.headers),e.data=ve.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pt.getAdapter(e.adapter||_.adapter,e)(e).then(function(r){return Pe(e),r.data=ve.call(e,e.transformResponse,r),r.headers=D.from(r.headers),r},function(r){return lt(r)||(Pe(e),r&&r.response&&(r.response.data=ve.call(e,e.transformResponse,r.response),r.response.headers=D.from(r.response.headers))),Promise.reject(r)})}const wt="1.13.1",le={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{le[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Je={};le.transitional=function(t,n,r){function s(a,c){return"[Axios v"+wt+"] Transitional option '"+a+"'"+c+(r?". "+r:"")}return(a,c,u)=>{if(t===!1)throw new P(s(c," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!Je[c]&&(Je[c]=!0,console.warn(s(c," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,c,u):!0}};le.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function $n(e,t,n){if(typeof e!="object")throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],c=t[a];if(c){const u=e[a],d=u===void 0||c(u,a,e);if(d!==!0)throw new P("option "+a+" must be "+d,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+a,P.ERR_BAD_OPTION)}}const ce={assertOptions:$n,validators:le},M=ce.validators;let F=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ee,response:new Ee}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=B(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ce.assertOptions(r,{silentJSONParsing:M.transitional(M.boolean),forcedJSONParsing:M.transitional(M.boolean),clarifyTimeoutError:M.transitional(M.boolean)},!1),s!=null&&(f.isFunction(s)?n.paramsSerializer={serialize:s}:ce.assertOptions(s,{encode:M.function,serialize:M.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ce.assertOptions(n,{baseUrl:M.spelling("baseURL"),withXsrfToken:M.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c=a&&f.merge(a.common,a[n.method]);a&&f.forEach(["delete","get","head","post","put","patch","common"],l=>{delete a[l]}),n.headers=D.concat(c,a);const u=[];let d=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(d=d&&v.synchronous,u.unshift(v.fulfilled,v.rejected))});const o=[];this.interceptors.response.forEach(function(v){o.push(v.fulfilled,v.rejected)});let i,z=0,w;if(!d){const l=[Se.bind(this),void 0];for(l.unshift(...u),l.push(...o),w=l.length,i=Promise.resolve(n);z<w;)i=i.then(l[z++],l[z++]);return i}w=u.length;let H=n;for(;z<w;){const l=u[z++],v=u[z++];try{H=l(H)}catch(x){v.call(this,x);break}}try{i=Se.call(this,H)}catch(l){return Promise.reject(l)}for(z=0,w=o.length;z<w;)i=i.then(o[z++],o[z++]);return i}getUri(t){t=B(this.defaults,t);const n=zt(t.baseURL,t.url,t.allowAbsoluteUrls);return ft(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){F.prototype[t]=function(n,r){return this.request(B(r||{},{method:t,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(r){return function(a,c,u){return this.request(B(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:c}))}}F.prototype[t]=n(),F.prototype[t+"Form"]=n(!0)});let er=class Ht{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const c=new Promise(u=>{r.subscribe(u),a=u}).then(s);return c.cancel=function(){r.unsubscribe(a)},c},t(function(a,c,u){r.reason||(r.reason=new Z(a,c,u),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ht(function(s){t=s}),cancel:t}}};function tr(e){return function(n){return e.apply(null,n)}}function nr(e){return f.isObject(e)&&e.isAxiosError===!0}const Xe={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Xe).forEach(([e,t])=>{Xe[t]=e});function mt(e){const t=new F(e),n=Ke(F.prototype.request,t);return f.extend(n,F.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return mt(B(e,s))},n}const j=mt(_);j.Axios=F;j.CanceledError=Z;j.CancelToken=er;j.isCancel=lt;j.VERSION=wt;j.toFormData=oe;j.AxiosError=P;j.Cancel=j.CanceledError;j.all=function(t){return Promise.all(t)};j.spread=tr;j.isAxiosError=nr;j.mergeConfig=B;j.AxiosHeaders=D;j.formToJSON=e=>ot(f.isHTMLForm(e)?new FormData(e):e);j.getAdapter=Pt.getAdapter;j.HttpStatusCode=Xe;j.default=j;const{Axios:xr,AxiosError:vr,CanceledError:Pr,isCancel:wr,CancelToken:Hr,VERSION:mr,all:jr,Cancel:Or,isAxiosError:br,spread:Xr,toFormData:Nr,AxiosHeaders:pr,HttpStatusCode:Dr,formToJSON:hr,getAdapter:Ar,mergeConfig:yr}=j,rr=e=>{const{exp:t}=e.getState();if(!t)return!1;const n=Math.floor(Date.now()/1e3),r=t-n;return r<=600&&r>0};function sr(e,t){return e.interceptors.request.use(async n=>{var s;if(!((s=n.url)!=null&&s.includes("/auth/user/refresh"))&&rr(t)){const{refreshToken:a}=t.getState();if(!await a()){const{logout:u}=t.getState();return u(),Promise.reject(new Error("토큰 갱신 실패"))}}const{currentWorkspace:r}=t.getState();return r!=null&&r.workspaceId&&(n.headers["current-workspace-id"]=r.workspaceId.toString()),r!=null&&r.workspaceUuid&&(n.headers["current-workspace-uuid"]=r.workspaceUuid),(n.method==="get"||n.method==="post"||n.method==="put")&&(n.timeout=6e5),n},n=>Promise.reject(n)),e.interceptors.response.use(n=>n,n=>{var r,s,a,c,u,d,o;if(n!=null&&n.config&&Object.prototype.hasOwnProperty.call(n.config,"errorHandle")&&!n.config.errorHandle)return Promise.reject(n);if(((r=n.response)==null?void 0:r.status)===401||((s=n.response)==null?void 0:s.status)===403){const{logout:i}=t.getState();i()}else if(n.code==="ECONNABORTED")n.config&&n.config.withCredentials;else if(((a=n.response)==null?void 0:a.status)===400||((c=n.response)==null?void 0:c.status)===402||((u=n.response)==null?void 0:u.status)===412||((d=n.response)==null?void 0:d.status)===500||((o=n.response)==null?void 0:o.status)===503)return Promise.reject(n);return Promise.reject(n)}),e}function cr(e){let t="";typeof window<"u"&&window.location&&(t=window.location.origin);const n=j.create({baseURL:t,withCredentials:!0,headers:{Accept:"*/*","Content-Type":"application/json"}});sr(n,e);async function r(u,d={}){const o=await n.get(u,d);return{data:o.data,status:o.status,statusText:o.statusText,headers:o.headers}}async function s(u,d,o={}){const i=await n.post(u,d,o);return{data:i.data,status:i.status,statusText:i.statusText,headers:i.headers}}async function a(u,d,o={}){const i=await n.put(u,d,o);return{data:i.data,status:i.status,statusText:i.statusText,headers:i.headers}}async function c(u,d={}){const o=await n.delete(u,d);return{data:o.data,status:o.status,statusText:o.statusText,headers:o.headers}}return{get:r,post:s,put:a,delete:c,defaults:{headers:{common:{}}}}}class ar{constructor(t){this.httpClient=t}async login(t){return(await this.httpClient.post("/oasis/auth/user/login",t)).data.data}async my(){return(await this.httpClient.get("/oasis/auth/user/info")).data.data}async logout(){await this.httpClient.post("/oasis/auth/user/logout")}async refresh(){return(await this.httpClient.post("/oasis/auth/user/refresh")).data.data}async assistantUser(){return(await this.httpClient.get("/oasis/portal/assistant/user")).data.data}async assistantInfo(t){return(await this.httpClient.get("/oasis/portal/assistant?uuid="+t)).data.data}async assistantChatInfo(t){return(await this.httpClient.get("/oasis/portal/assistant/"+t+"/chat-info")).data.data}async createAssistant(t){return(await this.httpClient.post("/oasis/portal/assistant",t)).data.data}async updateAssistant(t,n){return(await this.httpClient.post("/oasis/portal/assistant/"+t,n)).data.data}async deleteAssistant(t){return(await this.httpClient.delete("/oasis/portal/assistant/"+t)).data.data}async getAssistantVisibility(t){return(await this.httpClient.get("/oasis/portal/assistant/"+t+"/users")).data.data}async saveAssistantVisibility(t,n){return(await this.httpClient.post("/oasis/portal/assistant/"+t+"/users",n)).data.data}async modelInfos(){return(await this.httpClient.get("/oasis/portal/assistant/models")).data.data}async mcpServers(){return(await this.httpClient.get("/oasis/portal/assistant/mcp-servers")).data.data}async searchUsers(t){return(await this.httpClient.get("/oasis/portal/user/search?keyword="+t)).data.data}}function ir(e){return new ar(e)}let S=null,we=null,He=null;function fr(){return S||(S=Dt(),we=cr(S),He=ir(we),S.setPortalClient(He)),{authStore:S,httpClient:we,portalClient:He}}async function ur(e,t,n){try{const{authStore:r,portalClient:s}=n,a=await s.login({account_id:e,password:t}),{login:c,authMe:u}=r.getState();c(a);const d=await s.my();return u(d),!0}catch(r){return console.error("로그인 실패:",r),!1}}let me=null;function or(e){let t=!1;const n=document.createElement("div");n.className=b("absolute bottom-full right-0 mb-2","w-96 h-[500px]","bg-white rounded-lg shadow-2xl","flex flex-col","hidden"),n.style.zIndex="1000";const r=document.createElement("div");r.className=b("flex items-center justify-between","p-4 border-b border-gray-200","bg-gray-50 rounded-t-lg");const s=document.createElement("h3");s.className=b("text-lg font-semibold text-gray-800"),s.textContent="채팅";const a=document.createElement("button");a.className=b("w-8 h-8","flex items-center justify-center","text-gray-500 hover:text-gray-700","rounded-full hover:bg-gray-200"),a.innerHTML="×",a.style.fontSize="24px",a.addEventListener("click",()=>{n.classList.add("hidden"),t=!1}),r.appendChild(s),r.appendChild(a);const c=document.createElement("div");c.className=b("flex-1 overflow-y-auto p-4 space-y-4","bg-white");const u=document.createElement("div");u.className=b("p-4 border-t border-gray-200","bg-gray-50 rounded-b-lg");const d=document.createElement("div");d.className=b("flex gap-2");const o=document.createElement("input");o.type="text",o.placeholder="메시지를 입력하세요...",o.className=b("flex-1 px-4 py-2","border border-gray-300 rounded-lg","focus:outline-none focus:ring-2 focus:ring-blue-500");const i=document.createElement("button");i.className=b("px-4 py-2","bg-blue-500 text-white rounded-lg","hover:bg-blue-600","disabled:bg-gray-300 disabled:cursor-not-allowed"),i.textContent="전송";const z=()=>{const H=o.value.trim();if(!H)return;const l=document.createElement("div");l.className=b("flex justify-end");const v=document.createElement("div");v.className=b("max-w-[80%] px-4 py-2","bg-blue-500 text-white rounded-lg"),v.textContent=H,l.appendChild(v),c.appendChild(l),c.scrollTop=c.scrollHeight,o.value="",setTimeout(()=>{const x=document.createElement("div");x.className=b("flex justify-start");const m=document.createElement("div");m.className=b("max-w-[80%] px-4 py-2","bg-gray-200 text-gray-800 rounded-lg"),m.textContent="안녕하세요! 도움이 필요하시면 언제든 말씀해주세요.",x.appendChild(m),c.appendChild(x),c.scrollTop=c.scrollHeight},500)};return i.addEventListener("click",z),o.addEventListener("keypress",H=>{H.key==="Enter"&&z()}),d.appendChild(o),d.appendChild(i),u.appendChild(d),n.appendChild(r),n.appendChild(c),n.appendChild(u),{openChat:()=>{if(t){n.classList.remove("hidden");return}n.classList.remove("hidden"),t=!0,e&&!e.contains(n)&&e.appendChild(n)},chatWindow:n}}function lr({account_id:e,password:t,assistant_uuid:n}={}){const r=document.createElement("div");r.className=b("relative");const s=document.createElement("button");s.type="button",s.className=b("relative");const a=document.createElement("img");return a.src=Ot,a.alt="Button",a.className=b("w-12 h-12","rounded-full"),s.appendChild(a),r.appendChild(s),s.addEventListener("click",c=>{c.preventDefault(),me||(me=or(r)),me.openChat()}),e&&t&&(async()=>{s.disabled=!0,s.style.opacity="0.5",s.style.cursor="wait";const c=fr();ur(e,t,c).then(u=>{if(u){const{authStore:d}=c,o=d.getState();console.log("로그인 성공:",o.userName||o.accountId),s.disabled=!1,s.style.opacity="",s.style.cursor=""}else console.error("로그인 실패"),s.disabled=!0,s.style.opacity="0.3",s.title="로그인 실패"}).catch(u=>{console.error("로그인 처리 중 오류:",u),s.disabled=!0,s.style.opacity="0.3",s.title="로그인 오류"})})(),r}exports.createButton=lr;
6
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=B(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ce.assertOptions(r,{silentJSONParsing:M.transitional(M.boolean),forcedJSONParsing:M.transitional(M.boolean),clarifyTimeoutError:M.transitional(M.boolean)},!1),s!=null&&(f.isFunction(s)?n.paramsSerializer={serialize:s}:ce.assertOptions(s,{encode:M.function,serialize:M.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ce.assertOptions(n,{baseUrl:M.spelling("baseURL"),withXsrfToken:M.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c=a&&f.merge(a.common,a[n.method]);a&&f.forEach(["delete","get","head","post","put","patch","common"],l=>{delete a[l]}),n.headers=D.concat(c,a);const u=[];let d=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(d=d&&v.synchronous,u.unshift(v.fulfilled,v.rejected))});const o=[];this.interceptors.response.forEach(function(v){o.push(v.fulfilled,v.rejected)});let i,z=0,w;if(!d){const l=[Se.bind(this),void 0];for(l.unshift(...u),l.push(...o),w=l.length,i=Promise.resolve(n);z<w;)i=i.then(l[z++],l[z++]);return i}w=u.length;let H=n;for(;z<w;){const l=u[z++],v=u[z++];try{H=l(H)}catch(x){v.call(this,x);break}}try{i=Se.call(this,H)}catch(l){return Promise.reject(l)}for(z=0,w=o.length;z<w;)i=i.then(o[z++],o[z++]);return i}getUri(t){t=B(this.defaults,t);const n=zt(t.baseURL,t.url,t.allowAbsoluteUrls);return ft(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){F.prototype[t]=function(n,r){return this.request(B(r||{},{method:t,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(r){return function(a,c,u){return this.request(B(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:c}))}}F.prototype[t]=n(),F.prototype[t+"Form"]=n(!0)});let er=class Ht{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const c=new Promise(u=>{r.subscribe(u),a=u}).then(s);return c.cancel=function(){r.unsubscribe(a)},c},t(function(a,c,u){r.reason||(r.reason=new Z(a,c,u),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ht(function(s){t=s}),cancel:t}}};function tr(e){return function(n){return e.apply(null,n)}}function nr(e){return f.isObject(e)&&e.isAxiosError===!0}const Xe={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Xe).forEach(([e,t])=>{Xe[t]=e});function mt(e){const t=new F(e),n=Ke(F.prototype.request,t);return f.extend(n,F.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return mt(B(e,s))},n}const j=mt(_);j.Axios=F;j.CanceledError=Z;j.CancelToken=er;j.isCancel=lt;j.VERSION=wt;j.toFormData=oe;j.AxiosError=P;j.Cancel=j.CanceledError;j.all=function(t){return Promise.all(t)};j.spread=tr;j.isAxiosError=nr;j.mergeConfig=B;j.AxiosHeaders=D;j.formToJSON=e=>ot(f.isHTMLForm(e)?new FormData(e):e);j.getAdapter=Pt.getAdapter;j.HttpStatusCode=Xe;j.default=j;const{Axios:xr,AxiosError:vr,CanceledError:Pr,isCancel:wr,CancelToken:Hr,VERSION:mr,all:jr,Cancel:Or,isAxiosError:br,spread:Xr,toFormData:Nr,AxiosHeaders:pr,HttpStatusCode:Dr,formToJSON:hr,getAdapter:Ar,mergeConfig:yr}=j,rr=e=>{const{exp:t}=e.getState();if(!t)return!1;const n=Math.floor(Date.now()/1e3),r=t-n;return r<=600&&r>0};function sr(e,t){return e.interceptors.request.use(async n=>{var s;if(!((s=n.url)!=null&&s.includes("/auth/user/refresh"))&&rr(t)){const{refreshToken:a}=t.getState();if(!await a()){const{logout:u}=t.getState();return u(),Promise.reject(new Error("토큰 갱신 실패"))}}const{currentWorkspace:r}=t.getState();return r!=null&&r.workspaceId&&(n.headers["current-workspace-id"]=r.workspaceId.toString()),r!=null&&r.workspaceUuid&&(n.headers["current-workspace-uuid"]=r.workspaceUuid),(n.method==="get"||n.method==="post"||n.method==="put")&&(n.timeout=6e5),n},n=>Promise.reject(n)),e.interceptors.response.use(n=>n,n=>{var r,s,a,c,u,d,o;if(n!=null&&n.config&&Object.prototype.hasOwnProperty.call(n.config,"errorHandle")&&!n.config.errorHandle)return Promise.reject(n);if(((r=n.response)==null?void 0:r.status)===401||((s=n.response)==null?void 0:s.status)===403){const{logout:i}=t.getState();i()}else if(n.code==="ECONNABORTED")n.config&&n.config.withCredentials;else if(((a=n.response)==null?void 0:a.status)===400||((c=n.response)==null?void 0:c.status)===402||((u=n.response)==null?void 0:u.status)===412||((d=n.response)==null?void 0:d.status)===500||((o=n.response)==null?void 0:o.status)===503)return Promise.reject(n);return Promise.reject(n)}),e}function cr(e){let t="";typeof window<"u"&&window.location&&(t=window.location.origin);const n=j.create({baseURL:t,withCredentials:!0,headers:{Accept:"*/*","Content-Type":"application/json"}});sr(n,e);async function r(u,d={}){const o=await n.get(u,d);return{data:o.data,status:o.status,statusText:o.statusText,headers:o.headers}}async function s(u,d,o={}){const i=await n.post(u,d,o);return{data:i.data,status:i.status,statusText:i.statusText,headers:i.headers}}async function a(u,d,o={}){const i=await n.put(u,d,o);return{data:i.data,status:i.status,statusText:i.statusText,headers:i.headers}}async function c(u,d={}){const o=await n.delete(u,d);return{data:o.data,status:o.status,statusText:o.statusText,headers:o.headers}}return{get:r,post:s,put:a,delete:c,defaults:{headers:{common:{}}}}}class ar{constructor(t){this.httpClient=t}async login(t){return(await this.httpClient.post("/oasis/auth/user/login",t)).data.data}async my(){return(await this.httpClient.get("/oasis/auth/user/info")).data.data}async logout(){await this.httpClient.post("/oasis/auth/user/logout")}async refresh(){return(await this.httpClient.post("/oasis/auth/user/refresh")).data.data}async assistantUser(){return(await this.httpClient.get("/oasis/portal/assistant/user")).data.data}async assistantInfo(t){return(await this.httpClient.get("/oasis/portal/assistant?uuid="+t)).data.data}async assistantChatInfo(t){return(await this.httpClient.get("/oasis/portal/assistant/"+t+"/chat-info")).data.data}async createAssistant(t){return(await this.httpClient.post("/oasis/portal/assistant",t)).data.data}async updateAssistant(t,n){return(await this.httpClient.post("/oasis/portal/assistant/"+t,n)).data.data}async deleteAssistant(t){return(await this.httpClient.delete("/oasis/portal/assistant/"+t)).data.data}async getAssistantVisibility(t){return(await this.httpClient.get("/oasis/portal/assistant/"+t+"/users")).data.data}async saveAssistantVisibility(t,n){return(await this.httpClient.post("/oasis/portal/assistant/"+t+"/users",n)).data.data}async modelInfos(){return(await this.httpClient.get("/oasis/portal/assistant/models")).data.data}async mcpServers(){return(await this.httpClient.get("/oasis/portal/assistant/mcp-servers")).data.data}async searchUsers(t){return(await this.httpClient.get("/oasis/portal/user/search?keyword="+t)).data.data}}function ir(e){return new ar(e)}let S=null,we=null,He=null;function fr(){return S||(S=Dt(),we=cr(S),He=ir(we),S.setPortalClient(He)),{authStore:S,httpClient:we,portalClient:He}}async function ur(e,t,n){try{const{authStore:r,portalClient:s}=n,a=await s.login({account_id:e,password:t}),{login:c,authMe:u}=r.getState();c(a);const d=await s.my();return u(d),!0}catch(r){return console.error("로그인 실패:",r),!1}}let me=null;function or(e){let t=!1;const n=document.createElement("div");n.className=b("absolute bottom-full right-0 mb-2 bg-blue-200","w-96 h-[500px]","bg-white rounded-lg shadow-2xl","flex flex-col","hidden"),n.style.zIndex="1000";const r=document.createElement("div");r.className=b("flex items-center justify-between","p-4 border-b border-gray-200","bg-gray-50 rounded-t-lg");const s=document.createElement("h3");s.className=b("text-lg font-semibold text-gray-800"),s.textContent="채팅";const a=document.createElement("button");a.className=b("w-8 h-8","flex items-center justify-center","text-gray-500 hover:text-gray-700","rounded-full hover:bg-gray-200"),a.innerHTML="×",a.style.fontSize="24px",a.addEventListener("click",()=>{n.classList.add("hidden"),t=!1}),r.appendChild(s),r.appendChild(a);const c=document.createElement("div");c.className=b("flex-1 overflow-y-auto p-4 space-y-4","bg-white");const u=document.createElement("div");u.className=b("p-4 border-t border-gray-200","bg-gray-50 rounded-b-lg");const d=document.createElement("div");d.className=b("flex gap-2");const o=document.createElement("input");o.type="text",o.placeholder="메시지를 입력하세요...",o.className=b("flex-1 px-4 py-2","border border-gray-300 rounded-lg","focus:outline-none focus:ring-2 focus:ring-blue-500");const i=document.createElement("button");i.className=b("px-4 py-2","bg-blue-500 text-white rounded-lg","hover:bg-blue-600","disabled:bg-gray-300 disabled:cursor-not-allowed"),i.textContent="전송";const z=()=>{const H=o.value.trim();if(!H)return;const l=document.createElement("div");l.className=b("flex justify-end");const v=document.createElement("div");v.className=b("max-w-[80%] px-4 py-2","bg-blue-500 text-white rounded-lg"),v.textContent=H,l.appendChild(v),c.appendChild(l),c.scrollTop=c.scrollHeight,o.value="",setTimeout(()=>{const x=document.createElement("div");x.className=b("flex justify-start");const m=document.createElement("div");m.className=b("max-w-[80%] px-4 py-2","bg-gray-200 text-gray-800 rounded-lg"),m.textContent="안녕하세요! 도움이 필요하시면 언제든 말씀해주세요.",x.appendChild(m),c.appendChild(x),c.scrollTop=c.scrollHeight},500)};return i.addEventListener("click",z),o.addEventListener("keypress",H=>{H.key==="Enter"&&z()}),d.appendChild(o),d.appendChild(i),u.appendChild(d),n.appendChild(r),n.appendChild(c),n.appendChild(u),{openChat:()=>{if(t){n.classList.remove("hidden");return}n.classList.remove("hidden"),t=!0,e&&!e.contains(n)&&e.appendChild(n)},chatWindow:n}}function lr({account_id:e,password:t,assistant_uuid:n}={}){const r=document.createElement("div");r.className=b("relative");const s=document.createElement("button");s.type="button",s.className=b("relative bg-orange-200");const a=document.createElement("img");return a.src=Ot,a.alt="Button",a.className=b("w-12 h-12","rounded-full"),s.appendChild(a),r.appendChild(s),s.addEventListener("click",c=>{c.preventDefault(),me||(me=or(r)),me.openChat()}),e&&t&&(async()=>{s.disabled=!0,s.style.opacity="0.5",s.style.cursor="wait";const c=fr();ur(e,t,c).then(u=>{if(u){const{authStore:d}=c,o=d.getState();console.log("로그인 성공:",o.userName||o.accountId),s.disabled=!1,s.style.opacity="",s.style.cursor=""}else console.error("로그인 실패"),s.disabled=!0,s.style.opacity="0.3",s.title="로그인 실패"}).catch(u=>{console.error("로그인 처리 중 오류:",u),s.disabled=!0,s.style.opacity="0.3",s.title="로그인 오류"})})(),r}exports.createButton=lr;
7
7
  //# sourceMappingURL=index.cjs.js.map