@vizbl/room-viewer 0.0.10 → 0.0.11
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.
|
@@ -1035,4 +1035,4 @@ No matching component was found for:
|
|
|
1035
1035
|
|
|
1036
1036
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1037
1037
|
|
|
1038
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return tC.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},kA=({contentRef:e,descriptionId:t})=>{let r=kg("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return tC.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null};function kb({...e}){return(0,t_.jsx)(R2,{"data-slot":"dialog",...e})}function ky({...e}){return(0,t_.jsx)(R6,{"data-slot":"dialog-portal",...e})}function kw({...e}){return(0,t_.jsx)(kh,{"data-slot":"dialog-close",...e})}function kx({className:e,...t}){return(0,t_.jsx)(R7,{"data-slot":"dialog-overlay",className:BR("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function kC({className:e,children:t,showCloseButton:r=!0,portalContainer:n,...i}){return(0,t_.jsxs)(ky,{"data-slot":"dialog-portal",container:n,children:[(0,t_.jsx)(kx,{}),(0,t_.jsxs)(kn,{"data-slot":"dialog-content",className:BR("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...i,children:[t,r&&(0,t_.jsxs)(kh,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,t_.jsx)(ne,{}),(0,t_.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function kE({className:e,...t}){return(0,t_.jsx)("div",{"data-slot":"dialog-header",className:BR("flex flex-col gap-2 text-center sm:text-left",e),...t})}function kS({className:e,...t}){return(0,t_.jsx)(kl,{"data-slot":"dialog-title",className:BR("text-lg leading-none font-semibold",e),...t})}function k_({className:e,...t}){return(0,t_.jsx)(kc,{"data-slot":"dialog-description",className:BR("text-muted-foreground text-sm",e),...t})}let kM=(0,tC.createContext)({theme:"system",setTheme:()=>null});function kI({children:e,defaultTheme:t="system",storageKey:r="vizbl-theme",root:n=window.document.documentElement,enableStorage:i=!1,...a}){let[s,o]=(0,tC.useState)(()=>i&&localStorage.getItem(r)||t);return(0,tC.useEffect)(()=>{if(n.classList.remove("light","dark"),"system"===s){let e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n.classList.add(e);return}n.classList.add(s)},[s,n]),(0,t_.jsx)(kM,{...a,value:{theme:s,setTheme:e=>{i&&localStorage.setItem(r,e),o(e)}},children:e})}function kT(e,t){return function(){return e.apply(t,arguments)}}let{toString:kB}=Object.prototype,{getPrototypeOf:kR}=Object,{iterator:kk,toStringTag:kP}=Symbol,kD=(eo=Object.create(null),e=>{let t=kB.call(e);return eo[t]||(eo[t]=t.slice(8,-1).toLowerCase())}),kL=e=>(e=e.toLowerCase(),t=>kD(t)===e),kz=e=>t=>typeof t===e,{isArray:kF}=Array,kN=kz("undefined");function kO(e){return null!==e&&!kN(e)&&null!==e.constructor&&!kN(e.constructor)&&kG(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let kU=kL("ArrayBuffer"),kQ=kz("string"),kG=kz("function"),kH=kz("number"),kj=e=>null!==e&&"object"==typeof e,kV=e=>{if("object"!==kD(e))return!1;let t=kR(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(kP in e)&&!(kk in e)},kW=kL("Date"),kq=kL("File"),kX=kL("Blob"),kJ=kL("FileList"),kK=kL("URLSearchParams"),[kY,k$,kZ,k0]=["ReadableStream","Request","Response","Headers"].map(kL);function k1(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),kF(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(kO(e))return;let a=r?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;for(n=0;n<s;n++)i=a[n],t.call(null,e[i],i,e)}}function k2(e,t){let r;if(kO(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let k3="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,k4=e=>!kN(e)&&e!==k3,k5=(el="undefined"!=typeof Uint8Array&&kR(Uint8Array),e=>el&&e instanceof el),k8=kL("HTMLFormElement"),k6=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),k9=kL("RegExp"),k7=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};k1(r,(r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)}),Object.defineProperties(e,n)},Pe=kL("AsyncFunction"),Pt=(ev="function"==typeof setImmediate,eA=kG(k3.postMessage),ev?setImmediate:eA?(eb=`axios@${Math.random()}`,ey=[],k3.addEventListener("message",({source:e,data:t})=>{e===k3&&t===eb&&ey.length&&ey.shift()()},!1),e=>{ey.push(e),k3.postMessage(eb,"*")}):e=>setTimeout(e)),Pr="undefined"!=typeof queueMicrotask?queueMicrotask.bind(k3):"undefined"!=typeof process&&process.nextTick||Pt,Pn={isArray:kF,isArrayBuffer:kU,isBuffer:kO,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||kG(e.append)&&("formdata"===(t=kD(e))||"object"===t&&kG(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&kU(e.buffer)},isString:kQ,isNumber:kH,isBoolean:e=>!0===e||!1===e,isObject:kj,isPlainObject:kV,isEmptyObject:e=>{if(!kj(e)||kO(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:kY,isRequest:k$,isResponse:kZ,isHeaders:k0,isUndefined:kN,isDate:kW,isFile:kq,isBlob:kX,isRegExp:k9,isFunction:kG,isStream:e=>kj(e)&&kG(e.pipe),isURLSearchParams:kK,isTypedArray:k5,isFileList:kJ,forEach:k1,merge:function e(){let{caseless:t,skipUndefined:r}=k4(this)&&this||{},n={},i=(i,a)=>{let s=t&&k2(n,a)||a;kV(n[s])&&kV(i)?n[s]=e(n[s],i):kV(i)?n[s]=e({},i):kF(i)?n[s]=i.slice():r&&kN(i)||(n[s]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k1(arguments[e],i);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(k1(t,(t,n)=>{r&&kG(t)?e[n]=kT(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,a,s,o={};if(t=t||{},null==e)return t;do{for(a=(i=Object.getOwnPropertyNames(e)).length;a-- >0;)s=i[a],(!n||n(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=!1!==r&&kR(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:kD,kindOfTest:kL,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(kF(e))return e;let t=e.length;if(!kH(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[kk]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:k8,hasOwnProperty:k6,hasOwnProp:k6,reduceDescriptors:k7,freezeMethods:e=>{k7(e,(t,r)=>{if(kG(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(kG(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(kF(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:k2,global:k3,isContextDefined:k4,isSpecCompliantForm:function(e){return!!(e&&kG(e.append)&&"FormData"===e[kP]&&e[kk])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(kj(e)){if(t.indexOf(e)>=0)return;if(kO(e))return e;if(!("toJSON"in e)){t[n]=e;let i=kF(e)?[]:{};return k1(e,(e,t)=>{let a=r(e,n+1);kN(a)||(i[t]=a)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:Pe,isThenable:e=>e&&(kj(e)||kG(e))&&kG(e.then)&&kG(e.catch),setImmediate:Pt,asap:Pr,isIterable:e=>null!=e&&kG(e[kk])};function Pi(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}Pn.inherits(Pi,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:Pn.toJSONObject(this.config),code:this.code,status:this.status}}});let Pa=Pi.prototype,Ps={};function Po(e){return Pn.isPlainObject(e)||Pn.isArray(e)}function Pl(e){return Pn.endsWith(e,"[]")?e.slice(0,-2):e}function Pu(e,t,r){return e?e.concat(t).map(function(e,t){return e=Pl(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}["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=>{Ps[e]={value:e}}),Object.defineProperties(Pi,Ps),Object.defineProperty(Pa,"isAxiosError",{value:!0}),Pi.from=(e,t,r,n,i,a)=>{let s=Object.create(Pa);Pn.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);let o=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Pi.call(s,o,l,r,n,i),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};let Pc=Pn.toFlatObject(Pn,{},null,function(e){return/^is[A-Z]/.test(e)}),Pd=function(e,t,r){if(!Pn.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=Pn.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Pn.isUndefined(t[e])})).metaTokens,i=r.visitor||u,a=r.dots,s=r.indexes,o=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Pn.isSpecCompliantForm(t);if(!Pn.isFunction(i))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Pn.isDate(e))return e.toISOString();if(Pn.isBoolean(e))return e.toString();if(!o&&Pn.isBlob(e))throw new Pi("Blob is not supported. Use a Buffer instead.");return Pn.isArrayBuffer(e)||Pn.isTypedArray(e)?o&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,i){let o=e;if(e&&!i&&"object"==typeof e)if(Pn.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var u;if(Pn.isArray(e)&&(u=e,Pn.isArray(u)&&!u.some(Po))||(Pn.isFileList(e)||Pn.endsWith(r,"[]"))&&(o=Pn.toArray(e)))return r=Pl(r),o.forEach(function(e,n){Pn.isUndefined(e)||null===e||t.append(!0===s?Pu([r],n,a):null===s?r:r+"[]",l(e))}),!1}return!!Po(e)||(t.append(Pu(i,r,a),l(e)),!1)}let c=[],d=Object.assign(Pc,{defaultVisitor:u,convertValue:l,isVisitable:Po});if(!Pn.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!Pn.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),Pn.forEach(r,function(r,a){!0===(!(Pn.isUndefined(r)||null===r)&&i.call(t,r,Pn.isString(a)?a.trim():a,n,d))&&e(r,n?n.concat(a):[a])}),c.pop()}}(e),t};function Ph(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Pp(e,t){this._pairs=[],e&&Pd(e,this,t)}let Pf=Pp.prototype;function Pm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pg(e,t,r){let n;if(!t)return e;let i=r&&r.encode||Pm;Pn.isFunction(r)&&(r={serialize:r});let a=r&&r.serialize;if(n=a?a(t,r):Pn.isURLSearchParams(t)?t.toString():new Pp(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}Pf.append=function(e,t){this._pairs.push([e,t])},Pf.toString=function(e){let t=e?function(t){return e.call(this,t,Ph)}:Ph;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let Pv=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Pn.forEach(this.handlers,function(t){null!==t&&e(t)})}},PA={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pb="undefined"!=typeof URLSearchParams?URLSearchParams:Pp,Py="undefined"!=typeof FormData?FormData:null,Pw="undefined"!=typeof Blob?Blob:null,Px="undefined"!=typeof window&&"undefined"!=typeof document,PC="object"==typeof navigator&&navigator||void 0,PE=Px&&(!PC||0>["ReactNative","NativeScript","NS"].indexOf(PC.product)),PS="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,P_=Px&&window.location.href||"http://localhost",PM={...TE,isBrowser:!0,classes:{URLSearchParams:Pb,FormData:Py,Blob:Pw},protocols:["http","https","file","blob","url","data"]},PI=function(e){if(Pn.isFormData(e)&&Pn.isFunction(e.entries)){let t={};return Pn.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){let a=t[i++];if("__proto__"===a)return!0;let s=Number.isFinite(+a),o=i>=t.length;return(a=!a&&Pn.isArray(n)?n.length:a,o)?Pn.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r:(n[a]&&Pn.isObject(n[a])||(n[a]=[]),e(t,r,n[a],i)&&Pn.isArray(n[a])&&(n[a]=function(e){let t,r,n={},i=Object.keys(e),a=i.length;for(t=0;t<a;t++)n[r=i[t]]=e[r];return n}(n[a]))),!s}(Pn.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null},PT={transitional:PA,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=Pn.isObject(e);if(a&&Pn.isHTMLForm(e)&&(e=new FormData(e)),Pn.isFormData(e))return i?JSON.stringify(PI(e)):e;if(Pn.isArrayBuffer(e)||Pn.isBuffer(e)||Pn.isStream(e)||Pn.isFile(e)||Pn.isBlob(e)||Pn.isReadableStream(e))return e;if(Pn.isArrayBufferView(e))return e.buffer;if(Pn.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1){var s,o;return(s=e,o=this.formSerializer,Pd(s,new PM.classes.URLSearchParams,{visitor:function(e,t,r,n){return PM.isNode&&Pn.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...o})).toString()}if((r=Pn.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return Pd(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||i){t.setContentType("application/json",!1);var l=e;if(Pn.isString(l))try{return(0,JSON.parse)(l),Pn.trim(l)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(l)}return e}],transformResponse:[function(e){let t=this.transitional||PT.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Pn.isResponse(e)||Pn.isReadableStream(e))return e;if(e&&Pn.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,this.parseReviver)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw Pi.from(e,Pi.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:PM.classes.FormData,Blob:PM.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Pn.forEach(["delete","get","head","post","put","patch"],e=>{PT.headers[e]={}});let PB=Pn.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"]),PR=Symbol("internals");function Pk(e){return e&&String(e).trim().toLowerCase()}function PP(e){return!1===e||null==e?e:Pn.isArray(e)?e.map(PP):String(e)}function PD(e,t,r,n,i){if(Pn.isFunction(n))return n.call(this,t,r);if(i&&(t=r),Pn.isString(t)){if(Pn.isString(n))return -1!==t.indexOf(n);if(Pn.isRegExp(n))return n.test(t)}}tA=Symbol.iterator,tb=Symbol.toStringTag;class PL{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=Pk(t);if(!i)throw Error("header name must be a non-empty string");let a=Pn.findKey(n,i);a&&void 0!==n[a]&&!0!==r&&(void 0!==r||!1===n[a])||(n[a||t]=PP(e))}let a=(e,t)=>Pn.forEach(e,(e,r)=>i(e,r,t));if(Pn.isPlainObject(e)||e instanceof this.constructor)a(e,t);else{let n;if(Pn.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var s;let r,n,i,o;a((o={},(s=e)&&s.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||o[r]&&PB[r]||("set-cookie"===r?o[r]?o[r].push(n):o[r]=[n]:o[r]=o[r]?o[r]+", "+n:n)}),o),t)}else if(Pn.isObject(e)&&Pn.isIterable(e)){let r={},n,i;for(let t of e){if(!Pn.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?Pn.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=Pk(e)){let r=Pn.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(Pn.isFunction(t))return t.call(this,e,r);if(Pn.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Pk(e)){let r=Pn.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||PD(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=Pk(e)){let i=Pn.findKey(r,e);i&&(!t||PD(r,r[i],i,t))&&(delete r[i],n=!0)}}return Pn.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||PD(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return Pn.forEach(this,(n,i)=>{let a=Pn.findKey(r,i);if(a){t[a]=PP(n),delete t[i];return}let s=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();s!==i&&delete t[i],t[s]=PP(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return Pn.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Pn.isArray(r)?r.join(", "):r)}),t}[tA](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[tb](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[PR]=this[PR]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=Pk(e);if(!t[n]){let i;i=Pn.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return Pn.isArray(e)?e.forEach(n):n(e),this}}function Pz(e,t){let r=this||PT,n=t||r,i=PL.from(n.headers),a=n.data;return Pn.forEach(e,function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function PF(e){return!!(e&&e.__CANCEL__)}function PN(e,t,r){Pi.call(this,null==e?"canceled":e,Pi.ERR_CANCELED,t,r),this.name="CanceledError"}function PO(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Pi("Request failed with status code "+r.status,[Pi.ERR_BAD_REQUEST,Pi.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}PL.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Pn.reduceDescriptors(PL.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Pn.freezeMethods(PL),Pn.inherits(PN,Pi,{__CANCEL__:!0});let PU=function(e,t){let r,n=Array(e=e||10),i=Array(e),a=0,s=0;return t=void 0!==t?t:1e3,function(o){let l=Date.now(),u=i[s];r||(r=l),n[a]=o,i[a]=l;let c=s,d=0;for(;c!==a;)d+=n[c++],c%=e;if((a=(a+1)%e)===s&&(s=(s+1)%e),l-r<t)return;let h=u&&l-u;return h?Math.round(1e3*d/h):void 0}},PQ=function(e,t){let r,n,i=0,a=1e3/t,s=(t,a=Date.now())=>{i=a,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),o=t-i;o>=a?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},a-o)))},()=>r&&s(r)]},PG=(e,t,r=3)=>{let n=0,i=PU(50,250);return PQ(r=>{let a=r.loaded,s=r.lengthComputable?r.total:void 0,o=a-n,l=i(o);n=a,e({loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&a<=s?(s-a)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},PH=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Pj=e=>(...t)=>Pn.asap(()=>e(...t)),PV=PM.hasStandardBrowserEnv?(eu=new URL(PM.origin),ec=PM.navigator&&/(msie|trident)/i.test(PM.navigator.userAgent),e=>(e=new URL(e,PM.origin),eu.protocol===e.protocol&&eu.host===e.host&&(ec||eu.port===e.port))):()=>!0,PW=PM.hasStandardBrowserEnv?{write(e,t,r,n,i,a,s){if("undefined"==typeof document)return;let o=[`${e}=${encodeURIComponent(t)}`];Pn.isNumber(r)&&o.push(`expires=${new Date(r).toUTCString()}`),Pn.isString(n)&&o.push(`path=${n}`),Pn.isString(i)&&o.push(`domain=${i}`),!0===a&&o.push("secure"),Pn.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if("undefined"==typeof document)return null;let t=document.cookie.match(RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Pq(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let PX=e=>e instanceof PL?{...e}:e;function PJ(e,t){t=t||{};let r={};function n(e,t,r,n){return Pn.isPlainObject(e)&&Pn.isPlainObject(t)?Pn.merge.call({caseless:n},e,t):Pn.isPlainObject(t)?Pn.merge({},t):Pn.isArray(t)?t.slice():t}function i(e,t,r,i){return Pn.isUndefined(t)?Pn.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function a(e,t){if(!Pn.isUndefined(t))return n(void 0,t)}function s(e,t){return Pn.isUndefined(t)?Pn.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function o(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}let l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(e,t,r)=>i(PX(e),PX(t),r,!0)};return Pn.forEach(Object.keys({...e,...t}),function(n){let a=l[n]||i,s=a(e[n],t[n],n);Pn.isUndefined(s)&&a!==o||(r[n]=s)}),r}let PK=e=>{let t=PJ({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:o}=t;if(t.headers=s=PL.from(s),t.url=Pg(Pq(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),Pn.isFormData(r)){if(PM.hasStandardBrowserEnv||PM.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Pn.isFunction(r.getHeaders)){let e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}}if(PM.hasStandardBrowserEnv&&(n&&Pn.isFunction(n)&&(n=n(t)),n||!1!==n&&PV(t.url))){let e=i&&a&&PW.read(a);e&&s.set(i,e)}return t},PY="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n;let i,a,s,o,l,u,c=PK(e),d=c.data,h=PL.from(c.headers).normalize(),{responseType:p,onUploadProgress:f,onDownloadProgress:m}=c;function g(){o&&o(),l&&l(),c.cancelToken&&c.cancelToken.unsubscribe(i),c.signal&&c.signal.removeEventListener("abort",i)}let v=new XMLHttpRequest;function A(){if(!v)return;let n=PL.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());PO(function(e){t(e),g()},function(e){r(e),g()},{data:p&&"text"!==p&&"json"!==p?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}v.open(c.method.toUpperCase(),c.url,!0),v.timeout=c.timeout,"onloadend"in v?v.onloadend=A:v.onreadystatechange=function(){!v||4!==v.readyState||(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(A)},v.onabort=function(){v&&(r(new Pi("Request aborted",Pi.ECONNABORTED,e,v)),v=null)},v.onerror=function(t){let n=new Pi(t&&t.message?t.message:"Network Error",Pi.ERR_NETWORK,e,v);n.event=t||null,r(n),v=null},v.ontimeout=function(){let t=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",n=c.transitional||PA;c.timeoutErrorMessage&&(t=c.timeoutErrorMessage),r(new Pi(t,n.clarifyTimeoutError?Pi.ETIMEDOUT:Pi.ECONNABORTED,e,v)),v=null},void 0===d&&h.setContentType(null),"setRequestHeader"in v&&Pn.forEach(h.toJSON(),function(e,t){v.setRequestHeader(t,e)}),Pn.isUndefined(c.withCredentials)||(v.withCredentials=!!c.withCredentials),p&&"json"!==p&&(v.responseType=c.responseType),m&&([s,l]=PG(m,!0),v.addEventListener("progress",s)),f&&v.upload&&([a,o]=PG(f),v.upload.addEventListener("progress",a),v.upload.addEventListener("loadend",o)),(c.cancelToken||c.signal)&&(i=t=>{v&&(r(!t||t.type?new PN(null,e,v):t),v.abort(),v=null)},c.cancelToken&&c.cancelToken.subscribe(i),c.signal&&(c.signal.aborted?i():c.signal.addEventListener("abort",i)));let b=(n=c.url,(u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n))&&u[1]||"");b&&-1===PM.protocols.indexOf(b)?r(new Pi("Unsupported protocol "+b+":",Pi.ERR_BAD_REQUEST,e)):v.send(d||null)})},P$=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},PZ=async function*(e,t){for await(let r of P0(e))yield*P$(r,t)},P0=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},P1=(e,t,r,n)=>{let i,a=PZ(e,t),s=0,o=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await a.next();if(t){o(),e.close();return}let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw o(e),e}},cancel:e=>(o(e),a.return())},{highWaterMark:2})},{isFunction:P2}=Pn,P3=(({Request:e,Response:t})=>({Request:e,Response:t}))(Pn.global),{ReadableStream:P4,TextEncoder:P5}=Pn.global,P8=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},P6=e=>{let t,{fetch:r,Request:n,Response:i}=e=Pn.merge.call({skipUndefined:!0},P3,e),a=r?P2(r):"function"==typeof fetch,s=P2(n),o=P2(i);if(!a)return!1;let l=a&&P2(P4),u=a&&("function"==typeof P5?(t=new P5,e=>t.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer())),c=s&&l&&P8(()=>{let e=!1,t=new n(PM.origin,{body:new P4,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=o&&l&&P8(()=>Pn.isReadableStream(new i("").body)),h={stream:d&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{h[e]||(h[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Pi(`Response type '${e}' is not supported`,Pi.ERR_NOT_SUPPORT,r)})});let p=async e=>{if(null==e)return 0;if(Pn.isBlob(e))return e.size;if(Pn.isSpecCompliantForm(e)){let t=new n(PM.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Pn.isArrayBufferView(e)||Pn.isArrayBuffer(e)?e.byteLength:(Pn.isURLSearchParams(e)&&(e+=""),Pn.isString(e))?(await u(e)).byteLength:void 0},f=async(e,t)=>{let r=Pn.toFiniteNumber(e.getContentLength());return null==r?p(t):r};return async e=>{let t,{url:a,method:o,data:l,signal:u,cancelToken:p,timeout:m,onDownloadProgress:g,onUploadProgress:v,responseType:A,headers:b,withCredentials:y="same-origin",fetchOptions:w}=PK(e),x=r||fetch;A=A?(A+"").toLowerCase():"text";let C=((e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,s();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Pi?t:new PN(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Pi(`timeout ${t} of ms exceeded`,Pi.ETIMEDOUT))},t),s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:o}=n;return o.unsubscribe=()=>Pn.asap(s),o}})([u,p&&p.toAbortSignal()],m),E=null,S=C&&C.unsubscribe&&(()=>{C.unsubscribe()});try{if(v&&c&&"get"!==o&&"head"!==o&&0!==(t=await f(b,l))){let e,r=new n(a,{method:"POST",body:l,duplex:"half"});if(Pn.isFormData(l)&&(e=r.headers.get("content-type"))&&b.setContentType(e),r.body){let[e,n]=PH(t,PG(Pj(v)));l=P1(r.body,65536,e,n)}}Pn.isString(y)||(y=y?"include":"omit");let r=s&&"credentials"in n.prototype,u={...w,signal:C,method:o.toUpperCase(),headers:b.normalize().toJSON(),body:l,duplex:"half",credentials:r?y:void 0};E=s&&new n(a,u);let p=await (s?x(E,w):x(a,u)),m=d&&("stream"===A||"response"===A);if(d&&(g||m&&S)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});let t=Pn.toFiniteNumber(p.headers.get("content-length")),[r,n]=g&&PH(t,PG(Pj(g),!0))||[];p=new i(P1(p.body,65536,r,()=>{n&&n(),S&&S()}),e)}A=A||"text";let _=await h[Pn.findKey(h,A)||"text"](p,e);return!m&&S&&S(),await new Promise((t,r)=>{PO(t,r,{data:_,headers:PL.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:E})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Pi("Network Error",Pi.ERR_NETWORK,e,E),{cause:t.cause||t});throw Pi.from(t,t&&t.code,e,E)}}},P9=new Map,P7=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,a=[n,i,r],s=a.length,o,l,u=P9;for(;s--;)o=a[s],void 0===(l=u.get(o))&&u.set(o,l=s?new Map:P6(t)),u=l;return l};P7();let De={http:null,xhr:PY,fetch:{get:P7}};Pn.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let Dt=e=>`- ${e}`,Dr=e=>Pn.isFunction(e)||null===e||!1===e,Dn=function(e,t){let r,n,{length:i}=e=Pn.isArray(e)?e:[e],a={};for(let s=0;s<i;s++){let i;if(n=r=e[s],!Dr(r)&&void 0===(n=De[(i=String(r)).toLowerCase()]))throw new Pi(`Unknown adapter '${i}'`);if(n&&(Pn.isFunction(n)||(n=n.get(t))))break;a[i||"#"+s]=n}if(!n){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Pi("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(Dt).join("\n"):" "+Dt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Di(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new PN(null,e)}function Da(e){return Di(e),e.headers=PL.from(e.headers),e.data=Pz.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dn(e.adapter||PT.adapter,e)(e).then(function(t){return Di(e),t.data=Pz.call(e,e.transformResponse,t),t.headers=PL.from(t.headers),t},function(t){return!PF(t)&&(Di(e),t&&t.response&&(t.response.data=Pz.call(e,e.transformResponse,t.response),t.response.headers=PL.from(t.response.headers))),Promise.reject(t)})}let Ds={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ds[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let Do={};Ds.transitional=function(e,t,r){function n(e,t){return"[Axios v1.13.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>{if(!1===e)throw new Pi(n(i," has been removed"+(t?" in "+t:"")),Pi.ERR_DEPRECATED);return t&&!Do[i]&&(Do[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}},Ds.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let Dl=function(e,t,r){if("object"!=typeof e)throw new Pi("options must be an object",Pi.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let a=n[i],s=t[a];if(s){let t=e[a],r=void 0===t||s(t,a,e);if(!0!==r)throw new Pi("option "+a+" must be "+r,Pi.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Pi("Unknown option "+a,Pi.ERR_BAD_OPTION)}};class Du{constructor(e){this.defaults=e||{},this.interceptors={request:new Pv,response:new Pv}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:a,headers:s}=t=PJ(this.defaults,t);void 0!==i&&Dl(i,{silentJSONParsing:Ds.transitional(Ds.boolean),forcedJSONParsing:Ds.transitional(Ds.boolean),clarifyTimeoutError:Ds.transitional(Ds.boolean)},!1),null!=a&&(Pn.isFunction(a)?t.paramsSerializer={serialize:a}:Dl(a,{encode:Ds.function,serialize:Ds.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Dl(t,{baseUrl:Ds.spelling("baseURL"),withXsrfToken:Ds.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&Pn.merge(s.common,s[t.method]);s&&Pn.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=PL.concat(o,s);let l=[],u=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(u=u&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d=0;if(!u){let e=[Da.bind(this),void 0];for(e.unshift(...l),e.push(...c),n=e.length,r=Promise.resolve(t);d<n;)r=r.then(e[d++],e[d++]);return r}n=l.length;let h=t;for(;d<n;){let e=l[d++],t=l[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{r=Da.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,n=c.length;d<n;)r=r.then(c[d++],c[d++]);return r}getUri(e){return Pg(Pq((e=PJ(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Pn.forEach(["delete","get","head","options"],function(e){Du.prototype[e]=function(t,r){return this.request(PJ(r||{},{method:e,url:t,data:(r||{}).data}))}}),Pn.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(PJ(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Du.prototype[e]=t(),Du.prototype[e+"Form"]=t(!0)});class Dc{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new PN(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Dc(function(t){e=t}),cancel:e}}}let Dd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Dd).forEach(([e,t])=>{Dd[t]=e});let Dh=function e(t){let r=new Du(t),n=kT(Du.prototype.request,r);return Pn.extend(n,Du.prototype,r,{allOwnKeys:!0}),Pn.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(PJ(t,r))},n}(PT);Dh.Axios=Du,Dh.CanceledError=PN,Dh.CancelToken=Dc,Dh.isCancel=PF,Dh.VERSION="1.13.2",Dh.toFormData=Pd,Dh.AxiosError=Pi,Dh.Cancel=Dh.CanceledError,Dh.all=function(e){return Promise.all(e)},Dh.spread=function(e){return function(t){return e.apply(null,t)}},Dh.isAxiosError=function(e){return Pn.isObject(e)&&!0===e.isAxiosError},Dh.mergeConfig=PJ,Dh.AxiosHeaders=PL,Dh.formToJSON=e=>PI(Pn.isHTMLForm(e)?new FormData(e):e),Dh.getAdapter=Dn,Dh.HttpStatusCode=Dd,Dh.default=Dh;let{Axios:Dp,AxiosError:Df,CanceledError:Dm,isCancel:Dg,CancelToken:Dv,VERSION:DA,all:Db,Cancel:Dy,isAxiosError:Dw,spread:Dx,toFormData:DC,AxiosHeaders:DE,HttpStatusCode:DS,formToJSON:D_,getAdapter:DM,mergeConfig:DI}=Dh;function DT(){return Dh.create({baseURL:"https://api.vizbl.us",timeout:3e4})}let DB=DT(),DR=DT();async function Dk(e,t){var r;let n,i=function(e,t){var r;let n;if(void 0===t.data||(r=t.data,"undefined"!=typeof FormData&&r instanceof FormData||null!==r&&"object"==typeof r&&(r.constructor?.name==="FormData"||"function"==typeof r.getBoundary)))return t;let i=DE.from(t.headers);return i.has("Content-Type")||void 0!==(n=e.defaults.headers.common)&&DE.from(n).has("Content-Type")||i.set("Content-Type","application/json"),t.headers=i,t}(e,(r={...t},n=DE.from(r.headers),r.headers=n,r));try{return await e.request(i)}catch(e){throw e}}async function DP(e){return Dk(e.skipUnauthorizedRecovery?DR:DB,function(e){let{skipUnauthorizedRecovery:t,...r}=e;return r}(e))}async function DD(e){return DP(e)}async function DL(e,t={}){let{client:r=DD,...n}=t;return(await r({method:"POST",url:"/obj/Fetch",data:e,...n})).data}var Dz=tC.forwardRef((e,t)=>(0,t_.jsx)(Bq.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));function DF({className:e,...t}){return(0,t_.jsx)(Dz,{"data-slot":"label",className:BR("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function DN({className:e,...t}){return(0,t_.jsx)("div",{"data-slot":"field-group",className:BR("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),...t})}Dz.displayName="Label";let DO=BP("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function DU({className:e,orientation:t="vertical",...r}){return(0,t_.jsx)("div",{role:"group","data-slot":"field","data-orientation":t,className:BR(DO({orientation:t}),e),...r})}function DQ({className:e,...t}){return(0,t_.jsx)(DF,{"data-slot":"field-label",className:BR("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e),...t})}function DG({className:e,...t}){return(0,t_.jsx)("div",{"data-slot":"field-label",className:BR("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),...t})}function DH(e,[t,r]){return Math.min(r,Math.max(t,e))}function Dj(e){let t=e+"CollectionProvider",[r,n]=BF(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,n=tC.useRef(null),a=tC.useRef(new Map).current;return(0,t_.jsx)(i,{scope:t,itemMap:a,collectionRef:n,children:r})};s.displayName=t;let o=e+"CollectionSlot",l=Bj(o),u=tC.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=TM(t,a(o,r).collectionRef);return(0,t_.jsx)(l,{ref:i,children:n})});u.displayName=o;let c=e+"CollectionItemSlot",d="data-radix-collection-item",h=Bj(c),p=tC.forwardRef((e,t)=>{let{scope:r,children:n,...i}=e,s=tC.useRef(null),o=TM(t,s),l=a(c,r);return tC.useEffect(()=>(l.itemMap.set(s,{ref:s,...i}),()=>void l.itemMap.delete(s))),(0,t_.jsx)(h,{...{[d]:""},ref:o,children:n})});return p.displayName=c,[{Provider:s,Slot:u,ItemSlot:p},function(t){let r=a(e+"CollectionConsumer",t);return tC.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var DV=tC.createContext(void 0);function DW(e){let t=tC.useContext(DV);return e||t||"ltr"}let Dq=["top","right","bottom","left"],DX=Math.min,DJ=Math.max,DK=Math.round,DY=Math.floor,D$=e=>({x:e,y:e}),DZ={left:"right",right:"left",bottom:"top",top:"bottom"},D0={start:"end",end:"start"};function D1(e,t){return"function"==typeof e?e(t):e}function D2(e){return e.split("-")[0]}function D3(e){return e.split("-")[1]}function D4(e){return"x"===e?"y":"x"}function D5(e){return"y"===e?"height":"width"}let D8=new Set(["top","bottom"]);function D6(e){return D8.has(D2(e))?"y":"x"}function D9(e){return e.replace(/start|end/g,e=>D0[e])}let D7=["left","right"],Le=["right","left"],Lt=["top","bottom"],Lr=["bottom","top"];function Ln(e){return e.replace(/left|right|bottom|top/g,e=>DZ[e])}function Li(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function La(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Ls(e,t,r){let n,{reference:i,floating:a}=e,s=D6(t),o=D4(D6(t)),l=D5(o),u=D2(t),c="y"===s,d=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,p=i[l]/2-a[l]/2;switch(u){case"top":n={x:d,y:i.y-a.height};break;case"bottom":n={x:d,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:h};break;case"left":n={x:i.x-a.width,y:h};break;default:n={x:i.x,y:i.y}}switch(D3(t)){case"start":n[o]-=p*(r&&c?-1:1);break;case"end":n[o]+=p*(r&&c?-1:1)}return n}let Lo=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=a.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Ls(u,n,l),h=n,p={},f=0;for(let r=0;r<o.length;r++){let{name:a,fn:m}=o[r],{x:g,y:v,data:A,reset:b}=await m({x:c,y:d,initialPlacement:n,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=v?v:d,p={...p,[a]:{...p[a],...A}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(u=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:d}=Ls(u,h,l)),r=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}};async function Ll(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=D1(t,e),f=Li(p),m=o[h?"floating"===d?"reference":"floating":d],g=La(await a.getClippingRect({element:null==(r=await (null==a.isElement?void 0:a.isElement(m)))||r?m:m.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await (null==a.getOffsetParent?void 0:a.getOffsetParent(o.floating)),b=await (null==a.isElement?void 0:a.isElement(A))&&await (null==a.getScale?void 0:a.getScale(A))||{x:1,y:1},y=La(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:A,strategy:l}):v);return{top:(g.top-y.top+f.top)/b.y,bottom:(y.bottom-g.bottom+f.bottom)/b.y,left:(g.left-y.left+f.left)/b.x,right:(y.right-g.right+f.right)/b.x}}function Lu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lc(e){return Dq.some(t=>e[t]>=0)}let Ld=new Set(["left","top"]);async function Lh(e,t){let{placement:r,platform:n,elements:i}=e,a=await (null==n.isRTL?void 0:n.isRTL(i.floating)),s=D2(r),o=D3(r),l="y"===D6(r),u=Ld.has(s)?-1:1,c=a&&l?-1:1,d=D1(t,e),{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&"number"==typeof f&&(p="end"===o?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}function Lp(){return"undefined"!=typeof window}function Lf(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function Lm(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Lg(e){var t;return null==(t=(Lv(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Lv(e){return!!Lp()&&(e instanceof Node||e instanceof Lm(e).Node)}function LA(e){return!!Lp()&&(e instanceof Element||e instanceof Lm(e).Element)}function Lb(e){return!!Lp()&&(e instanceof HTMLElement||e instanceof Lm(e).HTMLElement)}function Ly(e){return!!Lp()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Lm(e).ShadowRoot)}let Lw=new Set(["inline","contents"]);function Lx(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=LP(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Lw.has(i)}let LC=new Set(["table","td","th"]),LE=[":popover-open",":modal"];function LS(e){return LE.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let L_=["transform","translate","scale","rotate","perspective"],LM=["transform","translate","scale","rotate","perspective","filter"],LI=["paint","layout","strict","content"];function LT(e){let t=LB(),r=LA(e)?LP(e):e;return L_.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||LM.some(e=>(r.willChange||"").includes(e))||LI.some(e=>(r.contain||"").includes(e))}function LB(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let LR=new Set(["html","body","#document"]);function Lk(e){return LR.has(Lf(e))}function LP(e){return Lm(e).getComputedStyle(e)}function LD(e){return LA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function LL(e){if("html"===Lf(e))return e;let t=e.assignedSlot||e.parentNode||Ly(e)&&e.host||Lg(e);return Ly(t)?t.host:t}function Lz(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=LL(t);return Lk(r)?t.ownerDocument?t.ownerDocument.body:t.body:Lb(r)&&Lx(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),s=Lm(i);if(a){let e=LF(s);return t.concat(s,s.visualViewport||[],Lx(i)?i:[],e&&r?Lz(e):[])}return t.concat(i,Lz(i,[],r))}function LF(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function LN(e){let t=LP(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Lb(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=DK(r)!==a||DK(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function LO(e){return LA(e)?e:e.contextElement}function LU(e){let t=LO(e);if(!Lb(t))return D$(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=LN(t),s=(a?DK(r.width):r.width)/n,o=(a?DK(r.height):r.height)/i;return s&&Number.isFinite(s)||(s=1),o&&Number.isFinite(o)||(o=1),{x:s,y:o}}let LQ=D$(0);function LG(e){let t=Lm(e);return LB()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:LQ}function LH(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),s=LO(e),o=D$(1);t&&(n?LA(n)&&(o=LU(n)):o=LU(e));let l=(void 0===(i=r)&&(i=!1),n&&(!i||n===Lm(s))&&i)?LG(s):D$(0),u=(a.left+l.x)/o.x,c=(a.top+l.y)/o.y,d=a.width/o.x,h=a.height/o.y;if(s){let e=Lm(s),t=n&&LA(n)?Lm(n):n,r=e,i=LF(r);for(;i&&n&&t!==r;){let e=LU(i),t=i.getBoundingClientRect(),n=LP(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,h*=e.y,u+=a,c+=s,i=LF(r=Lm(i))}}return La({width:d,height:h,x:u,y:c})}function Lj(e,t){let r=LD(e).scrollLeft;return t?t.left+r:LH(Lg(e)).left+r}function LV(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Lj(e,r),y:r.top+t.scrollTop}}let LW=new Set(["absolute","fixed"]);function Lq(e,t,r){var n;let i;if("viewport"===t)i=function(e,t){let r=Lm(e),n=Lg(e),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;let e=LB();(!e||e&&"fixed"===t)&&(o=i.offsetLeft,l=i.offsetTop)}let u=Lj(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,s=Math.abs(n.clientWidth-t.clientWidth-i);s<=25&&(a-=s)}else u<=25&&(a+=u);return{width:a,height:s,x:o,y:l}}(e,r);else if("document"===t){let t,r,a,s,o,l,u;n=Lg(e),t=Lg(n),r=LD(n),a=n.ownerDocument.body,s=DJ(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),o=DJ(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),l=-r.scrollLeft+Lj(n),u=-r.scrollTop,"rtl"===LP(a).direction&&(l+=DJ(t.clientWidth,a.clientWidth)-s),i={width:s,height:o,x:l,y:u}}else if(LA(t)){let e,n,a,s,o,l;n=(e=LH(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,s=Lb(t)?LU(t):D$(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,i={width:o,height:l,x:a*s.x,y:n*s.y}}else{let r=LG(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return La(i)}function LX(e){return"static"===LP(e).position}function LJ(e,t){if(!Lb(e)||"fixed"===LP(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Lg(e)===r&&(r=r.ownerDocument.body),r}function LK(e,t){var r;let n=Lm(e);if(LS(e))return n;if(!Lb(e)){let t=LL(e);for(;t&&!Lk(t);){if(LA(t)&&!LX(t))return t;t=LL(t)}return n}let i=LJ(e,t);for(;i&&(r=i,LC.has(Lf(r)))&&LX(i);)i=LJ(i,t);return i&&Lk(i)&&LX(i)&&!LT(i)?n:i||function(e){let t=LL(e);for(;Lb(t)&&!Lk(t);){if(LT(t))return t;if(LS(t))break;t=LL(t)}return null}(e)||n}let LY=async function(e){let t=this.getOffsetParent||LK,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=Lb(t),i=Lg(t),a="fixed"===r,s=LH(e,!0,a,t),o={scrollLeft:0,scrollTop:0},l=D$(0);if(n||!n&&!a)if(("body"!==Lf(t)||Lx(i))&&(o=LD(t)),n){let e=LH(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Lj(i));a&&!n&&i&&(l.x=Lj(i));let u=!i||n||a?D$(0):LV(i,o);return{x:s.left+o.scrollLeft-l.x-u.x,y:s.top+o.scrollTop-l.y-u.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},L$={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,s=Lg(n),o=!!t&&LS(t.floating);if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},u=D$(1),c=D$(0),d=Lb(n);if((d||!d&&!a)&&(("body"!==Lf(n)||Lx(s))&&(l=LD(n)),Lb(n))){let e=LH(n);u=LU(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let h=!s||d||a?D$(0):LV(s,l);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Lg,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?LS(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=Lz(e,[],!1).filter(e=>LA(e)&&"body"!==Lf(e)),i=null,a="fixed"===LP(e).position,s=a?LL(e):e;for(;LA(s)&&!Lk(s);){let t=LP(s),r=LT(s);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&LW.has(i.position)||Lx(s)&&!r&&function e(t,r){let n=LL(t);return!(n===r||!LA(n)||Lk(n))&&("fixed"===LP(n).position||e(n,r))}(e,s))?n=n.filter(e=>e!==s):i=t,s=LL(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=a[0],o=a.reduce((e,r)=>{let n=Lq(t,r,i);return e.top=DJ(n.top,e.top),e.right=DX(n.right,e.right),e.bottom=DX(n.bottom,e.bottom),e.left=DJ(n.left,e.left),e},Lq(t,s,i));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:LK,getElementRects:LY,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=LN(e);return{width:t,height:r}},getScale:LU,isElement:LA,isRTL:function(e){return"rtl"===LP(e).direction}};function LZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let L0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:u,padding:c=0}=D1(e,t)||{};if(null==u)return{};let d=Li(c),h={x:r,y:n},p=D4(D6(i)),f=D5(p),m=await s.getDimensions(u),g="y"===p,v=g?"clientHeight":"clientWidth",A=a.reference[f]+a.reference[p]-h[p]-a.floating[f],b=h[p]-a.reference[p],y=await (null==s.getOffsetParent?void 0:s.getOffsetParent(u)),w=y?y[v]:0;w&&await (null==s.isElement?void 0:s.isElement(y))||(w=o.floating[v]||a.floating[f]);let x=w/2-m[f]/2-1,C=DX(d[g?"top":"left"],x),E=DX(d[g?"bottom":"right"],x),S=w-m[f]-E,_=w/2-m[f]/2+(A/2-b/2),M=DJ(C,DX(_,S)),I=!l.arrow&&null!=D3(i)&&_!==M&&a.reference[f]/2-(_<C?C:E)-m[f]/2<0,T=I?_<C?_-C:_-S:0;return{[p]:h[p]+T,data:{[p]:M,centerOffset:_-M-T,...I&&{alignmentOffset:T}},reset:I}}});var L1="undefined"!=typeof document?tC.useLayoutEffect:function(){};function L2(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!L2(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!L2(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function L3(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function L4(e,t){let r=L3(e);return Math.round(t*r)/r}function L5(e){let t=tC.useRef(e);return L1(()=>{t.current=e}),t}var L8=tC.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...a}=e;return(0,t_.jsx)(Bq.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,t_.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function L6(e){let[t,r]=tC.useState(void 0);return BN(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}L8.displayName="Arrow";var L9="Popper",[L7,ze]=BF(L9),[zt,zr]=L7(L9),zn=e=>{let{__scopePopper:t,children:r}=e,[n,i]=tC.useState(null);return(0,t_.jsx)(zt,{scope:t,anchor:n,onAnchorChange:i,children:r})};zn.displayName=L9;var zi="PopperAnchor",za=tC.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,a=zr(zi,r),s=tC.useRef(null),o=TM(t,s),l=tC.useRef(null);return tC.useEffect(()=>{let e=l.current;l.current=n?.current||s.current,e!==l.current&&a.onAnchorChange(l.current)}),n?null:(0,t_.jsx)(Bq.div,{...i,ref:o})});za.displayName=zi;var zs="PopperContent",[zo,zl]=L7(zs),zu=tC.forwardRef((e,t)=>{var r,n,i,a,s,o,l,u,c,d,h,p,f,m,g,v,A,b,y,w,x;let{__scopePopper:C,side:E="bottom",sideOffset:S=0,align:_="center",alignOffset:M=0,arrowPadding:I=0,avoidCollisions:T=!0,collisionBoundary:B=[],collisionPadding:R=0,sticky:k="partial",hideWhenDetached:P=!1,updatePositionStrategy:D="optimized",onPlaced:L,...z}=e,F=zr(zs,C),[N,O]=tC.useState(null),U=TM(t,e=>O(e)),[Q,G]=tC.useState(null),H=L6(Q),j=H?.width??0,V=H?.height??0,W="number"==typeof R?R:{top:0,right:0,bottom:0,left:0,...R},q=Array.isArray(B)?B:[B],X=q.length>0,J={padding:W,boundary:q.filter(zp),altBoundary:X},{refs:K,floatingStyles:Y,placement:$,isPositioned:Z,middlewareData:ee}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[c,d]=tC.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=tC.useState(n);L2(h,n)||p(n);let[f,m]=tC.useState(null),[g,v]=tC.useState(null),A=tC.useCallback(e=>{e!==x.current&&(x.current=e,m(e))},[]),b=tC.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),y=a||f,w=s||g,x=tC.useRef(null),C=tC.useRef(null),E=tC.useRef(c),S=null!=l,_=L5(l),M=L5(i),I=L5(u),T=tC.useCallback(()=>{var e,n;let i,a,s;if(!x.current||!C.current)return;let o={placement:t,strategy:r,middleware:h};M.current&&(o.platform=M.current),(e=x.current,n=C.current,i=new Map,s={...(a={platform:L$,...o}).platform,_c:i},Lo(e,n,{...a,platform:s})).then(e=>{let t={...e,isPositioned:!1!==I.current};B.current&&!L2(E.current,t)&&(E.current=t,(0,r4.flushSync)(()=>{d(t)}))})},[h,t,r,M,I]);L1(()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let B=tC.useRef(!1);L1(()=>(B.current=!0,()=>{B.current=!1}),[]),L1(()=>{if(y&&(x.current=y),w&&(C.current=w),y&&w){if(_.current)return _.current(y,w,T);T()}},[y,w,T,_,S]);let R=tC.useMemo(()=>({reference:x,floating:C,setReference:A,setFloating:b}),[A,b]),k=tC.useMemo(()=>({reference:y,floating:w}),[y,w]),P=tC.useMemo(()=>{let e={position:r,left:0,top:0};if(!k.floating)return e;let t=L4(k.floating,c.x),n=L4(k.floating,c.y);return o?{...e,transform:"translate("+t+"px, "+n+"px)",...L3(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,o,k.floating,c.x,c.y]);return tC.useMemo(()=>({...c,update:T,refs:R,elements:k,floatingStyles:P}),[c,T,R,k,P])}({strategy:"fixed",placement:E+("center"!==_?"-"+_:""),whileElementsMounted:(...e)=>(function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=LO(e),d=a||s?[...c?Lz(c):[],...Lz(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});let h=c&&l?function(e,t){let r,n=null,i=Lg(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function s(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(o||t(),!h||!p)return;let f={rootMargin:-DY(d)+"px "+-DY(i.clientWidth-(c+h))+"px "+-DY(i.clientHeight-(d+p))+"px "+-DY(c)+"px",threshold:DJ(0,DX(1,l))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(n!==l){if(!m)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||LZ(u,e.getBoundingClientRect())||s(),m=!1}try{n=new IntersectionObserver(g,{...f,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(g,f)}n.observe(e)}(!0),a}(c,r):null,p=-1,f=null;o&&(f=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),r()}),c&&!u&&f.observe(c),f.observe(t));let m=u?LH(e):null;return u&&function t(){let n=LH(e);m&&!LZ(m,n)&&r(),m=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",r),s&&e.removeEventListener("resize",r)}),null==h||h(),null==(e=f)||e.disconnect(),f=null,u&&cancelAnimationFrame(i)}})(...e,{animationFrame:"always"===D}),elements:{reference:F.anchor},middleware:[{...{name:"offset",options:i=r={mainAxis:S+V,alignmentAxis:M},async fn(e){var t,r;let{x:n,y:a,placement:s,middlewareData:o}=e,l=await Lh(e,i);return s===(null==(t=o.offset)?void 0:t.placement)&&null!=(r=o.arrow)&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}},options:[r,n]},T&&{...{name:"shift",options:c=l={mainAxis:!0,crossAxis:!1,limiter:"partial"===k?{...(void 0===(o=a)&&(o={}),{options:o,fn(e){let{x:t,y:r,placement:n,rects:i,middlewareData:a}=e,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=D1(o,e),c={x:t,y:r},d=D6(n),h=D4(d),p=c[h],f=c[d],m=D1(s,e),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===h?"height":"width",t=i.reference[h]-i.floating[e]+g.mainAxis,r=i.reference[h]+i.reference[e]-g.mainAxis;p<t?p=t:p>r&&(p=r)}if(u){var v,A;let e="y"===h?"width":"height",t=Ld.has(D2(n)),r=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),s=i.reference[d]+i.reference[e]+(t?0:(null==(A=a.offset)?void 0:A[d])||0)-(t?g.crossAxis:0);f<r?f=r:f>s&&(f=s)}return{[h]:p,[d]:f}}}),options:[a,s]}:void 0,...J},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...o}=D1(c,e),l={x:t,y:r},u=await Ll(e,o),d=D6(D2(n)),h=D4(d),p=l[h],f=l[d];if(i){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",r=p+u[e],n=p-u[t];p=DJ(r,DX(p,n))}if(a){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=f+u[e],n=f-u[t];f=DJ(r,DX(f,n))}let m=s.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-t,y:m.y-r,enabled:{[h]:i,[d]:a}}}}},options:[l,u]},T&&{...{name:"flip",options:p=d={...J},async fn(e){var t,r,n,i,a,s,o,l;let u,c,d,{placement:h,middlewareData:f,rects:m,initialPlacement:g,platform:v,elements:A}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...S}=D1(p,e);if(null!=(t=f.arrow)&&t.alignmentOffset)return{};let _=D2(h),M=D6(g),I=D2(g)===g,T=await (null==v.isRTL?void 0:v.isRTL(A.floating)),B=w||(I||!E?[Ln(g)]:(u=Ln(g),[D9(g),u,D9(u)])),R="none"!==C;!w&&R&&B.push(...(c=D3(g),d=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?Le:D7;return t?D7:Le;case"left":case"right":return t?Lt:Lr;default:return[]}}(D2(g),"start"===C,T),c&&(d=d.map(e=>e+"-"+c),E&&(d=d.concat(d.map(D9)))),d));let k=[g,...B],P=await Ll(e,S),D=[],L=(null==(r=f.flip)?void 0:r.overflows)||[];if(b&&D.push(P[_]),y){let e,t,r,n,i=(s=h,o=m,void 0===(l=T)&&(l=!1),e=D3(s),r=D5(t=D4(D6(s))),n="x"===t?e===(l?"end":"start")?"right":"left":"start"===e?"bottom":"top",o.reference[r]>o.floating[r]&&(n=Ln(n)),[n,Ln(n)]);D.push(P[i[0]],P[i[1]])}if(L=[...L,{placement:h,overflows:D}],!D.every(e=>e<=0)){let e=((null==(n=f.flip)?void 0:n.index)||0)+1,t=k[e];if(t&&("alignment"!==y||M===D6(t)||L.every(e=>D6(e.placement)!==M||e.overflows[0]>0)))return{data:{index:e,overflows:L},reset:{placement:t}};let r=null==(i=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!r)switch(x){case"bestFit":{let e=null==(a=L.filter(e=>{if(R){let t=D6(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=g}if(h!==r)return{reset:{placement:r}}}return{}}},options:[d,h]},{...{name:"size",options:g=f={...J,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:i,height:a}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${r}px`),s.setProperty("--radix-popper-available-height",`${n}px`),s.setProperty("--radix-popper-anchor-width",`${i}px`),s.setProperty("--radix-popper-anchor-height",`${a}px`)}},async fn(e){var t,r;let n,i,{placement:a,rects:s,platform:o,elements:l}=e,{apply:u=()=>{},...c}=D1(g,e),d=await Ll(e,c),h=D2(a),p=D3(a),f="y"===D6(a),{width:m,height:v}=s.floating;"top"===h||"bottom"===h?(n=h,i=p===(await (null==o.isRTL?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(i=h,n="end"===p?"top":"bottom");let A=v-d.top-d.bottom,b=m-d.left-d.right,y=DX(v-d[n],A),w=DX(m-d[i],b),x=!e.middlewareData.shift,C=y,E=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(E=b),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(C=A),x&&!p){let e=DJ(d.left,0),t=DJ(d.right,0),r=DJ(d.top,0),n=DJ(d.bottom,0);f?E=m-2*(0!==e||0!==t?e+t:DJ(d.left,d.right)):C=v-2*(0!==r||0!==n?r+n:DJ(d.top,d.bottom))}await u({...e,availableWidth:E,availableHeight:C});let S=await o.getDimensions(l.floating);return m!==S.width||v!==S.height?{reset:{rects:!0}}:{}}},options:[f,m]},Q&&{...{name:"arrow",options:b=v={element:Q,padding:I},fn(e){let{element:t,padding:r}="function"==typeof b?b(e):b;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?L0({element:t.current,padding:r}).fn(e):{}:t?L0({element:t,padding:r}).fn(e):{}}},options:[v,A]},zf({arrowWidth:j,arrowHeight:V}),P&&{...{name:"hide",options:x=y={strategy:"referenceHidden",...J},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=D1(x,e);switch(r){case"referenceHidden":{let r=Lu(await Ll(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Lc(r)}}}case"escaped":{let r=Lu(await Ll(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:Lc(r)}}}default:return{}}}},options:[y,w]}]}),[et,er]=zm($),en=BX(L);BN(()=>{Z&&en?.()},[Z,en]);let ei=ee.arrow?.x,ea=ee.arrow?.y,es=ee.arrow?.centerOffset!==0,[eo,el]=tC.useState();return BN(()=>{N&&el(window.getComputedStyle(N).zIndex)},[N]),(0,t_.jsx)("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:Z?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eo,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(" "),...ee.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,t_.jsx)(zo,{scope:C,placedSide:et,onArrowChange:G,arrowX:ei,arrowY:ea,shouldHideArrow:es,children:(0,t_.jsx)(Bq.div,{"data-side":et,"data-align":er,...z,ref:U,style:{...z.style,animation:Z?void 0:"none"}})})})});zu.displayName=zs;var zc="PopperArrow",zd={top:"bottom",right:"left",bottom:"top",left:"right"},zh=tC.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=zl(zc,r),a=zd[i.placedSide];return(0,t_.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,t_.jsx)(L8,{...n,ref:t,style:{...n.style,display:"block"}})})});function zp(e){return null!==e}zh.displayName=zc;var zf=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,o=a?0:e.arrowHeight,[l,u]=zm(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(i.arrow?.x??0)+s/2,h=(i.arrow?.y??0)+o/2,p="",f="";return"bottom"===l?(p=a?c:`${d}px`,f=`${-o}px`):"top"===l?(p=a?c:`${d}px`,f=`${n.floating.height+o}px`):"right"===l?(p=`${-o}px`,f=a?c:`${h}px`):"left"===l&&(p=`${n.floating.width+o}px`,f=a?c:`${h}px`),{data:{x:p,y:f}}}});function zm(e){let[t,r="center"]=e.split("-");return[t,r]}function zg(e){let t=tC.useRef({value:e,previous:e});return tC.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});tC.forwardRef((e,t)=>(0,t_.jsx)(Bq.span,{...e,ref:t,style:{...zv,...e.style}})).displayName="VisuallyHidden";var zA=[" ","Enter","ArrowUp","ArrowDown"],zb=[" ","Enter"],zy="Select",[zw,zx,zC]=Dj(zy),[zE,zS]=BF(zy,[zC,ze]),z_=ze(),[zM,zI]=zE(zy),[zT,zB]=zE(zy),zR=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:o,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:h,required:p,form:f}=e,m=z_(t),[g,v]=tC.useState(null),[A,b]=tC.useState(null),[y,w]=tC.useState(!1),x=DW(u),[C,E]=BH({prop:n,defaultProp:i??!1,onChange:a,caller:zy}),[S,_]=BH({prop:s,defaultProp:o,onChange:l,caller:zy}),M=tC.useRef(null),I=!g||f||!!g.closest("form"),[T,B]=tC.useState(new Set),R=Array.from(T).map(e=>e.props.value).join(";");return(0,t_.jsx)(zn,{...m,children:(0,t_.jsxs)(zM,{required:p,scope:t,trigger:g,onTriggerChange:v,valueNode:A,onValueNodeChange:b,valueNodeHasChildren:y,onValueNodeHasChildrenChange:w,contentId:BQ(),value:S,onValueChange:_,open:C,onOpenChange:E,dir:x,triggerPointerDownPosRef:M,disabled:h,children:[(0,t_.jsx)(zw.Provider,{scope:t,children:(0,t_.jsx)(zT,{scope:e.__scopeSelect,onNativeOptionAdd:tC.useCallback(e=>{B(t=>new Set(t).add(e))},[]),onNativeOptionRemove:tC.useCallback(e=>{B(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),I?(0,t_.jsxs)(Fi,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:S,onChange:e=>_(e.target.value),disabled:h,form:f,children:[void 0===S?(0,t_.jsx)("option",{value:""}):null,Array.from(T)]},R):null]})})};zR.displayName=zy;var zk="SelectTrigger",zP=tC.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...i}=e,a=z_(r),s=zI(zk,r),o=s.disabled||n,l=TM(t,s.onTriggerChange),u=zx(r),c=tC.useRef("touch"),[d,h,p]=Fs(e=>{let t=u().filter(e=>!e.disabled),r=t.find(e=>e.value===s.value),n=Fo(t,e,r);void 0!==n&&s.onValueChange(n.value)}),f=e=>{o||(s.onOpenChange(!0),p()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t_.jsx)(za,{asChild:!0,...a,children:(0,t_.jsx)(Bq.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":Fa(s.value)?"":void 0,...i,ref:l,onClick:Bz(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&f(e)}),onPointerDown:Bz(i.onPointerDown,e=>{c.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(f(e),e.preventDefault())}),onKeyDown:Bz(i.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&zA.includes(e.key)&&(f(),e.preventDefault())})})})});zP.displayName=zk;var zD="SelectValue",zL=tC.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...o}=e,l=zI(zD,r),{onValueNodeHasChildrenChange:u}=l,c=void 0!==a,d=TM(t,l.onValueNodeChange);return BN(()=>{u(c)},[u,c]),(0,t_.jsx)(Bq.span,{...o,ref:d,style:{pointerEvents:"none"},children:Fa(l.value)?(0,t_.jsx)(t_.Fragment,{children:s}):a})});zL.displayName=zD;var zz=tC.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...i}=e;return(0,t_.jsx)(Bq.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});zz.displayName="SelectIcon";var zF=e=>(0,t_.jsx)(B7,{asChild:!0,...e});zF.displayName="SelectPortal";var zN="SelectContent",zO=tC.forwardRef((e,t)=>{let r=zI(zN,e.__scopeSelect),[n,i]=tC.useState();return(BN(()=>{i(new DocumentFragment)},[]),r.open)?(0,t_.jsx)(zH,{...e,ref:t}):n?(0,r4.createPortal)((0,t_.jsx)(zU,{scope:e.__scopeSelect,children:(0,t_.jsx)(zw.Slot,{scope:e.__scopeSelect,children:(0,t_.jsx)("div",{children:e.children})})}),n):null});zO.displayName=zN;var[zU,zQ]=zE(zN),zG=Bj("SelectContent.RemoveScroll"),zH=tC.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:o,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:f,hideWhenDetached:m,avoidCollisions:g,...v}=e,A=zI(zN,r),[b,y]=tC.useState(null),[w,x]=tC.useState(null),C=TM(t,e=>y(e)),[E,S]=tC.useState(null),[_,M]=tC.useState(null),I=zx(r),[T,B]=tC.useState(!1),R=tC.useRef(!1);tC.useEffect(()=>{if(b)return RK(b)},[b]),Rn();let k=tC.useCallback(e=>{let[t,...r]=I().map(e=>e.ref.current),[n]=r.slice(-1),i=document.activeElement;for(let r of e)if(r===i||(r?.scrollIntoView({block:"nearest"}),r===t&&w&&(w.scrollTop=0),r===n&&w&&(w.scrollTop=w.scrollHeight),r?.focus(),document.activeElement!==i))return},[I,w]),P=tC.useCallback(()=>k([E,b]),[k,E,b]);tC.useEffect(()=>{T&&P()},[T,P]);let{onOpenChange:D,triggerPointerDownPosRef:L}=A;tC.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():b.contains(r.target)||D(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[b,D,L]),tC.useEffect(()=>{let e=()=>D(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[D]);let[z,F]=Fs(e=>{let t=I().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=Fo(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),N=tC.useCallback((e,t,r)=>{let n=!R.current&&!r;(void 0!==A.value&&A.value===t||n)&&(S(e),n&&(R.current=!0))},[A.value]),O=tC.useCallback(()=>b?.focus(),[b]),U=tC.useCallback((e,t,r)=>{let n=!R.current&&!r;(void 0!==A.value&&A.value===t||n)&&M(e)},[A.value]),Q="popper"===n?zV:zj,G=Q===zV?{side:o,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:f,hideWhenDetached:m,avoidCollisions:g}:{};return(0,t_.jsx)(zU,{scope:r,content:b,viewport:w,onViewportChange:x,itemRefCallback:N,selectedItem:E,onItemLeave:O,itemTextRefCallback:U,focusSelectedItem:P,selectedItemText:_,position:n,isPositioned:T,searchRef:z,children:(0,t_.jsx)(RH,{as:zG,allowPinchZoom:!0,children:(0,t_.jsx)(B3,{asChild:!0,trapped:A.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Bz(i,e=>{A.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t_.jsx)(BY,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:(0,t_.jsx)(Q,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:e=>e.preventDefault(),...v,...G,onPlaced:()=>B(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Bz(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>k(t)),e.preventDefault()}})})})})})})});zH.displayName="SelectContentImpl";var zj=tC.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...i}=e,a=zI(zN,r),s=zQ(zN,r),[o,l]=tC.useState(null),[u,c]=tC.useState(null),d=TM(t,e=>c(e)),h=zx(r),p=tC.useRef(!1),f=tC.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:v,focusSelectedItem:A}=s,b=tC.useCallback(()=>{if(a.trigger&&a.valueNode&&o&&u&&m&&g&&v){let e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if("rtl"!==a.dir){let n=i.left-t.left,a=r.left-n,s=e.left-a,l=e.width+s,u=Math.max(l,t.width),c=DH(a,[10,Math.max(10,window.innerWidth-10-u)]);o.style.minWidth=l+"px",o.style.left=c+"px"}else{let n=t.right-i.right,a=window.innerWidth-r.right-n,s=window.innerWidth-e.right-a,l=e.width+s,u=Math.max(l,t.width),c=DH(a,[10,Math.max(10,window.innerWidth-10-u)]);o.style.minWidth=l+"px",o.style.right=c+"px"}let s=h(),l=window.innerHeight-20,c=m.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),A=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),y=f+A+c+parseInt(d.paddingBottom,10)+b,w=Math.min(5*g.offsetHeight,y),x=window.getComputedStyle(m),C=parseInt(x.paddingTop,10),E=parseInt(x.paddingBottom,10),S=e.top+e.height/2-10,_=g.offsetHeight/2,M=f+A+(g.offsetTop+_);if(M<=S){let e=s.length>0&&g===s[s.length-1].ref.current;o.style.bottom="0px";let t=Math.max(l-S,_+(e?E:0)+(u.clientHeight-m.offsetTop-m.offsetHeight)+b);o.style.height=M+t+"px"}else{let e=s.length>0&&g===s[0].ref.current;o.style.top="0px";let t=Math.max(S,f+m.offsetTop+(e?C:0)+_);o.style.height=t+(y-M)+"px",m.scrollTop=M-S+m.offsetTop}o.style.margin="10px 0",o.style.minHeight=w+"px",o.style.maxHeight=l+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,o,u,m,g,v,a.dir,n]);BN(()=>b(),[b]);let[y,w]=tC.useState();BN(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]);let x=tC.useCallback(e=>{e&&!0===f.current&&(b(),A?.(),f.current=!1)},[b,A]);return(0,t_.jsx)(zW,{scope:r,contentWrapper:o,shouldExpandOnScrollRef:p,onScrollButtonChange:x,children:(0,t_.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:(0,t_.jsx)(Bq.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});zj.displayName="SelectItemAlignedPosition";var zV=tC.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:i=10,...a}=e,s=z_(r);return(0,t_.jsx)(zu,{...s,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zV.displayName="SelectPopperPosition";var[zW,zq]=zE(zN,{}),zX="SelectViewport",zJ=tC.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...i}=e,a=zQ(zX,r),s=zq(zX,r),o=TM(t,a.onViewportChange),l=tC.useRef(0);return(0,t_.jsxs)(t_.Fragment,{children:[(0,t_.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,t_.jsx)(zw.Slot,{scope:r,children:(0,t_.jsx)(Bq.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Bz(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=s;if(n?.current&&r){let e=Math.abs(l.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(i<n){let a=i+e,s=Math.min(n,a),o=a-s;r.style.height=s+"px","0px"===r.style.bottom&&(t.scrollTop=o>0?o:0,r.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});zJ.displayName=zX;var zK="SelectGroup",[zY,z$]=zE(zK);tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=BQ();return(0,t_.jsx)(zY,{scope:r,id:i,children:(0,t_.jsx)(Bq.div,{role:"group","aria-labelledby":i,...n,ref:t})})}).displayName=zK;var zZ="SelectLabel";tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=z$(zZ,r);return(0,t_.jsx)(Bq.div,{id:i.id,...n,ref:t})}).displayName=zZ;var z0="SelectItem",[z1,z2]=zE(z0),z3=tC.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,o=zI(z0,r),l=zQ(z0,r),u=o.value===n,[c,d]=tC.useState(a??""),[h,p]=tC.useState(!1),f=TM(t,e=>l.itemRefCallback?.(e,n,i)),m=BQ(),g=tC.useRef("touch"),v=()=>{i||(o.onValueChange(n),o.onOpenChange(!1))};if(""===n)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t_.jsx)(z1,{scope:r,value:n,disabled:i,textId:m,isSelected:u,onItemTextChange:tC.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,t_.jsx)(zw.ItemSlot,{scope:r,value:n,disabled:i,textValue:c,children:(0,t_.jsx)(Bq.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:f,onFocus:Bz(s.onFocus,()=>p(!0)),onBlur:Bz(s.onBlur,()=>p(!1)),onClick:Bz(s.onClick,()=>{"mouse"!==g.current&&v()}),onPointerUp:Bz(s.onPointerUp,()=>{"mouse"===g.current&&v()}),onPointerDown:Bz(s.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Bz(s.onPointerMove,e=>{g.current=e.pointerType,i?l.onItemLeave?.():"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Bz(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Bz(s.onKeyDown,e=>{(l.searchRef?.current===""||" "!==e.key)&&(zb.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});z3.displayName=z0;var z4="SelectItemText",z5=tC.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,...a}=e,s=zI(z4,r),o=zQ(z4,r),l=z2(z4,r),u=zB(z4,r),[c,d]=tC.useState(null),h=TM(t,e=>d(e),l.onItemTextChange,e=>o.itemTextRefCallback?.(e,l.value,l.disabled)),p=c?.textContent,f=tC.useMemo(()=>(0,t_.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return BN(()=>(m(f),()=>g(f)),[m,g,f]),(0,t_.jsxs)(t_.Fragment,{children:[(0,t_.jsx)(Bq.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?(0,r4.createPortal)(a.children,s.valueNode):null]})});z5.displayName=z4;var z8="SelectItemIndicator",z6=tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return z2(z8,r).isSelected?(0,t_.jsx)(Bq.span,{"aria-hidden":!0,...n,ref:t}):null});z6.displayName=z8;var z9="SelectScrollUpButton",z7=tC.forwardRef((e,t)=>{let r=zQ(z9,e.__scopeSelect),n=zq(z9,e.__scopeSelect),[i,a]=tC.useState(!1),s=TM(t,n.onScrollButtonChange);return BN(()=>{if(r.viewport&&r.isPositioned){let e=function(){a(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,t_.jsx)(Fr,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});z7.displayName=z9;var Fe="SelectScrollDownButton",Ft=tC.forwardRef((e,t)=>{let r=zQ(Fe,e.__scopeSelect),n=zq(Fe,e.__scopeSelect),[i,a]=tC.useState(!1),s=TM(t,n.onScrollButtonChange);return BN(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,t_.jsx)(Fr,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Ft.displayName=Fe;var Fr=tC.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...i}=e,a=zQ("SelectScrollButton",r),s=tC.useRef(null),o=zx(r),l=tC.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return tC.useEffect(()=>()=>l(),[l]),BN(()=>{let e=o().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[o]),(0,t_.jsx)(Bq.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Bz(i.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(n,50))}),onPointerMove:Bz(i.onPointerMove,()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(n,50))}),onPointerLeave:Bz(i.onPointerLeave,()=>{l()})})});tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,t_.jsx)(Bq.div,{"aria-hidden":!0,...n,ref:t})}).displayName="SelectSeparator";var Fn="SelectArrow";tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=z_(r),a=zI(Fn,r),s=zQ(Fn,r);return a.open&&"popper"===s.position?(0,t_.jsx)(zh,{...i,...n,ref:t}):null}).displayName=Fn;var Fi=tC.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{let i=tC.useRef(null),a=TM(n,i),s=zg(t);return tC.useEffect(()=>{let e=i.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==t&&r){let n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,t_.jsx)(Bq.select,{...r,style:{...zv,...r.style},ref:a,defaultValue:t})});function Fa(e){return""===e||void 0===e}function Fs(e){let t=BX(e),r=tC.useRef(""),n=tC.useRef(0),i=tC.useCallback(e=>{let i=r.current+e;t(i),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(i)},[t]),a=tC.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return tC.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function Fo(e,t,r){var n,i;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,s=r?e.indexOf(r):-1,o=(n=e,i=Math.max(s,0),n.map((e,t)=>n[(i+t)%n.length]));1===a.length&&(o=o.filter(e=>e!==r));let l=o.find(e=>e.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function Fl(e){return(0,t_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:(0,t_.jsx)("path",{d:"M8.21723 14.9975C8.10298 14.997 7.99004 14.9731 7.8854 14.9272C7.78077 14.8814 7.68665 14.8145 7.60889 14.7308L3.55889 10.4225C3.4075 10.2611 3.3264 10.0463 3.33343 9.82513C3.34046 9.604 3.43505 9.39471 3.59639 9.24332C3.75773 9.09192 3.97261 9.01082 4.19374 9.01785C4.41488 9.02489 4.62417 9.11948 4.77556 9.28082L8.20889 12.9392L15.2172 5.27248C15.2883 5.18392 15.3768 5.11083 15.4772 5.0577C15.5776 5.00458 15.6878 4.97254 15.8011 4.96355C15.9143 4.95456 16.0282 4.96882 16.1357 5.00544C16.2432 5.04207 16.3421 5.10029 16.4263 5.17652C16.5105 5.25276 16.5782 5.3454 16.6253 5.44877C16.6724 5.55213 16.6979 5.66403 16.7001 5.7776C16.7024 5.89116 16.6815 6.00399 16.6385 6.10916C16.5956 6.21433 16.5316 6.30961 16.4506 6.38915L8.83389 14.7225C8.75686 14.8077 8.66308 14.8761 8.55841 14.9234C8.45373 14.9707 8.34042 14.996 8.22556 14.9975H8.21723Z",fill:"currentColor"})})}function Fu(e){return(0,t_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,t_.jsx)("path",{d:"M12.0002 15.496C11.8686 15.4968 11.7381 15.4716 11.6163 15.4218C11.4944 15.372 11.3836 15.2987 11.2902 15.206L7.29019 11.206C7.10188 11.0177 6.99609 10.7623 6.99609 10.496C6.99609 10.2297 7.10188 9.97434 7.29019 9.78604C7.47849 9.59773 7.73388 9.49194 8.00019 9.49194C8.26649 9.49194 8.52188 9.59773 8.71019 9.78604L12.0002 13.096L15.3002 9.91604C15.3922 9.81375 15.5043 9.73154 15.6295 9.67455C15.7547 9.61756 15.8903 9.58703 16.0279 9.58485C16.1654 9.58267 16.302 9.60889 16.4289 9.66189C16.5559 9.71488 16.6705 9.79349 16.7657 9.89282C16.8609 9.99214 16.9346 10.11 16.9821 10.2391C17.0297 10.3682 17.0501 10.5057 17.042 10.6431C17.034 10.7804 16.9977 10.9146 16.9355 11.0373C16.8732 11.16 16.7863 11.2685 16.6802 11.356L12.6802 15.216C12.4973 15.3924 12.2542 15.4925 12.0002 15.496Z",fill:"currentColor"})})}function Fc(e){return(0,t_.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t_.jsx)("g",{"clip-path":"url(#clip0_3784_10281)",children:(0,t_.jsx)("path",{d:"M20.739 11.3791L18.039 8.67909C17.955 8.59517 17.8554 8.52861 17.7458 8.48319C17.6361 8.43778 17.5186 8.4144 17.4 8.4144C17.2813 8.4144 17.1638 8.43778 17.0541 8.48319C16.9445 8.52861 16.8449 8.59517 16.761 8.67909C16.6771 8.763 16.6105 8.86262 16.5651 8.97226C16.5197 9.0819 16.4963 9.19941 16.4963 9.31808C16.4963 9.43676 16.5197 9.55427 16.5651 9.66391C16.6105 9.77355 16.6771 9.87317 16.761 9.95708L17.922 11.1001H12.9V6.0691L14.061 7.23909C14.1451 7.32246 14.2448 7.38843 14.3545 7.43322C14.4641 7.478 14.5815 7.50073 14.7 7.50009C14.8787 7.50113 15.0538 7.44891 15.2027 7.35009C15.3517 7.25127 15.4679 7.11032 15.5364 6.94523C15.605 6.78013 15.6228 6.59835 15.5876 6.42308C15.5525 6.24781 15.4659 6.08698 15.339 5.9611L12.639 3.26111C12.4705 3.09326 12.2423 2.99902 12.0045 2.99902C11.7666 2.99902 11.5385 3.09326 11.37 3.26111L8.66999 5.9611C8.58608 6.04442 8.5194 6.14346 8.47376 6.25255C8.42812 6.36164 8.40441 6.47866 8.404 6.59691C8.40358 6.71517 8.42646 6.83235 8.47132 6.94176C8.51619 7.05117 8.58217 7.15068 8.66549 7.23459C8.74882 7.31851 8.84785 7.38519 8.95695 7.43083C9.06604 7.47647 9.18306 7.50017 9.30131 7.50059C9.54014 7.50144 9.76952 7.40737 9.93899 7.23909L11.1 6.0781V11.1001H6.069L7.239 9.93908C7.40847 9.76961 7.50368 9.53975 7.50368 9.30008C7.50368 9.06041 7.40847 8.83056 7.239 8.66109C7.06953 8.49161 6.83967 8.39641 6.6 8.39641C6.36033 8.39641 6.13048 8.49161 5.961 8.66109L3.26101 11.3611C3.17764 11.4452 3.11167 11.5449 3.06689 11.6546C3.0221 11.7642 2.99938 11.8816 3.00002 12.0001C2.99933 12.1185 3.02203 12.2359 3.06682 12.3456C3.11161 12.4552 3.1776 12.555 3.26101 12.6391L5.961 15.3391C6.0451 15.4225 6.14483 15.4885 6.25449 15.5333C6.36414 15.578 6.48156 15.6007 6.6 15.6001C6.77896 15.6015 6.95429 15.5496 7.10354 15.4508C7.25279 15.3521 7.36918 15.211 7.43781 15.0458C7.50643 14.8805 7.52417 14.6985 7.48876 14.5231C7.45334 14.3476 7.36638 14.1868 7.239 14.0611L6.078 12.9001H11.1V17.9311L9.93899 16.7611C9.76952 16.5916 9.53966 16.4964 9.29999 16.4964C9.06032 16.4964 8.83047 16.5916 8.661 16.7611C8.49152 16.9305 8.39631 17.1604 8.39631 17.4001C8.39631 17.6397 8.49152 17.8696 8.661 18.0391L11.361 20.739C11.5297 20.9065 11.7578 21.0004 11.9955 21.0004C12.2332 21.0004 12.4612 20.9065 12.63 20.739L15.33 18.0391C15.4139 17.9551 15.4805 17.8555 15.5259 17.7459C15.5713 17.6362 15.5947 17.5187 15.5947 17.4001C15.5947 17.2814 15.5713 17.1639 15.5259 17.0542C15.4805 16.9446 15.4139 16.845 15.33 16.7611C15.2461 16.6771 15.1464 16.6106 15.0368 16.5652C14.9272 16.5198 14.8096 16.4964 14.691 16.4964C14.5723 16.4964 14.4548 16.5198 14.3452 16.5652C14.2355 16.6106 14.1359 16.6771 14.052 16.7611L12.9 17.9221V12.9001H17.931L16.761 14.0611C16.6558 14.166 16.5781 14.2952 16.5349 14.4374C16.4917 14.5795 16.4843 14.7301 16.5134 14.8758C16.5424 15.0215 16.607 15.1578 16.7013 15.2725C16.7957 15.3873 16.917 15.4769 17.0544 15.5335C17.164 15.5784 17.2815 15.6011 17.4 15.6001C17.5184 15.6008 17.6359 15.5782 17.7455 15.5334C17.8552 15.4886 17.9549 15.4226 18.039 15.3391L20.739 12.6391C20.8224 12.555 20.8884 12.4552 20.9331 12.3456C20.9779 12.2359 21.0006 12.1185 21 12.0001C20.9966 11.7671 20.9031 11.5445 20.739 11.3791Z",fill:"currentColor"})}),(0,t_.jsx)("defs",{children:(0,t_.jsx)("clipPath",{id:"clip0_3784_10281",children:(0,t_.jsx)("rect",{width:"24",height:"24",fill:"currentColor"})})})]})}function Fd(e){return(0,t_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,t_.jsx)("path",{d:"M19.5398 5.08113C18.5372 4.08551 17.3458 3.30019 16.0356 2.77129C14.7253 2.24238 13.3226 1.98054 11.9098 2.00113C9.25763 1.9945 6.71146 3.04171 4.83141 4.91238C2.95135 6.78306 1.89143 9.32396 1.8848 11.9761C1.87817 14.6283 2.92538 17.1745 4.79605 19.0545C6.66673 20.9346 9.20763 21.9945 11.8598 22.0011C12.4313 22.0108 12.9898 21.8305 13.4477 21.4884C13.9057 21.1464 14.237 20.6619 14.3898 20.1111C14.4872 19.7134 14.4862 19.2979 14.3869 18.9006C14.2875 18.5033 14.0929 18.1362 13.8198 17.8311C13.7562 17.7594 13.7146 17.6709 13.7 17.5761C13.6854 17.4814 13.6984 17.3845 13.7374 17.2969C13.7765 17.2094 13.8399 17.1349 13.9201 17.0825C14.0003 17.03 14.0939 17.0018 14.1898 17.0011H15.8398C17.3927 17.0084 18.8909 16.4279 20.0336 15.3761C21.1762 14.3244 21.8786 12.8794 21.9998 11.3311C22.037 10.1767 21.838 9.02692 21.415 7.95218C20.992 6.87745 20.3539 5.90046 19.5398 5.08113ZM15.8798 15.0011H14.2298C13.7479 14.9984 13.2756 15.1355 12.8701 15.3959C12.4647 15.6563 12.1435 16.0288 11.9455 16.4681C11.7476 16.9075 11.6813 17.3948 11.7549 17.8711C11.8284 18.3473 12.0385 18.792 12.3598 19.1511C12.4224 19.2142 12.4666 19.2932 12.4877 19.3795C12.5088 19.4658 12.5061 19.5562 12.4798 19.6411C12.4298 19.8511 12.1998 19.9811 11.8898 20.0011C10.754 19.9869 9.63429 19.7309 8.60516 19.2502C7.57603 18.7695 6.66109 18.0751 5.92126 17.2132C5.18142 16.3513 4.63365 15.3417 4.31441 14.2516C3.99517 13.1615 3.91178 12.016 4.0698 10.8911C4.35496 9.00107 5.29935 7.27276 6.73593 6.01186C8.17251 4.75096 10.0087 4.03873 11.9198 4.00113H11.9998C13.1306 3.98632 14.253 4.19813 15.3007 4.62407C16.3483 5.05001 17.3001 5.68144 18.0998 6.48113C18.7238 7.10552 19.2141 7.85048 19.5407 8.67057C19.8674 9.49066 20.0236 10.3687 19.9998 11.2511C19.8963 12.2742 19.4184 13.2229 18.6579 13.9151C17.8974 14.6072 16.9081 14.994 15.8798 15.0011Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M11.9996 8.00025C12.3974 8.00025 12.7789 7.84222 13.0602 7.56091C13.3415 7.27961 13.4996 6.89808 13.4996 6.50025C13.4996 6.10243 13.3415 5.7209 13.0602 5.43959C12.7789 5.15829 12.3974 5.00025 11.9996 5.00025C11.6018 5.00025 11.2202 5.15829 10.9389 5.43959C10.6576 5.7209 10.4996 6.10243 10.4996 6.50025C10.4996 6.89808 10.6576 7.27961 10.9389 7.56091C11.2202 7.84222 11.6018 8.00025 11.9996 8.00025Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M15.2496 7.20116C15.079 7.29965 14.9294 7.43079 14.8094 7.58709C14.6895 7.74339 14.6014 7.92179 14.5504 8.1121C14.4994 8.30242 14.4864 8.50092 14.512 8.69627C14.5377 8.89162 14.6016 9.08 14.7001 9.25066C14.7986 9.42131 14.9298 9.57089 15.0861 9.69086C15.2424 9.81084 15.4208 9.89885 15.6111 9.94987C15.8014 10.0009 15.9999 10.0139 16.1952 9.98825C16.3906 9.96256 16.579 9.89865 16.7496 9.80016C17.0944 9.60125 17.3461 9.27352 17.4492 8.88907C17.5524 8.50462 17.4985 8.09494 17.2996 7.75016C17.1007 7.40538 16.773 7.15373 16.3885 7.05059C16.0041 6.94744 15.5944 7.00125 15.2496 7.20016V7.20116Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M8.74976 7.20016C8.57904 7.1018 8.39062 7.03803 8.19526 7.01249C7.99989 6.98695 7.80141 7.00014 7.61114 7.0513C7.42088 7.10247 7.24255 7.19061 7.08634 7.31069C6.93014 7.43077 6.79912 7.58045 6.70076 7.75116C6.6024 7.92188 6.53863 8.1103 6.51308 8.30567C6.48754 8.50103 6.50073 8.69951 6.5519 8.88978C6.60306 9.08005 6.6912 9.25837 6.81128 9.41458C6.93137 9.57078 7.08104 9.7018 7.25176 9.80016C7.59654 9.99881 8.00611 10.0524 8.39037 9.94903C8.77464 9.84569 9.10211 9.59394 9.30076 9.24916C9.4994 8.90438 9.55295 8.49481 9.44962 8.11055C9.34629 7.72629 9.09454 7.39881 8.74976 7.20016Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M6.15933 11.2603C5.9133 11.4264 5.7221 11.6618 5.60993 11.9366C5.49776 12.2115 5.46967 12.5135 5.52921 12.8043C5.58876 13.0951 5.73326 13.3617 5.94443 13.5704C6.1556 13.779 6.42393 13.9204 6.71546 13.9764C7.00698 14.0325 7.30858 14.0008 7.58208 13.8853C7.85557 13.7699 8.08866 13.5759 8.25183 13.3279C8.415 13.0799 8.50091 12.789 8.49868 12.4922C8.49646 12.1953 8.4062 11.9058 8.23933 11.6603C8.12971 11.4966 7.98873 11.3563 7.82454 11.2475C7.66035 11.1387 7.47622 11.0635 7.28279 11.0263C7.08936 10.9891 6.89047 10.9906 6.69763 11.0308C6.5048 11.0709 6.32183 11.1489 6.15933 11.2603Z",fill:"currentColor"})]})}function Fh(e){return(0,t_.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t_.jsx)("path",{d:"M20 15.9998C20.5522 15.9998 20.9999 16.4476 21 16.9998V18.9998C20.9999 19.7952 20.6835 20.5584 20.1211 21.1209C19.5585 21.6833 18.7955 21.9998 18 21.9998H6C5.20446 21.9998 4.44149 21.6833 3.87891 21.1209C3.31646 20.5584 3.00012 19.7952 3 18.9998V16.9998C3.00009 16.4476 3.44777 15.9998 4 15.9998C4.55223 15.9998 4.99991 16.4476 5 16.9998V18.9998C5.00012 19.2648 5.1056 19.5194 5.29297 19.7068C5.48048 19.8942 5.7349 19.9998 6 19.9998H18C18.2651 19.9998 18.5195 19.8942 18.707 19.7068C18.8944 19.5194 18.9999 19.2648 19 18.9998V16.9998C19.0001 16.4476 19.4478 15.9998 20 15.9998Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M11.3691 3.22437C11.7619 2.90402 12.3409 2.92662 12.707 3.29273L17.707 8.29273C18.0973 8.68328 18.0975 9.31635 17.707 9.7068C17.3166 10.097 16.6834 10.097 16.293 9.7068L13 6.41383V15.9998C12.9997 16.5518 12.552 16.9997 12 16.9998C11.4479 16.9998 11.0003 16.5518 11 15.9998V6.41383L7.70703 9.7068C7.31657 10.097 6.68343 10.097 6.29297 9.7068C5.90252 9.31635 5.90268 8.68328 6.29297 8.29273L11.293 3.29273L11.3691 3.22437Z",fill:"currentColor"})]})}function Fp({className:e,...t}){return(0,t_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:BR("size-6",e),...t,children:[(0,t_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0625 1.70412C12.1393 1.70359 12.2136 1.7151 12.2842 1.73439C12.6576 1.76978 13.0261 1.88527 13.3604 2.08303L19.7012 5.84084L19.7031 5.84181C20.1036 6.08032 20.4348 6.42322 20.665 6.83498C20.8952 7.24671 21.0168 7.71415 21.0166 8.19142V8.19338L20.998 15.7403C20.9979 16.1352 20.9124 16.526 20.751 16.8848C20.7319 16.9557 20.7049 17.026 20.667 17.0928C20.6355 17.1482 20.5983 17.1987 20.5576 17.2442C20.3296 17.6 20.023 17.8979 19.6631 18.1133L13.2998 21.9072C12.4738 22.3996 11.4611 22.4004 10.6436 21.917L10.6416 21.916L4.30078 18.1582L4.29883 18.1572C3.91023 17.9258 3.58764 17.5957 3.3584 17.2002C3.35105 17.1885 3.34181 17.1773 3.33496 17.1651C3.32803 17.1526 3.32268 17.1387 3.31641 17.126C3.09976 16.7236 2.98517 16.2703 2.98535 15.8076V15.8057L3.00391 8.25588C3.00603 7.28279 3.51293 6.37777 4.33984 5.88478L10.7021 2.09181C11.0682 1.87369 11.4708 1.75231 11.877 1.72658C11.9365 1.71245 11.999 1.70462 12.0625 1.70412ZM5.16895 7.36818C4.87108 7.54583 4.6844 7.87497 4.68359 8.23635L4.66602 15.3838L9.45801 12.5254C9.51085 12.7718 9.60256 13.0142 9.73535 13.2442C9.90127 13.5315 10.1161 13.7727 10.3633 13.9639L5.49512 16.8662L11.499 20.4248C11.8036 20.6044 12.1738 20.6008 12.4707 20.4238L18.5107 16.8233L13.4971 13.877C13.9543 13.482 14.2391 12.9423 14.3242 12.3672L19.3193 15.3037L19.3379 8.21291L19.3369 8.21388C19.3369 8.03517 19.2923 7.85955 19.2061 7.7051C19.1196 7.55056 18.9947 7.42151 18.8447 7.33205L12.8887 3.80275L12.8535 9.73439C12.3304 9.51037 11.7366 9.46806 11.1738 9.63576L11.21 3.76662L5.16895 7.36818Z",fill:"currentColor"}),(0,t_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.91641 8.60885C11.7928 7.52595 14.1912 8.16845 15.2748 10.0444C16.3582 11.9209 15.7156 14.3211 13.8393 15.4047C11.9627 16.4879 9.56339 15.8446 8.47989 13.9682C7.39671 12.0916 8.03987 9.69227 9.91641 8.60885ZM13.8031 10.894C13.189 9.83118 11.8293 9.46704 10.766 10.0805C9.7026 10.6945 9.33693 12.0551 9.95059 13.1186C10.5646 14.1821 11.9261 14.5469 12.9897 13.9331C14.0529 13.3189 14.4171 11.9575 13.8031 10.894Z",fill:"currentColor"})]})}function Ff({...e}){return(0,t_.jsx)(zR,{"data-slot":"select",...e})}function Fm({...e}){return(0,t_.jsx)(zL,{"data-slot":"select-value",...e})}function Fg({className:e,size:t="default",children:r,...n}){return(0,t_.jsxs)(zP,{"data-slot":"select-trigger","data-size":t,className:BR("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-background-white shadow-sm outline-none transition-colors","border-border-medium","text-text-dark","hover:border-border-dark","focus-visible:border-border-dark","aria-invalid:border-border-red","disabled:cursor-not-allowed disabled:border-border-medium disabled:bg-background-base disabled:opacity-40","data-[size=default]:h-11 data-[size=default]:px-2 data-[size=default]:py-2.5 data-[size=default]:typo-base-16","data-[size=md]:h-9 data-[size=md]:px-2 data-[size=md]:py-2 data-[size=md]:typo-base-14","data-[size=sm]:h-[1.875rem] data-[size=sm]:px-2 data-[size=sm]:typo-base-12","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6 [&_svg:not([class*='text-'])]:text-text-dark",e),...n,children:[r,(0,t_.jsx)(zz,{asChild:!0,children:(0,t_.jsx)(Fu,{className:"size-6"})})]})}function Fv({className:e,children:t,position:r="item-aligned",align:n="center",portalContainer:i,...a}){return(0,t_.jsx)(zF,{container:i,children:(0,t_.jsxs)(zO,{"data-slot":"select-content",className:BR("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border bg-background-white text-text-dark shadow-md","border-border-medium","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:n,...a,children:[(0,t_.jsx)(Fb,{}),(0,t_.jsx)(zJ,{className:BR("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,t_.jsx)(Fy,{})]})})}function FA({className:e,children:t,...r}){return(0,t_.jsxs)(z3,{"data-slot":"select-item",className:BR("relative flex w-full cursor-default select-none items-center gap-2 rounded-md py-2.5 pr-8 pl-3 outline-hidden","typo-base-16 text-text-sub","focus:bg-background-base focus:text-text-dark","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6 [&_svg:not([class*='text-'])]:text-text-dark","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,t_.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-6 items-center justify-center",children:(0,t_.jsx)(z6,{children:(0,t_.jsx)(Fl,{className:"size-5"})})}),(0,t_.jsx)(z5,{children:t})]})}function Fb({className:e,...t}){return(0,t_.jsx)(z7,{"data-slot":"select-scroll-up-button",className:BR("flex cursor-default items-center justify-center py-1",e),...t,children:(0,t_.jsx)(nt,{className:"size-4"})})}function Fy({className:e,...t}){return(0,t_.jsx)(Ft,{"data-slot":"select-scroll-down-button",className:BR("flex cursor-default items-center justify-center py-1",e),...t,children:(0,t_.jsx)(nr,{className:"size-4"})})}Fi.displayName="SelectBubbleInput";var Fw=JSON.parse('{"camera":{"fov":45},"floor":{"z":185.0,"pitchDeg":-87.0,"rollDeg":0},"walls":[{"id":"backWall","z":580.0,"pitchDeg":0,"rollDeg":0},{"id":"rightWall","z":315.0,"pitchDeg":0,"rollDeg":-90.0},{"id":"leftWall","z":560.0,"pitchDeg":0,"rollDeg":55.0},{"id":"ceiling","z":1000.0,"pitchDeg":90.0,"rollDeg":0}]}'),Fx=JSON.parse('{"camera":{"fov":45},"floor":{"z":205.0,"pitchDeg":-87.0,"rollDeg":0},"walls":[{"id":"backWall","z":570.0,"pitchDeg":0,"rollDeg":0},{"id":"rightWall","z":315.0,"pitchDeg":0,"rollDeg":-90.0},{"id":"leftWall","z":1000.0,"pitchDeg":0,"rollDeg":90.0},{"id":"ceiling","z":1000.0,"pitchDeg":90.0,"rollDeg":0}]}'),FC=JSON.parse('{"camera":{"fov":45},"floor":{"z":185.0,"pitchDeg":-90.0,"rollDeg":0},"walls":[{"id":"backWall","z":550.0,"pitchDeg":0,"rollDeg":0},{"id":"rightWall","z":220.0,"pitchDeg":0,"rollDeg":-90.0},{"id":"leftWall","z":218.0,"pitchDeg":0,"rollDeg":90.0},{"id":"ceiling","z":185.0,"pitchDeg":90.0,"rollDeg":0}]}');function FE(e){return{camera:e.camera,sides:[{...e.floor,id:"floor"},...e.walls]}}let FS=[{id:"room-example-1",image:"https://vizbl.com/assets/room-example-1.jpg",config:FE(Fw)},{id:"room-example-2",image:"https://vizbl.com/assets/room-example-2.jpg",config:FE(Fx)},{id:"room-example-3",image:"https://vizbl.com/assets/room-example-3.jpg",config:FE(FC)}],F_=["RcSd3KphTyq_JQEjNCqKQA","gu0109ftQmS-UQkwcW010Q","nOfGLIZcRVeU93wOkHWSbg","ozzH5I2kQMW20ao-33C86A","DBA4wR-zT92vjtuOk9varg"],FM=[{value:.025,label:"2.5 см"},{value:.05,label:"5 см"}],FI=[{value:0,label:"Без паспарту"},{value:.05,label:"5 см"}],FT=(0,tC.createContext)(null);function FB({children:e,poster:t,width:r,height:n,name:i}){let[a,s]=(0,tC.useState)(FS),[o,l]=(0,tC.useState)(FS["0"].id),u=(0,tC.useMemo)(()=>a.find(e=>e.id===o),[a,o]),[c,d]=(0,tC.useState)(null),[h,p]=(0,tC.useState)(FM["0"].value),[f,m]=(0,tC.useState)(FI["0"].value),[g,v]=(0,tC.useState)(0),[A,b]=(0,tC.useState)(!1),[y,w]=(0,tC.useState)(null),x=(0,tC.useRef)(null),C=(0,tC.useMemo)(()=>({poster:t,name:i,rooms:a,setRooms:s,room:u,setRoomId:l,material:c,width:r,height:n,frameWidth:h,matting:f,angle:g,isDragging:A,containerRef:y,setMaterial:d,setFrameWidth:p,setMatting:m,setAngle:v,setIsDragging:b,setContainerRef:w,posterRef:x}),[t,i,a,u,c,r,n,h,f,g,y,A,x]);return(0,t_.jsx)(FT,{value:C,children:e})}function FR(){let e=(0,tC.use)(FT);if(!e)throw Error("useRoomViewer must be used within a RoomViewerProvider");return e}function Fk({className:e,...t}){let{containerRef:r,material:n,setMaterial:i}=FR(),a=function({queries:e,...t},r){let n=(e=>{let t=tC.useContext(rV);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t})(void 0),i=tC.useContext(rq),a=tC.useContext(rX),s=tC.useMemo(()=>e.map(e=>{let t=n.defaultQueryOptions(e);return t._optimisticResults=i?"isRestoring":"optimistic",t}),[e,n,i]);s.forEach(e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!a.isReset()&&(e.retryOnMount=!1)}),tC.useEffect(()=>{a.clearReset()},[a]);let[o]=tC.useState(()=>new rj(n,s,t)),[l,u,c]=o.getOptimisticResult(s,t.combine),d=!i&&!1!==t.subscribed;tC.useSyncExternalStore(tC.useCallback(e=>d?o.subscribe(rr.batchCalls(e)):ra,[o,d]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),tC.useEffect(()=>{o.setQueries(s,t)},[s,t,o]);let h=l.some((e,t)=>rJ(s[t],e))?l.flatMap((e,t)=>{let r=s[t];if(r){let t=new rN(n,r);if(rJ(r,e))return rK(r,t,a);e.isLoading&&e.isFetching&&!i&&rK(r,t,a)}return[]}):[];if(h.length>0)throw Promise.all(h);let p=l.find((e,t)=>{let r=s[t];return r&&(({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>{var a;return e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&void 0===e.data||(a=[e.error,n],"function"==typeof r?r(...a):!!r))})({result:e,errorResetBoundary:a,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(p?.error)throw p.error;return u(c())}({queries:F_.map(e=>({queryKey:((e={})=>[{url:"/obj/Fetch"},...e?[e]:[]])({tinuuid:e}),queryFn:()=>DL({tinuuid:e})}))}),s=(0,tC.useMemo)(()=>a.map(e=>e.data?.materials?.[0]).filter(e=>!!e),[a]);return(0,tC.useEffect)(()=>{null===n&&s.length>0&&i(s[0])},[n,s,i]),(0,t_.jsxs)(DU,{className:BR("w-fit",e),...t,children:[(0,t_.jsx)(DQ,{className:"text-xs text-text-sub font-medium",children:"Material"}),(0,t_.jsxs)(Ff,{value:n?.hid??void 0,onValueChange:e=>{let t=s.find(t=>t.hid===e);t&&i(t)},children:[(0,t_.jsx)(Fg,{className:"w-[145px]",size:"md",children:(0,t_.jsxs)(Fm,{placeholder:"Choose material",children:[(0,t_.jsx)("div",{className:"size-5 rounded-full",style:{backgroundColor:`#${n?.miniature?.color?.hex}`}}),n?.miniature?.color?.name]})}),(0,t_.jsx)(Fv,{portalContainer:r,children:s.map(e=>(0,t_.jsxs)(FA,{value:e.hid,children:[(0,t_.jsx)("div",{className:"size-5 rounded-full",style:{backgroundColor:`#${e?.miniature?.color?.hex}`}}),e.miniature?.color?.name]},e.hid))})]})]})}var FP="rovingFocusGroup.onEntryFocus",FD={bubbles:!1,cancelable:!0},FL="RovingFocusGroup",[Fz,FF,FN]=Dj(FL),[FO,FU]=BF(FL,[FN]),[FQ,FG]=FO(FL),FH=tC.forwardRef((e,t)=>(0,t_.jsx)(Fz.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,t_.jsx)(Fz.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,t_.jsx)(Fj,{...e,ref:t})})}));FH.displayName=FL;var Fj=tC.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,h=tC.useRef(null),p=TM(t,h),f=DW(a),[m,g]=BH({prop:s,defaultProp:o??null,onChange:l,caller:FL}),[v,A]=tC.useState(!1),b=BX(u),y=FF(r),w=tC.useRef(!1),[x,C]=tC.useState(0);return tC.useEffect(()=>{let e=h.current;if(e)return e.addEventListener(FP,b),()=>e.removeEventListener(FP,b)},[b]),(0,t_.jsx)(FQ,{scope:r,orientation:n,dir:f,loop:i,currentTabStopId:m,onItemFocus:tC.useCallback(e=>g(e),[g]),onItemShiftTab:tC.useCallback(()=>A(!0),[]),onFocusableItemAdd:tC.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:tC.useCallback(()=>C(e=>e-1),[]),children:(0,t_.jsx)(Bq.div,{tabIndex:v||0===x?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Bz(e.onMouseDown,()=>{w.current=!0}),onFocus:Bz(e.onFocus,e=>{let t=!w.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(FP,FD);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=y().filter(e=>e.focusable);FX([e.find(e=>e.active),e.find(e=>e.id===m),...e].filter(Boolean).map(e=>e.ref.current),c)}}w.current=!1}),onBlur:Bz(e.onBlur,()=>A(!1))})})}),FV="RovingFocusGroupItem",FW=tC.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...o}=e,l=BQ(),u=a||l,c=FG(FV,r),d=c.currentTabStopId===u,h=FF(r),{onFocusableItemAdd:p,onFocusableItemRemove:f,currentTabStopId:m}=c;return tC.useEffect(()=>{if(n)return p(),()=>f()},[n,p,f]),(0,t_.jsx)(Fz.ItemSlot,{scope:r,id:u,focusable:n,active:i,children:(0,t_.jsx)(Bq.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...o,ref:t,onMouseDown:Bz(e.onMouseDown,e=>{n?c.onItemFocus(u):e.preventDefault()}),onFocus:Bz(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Bz(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void c.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return Fq[i]}(e,c.orientation,c.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=c.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>FX(i))}}),children:"function"==typeof s?s({isCurrentTabStop:d,hasTabStop:null!=m}):s})})});FW.displayName=FV;var Fq={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function FX(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var FJ="Tabs",[FK,FY]=BF(FJ,[FU]),F$=FU(),[FZ,F0]=FK(FJ),F1=tC.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:o,activationMode:l="automatic",...u}=e,c=DW(o),[d,h]=BH({prop:n,onChange:i,defaultProp:a??"",caller:FJ});return(0,t_.jsx)(FZ,{scope:r,baseId:BQ(),value:d,onValueChange:h,orientation:s,dir:c,activationMode:l,children:(0,t_.jsx)(Bq.div,{dir:c,"data-orientation":s,...u,ref:t})})});F1.displayName=FJ;var F2="TabsList",F3=tC.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...i}=e,a=F0(F2,r),s=F$(r);return(0,t_.jsx)(FH,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:(0,t_.jsx)(Bq.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});F3.displayName=F2;var F4="TabsTrigger",F5=tC.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=F0(F4,r),o=F$(r),l=F9(s.baseId,n),u=F7(s.baseId,n),c=n===s.value;return(0,t_.jsx)(FW,{asChild:!0,...o,focusable:!i,active:c,children:(0,t_.jsx)(Bq.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:t,onMouseDown:Bz(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(n)}),onKeyDown:Bz(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(n)}),onFocus:Bz(e.onFocus,()=>{let e="manual"!==s.activationMode;c||i||!e||s.onValueChange(n)})})})});F5.displayName=F4;var F8="TabsContent",F6=tC.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,o=F0(F8,r),l=F9(o.baseId,n),u=F7(o.baseId,n),c=n===o.value,d=tC.useRef(c);return tC.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t_.jsx)(Re,{present:i||c,children:({present:r})=>(0,t_.jsx)(Bq.div,{"data-state":c?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!r,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:r&&a})})});function F9(e,t){return`${e}-trigger-${t}`}function F7(e,t){return`${e}-content-${t}`}F6.displayName=F8;let Ne=tC.createContext(null),Nt=tC.createContext(null);function Nr({value:e,defaultValue:t,onValueChange:r,...n}){let[i,a]=tC.useState(t),s=e??i,o=tC.useMemo(()=>({value:s}),[s]),l=tC.useCallback(t=>{r?.(t),void 0===e&&a(t)},[r,e]);return(0,t_.jsx)(Ne,{value:o,children:(0,t_.jsx)(F1,{"data-slot":"tabs",value:s,onValueChange:l,...n})})}let Nn=BP("cursor-pointer group inline-flex items-center justify-center shrink-0 whitespace-nowrap outline-none transition-colors relative z-10 rounded-lg text-text-base [&_svg]:text-icons-normal [&_svg]:transition-colors hover:text-text-dark hover:[&_svg]:text-icons-dark active:rounded-lg active:bg-background-base-3 active:text-text-dark active:[&_svg]:text-icons-dark data-[state=active]:rounded-lg data-[state=active]:bg-background-white data-[state=active]:text-text-dark data-[state=active]:[&_svg]:text-icons-dark disabled:pointer-events-none disabled:opacity-50 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",{variants:{size:{default:"h-7 px-2 typo-button-normal [&_svg]:size-4",lg:"h-9 px-3 typo-button-big [&_svg]:size-6"}},defaultVariants:{size:"default"}});function Ni({className:e,children:t,...r}){let n=tC.use(Ne),i=tC.useRef(null),a=tC.useRef(new Map),s=tC.useRef(null),o=tC.useCallback(()=>{let e=s.current;if(!e)return;let t=n?.value;if(!t){e.style.opacity="0";return}let r=i.current,o=a.current.get(t);if(!r||!o){e.style.opacity="0";return}let l=r.getBoundingClientRect(),u=o.getBoundingClientRect(),c=u.left-l.left,d=u.top-l.top,h=l.width-(c+u.width),p=l.height-(d+u.height);e.style.clipPath=`inset(${d}px ${h}px ${p}px ${c}px round 8px)`,e.style.opacity="1"},[n?.value]),l=tC.useCallback((e,t)=>{t?a.current.set(e,t):a.current.delete(e),requestAnimationFrame(o)},[o]);tC.useLayoutEffect(()=>{o()},[o]),tC.useEffect(()=>{let e=i.current;if(!e||"undefined"==typeof ResizeObserver)return;let t=new ResizeObserver(()=>o());t.observe(e);let r=n?.value;if(r){let e=a.current.get(r);e&&t.observe(e)}return()=>{t.disconnect()}},[n?.value,o]);let u=tC.useMemo(()=>({registerTrigger:l}),[l]);return(0,t_.jsx)(F3,{ref:i,"data-slot":"tabs-list",className:BR("relative inline-flex items-center rounded-xl bg-background-base-2 p-1",e),...r,children:(0,t_.jsxs)(Nt,{value:u,children:[(0,t_.jsx)("div",{ref:s,"aria-hidden":!0,"data-slot":"tabs-indicator",className:"pointer-events-none absolute inset-0 z-0 rounded-xl bg-background-white opacity-0 transition-[clip-path,opacity] duration-[250ms] ease-out motion-reduce:transition-none"}),t]})})}function Na({className:e,size:t,children:r,value:n,...i}){let a=tC.use(Nt),s=tC.useRef(null),o=BR("relative z-10 inline-flex items-center justify-center","lg"===t?"gap-1.5":"gap-1");return tC.useLayoutEffect(()=>{if(a&&n)return a.registerTrigger(n,s.current),()=>{a.registerTrigger(n,null)}},[a,n]),(0,t_.jsx)(F5,{ref:s,"data-slot":"tabs-trigger",className:BR(Nn({size:t}),"data-[state=active]:bg-transparent",e),value:n,...i,children:(0,t_.jsx)("span",{"data-slot":"tabs-trigger-content",className:o,children:r})})}function Ns({className:e,...t}){let{matting:r,setMatting:n}=FR();return(0,t_.jsxs)(DU,{className:BR("w-fit",e),...t,children:[(0,t_.jsx)(DQ,{className:"text-xs text-text-sub font-medium",children:"Matting"}),(0,t_.jsx)(Nr,{value:r.toString(),onValueChange:e=>n(Number(e)),children:(0,t_.jsx)(Ni,{children:FI.map(e=>(0,t_.jsx)(Na,{value:e.value.toString(),children:e.label},e.value))})})]})}Ni.displayName=F3.displayName,Na.displayName=F5.displayName,F6.displayName;var No="Radio",[Nl,Nu]=BF(No),[Nc,Nd]=Nl(No),Nh=tC.forwardRef((e,t)=>{let{__scopeRadio:r,name:n,checked:i=!1,required:a,disabled:s,value:o="on",onCheck:l,form:u,...c}=e,[d,h]=tC.useState(null),p=TM(t,e=>h(e)),f=tC.useRef(!1),m=!d||u||!!d.closest("form");return(0,t_.jsxs)(Nc,{scope:r,checked:i,disabled:s,children:[(0,t_.jsx)(Bq.button,{type:"button",role:"radio","aria-checked":i,"data-state":Ng(i),"data-disabled":s?"":void 0,disabled:s,value:o,...c,ref:p,onClick:Bz(e.onClick,e=>{i||l?.(),m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})}),m&&(0,t_.jsx)(Nm,{control:d,bubbles:!f.current,name:n,value:o,checked:i,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Nh.displayName=No;var Np="RadioIndicator",Nf=tC.forwardRef((e,t)=>{let{__scopeRadio:r,forceMount:n,...i}=e,a=Nd(Np,r);return(0,t_.jsx)(Re,{present:n||a.checked,children:(0,t_.jsx)(Bq.span,{"data-state":Ng(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t})})});Nf.displayName=Np;var Nm=tC.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{let s=tC.useRef(null),o=TM(s,a),l=zg(r),u=L6(t);return tC.useEffect(()=>{let e=s.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(l!==r&&t){let i=new Event("click",{bubbles:n});t.call(e,r),e.dispatchEvent(i)}},[l,r,n]),(0,t_.jsx)(Bq.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:o,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Ng(e){return e?"checked":"unchecked"}Nm.displayName="RadioBubbleInput";var Nv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],NA="RadioGroup",[Nb,Ny]=BF(NA,[FU,Nu]),Nw=FU(),Nx=Nu(),[NC,NE]=Nb(NA),NS=tC.forwardRef((e,t)=>{let{__scopeRadioGroup:r,name:n,defaultValue:i,value:a,required:s=!1,disabled:o=!1,orientation:l,dir:u,loop:c=!0,onValueChange:d,...h}=e,p=Nw(r),f=DW(u),[m,g]=BH({prop:a,defaultProp:i??null,onChange:d,caller:NA});return(0,t_.jsx)(NC,{scope:r,name:n,required:s,disabled:o,value:m,onValueChange:g,children:(0,t_.jsx)(FH,{asChild:!0,...p,orientation:l,dir:f,loop:c,children:(0,t_.jsx)(Bq.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":o?"":void 0,dir:f,...h,ref:t})})})});NS.displayName=NA;var N_="RadioGroupItem",NM=tC.forwardRef((e,t)=>{let{__scopeRadioGroup:r,disabled:n,...i}=e,a=NE(N_,r),s=a.disabled||n,o=Nw(r),l=Nx(r),u=tC.useRef(null),c=TM(t,u),d=a.value===i.value,h=tC.useRef(!1);return tC.useEffect(()=>{let e=e=>{Nv.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),(0,t_.jsx)(FW,{asChild:!0,...o,focusable:!s,active:d,children:(0,t_.jsx)(Nh,{disabled:s,required:a.required,checked:d,...l,...i,name:a.name,ref:c,onCheck:()=>a.onValueChange(i.value),onKeyDown:Bz(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Bz(i.onFocus,()=>{h.current&&u.current?.click()})})})});NM.displayName=N_;var NI=tC.forwardRef((e,t)=>{let{__scopeRadioGroup:r,...n}=e,i=Nx(r);return(0,t_.jsx)(Nf,{...i,...n,ref:t})});function NT({className:e,...t}){return(0,t_.jsx)(NS,{"data-slot":"radio-group",className:BR("grid gap-3",e),...t})}function NB({checked:e,className:t,...r}){return(0,t_.jsx)("div",{className:BR("absolute top-1/2 left-1/2 size-6 -translate-x-1/2 -translate-y-1/2","flex items-center justify-center rounded-full",e?"bg-icons-green":"bg-background-base-2",t),...r,children:(0,t_.jsx)(nn,{className:"text-constant-white size-3.5",strokeWidth:3.5})})}function NR({className:e,variant:t="default",...r}){return(0,t_.jsxs)(NM,{"data-slot":"radio-group-item",className:BR("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border transition-[color] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50","check"===t&&"size-6",e),...r,children:["check"===t&&(0,t_.jsx)("div",{className:"relative",children:(0,t_.jsx)(NB,{})}),(0,t_.jsx)(NI,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:"check"===t?(0,t_.jsx)(NB,{checked:!0}):(0,t_.jsx)(ni,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})]})}function Nk({className:e}){let{rooms:t,room:r,setRoomId:n}=FR(),[i,a]=(0,tC.useState)(null),[s,o]=(0,tC.useState)(!0),[l,u]=(0,tC.useState)(!1),[c,d]=(0,tC.useState)(!1),h=(0,tC.useCallback)(e=>{o(e.isBeginning),u(e.isEnd),d(e.isLocked)},[]),p=(0,tC.useCallback)(e=>{a(e),h(e)},[h]);return(0,t_.jsxs)("div",{className:BR("relative w-full overflow-hidden",e),children:[(0,t_.jsx)(NT,{value:r.id,onValueChange:n,children:(0,t_.jsx)(hS,{className:"w-full py-5",slidesPerView:"auto",spaceBetween:12,slidesOffsetBefore:24,slidesOffsetAfter:75,onSwiper:p,onReachBeginning:()=>o(!0),onReachEnd:()=>u(!0),onFromEdge:h,onLock:()=>d(!0),onUnlock:()=>d(!1),onResize:h,children:t.map(e=>(0,t_.jsx)(h_,{className:BR("w-25! h-19! transition-transform duration-200",e.id!==r.id&&"hover:scale-110"),children:(0,t_.jsxs)(DQ,{htmlFor:`room-${e.id}`,className:"relative size-full rounded-[0.75rem] overflow-hidden",children:[(0,t_.jsx)("img",{src:e.image,alt:"",className:"size-full object-cover"}),(0,t_.jsx)(NR,{value:e.id,id:`room-${e.id}`,variant:"check",className:BR("absolute top-1.75 right-1.75",{"sr-only":e.id!==r.id})})]})},e.id))})}),(0,t_.jsxs)(BL,{className:BR("absolute top-1/2 left-8 -translate-y-1/2 z-1",{hidden:s||c}),variant:"contrast",size:"icon",onClick:()=>i?.slidePrev(),children:[(0,t_.jsx)(na,{}),(0,t_.jsx)("span",{className:"sr-only",children:"Previous slide"})]}),(0,t_.jsxs)(BL,{className:BR("absolute top-1/2 right-8 -translate-y-1/2 z-1",{hidden:l||c}),variant:"contrast",size:"icon",onClick:()=>i?.slideNext(),children:[(0,t_.jsx)(ns,{}),(0,t_.jsx)("span",{className:"sr-only",children:"Next slide"})]})]})}function NP({className:e,...t}){return(0,t_.jsxs)("div",{className:BR("grid grid-cols-[1fr_auto] items-end pl-0 overflow-hidden",e),...t,children:[(0,t_.jsx)(Nk,{}),(0,t_.jsxs)("div",{className:"hidden flex-row gap-5 pr-6 pb-5 md:flex",children:[(0,t_.jsx)(Fk,{}),(0,t_.jsx)(Ns,{})]})]})}function ND({className:e,...t}){return(0,t_.jsxs)("div",{className:BR("group inline-flex gap-2 text-sm text-muted-foreground","hover:text-text-dark","transition-colors duration-200 ease-in-out",e),...t,children:[(0,t_.jsx)("div",{className:"size-5 flex items-center justify-center rounded-full bg-icons-light group-hover:bg-icons-red transition-colors duration-200 ease-in-out",children:(0,t_.jsx)(Fp,{className:"size-4.25 text-icons-white"})}),"Powered by Vizbl"]})}function NL({className:e,...t}){let{name:r}=FR();return(0,t_.jsxs)("div",{className:BR("h-16 grid gap-5 items-center px-6 sm:grid-cols-3",e),...t,children:[(0,t_.jsx)("div",{className:"truncate",children:r}),(0,t_.jsx)("div",{className:"hidden justify-center sm:flex",children:(0,t_.jsx)(ND,{})}),(0,t_.jsx)("div",{className:"hidden sm:block"})]})}NI.displayName="RadioGroupIndicator";var Nz="Popover",[NF,NN]=BF(Nz,[ze]),NO=ze(),[NU,NQ]=NF(Nz),NG=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,o=NO(t),l=tC.useRef(null),[u,c]=tC.useState(!1),[d,h]=BH({prop:n,defaultProp:i??!1,onChange:a,caller:Nz});return(0,t_.jsx)(zn,{...o,children:(0,t_.jsx)(NU,{scope:t,contentId:BQ(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:tC.useCallback(()=>h(e=>!e),[h]),hasCustomAnchor:u,onCustomAnchorAdd:tC.useCallback(()=>c(!0),[]),onCustomAnchorRemove:tC.useCallback(()=>c(!1),[]),modal:s,children:r})})};NG.displayName=Nz;var NH="PopoverAnchor";tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NQ(NH,r),a=NO(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:o}=i;return tC.useEffect(()=>(s(),()=>o()),[s,o]),(0,t_.jsx)(za,{...a,...n,ref:t})}).displayName=NH;var Nj="PopoverTrigger",NV=tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NQ(Nj,r),a=NO(r),s=TM(t,i.triggerRef),o=(0,t_.jsx)(Bq.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":N3(i.open),...n,ref:s,onClick:Bz(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:(0,t_.jsx)(za,{asChild:!0,...a,children:o})});NV.displayName=Nj;var NW="PopoverPortal",[Nq,NX]=NF(NW,{forceMount:void 0}),NJ=e=>{let{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=NQ(NW,t);return(0,t_.jsx)(Nq,{scope:t,forceMount:r,children:(0,t_.jsx)(Re,{present:r||a.open,children:(0,t_.jsx)(B7,{asChild:!0,container:i,children:n})})})};NJ.displayName=NW;var NK="PopoverContent",NY=tC.forwardRef((e,t)=>{let r=NX(NK,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,a=NQ(NK,e.__scopePopover);return(0,t_.jsx)(Re,{present:n||a.open,children:a.modal?(0,t_.jsx)(NZ,{...i,ref:t}):(0,t_.jsx)(N0,{...i,ref:t})})});NY.displayName=NK;var N$=Bj("PopoverContent.RemoveScroll"),NZ=tC.forwardRef((e,t)=>{let r=NQ(NK,e.__scopePopover),n=tC.useRef(null),i=TM(t,n),a=tC.useRef(!1);return tC.useEffect(()=>{let e=n.current;if(e)return RK(e)},[]),(0,t_.jsx)(RH,{as:N$,allowPinchZoom:!0,children:(0,t_.jsx)(N1,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bz(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:Bz(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;a.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:Bz(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),N0=tC.forwardRef((e,t)=>{let r=NQ(NK,e.__scopePopover),n=tC.useRef(!1),i=tC.useRef(!1);return(0,t_.jsx)(N1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),N1=tC.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,h=NQ(NK,r),p=NO(r);return Rn(),(0,t_.jsx)(B3,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,t_.jsx)(BY,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:(0,t_.jsx)(zu,{"data-state":N3(h.open),role:"dialog",id:h.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),N2="PopoverClose";function N3(e){return e?"open":"closed"}function N4({...e}){return(0,t_.jsx)(NG,{"data-slot":"popover",...e})}function N5({...e}){return(0,t_.jsx)(NV,{"data-slot":"popover-trigger",...e})}function N8({className:e,align:t="center",sideOffset:r=4,portalContainer:n,...i}){return(0,t_.jsx)(NJ,{container:n,children:(0,t_.jsx)(NY,{"data-slot":"popover-content",align:t,sideOffset:r,className:BR("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...i})})}tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NQ(N2,r);return(0,t_.jsx)(Bq.button,{type:"button",...n,ref:t,onClick:Bz(e.onClick,()=>i.onOpenChange(!1))})}).displayName=N2,tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NO(r);return(0,t_.jsx)(zh,{...i,...n,ref:t})}).displayName="PopoverArrow";var N6=["PageUp","PageDown"],N9=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],N7={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Oe="Slider",[Ot,Or,On]=Dj(Oe),[Oi,Oa]=BF(Oe,[On]),[Os,Oo]=Oi(Oe),Ol=tC.forwardRef((e,t)=>{let{name:r,min:n=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:o=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[n],value:c,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:f,...m}=e,g=tC.useRef(new Set),v=tC.useRef(0),A="horizontal"===s,[b=[],y]=BH({prop:c,defaultProp:u,onChange:e=>{let t=[...g.current];t[v.current]?.focus(),d(e)}}),w=tC.useRef(b);function x(e,t,{commit:r}={commit:!1}){let s,o=(String(a).split(".")[1]||"").length,u=DH(Math.round((Math.round((e-n)/a)*a+n)*(s=Math.pow(10,o)))/s,[n,i]);y((e=[])=>{let n=function(e=[],t,r){let n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,u,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,r)=>e[r+1]-t))>=t;return!0}(n,l*a))return e;{v.current=n.indexOf(u);let t=String(n)!==String(e);return t&&r&&h(n),t?n:e}})}return(0,t_.jsx)(Os,{scope:e.__scopeSlider,name:r,disabled:o,min:n,max:i,valueIndexToChangeRef:v,thumbs:g.current,values:b,orientation:s,form:f,children:(0,t_.jsx)(Ot.Provider,{scope:e.__scopeSlider,children:(0,t_.jsx)(Ot.Slot,{scope:e.__scopeSlider,children:(0,t_.jsx)(A?Od:Oh,{"aria-disabled":o,"data-disabled":o?"":void 0,...m,ref:t,onPointerDown:Bz(m.onPointerDown,()=>{o||(w.current=b)}),min:n,max:i,inverted:p,onSlideStart:o?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let r=e.map(e=>Math.abs(e-t)),n=Math.min(...r);return r.indexOf(n)}(b,e);x(e,t)},onSlideMove:o?void 0:function(e){x(e,v.current)},onSlideEnd:o?void 0:function(){let e=w.current[v.current];b[v.current]!==e&&h(b)},onHomeKeyDown:()=>!o&&x(n,0,{commit:!0}),onEndKeyDown:()=>!o&&x(i,b.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!o){let r=N6.includes(e.key)||e.shiftKey&&N9.includes(e.key),n=v.current;x(b[n]+a*(r?10:1)*t,n,{commit:!0})}}})})})})});Ol.displayName=Oe;var[Ou,Oc]=Oi(Oe,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Od=tC.forwardRef((e,t)=>{let{min:r,max:n,dir:i,inverted:a,onSlideStart:s,onSlideMove:o,onSlideEnd:l,onStepKeyDown:u,...c}=e,[d,h]=tC.useState(null),p=TM(t,e=>h(e)),f=tC.useRef(void 0),m=DW(i),g="ltr"===m,v=g&&!a||!g&&a;function A(e){let t=f.current||d.getBoundingClientRect(),i=OC([0,t.width],v?[r,n]:[n,r]);return f.current=t,i(e-t.left)}return(0,t_.jsx)(Ou,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:(0,t_.jsx)(Op,{dir:m,"data-orientation":"horizontal",...c,ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=A(e.clientX);s?.(t)},onSlideMove:e=>{let t=A(e.clientX);o?.(t)},onSlideEnd:()=>{f.current=void 0,l?.()},onStepKeyDown:e=>{let t=N7[v?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),Oh=tC.forwardRef((e,t)=>{let{min:r,max:n,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:o,onStepKeyDown:l,...u}=e,c=tC.useRef(null),d=TM(t,c),h=tC.useRef(void 0),p=!i;function f(e){let t=h.current||c.current.getBoundingClientRect(),i=OC([0,t.height],p?[n,r]:[r,n]);return h.current=t,i(e-t.top)}return(0,t_.jsx)(Ou,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,t_.jsx)(Op,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);a?.(t)},onSlideMove:e=>{let t=f(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,o?.()},onStepKeyDown:e=>{let t=N7[p?"from-bottom":"from-top"].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),Op=tC.forwardRef((e,t)=>{let{__scopeSlider:r,onSlideStart:n,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:o,onStepKeyDown:l,...u}=e,c=Oo(Oe,r);return(0,t_.jsx)(Bq.span,{...u,ref:t,onKeyDown:Bz(e.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(o(e),e.preventDefault()):N6.concat(N9).includes(e.key)&&(l(e),e.preventDefault())}),onPointerDown:Bz(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),c.thumbs.has(t)?t.focus():n(e)}),onPointerMove:Bz(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Bz(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),Of="SliderTrack",Om=tC.forwardRef((e,t)=>{let{__scopeSlider:r,...n}=e,i=Oo(Of,r);return(0,t_.jsx)(Bq.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...n,ref:t})});Om.displayName=Of;var Og="SliderRange",Ov=tC.forwardRef((e,t)=>{let{__scopeSlider:r,...n}=e,i=Oo(Og,r),a=Oc(Og,r),s=TM(t,tC.useRef(null)),o=i.values.length,l=i.values.map(e=>Ox(e,i.min,i.max)),u=o>1?Math.min(...l):0,c=100-Math.max(...l);return(0,t_.jsx)(Bq.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...n,ref:s,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:c+"%"}})});Ov.displayName=Og;var OA="SliderThumb",Ob=tC.forwardRef((e,t)=>{let r=Or(e.__scopeSlider),[n,i]=tC.useState(null),a=TM(t,e=>i(e)),s=tC.useMemo(()=>n?r().findIndex(e=>e.ref.current===n):-1,[r,n]);return(0,t_.jsx)(Oy,{...e,ref:a,index:s})}),Oy=tC.forwardRef((e,t)=>{var r,n,i,a,s;let o,l,{__scopeSlider:u,index:c,name:d,...h}=e,p=Oo(OA,u),f=Oc(OA,u),[m,g]=tC.useState(null),v=TM(t,e=>g(e)),A=!m||p.form||!!m.closest("form"),b=L6(m),y=p.values[c],w=void 0===y?0:Ox(y,p.min,p.max),x=(r=c,(n=p.values.length)>2?`Value ${r+1} of ${n}`:2===n?["Minimum","Maximum"][r]:void 0),C=b?.[f.size],E=C?(i=C,a=w,s=f.direction,l=OC([0,50],[0,o=i/2]),(o-l(a)*s)*s):0;return tC.useEffect(()=>{if(m)return p.thumbs.add(m),()=>{p.thumbs.delete(m)}},[m,p.thumbs]),(0,t_.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${w}% + ${E}px)`},children:[(0,t_.jsx)(Ot.ItemSlot,{scope:e.__scopeSlider,children:(0,t_.jsx)(Bq.span,{role:"slider","aria-label":e["aria-label"]||x,"aria-valuemin":p.min,"aria-valuenow":y,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...h,ref:v,style:void 0===y?{display:"none"}:e.style,onFocus:Bz(e.onFocus,()=>{p.valueIndexToChangeRef.current=c})})}),A&&(0,t_.jsx)(Ow,{name:d??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:y},c)]})});Ob.displayName=OA;var Ow=tC.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{let i=tC.useRef(null),a=TM(i,n),s=zg(t);return tC.useEffect(()=>{let e=i.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==t&&r){let n=new Event("input",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,t_.jsx)(Bq.input,{style:{display:"none"},...r,ref:a,defaultValue:t})});function Ox(e,t,r){return DH(100/(r-t)*(e-t),[0,100])}function OC(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function OE({className:e,defaultValue:t,value:r,min:n=0,max:i=100,...a}){let s=tC.useMemo(()=>Array.isArray(r)?r:Array.isArray(t)?t:[n,i],[r,t,n,i]);return(0,t_.jsxs)(Ol,{"data-slot":"slider",defaultValue:t,value:r,min:n,max:i,className:BR("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...a,children:[(0,t_.jsx)(Om,{"data-slot":"slider-track",className:BR("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t_.jsx)(Ov,{"data-slot":"slider-range",className:BR("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,t)=>(0,t_.jsx)(Ob,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t))]})}Ow.displayName="RadioBubbleInput";let OS="undefined"==typeof window;function O_(e,{defaultValue:t=!1,initializeWithValue:r=!0}={}){let[n,i]=tC.useState(()=>{if(r)return OS?t:window.matchMedia(e).matches;return t});return tC.useEffect(()=>{let t=window.matchMedia(e),r=()=>{i(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e]),n}let OM=(e,t)=>{if("number"==typeof e){if(3===t)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|240&e)/255,b:(15&e|e<<4&240)/255};if(4===t)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|240&e)/255,alpha:(15&e|e<<4&240)/255};if(6===t)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(255&e)/255};if(8===t)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(255&e)/255}}},OI={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},OT=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,OB="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",OR=`${OB}%`,Ok=`(?:${OB}%|${OB})`,OP=`(?:${OB}%|${OB}|none)`,OD=`(?:${OB}(deg|grad|rad|turn)|${OB})`,OL="\\s*,\\s*";RegExp("^"+OP+"$");let Oz=RegExp(`^rgba?\\(\\s*${OB}${OL}${OB}${OL}${OB}\\s*(?:,\\s*${Ok}\\s*)?\\)$`),OF=RegExp(`^rgba?\\(\\s*${OR}${OL}${OR}${OL}${OR}\\s*(?:,\\s*${Ok}\\s*)?\\)$`),ON=(e="rgb")=>t=>{let r;return void 0!==(t=void 0===(r=t)?void 0:"object"!=typeof r?O9(r):void 0!==r.mode?r:e?{...r,mode:e}:void 0)?t.mode===e?t:OO[t.mode][e]?OO[t.mode][e](t):"rgb"===e?OO[t.mode].rgb(t):OO.rgb[e](OO[t.mode].rgb(t)):void 0},OO={},OU={},OQ=[],OG={},OH=e=>e,Oj=e=>(OO[e.mode]={...OO[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{OO[t]||(OO[t]={}),OO[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(void 0===e.ranges[t]&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);"function"==typeof e.interpolate[t]&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=OH)}),OU[e.mode]=e,(e.parse||[]).forEach(t=>{OV(t,e.mode)}),ON(e.mode)),OV=(e,t)=>{if("string"==typeof e){if(!t)throw Error("'mode' required when 'parser' is a string");OG[e]=t}else"function"==typeof e&&0>OQ.indexOf(e)&&OQ.push(e)},OW=/[^\x00-\x7F]|[a-zA-Z_]/,Oq=/[^\x00-\x7F]|[-\w]/,OX="function",OJ="ident",OK="number",OY="percentage",O$="none",OZ="alpha",O0=0;function O1(e){let t=e[O0],r=e[O0+1];return"-"===t||"+"===t?/\d/.test(r)||"."===r&&/\d/.test(e[O0+2]):"."===t?/\d/.test(r):/\d/.test(t)}function O2(e){if(O0>=e.length)return!1;let t=e[O0];if(OW.test(t))return!0;if("-"===t){if(e.length-O0<2)return!1;let t=e[O0+1];if("-"===t||OW.test(t))return!0}return!1}let O3={deg:1,rad:180/Math.PI,grad:.9,turn:360};function O4(e){let t="";if(("-"===e[O0]||"+"===e[O0])&&(t+=e[O0++]),t+=O5(e),"."===e[O0]&&/\d/.test(e[O0+1])&&(t+=e[O0++]+O5(e)),("e"===e[O0]||"E"===e[O0])&&(("-"===e[O0+1]||"+"===e[O0+1])&&/\d/.test(e[O0+2])?t+=e[O0++]+e[O0++]+O5(e):/\d/.test(e[O0+1])&&(t+=e[O0++]+O5(e))),O2(e)){let r=O8(e);return"deg"===r||"rad"===r||"turn"===r||"grad"===r?{type:"hue",value:t*O3[r]}:void 0}return"%"===e[O0]?(O0++,{type:OY,value:+t}):{type:OK,value:+t}}function O5(e){let t="";for(;/\d/.test(e[O0]);)t+=e[O0++];return t}function O8(e){let t="";for(;O0<e.length&&Oq.test(e[O0]);)t+=e[O0++];return t}function O6(e,t){let r,n=[];for(;e._i<e.length;){if((r=e[e._i++]).type===O$||r.type===OK||r.type===OZ||r.type===OY||t&&"hue"===r.type){n.push(r);continue}if(")"===r.type){if(e._i<e.length)return;continue}return}if(!(n.length<3)&&!(n.length>4)){if(4===n.length){if(n[3].type!==OZ)return;n[3]=n[3].value}return 3===n.length&&n.push({type:O$,value:void 0}),n.every(e=>e.type!==OZ)?n:void 0}}let O9=e=>{let t;if("string"!=typeof e)return;let r=function(e=""){let t,r=e.trim(),n=[];for(O0=0;O0<r.length;){if("\n"===(t=r[O0++])||" "===t||" "===t){for(;O0<r.length&&("\n"===r[O0]||" "===r[O0]||" "===r[O0]);)O0++;continue}if(","===t)return;if(")"===t){n.push({type:")"});continue}if("+"===t){if(O0--,O1(r)){n.push(O4(r));continue}return}if("-"===t){if(O0--,O1(r)){n.push(O4(r));continue}if(O2(r)){n.push({type:OJ,value:O8(r)});continue}return}if("."===t){if(O0--,O1(r)){n.push(O4(r));continue}return}if("/"===t){let e;for(;O0<r.length&&("\n"===r[O0]||" "===r[O0]||" "===r[O0]);)O0++;if(O1(r)&&"hue"!==(e=O4(r)).type){n.push({type:OZ,value:e});continue}if(O2(r)&&"none"===O8(r)){n.push({type:OZ,value:{type:O$,value:void 0}});continue}return}if(/\d/.test(t)){O0--,n.push(O4(r));continue}if(OW.test(t)){O0--,n.push(function(e){let t=O8(e);return"("===e[O0]?(O0++,{type:OX,value:t}):"none"===t?{type:O$,value:void 0}:{type:OJ,value:t}}(r));continue}return}return n}(e),n=r?function(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==OX)return;let n=O6(e,t);if(n)return n.unshift(r.value),n}(r,!0):void 0,i=0,a=OQ.length;for(;i<a;)if(void 0!==(t=OQ[i++](e,n)))return t;return r?function(e){e._i=0;let t=e[e._i++];if(!t||t.type!==OX||"color"!==t.value||(t=e[e._i++]).type!==OJ)return;let r=OG[t.value];if(!r)return;let n={mode:r},i=O6(e,!1);if(!i)return;let a=OU[r].channels;for(let e=0,t,r;e<a.length;e++)t=i[e],r=a[e],t.type!==O$&&(n[r]=t.type===OK?t.value:t.value/100,"alpha"===r&&(n[r]=Math.max(0,Math.min(1,n[r]))));return n}(r):void 0},O7=(ed=(e,t,r)=>e+r*(t-e),e=>{let t=(e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],i=e[r+1];void 0===n&&void 0===i?t.push(void 0):void 0!==n&&void 0!==i?t.push([n,i]):t.push(void 0!==n?[n,n]:[i,i])}return t})(e);return e=>{let r=e*t.length,n=e>=1?t.length-1:Math.max(Math.floor(r),0),i=t[n];return void 0===i?void 0:ed(i[0],i[1],r-n)}}),Ue=e=>{let t=!1,r=e.map(e=>void 0!==e?(t=!0,e):1);return t?r:e},Ut={mode:"rgb",channels:["r","g","b","alpha"],parse:[function(e,t){if(!t||"rgb"!==t[0]&&"rgba"!==t[0])return;let r={mode:"rgb"},[,n,i,a,s]=t;if("hue"!==n.type&&"hue"!==i.type&&"hue"!==a.type)return n.type!==O$&&(r.r=n.type===OK?n.value/255:n.value/100),i.type!==O$&&(r.g=i.type===OK?i.value/255:i.value/100),a.type!==O$&&(r.b=a.type===OK?a.value/255:a.value/100),s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r},e=>{let t;return(t=e.match(OT))?OM(parseInt(t[1],16),t[1].length):void 0},e=>{let t,r={mode:"rgb"};if(t=e.match(Oz))void 0!==t[1]&&(r.r=t[1]/255),void 0!==t[2]&&(r.g=t[2]/255),void 0!==t[3]&&(r.b=t[3]/255);else{if(!(t=e.match(OF)))return;void 0!==t[1]&&(r.r=t[1]/100),void 0!==t[2]&&(r.g=t[2]/100),void 0!==t[3]&&(r.b=t[3]/100)}return void 0!==t[4]?r.alpha=Math.max(0,Math.min(1,t[4]/100)):void 0!==t[5]&&(r.alpha=Math.max(0,Math.min(1,+t[5]))),r},e=>OM(OI[e.toLowerCase()],6),e=>"transparent"===e?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,"srgb"],serialize:"srgb",interpolate:{r:O7,g:O7,b:O7,alpha:{use:O7,fixup:Ue}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Ur=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Un=e=>{let t=Ur(e.r),r=Ur(e.g),n=Ur(e.b),i={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return void 0!==e.alpha&&(i.alpha=e.alpha),i},Ui=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Ua=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"a98",r:Ui(2.0415879038107465*e-.5650069742788597*t-.3447313507783297*r),g:Ui(-.9692436362808798*e+1.8759675015077206*t+.0415550574071756*r),b:Ui(.0134442806320312*e-.1183623922310184*t+1.0151749943912058*r)};return void 0!==n&&(i.alpha=n),i},Us=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Uo=({r:e,g:t,b:r,alpha:n})=>{let i={mode:"lrgb",r:Us(e),g:Us(t),b:Us(r)};return void 0!==n&&(i.alpha=n),i},Ul=e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return void 0!==i&&(a.alpha=i),a},Uu=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):12.92*e},Uc=({r:e,g:t,b:r,alpha:n},i="rgb")=>{let a={mode:i,r:Uu(e),g:Uu(t),b:Uu(r)};return void 0!==n&&(a.alpha=n),a},Ud=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uc({r:3.2409699419045226*e-1.537383177570094*t-.4986107602930034*r,g:-.9692436362808796*e+1.8759675015077204*t+.0415550574071756*r,b:.0556300796969936*e-.2039769588889765*t+1.0569715142428784*r});return void 0!==n&&(i.alpha=n),i},Uh={...Ut,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Ua(Ul(e)),xyz65:Ua},toMode:{rgb:e=>Ud(Un(e)),xyz65:Un}},Up=e=>(e%=360)<0?e+360:e,Uf=e=>{let t;return t=e=>180>=Math.abs(e)?e:e-360*Math.sign(e),e.map((r,n,i)=>{if(void 0===r)return r;let a=Up(r);return 0===n||void 0===e[n-1]?a:t(a-Up(i[n-1]))}).reduce((e,t)=>(e.length&&void 0!==t&&void 0!==e[e.length-1]?e.push(t+e[e.length-1]):e.push(t),e),[])},Um=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ug=Math.PI/180,Uv=180/Math.PI,UA=Um["3"]*Um["4"],Ub=Um["1"]*Um["4"],Uy=Um["1"]*Um["2"]-Um["0"]*Um["3"],Uw=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.s||!t.s)return 0;let r=Up(e.h),n=Math.sin((Up(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*n},Ux=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.c||!t.c)return 0;let r=Up(e.h),n=Math.sin((Up(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*n},UC=e=>{let t=e.reduce((e,t)=>{if(void 0!==t){let r=t*Math.PI/180;e.sin+=Math.sin(r),e.cos+=Math.cos(r)}return e},{sin:0,cos:0}),r=180*Math.atan2(t.sin,t.cos)/Math.PI;return r<0?360+r:r},UE={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:({r:e,g:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(Uy*r+e*UA-t*Ub)/(Uy+UA-Ub),a=r-i,s=(Um["4"]*(t-i)-Um["2"]*a)/Um["3"],o={mode:"cubehelix",l:i,s:0===i||1===i?void 0:Math.sqrt(a*a+s*s)/(Um["4"]*i*(1-i))};return o.s&&(o.h=Math.atan2(s,a)*Uv-120),void 0!==n&&(o.alpha=n),o}},toMode:{rgb:({h:e,s:t,l:r,alpha:n})=>{let i={mode:"rgb"};void 0===r&&(r=0);let a=void 0===t?0:t*r*(1-r),s=Math.cos(e=(void 0===e?0:e+120)*Ug),o=Math.sin(e);return i.r=r+a*(Um["0"]*s+Um["1"]*o),i.g=r+a*(Um["2"]*s+Um["3"]*o),i.b=r+a*(Um["4"]*s+Um["5"]*o),void 0!==n&&(i.alpha=n),i}},interpolate:{h:{use:O7,fixup:Uf},s:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}},US=({l:e,a:t,b:r,alpha:n},i="lch")=>{void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.sqrt(t*t+r*r),s={mode:i,l:e,c:a};return a&&(s.h=Up(180*Math.atan2(r,t)/Math.PI)),void 0!==n&&(s.alpha=n),s},U_=({l:e,c:t,h:r,alpha:n},i="lab")=>{void 0===r&&(r=0);let a={mode:i,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==n&&(a.alpha=n),a},UM={X:.3457/.3585,Y:1,Z:.8251046025104602},UI={X:.3127/.329,Y:1,Z:1.0890577507598784},UT=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,UB=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(e+16)/116,a=t/500+i,s=i-r/200,o={mode:"xyz65",x:UT(a)*UI.X,y:UT(i)*UI.Y,z:UT(s)*UI.Z};return void 0!==n&&(o.alpha=n),o},UR=e=>Ud(UB(e)),Uk=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,UP=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uk(e/UI.X),a=Uk(t/UI.Y),s={mode:"lab65",l:116*a-16,a:500*(i-a),b:200*(a-Uk(r/UI.Z))};return void 0!==n&&(s.alpha=n),s},UD=e=>{let t=UP(Ul(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},UL=26/180*Math.PI,Uz=Math.cos(UL),UF=Math.sin(UL),UN=100/Math.log(1.39),UO=({l:e,c:t,h:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"lab65",l:(Math.exp(e/UN)-1)/.0039},a=(Math.exp(.0435*t*1)-1)/.075,s=a*Math.cos(r/180*Math.PI-UL),o=a*Math.sin(r/180*Math.PI-UL);return i.a=s*Uz-o/.83*UF,i.b=s*UF+o/.83*Uz,void 0!==n&&(i.alpha=n),i},UU=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=t*Uz+r*UF,a=.83*(r*Uz-t*UF),s={mode:"dlch",l:UN/1*Math.log(1+.0039*e),c:Math.log(1+.075*Math.sqrt(i*i+a*a))/.0435};return s.c&&(s.h=Up((Math.atan2(a,i)+UL)/Math.PI*180)),void 0!==n&&(s.alpha=n),s},UQ=e=>UO(US(e,"dlch")),UG=e=>U_(UU(e),"dlab"),UH=RegExp(`^hsla?\\(\\s*${OD}${OL}${OR}${OL}${OR}\\s*(?:,\\s*${Ok}\\s*)?\\)$`),Uj={mode:"hsl",toMode:{rgb:function({h:e,s:t,l:r,alpha:n}){let i;e=Up(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let a=r+t*(r<.5?r:1-r),s=a-(a-r)*2*Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:i={r:a,g:s,b:2*r-a};break;case 1:i={r:s,g:a,b:2*r-a};break;case 2:i={r:2*r-a,g:a,b:s};break;case 3:i={r:2*r-a,g:s,b:a};break;case 4:i={r:s,g:2*r-a,b:a};break;case 5:i={r:a,g:2*r-a,b:s};break;default:i={r:2*r-a,g:2*r-a,b:2*r-a}}return i.mode="rgb",void 0!==n&&(i.alpha=n),i}},fromMode:{rgb:function({r:e,g:t,b:r,alpha:n}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.max(e,t,r),a=Math.min(e,t,r),s={mode:"hsl",s:i===a?0:(i-a)/(1-Math.abs(i+a-1)),l:.5*(i+a)};return i-a!=0&&(s.h=(i===e?(t-r)/(i-a)+(t<r)*6:i===t?(r-e)/(i-a)+2:(e-t)/(i-a)+4)*60),void 0!==n&&(s.alpha=n),s}},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(e,t){if(!t||"hsl"!==t[0]&&"hsla"!==t[0])return;let r={mode:"hsl"},[,n,i,a,s]=t;if(n.type!==O$){if(n.type===OY)return;r.h=n.value}if(i.type!==O$){if("hue"===i.type)return;r.s=i.value/100}if(a.type!==O$){if("hue"===a.type)return;r.l=a.value/100}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r},e=>{let t=e.match(UH);if(!t)return;let r={mode:"hsl"};return void 0!==t[3]?r.h=+t[3]:void 0!==t[1]&&void 0!==t[2]&&(r.h=((e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return 360*e}})(t[1],t[2])),void 0!==t[4]&&(r.s=Math.min(Math.max(0,t[4]/100),1)),void 0!==t[5]&&(r.l=Math.min(Math.max(0,t[5]/100),1)),void 0!==t[6]?r.alpha=Math.max(0,Math.min(1,t[6]/100)):void 0!==t[7]&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r}],serialize:e=>`hsl(${void 0!==e.h?e.h:"none"} ${void 0!==e.s?100*e.s+"%":"none"} ${void 0!==e.l?100*e.l+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O7,fixup:Uf},s:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}};function UV({h:e,s:t,v:r,alpha:n}){let i;e=Up(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:i={r:r,g:r*(1-t*a),b:r*(1-t)};break;case 1:i={r:r*(1-t*a),g:r,b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r,b:r*(1-t*a)};break;case 3:i={r:r*(1-t),g:r*(1-t*a),b:r};break;case 4:i={r:r*(1-t*a),g:r*(1-t),b:r};break;case 5:i={r:r,g:r*(1-t),b:r*(1-t*a)};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",void 0!==n&&(i.alpha=n),i}function UW({r:e,g:t,b:r,alpha:n}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.max(e,t,r),a=Math.min(e,t,r),s={mode:"hsv",s:0===i?0:1-a/i,v:i};return i-a!=0&&(s.h=(i===e?(t-r)/(i-a)+(t<r)*6:i===t?(r-e)/(i-a)+2:(e-t)/(i-a)+4)*60),void 0!==n&&(s.alpha=n),s}let Uq={mode:"hsv",toMode:{rgb:UV},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:UW},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:O7,fixup:Uf},s:O7,v:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}};function UX(e){if(e<0)return 0;let t=Math.pow(e,.012683313515655966);return 1e4*Math.pow(Math.max(0,t-.8359375)/(18.8515625-18.6875*t),6.277394636015326)}function UJ(e){if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),78.84375)}let UK=e=>Math.max(e/203,0),UY=({i:e,t,p:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=UX(e+.008609037037932761*t+.11102962500302593*r),a=UX(e-.00860903703793275*t-.11102962500302599*r),s=UX(e+.5600313357106791*t-.32062717498731885*r),o={mode:"xyz65",x:UK(2.070152218389422*i-1.3263473389671556*a+.2066510476294051*s),y:UK(.3647385209748074*i+.680566024947227*a-.0453045459220346*s),z:UK(-.049747207535812*i-.0492609666966138*a+1.1880659249923042*s)};return void 0!==n&&(o.alpha=n),o},U$=(e=0)=>Math.max(203*e,0),UZ=({x:e,y:t,z:r,alpha:n})=>{let i=U$(e),a=U$(t),s=U$(r),o=UJ(.3592832590121217*i+.6976051147779502*a-.0358915932320289*s),l=UJ(-.1920808463704995*i+1.1004767970374323*a+.0753748658519118*s),u=UJ(.0070797844607477*i+.0748396662186366*a+.8433265453898765*s),c={mode:"itp",i:.5*o+.5*l,t:1.61376953125*o-3.323486328125*l+1.709716796875*u,p:4.378173828125*o-4.24560546875*l-.132568359375*u};return void 0!==n&&(c.alpha=n),c},U0=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),134.03437499999998)},U1=(e=0)=>Math.max(203*e,0),U2=({x:e,y:t,z:r,alpha:n})=>{e=U1(e),t=U1(t);let i=1.15*e-.15*(r=U1(r)),a=.66*t+.34*e,s=U0(.41478972*i+.579999*a+.014648*r),o=U0(-.20151*i+1.120649*a+.0531008*r),l=U0(-.0166008*i+.2648*a+.6684799*r),u=(s+o)/2,c={mode:"jab",j:.44*u/(1-.56*u)-16295499532821565e-27,a:3.524*s-4.066708*o+.542708*l,b:.199076*s+1.096799*o-1.295875*l};return void 0!==n&&(c.alpha=n),c},U3=e=>{if(e<0)return 0;let t=Math.pow(e,.007460772656268216);return 1e4*Math.pow((.8359375-t)/(18.6875*t-18.8515625),6.277394636015326)},U4=({j:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(e+16295499532821565e-27)/(.44+.56*(e+16295499532821565e-27)),a=U3(i+.13860504*t+.058047316*r),s=U3(i-.13860504*t-.058047316*r),o=U3(i-.096019242*t-.8118919*r),l={mode:"xyz65",x:(1.661373024652174*a-.914523081304348*s+.23136208173913045*o)/203,y:(-.3250758611844533*a+1.571847026732543*s-.21825383453227928*o)/203,z:(-.090982811*a-.31272829*s+1.5227666*o)/203};return void 0!==n&&(l.alpha=n),l},U5=e=>{let t=U2(Ul(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},U8=e=>Ud(U4(e)),U6=({j:e,a:t,b:r,alpha:n})=>{void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:i};return i&&(a.h=Up(180*Math.atan2(r,t)/Math.PI)),void 0!==n&&(a.alpha=n),a},U9=({j:e,c:t,h:r,alpha:n})=>{void 0===r&&(r=0);let i={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==n&&(i.alpha=n),i},U7=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,Qe=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(e+16)/116,a=t/500+i,s=i-r/200,o={mode:"xyz50",x:U7(a)*UM.X,y:U7(i)*UM.Y,z:U7(s)*UM.Z};return void 0!==n&&(o.alpha=n),o},Qt=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uc({r:3.1341359569958707*e-1.6173863321612538*t-.4906619460083532*r,g:-.978795502912089*e+1.916254567259524*t+.03344273116131949*r,b:.07195537988411677*e-.2289768264158322*t+1.405386058324125*r});return void 0!==n&&(i.alpha=n),i},Qr=e=>Qt(Qe(e)),Qn=e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return void 0!==i&&(a.alpha=i),a},Qi=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,Qa=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Qi(e/UM.X),a=Qi(t/UM.Y),s={mode:"lab",l:116*a-16,a:500*(i-a),b:200*(a-Qi(r/UM.Z))};return void 0!==n&&(s.alpha=n),s},Qs=e=>{let t=Qa(Qn(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Qo={mode:"lab",toMode:{xyz50:Qe,rgb:Qr},fromMode:{xyz50:Qa,rgb:Qs},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[function(e,t){if(!t||"lab"!==t[0])return;let r={mode:"lab"},[,n,i,a,s]=t;if("hue"!==n.type&&"hue"!==i.type&&"hue"!==a.type)return n.type!==O$&&(r.l=Math.min(Math.max(0,n.value),100)),i.type!==O$&&(r.a=i.type===OK?i.value:125*i.value/100),a.type!==O$&&(r.b=a.type===OK?a.value:125*a.value/100),s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`lab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:O7,a:O7,b:O7,alpha:{use:O7,fixup:Ue}}},Ql={...Qo,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:UB,rgb:UR},fromMode:{xyz65:UP,rgb:UD},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Qu={mode:"lch",toMode:{lab:U_,rgb:e=>Qr(U_(e))},fromMode:{rgb:e=>US(Qs(e)),lab:US},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[function(e,t){if(!t||"lch"!==t[0])return;let r={mode:"lch"},[,n,i,a,s]=t;if(n.type!==O$){if("hue"===n.type)return;r.l=Math.min(Math.max(0,n.value),100)}if(i.type!==O$&&(r.c=Math.max(0,i.type===OK?i.value:150*i.value/100)),a.type!==O$){if(a.type===OY)return;r.h=a.value}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`lch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O7,fixup:Uf},c:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}},Qc={...Qu,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>U_(e,"lab65"),rgb:e=>UR(U_(e,"lab65"))},fromMode:{rgb:e=>US(UD(e),"lch65"),lab65:e=>US(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Qd=({l:e,u:t,v:r,alpha:n})=>{void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:i};return i&&(a.h=Up(180*Math.atan2(r,t)/Math.PI)),void 0!==n&&(a.alpha=n),a},Qh=({l:e,c:t,h:r,alpha:n})=>{void 0===r&&(r=0);let i={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return void 0!==n&&(i.alpha=n),i},Qp=(e,t,r)=>4*e/(e+15*t+3*r),Qf=(e,t,r)=>9*t/(e+15*t+3*r),Qm=Qp(UM.X,UM.Y,UM.Z),Qg=Qf(UM.X,UM.Y,UM.Z),Qv=({x:e,y:t,z:r,alpha:n})=>{let i;void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let a=(i=t/UM.Y)<=.008856451679035631?903.2962962962963*i:116*Math.cbrt(i)-16,s=Qp(e,t,r),o=Qf(e,t,r);isFinite(s)&&isFinite(o)?(s=13*a*(s-Qm),o=13*a*(o-Qg)):a=s=o=0;let l={mode:"luv",l:a,u:s,v:o};return void 0!==n&&(l.alpha=n),l},QA=(eh=UM.X,4*eh/(eh+15*UM.Y+3*UM.Z)),Qb=(ep=UM.X,9*(ef=UM.Y)/(ep+15*ef+3*UM.Z)),Qy=({l:e,u:t,v:r,alpha:n})=>{if(void 0===e&&(e=0),0===e)return{mode:"xyz50",x:0,y:0,z:0};void 0===t&&(t=0),void 0===r&&(r=0);let i=t/(13*e)+QA,a=r/(13*e)+Qb,s=UM.Y*(e<=8?e/903.2962962962963:Math.pow((e+16)/116,3)),o={mode:"xyz50",x:9*i*s/(4*a),y:s,z:s*(12-3*i-20*a)/(4*a)};return void 0!==n&&(o.alpha=n),o},Qw={...Ut,mode:"lrgb",toMode:{rgb:Uc},fromMode:{rgb:Uo},parse:["srgb-linear"],serialize:"srgb-linear"},Qx=({r:e,g:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),s=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),o={mode:"oklab",l:.210454268309314*i+.7936177747023054*a-.0040720430116193*s,a:1.9779985324311684*i-2.42859224204858*a+.450593709617411*s,b:.0259040424655478*i+.7827717124575296*a-.8086757549230774*s};return void 0!==n&&(o.alpha=n),o},QC=e=>{let t=Qx(Uo(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},QE=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),s=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),o={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*a+.2309699031821044*s,g:-1.2684379732850317*i+2.6097573492876887*a-.3413193760026573*s,b:-.0041960761386756*i-.7034186179359362*a+1.7076146940746117*s};return void 0!==n&&(o.alpha=n),o},QS=e=>Uc(QE(e));function Q_(e){return .5*(1.206/1.03*e-.206+Math.sqrt((1.206/1.03*e-.206)*(1.206/1.03*e-.206)+1.206/1.03*.12*e))}function QM(e){return(e*e+.206*e)/(1.206/1.03*(e+.03))}function QI(e,t){let r,n,i,a,s,o,l,u,c,d,h,p,f,m,g,v,A,b=(-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,i=.59662641,a=.75515197,s=.56771245,o=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,i=.08285427,a=.1254107,s=.14503204,o=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,n=-.00915799,i=-1.1513021,a=-.50559606,s=.00692167,o=-.0041960863,l=-.7034186147,u=1.707614701),c=r+n*e+i*t+a*e*e+s*e*t,d=.3963377774*e+.2158037573*t,h=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t,v=o*((f=1+c*d)*f*f)+l*((m=1+c*h)*m*m)+u*((g=1+c*p)*g*g),c-=v*(A=3*d*f*f*o+3*h*m*m*l+3*p*g*g*u)/(A*A-.5*v*(6*d*d*f*o+6*h*h*m*l+6*p*p*g*u))),y=QE({l:1,a:b*e,b:b*t}),w=Math.cbrt(1/Math.max(y.r,y.g,y.b));return[w,w*b]}function QT(e,t,r=null){r||(r=QI(e,t));let n=r[0],i=r[1];return[i/n,i/(1-n)]}function QB(e,t,r){let n=QI(t,r),i=function(e,t,r,n,i,a=null){let s;if(a||(a=QI(e,t)),(r-i)*a[1]-(a[0]-i)*1<=0)s=a[1]*i/(+a[0]+a[1]*(i-r));else{s=a[1]*(i-1)/(+(a[0]-1)+a[1]*(i-r));{let n=r-i,a=.3963377774*e+.2158037573*t,o=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,u=n+ +a,c=n+ +o,d=n+ +l;{let e=i*(1-s)+s*r,t=+s,n=e+t*a,h=e+t*o,p=e+t*l,f=n*n*n,m=h*h*h,g=p*p*p,v=3*u*n*n,A=3*c*h*h,b=3*d*p*p,y=6*u*u*n,w=6*c*c*h,x=6*d*d*p,C=4.0767416621*f-3.3077115913*m+.2309699292*g-1,E=4.0767416621*v-3.3077115913*A+.2309699292*b,S=E/(E*E-.5*C*(4.0767416621*y-3.3077115913*w+.2309699292*x)),_=-C*S,M=-1.2684380046*f+2.6097574011*m-.3413193965*g-1,I=-1.2684380046*v+2.6097574011*A-.3413193965*b,T=I/(I*I-.5*M*(-1.2684380046*y+2.6097574011*w-.3413193965*x)),B=-M*T,R=-.0041960863*f-.7034186147*m+1.707614701*g-1,k=-.0041960863*v-.7034186147*A+1.707614701*b,P=k/(k*k-.5*R*(-.0041960863*y-.7034186147*w+1.707614701*x)),D=-R*P;s+=Math.min(_=S>=0?_:1e6,Math.min(B=T>=0?B:1e6,D=P>=0?D:1e6))}}}return s}(t,r,e,0,e,n),a=QT(t,r,n),s=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),o=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=i/Math.min(e*a[0],(1-e)*a[1]),u=e*s,c=(1-e)*o,d=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return[Math.sqrt(1/(1/((u=.4*e)*u)+1/((c=(1-e)*.8)*c))),d,i]}function QR(e){let t,r=void 0!==e.l?e.l:0,n=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,a={mode:"okhsl",l:Q_(r)};void 0!==e.alpha&&(a.alpha=e.alpha);let s=Math.sqrt(n*n+i*i);if(!s)return a.s=0,a;let[o,l,u]=QB(r,n/s,i/s);if(s<l){let e=.8*o;t=(s-0)/(e+(1-e/l)*(s-0))*.8}else{let e=.2*l*l*1.5625/o;t=.8+.2*((s-l)/(e+(1-e/(u-l))*(s-l)))}return t&&(a.s=t,a.h=Up(180*Math.atan2(i,n)/Math.PI)),a}function Qk(e){let t,r,n,i,a=void 0!==e.h?e.h:0,s=void 0!==e.s?e.s:0,o=void 0!==e.l?e.l:0,l={mode:"oklab",l:QM(o)};if(void 0!==e.alpha&&(l.alpha=e.alpha),!s||1===o)return l.a=l.b=0,l;let u=Math.cos(a/180*Math.PI),c=Math.sin(a/180*Math.PI),[d,h,p]=QB(l.l,u,c);s<.8?(t=1.25*s,r=0,i=1-(n=.8*d)/h):(t=5*(s-.8),r=h,i=1-(n=.2*h*h*1.5625/d)/(p-h));let f=r+t*n/(1-i*t);return l.a=f*u,l.b=f*c,l}let QP={...Uj,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:QR,rgb:e=>QR(QC(e))},toMode:{oklab:Qk,rgb:e=>QS(Qk(e))}};function QD(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,n=void 0!==e.b?e.b:0,i=Math.sqrt(r*r+n*n),a=i?r/i:1,s=i?n/i:1,[o,l]=QT(a,s),u=l/(i+t*l),c=u*t,d=u*i,h=QM(c),p=d*h/c,f=QE({l:h,a:a*p,b:s*p}),m=Math.cbrt(1/Math.max(f.r,f.g,f.b,0));t/=m;let g={mode:"okhsv",s:(i=i/m*Q_(t)/t)?(.5+l)*d/(.5*l+l*(1-.5/o)*d):0,v:(t=Q_(t))?t/c:0};return g.s&&(g.h=Up(180*Math.atan2(n,r)/Math.PI)),void 0!==e.alpha&&(g.alpha=e.alpha),g}function QL(e){let t={mode:"oklab"};void 0!==e.alpha&&(t.alpha=e.alpha);let r=void 0!==e.h?e.h:0,n=void 0!==e.s?e.s:0,i=void 0!==e.v?e.v:0,a=Math.cos(r/180*Math.PI),s=Math.sin(r/180*Math.PI),[o,l]=QT(a,s),u=1-.5/o,c=1-.5*n/(.5+l-l*u*n),d=n*l*.5/(.5+l-l*u*n),h=QM(c),p=d*h/c,f=QE({l:h,a:a*p,b:s*p}),m=Math.cbrt(1/Math.max(f.r,f.g,f.b,0)),g=QM(i*c),v=d*g/c;return t.l=g*m,t.a=v*a*m,t.b=v*s*m,t}let Qz={...Uq,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:QD,rgb:e=>QD(QC(e))},toMode:{oklab:QL,rgb:e=>QS(QL(e))}},QF={...Qo,mode:"oklab",toMode:{lrgb:QE,rgb:QS},fromMode:{lrgb:Qx,rgb:QC},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[function(e,t){if(!t||"oklab"!==t[0])return;let r={mode:"oklab"},[,n,i,a,s]=t;if("hue"!==n.type&&"hue"!==i.type&&"hue"!==a.type)return n.type!==O$&&(r.l=Math.min(Math.max(0,n.type===OK?n.value:n.value/100),1)),i.type!==O$&&(r.a=i.type===OK?i.value:.4*i.value/100),a.type!==O$&&(r.b=a.type===OK?a.value:.4*a.value/100),s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`oklab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},QN={...Qu,mode:"oklch",toMode:{oklab:e=>U_(e,"oklab"),rgb:e=>QS(U_(e,"oklab"))},fromMode:{rgb:e=>US(QC(e),"oklch"),oklab:e=>US(e,"oklch")},parse:[function(e,t){if(!t||"oklch"!==t[0])return;let r={mode:"oklch"},[,n,i,a,s]=t;if(n.type!==O$){if("hue"===n.type)return;r.l=Math.min(Math.max(0,n.type===OK?n.value:n.value/100),1)}if(i.type!==O$&&(r.c=Math.max(0,i.type===OK?i.value:.4*i.value/100)),a.type!==O$){if(a.type===OY)return;r.h=a.value}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`oklch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},QO=e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return void 0!==i&&(a.alpha=i),a},QU=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uc({r:2.4934969119414263*e-.9313836179191242*t-.402710784450717*r,g:-.8294889695615749*e+1.7626640603183465*t+.0236246858419436*r,b:.0358458302437845*e-.0761723892680418*t+.9568845240076871*r},"p3");return void 0!==n&&(i.alpha=n),i},QQ={...Ut,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>QU(Ul(e)),xyz65:QU},toMode:{rgb:e=>Ud(QO(e)),xyz65:QO}},QG=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},QH=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"prophoto",r:QG(1.3457868816471585*e-.2555720873797946*t-.0511018649755453*r),g:QG(-.5446307051249019*e+1.5082477428451466*t+.0205274474364214*r),b:QG(0*e+0*t+1.2119675456389452*r)};return void 0!==n&&(i.alpha=n),i},Qj=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},QV=e=>{let t=Qj(e.r),r=Qj(e.g),n=Qj(e.b),i={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return void 0!==e.alpha&&(i.alpha=e.alpha),i},QW={...Ut,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:QH,rgb:e=>QH(Qn(e))},toMode:{xyz50:QV,rgb:e=>Qt(QV(e))}},Qq=e=>{let t=Math.abs(e);return t>.018053968510807?(Math.sign(e)||1)*(1.09929682680944*Math.pow(t,.45)-(1.09929682680944-1)):4.5*e},QX=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"rec2020",r:Qq(1.7166511879712683*e-.3556707837763925*t-.2533662813736599*r),g:Qq(-.6666843518324893*e+1.6164812366349395*t+.0157685458139111*r),b:Qq(.0176398574453108*e-.0427706132578085*t+.9421031212354739*r)};return void 0!==n&&(i.alpha=n),i},QJ=(e=0)=>{let t=Math.abs(e);return t<.08124285829863151?e/4.5:(Math.sign(e)||1)*Math.pow((t+1.09929682680944-1)/1.09929682680944,1/.45)},QK=e=>{let t=QJ(e.r),r=QJ(e.g),n=QJ(e.b),i={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return void 0!==e.alpha&&(i.alpha=e.alpha),i},QY={...Ut,mode:"rec2020",fromMode:{xyz65:QX,rgb:e=>QX(Ul(e))},toMode:{xyz65:QK,rgb:e=>Ud(QK(e))},parse:["rec2020"],serialize:"rec2020"},Q$=Math.cbrt(.0037930732552754493),QZ=e=>Math.cbrt(e)-Q$,Q0=e=>Math.pow(e+Q$,3),Q1={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:e,y:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Q0(e+t)-.0037930732552754493,a=Q0(t-e)-.0037930732552754493,s=Q0(r+t)-.0037930732552754493,o=Uc({r:11.031566904639861*i-9.866943908131562*a-.16462299650829934*s,g:-3.2541473810744237*i+4.418770377582723*a-.16462299650829934*s,b:-3.6588512867136815*i+2.7129230459360922*a+1.9459282407775895*s});return void 0!==n&&(o.alpha=n),o}},fromMode:{rgb:e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a=QZ(.3*t+.622*r+.078*n+.0037930732552754493),s=QZ(.23*t+.692*r+.078*n+.0037930732552754493),o={mode:"xyb",x:(a-s)/2,y:(a+s)/2,b:QZ(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+.0037930732552754493)-(a+s)/2};return void 0!==i&&(o.alpha=i),o}},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:O7,y:O7,b:O7,alpha:{use:O7,fixup:Ue}}},Q2={mode:"yiq",toMode:{rgb:({y:e,i:t,q:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return void 0!==n&&(i.alpha=n),i}},fromMode:{rgb:({r:e,g:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return void 0!==n&&(i.alpha=n),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:O7,i:O7,q:O7,alpha:{use:O7,fixup:Ue}}};((e=4)=>t=>{let r;return"number"==typeof t?Math.round(t*(r=Math.pow(10,r=e)))/r:t})(2);let Q3=e=>Math.round(255*Math.max(0,Math.min(1,e||0))),Q4=ON("rgb");ON("hsl");let Q5=e=>(e=>{if(void 0!==e)return"#"+(0x1000000|Q3(e.r)<<16|Q3(e.g)<<8|Q3(e.b)).toString(16).slice(1)})(Q4(e));Oj(Uh),Oj(UE),Oj({mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:UQ,rgb:e=>UR(UQ(e))},fromMode:{lab65:UG,rgb:e=>UG(UD(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:O7,a:O7,b:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:UO,dlab:e=>U_(e,"dlab"),rgb:e=>UR(UO(e))},fromMode:{lab65:UU,dlab:e=>US(e,"dlch"),rgb:e=>UU(UD(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:O7,c:O7,h:{use:O7,fixup:Uf},alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}}),Oj({mode:"hsi",toMode:{rgb:function({h:e,s:t,i:r,alpha:n}){let i;e=Up(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1-t)};break;case 1:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1+t*(3/(2-a)-1)),b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r*(1+t*(3/(2-a)-1)),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;case 3:i={r:r*(1-t),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1+t*(3/(2-a)-1))};break;case 4:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3/(2-a)-1))};break;case 5:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",void 0!==n&&(i.alpha=n),i}},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:function({r:e,g:t,b:r,alpha:n}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.max(e,t,r),a=Math.min(e,t,r),s={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return i-a!=0&&(s.h=(i===e?(t-r)/(i-a)+(t<r)*6:i===t?(r-e)/(i-a)+2:(e-t)/(i-a)+4)*60),void 0!==n&&(s.alpha=n),s}},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:O7,fixup:Uf},s:O7,i:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}}),Oj(Uj),Oj(Uq),Oj({mode:"hwb",toMode:{rgb:function({h:e,w:t,b:r,alpha:n}){if(void 0===t&&(t=0),void 0===r&&(r=0),t+r>1){let e=t+r;t/=e,r/=e}return UV({h:e,s:1===r?1:1-t/(1-r),v:1-r,alpha:n})}},fromMode:{rgb:function(e){let t=UW(e);if(void 0===t)return;let r=void 0!==t.s?t.s:0,n=void 0!==t.v?t.v:0,i={mode:"hwb",w:(1-r)*n,b:1-n};return void 0!==t.h&&(i.h=t.h),void 0!==t.alpha&&(i.alpha=t.alpha),i}},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(e,t){if(!t||"hwb"!==t[0])return;let r={mode:"hwb"},[,n,i,a,s]=t;if(n.type!==O$){if(n.type===OY)return;r.h=n.value}if(i.type!==O$){if("hue"===i.type)return;r.w=i.value/100}if(a.type!==O$){if("hue"===a.type)return;r.b=a.value/100}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`hwb(${void 0!==e.h?e.h:"none"} ${void 0!==e.w?100*e.w+"%":"none"} ${void 0!==e.b?100*e.b+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O7,fixup:Uf},w:O7,b:O7,alpha:{use:O7,fixup:Ue}},difference:{h:(e,t)=>{if(void 0===e.h||void 0===t.h)return 0;let r=Up(e.h),n=Up(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r}},average:{h:UC}}),Oj({mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:UY,rgb:e=>Ud(UY(e))},fromMode:{xyz65:UZ,rgb:e=>UZ(Ul(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:O7,t:O7,p:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:U5,xyz65:U2},toMode:{rgb:U8,xyz65:U4},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:O7,a:O7,b:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:U9,rgb:e=>U8(U9(e))},fromMode:{rgb:e=>U6(U5(e)),jab:U6},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:O7,fixup:Uf},c:O7,j:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}}),Oj(Qo),Oj(Ql),Oj(Qu),Oj(Qc),Oj({mode:"lchuv",toMode:{luv:Qh,rgb:e=>Qt(Qy(Qh(e)))},fromMode:{rgb:e=>Qd(Qv(Qn(e))),luv:Qd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:O7,fixup:Uf},c:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}}),Oj(Qw),Oj({mode:"luv",toMode:{xyz50:Qy,rgb:e=>Qt(Qy(e))},fromMode:{xyz50:Qv,rgb:e=>Qv(Qn(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:O7,u:O7,v:O7,alpha:{use:O7,fixup:Ue}}}),Oj(QP),Oj(Qz),Oj(QF);let Q8=Oj(QN);Oj(QQ),Oj(QW),Oj(QY),Oj(Ut),Oj(Q1),Oj({mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Qt,lab:Qa},fromMode:{rgb:Qn,lab:Qe},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:O7,y:O7,z:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"xyz65",toMode:{rgb:Ud,xyz50:e=>{let{x:t,y:r,z:n,alpha:i}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return void 0!==i&&(a.alpha=i),a}},fromMode:{rgb:Ul,xyz50:e=>{let{x:t,y:r,z:n,alpha:i}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return void 0!==i&&(a.alpha=i),a}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:O7,y:O7,z:O7,alpha:{use:O7,fixup:Ue}}}),Oj(Q2);var Q6=TC("../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js");let Q9=/oklch\(([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\)/;function Q7(e,t){let r=e.match(Q9);return r?{l:Number.parseFloat(r[1]),c:Number.parseFloat(r[2]),h:Number.parseFloat(r[3])}:{l:t[0],c:t[1],h:t[2]}}function Ge({data:e,foreground:t,background:r,robustness:n="M",className:i,...a}){let[s,o]=(0,tC.useState)(null);return((0,tC.useEffect)(()=>{(async()=>{try{let i=getComputedStyle(document.documentElement),a=t??i.getPropertyValue("--foreground"),s=r??i.getPropertyValue("--background"),l=Q7(a,[.21,.006,285.885]),u=Q7(s,[.985,0,0]),c=await Q6.toString(e,{type:"svg",color:{dark:Q5(Q8({mode:"oklch",...l})),light:Q5(Q8({mode:"oklch",...u}))},width:200,errorCorrectionLevel:n,margin:0});o(c)}catch(e){console.error(e)}})()},[e,t,r,n]),s)?(0,t_.jsx)("div",{className:BR("size-full","[&_svg]:size-full",i),dangerouslySetInnerHTML:{__html:s},...a}):null}function Gt({className:e,...t}){let{poster:r,width:n,height:i,posterRef:a}=FR(),[s,o]=(0,tC.useState)(""),[l,u]=(0,tC.useState)(""),[c,d]=(0,tC.useState)(!1),[h,p]=(0,tC.useState)(!1),f=(0,tC.useRef)(null),m=(0,tC.useMemo)(()=>{let e=new URL("https://viewer.vizbl.com/poster/app/index.html");return e.searchParams.set("texture",r),e.searchParams.set("texture_width",(100*n).toString()),e.searchParams.set("texture_height",(100*i).toString()),e.toString()},[r,n,i]),g=async()=>{if(a.current){d(!0);try{let e=new fT,t=await e.parseAsync(a.current),r=new File([t],"scene.usdz",{type:"model/vnd.usdz+zip"});o(URL.createObjectURL(r));let n=new fO,i=await n.parseAsync(a.current,{binary:!0}),s=new File([i],"scene.glb",{type:"model/gltf-binary"});u(URL.createObjectURL(s))}finally{d(!1)}}};return(0,tC.useEffect)(()=>{let e=f.current;if(!e)return;let t=async()=>{p(e.canActivateAR)},r=new MutationObserver(t);return r.observe(e,{attributes:!0}),t(),()=>{r.disconnect()}},[]),(0,tC.useEffect)(()=>((""!==s||""!==l)&&f.current?.activateAR(),()=>{(""!==s||""!==l)&&URL.revokeObjectURL(s)}),[s,l]),(0,t_.jsxs)("div",{className:BR(e),...t,children:[h?(0,t_.jsx)(BL,{variant:"contrast",disabled:c,onClick:g,children:"View in place"}):(0,t_.jsxs)("div",{className:"p-4 text-xs text-center text-constant-black bg-constant-white rounded-2xl",children:[(0,t_.jsx)(Ge,{className:"size-22 mb-2",robustness:"L",data:decodeURIComponent(m)}),(0,t_.jsx)("span",{children:"View in place"})]}),(0,t_.jsx)("model-viewer",{ref:f,className:"hidden",src:l,iosSrc:s,reveal:"manual",ar:!0,cameraControls:!0,arModes:"webxr",arScale:"fixed",shadowIntensity:1,interactionPromptThreshold:100})]})}let Gr={width:void 0,height:void 0};function Gn(e,t,r){return e[t]?Array.isArray(e[t])?e[t][0][r]:e[t][r]:"contentBoxSize"===t?e.contentRect["inlineSize"===r?"width":"height"]:void 0}function Gi(e){let{z:t,pitchDeg:r,rollDeg:n}=e,i=_Y(e=>e.camera);return(0,tC.useMemo)(()=>{let e,a,s,o,l,u,c,d;return e=new nV,a=new nV,s=new nj,o=new nV(1,0,0),l=new nV(0,1,0),u=new nV(0,0,1),c=nG.degToRad(r),d=nG.degToRad(n),e.copy(u).applyAxisAngle(o,c).applyAxisAngle(l,d).normalize(),a.copy(e).applyQuaternion(i.quaternion).normalize(),s.setFromUnitVectors(u,a),{position:i.position.clone().addScaledVector(a,-(.01*t)).toArray(),quaternion:s.toArray()}},[t,r,n])}function Ga({ref:e,z:t,pitchDeg:r,rollDeg:n}){let i=_0(uU,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPaklEQVR4Ae2dsXFcyQ5FpV+yFIFiUBSTgTw6jEIZMIONgs54TIYxKAK5+oVf9acu4ezgNR4g9Jx1dlDqBzQOGrdAC58vl8ufT43/PT09NUb/9Ol6vbbGJ3/q3/kA/9MZnNgQgEAvAQSglz/RIdBKAAFoxU9wCPQSQAB6+RMdAq0EEIBW/ASHQC8BBKCXP9Eh0EoAAWjFT3AI9BJAAHr5Ex0CrQQQgFb8BIdALwEEoJc/0SHQSgABaMVPcAj0ElgWgNf3n60Z/Hr50Rr//etra/yXH835v35tzf/Xj5fW+K8/31vj/3hZy39ZAFqzJzgEILBEAAFYwsfHEJhN4MuR6/uxX+3n7/8ccRn6xo/9an97eQv5OnLYj/1qf//9fMRl6Bs/9qv98laQvxv738X+/vw7lMuRw37sV/vb28sRl6Fv/Niv9vM/30O+jhz2Y7/ab8E/CQ4JgDa5Nb/aRxKKfqNNbs2vdtTXkfPa5Nb8ah/xF/1Gm9yaX+2oryPntcmt+dU+4i/6jTa5Nb/aUV9HzmuTW/OrfcRf9Bttcmt+taO++BMgSozzENiIAAKwUTFJBQJRAssCUD3++wSrx38fv3r89/Grx38fv3r89/Grx38fv3r89/FXxn/ztSwA/kLYEIDAHAIIwJxacVMIpBNAANKR4hACcwggAHNqxU0hkE4AAUhHikMIzCGAAMypFTeFQDoBBCAdKQ4hMIcAAjCnVtwUAukEEIB0pDiEwBwCCMCcWnFTCKQTQADSkeIQAnMIIABzasVNIZBO4Av76dlPn/6qAg6v12vgdP7RR3//TAD5bwqPEBhDAAEYUyouCoF8AghAPlM8QmAMAQRgTKm4KATyCSAA+UzxCIExBBCAMaXiohDIJ4AA5DPFIwTGEEAAxpSKi0IgnwACkM8UjxAYQwABGFMqLgqBfAIIQD5TPEJgDIFlAdDFnB1Z62LOjvi6mLMjvi7m7Iivizk74utizo74upizI/5q/ssC0JE0MSEAgRwCCEAOR7xAYCSBQ+vB/divdsWuPj/2q12xq8+P/WpX7OrzY7/aFbv6/NivdsWuPj/2ql2xq8+P/Wqv7uq7R0U0XzuvdjT/QwKgTW7Nr/Y9Caye0Sa35ld71fc932uTW/Orfc/3q2e0ya351V71fc/32uTW/Grf8/3qGX3k9vjVXvV9z/fa5Nb8at/z/eoZzXc1f/4EWK0G30NgMAEEYHDxuDoEVgksC0D1+O8Trh7/ffzq8d/Hrx7/ffzq8d/H13HY/1uFXT3++5xW818WAH8hbAhAYA4BBGBOrbgpBNIJIADpSHEIgTkEEIA5teKmEEgngACkI8UhBOYQQADm1IqbQiCdAAKQjhSHEJhDAAGYUytuCoF0AghAOlIcQmAOAQRgTq24KQTSCSAA6UhxCIE5BBCAObXiphBIJ/D5crn8SfcacPjo+9nJ/ynwWvKPXq/XfKcBj931ZwIIFIujENiNAAKwW0XJBwIBAghAABZHIbAbAQRgt4qSDwQCBBCAACyOQmA3AgjAbhUlHwgECCAAAVgchcBuBBCA3SpKPhAIEEAAArA4CoHdCCAAu1WUfCAQIIAABGBxFAK7EVgWAF3M2QFHF3N2xNfFnB3xdTFnR3xdTNkRXxdzdsTvzn+1/ssC0AGdmBCAQA4BBCCHI14gMJLAofXgfuxXu2JXnx/71a7Y1efHfrUrdvX5sU/til19fuxVe3VX3T1d5Md+tSt29Wm+dl+1K/LXelt8taP1PyQA2uTW/Grbhc7+T5vcml/ts2Obf21ya361K+Jrka34alfE10duj1/tivja5Nb8alfE13w78td6r9afPwEqXgwxIPCXEkAA/tLCcC0IVBBYFoDq8d9DqR7/ffzq8d/H13HQ/1uFreNwRTwfo3r89/G781+t/7IAeCDYEIDAHAIIwJxacVMIpBNAANKR4hACcwggAHNqxU0hkE4AAUhHikMIzCGAAMypFTeFQDoBBCAdKQ4hMIcAAjCnVtwUAukEEIB0pDiEwBwCCMCcWnFTCKQTQADSkeIQAnMIIABzasVNIZBO4Ev3fvJH389O/tf0Rx1x+Ojvnwkg8lo4C4HNCCAAmxWUdCAQIYAARGhxFgKbEUAANiso6UAgQgABiNDiLAQ2I4AAbFZQ0oFAhAACEKHFWQhsRgAB2KygpAOBCAEEIEKLsxDYjAACsFlBSQcCEQIIQIQWZyGwGYFlAdDFnB1sdDFnR3xdzNgRXxdTdsTXxZwd8bvz767/6vtfFoCOohMTAhDIIYAA5HDECwRGEji0HtyP/WpX7OrzY4/aFbv6/Nin9uqutntekR971a7YVefHfrUrdvVpvsZL7Yr8td4WX+2K+ut7t/hqR9//MQF4e7O4//vPmr+i6f8fz/6vSVryauu5s35rka34ap8VU/3qI7fHr7aeO+u3Nrk1v9pnxVS/mm9H/lrvjvrre199//wJoC+L3xB4MAIIwIMVnHQhoASWBaB6/NfL228dh/y/Vdg6DlbE8zF0HPb/VmFXj/8+p+78u+u/+v6XBcAXBBsCEJhDAAGYUytuCoF0AghAOlIcQmAOAQRgTq24KQTSCSAA6UhxCIE5BBCAObXiphBIJ4AApCPFIQTmEEAA5tSKm0IgnQACkI4UhxCYQwABmFMrbgqBdAIIQDpSHEJgDgEEYE6tuCkE0gl8vlwuf9K9Bhw++n528n8KvJb8o9frNd9pwGN3/ZkAAsXiKAR2I4AA7FZR8oFAgAACEIDFUQjsRgAB2K2i5AOBAAEEIACLoxDYjQACsFtFyQcCAQIIQAAWRyGwGwEEYLeKkg8EAgQQgAAsjkJgNwIIwG4VJR8IBAggAAFYHIXAbgSWBUAXE3bA0cWMHfF1MWVHfF3M2RG/O//u+ne/f13Me6T+ywJwJCjfQAACfwcBBODvqAO3gEALgUPrwf3Yo/bqrrJ7KPixT+2KXW1+7FW7YledH/vVrtjVp/lavdSuyF/rbfHVrqi/vneLr3bF+/djv9rRXZ2HBECTtOTVNiBn/6dFtuKrfXZs86+P3B6/2hXxtcmt+dWuiK/5duSv9e6ov773jvevTW7Nr3a0/vwJECXGeQhsRAAB2KiYpAKBKIFlAdBxKBo847yOgxn+oj50HI5+m3G+evz3d+7Ov7v+3e9/Zfy3Wi4LgH8Q2BCAwBwCCMCcWnFTCKQTQADSkeIQAnMIIABzasVNIZBOAAFIR4pDCMwhgADMqRU3hUA6AQQgHSkOITCHAAIwp1bcFALpBBCAdKQ4hMAcAgjAnFpxUwikE0AA0pHiEAJzCCAAc2rFTSGQTuBL937yR9/PTv7X9Ecdcfjo758JIPJaOAuBzQggAJsVlHQgECGAAERocRYCmxFAADYrKOlAIEIAAYjQ4iwENiOAAGxWUNKBQIQAAhChxVkIbEYAAdisoKQDgQgBBCBCi7MQ2IwAArBZQUkHAhECCECEFmchsBmBZQHQxYwdbHQxZUd8XczZEb87/+7662LODv66mLMj/vvX16WwywKwFJ2PIQCBVgIIQCt+gkOgl8Ch9eB+7FO7YlebH3vVrthV58d+tSt29Wm+9nzUrshf623x1a6ovx/71a7Y1efHfrVXd/UZz3/7z4/9an///fxvn3/490MCoEW24qv9wftJhj5ye/xqnxTyg1ttcmt+tT8cPMnQfDvy13p31F+b3Jpf7ZOQf3CrTW7Nr/aHgycZ2uTW/GpHQ/InQJQY5yGwEQEEYKNikgoEogSWBUDHwWjwjPM6Dmf4i/qoHv/9/brz765/9fjv+VeP/z7+yvhvvpYFwF8IGwIQmEMAAZhTK24KgXQCCEA6UhxCYA4BBGBOrbgpBNIJIADpSHEIgTkEEIA5teKmEEgngACkI8UhBOYQQADm1IqbQiCdAAKQjhSHEJhDAAGYUytuCoF0AghAOlIcQmAOAQRgTq24KQTSCXy+XC5/0r0GHD76fnbyfwq8lvyj1+s132nAY3f9mQACxeIoBHYjgADsVlHygUCAAAIQgMVRCOxGAAHYraLkA4EAAQQgAIujENiNAAKwW0XJBwIBAghAABZHIbAbAQRgt4qSDwQCBBCAACyOQmA3AgjAbhUlHwgECCAAAVgchcBuBJYFQBdTdsDRxZwd8bvz18WcHfnrYs6O+LqYsyO+LubsiP/r5cdS2GUBWIrOxxCAQCsBBKAVP8Eh0Evg0HpwP/aqXbGrzo/9alfs6tN8rXxqV+Tvx361K3b1+bFf7YpdfX7sV7tiV58f+9Ve3dV3jxz4sV/tby9v97i4nTkkAPrI7fGrffN84g9tcmt+tU8Me3Ot+Xbkr01uza/27ZIn/tAmt+ZX+8SwN9fa5Nb8at8OnfhDm9yaX+0Tw95ca5Nb86t9O3TnD/4EuBMUxyCwIwEEYMeqkhME7iSwLAA6Dt8ZM/VY9fjvL9+df/X47/OvHv99/Orx38evHv99/JXx33wtC4C/EDYEIDCHAAIwp1bcFALpBBCAdKQ4hMAcAgjAnFpxUwikE0AA0pHiEAJzCCAAc2rFTSGQTgABSEeKQwjMIYAAzKkVN4VAOgEEIB0pDiEwhwACMKdW3BQC6QQQgHSkOITAHAIIwJxacVMIpBP40r2f/NH3s5P/Nf1RRxw++vtnAoi8Fs5CYDMCCMBmBSUdCEQIIAARWpyFwGYEEIDNCko6EIgQQAAitDgLgc0IIACbFZR0IBAhgABEaHEWApsRQAA2KyjpQCBCAAGI0OIsBDYjgABsVlDSgUCEAAIQocVZCGxGYFkAdDFnBxtdzNkRXxdzdsTXxZwd8XUxZ0d8XczZEV8Xc3bEf33/uRR2WQCWovMxBCDQSgABaMVPcAj0Eji0HtyP/WpX7OrzY7/aFbv6/NivdsWuPj/2q12xq8+P/WpX7OrzY7/aFbv6/Niv9uquvnvkwI/9aj9//+ceF7czhwRAm9yaX+2b5xN/aJNb86t9Ytiba21ya361b4dO/KFNbs2v9olhb661ya351b4dOvGHNrk1v9onhr251ia35lf7dujEH9rk1vxqR8PyJ0CUGOchsBEBBGCjYpIKBKIElgWgevz3CVaP/z5+9fjv41eP/z5+9fjv41eP/z5+9fjv46+M/+ZrWQD8hbAhAIE5BBCAObXiphBIJ4AApCPFIQTmEEAA5tSKm0IgnQACkI4UhxCYQwABmFMrbgqBdAIIQDpSHEJgDgEEYE6tuCkE0gkgAOlIcQiBOQQQgDm14qYQSCeAAKQjxSEE5hBAAObUiptCIJ3AfwHiG2FWAMZtOgAAAABJRU5ErkJggg=="),{position:a,quaternion:s}=Gi({z:t,pitchDeg:r,rollDeg:n});return(0,tC.useEffect)(()=>{i.wrapS=1e3,i.wrapT=1e3,i.repeat.set(8,8)},[i]),(0,t_.jsxs)("mesh",{ref:e,position:a,quaternion:s,children:[(0,t_.jsx)("planeGeometry",{args:[64,64]}),(0,t_.jsx)("meshStandardMaterial",{map:i,transparent:!0,side:2,opacity:0})]})}function Gs({node:e,position:t,scale:r=[1,1,1],uvScale:n}){let i=(0,tC.useRef)(null);return(0,tC.useEffect)(()=>{if(!i.current||void 0===n)return;let t=i.current.geometry.attributes.uv,r=e.geometry.attributes.uv.array;for(let e=0;e<t.count;e++){let i=r[2*e],a=r[2*e+1];t.setXY(e,i*n,a)}t.needsUpdate=!0},[n,e.geometry]),(0,t_.jsx)(SA,{ref:i,object:e,position:t,scale:r})}function Go({width:e,height:t}){let{material:r}=FR(),{nodes:n}=Mk(r?.native?.glbUrl),i=(0,tC.useMemo)(()=>{let e=new nV,t={};["vizbl0","vizbl1","vizbl2","vizbl3","vizbl4","vizbl5","vizbl6","vizbl7"].forEach(r=>{let i=n[r];if(!i?.geometry)return;let a=i.clone();a.updateMatrixWorld(!0),a.geometry.applyMatrix4(a.matrixWorld),a.position.set(0,0,0),a.rotation.set(0,0,0),a.scale.set(1,1,1),a.updateMatrixWorld(!0),a.geometry.computeBoundingBox(),a.geometry.boundingBox&&(a.geometry.boundingBox.getCenter(e),a.geometry.translate(-e.x,-e.y,-e.z)),a.geometry.computeBoundingBox(),t[r]=a});let r=t.vizbl0;if(!r?.geometry)throw Error("Corner mesh not found");let i=r.geometry.boundingBox,a=i.max.x-i.min.x,s=i.max.y-i.min.y,o={top:0,bottom:0,left:0,right:0},l={top:0,bottom:0,left:0,right:0},u=t.vizbl1;if(u?.geometry){let e=u.geometry.boundingBox;o.top=e.max.x-e.min.x,l.top=e.max.y-e.min.y}let c=t.vizbl3;if(c?.geometry){let e=c.geometry.boundingBox;o.right=e.max.y-e.min.y,l.right=e.max.x-e.min.x}let d=t.vizbl5;if(d?.geometry){let e=d.geometry.boundingBox;o.bottom=e.max.x-e.min.x,l.bottom=e.max.y-e.min.y}let h=t.vizbl7;if(h?.geometry){let e=h.geometry.boundingBox;o.left=e.max.y-e.min.y,l.left=e.max.x-e.min.x}return{cornerSize:{width:a,height:s},barLengths:o,barThickness:l,normalizedNodes:t}},[n]),a=e-2*i.cornerSize.width+.002,s=t-2*i.cornerSize.height+.002,o=a/i.barLengths.top,l=a/i.barLengths.bottom,u=s/i.barLengths.left,c=s/i.barLengths.right;return(0,t_.jsxs)("group",{children:[(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl0,position:[-e/2+i.cornerSize.width/2-.001,t/2-i.cornerSize.height/2+.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl1,position:[0,t/2-i.barThickness.top/2+.001,0],scale:[o,1,1],uvScale:o}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl2,position:[e/2-i.cornerSize.width/2+.001,t/2-i.cornerSize.height/2+.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl3,position:[e/2-i.barThickness.right/2+.001,0,0],scale:[1,c,1],uvScale:c}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl4,position:[e/2-i.cornerSize.width/2+.001,-t/2+i.cornerSize.height/2-.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl5,position:[0,-t/2+i.barThickness.bottom/2-.001,0],scale:[l,1,1],uvScale:l}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl6,position:[-e/2+i.cornerSize.width/2-.001,-t/2+i.cornerSize.height/2-.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl7,position:[-e/2+i.barThickness.left/2-.001,0,0],scale:[1,u,1],uvScale:u})]})}function Gl({width:e,height:t,position:r,quaternion:n}){return(0,t_.jsxs)("mesh",{position:r,quaternion:n,children:[(0,t_.jsx)("planeGeometry",{args:[e,t]}),(0,t_.jsx)("meshStandardMaterial",{color:"white",side:2})]})}function Gu({src:e,position:t,quaternion:r}){let{posterRef:n}=FR(),i=_0(uU,e),{width:a,height:s,material:o,frameWidth:l,matting:u,setIsDragging:c}=FR(),d=a+2*u,h=s+2*u,p=u>0?d:a,f=u>0?h:s;return(0,t_.jsxs)("group",{ref:n,position:t,quaternion:r,onPointerDown:()=>c(!0),onPointerUp:()=>c(!1),onPointerLeave:()=>c(!1),children:[o?.native?.glbUrl&&l>0&&(0,t_.jsx)(Go,{width:p,height:f}),u>0&&(0,t_.jsx)(Gl,{width:d,height:h,position:[0,0,.01]}),(0,t_.jsxs)("mesh",{position:[0,0,.02],children:[(0,t_.jsx)("planeGeometry",{args:[a,s]}),(0,t_.jsx)("meshStandardMaterial",{map:i,side:2})]})]})}function Gc(){let{poster:e,room:t}=FR(),r=_Y(e=>e.get),n=(0,tC.useRef)(new nV),i=(0,tC.useRef)(new Map),a=(0,tC.useRef)([]),s=Gi((0,tC.useMemo)(()=>{let e=t.config.sides.map(e=>Math.abs(e.pitchDeg)+Math.abs(e.rollDeg)),r=Math.min(...e),n=e.indexOf(r);return t.config.sides[n]},[t])),[o,l]=(0,tC.useState)(s);(0,tC.useEffect)(()=>{l(s)},[s]);let u=(0,tC.useCallback)(()=>{let{camera:e,raycaster:t,pointer:i}=r();t.setFromCamera(i,e);let s=t.intersectObjects(a.current);if(s.length>0){let e=s[0],t=e.point.clone();n.current.set(0,0,1).applyQuaternion(e.object.quaternion),t.addScaledVector(n.current,.05),l({position:t.toArray(),quaternion:e.object.quaternion.toArray()})}},[r]);return(0,t_.jsxs)(t_.Fragment,{children:[(0,t_.jsx)(Ik,{autoTransform:!1,onDrag:u,children:(0,t_.jsx)(Gu,{src:e,position:o.position,quaternion:o.quaternion})}),t.config.sides.map(e=>(0,t_.jsx)(Ga,{ref:t=>{let r=i.current;return t&&r.set(e.id,t),a.current=Array.from(r.values()),()=>{r.delete(e.id),a.current=Array.from(r.values())}},z:e.z,pitchDeg:e.pitchDeg,rollDeg:e.rollDeg},e.id))]})}function Gd({className:e,onSizeChange:t,...r}){let{room:n}=FR(),[i,a]=(0,tC.useState)(null),[s,o]=(0,tC.useState)(null),[l,u]=(0,tC.useState)(null),c=(0,tC.useRef)(null),d=O_("(max-width: 639px)"),{width:h,height:p}=function(e){let t,{ref:r,box:n="content-box"}=e,[{width:i,height:a},s]=tC.useState(Gr),o=(t=tC.useRef(!1),tC.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),tC.useCallback(()=>t.current,[])),l=tC.useRef({...Gr}),u=tC.useRef(void 0);return u.current=e.onResize,tC.useEffect(()=>{if(!r.current||"undefined"==typeof window||!("ResizeObserver"in window))return;let e=new ResizeObserver(([e])=>{let t="border-box"===n?"borderBoxSize":"device-pixel-content-box"===n?"devicePixelContentBoxSize":"contentBoxSize",r=Gn(e,t,"inlineSize"),i=Gn(e,t,"blockSize");if(l.current.width!==r||l.current.height!==i){let e={width:r,height:i};l.current.width=r,l.current.height=i,u.current?u.current(e):o()&&s(e)}});return e.observe(r.current,{box:n}),()=>{e.disconnect()}},[n,r,o]),{width:i,height:a}}({ref:c});return(0,tC.useLayoutEffect)(()=>{if(!h||!p||!i)return;let e=h,r=p;d?e=(r=p)*i:h/p>i?e=p*i:r=h/i,o(e),u(r),t?.(e,r)},[d,i,h,p,t]),(0,tC.useEffect)(()=>{let e=new Image;e.onload=()=>{a(Math.round(e.width/e.height*100)/100)},e.src=n.image},[n]),(0,t_.jsx)("div",{ref:c,className:BR("size-full flex items-center justify-center sm:pt-21 sm:pb-12",e),...r,children:(0,t_.jsx)(Ty,{className:"bg-center bg-contain bg-no-repeat",camera:{fov:n.config.camera.fov},gl:{toneMapping:4,toneMappingExposure:1.2,alpha:!0},style:{width:`${s}px`,height:`${l}px`,backgroundImage:`url(${n.image})`},children:(0,t_.jsxs)(tC.Suspense,{fallback:null,children:[(0,t_.jsx)(Tg,{files:["https://vizbl.com/hdr/neutral.hdr"]}),(0,t_.jsx)(Gc,{})]})})})}function Gh({className:e,...t}){let{containerRef:r,angle:n,setAngle:i,isDragging:a}=FR(),s=(0,tC.useRef)(null),o=O_("(max-width: 639px)"),l=(0,tC.useCallback)(()=>{o&&s.current?.centerView()},[o]);return(0,t_.jsxs)("div",{className:BR("relative flex items-center justify-center overflow-hidden",e),...t,children:[(0,t_.jsx)(pH,{ref:s,disabled:a,children:(0,t_.jsx)(pj,{wrapperClass:"size-full!",contentClass:"h-full! min-w-full sm:max-w-full",children:(0,t_.jsx)(Gd,{onSizeChange:l})})}),(0,t_.jsx)(Gt,{className:"absolute bottom-4 left-4 sm:bottom-6 sm:left-6"}),(0,t_.jsxs)("div",{className:"absolute right-4 bottom-4 inline-flex items-center gap-2 sm:right-6 sm:bottom-6",children:[(0,t_.jsxs)(N4,{children:[(0,t_.jsx)(N5,{asChild:!0,children:(0,t_.jsxs)(BL,{variant:"contrast",size:o?"icon":"default",children:[(0,t_.jsx)(Fc,{className:"size-5"}),(0,t_.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Tune position"})]})}),(0,t_.jsx)(N8,{side:"top",align:"end",portalContainer:r,children:(0,t_.jsxs)(DN,{children:[(0,t_.jsxs)(DU,{children:[(0,t_.jsx)(DG,{children:"Angle"}),(0,t_.jsx)(OE,{value:[n],onValueChange:([e])=>i(e),max:75,min:-75,step:1,className:"mt-2 w-full","aria-label":"Angle"})]}),(0,t_.jsx)(BL,{variant:"outline",onClick:()=>{i(0)},children:"Reset"})]})})]}),o&&(0,t_.jsxs)(N4,{children:[(0,t_.jsx)(N5,{asChild:!0,children:(0,t_.jsx)(BL,{variant:"contrast",size:"icon",children:(0,t_.jsx)(Fd,{})})}),(0,t_.jsxs)(N8,{className:"grid gap-5",portalContainer:r,children:[(0,t_.jsx)(Fk,{}),(0,t_.jsx)(Ns,{})]})]}),(0,t_.jsxs)(BL,{variant:"contrast",size:o?"icon":"default",children:[(0,t_.jsx)(Fh,{className:"size-5"}),(0,t_.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Share"})]})]})]})}function Gp(){let{setContainerRef:e}=FR();return(0,t_.jsxs)("div",{ref:e,className:"relative size-full bg-radial from-background-containers to-background-base-2 text-foreground overflow-hidden",children:[(0,t_.jsx)(NL,{className:"absolute top-0 right-0 left-0 z-1"}),(0,t_.jsxs)("div",{className:"size-full max-w-full grid grid-rows-[1fr_auto]",children:[(0,t_.jsx)(Gh,{className:"size-full min-h-0"}),(0,t_.jsx)(NP,{className:"bg-background"})]})]})}let Gf=new r3;function Gm({poster:e,width:t,height:r,name:n,...i}){let[a,s]=(0,tC.useState)(null);return(0,t_.jsxs)(t_.Fragment,{children:[a&&(0,t_.jsx)(kI,{root:a,children:(0,t_.jsx)(kb,{...i,children:(0,t_.jsxs)(kC,{className:"min-w-full h-svh p-0 rounded-none",portalContainer:a,showCloseButton:!1,children:[(0,t_.jsxs)(kE,{className:"sr-only",children:[(0,t_.jsx)(kS,{children:n}),(0,t_.jsx)(k_,{})]}),(0,t_.jsx)(kw,{asChild:!0,children:(0,t_.jsxs)(BL,{className:"absolute top-3 right-6 z-2",variant:"secondary",children:["Close",(0,t_.jsx)(ne,{})]})}),(0,t_.jsx)(rW,{client:Gf,children:(0,t_.jsx)(FB,{poster:e,name:n,width:t,height:r,children:(0,t_.jsx)(Gp,{})})})]})})}),(0,r4.createPortal)((0,t_.jsx)("div",{className:"vizbl-room-viewer",children:(0,t_.jsx)("div",{ref:s})}),document.body)]})}function Gg({trigger:e,...t}){let[r,n]=(0,tC.useState)(!1),i=(0,tC.useCallback)(()=>{n(!0)},[]),a=(0,tC.useCallback)(e=>{n(e)},[]);return(0,tC.useEffect)(()=>(e.addEventListener("click",i),()=>{e.removeEventListener("click",i)}),[e,i]),(0,t_.jsx)(Gm,{open:r,onOpenChange:a,...t})}let Gv=0;var GA=i("../../node_modules/.pnpm/@rsbuild+core@1.6.14/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!../../node_modules/.pnpm/@rsbuild+core@1.6.14/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].use[3]!../react-room-viewer/dist/index.css"),Gb={};Gb.styleTagTransform=hN(),Gb.setAttributes=hD(),Gb.insert=hk().bind(null,"head"),Gb.domAPI=hB(),Gb.insertStyleElement=hz(),hI()(GA.A,Gb),GA.A&&GA.A.locals&&GA.A.locals;let Gy=document.createElement("div");Gy.id="vizbl-room-viewer-dialog-manager",document.body.appendChild(Gy),tS.createRoot(Gy).render((0,tC.createElement)(function(){let[e,t]=(0,tC.useState)([]);return(0,tC.useEffect)(()=>{let e=function(){var e;return(!t7&&(t7=new t3(window.document)),e=t7).observe.apply(e,arguments)}("[data-vizbl-room-viewer-dialog]",{initialize(e){let r=e.getAttribute("data-vizbl-room-viewer-poster"),n=e.getAttribute("data-vizbl-room-viewer-name"),i=e.getAttribute("data-vizbl-room-viewer-width"),a=e.getAttribute("data-vizbl-room-viewer-height");if(!r)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-poster attribute",e);if(!n)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-name attribute",e);if(!i)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-width attribute",e);if(!a)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-height attribute",e);let s=Number(i),o=Number(a);if(Number.isNaN(s))return void console.warn("RoomViewer: data-vizbl-room-viewer-width is not a valid number",e);if(Number.isNaN(o))return void console.warn("RoomViewer: data-vizbl-room-viewer-height is not a valid number",e);let l=Gv++;return{add(){t(t=>[...t,{id:l,trigger:e,poster:r,name:n,width:s,height:o}])},remove(){t(e=>e.filter(e=>e.id!==l))}}}});return()=>{e.abort()}},[]),(0,t_.jsx)(t_.Fragment,{children:e.map(e=>(0,t_.jsx)(Gg,{trigger:e.trigger,poster:e.poster,name:e.name,width:e.width,height:e.height},e.id))})}))})()})();
|
|
1038
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return tC.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},kA=({contentRef:e,descriptionId:t})=>{let r=kg("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return tC.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null};function kb({...e}){return(0,t_.jsx)(R2,{"data-slot":"dialog",...e})}function ky({...e}){return(0,t_.jsx)(R6,{"data-slot":"dialog-portal",...e})}function kw({...e}){return(0,t_.jsx)(kh,{"data-slot":"dialog-close",...e})}function kx({className:e,...t}){return(0,t_.jsx)(R7,{"data-slot":"dialog-overlay",className:BR("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function kC({className:e,children:t,showCloseButton:r=!0,portalContainer:n,...i}){return(0,t_.jsxs)(ky,{"data-slot":"dialog-portal",container:n,children:[(0,t_.jsx)(kx,{}),(0,t_.jsxs)(kn,{"data-slot":"dialog-content",className:BR("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...i,children:[t,r&&(0,t_.jsxs)(kh,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,t_.jsx)(ne,{}),(0,t_.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function kE({className:e,...t}){return(0,t_.jsx)("div",{"data-slot":"dialog-header",className:BR("flex flex-col gap-2 text-center sm:text-left",e),...t})}function kS({className:e,...t}){return(0,t_.jsx)(kl,{"data-slot":"dialog-title",className:BR("text-lg leading-none font-semibold",e),...t})}function k_({className:e,...t}){return(0,t_.jsx)(kc,{"data-slot":"dialog-description",className:BR("text-muted-foreground text-sm",e),...t})}let kM=(0,tC.createContext)({theme:"system",setTheme:()=>null});function kI({children:e,defaultTheme:t="system",storageKey:r="vizbl-theme",root:n=window.document.documentElement,enableStorage:i=!1,...a}){let[s,o]=(0,tC.useState)(()=>i&&localStorage.getItem(r)||t);return(0,tC.useEffect)(()=>{if(n.classList.remove("light","dark"),"system"===s){let e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n.classList.add(e);return}n.classList.add(s)},[s,n]),(0,t_.jsx)(kM,{...a,value:{theme:s,setTheme:e=>{i&&localStorage.setItem(r,e),o(e)}},children:e})}function kT(e,t){return function(){return e.apply(t,arguments)}}let{toString:kB}=Object.prototype,{getPrototypeOf:kR}=Object,{iterator:kk,toStringTag:kP}=Symbol,kD=(eo=Object.create(null),e=>{let t=kB.call(e);return eo[t]||(eo[t]=t.slice(8,-1).toLowerCase())}),kL=e=>(e=e.toLowerCase(),t=>kD(t)===e),kz=e=>t=>typeof t===e,{isArray:kF}=Array,kN=kz("undefined");function kO(e){return null!==e&&!kN(e)&&null!==e.constructor&&!kN(e.constructor)&&kG(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let kU=kL("ArrayBuffer"),kQ=kz("string"),kG=kz("function"),kH=kz("number"),kj=e=>null!==e&&"object"==typeof e,kV=e=>{if("object"!==kD(e))return!1;let t=kR(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(kP in e)&&!(kk in e)},kW=kL("Date"),kq=kL("File"),kX=kL("Blob"),kJ=kL("FileList"),kK=kL("URLSearchParams"),[kY,k$,kZ,k0]=["ReadableStream","Request","Response","Headers"].map(kL);function k1(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),kF(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(kO(e))return;let a=r?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;for(n=0;n<s;n++)i=a[n],t.call(null,e[i],i,e)}}function k2(e,t){let r;if(kO(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let k3="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,k4=e=>!kN(e)&&e!==k3,k5=(el="undefined"!=typeof Uint8Array&&kR(Uint8Array),e=>el&&e instanceof el),k8=kL("HTMLFormElement"),k6=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),k9=kL("RegExp"),k7=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};k1(r,(r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)}),Object.defineProperties(e,n)},Pe=kL("AsyncFunction"),Pt=(ev="function"==typeof setImmediate,eA=kG(k3.postMessage),ev?setImmediate:eA?(eb=`axios@${Math.random()}`,ey=[],k3.addEventListener("message",({source:e,data:t})=>{e===k3&&t===eb&&ey.length&&ey.shift()()},!1),e=>{ey.push(e),k3.postMessage(eb,"*")}):e=>setTimeout(e)),Pr="undefined"!=typeof queueMicrotask?queueMicrotask.bind(k3):"undefined"!=typeof process&&process.nextTick||Pt,Pn={isArray:kF,isArrayBuffer:kU,isBuffer:kO,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||kG(e.append)&&("formdata"===(t=kD(e))||"object"===t&&kG(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&kU(e.buffer)},isString:kQ,isNumber:kH,isBoolean:e=>!0===e||!1===e,isObject:kj,isPlainObject:kV,isEmptyObject:e=>{if(!kj(e)||kO(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:kY,isRequest:k$,isResponse:kZ,isHeaders:k0,isUndefined:kN,isDate:kW,isFile:kq,isBlob:kX,isRegExp:k9,isFunction:kG,isStream:e=>kj(e)&&kG(e.pipe),isURLSearchParams:kK,isTypedArray:k5,isFileList:kJ,forEach:k1,merge:function e(){let{caseless:t,skipUndefined:r}=k4(this)&&this||{},n={},i=(i,a)=>{let s=t&&k2(n,a)||a;kV(n[s])&&kV(i)?n[s]=e(n[s],i):kV(i)?n[s]=e({},i):kF(i)?n[s]=i.slice():r&&kN(i)||(n[s]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k1(arguments[e],i);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(k1(t,(t,n)=>{r&&kG(t)?e[n]=kT(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,a,s,o={};if(t=t||{},null==e)return t;do{for(a=(i=Object.getOwnPropertyNames(e)).length;a-- >0;)s=i[a],(!n||n(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=!1!==r&&kR(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:kD,kindOfTest:kL,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(kF(e))return e;let t=e.length;if(!kH(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[kk]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:k8,hasOwnProperty:k6,hasOwnProp:k6,reduceDescriptors:k7,freezeMethods:e=>{k7(e,(t,r)=>{if(kG(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(kG(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(kF(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:k2,global:k3,isContextDefined:k4,isSpecCompliantForm:function(e){return!!(e&&kG(e.append)&&"FormData"===e[kP]&&e[kk])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(kj(e)){if(t.indexOf(e)>=0)return;if(kO(e))return e;if(!("toJSON"in e)){t[n]=e;let i=kF(e)?[]:{};return k1(e,(e,t)=>{let a=r(e,n+1);kN(a)||(i[t]=a)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:Pe,isThenable:e=>e&&(kj(e)||kG(e))&&kG(e.then)&&kG(e.catch),setImmediate:Pt,asap:Pr,isIterable:e=>null!=e&&kG(e[kk])};function Pi(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}Pn.inherits(Pi,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:Pn.toJSONObject(this.config),code:this.code,status:this.status}}});let Pa=Pi.prototype,Ps={};function Po(e){return Pn.isPlainObject(e)||Pn.isArray(e)}function Pl(e){return Pn.endsWith(e,"[]")?e.slice(0,-2):e}function Pu(e,t,r){return e?e.concat(t).map(function(e,t){return e=Pl(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}["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=>{Ps[e]={value:e}}),Object.defineProperties(Pi,Ps),Object.defineProperty(Pa,"isAxiosError",{value:!0}),Pi.from=(e,t,r,n,i,a)=>{let s=Object.create(Pa);Pn.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);let o=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Pi.call(s,o,l,r,n,i),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};let Pc=Pn.toFlatObject(Pn,{},null,function(e){return/^is[A-Z]/.test(e)}),Pd=function(e,t,r){if(!Pn.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=Pn.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Pn.isUndefined(t[e])})).metaTokens,i=r.visitor||u,a=r.dots,s=r.indexes,o=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Pn.isSpecCompliantForm(t);if(!Pn.isFunction(i))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Pn.isDate(e))return e.toISOString();if(Pn.isBoolean(e))return e.toString();if(!o&&Pn.isBlob(e))throw new Pi("Blob is not supported. Use a Buffer instead.");return Pn.isArrayBuffer(e)||Pn.isTypedArray(e)?o&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,i){let o=e;if(e&&!i&&"object"==typeof e)if(Pn.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var u;if(Pn.isArray(e)&&(u=e,Pn.isArray(u)&&!u.some(Po))||(Pn.isFileList(e)||Pn.endsWith(r,"[]"))&&(o=Pn.toArray(e)))return r=Pl(r),o.forEach(function(e,n){Pn.isUndefined(e)||null===e||t.append(!0===s?Pu([r],n,a):null===s?r:r+"[]",l(e))}),!1}return!!Po(e)||(t.append(Pu(i,r,a),l(e)),!1)}let c=[],d=Object.assign(Pc,{defaultVisitor:u,convertValue:l,isVisitable:Po});if(!Pn.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!Pn.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),Pn.forEach(r,function(r,a){!0===(!(Pn.isUndefined(r)||null===r)&&i.call(t,r,Pn.isString(a)?a.trim():a,n,d))&&e(r,n?n.concat(a):[a])}),c.pop()}}(e),t};function Ph(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Pp(e,t){this._pairs=[],e&&Pd(e,this,t)}let Pf=Pp.prototype;function Pm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pg(e,t,r){let n;if(!t)return e;let i=r&&r.encode||Pm;Pn.isFunction(r)&&(r={serialize:r});let a=r&&r.serialize;if(n=a?a(t,r):Pn.isURLSearchParams(t)?t.toString():new Pp(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}Pf.append=function(e,t){this._pairs.push([e,t])},Pf.toString=function(e){let t=e?function(t){return e.call(this,t,Ph)}:Ph;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let Pv=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Pn.forEach(this.handlers,function(t){null!==t&&e(t)})}},PA={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pb="undefined"!=typeof URLSearchParams?URLSearchParams:Pp,Py="undefined"!=typeof FormData?FormData:null,Pw="undefined"!=typeof Blob?Blob:null,Px="undefined"!=typeof window&&"undefined"!=typeof document,PC="object"==typeof navigator&&navigator||void 0,PE=Px&&(!PC||0>["ReactNative","NativeScript","NS"].indexOf(PC.product)),PS="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,P_=Px&&window.location.href||"http://localhost",PM={...TE,isBrowser:!0,classes:{URLSearchParams:Pb,FormData:Py,Blob:Pw},protocols:["http","https","file","blob","url","data"]},PI=function(e){if(Pn.isFormData(e)&&Pn.isFunction(e.entries)){let t={};return Pn.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){let a=t[i++];if("__proto__"===a)return!0;let s=Number.isFinite(+a),o=i>=t.length;return(a=!a&&Pn.isArray(n)?n.length:a,o)?Pn.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r:(n[a]&&Pn.isObject(n[a])||(n[a]=[]),e(t,r,n[a],i)&&Pn.isArray(n[a])&&(n[a]=function(e){let t,r,n={},i=Object.keys(e),a=i.length;for(t=0;t<a;t++)n[r=i[t]]=e[r];return n}(n[a]))),!s}(Pn.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null},PT={transitional:PA,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=Pn.isObject(e);if(a&&Pn.isHTMLForm(e)&&(e=new FormData(e)),Pn.isFormData(e))return i?JSON.stringify(PI(e)):e;if(Pn.isArrayBuffer(e)||Pn.isBuffer(e)||Pn.isStream(e)||Pn.isFile(e)||Pn.isBlob(e)||Pn.isReadableStream(e))return e;if(Pn.isArrayBufferView(e))return e.buffer;if(Pn.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1){var s,o;return(s=e,o=this.formSerializer,Pd(s,new PM.classes.URLSearchParams,{visitor:function(e,t,r,n){return PM.isNode&&Pn.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...o})).toString()}if((r=Pn.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return Pd(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||i){t.setContentType("application/json",!1);var l=e;if(Pn.isString(l))try{return(0,JSON.parse)(l),Pn.trim(l)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(l)}return e}],transformResponse:[function(e){let t=this.transitional||PT.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Pn.isResponse(e)||Pn.isReadableStream(e))return e;if(e&&Pn.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,this.parseReviver)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw Pi.from(e,Pi.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:PM.classes.FormData,Blob:PM.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Pn.forEach(["delete","get","head","post","put","patch"],e=>{PT.headers[e]={}});let PB=Pn.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"]),PR=Symbol("internals");function Pk(e){return e&&String(e).trim().toLowerCase()}function PP(e){return!1===e||null==e?e:Pn.isArray(e)?e.map(PP):String(e)}function PD(e,t,r,n,i){if(Pn.isFunction(n))return n.call(this,t,r);if(i&&(t=r),Pn.isString(t)){if(Pn.isString(n))return -1!==t.indexOf(n);if(Pn.isRegExp(n))return n.test(t)}}tA=Symbol.iterator,tb=Symbol.toStringTag;class PL{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=Pk(t);if(!i)throw Error("header name must be a non-empty string");let a=Pn.findKey(n,i);a&&void 0!==n[a]&&!0!==r&&(void 0!==r||!1===n[a])||(n[a||t]=PP(e))}let a=(e,t)=>Pn.forEach(e,(e,r)=>i(e,r,t));if(Pn.isPlainObject(e)||e instanceof this.constructor)a(e,t);else{let n;if(Pn.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var s;let r,n,i,o;a((o={},(s=e)&&s.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||o[r]&&PB[r]||("set-cookie"===r?o[r]?o[r].push(n):o[r]=[n]:o[r]=o[r]?o[r]+", "+n:n)}),o),t)}else if(Pn.isObject(e)&&Pn.isIterable(e)){let r={},n,i;for(let t of e){if(!Pn.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?Pn.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=Pk(e)){let r=Pn.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(Pn.isFunction(t))return t.call(this,e,r);if(Pn.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Pk(e)){let r=Pn.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||PD(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=Pk(e)){let i=Pn.findKey(r,e);i&&(!t||PD(r,r[i],i,t))&&(delete r[i],n=!0)}}return Pn.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||PD(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return Pn.forEach(this,(n,i)=>{let a=Pn.findKey(r,i);if(a){t[a]=PP(n),delete t[i];return}let s=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();s!==i&&delete t[i],t[s]=PP(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return Pn.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Pn.isArray(r)?r.join(", "):r)}),t}[tA](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[tb](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[PR]=this[PR]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=Pk(e);if(!t[n]){let i;i=Pn.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return Pn.isArray(e)?e.forEach(n):n(e),this}}function Pz(e,t){let r=this||PT,n=t||r,i=PL.from(n.headers),a=n.data;return Pn.forEach(e,function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function PF(e){return!!(e&&e.__CANCEL__)}function PN(e,t,r){Pi.call(this,null==e?"canceled":e,Pi.ERR_CANCELED,t,r),this.name="CanceledError"}function PO(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Pi("Request failed with status code "+r.status,[Pi.ERR_BAD_REQUEST,Pi.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}PL.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Pn.reduceDescriptors(PL.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Pn.freezeMethods(PL),Pn.inherits(PN,Pi,{__CANCEL__:!0});let PU=function(e,t){let r,n=Array(e=e||10),i=Array(e),a=0,s=0;return t=void 0!==t?t:1e3,function(o){let l=Date.now(),u=i[s];r||(r=l),n[a]=o,i[a]=l;let c=s,d=0;for(;c!==a;)d+=n[c++],c%=e;if((a=(a+1)%e)===s&&(s=(s+1)%e),l-r<t)return;let h=u&&l-u;return h?Math.round(1e3*d/h):void 0}},PQ=function(e,t){let r,n,i=0,a=1e3/t,s=(t,a=Date.now())=>{i=a,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),o=t-i;o>=a?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},a-o)))},()=>r&&s(r)]},PG=(e,t,r=3)=>{let n=0,i=PU(50,250);return PQ(r=>{let a=r.loaded,s=r.lengthComputable?r.total:void 0,o=a-n,l=i(o);n=a,e({loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&a<=s?(s-a)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},PH=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Pj=e=>(...t)=>Pn.asap(()=>e(...t)),PV=PM.hasStandardBrowserEnv?(eu=new URL(PM.origin),ec=PM.navigator&&/(msie|trident)/i.test(PM.navigator.userAgent),e=>(e=new URL(e,PM.origin),eu.protocol===e.protocol&&eu.host===e.host&&(ec||eu.port===e.port))):()=>!0,PW=PM.hasStandardBrowserEnv?{write(e,t,r,n,i,a,s){if("undefined"==typeof document)return;let o=[`${e}=${encodeURIComponent(t)}`];Pn.isNumber(r)&&o.push(`expires=${new Date(r).toUTCString()}`),Pn.isString(n)&&o.push(`path=${n}`),Pn.isString(i)&&o.push(`domain=${i}`),!0===a&&o.push("secure"),Pn.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if("undefined"==typeof document)return null;let t=document.cookie.match(RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Pq(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let PX=e=>e instanceof PL?{...e}:e;function PJ(e,t){t=t||{};let r={};function n(e,t,r,n){return Pn.isPlainObject(e)&&Pn.isPlainObject(t)?Pn.merge.call({caseless:n},e,t):Pn.isPlainObject(t)?Pn.merge({},t):Pn.isArray(t)?t.slice():t}function i(e,t,r,i){return Pn.isUndefined(t)?Pn.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function a(e,t){if(!Pn.isUndefined(t))return n(void 0,t)}function s(e,t){return Pn.isUndefined(t)?Pn.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function o(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}let l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(e,t,r)=>i(PX(e),PX(t),r,!0)};return Pn.forEach(Object.keys({...e,...t}),function(n){let a=l[n]||i,s=a(e[n],t[n],n);Pn.isUndefined(s)&&a!==o||(r[n]=s)}),r}let PK=e=>{let t=PJ({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:o}=t;if(t.headers=s=PL.from(s),t.url=Pg(Pq(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),Pn.isFormData(r)){if(PM.hasStandardBrowserEnv||PM.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Pn.isFunction(r.getHeaders)){let e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}}if(PM.hasStandardBrowserEnv&&(n&&Pn.isFunction(n)&&(n=n(t)),n||!1!==n&&PV(t.url))){let e=i&&a&&PW.read(a);e&&s.set(i,e)}return t},PY="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n;let i,a,s,o,l,u,c=PK(e),d=c.data,h=PL.from(c.headers).normalize(),{responseType:p,onUploadProgress:f,onDownloadProgress:m}=c;function g(){o&&o(),l&&l(),c.cancelToken&&c.cancelToken.unsubscribe(i),c.signal&&c.signal.removeEventListener("abort",i)}let v=new XMLHttpRequest;function A(){if(!v)return;let n=PL.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());PO(function(e){t(e),g()},function(e){r(e),g()},{data:p&&"text"!==p&&"json"!==p?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}v.open(c.method.toUpperCase(),c.url,!0),v.timeout=c.timeout,"onloadend"in v?v.onloadend=A:v.onreadystatechange=function(){!v||4!==v.readyState||(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(A)},v.onabort=function(){v&&(r(new Pi("Request aborted",Pi.ECONNABORTED,e,v)),v=null)},v.onerror=function(t){let n=new Pi(t&&t.message?t.message:"Network Error",Pi.ERR_NETWORK,e,v);n.event=t||null,r(n),v=null},v.ontimeout=function(){let t=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",n=c.transitional||PA;c.timeoutErrorMessage&&(t=c.timeoutErrorMessage),r(new Pi(t,n.clarifyTimeoutError?Pi.ETIMEDOUT:Pi.ECONNABORTED,e,v)),v=null},void 0===d&&h.setContentType(null),"setRequestHeader"in v&&Pn.forEach(h.toJSON(),function(e,t){v.setRequestHeader(t,e)}),Pn.isUndefined(c.withCredentials)||(v.withCredentials=!!c.withCredentials),p&&"json"!==p&&(v.responseType=c.responseType),m&&([s,l]=PG(m,!0),v.addEventListener("progress",s)),f&&v.upload&&([a,o]=PG(f),v.upload.addEventListener("progress",a),v.upload.addEventListener("loadend",o)),(c.cancelToken||c.signal)&&(i=t=>{v&&(r(!t||t.type?new PN(null,e,v):t),v.abort(),v=null)},c.cancelToken&&c.cancelToken.subscribe(i),c.signal&&(c.signal.aborted?i():c.signal.addEventListener("abort",i)));let b=(n=c.url,(u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n))&&u[1]||"");b&&-1===PM.protocols.indexOf(b)?r(new Pi("Unsupported protocol "+b+":",Pi.ERR_BAD_REQUEST,e)):v.send(d||null)})},P$=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},PZ=async function*(e,t){for await(let r of P0(e))yield*P$(r,t)},P0=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},P1=(e,t,r,n)=>{let i,a=PZ(e,t),s=0,o=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await a.next();if(t){o(),e.close();return}let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw o(e),e}},cancel:e=>(o(e),a.return())},{highWaterMark:2})},{isFunction:P2}=Pn,P3=(({Request:e,Response:t})=>({Request:e,Response:t}))(Pn.global),{ReadableStream:P4,TextEncoder:P5}=Pn.global,P8=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},P6=e=>{let t,{fetch:r,Request:n,Response:i}=e=Pn.merge.call({skipUndefined:!0},P3,e),a=r?P2(r):"function"==typeof fetch,s=P2(n),o=P2(i);if(!a)return!1;let l=a&&P2(P4),u=a&&("function"==typeof P5?(t=new P5,e=>t.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer())),c=s&&l&&P8(()=>{let e=!1,t=new n(PM.origin,{body:new P4,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=o&&l&&P8(()=>Pn.isReadableStream(new i("").body)),h={stream:d&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{h[e]||(h[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Pi(`Response type '${e}' is not supported`,Pi.ERR_NOT_SUPPORT,r)})});let p=async e=>{if(null==e)return 0;if(Pn.isBlob(e))return e.size;if(Pn.isSpecCompliantForm(e)){let t=new n(PM.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Pn.isArrayBufferView(e)||Pn.isArrayBuffer(e)?e.byteLength:(Pn.isURLSearchParams(e)&&(e+=""),Pn.isString(e))?(await u(e)).byteLength:void 0},f=async(e,t)=>{let r=Pn.toFiniteNumber(e.getContentLength());return null==r?p(t):r};return async e=>{let t,{url:a,method:o,data:l,signal:u,cancelToken:p,timeout:m,onDownloadProgress:g,onUploadProgress:v,responseType:A,headers:b,withCredentials:y="same-origin",fetchOptions:w}=PK(e),x=r||fetch;A=A?(A+"").toLowerCase():"text";let C=((e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,s();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Pi?t:new PN(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Pi(`timeout ${t} of ms exceeded`,Pi.ETIMEDOUT))},t),s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:o}=n;return o.unsubscribe=()=>Pn.asap(s),o}})([u,p&&p.toAbortSignal()],m),E=null,S=C&&C.unsubscribe&&(()=>{C.unsubscribe()});try{if(v&&c&&"get"!==o&&"head"!==o&&0!==(t=await f(b,l))){let e,r=new n(a,{method:"POST",body:l,duplex:"half"});if(Pn.isFormData(l)&&(e=r.headers.get("content-type"))&&b.setContentType(e),r.body){let[e,n]=PH(t,PG(Pj(v)));l=P1(r.body,65536,e,n)}}Pn.isString(y)||(y=y?"include":"omit");let r=s&&"credentials"in n.prototype,u={...w,signal:C,method:o.toUpperCase(),headers:b.normalize().toJSON(),body:l,duplex:"half",credentials:r?y:void 0};E=s&&new n(a,u);let p=await (s?x(E,w):x(a,u)),m=d&&("stream"===A||"response"===A);if(d&&(g||m&&S)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});let t=Pn.toFiniteNumber(p.headers.get("content-length")),[r,n]=g&&PH(t,PG(Pj(g),!0))||[];p=new i(P1(p.body,65536,r,()=>{n&&n(),S&&S()}),e)}A=A||"text";let _=await h[Pn.findKey(h,A)||"text"](p,e);return!m&&S&&S(),await new Promise((t,r)=>{PO(t,r,{data:_,headers:PL.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:E})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Pi("Network Error",Pi.ERR_NETWORK,e,E),{cause:t.cause||t});throw Pi.from(t,t&&t.code,e,E)}}},P9=new Map,P7=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,a=[n,i,r],s=a.length,o,l,u=P9;for(;s--;)o=a[s],void 0===(l=u.get(o))&&u.set(o,l=s?new Map:P6(t)),u=l;return l};P7();let De={http:null,xhr:PY,fetch:{get:P7}};Pn.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let Dt=e=>`- ${e}`,Dr=e=>Pn.isFunction(e)||null===e||!1===e,Dn=function(e,t){let r,n,{length:i}=e=Pn.isArray(e)?e:[e],a={};for(let s=0;s<i;s++){let i;if(n=r=e[s],!Dr(r)&&void 0===(n=De[(i=String(r)).toLowerCase()]))throw new Pi(`Unknown adapter '${i}'`);if(n&&(Pn.isFunction(n)||(n=n.get(t))))break;a[i||"#"+s]=n}if(!n){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Pi("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(Dt).join("\n"):" "+Dt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Di(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new PN(null,e)}function Da(e){return Di(e),e.headers=PL.from(e.headers),e.data=Pz.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dn(e.adapter||PT.adapter,e)(e).then(function(t){return Di(e),t.data=Pz.call(e,e.transformResponse,t),t.headers=PL.from(t.headers),t},function(t){return!PF(t)&&(Di(e),t&&t.response&&(t.response.data=Pz.call(e,e.transformResponse,t.response),t.response.headers=PL.from(t.response.headers))),Promise.reject(t)})}let Ds={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ds[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let Do={};Ds.transitional=function(e,t,r){function n(e,t){return"[Axios v1.13.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>{if(!1===e)throw new Pi(n(i," has been removed"+(t?" in "+t:"")),Pi.ERR_DEPRECATED);return t&&!Do[i]&&(Do[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}},Ds.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let Dl=function(e,t,r){if("object"!=typeof e)throw new Pi("options must be an object",Pi.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let a=n[i],s=t[a];if(s){let t=e[a],r=void 0===t||s(t,a,e);if(!0!==r)throw new Pi("option "+a+" must be "+r,Pi.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Pi("Unknown option "+a,Pi.ERR_BAD_OPTION)}};class Du{constructor(e){this.defaults=e||{},this.interceptors={request:new Pv,response:new Pv}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:a,headers:s}=t=PJ(this.defaults,t);void 0!==i&&Dl(i,{silentJSONParsing:Ds.transitional(Ds.boolean),forcedJSONParsing:Ds.transitional(Ds.boolean),clarifyTimeoutError:Ds.transitional(Ds.boolean)},!1),null!=a&&(Pn.isFunction(a)?t.paramsSerializer={serialize:a}:Dl(a,{encode:Ds.function,serialize:Ds.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Dl(t,{baseUrl:Ds.spelling("baseURL"),withXsrfToken:Ds.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&Pn.merge(s.common,s[t.method]);s&&Pn.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=PL.concat(o,s);let l=[],u=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(u=u&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d=0;if(!u){let e=[Da.bind(this),void 0];for(e.unshift(...l),e.push(...c),n=e.length,r=Promise.resolve(t);d<n;)r=r.then(e[d++],e[d++]);return r}n=l.length;let h=t;for(;d<n;){let e=l[d++],t=l[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{r=Da.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,n=c.length;d<n;)r=r.then(c[d++],c[d++]);return r}getUri(e){return Pg(Pq((e=PJ(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Pn.forEach(["delete","get","head","options"],function(e){Du.prototype[e]=function(t,r){return this.request(PJ(r||{},{method:e,url:t,data:(r||{}).data}))}}),Pn.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(PJ(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Du.prototype[e]=t(),Du.prototype[e+"Form"]=t(!0)});class Dc{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new PN(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Dc(function(t){e=t}),cancel:e}}}let Dd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Dd).forEach(([e,t])=>{Dd[t]=e});let Dh=function e(t){let r=new Du(t),n=kT(Du.prototype.request,r);return Pn.extend(n,Du.prototype,r,{allOwnKeys:!0}),Pn.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(PJ(t,r))},n}(PT);Dh.Axios=Du,Dh.CanceledError=PN,Dh.CancelToken=Dc,Dh.isCancel=PF,Dh.VERSION="1.13.2",Dh.toFormData=Pd,Dh.AxiosError=Pi,Dh.Cancel=Dh.CanceledError,Dh.all=function(e){return Promise.all(e)},Dh.spread=function(e){return function(t){return e.apply(null,t)}},Dh.isAxiosError=function(e){return Pn.isObject(e)&&!0===e.isAxiosError},Dh.mergeConfig=PJ,Dh.AxiosHeaders=PL,Dh.formToJSON=e=>PI(Pn.isHTMLForm(e)?new FormData(e):e),Dh.getAdapter=Dn,Dh.HttpStatusCode=Dd,Dh.default=Dh;let{Axios:Dp,AxiosError:Df,CanceledError:Dm,isCancel:Dg,CancelToken:Dv,VERSION:DA,all:Db,Cancel:Dy,isAxiosError:Dw,spread:Dx,toFormData:DC,AxiosHeaders:DE,HttpStatusCode:DS,formToJSON:D_,getAdapter:DM,mergeConfig:DI}=Dh;function DT(){return Dh.create({baseURL:"https://api.vizbl.us",timeout:3e4})}let DB=DT(),DR=DT();async function Dk(e,t){var r;let n,i=function(e,t){var r;let n;if(void 0===t.data||(r=t.data,"undefined"!=typeof FormData&&r instanceof FormData||null!==r&&"object"==typeof r&&(r.constructor?.name==="FormData"||"function"==typeof r.getBoundary)))return t;let i=DE.from(t.headers);return i.has("Content-Type")||void 0!==(n=e.defaults.headers.common)&&DE.from(n).has("Content-Type")||i.set("Content-Type","application/json"),t.headers=i,t}(e,(r={...t},n=DE.from(r.headers),r.headers=n,r));try{return await e.request(i)}catch(e){throw e}}async function DP(e){return Dk(e.skipUnauthorizedRecovery?DR:DB,function(e){let{skipUnauthorizedRecovery:t,...r}=e;return r}(e))}async function DD(e){return DP(e)}async function DL(e,t={}){let{client:r=DD,...n}=t;return(await r({method:"POST",url:"/obj/Fetch",data:e,...n})).data}var Dz=tC.forwardRef((e,t)=>(0,t_.jsx)(Bq.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));function DF({className:e,...t}){return(0,t_.jsx)(Dz,{"data-slot":"label",className:BR("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function DN({className:e,...t}){return(0,t_.jsx)("div",{"data-slot":"field-group",className:BR("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),...t})}Dz.displayName="Label";let DO=BP("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function DU({className:e,orientation:t="vertical",...r}){return(0,t_.jsx)("div",{role:"group","data-slot":"field","data-orientation":t,className:BR(DO({orientation:t}),e),...r})}function DQ({className:e,...t}){return(0,t_.jsx)(DF,{"data-slot":"field-label",className:BR("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e),...t})}function DG({className:e,...t}){return(0,t_.jsx)("div",{"data-slot":"field-label",className:BR("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),...t})}function DH(e,[t,r]){return Math.min(r,Math.max(t,e))}function Dj(e){let t=e+"CollectionProvider",[r,n]=BF(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,n=tC.useRef(null),a=tC.useRef(new Map).current;return(0,t_.jsx)(i,{scope:t,itemMap:a,collectionRef:n,children:r})};s.displayName=t;let o=e+"CollectionSlot",l=Bj(o),u=tC.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=TM(t,a(o,r).collectionRef);return(0,t_.jsx)(l,{ref:i,children:n})});u.displayName=o;let c=e+"CollectionItemSlot",d="data-radix-collection-item",h=Bj(c),p=tC.forwardRef((e,t)=>{let{scope:r,children:n,...i}=e,s=tC.useRef(null),o=TM(t,s),l=a(c,r);return tC.useEffect(()=>(l.itemMap.set(s,{ref:s,...i}),()=>void l.itemMap.delete(s))),(0,t_.jsx)(h,{...{[d]:""},ref:o,children:n})});return p.displayName=c,[{Provider:s,Slot:u,ItemSlot:p},function(t){let r=a(e+"CollectionConsumer",t);return tC.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var DV=tC.createContext(void 0);function DW(e){let t=tC.useContext(DV);return e||t||"ltr"}let Dq=["top","right","bottom","left"],DX=Math.min,DJ=Math.max,DK=Math.round,DY=Math.floor,D$=e=>({x:e,y:e}),DZ={left:"right",right:"left",bottom:"top",top:"bottom"},D0={start:"end",end:"start"};function D1(e,t){return"function"==typeof e?e(t):e}function D2(e){return e.split("-")[0]}function D3(e){return e.split("-")[1]}function D4(e){return"x"===e?"y":"x"}function D5(e){return"y"===e?"height":"width"}let D8=new Set(["top","bottom"]);function D6(e){return D8.has(D2(e))?"y":"x"}function D9(e){return e.replace(/start|end/g,e=>D0[e])}let D7=["left","right"],Le=["right","left"],Lt=["top","bottom"],Lr=["bottom","top"];function Ln(e){return e.replace(/left|right|bottom|top/g,e=>DZ[e])}function Li(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function La(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Ls(e,t,r){let n,{reference:i,floating:a}=e,s=D6(t),o=D4(D6(t)),l=D5(o),u=D2(t),c="y"===s,d=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,p=i[l]/2-a[l]/2;switch(u){case"top":n={x:d,y:i.y-a.height};break;case"bottom":n={x:d,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:h};break;case"left":n={x:i.x-a.width,y:h};break;default:n={x:i.x,y:i.y}}switch(D3(t)){case"start":n[o]-=p*(r&&c?-1:1);break;case"end":n[o]+=p*(r&&c?-1:1)}return n}let Lo=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=a.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Ls(u,n,l),h=n,p={},f=0;for(let r=0;r<o.length;r++){let{name:a,fn:m}=o[r],{x:g,y:v,data:A,reset:b}=await m({x:c,y:d,initialPlacement:n,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=v?v:d,p={...p,[a]:{...p[a],...A}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(u=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:d}=Ls(u,h,l)),r=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}};async function Ll(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=D1(t,e),f=Li(p),m=o[h?"floating"===d?"reference":"floating":d],g=La(await a.getClippingRect({element:null==(r=await (null==a.isElement?void 0:a.isElement(m)))||r?m:m.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await (null==a.getOffsetParent?void 0:a.getOffsetParent(o.floating)),b=await (null==a.isElement?void 0:a.isElement(A))&&await (null==a.getScale?void 0:a.getScale(A))||{x:1,y:1},y=La(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:A,strategy:l}):v);return{top:(g.top-y.top+f.top)/b.y,bottom:(y.bottom-g.bottom+f.bottom)/b.y,left:(g.left-y.left+f.left)/b.x,right:(y.right-g.right+f.right)/b.x}}function Lu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lc(e){return Dq.some(t=>e[t]>=0)}let Ld=new Set(["left","top"]);async function Lh(e,t){let{placement:r,platform:n,elements:i}=e,a=await (null==n.isRTL?void 0:n.isRTL(i.floating)),s=D2(r),o=D3(r),l="y"===D6(r),u=Ld.has(s)?-1:1,c=a&&l?-1:1,d=D1(t,e),{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&"number"==typeof f&&(p="end"===o?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}function Lp(){return"undefined"!=typeof window}function Lf(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function Lm(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Lg(e){var t;return null==(t=(Lv(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Lv(e){return!!Lp()&&(e instanceof Node||e instanceof Lm(e).Node)}function LA(e){return!!Lp()&&(e instanceof Element||e instanceof Lm(e).Element)}function Lb(e){return!!Lp()&&(e instanceof HTMLElement||e instanceof Lm(e).HTMLElement)}function Ly(e){return!!Lp()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Lm(e).ShadowRoot)}let Lw=new Set(["inline","contents"]);function Lx(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=LP(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Lw.has(i)}let LC=new Set(["table","td","th"]),LE=[":popover-open",":modal"];function LS(e){return LE.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let L_=["transform","translate","scale","rotate","perspective"],LM=["transform","translate","scale","rotate","perspective","filter"],LI=["paint","layout","strict","content"];function LT(e){let t=LB(),r=LA(e)?LP(e):e;return L_.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||LM.some(e=>(r.willChange||"").includes(e))||LI.some(e=>(r.contain||"").includes(e))}function LB(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let LR=new Set(["html","body","#document"]);function Lk(e){return LR.has(Lf(e))}function LP(e){return Lm(e).getComputedStyle(e)}function LD(e){return LA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function LL(e){if("html"===Lf(e))return e;let t=e.assignedSlot||e.parentNode||Ly(e)&&e.host||Lg(e);return Ly(t)?t.host:t}function Lz(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=LL(t);return Lk(r)?t.ownerDocument?t.ownerDocument.body:t.body:Lb(r)&&Lx(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),s=Lm(i);if(a){let e=LF(s);return t.concat(s,s.visualViewport||[],Lx(i)?i:[],e&&r?Lz(e):[])}return t.concat(i,Lz(i,[],r))}function LF(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function LN(e){let t=LP(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Lb(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=DK(r)!==a||DK(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function LO(e){return LA(e)?e:e.contextElement}function LU(e){let t=LO(e);if(!Lb(t))return D$(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=LN(t),s=(a?DK(r.width):r.width)/n,o=(a?DK(r.height):r.height)/i;return s&&Number.isFinite(s)||(s=1),o&&Number.isFinite(o)||(o=1),{x:s,y:o}}let LQ=D$(0);function LG(e){let t=Lm(e);return LB()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:LQ}function LH(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),s=LO(e),o=D$(1);t&&(n?LA(n)&&(o=LU(n)):o=LU(e));let l=(void 0===(i=r)&&(i=!1),n&&(!i||n===Lm(s))&&i)?LG(s):D$(0),u=(a.left+l.x)/o.x,c=(a.top+l.y)/o.y,d=a.width/o.x,h=a.height/o.y;if(s){let e=Lm(s),t=n&&LA(n)?Lm(n):n,r=e,i=LF(r);for(;i&&n&&t!==r;){let e=LU(i),t=i.getBoundingClientRect(),n=LP(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,h*=e.y,u+=a,c+=s,i=LF(r=Lm(i))}}return La({width:d,height:h,x:u,y:c})}function Lj(e,t){let r=LD(e).scrollLeft;return t?t.left+r:LH(Lg(e)).left+r}function LV(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Lj(e,r),y:r.top+t.scrollTop}}let LW=new Set(["absolute","fixed"]);function Lq(e,t,r){var n;let i;if("viewport"===t)i=function(e,t){let r=Lm(e),n=Lg(e),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;let e=LB();(!e||e&&"fixed"===t)&&(o=i.offsetLeft,l=i.offsetTop)}let u=Lj(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,s=Math.abs(n.clientWidth-t.clientWidth-i);s<=25&&(a-=s)}else u<=25&&(a+=u);return{width:a,height:s,x:o,y:l}}(e,r);else if("document"===t){let t,r,a,s,o,l,u;n=Lg(e),t=Lg(n),r=LD(n),a=n.ownerDocument.body,s=DJ(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),o=DJ(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),l=-r.scrollLeft+Lj(n),u=-r.scrollTop,"rtl"===LP(a).direction&&(l+=DJ(t.clientWidth,a.clientWidth)-s),i={width:s,height:o,x:l,y:u}}else if(LA(t)){let e,n,a,s,o,l;n=(e=LH(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,s=Lb(t)?LU(t):D$(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,i={width:o,height:l,x:a*s.x,y:n*s.y}}else{let r=LG(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return La(i)}function LX(e){return"static"===LP(e).position}function LJ(e,t){if(!Lb(e)||"fixed"===LP(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Lg(e)===r&&(r=r.ownerDocument.body),r}function LK(e,t){var r;let n=Lm(e);if(LS(e))return n;if(!Lb(e)){let t=LL(e);for(;t&&!Lk(t);){if(LA(t)&&!LX(t))return t;t=LL(t)}return n}let i=LJ(e,t);for(;i&&(r=i,LC.has(Lf(r)))&&LX(i);)i=LJ(i,t);return i&&Lk(i)&&LX(i)&&!LT(i)?n:i||function(e){let t=LL(e);for(;Lb(t)&&!Lk(t);){if(LT(t))return t;if(LS(t))break;t=LL(t)}return null}(e)||n}let LY=async function(e){let t=this.getOffsetParent||LK,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=Lb(t),i=Lg(t),a="fixed"===r,s=LH(e,!0,a,t),o={scrollLeft:0,scrollTop:0},l=D$(0);if(n||!n&&!a)if(("body"!==Lf(t)||Lx(i))&&(o=LD(t)),n){let e=LH(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Lj(i));a&&!n&&i&&(l.x=Lj(i));let u=!i||n||a?D$(0):LV(i,o);return{x:s.left+o.scrollLeft-l.x-u.x,y:s.top+o.scrollTop-l.y-u.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},L$={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,s=Lg(n),o=!!t&&LS(t.floating);if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},u=D$(1),c=D$(0),d=Lb(n);if((d||!d&&!a)&&(("body"!==Lf(n)||Lx(s))&&(l=LD(n)),Lb(n))){let e=LH(n);u=LU(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let h=!s||d||a?D$(0):LV(s,l);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Lg,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?LS(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=Lz(e,[],!1).filter(e=>LA(e)&&"body"!==Lf(e)),i=null,a="fixed"===LP(e).position,s=a?LL(e):e;for(;LA(s)&&!Lk(s);){let t=LP(s),r=LT(s);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&LW.has(i.position)||Lx(s)&&!r&&function e(t,r){let n=LL(t);return!(n===r||!LA(n)||Lk(n))&&("fixed"===LP(n).position||e(n,r))}(e,s))?n=n.filter(e=>e!==s):i=t,s=LL(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=a[0],o=a.reduce((e,r)=>{let n=Lq(t,r,i);return e.top=DJ(n.top,e.top),e.right=DX(n.right,e.right),e.bottom=DX(n.bottom,e.bottom),e.left=DJ(n.left,e.left),e},Lq(t,s,i));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:LK,getElementRects:LY,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=LN(e);return{width:t,height:r}},getScale:LU,isElement:LA,isRTL:function(e){return"rtl"===LP(e).direction}};function LZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let L0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:u,padding:c=0}=D1(e,t)||{};if(null==u)return{};let d=Li(c),h={x:r,y:n},p=D4(D6(i)),f=D5(p),m=await s.getDimensions(u),g="y"===p,v=g?"clientHeight":"clientWidth",A=a.reference[f]+a.reference[p]-h[p]-a.floating[f],b=h[p]-a.reference[p],y=await (null==s.getOffsetParent?void 0:s.getOffsetParent(u)),w=y?y[v]:0;w&&await (null==s.isElement?void 0:s.isElement(y))||(w=o.floating[v]||a.floating[f]);let x=w/2-m[f]/2-1,C=DX(d[g?"top":"left"],x),E=DX(d[g?"bottom":"right"],x),S=w-m[f]-E,_=w/2-m[f]/2+(A/2-b/2),M=DJ(C,DX(_,S)),I=!l.arrow&&null!=D3(i)&&_!==M&&a.reference[f]/2-(_<C?C:E)-m[f]/2<0,T=I?_<C?_-C:_-S:0;return{[p]:h[p]+T,data:{[p]:M,centerOffset:_-M-T,...I&&{alignmentOffset:T}},reset:I}}});var L1="undefined"!=typeof document?tC.useLayoutEffect:function(){};function L2(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!L2(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!L2(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function L3(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function L4(e,t){let r=L3(e);return Math.round(t*r)/r}function L5(e){let t=tC.useRef(e);return L1(()=>{t.current=e}),t}var L8=tC.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...a}=e;return(0,t_.jsx)(Bq.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,t_.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function L6(e){let[t,r]=tC.useState(void 0);return BN(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}L8.displayName="Arrow";var L9="Popper",[L7,ze]=BF(L9),[zt,zr]=L7(L9),zn=e=>{let{__scopePopper:t,children:r}=e,[n,i]=tC.useState(null);return(0,t_.jsx)(zt,{scope:t,anchor:n,onAnchorChange:i,children:r})};zn.displayName=L9;var zi="PopperAnchor",za=tC.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,a=zr(zi,r),s=tC.useRef(null),o=TM(t,s),l=tC.useRef(null);return tC.useEffect(()=>{let e=l.current;l.current=n?.current||s.current,e!==l.current&&a.onAnchorChange(l.current)}),n?null:(0,t_.jsx)(Bq.div,{...i,ref:o})});za.displayName=zi;var zs="PopperContent",[zo,zl]=L7(zs),zu=tC.forwardRef((e,t)=>{var r,n,i,a,s,o,l,u,c,d,h,p,f,m,g,v,A,b,y,w,x;let{__scopePopper:C,side:E="bottom",sideOffset:S=0,align:_="center",alignOffset:M=0,arrowPadding:I=0,avoidCollisions:T=!0,collisionBoundary:B=[],collisionPadding:R=0,sticky:k="partial",hideWhenDetached:P=!1,updatePositionStrategy:D="optimized",onPlaced:L,...z}=e,F=zr(zs,C),[N,O]=tC.useState(null),U=TM(t,e=>O(e)),[Q,G]=tC.useState(null),H=L6(Q),j=H?.width??0,V=H?.height??0,W="number"==typeof R?R:{top:0,right:0,bottom:0,left:0,...R},q=Array.isArray(B)?B:[B],X=q.length>0,J={padding:W,boundary:q.filter(zp),altBoundary:X},{refs:K,floatingStyles:Y,placement:$,isPositioned:Z,middlewareData:ee}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[c,d]=tC.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=tC.useState(n);L2(h,n)||p(n);let[f,m]=tC.useState(null),[g,v]=tC.useState(null),A=tC.useCallback(e=>{e!==x.current&&(x.current=e,m(e))},[]),b=tC.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),y=a||f,w=s||g,x=tC.useRef(null),C=tC.useRef(null),E=tC.useRef(c),S=null!=l,_=L5(l),M=L5(i),I=L5(u),T=tC.useCallback(()=>{var e,n;let i,a,s;if(!x.current||!C.current)return;let o={placement:t,strategy:r,middleware:h};M.current&&(o.platform=M.current),(e=x.current,n=C.current,i=new Map,s={...(a={platform:L$,...o}).platform,_c:i},Lo(e,n,{...a,platform:s})).then(e=>{let t={...e,isPositioned:!1!==I.current};B.current&&!L2(E.current,t)&&(E.current=t,(0,r4.flushSync)(()=>{d(t)}))})},[h,t,r,M,I]);L1(()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let B=tC.useRef(!1);L1(()=>(B.current=!0,()=>{B.current=!1}),[]),L1(()=>{if(y&&(x.current=y),w&&(C.current=w),y&&w){if(_.current)return _.current(y,w,T);T()}},[y,w,T,_,S]);let R=tC.useMemo(()=>({reference:x,floating:C,setReference:A,setFloating:b}),[A,b]),k=tC.useMemo(()=>({reference:y,floating:w}),[y,w]),P=tC.useMemo(()=>{let e={position:r,left:0,top:0};if(!k.floating)return e;let t=L4(k.floating,c.x),n=L4(k.floating,c.y);return o?{...e,transform:"translate("+t+"px, "+n+"px)",...L3(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,o,k.floating,c.x,c.y]);return tC.useMemo(()=>({...c,update:T,refs:R,elements:k,floatingStyles:P}),[c,T,R,k,P])}({strategy:"fixed",placement:E+("center"!==_?"-"+_:""),whileElementsMounted:(...e)=>(function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=LO(e),d=a||s?[...c?Lz(c):[],...Lz(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});let h=c&&l?function(e,t){let r,n=null,i=Lg(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function s(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(o||t(),!h||!p)return;let f={rootMargin:-DY(d)+"px "+-DY(i.clientWidth-(c+h))+"px "+-DY(i.clientHeight-(d+p))+"px "+-DY(c)+"px",threshold:DJ(0,DX(1,l))||1},m=!0;function g(t){let n=t[0].intersectionRatio;if(n!==l){if(!m)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||LZ(u,e.getBoundingClientRect())||s(),m=!1}try{n=new IntersectionObserver(g,{...f,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(g,f)}n.observe(e)}(!0),a}(c,r):null,p=-1,f=null;o&&(f=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),r()}),c&&!u&&f.observe(c),f.observe(t));let m=u?LH(e):null;return u&&function t(){let n=LH(e);m&&!LZ(m,n)&&r(),m=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",r),s&&e.removeEventListener("resize",r)}),null==h||h(),null==(e=f)||e.disconnect(),f=null,u&&cancelAnimationFrame(i)}})(...e,{animationFrame:"always"===D}),elements:{reference:F.anchor},middleware:[{...{name:"offset",options:i=r={mainAxis:S+V,alignmentAxis:M},async fn(e){var t,r;let{x:n,y:a,placement:s,middlewareData:o}=e,l=await Lh(e,i);return s===(null==(t=o.offset)?void 0:t.placement)&&null!=(r=o.arrow)&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}},options:[r,n]},T&&{...{name:"shift",options:c=l={mainAxis:!0,crossAxis:!1,limiter:"partial"===k?{...(void 0===(o=a)&&(o={}),{options:o,fn(e){let{x:t,y:r,placement:n,rects:i,middlewareData:a}=e,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=D1(o,e),c={x:t,y:r},d=D6(n),h=D4(d),p=c[h],f=c[d],m=D1(s,e),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===h?"height":"width",t=i.reference[h]-i.floating[e]+g.mainAxis,r=i.reference[h]+i.reference[e]-g.mainAxis;p<t?p=t:p>r&&(p=r)}if(u){var v,A;let e="y"===h?"width":"height",t=Ld.has(D2(n)),r=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),s=i.reference[d]+i.reference[e]+(t?0:(null==(A=a.offset)?void 0:A[d])||0)-(t?g.crossAxis:0);f<r?f=r:f>s&&(f=s)}return{[h]:p,[d]:f}}}),options:[a,s]}:void 0,...J},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...o}=D1(c,e),l={x:t,y:r},u=await Ll(e,o),d=D6(D2(n)),h=D4(d),p=l[h],f=l[d];if(i){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",r=p+u[e],n=p-u[t];p=DJ(r,DX(p,n))}if(a){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=f+u[e],n=f-u[t];f=DJ(r,DX(f,n))}let m=s.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-t,y:m.y-r,enabled:{[h]:i,[d]:a}}}}},options:[l,u]},T&&{...{name:"flip",options:p=d={...J},async fn(e){var t,r,n,i,a,s,o,l;let u,c,d,{placement:h,middlewareData:f,rects:m,initialPlacement:g,platform:v,elements:A}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...S}=D1(p,e);if(null!=(t=f.arrow)&&t.alignmentOffset)return{};let _=D2(h),M=D6(g),I=D2(g)===g,T=await (null==v.isRTL?void 0:v.isRTL(A.floating)),B=w||(I||!E?[Ln(g)]:(u=Ln(g),[D9(g),u,D9(u)])),R="none"!==C;!w&&R&&B.push(...(c=D3(g),d=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?Le:D7;return t?D7:Le;case"left":case"right":return t?Lt:Lr;default:return[]}}(D2(g),"start"===C,T),c&&(d=d.map(e=>e+"-"+c),E&&(d=d.concat(d.map(D9)))),d));let k=[g,...B],P=await Ll(e,S),D=[],L=(null==(r=f.flip)?void 0:r.overflows)||[];if(b&&D.push(P[_]),y){let e,t,r,n,i=(s=h,o=m,void 0===(l=T)&&(l=!1),e=D3(s),r=D5(t=D4(D6(s))),n="x"===t?e===(l?"end":"start")?"right":"left":"start"===e?"bottom":"top",o.reference[r]>o.floating[r]&&(n=Ln(n)),[n,Ln(n)]);D.push(P[i[0]],P[i[1]])}if(L=[...L,{placement:h,overflows:D}],!D.every(e=>e<=0)){let e=((null==(n=f.flip)?void 0:n.index)||0)+1,t=k[e];if(t&&("alignment"!==y||M===D6(t)||L.every(e=>D6(e.placement)!==M||e.overflows[0]>0)))return{data:{index:e,overflows:L},reset:{placement:t}};let r=null==(i=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!r)switch(x){case"bestFit":{let e=null==(a=L.filter(e=>{if(R){let t=D6(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=g}if(h!==r)return{reset:{placement:r}}}return{}}},options:[d,h]},{...{name:"size",options:g=f={...J,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:i,height:a}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${r}px`),s.setProperty("--radix-popper-available-height",`${n}px`),s.setProperty("--radix-popper-anchor-width",`${i}px`),s.setProperty("--radix-popper-anchor-height",`${a}px`)}},async fn(e){var t,r;let n,i,{placement:a,rects:s,platform:o,elements:l}=e,{apply:u=()=>{},...c}=D1(g,e),d=await Ll(e,c),h=D2(a),p=D3(a),f="y"===D6(a),{width:m,height:v}=s.floating;"top"===h||"bottom"===h?(n=h,i=p===(await (null==o.isRTL?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(i=h,n="end"===p?"top":"bottom");let A=v-d.top-d.bottom,b=m-d.left-d.right,y=DX(v-d[n],A),w=DX(m-d[i],b),x=!e.middlewareData.shift,C=y,E=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(E=b),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(C=A),x&&!p){let e=DJ(d.left,0),t=DJ(d.right,0),r=DJ(d.top,0),n=DJ(d.bottom,0);f?E=m-2*(0!==e||0!==t?e+t:DJ(d.left,d.right)):C=v-2*(0!==r||0!==n?r+n:DJ(d.top,d.bottom))}await u({...e,availableWidth:E,availableHeight:C});let S=await o.getDimensions(l.floating);return m!==S.width||v!==S.height?{reset:{rects:!0}}:{}}},options:[f,m]},Q&&{...{name:"arrow",options:b=v={element:Q,padding:I},fn(e){let{element:t,padding:r}="function"==typeof b?b(e):b;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?L0({element:t.current,padding:r}).fn(e):{}:t?L0({element:t,padding:r}).fn(e):{}}},options:[v,A]},zf({arrowWidth:j,arrowHeight:V}),P&&{...{name:"hide",options:x=y={strategy:"referenceHidden",...J},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=D1(x,e);switch(r){case"referenceHidden":{let r=Lu(await Ll(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Lc(r)}}}case"escaped":{let r=Lu(await Ll(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:Lc(r)}}}default:return{}}}},options:[y,w]}]}),[et,er]=zm($),en=BX(L);BN(()=>{Z&&en?.()},[Z,en]);let ei=ee.arrow?.x,ea=ee.arrow?.y,es=ee.arrow?.centerOffset!==0,[eo,el]=tC.useState();return BN(()=>{N&&el(window.getComputedStyle(N).zIndex)},[N]),(0,t_.jsx)("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:Z?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eo,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(" "),...ee.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,t_.jsx)(zo,{scope:C,placedSide:et,onArrowChange:G,arrowX:ei,arrowY:ea,shouldHideArrow:es,children:(0,t_.jsx)(Bq.div,{"data-side":et,"data-align":er,...z,ref:U,style:{...z.style,animation:Z?void 0:"none"}})})})});zu.displayName=zs;var zc="PopperArrow",zd={top:"bottom",right:"left",bottom:"top",left:"right"},zh=tC.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=zl(zc,r),a=zd[i.placedSide];return(0,t_.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,t_.jsx)(L8,{...n,ref:t,style:{...n.style,display:"block"}})})});function zp(e){return null!==e}zh.displayName=zc;var zf=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,o=a?0:e.arrowHeight,[l,u]=zm(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(i.arrow?.x??0)+s/2,h=(i.arrow?.y??0)+o/2,p="",f="";return"bottom"===l?(p=a?c:`${d}px`,f=`${-o}px`):"top"===l?(p=a?c:`${d}px`,f=`${n.floating.height+o}px`):"right"===l?(p=`${-o}px`,f=a?c:`${h}px`):"left"===l&&(p=`${n.floating.width+o}px`,f=a?c:`${h}px`),{data:{x:p,y:f}}}});function zm(e){let[t,r="center"]=e.split("-");return[t,r]}function zg(e){let t=tC.useRef({value:e,previous:e});return tC.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});tC.forwardRef((e,t)=>(0,t_.jsx)(Bq.span,{...e,ref:t,style:{...zv,...e.style}})).displayName="VisuallyHidden";var zA=[" ","Enter","ArrowUp","ArrowDown"],zb=[" ","Enter"],zy="Select",[zw,zx,zC]=Dj(zy),[zE,zS]=BF(zy,[zC,ze]),z_=ze(),[zM,zI]=zE(zy),[zT,zB]=zE(zy),zR=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:o,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:h,required:p,form:f}=e,m=z_(t),[g,v]=tC.useState(null),[A,b]=tC.useState(null),[y,w]=tC.useState(!1),x=DW(u),[C,E]=BH({prop:n,defaultProp:i??!1,onChange:a,caller:zy}),[S,_]=BH({prop:s,defaultProp:o,onChange:l,caller:zy}),M=tC.useRef(null),I=!g||f||!!g.closest("form"),[T,B]=tC.useState(new Set),R=Array.from(T).map(e=>e.props.value).join(";");return(0,t_.jsx)(zn,{...m,children:(0,t_.jsxs)(zM,{required:p,scope:t,trigger:g,onTriggerChange:v,valueNode:A,onValueNodeChange:b,valueNodeHasChildren:y,onValueNodeHasChildrenChange:w,contentId:BQ(),value:S,onValueChange:_,open:C,onOpenChange:E,dir:x,triggerPointerDownPosRef:M,disabled:h,children:[(0,t_.jsx)(zw.Provider,{scope:t,children:(0,t_.jsx)(zT,{scope:e.__scopeSelect,onNativeOptionAdd:tC.useCallback(e=>{B(t=>new Set(t).add(e))},[]),onNativeOptionRemove:tC.useCallback(e=>{B(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),I?(0,t_.jsxs)(Fi,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:S,onChange:e=>_(e.target.value),disabled:h,form:f,children:[void 0===S?(0,t_.jsx)("option",{value:""}):null,Array.from(T)]},R):null]})})};zR.displayName=zy;var zk="SelectTrigger",zP=tC.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...i}=e,a=z_(r),s=zI(zk,r),o=s.disabled||n,l=TM(t,s.onTriggerChange),u=zx(r),c=tC.useRef("touch"),[d,h,p]=Fs(e=>{let t=u().filter(e=>!e.disabled),r=t.find(e=>e.value===s.value),n=Fo(t,e,r);void 0!==n&&s.onValueChange(n.value)}),f=e=>{o||(s.onOpenChange(!0),p()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t_.jsx)(za,{asChild:!0,...a,children:(0,t_.jsx)(Bq.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":Fa(s.value)?"":void 0,...i,ref:l,onClick:Bz(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&f(e)}),onPointerDown:Bz(i.onPointerDown,e=>{c.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(f(e),e.preventDefault())}),onKeyDown:Bz(i.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&zA.includes(e.key)&&(f(),e.preventDefault())})})})});zP.displayName=zk;var zD="SelectValue",zL=tC.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...o}=e,l=zI(zD,r),{onValueNodeHasChildrenChange:u}=l,c=void 0!==a,d=TM(t,l.onValueNodeChange);return BN(()=>{u(c)},[u,c]),(0,t_.jsx)(Bq.span,{...o,ref:d,style:{pointerEvents:"none"},children:Fa(l.value)?(0,t_.jsx)(t_.Fragment,{children:s}):a})});zL.displayName=zD;var zz=tC.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...i}=e;return(0,t_.jsx)(Bq.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});zz.displayName="SelectIcon";var zF=e=>(0,t_.jsx)(B7,{asChild:!0,...e});zF.displayName="SelectPortal";var zN="SelectContent",zO=tC.forwardRef((e,t)=>{let r=zI(zN,e.__scopeSelect),[n,i]=tC.useState();return(BN(()=>{i(new DocumentFragment)},[]),r.open)?(0,t_.jsx)(zH,{...e,ref:t}):n?(0,r4.createPortal)((0,t_.jsx)(zU,{scope:e.__scopeSelect,children:(0,t_.jsx)(zw.Slot,{scope:e.__scopeSelect,children:(0,t_.jsx)("div",{children:e.children})})}),n):null});zO.displayName=zN;var[zU,zQ]=zE(zN),zG=Bj("SelectContent.RemoveScroll"),zH=tC.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:o,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:f,hideWhenDetached:m,avoidCollisions:g,...v}=e,A=zI(zN,r),[b,y]=tC.useState(null),[w,x]=tC.useState(null),C=TM(t,e=>y(e)),[E,S]=tC.useState(null),[_,M]=tC.useState(null),I=zx(r),[T,B]=tC.useState(!1),R=tC.useRef(!1);tC.useEffect(()=>{if(b)return RK(b)},[b]),Rn();let k=tC.useCallback(e=>{let[t,...r]=I().map(e=>e.ref.current),[n]=r.slice(-1),i=document.activeElement;for(let r of e)if(r===i||(r?.scrollIntoView({block:"nearest"}),r===t&&w&&(w.scrollTop=0),r===n&&w&&(w.scrollTop=w.scrollHeight),r?.focus(),document.activeElement!==i))return},[I,w]),P=tC.useCallback(()=>k([E,b]),[k,E,b]);tC.useEffect(()=>{T&&P()},[T,P]);let{onOpenChange:D,triggerPointerDownPosRef:L}=A;tC.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():b.contains(r.target)||D(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[b,D,L]),tC.useEffect(()=>{let e=()=>D(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[D]);let[z,F]=Fs(e=>{let t=I().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=Fo(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),N=tC.useCallback((e,t,r)=>{let n=!R.current&&!r;(void 0!==A.value&&A.value===t||n)&&(S(e),n&&(R.current=!0))},[A.value]),O=tC.useCallback(()=>b?.focus(),[b]),U=tC.useCallback((e,t,r)=>{let n=!R.current&&!r;(void 0!==A.value&&A.value===t||n)&&M(e)},[A.value]),Q="popper"===n?zV:zj,G=Q===zV?{side:o,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:f,hideWhenDetached:m,avoidCollisions:g}:{};return(0,t_.jsx)(zU,{scope:r,content:b,viewport:w,onViewportChange:x,itemRefCallback:N,selectedItem:E,onItemLeave:O,itemTextRefCallback:U,focusSelectedItem:P,selectedItemText:_,position:n,isPositioned:T,searchRef:z,children:(0,t_.jsx)(RH,{as:zG,allowPinchZoom:!0,children:(0,t_.jsx)(B3,{asChild:!0,trapped:A.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Bz(i,e=>{A.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t_.jsx)(BY,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:(0,t_.jsx)(Q,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:e=>e.preventDefault(),...v,...G,onPlaced:()=>B(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Bz(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>k(t)),e.preventDefault()}})})})})})})});zH.displayName="SelectContentImpl";var zj=tC.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...i}=e,a=zI(zN,r),s=zQ(zN,r),[o,l]=tC.useState(null),[u,c]=tC.useState(null),d=TM(t,e=>c(e)),h=zx(r),p=tC.useRef(!1),f=tC.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:v,focusSelectedItem:A}=s,b=tC.useCallback(()=>{if(a.trigger&&a.valueNode&&o&&u&&m&&g&&v){let e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if("rtl"!==a.dir){let n=i.left-t.left,a=r.left-n,s=e.left-a,l=e.width+s,u=Math.max(l,t.width),c=DH(a,[10,Math.max(10,window.innerWidth-10-u)]);o.style.minWidth=l+"px",o.style.left=c+"px"}else{let n=t.right-i.right,a=window.innerWidth-r.right-n,s=window.innerWidth-e.right-a,l=e.width+s,u=Math.max(l,t.width),c=DH(a,[10,Math.max(10,window.innerWidth-10-u)]);o.style.minWidth=l+"px",o.style.right=c+"px"}let s=h(),l=window.innerHeight-20,c=m.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),A=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),y=f+A+c+parseInt(d.paddingBottom,10)+b,w=Math.min(5*g.offsetHeight,y),x=window.getComputedStyle(m),C=parseInt(x.paddingTop,10),E=parseInt(x.paddingBottom,10),S=e.top+e.height/2-10,_=g.offsetHeight/2,M=f+A+(g.offsetTop+_);if(M<=S){let e=s.length>0&&g===s[s.length-1].ref.current;o.style.bottom="0px";let t=Math.max(l-S,_+(e?E:0)+(u.clientHeight-m.offsetTop-m.offsetHeight)+b);o.style.height=M+t+"px"}else{let e=s.length>0&&g===s[0].ref.current;o.style.top="0px";let t=Math.max(S,f+m.offsetTop+(e?C:0)+_);o.style.height=t+(y-M)+"px",m.scrollTop=M-S+m.offsetTop}o.style.margin="10px 0",o.style.minHeight=w+"px",o.style.maxHeight=l+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,o,u,m,g,v,a.dir,n]);BN(()=>b(),[b]);let[y,w]=tC.useState();BN(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]);let x=tC.useCallback(e=>{e&&!0===f.current&&(b(),A?.(),f.current=!1)},[b,A]);return(0,t_.jsx)(zW,{scope:r,contentWrapper:o,shouldExpandOnScrollRef:p,onScrollButtonChange:x,children:(0,t_.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:(0,t_.jsx)(Bq.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});zj.displayName="SelectItemAlignedPosition";var zV=tC.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:i=10,...a}=e,s=z_(r);return(0,t_.jsx)(zu,{...s,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zV.displayName="SelectPopperPosition";var[zW,zq]=zE(zN,{}),zX="SelectViewport",zJ=tC.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...i}=e,a=zQ(zX,r),s=zq(zX,r),o=TM(t,a.onViewportChange),l=tC.useRef(0);return(0,t_.jsxs)(t_.Fragment,{children:[(0,t_.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,t_.jsx)(zw.Slot,{scope:r,children:(0,t_.jsx)(Bq.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Bz(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=s;if(n?.current&&r){let e=Math.abs(l.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(i<n){let a=i+e,s=Math.min(n,a),o=a-s;r.style.height=s+"px","0px"===r.style.bottom&&(t.scrollTop=o>0?o:0,r.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});zJ.displayName=zX;var zK="SelectGroup",[zY,z$]=zE(zK);tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=BQ();return(0,t_.jsx)(zY,{scope:r,id:i,children:(0,t_.jsx)(Bq.div,{role:"group","aria-labelledby":i,...n,ref:t})})}).displayName=zK;var zZ="SelectLabel";tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=z$(zZ,r);return(0,t_.jsx)(Bq.div,{id:i.id,...n,ref:t})}).displayName=zZ;var z0="SelectItem",[z1,z2]=zE(z0),z3=tC.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,o=zI(z0,r),l=zQ(z0,r),u=o.value===n,[c,d]=tC.useState(a??""),[h,p]=tC.useState(!1),f=TM(t,e=>l.itemRefCallback?.(e,n,i)),m=BQ(),g=tC.useRef("touch"),v=()=>{i||(o.onValueChange(n),o.onOpenChange(!1))};if(""===n)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t_.jsx)(z1,{scope:r,value:n,disabled:i,textId:m,isSelected:u,onItemTextChange:tC.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,t_.jsx)(zw.ItemSlot,{scope:r,value:n,disabled:i,textValue:c,children:(0,t_.jsx)(Bq.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:f,onFocus:Bz(s.onFocus,()=>p(!0)),onBlur:Bz(s.onBlur,()=>p(!1)),onClick:Bz(s.onClick,()=>{"mouse"!==g.current&&v()}),onPointerUp:Bz(s.onPointerUp,()=>{"mouse"===g.current&&v()}),onPointerDown:Bz(s.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Bz(s.onPointerMove,e=>{g.current=e.pointerType,i?l.onItemLeave?.():"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Bz(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Bz(s.onKeyDown,e=>{(l.searchRef?.current===""||" "!==e.key)&&(zb.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});z3.displayName=z0;var z4="SelectItemText",z5=tC.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,...a}=e,s=zI(z4,r),o=zQ(z4,r),l=z2(z4,r),u=zB(z4,r),[c,d]=tC.useState(null),h=TM(t,e=>d(e),l.onItemTextChange,e=>o.itemTextRefCallback?.(e,l.value,l.disabled)),p=c?.textContent,f=tC.useMemo(()=>(0,t_.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return BN(()=>(m(f),()=>g(f)),[m,g,f]),(0,t_.jsxs)(t_.Fragment,{children:[(0,t_.jsx)(Bq.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?(0,r4.createPortal)(a.children,s.valueNode):null]})});z5.displayName=z4;var z8="SelectItemIndicator",z6=tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return z2(z8,r).isSelected?(0,t_.jsx)(Bq.span,{"aria-hidden":!0,...n,ref:t}):null});z6.displayName=z8;var z9="SelectScrollUpButton",z7=tC.forwardRef((e,t)=>{let r=zQ(z9,e.__scopeSelect),n=zq(z9,e.__scopeSelect),[i,a]=tC.useState(!1),s=TM(t,n.onScrollButtonChange);return BN(()=>{if(r.viewport&&r.isPositioned){let e=function(){a(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,t_.jsx)(Fr,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});z7.displayName=z9;var Fe="SelectScrollDownButton",Ft=tC.forwardRef((e,t)=>{let r=zQ(Fe,e.__scopeSelect),n=zq(Fe,e.__scopeSelect),[i,a]=tC.useState(!1),s=TM(t,n.onScrollButtonChange);return BN(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,t_.jsx)(Fr,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Ft.displayName=Fe;var Fr=tC.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...i}=e,a=zQ("SelectScrollButton",r),s=tC.useRef(null),o=zx(r),l=tC.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return tC.useEffect(()=>()=>l(),[l]),BN(()=>{let e=o().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[o]),(0,t_.jsx)(Bq.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Bz(i.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(n,50))}),onPointerMove:Bz(i.onPointerMove,()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(n,50))}),onPointerLeave:Bz(i.onPointerLeave,()=>{l()})})});tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,t_.jsx)(Bq.div,{"aria-hidden":!0,...n,ref:t})}).displayName="SelectSeparator";var Fn="SelectArrow";tC.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=z_(r),a=zI(Fn,r),s=zQ(Fn,r);return a.open&&"popper"===s.position?(0,t_.jsx)(zh,{...i,...n,ref:t}):null}).displayName=Fn;var Fi=tC.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{let i=tC.useRef(null),a=TM(n,i),s=zg(t);return tC.useEffect(()=>{let e=i.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==t&&r){let n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,t_.jsx)(Bq.select,{...r,style:{...zv,...r.style},ref:a,defaultValue:t})});function Fa(e){return""===e||void 0===e}function Fs(e){let t=BX(e),r=tC.useRef(""),n=tC.useRef(0),i=tC.useCallback(e=>{let i=r.current+e;t(i),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(i)},[t]),a=tC.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return tC.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function Fo(e,t,r){var n,i;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,s=r?e.indexOf(r):-1,o=(n=e,i=Math.max(s,0),n.map((e,t)=>n[(i+t)%n.length]));1===a.length&&(o=o.filter(e=>e!==r));let l=o.find(e=>e.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function Fl(e){return(0,t_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:(0,t_.jsx)("path",{d:"M8.21723 14.9975C8.10298 14.997 7.99004 14.9731 7.8854 14.9272C7.78077 14.8814 7.68665 14.8145 7.60889 14.7308L3.55889 10.4225C3.4075 10.2611 3.3264 10.0463 3.33343 9.82513C3.34046 9.604 3.43505 9.39471 3.59639 9.24332C3.75773 9.09192 3.97261 9.01082 4.19374 9.01785C4.41488 9.02489 4.62417 9.11948 4.77556 9.28082L8.20889 12.9392L15.2172 5.27248C15.2883 5.18392 15.3768 5.11083 15.4772 5.0577C15.5776 5.00458 15.6878 4.97254 15.8011 4.96355C15.9143 4.95456 16.0282 4.96882 16.1357 5.00544C16.2432 5.04207 16.3421 5.10029 16.4263 5.17652C16.5105 5.25276 16.5782 5.3454 16.6253 5.44877C16.6724 5.55213 16.6979 5.66403 16.7001 5.7776C16.7024 5.89116 16.6815 6.00399 16.6385 6.10916C16.5956 6.21433 16.5316 6.30961 16.4506 6.38915L8.83389 14.7225C8.75686 14.8077 8.66308 14.8761 8.55841 14.9234C8.45373 14.9707 8.34042 14.996 8.22556 14.9975H8.21723Z",fill:"currentColor"})})}function Fu(e){return(0,t_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,t_.jsx)("path",{d:"M12.0002 15.496C11.8686 15.4968 11.7381 15.4716 11.6163 15.4218C11.4944 15.372 11.3836 15.2987 11.2902 15.206L7.29019 11.206C7.10188 11.0177 6.99609 10.7623 6.99609 10.496C6.99609 10.2297 7.10188 9.97434 7.29019 9.78604C7.47849 9.59773 7.73388 9.49194 8.00019 9.49194C8.26649 9.49194 8.52188 9.59773 8.71019 9.78604L12.0002 13.096L15.3002 9.91604C15.3922 9.81375 15.5043 9.73154 15.6295 9.67455C15.7547 9.61756 15.8903 9.58703 16.0279 9.58485C16.1654 9.58267 16.302 9.60889 16.4289 9.66189C16.5559 9.71488 16.6705 9.79349 16.7657 9.89282C16.8609 9.99214 16.9346 10.11 16.9821 10.2391C17.0297 10.3682 17.0501 10.5057 17.042 10.6431C17.034 10.7804 16.9977 10.9146 16.9355 11.0373C16.8732 11.16 16.7863 11.2685 16.6802 11.356L12.6802 15.216C12.4973 15.3924 12.2542 15.4925 12.0002 15.496Z",fill:"currentColor"})})}function Fc(e){return(0,t_.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t_.jsx)("g",{"clip-path":"url(#clip0_3784_10281)",children:(0,t_.jsx)("path",{d:"M20.739 11.3791L18.039 8.67909C17.955 8.59517 17.8554 8.52861 17.7458 8.48319C17.6361 8.43778 17.5186 8.4144 17.4 8.4144C17.2813 8.4144 17.1638 8.43778 17.0541 8.48319C16.9445 8.52861 16.8449 8.59517 16.761 8.67909C16.6771 8.763 16.6105 8.86262 16.5651 8.97226C16.5197 9.0819 16.4963 9.19941 16.4963 9.31808C16.4963 9.43676 16.5197 9.55427 16.5651 9.66391C16.6105 9.77355 16.6771 9.87317 16.761 9.95708L17.922 11.1001H12.9V6.0691L14.061 7.23909C14.1451 7.32246 14.2448 7.38843 14.3545 7.43322C14.4641 7.478 14.5815 7.50073 14.7 7.50009C14.8787 7.50113 15.0538 7.44891 15.2027 7.35009C15.3517 7.25127 15.4679 7.11032 15.5364 6.94523C15.605 6.78013 15.6228 6.59835 15.5876 6.42308C15.5525 6.24781 15.4659 6.08698 15.339 5.9611L12.639 3.26111C12.4705 3.09326 12.2423 2.99902 12.0045 2.99902C11.7666 2.99902 11.5385 3.09326 11.37 3.26111L8.66999 5.9611C8.58608 6.04442 8.5194 6.14346 8.47376 6.25255C8.42812 6.36164 8.40441 6.47866 8.404 6.59691C8.40358 6.71517 8.42646 6.83235 8.47132 6.94176C8.51619 7.05117 8.58217 7.15068 8.66549 7.23459C8.74882 7.31851 8.84785 7.38519 8.95695 7.43083C9.06604 7.47647 9.18306 7.50017 9.30131 7.50059C9.54014 7.50144 9.76952 7.40737 9.93899 7.23909L11.1 6.0781V11.1001H6.069L7.239 9.93908C7.40847 9.76961 7.50368 9.53975 7.50368 9.30008C7.50368 9.06041 7.40847 8.83056 7.239 8.66109C7.06953 8.49161 6.83967 8.39641 6.6 8.39641C6.36033 8.39641 6.13048 8.49161 5.961 8.66109L3.26101 11.3611C3.17764 11.4452 3.11167 11.5449 3.06689 11.6546C3.0221 11.7642 2.99938 11.8816 3.00002 12.0001C2.99933 12.1185 3.02203 12.2359 3.06682 12.3456C3.11161 12.4552 3.1776 12.555 3.26101 12.6391L5.961 15.3391C6.0451 15.4225 6.14483 15.4885 6.25449 15.5333C6.36414 15.578 6.48156 15.6007 6.6 15.6001C6.77896 15.6015 6.95429 15.5496 7.10354 15.4508C7.25279 15.3521 7.36918 15.211 7.43781 15.0458C7.50643 14.8805 7.52417 14.6985 7.48876 14.5231C7.45334 14.3476 7.36638 14.1868 7.239 14.0611L6.078 12.9001H11.1V17.9311L9.93899 16.7611C9.76952 16.5916 9.53966 16.4964 9.29999 16.4964C9.06032 16.4964 8.83047 16.5916 8.661 16.7611C8.49152 16.9305 8.39631 17.1604 8.39631 17.4001C8.39631 17.6397 8.49152 17.8696 8.661 18.0391L11.361 20.739C11.5297 20.9065 11.7578 21.0004 11.9955 21.0004C12.2332 21.0004 12.4612 20.9065 12.63 20.739L15.33 18.0391C15.4139 17.9551 15.4805 17.8555 15.5259 17.7459C15.5713 17.6362 15.5947 17.5187 15.5947 17.4001C15.5947 17.2814 15.5713 17.1639 15.5259 17.0542C15.4805 16.9446 15.4139 16.845 15.33 16.7611C15.2461 16.6771 15.1464 16.6106 15.0368 16.5652C14.9272 16.5198 14.8096 16.4964 14.691 16.4964C14.5723 16.4964 14.4548 16.5198 14.3452 16.5652C14.2355 16.6106 14.1359 16.6771 14.052 16.7611L12.9 17.9221V12.9001H17.931L16.761 14.0611C16.6558 14.166 16.5781 14.2952 16.5349 14.4374C16.4917 14.5795 16.4843 14.7301 16.5134 14.8758C16.5424 15.0215 16.607 15.1578 16.7013 15.2725C16.7957 15.3873 16.917 15.4769 17.0544 15.5335C17.164 15.5784 17.2815 15.6011 17.4 15.6001C17.5184 15.6008 17.6359 15.5782 17.7455 15.5334C17.8552 15.4886 17.9549 15.4226 18.039 15.3391L20.739 12.6391C20.8224 12.555 20.8884 12.4552 20.9331 12.3456C20.9779 12.2359 21.0006 12.1185 21 12.0001C20.9966 11.7671 20.9031 11.5445 20.739 11.3791Z",fill:"currentColor"})}),(0,t_.jsx)("defs",{children:(0,t_.jsx)("clipPath",{id:"clip0_3784_10281",children:(0,t_.jsx)("rect",{width:"24",height:"24",fill:"currentColor"})})})]})}function Fd(e){return(0,t_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,t_.jsx)("path",{d:"M19.5398 5.08113C18.5372 4.08551 17.3458 3.30019 16.0356 2.77129C14.7253 2.24238 13.3226 1.98054 11.9098 2.00113C9.25763 1.9945 6.71146 3.04171 4.83141 4.91238C2.95135 6.78306 1.89143 9.32396 1.8848 11.9761C1.87817 14.6283 2.92538 17.1745 4.79605 19.0545C6.66673 20.9346 9.20763 21.9945 11.8598 22.0011C12.4313 22.0108 12.9898 21.8305 13.4477 21.4884C13.9057 21.1464 14.237 20.6619 14.3898 20.1111C14.4872 19.7134 14.4862 19.2979 14.3869 18.9006C14.2875 18.5033 14.0929 18.1362 13.8198 17.8311C13.7562 17.7594 13.7146 17.6709 13.7 17.5761C13.6854 17.4814 13.6984 17.3845 13.7374 17.2969C13.7765 17.2094 13.8399 17.1349 13.9201 17.0825C14.0003 17.03 14.0939 17.0018 14.1898 17.0011H15.8398C17.3927 17.0084 18.8909 16.4279 20.0336 15.3761C21.1762 14.3244 21.8786 12.8794 21.9998 11.3311C22.037 10.1767 21.838 9.02692 21.415 7.95218C20.992 6.87745 20.3539 5.90046 19.5398 5.08113ZM15.8798 15.0011H14.2298C13.7479 14.9984 13.2756 15.1355 12.8701 15.3959C12.4647 15.6563 12.1435 16.0288 11.9455 16.4681C11.7476 16.9075 11.6813 17.3948 11.7549 17.8711C11.8284 18.3473 12.0385 18.792 12.3598 19.1511C12.4224 19.2142 12.4666 19.2932 12.4877 19.3795C12.5088 19.4658 12.5061 19.5562 12.4798 19.6411C12.4298 19.8511 12.1998 19.9811 11.8898 20.0011C10.754 19.9869 9.63429 19.7309 8.60516 19.2502C7.57603 18.7695 6.66109 18.0751 5.92126 17.2132C5.18142 16.3513 4.63365 15.3417 4.31441 14.2516C3.99517 13.1615 3.91178 12.016 4.0698 10.8911C4.35496 9.00107 5.29935 7.27276 6.73593 6.01186C8.17251 4.75096 10.0087 4.03873 11.9198 4.00113H11.9998C13.1306 3.98632 14.253 4.19813 15.3007 4.62407C16.3483 5.05001 17.3001 5.68144 18.0998 6.48113C18.7238 7.10552 19.2141 7.85048 19.5407 8.67057C19.8674 9.49066 20.0236 10.3687 19.9998 11.2511C19.8963 12.2742 19.4184 13.2229 18.6579 13.9151C17.8974 14.6072 16.9081 14.994 15.8798 15.0011Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M11.9996 8.00025C12.3974 8.00025 12.7789 7.84222 13.0602 7.56091C13.3415 7.27961 13.4996 6.89808 13.4996 6.50025C13.4996 6.10243 13.3415 5.7209 13.0602 5.43959C12.7789 5.15829 12.3974 5.00025 11.9996 5.00025C11.6018 5.00025 11.2202 5.15829 10.9389 5.43959C10.6576 5.7209 10.4996 6.10243 10.4996 6.50025C10.4996 6.89808 10.6576 7.27961 10.9389 7.56091C11.2202 7.84222 11.6018 8.00025 11.9996 8.00025Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M15.2496 7.20116C15.079 7.29965 14.9294 7.43079 14.8094 7.58709C14.6895 7.74339 14.6014 7.92179 14.5504 8.1121C14.4994 8.30242 14.4864 8.50092 14.512 8.69627C14.5377 8.89162 14.6016 9.08 14.7001 9.25066C14.7986 9.42131 14.9298 9.57089 15.0861 9.69086C15.2424 9.81084 15.4208 9.89885 15.6111 9.94987C15.8014 10.0009 15.9999 10.0139 16.1952 9.98825C16.3906 9.96256 16.579 9.89865 16.7496 9.80016C17.0944 9.60125 17.3461 9.27352 17.4492 8.88907C17.5524 8.50462 17.4985 8.09494 17.2996 7.75016C17.1007 7.40538 16.773 7.15373 16.3885 7.05059C16.0041 6.94744 15.5944 7.00125 15.2496 7.20016V7.20116Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M8.74976 7.20016C8.57904 7.1018 8.39062 7.03803 8.19526 7.01249C7.99989 6.98695 7.80141 7.00014 7.61114 7.0513C7.42088 7.10247 7.24255 7.19061 7.08634 7.31069C6.93014 7.43077 6.79912 7.58045 6.70076 7.75116C6.6024 7.92188 6.53863 8.1103 6.51308 8.30567C6.48754 8.50103 6.50073 8.69951 6.5519 8.88978C6.60306 9.08005 6.6912 9.25837 6.81128 9.41458C6.93137 9.57078 7.08104 9.7018 7.25176 9.80016C7.59654 9.99881 8.00611 10.0524 8.39037 9.94903C8.77464 9.84569 9.10211 9.59394 9.30076 9.24916C9.4994 8.90438 9.55295 8.49481 9.44962 8.11055C9.34629 7.72629 9.09454 7.39881 8.74976 7.20016Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M6.15933 11.2603C5.9133 11.4264 5.7221 11.6618 5.60993 11.9366C5.49776 12.2115 5.46967 12.5135 5.52921 12.8043C5.58876 13.0951 5.73326 13.3617 5.94443 13.5704C6.1556 13.779 6.42393 13.9204 6.71546 13.9764C7.00698 14.0325 7.30858 14.0008 7.58208 13.8853C7.85557 13.7699 8.08866 13.5759 8.25183 13.3279C8.415 13.0799 8.50091 12.789 8.49868 12.4922C8.49646 12.1953 8.4062 11.9058 8.23933 11.6603C8.12971 11.4966 7.98873 11.3563 7.82454 11.2475C7.66035 11.1387 7.47622 11.0635 7.28279 11.0263C7.08936 10.9891 6.89047 10.9906 6.69763 11.0308C6.5048 11.0709 6.32183 11.1489 6.15933 11.2603Z",fill:"currentColor"})]})}function Fh(e){return(0,t_.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t_.jsx)("path",{d:"M20 15.9998C20.5522 15.9998 20.9999 16.4476 21 16.9998V18.9998C20.9999 19.7952 20.6835 20.5584 20.1211 21.1209C19.5585 21.6833 18.7955 21.9998 18 21.9998H6C5.20446 21.9998 4.44149 21.6833 3.87891 21.1209C3.31646 20.5584 3.00012 19.7952 3 18.9998V16.9998C3.00009 16.4476 3.44777 15.9998 4 15.9998C4.55223 15.9998 4.99991 16.4476 5 16.9998V18.9998C5.00012 19.2648 5.1056 19.5194 5.29297 19.7068C5.48048 19.8942 5.7349 19.9998 6 19.9998H18C18.2651 19.9998 18.5195 19.8942 18.707 19.7068C18.8944 19.5194 18.9999 19.2648 19 18.9998V16.9998C19.0001 16.4476 19.4478 15.9998 20 15.9998Z",fill:"currentColor"}),(0,t_.jsx)("path",{d:"M11.3691 3.22437C11.7619 2.90402 12.3409 2.92662 12.707 3.29273L17.707 8.29273C18.0973 8.68328 18.0975 9.31635 17.707 9.7068C17.3166 10.097 16.6834 10.097 16.293 9.7068L13 6.41383V15.9998C12.9997 16.5518 12.552 16.9997 12 16.9998C11.4479 16.9998 11.0003 16.5518 11 15.9998V6.41383L7.70703 9.7068C7.31657 10.097 6.68343 10.097 6.29297 9.7068C5.90252 9.31635 5.90268 8.68328 6.29297 8.29273L11.293 3.29273L11.3691 3.22437Z",fill:"currentColor"})]})}function Fp({className:e,...t}){return(0,t_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:BR("size-6",e),...t,children:[(0,t_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0625 1.70412C12.1393 1.70359 12.2136 1.7151 12.2842 1.73439C12.6576 1.76978 13.0261 1.88527 13.3604 2.08303L19.7012 5.84084L19.7031 5.84181C20.1036 6.08032 20.4348 6.42322 20.665 6.83498C20.8952 7.24671 21.0168 7.71415 21.0166 8.19142V8.19338L20.998 15.7403C20.9979 16.1352 20.9124 16.526 20.751 16.8848C20.7319 16.9557 20.7049 17.026 20.667 17.0928C20.6355 17.1482 20.5983 17.1987 20.5576 17.2442C20.3296 17.6 20.023 17.8979 19.6631 18.1133L13.2998 21.9072C12.4738 22.3996 11.4611 22.4004 10.6436 21.917L10.6416 21.916L4.30078 18.1582L4.29883 18.1572C3.91023 17.9258 3.58764 17.5957 3.3584 17.2002C3.35105 17.1885 3.34181 17.1773 3.33496 17.1651C3.32803 17.1526 3.32268 17.1387 3.31641 17.126C3.09976 16.7236 2.98517 16.2703 2.98535 15.8076V15.8057L3.00391 8.25588C3.00603 7.28279 3.51293 6.37777 4.33984 5.88478L10.7021 2.09181C11.0682 1.87369 11.4708 1.75231 11.877 1.72658C11.9365 1.71245 11.999 1.70462 12.0625 1.70412ZM5.16895 7.36818C4.87108 7.54583 4.6844 7.87497 4.68359 8.23635L4.66602 15.3838L9.45801 12.5254C9.51085 12.7718 9.60256 13.0142 9.73535 13.2442C9.90127 13.5315 10.1161 13.7727 10.3633 13.9639L5.49512 16.8662L11.499 20.4248C11.8036 20.6044 12.1738 20.6008 12.4707 20.4238L18.5107 16.8233L13.4971 13.877C13.9543 13.482 14.2391 12.9423 14.3242 12.3672L19.3193 15.3037L19.3379 8.21291L19.3369 8.21388C19.3369 8.03517 19.2923 7.85955 19.2061 7.7051C19.1196 7.55056 18.9947 7.42151 18.8447 7.33205L12.8887 3.80275L12.8535 9.73439C12.3304 9.51037 11.7366 9.46806 11.1738 9.63576L11.21 3.76662L5.16895 7.36818Z",fill:"currentColor"}),(0,t_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.91641 8.60885C11.7928 7.52595 14.1912 8.16845 15.2748 10.0444C16.3582 11.9209 15.7156 14.3211 13.8393 15.4047C11.9627 16.4879 9.56339 15.8446 8.47989 13.9682C7.39671 12.0916 8.03987 9.69227 9.91641 8.60885ZM13.8031 10.894C13.189 9.83118 11.8293 9.46704 10.766 10.0805C9.7026 10.6945 9.33693 12.0551 9.95059 13.1186C10.5646 14.1821 11.9261 14.5469 12.9897 13.9331C14.0529 13.3189 14.4171 11.9575 13.8031 10.894Z",fill:"currentColor"})]})}function Ff({...e}){return(0,t_.jsx)(zR,{"data-slot":"select",...e})}function Fm({...e}){return(0,t_.jsx)(zL,{"data-slot":"select-value",...e})}function Fg({className:e,size:t="default",children:r,...n}){return(0,t_.jsxs)(zP,{"data-slot":"select-trigger","data-size":t,className:BR("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-background-white shadow-sm outline-none transition-colors","border-border-medium","text-text-dark","hover:border-border-dark","focus-visible:border-border-dark","aria-invalid:border-border-red","disabled:cursor-not-allowed disabled:border-border-medium disabled:bg-background-base disabled:opacity-40","data-[size=default]:h-11 data-[size=default]:px-2 data-[size=default]:py-2.5 data-[size=default]:typo-base-16","data-[size=md]:h-9 data-[size=md]:px-2 data-[size=md]:py-2 data-[size=md]:typo-base-14","data-[size=sm]:h-[1.875rem] data-[size=sm]:px-2 data-[size=sm]:typo-base-12","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6 [&_svg:not([class*='text-'])]:text-text-dark",e),...n,children:[r,(0,t_.jsx)(zz,{asChild:!0,children:(0,t_.jsx)(Fu,{className:"size-6"})})]})}function Fv({className:e,children:t,position:r="item-aligned",align:n="center",portalContainer:i,...a}){return(0,t_.jsx)(zF,{container:i,children:(0,t_.jsxs)(zO,{"data-slot":"select-content",className:BR("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border bg-background-white text-text-dark shadow-md","border-border-medium","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:n,...a,children:[(0,t_.jsx)(Fb,{}),(0,t_.jsx)(zJ,{className:BR("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,t_.jsx)(Fy,{})]})})}function FA({className:e,children:t,...r}){return(0,t_.jsxs)(z3,{"data-slot":"select-item",className:BR("relative flex w-full cursor-default select-none items-center gap-2 rounded-md py-2.5 pr-8 pl-3 outline-hidden","typo-base-16 text-text-sub","focus:bg-background-base focus:text-text-dark","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6 [&_svg:not([class*='text-'])]:text-text-dark","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,t_.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-6 items-center justify-center",children:(0,t_.jsx)(z6,{children:(0,t_.jsx)(Fl,{className:"size-5"})})}),(0,t_.jsx)(z5,{children:t})]})}function Fb({className:e,...t}){return(0,t_.jsx)(z7,{"data-slot":"select-scroll-up-button",className:BR("flex cursor-default items-center justify-center py-1",e),...t,children:(0,t_.jsx)(nt,{className:"size-4"})})}function Fy({className:e,...t}){return(0,t_.jsx)(Ft,{"data-slot":"select-scroll-down-button",className:BR("flex cursor-default items-center justify-center py-1",e),...t,children:(0,t_.jsx)(nr,{className:"size-4"})})}Fi.displayName="SelectBubbleInput";var Fw=JSON.parse('{"camera":{"fov":45},"floor":{"z":185.0,"pitchDeg":-87.0,"rollDeg":0},"walls":[{"id":"backWall","z":580.0,"pitchDeg":0,"rollDeg":0},{"id":"rightWall","z":315.0,"pitchDeg":0,"rollDeg":-90.0},{"id":"leftWall","z":560.0,"pitchDeg":0,"rollDeg":55.0},{"id":"ceiling","z":1000.0,"pitchDeg":90.0,"rollDeg":0}]}'),Fx=JSON.parse('{"camera":{"fov":45},"floor":{"z":205.0,"pitchDeg":-87.0,"rollDeg":0},"walls":[{"id":"backWall","z":570.0,"pitchDeg":0,"rollDeg":0},{"id":"rightWall","z":315.0,"pitchDeg":0,"rollDeg":-90.0},{"id":"leftWall","z":1000.0,"pitchDeg":0,"rollDeg":90.0},{"id":"ceiling","z":1000.0,"pitchDeg":90.0,"rollDeg":0}]}'),FC=JSON.parse('{"camera":{"fov":45},"floor":{"z":185.0,"pitchDeg":-90.0,"rollDeg":0},"walls":[{"id":"backWall","z":550.0,"pitchDeg":0,"rollDeg":0},{"id":"rightWall","z":220.0,"pitchDeg":0,"rollDeg":-90.0},{"id":"leftWall","z":218.0,"pitchDeg":0,"rollDeg":90.0},{"id":"ceiling","z":185.0,"pitchDeg":90.0,"rollDeg":0}]}');function FE(e){return{camera:e.camera,sides:[{...e.floor,id:"floor"},...e.walls]}}let FS=[{id:"room-example-1",image:"https://vizbl.com/assets/room-example-1.jpg",config:FE(Fw)},{id:"room-example-2",image:"https://vizbl.com/assets/room-example-2.jpg",config:FE(Fx)},{id:"room-example-3",image:"https://vizbl.com/assets/room-example-3.jpg",config:FE(FC)}],F_=["RcSd3KphTyq_JQEjNCqKQA","gu0109ftQmS-UQkwcW010Q","nOfGLIZcRVeU93wOkHWSbg","ozzH5I2kQMW20ao-33C86A","DBA4wR-zT92vjtuOk9varg"],FM=[{value:.025,label:"2.5 см"},{value:.05,label:"5 см"}],FI=[{value:0,label:"Без паспарту"},{value:.05,label:"5 см"}],FT=(0,tC.createContext)(null);function FB({children:e,poster:t,width:r,height:n,name:i}){let[a,s]=(0,tC.useState)(FS),[o,l]=(0,tC.useState)(FS["0"].id),u=(0,tC.useMemo)(()=>a.find(e=>e.id===o),[a,o]),[c,d]=(0,tC.useState)(null),[h,p]=(0,tC.useState)(FM["0"].value),[f,m]=(0,tC.useState)(FI["0"].value),[g,v]=(0,tC.useState)(0),[A,b]=(0,tC.useState)(!1),[y,w]=(0,tC.useState)(null),x=(0,tC.useRef)(null),C=(0,tC.useMemo)(()=>({poster:t,name:i,rooms:a,setRooms:s,room:u,setRoomId:l,material:c,width:r,height:n,frameWidth:h,matting:f,angle:g,isDragging:A,containerRef:y,setMaterial:d,setFrameWidth:p,setMatting:m,setAngle:v,setIsDragging:b,setContainerRef:w,posterRef:x}),[t,i,a,u,c,r,n,h,f,g,y,A,x]);return(0,t_.jsx)(FT,{value:C,children:e})}function FR(){let e=(0,tC.use)(FT);if(!e)throw Error("useRoomViewer must be used within a RoomViewerProvider");return e}function Fk({className:e,...t}){let{containerRef:r,material:n,setMaterial:i}=FR(),a=function({queries:e,...t},r){let n=(e=>{let t=tC.useContext(rV);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t})(void 0),i=tC.useContext(rq),a=tC.useContext(rX),s=tC.useMemo(()=>e.map(e=>{let t=n.defaultQueryOptions(e);return t._optimisticResults=i?"isRestoring":"optimistic",t}),[e,n,i]);s.forEach(e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!a.isReset()&&(e.retryOnMount=!1)}),tC.useEffect(()=>{a.clearReset()},[a]);let[o]=tC.useState(()=>new rj(n,s,t)),[l,u,c]=o.getOptimisticResult(s,t.combine),d=!i&&!1!==t.subscribed;tC.useSyncExternalStore(tC.useCallback(e=>d?o.subscribe(rr.batchCalls(e)):ra,[o,d]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),tC.useEffect(()=>{o.setQueries(s,t)},[s,t,o]);let h=l.some((e,t)=>rJ(s[t],e))?l.flatMap((e,t)=>{let r=s[t];if(r){let t=new rN(n,r);if(rJ(r,e))return rK(r,t,a);e.isLoading&&e.isFetching&&!i&&rK(r,t,a)}return[]}):[];if(h.length>0)throw Promise.all(h);let p=l.find((e,t)=>{let r=s[t];return r&&(({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>{var a;return e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&void 0===e.data||(a=[e.error,n],"function"==typeof r?r(...a):!!r))})({result:e,errorResetBoundary:a,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(p?.error)throw p.error;return u(c())}({queries:F_.map(e=>({queryKey:((e={})=>[{url:"/obj/Fetch"},...e?[e]:[]])({tinuuid:e}),queryFn:()=>DL({tinuuid:e})}))}),s=(0,tC.useMemo)(()=>a.map(e=>e.data?.materials?.[0]).filter(e=>!!e),[a]);return(0,tC.useEffect)(()=>{null===n&&s.length>0&&i(s[0])},[n,s,i]),(0,t_.jsxs)(DU,{className:BR("w-fit",e),...t,children:[(0,t_.jsx)(DQ,{className:"text-xs text-text-sub font-medium",children:"Material"}),(0,t_.jsxs)(Ff,{value:n?.hid??void 0,onValueChange:e=>{let t=s.find(t=>t.hid===e);t&&i(t)},children:[(0,t_.jsx)(Fg,{className:"w-[145px]",size:"md",children:(0,t_.jsxs)(Fm,{placeholder:"Choose material",children:[(0,t_.jsx)("div",{className:"size-5 rounded-full",style:{backgroundColor:`#${n?.miniature?.color?.hex}`}}),n?.miniature?.color?.name]})}),(0,t_.jsx)(Fv,{portalContainer:r,children:s.map(e=>(0,t_.jsxs)(FA,{value:e.hid,children:[(0,t_.jsx)("div",{className:"size-5 rounded-full",style:{backgroundColor:`#${e?.miniature?.color?.hex}`}}),e.miniature?.color?.name]},e.hid))})]})]})}var FP="rovingFocusGroup.onEntryFocus",FD={bubbles:!1,cancelable:!0},FL="RovingFocusGroup",[Fz,FF,FN]=Dj(FL),[FO,FU]=BF(FL,[FN]),[FQ,FG]=FO(FL),FH=tC.forwardRef((e,t)=>(0,t_.jsx)(Fz.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,t_.jsx)(Fz.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,t_.jsx)(Fj,{...e,ref:t})})}));FH.displayName=FL;var Fj=tC.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,h=tC.useRef(null),p=TM(t,h),f=DW(a),[m,g]=BH({prop:s,defaultProp:o??null,onChange:l,caller:FL}),[v,A]=tC.useState(!1),b=BX(u),y=FF(r),w=tC.useRef(!1),[x,C]=tC.useState(0);return tC.useEffect(()=>{let e=h.current;if(e)return e.addEventListener(FP,b),()=>e.removeEventListener(FP,b)},[b]),(0,t_.jsx)(FQ,{scope:r,orientation:n,dir:f,loop:i,currentTabStopId:m,onItemFocus:tC.useCallback(e=>g(e),[g]),onItemShiftTab:tC.useCallback(()=>A(!0),[]),onFocusableItemAdd:tC.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:tC.useCallback(()=>C(e=>e-1),[]),children:(0,t_.jsx)(Bq.div,{tabIndex:v||0===x?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Bz(e.onMouseDown,()=>{w.current=!0}),onFocus:Bz(e.onFocus,e=>{let t=!w.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(FP,FD);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=y().filter(e=>e.focusable);FX([e.find(e=>e.active),e.find(e=>e.id===m),...e].filter(Boolean).map(e=>e.ref.current),c)}}w.current=!1}),onBlur:Bz(e.onBlur,()=>A(!1))})})}),FV="RovingFocusGroupItem",FW=tC.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...o}=e,l=BQ(),u=a||l,c=FG(FV,r),d=c.currentTabStopId===u,h=FF(r),{onFocusableItemAdd:p,onFocusableItemRemove:f,currentTabStopId:m}=c;return tC.useEffect(()=>{if(n)return p(),()=>f()},[n,p,f]),(0,t_.jsx)(Fz.ItemSlot,{scope:r,id:u,focusable:n,active:i,children:(0,t_.jsx)(Bq.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...o,ref:t,onMouseDown:Bz(e.onMouseDown,e=>{n?c.onItemFocus(u):e.preventDefault()}),onFocus:Bz(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Bz(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void c.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return Fq[i]}(e,c.orientation,c.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=c.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>FX(i))}}),children:"function"==typeof s?s({isCurrentTabStop:d,hasTabStop:null!=m}):s})})});FW.displayName=FV;var Fq={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function FX(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var FJ="Tabs",[FK,FY]=BF(FJ,[FU]),F$=FU(),[FZ,F0]=FK(FJ),F1=tC.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:o,activationMode:l="automatic",...u}=e,c=DW(o),[d,h]=BH({prop:n,onChange:i,defaultProp:a??"",caller:FJ});return(0,t_.jsx)(FZ,{scope:r,baseId:BQ(),value:d,onValueChange:h,orientation:s,dir:c,activationMode:l,children:(0,t_.jsx)(Bq.div,{dir:c,"data-orientation":s,...u,ref:t})})});F1.displayName=FJ;var F2="TabsList",F3=tC.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...i}=e,a=F0(F2,r),s=F$(r);return(0,t_.jsx)(FH,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:(0,t_.jsx)(Bq.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});F3.displayName=F2;var F4="TabsTrigger",F5=tC.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=F0(F4,r),o=F$(r),l=F9(s.baseId,n),u=F7(s.baseId,n),c=n===s.value;return(0,t_.jsx)(FW,{asChild:!0,...o,focusable:!i,active:c,children:(0,t_.jsx)(Bq.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:t,onMouseDown:Bz(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(n)}),onKeyDown:Bz(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(n)}),onFocus:Bz(e.onFocus,()=>{let e="manual"!==s.activationMode;c||i||!e||s.onValueChange(n)})})})});F5.displayName=F4;var F8="TabsContent",F6=tC.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,o=F0(F8,r),l=F9(o.baseId,n),u=F7(o.baseId,n),c=n===o.value,d=tC.useRef(c);return tC.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t_.jsx)(Re,{present:i||c,children:({present:r})=>(0,t_.jsx)(Bq.div,{"data-state":c?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!r,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:r&&a})})});function F9(e,t){return`${e}-trigger-${t}`}function F7(e,t){return`${e}-content-${t}`}F6.displayName=F8;let Ne=tC.createContext(null),Nt=tC.createContext(null);function Nr({value:e,defaultValue:t,onValueChange:r,...n}){let[i,a]=tC.useState(t),s=e??i,o=tC.useMemo(()=>({value:s}),[s]),l=tC.useCallback(t=>{r?.(t),void 0===e&&a(t)},[r,e]);return(0,t_.jsx)(Ne,{value:o,children:(0,t_.jsx)(F1,{"data-slot":"tabs",value:s,onValueChange:l,...n})})}let Nn=BP("cursor-pointer group inline-flex items-center justify-center shrink-0 whitespace-nowrap outline-none transition-colors relative z-10 rounded-lg text-text-base [&_svg]:text-icons-normal [&_svg]:transition-colors hover:text-text-dark hover:[&_svg]:text-icons-dark active:rounded-lg active:bg-background-base-3 active:text-text-dark active:[&_svg]:text-icons-dark data-[state=active]:rounded-lg data-[state=active]:bg-background-white data-[state=active]:text-text-dark data-[state=active]:[&_svg]:text-icons-dark disabled:pointer-events-none disabled:opacity-50 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",{variants:{size:{default:"h-7 px-2 typo-button-normal [&_svg]:size-4",lg:"h-9 px-3 typo-button-big [&_svg]:size-6"}},defaultVariants:{size:"default"}});function Ni({className:e,children:t,...r}){let n=tC.use(Ne),i=tC.useRef(null),a=tC.useRef(new Map),s=tC.useRef(null),o=tC.useCallback(()=>{let e=s.current;if(!e)return;let t=n?.value;if(!t){e.style.opacity="0";return}let r=i.current,o=a.current.get(t);if(!r||!o){e.style.opacity="0";return}let l=r.getBoundingClientRect(),u=o.getBoundingClientRect(),c=u.left-l.left,d=u.top-l.top,h=l.width-(c+u.width),p=l.height-(d+u.height);e.style.clipPath=`inset(${d}px ${h}px ${p}px ${c}px round 8px)`,e.style.opacity="1"},[n?.value]),l=tC.useCallback((e,t)=>{t?a.current.set(e,t):a.current.delete(e),requestAnimationFrame(o)},[o]);tC.useLayoutEffect(()=>{o()},[o]),tC.useEffect(()=>{let e=i.current;if(!e||"undefined"==typeof ResizeObserver)return;let t=new ResizeObserver(()=>o());t.observe(e);let r=n?.value;if(r){let e=a.current.get(r);e&&t.observe(e)}return()=>{t.disconnect()}},[n?.value,o]);let u=tC.useMemo(()=>({registerTrigger:l}),[l]);return(0,t_.jsx)(F3,{ref:i,"data-slot":"tabs-list",className:BR("relative inline-flex items-center rounded-xl bg-background-base-2 p-1",e),...r,children:(0,t_.jsxs)(Nt,{value:u,children:[(0,t_.jsx)("div",{ref:s,"aria-hidden":!0,"data-slot":"tabs-indicator",className:"pointer-events-none absolute inset-0 z-0 rounded-xl bg-background-white opacity-0 transition-[clip-path,opacity] duration-[250ms] ease-out motion-reduce:transition-none"}),t]})})}function Na({className:e,size:t,children:r,value:n,...i}){let a=tC.use(Nt),s=tC.useRef(null),o=BR("relative z-10 inline-flex items-center justify-center","lg"===t?"gap-1.5":"gap-1");return tC.useLayoutEffect(()=>{if(a&&n)return a.registerTrigger(n,s.current),()=>{a.registerTrigger(n,null)}},[a,n]),(0,t_.jsx)(F5,{ref:s,"data-slot":"tabs-trigger",className:BR(Nn({size:t}),"data-[state=active]:bg-transparent",e),value:n,...i,children:(0,t_.jsx)("span",{"data-slot":"tabs-trigger-content",className:o,children:r})})}function Ns({className:e,...t}){let{matting:r,setMatting:n}=FR();return(0,t_.jsxs)(DU,{className:BR("w-fit",e),...t,children:[(0,t_.jsx)(DQ,{className:"text-xs text-text-sub font-medium",children:"Matting"}),(0,t_.jsx)(Nr,{value:r.toString(),onValueChange:e=>n(Number(e)),children:(0,t_.jsx)(Ni,{children:FI.map(e=>(0,t_.jsx)(Na,{value:e.value.toString(),children:e.label},e.value))})})]})}Ni.displayName=F3.displayName,Na.displayName=F5.displayName,F6.displayName;var No="Radio",[Nl,Nu]=BF(No),[Nc,Nd]=Nl(No),Nh=tC.forwardRef((e,t)=>{let{__scopeRadio:r,name:n,checked:i=!1,required:a,disabled:s,value:o="on",onCheck:l,form:u,...c}=e,[d,h]=tC.useState(null),p=TM(t,e=>h(e)),f=tC.useRef(!1),m=!d||u||!!d.closest("form");return(0,t_.jsxs)(Nc,{scope:r,checked:i,disabled:s,children:[(0,t_.jsx)(Bq.button,{type:"button",role:"radio","aria-checked":i,"data-state":Ng(i),"data-disabled":s?"":void 0,disabled:s,value:o,...c,ref:p,onClick:Bz(e.onClick,e=>{i||l?.(),m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})}),m&&(0,t_.jsx)(Nm,{control:d,bubbles:!f.current,name:n,value:o,checked:i,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Nh.displayName=No;var Np="RadioIndicator",Nf=tC.forwardRef((e,t)=>{let{__scopeRadio:r,forceMount:n,...i}=e,a=Nd(Np,r);return(0,t_.jsx)(Re,{present:n||a.checked,children:(0,t_.jsx)(Bq.span,{"data-state":Ng(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t})})});Nf.displayName=Np;var Nm=tC.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{let s=tC.useRef(null),o=TM(s,a),l=zg(r),u=L6(t);return tC.useEffect(()=>{let e=s.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(l!==r&&t){let i=new Event("click",{bubbles:n});t.call(e,r),e.dispatchEvent(i)}},[l,r,n]),(0,t_.jsx)(Bq.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:o,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Ng(e){return e?"checked":"unchecked"}Nm.displayName="RadioBubbleInput";var Nv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],NA="RadioGroup",[Nb,Ny]=BF(NA,[FU,Nu]),Nw=FU(),Nx=Nu(),[NC,NE]=Nb(NA),NS=tC.forwardRef((e,t)=>{let{__scopeRadioGroup:r,name:n,defaultValue:i,value:a,required:s=!1,disabled:o=!1,orientation:l,dir:u,loop:c=!0,onValueChange:d,...h}=e,p=Nw(r),f=DW(u),[m,g]=BH({prop:a,defaultProp:i??null,onChange:d,caller:NA});return(0,t_.jsx)(NC,{scope:r,name:n,required:s,disabled:o,value:m,onValueChange:g,children:(0,t_.jsx)(FH,{asChild:!0,...p,orientation:l,dir:f,loop:c,children:(0,t_.jsx)(Bq.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":o?"":void 0,dir:f,...h,ref:t})})})});NS.displayName=NA;var N_="RadioGroupItem",NM=tC.forwardRef((e,t)=>{let{__scopeRadioGroup:r,disabled:n,...i}=e,a=NE(N_,r),s=a.disabled||n,o=Nw(r),l=Nx(r),u=tC.useRef(null),c=TM(t,u),d=a.value===i.value,h=tC.useRef(!1);return tC.useEffect(()=>{let e=e=>{Nv.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),(0,t_.jsx)(FW,{asChild:!0,...o,focusable:!s,active:d,children:(0,t_.jsx)(Nh,{disabled:s,required:a.required,checked:d,...l,...i,name:a.name,ref:c,onCheck:()=>a.onValueChange(i.value),onKeyDown:Bz(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Bz(i.onFocus,()=>{h.current&&u.current?.click()})})})});NM.displayName=N_;var NI=tC.forwardRef((e,t)=>{let{__scopeRadioGroup:r,...n}=e,i=Nx(r);return(0,t_.jsx)(Nf,{...i,...n,ref:t})});function NT({className:e,...t}){return(0,t_.jsx)(NS,{"data-slot":"radio-group",className:BR("grid gap-3",e),...t})}function NB({checked:e,className:t,...r}){return(0,t_.jsx)("div",{className:BR("absolute top-1/2 left-1/2 size-6 -translate-x-1/2 -translate-y-1/2","flex items-center justify-center rounded-full",e?"bg-icons-green":"bg-background-base-2",t),...r,children:(0,t_.jsx)(nn,{className:"text-constant-white size-3.5",strokeWidth:3.5})})}function NR({className:e,variant:t="default",...r}){return(0,t_.jsxs)(NM,{"data-slot":"radio-group-item",className:BR("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border transition-[color] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50","check"===t&&"size-6",e),...r,children:["check"===t&&(0,t_.jsx)("div",{className:"relative",children:(0,t_.jsx)(NB,{})}),(0,t_.jsx)(NI,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:"check"===t?(0,t_.jsx)(NB,{checked:!0}):(0,t_.jsx)(ni,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})]})}function Nk({className:e}){let{rooms:t,room:r,setRoomId:n}=FR(),[i,a]=(0,tC.useState)(null),[s,o]=(0,tC.useState)(!0),[l,u]=(0,tC.useState)(!1),[c,d]=(0,tC.useState)(!1),h=(0,tC.useCallback)(e=>{o(e.isBeginning),u(e.isEnd),d(e.isLocked)},[]),p=(0,tC.useCallback)(e=>{a(e),h(e)},[h]);return(0,t_.jsxs)("div",{className:BR("relative w-full overflow-hidden",e),children:[(0,t_.jsx)(NT,{value:r.id,onValueChange:n,children:(0,t_.jsx)(hS,{className:"w-full py-5",slidesPerView:"auto",spaceBetween:12,slidesOffsetBefore:24,slidesOffsetAfter:75,onSwiper:p,onReachBeginning:()=>o(!0),onReachEnd:()=>u(!0),onFromEdge:h,onLock:()=>d(!0),onUnlock:()=>d(!1),onResize:h,children:t.map(e=>(0,t_.jsx)(h_,{className:BR("w-25! h-19! transition-transform duration-200",e.id!==r.id&&"hover:scale-110"),children:(0,t_.jsxs)(DQ,{htmlFor:`room-${e.id}`,className:"relative size-full rounded-[0.75rem] overflow-hidden",children:[(0,t_.jsx)("img",{src:e.image,alt:"",className:"size-full object-cover"}),(0,t_.jsx)(NR,{value:e.id,id:`room-${e.id}`,variant:"check",className:BR("absolute top-1.75 right-1.75",{"sr-only":e.id!==r.id})})]})},e.id))})}),(0,t_.jsxs)(BL,{className:BR("absolute top-1/2 left-8 -translate-y-1/2 z-1",{hidden:s||c}),variant:"contrast",size:"icon",onClick:()=>i?.slidePrev(),children:[(0,t_.jsx)(na,{}),(0,t_.jsx)("span",{className:"sr-only",children:"Previous slide"})]}),(0,t_.jsxs)(BL,{className:BR("absolute top-1/2 right-8 -translate-y-1/2 z-1",{hidden:l||c}),variant:"contrast",size:"icon",onClick:()=>i?.slideNext(),children:[(0,t_.jsx)(ns,{}),(0,t_.jsx)("span",{className:"sr-only",children:"Next slide"})]})]})}function NP({className:e,...t}){return(0,t_.jsxs)("div",{className:BR("grid grid-cols-[1fr_auto] items-end pl-0 overflow-hidden",e),...t,children:[(0,t_.jsx)(Nk,{}),(0,t_.jsxs)("div",{className:"hidden flex-row gap-5 pr-6 pb-5 md:flex",children:[(0,t_.jsx)(Fk,{}),(0,t_.jsx)(Ns,{})]})]})}function ND({className:e,...t}){return(0,t_.jsxs)("div",{className:BR("group inline-flex gap-2 text-sm text-muted-foreground","hover:text-text-dark","transition-colors duration-200 ease-in-out",e),...t,children:[(0,t_.jsx)("div",{className:"size-5 flex items-center justify-center rounded-full bg-icons-light group-hover:bg-icons-red transition-colors duration-200 ease-in-out",children:(0,t_.jsx)(Fp,{className:"size-4.25 text-icons-white"})}),"Powered by Vizbl"]})}function NL({className:e,...t}){let{name:r}=FR();return(0,t_.jsxs)("div",{className:BR("h-16 grid gap-5 items-center px-6 sm:grid-cols-3",e),...t,children:[(0,t_.jsx)("div",{className:"truncate",children:r}),(0,t_.jsx)("div",{className:"hidden justify-center sm:flex",children:(0,t_.jsx)(ND,{})}),(0,t_.jsx)("div",{className:"hidden sm:block"})]})}NI.displayName="RadioGroupIndicator";var Nz="Popover",[NF,NN]=BF(Nz,[ze]),NO=ze(),[NU,NQ]=NF(Nz),NG=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,o=NO(t),l=tC.useRef(null),[u,c]=tC.useState(!1),[d,h]=BH({prop:n,defaultProp:i??!1,onChange:a,caller:Nz});return(0,t_.jsx)(zn,{...o,children:(0,t_.jsx)(NU,{scope:t,contentId:BQ(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:tC.useCallback(()=>h(e=>!e),[h]),hasCustomAnchor:u,onCustomAnchorAdd:tC.useCallback(()=>c(!0),[]),onCustomAnchorRemove:tC.useCallback(()=>c(!1),[]),modal:s,children:r})})};NG.displayName=Nz;var NH="PopoverAnchor";tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NQ(NH,r),a=NO(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:o}=i;return tC.useEffect(()=>(s(),()=>o()),[s,o]),(0,t_.jsx)(za,{...a,...n,ref:t})}).displayName=NH;var Nj="PopoverTrigger",NV=tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NQ(Nj,r),a=NO(r),s=TM(t,i.triggerRef),o=(0,t_.jsx)(Bq.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":N3(i.open),...n,ref:s,onClick:Bz(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:(0,t_.jsx)(za,{asChild:!0,...a,children:o})});NV.displayName=Nj;var NW="PopoverPortal",[Nq,NX]=NF(NW,{forceMount:void 0}),NJ=e=>{let{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=NQ(NW,t);return(0,t_.jsx)(Nq,{scope:t,forceMount:r,children:(0,t_.jsx)(Re,{present:r||a.open,children:(0,t_.jsx)(B7,{asChild:!0,container:i,children:n})})})};NJ.displayName=NW;var NK="PopoverContent",NY=tC.forwardRef((e,t)=>{let r=NX(NK,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,a=NQ(NK,e.__scopePopover);return(0,t_.jsx)(Re,{present:n||a.open,children:a.modal?(0,t_.jsx)(NZ,{...i,ref:t}):(0,t_.jsx)(N0,{...i,ref:t})})});NY.displayName=NK;var N$=Bj("PopoverContent.RemoveScroll"),NZ=tC.forwardRef((e,t)=>{let r=NQ(NK,e.__scopePopover),n=tC.useRef(null),i=TM(t,n),a=tC.useRef(!1);return tC.useEffect(()=>{let e=n.current;if(e)return RK(e)},[]),(0,t_.jsx)(RH,{as:N$,allowPinchZoom:!0,children:(0,t_.jsx)(N1,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bz(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:Bz(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;a.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:Bz(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),N0=tC.forwardRef((e,t)=>{let r=NQ(NK,e.__scopePopover),n=tC.useRef(!1),i=tC.useRef(!1);return(0,t_.jsx)(N1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),N1=tC.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,h=NQ(NK,r),p=NO(r);return Rn(),(0,t_.jsx)(B3,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,t_.jsx)(BY,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:(0,t_.jsx)(zu,{"data-state":N3(h.open),role:"dialog",id:h.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),N2="PopoverClose";function N3(e){return e?"open":"closed"}function N4({...e}){return(0,t_.jsx)(NG,{"data-slot":"popover",...e})}function N5({...e}){return(0,t_.jsx)(NV,{"data-slot":"popover-trigger",...e})}function N8({className:e,align:t="center",sideOffset:r=4,portalContainer:n,...i}){return(0,t_.jsx)(NJ,{container:n,children:(0,t_.jsx)(NY,{"data-slot":"popover-content",align:t,sideOffset:r,className:BR("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...i})})}tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NQ(N2,r);return(0,t_.jsx)(Bq.button,{type:"button",...n,ref:t,onClick:Bz(e.onClick,()=>i.onOpenChange(!1))})}).displayName=N2,tC.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=NO(r);return(0,t_.jsx)(zh,{...i,...n,ref:t})}).displayName="PopoverArrow";var N6=["PageUp","PageDown"],N9=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],N7={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Oe="Slider",[Ot,Or,On]=Dj(Oe),[Oi,Oa]=BF(Oe,[On]),[Os,Oo]=Oi(Oe),Ol=tC.forwardRef((e,t)=>{let{name:r,min:n=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:o=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[n],value:c,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:f,...m}=e,g=tC.useRef(new Set),v=tC.useRef(0),A="horizontal"===s,[b=[],y]=BH({prop:c,defaultProp:u,onChange:e=>{let t=[...g.current];t[v.current]?.focus(),d(e)}}),w=tC.useRef(b);function x(e,t,{commit:r}={commit:!1}){let s,o=(String(a).split(".")[1]||"").length,u=DH(Math.round((Math.round((e-n)/a)*a+n)*(s=Math.pow(10,o)))/s,[n,i]);y((e=[])=>{let n=function(e=[],t,r){let n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,u,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,r)=>e[r+1]-t))>=t;return!0}(n,l*a))return e;{v.current=n.indexOf(u);let t=String(n)!==String(e);return t&&r&&h(n),t?n:e}})}return(0,t_.jsx)(Os,{scope:e.__scopeSlider,name:r,disabled:o,min:n,max:i,valueIndexToChangeRef:v,thumbs:g.current,values:b,orientation:s,form:f,children:(0,t_.jsx)(Ot.Provider,{scope:e.__scopeSlider,children:(0,t_.jsx)(Ot.Slot,{scope:e.__scopeSlider,children:(0,t_.jsx)(A?Od:Oh,{"aria-disabled":o,"data-disabled":o?"":void 0,...m,ref:t,onPointerDown:Bz(m.onPointerDown,()=>{o||(w.current=b)}),min:n,max:i,inverted:p,onSlideStart:o?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let r=e.map(e=>Math.abs(e-t)),n=Math.min(...r);return r.indexOf(n)}(b,e);x(e,t)},onSlideMove:o?void 0:function(e){x(e,v.current)},onSlideEnd:o?void 0:function(){let e=w.current[v.current];b[v.current]!==e&&h(b)},onHomeKeyDown:()=>!o&&x(n,0,{commit:!0}),onEndKeyDown:()=>!o&&x(i,b.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!o){let r=N6.includes(e.key)||e.shiftKey&&N9.includes(e.key),n=v.current;x(b[n]+a*(r?10:1)*t,n,{commit:!0})}}})})})})});Ol.displayName=Oe;var[Ou,Oc]=Oi(Oe,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Od=tC.forwardRef((e,t)=>{let{min:r,max:n,dir:i,inverted:a,onSlideStart:s,onSlideMove:o,onSlideEnd:l,onStepKeyDown:u,...c}=e,[d,h]=tC.useState(null),p=TM(t,e=>h(e)),f=tC.useRef(void 0),m=DW(i),g="ltr"===m,v=g&&!a||!g&&a;function A(e){let t=f.current||d.getBoundingClientRect(),i=OC([0,t.width],v?[r,n]:[n,r]);return f.current=t,i(e-t.left)}return(0,t_.jsx)(Ou,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:(0,t_.jsx)(Op,{dir:m,"data-orientation":"horizontal",...c,ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=A(e.clientX);s?.(t)},onSlideMove:e=>{let t=A(e.clientX);o?.(t)},onSlideEnd:()=>{f.current=void 0,l?.()},onStepKeyDown:e=>{let t=N7[v?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),Oh=tC.forwardRef((e,t)=>{let{min:r,max:n,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:o,onStepKeyDown:l,...u}=e,c=tC.useRef(null),d=TM(t,c),h=tC.useRef(void 0),p=!i;function f(e){let t=h.current||c.current.getBoundingClientRect(),i=OC([0,t.height],p?[n,r]:[r,n]);return h.current=t,i(e-t.top)}return(0,t_.jsx)(Ou,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,t_.jsx)(Op,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);a?.(t)},onSlideMove:e=>{let t=f(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,o?.()},onStepKeyDown:e=>{let t=N7[p?"from-bottom":"from-top"].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),Op=tC.forwardRef((e,t)=>{let{__scopeSlider:r,onSlideStart:n,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:o,onStepKeyDown:l,...u}=e,c=Oo(Oe,r);return(0,t_.jsx)(Bq.span,{...u,ref:t,onKeyDown:Bz(e.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(o(e),e.preventDefault()):N6.concat(N9).includes(e.key)&&(l(e),e.preventDefault())}),onPointerDown:Bz(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),c.thumbs.has(t)?t.focus():n(e)}),onPointerMove:Bz(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Bz(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),Of="SliderTrack",Om=tC.forwardRef((e,t)=>{let{__scopeSlider:r,...n}=e,i=Oo(Of,r);return(0,t_.jsx)(Bq.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...n,ref:t})});Om.displayName=Of;var Og="SliderRange",Ov=tC.forwardRef((e,t)=>{let{__scopeSlider:r,...n}=e,i=Oo(Og,r),a=Oc(Og,r),s=TM(t,tC.useRef(null)),o=i.values.length,l=i.values.map(e=>Ox(e,i.min,i.max)),u=o>1?Math.min(...l):0,c=100-Math.max(...l);return(0,t_.jsx)(Bq.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...n,ref:s,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:c+"%"}})});Ov.displayName=Og;var OA="SliderThumb",Ob=tC.forwardRef((e,t)=>{let r=Or(e.__scopeSlider),[n,i]=tC.useState(null),a=TM(t,e=>i(e)),s=tC.useMemo(()=>n?r().findIndex(e=>e.ref.current===n):-1,[r,n]);return(0,t_.jsx)(Oy,{...e,ref:a,index:s})}),Oy=tC.forwardRef((e,t)=>{var r,n,i,a,s;let o,l,{__scopeSlider:u,index:c,name:d,...h}=e,p=Oo(OA,u),f=Oc(OA,u),[m,g]=tC.useState(null),v=TM(t,e=>g(e)),A=!m||p.form||!!m.closest("form"),b=L6(m),y=p.values[c],w=void 0===y?0:Ox(y,p.min,p.max),x=(r=c,(n=p.values.length)>2?`Value ${r+1} of ${n}`:2===n?["Minimum","Maximum"][r]:void 0),C=b?.[f.size],E=C?(i=C,a=w,s=f.direction,l=OC([0,50],[0,o=i/2]),(o-l(a)*s)*s):0;return tC.useEffect(()=>{if(m)return p.thumbs.add(m),()=>{p.thumbs.delete(m)}},[m,p.thumbs]),(0,t_.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${w}% + ${E}px)`},children:[(0,t_.jsx)(Ot.ItemSlot,{scope:e.__scopeSlider,children:(0,t_.jsx)(Bq.span,{role:"slider","aria-label":e["aria-label"]||x,"aria-valuemin":p.min,"aria-valuenow":y,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...h,ref:v,style:void 0===y?{display:"none"}:e.style,onFocus:Bz(e.onFocus,()=>{p.valueIndexToChangeRef.current=c})})}),A&&(0,t_.jsx)(Ow,{name:d??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:y},c)]})});Ob.displayName=OA;var Ow=tC.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{let i=tC.useRef(null),a=TM(i,n),s=zg(t);return tC.useEffect(()=>{let e=i.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==t&&r){let n=new Event("input",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,t_.jsx)(Bq.input,{style:{display:"none"},...r,ref:a,defaultValue:t})});function Ox(e,t,r){return DH(100/(r-t)*(e-t),[0,100])}function OC(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function OE({className:e,defaultValue:t,value:r,min:n=0,max:i=100,...a}){let s=tC.useMemo(()=>Array.isArray(r)?r:Array.isArray(t)?t:[n,i],[r,t,n,i]);return(0,t_.jsxs)(Ol,{"data-slot":"slider",defaultValue:t,value:r,min:n,max:i,className:BR("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...a,children:[(0,t_.jsx)(Om,{"data-slot":"slider-track",className:BR("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t_.jsx)(Ov,{"data-slot":"slider-range",className:BR("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,t)=>(0,t_.jsx)(Ob,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t))]})}Ow.displayName="RadioBubbleInput";let OS="undefined"==typeof window;function O_(e,{defaultValue:t=!1,initializeWithValue:r=!0}={}){let[n,i]=tC.useState(()=>{if(r)return OS?t:window.matchMedia(e).matches;return t});return tC.useEffect(()=>{let t=window.matchMedia(e),r=()=>{i(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e]),n}let OM=(e,t)=>{if("number"==typeof e){if(3===t)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|240&e)/255,b:(15&e|e<<4&240)/255};if(4===t)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|240&e)/255,alpha:(15&e|e<<4&240)/255};if(6===t)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(255&e)/255};if(8===t)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(255&e)/255}}},OI={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},OT=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,OB="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",OR=`${OB}%`,Ok=`(?:${OB}%|${OB})`,OP=`(?:${OB}%|${OB}|none)`,OD=`(?:${OB}(deg|grad|rad|turn)|${OB})`,OL="\\s*,\\s*";RegExp("^"+OP+"$");let Oz=RegExp(`^rgba?\\(\\s*${OB}${OL}${OB}${OL}${OB}\\s*(?:,\\s*${Ok}\\s*)?\\)$`),OF=RegExp(`^rgba?\\(\\s*${OR}${OL}${OR}${OL}${OR}\\s*(?:,\\s*${Ok}\\s*)?\\)$`),ON=(e="rgb")=>t=>{let r;return void 0!==(t=void 0===(r=t)?void 0:"object"!=typeof r?O9(r):void 0!==r.mode?r:e?{...r,mode:e}:void 0)?t.mode===e?t:OO[t.mode][e]?OO[t.mode][e](t):"rgb"===e?OO[t.mode].rgb(t):OO.rgb[e](OO[t.mode].rgb(t)):void 0},OO={},OU={},OQ=[],OG={},OH=e=>e,Oj=e=>(OO[e.mode]={...OO[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{OO[t]||(OO[t]={}),OO[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(void 0===e.ranges[t]&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);"function"==typeof e.interpolate[t]&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=OH)}),OU[e.mode]=e,(e.parse||[]).forEach(t=>{OV(t,e.mode)}),ON(e.mode)),OV=(e,t)=>{if("string"==typeof e){if(!t)throw Error("'mode' required when 'parser' is a string");OG[e]=t}else"function"==typeof e&&0>OQ.indexOf(e)&&OQ.push(e)},OW=/[^\x00-\x7F]|[a-zA-Z_]/,Oq=/[^\x00-\x7F]|[-\w]/,OX="function",OJ="ident",OK="number",OY="percentage",O$="none",OZ="alpha",O0=0;function O1(e){let t=e[O0],r=e[O0+1];return"-"===t||"+"===t?/\d/.test(r)||"."===r&&/\d/.test(e[O0+2]):"."===t?/\d/.test(r):/\d/.test(t)}function O2(e){if(O0>=e.length)return!1;let t=e[O0];if(OW.test(t))return!0;if("-"===t){if(e.length-O0<2)return!1;let t=e[O0+1];if("-"===t||OW.test(t))return!0}return!1}let O3={deg:1,rad:180/Math.PI,grad:.9,turn:360};function O4(e){let t="";if(("-"===e[O0]||"+"===e[O0])&&(t+=e[O0++]),t+=O5(e),"."===e[O0]&&/\d/.test(e[O0+1])&&(t+=e[O0++]+O5(e)),("e"===e[O0]||"E"===e[O0])&&(("-"===e[O0+1]||"+"===e[O0+1])&&/\d/.test(e[O0+2])?t+=e[O0++]+e[O0++]+O5(e):/\d/.test(e[O0+1])&&(t+=e[O0++]+O5(e))),O2(e)){let r=O8(e);return"deg"===r||"rad"===r||"turn"===r||"grad"===r?{type:"hue",value:t*O3[r]}:void 0}return"%"===e[O0]?(O0++,{type:OY,value:+t}):{type:OK,value:+t}}function O5(e){let t="";for(;/\d/.test(e[O0]);)t+=e[O0++];return t}function O8(e){let t="";for(;O0<e.length&&Oq.test(e[O0]);)t+=e[O0++];return t}function O6(e,t){let r,n=[];for(;e._i<e.length;){if((r=e[e._i++]).type===O$||r.type===OK||r.type===OZ||r.type===OY||t&&"hue"===r.type){n.push(r);continue}if(")"===r.type){if(e._i<e.length)return;continue}return}if(!(n.length<3)&&!(n.length>4)){if(4===n.length){if(n[3].type!==OZ)return;n[3]=n[3].value}return 3===n.length&&n.push({type:O$,value:void 0}),n.every(e=>e.type!==OZ)?n:void 0}}let O9=e=>{let t;if("string"!=typeof e)return;let r=function(e=""){let t,r=e.trim(),n=[];for(O0=0;O0<r.length;){if("\n"===(t=r[O0++])||" "===t||" "===t){for(;O0<r.length&&("\n"===r[O0]||" "===r[O0]||" "===r[O0]);)O0++;continue}if(","===t)return;if(")"===t){n.push({type:")"});continue}if("+"===t){if(O0--,O1(r)){n.push(O4(r));continue}return}if("-"===t){if(O0--,O1(r)){n.push(O4(r));continue}if(O2(r)){n.push({type:OJ,value:O8(r)});continue}return}if("."===t){if(O0--,O1(r)){n.push(O4(r));continue}return}if("/"===t){let e;for(;O0<r.length&&("\n"===r[O0]||" "===r[O0]||" "===r[O0]);)O0++;if(O1(r)&&"hue"!==(e=O4(r)).type){n.push({type:OZ,value:e});continue}if(O2(r)&&"none"===O8(r)){n.push({type:OZ,value:{type:O$,value:void 0}});continue}return}if(/\d/.test(t)){O0--,n.push(O4(r));continue}if(OW.test(t)){O0--,n.push(function(e){let t=O8(e);return"("===e[O0]?(O0++,{type:OX,value:t}):"none"===t?{type:O$,value:void 0}:{type:OJ,value:t}}(r));continue}return}return n}(e),n=r?function(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==OX)return;let n=O6(e,t);if(n)return n.unshift(r.value),n}(r,!0):void 0,i=0,a=OQ.length;for(;i<a;)if(void 0!==(t=OQ[i++](e,n)))return t;return r?function(e){e._i=0;let t=e[e._i++];if(!t||t.type!==OX||"color"!==t.value||(t=e[e._i++]).type!==OJ)return;let r=OG[t.value];if(!r)return;let n={mode:r},i=O6(e,!1);if(!i)return;let a=OU[r].channels;for(let e=0,t,r;e<a.length;e++)t=i[e],r=a[e],t.type!==O$&&(n[r]=t.type===OK?t.value:t.value/100,"alpha"===r&&(n[r]=Math.max(0,Math.min(1,n[r]))));return n}(r):void 0},O7=(ed=(e,t,r)=>e+r*(t-e),e=>{let t=(e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],i=e[r+1];void 0===n&&void 0===i?t.push(void 0):void 0!==n&&void 0!==i?t.push([n,i]):t.push(void 0!==n?[n,n]:[i,i])}return t})(e);return e=>{let r=e*t.length,n=e>=1?t.length-1:Math.max(Math.floor(r),0),i=t[n];return void 0===i?void 0:ed(i[0],i[1],r-n)}}),Ue=e=>{let t=!1,r=e.map(e=>void 0!==e?(t=!0,e):1);return t?r:e},Ut={mode:"rgb",channels:["r","g","b","alpha"],parse:[function(e,t){if(!t||"rgb"!==t[0]&&"rgba"!==t[0])return;let r={mode:"rgb"},[,n,i,a,s]=t;if("hue"!==n.type&&"hue"!==i.type&&"hue"!==a.type)return n.type!==O$&&(r.r=n.type===OK?n.value/255:n.value/100),i.type!==O$&&(r.g=i.type===OK?i.value/255:i.value/100),a.type!==O$&&(r.b=a.type===OK?a.value/255:a.value/100),s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r},e=>{let t;return(t=e.match(OT))?OM(parseInt(t[1],16),t[1].length):void 0},e=>{let t,r={mode:"rgb"};if(t=e.match(Oz))void 0!==t[1]&&(r.r=t[1]/255),void 0!==t[2]&&(r.g=t[2]/255),void 0!==t[3]&&(r.b=t[3]/255);else{if(!(t=e.match(OF)))return;void 0!==t[1]&&(r.r=t[1]/100),void 0!==t[2]&&(r.g=t[2]/100),void 0!==t[3]&&(r.b=t[3]/100)}return void 0!==t[4]?r.alpha=Math.max(0,Math.min(1,t[4]/100)):void 0!==t[5]&&(r.alpha=Math.max(0,Math.min(1,+t[5]))),r},e=>OM(OI[e.toLowerCase()],6),e=>"transparent"===e?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,"srgb"],serialize:"srgb",interpolate:{r:O7,g:O7,b:O7,alpha:{use:O7,fixup:Ue}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Ur=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Un=e=>{let t=Ur(e.r),r=Ur(e.g),n=Ur(e.b),i={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return void 0!==e.alpha&&(i.alpha=e.alpha),i},Ui=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Ua=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"a98",r:Ui(2.0415879038107465*e-.5650069742788597*t-.3447313507783297*r),g:Ui(-.9692436362808798*e+1.8759675015077206*t+.0415550574071756*r),b:Ui(.0134442806320312*e-.1183623922310184*t+1.0151749943912058*r)};return void 0!==n&&(i.alpha=n),i},Us=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Uo=({r:e,g:t,b:r,alpha:n})=>{let i={mode:"lrgb",r:Us(e),g:Us(t),b:Us(r)};return void 0!==n&&(i.alpha=n),i},Ul=e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return void 0!==i&&(a.alpha=i),a},Uu=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):12.92*e},Uc=({r:e,g:t,b:r,alpha:n},i="rgb")=>{let a={mode:i,r:Uu(e),g:Uu(t),b:Uu(r)};return void 0!==n&&(a.alpha=n),a},Ud=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uc({r:3.2409699419045226*e-1.537383177570094*t-.4986107602930034*r,g:-.9692436362808796*e+1.8759675015077204*t+.0415550574071756*r,b:.0556300796969936*e-.2039769588889765*t+1.0569715142428784*r});return void 0!==n&&(i.alpha=n),i},Uh={...Ut,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Ua(Ul(e)),xyz65:Ua},toMode:{rgb:e=>Ud(Un(e)),xyz65:Un}},Up=e=>(e%=360)<0?e+360:e,Uf=e=>{let t;return t=e=>180>=Math.abs(e)?e:e-360*Math.sign(e),e.map((r,n,i)=>{if(void 0===r)return r;let a=Up(r);return 0===n||void 0===e[n-1]?a:t(a-Up(i[n-1]))}).reduce((e,t)=>(e.length&&void 0!==t&&void 0!==e[e.length-1]?e.push(t+e[e.length-1]):e.push(t),e),[])},Um=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ug=Math.PI/180,Uv=180/Math.PI,UA=Um["3"]*Um["4"],Ub=Um["1"]*Um["4"],Uy=Um["1"]*Um["2"]-Um["0"]*Um["3"],Uw=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.s||!t.s)return 0;let r=Up(e.h),n=Math.sin((Up(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*n},Ux=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.c||!t.c)return 0;let r=Up(e.h),n=Math.sin((Up(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*n},UC=e=>{let t=e.reduce((e,t)=>{if(void 0!==t){let r=t*Math.PI/180;e.sin+=Math.sin(r),e.cos+=Math.cos(r)}return e},{sin:0,cos:0}),r=180*Math.atan2(t.sin,t.cos)/Math.PI;return r<0?360+r:r},UE={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:({r:e,g:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(Uy*r+e*UA-t*Ub)/(Uy+UA-Ub),a=r-i,s=(Um["4"]*(t-i)-Um["2"]*a)/Um["3"],o={mode:"cubehelix",l:i,s:0===i||1===i?void 0:Math.sqrt(a*a+s*s)/(Um["4"]*i*(1-i))};return o.s&&(o.h=Math.atan2(s,a)*Uv-120),void 0!==n&&(o.alpha=n),o}},toMode:{rgb:({h:e,s:t,l:r,alpha:n})=>{let i={mode:"rgb"};void 0===r&&(r=0);let a=void 0===t?0:t*r*(1-r),s=Math.cos(e=(void 0===e?0:e+120)*Ug),o=Math.sin(e);return i.r=r+a*(Um["0"]*s+Um["1"]*o),i.g=r+a*(Um["2"]*s+Um["3"]*o),i.b=r+a*(Um["4"]*s+Um["5"]*o),void 0!==n&&(i.alpha=n),i}},interpolate:{h:{use:O7,fixup:Uf},s:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}},US=({l:e,a:t,b:r,alpha:n},i="lch")=>{void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.sqrt(t*t+r*r),s={mode:i,l:e,c:a};return a&&(s.h=Up(180*Math.atan2(r,t)/Math.PI)),void 0!==n&&(s.alpha=n),s},U_=({l:e,c:t,h:r,alpha:n},i="lab")=>{void 0===r&&(r=0);let a={mode:i,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==n&&(a.alpha=n),a},UM={X:.3457/.3585,Y:1,Z:.8251046025104602},UI={X:.3127/.329,Y:1,Z:1.0890577507598784},UT=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,UB=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(e+16)/116,a=t/500+i,s=i-r/200,o={mode:"xyz65",x:UT(a)*UI.X,y:UT(i)*UI.Y,z:UT(s)*UI.Z};return void 0!==n&&(o.alpha=n),o},UR=e=>Ud(UB(e)),Uk=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,UP=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uk(e/UI.X),a=Uk(t/UI.Y),s={mode:"lab65",l:116*a-16,a:500*(i-a),b:200*(a-Uk(r/UI.Z))};return void 0!==n&&(s.alpha=n),s},UD=e=>{let t=UP(Ul(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},UL=26/180*Math.PI,Uz=Math.cos(UL),UF=Math.sin(UL),UN=100/Math.log(1.39),UO=({l:e,c:t,h:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"lab65",l:(Math.exp(e/UN)-1)/.0039},a=(Math.exp(.0435*t*1)-1)/.075,s=a*Math.cos(r/180*Math.PI-UL),o=a*Math.sin(r/180*Math.PI-UL);return i.a=s*Uz-o/.83*UF,i.b=s*UF+o/.83*Uz,void 0!==n&&(i.alpha=n),i},UU=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=t*Uz+r*UF,a=.83*(r*Uz-t*UF),s={mode:"dlch",l:UN/1*Math.log(1+.0039*e),c:Math.log(1+.075*Math.sqrt(i*i+a*a))/.0435};return s.c&&(s.h=Up((Math.atan2(a,i)+UL)/Math.PI*180)),void 0!==n&&(s.alpha=n),s},UQ=e=>UO(US(e,"dlch")),UG=e=>U_(UU(e),"dlab"),UH=RegExp(`^hsla?\\(\\s*${OD}${OL}${OR}${OL}${OR}\\s*(?:,\\s*${Ok}\\s*)?\\)$`),Uj={mode:"hsl",toMode:{rgb:function({h:e,s:t,l:r,alpha:n}){let i;e=Up(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let a=r+t*(r<.5?r:1-r),s=a-(a-r)*2*Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:i={r:a,g:s,b:2*r-a};break;case 1:i={r:s,g:a,b:2*r-a};break;case 2:i={r:2*r-a,g:a,b:s};break;case 3:i={r:2*r-a,g:s,b:a};break;case 4:i={r:s,g:2*r-a,b:a};break;case 5:i={r:a,g:2*r-a,b:s};break;default:i={r:2*r-a,g:2*r-a,b:2*r-a}}return i.mode="rgb",void 0!==n&&(i.alpha=n),i}},fromMode:{rgb:function({r:e,g:t,b:r,alpha:n}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.max(e,t,r),a=Math.min(e,t,r),s={mode:"hsl",s:i===a?0:(i-a)/(1-Math.abs(i+a-1)),l:.5*(i+a)};return i-a!=0&&(s.h=(i===e?(t-r)/(i-a)+(t<r)*6:i===t?(r-e)/(i-a)+2:(e-t)/(i-a)+4)*60),void 0!==n&&(s.alpha=n),s}},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(e,t){if(!t||"hsl"!==t[0]&&"hsla"!==t[0])return;let r={mode:"hsl"},[,n,i,a,s]=t;if(n.type!==O$){if(n.type===OY)return;r.h=n.value}if(i.type!==O$){if("hue"===i.type)return;r.s=i.value/100}if(a.type!==O$){if("hue"===a.type)return;r.l=a.value/100}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r},e=>{let t=e.match(UH);if(!t)return;let r={mode:"hsl"};return void 0!==t[3]?r.h=+t[3]:void 0!==t[1]&&void 0!==t[2]&&(r.h=((e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return 360*e}})(t[1],t[2])),void 0!==t[4]&&(r.s=Math.min(Math.max(0,t[4]/100),1)),void 0!==t[5]&&(r.l=Math.min(Math.max(0,t[5]/100),1)),void 0!==t[6]?r.alpha=Math.max(0,Math.min(1,t[6]/100)):void 0!==t[7]&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r}],serialize:e=>`hsl(${void 0!==e.h?e.h:"none"} ${void 0!==e.s?100*e.s+"%":"none"} ${void 0!==e.l?100*e.l+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O7,fixup:Uf},s:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}};function UV({h:e,s:t,v:r,alpha:n}){let i;e=Up(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:i={r:r,g:r*(1-t*a),b:r*(1-t)};break;case 1:i={r:r*(1-t*a),g:r,b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r,b:r*(1-t*a)};break;case 3:i={r:r*(1-t),g:r*(1-t*a),b:r};break;case 4:i={r:r*(1-t*a),g:r*(1-t),b:r};break;case 5:i={r:r,g:r*(1-t),b:r*(1-t*a)};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",void 0!==n&&(i.alpha=n),i}function UW({r:e,g:t,b:r,alpha:n}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.max(e,t,r),a=Math.min(e,t,r),s={mode:"hsv",s:0===i?0:1-a/i,v:i};return i-a!=0&&(s.h=(i===e?(t-r)/(i-a)+(t<r)*6:i===t?(r-e)/(i-a)+2:(e-t)/(i-a)+4)*60),void 0!==n&&(s.alpha=n),s}let Uq={mode:"hsv",toMode:{rgb:UV},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:UW},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:O7,fixup:Uf},s:O7,v:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}};function UX(e){if(e<0)return 0;let t=Math.pow(e,.012683313515655966);return 1e4*Math.pow(Math.max(0,t-.8359375)/(18.8515625-18.6875*t),6.277394636015326)}function UJ(e){if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),78.84375)}let UK=e=>Math.max(e/203,0),UY=({i:e,t,p:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=UX(e+.008609037037932761*t+.11102962500302593*r),a=UX(e-.00860903703793275*t-.11102962500302599*r),s=UX(e+.5600313357106791*t-.32062717498731885*r),o={mode:"xyz65",x:UK(2.070152218389422*i-1.3263473389671556*a+.2066510476294051*s),y:UK(.3647385209748074*i+.680566024947227*a-.0453045459220346*s),z:UK(-.049747207535812*i-.0492609666966138*a+1.1880659249923042*s)};return void 0!==n&&(o.alpha=n),o},U$=(e=0)=>Math.max(203*e,0),UZ=({x:e,y:t,z:r,alpha:n})=>{let i=U$(e),a=U$(t),s=U$(r),o=UJ(.3592832590121217*i+.6976051147779502*a-.0358915932320289*s),l=UJ(-.1920808463704995*i+1.1004767970374323*a+.0753748658519118*s),u=UJ(.0070797844607477*i+.0748396662186366*a+.8433265453898765*s),c={mode:"itp",i:.5*o+.5*l,t:1.61376953125*o-3.323486328125*l+1.709716796875*u,p:4.378173828125*o-4.24560546875*l-.132568359375*u};return void 0!==n&&(c.alpha=n),c},U0=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),134.03437499999998)},U1=(e=0)=>Math.max(203*e,0),U2=({x:e,y:t,z:r,alpha:n})=>{e=U1(e),t=U1(t);let i=1.15*e-.15*(r=U1(r)),a=.66*t+.34*e,s=U0(.41478972*i+.579999*a+.014648*r),o=U0(-.20151*i+1.120649*a+.0531008*r),l=U0(-.0166008*i+.2648*a+.6684799*r),u=(s+o)/2,c={mode:"jab",j:.44*u/(1-.56*u)-16295499532821565e-27,a:3.524*s-4.066708*o+.542708*l,b:.199076*s+1.096799*o-1.295875*l};return void 0!==n&&(c.alpha=n),c},U3=e=>{if(e<0)return 0;let t=Math.pow(e,.007460772656268216);return 1e4*Math.pow((.8359375-t)/(18.6875*t-18.8515625),6.277394636015326)},U4=({j:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(e+16295499532821565e-27)/(.44+.56*(e+16295499532821565e-27)),a=U3(i+.13860504*t+.058047316*r),s=U3(i-.13860504*t-.058047316*r),o=U3(i-.096019242*t-.8118919*r),l={mode:"xyz65",x:(1.661373024652174*a-.914523081304348*s+.23136208173913045*o)/203,y:(-.3250758611844533*a+1.571847026732543*s-.21825383453227928*o)/203,z:(-.090982811*a-.31272829*s+1.5227666*o)/203};return void 0!==n&&(l.alpha=n),l},U5=e=>{let t=U2(Ul(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},U8=e=>Ud(U4(e)),U6=({j:e,a:t,b:r,alpha:n})=>{void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:i};return i&&(a.h=Up(180*Math.atan2(r,t)/Math.PI)),void 0!==n&&(a.alpha=n),a},U9=({j:e,c:t,h:r,alpha:n})=>{void 0===r&&(r=0);let i={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==n&&(i.alpha=n),i},U7=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,Qe=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=(e+16)/116,a=t/500+i,s=i-r/200,o={mode:"xyz50",x:U7(a)*UM.X,y:U7(i)*UM.Y,z:U7(s)*UM.Z};return void 0!==n&&(o.alpha=n),o},Qt=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uc({r:3.1341359569958707*e-1.6173863321612538*t-.4906619460083532*r,g:-.978795502912089*e+1.916254567259524*t+.03344273116131949*r,b:.07195537988411677*e-.2289768264158322*t+1.405386058324125*r});return void 0!==n&&(i.alpha=n),i},Qr=e=>Qt(Qe(e)),Qn=e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return void 0!==i&&(a.alpha=i),a},Qi=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,Qa=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Qi(e/UM.X),a=Qi(t/UM.Y),s={mode:"lab",l:116*a-16,a:500*(i-a),b:200*(a-Qi(r/UM.Z))};return void 0!==n&&(s.alpha=n),s},Qs=e=>{let t=Qa(Qn(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Qo={mode:"lab",toMode:{xyz50:Qe,rgb:Qr},fromMode:{xyz50:Qa,rgb:Qs},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[function(e,t){if(!t||"lab"!==t[0])return;let r={mode:"lab"},[,n,i,a,s]=t;if("hue"!==n.type&&"hue"!==i.type&&"hue"!==a.type)return n.type!==O$&&(r.l=Math.min(Math.max(0,n.value),100)),i.type!==O$&&(r.a=i.type===OK?i.value:125*i.value/100),a.type!==O$&&(r.b=a.type===OK?a.value:125*a.value/100),s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`lab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:O7,a:O7,b:O7,alpha:{use:O7,fixup:Ue}}},Ql={...Qo,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:UB,rgb:UR},fromMode:{xyz65:UP,rgb:UD},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Qu={mode:"lch",toMode:{lab:U_,rgb:e=>Qr(U_(e))},fromMode:{rgb:e=>US(Qs(e)),lab:US},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[function(e,t){if(!t||"lch"!==t[0])return;let r={mode:"lch"},[,n,i,a,s]=t;if(n.type!==O$){if("hue"===n.type)return;r.l=Math.min(Math.max(0,n.value),100)}if(i.type!==O$&&(r.c=Math.max(0,i.type===OK?i.value:150*i.value/100)),a.type!==O$){if(a.type===OY)return;r.h=a.value}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`lch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O7,fixup:Uf},c:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}},Qc={...Qu,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>U_(e,"lab65"),rgb:e=>UR(U_(e,"lab65"))},fromMode:{rgb:e=>US(UD(e),"lch65"),lab65:e=>US(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Qd=({l:e,u:t,v:r,alpha:n})=>{void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:i};return i&&(a.h=Up(180*Math.atan2(r,t)/Math.PI)),void 0!==n&&(a.alpha=n),a},Qh=({l:e,c:t,h:r,alpha:n})=>{void 0===r&&(r=0);let i={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return void 0!==n&&(i.alpha=n),i},Qp=(e,t,r)=>4*e/(e+15*t+3*r),Qf=(e,t,r)=>9*t/(e+15*t+3*r),Qm=Qp(UM.X,UM.Y,UM.Z),Qg=Qf(UM.X,UM.Y,UM.Z),Qv=({x:e,y:t,z:r,alpha:n})=>{let i;void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let a=(i=t/UM.Y)<=.008856451679035631?903.2962962962963*i:116*Math.cbrt(i)-16,s=Qp(e,t,r),o=Qf(e,t,r);isFinite(s)&&isFinite(o)?(s=13*a*(s-Qm),o=13*a*(o-Qg)):a=s=o=0;let l={mode:"luv",l:a,u:s,v:o};return void 0!==n&&(l.alpha=n),l},QA=(eh=UM.X,4*eh/(eh+15*UM.Y+3*UM.Z)),Qb=(ep=UM.X,9*(ef=UM.Y)/(ep+15*ef+3*UM.Z)),Qy=({l:e,u:t,v:r,alpha:n})=>{if(void 0===e&&(e=0),0===e)return{mode:"xyz50",x:0,y:0,z:0};void 0===t&&(t=0),void 0===r&&(r=0);let i=t/(13*e)+QA,a=r/(13*e)+Qb,s=UM.Y*(e<=8?e/903.2962962962963:Math.pow((e+16)/116,3)),o={mode:"xyz50",x:9*i*s/(4*a),y:s,z:s*(12-3*i-20*a)/(4*a)};return void 0!==n&&(o.alpha=n),o},Qw={...Ut,mode:"lrgb",toMode:{rgb:Uc},fromMode:{rgb:Uo},parse:["srgb-linear"],serialize:"srgb-linear"},Qx=({r:e,g:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),s=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),o={mode:"oklab",l:.210454268309314*i+.7936177747023054*a-.0040720430116193*s,a:1.9779985324311684*i-2.42859224204858*a+.450593709617411*s,b:.0259040424655478*i+.7827717124575296*a-.8086757549230774*s};return void 0!==n&&(o.alpha=n),o},QC=e=>{let t=Qx(Uo(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},QE=({l:e,a:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),s=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),o={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*a+.2309699031821044*s,g:-1.2684379732850317*i+2.6097573492876887*a-.3413193760026573*s,b:-.0041960761386756*i-.7034186179359362*a+1.7076146940746117*s};return void 0!==n&&(o.alpha=n),o},QS=e=>Uc(QE(e));function Q_(e){return .5*(1.206/1.03*e-.206+Math.sqrt((1.206/1.03*e-.206)*(1.206/1.03*e-.206)+1.206/1.03*.12*e))}function QM(e){return(e*e+.206*e)/(1.206/1.03*(e+.03))}function QI(e,t){let r,n,i,a,s,o,l,u,c,d,h,p,f,m,g,v,A,b=(-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,i=.59662641,a=.75515197,s=.56771245,o=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,i=.08285427,a=.1254107,s=.14503204,o=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,n=-.00915799,i=-1.1513021,a=-.50559606,s=.00692167,o=-.0041960863,l=-.7034186147,u=1.707614701),c=r+n*e+i*t+a*e*e+s*e*t,d=.3963377774*e+.2158037573*t,h=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t,v=o*((f=1+c*d)*f*f)+l*((m=1+c*h)*m*m)+u*((g=1+c*p)*g*g),c-=v*(A=3*d*f*f*o+3*h*m*m*l+3*p*g*g*u)/(A*A-.5*v*(6*d*d*f*o+6*h*h*m*l+6*p*p*g*u))),y=QE({l:1,a:b*e,b:b*t}),w=Math.cbrt(1/Math.max(y.r,y.g,y.b));return[w,w*b]}function QT(e,t,r=null){r||(r=QI(e,t));let n=r[0],i=r[1];return[i/n,i/(1-n)]}function QB(e,t,r){let n=QI(t,r),i=function(e,t,r,n,i,a=null){let s;if(a||(a=QI(e,t)),(r-i)*a[1]-(a[0]-i)*1<=0)s=a[1]*i/(+a[0]+a[1]*(i-r));else{s=a[1]*(i-1)/(+(a[0]-1)+a[1]*(i-r));{let n=r-i,a=.3963377774*e+.2158037573*t,o=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,u=n+ +a,c=n+ +o,d=n+ +l;{let e=i*(1-s)+s*r,t=+s,n=e+t*a,h=e+t*o,p=e+t*l,f=n*n*n,m=h*h*h,g=p*p*p,v=3*u*n*n,A=3*c*h*h,b=3*d*p*p,y=6*u*u*n,w=6*c*c*h,x=6*d*d*p,C=4.0767416621*f-3.3077115913*m+.2309699292*g-1,E=4.0767416621*v-3.3077115913*A+.2309699292*b,S=E/(E*E-.5*C*(4.0767416621*y-3.3077115913*w+.2309699292*x)),_=-C*S,M=-1.2684380046*f+2.6097574011*m-.3413193965*g-1,I=-1.2684380046*v+2.6097574011*A-.3413193965*b,T=I/(I*I-.5*M*(-1.2684380046*y+2.6097574011*w-.3413193965*x)),B=-M*T,R=-.0041960863*f-.7034186147*m+1.707614701*g-1,k=-.0041960863*v-.7034186147*A+1.707614701*b,P=k/(k*k-.5*R*(-.0041960863*y-.7034186147*w+1.707614701*x)),D=-R*P;s+=Math.min(_=S>=0?_:1e6,Math.min(B=T>=0?B:1e6,D=P>=0?D:1e6))}}}return s}(t,r,e,0,e,n),a=QT(t,r,n),s=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),o=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=i/Math.min(e*a[0],(1-e)*a[1]),u=e*s,c=(1-e)*o,d=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return[Math.sqrt(1/(1/((u=.4*e)*u)+1/((c=(1-e)*.8)*c))),d,i]}function QR(e){let t,r=void 0!==e.l?e.l:0,n=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,a={mode:"okhsl",l:Q_(r)};void 0!==e.alpha&&(a.alpha=e.alpha);let s=Math.sqrt(n*n+i*i);if(!s)return a.s=0,a;let[o,l,u]=QB(r,n/s,i/s);if(s<l){let e=.8*o;t=(s-0)/(e+(1-e/l)*(s-0))*.8}else{let e=.2*l*l*1.5625/o;t=.8+.2*((s-l)/(e+(1-e/(u-l))*(s-l)))}return t&&(a.s=t,a.h=Up(180*Math.atan2(i,n)/Math.PI)),a}function Qk(e){let t,r,n,i,a=void 0!==e.h?e.h:0,s=void 0!==e.s?e.s:0,o=void 0!==e.l?e.l:0,l={mode:"oklab",l:QM(o)};if(void 0!==e.alpha&&(l.alpha=e.alpha),!s||1===o)return l.a=l.b=0,l;let u=Math.cos(a/180*Math.PI),c=Math.sin(a/180*Math.PI),[d,h,p]=QB(l.l,u,c);s<.8?(t=1.25*s,r=0,i=1-(n=.8*d)/h):(t=5*(s-.8),r=h,i=1-(n=.2*h*h*1.5625/d)/(p-h));let f=r+t*n/(1-i*t);return l.a=f*u,l.b=f*c,l}let QP={...Uj,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:QR,rgb:e=>QR(QC(e))},toMode:{oklab:Qk,rgb:e=>QS(Qk(e))}};function QD(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,n=void 0!==e.b?e.b:0,i=Math.sqrt(r*r+n*n),a=i?r/i:1,s=i?n/i:1,[o,l]=QT(a,s),u=l/(i+t*l),c=u*t,d=u*i,h=QM(c),p=d*h/c,f=QE({l:h,a:a*p,b:s*p}),m=Math.cbrt(1/Math.max(f.r,f.g,f.b,0));t/=m;let g={mode:"okhsv",s:(i=i/m*Q_(t)/t)?(.5+l)*d/(.5*l+l*(1-.5/o)*d):0,v:(t=Q_(t))?t/c:0};return g.s&&(g.h=Up(180*Math.atan2(n,r)/Math.PI)),void 0!==e.alpha&&(g.alpha=e.alpha),g}function QL(e){let t={mode:"oklab"};void 0!==e.alpha&&(t.alpha=e.alpha);let r=void 0!==e.h?e.h:0,n=void 0!==e.s?e.s:0,i=void 0!==e.v?e.v:0,a=Math.cos(r/180*Math.PI),s=Math.sin(r/180*Math.PI),[o,l]=QT(a,s),u=1-.5/o,c=1-.5*n/(.5+l-l*u*n),d=n*l*.5/(.5+l-l*u*n),h=QM(c),p=d*h/c,f=QE({l:h,a:a*p,b:s*p}),m=Math.cbrt(1/Math.max(f.r,f.g,f.b,0)),g=QM(i*c),v=d*g/c;return t.l=g*m,t.a=v*a*m,t.b=v*s*m,t}let Qz={...Uq,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:QD,rgb:e=>QD(QC(e))},toMode:{oklab:QL,rgb:e=>QS(QL(e))}},QF={...Qo,mode:"oklab",toMode:{lrgb:QE,rgb:QS},fromMode:{lrgb:Qx,rgb:QC},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[function(e,t){if(!t||"oklab"!==t[0])return;let r={mode:"oklab"},[,n,i,a,s]=t;if("hue"!==n.type&&"hue"!==i.type&&"hue"!==a.type)return n.type!==O$&&(r.l=Math.min(Math.max(0,n.type===OK?n.value:n.value/100),1)),i.type!==O$&&(r.a=i.type===OK?i.value:.4*i.value/100),a.type!==O$&&(r.b=a.type===OK?a.value:.4*a.value/100),s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`oklab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},QN={...Qu,mode:"oklch",toMode:{oklab:e=>U_(e,"oklab"),rgb:e=>QS(U_(e,"oklab"))},fromMode:{rgb:e=>US(QC(e),"oklch"),oklab:e=>US(e,"oklch")},parse:[function(e,t){if(!t||"oklch"!==t[0])return;let r={mode:"oklch"},[,n,i,a,s]=t;if(n.type!==O$){if("hue"===n.type)return;r.l=Math.min(Math.max(0,n.type===OK?n.value:n.value/100),1)}if(i.type!==O$&&(r.c=Math.max(0,i.type===OK?i.value:.4*i.value/100)),a.type!==O$){if(a.type===OY)return;r.h=a.value}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`oklch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},QO=e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return void 0!==i&&(a.alpha=i),a},QU=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Uc({r:2.4934969119414263*e-.9313836179191242*t-.402710784450717*r,g:-.8294889695615749*e+1.7626640603183465*t+.0236246858419436*r,b:.0358458302437845*e-.0761723892680418*t+.9568845240076871*r},"p3");return void 0!==n&&(i.alpha=n),i},QQ={...Ut,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>QU(Ul(e)),xyz65:QU},toMode:{rgb:e=>Ud(QO(e)),xyz65:QO}},QG=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},QH=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"prophoto",r:QG(1.3457868816471585*e-.2555720873797946*t-.0511018649755453*r),g:QG(-.5446307051249019*e+1.5082477428451466*t+.0205274474364214*r),b:QG(0*e+0*t+1.2119675456389452*r)};return void 0!==n&&(i.alpha=n),i},Qj=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},QV=e=>{let t=Qj(e.r),r=Qj(e.g),n=Qj(e.b),i={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return void 0!==e.alpha&&(i.alpha=e.alpha),i},QW={...Ut,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:QH,rgb:e=>QH(Qn(e))},toMode:{xyz50:QV,rgb:e=>Qt(QV(e))}},Qq=e=>{let t=Math.abs(e);return t>.018053968510807?(Math.sign(e)||1)*(1.09929682680944*Math.pow(t,.45)-(1.09929682680944-1)):4.5*e},QX=({x:e,y:t,z:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"rec2020",r:Qq(1.7166511879712683*e-.3556707837763925*t-.2533662813736599*r),g:Qq(-.6666843518324893*e+1.6164812366349395*t+.0157685458139111*r),b:Qq(.0176398574453108*e-.0427706132578085*t+.9421031212354739*r)};return void 0!==n&&(i.alpha=n),i},QJ=(e=0)=>{let t=Math.abs(e);return t<.08124285829863151?e/4.5:(Math.sign(e)||1)*Math.pow((t+1.09929682680944-1)/1.09929682680944,1/.45)},QK=e=>{let t=QJ(e.r),r=QJ(e.g),n=QJ(e.b),i={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return void 0!==e.alpha&&(i.alpha=e.alpha),i},QY={...Ut,mode:"rec2020",fromMode:{xyz65:QX,rgb:e=>QX(Ul(e))},toMode:{xyz65:QK,rgb:e=>Ud(QK(e))},parse:["rec2020"],serialize:"rec2020"},Q$=Math.cbrt(.0037930732552754493),QZ=e=>Math.cbrt(e)-Q$,Q0=e=>Math.pow(e+Q$,3),Q1={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:e,y:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Q0(e+t)-.0037930732552754493,a=Q0(t-e)-.0037930732552754493,s=Q0(r+t)-.0037930732552754493,o=Uc({r:11.031566904639861*i-9.866943908131562*a-.16462299650829934*s,g:-3.2541473810744237*i+4.418770377582723*a-.16462299650829934*s,b:-3.6588512867136815*i+2.7129230459360922*a+1.9459282407775895*s});return void 0!==n&&(o.alpha=n),o}},fromMode:{rgb:e=>{let{r:t,g:r,b:n,alpha:i}=Uo(e),a=QZ(.3*t+.622*r+.078*n+.0037930732552754493),s=QZ(.23*t+.692*r+.078*n+.0037930732552754493),o={mode:"xyb",x:(a-s)/2,y:(a+s)/2,b:QZ(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+.0037930732552754493)-(a+s)/2};return void 0!==i&&(o.alpha=i),o}},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:O7,y:O7,b:O7,alpha:{use:O7,fixup:Ue}}},Q2={mode:"yiq",toMode:{rgb:({y:e,i:t,q:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return void 0!==n&&(i.alpha=n),i}},fromMode:{rgb:({r:e,g:t,b:r,alpha:n})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return void 0!==n&&(i.alpha=n),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:O7,i:O7,q:O7,alpha:{use:O7,fixup:Ue}}};((e=4)=>t=>{let r;return"number"==typeof t?Math.round(t*(r=Math.pow(10,r=e)))/r:t})(2);let Q3=e=>Math.round(255*Math.max(0,Math.min(1,e||0))),Q4=ON("rgb");ON("hsl");let Q5=e=>(e=>{if(void 0!==e)return"#"+(0x1000000|Q3(e.r)<<16|Q3(e.g)<<8|Q3(e.b)).toString(16).slice(1)})(Q4(e));Oj(Uh),Oj(UE),Oj({mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:UQ,rgb:e=>UR(UQ(e))},fromMode:{lab65:UG,rgb:e=>UG(UD(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:O7,a:O7,b:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:UO,dlab:e=>U_(e,"dlab"),rgb:e=>UR(UO(e))},fromMode:{lab65:UU,dlab:e=>US(e,"dlch"),rgb:e=>UU(UD(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:O7,c:O7,h:{use:O7,fixup:Uf},alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}}),Oj({mode:"hsi",toMode:{rgb:function({h:e,s:t,i:r,alpha:n}){let i;e=Up(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1-t)};break;case 1:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1+t*(3/(2-a)-1)),b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r*(1+t*(3/(2-a)-1)),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;case 3:i={r:r*(1-t),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1+t*(3/(2-a)-1))};break;case 4:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3/(2-a)-1))};break;case 5:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",void 0!==n&&(i.alpha=n),i}},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:function({r:e,g:t,b:r,alpha:n}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let i=Math.max(e,t,r),a=Math.min(e,t,r),s={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return i-a!=0&&(s.h=(i===e?(t-r)/(i-a)+(t<r)*6:i===t?(r-e)/(i-a)+2:(e-t)/(i-a)+4)*60),void 0!==n&&(s.alpha=n),s}},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:O7,fixup:Uf},s:O7,i:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Uw},average:{h:UC}}),Oj(Uj),Oj(Uq),Oj({mode:"hwb",toMode:{rgb:function({h:e,w:t,b:r,alpha:n}){if(void 0===t&&(t=0),void 0===r&&(r=0),t+r>1){let e=t+r;t/=e,r/=e}return UV({h:e,s:1===r?1:1-t/(1-r),v:1-r,alpha:n})}},fromMode:{rgb:function(e){let t=UW(e);if(void 0===t)return;let r=void 0!==t.s?t.s:0,n=void 0!==t.v?t.v:0,i={mode:"hwb",w:(1-r)*n,b:1-n};return void 0!==t.h&&(i.h=t.h),void 0!==t.alpha&&(i.alpha=t.alpha),i}},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(e,t){if(!t||"hwb"!==t[0])return;let r={mode:"hwb"},[,n,i,a,s]=t;if(n.type!==O$){if(n.type===OY)return;r.h=n.value}if(i.type!==O$){if("hue"===i.type)return;r.w=i.value/100}if(a.type!==O$){if("hue"===a.type)return;r.b=a.value/100}return s.type!==O$&&(r.alpha=Math.min(1,Math.max(0,s.type===OK?s.value:s.value/100))),r}],serialize:e=>`hwb(${void 0!==e.h?e.h:"none"} ${void 0!==e.w?100*e.w+"%":"none"} ${void 0!==e.b?100*e.b+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:O7,fixup:Uf},w:O7,b:O7,alpha:{use:O7,fixup:Ue}},difference:{h:(e,t)=>{if(void 0===e.h||void 0===t.h)return 0;let r=Up(e.h),n=Up(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r}},average:{h:UC}}),Oj({mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:UY,rgb:e=>Ud(UY(e))},fromMode:{xyz65:UZ,rgb:e=>UZ(Ul(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:O7,t:O7,p:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:U5,xyz65:U2},toMode:{rgb:U8,xyz65:U4},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:O7,a:O7,b:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:U9,rgb:e=>U8(U9(e))},fromMode:{rgb:e=>U6(U5(e)),jab:U6},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:O7,fixup:Uf},c:O7,j:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}}),Oj(Qo),Oj(Ql),Oj(Qu),Oj(Qc),Oj({mode:"lchuv",toMode:{luv:Qh,rgb:e=>Qt(Qy(Qh(e)))},fromMode:{rgb:e=>Qd(Qv(Qn(e))),luv:Qd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:O7,fixup:Uf},c:O7,l:O7,alpha:{use:O7,fixup:Ue}},difference:{h:Ux},average:{h:UC}}),Oj(Qw),Oj({mode:"luv",toMode:{xyz50:Qy,rgb:e=>Qt(Qy(e))},fromMode:{xyz50:Qv,rgb:e=>Qv(Qn(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:O7,u:O7,v:O7,alpha:{use:O7,fixup:Ue}}}),Oj(QP),Oj(Qz),Oj(QF);let Q8=Oj(QN);Oj(QQ),Oj(QW),Oj(QY),Oj(Ut),Oj(Q1),Oj({mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Qt,lab:Qa},fromMode:{rgb:Qn,lab:Qe},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:O7,y:O7,z:O7,alpha:{use:O7,fixup:Ue}}}),Oj({mode:"xyz65",toMode:{rgb:Ud,xyz50:e=>{let{x:t,y:r,z:n,alpha:i}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return void 0!==i&&(a.alpha=i),a}},fromMode:{rgb:Ul,xyz50:e=>{let{x:t,y:r,z:n,alpha:i}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return void 0!==i&&(a.alpha=i),a}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:O7,y:O7,z:O7,alpha:{use:O7,fixup:Ue}}}),Oj(Q2);var Q6=TC("../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js");let Q9=/oklch\(([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\)/;function Q7(e,t){let r=e.match(Q9);return r?{l:Number.parseFloat(r[1]),c:Number.parseFloat(r[2]),h:Number.parseFloat(r[3])}:{l:t[0],c:t[1],h:t[2]}}function Ge({data:e,foreground:t,background:r,robustness:n="M",className:i,...a}){let[s,o]=(0,tC.useState)(null);return((0,tC.useEffect)(()=>{(async()=>{try{let i=getComputedStyle(document.documentElement),a=t??i.getPropertyValue("--foreground"),s=r??i.getPropertyValue("--background"),l=Q7(a,[.21,.006,285.885]),u=Q7(s,[.985,0,0]),c=await Q6.toString(e,{type:"svg",color:{dark:Q5(Q8({mode:"oklch",...l})),light:Q5(Q8({mode:"oklch",...u}))},width:200,errorCorrectionLevel:n,margin:0});o(c)}catch(e){console.error(e)}})()},[e,t,r,n]),s)?(0,t_.jsx)("div",{className:BR("size-full","[&_svg]:size-full",i),dangerouslySetInnerHTML:{__html:s},...a}):null}function Gt({className:e,...t}){let{poster:r,width:n,height:i,posterRef:a}=FR(),[s,o]=(0,tC.useState)(""),[l,u]=(0,tC.useState)(""),[c,d]=(0,tC.useState)(!1),[h,p]=(0,tC.useState)(!1),f=(0,tC.useRef)(null),m=(0,tC.useMemo)(()=>{let e=new URL("https://viewer.vizbl.com/poster/app/index.html");return e.searchParams.set("texture",r),e.searchParams.set("texture_width",(100*n).toString()),e.searchParams.set("texture_height",(100*i).toString()),e.toString()},[r,n,i]),g=async()=>{if(a.current){d(!0);try{let e=new fT,t=await e.parseAsync(a.current),r=new File([t],"scene.usdz",{type:"model/vnd.usdz+zip"});o(URL.createObjectURL(r));let n=new fO,i=await n.parseAsync(a.current,{binary:!0}),s=new File([i],"scene.glb",{type:"model/gltf-binary"});u(URL.createObjectURL(s))}finally{d(!1)}}};return(0,tC.useEffect)(()=>{let e=f.current;if(!e)return;let t=null,r=()=>{p(e.canActivateAR),t=requestAnimationFrame(r)};return r(),()=>{null!==t&&cancelAnimationFrame(t)}},[]),(0,tC.useEffect)(()=>((""!==s||""!==l)&&f.current?.activateAR(),()=>{(""!==s||""!==l)&&URL.revokeObjectURL(s)}),[s,l]),(0,t_.jsxs)("div",{className:BR(e),...t,children:[h?(0,t_.jsx)(BL,{variant:"contrast",disabled:c,onClick:g,children:"View in place"}):(0,t_.jsxs)("div",{className:"p-4 text-xs text-center text-constant-black bg-constant-white rounded-2xl",children:[(0,t_.jsx)(Ge,{className:"size-22 mb-2",robustness:"L",data:decodeURIComponent(m)}),(0,t_.jsx)("span",{children:"View in place"})]}),(0,t_.jsx)("model-viewer",{ref:f,className:"hidden",src:l,iosSrc:s,reveal:"manual",ar:!0,cameraControls:!0,arModes:"webxr",arScale:"fixed",shadowIntensity:1,interactionPromptThreshold:100})]})}let Gr={width:void 0,height:void 0};function Gn(e,t,r){return e[t]?Array.isArray(e[t])?e[t][0][r]:e[t][r]:"contentBoxSize"===t?e.contentRect["inlineSize"===r?"width":"height"]:void 0}function Gi(e){let{z:t,pitchDeg:r,rollDeg:n}=e,i=_Y(e=>e.camera);return(0,tC.useMemo)(()=>{let e,a,s,o,l,u,c,d;return e=new nV,a=new nV,s=new nj,o=new nV(1,0,0),l=new nV(0,1,0),u=new nV(0,0,1),c=nG.degToRad(r),d=nG.degToRad(n),e.copy(u).applyAxisAngle(o,c).applyAxisAngle(l,d).normalize(),a.copy(e).applyQuaternion(i.quaternion).normalize(),s.setFromUnitVectors(u,a),{position:i.position.clone().addScaledVector(a,-(.01*t)).toArray(),quaternion:s.toArray()}},[t,r,n])}function Ga({ref:e,z:t,pitchDeg:r,rollDeg:n}){let i=_0(uU,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPaklEQVR4Ae2dsXFcyQ5FpV+yFIFiUBSTgTw6jEIZMIONgs54TIYxKAK5+oVf9acu4ezgNR4g9Jx1dlDqBzQOGrdAC58vl8ufT43/PT09NUb/9Ol6vbbGJ3/q3/kA/9MZnNgQgEAvAQSglz/RIdBKAAFoxU9wCPQSQAB6+RMdAq0EEIBW/ASHQC8BBKCXP9Eh0EoAAWjFT3AI9BJAAHr5Ex0CrQQQgFb8BIdALwEEoJc/0SHQSgABaMVPcAj0ElgWgNf3n60Z/Hr50Rr//etra/yXH835v35tzf/Xj5fW+K8/31vj/3hZy39ZAFqzJzgEILBEAAFYwsfHEJhN4MuR6/uxX+3n7/8ccRn6xo/9an97eQv5OnLYj/1qf//9fMRl6Bs/9qv98laQvxv738X+/vw7lMuRw37sV/vb28sRl6Fv/Niv9vM/30O+jhz2Y7/ab8E/CQ4JgDa5Nb/aRxKKfqNNbs2vdtTXkfPa5Nb8ah/xF/1Gm9yaX+2oryPntcmt+dU+4i/6jTa5Nb/aUV9HzmuTW/OrfcRf9Bttcmt+taO++BMgSozzENiIAAKwUTFJBQJRAssCUD3++wSrx38fv3r89/Grx38fv3r89/Grx38fv3r89/FXxn/ztSwA/kLYEIDAHAIIwJxacVMIpBNAANKR4hACcwggAHNqxU0hkE4AAUhHikMIzCGAAMypFTeFQDoBBCAdKQ4hMIcAAjCnVtwUAukEEIB0pDiEwBwCCMCcWnFTCKQTQADSkeIQAnMIIABzasVNIZBO4Av76dlPn/6qAg6v12vgdP7RR3//TAD5bwqPEBhDAAEYUyouCoF8AghAPlM8QmAMAQRgTKm4KATyCSAA+UzxCIExBBCAMaXiohDIJ4AA5DPFIwTGEEAAxpSKi0IgnwACkM8UjxAYQwABGFMqLgqBfAIIQD5TPEJgDIFlAdDFnB1Z62LOjvi6mLMjvi7m7Iivizk74utizo74upizI/5q/ssC0JE0MSEAgRwCCEAOR7xAYCSBQ+vB/divdsWuPj/2q12xq8+P/WpX7OrzY7/aFbv6/NivdsWuPj/2ql2xq8+P/Wqv7uq7R0U0XzuvdjT/QwKgTW7Nr/Y9Caye0Sa35ld71fc932uTW/Orfc/3q2e0ya351V71fc/32uTW/Grf8/3qGX3k9vjVXvV9z/fa5Nb8at/z/eoZzXc1f/4EWK0G30NgMAEEYHDxuDoEVgksC0D1+O8Trh7/ffzq8d/Hrx7/ffzq8d/H13HY/1uFXT3++5xW818WAH8hbAhAYA4BBGBOrbgpBNIJIADpSHEIgTkEEIA5teKmEEgngACkI8UhBOYQQADm1IqbQiCdAAKQjhSHEJhDAAGYUytuCoF0AghAOlIcQmAOAQRgTq24KQTSCSAA6UhxCIE5BBCAObXiphBIJ/D5crn8SfcacPjo+9nJ/ynwWvKPXq/XfKcBj931ZwIIFIujENiNAAKwW0XJBwIBAghAABZHIbAbAQRgt4qSDwQCBBCAACyOQmA3AgjAbhUlHwgECCAAAVgchcBuBBCA3SpKPhAIEEAAArA4CoHdCCAAu1WUfCAQIIAABGBxFAK7EVgWAF3M2QFHF3N2xNfFnB3xdTFnR3xdTNkRXxdzdsTvzn+1/ssC0AGdmBCAQA4BBCCHI14gMJLAofXgfuxXu2JXnx/71a7Y1efHfrUrdvX5sU/til19fuxVe3VX3T1d5Md+tSt29Wm+dl+1K/LXelt8taP1PyQA2uTW/Grbhc7+T5vcml/ts2Obf21ya361K+Jrka34alfE10duj1/tivja5Nb8alfE13w78td6r9afPwEqXgwxIPCXEkAA/tLCcC0IVBBYFoDq8d9DqR7/ffzq8d/H13HQ/1uFreNwRTwfo3r89/G781+t/7IAeCDYEIDAHAIIwJxacVMIpBNAANKR4hACcwggAHNqxU0hkE4AAUhHikMIzCGAAMypFTeFQDoBBCAdKQ4hMIcAAjCnVtwUAukEEIB0pDiEwBwCCMCcWnFTCKQTQADSkeIQAnMIIABzasVNIZBO4Ev3fvJH389O/tf0Rx1x+Ojvnwkg8lo4C4HNCCAAmxWUdCAQIYAARGhxFgKbEUAANiso6UAgQgABiNDiLAQ2I4AAbFZQ0oFAhAACEKHFWQhsRgAB2KygpAOBCAEEIEKLsxDYjAACsFlBSQcCEQIIQIQWZyGwGYFlAdDFnB1sdDFnR3xdzNgRXxdTdsTXxZwd8bvz767/6vtfFoCOohMTAhDIIYAA5HDECwRGEji0HtyP/WpX7OrzY4/aFbv6/Nin9uqutntekR971a7YVefHfrUrdvVpvsZL7Yr8td4WX+2K+ut7t/hqR9//MQF4e7O4//vPmr+i6f8fz/6vSVryauu5s35rka34ap8VU/3qI7fHr7aeO+u3Nrk1v9pnxVS/mm9H/lrvjvrre199//wJoC+L3xB4MAIIwIMVnHQhoASWBaB6/NfL228dh/y/Vdg6DlbE8zF0HPb/VmFXj/8+p+78u+u/+v6XBcAXBBsCEJhDAAGYUytuCoF0AghAOlIcQmAOAQRgTq24KQTSCSAA6UhxCIE5BBCAObXiphBIJ4AApCPFIQTmEEAA5tSKm0IgnQACkI4UhxCYQwABmFMrbgqBdAIIQDpSHEJgDgEEYE6tuCkE0gl8vlwuf9K9Bhw++n528n8KvJb8o9frNd9pwGN3/ZkAAsXiKAR2I4AA7FZR8oFAgAACEIDFUQjsRgAB2K2i5AOBAAEEIACLoxDYjQACsFtFyQcCAQIIQAAWRyGwGwEEYLeKkg8EAgQQgAAsjkJgNwIIwG4VJR8IBAggAAFYHIXAbgSWBUAXE3bA0cWMHfF1MWVHfF3M2RG/O//u+ne/f13Me6T+ywJwJCjfQAACfwcBBODvqAO3gEALgUPrwf3Yo/bqrrJ7KPixT+2KXW1+7FW7YledH/vVrtjVp/lavdSuyF/rbfHVrqi/vneLr3bF+/djv9rRXZ2HBECTtOTVNiBn/6dFtuKrfXZs86+P3B6/2hXxtcmt+dWuiK/5duSv9e6ov773jvevTW7Nr3a0/vwJECXGeQhsRAAB2KiYpAKBKIFlAdBxKBo847yOgxn+oj50HI5+m3G+evz3d+7Ov7v+3e9/Zfy3Wi4LgH8Q2BCAwBwCCMCcWnFTCKQTQADSkeIQAnMIIABzasVNIZBOAAFIR4pDCMwhgADMqRU3hUA6AQQgHSkOITCHAAIwp1bcFALpBBCAdKQ4hMAcAgjAnFpxUwikE0AA0pHiEAJzCCAAc2rFTSGQTuBL937yR9/PTv7X9Ecdcfjo758JIPJaOAuBzQggAJsVlHQgECGAAERocRYCmxFAADYrKOlAIEIAAYjQ4iwENiOAAGxWUNKBQIQAAhChxVkIbEYAAdisoKQDgQgBBCBCi7MQ2IwAArBZQUkHAhECCECEFmchsBmBZQHQxYwdbHQxZUd8XczZEb87/+7662LODv66mLMj/vvX16WwywKwFJ2PIQCBVgIIQCt+gkOgl8Ch9eB+7FO7YlebH3vVrthV58d+tSt29Wm+9nzUrshf623x1a6ovx/71a7Y1efHfrVXd/UZz3/7z4/9an///fxvn3/490MCoEW24qv9wftJhj5ye/xqnxTyg1ttcmt+tT8cPMnQfDvy13p31F+b3Jpf7ZOQf3CrTW7Nr/aHgycZ2uTW/GpHQ/InQJQY5yGwEQEEYKNikgoEogSWBUDHwWjwjPM6Dmf4i/qoHv/9/brz765/9fjv+VeP/z7+yvhvvpYFwF8IGwIQmEMAAZhTK24KgXQCCEA6UhxCYA4BBGBOrbgpBNIJIADpSHEIgTkEEIA5teKmEEgngACkI8UhBOYQQADm1IqbQiCdAAKQjhSHEJhDAAGYUytuCoF0AghAOlIcQmAOAQRgTq24KQTSCXy+XC5/0r0GHD76fnbyfwq8lvyj1+s132nAY3f9mQACxeIoBHYjgADsVlHygUCAAAIQgMVRCOxGAAHYraLkA4EAAQQgAIujENiNAAKwW0XJBwIBAghAABZHIbAbAQRgt4qSDwQCBBCAACyOQmA3AgjAbhUlHwgECCAAAVgchcBuBJYFQBdTdsDRxZwd8bvz18WcHfnrYs6O+LqYsyO+LubsiP/r5cdS2GUBWIrOxxCAQCsBBKAVP8Eh0Evg0HpwP/aqXbGrzo/9alfs6tN8rXxqV+Tvx361K3b1+bFf7YpdfX7sV7tiV58f+9Ve3dV3jxz4sV/tby9v97i4nTkkAPrI7fGrffN84g9tcmt+tU8Me3Ot+Xbkr01uza/27ZIn/tAmt+ZX+8SwN9fa5Nb8at8OnfhDm9yaX+0Tw95ca5Nb86t9O3TnD/4EuBMUxyCwIwEEYMeqkhME7iSwLAA6Dt8ZM/VY9fjvL9+df/X47/OvHv99/Orx38evHv99/JXx33wtC4C/EDYEIDCHAAIwp1bcFALpBBCAdKQ4hMAcAgjAnFpxUwikE0AA0pHiEAJzCCAAc2rFTSGQTgABSEeKQwjMIYAAzKkVN4VAOgEEIB0pDiEwhwACMKdW3BQC6QQQgHSkOITAHAIIwJxacVMIpBP40r2f/NH3s5P/Nf1RRxw++vtnAoi8Fs5CYDMCCMBmBSUdCEQIIAARWpyFwGYEEIDNCko6EIgQQAAitDgLgc0IIACbFZR0IBAhgABEaHEWApsRQAA2KyjpQCBCAAGI0OIsBDYjgABsVlDSgUCEAAIQocVZCGxGYFkAdDFnBxtdzNkRXxdzdsTXxZwd8XUxZ0d8XczZEV8Xc3bEf33/uRR2WQCWovMxBCDQSgABaMVPcAj0Eji0HtyP/WpX7OrzY7/aFbv6/NivdsWuPj/2q12xq8+P/WpX7OrzY7/aFbv6/Niv9uquvnvkwI/9aj9//+ceF7czhwRAm9yaX+2b5xN/aJNb86t9Ytiba21ya361b4dO/KFNbs2v9olhb661ya351b4dOvGHNrk1v9onhr251ia35lf7dujEH9rk1vxqR8PyJ0CUGOchsBEBBGCjYpIKBKIElgWgevz3CVaP/z5+9fjv41eP/z5+9fjv41eP/z5+9fjv46+M/+ZrWQD8hbAhAIE5BBCAObXiphBIJ4AApCPFIQTmEEAA5tSKm0IgnQACkI4UhxCYQwABmFMrbgqBdAIIQDpSHEJgDgEEYE6tuCkE0gkgAOlIcQiBOQQQgDm14qYQSCeAAKQjxSEE5hBAAObUiptCIJ3AfwHiG2FWAMZtOgAAAABJRU5ErkJggg=="),{position:a,quaternion:s}=Gi({z:t,pitchDeg:r,rollDeg:n});return(0,tC.useEffect)(()=>{i.wrapS=1e3,i.wrapT=1e3,i.repeat.set(8,8)},[i]),(0,t_.jsxs)("mesh",{ref:e,position:a,quaternion:s,children:[(0,t_.jsx)("planeGeometry",{args:[64,64]}),(0,t_.jsx)("meshStandardMaterial",{map:i,transparent:!0,opacity:0})]})}function Gs({node:e,position:t,scale:r=[1,1,1],uvScale:n}){let i=(0,tC.useRef)(null);return(0,tC.useEffect)(()=>{if(!i.current||void 0===n)return;let t=i.current.geometry.attributes.uv,r=e.geometry.attributes.uv.array;for(let e=0;e<t.count;e++){let i=r[2*e],a=r[2*e+1];t.setXY(e,i*n,a)}t.needsUpdate=!0},[n,e.geometry]),(0,t_.jsx)(SA,{ref:i,object:e,position:t,scale:r})}function Go({width:e,height:t}){let{material:r}=FR(),{nodes:n}=Mk(r?.native?.glbUrl),i=(0,tC.useMemo)(()=>{let e=new nV,t={};["vizbl0","vizbl1","vizbl2","vizbl3","vizbl4","vizbl5","vizbl6","vizbl7"].forEach(r=>{let i=n[r];if(!i?.geometry)return;let a=i.clone();a.updateMatrixWorld(!0),a.geometry.applyMatrix4(a.matrixWorld),a.position.set(0,0,0),a.rotation.set(0,0,0),a.scale.set(1,1,1),a.updateMatrixWorld(!0),a.geometry.computeBoundingBox(),a.geometry.boundingBox&&(a.geometry.boundingBox.getCenter(e),a.geometry.translate(-e.x,-e.y,-e.z)),a.geometry.computeBoundingBox(),t[r]=a});let r=t.vizbl0;if(!r?.geometry)throw Error("Corner mesh not found");let i=r.geometry.boundingBox,a=i.max.x-i.min.x,s=i.max.y-i.min.y,o={top:0,bottom:0,left:0,right:0},l={top:0,bottom:0,left:0,right:0},u=t.vizbl1;if(u?.geometry){let e=u.geometry.boundingBox;o.top=e.max.x-e.min.x,l.top=e.max.y-e.min.y}let c=t.vizbl3;if(c?.geometry){let e=c.geometry.boundingBox;o.right=e.max.y-e.min.y,l.right=e.max.x-e.min.x}let d=t.vizbl5;if(d?.geometry){let e=d.geometry.boundingBox;o.bottom=e.max.x-e.min.x,l.bottom=e.max.y-e.min.y}let h=t.vizbl7;if(h?.geometry){let e=h.geometry.boundingBox;o.left=e.max.y-e.min.y,l.left=e.max.x-e.min.x}return{cornerSize:{width:a,height:s},barLengths:o,barThickness:l,normalizedNodes:t}},[n]),a=e-2*i.cornerSize.width+.002,s=t-2*i.cornerSize.height+.002,o=a/i.barLengths.top,l=a/i.barLengths.bottom,u=s/i.barLengths.left,c=s/i.barLengths.right;return(0,t_.jsxs)("group",{children:[(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl0,position:[-e/2+i.cornerSize.width/2-.001,t/2-i.cornerSize.height/2+.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl1,position:[0,t/2-i.barThickness.top/2+.001,0],scale:[o,1,1],uvScale:o}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl2,position:[e/2-i.cornerSize.width/2+.001,t/2-i.cornerSize.height/2+.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl3,position:[e/2-i.barThickness.right/2+.001,0,0],scale:[1,c,1],uvScale:c}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl4,position:[e/2-i.cornerSize.width/2+.001,-t/2+i.cornerSize.height/2-.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl5,position:[0,-t/2+i.barThickness.bottom/2-.001,0],scale:[l,1,1],uvScale:l}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl6,position:[-e/2+i.cornerSize.width/2-.001,-t/2+i.cornerSize.height/2-.001,0]}),(0,t_.jsx)(Gs,{node:i.normalizedNodes.vizbl7,position:[-e/2+i.barThickness.left/2-.001,0,0],scale:[1,u,1],uvScale:u})]})}function Gl({width:e,height:t,position:r,quaternion:n}){return(0,t_.jsxs)("mesh",{position:r,quaternion:n,children:[(0,t_.jsx)("planeGeometry",{args:[e,t]}),(0,t_.jsx)("meshStandardMaterial",{color:"white"})]})}function Gu({src:e,position:t,quaternion:r}){let{posterRef:n}=FR(),i=_0(uU,e),{width:a,height:s,material:o,frameWidth:l,matting:u,setIsDragging:c}=FR(),d=a+2*u,h=s+2*u,p=u>0?d:a,f=u>0?h:s;return(0,t_.jsxs)("group",{ref:n,position:t,quaternion:r,onPointerDown:()=>c(!0),onPointerUp:()=>c(!1),onPointerLeave:()=>c(!1),children:[o?.native?.glbUrl&&l>0&&(0,t_.jsx)(Go,{width:p,height:f}),u>0&&(0,t_.jsx)(Gl,{width:d,height:h,position:[0,0,.01]}),(0,t_.jsxs)("mesh",{position:[0,0,.02],children:[(0,t_.jsx)("planeGeometry",{args:[a,s]}),(0,t_.jsx)("meshStandardMaterial",{map:i})]})]})}function Gc(){let{poster:e,room:t}=FR(),r=_Y(e=>e.get),n=(0,tC.useRef)(new nV),i=(0,tC.useRef)(new Map),a=(0,tC.useRef)([]),s=Gi((0,tC.useMemo)(()=>{let e=t.config.sides.map(e=>Math.abs(e.pitchDeg)+Math.abs(e.rollDeg)),r=Math.min(...e),n=e.indexOf(r);return t.config.sides[n]},[t])),[o,l]=(0,tC.useState)(s);(0,tC.useEffect)(()=>{l(s)},[s]);let u=(0,tC.useCallback)(()=>{let{camera:e,raycaster:t,pointer:i}=r();t.setFromCamera(i,e);let s=t.intersectObjects(a.current);if(s.length>0){let e=s[0],t=e.point.clone();n.current.set(0,0,1).applyQuaternion(e.object.quaternion),t.addScaledVector(n.current,.05),l({position:t.toArray(),quaternion:e.object.quaternion.toArray()})}},[r]);return(0,t_.jsxs)(t_.Fragment,{children:[(0,t_.jsx)(Ik,{autoTransform:!1,onDrag:u,children:(0,t_.jsx)(Gu,{src:e,position:o.position,quaternion:o.quaternion})}),t.config.sides.map(e=>(0,t_.jsx)(Ga,{ref:t=>{let r=i.current;return t&&r.set(e.id,t),a.current=Array.from(r.values()),()=>{r.delete(e.id),a.current=Array.from(r.values())}},z:e.z,pitchDeg:e.pitchDeg,rollDeg:e.rollDeg},e.id))]})}function Gd({className:e,onSizeChange:t,...r}){let{room:n}=FR(),[i,a]=(0,tC.useState)(null),[s,o]=(0,tC.useState)(null),[l,u]=(0,tC.useState)(null),c=(0,tC.useRef)(null),d=O_("(max-width: 639px)"),{width:h,height:p}=function(e){let t,{ref:r,box:n="content-box"}=e,[{width:i,height:a},s]=tC.useState(Gr),o=(t=tC.useRef(!1),tC.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),tC.useCallback(()=>t.current,[])),l=tC.useRef({...Gr}),u=tC.useRef(void 0);return u.current=e.onResize,tC.useEffect(()=>{if(!r.current||"undefined"==typeof window||!("ResizeObserver"in window))return;let e=new ResizeObserver(([e])=>{let t="border-box"===n?"borderBoxSize":"device-pixel-content-box"===n?"devicePixelContentBoxSize":"contentBoxSize",r=Gn(e,t,"inlineSize"),i=Gn(e,t,"blockSize");if(l.current.width!==r||l.current.height!==i){let e={width:r,height:i};l.current.width=r,l.current.height=i,u.current?u.current(e):o()&&s(e)}});return e.observe(r.current,{box:n}),()=>{e.disconnect()}},[n,r,o]),{width:i,height:a}}({ref:c});return(0,tC.useLayoutEffect)(()=>{if(!h||!p||!i)return;let e=h,r=p;d?e=(r=p)*i:h/p>i?e=p*i:r=h/i,o(e),u(r),t?.(e,r)},[d,i,h,p,t]),(0,tC.useEffect)(()=>{let e=new Image;e.onload=()=>{a(Math.round(e.width/e.height*100)/100)},e.src=n.image},[n]),(0,t_.jsx)("div",{ref:c,className:BR("size-full flex items-center justify-center sm:pt-21 sm:pb-12",e),...r,children:(0,t_.jsx)(Ty,{className:"bg-center bg-contain bg-no-repeat",camera:{fov:n.config.camera.fov},gl:{toneMapping:4,toneMappingExposure:1.2,alpha:!0},style:{width:`${s}px`,height:`${l}px`,backgroundImage:`url(${n.image})`},children:(0,t_.jsxs)(tC.Suspense,{fallback:null,children:[(0,t_.jsx)(Tg,{files:["https://vizbl.com/hdr/neutral.hdr"]}),(0,t_.jsx)(Gc,{})]})})})}function Gh({className:e,...t}){let{containerRef:r,angle:n,setAngle:i,isDragging:a}=FR(),s=(0,tC.useRef)(null),o=O_("(max-width: 639px)"),l=(0,tC.useCallback)(()=>{o&&s.current?.centerView()},[o]);return(0,t_.jsxs)("div",{className:BR("relative flex items-center justify-center overflow-hidden",e),...t,children:[(0,t_.jsx)(pH,{ref:s,disabled:a,children:(0,t_.jsx)(pj,{wrapperClass:"size-full!",contentClass:"h-full! min-w-full sm:max-w-full",children:(0,t_.jsx)(Gd,{onSizeChange:l})})}),(0,t_.jsx)(Gt,{className:"absolute bottom-4 left-4 sm:bottom-6 sm:left-6"}),(0,t_.jsxs)("div",{className:"absolute right-4 bottom-4 inline-flex items-center gap-2 sm:right-6 sm:bottom-6",children:[(0,t_.jsxs)(N4,{children:[(0,t_.jsx)(N5,{asChild:!0,children:(0,t_.jsxs)(BL,{variant:"contrast",size:o?"icon":"default",children:[(0,t_.jsx)(Fc,{className:"size-5"}),(0,t_.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Tune position"})]})}),(0,t_.jsx)(N8,{side:"top",align:"end",portalContainer:r,children:(0,t_.jsxs)(DN,{children:[(0,t_.jsxs)(DU,{children:[(0,t_.jsx)(DG,{children:"Angle"}),(0,t_.jsx)(OE,{value:[n],onValueChange:([e])=>i(e),max:75,min:-75,step:1,className:"mt-2 w-full","aria-label":"Angle"})]}),(0,t_.jsx)(BL,{variant:"outline",onClick:()=>{i(0)},children:"Reset"})]})})]}),o&&(0,t_.jsxs)(N4,{children:[(0,t_.jsx)(N5,{asChild:!0,children:(0,t_.jsx)(BL,{variant:"contrast",size:"icon",children:(0,t_.jsx)(Fd,{})})}),(0,t_.jsxs)(N8,{className:"grid gap-5",portalContainer:r,children:[(0,t_.jsx)(Fk,{}),(0,t_.jsx)(Ns,{})]})]}),(0,t_.jsxs)(BL,{variant:"contrast",size:o?"icon":"default",children:[(0,t_.jsx)(Fh,{className:"size-5"}),(0,t_.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Share"})]})]})]})}function Gp(){let{setContainerRef:e}=FR();return(0,t_.jsxs)("div",{ref:e,className:"relative size-full bg-radial from-background-containers to-background-base-2 text-foreground overflow-hidden",children:[(0,t_.jsx)(NL,{className:"absolute top-0 right-0 left-0 z-1"}),(0,t_.jsxs)("div",{className:"size-full max-w-full grid grid-rows-[1fr_auto]",children:[(0,t_.jsx)(Gh,{className:"size-full min-h-0"}),(0,t_.jsx)(NP,{className:"bg-background"})]})]})}let Gf=new r3;function Gm({poster:e,width:t,height:r,name:n,...i}){let[a,s]=(0,tC.useState)(null);return(0,t_.jsxs)(t_.Fragment,{children:[a&&(0,t_.jsx)(kI,{root:a,children:(0,t_.jsx)(kb,{...i,children:(0,t_.jsxs)(kC,{className:"min-w-full h-svh p-0 rounded-none",portalContainer:a,showCloseButton:!1,children:[(0,t_.jsxs)(kE,{className:"sr-only",children:[(0,t_.jsx)(kS,{children:n}),(0,t_.jsx)(k_,{})]}),(0,t_.jsx)(kw,{asChild:!0,children:(0,t_.jsxs)(BL,{className:"absolute top-3 right-6 z-2",variant:"secondary",children:["Close",(0,t_.jsx)(ne,{})]})}),(0,t_.jsx)(rW,{client:Gf,children:(0,t_.jsx)(FB,{poster:e,name:n,width:t,height:r,children:(0,t_.jsx)(Gp,{})})})]})})}),(0,r4.createPortal)((0,t_.jsx)("div",{className:"vizbl-room-viewer",children:(0,t_.jsx)("div",{ref:s})}),document.body)]})}function Gg({trigger:e,...t}){let[r,n]=(0,tC.useState)(!1),i=(0,tC.useCallback)(()=>{n(!0)},[]),a=(0,tC.useCallback)(e=>{n(e)},[]);return(0,tC.useEffect)(()=>(e.addEventListener("click",i),()=>{e.removeEventListener("click",i)}),[e,i]),(0,t_.jsx)(Gm,{open:r,onOpenChange:a,...t})}let Gv=0;var GA=i("../../node_modules/.pnpm/@rsbuild+core@1.6.14/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!../../node_modules/.pnpm/@rsbuild+core@1.6.14/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].use[3]!../react-room-viewer/dist/index.css"),Gb={};Gb.styleTagTransform=hN(),Gb.setAttributes=hD(),Gb.insert=hk().bind(null,"head"),Gb.domAPI=hB(),Gb.insertStyleElement=hz(),hI()(GA.A,Gb),GA.A&&GA.A.locals&&GA.A.locals;let Gy=document.createElement("div");Gy.id="vizbl-room-viewer-dialog-manager",document.body.appendChild(Gy),tS.createRoot(Gy).render((0,tC.createElement)(function(){let[e,t]=(0,tC.useState)([]);return(0,tC.useEffect)(()=>{let e=function(){var e;return(!t7&&(t7=new t3(window.document)),e=t7).observe.apply(e,arguments)}("[data-vizbl-room-viewer-dialog]",{initialize(e){let r=e.getAttribute("data-vizbl-room-viewer-poster"),n=e.getAttribute("data-vizbl-room-viewer-name"),i=e.getAttribute("data-vizbl-room-viewer-width"),a=e.getAttribute("data-vizbl-room-viewer-height");if(!r)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-poster attribute",e);if(!n)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-name attribute",e);if(!i)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-width attribute",e);if(!a)return void console.warn("RoomViewer: Element missing data-vizbl-room-viewer-height attribute",e);let s=Number(i),o=Number(a);if(Number.isNaN(s))return void console.warn("RoomViewer: data-vizbl-room-viewer-width is not a valid number",e);if(Number.isNaN(o))return void console.warn("RoomViewer: data-vizbl-room-viewer-height is not a valid number",e);let l=Gv++;return{add(){t(t=>[...t,{id:l,trigger:e,poster:r,name:n,width:s,height:o}])},remove(){t(e=>e.filter(e=>e.id!==l))}}}});return()=>{e.abort()}},[]),(0,t_.jsx)(t_.Fragment,{children:e.map(e=>(0,t_.jsx)(Gg,{trigger:e.trigger,poster:e.poster,name:e.name,width:e.width,height:e.height},e.id))})}))})()})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizbl/room-viewer",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js"
|
|
7
7
|
},
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^19.2.0",
|
|
16
16
|
"react-dom": "^19.2.0",
|
|
17
|
-
"@vizbl/react-room-viewer": "0.0.
|
|
17
|
+
"@vizbl/react-room-viewer": "0.0.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"selector-observer": "^2.1.6"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@rsbuild/plugin-react": "1.4.2",
|
|
24
|
+
"@rsdoctor/rspack-plugin": "^1.5.2",
|
|
24
25
|
"@rslib/core": "0.18.4",
|
|
25
26
|
"@types/react": "^19.2.4",
|
|
26
27
|
"@types/react-dom": "^19.2.3",
|
|
@@ -30,13 +31,14 @@
|
|
|
30
31
|
"react-dom": "^19.2.0",
|
|
31
32
|
"typescript": "^5.9.3",
|
|
32
33
|
"@vizbl/eslint-config": "0.0.0",
|
|
33
|
-
"@vizbl/react-room-viewer": "0.0.
|
|
34
|
+
"@vizbl/react-room-viewer": "0.0.4",
|
|
34
35
|
"@vizbl/typescript-config": "0.0.0"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
37
38
|
"dev": "rslib build --watch",
|
|
38
39
|
"build": "rslib build",
|
|
39
40
|
"lint": "eslint .",
|
|
40
|
-
"lint:fix": "eslint . --fix"
|
|
41
|
+
"lint:fix": "eslint . --fix",
|
|
42
|
+
"rsdoctor": "RSDOCTOR=true rslib build"
|
|
41
43
|
}
|
|
42
44
|
}
|