diff --git a/dist/nous-chat.js b/dist/nous-chat.js index 228947e..2f570af 100644 --- a/dist/nous-chat.js +++ b/dist/nous-chat.js @@ -24,7 +24,7 @@ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[xi]=this[xi]={accessors:{}}).accessors,r=this.prototype;function o(i){const l=Yt(i);s[l]||(lf(r,i),s[l]=!0)}return p.isArray(t)?t.forEach(o):o(t),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(_e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),p.freezeMethods(_e);function Ks(e,t){const n=this||Zt,s=t||n,r=_e.from(s.headers);let o=s.data;return p.forEach(e,function(l){o=l.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function vi(e){return!!(e&&e.__CANCEL__)}function Nt(e,t,n){H.call(this,e??"canceled",H.ERR_CANCELED,t,n),this.name="CanceledError"}p.inherits(Nt,H,{__CANCEL__:!0});function Si(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function af(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cf(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,i;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),f=s[o];i||(i=u),n[r]=a,s[r]=u;let h=o,m=0;for(;h!==r;)m+=n[h++],h=h%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),u-i{n=f,r=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),h=f-n;h>=s?i(u,f):(r=u,o||(o=setTimeout(()=>{o=null,i(r)},s-h)))},()=>r&&i(r)]}const zn=(e,t,n=3)=>{let s=0;const r=cf(50,250);return uf(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,a=i-s,u=r(a),f=i<=l;s=i;const h={loaded:i,total:l,progress:l?i/l:void 0,bytes:a,rate:u||void 0,estimated:u&&l&&f?(l-i)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},n)},Ei=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Ci=e=>(...t)=>p.asap(()=>e(...t)),ff=Le.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function r(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(i){const l=p.isString(i)?r(i):i;return l.protocol===s.protocol&&l.host===s.host}}():function(){return function(){return!0}}(),df=Le.hasStandardBrowserEnv?{write(e,t,n,s,r,o){const i=[e+"="+encodeURIComponent(t)];p.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),p.isString(s)&&i.push("path="+s),p.isString(r)&&i.push("domain="+r),o===!0&&i.push("secure"),document.cookie=i.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 hf(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ti(e,t){return e&&!hf(t)?pf(e,t):t}const Ai=e=>e instanceof _e?{...e}:e;function wt(e,t){t=t||{};const n={};function s(u,f,h){return p.isPlainObject(u)&&p.isPlainObject(f)?p.merge.call({caseless:h},u,f):p.isPlainObject(f)?p.merge({},f):p.isArray(f)?f.slice():f}function r(u,f,h){if(p.isUndefined(f)){if(!p.isUndefined(u))return s(void 0,u,h)}else return s(u,f,h)}function o(u,f){if(!p.isUndefined(f))return s(void 0,f)}function i(u,f){if(p.isUndefined(f)){if(!p.isUndefined(u))return s(void 0,u)}else return s(void 0,f)}function l(u,f,h){if(h in t)return s(u,f);if(h in e)return s(void 0,u)}const a={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,f)=>r(Ai(u),Ai(f),!0)};return p.forEach(Object.keys(Object.assign({},e,t)),function(f){const h=a[f]||r,m=h(e[f],t[f],f);p.isUndefined(m)&&h!==l||(n[f]=m)}),n}const Ri=e=>{const t=wt({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=_e.from(i),t.url=wi(Ti(t.baseURL,t.url),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let a;if(p.isFormData(n)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((a=i.getContentType())!==!1){const[u,...f]=a?a.split(";").map(h=>h.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...f].join("; "))}}if(Le.hasStandardBrowserEnv&&(s&&p.isFunction(s)&&(s=s(t)),s||s!==!1&&ff(t.url))){const u=r&&o&&df.read(o);u&&i.set(r,u)}return t},gf=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){const r=Ri(e);let o=r.data;const i=_e.from(r.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:u}=r,f,h,m,R,x;function C(){R&&R(),x&&x(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function I(){if(!v)return;const O=_e.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),Z={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:O,config:e,request:v};Si(function(q){n(q),C()},function(q){s(q),C()},Z),v=null}"onloadend"in v?v.onloadend=I:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(I)},v.onabort=function(){v&&(s(new H("Request aborted",H.ECONNABORTED,e,v)),v=null)},v.onerror=function(){s(new H("Network Error",H.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let U=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const Z=r.transitional||yi;r.timeoutErrorMessage&&(U=r.timeoutErrorMessage),s(new H(U,Z.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,v)),v=null},o===void 0&&i.setContentType(null),"setRequestHeader"in v&&p.forEach(i.toJSON(),function(U,Z){v.setRequestHeader(Z,U)}),p.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),l&&l!=="json"&&(v.responseType=r.responseType),u&&([m,x]=zn(u,!0),v.addEventListener("progress",m)),a&&v.upload&&([h,R]=zn(a),v.upload.addEventListener("progress",h),v.upload.addEventListener("loadend",R)),(r.cancelToken||r.signal)&&(f=O=>{v&&(s(!O||O.type?new Nt(null,e,v):O),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const j=af(r.url);if(j&&Le.protocols.indexOf(j)===-1){s(new H("Unsupported protocol "+j+":",H.ERR_BAD_REQUEST,e));return}v.send(o||null)})},mf=(e,t)=>{let n=new AbortController,s;const r=function(a){if(!s){s=!0,i();const u=a instanceof Error?a:this.reason;n.abort(u instanceof H?u:new Nt(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{r(new H(`timeout ${t} of ms exceeded`,H.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(a=>{a&&(a.removeEventListener?a.removeEventListener("abort",r):a.unsubscribe(r))}),e=null)};e.forEach(a=>a&&a.addEventListener&&a.addEventListener("abort",r));const{signal:l}=n;return l.unsubscribe=i,[l,()=>{o&&clearTimeout(o),o=null}]},wf=function*(e,t){let n=e.byteLength;if(!t||n{const o=bf(e,t,r);let i=0,l,a=u=>{l||(l=!0,s&&s(u))};return new ReadableStream({async pull(u){try{const{done:f,value:h}=await o.next();if(f){a(),u.close();return}let m=h.byteLength;if(n){let R=i+=m;n(R)}u.enqueue(new Uint8Array(h))}catch(f){throw a(f),f}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Vn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Pi=Vn&&typeof ReadableStream=="function",Ws=Vn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ni=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yf=Pi&&Ni(()=>{let e=!1;const t=new Request(Le.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Fi=64*1024,Js=Pi&&Ni(()=>p.isReadableStream(new Response("").body)),qn={stream:Js&&(e=>e.body)};Vn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!qn[t]&&(qn[t]=p.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new H(`Response type '${t}' is not supported`,H.ERR_NOT_SUPPORT,s)})})})(new Response);const _f=async e=>{if(e==null)return 0;if(p.isBlob(e))return e.size;if(p.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(p.isArrayBufferView(e)||p.isArrayBuffer(e))return e.byteLength;if(p.isURLSearchParams(e)&&(e=e+""),p.isString(e))return(await Ws(e)).byteLength},xf=async(e,t)=>{const n=p.toFiniteNumber(e.getContentLength());return n??_f(t)},Gs={http:zu,xhr:gf,fetch:Vn&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:a,responseType:u,headers:f,withCredentials:h="same-origin",fetchOptions:m}=Ri(e);u=u?(u+"").toLowerCase():"text";let[R,x]=r||o||i?mf([r,o],i):[],C,v;const I=()=>{!C&&setTimeout(()=>{R&&R.unsubscribe()}),C=!0};let j;try{if(a&&yf&&n!=="get"&&n!=="head"&&(j=await xf(f,s))!==0){let A=new Request(t,{method:"POST",body:s,duplex:"half"}),q;if(p.isFormData(s)&&(q=A.headers.get("content-type"))&&f.setContentType(q),A.body){const[z,D]=Ei(j,zn(Ci(a)));s=Oi(A.body,Fi,z,D,Ws)}}p.isString(h)||(h=h?"include":"omit"),v=new Request(t,{...m,signal:R,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:s,duplex:"half",credentials:h});let O=await fetch(v);const U=Js&&(u==="stream"||u==="response");if(Js&&(l||U)){const A={};["status","statusText","headers"].forEach(J=>{A[J]=O[J]});const q=p.toFiniteNumber(O.headers.get("content-length")),[z,D]=l&&Ei(q,zn(Ci(l),!0))||[];O=new Response(Oi(O.body,Fi,z,()=>{D&&D(),U&&I()},Ws),A)}u=u||"text";let Z=await qn[p.findKey(qn,u)||"text"](O,e);return!U&&I(),x&&x(),await new Promise((A,q)=>{Si(A,q,{data:Z,headers:_e.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:v})})}catch(O){throw I(),O&&O.name==="TypeError"&&/fetch/i.test(O.message)?Object.assign(new H("Network Error",H.ERR_NETWORK,e,v),{cause:O.cause||O}):H.from(O,O&&O.code,e,v)}})};p.forEach(Gs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Mi=e=>`- ${e}`,vf=e=>p.isFunction(e)||e===null||e===!1,Li={getAdapter:e=>{e=p.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let o=0;o`adapter ${l} `+(a===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(Mi).join(` `):" "+Mi(o[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return s},adapters:Gs};function Zs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Nt(null,e)}function ki(e){return Zs(e),e.headers=_e.from(e.headers),e.data=Ks.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Li.getAdapter(e.adapter||Zt.adapter)(e).then(function(s){return Zs(e),s.data=Ks.call(e,e.transformResponse,s),s.headers=_e.from(s.headers),s},function(s){return vi(s)||(Zs(e),s&&s.response&&(s.response.data=Ks.call(e,e.transformResponse,s.response),s.response.headers=_e.from(s.response.headers))),Promise.reject(s)})}const Ii="1.7.4",Ys={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ys[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Bi={};Ys.transitional=function(t,n,s){function r(o,i){return"[Axios v"+Ii+"] Transitional option '"+o+"'"+i+(s?". "+s:"")}return(o,i,l)=>{if(t===!1)throw new H(r(i," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!Bi[i]&&(Bi[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};function Sf(e,t,n){if(typeof e!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],i=t[o];if(i){const l=e[o],a=l===void 0||i(l,o,e);if(a!==!0)throw new H("option "+o+" must be "+a,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+o,H.ERR_BAD_OPTION)}}const Xs={assertOptions:Sf,validators:Ys},it=Xs.validators;class bt{constructor(t){this.defaults=t,this.interceptors={request:new bi,response:new bi}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=` -`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Xs.assertOptions(s,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean)},!1),r!=null&&(p.isFunction(r)?n.paramsSerializer={serialize:r}:Xs.assertOptions(r,{encode:it.function,serialize:it.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&p.merge(o.common,o[n.method]);o&&p.forEach(["delete","get","head","post","put","patch","common"],x=>{delete o[x]}),n.headers=_e.concat(i,o);const l=[];let a=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(a=a&&C.synchronous,l.unshift(C.fulfilled,C.rejected))});const u=[];this.interceptors.response.forEach(function(C){u.push(C.fulfilled,C.rejected)});let f,h=0,m;if(!a){const x=[ki.bind(this),void 0];for(x.unshift.apply(x,l),x.push.apply(x,u),m=x.length,f=Promise.resolve(n);h{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new Nt(o,i,l),n(s.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)}static source(){let t;return{token:new Qs(function(r){t=r}),cancel:t}}}function Ef(e){return function(n){return e.apply(null,n)}}function Cf(e){return p.isObject(e)&&e.isAxiosError===!0}const er={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(er).forEach(([e,t])=>{er[t]=e});function Di(e){const t=new bt(e),n=ti(bt.prototype.request,t);return p.extend(n,bt.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Di(wt(e,r))},n}const oe=Di(Zt);oe.Axios=bt,oe.CanceledError=Nt,oe.CancelToken=Qs,oe.isCancel=vi,oe.VERSION=Ii,oe.toFormData=jn,oe.AxiosError=H,oe.Cancel=oe.CanceledError,oe.all=function(t){return Promise.all(t)},oe.spread=Ef,oe.isAxiosError=Cf,oe.mergeConfig=wt,oe.AxiosHeaders=_e,oe.formToJSON=e=>_i(p.isHTMLForm(e)?new FormData(e):e),oe.getAdapter=Li.getAdapter,oe.HttpStatusCode=er,oe.default=oe;const Tf={class:"ns-flex ns-flex-col ns-h-full"},Af={class:"ns-flex ns-items-center ns-h-14 ns-w-full ns-px-5",style:{backgroundColor:"var(--nous-chat-color)"}},Rf=[L("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",class:"ns-cursor-pointer ns-mr-3"},[L("g",{id:"tabler-icon-arrow-left__tabler-icon-arrow-left"},[L("path",{id:"tabler-icon-arrow-left__Vector",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M5 12h14M5 12l6 6m-6-6 6-6"})])],-1)],Of=Rt('
',1),Pf={class:"ns-text-white ns-font-semibold ns-ml-2 ns-grow"},Nf={key:0,class:"ns-flex ns-items-end ns-mb-4"},Ff=Rt('
',1),Mf={class:"ns-flex ns-flex-col"},Lf={class:"ns-bg-gray-100 ns-rounded-xl ns-rounded-bl-sm ns-p-3 ns-max-w-[100%]"},kf={class:"ns-text-sm"},If={class:"ns-text-xs ns-text-gray-500 ns-mt-1"},Bf={key:1,class:"ns-flex ns-justify-end ns-mb-4"},Df={class:"ns-flex ns-flex-col ns-items-end"},$f={class:"ns-rounded-xl ns-rounded-br-sm ns-p-3 ns-max-w-[100%]",style:{backgroundColor:"var(--nous-chat-color)"}},Hf={class:"ns-text-sm ns-text-white"},jf={class:"ns-text-xs ns-text-gray-500 ns-mt-1"},Uf={class:"ns-px-4"},zf={class:"ns-flex ns-items-center ns-border ns-border-gray-200 ns-bg-gray-50 ns-rounded-full ns-px-4 ns-h-12"},Vf=[L("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},[L("g",{id:"noun-send-6644234-1__noun-send-6644234 1"},[L("path",{id:"noun-send-6644234-1__Vector",fill:"#6B7280",d:"M17.319 7.725 5.018 1.53c-.976-.494-2.088-.331-2.888.425-.862.813-1.119 2.05-.644 3.163.638 1.5 1.381 3.275 1.45 3.443.2.481.65.819 1.169.819H10c.825 0 .825 1.25 0 1.25H4.106c-.481 0-.95.287-1.181.831-.394.944-.913 2.182-1.444 3.425a2.792 2.792 0 0 0 .644 3.163 2.503 2.503 0 0 0 1.737.706 2.59 2.59 0 0 0 1.157-.281l12.375-6.238A2.503 2.503 0 0 0 18.73 9.55c-.138-.794-.694-1.457-1.419-1.819l.006-.006Z"})])],-1)],qf=L("div",{class:"ns-p-4 ns-text-gray-400 ns-text-sm ns-text-center ns-w-full"},[L("p",null,[Ao("Powered by "),L("a",{href:"https://nous.my"},"Nous")])],-1),$i={__name:"NousConversation",setup(e){const t=At("nousChatProps"),n=xe(null),s=xe(!0),r=xe(!0),o=xe(null),i=xe(null),l=xe(""),a=xe([]),u=xe(!1),{formatTimestamp:f}=Qo();Ht(()=>{var A;C(),(A=n.value)==null||A.addEventListener("scroll",v),h()});const h=()=>{o.value=localStorage.getItem("nous-user-session-id"),o.value?R():m()},m=()=>{o.value=crypto.randomUUID(),i.value=`nous-chat-history-${o.value}`,localStorage.setItem("nous-user-session-id",o.value),localStorage.setItem(i.value,JSON.stringify([])),j()},R=()=>{i.value=`nous-chat-history-${o.value}`,Z()},x=()=>{localStorage.removeItem("nous-user-session-id"),localStorage.removeItem(i.value),a.value=[],m()};An(()=>t.messages,()=>{C()},{deep:!0}),En(()=>{var A;(A=n.value)==null||A.removeEventListener("scroll",v)});const C=()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)},v=()=>{if(n.value){const{scrollTop:A,scrollHeight:q,clientHeight:z}=n.value;s.value=A===0,r.value=A+z>=q-1}},I=async()=>{if(!l.value.trim())return;const A=l.value;l.value="",await O(A,!1)},j=async()=>{await O(t.initPayload,!0)},O=async(A,q)=>{u.value=!0,q||U("user",A);try{(await oe.post(t.webhookUrl,{message:A,sender:o.value})).data.forEach(J=>{U("bot",J.text)})}catch(z){console.error("Error sending message:",z)}finally{u.value=!1}},U=(A,q,z)=>{z||(z=new Date().toLocaleString("en-US")),a.value.push({type:A,text:q,timestamp:z}),localStorage.setItem(i.value,JSON.stringify(a.value))},Z=async()=>{const A=localStorage.getItem(i.value);a.value=JSON.parse(A)};return(A,q)=>(ie(),me("div",Tf,[L("div",Af,[L("a",{href:"#",role:"button",onClick:q[0]||(q[0]=Ds(z=>A.$emit("goBackHome"),["prevent"]))},Rf),Of,L("h1",Pf,Ne(Xe(t).title),1),ue(su,{onStartNewSession:x})]),L("div",{class:"ns-flex-1 ns-overflow-y-auto ns-p-4 ns-relative no-scrollbar",ref_key:"chatContainer",ref:n},[(ie(!0),me(ve,null,oa(a.value,(z,D)=>(ie(),me(ve,{key:D},[z.type==="bot"?(ie(),me("div",Nf,[Ff,L("div",Mf,[L("div",Lf,[L("p",kf,Ne(z.text),1)]),L("span",If,Ne(Xe(f)(z.timestamp)),1)])])):(ie(),me("div",Bf,[L("div",Df,[L("div",$f,[L("p",Hf,Ne(z.text),1)]),L("span",jf,Ne(Xe(f)(z.timestamp)),1)])]))],64))),128)),u.value?(ie(),Rs(tu,{key:0})):Ps("",!0)],512),L("div",{class:Lt(["ns-absolute ns-top-14 ns-left-0 ns-right-0 ns-h-16 ns-bg-gradient-to-b ns-from-white ns-to-transparent ns-pointer-events-none ns-opacity-70 ns-z-10",{"ns-hidden":s.value}])},null,2),L("div",{class:Lt(["ns-absolute ns-bottom-[6.25rem] ns-left-0 ns-right-0 ns-h-16 ns-bg-gradient-to-t ns-from-white ns-to-transparent ns-pointer-events-none ns-opacity-70 ns-z-10",{"ns-hidden":r.value}])},null,2),L("div",Uf,[L("div",zf,[zl(L("input",{type:"text",placeholder:"Type a message...",class:"ns-flex-1 ns-bg-transparent ns-outline-none ns-text-sm placeholder:ns-text-gray-500 focus:ns-outline-none focus:ns-ring-0 focus:ns-ring-transparent","onUpdate:modelValue":q[1]||(q[1]=z=>l.value=z),onKeyup:Oc(I,["enter"])},null,544),[[Cc,l.value]]),L("button",{class:"ns-ml-2",onClick:I},Vf)])]),qf]))}},Kf={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},Wf=[L("g",{id:"tabler-icon-chevron-down__tabler-icon-chevron-down"},[L("path",{id:"tabler-icon-chevron-down__Vector",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9 6 6 6-6"})],-1)],Jf={key:1,xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",viewBox:"0 0 18 18"},Gf=[L("g",{id:"frame__Frame","clip-path":"url(#frame__clip0_1212_3584)"},[L("path",{id:"frame__Vector",fill:"#fff",d:"M13.5 2.25a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H9.957l-3.572 2.143a.75.75 0 0 1-1.13-.558l-.005-.085v-1.5H4.5a3 3 0 0 1-2.996-2.85l-.004-.15v-6a3 3 0 0 1 3-3h9ZM10.5 9H6a.75.75 0 0 0 0 1.5h4.5a.75.75 0 1 0 0-1.5ZM12 6H6a.75.75 0 0 0 0 1.5h6A.75.75 0 1 0 12 6Z"})],-1),L("defs",null,[L("clipPath",{id:"frame__clip0_1212_3584"},[L("path",{fill:"#fff",d:"M0 0h18v18H0z"})])],-1)],Zf={key:0,class:"ns-fixed ns-bg-white ns-right-5 ns-bottom-[5.5rem] ns-rounded-2xl ns-shadow-chatbox ns-overflow-hidden",style:{height:"var(--nous-chat-height)",width:"var(--nous-chat-width)"}},Yf={__name:"NousChat",props:{webhookUrl:{type:String,required:!0},color:{type:String,default:"#ff2627"},title:{type:String,default:"Padi Bot"},fontFamily:{type:String,default:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"},firstMessage:{type:String,default:"Chat with us"},secondMessage:{type:String,default:"How can we help you today?"},initPayload:{type:String,default:"SpecialInitPayLoadDoNotTouch"},zIndex:{type:String,default:"1000"}},setup(e){const t=e;oo("nousChatProps",t);const n=xe(!1),s=xe();Ht(()=>{localStorage.getItem("nous-user-session-id")?s.value=$i:s.value=ei});const r=Ms(()=>({"--nous-chat-color":t.color,"--nous-chat-font-family":t.fontFamily,"--nous-chat-z-index":t.zIndex,"--nous-chat-width":"364px","--nous-chat-height":"620px"})),o=()=>{n.value=!n.value},i=()=>{s.value=$i},l=()=>{s.value=ei};return(a,u)=>(ie(),me("div",{class:"nous-chat-widget ns-absolute",style:ln(r.value)},[L("div",{class:"ns-fixed ns-bottom-5 ns-right-5 ns-w-12 ns-h-12 ns-flex ns-items-center ns-justify-center ns-rounded-full ns-shadow-lg ns-transition-all hover:ns-scale-110",role:"button",onClick:o,style:{backgroundColor:"var(--nous-chat-color)"}},[n.value?(ie(),me("svg",Kf,Wf)):(ie(),me("svg",Jf,Gf))]),ue(kn,{name:"slide-fade"},{default:gs(()=>[n.value?(ie(),me("div",Zf,[ue(kn,{name:"fade",mode:"out-in"},{default:gs(()=>[(ie(),Rs(sa(s.value),{onOpenRecentConversation:i,onGoBackHome:l},null,32))]),_:1})])):Ps("",!0)]),_:1})],4))}},Xf='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.ns-pointer-events-none{pointer-events:none}.ns-fixed{position:fixed}.ns-absolute{position:absolute}.ns-relative{position:relative}.ns-inset-0{top:0;right:0;bottom:0;left:0}.ns-bottom-5{bottom:1.25rem}.ns-bottom-\\[5\\.5rem\\]{bottom:5.5rem}.ns-bottom-\\[6\\.25rem\\]{bottom:6.25rem}.ns-left-0{left:0}.ns-right-0{right:0}.ns-right-2{right:.5rem}.ns-right-5{right:1.25rem}.ns-top-14{top:3.5rem}.ns-top-2{top:.5rem}.ns-z-10{z-index:10}.ns-z-20{z-index:20}.ns-z-\\[-1\\]{z-index:-1}.ns-mx-8{margin-left:2rem;margin-right:2rem}.ns-mb-1{margin-bottom:.25rem}.ns-mb-1\\.5{margin-bottom:.375rem}.ns-mb-2{margin-bottom:.5rem}.ns-mb-4{margin-bottom:1rem}.ns-mb-7{margin-bottom:1.75rem}.ns-ml-2{margin-left:.5rem}.ns-mr-1{margin-right:.25rem}.ns-mr-3{margin-right:.75rem}.ns-mt-1{margin-top:.25rem}.ns-mt-9{margin-top:2.25rem}.ns-mt-auto{margin-top:auto}.ns-line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ns-flex{display:flex}.ns-inline-flex{display:inline-flex}.ns-hidden{display:none}.ns-h-1\\.5{height:.375rem}.ns-h-11{height:2.75rem}.ns-h-12{height:3rem}.ns-h-14{height:3.5rem}.ns-h-16{height:4rem}.ns-h-32{height:8rem}.ns-h-8{height:2rem}.ns-h-9{height:2.25rem}.ns-h-full{height:100%}.ns-w-1\\.5{width:.375rem}.ns-w-11{width:2.75rem}.ns-w-12{width:3rem}.ns-w-40{width:10rem}.ns-w-64{width:16rem}.ns-w-8{width:2rem}.ns-w-9{width:2.25rem}.ns-w-full{width:100%}.ns-max-w-\\[100\\%\\]{max-width:100%}.ns-flex-1{flex:1 1 0%}.ns-flex-shrink-0,.ns-shrink-0{flex-shrink:0}.ns-grow{flex-grow:1}.ns-rotate-\\[-10deg\\]{--tw-rotate: -10deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ns-rotate-\\[-24deg\\]{--tw-rotate: -24deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ns-bounce{0%,to{transform:translateY(0);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(-5px);animation-timing-function:cubic-bezier(0,0,.2,1)}}.ns-animate-bounce{animation:ns-bounce .8s infinite}.ns-cursor-pointer{cursor:pointer}.ns-flex-col{flex-direction:column}.ns-items-end{align-items:flex-end}.ns-items-center{align-items:center}.ns-justify-end{justify-content:flex-end}.ns-justify-center{justify-content:center}.ns-justify-between{justify-content:space-between}.ns-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.ns-overflow-hidden{overflow:hidden}.ns-overflow-y-auto{overflow-y:auto}.ns-rounded-2xl{border-radius:1rem}.ns-rounded-full{border-radius:9999px}.ns-rounded-lg{border-radius:.5rem}.ns-rounded-xl{border-radius:.75rem}.ns-rounded-bl-sm{border-bottom-left-radius:.125rem}.ns-rounded-br-sm{border-bottom-right-radius:.125rem}.ns-border{border-width:1px}.ns-border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.ns-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.ns-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.ns-bg-gray-400\\/80{background-color:#9ca3afcc}.ns-bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.ns-bg-transparent{background-color:transparent}.ns-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.ns-bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.ns-bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.ns-from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.ns-to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.ns-p-2{padding:.5rem}.ns-p-3{padding:.75rem}.ns-p-4{padding:1rem}.ns-px-4{padding-left:1rem;padding-right:1rem}.ns-px-5{padding-left:1.25rem;padding-right:1.25rem}.ns-px-7{padding-left:1.75rem;padding-right:1.75rem}.ns-py-4{padding-top:1rem;padding-bottom:1rem}.ns-text-left{text-align:left}.ns-text-center{text-align:center}.ns-text-3xl{font-size:1.875rem;line-height:2.25rem}.ns-text-sm{font-size:.875rem;line-height:1.25rem}.ns-text-xs{font-size:.75rem;line-height:1rem}.ns-font-medium{font-weight:500}.ns-font-semibold{font-weight:600}.ns-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.ns-text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.ns-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.ns-text-white\\/60{color:#fff9}.ns-opacity-50{opacity:.5}.ns-opacity-70{opacity:.7}.ns-shadow-chatbox{--tw-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03);--tw-shadow-colored: 0px 12px 16px -4px var(--tw-shadow-color), 0px 4px 6px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ns-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ns-outline-none{outline:2px solid transparent;outline-offset:2px}.ns-blur-\\[40px\\]{--tw-blur: blur(40px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ns-filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ns-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.nous-chat-widget .no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.nous-chat-widget .no-scrollbar::-webkit-scrollbar{display:none}.nous-chat-widget .slide-fade-enter-active,.nous-chat-widget .slide-fade-leave-active{transition:all .3s ease}.nous-chat-widget .slide-fade-enter-from,.nous-chat-widget .slide-fade-leave-to{transform:translateY(20px);opacity:0}.nous-chat-widget .fade-enter-active,.nous-chat-widget .fade-leave-active{transition:opacity .2s ease}.nous-chat-widget .fade-enter-from,.nous-chat-widget .fade-leave-to{opacity:0}.placeholder\\:ns-text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\\:ns-text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:ns-scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:ns-shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:ns-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ns-ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ns-ring-transparent:focus{--tw-ring-color: transparent}',Hi={init(e){if(!document.getElementById("nous-chat-style")){const s=document.createElement("style");s.id="nous-chat-style",s.textContent=Xf,document.head.appendChild(s)}const t=document.createElement("div");document.body.appendChild(t),Fc(Yf,e).mount(t)}};return typeof window<"u"&&(window.Nous=Hi),Hi}(); +`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Xs.assertOptions(s,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean)},!1),r!=null&&(p.isFunction(r)?n.paramsSerializer={serialize:r}:Xs.assertOptions(r,{encode:it.function,serialize:it.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&p.merge(o.common,o[n.method]);o&&p.forEach(["delete","get","head","post","put","patch","common"],x=>{delete o[x]}),n.headers=_e.concat(i,o);const l=[];let a=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(a=a&&C.synchronous,l.unshift(C.fulfilled,C.rejected))});const u=[];this.interceptors.response.forEach(function(C){u.push(C.fulfilled,C.rejected)});let f,h=0,m;if(!a){const x=[ki.bind(this),void 0];for(x.unshift.apply(x,l),x.push.apply(x,u),m=x.length,f=Promise.resolve(n);h{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new Nt(o,i,l),n(s.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)}static source(){let t;return{token:new Qs(function(r){t=r}),cancel:t}}}function Ef(e){return function(n){return e.apply(null,n)}}function Cf(e){return p.isObject(e)&&e.isAxiosError===!0}const er={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(er).forEach(([e,t])=>{er[t]=e});function Di(e){const t=new bt(e),n=ti(bt.prototype.request,t);return p.extend(n,bt.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Di(wt(e,r))},n}const oe=Di(Zt);oe.Axios=bt,oe.CanceledError=Nt,oe.CancelToken=Qs,oe.isCancel=vi,oe.VERSION=Ii,oe.toFormData=jn,oe.AxiosError=H,oe.Cancel=oe.CanceledError,oe.all=function(t){return Promise.all(t)},oe.spread=Ef,oe.isAxiosError=Cf,oe.mergeConfig=wt,oe.AxiosHeaders=_e,oe.formToJSON=e=>_i(p.isHTMLForm(e)?new FormData(e):e),oe.getAdapter=Li.getAdapter,oe.HttpStatusCode=er,oe.default=oe;const Tf={class:"ns-flex ns-flex-col ns-h-full"},Af={class:"ns-flex ns-items-center ns-h-14 ns-w-full ns-px-5",style:{backgroundColor:"var(--nous-chat-color)"}},Rf=[L("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",class:"ns-cursor-pointer ns-mr-3"},[L("g",{id:"tabler-icon-arrow-left__tabler-icon-arrow-left"},[L("path",{id:"tabler-icon-arrow-left__Vector",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M5 12h14M5 12l6 6m-6-6 6-6"})])],-1)],Of=Rt('
',1),Pf={class:"ns-text-white ns-font-semibold ns-ml-2 ns-grow"},Nf={key:0,class:"ns-flex ns-items-end ns-mb-4"},Ff=Rt('
',1),Mf={class:"ns-flex ns-flex-col"},Lf={class:"ns-bg-gray-100 ns-rounded-xl ns-rounded-bl-sm ns-p-3 ns-max-w-[100%]"},kf={class:"ns-text-sm"},If={class:"ns-text-xs ns-text-gray-500 ns-mt-1"},Bf={key:1,class:"ns-flex ns-justify-end ns-mb-4"},Df={class:"ns-flex ns-flex-col ns-items-end"},$f={class:"ns-rounded-xl ns-rounded-br-sm ns-p-3 ns-max-w-[100%]",style:{backgroundColor:"var(--nous-chat-color)"}},Hf={class:"ns-text-sm ns-text-white"},jf={class:"ns-text-xs ns-text-gray-500 ns-mt-1"},Uf={class:"ns-px-4"},zf={class:"ns-flex ns-items-center ns-border ns-border-gray-200 ns-bg-gray-50 ns-rounded-full ns-px-4 ns-h-12"},Vf=[L("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},[L("g",{id:"noun-send-6644234-1__noun-send-6644234 1"},[L("path",{id:"noun-send-6644234-1__Vector",fill:"#6B7280",d:"M17.319 7.725 5.018 1.53c-.976-.494-2.088-.331-2.888.425-.862.813-1.119 2.05-.644 3.163.638 1.5 1.381 3.275 1.45 3.443.2.481.65.819 1.169.819H10c.825 0 .825 1.25 0 1.25H4.106c-.481 0-.95.287-1.181.831-.394.944-.913 2.182-1.444 3.425a2.792 2.792 0 0 0 .644 3.163 2.503 2.503 0 0 0 1.737.706 2.59 2.59 0 0 0 1.157-.281l12.375-6.238A2.503 2.503 0 0 0 18.73 9.55c-.138-.794-.694-1.457-1.419-1.819l.006-.006Z"})])],-1)],qf=L("div",{class:"ns-p-4 ns-text-gray-400 ns-text-sm ns-text-center ns-w-full"},[L("p",null,[Ao("Powered by "),L("a",{href:"https://nous.my"},"Nous")])],-1),$i={__name:"NousConversation",setup(e){const t=At("nousChatProps"),n=xe(null),s=xe(!0),r=xe(!0),o=xe(null),i=xe(null),l=xe(""),a=xe([]),u=xe(!1),{formatTimestamp:f}=Qo();Ht(()=>{var A;C(),(A=n.value)==null||A.addEventListener("scroll",v),h()});const h=()=>{o.value=localStorage.getItem("nous-user-session-id"),o.value?R():m()},m=()=>{o.value=crypto.randomUUID(),i.value=`nous-chat-history-${o.value}`,localStorage.setItem("nous-user-session-id",o.value),localStorage.setItem(i.value,JSON.stringify([])),j()},R=()=>{i.value=`nous-chat-history-${o.value}`,Z()},x=()=>{localStorage.removeItem("nous-user-session-id"),localStorage.removeItem(i.value),a.value=[],m()};An(()=>t.messages,()=>{C()},{deep:!0}),En(()=>{var A;(A=n.value)==null||A.removeEventListener("scroll",v)});const C=()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)},v=()=>{if(n.value){const{scrollTop:A,scrollHeight:q,clientHeight:z}=n.value;s.value=A===0,r.value=A+z>=q-1}},I=async()=>{if(!l.value.trim())return;const A=l.value;l.value="",await O(A,!1)},j=async()=>{await O(t.initPayload,!0)},O=async(A,q)=>{u.value=!0,q||U("user",A);try{(await oe.post(t.webhookUrl,{message:A,sender:o.value})).data.forEach(J=>{U("bot",J.text)})}catch(z){console.error("Error sending message:",z)}finally{u.value=!1}},U=(A,q,z)=>{z||(z=new Date().toLocaleString("en-US")),a.value.push({type:A,text:q,timestamp:z}),localStorage.setItem(i.value,JSON.stringify(a.value))},Z=async()=>{const A=localStorage.getItem(i.value);a.value=JSON.parse(A)};return(A,q)=>(ie(),me("div",Tf,[L("div",Af,[L("a",{href:"#",role:"button",onClick:q[0]||(q[0]=Ds(z=>A.$emit("goBackHome"),["prevent"]))},Rf),Of,L("h1",Pf,Ne(Xe(t).title),1),ue(su,{onStartNewSession:x})]),L("div",{class:"ns-flex-1 ns-overflow-y-auto ns-p-4 ns-relative no-scrollbar",ref_key:"chatContainer",ref:n},[(ie(!0),me(ve,null,oa(a.value,(z,D)=>(ie(),me(ve,{key:D},[z.type==="bot"?(ie(),me("div",Nf,[Ff,L("div",Mf,[L("div",Lf,[L("p",kf,Ne(z.text),1)]),L("span",If,Ne(Xe(f)(z.timestamp)),1)])])):(ie(),me("div",Bf,[L("div",Df,[L("div",$f,[L("p",Hf,Ne(z.text),1)]),L("span",jf,Ne(Xe(f)(z.timestamp)),1)])]))],64))),128)),u.value?(ie(),Rs(tu,{key:0})):Ps("",!0)],512),L("div",{class:Lt(["ns-absolute ns-top-14 ns-left-0 ns-right-0 ns-h-16 ns-bg-gradient-to-b ns-from-white ns-to-transparent ns-pointer-events-none ns-opacity-70 ns-z-10",{"ns-hidden":s.value}])},null,2),L("div",{class:Lt(["ns-absolute ns-bottom-[6.25rem] ns-left-0 ns-right-0 ns-h-16 ns-bg-gradient-to-t ns-from-white ns-to-transparent ns-pointer-events-none ns-opacity-70 ns-z-10",{"ns-hidden":r.value}])},null,2),L("div",Uf,[L("div",zf,[zl(L("input",{type:"text",placeholder:"Type a message...",class:"ns-flex-1 ns-bg-transparent ns-outline-none ns-text-sm placeholder:ns-text-gray-500 focus:ns-outline-none focus:ns-ring-0 focus:ns-ring-transparent","onUpdate:modelValue":q[1]||(q[1]=z=>l.value=z),onKeyup:Oc(I,["enter"])},null,544),[[Cc,l.value]]),L("button",{class:"ns-ml-2",onClick:I},Vf)])]),qf]))}},Kf={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},Wf=[L("g",{id:"tabler-icon-chevron-down__tabler-icon-chevron-down"},[L("path",{id:"tabler-icon-chevron-down__Vector",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9 6 6 6-6"})],-1)],Jf={key:1,xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",viewBox:"0 0 18 18"},Gf=[L("g",{id:"frame__Frame","clip-path":"url(#frame__clip0_1212_3584)"},[L("path",{id:"frame__Vector",fill:"#fff",d:"M13.5 2.25a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H9.957l-3.572 2.143a.75.75 0 0 1-1.13-.558l-.005-.085v-1.5H4.5a3 3 0 0 1-2.996-2.85l-.004-.15v-6a3 3 0 0 1 3-3h9ZM10.5 9H6a.75.75 0 0 0 0 1.5h4.5a.75.75 0 1 0 0-1.5ZM12 6H6a.75.75 0 0 0 0 1.5h6A.75.75 0 1 0 12 6Z"})],-1),L("defs",null,[L("clipPath",{id:"frame__clip0_1212_3584"},[L("path",{fill:"#fff",d:"M0 0h18v18H0z"})])],-1)],Zf={key:0,class:"ns-fixed ns-bg-white ns-right-5 ns-bottom-[5.5rem] ns-rounded-2xl ns-shadow-chatbox ns-overflow-hidden",style:{height:"var(--nous-chat-height)",width:"var(--nous-chat-width)"}},Yf={__name:"NousChat",props:{webhookUrl:{type:String,required:!0},color:{type:String,default:"#ff2627"},title:{type:String,default:"Padi Bot"},fontFamily:{type:String,default:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"},firstMessage:{type:String,default:"Chat with us"},secondMessage:{type:String,default:"How can we help you today?"},initPayload:{type:String,default:"SpecialInitPayLoadDoNotTouch"},zIndex:{type:String,default:"1000"}},setup(e){const t=e;oo("nousChatProps",t);const n=xe(!1),s=xe();Ht(()=>{localStorage.getItem("nous-user-session-id")?s.value=$i:s.value=ei});const r=Ms(()=>({"--nous-chat-color":t.color,"--nous-chat-font-family":t.fontFamily,"--nous-chat-z-index":t.zIndex,"--nous-chat-width":"364px","--nous-chat-height":"620px"})),o=()=>{n.value=!n.value},i=()=>{s.value=$i},l=()=>{s.value=ei};return(a,u)=>(ie(),me("div",{class:"nous-chat-widget ns-absolute",style:ln(r.value)},[L("div",{class:"ns-fixed ns-bottom-5 ns-right-5 ns-w-12 ns-h-12 ns-flex ns-items-center ns-justify-center ns-rounded-full ns-shadow-lg ns-transition-all hover:ns-scale-110",role:"button",onClick:o,style:{backgroundColor:"var(--nous-chat-color)"}},[n.value?(ie(),me("svg",Kf,Wf)):(ie(),me("svg",Jf,Gf))]),ue(kn,{name:"slide-fade"},{default:gs(()=>[n.value?(ie(),me("div",Zf,[ue(kn,{name:"fade",mode:"out-in"},{default:gs(()=>[(ie(),Rs(sa(s.value),{onOpenRecentConversation:i,onGoBackHome:l},null,32))]),_:1})])):Ps("",!0)]),_:1})],4))}},Xf='.nous-chat-wdiget{all:initial}.nous-chat-wdiget *{all:unset}.nous-chat-widget{@keyframes ns-bounce{0%,to{transform:translateY(0);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(-5px);animation-timing-function:cubic-bezier(0,0,.2,1)}}}.nous-chat-widget *,.nous-chat-widget :before,.nous-chat-widget :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}.nous-chat-widget :before,.nous-chat-widget :after{--tw-content: ""}.nous-chat-widget html,.nous-chat-widget :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}.nous-chat-widget body{margin:0;line-height:inherit}.nous-chat-widget hr{height:0;color:inherit;border-top-width:1px}.nous-chat-widget abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.nous-chat-widget h1,.nous-chat-widget h2,.nous-chat-widget h3,.nous-chat-widget h4,.nous-chat-widget h5,.nous-chat-widget h6{font-size:inherit;font-weight:inherit}.nous-chat-widget a{color:inherit;text-decoration:inherit}.nous-chat-widget b,.nous-chat-widget strong{font-weight:bolder}.nous-chat-widget code,.nous-chat-widget kbd,.nous-chat-widget samp,.nous-chat-widget pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}.nous-chat-widget small{font-size:80%}.nous-chat-widget sub,.nous-chat-widget sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.nous-chat-widget sub{bottom:-.25em}.nous-chat-widget sup{top:-.5em}.nous-chat-widget table{text-indent:0;border-color:inherit;border-collapse:collapse}.nous-chat-widget button,.nous-chat-widget input,.nous-chat-widget optgroup,.nous-chat-widget select,.nous-chat-widget textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}.nous-chat-widget button,.nous-chat-widget select{text-transform:none}.nous-chat-widget button,.nous-chat-widget input:where([type=button]),.nous-chat-widget input:where([type=reset]),.nous-chat-widget input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}.nous-chat-widget :-moz-focusring{outline:auto}.nous-chat-widget :-moz-ui-invalid{box-shadow:none}.nous-chat-widget progress{vertical-align:baseline}.nous-chat-widget ::-webkit-inner-spin-button,.nous-chat-widget ::-webkit-outer-spin-button{height:auto}.nous-chat-widget [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.nous-chat-widget ::-webkit-search-decoration{-webkit-appearance:none}.nous-chat-widget ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.nous-chat-widget summary{display:list-item}.nous-chat-widget blockquote,.nous-chat-widget dl,.nous-chat-widget dd,.nous-chat-widget h1,.nous-chat-widget h2,.nous-chat-widget h3,.nous-chat-widget h4,.nous-chat-widget h5,.nous-chat-widget h6,.nous-chat-widget hr,.nous-chat-widget figure,.nous-chat-widget p,.nous-chat-widget pre{margin:0}.nous-chat-widget fieldset{margin:0;padding:0}.nous-chat-widget legend{padding:0}.nous-chat-widget ol,.nous-chat-widget ul,.nous-chat-widget menu{list-style:none;margin:0;padding:0}.nous-chat-widget dialog{padding:0}.nous-chat-widget textarea{resize:vertical}.nous-chat-widget input::-moz-placeholder,.nous-chat-widget textarea::-moz-placeholder{opacity:1;color:#9ca3af}.nous-chat-widget input::placeholder,.nous-chat-widget textarea::placeholder{opacity:1;color:#9ca3af}.nous-chat-widget button,.nous-chat-widget [role=button]{cursor:pointer}.nous-chat-widget :disabled{cursor:default}.nous-chat-widget img,.nous-chat-widget svg,.nous-chat-widget video,.nous-chat-widget canvas,.nous-chat-widget audio,.nous-chat-widget iframe,.nous-chat-widget embed,.nous-chat-widget object{display:block;vertical-align:middle}.nous-chat-widget img,.nous-chat-widget video{max-width:100%;height:auto}.nous-chat-widget [hidden]{display:none}.nous-chat-widget *,.nous-chat-widget :before,.nous-chat-widget :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.nous-chat-widget ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.nous-chat-widget .ns-pointer-events-none{pointer-events:none}.nous-chat-widget .ns-fixed{position:fixed}.nous-chat-widget .ns-absolute{position:absolute}.nous-chat-widget .ns-relative{position:relative}.nous-chat-widget .ns-inset-0{top:0;right:0;bottom:0;left:0}.nous-chat-widget .ns-bottom-5{bottom:1.25rem}.nous-chat-widget .ns-bottom-\\[5\\.5rem\\]{bottom:5.5rem}.nous-chat-widget .ns-bottom-\\[6\\.25rem\\]{bottom:6.25rem}.nous-chat-widget .ns-left-0{left:0}.nous-chat-widget .ns-right-0{right:0}.nous-chat-widget .ns-right-2{right:.5rem}.nous-chat-widget .ns-right-5{right:1.25rem}.nous-chat-widget .ns-top-14{top:3.5rem}.nous-chat-widget .ns-top-2{top:.5rem}.nous-chat-widget .ns-z-10{z-index:10}.nous-chat-widget .ns-z-20{z-index:20}.nous-chat-widget .ns-z-\\[-1\\]{z-index:-1}.nous-chat-widget .ns-mx-8{margin-left:2rem;margin-right:2rem}.nous-chat-widget .ns-mb-1{margin-bottom:.25rem}.nous-chat-widget .ns-mb-1\\.5{margin-bottom:.375rem}.nous-chat-widget .ns-mb-2{margin-bottom:.5rem}.nous-chat-widget .ns-mb-4{margin-bottom:1rem}.nous-chat-widget .ns-mb-7{margin-bottom:1.75rem}.nous-chat-widget .ns-ml-2{margin-left:.5rem}.nous-chat-widget .ns-mr-1{margin-right:.25rem}.nous-chat-widget .ns-mr-3{margin-right:.75rem}.nous-chat-widget .ns-mt-1{margin-top:.25rem}.nous-chat-widget .ns-mt-9{margin-top:2.25rem}.nous-chat-widget .ns-mt-auto{margin-top:auto}.nous-chat-widget .ns-line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.nous-chat-widget .ns-flex{display:flex}.nous-chat-widget .ns-inline-flex{display:inline-flex}.nous-chat-widget .ns-hidden{display:none}.nous-chat-widget .ns-h-1\\.5{height:.375rem}.nous-chat-widget .ns-h-11{height:2.75rem}.nous-chat-widget .ns-h-12{height:3rem}.nous-chat-widget .ns-h-14{height:3.5rem}.nous-chat-widget .ns-h-16{height:4rem}.nous-chat-widget .ns-h-32{height:8rem}.nous-chat-widget .ns-h-8{height:2rem}.nous-chat-widget .ns-h-9{height:2.25rem}.nous-chat-widget .ns-h-full{height:100%}.nous-chat-widget .ns-w-1\\.5{width:.375rem}.nous-chat-widget .ns-w-11{width:2.75rem}.nous-chat-widget .ns-w-12{width:3rem}.nous-chat-widget .ns-w-40{width:10rem}.nous-chat-widget .ns-w-64{width:16rem}.nous-chat-widget .ns-w-8{width:2rem}.nous-chat-widget .ns-w-9{width:2.25rem}.nous-chat-widget .ns-w-full{width:100%}.nous-chat-widget .ns-max-w-\\[100\\%\\]{max-width:100%}.nous-chat-widget .ns-flex-1{flex:1 1 0%}.nous-chat-widget .ns-flex-shrink-0,.nous-chat-widget .ns-shrink-0{flex-shrink:0}.nous-chat-widget .ns-grow{flex-grow:1}.nous-chat-widget .ns-rotate-\\[-10deg\\]{--tw-rotate: -10deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nous-chat-widget .ns-rotate-\\[-24deg\\]{--tw-rotate: -24deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nous-chat-widget .ns-animate-bounce{animation:ns-bounce .8s infinite}.nous-chat-widget .ns-cursor-pointer{cursor:pointer}.nous-chat-widget .ns-flex-col{flex-direction:column}.nous-chat-widget .ns-items-end{align-items:flex-end}.nous-chat-widget .ns-items-center{align-items:center}.nous-chat-widget .ns-justify-end{justify-content:flex-end}.nous-chat-widget .ns-justify-center{justify-content:center}.nous-chat-widget .ns-justify-between{justify-content:space-between}.nous-chat-widget .ns-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.nous-chat-widget .ns-overflow-hidden{overflow:hidden}.nous-chat-widget .ns-overflow-y-auto{overflow-y:auto}.nous-chat-widget .ns-rounded-2xl{border-radius:1rem}.nous-chat-widget .ns-rounded-full{border-radius:9999px}.nous-chat-widget .ns-rounded-lg{border-radius:.5rem}.nous-chat-widget .ns-rounded-xl{border-radius:.75rem}.nous-chat-widget .ns-rounded-bl-sm{border-bottom-left-radius:.125rem}.nous-chat-widget .ns-rounded-br-sm{border-bottom-right-radius:.125rem}.nous-chat-widget .ns-border{border-width:1px}.nous-chat-widget .ns-border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.nous-chat-widget .ns-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.nous-chat-widget .ns-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.nous-chat-widget .ns-bg-gray-400\\/80{background-color:#9ca3afcc}.nous-chat-widget .ns-bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.nous-chat-widget .ns-bg-transparent{background-color:transparent}.nous-chat-widget .ns-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.nous-chat-widget .ns-bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.nous-chat-widget .ns-bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.nous-chat-widget .ns-from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.nous-chat-widget .ns-to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.nous-chat-widget .ns-p-2{padding:.5rem}.nous-chat-widget .ns-p-3{padding:.75rem}.nous-chat-widget .ns-p-4{padding:1rem}.nous-chat-widget .ns-px-4{padding-left:1rem;padding-right:1rem}.nous-chat-widget .ns-px-5{padding-left:1.25rem;padding-right:1.25rem}.nous-chat-widget .ns-px-7{padding-left:1.75rem;padding-right:1.75rem}.nous-chat-widget .ns-py-4{padding-top:1rem;padding-bottom:1rem}.nous-chat-widget .ns-text-left{text-align:left}.nous-chat-widget .ns-text-center{text-align:center}.nous-chat-widget .ns-text-3xl{font-size:1.875rem;line-height:2.25rem}.nous-chat-widget .ns-text-sm{font-size:.875rem;line-height:1.25rem}.nous-chat-widget .ns-text-xs{font-size:.75rem;line-height:1rem}.nous-chat-widget .ns-font-medium{font-weight:500}.nous-chat-widget .ns-font-semibold{font-weight:600}.nous-chat-widget .ns-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.nous-chat-widget .ns-text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.nous-chat-widget .ns-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.nous-chat-widget .ns-text-white\\/60{color:#fff9}.nous-chat-widget .ns-opacity-50{opacity:.5}.nous-chat-widget .ns-opacity-70{opacity:.7}.nous-chat-widget .ns-shadow-chatbox{--tw-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03);--tw-shadow-colored: 0px 12px 16px -4px var(--tw-shadow-color), 0px 4px 6px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.nous-chat-widget .ns-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.nous-chat-widget .ns-outline-none{outline:2px solid transparent;outline-offset:2px}.nous-chat-widget .ns-blur-\\[40px\\]{--tw-blur: blur(40px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.nous-chat-widget .ns-filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.nous-chat-widget .ns-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.nous-chat-widget .no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.nous-chat-widget .no-scrollbar::-webkit-scrollbar{display:none}.nous-chat-widget .slide-fade-enter-active,.nous-chat-widget .slide-fade-leave-active{transition:all .3s ease}.nous-chat-widget .slide-fade-enter-from,.nous-chat-widget .slide-fade-leave-to{transform:translateY(20px);opacity:0}.nous-chat-widget .fade-enter-active,.nous-chat-widget .fade-leave-active{transition:opacity .2s ease}.nous-chat-widget .fade-enter-from,.nous-chat-widget .fade-leave-to{opacity:0}.placeholder\\:ns-text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\\:ns-text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:ns-scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:ns-shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:ns-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ns-ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ns-ring-transparent:focus{--tw-ring-color: transparent}',Hi={init(e){if(!document.getElementById("nous-chat-style")){const s=document.createElement("style");s.id="nous-chat-style",s.textContent=Xf,document.head.appendChild(s)}const t=document.createElement("div");document.body.appendChild(t),Fc(Yf,e).mount(t)}};return typeof window<"u"&&(window.Nous=Hi),Hi}(); global.Nous = Nous; })(typeof window !== 'undefined' ? window : this); \ No newline at end of file diff --git a/src/style.css b/src/style.css index 228eefb..9843d59 100644 --- a/src/style.css +++ b/src/style.css @@ -1,8 +1,16 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +.nous-chat-wdiget { + all: initial; /* Reset all styles */ +} + +.nous-chat-wdiget * { + all: unset; /* Reset all styles for child elements */ +} .nous-chat-widget { + @tailwind base; + @tailwind components; + @tailwind utilities; + /* Add any custom styles for your widget here */ .no-scrollbar { scrollbar-width: none; /* Firefox */