@opencx/widget 2.0.0 → 2.1.0
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/README.md +5 -5
- package/dist/basic.cjs +1 -1
- package/dist/basic.js +1 -1
- package/dist/core/errors/index.d.ts +6 -6
- package/dist/index-BGDwCf6r.cjs +18 -0
- package/dist/{index-DQmRZV3b.cjs.map → index-BGDwCf6r.cjs.map} +1 -1
- package/dist/{index-C11ivBh5.js → index-zWyDrord.js} +3 -3
- package/dist/{index-C11ivBh5.js.map → index-zWyDrord.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -31
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/index.d.ts +1 -1
- package/dist-embed/script.js +2 -2
- package/dist-embed/script.js.map +1 -1
- package/package.json +2 -2
- package/dist/index-DQmRZV3b.cjs +0 -18
package/dist-embed/script.js
CHANGED
|
@@ -14,7 +14,7 @@ var Joe=Object.defineProperty;var ese=(_i,$r,Zn)=>$r in _i?Joe(_i,$r,{enumerable
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var C6=y,A6=Symbol.for("react.element"),R6=Symbol.for("react.fragment"),N6=Object.prototype.hasOwnProperty,O6=C6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P6={key:!0,ref:!0,__self:!0,__source:!0};function Bv(e,t,n){var r,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)N6.call(t,r)&&!P6.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:A6,type:e,key:a,ref:o,props:i,_owner:O6.current}}wc.Fragment=R6,wc.jsx=Bv,wc.jsxs=Bv,Sv.exports=wc;var E=Sv.exports;const I6="@opencx/widget",wh="2.0.0",jv={name:I6,private:!1,version:wh,type:"module",publishConfig:{access:"public"},scripts:{clean:"rm -rf ./dist ./dist-embed","clean:dist":"rm -rf ./dist ./dist-embed",prepublishOnly:"pnpm clean && pnpm test && pnpm batman","build:lib":"vite build",dev:"vite -c vite.config.ts","build:embed":"vite build -c vite.embed.config.ts",test:"vitest run",batman:"pnpm build:lib && pnpm build:embed","test:watch":"vitest --watch",cs:"changeset",csv:"changeset version",csp:"changeset publish","type-check":"tsc --noEmit",lint:"biome lint --fix",format:"biome format --fix"},peerDependencies:{"lucide-react":"^0.412.0",react:"^18.3.1","rehype-raw":"^7.0.0"},peerDependenciesMeta:{react:{optional:!0}},optionalDependencies:{axios:"^1.7.5","socket.io-client":"^4.7.5",zod:"^3.23.8"},dependencies:{"@radix-ui/react-avatar":"^1.1.0","@radix-ui/react-dropdown-menu":"^2.1.4","@radix-ui/react-slot":"^1.1.0","@radix-ui/react-switch":"^1.1.0","@radix-ui/react-tooltip":"^1.1.2",clsx:"^2.1.1","date-fns":"^4.1.0","framer-motion":"^11.3.30","lodash.set":"^4.3.2","lucide-react":"^0.436.0",mutative:"^1.0.11","react-dropzone":"^14.3.5","react-hot-toast":"^2.4.1",tinycolor2:"^1.6.0",zod:"^3.23.8"},overrides:{"@opencx/widget":{react:{optional:!0,dependencies:{"react-hot-toast":"^2.4.1","react-markdown":"^9.0.1","framer-motion":"^11.3.30","date-fns":"^4.1.0"}}}},conditionalDependencies:{react:{"react-hot-toast":"^2.4.1","react-markdown":"^9.0.1","framer-motion":"^11.3.30","date-fns":"^4.1.0"}},files:["dist","dist-embed"],bugs:{url:"https://github.com/openchatai/OpenCopilot/issues"},author:{name:"openchatai",url:"https://github.com/openchatai"},main:"./dist/index.js",module:"./dist/index.js",types:"./dist/index.d.ts",sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./basic":{types:"./dist/basic.d.ts",import:"./dist/basic.js",require:"./dist/basic.cjs"},"./react":{types:"./dist/react.d.ts",import:"./dist/react.js",require:"./dist/react.cjs"},"./package.json":"./package.json","./dist/*.css":"./dist/*.css"},devDependencies:{"@biomejs/biome":"1.9.4","@changesets/cli":"^2.27.9","@radix-ui/react-popover":"^1.1.2","@tailwindcss/typography":"^0.5.15","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.5.0","@testing-library/react":"^16.0.1","@types/lodash.debounce":"^4.0.9","@types/lodash.set":"^4.3.9","@types/node":"^20.14.8","@types/react":"^18.3.4","@types/react-dom":"^18.3.0","@types/tinycolor2":"^1.4.6","@uiw/react-iframe":"^1.0.3","@vitejs/plugin-react":"^4.3.4",autoprefixer:"^10.4.20",axios:"^1.7.5","class-variance-authority":"^0.7.0",jsdom:"^25.0.1",mutative:"^1.0.11",postcss:"^8.4.41","postcss-prefix-selector":"^1.16.1",react:"^18.3.1","react-dom":"^18.3.1","react-markdown":"^9.0.1","react-use":"^17.5.1","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","socket.io-client":"^4.7.5",swr:"^2.2.5","tailwind-merge":"^2.4.0",tailwindcss:"^3.4.6","tailwindcss-animate":"^1.0.7",typescript:"^5.5.4",vite:"^5.4.2","vite-plugin-dts":"4.0.3","vite-plugin-externalize-deps":"^0.8.0","vite-tsconfig-paths":"^5.0.1",vitest:"^2.0.5"}},D6=typeof window>"u",zv={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function L6(e){return D6?zv:e==="local"?localStorage:e==="session"?sessionStorage:zv}function yh(e,t,n="session"){const r=y.useMemo(()=>L6(n),[n]),[i,a]=y.useState(()=>{const l=r.getItem(e);if(l!==null)try{return JSON.parse(l)}catch(u){console.error(`Error parsing stored value for key '${e}':`,u)}return typeof t=="function"?t():t??null}),o=y.useCallback(l=>{if(a(l),l===null)r.removeItem(e);else try{r.setItem(e,JSON.stringify(l))}catch(u){console.error(`Error saving state to storage for key '${e}':`,u)}},[e,r]),s=y.useCallback(()=>{a(null),r.removeItem(e)},[e,r]);return y.useEffect(()=>{const l=u=>{u.key===e&&u.newValue!==JSON.stringify(i)&&a(u.newValue?JSON.parse(u.newValue):null)};return window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}},[e,i]),[i,o,s]}function Uv(e,t){return function(){return e.apply(t,arguments)}}const{toString:M6}=Object.prototype,{getPrototypeOf:vh}=Object,xc=(e=>t=>{const n=M6.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jn=e=>(e=e.toLowerCase(),t=>xc(t)===e),Ec=e=>t=>typeof t===e,{isArray:mo}=Array,Ys=Ec("undefined");function F6(e){return e!==null&&!Ys(e)&&e.constructor!==null&&!Ys(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hv=Jn("ArrayBuffer");function B6(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hv(e.buffer),t}const j6=Ec("string"),bn=Ec("function"),Vv=Ec("number"),Tc=e=>e!==null&&typeof e=="object",z6=e=>e===!0||e===!1,_c=e=>{if(xc(e)!=="object")return!1;const t=vh(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},U6=Jn("Date"),H6=Jn("File"),V6=Jn("Blob"),$6=Jn("FileList"),W6=e=>Tc(e)&&bn(e.pipe),Y6=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bn(e.append)&&((t=xc(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},q6=Jn("URLSearchParams"),[G6,K6,X6,Q6]=["ReadableStream","Request","Response","Headers"].map(Jn),Z6=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),mo(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function $v(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const _a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wv=e=>!Ys(e)&&e!==_a;function bh(){const{caseless:e}=Wv(this)&&this||{},t={},n=(r,i)=>{const a=e&&$v(t,i)||i;_c(t[a])&&_c(r)?t[a]=bh(t[a],r):_c(r)?t[a]=bh({},r):mo(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&qs(arguments[r],n);return t}const J6=(e,t,n,{allOwnKeys:r}={})=>(qs(t,(i,a)=>{n&&bn(i)?e[a]=Uv(i,n):e[a]=i},{allOwnKeys:r}),e),e4=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),t4=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},n4=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&vh(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},r4=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},i4=e=>{if(!e)return null;if(mo(e))return e;let t=e.length;if(!Vv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},a4=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vh(Uint8Array)),o4=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},s4=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},l4=Jn("HTMLFormElement"),u4=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Yv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),c4=Jn("RegExp"),qv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};qs(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},d4=e=>{qv(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},f4=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return mo(e)?r(e):r(String(e).split(t)),n},p4=()=>{},h4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,xh="abcdefghijklmnopqrstuvwxyz",Gv="0123456789",Kv={DIGIT:Gv,ALPHA:xh,ALPHA_DIGIT:xh+xh.toUpperCase()+Gv},m4=(e=16,t=Kv.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function g4(e){return!!(e&&bn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const w4=e=>{const t=new Array(10),n=(r,i)=>{if(Tc(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=mo(r)?[]:{};return qs(r,(o,s)=>{const l=n(o,i+1);!Ys(l)&&(a[s]=l)}),t[i]=void 0,a}}return r};return n(e,0)},y4=Jn("AsyncFunction"),v4=e=>e&&(Tc(e)||bn(e))&&bn(e.then)&&bn(e.catch),Xv=((e,t)=>e?setImmediate:t?((n,r)=>(_a.addEventListener("message",({source:i,data:a})=>{i===_a&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),_a.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(_a.postMessage)),b4=typeof queueMicrotask<"u"?queueMicrotask.bind(_a):typeof process<"u"&&process.nextTick||Xv,z={isArray:mo,isArrayBuffer:Hv,isBuffer:F6,isFormData:Y6,isArrayBufferView:B6,isString:j6,isNumber:Vv,isBoolean:z6,isObject:Tc,isPlainObject:_c,isReadableStream:G6,isRequest:K6,isResponse:X6,isHeaders:Q6,isUndefined:Ys,isDate:U6,isFile:H6,isBlob:V6,isRegExp:c4,isFunction:bn,isStream:W6,isURLSearchParams:q6,isTypedArray:a4,isFileList:$6,forEach:qs,merge:bh,extend:J6,trim:Z6,stripBOM:e4,inherits:t4,toFlatObject:n4,kindOf:xc,kindOfTest:Jn,endsWith:r4,toArray:i4,forEachEntry:o4,matchAll:s4,isHTMLForm:l4,hasOwnProperty:Yv,hasOwnProp:Yv,reduceDescriptors:qv,freezeMethods:d4,toObjectSet:f4,toCamelCase:u4,noop:p4,toFiniteNumber:h4,findKey:$v,global:_a,isContextDefined:Wv,ALPHABET:Kv,generateString:m4,isSpecCompliantForm:g4,toJSONObject:w4,isAsyncFn:y4,isThenable:v4,setImmediate:Xv,asap:b4};function ye(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}z.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.status}}});const Qv=ye.prototype,Zv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zv[e]={value:e}}),Object.defineProperties(ye,Zv),Object.defineProperty(Qv,"isAxiosError",{value:!0}),ye.from=(e,t,n,r,i,a)=>{const o=Object.create(Qv);return z.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),ye.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const x4=null;function Eh(e){return z.isPlainObject(e)||z.isArray(e)}function Jv(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function eb(e,t,n){return e?e.concat(t).map(function(i,a){return i=Jv(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function E4(e){return z.isArray(e)&&!e.some(Eh)}const T4=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Sc(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,x){return!z.isUndefined(x[w])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(!l&&z.isBlob(g))throw new ye("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,w,x){let m=g;if(g&&!x&&typeof g=="object"){if(z.endsWith(w,"{}"))w=r?w:w.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&E4(g)||(z.isFileList(g)||z.endsWith(w,"[]"))&&(m=z.toArray(g)))return w=Jv(w),m.forEach(function(b,T){!(z.isUndefined(b)||b===null)&&t.append(o===!0?eb([w],T,a):o===null?w:w+"[]",u(b))}),!1}return Eh(g)?!0:(t.append(eb(x,w,a),u(g)),!1)}const d=[],f=Object.assign(T4,{defaultVisitor:c,convertValue:u,isVisitable:Eh});function p(g,w){if(!z.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+w.join("."));d.push(g),z.forEach(g,function(m,v){(!(z.isUndefined(m)||m===null)&&i.call(t,m,z.isString(v)?v.trim():v,w,f))===!0&&p(m,w?w.concat(v):[v])}),d.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return p(e),t}function tb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Th(e,t){this._pairs=[],e&&Sc(e,this,t)}const nb=Th.prototype;nb.append=function(t,n){this._pairs.push([t,n])},nb.toString=function(t){const n=t?function(r){return t.call(this,r,tb)}:tb;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rb(e,t,n){if(!t)return e;const r=n&&n.encode||_4,i=n&&n.serialize;let a;if(i?a=i(t,n):a=z.isURLSearchParams(t)?t.toString():new Th(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ib{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ab={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},S4={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Th,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},_h=typeof window<"u"&&typeof document<"u",Sh=typeof navigator=="object"&&navigator||void 0,k4=_h&&(!Sh||["ReactNative","NativeScript","NS"].indexOf(Sh.product)<0),C4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",A4=_h&&window.location.href||"http://localhost",sn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_h,hasStandardBrowserEnv:k4,hasStandardBrowserWebWorkerEnv:C4,navigator:Sh,origin:A4},Symbol.toStringTag,{value:"Module"})),...S4};function R4(e,t){return Sc(e,new sn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return sn.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function N4(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function O4(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function ob(e){function t(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=a>=n.length;return o=!o&&z.isArray(i)?i.length:o,l?(z.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!z.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&z.isArray(i[o])&&(i[o]=O4(i[o])),!s)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,i)=>{t(N4(r),i,n,0)}),n}return null}function P4(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Gs={transitional:ab,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=z.isObject(t);if(a&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return i?JSON.stringify(ob(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return R4(t,this.formSerializer).toString();if((s=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Sc(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),P4(t)):t}],transformResponse:[function(t){const n=this.transitional||Gs.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?ye.from(s,ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Gs.headers[e]={}});const I4=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),D4=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
17
|
+
*/var C6=y,A6=Symbol.for("react.element"),R6=Symbol.for("react.fragment"),N6=Object.prototype.hasOwnProperty,O6=C6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P6={key:!0,ref:!0,__self:!0,__source:!0};function Bv(e,t,n){var r,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)N6.call(t,r)&&!P6.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:A6,type:e,key:a,ref:o,props:i,_owner:O6.current}}wc.Fragment=R6,wc.jsx=Bv,wc.jsxs=Bv,Sv.exports=wc;var E=Sv.exports;const I6="@opencx/widget",wh="2.1.0",jv={name:I6,private:!1,version:wh,type:"module",publishConfig:{access:"public"},scripts:{clean:"rm -rf ./dist ./dist-embed","clean:dist":"rm -rf ./dist ./dist-embed",prepublishOnly:"pnpm clean && pnpm test && pnpm batman","build:lib":"vite build",dev:"vite -c vite.config.ts","build:embed":"vite build -c vite.embed.config.ts",test:"vitest run",batman:"pnpm build:lib && pnpm build:embed","test:watch":"vitest --watch",cs:"changeset",csv:"changeset version",csp:"changeset publish","type-check":"tsc --noEmit",lint:"biome lint --fix",format:"biome format --fix"},peerDependencies:{"lucide-react":"^0.412.0",react:"^18.3.1","rehype-raw":"^7.0.0"},peerDependenciesMeta:{react:{optional:!0}},optionalDependencies:{axios:"^1.7.5","socket.io-client":"^4.7.5",zod:"^3.23.8"},dependencies:{"@radix-ui/react-avatar":"^1.1.0","@radix-ui/react-dropdown-menu":"^2.1.4","@radix-ui/react-slot":"^1.1.0","@radix-ui/react-switch":"^1.1.0","@radix-ui/react-tooltip":"^1.1.2",clsx:"^2.1.1","date-fns":"^4.1.0","framer-motion":"^11.3.30","lodash.set":"^4.3.2","lucide-react":"^0.436.0",mutative:"^1.0.11","react-dropzone":"^14.3.5","react-hot-toast":"^2.4.1",tinycolor2:"^1.6.0",zod:"^3.23.8"},overrides:{"@opencx/widget":{react:{optional:!0,dependencies:{"react-hot-toast":"^2.4.1","react-markdown":"^9.0.1","framer-motion":"^11.3.30","date-fns":"^4.1.0"}}}},conditionalDependencies:{react:{"react-hot-toast":"^2.4.1","react-markdown":"^9.0.1","framer-motion":"^11.3.30","date-fns":"^4.1.0"}},files:["dist","dist-embed"],bugs:{url:"https://github.com/openchatai/widget/issues"},author:{name:"openchatai",url:"https://github.com/openchatai"},main:"./dist/index.js",module:"./dist/index.js",types:"./dist/index.d.ts",sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./basic":{types:"./dist/basic.d.ts",import:"./dist/basic.js",require:"./dist/basic.cjs"},"./react":{types:"./dist/react.d.ts",import:"./dist/react.js",require:"./dist/react.cjs"},"./package.json":"./package.json","./dist/*.css":"./dist/*.css"},devDependencies:{"@biomejs/biome":"1.9.4","@changesets/cli":"^2.27.9","@radix-ui/react-popover":"^1.1.2","@tailwindcss/typography":"^0.5.15","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.5.0","@testing-library/react":"^16.0.1","@types/lodash.debounce":"^4.0.9","@types/lodash.set":"^4.3.9","@types/node":"^20.14.8","@types/react":"^18.3.4","@types/react-dom":"^18.3.0","@types/tinycolor2":"^1.4.6","@uiw/react-iframe":"^1.0.3","@vitejs/plugin-react":"^4.3.4",autoprefixer:"^10.4.20",axios:"^1.7.5","class-variance-authority":"^0.7.0",jsdom:"^25.0.1",mutative:"^1.0.11",postcss:"^8.4.41","postcss-prefix-selector":"^1.16.1",react:"^18.3.1","react-dom":"^18.3.1","react-markdown":"^9.0.1","react-use":"^17.5.1","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","socket.io-client":"^4.7.5",swr:"^2.2.5","tailwind-merge":"^2.4.0",tailwindcss:"^3.4.6","tailwindcss-animate":"^1.0.7",typescript:"^5.5.4",vite:"^5.4.2","vite-plugin-dts":"4.0.3","vite-plugin-externalize-deps":"^0.8.0","vite-tsconfig-paths":"^5.0.1",vitest:"^2.0.5"}},D6=typeof window>"u",zv={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function L6(e){return D6?zv:e==="local"?localStorage:e==="session"?sessionStorage:zv}function yh(e,t,n="session"){const r=y.useMemo(()=>L6(n),[n]),[i,a]=y.useState(()=>{const l=r.getItem(e);if(l!==null)try{return JSON.parse(l)}catch(u){console.error(`Error parsing stored value for key '${e}':`,u)}return typeof t=="function"?t():t??null}),o=y.useCallback(l=>{if(a(l),l===null)r.removeItem(e);else try{r.setItem(e,JSON.stringify(l))}catch(u){console.error(`Error saving state to storage for key '${e}':`,u)}},[e,r]),s=y.useCallback(()=>{a(null),r.removeItem(e)},[e,r]);return y.useEffect(()=>{const l=u=>{u.key===e&&u.newValue!==JSON.stringify(i)&&a(u.newValue?JSON.parse(u.newValue):null)};return window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}},[e,i]),[i,o,s]}function Uv(e,t){return function(){return e.apply(t,arguments)}}const{toString:M6}=Object.prototype,{getPrototypeOf:vh}=Object,xc=(e=>t=>{const n=M6.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jn=e=>(e=e.toLowerCase(),t=>xc(t)===e),Ec=e=>t=>typeof t===e,{isArray:mo}=Array,Ys=Ec("undefined");function F6(e){return e!==null&&!Ys(e)&&e.constructor!==null&&!Ys(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hv=Jn("ArrayBuffer");function B6(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hv(e.buffer),t}const j6=Ec("string"),bn=Ec("function"),Vv=Ec("number"),Tc=e=>e!==null&&typeof e=="object",z6=e=>e===!0||e===!1,_c=e=>{if(xc(e)!=="object")return!1;const t=vh(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},U6=Jn("Date"),H6=Jn("File"),V6=Jn("Blob"),$6=Jn("FileList"),W6=e=>Tc(e)&&bn(e.pipe),Y6=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bn(e.append)&&((t=xc(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},q6=Jn("URLSearchParams"),[G6,K6,X6,Q6]=["ReadableStream","Request","Response","Headers"].map(Jn),Z6=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),mo(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function $v(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const _a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wv=e=>!Ys(e)&&e!==_a;function bh(){const{caseless:e}=Wv(this)&&this||{},t={},n=(r,i)=>{const a=e&&$v(t,i)||i;_c(t[a])&&_c(r)?t[a]=bh(t[a],r):_c(r)?t[a]=bh({},r):mo(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&qs(arguments[r],n);return t}const J6=(e,t,n,{allOwnKeys:r}={})=>(qs(t,(i,a)=>{n&&bn(i)?e[a]=Uv(i,n):e[a]=i},{allOwnKeys:r}),e),e4=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),t4=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},n4=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&vh(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},r4=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},i4=e=>{if(!e)return null;if(mo(e))return e;let t=e.length;if(!Vv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},a4=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vh(Uint8Array)),o4=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},s4=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},l4=Jn("HTMLFormElement"),u4=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Yv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),c4=Jn("RegExp"),qv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};qs(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},d4=e=>{qv(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},f4=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return mo(e)?r(e):r(String(e).split(t)),n},p4=()=>{},h4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,xh="abcdefghijklmnopqrstuvwxyz",Gv="0123456789",Kv={DIGIT:Gv,ALPHA:xh,ALPHA_DIGIT:xh+xh.toUpperCase()+Gv},m4=(e=16,t=Kv.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function g4(e){return!!(e&&bn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const w4=e=>{const t=new Array(10),n=(r,i)=>{if(Tc(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=mo(r)?[]:{};return qs(r,(o,s)=>{const l=n(o,i+1);!Ys(l)&&(a[s]=l)}),t[i]=void 0,a}}return r};return n(e,0)},y4=Jn("AsyncFunction"),v4=e=>e&&(Tc(e)||bn(e))&&bn(e.then)&&bn(e.catch),Xv=((e,t)=>e?setImmediate:t?((n,r)=>(_a.addEventListener("message",({source:i,data:a})=>{i===_a&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),_a.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(_a.postMessage)),b4=typeof queueMicrotask<"u"?queueMicrotask.bind(_a):typeof process<"u"&&process.nextTick||Xv,z={isArray:mo,isArrayBuffer:Hv,isBuffer:F6,isFormData:Y6,isArrayBufferView:B6,isString:j6,isNumber:Vv,isBoolean:z6,isObject:Tc,isPlainObject:_c,isReadableStream:G6,isRequest:K6,isResponse:X6,isHeaders:Q6,isUndefined:Ys,isDate:U6,isFile:H6,isBlob:V6,isRegExp:c4,isFunction:bn,isStream:W6,isURLSearchParams:q6,isTypedArray:a4,isFileList:$6,forEach:qs,merge:bh,extend:J6,trim:Z6,stripBOM:e4,inherits:t4,toFlatObject:n4,kindOf:xc,kindOfTest:Jn,endsWith:r4,toArray:i4,forEachEntry:o4,matchAll:s4,isHTMLForm:l4,hasOwnProperty:Yv,hasOwnProp:Yv,reduceDescriptors:qv,freezeMethods:d4,toObjectSet:f4,toCamelCase:u4,noop:p4,toFiniteNumber:h4,findKey:$v,global:_a,isContextDefined:Wv,ALPHABET:Kv,generateString:m4,isSpecCompliantForm:g4,toJSONObject:w4,isAsyncFn:y4,isThenable:v4,setImmediate:Xv,asap:b4};function ye(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}z.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.status}}});const Qv=ye.prototype,Zv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zv[e]={value:e}}),Object.defineProperties(ye,Zv),Object.defineProperty(Qv,"isAxiosError",{value:!0}),ye.from=(e,t,n,r,i,a)=>{const o=Object.create(Qv);return z.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),ye.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const x4=null;function Eh(e){return z.isPlainObject(e)||z.isArray(e)}function Jv(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function eb(e,t,n){return e?e.concat(t).map(function(i,a){return i=Jv(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function E4(e){return z.isArray(e)&&!e.some(Eh)}const T4=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Sc(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,x){return!z.isUndefined(x[w])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(!l&&z.isBlob(g))throw new ye("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,w,x){let m=g;if(g&&!x&&typeof g=="object"){if(z.endsWith(w,"{}"))w=r?w:w.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&E4(g)||(z.isFileList(g)||z.endsWith(w,"[]"))&&(m=z.toArray(g)))return w=Jv(w),m.forEach(function(b,T){!(z.isUndefined(b)||b===null)&&t.append(o===!0?eb([w],T,a):o===null?w:w+"[]",u(b))}),!1}return Eh(g)?!0:(t.append(eb(x,w,a),u(g)),!1)}const d=[],f=Object.assign(T4,{defaultVisitor:c,convertValue:u,isVisitable:Eh});function p(g,w){if(!z.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+w.join("."));d.push(g),z.forEach(g,function(m,v){(!(z.isUndefined(m)||m===null)&&i.call(t,m,z.isString(v)?v.trim():v,w,f))===!0&&p(m,w?w.concat(v):[v])}),d.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return p(e),t}function tb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Th(e,t){this._pairs=[],e&&Sc(e,this,t)}const nb=Th.prototype;nb.append=function(t,n){this._pairs.push([t,n])},nb.toString=function(t){const n=t?function(r){return t.call(this,r,tb)}:tb;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rb(e,t,n){if(!t)return e;const r=n&&n.encode||_4,i=n&&n.serialize;let a;if(i?a=i(t,n):a=z.isURLSearchParams(t)?t.toString():new Th(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ib{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ab={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},S4={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Th,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},_h=typeof window<"u"&&typeof document<"u",Sh=typeof navigator=="object"&&navigator||void 0,k4=_h&&(!Sh||["ReactNative","NativeScript","NS"].indexOf(Sh.product)<0),C4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",A4=_h&&window.location.href||"http://localhost",sn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_h,hasStandardBrowserEnv:k4,hasStandardBrowserWebWorkerEnv:C4,navigator:Sh,origin:A4},Symbol.toStringTag,{value:"Module"})),...S4};function R4(e,t){return Sc(e,new sn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return sn.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function N4(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function O4(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function ob(e){function t(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=a>=n.length;return o=!o&&z.isArray(i)?i.length:o,l?(z.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!z.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&z.isArray(i[o])&&(i[o]=O4(i[o])),!s)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,i)=>{t(N4(r),i,n,0)}),n}return null}function P4(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Gs={transitional:ab,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=z.isObject(t);if(a&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return i?JSON.stringify(ob(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return R4(t,this.formSerializer).toString();if((s=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Sc(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),P4(t)):t}],transformResponse:[function(t){const n=this.transitional||Gs.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?ye.from(s,ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Gs.headers[e]={}});const I4=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),D4=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
18
18
|
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&I4[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},sb=Symbol("internals");function Ks(e){return e&&String(e).trim().toLowerCase()}function kc(e){return e===!1||e==null?e:z.isArray(e)?e.map(kc):String(e)}function L4(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const M4=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function kh(e,t,n,r,i){if(z.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function F4(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function B4(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class ln{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,l,u){const c=Ks(l);if(!c)throw new Error("header name must be a non-empty string");const d=z.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=kc(s))}const o=(s,l)=>z.forEach(s,(u,c)=>a(u,c,l));if(z.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(z.isString(t)&&(t=t.trim())&&!M4(t))o(D4(t),n);else if(z.isHeaders(t))for(const[s,l]of t.entries())a(l,s,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Ks(t),t){const r=z.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return L4(i);if(z.isFunction(n))return n.call(this,i,r);if(z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ks(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||kh(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Ks(o),o){const s=z.findKey(r,o);s&&(!n||kh(r,r[s],s,n))&&(delete r[s],i=!0)}}return z.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||kh(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return z.forEach(this,(i,a)=>{const o=z.findKey(r,a);if(o){n[o]=kc(i),delete n[a];return}const s=t?F4(a):String(a).trim();s!==a&&delete n[a],n[s]=kc(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
19
19
|
`)}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(i=>r.set(i)),r}static accessor(t){const r=(this[sb]=this[sb]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Ks(o);r[s]||(B4(i,o),r[s]=!0)}return z.isArray(t)?t.forEach(a):a(t),this}}ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(ln.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),z.freezeMethods(ln);function Ch(e,t){const n=this||Gs,r=t||n,i=ln.from(r.headers);let a=r.data;return z.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function lb(e){return!!(e&&e.__CANCEL__)}function go(e,t,n){ye.call(this,e??"canceled",ye.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(go,ye,{__CANCEL__:!0});function ub(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function j4(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function z4(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[a];o||(o=u),n[i]=l,r[i]=u;let d=a,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const p=c&&u-c;return p?Math.round(f*1e3/p):void 0}}function U4(e,t){let n=0,r=1e3/t,i,a;const o=(u,c=Date.now())=>{n=c,i=null,a&&(clearTimeout(a),a=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},r-d)))},()=>i&&o(i)]}const Cc=(e,t,n=3)=>{let r=0;const i=z4(50,250);return U4(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-r,u=i(l),c=o<=s;r=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},cb=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},db=e=>(...t)=>z.asap(()=>e(...t)),H4=sn.hasStandardBrowserEnv?function(){const t=sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{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 r=i(window.location.href),function(o){const s=z.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),V4=sn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];z.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),z.isString(r)&&o.push("path="+r),z.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.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 $4(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function W4(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function fb(e,t){return e&&!$4(t)?W4(e,t):t}const pb=e=>e instanceof ln?{...e}:e;function Sa(e,t){t=t||{};const n={};function r(u,c,d){return z.isPlainObject(u)&&z.isPlainObject(c)?z.merge.call({caseless:d},u,c):z.isPlainObject(c)?z.merge({},c):z.isArray(c)?c.slice():c}function i(u,c,d){if(z.isUndefined(c)){if(!z.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function a(u,c){if(!z.isUndefined(c))return r(void 0,c)}function o(u,c){if(z.isUndefined(c)){if(!z.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c)=>i(pb(u),pb(c),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||i,f=d(e[c],t[c],c);z.isUndefined(f)&&d!==s||(n[c]=f)}),n}const hb=e=>{const t=Sa({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=ln.from(o),t.url=rb(fb(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(z.isFormData(n)){if(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(sn.hasStandardBrowserEnv&&(r&&z.isFunction(r)&&(r=r(t)),r||r!==!1&&H4(t.url))){const u=i&&a&&V4.read(a);u&&o.set(i,u)}return t},Y4=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=hb(e);let a=i.data;const o=ln.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,p,g;function w(){p&&p(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function m(){if(!x)return;const b=ln.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),_={data:!s||s==="text"||s==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:b,config:e,request:x};ub(function(R){n(R),w()},function(R){r(R),w()},_),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 ye("Request aborted",ye.ECONNABORTED,e,x)),x=null)},x.onerror=function(){r(new ye("Network Error",ye.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||ab;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new ye(T,_.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,x)),x=null},a===void 0&&o.setContentType(null),"setRequestHeader"in x&&z.forEach(o.toJSON(),function(T,_){x.setRequestHeader(_,T)}),z.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),s&&s!=="json"&&(x.responseType=i.responseType),u&&([f,g]=Cc(u,!0),x.addEventListener("progress",f)),l&&x.upload&&([d,p]=Cc(l),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=b=>{x&&(r(!b||b.type?new go(null,e,x):b),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const v=j4(i.url);if(v&&sn.protocols.indexOf(v)===-1){r(new ye("Unsupported protocol "+v+":",ye.ERR_BAD_REQUEST,e));return}x.send(a||null)})},q4=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof ye?c:new go(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new ye(`timeout ${t} of ms exceeded`,ye.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=r;return l.unsubscribe=()=>z.asap(s),l}},G4=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},K4=async function*(e,t){for await(const n of X4(e))yield*G4(n,t)},X4=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()}},mb=(e,t,n,r)=>{const i=K4(e,t);let a=0,o,s=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let f=a+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},Ac=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",gb=Ac&&typeof ReadableStream=="function",Q4=Ac&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wb=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Z4=gb&&wb(()=>{let e=!1;const t=new Request(sn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),yb=64*1024,Ah=gb&&wb(()=>z.isReadableStream(new Response("").body)),Rc={stream:Ah&&(e=>e.body)};Ac&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Rc[t]&&(Rc[t]=z.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ye(`Response type '${t}' is not supported`,ye.ERR_NOT_SUPPORT,r)})})})(new Response);const J4=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(sn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(z.isArrayBufferView(e)||z.isArrayBuffer(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await Q4(e)).byteLength},e5=async(e,t)=>{const n=z.toFiniteNumber(e.getContentLength());return n??J4(t)},Rh={http:x4,xhr:Y4,fetch:Ac&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=hb(e);u=u?(u+"").toLowerCase():"text";let p=q4([i,a&&a.toAbortSignal()],o),g;const w=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let x;try{if(l&&Z4&&n!=="get"&&n!=="head"&&(x=await e5(c,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(z.isFormData(r)&&(S=_.headers.get("content-type"))&&c.setContentType(S),_.body){const[R,P]=cb(x,Cc(db(l)));r=mb(_.body,yb,R,P)}}z.isString(d)||(d=d?"include":"omit");const m="credentials"in Request.prototype;g=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:m?d:void 0});let v=await fetch(g);const b=Ah&&(u==="stream"||u==="response");if(Ah&&(s||b&&w)){const _={};["status","statusText","headers"].forEach(B=>{_[B]=v[B]});const S=z.toFiniteNumber(v.headers.get("content-length")),[R,P]=s&&cb(S,Cc(db(s),!0))||[];v=new Response(mb(v.body,yb,R,()=>{P&&P(),w&&w()}),_)}u=u||"text";let T=await Rc[z.findKey(Rc,u)||"text"](v,e);return!b&&w&&w(),await new Promise((_,S)=>{ub(_,S,{data:T,headers:ln.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:g})})}catch(m){throw w&&w(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,e,g),{cause:m.cause||m}):ye.from(m,m&&m.code,e,g)}})};z.forEach(Rh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const vb=e=>`- ${e}`,t5=e=>z.isFunction(e)||e===null||e===!1,bb={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let o;if(r=n,!t5(n)&&(r=Rh[(o=String(n)).toLowerCase()],r===void 0))throw new ye(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+a]=r}if(!r){const a=Object.entries(i).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
|
|
20
20
|
`+a.map(vb).join(`
|
|
@@ -472,5 +472,5 @@ html, body {
|
|
|
472
472
|
</head>
|
|
473
473
|
<body>
|
|
474
474
|
</body>
|
|
475
|
-
</html>`;function qoe({className:e,...t}){const n=Ao(),{theme:r}=Bt(),[i,a]=y.useState(!1);return E.jsxs(joe,{open:i,onOpenChange:a,children:[E.jsx("style",{children:o6}),E.jsx(zoe,{onInteractOutside:o=>o.preventDefault(),side:"top",forceMount:!0,style:{zIndex:1e6,fontSize:"16px"},sideOffset:8,"data-chat-widget":!0,"data-chat-widget-content-root":!0,align:"end",asChild:!0,children:E.jsx(vi.div,{animate:i?"visible":"hidden",initial:"hidden",variants:{hidden:{opacity:0,y:8,transitionEnd:{display:"none"},transition:{duration:.15}},visible:{opacity:1,y:0,display:"block"}},children:E.jsx(a6,{initialContent:Yoe,allowFullScreen:!0,"data-chat-widget":!0,style:{maxHeight:"85dvh",width:"350px",minHeight:A1.widgetMinHeight,height:"var(--opencx-widget-height)",overflow:"hidden",outline:"1px solid",outlineColor:"hsl(240 10% 3.9% / 0.2)",borderRadius:"32px",boxShadow:"0 25px 50px -12px rgb(0 0 0 / 0.25)",transitionProperty:"height",transitionTimingFunction:"ease-out",transitionDuration:"150ms"},children:E.jsx(ij,{delayDuration:200,disableHoverableContent:!0,children:E.jsx("div",{style:{display:"contents",...WN({primary:r.primaryColor},{triggerOffset:r.triggerOffset})},"data-chat-widget":!0,children:E.jsx("div",{...t,"data-version":n.version,"data-chat-widget":!0,className:He("antialiased font-inter size-full overflow-hidden isolate relative text-secondary-foreground",e),children:E.jsx(Qae,{})})})})})})}),E.jsx(Woe,{isOpen:i})]})}function Goe({options:e}){return E.jsx(JM,{options:{...e,components:[{key:"LOADING",component:pJ},{key:"FALLBACK",component:hJ},{key:"TEXT",component:zG}]},children:E.jsx(qoe,{})})}var s6,l6=is;s6=l6.createRoot,l6.hydrateRoot;function Koe(e,t){let n=document.getElementById(e);return n||(n=document.createElement("div"),n.id=e,n.setAttribute("data-chat-widget",""),document.body.appendChild(n)),s6(n).render(t)}const Xoe="
|
|
475
|
+
</html>`;function qoe({className:e,...t}){const n=Ao(),{theme:r}=Bt(),[i,a]=y.useState(!1);return E.jsxs(joe,{open:i,onOpenChange:a,children:[E.jsx("style",{children:o6}),E.jsx(zoe,{onInteractOutside:o=>o.preventDefault(),side:"top",forceMount:!0,style:{zIndex:1e6,fontSize:"16px"},sideOffset:8,"data-chat-widget":!0,"data-chat-widget-content-root":!0,align:"end",asChild:!0,children:E.jsx(vi.div,{animate:i?"visible":"hidden",initial:"hidden",variants:{hidden:{opacity:0,y:8,transitionEnd:{display:"none"},transition:{duration:.15}},visible:{opacity:1,y:0,display:"block"}},children:E.jsx(a6,{initialContent:Yoe,allowFullScreen:!0,"data-chat-widget":!0,style:{maxHeight:"85dvh",width:"350px",minHeight:A1.widgetMinHeight,height:"var(--opencx-widget-height)",overflow:"hidden",outline:"1px solid",outlineColor:"hsl(240 10% 3.9% / 0.2)",borderRadius:"32px",boxShadow:"0 25px 50px -12px rgb(0 0 0 / 0.25)",transitionProperty:"height",transitionTimingFunction:"ease-out",transitionDuration:"150ms"},children:E.jsx(ij,{delayDuration:200,disableHoverableContent:!0,children:E.jsx("div",{style:{display:"contents",...WN({primary:r.primaryColor},{triggerOffset:r.triggerOffset})},"data-chat-widget":!0,children:E.jsx("div",{...t,"data-version":n.version,"data-chat-widget":!0,className:He("antialiased font-inter size-full overflow-hidden isolate relative text-secondary-foreground",e),children:E.jsx(Qae,{})})})})})})}),E.jsx(Woe,{isOpen:i})]})}function Goe({options:e}){return E.jsx(JM,{options:{...e,components:[{key:"LOADING",component:pJ},{key:"FALLBACK",component:hJ},{key:"TEXT",component:zG}]},children:E.jsx(qoe,{})})}var s6,l6=is;s6=l6.createRoot,l6.hydrateRoot;function Koe(e,t){let n=document.getElementById(e);return n||(n=document.createElement("div"),n.id=e,n.setAttribute("data-chat-widget",""),document.body.appendChild(n)),s6(n).render(t)}const Xoe="opencx-root";function Qoe(e){Koe(Xoe,E.jsx(Goe,{options:e}))}window.initOpenScript=Qoe,window.openCXWidgetVersion=wh})();
|
|
476
476
|
//# sourceMappingURL=script.js.map
|