bstp-agent-widget 0.2.131 → 0.2.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular.cjs +2 -2
- package/dist/angular.css +1 -1
- package/dist/angular.mjs +38 -34
- package/dist/element.cjs +2 -2
- package/dist/element.css +1 -1
- package/dist/element.mjs +38 -34
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +38 -34
- package/dist/shadow.cjs +2 -2
- package/dist/shadow.css +1 -1
- package/dist/shadow.mjs +38 -34
- package/dist/styles.css +1 -1
- package/dist/styles.layer.css +1 -1
- package/dist/types/internal/components/AgentChatPopup/AgentChatPopup.d.mts +2 -1
- package/dist/types/internal/components/AgentChatPopup/AgentChatPopup.d.ts +2 -1
- package/package.json +1 -1
package/dist/element.cjs
CHANGED
|
@@ -316,7 +316,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
316
316
|
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[VC]=this[VC]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=HC(e);t[r]||(JC(n,e),t[r]=!0)}return Q.isArray(e)?e.forEach(r):r(e),this}};YC.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Q.reduceDescriptors(YC.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Q.freezeMethods(YC);function XC(e,t){let n=this||RC,r=t||n,i=YC.from(r.headers),a=r.data;return Q.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function ZC(e){return!!(e&&e.__CANCEL__)}var QC=class extends dC{constructor(e,t,n){super(e??`canceled`,dC.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function $C(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new dC(`Request failed with status code `+n.status,[dC.ERR_BAD_REQUEST,dC.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ew(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function tw(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function nw(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var rw=(e,t,n=3)=>{let r=0,i=tw(50,250);return nw(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},iw=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},aw=e=>(...t)=>Q.asap(()=>e(...t)),ow=MC.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,MC.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(MC.origin),MC.navigator&&/(msie|trident)/i.test(MC.navigator.userAgent)):()=>!0,sw=MC.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&s.push(`path=${r}`),Q.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),Q.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)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(){return null},remove(){}};function cw(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function lw(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function uw(e,t,n){let r=!cw(t);return e&&(r||n==0)?lw(e,t):t}var dw=e=>e instanceof YC?{...e}:e;function fw(e,t){t||={};let n={};function r(e,t,n,r){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:r},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function i(e,t,n,i){if(!Q.isUndefined(t))return r(e,t,n,i);if(!Q.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!Q.isUndefined(t))return r(void 0,t)}function o(e,t){if(!Q.isUndefined(t))return r(void 0,t);if(!Q.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(dw(e),dw(t),n,!0)};return Q.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=Q.hasOwnProp(c,r)?c[r]:i,o=a(e[r],t[r],r);Q.isUndefined(o)&&a!==s||(n[r]=o)}),n}var pw=e=>{let t=fw({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=YC.from(o),t.url=SC(uw(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),Q.isFormData(n)){if(MC.hasStandardBrowserEnv||MC.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Q.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(MC.hasStandardBrowserEnv&&(r&&Q.isFunction(r)&&(r=r(t)),r||r!==!1&&ow(t.url))){let e=i&&a&&sw.read(a);e&&o.set(i,e)}return t},mw=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=pw(e),i=r.data,a=YC.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=YC.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());$C(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new dC(`Request aborted`,dC.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new dC(t&&t.message?t.message:`Network Error`,dC.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||wC;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new dC(t,i.clarifyTimeoutError?dC.ETIMEDOUT:dC.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&Q.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),Q.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=rw(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=rw(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new QC(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=ew(r.url);if(_&&MC.protocols.indexOf(_)===-1){n(new dC(`Unsupported protocol `+_+`:`,dC.ERR_BAD_REQUEST,e));return}h.send(i||null)})},hw=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof dC?t:new QC(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new dC(`timeout of ${t}ms exceeded`,dC.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>Q.asap(o),s}},gw=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},_w=async function*(e,t){for await(let n of vw(e))yield*gw(n,t)},vw=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},yw=(e,t,n,r)=>{let i=_w(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},bw=64*1024,{isFunction:xw}=Q,Sw=(({Request:e,Response:t})=>({Request:e,Response:t}))(Q.global),{ReadableStream:Cw,TextEncoder:ww}=Q.global,Tw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ew=e=>{e=Q.merge.call({skipUndefined:!0},Sw,e);let{fetch:t,Request:n,Response:r}=e,i=t?xw(t):typeof fetch==`function`,a=xw(n),o=xw(r);if(!i)return!1;let s=i&&xw(Cw),c=i&&(typeof ww==`function`?(e=>t=>e.encode(t))(new ww):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Tw(()=>{let e=!1,t=new Cw,r=new n(MC.origin,{body:t,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return t.cancel(),e&&!r}),u=o&&s&&Tw(()=>Q.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new dC(`Response type '${e}' is not supported`,dC.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e))return(await new n(MC.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(e)||Q.isArrayBuffer(e))return e.byteLength;if(Q.isURLSearchParams(e)&&(e+=``),Q.isString(e))return(await c(e)).byteLength},p=async(e,t)=>Q.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=pw(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=hw([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),T;try{if(g&&l&&o!==`get`&&o!==`head`&&(T=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(Q.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=iw(T,rw(aw(g)));s=yw(e.body,bw,t,n)}}Q.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=Q.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&iw(t,rw(aw(h),!0))||[];f=new r(yw(f.body,bw,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let E=await d[Q.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{$C(t,n,{data:E,headers:YC.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new dC(`Network Error`,dC.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):dC.from(t,t&&t.code,e,C,t&&t.response)}}},Dw=new Map,Ow=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Dw;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Ew(t)),l=c;return c};Ow();var kw={http:null,xhr:mw,fetch:{get:Ow}};Q.forEach(kw,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var Aw=e=>`- ${e}`,jw=e=>Q.isFunction(e)||e===null||e===!1;function Mw(e,t){e=Q.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!jw(r)&&(i=kw[(n=String(r)).toLowerCase()],i===void 0))throw new dC(`Unknown adapter '${n}'`);if(i&&(Q.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new dC(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
317
317
|
`+e.map(Aw).join(`
|
|
318
318
|
`):` `+Aw(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Nw={getAdapter:Mw,adapters:kw};function Pw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new QC(null,e)}function Fw(e){return Pw(e),e.headers=YC.from(e.headers),e.data=XC.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Nw.getAdapter(e.adapter||RC.adapter,e)(e).then(function(t){return Pw(e),t.data=XC.call(e,e.transformResponse,t),t.headers=YC.from(t.headers),t},function(t){return ZC(t)||(Pw(e),t&&t.response&&(t.response.data=XC.call(e,e.transformResponse,t.response),t.response.headers=YC.from(t.response.headers))),Promise.reject(t)})}var Iw=`1.14.0`,Lw={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Lw[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Rw={};Lw.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Iw+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new dC(r(i,` has been removed`+(t?` in `+t:``)),dC.ERR_DEPRECATED);return t&&!Rw[i]&&(Rw[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Lw.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function zw(e,t,n){if(typeof e!=`object`)throw new dC(`options must be an object`,dC.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new dC(`option `+a+` must be `+n,dC.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new dC(`Unknown option `+a,dC.ERR_BAD_OPTION)}}var Bw={assertOptions:zw,validators:Lw},Vw=Bw.validators,Hw=class{constructor(e){this.defaults=e||{},this.interceptors={request:new CC,response:new CC}}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 n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=`
|
|
319
|
-
`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=fw(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Bw.assertOptions(n,{silentJSONParsing:Vw.transitional(Vw.boolean),forcedJSONParsing:Vw.transitional(Vw.boolean),clarifyTimeoutError:Vw.transitional(Vw.boolean),legacyInterceptorReqResOrdering:Vw.transitional(Vw.boolean)},!1),r!=null&&(Q.isFunction(r)?t.paramsSerializer={serialize:r}:Bw.assertOptions(r,{encode:Vw.function,serialize:Vw.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Bw.assertOptions(t,{baseUrl:Vw.spelling(`baseURL`),withXsrfToken:Vw.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&Q.merge(i.common,i[t.method]);i&&Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=YC.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||wC;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Fw.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Fw.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=fw(this.defaults,e),SC(uw(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Q.forEach([`delete`,`get`,`head`,`options`],function(e){Hw.prototype[e]=function(t,n){return this.request(fw(n||{},{method:e,url:t,data:(n||{}).data}))}}),Q.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(fw(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Hw.prototype[e]=t(),Hw.prototype[e+`Form`]=t(!0)});var Uw=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new QC(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&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 t;return{token:new e(function(e){t=e}),cancel:t}}};function Ww(e){return function(t){return e.apply(null,t)}}function Gw(e){return Q.isObject(e)&&e.isAxiosError===!0}var Kw={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(Kw).forEach(([e,t])=>{Kw[t]=e});function qw(e){let t=new Hw(e),n=eS(Hw.prototype.request,t);return Q.extend(n,Hw.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return qw(fw(e,t))},n}var Jw=qw(RC);Jw.Axios=Hw,Jw.CanceledError=QC,Jw.CancelToken=Uw,Jw.isCancel=ZC,Jw.VERSION=Iw,Jw.toFormData=_C,Jw.AxiosError=dC,Jw.Cancel=Jw.CanceledError,Jw.all=function(e){return Promise.all(e)},Jw.spread=Ww,Jw.isAxiosError=Gw,Jw.mergeConfig=fw,Jw.AxiosHeaders=YC,Jw.formToJSON=e=>IC(Q.isHTMLForm(e)?new FormData(e):e),Jw.getAdapter=Nw.getAdapter,Jw.HttpStatusCode=Kw,Jw.default=Jw;var{Axios:Yw,AxiosError:Xw,CanceledError:Zw,isCancel:Qw,CancelToken:$w,VERSION:eT,all:tT,Cancel:nT,isAxiosError:rT,spread:iT,toFormData:aT,AxiosHeaders:oT,HttpStatusCode:sT,formToJSON:cT,getAdapter:lT,mergeConfig:uT}=Jw,dT=`genai_access_token`,fT=`genai_tenant_id`,pT=`genai_switch_ready`;function mT(e){try{let t=e.split(`.`);if(t.length<2)return!1;let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`),r=n.padEnd(Math.ceil(n.length/4)*4,`=`),i=JSON.parse(atob(r));return i.exp?i.exp*1e3<Date.now():!1}catch{return!1}}function hT(){if(typeof sessionStorage<`u`){let e=sessionStorage.getItem(dT);return e&&mT(e)?(sessionStorage.removeItem(dT),null):e}return null}function gT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(dT,e)}function _T(){return typeof sessionStorage<`u`?sessionStorage.getItem(fT):null}function vT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(fT,String(e))}function yT(){return typeof sessionStorage<`u`?sessionStorage.getItem(pT)===`true`:!1}function bT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(pT,String(e))}function xT(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function ST(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var CT=xT({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5});function wT(e,t){let n=e.getState(),r=ST(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function TT(e,t=CT){let n=e.id||ht();return wT(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function ET({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M11.992 15H12.001`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 12V8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function DT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function OT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M12.2422 17V12C12.2422 11.5286 12.2422 11.2929 12.0957 11.1464C11.9493 11 11.7136 11 11.2422 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M11.992 8H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function kT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M5.32171 9.68293C7.73539 5.41199 8.94222 3.27651 10.5983 2.72681C11.5093 2.4244 12.4907 2.4244 13.4017 2.72681C15.0578 3.27651 16.2646 5.41199 18.6783 9.68293C21.092 13.9538 22.2988 16.0893 21.9368 17.8293C21.7376 18.7866 21.2469 19.6548 20.535 20.3097C19.241 21.5 16.8274 21.5 12 21.5C7.17265 21.5 4.75897 21.5 3.46496 20.3097C2.75308 19.6548 2.26239 18.7866 2.06322 17.8293C1.70119 16.0893 2.90803 13.9538 5.32171 9.68293Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M11.992 16H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 13V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var AT={danger:(0,W.jsx)(ET,{}),info:(0,W.jsx)(OT,{}),success:(0,W.jsx)(DT,{}),warning:(0,W.jsx)(kT,{})};function jT(e,t){let n=AT[e];TT({...t,variant:e,icon:n})}function MT(e){jT(`danger`,{title:Ne._({id:`SlfejT`}),...e})}function NT(){return Ne._({id:`Qlh+W2`})}function PT(e,t){return{}[e]}function FT(e){return e?{401:Ne._({id:`9cOLBO`}),403:Ne._({id:`qriaXz`}),404:Ne._({id:`373i3G`}),500:Ne._({id:`lkE00/`}),502:Ne._({id:`9dPdtH`}),503:Ne._({id:`Vw36Gt`}),504:Ne._({id:`3R0fAs`})}[e]:``}var IT=`react-starter-kit-`,LT=Object.entries({BUILD_META_DATA_INSPECTOR:`buildMetaDataInspector`,COLOR_SCHEME:`colorScheme`,DEBUG:`debug`,ENVIRONMENT_INSPECTOR:`environmentInspector`,INCLUDE_BEARER:`includeBearer`,KEYCLOAK_ERROR:`keycloakError`,LANGUAGE:`language`,LOCAL_STORAGE_INSPECTOR:`localStorageInspector`,LOGGER_LOG_LEVEL:`loggerLogLevel`,LOGGER:`logger`,SHOW_HTTP_ERROR_DEBUG_TOASTER:`showHttpErrorDebugToaster`,TABLE_VIEW:`tableView`,DRAWER_EXPANDED:`drawerExpanded`,PANEL_OPEN:`panelOpen`,PERMISSION_GOD_MODE:`permissionGodMode`}).reduce((e,[t,n])=>({...e,[t]:`${IT}${n}`}),{});function RT(e,t=null){let n=localStorage.getItem(e);if(n===null)return t;try{let e=JSON.parse(n);return typeof t==`boolean`?typeof e==`boolean`?e:t:typeof t==`number`?typeof e==`number`&&!Number.isNaN(e)?e:t:e}catch{return typeof t==`string`?n:t}}function zT(){return RT(LT.DEBUG,!1),!0}function BT(){return zT()?RT(LT.SHOW_HTTP_ERROR_DEBUG_TOASTER,!1):!1}function VT(e){return e?.operationResultCode!==void 0}function HT(e){return e?.error!==void 0}function UT(e){let t=e.response?.headers;if(!t)return!1;let n=`application/problem+json`,r=`Content-Type`;return typeof t.get==`function`?t.get(r)===n:t[r]===n}function WT(e){return VT(e)?e.description:HT(e)?e.error:e?.message||e?.errorCode||NT()}function GT(e){return e.code?PT(e.code)||NT():``}function KT(e){return{url:e.config?.url,method:e.config?.method?.toUpperCase(),status:e.response?.status,response:e.response?.data}}function qT(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function JT({url:e,method:t,status:n,response:r}){let i=r!=null&&Object.keys(r).length>0;return(0,W.jsxs)(zy,{children:[[{label:Ne._({id:`IagCbF`}),value:e},{label:Ne._({id:`fiPesM`}),value:t},{label:Ne._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,W.jsxs)(wu,{gap:4,children:[(0,W.jsxs)(Jf,{size:`xs`,fw:500,children:[e,`:`]}),(0,W.jsx)(Jf,{size:`xs`,children:t})]},n)),i&&(0,W.jsx)(Pm,{block:!0,lh:1.2,children:qT(r)})]})}function YT(e){let t=e.response?.data;return VT(t)?t.operationResultCode:HT(t)?t.error:t?.errorCode||t?.code||t?.message||``}function XT(e){return e.response?.data?.status||e.response?.status||e.status}function ZT(e){let t=e.response?.data,n=YT(e);if(n){let e=PT(n);if(e)return e}return WT(t)}function QT(e){let t=e.response?.data;return GT(t)||FT(XT(e))}function $T(e){return e.response?.data?UT(e)?QT(e):ZT(e):e.message}function eE(e){return e.response?.data?.errorId}function tE(e){let t=$T(e),n=UT(e)?eE(e):void 0;return n?(0,W.jsxs)(zy,{gap:8,children:[(0,W.jsx)(Jf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,W.jsxs)(Jf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Ne._({id:`jf+o1U`}),`: `,n]})]}):t}function nE(e){if(!e)return NT();if(BT()){let t=KT(e);return Object.values(t).some(Boolean)?(0,W.jsx)(zy,{children:JT(t)}):tE(e)}return tE(e)}function rE(){return BT()?Ne._({id:`J5ej6L`}):Ne._({id:`SlfejT`})}function iE(e){MT({title:rE(),message:nE(e),autoClose:BT()?!1:5e3})}function aE(e,t=NT()){if(e instanceof Xw){let n=e.response?.status??e.status,r=(e.message??``).toLowerCase();if(e.code===`ERR_NETWORK`||r===`network error`||r.includes(`failed to fetch`))return FT(503)||t;if(n===504||n===408||e.code===`ECONNABORTED`||r.includes(`timeout`)||r.includes(`timed out`))return FT(504)||t;let i=$T(e);if(typeof i==`string`&&i.trim())return i;let a=FT(n);if(a)return a;if(typeof e.message==`string`&&e.message.trim())return e.message}return e instanceof Error&&e.message.trim()?e.message:t}var oE=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},sE=(e=>e?oE(e):oE),cE=e=>e;function lE(e,t=cE){let n=U.useSyncExternalStore(e.subscribe,U.useCallback(()=>t(e.getState()),[e,t]),U.useCallback(()=>t(e.getInitialState()),[e,t]));return U.useDebugValue(n),n}var uE=e=>{let t=sE(e),n=e=>lE(t,e);return Object.assign(n,t),n},dE=(e=>e?uE(e):uE),fE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function pE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var mE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:pE(),spanId:pE().substring(0,16)};return this.contextMap.set(e,t),t}startSpan(e){let t=this.contextMap.get(e);if(!t)return this.startTrace(e);let n=pE().substring(0,16),r={traceId:t.traceId,spanId:n,parentSpanId:t.spanId};return this.contextMap.set(e,r),r}getCurrentContext(e){return this.contextMap.get(e)}clearContext(e){this.contextMap.delete(e)}}.getInstance(),hE=class e{static{this.globalConfig={enabled:!0,minLogLevel:`INFO`,applicationName:`frontend`}}constructor(t,n={}){this.name=t,this.additionalFields=n.additionalFields??{},this.config={enabled:n.enabled??zT(),minLogLevel:n.minLogLevel??e.globalConfig.minLogLevel}}createLogEntry(t,n,r){let i=mE.getCurrentContext(this.name)??mE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:fE[t],applicationName:e.globalConfig.applicationName,traceId:i.traceId,spanId:i.spanId,...i.parentSpanId&&{parentSpanId:i.parentSpanId},...this.additionalFields,...r}}log(t,n,r){if(!(!this.config.enabled||!e.globalConfig.enabled||fE[t]<fE[this.config.minLogLevel])){let e=Object.fromEntries(Object.entries(r??{}).map(([e,t])=>[e,t?.toString()??t]));Object.keys(e).length>0?console.log(n,e):console.log(n)}}debug(e,t){this.log(`DEBUG`,e,t)}info(e,t){this.log(`INFO`,e,t)}warn(e,t){this.log(`WARN`,e,t)}error(e,t){this.log(`ERROR`,e,t)}startSpan(){mE.startSpan(this.name)}clearTraceContext(){mE.clearContext(this.name)}setEnabled(e){this.config.enabled=e}setMinLogLevel(e){this.config.minLogLevel=e}static setGlobalEnabled(t){e.globalConfig.enabled=t}static getGlobalEnabled(){return e.globalConfig.enabled}static setGlobalMinLogLevel(t){e.globalConfig.minLogLevel=t}static getGlobalMinLogLevel(){return e.globalConfig.minLogLevel}static setGlobalApplicationName(t){e.globalConfig.applicationName=t}};new hE(`KeycloakService`);var gE=null;function _E(){return gE?.token?`Bearer ${gE.token}`:void 0}function vE(){return gE}var yE=new Yx({queryCache:new Jx({onError:(e,t)=>{(t.meta?.handleGlobalError??!0)&&e instanceof Xw&&iE(e)}}),mutationCache:new Gx({onError:(e,t,n,r)=>{(r.meta?.handleGlobalError??!0)&&e instanceof Xw&&iE(e)}}),defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:600*1e3},mutations:{retry:!1}}});function bE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?xE(r):t===`private`||n?SE(r):xE(r):r}function xE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function SE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function CE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function wE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Jw.create({baseURL:CE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=vE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=bE(e.url||``,e.accessScope,t));let i=hT(),a=_T();i&&!e.headers.has(`Authorization`)&&(e.headers.Authorization=`Bearer ${i}`),a&&!e.headers.has(`x-tenant-id`)&&(e.headers[`x-tenant-id`]=a);let o=_E();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Ne.locale),!e.headers.has(`Content-Type`)&&!(e.data instanceof FormData)&&(e.headers[`Content-Type`]=`application/json`),e.method?.toLowerCase()===`get`&&(e.data={}),e},e=>Promise.reject(e)),i}var TE;function EE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;wE({baseUrl:n,prefix:r.crm}),wE({baseUrl:n,prefix:r.uiAuthz}),TE=wE({baseUrl:i,prefix:``,timeoutMs:12e4})}var $=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}))(),1);function DE({type:e,date:t,locale:n,format:r,labelSeparator:i}){let a=e=>(0,$.default)(e).locale(n).format(r);return e===`default`?t===null?``:a(t):e===`multiple`?t.map(a).join(`, `):e===`range`&&Array.isArray(t)?t[0]&&t[1]?`${a(t[0])} ${i} ${a(t[1])}`:t[0]?`${a(t[0])} ${i} `:``:``}function OE({formatter:e,...t}){return(e||DE)(t)}function kE({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function AE({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=kE({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?AE({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function jE(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function ME(e){return e.current?.map(e=>e.map(e=>e.length))}function NE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=jE(i.key);a&&(i.preventDefault(),AE({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:ME(e)}))}function PE(e){return e==null||e===``?e:(0,$.default)(e).format(`YYYY-MM-DD`)}function FE(e){return e==null||e===``?e:(0,$.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function IE({minDate:e,maxDate:t}){let n=(0,$.default)();return!e&&!t?PE(n):e&&(0,$.default)(n).isBefore(e)?PE(e):t&&(0,$.default)(n).isAfter(t)?PE(t):PE(n)}var LE=(0,U.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function RE(){let e=(0,U.use)(LE),t=(0,U.useCallback)(t=>t||e.locale,[e.locale]),n=(0,U.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,U.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,U.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function zE({value:e,type:t,withTime:n}){let r=n?FE:PE;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} – ${n}`:`${t} –`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function BE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,W.jsx)(`input`,{type:`hidden`,value:zE({value:e,type:t,withTime:i}),name:n,form:r})}BE.displayName=`@mantine/dates/HiddenDatesInput`;var VE={day:`m_396ce5cb`},HE=xn((e,{size:t})=>({day:{"--day-size":rt(t,`day-size`)}})),UE=q(e=>{let t=G(`Day`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,date:c,disabled:l,__staticSelector:u,weekend:d,outside:f,selected:p,renderDay:m,inRange:h,firstInRange:g,lastInRange:_,hidden:v,static:y,highlightToday:b,fullWidth:x,attributes:S,...C}=t;return(0,W.jsx)(ll,{...K({name:u||`Day`,classes:VE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:HE,rootSelector:`day`})(`day`,{style:v?{display:`none`}:void 0}),component:y?`div`:`button`,disabled:l,"data-today":(0,$.default)(c).isSame(new Date,`day`)||void 0,"data-hidden":v||void 0,"data-highlight-today":b||void 0,"data-disabled":l||void 0,"data-weekend":!l&&!f&&d||void 0,"data-outside":!l&&f||void 0,"data-selected":!l&&p||void 0,"data-in-range":h&&!l||void 0,"data-first-in-range":g&&!l||void 0,"data-last-in-range":_&&!l||void 0,"data-static":y||void 0,"data-full-width":x||void 0,unstyled:o,...C,children:m?.(c)||(0,$.default)(c).date()})});UE.classes=VE,UE.varsResolver=HE,UE.displayName=`@mantine/dates/Day`;function WE({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,$.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,$.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,$.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var GE={weekday:`m_18a3eca`},KE=xn((e,{size:t})=>({weekdaysRow:{"--wr-fz":ot(t),"--wr-spacing":it(t)}})),qE=q(e=>{let t=G(`WeekdaysRow`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,locale:c,firstDayOfWeek:l,weekdayFormat:u,cellComponent:d=`th`,__staticSelector:f,withWeekNumbers:p,attributes:m,...h}=t,g=K({name:f||`WeekdaysRow`,classes:GE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:KE,rootSelector:`weekdaysRow`}),_=RE(),v=WE({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,W.jsx)(d,{...g(`weekday`),children:e},t));return(0,W.jsxs)(J,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,W.jsx)(d,{...g(`weekday`),children:`#`}),v]})});qE.classes=GE,qE.varsResolver=KE,qE.displayName=`@mantine/dates/WeekdaysRow`;function JE(e,t=1){let n=(0,$.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function YE(e,t=1){let n=(0,$.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function XE({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,$.default)((0,$.default)(e).subtract((0,$.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=JE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,$.default)(YE(i,t));for(;(0,$.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,$.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function ZE(e,t){return(0,$.default)(e).format(`YYYY-MM`)===(0,$.default)(t).format(`YYYY-MM`)}function QE(e,t){return t?(0,$.default)(e).isAfter((0,$.default)(t).subtract(1,`day`),`day`):!0}function $E(e,t){return t?(0,$.default)(e).isBefore((0,$.default)(t).add(1,`day`),`day`):!0}function eD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>$E(e,n)&&QE(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||ZE(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,$.default)().isSame(e,`date`))||s[0]}var tD=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){"use strict";var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);$.default.extend(tD.default);function nD(e){return(0,$.default)(e.find(e=>(0,$.default)(e).day()===1)).isoWeek()}var rD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},iD={withCellSpacing:!0},aD=xn((e,{size:t})=>({weekNumber:{"--wn-fz":ot(t),"--wn-size":rt(t,`wn-size`)}})),oD=q(e=>{let t=G(`Month`,iD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,month:f,weekendDays:p,getDayProps:m,excludeDate:h,minDate:g,maxDate:_,renderDay:v,hideOutsideDates:y,hideWeekdays:b,getDayAriaLabel:x,static:S,__getDayRef:C,__onDayKeyDown:w,__onDayClick:T,__onDayMouseEnter:E,__preventFocus:D,__stopPropagation:O,withCellSpacing:k,size:A,highlightToday:j,withWeekNumbers:M,fullWidth:N,attributes:P,...ee}=t,F=K({name:c||`Month`,classes:rD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:aD,rootSelector:`month`}),I=RE(),te=XE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=eD({dates:te,minDate:PE(g),maxDate:PE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Vr({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!ZE(e,f),i=x?.(e)||(0,$.default)(e).locale(l||I.locale).format(`D MMMM YYYY`),a=m?.(e),s=(0,$.default)(e).isSame(ne,`date`);return(0,W.jsx)(`td`,{...F(`monthCell`),"data-with-spacing":k||void 0,children:(0,W.jsx)(UE,{__staticSelector:c||`Month`,classNames:re,styles:ie,attributes:P,unstyled:o,"data-mantine-stop-propagation":O||void 0,highlightToday:j,renderDay:v,date:e,size:A,weekend:I.getWeekendDays(p).includes((0,$.default)(e).get(`day`)),outside:r,hidden:y?r:!1,"aria-label":i,static:S,fullWidth:N,disabled:h?.(e)||!$E(e,PE(_))||!QE(e,PE(g)),ref:e=>{e&&C?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),w?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),E?.(t,e)},onClick:t=>{a?.onClick?.(t),T?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),D&&e.preventDefault()},tabIndex:D||!s?-1:0})},e.toString())});return(0,W.jsxs)(`tr`,{...F(`monthRow`),children:[M&&(0,W.jsx)(`td`,{...F(`weekNumber`),children:nD(e)}),n]},t)});return(0,W.jsxs)(J,{component:`table`,...F(`month`),size:A,"data-full-width":N||void 0,...ee,children:[!b&&(0,W.jsx)(`thead`,{...F(`monthThead`),children:(0,W.jsx)(qE,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:re,styles:ie,unstyled:o,attributes:P})}),(0,W.jsx)(`tbody`,{...F(`monthTbody`),children:L})]})});oD.classes=rD,oD.varsResolver=aD,oD.displayName=`@mantine/dates/Month`;var sD={pickerControl:`m_dc6a3c71`},cD=xn((e,{size:t})=>({pickerControl:{"--dpc-fz":ot(t),"--dpc-size":rt(t,`dpc-size`)}})),lD=q(e=>{let t=G(`PickerControl`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,firstInRange:c,lastInRange:l,inRange:u,__staticSelector:d,selected:f,disabled:p,fullWidth:m,attributes:h,...g}=t;return(0,W.jsx)(ll,{...K({name:d||`PickerControl`,classes:sD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:cD,rootSelector:`pickerControl`})(`pickerControl`),unstyled:o,"data-picker-control":!0,"data-full-width":m||void 0,"data-selected":f&&!p||void 0,"data-disabled":p||void 0,"data-in-range":u&&!p&&!f||void 0,"data-first-in-range":c&&!p||void 0,"data-last-in-range":l&&!p||void 0,disabled:p,...g})});lD.classes=sD,lD.varsResolver=cD,lD.displayName=`@mantine/dates/PickerControl`;function uD({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,$.default)(e).isBefore(t,`year`)||n&&(0,$.default)(e).isAfter(n,`year`))}function dD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!uD({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,$.default)().isSame(e,`year`))||i[0]}function fD(e){let t=(0,$.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,$.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var pD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},mD={yearsListFormat:`YYYY`,withCellSpacing:!0},hD=q(e=>{let t=G(`YearsList`,mD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,decade:c,yearsListFormat:l,locale:u,minDate:d,maxDate:f,getYearControlProps:p,__staticSelector:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=K({name:m||`YearsList`,classes:pD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=RE(),O=fD(c),k=dD({years:O,minDate:d,maxDate:f,getYearControlProps:p}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=p?.(e),i=(0,$.default)(e).isSame(k,`year`);return(0,W.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(lD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:uD({year:e,minDate:d,maxDate:f}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,$.default)(e).locale(D.getLocale(u)).format(l)})},n)});return(0,W.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,W.jsx)(J,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});hD.classes=pD,hD.displayName=`@mantine/dates/YearsList`;function gD({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,$.default)(e).isBefore(t,`month`)||n&&(0,$.default)(e).isAfter(n,`month`))}function _D({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!gD({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,$.default)().isSame(e,`month`))||i[0]}function vD(e){let t=(0,$.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,$.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var yD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},bD={monthsListFormat:`MMM`,withCellSpacing:!0},xD=q(e=>{let t=G(`MonthsList`,bD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,year:l,monthsListFormat:u,locale:d,minDate:f,maxDate:p,getMonthControlProps:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=K({name:c||`MonthsList`,classes:yD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=RE(),O=vD(l),k=_D({months:O,minDate:PE(f),maxDate:PE(p),getMonthControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,$.default)(e).isSame(k,`month`);return(0,W.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(lD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:gD({month:e,minDate:PE(f),maxDate:PE(p)}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,$.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,W.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,W.jsx)(J,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});xD.classes=yD,xD.displayName=`@mantine/dates/MonthsList`;var SD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},CD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},wD=xn((e,{size:t})=>({calendarHeader:{"--dch-control-size":rt(t,`dch-control-size`),"--dch-fz":ot(t)}})),TD=q(e=>{let t=G(`CalendarHeader`,CD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,nextIcon:c,previousIcon:l,nextLabel:u,previousLabel:d,onNext:f,onPrevious:p,onLevelClick:m,label:h,nextDisabled:g,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:y,withNext:b,withPrevious:x,headerControlsOrder:S,fullWidth:C,__staticSelector:w,__preventFocus:T,__stopPropagation:E,attributes:D,...O}=t,k=K({name:w||`CalendarHeader`,classes:SD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:wD,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,U.createElement)(ll,{...k(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":d,onClick:p,unstyled:o,onMouseDown:A,disabled:_,"data-disabled":_||void 0,tabIndex:T||_?-1:0,"data-mantine-stop-propagation":E||void 0},l||(0,W.jsx)(Mf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,U.createElement)(ll,{component:v?`button`:`div`,...k(`calendarHeaderLevel`),key:`level`,onClick:v?m:void 0,unstyled:o,onMouseDown:v?A:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":y,tabIndex:T||!v?-1:0,"data-mantine-stop-propagation":E||void 0},h),N=b&&(0,U.createElement)(ll,{...k(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":u,onClick:f,unstyled:o,onMouseDown:A,disabled:g,"data-disabled":g||void 0,tabIndex:T||g?-1:0,"data-mantine-stop-propagation":E||void 0},c||(0,W.jsx)(Mf,{...k(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),P=S.map(e=>e===`previous`?j:e===`level`?M:e===`next`?N:null);return(0,W.jsx)(J,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});TD.classes=SD,TD.varsResolver=wD,TD.displayName=`@mantine/dates/CalendarHeader`;function ED(e){let t=fD(e);return[t[0][0],t[3][0]]}var DD={decadeLabelFormat:`YYYY`},OD=q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:y,previousDisabled:b,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,decadeLabelFormat:T,classNames:E,styles:D,unstyled:O,__staticSelector:k,__stopPropagation:A,size:j,fullWidth:M,attributes:N,...P}=G(`DecadeLevel`,DD,e),ee=RE(),[F,I]=ED(t),te={__staticSelector:k||`DecadeLevel`,classNames:E,styles:D,unstyled:O,size:j,attributes:N},ne=typeof y==`boolean`?y:i?!(0,$.default)(I).endOf(`year`).isBefore(i):!1,re=typeof b==`boolean`?b:r?!(0,$.default)(F).startOf(`year`).isAfter(r):!1,ie=(e,t)=>(0,$.default)(e).locale(n||ee.locale).format(t);return(0,W.jsxs)(J,{"data-decade-level":!0,size:j,...P,children:[(0,W.jsx)(TD,{label:typeof T==`function`?T(F,I):`${ie(F,T)} – ${ie(I,T)}`,__preventFocus:f,__stopPropagation:A,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:ne,previousDisabled:re,hasNextLevel:!1,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,fullWidth:M,...te}),(0,W.jsx)(hD,{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:A,withCellSpacing:d,fullWidth:M,...te})]})});OD.classes={...hD.classes,...TD.classes},OD.displayName=`@mantine/dates/DecadeLevel`;var kD={yearLabelFormat:`YYYY`},AD=q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,yearLabelFormat:D,__staticSelector:O,__stopPropagation:k,size:A,classNames:j,styles:M,unstyled:N,fullWidth:P,attributes:ee,...F}=G(`YearLevel`,kD,e),I=RE(),te={__staticSelector:O||`YearLevel`,classNames:j,styles:M,unstyled:N,size:A,attributes:ee},ne=typeof b==`boolean`?b:i?!(0,$.default)(t).endOf(`year`).isBefore(i):!1,re=typeof x==`boolean`?x:r?!(0,$.default)(t).startOf(`year`).isAfter(r):!1;return(0,W.jsxs)(J,{"data-year-level":!0,size:A,...F,children:[(0,W.jsx)(TD,{label:typeof D==`function`?D(t):(0,$.default)(t).locale(n||I.locale).format(D),__preventFocus:f,__stopPropagation:k,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:ne,previousDisabled:re,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,fullWidth:P,...te}),(0,W.jsx)(xD,{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:k,withCellSpacing:d,fullWidth:P,...te})]})});AD.classes={...TD.classes,...xD.classes},AD.displayName=`@mantine/dates/YearLevel`;var jD={monthLabelFormat:`MMMM YYYY`},MD=q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:A,previousDisabled:j,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,monthLabelFormat:I,classNames:te,styles:ne,unstyled:re,__staticSelector:ie,size:L,static:R,fullWidth:ae,attributes:oe,...se}=G(`MonthLevel`,jD,e),ce=RE(),le={__staticSelector:ie||`MonthLevel`,classNames:te,styles:ne,unstyled:re,size:L,attributes:oe},ue=typeof A==`boolean`?A:l?!(0,$.default)(t).endOf(`month`).isBefore(l):!1,de=typeof j==`boolean`?j:c?!(0,$.default)(t).startOf(`month`).isAfter(c):!1;return(0,W.jsxs)(J,{"data-month-level":!0,size:L,...se,children:[(0,W.jsx)(TD,{label:typeof I==`function`?I(t):(0,$.default)(t).locale(n||ce.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:ue,previousDisabled:de,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,fullWidth:ae,...le}),(0,W.jsx)(oD,{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,__preventFocus:x,__stopPropagation:S,static:R,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:ae,...le})]})});MD.classes={...oD.classes,...TD.classes},MD.displayName=`@mantine/dates/MonthLevel`;var ND={levelsGroup:`m_30b26e33`},PD=q(e=>{let t=G(`LevelsGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,fullWidth:l,attributes:u,...d}=t;return(0,W.jsx)(J,{...K({name:c||`LevelsGroup`,classes:ND,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,rootSelector:`levelsGroup`})(`levelsGroup`),"data-full-width":l||void 0,...d})});PD.classes=ND,PD.displayName=`@mantine/dates/LevelsGroup`;var FD={numberOfColumns:1},ID=q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,headerControlsOrder:y,classNames:b,styles:x,unstyled:S,__staticSelector:C,__stopPropagation:w,numberOfColumns:T,levelControlAriaLabel:E,decadeLabelFormat:D,size:O,fullWidth:k,vars:A,attributes:j,...M}=G(`DecadeLevelGroup`,FD,e),N=(0,U.useRef)([]),P=Array(T).fill(0).map((e,A)=>{let M=(0,$.default)(t).add(A*10,`years`).format(`YYYY-MM-DD`);return(0,W.jsx)(OD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:A,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:N}),__getControlRef:(e,t,n)=>{Array.isArray(N.current[A])||(N.current[A]=[]),Array.isArray(N.current[A][e])||(N.current[A][e]=[]),N.current[A][e][t]=n},levelControlAriaLabel:typeof E==`function`?E(M):E,locale:n,minDate:r,maxDate:i,__preventFocus:u,__stopPropagation:w,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,getYearControlProps:o,__staticSelector:C||`DecadeLevelGroup`,classNames:b,styles:x,unstyled:S,withCellSpacing:l,headerControlsOrder:y,fullWidth:k,attributes:j},A)});return(0,W.jsx)(PD,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});ID.classes={...PD.classes,...OD.classes},ID.displayName=`@mantine/dates/DecadeLevelGroup`;var LD={numberOfColumns:1},RD=q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,headerControlsOrder:x,classNames:S,styles:C,unstyled:w,__staticSelector:T,__stopPropagation:E,numberOfColumns:D,levelControlAriaLabel:O,yearLabelFormat:k,size:A,fullWidth:j,vars:M,attributes:N,...P}=G(`YearLevelGroup`,LD,e),ee=(0,U.useRef)([]),F=Array(D).fill(0).map((e,M)=>{let P=(0,$.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,W.jsx)(AD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:M,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:ee}),__getControlRef:(e,t,n)=>{Array.isArray(ee.current[M])||(ee.current[M]=[]),Array.isArray(ee.current[M][e])||(ee.current[M][e]=[]),ee.current[M][e][t]=n},levelControlAriaLabel:typeof O==`function`?O(P):O,locale:n,minDate:r,maxDate:i,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,getMonthControlProps:o,classNames:S,styles:C,unstyled:w,__staticSelector:T||`YearLevelGroup`,withCellSpacing:l,headerControlsOrder:x,fullWidth:j,attributes:N},M)});return(0,W.jsx)(PD,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});RD.classes={...AD.classes,...PD.classes},RD.displayName=`@mantine/dates/YearLevelGroup`;var zD={numberOfColumns:1},BD=q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__onDayClick:m,__onDayMouseEnter:h,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,headerControlsOrder:A,classNames:j,styles:M,unstyled:N,numberOfColumns:P,levelControlAriaLabel:ee,monthLabelFormat:F,__staticSelector:I,__stopPropagation:te,size:ne,static:re,fullWidth:ie,vars:L,attributes:R,...ae}=G(`MonthLevelGroup`,zD,e),oe=(0,U.useRef)([]),se=Array(P).fill(0).map((e,L)=>{let ae=(0,$.default)(t).add(L,`months`).format(`YYYY-MM-DD`);return(0,W.jsx)(MD,{month:ae,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>NE({levelIndex:L,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:oe}),__getDayRef:(e,t,n)=>{Array.isArray(oe.current[L])||(oe.current[L]=[]),Array.isArray(oe.current[L][e])||(oe.current[L][e]=[]),oe.current[L][e][t]=n},levelControlAriaLabel:typeof ee==`function`?ee(ae):ee,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,classNames:j,styles:M,unstyled:N,__staticSelector:I||`MonthLevelGroup`,size:ne,static:re,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,headerControlsOrder:A,fullWidth:ie,attributes:R},L)});return(0,W.jsx)(PD,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:R,...ae,children:se})});BD.classes={...PD.classes,...MD.classes},BD.displayName=`@mantine/dates/MonthLevelGroup`;var VD={input:`m_6fa5e2aa`},HD=q(e=>{let{inputProps:t,wrapperProps:n,placeholder:r,classNames:i,styles:a,unstyled:o,popoverProps:s,modalProps:c,dropdownType:l,children:u,formattedValue:d,dropdownHandlers:f,dropdownOpened:p,onClick:m,clearable:h,clearSectionMode:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=yf(`PickerInputBase`,{size:`sm`},e),A=(0,W.jsx)(vf.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,W.jsxs)(W.Fragment,{children:[l===`modal`&&!x&&(0,W.jsx)(mg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,W.jsx)(vf.Wrapper,{...n,children:(0,W.jsxs)(Ql,{position:`bottom-start`,opened:p,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:D,...s,disabled:s?.disabled||l===`modal`||x,onChange:e=>{e||(s?.onClose?.(),j())},children:[(0,W.jsx)(Ql.Target,{children:(0,W.jsx)(vf,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{m?.(e),f.toggle()},__clearSection:A,__clearable:h&&b&&!x&&!S,__clearSectionMode:g,rightSection:y,...t,classNames:{...i,input:Cn(VD.input,i?.input)},...k,children:d||(0,W.jsx)(vf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,W.jsx)(Ql.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,W.jsx)(BE,{value:C,name:w,form:T,type:E,withTime:O})]})});HD.classes=VD,HD.displayName=`@mantine/dates/PickerInputBase`;var UD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,WD=(e,t)=>{let n=t?FE:PE;return Array.isArray(e)?e.map(n):n(e)};function GD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,U.useRef)(e),[o,s,c]=qt({value:WD(t,i),defaultValue:WD(n,i),finalValue:UD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?UD(e):n,s(l))),[l,s,c]}function KD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function qD(e){return e===0?`month`:e===1?`year`:`decade`}function JD(e,t,n){return qD(mt(KD(e,0),KD(t,0),KD(n,2)))}var YD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},XD=q(e=>{let t=G(`Calendar`,YD,e),{vars:n,maxLevel:r,minLevel:i,defaultLevel:a,level:o,onLevelChange:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,headerControlsOrder:b,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:S,__setDateRef:C,__setLevelRef:w,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,monthLabelFormat:P,nextIcon:ee,previousIcon:F,__onDayClick:I,__onDayMouseEnter:te,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,monthsListFormat:L,getMonthControlProps:R,yearLabelFormat:ae,yearsListFormat:oe,getYearControlProps:se,decadeLabelFormat:ce,classNames:le,styles:ue,unstyled:de,minDate:z,maxDate:fe,locale:pe,__staticSelector:me,size:he,__preventFocus:B,__stopPropagation:ge,onNextDecade:_e,onPreviousDecade:V,onNextYear:ve,onPreviousYear:ye,onNextMonth:be,onPreviousMonth:xe,static:Se,enableKeyboardNavigation:Ce,fullWidth:we,attributes:Te,ref:Ee,...De}=t,{resolvedClassNames:Oe,resolvedStyles:ke}=Vr({classNames:le,styles:ue,props:t}),[Ae,je]=qt({value:o?JD(o,i,r):void 0,defaultValue:a?JD(a,i,r):void 0,finalValue:JD(void 0,i,r),onChange:s}),[Me,Ne]=GD({type:`default`,value:PE(c),defaultValue:PE(l),onChange:u});(0,U.useImperativeHandle)(C,()=>e=>{Ne(e)}),(0,U.useImperativeHandle)(w,()=>e=>{je(e)});let Pe={__staticSelector:me||`Calendar`,styles:ke,classNames:Oe,unstyled:de,size:he,attributes:Te},Fe=f||d||1,Ie=(0,U.useRef)(null);if(Ie.current===null){let e=new Date;Ie.current=z&&(0,$.default)(e).isAfter(z)?z:(0,$.default)(e).format(`YYYY-MM-DD`)}let Le=Me||Ie.current,Re=()=>{let e=(0,$.default)(Le).add(Fe,`month`).format(`YYYY-MM-DD`);be?.(e),Ne(e)},ze=()=>{let e=(0,$.default)(Le).subtract(Fe,`month`).format(`YYYY-MM-DD`);xe?.(e),Ne(e)},Be=()=>{let e=(0,$.default)(Le).add(Fe,`year`).format(`YYYY-MM-DD`);ve?.(e),Ne(e)},Ve=()=>{let e=(0,$.default)(Le).subtract(Fe,`year`).format(`YYYY-MM-DD`);ye?.(e),Ne(e)},H=()=>{let e=(0,$.default)(Le).add(10*Fe,`year`).format(`YYYY-MM-DD`);_e?.(e),Ne(e)},He=()=>{let e=(0,$.default)(Le).subtract(10*Fe,`year`).format(`YYYY-MM-DD`);V?.(e),Ne(e)},Ue=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(!Ce||Se)return;let e=e=>{if(!Ue.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),He()):t&&(e.preventDefault(),Ve());break;case`ArrowDown`:t&&n?(e.preventDefault(),H()):t&&(e.preventDefault(),Be());break;case`y`:case`Y`:Ae===`month`&&(e.preventDefault(),je(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[Ce,Se,Ae,Be,Ve,H,He]),(0,W.jsxs)(J,{ref:Kt(Ue,Ee),size:he,"data-calendar":!0,"data-full-width":we||void 0,...De,children:[Ae===`month`&&(0,W.jsx)(BD,{month:Le,minDate:z,maxDate:fe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:Re,onPrevious:ze,hasNextLevel:r!==`month`,onLevelClick:()=>je(`year`),numberOfColumns:d,locale:pe,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:ee,previousLabel:p?.previousMonth??h,previousIcon:F,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:B,__stopPropagation:ge,static:Se,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`year`&&(0,W.jsx)(RD,{year:Le,numberOfColumns:d,minDate:z,maxDate:fe,monthsListFormat:L,getMonthControlProps:R,locale:pe,onNext:Be,onPrevious:Ve,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>je(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:ee,previousLabel:p?.previousYear??h,previousIcon:F,yearLabelFormat:ae,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Ne(t),je(JD(`month`,i,r)),_?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`decade`&&(0,W.jsx)(ID,{decade:Le,minDate:z,maxDate:fe,yearsListFormat:oe,getYearControlProps:se,locale:pe,onNext:H,onPrevious:He,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:ee,previousLabel:p?.previousDecade??h,previousIcon:F,decadeLabelFormat:ce,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Ne(t),je(JD(`year`,i,r)),g?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe})]})});XD.classes={...ID.classes,...RD.classes,...BD.classes},XD.displayName=`@mantine/dates/Calendar`;function ZD(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me,...he}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me},others:he}}function QD(e,t){let n=[...t].sort((e,t)=>(0,$.default)(e).isAfter((0,$.default)(t))?1:-1);return(0,$.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,$.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function $D({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=GD({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,U.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,U.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,$.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,$.default)(e).isAfter((0,$.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,$.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,$.default)(e).isSame(n,t))?l(c.filter(e=>!(0,$.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,$.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?QD(e,[f,u]):c[0]&&c[1]?QD(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,$.default)(e).isSame(c[0],t)?!(f&&(0,$.default)(f).isBefore(c[0])):!1,v=e=>c[1]?(0,$.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,$.default)(f).isBefore(c[0])&&(0,$.default)(e).isSame(c[0],t),y=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,$.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:v(n),"data-autofocus":!!c[0]&&(0,$.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,$.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,$.default)(c[0]).isSame(n,t)||void 0};let r=(0,$.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},b=e===`range`&&u?p:()=>{};return(0,U.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:y,_value:c,setValue:l}}var eO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},tO=xn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":ot(t)}})),nO={type:`default`},rO=q(e=>{let t=G(`YearPicker`,nO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getYearControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onYearSelect:m,__updateDateOnYearSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,...w}=t,{calendarProps:T,others:E}=ZD(w),D=(0,U.useRef)(null),O=(0,U.useRef)(null),k=K({name:l||`YearPicker`,classes:eO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:tO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=$D({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Vr({classNames:n,styles:r,props:t}),I=(0,W.jsx)(XD,{classNames:ee,styles:F,size:S,...T,...v?{}:E,minLevel:`decade`,__updateDateOnYearSelect:h??!1,__staticSelector:l||`YearPicker`,onMouseLeave:j,onYearMouseEnter:(e,t)=>M(t),onYearSelect:e=>{A(e),m?.(e)},getYearControlProps:e=>({...N(e),...u?.(e)}),__setDateRef:D,__setLevelRef:O,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return I;let te=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(D.current?.(t),O.current?.(`decade`),g?g(t):P(e))},ne=v.map((e,t)=>(0,W.jsx)(ll,{...k(`presetButton`),onClick:()=>te(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(J,{...k(`yearPickerRoot`),size:S,...E,children:[(0,W.jsx)(`div`,{...k(`presetsList`),children:ne}),I]})});rO.classes={...XD.classes,...eO},rO.varsResolver=tO,rO.displayName=`@mantine/dates/YearPicker`;var iO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},aO=xn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":ot(t)}})),oO={type:`default`},sO=q(e=>{let t=G(`MonthPicker`,oO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getMonthControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onMonthSelect:m,__updateDateOnMonthSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,onLevelChange:w,...T}=t,{calendarProps:E,others:D}=ZD(T),O=(0,U.useRef)(null),k=(0,U.useRef)(null),A=K({name:l||`MonthPicker`,classes:iO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:aO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=$D({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Vr({classNames:n,styles:r,props:t}),te=(0,W.jsx)(XD,{classNames:F,styles:I,size:S,...E,...v?{}:D,minLevel:`year`,__updateDateOnMonthSelect:h??!1,__staticSelector:l||`MonthPicker`,onMouseLeave:M,onMonthMouseEnter:(e,t)=>N(t),onMonthSelect:e=>{j(e),m?.(e)},getMonthControlProps:e=>({...P(e),...u?.(e)}),onLevelChange:w,__setDateRef:O,__setLevelRef:k,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return te;let ne=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(O.current?.(t),k.current?.(`year`),g?g(t):ee(e))},re=v.map((e,t)=>(0,W.jsx)(ll,{...A(`presetButton`),onClick:()=>ne(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(J,{...A(`monthPickerRoot`),size:S,...D,children:[(0,W.jsx)(`div`,{...A(`presetsList`),children:re}),te]})});sO.classes={...XD.classes,...iO},sO.varsResolver=aO,sO.displayName=`@mantine/dates/MonthPicker`;var cO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},lO=xn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":ot(t)}})),uO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},dO=q(e=>{let t=G(`DatePicker`,uO,e),{allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s,classNames:c,styles:l,__staticSelector:u,__onDayClick:d,__onDayMouseEnter:f,__onPresetSelect:p,__stopPropagation:m,presets:h,className:g,style:_,unstyled:v,size:y,vars:b,attributes:x,...S}=t,{calendarProps:C,others:w}=ZD(S),T=(0,U.useRef)(null),E=(0,U.useRef)(null),D=K({name:u||`DatePicker`,classes:cO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:lO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=$D({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Vr({classNames:c,styles:l,props:t}),F=(0,W.jsx)(XD,{classNames:P,styles:ee,__staticSelector:u||`DatePicker`,onMouseLeave:k,size:y,...C,...h?{}:w,__stopPropagation:m,__setDateRef:T,__setLevelRef:E,minLevel:C.minLevel||`month`,__onDayMouseEnter:(e,t)=>{A(t),f?.(e,t)},__onDayClick:(e,t)=>{O(t),d?.(e,t)},getDayProps:e=>({...j(e),...C.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof M==`string`?ZE(e,M):!1,...C.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof M==`string`?(0,$.default)(e).isSame(M,`year`):!1,...C.getYearControlProps?.(e)}),hideOutsideDates:C.hideOutsideDates??C.numberOfColumns!==1,attributes:x,...h?{}:{className:g,style:_}});if(!h)return F;let I=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(T.current?.(t),E.current?.(`month`),p?p(t):N(e))},te=h.map((e,t)=>(0,W.jsx)(ll,{...D(`presetButton`),onClick:()=>I(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":m||void 0,children:e.label},t));return(0,W.jsxs)(J,{...D(`datePickerRoot`),size:y,...w,children:[(0,W.jsx)(`div`,{...D(`presetsList`),children:te}),F]})});dO.classes=XD.classes,dO.varsResolver=lO,dO.displayName=`@mantine/dates/DatePicker`;function fO(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,$.default)(t).format(`YYYY-MM-DD`)}function pO({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,$.default)(e).isAfter(t,`date`)||n&&(0,$.default)(e).isBefore(n,`date`))}var mO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},hO=q(e=>{let{inputProps:t,wrapperProps:n,value:r,defaultValue:i,onChange:a,clearable:o,clearSectionMode:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,withTime:p,dateParser:m,minDate:h,maxDate:g,fixOnBlur:_,onFocus:v,onBlur:y,onClick:b,onKeyDown:x,readOnly:S,name:C,form:w,rightSection:T,unstyled:E,classNames:D,styles:O,allowDeselect:k,date:A,defaultDate:j,onDateChange:M,getMonthControlProps:N,getYearControlProps:P,disabled:ee,...F}=yf(`DateInput`,mO,e),I=(0,U.useRef)(null),te=(0,U.useRef)(null),[ne,re]=(0,U.useState)(!1),{calendarProps:ie,others:L}=ZD(F),R=RE(),ae=m||(e=>{let t=(0,$.default)(e,f,R.getLocale(d)).toDate();return Number.isNaN(t.getTime())?fO(e):(0,$.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),oe=k===void 0?o:k,se=e=>e?(0,$.default)(e).locale(R.getLocale(d)).format(f):``,[ce,le,ue]=GD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[de,z]=GD({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,U.useEffect)(()=>{ue&&r!==null&&z(r)},[ue,r]);let[fe,pe]=(0,U.useState)(se(ce));(0,U.useEffect)(()=>{pe(se(ce))},[R.getLocale(d)]);let me=e=>{let t=e.currentTarget.value;if(pe(t),re(!0),t.trim()===``&&(k||o))le(null);else{let e=ae(t);e&&pO({date:e,minDate:h,maxDate:g})&&(le(e),z(e))}},he=e=>{y?.(e),re(!1),_&&pe(se(ce))},B=e=>{v?.(e),re(!0)},ge=e=>{b?.(e),re(!0)},_e=e=>{e.key===`Escape`&&re(!1),x?.(e)},V=e=>({...u?.(e),selected:(0,$.default)(ce).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=oe&&(0,$.default)(ce).isSame(e,`day`)?null:e;le(n),!ue&&n&&pe(se(n)),re(!1)}}),ve=(0,W.jsx)(vf.ClearButton,{onClick:()=>{le(null),!ue&&pe(``),re(!1)},unstyled:E,...c}),ye=o&&!!ce&&!S&&!ee;return wt(()=>{ce!==void 0&&!ne&&pe(se(ce))},[ce]),bt(()=>re(!1),void 0,[I.current,te.current]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(vf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,W.jsxs)(Ql,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,W.jsx)(Ql.Target,{children:(0,W.jsx)(vf,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:fe,onChange:me,onBlur:he,onFocus:B,onClick:ge,onKeyDown:_e,readOnly:S,rightSection:T,__clearSection:ve,__clearable:ye,__clearSectionMode:s,...t,...L,disabled:ee,__staticSelector:`DateInput`})}),(0,W.jsx)(Ql.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,W.jsx)(XD,{__staticSelector:`DateInput`,...ie,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:V,size:t.size,date:de,onDateChange:z,getMonthControlProps:e=>({selected:typeof ce==`string`?ZE(e,ce):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof ce==`string`?(0,$.default)(e).isSame(ce,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,W.jsx)(BE,{name:C,form:w,value:ce,type:`default`,withTime:p})]})});hO.classes={...vf.classes,...XD.classes},hO.displayName=`@mantine/dates/DateInput`;function gO({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=RE(),[d,f]=tn(!1),[p,m]=GD({type:e,value:t,defaultValue:n,onChange:r}),h=OE({type:e,date:p,locale:u.getLocale(i),format:a,labelSeparator:u.getLabelSeparator(c),formatter:l}),g=t=>{o&&(e===`default`&&f.close(),e===`range`&&t[0]&&t[1]&&f.close()),m(s&&e===`multiple`?[...t].sort((e,t)=>(0,$.default)(e).isAfter((0,$.default)(t))?1:-1):t)};return{_value:p,setValue:g,onClear:()=>g(e===`range`?[null,null]:e===`multiple`?[]:null),shouldClear:e===`range`?!!p[0]:e===`multiple`?p.length>0:p!==null,formattedValue:h,dropdownOpened:d,dropdownHandlers:f}}var _O={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},vO=q(e=>{let t=G(`YearPickerInput`,_O,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Vr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,type:n,__staticSelector:`YearPickerInput`,attributes:S,children:(0,W.jsx)(rO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`YearPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});vO.classes={...HD.classes,...rO.classes},vO.displayName=`@mantine/dates/YearPickerInput`;var yO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},bO=q(e=>{let t=G(`MonthPickerInput`,yO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Vr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,attributes:S,type:n,__staticSelector:`MonthPickerInput`,children:(0,W.jsx)(sO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`MonthPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});bO.classes={...HD.classes,...sO.classes},bO.displayName=`@mantine/dates/MonthPickerInput`;var xO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},SO=q(e=>{let t=G(`DatePickerInput`,xO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,defaultDate:b,valueFormatter:x,presets:S,attributes:C,...w}=t,{resolvedClassNames:T,resolvedStyles:E}=Vr({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=ZD(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:x}),F=Array.isArray(k)?k[0]||b:k||b;return(0,W.jsx)(HD,{formattedValue:j,dropdownOpened:N,dropdownHandlers:M,classNames:T,styles:E,unstyled:d,onClear:P,shouldClear:ee,value:k,size:p,variant:m,dropdownType:h,...O,type:n,__staticSelector:`DatePickerInput`,attributes:C,children:(0,W.jsx)(dO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||IE({maxDate:v,minDate:_}),onChange:A,locale:c,classNames:T,styles:E,unstyled:d,__staticSelector:`DatePickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:S,attributes:C})})});SO.classes={...HD.classes,...dO.classes},SO.displayName=`@mantine/dates/DatePickerInput`;var CO=`DD/MM/YYYY`,wO=hO.extend({defaultProps:{placeholder:CO,valueFormat:CO}});function TO({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M18 9.00005L12 15L6 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var EO=Bf.extend({classNames:{item:`_item_wy8vo_1`,control:`_control_wy8vo_10`,chevron:`_chevron_wy8vo_20`,label:`_label_wy8vo_21`,content:`_content_wy8vo_43`},defaultProps:{chevron:(0,W.jsx)(TO,{}),variant:`separated`}}),DO=mu.extend({classNames:{root:`_root_gjf6s_1`},defaultProps:{size:`md`,variant:`primary`}}),OO=Uf.extend({classNames:{root:`_root_nrydo_1`,icon:`_icon_nrydo_10`,title:`_title_nrydo_38`,message:`_message_nrydo_42`},styles:{root:{overflow:`initial`},message:{overflow:`initial`}}}),kO=Zf.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),AO=_m.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),jO=bm.extend({classNames:{root:`_root_4i7r9_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),MO=km.extend({classNames:{root:`_root_1llpb_1`,section:`_section_1llpb_204`},defaultProps:{size:`md`,variant:`primary`}}),[NO,PO]=Ke(`Carousel component was not found in tree`),FO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},IO=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=G(`CarouselSlide`,null,e),c=PO();return(0,W.jsx)(J,{mod:[{orientation:c.orientation},o],role:`group`,"aria-roledescription":`slide`,"aria-label":`Carousel slide`,...c.getStyles(`slide`,{className:n,style:r,classNames:t,styles:i}),...s})});IO.classes=FO,IO.displayName=`@mantine/carousel/CarouselSlide`;function LO({slideGap:e,slideSize:t,selector:n}){let r=Sr(),i=Ue({"--carousel-slide-gap":it(ft(e)),"--carousel-slide-size":H(ft(t))}),a=Pe(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=it(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=it(t[r])),n),{});return(0,W.jsx)(ii,{styles:i,media:dt(Pe(a),r.breakpoints).filter(e=>Pe(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function RO(e){return typeof e==`object`&&e?Pe(e):[]}function zO(e){return e.sort((e,t)=>ze(e)-ze(t))}function BO({slideGap:e,slideSize:t}){return zO(Array.from(new Set([...RO(e),...RO(t)])))}function VO({slideGap:e,slideSize:t,selector:n}){let r=Ue({"--carousel-slide-gap":it(ft(e)),"--carousel-slide-size":H(ft(t))}),i=BO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=it(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=it(t[r])),n),{});return(0,W.jsx)(ii,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function HO({dir:e,orientation:t,direction:n}){return n===`previous`?t===`horizontal`?90*(e===`ltr`?1:-1):-180:t===`horizontal`?90*(e===`ltr`?-1:1):0}function UO(e){return Object.prototype.toString.call(e)===`[object Object]`}function WO(e){return UO(e)||Array.isArray(e)}function GO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function KO(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!WO(r)||!WO(i)?r===i:KO(r,i)})}function qO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function JO(e,t){if(e.length!==t.length)return!1;let n=qO(e),r=qO(t);return n.every((e,t)=>{let n=r[t];return KO(e,n)})}function YO(e){return typeof e==`number`}function XO(e){return typeof e==`string`}function ZO(e){return typeof e==`boolean`}function QO(e){return Object.prototype.toString.call(e)===`[object Object]`}function $O(e){return Math.abs(e)}function ek(e){return Math.sign(e)}function tk(e,t){return $O(e-t)}function nk(e,t){return e===0||t===0||$O(e)<=$O(t)?0:$O(tk($O(e),$O(t))/e)}function rk(e){return Math.round(e*100)/100}function ik(e){return lk(e).map(Number)}function ak(e){return e[ok(e)]}function ok(e){return Math.max(0,e.length-1)}function sk(e,t){return t===ok(e)}function ck(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function lk(e){return Object.keys(e)}function uk(e,t){return[e,t].reduce((e,t)=>(lk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=QO(r)&&QO(i)?uk(r,i):i}),e),{})}function dk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function fk(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return XO(e)?n[e](r):e(t,r,i)}return{measure:o}}function pk(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function mk(e,t,n,r){let i=pk(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function hk(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function gk(e=0,t=0){let n=$O(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function _k(e,t,n){let{constrain:r}=gk(0,e),i=e+1,a=o(t);function o(e){return n?$O((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return _k(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function vk(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=pk(),w=pk(),T=gk(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,ee=!1;function F(e){if(!v)return;function n(t){(ZO(v)||v(e,t))&&L(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,ae).add(r,`contextmenu`,ae).add(r,`click`,oe,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,R,S).add(e,`touchend`,ae).add(e,`mousemove`,R,S).add(e,`mouseup`,ae)}function ne(e){let t=e.nodeName||``;return x.includes(t)}function re(){return(m?D:E)[ee?`mouse`:`touch`]}function ie(e,t){let n=d.add(ek(e)*-1),r=u.byDistance(e,!m).distance;return m||$O(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=dk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=tk(i.get(),o.get())>=2,!(t&&e.button!==0)&&(ne(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),te(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function R(e){if(!dk(e,r)&&e.touches.length>=2)return ae(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=tk(t,A),c=tk(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return ae(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function ae(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*re(),r=ie(b(n),t),i=nk(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),ee=!1,f.emit(`pointerUp`)}function oe(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function se(){return M}return{init:F,destroy:I,pointerDown:se}}function yk(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(dk(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&$O(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function bk(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function xk(e){function t(t){return t/100*e}return{measure:t}}function Sk(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if($O(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(ZO(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function Ck(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=ek(a),d=u,x}function p(){return $O(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function wk(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=gk(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=$O(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&$O(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Tk(e,t,n,r,i){let a=gk(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return tk(e,t)<=1}function u(){let e=o[0],t=ak(o);return gk(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=sk(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Ek(e,t,n){let r=t[0];return{limit:gk(n?r-e:ak(t),r)}}function Dk(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=gk(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function Ok(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function kk(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>ak(e)[o]-e[0][a]).map($O)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-$O(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Ak(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=sk(n,t);return r?ck(ak(n[0])+1):i?ck(ok(a)-ak(n)[0]+1,ak(n)[0]):e})}return{slideRegistry:l}}function jk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>$O(e)-$O(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>$O(e.diff)-$O(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>ek(e)===r);return a.length?c(a):ak(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Mk(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function Nk(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));YO(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(ZO(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Pk(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return YO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Fk(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=rk(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Ik(e,t,n,r,i,a,o,s,c){let l=.5,u=ik(i),d=ik(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Pk(-1),translate:Fk(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function Lk(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(ZO(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Rk(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return lk(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function zk(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return $O(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(ak(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=sk(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map($O)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Bk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=YO(n);function p(e,t){return ik(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ik(e).reduce((n,f,p)=>{let m=ak(n)||0,h=m===0,g=f===ok(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=$O(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function Vk(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=bk(),w=C.measure(t),T=n.map(C.measure),E=hk(c,l),D=E.measureSize(w),O=xk(D),k=fk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=zk(E,w,T,n,d||!!v,i),ee=Bk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=kk(E,k,w,T,ee),te=-ak(F)+ak(M),{snapsContained:ne,scrollContainLimit:re}=Tk(D,te,I,v,2),ie=A?ne:I,{limit:L}=Ek(te,ie,d),R=_k(ok(ie),u,d),ae=R.clone(),oe=ik(n),se=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},ce=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},le=mk(r,i,()=>se(xe),e=>ce(xe,e)),ue=.68,de=ie[R.get()],z=Pk(de),fe=Pk(de),pe=Pk(de),me=Pk(de),he=Ck(z,pe,fe,me,f,ue),B=jk(d,ie,te,L,me),ge=Mk(le,R,ae,he,B,me,o),_e=Ok(L),V=pk(),ve=Rk(t,n,o,h),{slideRegistry:ye}=Ak(A,v,ie,re,ee,oe),be=Nk(e,n,ye,ge,he,V,o,S),xe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:le,axis:E,dragHandler:vk(E,e,r,i,me,yk(E,i),z,le,ge,he,B,R,o,O,p,m,_,ue,x),eventStore:V,percentOfView:O,index:R,indexPrevious:ae,limit:L,location:z,offsetLocation:pe,previousLocation:fe,options:a,resizeHandler:Sk(t,o,i,n,E,y,C),scrollBody:he,scrollBounds:wk(L,pe,me,he,O),scrollLooper:Dk(te,L,pe,[z,pe,fe,me]),scrollProgress:_e,scrollSnapList:ie.map(_e.get),scrollSnaps:ie,scrollTarget:B,scrollTo:ge,slideLooper:Ik(E,D,te,j,M,F,ie,pe,n),slideFocus:be,slidesHandler:Lk(t,o,b),slidesInView:ve,slideIndexes:oe,slideRegistry:ye,slidesToScroll:ee,target:me,translate:Fk(E,t)};return xe}function Hk(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var Uk={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Wk(e){function t(e,t){return uk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,lk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>lk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Gk(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function Kk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Wk(i),o=Gk(a),s=pk(),c=Hk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Uk,Kk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(XO(t)?e.querySelector(t):t)||e.children[0];let r=XO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Vk(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(se),_.eventHandler.init(se),_.resizeHandler.init(se),_.slidesHandler.init(se),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(se),x=o.init(se,b)))}function D(e,t){let n=I();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==I()}function P(){return _.index.add(-1).get()!==I()}function ee(){return _.scrollSnapList}function F(){return _.scrollProgress.get(_.offsetLocation.get())}function I(){return _.index.get()}function te(){return _.indexPrevious.get()}function ne(){return _.slidesInView.get()}function re(){return _.slidesInView.get(!1)}function ie(){return x}function L(){return _}function R(){return e}function ae(){return S}function oe(){return C}let se={canScrollNext:N,canScrollPrev:P,containerNode:ae,internalEngine:L,destroy:k,off:p,on:f,emit:m,plugins:ie,previousScrollSnap:te,reInit:h,rootNode:R,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:oe,slidesInView:ne,slidesNotInView:re};return E(t,n),setTimeout(()=>c.emit(`init`),0),se}Kk.globalOptions=void 0;function qk(e={},t=[]){let n=(0,U.useRef)(e),r=(0,U.useRef)(t),[i,a]=(0,U.useState)(),[o,s]=(0,U.useState)(),c=(0,U.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,U.useEffect)(()=>{KO(n.current,e)||(n.current=e,c())},[e,c]),(0,U.useEffect)(()=>{JO(r.current,t)||(r.current=t,c())},[t,c]),(0,U.useEffect)(()=>{if(GO()&&o){Kk.globalOptions=qk.globalOptions;let e=Kk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}qk.globalOptions=void 0;var Jk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Yk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Xk=xn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":H(t),"--carousel-control-size":H(n),"--carousel-controls-offset":it(r)}})),Zk=q(e=>{let t=G(`Carousel`,Jk,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,getEmblaApi:l,onNextSlide:u,onPreviousSlide:d,onSlideChange:f,nextControlProps:p,previousControlProps:m,controlSize:h,controlsOffset:g,slideSize:_,slideGap:v,orientation:y,height:b,includeGapInSize:x,draggable:S,initialSlide:C,withControls:w,withIndicators:T,plugins:E,nextControlIcon:D,previousControlIcon:O,withKeyboardEvents:k,mod:A,type:j,emblaOptions:M,attributes:N,getIndicatorProps:P,id:ee,...F}=t,I=K({name:`Carousel`,classes:FO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Xk}),te=It(ee),ne=Ai(),{dir:re}=Wi(),[ie,L]=qk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Yk,...M},E),[R,ae]=(0,U.useState)(0),[oe,se]=(0,U.useState)(0),ce=(0,U.useCallback)(e=>L&&L.scrollTo(e),[L]),le=(0,U.useCallback)(()=>{if(!L)return;let e=L.selectedScrollSnap();ae(e),e!==R&&f?.(e)},[L,ae,f,R]),ue=(0,U.useCallback)(()=>{L?.scrollPrev(),d?.()},[L]),de=(0,U.useCallback)(()=>{L?.scrollNext(),u?.()},[L]),z=(0,U.useCallback)(e=>{k&&(e.key===`ArrowRight`&&(e.preventDefault(),de()),e.key===`ArrowLeft`&&(e.preventDefault(),ue()),e.key===`Home`&&(e.preventDefault(),L?.scrollTo(0)),e.key===`End`&&(e.preventDefault(),L?.scrollTo(L.scrollSnapList().length-1)))},[L,de,ue]);(0,U.useEffect)(()=>{if(L)return l?.(L),le(),se(L.scrollSnapList().length),L.on(`select`,le),()=>{L.off(`select`,le)}},[L,M?.slidesToScroll,le]),(0,U.useEffect)(()=>{L&&(L.reInit(),se(L.scrollSnapList().length),ae(e=>mt(e,0,U.Children.toArray(c).length-1)))},[U.Children.toArray(c).length,M?.slidesToScroll]);let fe=L?.canScrollPrev()||!1,pe=L?.canScrollNext()||!1,me=(0,U.useCallback)((e,t)=>{let n=y===`horizontal`,r=n?`ArrowRight`:`ArrowDown`,i=n?`ArrowLeft`:`ArrowUp`;if(e.key===r){e.preventDefault();let n=t<oe-1?t+1:0;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}if(e.key===i){e.preventDefault();let n=t>0?t-1:oe-1;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}e.key===`Home`&&(e.preventDefault(),ce(0),(e.currentTarget.parentElement?.children[0])?.focus()),e.key===`End`&&(e.preventDefault(),ce(oe-1),(e.currentTarget.parentElement?.children[oe-1])?.focus())},[y,oe,ce]),he=Array(oe).fill(0).map((e,t)=>(0,U.createElement)(ll,{...I(`indicator`),key:t,role:`tab`,"aria-label":`Go to slide ${t+1}`,"aria-selected":t===R,tabIndex:t===R?0:-1,"data-active":t===R||void 0,onClick:()=>ce(t),onKeyDown:e=>me(e,t),"data-orientation":y,onMouseDown:e=>e.preventDefault(),...P?.(t)}));return(0,W.jsxs)(NO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,W.jsx)(VO,{...t,selector:`.${ne}`}):(0,W.jsx)(LO,{...t,selector:`.${ne}`}),(0,W.jsxs)(J,{role:`region`,"aria-roledescription":`carousel`,...I(`root`,{className:ne}),...F,id:te,mod:[{orientation:y,"include-gap-in-size":x},A],onKeyDownCapture:z,children:[(0,W.jsx)(dl,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:oe>0&&`Slide ${R+1} of ${oe}`}),w&&(0,W.jsxs)(`div`,{...I(`controls`),"data-orientation":y,children:[(0,W.jsx)(ll,{"aria-controls":te,"aria-label":`Previous slide`,"aria-disabled":!fe,"data-inactive":!fe||void 0,"data-type":`previous`,tabIndex:fe?0:-1,...m,...I(`control`,{className:m?.className,style:m?.style}),onClick:e=>{ue(),m?.onClick?.(e)},children:O===void 0?(0,W.jsx)(Mf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,W.jsx)(ll,{"aria-controls":te,"aria-label":`Next slide`,"aria-disabled":!pe,"data-inactive":!pe||void 0,"data-type":`next`,tabIndex:pe?0:-1,...I(`control`,{className:p?.className,style:p?.style}),...p,onClick:e=>{de(),p?.onClick?.(e)},children:D===void 0?(0,W.jsx)(Mf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`next`})}deg)`}}):D})]}),(0,W.jsx)(`div`,{...I(`viewport`),ref:ie,"data-type":j,children:(0,W.jsx)(`div`,{...I(`container`,{className:ne}),"data-orientation":y,children:c})}),T&&(0,W.jsx)(`div`,{...I(`indicators`),role:`tablist`,"aria-label":`Slides`,"data-orientation":y,children:he})]})]})});Zk.classes=FO,Zk.varsResolver=Xk,Zk.displayName=`@mantine/carousel/Carousel`,Zk.Slide=IO;function Qk({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function $k({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M9.00005 6L15 12L9 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var eA={"space-0":`0`,"space-025":`1px`,"space-050":`2px`,"space-100":`4px`,"space-150":`6px`,"space-200":`8px`,"space-300":`12px`,"space-400":`16px`,"space-500":`20px`,"space-600":`24px`,"space-700":`32px`,"space-800":`40px`,"space-900":`48px`},tA=Zk.extend({classNames:{root:`_root_nuq5f_1`,control:`_control_nuq5f_1`,indicators:`_indicators_nuq5f_10`,indicator:`_indicator_nuq5f_10`,slide:`_slide_nuq5f_26`,controls:`_controls_nuq5f_34`},defaultProps:{controlSize:32,nextControlIcon:(0,W.jsx)($k,{height:16,width:16}),previousControlIcon:(0,W.jsx)(Qk,{height:16,width:16}),slideGap:H(eA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),nA={root:`_root_sbem5_1`,input:`_input_sbem5_8`,label:`_label_sbem5_26`,icon:`_icon_sbem5_47`,inner:`_inner_sbem5_54`,error:`_error_sbem5_58`};function rA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function iA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M2.5 4L7.5 4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var aA=$p.extend({classNames:nA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,W.jsx)(iA,{...t}):(0,W.jsx)(rA,{...t})}}),oA=Rm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),sA={XS:352,SM:584,MD:800,LG:1160,XL:1160},cA=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:H(n)}),{}),lA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},uA=Hm.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:Cn({[lA.fluidContainer]:n,[lA.miniContainer]:t===`mini`,[lA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in cA?cA[t]:H(t)}})}),dA={placeholder:CO,getYearControlProps:e=>({mod:{...(0,$.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,$.default)().isSame(e,`month`)&&{"current-month":!0}}})},fA={day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},pA=dO.extend({classNames:fA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,$.default)(e),n=(0,$.default)().isSame(t,`day`);return(0,W.jsx)(Jf,{span:!0,className:Cn({[fA.dayToday]:n}),children:t.format(`D`)})},...dA}}),mA=SO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA,valueFormat:CO}}),hA=Km.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),gA={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},_A=fh.extend({classNames:{root:`_root_dlog2_1`,title:`_title_dlog2_9`,content:`_content_dlog2_17`,header:`_header_dlog2_30`,body:`_body_dlog2_38`,close:`_close_dlog2_48`},defaultProps:{size:`md`,position:`right`,overlayProps:{backgroundOpacity:gA.xl,blur:6}}}),vA=Eh.extend({defaultProps:{columnGap:24,rowGap:16}}),yA=wu.extend({defaultProps:{gap:0,align:`flex-start`}}),bA={wrapper:`_wrapper_194dy_1`,input:`_input_194dy_9`,section:`_section_194dy_42`},xA={placeholder:`_placeholder_1o876_1`},SA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},CA=vf.extend({classNames:bA}),wA=vf.Wrapper.extend({classNames:SA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),TA=vf.Placeholder.extend({classNames:xA}),EA=ou.extend({defaultProps:{size:`xs`}}),DA=Qh.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),OA=mg.extend({classNames:{root:`_root_p18vd_1`,header:`_header_p18vd_9`,title:`_title_p18vd_13`,content:`_content_p18vd_20`,body:`_body_p18vd_30`,close:`_close_p18vd_36`},defaultProps:{size:`md`,yOffset:`5vh`,transitionProps:{duration:300,transition:`fade-down`},closeButtonProps:{size:24},overlayProps:{backgroundOpacity:gA.xl,blur:6},scrollAreaComponent:al.Autosize}}),kA=sO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),AA=bO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),jA=Mg.extend({classNames:{input:`_input_z7ary_1`,section:`_section_z7ary_6`,inputField:`_inputField_z7ary_28`,dropdown:`_dropdown_z7ary_41`,option:`_option_z7ary_47`,pillsList:`_pillsList_z7ary_60`,pill:`_pill_z7ary_60`},defaultProps:{renderOption:({checked:e,option:t})=>(0,W.jsxs)(wu,{gap:8,children:[(0,W.jsx)($p,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,W.jsx)(Jf,{span:!0,children:t.label})]}),searchable:!0}}),MA=Fg.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),NA=zg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),PA=X_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),FA=yv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:$k,previousIcon:Qk,size:`lg`}}),IA=ml.extend({defaultProps:{shadow:`none`}});function LA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 8C22 8 18 14 12 14C6 14 2 8 2 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,W.jsx)(`path`,{d:`M15 13.5L16.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M20 11L22 13`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2 13L4 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M9 13.5L7.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function RA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M21.544 11.045C21.848 11.4713 22 11.6845 22 12C22 12.3155 21.848 12.5287 21.544 12.955C20.1779 14.8706 16.6892 19 12 19C7.31078 19 3.8221 14.8706 2.45604 12.955C2.15201 12.5287 2 12.3155 2 12C2 11.6845 2.15201 11.4713 2.45604 11.045C3.8221 9.12944 7.31078 5 12 5C16.6892 5 20.1779 9.12944 21.544 11.045Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}var zA=wv.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,W.jsx)(LA,{}):(0,W.jsx)(RA,{})}}),BA=Sg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),VA=Ql.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),HA=Nv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),UA=Yv.extend({classNames:{root:`_root_c4gsg_1`,radio:`_radio_c4gsg_9`,label:`_label_c4gsg_22`,icon:`_icon_c4gsg_40`,error:`_error_c4gsg_58`,inner:`_inner_c4gsg_62`}}),WA=Yv.Card.extend({classNames:{card:`_card_11cie_1`}}),GA=Yv.Indicator.extend({classNames:{indicator:`_indicator_14pfe_1`,icon:`_icon_14pfe_17`}}),KA=xy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function qA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var JA=({checked:e,option:t})=>(0,W.jsxs)(wu,{gap:8,children:[e&&(0,W.jsx)(qA,{width:16,height:16}),(0,W.jsx)(Jf,{span:!0,children:t.label})]}),YA=Cy.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:JA}}),XA=zy.extend({defaultProps:{gap:0}}),ZA=Yy.extend({classNames:{root:`_root_bk7hc_1`,stepIcon:`_stepIcon_bk7hc_6`,separator:`_separator_bk7hc_22`,step:`_step_bk7hc_6`,stepLabel:`_stepLabel_bk7hc_29`},defaultProps:{allowNextStepsSelect:!1,iconSize:30}}),QA=nb.extend({classNames:{root:`_root_1xr8m_1`,track:`_track_1xr8m_6`,input:`_input_1xr8m_10`,thumb:`_thumb_1xr8m_22`,label:`_label_1xr8m_29`},defaultProps:{withThumbIndicator:!1}}),$A=xb.extend({classNames:{table:`_table_1nke6_1`,thead:`_thead_1nke6_8`,th:`_th_1nke6_8`,tbody:`_tbody_1nke6_41`,td:`_td_1nke6_44`},defaultProps:{withTableBorder:!0}}),ej=jb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),tj=Ib.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),nj=Jf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),rj=Fh.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),ij=qb.extend({classNames:{root:`_root_6pd11_1`}}),aj=ly.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),oj=rO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),sj=vO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),cj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],lj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],uj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],dj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],fj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],pj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],mj={xs:H(10),sm:H(12),md:H(14),lg:H(16),xl:H(20)},hj={xs:H(12),sm:H(16),md:H(20),lg:H(24),xl:H(28)},gj={fontWeight:`500`,sizes:{h1:{fontSize:H(32),lineHeight:H(36)},h2:{fontSize:H(24),lineHeight:H(28)},h3:{fontSize:H(20),lineHeight:H(24)},h4:{fontSize:H(18),lineHeight:H(20)},h5:{fontSize:H(12),lineHeight:H(16)},h6:{fontSize:H(12),lineHeight:H(16)}}},_j=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:He(n)}),{});function vj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(vj(a)&&vj(i)?n[r]=yj(a,i):n[r]=i)}return n}var bj={"brand-dark-blue":cj,"brand-orange":lj,danger:fj,success:pj,info:uj,blue:uj,orange:dj,red:fj,green:pj},xj={Accordion:EO,ActionIcon:DO,Alert:OO,Anchor:kO,Avatar:AO,Badge:jO,Button:MO,Carousel:tA,Checkbox:aA,ColorSwatch:oA,Container:uA,DateInput:wO,DatePicker:pA,DatePickerInput:mA,Divider:hA,Drawer:_A,Grid:vA,Group:yA,Input:CA,InputPlaceholder:TA,InputWrapper:wA,Loader:EA,Menu:DA,Modal:OA,MonthPicker:kA,MonthPickerInput:AA,MultiSelect:jA,NavLink:MA,Notification:NA,NumberInput:PA,Paper:IA,Pagination:FA,PasswordInput:zA,Pill:BA,Popover:VA,Progress:HA,Radio:UA,RadioCard:WA,RadioIndicator:GA,SegmentedControl:KA,Select:YA,Stack:XA,Stepper:ZA,Switch:QA,Table:$A,Tabs:ej,TagsInput:tj,Text:nj,Textarea:rj,Title:ij,Tooltip:aj,YearPicker:oj,YearPickerInput:sj};function Sj(e={}){let t={...mj,...e.fontSizes},n={...hj,...e.lineHeights},r=yj(gj,e.headings??{}),i={..._j,...e.breakpoints},a={...bj,...e.colors};return zr({components:xj,cursorType:e.cursorType??`pointer`,defaultRadius:`sm`,primaryColor:e.primaryColor??`brand-dark-blue`,primaryShade:e.primaryShade??6,breakpoints:i,fontFamily:e.fontFamily??`Geist`,fontSizes:t,fontWeights:{medium:`500`},lineHeights:n,headings:r,black:e.black??`#000000`,white:e.white??`#FFFFFF`,colors:a})}Sj();var Cj={"border-025":`1px`,"border-050":`2px`},wj={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Tj={"primary-lighter":`#FFF7F0`,"primary-light":`#FFA34D`,"primary-default":`#FF7A00`,"primary-dark":`#A85100`,"primary-darker":`#7A3B00`},Ej={"secondary-lighter":`#F8F8FB`,"secondary-light":`#EFEFF6`,"secondary-default":`#414275`,"secondary-dark":`#35355F`,"secondary-darker":`#18182B`},Dj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},Oj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},kj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},Aj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},jj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Mj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Nj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Pj={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Fj={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Ij={"radius-0":`0`,"radius-050":`2px`,"radius-100":`4px`,"radius-150":`6px`,"radius-200":`8px`,"radius-300":`12px`,"radius-400":`16px`,"radius-500":`20px`,"radius-600":`24px`,"radius-full":`50%`},Lj={"shadow-xs":`0 1px 2px 0 rgba(0, 0, 0, 0.16)`,"shadow-above-sm":`0 3px 0 0 rgba(0, 0, 0, 0.04)`,"shadow-below-sm":`0 -2px 2px 0 rgba(65, 66, 117, 0.12)`},Rj={...wj,...Tj,...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj},zj=gA;function Bj(e={}){let{tokens:t={},theme:n={}}=e;return Br(Sj(n),zr({other:{border:{...Cj,...t.border},color:{...Rj,...t.color},iconSize:{...Fj,...t.iconSize},opacity:{...zj,...t.opacity},radius:{...Ij,...t.radius},space:{...eA,...t.space},shadow:{...Lj,...t.shadow}}}))}Bj();function Vj(){return Sr()}var Hj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Uj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Wj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},Gj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},Kj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},qj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Jj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Yj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Xj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},Zj={...Wj,...Gj,...Kj,...qj,...Jj,...Yj,...Xj},Qj={"icon-xs":Fj[`icon-xs`],"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},$j={"radius-150":Ij[`radius-150`],"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},eM={"space-150":eA[`space-150`],"space-200":eA[`space-200`],"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`]},tM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(12),md:H(14),lg:H(16)}},brand:{darkBlue:Hj,orange:Uj},tokens:{color:Zj,radius:$j,space:eM,iconSize:Qj}},nM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],rM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],iM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},aM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},oM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},sM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},cM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},lM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},uM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},dM={...iM,...aM,...oM,...sM,...cM,...lM,...uM},fM={"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},pM={"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},mM={"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`],"space-700":eA[`space-700`],"space-800":eA[`space-800`],"space-900":eA[`space-900`]},hM={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(13),md:H(15),lg:H(17)}},brand:{darkBlue:nM,orange:rM},tokens:{color:dM,radius:pM,space:mM,iconSize:fM}},gM={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`brand-orange`},brand:{darkBlue:cj,orange:lj},tokens:{color:{...wj,...Tj,...Ej,...jj,...Mj,...Nj,...Pj},radius:Ij,space:eA,iconSize:Fj,border:Cj,shadow:Lj,opacity:gA}},ocean:hM,forest:tM},_M=[`foundations`,`ocean`,`forest`],vM=`foundations`;function yM(e){let{theme:t,brand:n,tokens:r}=e;return{label:e.label,options:{theme:{...t,colors:{...t.colors??{},"brand-dark-blue":n.darkBlue,"brand-orange":n.orange}},tokens:{radius:r.radius,space:r.space,iconSize:r.iconSize,border:r.border,shadow:r.shadow,opacity:r.opacity,color:r.color}}}}var bM={foundations:yM(gM.foundations),ocean:yM(gM.ocean),forest:yM(gM.forest)};function xM(e){return typeof e==`string`&&_M.includes(e)}function SM(e){return bM[xM(e)?e:vM]}function CM({themeName:e}={}){return Bj(SM(e).options)}var wM=(0,U.createContext)(null),TM=e=>{let t=(0,U.useContext)(wM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function EM(){return TM()}var DM=({i18n:e,defaultComponent:t,children:n})=>{let r=(0,U.useRef)(e.locale),i=(0,U.useCallback)(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[a,o]=(0,U.useState)(i());return(0,U.useEffect)(()=>{let t=()=>{r.current=e.locale,o(i())},n=e.on(`change`,t);return r.current!==e.locale&&t(),n},[e,i]),r.current?(0,W.jsx)(wM.Provider,{value:a,children:n}):(process.env.NODE_ENV===`development`&&console.log("I18nProvider rendered `null`. A call to `i18n.activate` needs to happen in order for translations to be activated and for the I18nProvider to render.This is not an error but an informational message logged only in development."),null)},OM=(0,U.createContext)(null),kM=(0,U.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function AM({runtime:e,children:t}){return(0,W.jsx)(kM.Provider,{value:e,children:t})}function jM({config:e,children:t}){return(0,W.jsx)(OM.Provider,{value:e,children:t})}var MM=(0,U.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),NM=({children:e,config:t})=>(0,W.jsx)(MM.Provider,{value:t,children:e});function PM(e){return e.replace(/(-?\d*\.?\d+)rem/g,(e,t)=>`${Number.parseFloat(t)*16}px`)}function FM({children:e,appConfig:t,config:n,runtime:r,theme:i,rootElement:a}){let o=typeof document>`u`?void 0:document.documentElement,s=!!a?.shadowRoot,c=s?`:host`:`:root`,l=s?a??void 0:o;return(0,U.useEffect)(()=>{if(!a)return;let e=a.style,t=i,n=t.other??{},r=t.colors??{},o=t.fontSizes??{},s=t.lineHeights??{};t.fontFamily&&e.setProperty(`--mantine-font-family`,String(t.fontFamily)),Object.entries(o).forEach(([t,n])=>{e.setProperty(`--mantine-font-size-${t}`,PM(String(n)))}),Object.entries(s).forEach(([t,n])=>{e.setProperty(`--mantine-line-height-${t}`,PM(String(n)))}),Object.entries(n).forEach(([t,n])=>{Object.entries(n).forEach(([n,r])=>{e.setProperty(`--mantine-custom-${t}-${n}`,String(r))})}),Object.entries(r).forEach(([t,n])=>{n.forEach((n,r)=>{e.setProperty(`--mantine-color-${t}-${r}`,n)})})},[a,i]),(0,W.jsx)(DM,{i18n:Ne,children:(0,W.jsx)(Lr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,W.jsx)(Qx,{client:yE,children:(0,W.jsx)(NM,{config:t,children:(0,W.jsx)(jM,{config:n,children:(0,W.jsx)(AM,{runtime:r,children:e})})})})})})}function IM(){let e=(0,U.useRef)(null);return{startInteraction:(0,U.useCallback)(t=>{let{cursor:n,onMove:r,onEnd:i}=t;document.body.style.cursor=n,document.body.style.userSelect=`none`;let a=()=>{document.body.style.cursor=``,document.body.style.userSelect=``,document.removeEventListener(`pointermove`,r),document.removeEventListener(`pointerup`,a),i?.(),e.current=null};document.addEventListener(`pointermove`,r),document.addEventListener(`pointerup`,a),e.current=a},[]),cleanup:(0,U.useCallback)(()=>{e.current?.()},[])}}var LM=4;function RM(e={}){let{skipSelector:t=`button, [role="button"], a, input, textarea`,onDragChange:n}=e,[r,i]=(0,U.useState)({x:0,y:0}),[a,o]=(0,U.useState)(!1),s=(0,U.useRef)({startX:0,startY:0,startOffset:{x:0,y:0}}),{startInteraction:c}=IM();return{offset:r,isDragging:a,handlePointerDown:(0,U.useCallback)(e=>{let a=e.target;if(t&&a?.closest(t))return;let l=e.clientX,u=e.clientY,d={...r},f=0,p=!1;s.current={startX:l,startY:u,startOffset:d},c({cursor:`grab`,onMove:e=>{let t=e.clientX-l,r=e.clientY-u;if(f=Math.abs(t)+Math.abs(r),!p&&f>=LM&&(p=!0,o(!0),document.body.style.cursor=`grabbing`,document.body.style.userSelect=`none`),p){let e={x:d.x+t,y:d.y+r};i(e),n?.(e)}},onEnd:()=>{p&&o(!1)}})},[r,t,n,c]),style:{transform:`translate(${r.x}px, ${r.y}px)`,cursor:a?`grabbing`:`grab`,touchAction:`none`}}}function zM(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,W.jsx)(`path`,{d:`M12 8V4H8`}),(0,W.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,W.jsx)(`path`,{d:`M2 14h2`}),(0,W.jsx)(`path`,{d:`M20 14h2`}),(0,W.jsx)(`path`,{d:`M15 13v2`}),(0,W.jsx)(`path`,{d:`M9 13v2`})]})}var BM={root:`_root_74oe4_1`,button:`_button_74oe4_5`,buttonInner:`_buttonInner_74oe4_30`,iconSection:`_iconSection_74oe4_35`,label:`_label_74oe4_39`};function VM({onClick:e,zIndex:t,position:n,label:r}){let i=Vj(),{handlePointerDown:a,style:o}=RM({skipSelector:``}),s=Math.min(i.other.iconSize[`icon-sm`],16),{transform:c,cursor:l,touchAction:u}=o,d=(0,U.useMemo)(()=>({transform:c,touchAction:u,zIndex:t,...n}),[n,u,c,t]),f=(0,U.useMemo)(()=>({cursor:l??`pointer`}),[l]);return(0,W.jsx)(`div`,{className:BM.root,style:d,children:(0,W.jsx)(km,{onClick:e,onPointerDown:a,style:f,classNames:{root:BM.button,inner:BM.buttonInner,section:BM.iconSection,label:BM.label},leftSection:(0,W.jsx)(zM,{width:s,height:s}),radius:20,variant:`primary`,"aria-label":`Open ${r??`agent widget`}`,title:`Open ${r??`agent widget`}`,children:r??`Assistant`})})}var HM=(0,U.createContext)({});function UM(){return(0,U.useContext)(HM)}function WM(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\s+/g,` `).trim().replace(/^./,e=>e.toUpperCase())}function GM(e){if(e==null)return`-`;if(Array.isArray(e))return e.length>0?e.join(`, `):`-`;if(typeof e==`object`){let t=Object.entries(e);return t.length===0?`-`:t.map(([e,t])=>`${WM(e)}: ${String(t??`-`)}`).join(` | `)}return String(e).trim()||`-`}function KM(e){return e.trim().toLowerCase().replace(/\s+/g,`-`)}function qM(e){if(e.header.badge?.trim())return KM(e.header.badge);let t=KM(e.columnType);return t===`ourcatalog`||t===`catalog`||t===`internal`?`catalog`:`competitor`}function JM(e){if(typeof e!=`string`)return;let t=e.trim();if(!(!t||t.toLowerCase()===`internal`)){if(/^https?:\/\//i.test(t))return t;if(/^[\w.-]+\.[a-z]{2,}(\/.*)?$/i.test(t))return`https://${t}`}}function YM(e){let t=new Set;return e.forEach(e=>{Object.keys(e.specs).forEach(e=>{e!==`priceNote`&&t.add(e)})}),Array.from(t)}function XM(e){return{formatLabel:WM,formatValue:GM,getTone:qM,toHref:JM,specKeys:YM(e)}}var ZM={surface:`_surface_1p3km_1`,scroller:`_scroller_1p3km_16`,table:`_table_1p3km_32`,stickyColumn:`_stickyColumn_1p3km_39`,cornerCell:`_cornerCell_1p3km_45`,sectionLabel:`_sectionLabel_1p3km_52`,offerHeader:`_offerHeader_1p3km_61`,offerEyebrow:`_offerEyebrow_1p3km_79`,offerTitle:`_offerTitle_1p3km_89`,offerBadge:`_offerBadge_1p3km_108`,rowLabel:`_rowLabel_1p3km_122`,dataCell:`_dataCell_1p3km_123`,footerStub:`_footerStub_1p3km_124`,footerCell:`_footerCell_1p3km_125`,rowLabelText:`_rowLabelText_1p3km_142`,cellPrimary:`_cellPrimary_1p3km_154`,cellLink:`_cellLink_1p3km_155`,cellSecondary:`_cellSecondary_1p3km_181`,footerButton:`_footerButton_1p3km_193`};function QM({comparisonModal:e,fillHeight:t=!0,isBusy:n=!1,onClose:r}){if(!e||e.columns.length===0)return null;let{sendMessage:i}=UM(),{formatLabel:a,formatValue:o,getTone:s,toHref:c,specKeys:l}=XM(e.columns),u=e.columns.some(e=>e.selectButton?.buttonText),d=(0,U.useCallback)(e=>{r?.(),i?.(e,{showUserBubble:!1})},[r,i]);return(0,W.jsx)(J,{className:ZM.surface,"data-fill-height":t,children:(0,W.jsx)(al,{type:`auto`,offsetScrollbars:!0,scrollbarSize:10,className:ZM.scroller,children:(0,W.jsxs)(J,{className:ZM.table,style:{gridTemplateColumns:`180px repeat(${Math.max(e.columns.length,1)}, minmax(196px, 1fr))`},children:[(0,W.jsx)(jm,{className:`${ZM.cornerCell} ${ZM.stickyColumn}`,children:(0,W.jsx)(Jf,{className:ZM.sectionLabel,children:`Specifications`})}),e.columns.map((e,t)=>{let n=s(e);return(0,W.jsx)(zy,{gap:10,className:ZM.offerHeader,"data-tone":n,children:(0,W.jsxs)(wf,{direction:`column`,align:`center`,justify:`center`,gap:4,h:`100%`,children:[(0,W.jsxs)(zy,{gap:4,align:`center`,children:[(0,W.jsx)(Jf,{className:ZM.offerEyebrow,children:o(e.header.label)}),(0,W.jsx)(Jf,{className:ZM.offerTitle,children:o(e.header.offerName)})]}),e.header.badge?(0,W.jsx)(bm,{radius:`sm`,className:ZM.offerBadge,children:e.header.badge}):null]})},`${e.header.offerName}-${t}`)}),l.map(t=>(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(jm,{className:`${ZM.rowLabel} ${ZM.stickyColumn}`,children:(0,W.jsx)(Jf,{className:ZM.rowLabelText,children:a(t)})}),e.columns.map((e,n)=>{let r=s(e),i=e.specs[t],a=/url$/i.test(t)?c(i):void 0,l=t===`price`?o(e.specs.priceNote):void 0,u=t===`price`?r===`threat`?`accent`:`strong`:`default`;return(0,W.jsxs)(zy,{gap:4,className:ZM.dataCell,children:[a?(0,W.jsx)(Zf,{href:a,target:`_blank`,rel:`noreferrer`,className:ZM.cellLink,children:o(i)}):(0,W.jsx)(Jf,{className:ZM.cellPrimary,"data-emphasis":u,children:o(i)}),l&&l!==`-`?(0,W.jsx)(Jf,{className:ZM.cellSecondary,children:l}):null]},`${t}-${e.header.offerName}-${n}`)})]},t)),u?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(jm,{className:`${ZM.footerStub} ${ZM.stickyColumn}`}),e.columns.map((e,t)=>{let r=s(e);return(0,W.jsx)(jm,{className:ZM.footerCell,children:e.selectButton?.buttonText?(0,W.jsx)(km,{radius:`md`,className:ZM.footerButton,"data-tone":r,variant:r===`catalog`?`light`:`filled`,disabled:n,onClick:()=>d(e.selectButton.buttonText),children:e.selectButton.buttonText}):null},`${e.header.offerName}-${t}-cta`)})]}):null]})})})}function $M(e){return typeof document>`u`?null:e?.trim()?document.querySelector(e)??document.body:document.body}function eN(e){if(e===document.body||e===document.documentElement)return null;let t=e.getBoundingClientRect(),n=window.getComputedStyle(e),r=Number.parseFloat(n.paddingTop||`0`)||0,i=Number.parseFloat(n.paddingRight||`0`)||0,a=Number.parseFloat(n.paddingBottom||`0`)||0,o=Number.parseFloat(n.paddingLeft||`0`)||0;return{top:t.top+r,left:t.left+o,width:Math.max(0,t.width-o-i),height:Math.max(0,t.height-r-a)}}function tN({hostContainerSelector:e,opened:t,hasComparison:n,hasContent:r,size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l}){let[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null);return(0,U.useEffect)(()=>{let t=$M(e);if(d(t),!t){p(null);return}let n=()=>{p(eN(t))};if(n(),t===document.body||t===document.documentElement)return;let r=new ResizeObserver(n);return r.observe(t),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{r.disconnect(),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]),{portalTarget:u,resolvedSize:i??(n?`xl`:`md`),shellStyle:(0,U.useMemo)(()=>f?{top:`${f.top}px`,left:`${f.left}px`,width:`${f.width}px`,height:`${f.height}px`,zIndex:a}:{top:o,height:s,left:c,right:l,zIndex:a},[f,s,c,l,o,a]),shouldRender:t&&!!u&&r}}var nN={shell:`_shell_fjxge_1`,modalRoot:`_modalRoot_fjxge_6`,inner:`_inner_fjxge_12`,overlay:`_overlay_fjxge_19`,content:`_content_fjxge_26`,header:`_header_fjxge_36`,mantineTitle:`_mantineTitle_fjxge_40`,title:`_title_fjxge_44`,subtitle:`_subtitle_fjxge_53`,close:`_close_fjxge_60`,body:`_body_fjxge_74`,bodyContent:`_bodyContent_fjxge_81`,bodyScrollArea:`_bodyScrollArea_fjxge_88`,popupSections:`_popupSections_fjxge_92`,bodyText:`_bodyText_fjxge_96`};function rN({opened:e,onClose:t,message:n,isAssistantStreaming:r=!1,size:i,zIndex:a,layoutTop:o=`var(--mantine-custom-space-150)`,layoutHeight:s=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,layoutLeftOffset:c=`var(--mantine-custom-space-150)`,layoutRightOffset:l=`0px`,hostContainerSelector:u}){let d=(0,U.useId)(),f=n?.popup,p=f?.comparisonModal,m=f?.title??p?.title,h=f?.subtitle??p?.subtitle,g=f?.body??n?.text,_=!!p,{portalTarget:v,resolvedSize:y,shellStyle:b,shouldRender:x}=tN({hostContainerSelector:u,opened:e,hasComparison:_,hasContent:!!(p||g||f),size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l});return!x||!v?null:(0,sn.createPortal)((0,W.jsx)(J,{className:nN.shell,style:b,children:(0,W.jsx)(mg,{opened:e,onClose:t,title:(0,W.jsxs)(zy,{gap:4,children:[(0,W.jsx)(Jf,{id:d,className:nN.title,component:`span`,children:m}),h?(0,W.jsx)(Jf,{className:nN.subtitle,component:`span`,children:h}):null]}),withCloseButton:!0,withinPortal:!1,centered:!0,lockScroll:!1,closeOnClickOutside:!1,trapFocus:!1,size:y,scrollAreaComponent:al.Autosize,classNames:{root:nN.modalRoot,inner:nN.inner,overlay:nN.overlay,content:nN.content,header:nN.header,body:nN.body,close:nN.close,title:nN.mantineTitle},overlayProps:{backgroundOpacity:gA.lg,blur:6},children:(0,W.jsx)(J,{className:nN.bodyContent,"data-layout":_?`comparison`:`text`,children:_?(0,W.jsx)(al.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:nN.bodyScrollArea,children:(0,W.jsx)(zy,{gap:`md`,className:nN.popupSections,children:(0,W.jsx)(QM,{comparisonModal:p,fillHeight:!0,isBusy:r,onClose:t})})}):g?(0,W.jsx)(al.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:nN.bodyScrollArea,children:(0,W.jsx)(Jf,{className:nN.bodyText,component:`p`,children:g})}):null})})}),v)}var{entries:iN,setPrototypeOf:aN,isFrozen:oN,getPrototypeOf:sN,getOwnPropertyDescriptor:cN}=Object,{freeze:lN,seal:uN,create:dN}=Object,{apply:fN,construct:pN}=typeof Reflect<`u`&&Reflect;lN||=function(e){return e},uN||=function(e){return e},fN||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},pN||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var mN=ON(Array.prototype.forEach),hN=ON(Array.prototype.lastIndexOf),gN=ON(Array.prototype.pop),_N=ON(Array.prototype.push),vN=ON(Array.prototype.splice),yN=ON(String.prototype.toLowerCase),bN=ON(String.prototype.toString),xN=ON(String.prototype.match),SN=ON(String.prototype.replace),CN=ON(String.prototype.indexOf),wN=ON(String.prototype.trim),TN=ON(Object.prototype.hasOwnProperty),EN=ON(RegExp.prototype.test),DN=kN(TypeError);function ON(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return fN(e,t,r)}}function kN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return pN(e,n)}}function AN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yN;aN&&aN(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(oN(t)||(t[r]=e),i=e)}e[i]=!0}return e}function jN(e){for(let t=0;t<e.length;t++)TN(e,t)||(e[t]=null);return e}function MN(e){let t=dN(null);for(let[n,r]of iN(e))TN(e,n)&&(Array.isArray(r)?t[n]=jN(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=MN(r):t[n]=r);return t}function NN(e,t){for(;e!==null;){let n=cN(e,t);if(n){if(n.get)return ON(n.get);if(typeof n.value==`function`)return ON(n.value)}e=sN(e)}function n(){return null}return n}var PN=lN(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),FN=lN(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),IN=lN([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),LN=lN([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),RN=lN(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),zN=lN([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),BN=lN([`#text`]),VN=lN(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),HN=lN(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),UN=lN(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),WN=lN([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),GN=uN(/\{\{[\w\W]*|[\w\W]*\}\}/gm),KN=uN(/<%[\w\W]*|[\w\W]*%>/gm),qN=uN(/\$\{[\w\W]*/gm),JN=uN(/^data-[\-\w.\u00B7-\uFFFF]+$/),YN=uN(/^aria-[\-\w]+$/),XN=uN(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ZN=uN(/^(?:\w+script|data):/i),QN=uN(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$N=uN(/^html$/i),eP=uN(/^[a-z][.\w]*(-[.\w]+)+$/i),tP=Object.freeze({__proto__:null,ARIA_ATTR:YN,ATTR_WHITESPACE:QN,CUSTOM_ELEMENT:eP,DATA_ATTR:JN,DOCTYPE_NAME:$N,ERB_EXPR:KN,IS_ALLOWED_URI:XN,IS_SCRIPT_OR_DATA:ZN,MUSTACHE_EXPR:GN,TMPLIT_EXPR:qN}),nP={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},rP=function(){return typeof window>`u`?null:window},iP=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},aP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function oP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rP(),t=e=>oP(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==nP.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=NN(m,`cloneNode`),g=NN(m,`remove`),_=NN(m,`nextSibling`),v=NN(m,`childNodes`),y=NN(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:E}=r,D=aP();t.isSupported=typeof iN==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:k,TMPLIT_EXPR:A,DATA_ATTR:j,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:ee}=tP,{IS_ALLOWED_URI:F}=tP,I=null,te=AN({},[...PN,...FN,...IN,...RN,...BN]),ne=null,re=AN({},[...VN,...HN,...UN,...WN]),ie=Object.seal(dN(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),L=null,R=null,ae=Object.seal(dN(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),oe=!0,se=!0,ce=!1,le=!0,ue=!1,de=!0,z=!1,fe=!1,pe=!1,me=!1,he=!1,B=!1,ge=!0,_e=!1,V=!0,ve=!1,ye={},be=null,xe=AN({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Se=null,Ce=AN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),we=null,Te=AN({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ee=`http://www.w3.org/1998/Math/MathML`,De=`http://www.w3.org/2000/svg`,Oe=`http://www.w3.org/1999/xhtml`,ke=Oe,Ae=!1,je=null,Me=AN({},[Ee,De,Oe],bN),Ne=AN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=AN({},[`annotation-xml`]),Fe=AN({},[`title`,`style`,`font`,`a`,`script`]),Ie=null,Le=[`application/xhtml+xml`,`text/html`],Re=null,ze=null,Be=n.createElement(`form`),Ve=function(e){return e instanceof RegExp||e instanceof Function},H=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ze&&ze===e)){if((!e||typeof e!=`object`)&&(e={}),e=MN(e),Ie=Le.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Re=Ie===`application/xhtml+xml`?bN:yN,I=TN(e,`ALLOWED_TAGS`)?AN({},e.ALLOWED_TAGS,Re):te,ne=TN(e,`ALLOWED_ATTR`)?AN({},e.ALLOWED_ATTR,Re):re,je=TN(e,`ALLOWED_NAMESPACES`)?AN({},e.ALLOWED_NAMESPACES,bN):Me,we=TN(e,`ADD_URI_SAFE_ATTR`)?AN(MN(Te),e.ADD_URI_SAFE_ATTR,Re):Te,Se=TN(e,`ADD_DATA_URI_TAGS`)?AN(MN(Ce),e.ADD_DATA_URI_TAGS,Re):Ce,be=TN(e,`FORBID_CONTENTS`)?AN({},e.FORBID_CONTENTS,Re):xe,L=TN(e,`FORBID_TAGS`)?AN({},e.FORBID_TAGS,Re):MN({}),R=TN(e,`FORBID_ATTR`)?AN({},e.FORBID_ATTR,Re):MN({}),ye=TN(e,`USE_PROFILES`)?e.USE_PROFILES:!1,oe=e.ALLOW_ARIA_ATTR!==!1,se=e.ALLOW_DATA_ATTR!==!1,ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=e.SAFE_FOR_TEMPLATES||!1,de=e.SAFE_FOR_XML!==!1,z=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,he=e.RETURN_DOM_FRAGMENT||!1,B=e.RETURN_TRUSTED_TYPE||!1,pe=e.FORCE_BODY||!1,ge=e.SANITIZE_DOM!==!1,_e=e.SANITIZE_NAMED_PROPS||!1,V=e.KEEP_CONTENT!==!1,ve=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||XN,ke=e.NAMESPACE||Oe,Ne=e.MATHML_TEXT_INTEGRATION_POINTS||Ne,Pe=e.HTML_INTEGRATION_POINTS||Pe,ie=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ve(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ve(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ie.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(ie.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ue&&(se=!1),he&&(me=!0),ye&&(I=AN({},BN),ne=dN(null),ye.html===!0&&(AN(I,PN),AN(ne,VN)),ye.svg===!0&&(AN(I,FN),AN(ne,HN),AN(ne,WN)),ye.svgFilters===!0&&(AN(I,IN),AN(ne,HN),AN(ne,WN)),ye.mathMl===!0&&(AN(I,RN),AN(ne,UN),AN(ne,WN))),TN(e,`ADD_TAGS`)||(ae.tagCheck=null),TN(e,`ADD_ATTR`)||(ae.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ae.tagCheck=e.ADD_TAGS:(I===te&&(I=MN(I)),AN(I,e.ADD_TAGS,Re))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ae.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=MN(ne)),AN(ne,e.ADD_ATTR,Re))),e.ADD_URI_SAFE_ATTR&&AN(we,e.ADD_URI_SAFE_ATTR,Re),e.FORBID_CONTENTS&&(be===xe&&(be=MN(be)),AN(be,e.FORBID_CONTENTS,Re)),e.ADD_FORBID_CONTENTS&&(be===xe&&(be=MN(be)),AN(be,e.ADD_FORBID_CONTENTS,Re)),V&&(I[`#text`]=!0),z&&AN(I,[`html`,`head`,`body`]),I.table&&(AN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw DN(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw DN(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=iP(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));lN&&lN(e),ze=e}},He=AN({},[...FN,...IN,...LN]),Ue=AN({},[...RN,...zN]),We=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:ke,tagName:`template`});let n=yN(e.tagName),r=yN(t.tagName);return je[e.namespaceURI]?e.namespaceURI===De?t.namespaceURI===Oe?n===`svg`:t.namespaceURI===Ee?n===`svg`&&(r===`annotation-xml`||Ne[r]):!!He[n]:e.namespaceURI===Ee?t.namespaceURI===Oe?n===`math`:t.namespaceURI===De?n===`math`&&Pe[r]:!!Ue[n]:e.namespaceURI===Oe?t.namespaceURI===De&&!Pe[r]||t.namespaceURI===Ee&&!Ne[r]?!1:!Ue[n]&&(Fe[n]||!He[n]):!!(Ie===`application/xhtml+xml`&&je[e.namespaceURI]):!1},U=function(e){_N(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},Ge=function(e,n){try{_N(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{_N(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(me||he)try{U(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ke=function(e){let t=null,r=null;if(pe)e=`<remove></remove>`+e;else{let t=xN(e,/^[\r\n\t ]+/);r=t&&t[0]}Ie===`application/xhtml+xml`&&ke===Oe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(ke===Oe)try{t=new f().parseFromString(i,Ie)}catch{}if(!t||!t.documentElement){t=S.createDocument(ke,`template`,null);try{t.documentElement.innerHTML=Ae?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ke===Oe?T.call(t,z?`html`:`body`)[0]:z?t.documentElement:a},qe=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Je=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Ye=function(e){return typeof s==`function`&&e instanceof s};function Xe(e,n,r){mN(e,e=>{e.call(t,n,r,ze)})}let Ze=function(e){let n=null;if(Xe(D.beforeSanitizeElements,e,null),Je(e))return U(e),!0;let r=Re(e.nodeName);if(Xe(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),de&&e.hasChildNodes()&&!Ye(e.firstElementChild)&&EN(/<[/\w!]/g,e.innerHTML)&&EN(/<[/\w!]/g,e.textContent)||e.nodeType===nP.progressingInstruction||de&&e.nodeType===nP.comment&&EN(/<[/\w]/g,e.data))return U(e),!0;if(!(ae.tagCheck instanceof Function&&ae.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&$e(r)&&(ie.tagNameCheck instanceof RegExp&&EN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r)))return!1;if(V&&!be[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return U(e),!0}return e instanceof c&&!We(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&EN(/<\/no(script|embed|frames)/i,e.innerHTML)?(U(e),!0):(ue&&e.nodeType===nP.text&&(n=e.textContent,mN([O,k,A],e=>{n=SN(n,e,` `)}),e.textContent!==n&&(_N(t.removed,{element:e.cloneNode()}),e.textContent=n)),Xe(D.afterSanitizeElements,e,null),!1)},Qe=function(e,t,r){if(R[t]||ge&&(t===`id`||t===`name`)&&(r in n||r in Be))return!1;if(!(se&&!R[t]&&EN(j,t))&&!(oe&&EN(M,t))&&!(ae.attributeCheck instanceof Function&&ae.attributeCheck(t,e))){if(!ne[t]||R[t]){if(!($e(e)&&(ie.tagNameCheck instanceof RegExp&&EN(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&EN(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&EN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!we[t]&&!EN(F,SN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&CN(r,`data:`)===0&&Se[e])&&!(ce&&!EN(N,SN(r,P,``)))&&r)return!1}return!0},$e=function(e){return e!==`annotation-xml`&&xN(e,ee)},et=function(e){Xe(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Je(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Re(a),l=s,u=a===`value`?l:wN(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Xe(D.uponSanitizeAttribute,e,r),u=r.attrValue,_e&&(c===`id`||c===`name`)&&(Ge(a,e),u=`user-content-`+u),de&&EN(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){Ge(a,e);continue}if(c===`attributename`&&xN(u,`href`)){Ge(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ge(a,e);continue}if(!le&&EN(/\/>/i,u)){Ge(a,e);continue}ue&&mN([O,k,A],e=>{u=SN(u,e,` `)});let d=Re(e.nodeName);if(!Qe(d,c,u)){Ge(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Je(e)?U(e):gN(t.removed)}catch{Ge(a,e)}}Xe(D.afterSanitizeAttributes,e,null)},tt=function e(t){let n=null,r=qe(t);for(Xe(D.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Xe(D.uponSanitizeShadowNode,n,null),Ze(n),et(n),n.content instanceof a&&e(n.content);Xe(D.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Ae=!e,Ae&&(e=`<!-->`),typeof e!=`string`&&!Ye(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw DN(`dirty is not a string, aborting`)}else throw DN(`toString is not a function`);if(!t.isSupported)return e;if(fe||H(n),t.removed=[],typeof e==`string`&&(ve=!1),ve){if(e.nodeName){let t=Re(e.nodeName);if(!I[t]||L[t])throw DN(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Ke(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===nP.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!me&&!ue&&!z&&e.indexOf(`<`)===-1)return b&&B?b.createHTML(e):e;if(i=Ke(e),!i)return me?null:B?x:``}i&&pe&&U(i.firstChild);let u=qe(ve?e:i);for(;c=u.nextNode();)Ze(c),et(c),c.content instanceof a&&tt(c.content);if(ve)return e;if(me){if(he)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(ne.shadowroot||ne.shadowrootmode)&&(l=E.call(r,l,!0)),l}let d=z?i.outerHTML:i.innerHTML;return z&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&EN($N,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
319
|
+
`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=fw(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Bw.assertOptions(n,{silentJSONParsing:Vw.transitional(Vw.boolean),forcedJSONParsing:Vw.transitional(Vw.boolean),clarifyTimeoutError:Vw.transitional(Vw.boolean),legacyInterceptorReqResOrdering:Vw.transitional(Vw.boolean)},!1),r!=null&&(Q.isFunction(r)?t.paramsSerializer={serialize:r}:Bw.assertOptions(r,{encode:Vw.function,serialize:Vw.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Bw.assertOptions(t,{baseUrl:Vw.spelling(`baseURL`),withXsrfToken:Vw.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&Q.merge(i.common,i[t.method]);i&&Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=YC.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||wC;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Fw.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Fw.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=fw(this.defaults,e),SC(uw(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Q.forEach([`delete`,`get`,`head`,`options`],function(e){Hw.prototype[e]=function(t,n){return this.request(fw(n||{},{method:e,url:t,data:(n||{}).data}))}}),Q.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(fw(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Hw.prototype[e]=t(),Hw.prototype[e+`Form`]=t(!0)});var Uw=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new QC(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&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 t;return{token:new e(function(e){t=e}),cancel:t}}};function Ww(e){return function(t){return e.apply(null,t)}}function Gw(e){return Q.isObject(e)&&e.isAxiosError===!0}var Kw={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(Kw).forEach(([e,t])=>{Kw[t]=e});function qw(e){let t=new Hw(e),n=eS(Hw.prototype.request,t);return Q.extend(n,Hw.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return qw(fw(e,t))},n}var Jw=qw(RC);Jw.Axios=Hw,Jw.CanceledError=QC,Jw.CancelToken=Uw,Jw.isCancel=ZC,Jw.VERSION=Iw,Jw.toFormData=_C,Jw.AxiosError=dC,Jw.Cancel=Jw.CanceledError,Jw.all=function(e){return Promise.all(e)},Jw.spread=Ww,Jw.isAxiosError=Gw,Jw.mergeConfig=fw,Jw.AxiosHeaders=YC,Jw.formToJSON=e=>IC(Q.isHTMLForm(e)?new FormData(e):e),Jw.getAdapter=Nw.getAdapter,Jw.HttpStatusCode=Kw,Jw.default=Jw;var{Axios:Yw,AxiosError:Xw,CanceledError:Zw,isCancel:Qw,CancelToken:$w,VERSION:eT,all:tT,Cancel:nT,isAxiosError:rT,spread:iT,toFormData:aT,AxiosHeaders:oT,HttpStatusCode:sT,formToJSON:cT,getAdapter:lT,mergeConfig:uT}=Jw,dT=`genai_access_token`,fT=`genai_tenant_id`,pT=`genai_switch_ready`;function mT(e){try{let t=e.split(`.`);if(t.length<2)return!1;let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`),r=n.padEnd(Math.ceil(n.length/4)*4,`=`),i=JSON.parse(atob(r));return i.exp?i.exp*1e3<Date.now():!1}catch{return!1}}function hT(){if(typeof sessionStorage<`u`){let e=sessionStorage.getItem(dT);return e&&mT(e)?(sessionStorage.removeItem(dT),null):e}return null}function gT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(dT,e)}function _T(){return typeof sessionStorage<`u`?sessionStorage.getItem(fT):null}function vT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(fT,String(e))}function yT(){return typeof sessionStorage<`u`?sessionStorage.getItem(pT)===`true`:!1}function bT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(pT,String(e))}function xT(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function ST(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var CT=xT({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5});function wT(e,t){let n=e.getState(),r=ST(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function TT(e,t=CT){let n=e.id||ht();return wT(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function ET({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M11.992 15H12.001`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 12V8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function DT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function OT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M12.2422 17V12C12.2422 11.5286 12.2422 11.2929 12.0957 11.1464C11.9493 11 11.7136 11 11.2422 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M11.992 8H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function kT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M5.32171 9.68293C7.73539 5.41199 8.94222 3.27651 10.5983 2.72681C11.5093 2.4244 12.4907 2.4244 13.4017 2.72681C15.0578 3.27651 16.2646 5.41199 18.6783 9.68293C21.092 13.9538 22.2988 16.0893 21.9368 17.8293C21.7376 18.7866 21.2469 19.6548 20.535 20.3097C19.241 21.5 16.8274 21.5 12 21.5C7.17265 21.5 4.75897 21.5 3.46496 20.3097C2.75308 19.6548 2.26239 18.7866 2.06322 17.8293C1.70119 16.0893 2.90803 13.9538 5.32171 9.68293Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M11.992 16H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 13V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var AT={danger:(0,W.jsx)(ET,{}),info:(0,W.jsx)(OT,{}),success:(0,W.jsx)(DT,{}),warning:(0,W.jsx)(kT,{})};function jT(e,t){let n=AT[e];TT({...t,variant:e,icon:n})}function MT(e){jT(`danger`,{title:Ne._({id:`SlfejT`}),...e})}function NT(){return Ne._({id:`Qlh+W2`})}function PT(e,t){return{}[e]}function FT(e){return e?{401:Ne._({id:`9cOLBO`}),403:Ne._({id:`qriaXz`}),404:Ne._({id:`373i3G`}),500:Ne._({id:`lkE00/`}),502:Ne._({id:`9dPdtH`}),503:Ne._({id:`Vw36Gt`}),504:Ne._({id:`3R0fAs`})}[e]:``}var IT=`react-starter-kit-`,LT=Object.entries({BUILD_META_DATA_INSPECTOR:`buildMetaDataInspector`,COLOR_SCHEME:`colorScheme`,DEBUG:`debug`,ENVIRONMENT_INSPECTOR:`environmentInspector`,INCLUDE_BEARER:`includeBearer`,KEYCLOAK_ERROR:`keycloakError`,LANGUAGE:`language`,LOCAL_STORAGE_INSPECTOR:`localStorageInspector`,LOGGER_LOG_LEVEL:`loggerLogLevel`,LOGGER:`logger`,SHOW_HTTP_ERROR_DEBUG_TOASTER:`showHttpErrorDebugToaster`,TABLE_VIEW:`tableView`,DRAWER_EXPANDED:`drawerExpanded`,PANEL_OPEN:`panelOpen`,PERMISSION_GOD_MODE:`permissionGodMode`}).reduce((e,[t,n])=>({...e,[t]:`${IT}${n}`}),{});function RT(e,t=null){let n=localStorage.getItem(e);if(n===null)return t;try{let e=JSON.parse(n);return typeof t==`boolean`?typeof e==`boolean`?e:t:typeof t==`number`?typeof e==`number`&&!Number.isNaN(e)?e:t:e}catch{return typeof t==`string`?n:t}}function zT(){return RT(LT.DEBUG,!1),!0}function BT(){return zT()?RT(LT.SHOW_HTTP_ERROR_DEBUG_TOASTER,!1):!1}function VT(e){return e?.operationResultCode!==void 0}function HT(e){return e?.error!==void 0}function UT(e){let t=e.response?.headers;if(!t)return!1;let n=`application/problem+json`,r=`Content-Type`;return typeof t.get==`function`?t.get(r)===n:t[r]===n}function WT(e){return VT(e)?e.description:HT(e)?e.error:e?.message||e?.errorCode||NT()}function GT(e){return e.code?PT(e.code)||NT():``}function KT(e){return{url:e.config?.url,method:e.config?.method?.toUpperCase(),status:e.response?.status,response:e.response?.data}}function qT(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function JT({url:e,method:t,status:n,response:r}){let i=r!=null&&Object.keys(r).length>0;return(0,W.jsxs)(zy,{children:[[{label:Ne._({id:`IagCbF`}),value:e},{label:Ne._({id:`fiPesM`}),value:t},{label:Ne._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,W.jsxs)(wu,{gap:4,children:[(0,W.jsxs)(Jf,{size:`xs`,fw:500,children:[e,`:`]}),(0,W.jsx)(Jf,{size:`xs`,children:t})]},n)),i&&(0,W.jsx)(Pm,{block:!0,lh:1.2,children:qT(r)})]})}function YT(e){let t=e.response?.data;return VT(t)?t.operationResultCode:HT(t)?t.error:t?.errorCode||t?.code||t?.message||``}function XT(e){return e.response?.data?.status||e.response?.status||e.status}function ZT(e){let t=e.response?.data,n=YT(e);if(n){let e=PT(n);if(e)return e}return WT(t)}function QT(e){let t=e.response?.data;return GT(t)||FT(XT(e))}function $T(e){return e.response?.data?UT(e)?QT(e):ZT(e):e.message}function eE(e){return e.response?.data?.errorId}function tE(e){let t=$T(e),n=UT(e)?eE(e):void 0;return n?(0,W.jsxs)(zy,{gap:8,children:[(0,W.jsx)(Jf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,W.jsxs)(Jf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Ne._({id:`jf+o1U`}),`: `,n]})]}):t}function nE(e){if(!e)return NT();if(BT()){let t=KT(e);return Object.values(t).some(Boolean)?(0,W.jsx)(zy,{children:JT(t)}):tE(e)}return tE(e)}function rE(){return BT()?Ne._({id:`J5ej6L`}):Ne._({id:`SlfejT`})}function iE(e){MT({title:rE(),message:nE(e),autoClose:BT()?!1:5e3})}function aE(e,t=NT()){if(e instanceof Xw){let n=e.response?.status??e.status,r=(e.message??``).toLowerCase();if(e.code===`ERR_NETWORK`||r===`network error`||r.includes(`failed to fetch`))return FT(503)||t;if(n===504||n===408||e.code===`ECONNABORTED`||r.includes(`timeout`)||r.includes(`timed out`))return FT(504)||t;let i=$T(e);if(typeof i==`string`&&i.trim())return i;let a=FT(n);if(a)return a;if(typeof e.message==`string`&&e.message.trim())return e.message}return e instanceof Error&&e.message.trim()?e.message:t}var oE=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},sE=(e=>e?oE(e):oE),cE=e=>e;function lE(e,t=cE){let n=U.useSyncExternalStore(e.subscribe,U.useCallback(()=>t(e.getState()),[e,t]),U.useCallback(()=>t(e.getInitialState()),[e,t]));return U.useDebugValue(n),n}var uE=e=>{let t=sE(e),n=e=>lE(t,e);return Object.assign(n,t),n},dE=(e=>e?uE(e):uE),fE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function pE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var mE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:pE(),spanId:pE().substring(0,16)};return this.contextMap.set(e,t),t}startSpan(e){let t=this.contextMap.get(e);if(!t)return this.startTrace(e);let n=pE().substring(0,16),r={traceId:t.traceId,spanId:n,parentSpanId:t.spanId};return this.contextMap.set(e,r),r}getCurrentContext(e){return this.contextMap.get(e)}clearContext(e){this.contextMap.delete(e)}}.getInstance(),hE=class e{static{this.globalConfig={enabled:!0,minLogLevel:`INFO`,applicationName:`frontend`}}constructor(t,n={}){this.name=t,this.additionalFields=n.additionalFields??{},this.config={enabled:n.enabled??zT(),minLogLevel:n.minLogLevel??e.globalConfig.minLogLevel}}createLogEntry(t,n,r){let i=mE.getCurrentContext(this.name)??mE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:fE[t],applicationName:e.globalConfig.applicationName,traceId:i.traceId,spanId:i.spanId,...i.parentSpanId&&{parentSpanId:i.parentSpanId},...this.additionalFields,...r}}log(t,n,r){if(!(!this.config.enabled||!e.globalConfig.enabled||fE[t]<fE[this.config.minLogLevel])){let e=Object.fromEntries(Object.entries(r??{}).map(([e,t])=>[e,t?.toString()??t]));Object.keys(e).length>0?console.log(n,e):console.log(n)}}debug(e,t){this.log(`DEBUG`,e,t)}info(e,t){this.log(`INFO`,e,t)}warn(e,t){this.log(`WARN`,e,t)}error(e,t){this.log(`ERROR`,e,t)}startSpan(){mE.startSpan(this.name)}clearTraceContext(){mE.clearContext(this.name)}setEnabled(e){this.config.enabled=e}setMinLogLevel(e){this.config.minLogLevel=e}static setGlobalEnabled(t){e.globalConfig.enabled=t}static getGlobalEnabled(){return e.globalConfig.enabled}static setGlobalMinLogLevel(t){e.globalConfig.minLogLevel=t}static getGlobalMinLogLevel(){return e.globalConfig.minLogLevel}static setGlobalApplicationName(t){e.globalConfig.applicationName=t}};new hE(`KeycloakService`);var gE=null;function _E(){return gE?.token?`Bearer ${gE.token}`:void 0}function vE(){return gE}var yE=new Yx({queryCache:new Jx({onError:(e,t)=>{(t.meta?.handleGlobalError??!0)&&e instanceof Xw&&iE(e)}}),mutationCache:new Gx({onError:(e,t,n,r)=>{(r.meta?.handleGlobalError??!0)&&e instanceof Xw&&iE(e)}}),defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:600*1e3},mutations:{retry:!1}}});function bE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?xE(r):t===`private`||n?SE(r):xE(r):r}function xE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function SE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function CE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function wE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Jw.create({baseURL:CE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=vE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=bE(e.url||``,e.accessScope,t));let i=hT(),a=_T();i&&!e.headers.has(`Authorization`)&&(e.headers.Authorization=`Bearer ${i}`),a&&!e.headers.has(`x-tenant-id`)&&(e.headers[`x-tenant-id`]=a);let o=_E();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Ne.locale),!e.headers.has(`Content-Type`)&&!(e.data instanceof FormData)&&(e.headers[`Content-Type`]=`application/json`),e.method?.toLowerCase()===`get`&&(e.data={}),e},e=>Promise.reject(e)),i}var TE;function EE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;wE({baseUrl:n,prefix:r.crm}),wE({baseUrl:n,prefix:r.uiAuthz}),TE=wE({baseUrl:i,prefix:``,timeoutMs:12e4})}var $=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}))(),1);function DE({type:e,date:t,locale:n,format:r,labelSeparator:i}){let a=e=>(0,$.default)(e).locale(n).format(r);return e===`default`?t===null?``:a(t):e===`multiple`?t.map(a).join(`, `):e===`range`&&Array.isArray(t)?t[0]&&t[1]?`${a(t[0])} ${i} ${a(t[1])}`:t[0]?`${a(t[0])} ${i} `:``:``}function OE({formatter:e,...t}){return(e||DE)(t)}function kE({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function AE({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=kE({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?AE({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function jE(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function ME(e){return e.current?.map(e=>e.map(e=>e.length))}function NE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=jE(i.key);a&&(i.preventDefault(),AE({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:ME(e)}))}function PE(e){return e==null||e===``?e:(0,$.default)(e).format(`YYYY-MM-DD`)}function FE(e){return e==null||e===``?e:(0,$.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function IE({minDate:e,maxDate:t}){let n=(0,$.default)();return!e&&!t?PE(n):e&&(0,$.default)(n).isBefore(e)?PE(e):t&&(0,$.default)(n).isAfter(t)?PE(t):PE(n)}var LE=(0,U.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function RE(){let e=(0,U.use)(LE),t=(0,U.useCallback)(t=>t||e.locale,[e.locale]),n=(0,U.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,U.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,U.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function zE({value:e,type:t,withTime:n}){let r=n?FE:PE;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} – ${n}`:`${t} –`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function BE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,W.jsx)(`input`,{type:`hidden`,value:zE({value:e,type:t,withTime:i}),name:n,form:r})}BE.displayName=`@mantine/dates/HiddenDatesInput`;var VE={day:`m_396ce5cb`},HE=xn((e,{size:t})=>({day:{"--day-size":rt(t,`day-size`)}})),UE=q(e=>{let t=G(`Day`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,date:c,disabled:l,__staticSelector:u,weekend:d,outside:f,selected:p,renderDay:m,inRange:h,firstInRange:g,lastInRange:_,hidden:v,static:y,highlightToday:b,fullWidth:x,attributes:S,...C}=t;return(0,W.jsx)(ll,{...K({name:u||`Day`,classes:VE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:HE,rootSelector:`day`})(`day`,{style:v?{display:`none`}:void 0}),component:y?`div`:`button`,disabled:l,"data-today":(0,$.default)(c).isSame(new Date,`day`)||void 0,"data-hidden":v||void 0,"data-highlight-today":b||void 0,"data-disabled":l||void 0,"data-weekend":!l&&!f&&d||void 0,"data-outside":!l&&f||void 0,"data-selected":!l&&p||void 0,"data-in-range":h&&!l||void 0,"data-first-in-range":g&&!l||void 0,"data-last-in-range":_&&!l||void 0,"data-static":y||void 0,"data-full-width":x||void 0,unstyled:o,...C,children:m?.(c)||(0,$.default)(c).date()})});UE.classes=VE,UE.varsResolver=HE,UE.displayName=`@mantine/dates/Day`;function WE({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,$.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,$.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,$.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var GE={weekday:`m_18a3eca`},KE=xn((e,{size:t})=>({weekdaysRow:{"--wr-fz":ot(t),"--wr-spacing":it(t)}})),qE=q(e=>{let t=G(`WeekdaysRow`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,locale:c,firstDayOfWeek:l,weekdayFormat:u,cellComponent:d=`th`,__staticSelector:f,withWeekNumbers:p,attributes:m,...h}=t,g=K({name:f||`WeekdaysRow`,classes:GE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:KE,rootSelector:`weekdaysRow`}),_=RE(),v=WE({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,W.jsx)(d,{...g(`weekday`),children:e},t));return(0,W.jsxs)(J,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,W.jsx)(d,{...g(`weekday`),children:`#`}),v]})});qE.classes=GE,qE.varsResolver=KE,qE.displayName=`@mantine/dates/WeekdaysRow`;function JE(e,t=1){let n=(0,$.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function YE(e,t=1){let n=(0,$.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function XE({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,$.default)((0,$.default)(e).subtract((0,$.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=JE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,$.default)(YE(i,t));for(;(0,$.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,$.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function ZE(e,t){return(0,$.default)(e).format(`YYYY-MM`)===(0,$.default)(t).format(`YYYY-MM`)}function QE(e,t){return t?(0,$.default)(e).isAfter((0,$.default)(t).subtract(1,`day`),`day`):!0}function $E(e,t){return t?(0,$.default)(e).isBefore((0,$.default)(t).add(1,`day`),`day`):!0}function eD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>$E(e,n)&&QE(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||ZE(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,$.default)().isSame(e,`date`))||s[0]}var tD=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){"use strict";var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);$.default.extend(tD.default);function nD(e){return(0,$.default)(e.find(e=>(0,$.default)(e).day()===1)).isoWeek()}var rD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},iD={withCellSpacing:!0},aD=xn((e,{size:t})=>({weekNumber:{"--wn-fz":ot(t),"--wn-size":rt(t,`wn-size`)}})),oD=q(e=>{let t=G(`Month`,iD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,month:f,weekendDays:p,getDayProps:m,excludeDate:h,minDate:g,maxDate:_,renderDay:v,hideOutsideDates:y,hideWeekdays:b,getDayAriaLabel:x,static:S,__getDayRef:C,__onDayKeyDown:w,__onDayClick:T,__onDayMouseEnter:E,__preventFocus:D,__stopPropagation:O,withCellSpacing:k,size:A,highlightToday:j,withWeekNumbers:M,fullWidth:N,attributes:P,...ee}=t,F=K({name:c||`Month`,classes:rD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:aD,rootSelector:`month`}),I=RE(),te=XE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=eD({dates:te,minDate:PE(g),maxDate:PE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Vr({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!ZE(e,f),i=x?.(e)||(0,$.default)(e).locale(l||I.locale).format(`D MMMM YYYY`),a=m?.(e),s=(0,$.default)(e).isSame(ne,`date`);return(0,W.jsx)(`td`,{...F(`monthCell`),"data-with-spacing":k||void 0,children:(0,W.jsx)(UE,{__staticSelector:c||`Month`,classNames:re,styles:ie,attributes:P,unstyled:o,"data-mantine-stop-propagation":O||void 0,highlightToday:j,renderDay:v,date:e,size:A,weekend:I.getWeekendDays(p).includes((0,$.default)(e).get(`day`)),outside:r,hidden:y?r:!1,"aria-label":i,static:S,fullWidth:N,disabled:h?.(e)||!$E(e,PE(_))||!QE(e,PE(g)),ref:e=>{e&&C?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),w?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),E?.(t,e)},onClick:t=>{a?.onClick?.(t),T?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),D&&e.preventDefault()},tabIndex:D||!s?-1:0})},e.toString())});return(0,W.jsxs)(`tr`,{...F(`monthRow`),children:[M&&(0,W.jsx)(`td`,{...F(`weekNumber`),children:nD(e)}),n]},t)});return(0,W.jsxs)(J,{component:`table`,...F(`month`),size:A,"data-full-width":N||void 0,...ee,children:[!b&&(0,W.jsx)(`thead`,{...F(`monthThead`),children:(0,W.jsx)(qE,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:re,styles:ie,unstyled:o,attributes:P})}),(0,W.jsx)(`tbody`,{...F(`monthTbody`),children:L})]})});oD.classes=rD,oD.varsResolver=aD,oD.displayName=`@mantine/dates/Month`;var sD={pickerControl:`m_dc6a3c71`},cD=xn((e,{size:t})=>({pickerControl:{"--dpc-fz":ot(t),"--dpc-size":rt(t,`dpc-size`)}})),lD=q(e=>{let t=G(`PickerControl`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,firstInRange:c,lastInRange:l,inRange:u,__staticSelector:d,selected:f,disabled:p,fullWidth:m,attributes:h,...g}=t;return(0,W.jsx)(ll,{...K({name:d||`PickerControl`,classes:sD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:cD,rootSelector:`pickerControl`})(`pickerControl`),unstyled:o,"data-picker-control":!0,"data-full-width":m||void 0,"data-selected":f&&!p||void 0,"data-disabled":p||void 0,"data-in-range":u&&!p&&!f||void 0,"data-first-in-range":c&&!p||void 0,"data-last-in-range":l&&!p||void 0,disabled:p,...g})});lD.classes=sD,lD.varsResolver=cD,lD.displayName=`@mantine/dates/PickerControl`;function uD({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,$.default)(e).isBefore(t,`year`)||n&&(0,$.default)(e).isAfter(n,`year`))}function dD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!uD({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,$.default)().isSame(e,`year`))||i[0]}function fD(e){let t=(0,$.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,$.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var pD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},mD={yearsListFormat:`YYYY`,withCellSpacing:!0},hD=q(e=>{let t=G(`YearsList`,mD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,decade:c,yearsListFormat:l,locale:u,minDate:d,maxDate:f,getYearControlProps:p,__staticSelector:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=K({name:m||`YearsList`,classes:pD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=RE(),O=fD(c),k=dD({years:O,minDate:d,maxDate:f,getYearControlProps:p}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=p?.(e),i=(0,$.default)(e).isSame(k,`year`);return(0,W.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(lD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:uD({year:e,minDate:d,maxDate:f}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,$.default)(e).locale(D.getLocale(u)).format(l)})},n)});return(0,W.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,W.jsx)(J,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});hD.classes=pD,hD.displayName=`@mantine/dates/YearsList`;function gD({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,$.default)(e).isBefore(t,`month`)||n&&(0,$.default)(e).isAfter(n,`month`))}function _D({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!gD({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,$.default)().isSame(e,`month`))||i[0]}function vD(e){let t=(0,$.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,$.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var yD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},bD={monthsListFormat:`MMM`,withCellSpacing:!0},xD=q(e=>{let t=G(`MonthsList`,bD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,year:l,monthsListFormat:u,locale:d,minDate:f,maxDate:p,getMonthControlProps:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=K({name:c||`MonthsList`,classes:yD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=RE(),O=vD(l),k=_D({months:O,minDate:PE(f),maxDate:PE(p),getMonthControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,$.default)(e).isSame(k,`month`);return(0,W.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(lD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:gD({month:e,minDate:PE(f),maxDate:PE(p)}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,$.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,W.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,W.jsx)(J,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});xD.classes=yD,xD.displayName=`@mantine/dates/MonthsList`;var SD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},CD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},wD=xn((e,{size:t})=>({calendarHeader:{"--dch-control-size":rt(t,`dch-control-size`),"--dch-fz":ot(t)}})),TD=q(e=>{let t=G(`CalendarHeader`,CD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,nextIcon:c,previousIcon:l,nextLabel:u,previousLabel:d,onNext:f,onPrevious:p,onLevelClick:m,label:h,nextDisabled:g,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:y,withNext:b,withPrevious:x,headerControlsOrder:S,fullWidth:C,__staticSelector:w,__preventFocus:T,__stopPropagation:E,attributes:D,...O}=t,k=K({name:w||`CalendarHeader`,classes:SD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:wD,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,U.createElement)(ll,{...k(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":d,onClick:p,unstyled:o,onMouseDown:A,disabled:_,"data-disabled":_||void 0,tabIndex:T||_?-1:0,"data-mantine-stop-propagation":E||void 0},l||(0,W.jsx)(Mf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,U.createElement)(ll,{component:v?`button`:`div`,...k(`calendarHeaderLevel`),key:`level`,onClick:v?m:void 0,unstyled:o,onMouseDown:v?A:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":y,tabIndex:T||!v?-1:0,"data-mantine-stop-propagation":E||void 0},h),N=b&&(0,U.createElement)(ll,{...k(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":u,onClick:f,unstyled:o,onMouseDown:A,disabled:g,"data-disabled":g||void 0,tabIndex:T||g?-1:0,"data-mantine-stop-propagation":E||void 0},c||(0,W.jsx)(Mf,{...k(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),P=S.map(e=>e===`previous`?j:e===`level`?M:e===`next`?N:null);return(0,W.jsx)(J,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});TD.classes=SD,TD.varsResolver=wD,TD.displayName=`@mantine/dates/CalendarHeader`;function ED(e){let t=fD(e);return[t[0][0],t[3][0]]}var DD={decadeLabelFormat:`YYYY`},OD=q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:y,previousDisabled:b,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,decadeLabelFormat:T,classNames:E,styles:D,unstyled:O,__staticSelector:k,__stopPropagation:A,size:j,fullWidth:M,attributes:N,...P}=G(`DecadeLevel`,DD,e),ee=RE(),[F,I]=ED(t),te={__staticSelector:k||`DecadeLevel`,classNames:E,styles:D,unstyled:O,size:j,attributes:N},ne=typeof y==`boolean`?y:i?!(0,$.default)(I).endOf(`year`).isBefore(i):!1,re=typeof b==`boolean`?b:r?!(0,$.default)(F).startOf(`year`).isAfter(r):!1,ie=(e,t)=>(0,$.default)(e).locale(n||ee.locale).format(t);return(0,W.jsxs)(J,{"data-decade-level":!0,size:j,...P,children:[(0,W.jsx)(TD,{label:typeof T==`function`?T(F,I):`${ie(F,T)} – ${ie(I,T)}`,__preventFocus:f,__stopPropagation:A,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:ne,previousDisabled:re,hasNextLevel:!1,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,fullWidth:M,...te}),(0,W.jsx)(hD,{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:A,withCellSpacing:d,fullWidth:M,...te})]})});OD.classes={...hD.classes,...TD.classes},OD.displayName=`@mantine/dates/DecadeLevel`;var kD={yearLabelFormat:`YYYY`},AD=q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,yearLabelFormat:D,__staticSelector:O,__stopPropagation:k,size:A,classNames:j,styles:M,unstyled:N,fullWidth:P,attributes:ee,...F}=G(`YearLevel`,kD,e),I=RE(),te={__staticSelector:O||`YearLevel`,classNames:j,styles:M,unstyled:N,size:A,attributes:ee},ne=typeof b==`boolean`?b:i?!(0,$.default)(t).endOf(`year`).isBefore(i):!1,re=typeof x==`boolean`?x:r?!(0,$.default)(t).startOf(`year`).isAfter(r):!1;return(0,W.jsxs)(J,{"data-year-level":!0,size:A,...F,children:[(0,W.jsx)(TD,{label:typeof D==`function`?D(t):(0,$.default)(t).locale(n||I.locale).format(D),__preventFocus:f,__stopPropagation:k,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:ne,previousDisabled:re,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,fullWidth:P,...te}),(0,W.jsx)(xD,{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:k,withCellSpacing:d,fullWidth:P,...te})]})});AD.classes={...TD.classes,...xD.classes},AD.displayName=`@mantine/dates/YearLevel`;var jD={monthLabelFormat:`MMMM YYYY`},MD=q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:A,previousDisabled:j,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,monthLabelFormat:I,classNames:te,styles:ne,unstyled:re,__staticSelector:ie,size:L,static:R,fullWidth:ae,attributes:oe,...se}=G(`MonthLevel`,jD,e),ce=RE(),le={__staticSelector:ie||`MonthLevel`,classNames:te,styles:ne,unstyled:re,size:L,attributes:oe},ue=typeof A==`boolean`?A:l?!(0,$.default)(t).endOf(`month`).isBefore(l):!1,de=typeof j==`boolean`?j:c?!(0,$.default)(t).startOf(`month`).isAfter(c):!1;return(0,W.jsxs)(J,{"data-month-level":!0,size:L,...se,children:[(0,W.jsx)(TD,{label:typeof I==`function`?I(t):(0,$.default)(t).locale(n||ce.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:ue,previousDisabled:de,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,fullWidth:ae,...le}),(0,W.jsx)(oD,{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,__preventFocus:x,__stopPropagation:S,static:R,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:ae,...le})]})});MD.classes={...oD.classes,...TD.classes},MD.displayName=`@mantine/dates/MonthLevel`;var ND={levelsGroup:`m_30b26e33`},PD=q(e=>{let t=G(`LevelsGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,fullWidth:l,attributes:u,...d}=t;return(0,W.jsx)(J,{...K({name:c||`LevelsGroup`,classes:ND,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,rootSelector:`levelsGroup`})(`levelsGroup`),"data-full-width":l||void 0,...d})});PD.classes=ND,PD.displayName=`@mantine/dates/LevelsGroup`;var FD={numberOfColumns:1},ID=q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,headerControlsOrder:y,classNames:b,styles:x,unstyled:S,__staticSelector:C,__stopPropagation:w,numberOfColumns:T,levelControlAriaLabel:E,decadeLabelFormat:D,size:O,fullWidth:k,vars:A,attributes:j,...M}=G(`DecadeLevelGroup`,FD,e),N=(0,U.useRef)([]),P=Array(T).fill(0).map((e,A)=>{let M=(0,$.default)(t).add(A*10,`years`).format(`YYYY-MM-DD`);return(0,W.jsx)(OD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:A,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:N}),__getControlRef:(e,t,n)=>{Array.isArray(N.current[A])||(N.current[A]=[]),Array.isArray(N.current[A][e])||(N.current[A][e]=[]),N.current[A][e][t]=n},levelControlAriaLabel:typeof E==`function`?E(M):E,locale:n,minDate:r,maxDate:i,__preventFocus:u,__stopPropagation:w,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,getYearControlProps:o,__staticSelector:C||`DecadeLevelGroup`,classNames:b,styles:x,unstyled:S,withCellSpacing:l,headerControlsOrder:y,fullWidth:k,attributes:j},A)});return(0,W.jsx)(PD,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});ID.classes={...PD.classes,...OD.classes},ID.displayName=`@mantine/dates/DecadeLevelGroup`;var LD={numberOfColumns:1},RD=q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,headerControlsOrder:x,classNames:S,styles:C,unstyled:w,__staticSelector:T,__stopPropagation:E,numberOfColumns:D,levelControlAriaLabel:O,yearLabelFormat:k,size:A,fullWidth:j,vars:M,attributes:N,...P}=G(`YearLevelGroup`,LD,e),ee=(0,U.useRef)([]),F=Array(D).fill(0).map((e,M)=>{let P=(0,$.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,W.jsx)(AD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:M,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:ee}),__getControlRef:(e,t,n)=>{Array.isArray(ee.current[M])||(ee.current[M]=[]),Array.isArray(ee.current[M][e])||(ee.current[M][e]=[]),ee.current[M][e][t]=n},levelControlAriaLabel:typeof O==`function`?O(P):O,locale:n,minDate:r,maxDate:i,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,getMonthControlProps:o,classNames:S,styles:C,unstyled:w,__staticSelector:T||`YearLevelGroup`,withCellSpacing:l,headerControlsOrder:x,fullWidth:j,attributes:N},M)});return(0,W.jsx)(PD,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});RD.classes={...AD.classes,...PD.classes},RD.displayName=`@mantine/dates/YearLevelGroup`;var zD={numberOfColumns:1},BD=q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__onDayClick:m,__onDayMouseEnter:h,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,headerControlsOrder:A,classNames:j,styles:M,unstyled:N,numberOfColumns:P,levelControlAriaLabel:ee,monthLabelFormat:F,__staticSelector:I,__stopPropagation:te,size:ne,static:re,fullWidth:ie,vars:L,attributes:R,...ae}=G(`MonthLevelGroup`,zD,e),oe=(0,U.useRef)([]),se=Array(P).fill(0).map((e,L)=>{let ae=(0,$.default)(t).add(L,`months`).format(`YYYY-MM-DD`);return(0,W.jsx)(MD,{month:ae,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>NE({levelIndex:L,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:oe}),__getDayRef:(e,t,n)=>{Array.isArray(oe.current[L])||(oe.current[L]=[]),Array.isArray(oe.current[L][e])||(oe.current[L][e]=[]),oe.current[L][e][t]=n},levelControlAriaLabel:typeof ee==`function`?ee(ae):ee,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,classNames:j,styles:M,unstyled:N,__staticSelector:I||`MonthLevelGroup`,size:ne,static:re,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,headerControlsOrder:A,fullWidth:ie,attributes:R},L)});return(0,W.jsx)(PD,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:R,...ae,children:se})});BD.classes={...PD.classes,...MD.classes},BD.displayName=`@mantine/dates/MonthLevelGroup`;var VD={input:`m_6fa5e2aa`},HD=q(e=>{let{inputProps:t,wrapperProps:n,placeholder:r,classNames:i,styles:a,unstyled:o,popoverProps:s,modalProps:c,dropdownType:l,children:u,formattedValue:d,dropdownHandlers:f,dropdownOpened:p,onClick:m,clearable:h,clearSectionMode:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=yf(`PickerInputBase`,{size:`sm`},e),A=(0,W.jsx)(vf.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,W.jsxs)(W.Fragment,{children:[l===`modal`&&!x&&(0,W.jsx)(mg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,W.jsx)(vf.Wrapper,{...n,children:(0,W.jsxs)(Ql,{position:`bottom-start`,opened:p,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:D,...s,disabled:s?.disabled||l===`modal`||x,onChange:e=>{e||(s?.onClose?.(),j())},children:[(0,W.jsx)(Ql.Target,{children:(0,W.jsx)(vf,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{m?.(e),f.toggle()},__clearSection:A,__clearable:h&&b&&!x&&!S,__clearSectionMode:g,rightSection:y,...t,classNames:{...i,input:Cn(VD.input,i?.input)},...k,children:d||(0,W.jsx)(vf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,W.jsx)(Ql.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,W.jsx)(BE,{value:C,name:w,form:T,type:E,withTime:O})]})});HD.classes=VD,HD.displayName=`@mantine/dates/PickerInputBase`;var UD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,WD=(e,t)=>{let n=t?FE:PE;return Array.isArray(e)?e.map(n):n(e)};function GD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,U.useRef)(e),[o,s,c]=qt({value:WD(t,i),defaultValue:WD(n,i),finalValue:UD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?UD(e):n,s(l))),[l,s,c]}function KD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function qD(e){return e===0?`month`:e===1?`year`:`decade`}function JD(e,t,n){return qD(mt(KD(e,0),KD(t,0),KD(n,2)))}var YD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},XD=q(e=>{let t=G(`Calendar`,YD,e),{vars:n,maxLevel:r,minLevel:i,defaultLevel:a,level:o,onLevelChange:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,headerControlsOrder:b,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:S,__setDateRef:C,__setLevelRef:w,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,monthLabelFormat:P,nextIcon:ee,previousIcon:F,__onDayClick:I,__onDayMouseEnter:te,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,monthsListFormat:L,getMonthControlProps:R,yearLabelFormat:ae,yearsListFormat:oe,getYearControlProps:se,decadeLabelFormat:ce,classNames:le,styles:ue,unstyled:de,minDate:z,maxDate:fe,locale:pe,__staticSelector:me,size:he,__preventFocus:B,__stopPropagation:ge,onNextDecade:_e,onPreviousDecade:V,onNextYear:ve,onPreviousYear:ye,onNextMonth:be,onPreviousMonth:xe,static:Se,enableKeyboardNavigation:Ce,fullWidth:we,attributes:Te,ref:Ee,...De}=t,{resolvedClassNames:Oe,resolvedStyles:ke}=Vr({classNames:le,styles:ue,props:t}),[Ae,je]=qt({value:o?JD(o,i,r):void 0,defaultValue:a?JD(a,i,r):void 0,finalValue:JD(void 0,i,r),onChange:s}),[Me,Ne]=GD({type:`default`,value:PE(c),defaultValue:PE(l),onChange:u});(0,U.useImperativeHandle)(C,()=>e=>{Ne(e)}),(0,U.useImperativeHandle)(w,()=>e=>{je(e)});let Pe={__staticSelector:me||`Calendar`,styles:ke,classNames:Oe,unstyled:de,size:he,attributes:Te},Fe=f||d||1,Ie=(0,U.useRef)(null);if(Ie.current===null){let e=new Date;Ie.current=z&&(0,$.default)(e).isAfter(z)?z:(0,$.default)(e).format(`YYYY-MM-DD`)}let Le=Me||Ie.current,Re=()=>{let e=(0,$.default)(Le).add(Fe,`month`).format(`YYYY-MM-DD`);be?.(e),Ne(e)},ze=()=>{let e=(0,$.default)(Le).subtract(Fe,`month`).format(`YYYY-MM-DD`);xe?.(e),Ne(e)},Be=()=>{let e=(0,$.default)(Le).add(Fe,`year`).format(`YYYY-MM-DD`);ve?.(e),Ne(e)},Ve=()=>{let e=(0,$.default)(Le).subtract(Fe,`year`).format(`YYYY-MM-DD`);ye?.(e),Ne(e)},H=()=>{let e=(0,$.default)(Le).add(10*Fe,`year`).format(`YYYY-MM-DD`);_e?.(e),Ne(e)},He=()=>{let e=(0,$.default)(Le).subtract(10*Fe,`year`).format(`YYYY-MM-DD`);V?.(e),Ne(e)},Ue=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(!Ce||Se)return;let e=e=>{if(!Ue.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),He()):t&&(e.preventDefault(),Ve());break;case`ArrowDown`:t&&n?(e.preventDefault(),H()):t&&(e.preventDefault(),Be());break;case`y`:case`Y`:Ae===`month`&&(e.preventDefault(),je(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[Ce,Se,Ae,Be,Ve,H,He]),(0,W.jsxs)(J,{ref:Kt(Ue,Ee),size:he,"data-calendar":!0,"data-full-width":we||void 0,...De,children:[Ae===`month`&&(0,W.jsx)(BD,{month:Le,minDate:z,maxDate:fe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:Re,onPrevious:ze,hasNextLevel:r!==`month`,onLevelClick:()=>je(`year`),numberOfColumns:d,locale:pe,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:ee,previousLabel:p?.previousMonth??h,previousIcon:F,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:B,__stopPropagation:ge,static:Se,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`year`&&(0,W.jsx)(RD,{year:Le,numberOfColumns:d,minDate:z,maxDate:fe,monthsListFormat:L,getMonthControlProps:R,locale:pe,onNext:Be,onPrevious:Ve,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>je(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:ee,previousLabel:p?.previousYear??h,previousIcon:F,yearLabelFormat:ae,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Ne(t),je(JD(`month`,i,r)),_?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`decade`&&(0,W.jsx)(ID,{decade:Le,minDate:z,maxDate:fe,yearsListFormat:oe,getYearControlProps:se,locale:pe,onNext:H,onPrevious:He,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:ee,previousLabel:p?.previousDecade??h,previousIcon:F,decadeLabelFormat:ce,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Ne(t),je(JD(`year`,i,r)),g?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe})]})});XD.classes={...ID.classes,...RD.classes,...BD.classes},XD.displayName=`@mantine/dates/Calendar`;function ZD(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me,...he}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me},others:he}}function QD(e,t){let n=[...t].sort((e,t)=>(0,$.default)(e).isAfter((0,$.default)(t))?1:-1);return(0,$.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,$.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function $D({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=GD({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,U.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,U.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,$.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,$.default)(e).isAfter((0,$.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,$.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,$.default)(e).isSame(n,t))?l(c.filter(e=>!(0,$.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,$.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?QD(e,[f,u]):c[0]&&c[1]?QD(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,$.default)(e).isSame(c[0],t)?!(f&&(0,$.default)(f).isBefore(c[0])):!1,v=e=>c[1]?(0,$.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,$.default)(f).isBefore(c[0])&&(0,$.default)(e).isSame(c[0],t),y=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,$.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:v(n),"data-autofocus":!!c[0]&&(0,$.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,$.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,$.default)(c[0]).isSame(n,t)||void 0};let r=(0,$.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},b=e===`range`&&u?p:()=>{};return(0,U.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:y,_value:c,setValue:l}}var eO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},tO=xn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":ot(t)}})),nO={type:`default`},rO=q(e=>{let t=G(`YearPicker`,nO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getYearControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onYearSelect:m,__updateDateOnYearSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,...w}=t,{calendarProps:T,others:E}=ZD(w),D=(0,U.useRef)(null),O=(0,U.useRef)(null),k=K({name:l||`YearPicker`,classes:eO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:tO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=$D({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Vr({classNames:n,styles:r,props:t}),I=(0,W.jsx)(XD,{classNames:ee,styles:F,size:S,...T,...v?{}:E,minLevel:`decade`,__updateDateOnYearSelect:h??!1,__staticSelector:l||`YearPicker`,onMouseLeave:j,onYearMouseEnter:(e,t)=>M(t),onYearSelect:e=>{A(e),m?.(e)},getYearControlProps:e=>({...N(e),...u?.(e)}),__setDateRef:D,__setLevelRef:O,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return I;let te=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(D.current?.(t),O.current?.(`decade`),g?g(t):P(e))},ne=v.map((e,t)=>(0,W.jsx)(ll,{...k(`presetButton`),onClick:()=>te(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(J,{...k(`yearPickerRoot`),size:S,...E,children:[(0,W.jsx)(`div`,{...k(`presetsList`),children:ne}),I]})});rO.classes={...XD.classes,...eO},rO.varsResolver=tO,rO.displayName=`@mantine/dates/YearPicker`;var iO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},aO=xn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":ot(t)}})),oO={type:`default`},sO=q(e=>{let t=G(`MonthPicker`,oO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getMonthControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onMonthSelect:m,__updateDateOnMonthSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,onLevelChange:w,...T}=t,{calendarProps:E,others:D}=ZD(T),O=(0,U.useRef)(null),k=(0,U.useRef)(null),A=K({name:l||`MonthPicker`,classes:iO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:aO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=$D({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Vr({classNames:n,styles:r,props:t}),te=(0,W.jsx)(XD,{classNames:F,styles:I,size:S,...E,...v?{}:D,minLevel:`year`,__updateDateOnMonthSelect:h??!1,__staticSelector:l||`MonthPicker`,onMouseLeave:M,onMonthMouseEnter:(e,t)=>N(t),onMonthSelect:e=>{j(e),m?.(e)},getMonthControlProps:e=>({...P(e),...u?.(e)}),onLevelChange:w,__setDateRef:O,__setLevelRef:k,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return te;let ne=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(O.current?.(t),k.current?.(`year`),g?g(t):ee(e))},re=v.map((e,t)=>(0,W.jsx)(ll,{...A(`presetButton`),onClick:()=>ne(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(J,{...A(`monthPickerRoot`),size:S,...D,children:[(0,W.jsx)(`div`,{...A(`presetsList`),children:re}),te]})});sO.classes={...XD.classes,...iO},sO.varsResolver=aO,sO.displayName=`@mantine/dates/MonthPicker`;var cO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},lO=xn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":ot(t)}})),uO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},dO=q(e=>{let t=G(`DatePicker`,uO,e),{allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s,classNames:c,styles:l,__staticSelector:u,__onDayClick:d,__onDayMouseEnter:f,__onPresetSelect:p,__stopPropagation:m,presets:h,className:g,style:_,unstyled:v,size:y,vars:b,attributes:x,...S}=t,{calendarProps:C,others:w}=ZD(S),T=(0,U.useRef)(null),E=(0,U.useRef)(null),D=K({name:u||`DatePicker`,classes:cO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:lO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=$D({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Vr({classNames:c,styles:l,props:t}),F=(0,W.jsx)(XD,{classNames:P,styles:ee,__staticSelector:u||`DatePicker`,onMouseLeave:k,size:y,...C,...h?{}:w,__stopPropagation:m,__setDateRef:T,__setLevelRef:E,minLevel:C.minLevel||`month`,__onDayMouseEnter:(e,t)=>{A(t),f?.(e,t)},__onDayClick:(e,t)=>{O(t),d?.(e,t)},getDayProps:e=>({...j(e),...C.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof M==`string`?ZE(e,M):!1,...C.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof M==`string`?(0,$.default)(e).isSame(M,`year`):!1,...C.getYearControlProps?.(e)}),hideOutsideDates:C.hideOutsideDates??C.numberOfColumns!==1,attributes:x,...h?{}:{className:g,style:_}});if(!h)return F;let I=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(T.current?.(t),E.current?.(`month`),p?p(t):N(e))},te=h.map((e,t)=>(0,W.jsx)(ll,{...D(`presetButton`),onClick:()=>I(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":m||void 0,children:e.label},t));return(0,W.jsxs)(J,{...D(`datePickerRoot`),size:y,...w,children:[(0,W.jsx)(`div`,{...D(`presetsList`),children:te}),F]})});dO.classes=XD.classes,dO.varsResolver=lO,dO.displayName=`@mantine/dates/DatePicker`;function fO(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,$.default)(t).format(`YYYY-MM-DD`)}function pO({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,$.default)(e).isAfter(t,`date`)||n&&(0,$.default)(e).isBefore(n,`date`))}var mO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},hO=q(e=>{let{inputProps:t,wrapperProps:n,value:r,defaultValue:i,onChange:a,clearable:o,clearSectionMode:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,withTime:p,dateParser:m,minDate:h,maxDate:g,fixOnBlur:_,onFocus:v,onBlur:y,onClick:b,onKeyDown:x,readOnly:S,name:C,form:w,rightSection:T,unstyled:E,classNames:D,styles:O,allowDeselect:k,date:A,defaultDate:j,onDateChange:M,getMonthControlProps:N,getYearControlProps:P,disabled:ee,...F}=yf(`DateInput`,mO,e),I=(0,U.useRef)(null),te=(0,U.useRef)(null),[ne,re]=(0,U.useState)(!1),{calendarProps:ie,others:L}=ZD(F),R=RE(),ae=m||(e=>{let t=(0,$.default)(e,f,R.getLocale(d)).toDate();return Number.isNaN(t.getTime())?fO(e):(0,$.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),oe=k===void 0?o:k,se=e=>e?(0,$.default)(e).locale(R.getLocale(d)).format(f):``,[ce,le,ue]=GD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[de,z]=GD({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,U.useEffect)(()=>{ue&&r!==null&&z(r)},[ue,r]);let[fe,pe]=(0,U.useState)(se(ce));(0,U.useEffect)(()=>{pe(se(ce))},[R.getLocale(d)]);let me=e=>{let t=e.currentTarget.value;if(pe(t),re(!0),t.trim()===``&&(k||o))le(null);else{let e=ae(t);e&&pO({date:e,minDate:h,maxDate:g})&&(le(e),z(e))}},he=e=>{y?.(e),re(!1),_&&pe(se(ce))},B=e=>{v?.(e),re(!0)},ge=e=>{b?.(e),re(!0)},_e=e=>{e.key===`Escape`&&re(!1),x?.(e)},V=e=>({...u?.(e),selected:(0,$.default)(ce).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=oe&&(0,$.default)(ce).isSame(e,`day`)?null:e;le(n),!ue&&n&&pe(se(n)),re(!1)}}),ve=(0,W.jsx)(vf.ClearButton,{onClick:()=>{le(null),!ue&&pe(``),re(!1)},unstyled:E,...c}),ye=o&&!!ce&&!S&&!ee;return wt(()=>{ce!==void 0&&!ne&&pe(se(ce))},[ce]),bt(()=>re(!1),void 0,[I.current,te.current]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(vf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,W.jsxs)(Ql,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,W.jsx)(Ql.Target,{children:(0,W.jsx)(vf,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:fe,onChange:me,onBlur:he,onFocus:B,onClick:ge,onKeyDown:_e,readOnly:S,rightSection:T,__clearSection:ve,__clearable:ye,__clearSectionMode:s,...t,...L,disabled:ee,__staticSelector:`DateInput`})}),(0,W.jsx)(Ql.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,W.jsx)(XD,{__staticSelector:`DateInput`,...ie,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:V,size:t.size,date:de,onDateChange:z,getMonthControlProps:e=>({selected:typeof ce==`string`?ZE(e,ce):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof ce==`string`?(0,$.default)(e).isSame(ce,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,W.jsx)(BE,{name:C,form:w,value:ce,type:`default`,withTime:p})]})});hO.classes={...vf.classes,...XD.classes},hO.displayName=`@mantine/dates/DateInput`;function gO({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=RE(),[d,f]=tn(!1),[p,m]=GD({type:e,value:t,defaultValue:n,onChange:r}),h=OE({type:e,date:p,locale:u.getLocale(i),format:a,labelSeparator:u.getLabelSeparator(c),formatter:l}),g=t=>{o&&(e===`default`&&f.close(),e===`range`&&t[0]&&t[1]&&f.close()),m(s&&e===`multiple`?[...t].sort((e,t)=>(0,$.default)(e).isAfter((0,$.default)(t))?1:-1):t)};return{_value:p,setValue:g,onClear:()=>g(e===`range`?[null,null]:e===`multiple`?[]:null),shouldClear:e===`range`?!!p[0]:e===`multiple`?p.length>0:p!==null,formattedValue:h,dropdownOpened:d,dropdownHandlers:f}}var _O={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},vO=q(e=>{let t=G(`YearPickerInput`,_O,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Vr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,type:n,__staticSelector:`YearPickerInput`,attributes:S,children:(0,W.jsx)(rO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`YearPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});vO.classes={...HD.classes,...rO.classes},vO.displayName=`@mantine/dates/YearPickerInput`;var yO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},bO=q(e=>{let t=G(`MonthPickerInput`,yO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Vr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,attributes:S,type:n,__staticSelector:`MonthPickerInput`,children:(0,W.jsx)(sO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`MonthPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});bO.classes={...HD.classes,...sO.classes},bO.displayName=`@mantine/dates/MonthPickerInput`;var xO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},SO=q(e=>{let t=G(`DatePickerInput`,xO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,defaultDate:b,valueFormatter:x,presets:S,attributes:C,...w}=t,{resolvedClassNames:T,resolvedStyles:E}=Vr({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=ZD(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:x}),F=Array.isArray(k)?k[0]||b:k||b;return(0,W.jsx)(HD,{formattedValue:j,dropdownOpened:N,dropdownHandlers:M,classNames:T,styles:E,unstyled:d,onClear:P,shouldClear:ee,value:k,size:p,variant:m,dropdownType:h,...O,type:n,__staticSelector:`DatePickerInput`,attributes:C,children:(0,W.jsx)(dO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||IE({maxDate:v,minDate:_}),onChange:A,locale:c,classNames:T,styles:E,unstyled:d,__staticSelector:`DatePickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:S,attributes:C})})});SO.classes={...HD.classes,...dO.classes},SO.displayName=`@mantine/dates/DatePickerInput`;var CO=`DD/MM/YYYY`,wO=hO.extend({defaultProps:{placeholder:CO,valueFormat:CO}});function TO({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M18 9.00005L12 15L6 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var EO=Bf.extend({classNames:{item:`_item_wy8vo_1`,control:`_control_wy8vo_10`,chevron:`_chevron_wy8vo_20`,label:`_label_wy8vo_21`,content:`_content_wy8vo_43`},defaultProps:{chevron:(0,W.jsx)(TO,{}),variant:`separated`}}),DO=mu.extend({classNames:{root:`_root_gjf6s_1`},defaultProps:{size:`md`,variant:`primary`}}),OO=Uf.extend({classNames:{root:`_root_nrydo_1`,icon:`_icon_nrydo_10`,title:`_title_nrydo_38`,message:`_message_nrydo_42`},styles:{root:{overflow:`initial`},message:{overflow:`initial`}}}),kO=Zf.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),AO=_m.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),jO=bm.extend({classNames:{root:`_root_4i7r9_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),MO=km.extend({classNames:{root:`_root_1llpb_1`,section:`_section_1llpb_204`},defaultProps:{size:`md`,variant:`primary`}}),[NO,PO]=Ke(`Carousel component was not found in tree`),FO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},IO=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=G(`CarouselSlide`,null,e),c=PO();return(0,W.jsx)(J,{mod:[{orientation:c.orientation},o],role:`group`,"aria-roledescription":`slide`,"aria-label":`Carousel slide`,...c.getStyles(`slide`,{className:n,style:r,classNames:t,styles:i}),...s})});IO.classes=FO,IO.displayName=`@mantine/carousel/CarouselSlide`;function LO({slideGap:e,slideSize:t,selector:n}){let r=Sr(),i=Ue({"--carousel-slide-gap":it(ft(e)),"--carousel-slide-size":H(ft(t))}),a=Pe(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=it(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=it(t[r])),n),{});return(0,W.jsx)(ii,{styles:i,media:dt(Pe(a),r.breakpoints).filter(e=>Pe(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function RO(e){return typeof e==`object`&&e?Pe(e):[]}function zO(e){return e.sort((e,t)=>ze(e)-ze(t))}function BO({slideGap:e,slideSize:t}){return zO(Array.from(new Set([...RO(e),...RO(t)])))}function VO({slideGap:e,slideSize:t,selector:n}){let r=Ue({"--carousel-slide-gap":it(ft(e)),"--carousel-slide-size":H(ft(t))}),i=BO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=it(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=it(t[r])),n),{});return(0,W.jsx)(ii,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function HO({dir:e,orientation:t,direction:n}){return n===`previous`?t===`horizontal`?90*(e===`ltr`?1:-1):-180:t===`horizontal`?90*(e===`ltr`?-1:1):0}function UO(e){return Object.prototype.toString.call(e)===`[object Object]`}function WO(e){return UO(e)||Array.isArray(e)}function GO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function KO(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!WO(r)||!WO(i)?r===i:KO(r,i)})}function qO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function JO(e,t){if(e.length!==t.length)return!1;let n=qO(e),r=qO(t);return n.every((e,t)=>{let n=r[t];return KO(e,n)})}function YO(e){return typeof e==`number`}function XO(e){return typeof e==`string`}function ZO(e){return typeof e==`boolean`}function QO(e){return Object.prototype.toString.call(e)===`[object Object]`}function $O(e){return Math.abs(e)}function ek(e){return Math.sign(e)}function tk(e,t){return $O(e-t)}function nk(e,t){return e===0||t===0||$O(e)<=$O(t)?0:$O(tk($O(e),$O(t))/e)}function rk(e){return Math.round(e*100)/100}function ik(e){return lk(e).map(Number)}function ak(e){return e[ok(e)]}function ok(e){return Math.max(0,e.length-1)}function sk(e,t){return t===ok(e)}function ck(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function lk(e){return Object.keys(e)}function uk(e,t){return[e,t].reduce((e,t)=>(lk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=QO(r)&&QO(i)?uk(r,i):i}),e),{})}function dk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function fk(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return XO(e)?n[e](r):e(t,r,i)}return{measure:o}}function pk(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function mk(e,t,n,r){let i=pk(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function hk(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function gk(e=0,t=0){let n=$O(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function _k(e,t,n){let{constrain:r}=gk(0,e),i=e+1,a=o(t);function o(e){return n?$O((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return _k(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function vk(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=pk(),w=pk(),T=gk(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,ee=!1;function F(e){if(!v)return;function n(t){(ZO(v)||v(e,t))&&L(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,ae).add(r,`contextmenu`,ae).add(r,`click`,oe,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,R,S).add(e,`touchend`,ae).add(e,`mousemove`,R,S).add(e,`mouseup`,ae)}function ne(e){let t=e.nodeName||``;return x.includes(t)}function re(){return(m?D:E)[ee?`mouse`:`touch`]}function ie(e,t){let n=d.add(ek(e)*-1),r=u.byDistance(e,!m).distance;return m||$O(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=dk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=tk(i.get(),o.get())>=2,!(t&&e.button!==0)&&(ne(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),te(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function R(e){if(!dk(e,r)&&e.touches.length>=2)return ae(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=tk(t,A),c=tk(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return ae(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function ae(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*re(),r=ie(b(n),t),i=nk(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),ee=!1,f.emit(`pointerUp`)}function oe(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function se(){return M}return{init:F,destroy:I,pointerDown:se}}function yk(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(dk(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&$O(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function bk(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function xk(e){function t(t){return t/100*e}return{measure:t}}function Sk(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if($O(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(ZO(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function Ck(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=ek(a),d=u,x}function p(){return $O(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function wk(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=gk(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=$O(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&$O(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Tk(e,t,n,r,i){let a=gk(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return tk(e,t)<=1}function u(){let e=o[0],t=ak(o);return gk(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=sk(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Ek(e,t,n){let r=t[0];return{limit:gk(n?r-e:ak(t),r)}}function Dk(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=gk(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function Ok(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function kk(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>ak(e)[o]-e[0][a]).map($O)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-$O(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Ak(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=sk(n,t);return r?ck(ak(n[0])+1):i?ck(ok(a)-ak(n)[0]+1,ak(n)[0]):e})}return{slideRegistry:l}}function jk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>$O(e)-$O(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>$O(e.diff)-$O(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>ek(e)===r);return a.length?c(a):ak(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Mk(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function Nk(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));YO(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(ZO(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Pk(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return YO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Fk(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=rk(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Ik(e,t,n,r,i,a,o,s,c){let l=.5,u=ik(i),d=ik(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Pk(-1),translate:Fk(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function Lk(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(ZO(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Rk(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return lk(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function zk(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return $O(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(ak(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=sk(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map($O)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Bk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=YO(n);function p(e,t){return ik(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ik(e).reduce((n,f,p)=>{let m=ak(n)||0,h=m===0,g=f===ok(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=$O(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function Vk(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=bk(),w=C.measure(t),T=n.map(C.measure),E=hk(c,l),D=E.measureSize(w),O=xk(D),k=fk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=zk(E,w,T,n,d||!!v,i),ee=Bk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=kk(E,k,w,T,ee),te=-ak(F)+ak(M),{snapsContained:ne,scrollContainLimit:re}=Tk(D,te,I,v,2),ie=A?ne:I,{limit:L}=Ek(te,ie,d),R=_k(ok(ie),u,d),ae=R.clone(),oe=ik(n),se=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},ce=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},le=mk(r,i,()=>se(xe),e=>ce(xe,e)),ue=.68,de=ie[R.get()],z=Pk(de),fe=Pk(de),pe=Pk(de),me=Pk(de),he=Ck(z,pe,fe,me,f,ue),B=jk(d,ie,te,L,me),ge=Mk(le,R,ae,he,B,me,o),_e=Ok(L),V=pk(),ve=Rk(t,n,o,h),{slideRegistry:ye}=Ak(A,v,ie,re,ee,oe),be=Nk(e,n,ye,ge,he,V,o,S),xe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:le,axis:E,dragHandler:vk(E,e,r,i,me,yk(E,i),z,le,ge,he,B,R,o,O,p,m,_,ue,x),eventStore:V,percentOfView:O,index:R,indexPrevious:ae,limit:L,location:z,offsetLocation:pe,previousLocation:fe,options:a,resizeHandler:Sk(t,o,i,n,E,y,C),scrollBody:he,scrollBounds:wk(L,pe,me,he,O),scrollLooper:Dk(te,L,pe,[z,pe,fe,me]),scrollProgress:_e,scrollSnapList:ie.map(_e.get),scrollSnaps:ie,scrollTarget:B,scrollTo:ge,slideLooper:Ik(E,D,te,j,M,F,ie,pe,n),slideFocus:be,slidesHandler:Lk(t,o,b),slidesInView:ve,slideIndexes:oe,slideRegistry:ye,slidesToScroll:ee,target:me,translate:Fk(E,t)};return xe}function Hk(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var Uk={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Wk(e){function t(e,t){return uk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,lk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>lk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Gk(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function Kk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Wk(i),o=Gk(a),s=pk(),c=Hk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Uk,Kk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(XO(t)?e.querySelector(t):t)||e.children[0];let r=XO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Vk(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(se),_.eventHandler.init(se),_.resizeHandler.init(se),_.slidesHandler.init(se),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(se),x=o.init(se,b)))}function D(e,t){let n=I();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==I()}function P(){return _.index.add(-1).get()!==I()}function ee(){return _.scrollSnapList}function F(){return _.scrollProgress.get(_.offsetLocation.get())}function I(){return _.index.get()}function te(){return _.indexPrevious.get()}function ne(){return _.slidesInView.get()}function re(){return _.slidesInView.get(!1)}function ie(){return x}function L(){return _}function R(){return e}function ae(){return S}function oe(){return C}let se={canScrollNext:N,canScrollPrev:P,containerNode:ae,internalEngine:L,destroy:k,off:p,on:f,emit:m,plugins:ie,previousScrollSnap:te,reInit:h,rootNode:R,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:oe,slidesInView:ne,slidesNotInView:re};return E(t,n),setTimeout(()=>c.emit(`init`),0),se}Kk.globalOptions=void 0;function qk(e={},t=[]){let n=(0,U.useRef)(e),r=(0,U.useRef)(t),[i,a]=(0,U.useState)(),[o,s]=(0,U.useState)(),c=(0,U.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,U.useEffect)(()=>{KO(n.current,e)||(n.current=e,c())},[e,c]),(0,U.useEffect)(()=>{JO(r.current,t)||(r.current=t,c())},[t,c]),(0,U.useEffect)(()=>{if(GO()&&o){Kk.globalOptions=qk.globalOptions;let e=Kk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}qk.globalOptions=void 0;var Jk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Yk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Xk=xn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":H(t),"--carousel-control-size":H(n),"--carousel-controls-offset":it(r)}})),Zk=q(e=>{let t=G(`Carousel`,Jk,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,getEmblaApi:l,onNextSlide:u,onPreviousSlide:d,onSlideChange:f,nextControlProps:p,previousControlProps:m,controlSize:h,controlsOffset:g,slideSize:_,slideGap:v,orientation:y,height:b,includeGapInSize:x,draggable:S,initialSlide:C,withControls:w,withIndicators:T,plugins:E,nextControlIcon:D,previousControlIcon:O,withKeyboardEvents:k,mod:A,type:j,emblaOptions:M,attributes:N,getIndicatorProps:P,id:ee,...F}=t,I=K({name:`Carousel`,classes:FO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Xk}),te=It(ee),ne=Ai(),{dir:re}=Wi(),[ie,L]=qk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Yk,...M},E),[R,ae]=(0,U.useState)(0),[oe,se]=(0,U.useState)(0),ce=(0,U.useCallback)(e=>L&&L.scrollTo(e),[L]),le=(0,U.useCallback)(()=>{if(!L)return;let e=L.selectedScrollSnap();ae(e),e!==R&&f?.(e)},[L,ae,f,R]),ue=(0,U.useCallback)(()=>{L?.scrollPrev(),d?.()},[L]),de=(0,U.useCallback)(()=>{L?.scrollNext(),u?.()},[L]),z=(0,U.useCallback)(e=>{k&&(e.key===`ArrowRight`&&(e.preventDefault(),de()),e.key===`ArrowLeft`&&(e.preventDefault(),ue()),e.key===`Home`&&(e.preventDefault(),L?.scrollTo(0)),e.key===`End`&&(e.preventDefault(),L?.scrollTo(L.scrollSnapList().length-1)))},[L,de,ue]);(0,U.useEffect)(()=>{if(L)return l?.(L),le(),se(L.scrollSnapList().length),L.on(`select`,le),()=>{L.off(`select`,le)}},[L,M?.slidesToScroll,le]),(0,U.useEffect)(()=>{L&&(L.reInit(),se(L.scrollSnapList().length),ae(e=>mt(e,0,U.Children.toArray(c).length-1)))},[U.Children.toArray(c).length,M?.slidesToScroll]);let fe=L?.canScrollPrev()||!1,pe=L?.canScrollNext()||!1,me=(0,U.useCallback)((e,t)=>{let n=y===`horizontal`,r=n?`ArrowRight`:`ArrowDown`,i=n?`ArrowLeft`:`ArrowUp`;if(e.key===r){e.preventDefault();let n=t<oe-1?t+1:0;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}if(e.key===i){e.preventDefault();let n=t>0?t-1:oe-1;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}e.key===`Home`&&(e.preventDefault(),ce(0),(e.currentTarget.parentElement?.children[0])?.focus()),e.key===`End`&&(e.preventDefault(),ce(oe-1),(e.currentTarget.parentElement?.children[oe-1])?.focus())},[y,oe,ce]),he=Array(oe).fill(0).map((e,t)=>(0,U.createElement)(ll,{...I(`indicator`),key:t,role:`tab`,"aria-label":`Go to slide ${t+1}`,"aria-selected":t===R,tabIndex:t===R?0:-1,"data-active":t===R||void 0,onClick:()=>ce(t),onKeyDown:e=>me(e,t),"data-orientation":y,onMouseDown:e=>e.preventDefault(),...P?.(t)}));return(0,W.jsxs)(NO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,W.jsx)(VO,{...t,selector:`.${ne}`}):(0,W.jsx)(LO,{...t,selector:`.${ne}`}),(0,W.jsxs)(J,{role:`region`,"aria-roledescription":`carousel`,...I(`root`,{className:ne}),...F,id:te,mod:[{orientation:y,"include-gap-in-size":x},A],onKeyDownCapture:z,children:[(0,W.jsx)(dl,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:oe>0&&`Slide ${R+1} of ${oe}`}),w&&(0,W.jsxs)(`div`,{...I(`controls`),"data-orientation":y,children:[(0,W.jsx)(ll,{"aria-controls":te,"aria-label":`Previous slide`,"aria-disabled":!fe,"data-inactive":!fe||void 0,"data-type":`previous`,tabIndex:fe?0:-1,...m,...I(`control`,{className:m?.className,style:m?.style}),onClick:e=>{ue(),m?.onClick?.(e)},children:O===void 0?(0,W.jsx)(Mf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,W.jsx)(ll,{"aria-controls":te,"aria-label":`Next slide`,"aria-disabled":!pe,"data-inactive":!pe||void 0,"data-type":`next`,tabIndex:pe?0:-1,...I(`control`,{className:p?.className,style:p?.style}),...p,onClick:e=>{de(),p?.onClick?.(e)},children:D===void 0?(0,W.jsx)(Mf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`next`})}deg)`}}):D})]}),(0,W.jsx)(`div`,{...I(`viewport`),ref:ie,"data-type":j,children:(0,W.jsx)(`div`,{...I(`container`,{className:ne}),"data-orientation":y,children:c})}),T&&(0,W.jsx)(`div`,{...I(`indicators`),role:`tablist`,"aria-label":`Slides`,"data-orientation":y,children:he})]})]})});Zk.classes=FO,Zk.varsResolver=Xk,Zk.displayName=`@mantine/carousel/Carousel`,Zk.Slide=IO;function Qk({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function $k({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M9.00005 6L15 12L9 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var eA={"space-0":`0`,"space-025":`1px`,"space-050":`2px`,"space-100":`4px`,"space-150":`6px`,"space-200":`8px`,"space-300":`12px`,"space-400":`16px`,"space-500":`20px`,"space-600":`24px`,"space-700":`32px`,"space-800":`40px`,"space-900":`48px`},tA=Zk.extend({classNames:{root:`_root_nuq5f_1`,control:`_control_nuq5f_1`,indicators:`_indicators_nuq5f_10`,indicator:`_indicator_nuq5f_10`,slide:`_slide_nuq5f_26`,controls:`_controls_nuq5f_34`},defaultProps:{controlSize:32,nextControlIcon:(0,W.jsx)($k,{height:16,width:16}),previousControlIcon:(0,W.jsx)(Qk,{height:16,width:16}),slideGap:H(eA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),nA={root:`_root_sbem5_1`,input:`_input_sbem5_8`,label:`_label_sbem5_26`,icon:`_icon_sbem5_47`,inner:`_inner_sbem5_54`,error:`_error_sbem5_58`};function rA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function iA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M2.5 4L7.5 4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var aA=$p.extend({classNames:nA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,W.jsx)(iA,{...t}):(0,W.jsx)(rA,{...t})}}),oA=Rm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),sA={XS:352,SM:584,MD:800,LG:1160,XL:1160},cA=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:H(n)}),{}),lA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},uA=Hm.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:Cn({[lA.fluidContainer]:n,[lA.miniContainer]:t===`mini`,[lA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in cA?cA[t]:H(t)}})}),dA={placeholder:CO,getYearControlProps:e=>({mod:{...(0,$.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,$.default)().isSame(e,`month`)&&{"current-month":!0}}})},fA={day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},pA=dO.extend({classNames:fA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,$.default)(e),n=(0,$.default)().isSame(t,`day`);return(0,W.jsx)(Jf,{span:!0,className:Cn({[fA.dayToday]:n}),children:t.format(`D`)})},...dA}}),mA=SO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA,valueFormat:CO}}),hA=Km.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),gA={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},_A=fh.extend({classNames:{root:`_root_dlog2_1`,title:`_title_dlog2_9`,content:`_content_dlog2_17`,header:`_header_dlog2_30`,body:`_body_dlog2_38`,close:`_close_dlog2_48`},defaultProps:{size:`md`,position:`right`,overlayProps:{backgroundOpacity:gA.xl,blur:6}}}),vA=Eh.extend({defaultProps:{columnGap:24,rowGap:16}}),yA=wu.extend({defaultProps:{gap:0,align:`flex-start`}}),bA={wrapper:`_wrapper_194dy_1`,input:`_input_194dy_9`,section:`_section_194dy_42`},xA={placeholder:`_placeholder_1o876_1`},SA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},CA=vf.extend({classNames:bA}),wA=vf.Wrapper.extend({classNames:SA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),TA=vf.Placeholder.extend({classNames:xA}),EA=ou.extend({defaultProps:{size:`xs`}}),DA=Qh.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),OA=mg.extend({classNames:{root:`_root_p18vd_1`,header:`_header_p18vd_9`,title:`_title_p18vd_13`,content:`_content_p18vd_20`,body:`_body_p18vd_30`,close:`_close_p18vd_36`},defaultProps:{size:`md`,yOffset:`5vh`,transitionProps:{duration:300,transition:`fade-down`},closeButtonProps:{size:24},overlayProps:{backgroundOpacity:gA.xl,blur:6},scrollAreaComponent:al.Autosize}}),kA=sO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),AA=bO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),jA=Mg.extend({classNames:{input:`_input_z7ary_1`,section:`_section_z7ary_6`,inputField:`_inputField_z7ary_28`,dropdown:`_dropdown_z7ary_41`,option:`_option_z7ary_47`,pillsList:`_pillsList_z7ary_60`,pill:`_pill_z7ary_60`},defaultProps:{renderOption:({checked:e,option:t})=>(0,W.jsxs)(wu,{gap:8,children:[(0,W.jsx)($p,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,W.jsx)(Jf,{span:!0,children:t.label})]}),searchable:!0}}),MA=Fg.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),NA=zg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),PA=X_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),FA=yv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:$k,previousIcon:Qk,size:`lg`}}),IA=ml.extend({defaultProps:{shadow:`none`}});function LA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 8C22 8 18 14 12 14C6 14 2 8 2 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,W.jsx)(`path`,{d:`M15 13.5L16.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M20 11L22 13`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2 13L4 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M9 13.5L7.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function RA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M21.544 11.045C21.848 11.4713 22 11.6845 22 12C22 12.3155 21.848 12.5287 21.544 12.955C20.1779 14.8706 16.6892 19 12 19C7.31078 19 3.8221 14.8706 2.45604 12.955C2.15201 12.5287 2 12.3155 2 12C2 11.6845 2.15201 11.4713 2.45604 11.045C3.8221 9.12944 7.31078 5 12 5C16.6892 5 20.1779 9.12944 21.544 11.045Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}var zA=wv.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,W.jsx)(LA,{}):(0,W.jsx)(RA,{})}}),BA=Sg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),VA=Ql.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),HA=Nv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),UA=Yv.extend({classNames:{root:`_root_c4gsg_1`,radio:`_radio_c4gsg_9`,label:`_label_c4gsg_22`,icon:`_icon_c4gsg_40`,error:`_error_c4gsg_58`,inner:`_inner_c4gsg_62`}}),WA=Yv.Card.extend({classNames:{card:`_card_11cie_1`}}),GA=Yv.Indicator.extend({classNames:{indicator:`_indicator_14pfe_1`,icon:`_icon_14pfe_17`}}),KA=xy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function qA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var JA=({checked:e,option:t})=>(0,W.jsxs)(wu,{gap:8,children:[e&&(0,W.jsx)(qA,{width:16,height:16}),(0,W.jsx)(Jf,{span:!0,children:t.label})]}),YA=Cy.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:JA}}),XA=zy.extend({defaultProps:{gap:0}}),ZA=Yy.extend({classNames:{root:`_root_bk7hc_1`,stepIcon:`_stepIcon_bk7hc_6`,separator:`_separator_bk7hc_22`,step:`_step_bk7hc_6`,stepLabel:`_stepLabel_bk7hc_29`},defaultProps:{allowNextStepsSelect:!1,iconSize:30}}),QA=nb.extend({classNames:{root:`_root_1xr8m_1`,track:`_track_1xr8m_6`,input:`_input_1xr8m_10`,thumb:`_thumb_1xr8m_22`,label:`_label_1xr8m_29`},defaultProps:{withThumbIndicator:!1}}),$A=xb.extend({classNames:{table:`_table_1nke6_1`,thead:`_thead_1nke6_8`,th:`_th_1nke6_8`,tbody:`_tbody_1nke6_41`,td:`_td_1nke6_44`},defaultProps:{withTableBorder:!0}}),ej=jb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),tj=Ib.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),nj=Jf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),rj=Fh.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),ij=qb.extend({classNames:{root:`_root_6pd11_1`}}),aj=ly.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),oj=rO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),sj=vO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),cj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],lj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],uj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],dj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],fj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],pj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],mj={xs:H(10),sm:H(12),md:H(14),lg:H(16),xl:H(20)},hj={xs:H(12),sm:H(16),md:H(20),lg:H(24),xl:H(28)},gj={fontWeight:`500`,sizes:{h1:{fontSize:H(32),lineHeight:H(36)},h2:{fontSize:H(24),lineHeight:H(28)},h3:{fontSize:H(20),lineHeight:H(24)},h4:{fontSize:H(18),lineHeight:H(20)},h5:{fontSize:H(12),lineHeight:H(16)},h6:{fontSize:H(12),lineHeight:H(16)}}},_j=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:He(n)}),{});function vj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(vj(a)&&vj(i)?n[r]=yj(a,i):n[r]=i)}return n}var bj={"brand-dark-blue":cj,"brand-orange":lj,danger:fj,success:pj,info:uj,blue:uj,orange:dj,red:fj,green:pj},xj={Accordion:EO,ActionIcon:DO,Alert:OO,Anchor:kO,Avatar:AO,Badge:jO,Button:MO,Carousel:tA,Checkbox:aA,ColorSwatch:oA,Container:uA,DateInput:wO,DatePicker:pA,DatePickerInput:mA,Divider:hA,Drawer:_A,Grid:vA,Group:yA,Input:CA,InputPlaceholder:TA,InputWrapper:wA,Loader:EA,Menu:DA,Modal:OA,MonthPicker:kA,MonthPickerInput:AA,MultiSelect:jA,NavLink:MA,Notification:NA,NumberInput:PA,Paper:IA,Pagination:FA,PasswordInput:zA,Pill:BA,Popover:VA,Progress:HA,Radio:UA,RadioCard:WA,RadioIndicator:GA,SegmentedControl:KA,Select:YA,Stack:XA,Stepper:ZA,Switch:QA,Table:$A,Tabs:ej,TagsInput:tj,Text:nj,Textarea:rj,Title:ij,Tooltip:aj,YearPicker:oj,YearPickerInput:sj};function Sj(e={}){let t={...mj,...e.fontSizes},n={...hj,...e.lineHeights},r=yj(gj,e.headings??{}),i={..._j,...e.breakpoints},a={...bj,...e.colors};return zr({components:xj,cursorType:e.cursorType??`pointer`,defaultRadius:`sm`,primaryColor:e.primaryColor??`brand-dark-blue`,primaryShade:e.primaryShade??6,breakpoints:i,fontFamily:e.fontFamily??`Geist`,fontSizes:t,fontWeights:{medium:`500`},lineHeights:n,headings:r,black:e.black??`#000000`,white:e.white??`#FFFFFF`,colors:a})}Sj();var Cj={"border-025":`1px`,"border-050":`2px`},wj={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Tj={"primary-lighter":`#FFF7F0`,"primary-light":`#FFA34D`,"primary-default":`#FF7A00`,"primary-dark":`#A85100`,"primary-darker":`#7A3B00`},Ej={"secondary-lighter":`#F8F8FB`,"secondary-light":`#EFEFF6`,"secondary-default":`#414275`,"secondary-dark":`#35355F`,"secondary-darker":`#18182B`},Dj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},Oj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},kj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},Aj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},jj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Mj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Nj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Pj={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Fj={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Ij={"radius-0":`0`,"radius-050":`2px`,"radius-100":`4px`,"radius-150":`6px`,"radius-200":`8px`,"radius-300":`12px`,"radius-400":`16px`,"radius-500":`20px`,"radius-600":`24px`,"radius-full":`50%`},Lj={"shadow-xs":`0 1px 2px 0 rgba(0, 0, 0, 0.16)`,"shadow-above-sm":`0 3px 0 0 rgba(0, 0, 0, 0.04)`,"shadow-below-sm":`0 -2px 2px 0 rgba(65, 66, 117, 0.12)`},Rj={...wj,...Tj,...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj},zj=gA;function Bj(e={}){let{tokens:t={},theme:n={}}=e;return Br(Sj(n),zr({other:{border:{...Cj,...t.border},color:{...Rj,...t.color},iconSize:{...Fj,...t.iconSize},opacity:{...zj,...t.opacity},radius:{...Ij,...t.radius},space:{...eA,...t.space},shadow:{...Lj,...t.shadow}}}))}Bj();function Vj(){return Sr()}var Hj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Uj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Wj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},Gj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},Kj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},qj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Jj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Yj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Xj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},Zj={...Wj,...Gj,...Kj,...qj,...Jj,...Yj,...Xj},Qj={"icon-xs":Fj[`icon-xs`],"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},$j={"radius-150":Ij[`radius-150`],"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},eM={"space-150":eA[`space-150`],"space-200":eA[`space-200`],"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`]},tM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(12),md:H(14),lg:H(16)}},brand:{darkBlue:Hj,orange:Uj},tokens:{color:Zj,radius:$j,space:eM,iconSize:Qj}},nM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],rM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],iM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},aM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},oM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},sM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},cM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},lM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},uM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},dM={...iM,...aM,...oM,...sM,...cM,...lM,...uM},fM={"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},pM={"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},mM={"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`],"space-700":eA[`space-700`],"space-800":eA[`space-800`],"space-900":eA[`space-900`]},hM={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(13),md:H(15),lg:H(17)}},brand:{darkBlue:nM,orange:rM},tokens:{color:dM,radius:pM,space:mM,iconSize:fM}},gM={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`brand-orange`},brand:{darkBlue:cj,orange:lj},tokens:{color:{...wj,...Tj,...Ej,...jj,...Mj,...Nj,...Pj},radius:Ij,space:eA,iconSize:Fj,border:Cj,shadow:Lj,opacity:gA}},ocean:hM,forest:tM},_M=[`foundations`,`ocean`,`forest`],vM=`foundations`;function yM(e){let{theme:t,brand:n,tokens:r}=e;return{label:e.label,options:{theme:{...t,colors:{...t.colors??{},"brand-dark-blue":n.darkBlue,"brand-orange":n.orange}},tokens:{radius:r.radius,space:r.space,iconSize:r.iconSize,border:r.border,shadow:r.shadow,opacity:r.opacity,color:r.color}}}}var bM={foundations:yM(gM.foundations),ocean:yM(gM.ocean),forest:yM(gM.forest)};function xM(e){return typeof e==`string`&&_M.includes(e)}function SM(e){return bM[xM(e)?e:vM]}function CM({themeName:e}={}){return Bj(SM(e).options)}var wM=(0,U.createContext)(null),TM=e=>{let t=(0,U.useContext)(wM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function EM(){return TM()}var DM=({i18n:e,defaultComponent:t,children:n})=>{let r=(0,U.useRef)(e.locale),i=(0,U.useCallback)(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[a,o]=(0,U.useState)(i());return(0,U.useEffect)(()=>{let t=()=>{r.current=e.locale,o(i())},n=e.on(`change`,t);return r.current!==e.locale&&t(),n},[e,i]),r.current?(0,W.jsx)(wM.Provider,{value:a,children:n}):(process.env.NODE_ENV===`development`&&console.log("I18nProvider rendered `null`. A call to `i18n.activate` needs to happen in order for translations to be activated and for the I18nProvider to render.This is not an error but an informational message logged only in development."),null)},OM=(0,U.createContext)(null),kM=(0,U.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function AM({runtime:e,children:t}){return(0,W.jsx)(kM.Provider,{value:e,children:t})}function jM({config:e,children:t}){return(0,W.jsx)(OM.Provider,{value:e,children:t})}var MM=(0,U.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),NM=({children:e,config:t})=>(0,W.jsx)(MM.Provider,{value:t,children:e});function PM(e){return e.replace(/(-?\d*\.?\d+)rem/g,(e,t)=>`${Number.parseFloat(t)*16}px`)}function FM({children:e,appConfig:t,config:n,runtime:r,theme:i,rootElement:a}){let o=typeof document>`u`?void 0:document.documentElement,s=!!a?.shadowRoot,c=s?`:host`:`:root`,l=s?a??void 0:o;return(0,U.useEffect)(()=>{if(!a)return;let e=a.style,t=i,n=t.other??{},r=t.colors??{},o=t.fontSizes??{},s=t.lineHeights??{};t.fontFamily&&e.setProperty(`--mantine-font-family`,String(t.fontFamily)),Object.entries(o).forEach(([t,n])=>{e.setProperty(`--mantine-font-size-${t}`,PM(String(n)))}),Object.entries(s).forEach(([t,n])=>{e.setProperty(`--mantine-line-height-${t}`,PM(String(n)))}),Object.entries(n).forEach(([t,n])=>{Object.entries(n).forEach(([n,r])=>{e.setProperty(`--mantine-custom-${t}-${n}`,String(r))})}),Object.entries(r).forEach(([t,n])=>{n.forEach((n,r)=>{e.setProperty(`--mantine-color-${t}-${r}`,n)})})},[a,i]),(0,W.jsx)(DM,{i18n:Ne,children:(0,W.jsx)(Lr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,W.jsx)(Qx,{client:yE,children:(0,W.jsx)(NM,{config:t,children:(0,W.jsx)(jM,{config:n,children:(0,W.jsx)(AM,{runtime:r,children:e})})})})})})}function IM(){let e=(0,U.useRef)(null);return{startInteraction:(0,U.useCallback)(t=>{let{cursor:n,onMove:r,onEnd:i}=t;document.body.style.cursor=n,document.body.style.userSelect=`none`;let a=()=>{document.body.style.cursor=``,document.body.style.userSelect=``,document.removeEventListener(`pointermove`,r),document.removeEventListener(`pointerup`,a),i?.(),e.current=null};document.addEventListener(`pointermove`,r),document.addEventListener(`pointerup`,a),e.current=a},[]),cleanup:(0,U.useCallback)(()=>{e.current?.()},[])}}var LM=4;function RM(e={}){let{skipSelector:t=`button, [role="button"], a, input, textarea`,onDragChange:n}=e,[r,i]=(0,U.useState)({x:0,y:0}),[a,o]=(0,U.useState)(!1),s=(0,U.useRef)({startX:0,startY:0,startOffset:{x:0,y:0}}),{startInteraction:c}=IM();return{offset:r,isDragging:a,handlePointerDown:(0,U.useCallback)(e=>{let a=e.target;if(t&&a?.closest(t))return;let l=e.clientX,u=e.clientY,d={...r},f=0,p=!1;s.current={startX:l,startY:u,startOffset:d},c({cursor:`grab`,onMove:e=>{let t=e.clientX-l,r=e.clientY-u;if(f=Math.abs(t)+Math.abs(r),!p&&f>=LM&&(p=!0,o(!0),document.body.style.cursor=`grabbing`,document.body.style.userSelect=`none`),p){let e={x:d.x+t,y:d.y+r};i(e),n?.(e)}},onEnd:()=>{p&&o(!1)}})},[r,t,n,c]),style:{transform:`translate(${r.x}px, ${r.y}px)`,cursor:a?`grabbing`:`grab`,touchAction:`none`}}}function zM(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,W.jsx)(`path`,{d:`M12 8V4H8`}),(0,W.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,W.jsx)(`path`,{d:`M2 14h2`}),(0,W.jsx)(`path`,{d:`M20 14h2`}),(0,W.jsx)(`path`,{d:`M15 13v2`}),(0,W.jsx)(`path`,{d:`M9 13v2`})]})}var BM={root:`_root_74oe4_1`,button:`_button_74oe4_5`,buttonInner:`_buttonInner_74oe4_30`,iconSection:`_iconSection_74oe4_35`,label:`_label_74oe4_39`};function VM({onClick:e,zIndex:t,position:n,label:r}){let i=Vj(),{handlePointerDown:a,style:o}=RM({skipSelector:``}),s=Math.min(i.other.iconSize[`icon-sm`],16),{transform:c,cursor:l,touchAction:u}=o,d=(0,U.useMemo)(()=>({transform:c,touchAction:u,zIndex:t,...n}),[n,u,c,t]),f=(0,U.useMemo)(()=>({cursor:l??`pointer`}),[l]);return(0,W.jsx)(`div`,{className:BM.root,style:d,children:(0,W.jsx)(km,{onClick:e,onPointerDown:a,style:f,classNames:{root:BM.button,inner:BM.buttonInner,section:BM.iconSection,label:BM.label},leftSection:(0,W.jsx)(zM,{width:s,height:s}),radius:20,variant:`primary`,"aria-label":`Open ${r??`agent widget`}`,title:`Open ${r??`agent widget`}`,children:r??`Assistant`})})}var HM=(0,U.createContext)({});function UM(){return(0,U.useContext)(HM)}function WM(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\s+/g,` `).trim().replace(/^./,e=>e.toUpperCase())}function GM(e){if(e==null)return`-`;if(Array.isArray(e))return e.length>0?e.join(`, `):`-`;if(typeof e==`object`){let t=Object.entries(e);return t.length===0?`-`:t.map(([e,t])=>`${WM(e)}: ${String(t??`-`)}`).join(` | `)}return String(e).trim()||`-`}function KM(e){return e.trim().toLowerCase().replace(/\s+/g,`-`)}function qM(e){if(e.header.badge?.trim())return KM(e.header.badge);let t=KM(e.columnType);return t===`ourcatalog`||t===`catalog`||t===`internal`?`catalog`:`competitor`}function JM(e){if(typeof e!=`string`)return;let t=e.trim();if(!(!t||t.toLowerCase()===`internal`)){if(/^https?:\/\//i.test(t))return t;if(/^[\w.-]+\.[a-z]{2,}(\/.*)?$/i.test(t))return`https://${t}`}}function YM(e){let t=new Set;return e.forEach(e=>{Object.keys(e.specs).forEach(e=>{e!==`priceNote`&&t.add(e)})}),Array.from(t)}function XM(e){return{formatLabel:WM,formatValue:GM,getTone:qM,toHref:JM,specKeys:YM(e)}}var ZM={surface:`_surface_1p3km_1`,scroller:`_scroller_1p3km_16`,table:`_table_1p3km_32`,stickyColumn:`_stickyColumn_1p3km_39`,cornerCell:`_cornerCell_1p3km_45`,sectionLabel:`_sectionLabel_1p3km_52`,offerHeader:`_offerHeader_1p3km_61`,offerEyebrow:`_offerEyebrow_1p3km_79`,offerTitle:`_offerTitle_1p3km_89`,offerBadge:`_offerBadge_1p3km_108`,rowLabel:`_rowLabel_1p3km_122`,dataCell:`_dataCell_1p3km_123`,footerStub:`_footerStub_1p3km_124`,footerCell:`_footerCell_1p3km_125`,rowLabelText:`_rowLabelText_1p3km_142`,cellPrimary:`_cellPrimary_1p3km_154`,cellLink:`_cellLink_1p3km_155`,cellSecondary:`_cellSecondary_1p3km_181`,footerButton:`_footerButton_1p3km_193`};function QM({comparisonModal:e,fillHeight:t=!0,isBusy:n=!1,onClose:r}){if(!e||e.columns.length===0)return null;let{sendMessage:i}=UM(),{formatLabel:a,formatValue:o,getTone:s,toHref:c,specKeys:l}=XM(e.columns),u=e.columns.some(e=>e.selectButton?.buttonText),d=(0,U.useCallback)(e=>{r?.(),i?.(e,{showUserBubble:!1})},[r,i]);return(0,W.jsx)(J,{className:ZM.surface,"data-fill-height":t,children:(0,W.jsx)(al,{type:`auto`,offsetScrollbars:!0,scrollbarSize:10,className:ZM.scroller,children:(0,W.jsxs)(J,{className:ZM.table,style:{gridTemplateColumns:`180px repeat(${Math.max(e.columns.length,1)}, minmax(196px, 1fr))`},children:[(0,W.jsx)(jm,{className:`${ZM.cornerCell} ${ZM.stickyColumn}`,children:(0,W.jsx)(Jf,{className:ZM.sectionLabel,children:`Specifications`})}),e.columns.map((e,t)=>{let n=s(e);return(0,W.jsx)(zy,{gap:10,className:ZM.offerHeader,"data-tone":n,children:(0,W.jsxs)(wf,{direction:`column`,align:`center`,justify:`center`,gap:4,h:`100%`,children:[(0,W.jsxs)(zy,{gap:4,align:`center`,children:[(0,W.jsx)(Jf,{className:ZM.offerEyebrow,children:o(e.header.label)}),(0,W.jsx)(Jf,{className:ZM.offerTitle,children:o(e.header.offerName)})]}),e.header.badge?(0,W.jsx)(bm,{radius:`sm`,className:ZM.offerBadge,children:e.header.badge}):null]})},`${e.header.offerName}-${t}`)}),l.map(t=>(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(jm,{className:`${ZM.rowLabel} ${ZM.stickyColumn}`,children:(0,W.jsx)(Jf,{className:ZM.rowLabelText,children:a(t)})}),e.columns.map((e,n)=>{let r=s(e),i=e.specs[t],a=/url$/i.test(t)?c(i):void 0,l=t===`price`?o(e.specs.priceNote):void 0,u=t===`price`?r===`threat`?`accent`:`strong`:`default`;return(0,W.jsxs)(zy,{gap:4,className:ZM.dataCell,children:[a?(0,W.jsx)(Zf,{href:a,target:`_blank`,rel:`noreferrer`,className:ZM.cellLink,children:o(i)}):(0,W.jsx)(Jf,{className:ZM.cellPrimary,"data-emphasis":u,children:o(i)}),l&&l!==`-`?(0,W.jsx)(Jf,{className:ZM.cellSecondary,children:l}):null]},`${t}-${e.header.offerName}-${n}`)})]},t)),u?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(jm,{className:`${ZM.footerStub} ${ZM.stickyColumn}`}),e.columns.map((e,t)=>{let r=s(e);return(0,W.jsx)(jm,{className:ZM.footerCell,children:e.selectButton?.buttonText?(0,W.jsx)(km,{radius:`md`,className:ZM.footerButton,"data-tone":r,variant:r===`catalog`?`light`:`filled`,disabled:n,onClick:()=>d(e.selectButton.buttonText),children:e.selectButton.buttonText}):null},`${e.header.offerName}-${t}-cta`)})]}):null]})})})}function $M(e){return typeof document>`u`?null:e?.trim()?document.querySelector(e)??document.body:document.body}function eN(e){if(e===document.body||e===document.documentElement)return null;let t=e.getBoundingClientRect(),n=window.getComputedStyle(e),r=Number.parseFloat(n.paddingTop||`0`)||0,i=Number.parseFloat(n.paddingRight||`0`)||0,a=Number.parseFloat(n.paddingBottom||`0`)||0,o=Number.parseFloat(n.paddingLeft||`0`)||0;return{top:t.top+r,left:t.left+o,width:Math.max(0,t.width-o-i),height:Math.max(0,t.height-r-a)}}function tN({hostContainerSelector:e,opened:t,hasComparison:n,hasContent:r,size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l}){let[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null);return(0,U.useEffect)(()=>{let t=$M(e);if(d(t),!t){p(null);return}let n=()=>{p(eN(t))};if(n(),t===document.body||t===document.documentElement)return;let r=new ResizeObserver(n);return r.observe(t),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{r.disconnect(),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]),{portalTarget:u,resolvedSize:i??(n?`xl`:`md`),shellStyle:(0,U.useMemo)(()=>f?{top:`${f.top}px`,left:`${f.left}px`,width:`${f.width}px`,height:`${f.height}px`,zIndex:a}:{top:o,height:s,left:c,right:l,zIndex:a},[f,s,c,l,o,a]),shouldRender:t&&!!u&&r}}var nN={shell:`_shell_1ms0b_1`,modalRoot:`_modalRoot_1ms0b_6`,inner:`_inner_1ms0b_12`,overlay:`_overlay_1ms0b_19`,content:`_content_1ms0b_27`,header:`_header_1ms0b_41`,mantineTitle:`_mantineTitle_1ms0b_48`,title:`_title_1ms0b_52`,subtitle:`_subtitle_1ms0b_61`,close:`_close_1ms0b_68`,body:`_body_1ms0b_82`,bodyContent:`_bodyContent_1ms0b_90`,bodyScrollArea:`_bodyScrollArea_1ms0b_97`,popupSections:`_popupSections_1ms0b_101`,bodyText:`_bodyText_1ms0b_105`};function rN({opened:e,onClose:t,message:n,isAssistantStreaming:r=!1,size:i,zIndex:a,layoutTop:o=`var(--mantine-custom-space-150)`,layoutHeight:s=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,layoutLeftOffset:c=`var(--mantine-custom-space-150)`,layoutRightOffset:l=`0px`,hostContainerSelector:u,panelBorderRadius:d}){let f=(0,U.useId)(),p=n?.popup,m=p?.comparisonModal,h=p?.title??m?.title,g=p?.subtitle??m?.subtitle,_=p?.body??n?.text,v=!!m,y=typeof d==`number`?`${d}px`:d,{portalTarget:b,resolvedSize:x,shellStyle:S,shouldRender:C}=tN({hostContainerSelector:u,opened:e,hasComparison:v,hasContent:!!(m||_||p),size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l});return!C||!b?null:(0,sn.createPortal)((0,W.jsx)(J,{className:nN.shell,style:{...S,"--agent-widget-popup-radius":y},children:(0,W.jsx)(mg,{opened:e,onClose:t,title:(0,W.jsxs)(zy,{gap:4,children:[(0,W.jsx)(Jf,{id:f,className:nN.title,component:`span`,children:h}),g?(0,W.jsx)(Jf,{className:nN.subtitle,component:`span`,children:g}):null]}),withCloseButton:!0,withinPortal:!1,centered:!0,lockScroll:!1,closeOnClickOutside:!1,trapFocus:!1,size:x,scrollAreaComponent:al.Autosize,classNames:{root:nN.modalRoot,inner:nN.inner,overlay:nN.overlay,content:nN.content,header:nN.header,body:nN.body,close:nN.close,title:nN.mantineTitle},overlayProps:{backgroundOpacity:gA.md,blur:6},children:(0,W.jsx)(J,{className:nN.bodyContent,"data-layout":v?`comparison`:`text`,children:v?(0,W.jsx)(al.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:nN.bodyScrollArea,children:(0,W.jsx)(zy,{gap:`md`,className:nN.popupSections,children:(0,W.jsx)(QM,{comparisonModal:m,fillHeight:!0,isBusy:r,onClose:t})})}):_?(0,W.jsx)(al.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:nN.bodyScrollArea,children:(0,W.jsx)(Jf,{className:nN.bodyText,component:`p`,children:_})}):null})})}),b)}var{entries:iN,setPrototypeOf:aN,isFrozen:oN,getPrototypeOf:sN,getOwnPropertyDescriptor:cN}=Object,{freeze:lN,seal:uN,create:dN}=Object,{apply:fN,construct:pN}=typeof Reflect<`u`&&Reflect;lN||=function(e){return e},uN||=function(e){return e},fN||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},pN||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var mN=ON(Array.prototype.forEach),hN=ON(Array.prototype.lastIndexOf),gN=ON(Array.prototype.pop),_N=ON(Array.prototype.push),vN=ON(Array.prototype.splice),yN=ON(String.prototype.toLowerCase),bN=ON(String.prototype.toString),xN=ON(String.prototype.match),SN=ON(String.prototype.replace),CN=ON(String.prototype.indexOf),wN=ON(String.prototype.trim),TN=ON(Object.prototype.hasOwnProperty),EN=ON(RegExp.prototype.test),DN=kN(TypeError);function ON(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return fN(e,t,r)}}function kN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return pN(e,n)}}function AN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yN;aN&&aN(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(oN(t)||(t[r]=e),i=e)}e[i]=!0}return e}function jN(e){for(let t=0;t<e.length;t++)TN(e,t)||(e[t]=null);return e}function MN(e){let t=dN(null);for(let[n,r]of iN(e))TN(e,n)&&(Array.isArray(r)?t[n]=jN(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=MN(r):t[n]=r);return t}function NN(e,t){for(;e!==null;){let n=cN(e,t);if(n){if(n.get)return ON(n.get);if(typeof n.value==`function`)return ON(n.value)}e=sN(e)}function n(){return null}return n}var PN=lN(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),FN=lN(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),IN=lN([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),LN=lN([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),RN=lN(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),zN=lN([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),BN=lN([`#text`]),VN=lN(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),HN=lN(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),UN=lN(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),WN=lN([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),GN=uN(/\{\{[\w\W]*|[\w\W]*\}\}/gm),KN=uN(/<%[\w\W]*|[\w\W]*%>/gm),qN=uN(/\$\{[\w\W]*/gm),JN=uN(/^data-[\-\w.\u00B7-\uFFFF]+$/),YN=uN(/^aria-[\-\w]+$/),XN=uN(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ZN=uN(/^(?:\w+script|data):/i),QN=uN(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$N=uN(/^html$/i),eP=uN(/^[a-z][.\w]*(-[.\w]+)+$/i),tP=Object.freeze({__proto__:null,ARIA_ATTR:YN,ATTR_WHITESPACE:QN,CUSTOM_ELEMENT:eP,DATA_ATTR:JN,DOCTYPE_NAME:$N,ERB_EXPR:KN,IS_ALLOWED_URI:XN,IS_SCRIPT_OR_DATA:ZN,MUSTACHE_EXPR:GN,TMPLIT_EXPR:qN}),nP={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},rP=function(){return typeof window>`u`?null:window},iP=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},aP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function oP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rP(),t=e=>oP(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==nP.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=NN(m,`cloneNode`),g=NN(m,`remove`),_=NN(m,`nextSibling`),v=NN(m,`childNodes`),y=NN(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:E}=r,D=aP();t.isSupported=typeof iN==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:k,TMPLIT_EXPR:A,DATA_ATTR:j,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:ee}=tP,{IS_ALLOWED_URI:F}=tP,I=null,te=AN({},[...PN,...FN,...IN,...RN,...BN]),ne=null,re=AN({},[...VN,...HN,...UN,...WN]),ie=Object.seal(dN(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),L=null,R=null,ae=Object.seal(dN(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),oe=!0,se=!0,ce=!1,le=!0,ue=!1,de=!0,z=!1,fe=!1,pe=!1,me=!1,he=!1,B=!1,ge=!0,_e=!1,V=!0,ve=!1,ye={},be=null,xe=AN({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Se=null,Ce=AN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),we=null,Te=AN({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ee=`http://www.w3.org/1998/Math/MathML`,De=`http://www.w3.org/2000/svg`,Oe=`http://www.w3.org/1999/xhtml`,ke=Oe,Ae=!1,je=null,Me=AN({},[Ee,De,Oe],bN),Ne=AN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=AN({},[`annotation-xml`]),Fe=AN({},[`title`,`style`,`font`,`a`,`script`]),Ie=null,Le=[`application/xhtml+xml`,`text/html`],Re=null,ze=null,Be=n.createElement(`form`),Ve=function(e){return e instanceof RegExp||e instanceof Function},H=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ze&&ze===e)){if((!e||typeof e!=`object`)&&(e={}),e=MN(e),Ie=Le.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Re=Ie===`application/xhtml+xml`?bN:yN,I=TN(e,`ALLOWED_TAGS`)?AN({},e.ALLOWED_TAGS,Re):te,ne=TN(e,`ALLOWED_ATTR`)?AN({},e.ALLOWED_ATTR,Re):re,je=TN(e,`ALLOWED_NAMESPACES`)?AN({},e.ALLOWED_NAMESPACES,bN):Me,we=TN(e,`ADD_URI_SAFE_ATTR`)?AN(MN(Te),e.ADD_URI_SAFE_ATTR,Re):Te,Se=TN(e,`ADD_DATA_URI_TAGS`)?AN(MN(Ce),e.ADD_DATA_URI_TAGS,Re):Ce,be=TN(e,`FORBID_CONTENTS`)?AN({},e.FORBID_CONTENTS,Re):xe,L=TN(e,`FORBID_TAGS`)?AN({},e.FORBID_TAGS,Re):MN({}),R=TN(e,`FORBID_ATTR`)?AN({},e.FORBID_ATTR,Re):MN({}),ye=TN(e,`USE_PROFILES`)?e.USE_PROFILES:!1,oe=e.ALLOW_ARIA_ATTR!==!1,se=e.ALLOW_DATA_ATTR!==!1,ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=e.SAFE_FOR_TEMPLATES||!1,de=e.SAFE_FOR_XML!==!1,z=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,he=e.RETURN_DOM_FRAGMENT||!1,B=e.RETURN_TRUSTED_TYPE||!1,pe=e.FORCE_BODY||!1,ge=e.SANITIZE_DOM!==!1,_e=e.SANITIZE_NAMED_PROPS||!1,V=e.KEEP_CONTENT!==!1,ve=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||XN,ke=e.NAMESPACE||Oe,Ne=e.MATHML_TEXT_INTEGRATION_POINTS||Ne,Pe=e.HTML_INTEGRATION_POINTS||Pe,ie=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ve(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ve(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ie.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(ie.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ue&&(se=!1),he&&(me=!0),ye&&(I=AN({},BN),ne=dN(null),ye.html===!0&&(AN(I,PN),AN(ne,VN)),ye.svg===!0&&(AN(I,FN),AN(ne,HN),AN(ne,WN)),ye.svgFilters===!0&&(AN(I,IN),AN(ne,HN),AN(ne,WN)),ye.mathMl===!0&&(AN(I,RN),AN(ne,UN),AN(ne,WN))),TN(e,`ADD_TAGS`)||(ae.tagCheck=null),TN(e,`ADD_ATTR`)||(ae.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ae.tagCheck=e.ADD_TAGS:(I===te&&(I=MN(I)),AN(I,e.ADD_TAGS,Re))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ae.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=MN(ne)),AN(ne,e.ADD_ATTR,Re))),e.ADD_URI_SAFE_ATTR&&AN(we,e.ADD_URI_SAFE_ATTR,Re),e.FORBID_CONTENTS&&(be===xe&&(be=MN(be)),AN(be,e.FORBID_CONTENTS,Re)),e.ADD_FORBID_CONTENTS&&(be===xe&&(be=MN(be)),AN(be,e.ADD_FORBID_CONTENTS,Re)),V&&(I[`#text`]=!0),z&&AN(I,[`html`,`head`,`body`]),I.table&&(AN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw DN(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw DN(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=iP(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));lN&&lN(e),ze=e}},He=AN({},[...FN,...IN,...LN]),Ue=AN({},[...RN,...zN]),We=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:ke,tagName:`template`});let n=yN(e.tagName),r=yN(t.tagName);return je[e.namespaceURI]?e.namespaceURI===De?t.namespaceURI===Oe?n===`svg`:t.namespaceURI===Ee?n===`svg`&&(r===`annotation-xml`||Ne[r]):!!He[n]:e.namespaceURI===Ee?t.namespaceURI===Oe?n===`math`:t.namespaceURI===De?n===`math`&&Pe[r]:!!Ue[n]:e.namespaceURI===Oe?t.namespaceURI===De&&!Pe[r]||t.namespaceURI===Ee&&!Ne[r]?!1:!Ue[n]&&(Fe[n]||!He[n]):!!(Ie===`application/xhtml+xml`&&je[e.namespaceURI]):!1},U=function(e){_N(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},Ge=function(e,n){try{_N(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{_N(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(me||he)try{U(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ke=function(e){let t=null,r=null;if(pe)e=`<remove></remove>`+e;else{let t=xN(e,/^[\r\n\t ]+/);r=t&&t[0]}Ie===`application/xhtml+xml`&&ke===Oe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(ke===Oe)try{t=new f().parseFromString(i,Ie)}catch{}if(!t||!t.documentElement){t=S.createDocument(ke,`template`,null);try{t.documentElement.innerHTML=Ae?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ke===Oe?T.call(t,z?`html`:`body`)[0]:z?t.documentElement:a},qe=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Je=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Ye=function(e){return typeof s==`function`&&e instanceof s};function Xe(e,n,r){mN(e,e=>{e.call(t,n,r,ze)})}let Ze=function(e){let n=null;if(Xe(D.beforeSanitizeElements,e,null),Je(e))return U(e),!0;let r=Re(e.nodeName);if(Xe(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),de&&e.hasChildNodes()&&!Ye(e.firstElementChild)&&EN(/<[/\w!]/g,e.innerHTML)&&EN(/<[/\w!]/g,e.textContent)||e.nodeType===nP.progressingInstruction||de&&e.nodeType===nP.comment&&EN(/<[/\w]/g,e.data))return U(e),!0;if(!(ae.tagCheck instanceof Function&&ae.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&$e(r)&&(ie.tagNameCheck instanceof RegExp&&EN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r)))return!1;if(V&&!be[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return U(e),!0}return e instanceof c&&!We(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&EN(/<\/no(script|embed|frames)/i,e.innerHTML)?(U(e),!0):(ue&&e.nodeType===nP.text&&(n=e.textContent,mN([O,k,A],e=>{n=SN(n,e,` `)}),e.textContent!==n&&(_N(t.removed,{element:e.cloneNode()}),e.textContent=n)),Xe(D.afterSanitizeElements,e,null),!1)},Qe=function(e,t,r){if(R[t]||ge&&(t===`id`||t===`name`)&&(r in n||r in Be))return!1;if(!(se&&!R[t]&&EN(j,t))&&!(oe&&EN(M,t))&&!(ae.attributeCheck instanceof Function&&ae.attributeCheck(t,e))){if(!ne[t]||R[t]){if(!($e(e)&&(ie.tagNameCheck instanceof RegExp&&EN(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&EN(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&EN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!we[t]&&!EN(F,SN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&CN(r,`data:`)===0&&Se[e])&&!(ce&&!EN(N,SN(r,P,``)))&&r)return!1}return!0},$e=function(e){return e!==`annotation-xml`&&xN(e,ee)},et=function(e){Xe(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Je(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Re(a),l=s,u=a===`value`?l:wN(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Xe(D.uponSanitizeAttribute,e,r),u=r.attrValue,_e&&(c===`id`||c===`name`)&&(Ge(a,e),u=`user-content-`+u),de&&EN(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){Ge(a,e);continue}if(c===`attributename`&&xN(u,`href`)){Ge(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ge(a,e);continue}if(!le&&EN(/\/>/i,u)){Ge(a,e);continue}ue&&mN([O,k,A],e=>{u=SN(u,e,` `)});let d=Re(e.nodeName);if(!Qe(d,c,u)){Ge(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Je(e)?U(e):gN(t.removed)}catch{Ge(a,e)}}Xe(D.afterSanitizeAttributes,e,null)},tt=function e(t){let n=null,r=qe(t);for(Xe(D.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Xe(D.uponSanitizeShadowNode,n,null),Ze(n),et(n),n.content instanceof a&&e(n.content);Xe(D.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(Ae=!e,Ae&&(e=`<!-->`),typeof e!=`string`&&!Ye(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw DN(`dirty is not a string, aborting`)}else throw DN(`toString is not a function`);if(!t.isSupported)return e;if(fe||H(n),t.removed=[],typeof e==`string`&&(ve=!1),ve){if(e.nodeName){let t=Re(e.nodeName);if(!I[t]||L[t])throw DN(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Ke(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===nP.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!me&&!ue&&!z&&e.indexOf(`<`)===-1)return b&&B?b.createHTML(e):e;if(i=Ke(e),!i)return me?null:B?x:``}i&&pe&&U(i.firstChild);let u=qe(ve?e:i);for(;c=u.nextNode();)Ze(c),et(c),c.content instanceof a&&tt(c.content);if(ve)return e;if(me){if(he)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(ne.shadowroot||ne.shadowrootmode)&&(l=E.call(r,l,!0)),l}let d=z?i.outerHTML:i.innerHTML;return z&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&EN($N,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
320
320
|
`+d),ue&&mN([O,k,A],e=>{d=SN(d,e,` `)}),b&&B?b.createHTML(d):d},t.setConfig=function(){H(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),fe=!0},t.clearConfig=function(){ze=null,fe=!1},t.isValidAttribute=function(e,t,n){return ze||H({}),Qe(Re(e),Re(t),n)},t.addHook=function(e,t){typeof t==`function`&&_N(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=hN(D[e],t);return n===-1?void 0:vN(D[e],n,1)[0]}return gN(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=aP()},t}var sP=oP(),cP=[`script`,`style`,`iframe`,`object`,`embed`,`link`,`meta`,`base`,`form`,`input`,`button`,`textarea`,`select`],lP=[`style`,`srcdoc`];function uP(e){return e?sP.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:cP,FORBID_ATTR:lP,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1}):``}function dP({html:e,fallback:t=null,...n}){let r=(0,U.useMemo)(()=>uP(e??``),[e]);return r?(0,W.jsx)(J,{...n,dangerouslySetInnerHTML:{__html:r}}):(0,W.jsx)(W.Fragment,{children:t})}function fP(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pP=fP();function mP(e){pP=e}var hP={exec:()=>null};function gP(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(vP.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var _P=(()=>{try{return!0}catch{return!1}})(),vP={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},yP=/^(?:[ \t]*(?:\n|$))+/,bP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,SP=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,CP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wP=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,TP=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,EP=gP(TP).replace(/bull/g,wP).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),DP=gP(TP).replace(/bull/g,wP).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),OP=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kP=/^[^\n]+/,AP=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jP=gP(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,AP).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),MP=gP(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,wP).getRegex(),NP=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,PP=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,FP=gP(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,PP).replace(`tag`,NP).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),IP=gP(OP).replace(`hr`,SP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,NP).getRegex(),LP={blockquote:gP(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,IP).getRegex(),code:bP,def:jP,fences:xP,heading:CP,hr:SP,html:FP,lheading:EP,list:MP,newline:yP,paragraph:IP,table:hP,text:kP},RP=gP(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,SP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,NP).getRegex(),zP={...LP,lheading:DP,table:RP,paragraph:gP(OP).replace(`hr`,SP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,RP).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,NP).getRegex()},BP={...LP,html:gP(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,PP).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hP,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gP(OP).replace(`hr`,SP).replace(`heading`,` *#{1,6} *[^
|
|
321
321
|
]`).replace(`lheading`,EP).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},VP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,HP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,UP=/^( {2,}|\\)\n(?!\s*$)/,WP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,GP=/[\p{P}\p{S}]/u,KP=/[\s\p{P}\p{S}]/u,qP=/[^\s\p{P}\p{S}]/u,JP=gP(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,KP).getRegex(),YP=/(?!~)[\p{P}\p{S}]/u,XP=/(?!~)[\s\p{P}\p{S}]/u,ZP=/(?:[^\s\p{P}\p{S}]|~)/u,QP=/(?![*_])[\p{P}\p{S}]/u,$P=/(?![*_])[\s\p{P}\p{S}]/u,eF=/(?:[^\s\p{P}\p{S}]|[*_])/u,tF=gP(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,_P?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),nF=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,rF=gP(nF,`u`).replace(/punct/g,GP).getRegex(),iF=gP(nF,`u`).replace(/punct/g,YP).getRegex(),aF=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,oF=gP(aF,`gu`).replace(/notPunctSpace/g,qP).replace(/punctSpace/g,KP).replace(/punct/g,GP).getRegex(),sF=gP(aF,`gu`).replace(/notPunctSpace/g,ZP).replace(/punctSpace/g,XP).replace(/punct/g,YP).getRegex(),cF=gP(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,qP).replace(/punctSpace/g,KP).replace(/punct/g,GP).getRegex(),lF=gP(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,QP).getRegex(),uF=gP(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,eF).replace(/punctSpace/g,$P).replace(/punct/g,QP).getRegex(),dF=gP(/\\(punct)/,`gu`).replace(/punct/g,GP).getRegex(),fF=gP(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pF=gP(PP).replace(`(?:-->|$)`,`-->`).getRegex(),mF=gP(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,pF).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hF=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gF=gP(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,hF).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_F=gP(/^!?\[(label)\]\[(ref)\]/).replace(`label`,hF).replace(`ref`,AP).getRegex(),vF=gP(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,AP).getRegex(),yF=gP(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,_F).replace(`nolink`,vF).getRegex(),bF=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xF={_backpedal:hP,anyPunctuation:dF,autolink:fF,blockSkip:tF,br:UP,code:HP,del:hP,delLDelim:hP,delRDelim:hP,emStrongLDelim:rF,emStrongRDelimAst:oF,emStrongRDelimUnd:cF,escape:VP,link:gF,nolink:vF,punctuation:JP,reflink:_F,reflinkSearch:yF,tag:mF,text:WP,url:hP},SF={...xF,link:gP(/^!?\[(label)\]\((.*?)\)/).replace(`label`,hF).getRegex(),reflink:gP(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,hF).getRegex()},CF={...xF,emStrongRDelimAst:sF,emStrongLDelim:iF,delLDelim:lF,delRDelim:uF,url:gP(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,bF).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:gP(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,bF).getRegex()},wF={...CF,br:gP(UP).replace(`{2,}`,`*`).getRegex(),text:gP(CF.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},TF={normal:LP,gfm:zP,pedantic:BP},EF={normal:xF,gfm:CF,breaks:wF,pedantic:SF},DF={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},OF=e=>DF[e];function kF(e,t){if(t){if(vP.escapeTest.test(e))return e.replace(vP.escapeReplace,OF)}else if(vP.escapeTestNoEncode.test(e))return e.replace(vP.escapeReplaceNoEncode,OF);return e}function AF(e){try{e=encodeURI(e).replace(vP.percentDecode,`%`)}catch{return null}return e}function jF(e,t){let n=e.replace(vP.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(vP.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(vP.slashPipe,`|`);return n}function MF(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function NF(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function PF(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function FF(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function IF(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
322
322
|
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
@@ -399,7 +399,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
399
399
|
`+t+`]`}return r.pop(),i=t,c}}}}))}));function _H(e){let t=e.indexOf(`{`),n=e.indexOf(`[`);return t===-1?n:n===-1?t:Math.min(t,n)}function vH(e){return e===`{`||e===`[`}function yH(e){return e===`}`||e===`]`}function bH(e){return e===`}`?`{`:`[`}function xH(e,t){let n=[],r=!1,i=!1;for(let a=t;a<e.length;a++){let t=e[a]??``;if(r){if(i){i=!1;continue}if(t===`\\`){i=!0;continue}if(t===`"`){r=!1;continue}continue}if(!(t===`"`&&e[a-1]===`\\`)){if(t===`"`){r=!0;continue}if(vH(t)){n.push(t);continue}if(yH(t)&&(n[n.length-1]===bH(t)&&n.pop(),n.length===0))return{end:a+1,openStack:[],inString:!1}}}return{end:null,openStack:n,inString:r}}function SH(e){let t=_H(e);if(t<0)return e;let{end:n,openStack:r,inString:i}=xH(e,t);if(n!==null)return e;let a=``;return i&&(a+=`"`),r.length>0&&(a+=r.reverse().map(e=>e===`{`?`}`:`]`).join(``)),a?`${e}${a}`:e}function CH(e,t){return xH(e,t).end}var wH=l(gH());function TH(e){try{return JSON.parse(e)}catch{return null}}function EH(e){return TH(e)??(()=>{try{return wH.default.parse(e)}catch{return null}})()}function DH(e){return e.replace(/\\r\\n/g,`
|
|
400
400
|
`).replace(/\\n/g,`
|
|
401
401
|
`).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\//g,`/`).replace(/\\\\/g,`\\`)}function OH(e){return e&&e.replace(/([{\s,])([A-Za-z0-9_@$-]+)\s*:/g,(e,t,n)=>`${t}"${n}":`)}function kH(e){let t=e.trim();t=t.replace(/[""]/g,`"`).replace(/['']/g,`'`),t=t.replace(/,\s*([}\]])/g,`$1`);try{t=OH(t)}catch{}return t=SH(t),EH(t)}function AH(e){if(!e||typeof e!=`string`)return null;let t=TH(e);if(t!=null)return t;try{let t=wH.default.parse(e);if(t!=null)return t}catch{}if(e.includes(`\\"`)||e.includes(`\\n`)||e.includes(`\\r`)||e.includes(`\\\\`)){let t=EH(DH(e));if(t!=null)return t}try{return kH(e)}catch{return null}}function jH(e){let t=_H(e);if(t<0)return null;let n=CH(e,t);if(n!==null)return{start:t,json:e.slice(t,n).trim(),consumed:n-t};let r=e.slice(t),i=r.search(/\r?\n\r?\n/);return i>20&&(r=r.slice(0,i).trimEnd()),{start:t,json:SH(r).trim(),consumed:r.length}}var MH=`"structuredData":`,NH=`\\"structuredData\\":`;function PH(e){let t=e.indexOf(MH);if(t<0&&(t=e.indexOf(NH)),t<0)return null;let n=t+17,r=e.indexOf(`{`,n);if(r<0||r>n+10)return null;let i=CH(e,r),a,o;i===null?(a=e.slice(t,r).trim()+SH(e.slice(r)).trim(),o=e.length-t):(a=e.slice(t,i).trim(),o=i-t),t===e.indexOf(NH)&&(a=a.replace(/\\"/g,`"`));let s=`{`+a+`}`;return{start:t,fullJson:s,consumed:o}}function FH(e){let t=e.trim();if(!t||t.length<10)return!1;let n=_H(t);return n>=0&&CH(t,n)===null&&t.length-n>10}function IH(e){let t=/^\s*(?:\r?\n)?\s*(?:'{3}|"{3}|`{3})(?:\s*json\s*)?(?:'{3}|"{3}|`{3})?\s*(?:\r?\n)?/i.exec(e);return!t||!/'{3}|"{3}|`{3}/i.test(t[0])?0:t[0].length}function LH(e){return/^\s*(?:[\]}]+\s*)+/.exec(e)?.[0].length??0}function RH(e){return e&&typeof e==`object`?e:null}function zH(e){return Array.isArray(e)?e:[]}function BH(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;if(typeof e==`string`){let t=Number(e);return Number.isFinite(t)?t:null}return null}function VH(e,t,n){let r=BH(e.used)??BH(e.currentValueRaw)??0,i=BH(e.allowance),a=BH(e.remaining),o=i??BH(e.total)??(r!=null&&a!=null?r+a:null)??BH(e.valueRaw)??(r>0?r:0),s=typeof e.unit==`string`?e.unit:``,c=typeof e.name==`string`?e.name:t.toUpperCase();if(o<=0)return null;let l=n?BH(e.percentUsed)??void 0:void 0,u={key:t,label:c,used:r,total:o,unit:s};return l!=null&&(u.percentUsed=l),u}function HH(e){let t=[],n=zH(e?.responseList);for(let e of n){let n=VH(e,typeof e.type==`string`?e.type:`usage`,!0);n&&t.push(n)}return t.length>0?t:null}function UH(e){let t=e.items;if(Array.isArray(t)&&t.length>0){let e=RH(t[0]);if(e)return e}return e}function WH(e){let t=RH(e),n=RH(RH(t?.structuredData)?.data??t?.data);if(!n)return null;let r=HH(n);if(r)return r;let i=zH(n?.usageTypes);if(i.length===0)return null;let a=[];for(let e of i){let t=typeof e.type==`string`?e.type:`usage`,n=UH(e);if(!n)continue;let r=VH(n,t);r&&a.push(r)}return a.length>0?a:null}function GH(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function KH(e){return e&&typeof e==`object`?e:null}function qH(e){if(!e||typeof e!=`object`)return null;let t=e,n=GH(t.buttonText);if(!n)return null;let r=GH(t.targetAgent)??void 0;return{buttonText:n,agentMessage:GH(t.agentMessage)??r??n,...r?{targetAgent:r}:{}}}function JH(e){let t=KH(e);if(!t)return null;let n=KH(t.structuredData)??t,r=GH(n.renderAs??t.renderAs);if(r&&r!==`actionButtons`||!Array.isArray(n.actions))return null;let i=n.actions.map(qH).filter(e=>e!==null);return i.length===0?null:{actions:i}}function YH(e){return e&&typeof e==`object`?e:null}function XH(e){if(typeof e!=`string`)return null;switch(e.trim()){case`actionButtons`:case`actions`:return`actions`;case`chart`:return`chart`;case`usageChart`:return`usage-chart`;case`offerCard`:return`offer-card`;case`addonCard`:return`addon-card`;case`overviewCard`:return`overview-card`;case`accountOverview`:return`account-overview`;case`table`:return`table`;case`highlightBox`:return`highlight-box`;case`infoBox`:return`info-box`;case`link`:return`link`;case`card`:return`overview-card`;default:return null}}function ZH(e){let t=YH(e);if(!t)return null;let n=YH(t.structuredData),r=[n?.renderAs,t.renderAs,YH(n?.visualization)?.type,YH(n?.visualizationConfig)?.visualizationType,n?.visualizationType,YH(t.visualization)?.type,YH(t.visualizationConfig)?.visualizationType,t.visualizationType];for(let e of r){let t=XH(e);if(t)return t;if(typeof e==`string`)return e.trim()}return null}function QH(e){if(typeof e!=`string`)return null;let t=e.trim();switch(t){case`accountOverview`:case`customerProfile`:case`offerRecommendation`:case`basket`:case`usageAnalysis`:case`twinInsight`:return t;default:return`unknown`}}function $H(e){let t=YH(e);if(!t)return null;let n=YH(t.structuredData),r=n?.data??t.data,i=YH(n?.visualization),a=YH(t.visualization);return{data:r,visualizationConfig:i?.config??a?.config??t.visualizationConfig,renderAs:ZH(e),responseType:QH(n?.responseType??t.responseType)}}function eU(e){let t=YH(e);return!t||YH(t.structuredData)?e:typeof t.renderAs==`string`||typeof t.responseType==`string`||YH(t.visualization)||YH(t.visualizationConfig)||typeof t.visualizationType==`string`||t.data!==void 0?{structuredData:t}:e}function tU(e){let t=YH(e);return t?YH(t.structuredData)||YH(t.visualization)||YH(t.visualizationConfig)||Array.isArray(t.actions)?!0:typeof t.renderAs==`string`||typeof t.visualizationType==`string`||typeof t.responseType==`string`:!1}var nU=new hE(`widget-config-builder`);function rU(e){return e&&typeof e==`object`?e:null}function iU(e){if(!Array.isArray(e))return null;let t=e.map(e=>String(e??``).trim()).filter(Boolean);return t.length>0?t:null}function aU(e){if(!Array.isArray(e))return null;let t=e.map(e=>Array.isArray(e)?e.map(e=>String(e??``).trim()):null).filter(e=>Array.isArray(e)&&e.length>0);return t.length>0?t:null}function oU(e,t){let n=rU(e),r=rU(n?.structuredData),i=rU(t?.data),a=rU(t?.visualizationConfig),o=r??n,s=iU(a?.headers)??iU(o?.headers)??iU(o?.columns)??iU(i?.headers)??iU(i?.columns),c=aU(o?.rows)??aU(o?.items)??aU(i?.rows)??aU(i?.items)??aU(t?.data);return s||c?{headers:s??[],rows:c??[]}:null}function sU(e){let t=JH(e);if(t)return{type:`widget`,config:{type:`actions`,actions:t.actions}};let n=$H(e),r=n?.renderAs??ZH(e),i={visualizationConfig:n?.visualizationConfig,responseType:n?.responseType??void 0};if(!r){let t=n?.data??e;return YV(t)?{type:`widget`,config:{type:`card`,data:t,...i}}:null}if(r===`chart`||r===`usage-chart`){let t=e?WH(e):null;return!t||t.length===0?null:{type:`widget`,config:{type:r,items:t,...i}}}if(r===`table`){let t=oU(e,n??null);return!t||t.rows.length===0?null:{type:`widget`,config:{type:`table`,items:t.rows,visualizationConfig:{...rU(i.visualizationConfig)??{},headers:t.headers},responseType:i.responseType}}}if(r===`card`||r===`link`||r===`highlightBox`||r===`offer-card`||r===`addon-card`||r===`overview-card`||r===`account-overview`||r===`info-box`){let e=n?.data;if(!YV(e))return null;let t={type:r,data:e,...i};return nU.debug(`Creating widget`,{renderAsType:r,responseType:n?.responseType,config:t}),{type:`widget`,config:t}}return{type:`widget`,config:{type:r}}}var cU=new hE(`useAgentMarkdownRendererElements`),lU={async:!1,breaks:!0,gfm:!0};function uU(e){return WF.parse(e,lU)}function dU(e,t,n){let r=uU(t);return r.trim()?(e.push({type:`markdown`,key:`md-${n}`,content:r}),n+1):n}function fU(e){return["```json",JSON.stringify(e,null,2),"```"].join(`
|
|
402
|
-
`)}function pU(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.structuredData&&typeof t.structuredData==`object`?t.structuredData:null;return typeof t.renderAs==`string`||typeof n?.renderAs==`string`}function mU(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:AH(t)}function hU(e,t){return(0,U.useMemo)(()=>{let n=hH(e),r=mU(n);if(r)return pU(r)?[{type:`markdown`,key:`json-0`,content:uU(fU(r))}]:[];let i=oH(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=dU(a,e.content,o);continue}try{let n=sH(e.dsl);if(!n){let t=mU(e.dsl);if(t&&!pU(t))continue;o=dU(a,t?fU(t):e.raw,o);continue}let r=qV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=dU(a,fU(r.payload),o)}catch(t){cU.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=dU(a,e.raw,o)}}return a},[e,t])}var gU={agentChatMdRenderer:`_agentChatMdRenderer_3p9l_1`},_U=(0,U.memo)(({content:e,onWidgetEvent:t})=>{let n=hU(e,t);return n.length===0?null:(0,W.jsx)(J,{className:gU.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,W.jsx)(dP,{html:e.content},e.key):(0,W.jsx)(J,{children:e.widget},e.key))})});_U.displayName=`AgentMarkdownRenderer`;function vU({mode:e=`thinking`,autoCycle:t=!0,cycleMs:n=2e3,exploringAfterMs:r=2e3,writingAfterMs:i=8e3,messages:a}){let[o,s]=(0,U.useState)(0);(0,U.useEffect)(()=>{if(!t)return;s(0);let e=setInterval(()=>{s(e=>e+1)},n);return()=>clearInterval(e)},[t,n]);let c=(0,U.useMemo)(()=>{if(!t)return e;let a=o*n;return a>=i?`writing`:a<r||o%2==0?`thinking`:`exploring`},[t,e,o,n,r,i]);return{label:(0,U.useMemo)(()=>{if(a&&a.length>0)return a[o%a.length];switch(c){case`exploring`:return`Exploring`;case`writing`:return`Writing`;default:return`Thinking`}},[a,o,c])}}function yU({size:e=`large`,mode:t=`thinking`,showLabel:n=!0,autoCycle:r=!0,cycleMs:i=2e3,exploringAfterMs:a=2e3,writingAfterMs:o=8e3,messages:s}){let{label:c}=vU({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,W.jsxs)(wu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,W.jsx)(Jf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,W.jsx)(ou,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,W.jsx)(Jf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var bU={body:`_body_oytjg_1`,messageBubble:`_messageBubble_oytjg_21`,messageItem:`_messageItem_oytjg_35`,messageItemEnter:`_messageItemEnter_oytjg_43`,messageSlideUp:`_messageSlideUp_oytjg_1`,streamingDots:`_streamingDots_oytjg_57`,streamingDot:`_streamingDot_oytjg_57`,streamingDotBounce:`_streamingDotBounce_oytjg_1`,messageItemUser:`_messageItemUser_oytjg_88`,messageItemAssistant:`_messageItemAssistant_oytjg_93`,messageBubbleUser:`_messageBubbleUser_oytjg_97`,messageText:`_messageText_oytjg_108`,messageBubbleAssistant:`_messageBubbleAssistant_oytjg_115`,messageTime:`_messageTime_oytjg_124`,messageTimeUser:`_messageTimeUser_oytjg_133`,messageTimeAssistant:`_messageTimeAssistant_oytjg_137`,messageList:`_messageList_oytjg_141`},xU=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`}),SU=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:xU.format(t)};function CU({messages:e,assistantDisplayName:t,isLoading:n,error:r,scrollViewportRef:i,onWidgetEvent:a}){let o=e.filter(e=>e.sentBy!==`assistant`||e.isStreaming?!0:!!e.text.trim());return(0,W.jsx)(zy,{className:bU.body,gap:0,children:(0,W.jsx)(al,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:i,children:(0,W.jsxs)(zy,{className:bU.messageList,gap:0,children:[o.map((e,n)=>{let r=e.sentBy===`user`,i=SU(e.createdAt),o=e.sentBy===`assistant`&&e.isStreaming&&e.text.length===0,s=e.sentBy===`assistant`?e.relatedAgent??t:null,c=e.sentBy===`assistant`?[s,i].filter(Boolean).join(` · `):i;return(0,W.jsxs)(J,{className:`${bU.messageItem} ${bU.messageItemEnter} ${r?bU.messageItemUser:bU.messageItemAssistant}`,style:{animationDelay:`${n*70}ms`},children:[(0,W.jsx)(ml,{className:`${bU.messageBubble} ${r?bU.messageBubbleUser:bU.messageBubbleAssistant}`,children:e.sentBy===`assistant`?o?(0,W.jsxs)(`span`,{className:bU.streamingDots,"aria-hidden":!0,children:[(0,W.jsx)(`span`,{className:bU.streamingDot}),(0,W.jsx)(`span`,{className:bU.streamingDot}),(0,W.jsx)(`span`,{className:bU.streamingDot})]}):(0,W.jsx)(_U,{content:e.text,onWidgetEvent:a}):(0,W.jsx)(Jf,{c:`inherit`,className:bU.messageText,children:e.text})}),c&&(0,W.jsx)(Jf,{size:`xs`,fw:800,className:`${bU.messageTime} ${r?bU.messageTimeUser:bU.messageTimeAssistant}`,children:c})]},e.id)}),n&&(0,W.jsx)(ml,{className:`${bU.messageBubble} ${bU.messageBubbleAssistant}`,children:(0,W.jsx)(yU,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})}),r&&(0,W.jsx)(Uf,{color:`red`,variant:`light`,radius:`md`,children:r})]})})})}var wU={root:`_root_uvs6g_1`,input:`_input_uvs6g_6`,section:`_section_uvs6g_34`};function TU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,W.jsx)(Lb,{placeholder:r?`Listening...`:`Ask me anything...`,value:e,onChange:e=>t(e.currentTarget.value),disabled:n,radius:`md`,size:`md`,rightSection:a,rightSectionWidth:o,rightSectionPointerEvents:`all`,classNames:{root:wU.root,input:wU.input,section:wU.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function EU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:[(0,W.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`}),(0,W.jsx)(`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}),(0,W.jsx)(`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`})]})}function DU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:(0,W.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function OU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Vj();return(0,W.jsx)(ly,{label:e?`Stop recording`:`Voice input`,children:(0,W.jsx)(mu,{onClick:n,disabled:t,size:r??`lg`,radius:`md`,variant:e?`filled`:`subtle`,color:e?`red`:`primary`,"aria-label":e?`Stop voice recording`:`Start voice recording`,styles:{root:e?void 0:{backgroundColor:`transparent`,boxShadow:`inset 0 0 0 1px ${i.other.color[`primary-light`]}33`}},children:e?(0,W.jsx)(DU,{size:`sm`}):(0,W.jsx)(EU,{size:`sm`})})})}function kU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:[(0,W.jsx)(`path`,{d:`m22 2-7 20-4-9-9-4Z`}),(0,W.jsx)(`path`,{d:`M22 2 11 13`})]})}var AU={footer:`_footer_11ov5_1`,actionGroup:`_actionGroup_11ov5_8`,replyHint:`_replyHint_11ov5_12`,poweredBy:`_poweredBy_11ov5_19`};function jU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,isVoiceSupported:i,canSend:a,onSubmit:o,onToggleVoice:s,showBusyCancel:c=!1,onCancelBusy:l}){let u=i?74:40;return(0,W.jsxs)(zy,{className:AU.footer,gap:`sm`,children:[(0,W.jsx)(TU,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:u,rightSection:(0,W.jsxs)(wu,{className:AU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,W.jsx)(OU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),c&&l?(0,W.jsx)(ly,{label:`Your message was sent — stop the assistant reply`,children:(0,W.jsx)(mu,{onClick:l,size:30,radius:`md`,variant:`filled`,color:`red`,"aria-label":`Stop assistant reply after your message was sent`,children:(0,W.jsx)(DU,{size:`sm`})})}):(0,W.jsx)(mu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`primary`,"aria-label":`Send message`,children:(0,W.jsx)(kU,{size:`sm`})})]})}),c?(0,W.jsx)(Jf,{size:`xs`,c:`dimmed`,ta:`center`,className:AU.replyHint,children:`Your message was sent — you can stop the incoming reply.`}):null,(0,W.jsx)(Jf,{ta:`center`,size:`xs`,c:`dimmed`,className:AU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function MU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...cI(e),...t,children:[(0,W.jsx)(`rect`,{x:`4`,y:`4`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`}),(0,W.jsx)(`rect`,{x:`4`,y:`9.75`,width:`10`,height:`2.5`,rx:`1.2`,fill:`currentColor`,opacity:`0.88`}),(0,W.jsx)(`rect`,{x:`4`,y:`15.5`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`})]})}function NU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...cI(e),...t,children:(0,W.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function PU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:[(0,W.jsx)(`path`,{d:`M21 12a9 9 0 1 1-3-6.7`}),(0,W.jsx)(`path`,{d:`M21 3v6h-6`})]})}var FU={header:`_header_11nfx_19`,headerLeft:`_headerLeft_11nfx_32`,headerInfo:`_headerInfo_11nfx_37`,orbContainer:`_orbContainer_11nfx_41`,orbOuter:`_orbOuter_11nfx_55`,orbPulse:`_orbPulse_11nfx_1`,orbMiddle:`_orbMiddle_11nfx_64`,orbInner:`_orbInner_11nfx_73`,orbFloat:`_orbFloat_11nfx_1`,headerMeta:`_headerMeta_11nfx_86`,statusDot:`_statusDot_11nfx_90`,statusText:`_statusText_11nfx_104`,headerActions:`_headerActions_11nfx_113`,closeButton:`_closeButton_11nfx_120`,title:`_title_11nfx_131`,topSubHeader:`_topSubHeader_11nfx_143`,subHeaderLeft:`_subHeaderLeft_11nfx_153`,subHeaderIcon:`_subHeaderIcon_11nfx_159`,subHeaderTitle:`_subHeaderTitle_11nfx_170`,subHeaderStatus:`_subHeaderStatus_11nfx_176`};function IU({panelTitle:e,isLoading:t,isOnline:n,showResetChat:r=!1,onResetChat:i,onClose:a}){let o=Vj();return(0,W.jsxs)(wf,{className:FU.header,align:`center`,justify:`space-between`,children:[(0,W.jsxs)(wu,{className:FU.headerLeft,wrap:`nowrap`,gap:10,align:`center`,children:[(0,W.jsxs)(J,{className:FU.orbContainer,"data-loading":t||void 0,children:[(0,W.jsx)(J,{className:FU.orbOuter}),(0,W.jsx)(J,{className:FU.orbMiddle}),(0,W.jsx)(J,{className:FU.orbInner,children:(0,W.jsx)(MU,{size:`sm`,color:o.other.color[`text-white`]})})]}),(0,W.jsxs)(zy,{className:FU.headerInfo,gap:2,justify:`center`,children:[(0,W.jsx)(Jf,{className:FU.title,fw:800,children:e}),(0,W.jsxs)(wu,{className:FU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,W.jsx)(J,{className:FU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,W.jsx)(Jf,{className:FU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,W.jsxs)(wu,{className:FU.headerActions,wrap:`nowrap`,gap:6,children:[r&&i?(0,W.jsx)(ly,{label:`Reset chat and sign in again`,children:(0,W.jsx)(mu,{variant:`subtle`,size:`md`,radius:`md`,onClick:i,className:FU.closeButton,"aria-label":`Reset chat and sign in again`,children:(0,W.jsx)(PU,{size:`sm`})})}):null,(0,W.jsx)(ly,{label:`Close`,children:(0,W.jsx)(mu,{variant:`subtle`,size:`md`,radius:`md`,onClick:a,className:FU.closeButton,"aria-label":`Close agent chat`,children:(0,W.jsx)(NU,{size:`sm`})})})]})]})}function LU(e){return e.some(e=>e.sentBy===`assistant`?e.text.trim()?!0:!!(e.popup?.comparisonModal||e.popup?.title||e.popup?.subtitle||e.popup?.body):!1)}function RU({messages:e,runtimeInfo:t,error:n}){let r=t.hasCustomerToken&&t.hasGenaiToken,i=LU(e);return{hasCredentials:r,hasAssistantResponse:i,isOnline:r&&(!n||i)}}var zU={root:`_root_nkl8r_1`,surface:`_surface_nkl8r_9`,resizeHandle:`_resizeHandle_nkl8r_22`};function BU({visible:e,onClose:t,messages:n,composerText:r,onComposerTextChange:i,isLoading:a,isAssistantStreaming:o=!1,error:s,canSend:c,onSubmit:l,isListening:u,isVoiceSupported:d,onToggleVoice:f,actions:p,onActionClick:m,assistantDisplayName:h,panelTitle:g,runtimeInfo:_,scrollViewportRef:v,actualWidth:y=420,floatingTop:b=`var(--mantine-custom-space-150)`,floatingHeight:x=`100%`,floatingMaxHeight:S=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,shellGap:C=`var(--mantine-custom-space-150)`,panelHeaderHeight:w=56,panelResizableWidth:T,panelBorder:E,panelBorderRadius:D,zIndex:O,chatPopupOpened:k=!1,onChatPopupClose:A,chatPopupMessage:j,chatPopupSize:M=`xl`,hostContainerSelector:N,showBusyCancel:P=!1,onCancelBusy:ee,showResetChat:F=!1,onResetChat:I}){let{isOnline:te}=RU({messages:n,runtimeInfo:_,error:s}),ne=a||o,re=(O??999999)+50,ie=`calc(${y}px + ${C})`,L=e=>{if(e.type===`action-click`&&e.data){let t=p.find(t=>t.buttonText===e.data?.buttonText);t&&m(t)}};if(!e)return null;let R=typeof D==`number`?`${D}px`:D;return(0,W.jsxs)(J,{className:zU.root,style:{width:y,maxWidth:`calc(100vw - var(--mantine-custom-space-400) - var(--mantine-custom-space-400))`,height:x,maxHeight:S,top:b,right:C,zIndex:O,"--agent-widget-panel-header-height":`${w}px`,"--agent-widget-shell-gap":C,"--agent-widget-panel-border":E,"--agent-widget-panel-radius":R},children:[T&&(0,W.jsx)(J,{onPointerDown:T.handlePointerDown,className:zU.resizeHandle,style:T.style}),(0,W.jsxs)(J,{className:zU.surface,children:[(0,W.jsx)(IU,{panelTitle:g,isLoading:ne,isOnline:te,showResetChat:F,onResetChat:I,onClose:t}),(0,W.jsx)(CU,{messages:n,assistantDisplayName:h,isLoading:a,error:s,scrollViewportRef:v,onWidgetEvent:L}),(0,W.jsx)(jU,{composerText:r,onComposerTextChange:i,isLoading:ne,isListening:u,isVoiceSupported:d,canSend:c,onSubmit:l,onToggleVoice:f,showBusyCancel:P,onCancelBusy:ee})]}),A?(0,W.jsx)(rN,{opened:k,onClose:A,message:j,isAssistantStreaming:o,size:M,zIndex:re,layoutTop:b,layoutHeight:x,layoutLeftOffset:C,layoutRightOffset:ie,hostContainerSelector:N}):null]})}function VU(e){return(0,U.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}function HU(e){return typeof e==`object`&&!!e}function UU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function WU(e){if(Array.isArray(e))return e.filter(HU);if(!HU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(HU);if(HU(n)){let e=WU(n);if(e.length>0)return e}}for(let t of Object.values(e))if(Array.isArray(t)){let e=t.filter(HU);if(e.length>0)return e}return[]}function GU(e){let t=UU(e.assistantId??e.assistant_id??e.id??e.agentId??e.agent_id??e.appId??e.app_id);if(!t)return null;let n=e.description??e.appDescription??e.app_description??e.label??e.name??e.assistantName??e.assistant_name??e.agentName??e.agent_name??e.title,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.agentKey??e.agent_key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function KU(e){let t=UU(e.appId??e.app_id??e.id??e.assistantId??e.assistant_id);if(!t)return null;let n=e.description??e.name??e.label??e.title??e.appName??e.app_name,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function qU(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>KU(e)).filter(e=>e!==null);if(t.length>0)return t}let t=GU(e);return t?[t]:[]}function JU(e){return WU(e).flatMap(e=>qU(e))}var YU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},XU=dE(e=>({...YU,setRuntimeInfo:t=>e({runtimeInfo:t}),updateCustomerId:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,customerId:t}})),updateCustomerToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasCustomerToken:t}})),updateGenaiToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasGenaiToken:t}})),resetRuntimeInfo:()=>e({runtimeInfo:YU.runtimeInfo})})),ZU=24e4;async function QU(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await TE.post(`/login`,n,{anonymous:!0,headers:{"Content-Type":`application/x-www-form-urlencoded`}});return r.data?.access_token&&(gT(r.data.access_token),bT(!1)),r.data}catch(e){throw e}}async function $U(e,t){try{let n=await TE.post(`/tenants/switch`,{tenant_id:e},{anonymous:!0,headers:{Authorization:`Bearer ${t}`}});return n.data?.data?.access_token&&gT(n.data.data.access_token),vT(n.data?.data?.tenant_id??e),bT(!0),n.data}catch(e){throw e}}async function eW(e,t){try{return(await TE.post(`/agent-message`,e,{anonymous:!0,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function tW(e,t){try{return(await TE.post(`/agentic-app-chat`,e,{anonymous:!0,timeout:ZU,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function nW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function rW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var iW={loginToGenai:QU,switchTenant:$U,sendAgentMessage:eW,sendAgenticAppChat:tW,fetchAssistants:nW,fetchAgenticApps:rW};function aW({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return $x({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var oW=aW({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>iW.fetchAgenticApps(e)}),sW=aW({mutationKey:[`genai`,`assistants`],mutationFn:async e=>iW.fetchAssistants(e)});function cW(e,t){let n=typeof e==`number`&&e>0;return n&&t.length===0||n&&t.includes(e)?e:t[0]}function lW(e,t,n){let{mutateAsync:r}=sW(),{mutateAsync:i}=oW(),{isMultiAgent:a}=VU(e),[o,s]=(0,U.useState)(null),c=(0,U.useRef)(null),l=(0,U.useRef)(null),u=hT(),d=_T(),f=d?Number(d):null,p=yT();(0,U.useEffect)(()=>{if(!n){s(null);return}if(!u||!f||Number.isNaN(f)||f<=0||!p){s(null),c.current=null,l.current=null;return}let e=`${a?`multi`:`single`}:${f}:${u}`;if(c.current===e||l.current===e)return;l.current=e;let t=!0;return(async()=>{try{let n=a?await i({page:1,limit:10,customerToken:u,tenantId:f}):await r({page:1,limit:20,agent_type:`SINGLE`,customerToken:u,tenantId:f});if(!t)return;s(JU(n)),c.current=e}catch{t&&(s([]),c.current=null)}finally{l.current===e&&(l.current=null)}})(),()=>{t=!1}},[n,i,r,u,f,a,p]);let m=o??[],h=cW(t,m.map(e=>e.assistantId));return{availableAssistants:m,selectedAssistantId:h,selectedAssistant:m.find(e=>e.assistantId===h)}}function uW(){let e=(0,U.useContext)(OM),{agentType:t}=VU(e?.agentType),{selectedAssistantId:n,selectedAssistant:r}=lW(e?.agentType,e?.assistantId,!!e),i=(0,U.useMemo)(()=>e?{...e,assistantId:n??e.assistantId,agentType:t,assistantLabel:r?.label,assistantInitialMessage:r?.initialMessage}:null,[e,t,r,n]);if(!i)throw Error(`AgentConfigContext is missing.`);return i}function dW(){let e=(0,U.useContext)(kM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function fW(){let e=dW();return(0,U.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}var pW=aW({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e,signal:t})=>iW.sendAgenticAppChat(e,{signal:t})}),mW=aW({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e,signal:t})=>iW.sendAgentMessage(e,{signal:t})});function hW(){let e=mW(),t=pW();return{sendChatMessage:(0,U.useCallback)(async n=>{let{agentType:r,message:i,selectedAgentId:a,customerId:o,customerToken:s,chatId:c,signal:l}=n;return r===`MULTI`?t.mutateAsync({payload:{message:i,app_id:a,...o?{unique_user_id:o}:{}},signal:l}):e.mutateAsync({payload:{message:i,chat_id:c,assistant_id:a,is_sync:!0,...o?{unique_user_id:o}:{},tool_headers:{_default:{Authorization:`Bearer ${s}`}}},signal:l})},[e,t])}}function gW(e){return e.assistantId??null}function _W(e){return e.assistantLabel?.trim()||`Assistant`}function vW(e){return gW(e)?e.assistantInitialMessage??null:null}var yW=`popup`;function bW(e){return e&&typeof e==`object`?e:null}function xW(e){return typeof e==`string`&&e.trim()||null}function SW(e){return typeof e==`string`?e:null}function CW(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:Array.isArray(e)?e.map(e=>e===null||typeof e==`string`||typeof e==`number`?e:JSON.stringify(e)).filter(e=>e!==void 0):e&&typeof e==`object`?e:String(e)}function wW(e){let t=bW(e);if(!t)return null;let n=xW(t.title),r=xW(t.subtitle);if(!n||!r||!Array.isArray(t.columns)||t.columns.length===0)return null;let i=t.columns.map(e=>{let t=bW(e),n=bW(t?.header),r=bW(t?.specs),i=bW(t?.selectButton);if(!t||!n||!r)return null;let a=xW(n.label),o=xW(n.offerName),s=xW(t.columnType)??`default`;return!a||!o?null:{columnType:s,header:{label:a,offerName:o,badge:SW(n.badge)},specs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,CW(t)])),selectButton:i&&typeof i.buttonText==`string`&&typeof i.value==`string`?{buttonText:i.buttonText,value:i.value}:null}}).filter(e=>e!==null);return i.length>0?{title:n,subtitle:r,columns:i}:null}function TW(e){let t=bW(e);if(!t)return null;let n=xW(t.title),r=xW(t.subtitle),i=xW(t.body);return!n&&!r&&!i?null:{...n?{title:n}:{},...r?{subtitle:r}:{},...i?{body:i}:{}}}function EW(e){let t=xW(e.relatedAgent)??void 0,n=wW(e.comparisonModal);if(n)return{popup:{...t?{relatedAgent:t}:{},comparisonModal:n},summary:`${n.title} is ready. Open the comparison popup to review the market offers side by side.`};let r=TW(e);return r?{popup:r,summary:r.body??r.subtitle??r.title??`The popup details are ready to review.`}:null}function DW(e){return[bW(e.structuredData)?.renderAs,e.renderAs].some(e=>typeof e==`string`&&e.trim()===yW)}function OW(e){let t=bW(e.structuredData);return[bW(t?.popup),bW(e.popup),bW(t?.popupResponse),bW(e.popupResponse),t,e].filter(e=>e!==null)}function kW(e){let t=bW(e);if(!t||!DW(t))return null;for(let e of OW(t)){let t=EW(e);if(t)return t}return null}function AW(e){return e.replace(/\n{3,}/g,`
|
|
402
|
+
`)}function pU(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.structuredData&&typeof t.structuredData==`object`?t.structuredData:null;return typeof t.renderAs==`string`||typeof n?.renderAs==`string`}function mU(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:AH(t)}function hU(e,t){return(0,U.useMemo)(()=>{let n=hH(e),r=mU(n);if(r)return pU(r)?[{type:`markdown`,key:`json-0`,content:uU(fU(r))}]:[];let i=oH(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=dU(a,e.content,o);continue}try{let n=sH(e.dsl);if(!n){let t=mU(e.dsl);if(t&&!pU(t))continue;o=dU(a,t?fU(t):e.raw,o);continue}let r=qV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=dU(a,fU(r.payload),o)}catch(t){cU.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=dU(a,e.raw,o)}}return a},[e,t])}var gU={agentChatMdRenderer:`_agentChatMdRenderer_3p9l_1`},_U=(0,U.memo)(({content:e,onWidgetEvent:t})=>{let n=hU(e,t);return n.length===0?null:(0,W.jsx)(J,{className:gU.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,W.jsx)(dP,{html:e.content},e.key):(0,W.jsx)(J,{children:e.widget},e.key))})});_U.displayName=`AgentMarkdownRenderer`;function vU({mode:e=`thinking`,autoCycle:t=!0,cycleMs:n=2e3,exploringAfterMs:r=2e3,writingAfterMs:i=8e3,messages:a}){let[o,s]=(0,U.useState)(0);(0,U.useEffect)(()=>{if(!t)return;s(0);let e=setInterval(()=>{s(e=>e+1)},n);return()=>clearInterval(e)},[t,n]);let c=(0,U.useMemo)(()=>{if(!t)return e;let a=o*n;return a>=i?`writing`:a<r||o%2==0?`thinking`:`exploring`},[t,e,o,n,r,i]);return{label:(0,U.useMemo)(()=>{if(a&&a.length>0)return a[o%a.length];switch(c){case`exploring`:return`Exploring`;case`writing`:return`Writing`;default:return`Thinking`}},[a,o,c])}}function yU({size:e=`large`,mode:t=`thinking`,showLabel:n=!0,autoCycle:r=!0,cycleMs:i=2e3,exploringAfterMs:a=2e3,writingAfterMs:o=8e3,messages:s}){let{label:c}=vU({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,W.jsxs)(wu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,W.jsx)(Jf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,W.jsx)(ou,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,W.jsx)(Jf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var bU={body:`_body_oytjg_1`,messageBubble:`_messageBubble_oytjg_21`,messageItem:`_messageItem_oytjg_35`,messageItemEnter:`_messageItemEnter_oytjg_43`,messageSlideUp:`_messageSlideUp_oytjg_1`,streamingDots:`_streamingDots_oytjg_57`,streamingDot:`_streamingDot_oytjg_57`,streamingDotBounce:`_streamingDotBounce_oytjg_1`,messageItemUser:`_messageItemUser_oytjg_88`,messageItemAssistant:`_messageItemAssistant_oytjg_93`,messageBubbleUser:`_messageBubbleUser_oytjg_97`,messageText:`_messageText_oytjg_108`,messageBubbleAssistant:`_messageBubbleAssistant_oytjg_115`,messageTime:`_messageTime_oytjg_124`,messageTimeUser:`_messageTimeUser_oytjg_133`,messageTimeAssistant:`_messageTimeAssistant_oytjg_137`,messageList:`_messageList_oytjg_141`},xU=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`}),SU=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:xU.format(t)};function CU({messages:e,assistantDisplayName:t,isLoading:n,error:r,scrollViewportRef:i,onWidgetEvent:a}){let o=e.filter(e=>e.sentBy!==`assistant`||e.isStreaming?!0:!!e.text.trim());return(0,W.jsx)(zy,{className:bU.body,gap:0,children:(0,W.jsx)(al,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:i,children:(0,W.jsxs)(zy,{className:bU.messageList,gap:0,children:[o.map((e,n)=>{let r=e.sentBy===`user`,i=SU(e.createdAt),o=e.sentBy===`assistant`&&e.isStreaming&&e.text.length===0,s=e.sentBy===`assistant`?e.relatedAgent??t:null,c=e.sentBy===`assistant`?[s,i].filter(Boolean).join(` · `):i;return(0,W.jsxs)(J,{className:`${bU.messageItem} ${bU.messageItemEnter} ${r?bU.messageItemUser:bU.messageItemAssistant}`,style:{animationDelay:`${n*70}ms`},children:[(0,W.jsx)(ml,{className:`${bU.messageBubble} ${r?bU.messageBubbleUser:bU.messageBubbleAssistant}`,children:e.sentBy===`assistant`?o?(0,W.jsxs)(`span`,{className:bU.streamingDots,"aria-hidden":!0,children:[(0,W.jsx)(`span`,{className:bU.streamingDot}),(0,W.jsx)(`span`,{className:bU.streamingDot}),(0,W.jsx)(`span`,{className:bU.streamingDot})]}):(0,W.jsx)(_U,{content:e.text,onWidgetEvent:a}):(0,W.jsx)(Jf,{c:`inherit`,className:bU.messageText,children:e.text})}),c&&(0,W.jsx)(Jf,{size:`xs`,fw:800,className:`${bU.messageTime} ${r?bU.messageTimeUser:bU.messageTimeAssistant}`,children:c})]},e.id)}),n&&(0,W.jsx)(ml,{className:`${bU.messageBubble} ${bU.messageBubbleAssistant}`,children:(0,W.jsx)(yU,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})}),r&&(0,W.jsx)(Uf,{color:`red`,variant:`light`,radius:`md`,children:r})]})})})}var wU={root:`_root_uvs6g_1`,input:`_input_uvs6g_6`,section:`_section_uvs6g_34`};function TU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,W.jsx)(Lb,{placeholder:r?`Listening...`:`Ask me anything...`,value:e,onChange:e=>t(e.currentTarget.value),disabled:n,radius:`md`,size:`md`,rightSection:a,rightSectionWidth:o,rightSectionPointerEvents:`all`,classNames:{root:wU.root,input:wU.input,section:wU.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function EU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:[(0,W.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`}),(0,W.jsx)(`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}),(0,W.jsx)(`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`})]})}function DU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:(0,W.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function OU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Vj();return(0,W.jsx)(ly,{label:e?`Stop recording`:`Voice input`,children:(0,W.jsx)(mu,{onClick:n,disabled:t,size:r??`lg`,radius:`md`,variant:e?`filled`:`subtle`,color:e?`red`:`primary`,"aria-label":e?`Stop voice recording`:`Start voice recording`,styles:{root:e?void 0:{backgroundColor:`transparent`,boxShadow:`inset 0 0 0 1px ${i.other.color[`primary-light`]}33`}},children:e?(0,W.jsx)(DU,{size:`sm`}):(0,W.jsx)(EU,{size:`sm`})})})}function kU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:[(0,W.jsx)(`path`,{d:`m22 2-7 20-4-9-9-4Z`}),(0,W.jsx)(`path`,{d:`M22 2 11 13`})]})}var AU={footer:`_footer_11ov5_1`,actionGroup:`_actionGroup_11ov5_8`,replyHint:`_replyHint_11ov5_12`,poweredBy:`_poweredBy_11ov5_19`};function jU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,isVoiceSupported:i,canSend:a,onSubmit:o,onToggleVoice:s,showBusyCancel:c=!1,onCancelBusy:l}){let u=i?74:40;return(0,W.jsxs)(zy,{className:AU.footer,gap:`sm`,children:[(0,W.jsx)(TU,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:u,rightSection:(0,W.jsxs)(wu,{className:AU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,W.jsx)(OU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),c&&l?(0,W.jsx)(ly,{label:`Your message was sent — stop the assistant reply`,children:(0,W.jsx)(mu,{onClick:l,size:30,radius:`md`,variant:`filled`,color:`red`,"aria-label":`Stop assistant reply after your message was sent`,children:(0,W.jsx)(DU,{size:`sm`})})}):(0,W.jsx)(mu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`primary`,"aria-label":`Send message`,children:(0,W.jsx)(kU,{size:`sm`})})]})}),c?(0,W.jsx)(Jf,{size:`xs`,c:`dimmed`,ta:`center`,className:AU.replyHint,children:`Your message was sent — you can stop the incoming reply.`}):null,(0,W.jsx)(Jf,{ta:`center`,size:`xs`,c:`dimmed`,className:AU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function MU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...cI(e),...t,children:[(0,W.jsx)(`rect`,{x:`4`,y:`4`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`}),(0,W.jsx)(`rect`,{x:`4`,y:`9.75`,width:`10`,height:`2.5`,rx:`1.2`,fill:`currentColor`,opacity:`0.88`}),(0,W.jsx)(`rect`,{x:`4`,y:`15.5`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`})]})}function NU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...cI(e),...t,children:(0,W.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function PU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...cI(e),...t,children:[(0,W.jsx)(`path`,{d:`M21 12a9 9 0 1 1-3-6.7`}),(0,W.jsx)(`path`,{d:`M21 3v6h-6`})]})}var FU={header:`_header_11nfx_19`,headerLeft:`_headerLeft_11nfx_32`,headerInfo:`_headerInfo_11nfx_37`,orbContainer:`_orbContainer_11nfx_41`,orbOuter:`_orbOuter_11nfx_55`,orbPulse:`_orbPulse_11nfx_1`,orbMiddle:`_orbMiddle_11nfx_64`,orbInner:`_orbInner_11nfx_73`,orbFloat:`_orbFloat_11nfx_1`,headerMeta:`_headerMeta_11nfx_86`,statusDot:`_statusDot_11nfx_90`,statusText:`_statusText_11nfx_104`,headerActions:`_headerActions_11nfx_113`,closeButton:`_closeButton_11nfx_120`,title:`_title_11nfx_131`,topSubHeader:`_topSubHeader_11nfx_143`,subHeaderLeft:`_subHeaderLeft_11nfx_153`,subHeaderIcon:`_subHeaderIcon_11nfx_159`,subHeaderTitle:`_subHeaderTitle_11nfx_170`,subHeaderStatus:`_subHeaderStatus_11nfx_176`};function IU({panelTitle:e,isLoading:t,isOnline:n,showResetChat:r=!1,onResetChat:i,onClose:a}){let o=Vj();return(0,W.jsxs)(wf,{className:FU.header,align:`center`,justify:`space-between`,children:[(0,W.jsxs)(wu,{className:FU.headerLeft,wrap:`nowrap`,gap:10,align:`center`,children:[(0,W.jsxs)(J,{className:FU.orbContainer,"data-loading":t||void 0,children:[(0,W.jsx)(J,{className:FU.orbOuter}),(0,W.jsx)(J,{className:FU.orbMiddle}),(0,W.jsx)(J,{className:FU.orbInner,children:(0,W.jsx)(MU,{size:`sm`,color:o.other.color[`text-white`]})})]}),(0,W.jsxs)(zy,{className:FU.headerInfo,gap:2,justify:`center`,children:[(0,W.jsx)(Jf,{className:FU.title,fw:800,children:e}),(0,W.jsxs)(wu,{className:FU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,W.jsx)(J,{className:FU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,W.jsx)(Jf,{className:FU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,W.jsxs)(wu,{className:FU.headerActions,wrap:`nowrap`,gap:6,children:[r&&i?(0,W.jsx)(ly,{label:`Reset chat and sign in again`,children:(0,W.jsx)(mu,{variant:`subtle`,size:`md`,radius:`md`,onClick:i,className:FU.closeButton,"aria-label":`Reset chat and sign in again`,children:(0,W.jsx)(PU,{size:`sm`})})}):null,(0,W.jsx)(ly,{label:`Close`,children:(0,W.jsx)(mu,{variant:`subtle`,size:`md`,radius:`md`,onClick:a,className:FU.closeButton,"aria-label":`Close agent chat`,children:(0,W.jsx)(NU,{size:`sm`})})})]})]})}function LU(e){return e.some(e=>e.sentBy===`assistant`?e.text.trim()?!0:!!(e.popup?.comparisonModal||e.popup?.title||e.popup?.subtitle||e.popup?.body):!1)}function RU({messages:e,runtimeInfo:t,error:n}){let r=t.hasCustomerToken&&t.hasGenaiToken,i=LU(e);return{hasCredentials:r,hasAssistantResponse:i,isOnline:r&&(!n||i)}}var zU={root:`_root_nkl8r_1`,surface:`_surface_nkl8r_9`,resizeHandle:`_resizeHandle_nkl8r_22`};function BU({visible:e,onClose:t,messages:n,composerText:r,onComposerTextChange:i,isLoading:a,isAssistantStreaming:o=!1,error:s,canSend:c,onSubmit:l,isListening:u,isVoiceSupported:d,onToggleVoice:f,actions:p,onActionClick:m,assistantDisplayName:h,panelTitle:g,runtimeInfo:_,scrollViewportRef:v,actualWidth:y=420,floatingTop:b=`var(--mantine-custom-space-150)`,floatingHeight:x=`100%`,floatingMaxHeight:S=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,shellGap:C=`var(--mantine-custom-space-150)`,panelHeaderHeight:w=56,panelResizableWidth:T,panelBorder:E,panelBorderRadius:D,zIndex:O,chatPopupOpened:k=!1,onChatPopupClose:A,chatPopupMessage:j,chatPopupSize:M=`xl`,hostContainerSelector:N,showBusyCancel:P=!1,onCancelBusy:ee,showResetChat:F=!1,onResetChat:I}){let{isOnline:te}=RU({messages:n,runtimeInfo:_,error:s}),ne=a||o,re=(O??999999)+50,ie=`calc(${y}px + ${C})`,L=e=>{if(e.type===`action-click`&&e.data){let t=p.find(t=>t.buttonText===e.data?.buttonText);t&&m(t)}};if(!e)return null;let R=typeof D==`number`?`${D}px`:D;return(0,W.jsxs)(J,{className:zU.root,style:{width:y,maxWidth:`calc(100vw - var(--mantine-custom-space-400) - var(--mantine-custom-space-400))`,height:x,maxHeight:S,top:b,right:C,zIndex:O,"--agent-widget-panel-header-height":`${w}px`,"--agent-widget-shell-gap":C,"--agent-widget-panel-border":E,"--agent-widget-panel-radius":R},children:[T&&(0,W.jsx)(J,{onPointerDown:T.handlePointerDown,className:zU.resizeHandle,style:T.style}),(0,W.jsxs)(J,{className:zU.surface,children:[(0,W.jsx)(IU,{panelTitle:g,isLoading:ne,isOnline:te,showResetChat:F,onResetChat:I,onClose:t}),(0,W.jsx)(CU,{messages:n,assistantDisplayName:h,isLoading:a,error:s,scrollViewportRef:v,onWidgetEvent:L}),(0,W.jsx)(jU,{composerText:r,onComposerTextChange:i,isLoading:ne,isListening:u,isVoiceSupported:d,canSend:c,onSubmit:l,onToggleVoice:f,showBusyCancel:P,onCancelBusy:ee})]}),A?(0,W.jsx)(rN,{opened:k,onClose:A,message:j,isAssistantStreaming:o,size:M,zIndex:re,layoutTop:b,layoutHeight:x,layoutLeftOffset:C,layoutRightOffset:ie,hostContainerSelector:N,panelBorderRadius:D}):null]})}function VU(e){return(0,U.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}function HU(e){return typeof e==`object`&&!!e}function UU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function WU(e){if(Array.isArray(e))return e.filter(HU);if(!HU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(HU);if(HU(n)){let e=WU(n);if(e.length>0)return e}}for(let t of Object.values(e))if(Array.isArray(t)){let e=t.filter(HU);if(e.length>0)return e}return[]}function GU(e){let t=UU(e.assistantId??e.assistant_id??e.id??e.agentId??e.agent_id??e.appId??e.app_id);if(!t)return null;let n=e.description??e.appDescription??e.app_description??e.label??e.name??e.assistantName??e.assistant_name??e.agentName??e.agent_name??e.title,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.agentKey??e.agent_key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function KU(e){let t=UU(e.appId??e.app_id??e.id??e.assistantId??e.assistant_id);if(!t)return null;let n=e.description??e.name??e.label??e.title??e.appName??e.app_name,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function qU(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>KU(e)).filter(e=>e!==null);if(t.length>0)return t}let t=GU(e);return t?[t]:[]}function JU(e){return WU(e).flatMap(e=>qU(e))}var YU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},XU=dE(e=>({...YU,setRuntimeInfo:t=>e({runtimeInfo:t}),updateCustomerId:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,customerId:t}})),updateCustomerToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasCustomerToken:t}})),updateGenaiToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasGenaiToken:t}})),resetRuntimeInfo:()=>e({runtimeInfo:YU.runtimeInfo})})),ZU=24e4;async function QU(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await TE.post(`/login`,n,{anonymous:!0,headers:{"Content-Type":`application/x-www-form-urlencoded`}});return r.data?.access_token&&(gT(r.data.access_token),bT(!1)),r.data}catch(e){throw e}}async function $U(e,t){try{let n=await TE.post(`/tenants/switch`,{tenant_id:e},{anonymous:!0,headers:{Authorization:`Bearer ${t}`}});return n.data?.data?.access_token&&gT(n.data.data.access_token),vT(n.data?.data?.tenant_id??e),bT(!0),n.data}catch(e){throw e}}async function eW(e,t){try{return(await TE.post(`/agent-message`,e,{anonymous:!0,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function tW(e,t){try{return(await TE.post(`/agentic-app-chat`,e,{anonymous:!0,timeout:ZU,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function nW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function rW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var iW={loginToGenai:QU,switchTenant:$U,sendAgentMessage:eW,sendAgenticAppChat:tW,fetchAssistants:nW,fetchAgenticApps:rW};function aW({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return $x({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var oW=aW({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>iW.fetchAgenticApps(e)}),sW=aW({mutationKey:[`genai`,`assistants`],mutationFn:async e=>iW.fetchAssistants(e)});function cW(e,t){let n=typeof e==`number`&&e>0;return n&&t.length===0||n&&t.includes(e)?e:t[0]}function lW(e,t,n){let{mutateAsync:r}=sW(),{mutateAsync:i}=oW(),{isMultiAgent:a}=VU(e),[o,s]=(0,U.useState)(null),c=(0,U.useRef)(null),l=(0,U.useRef)(null),u=hT(),d=_T(),f=d?Number(d):null,p=yT();(0,U.useEffect)(()=>{if(!n){s(null);return}if(!u||!f||Number.isNaN(f)||f<=0||!p){s(null),c.current=null,l.current=null;return}let e=`${a?`multi`:`single`}:${f}:${u}`;if(c.current===e||l.current===e)return;l.current=e;let t=!0;return(async()=>{try{let n=a?await i({page:1,limit:10,customerToken:u,tenantId:f}):await r({page:1,limit:20,agent_type:`SINGLE`,customerToken:u,tenantId:f});if(!t)return;s(JU(n)),c.current=e}catch{t&&(s([]),c.current=null)}finally{l.current===e&&(l.current=null)}})(),()=>{t=!1}},[n,i,r,u,f,a,p]);let m=o??[],h=cW(t,m.map(e=>e.assistantId));return{availableAssistants:m,selectedAssistantId:h,selectedAssistant:m.find(e=>e.assistantId===h)}}function uW(){let e=(0,U.useContext)(OM),{agentType:t}=VU(e?.agentType),{selectedAssistantId:n,selectedAssistant:r}=lW(e?.agentType,e?.assistantId,!!e),i=(0,U.useMemo)(()=>e?{...e,assistantId:n??e.assistantId,agentType:t,assistantLabel:r?.label,assistantInitialMessage:r?.initialMessage}:null,[e,t,r,n]);if(!i)throw Error(`AgentConfigContext is missing.`);return i}function dW(){let e=(0,U.useContext)(kM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function fW(){let e=dW();return(0,U.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}var pW=aW({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e,signal:t})=>iW.sendAgenticAppChat(e,{signal:t})}),mW=aW({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e,signal:t})=>iW.sendAgentMessage(e,{signal:t})});function hW(){let e=mW(),t=pW();return{sendChatMessage:(0,U.useCallback)(async n=>{let{agentType:r,message:i,selectedAgentId:a,customerId:o,customerToken:s,chatId:c,signal:l}=n;return r===`MULTI`?t.mutateAsync({payload:{message:i,app_id:a,...o?{unique_user_id:o}:{}},signal:l}):e.mutateAsync({payload:{message:i,chat_id:c,assistant_id:a,is_sync:!0,...o?{unique_user_id:o}:{},tool_headers:{_default:{Authorization:`Bearer ${s}`}}},signal:l})},[e,t])}}function gW(e){return e.assistantId??null}function _W(e){return e.assistantLabel?.trim()||`Assistant`}function vW(e){return gW(e)?e.assistantInitialMessage??null:null}var yW=`popup`;function bW(e){return e&&typeof e==`object`?e:null}function xW(e){return typeof e==`string`&&e.trim()||null}function SW(e){return typeof e==`string`?e:null}function CW(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:Array.isArray(e)?e.map(e=>e===null||typeof e==`string`||typeof e==`number`?e:JSON.stringify(e)).filter(e=>e!==void 0):e&&typeof e==`object`?e:String(e)}function wW(e){let t=bW(e);if(!t)return null;let n=xW(t.title),r=xW(t.subtitle);if(!n||!r||!Array.isArray(t.columns)||t.columns.length===0)return null;let i=t.columns.map(e=>{let t=bW(e),n=bW(t?.header),r=bW(t?.specs),i=bW(t?.selectButton);if(!t||!n||!r)return null;let a=xW(n.label),o=xW(n.offerName),s=xW(t.columnType)??`default`;return!a||!o?null:{columnType:s,header:{label:a,offerName:o,badge:SW(n.badge)},specs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,CW(t)])),selectButton:i&&typeof i.buttonText==`string`&&typeof i.value==`string`?{buttonText:i.buttonText,value:i.value}:null}}).filter(e=>e!==null);return i.length>0?{title:n,subtitle:r,columns:i}:null}function TW(e){let t=bW(e);if(!t)return null;let n=xW(t.title),r=xW(t.subtitle),i=xW(t.body);return!n&&!r&&!i?null:{...n?{title:n}:{},...r?{subtitle:r}:{},...i?{body:i}:{}}}function EW(e){let t=xW(e.relatedAgent)??void 0,n=wW(e.comparisonModal);if(n)return{popup:{...t?{relatedAgent:t}:{},comparisonModal:n},summary:`${n.title} is ready. Open the comparison popup to review the market offers side by side.`};let r=TW(e);return r?{popup:r,summary:r.body??r.subtitle??r.title??`The popup details are ready to review.`}:null}function DW(e){return[bW(e.structuredData)?.renderAs,e.renderAs].some(e=>typeof e==`string`&&e.trim()===yW)}function OW(e){let t=bW(e.structuredData);return[bW(t?.popup),bW(e.popup),bW(t?.popupResponse),bW(e.popupResponse),t,e].filter(e=>e!==null)}function kW(e){let t=bW(e);if(!t||!DW(t))return null;for(let e of OW(t)){let t=EW(e);if(t)return t}return null}function AW(e){return e.replace(/\n{3,}/g,`
|
|
403
403
|
|
|
404
404
|
`).trim()}function jW(e){return xW(bW(e.structuredData)?.relatedAgent)??xW(e.relatedAgent)??void 0}function MW(e,t){return{...e??{},...t,relatedAgent:t.relatedAgent??e?.relatedAgent,comparisonModal:t.comparisonModal??e?.comparisonModal}}function NW(e){let t=QV(e),n,r=null,i=0,a=[];for(;;){let e=t.slice(i),o=jH(e);if(!o)break;a.push(XV(e.slice(0,o.start)));let s=kW(AH(o.json.trim())),c=e.slice(o.start+o.consumed),l=LH(c),u=IH(c.slice(l)),d=o.start+o.consumed+l+u;s?(n=MW(n,s.popup),r??=s.summary):a.push(e.slice(o.start,d)),i+=d}return a.push(t.slice(i)),n?{displayText:AW(a.join(``).trim())||r||e,popup:n}:null}function PW(e){let t=QV(e),n=0;for(;;){let e=t.slice(n),r=jH(e);if(!r)break;let i=bW(AH(r.json.trim())),a=i?jW(i):void 0;if(a)return a;let o=e.slice(r.start+r.consumed),s=LH(o),c=IH(o.slice(s)),l=r.start+r.consumed+s+c;n+=l}let r=t.trim();if(!r||!/^[{\[]/.test(r))return;let i=bW(AH(r));return i?jW(i):void 0}function FW(e){let t=NW(e);if(t)return t;let n=e.trim();if(!n||!/^[{\[]/.test(n))return{displayText:e};let r=kW(AH(n));return r?{displayText:r.summary,popup:r.popup}:{displayText:e}}function IW(e){return e.customerId}function LW(e){return e.customerToken}function RW(e){return e.language??null}function zW(e){if(!e||typeof e!=`object`)return null;let t=e,n=t.message??(Array.isArray(t.messages)?t.messages[0]:null);if(!n||typeof n!=`object`)return null;let r=n.chat_id,i=typeof r==`number`&&Number.isFinite(r)?r:null,a=typeof n.message==`string`?n.message:``,o=typeof n.created_at==`string`?n.created_at:new Date().toISOString();return a?{chatId:i,text:a,createdAt:o}:null}function BW(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function VW(e){return e.match(/\S+|\s+/g)??[]}function HW(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?!1:(t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`))&&TH(t)!=null}function UW(e){return Jw.isCancel(e)}var WW=800;function GW(e){return e?HW(e)?!0:e.includes("```")?hH(e).includes("```markdown-ui-widget"):!1:!1}function KW(){let e=dW(),t=fW(),n=uW(),{agentType:r,isMultiAgent:i}=VU(n.agentType),{sendChatMessage:a}=hW(),[o,s]=(0,U.useState)([]),[c,l]=(0,U.useState)(``),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(!1),[v,y]=(0,U.useState)(null),[b,x]=(0,U.useState)(!1),[S,C]=(0,U.useState)(null),[w,T]=(0,U.useState)(!0),E=(0,U.useRef)(!1),D=(0,U.useRef)(null),O=(0,U.useRef)(!1),k=(0,U.useRef)(null),A=(0,U.useRef)(null),j=(0,U.useRef)(!0),M=(0,U.useRef)(null),N=gW(n),[P,ee]=(0,U.useState)(null);(0,U.useEffect)(()=>{P===null&&n.assistantLabel?.trim()&&ee(n.assistantLabel.trim())},[n.assistantLabel,P]);let F=P??_W(n),I=(0,U.useCallback)(()=>{D.current!==null&&(globalThis.clearTimeout(D.current),D.current=null)},[]),te=(0,U.useCallback)(()=>{M.current!==null&&(globalThis.clearTimeout(M.current),M.current=null)},[]);(0,U.useEffect)(()=>()=>{I(),te()},[I,te]);let ne=(0,U.useCallback)(e=>{j.current=e,T(e)},[]),re=(0,U.useCallback)(e=>{let t={id:BW(),sentBy:`user`,text:e};s(e=>[...e,t])},[]),ie=(0,U.useCallback)((e,t,n,r)=>{te();let i=BW();O.current=!0,k.current=i,_(!0),y(i),s(e=>[...e,{id:i,sentBy:`assistant`,text:``,createdAt:t,...r?{relatedAgent:r}:{},isStreaming:!0,...n?{popup:n}:{}}]),n&&C(i);let a=VW(e),o=0,c=``,l=()=>{O.current=!1,k.current=null,I(),_(!1),y(null),ne(!0),s(t=>t.map(t=>t.id===i?{...t,text:e,relatedAgent:r,isStreaming:!1}:t)),n&&(te(),M.current=globalThis.setTimeout(()=>{M.current=null,x(!0)},WW))},u=()=>{if(o>=a.length){l();return}let e=a[o];if(c+=e,o+=1,GW(c)){l();return}s(e=>e.map(e=>e.id===i?{...e,text:c,isStreaming:!0}:e));let t=/^\s+$/.test(e)?6+Math.random()*8:e.endsWith(`.`)||e.endsWith(`!`)||e.endsWith(`?`)||e.endsWith(`:`)?80+Math.random()*50:25+Math.random()*20;D.current=globalThis.setTimeout(u,t)};if(a.length===0){l();return}D.current=globalThis.setTimeout(u,30)},[te,I,ne]),L=(0,U.useCallback)(()=>{te(),x(!1),C(null)},[te]),R=S?o.find(e=>e.id===S):void 0,ae=(0,U.useCallback)(()=>{if(!j.current)return;A.current?.abort(),A.current=null,I(),O.current=!1;let e=k.current;k.current=null,y(null),_(!1),te(),e&&s(t=>t.filter(t=>t.id!==e)),x(!1),C(null),p(!1),h(null),ne(!0)},[te,I,ne]),oe=(0,U.useCallback)(async(o,s)=>{if(!o.trim()||g)return;if(l(``),s?.showUserBubble!==!1&&re(s?.userBubbleText?.trim()||o),!e||!n){h(`Chat is not configured.`);return}if(!N){h(`Chat configuration is missing.`);return}let c=IW(e),f=i?null:t;if(!i&&!f){h(`Missing customer token.`);return}A.current?.abort();let m=new AbortController;A.current=m,ne(s?.cancellable!==!1),p(!0),h(null);try{let e=zW(await a({agentType:r,message:o,selectedAgentId:N,customerId:c||void 0,customerToken:f??``,chatId:u,signal:m.signal}));if(!e){ne(!0);return}e.chatId!==null&&d(e.chatId);let t=FW(e.text),n=t.popup,i=n?.relatedAgent??PW(e.text);ie(t.displayText,e.createdAt,n,i)}catch(e){if(UW(e))return;h(aE(e)),ne(!0)}finally{p(!1),A.current===m&&(A.current=null)}},[e,n,u,re,ie,a,t,r,i,g,N,ne]);return{messages:o,composerText:c,setComposerText:l,isLoading:f,isAssistantStreaming:g,error:m,sendMessage:oe,sendInitialMessage:(0,U.useCallback)(async()=>{if(E.current||f||g||o.length>0||!e||!n||!gW(n))return!1;let t=IW(e),r=vW(n)?.trim(),i=null;return i=r?t?`${r} ${t}`.trim():r:t?`Hello, my customer id is ${t}`:`Hello`,i.trim()?(E.current=!0,await oe(i,{showUserBubble:!1,cancellable:!1}),!0):!1},[e,n,f,g,o.length,oe]),resetChat:(0,U.useCallback)(()=>{A.current?.abort(),A.current=null,te(),I(),O.current=!1,k.current=null,_(!1),y(null),x(!1),C(null),s([]),l(``),d(null),h(null),E.current=!1,ne(!0),ee(null)},[te,I,ne]),cancelAgentOperation:ae,canCancelBusyTurn:w,agentDisplayName:F,canSend:c.trim().length>0&&!g,streamingMessageId:v,chatPopupOpen:b,chatPopupMessage:R,closeChatPopup:L}}function qW(e,t){let n=(0,U.useRef)([]),[r,i]=(0,U.useState)(null),a=(0,U.useMemo)(()=>{let t=[...e].reverse().find(e=>e.sentBy===`assistant`);if(!t)return n.current;let r=pH(t.text).find(e=>e.type===`widget`&&e.config.type===`actions`),i=r?.type===`widget`?r.config.actions??[]:[];return i.length>0&&(n.current=i),n.current},[e]);return(0,U.useEffect)(()=>{r&&(a.some(e=>e.buttonText===r.buttonText&&e.agentMessage===r.agentMessage&&e.targetAgent===r.targetAgent)||i(null))},[a,r]),{actions:a,handleActionClick:(0,U.useCallback)(e=>{i(e),t(e.buttonText)},[t]),handleComposerTextChange:(0,U.useCallback)(e=>{r&&e.trim()!==r.buttonText.trim()&&i(null),t(e)},[r,t]),clearSelectedAction:(0,U.useCallback)(()=>{i(null)},[])}}function JW(e={}){let{axis:t=`y`,direction:n=1,onResizeChange:r}=e,[i,a]=(0,U.useState)(0),o=(0,U.useRef)({startPos:0,startOffset:0}),{startInteraction:s}=IM(),c=t===`y`?`ns-resize`:t===`x`?`ew-resize`:`nwse-resize`;return{offset:i,handlePointerDown:(0,U.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let l=t===`y`?e.clientY:e.clientX,u=i;o.current={startPos:l,startOffset:u},s({cursor:c,onMove:e=>{let i;i=t===`y`?-(e.clientY-l):(e.clientX-l)*n;let o=u+i;a(o),r?.(o)}})},[i,t,n,c,r,s]),style:{cursor:c,touchAction:`none`}}}var YW=[`#root main`,`#root`,`main`,`.main-content`,`#app`,`body`];function XW(e,t,n,r,i){let a=(0,U.useRef)(Math.max(280,t??420)),o=(0,U.useRef)(n??!1),s=(0,U.useRef)(null),c=e?.reserveLayoutSpace??!0,l=(0,U.useCallback)(()=>{let t=e?.hostContainerSelector,n=[...t?t.split(`,`).map(e=>e.trim()).filter(Boolean):[],...YW];for(let e of n){let t=document.querySelector(e);if(t)return t}return document.body},[e?.hostContainerSelector]),u=(0,U.useCallback)(e=>{let t=document.documentElement;if(!c){if(t.style.removeProperty(`--agent-widget-panel-width`),s.current){let{element:e,inlinePaddingBefore:t}=s.current;e.style.paddingRight=t,s.current=null}return}if(e===null?t.style.removeProperty(`--agent-widget-panel-width`):t.style.setProperty(`--agent-widget-panel-width`,`${e}px`),e===null){if(s.current){let{element:e,inlinePaddingBefore:t}=s.current;e.style.paddingRight=t,s.current=null}return}if(!s.current||!document.contains(s.current.element)){let e=l();if(!e)return;s.current={element:e,inlinePaddingBefore:e.style.paddingRight,widthApplied:0}}let{element:n,inlinePaddingBefore:r,widthApplied:i}=s.current;e!==i&&(n.style.paddingRight=r,n.style.paddingRight=`calc(${r||`0px`} + ${e}px)`,s.current.widthApplied=e)},[l,c]),d=JW({axis:`x`,direction:-1,onResizeChange:(0,U.useCallback)(e=>{let n=Math.max(280,(t??420)+e);a.current=n,u(n)},[t,u])});(0,U.useEffect)(()=>{o.current=n??!1},[n]),(0,U.useEffect)(()=>{let e=Math.max(280,t??420);a.current=e,o.current&&u(e)},[t,u]),(0,U.useEffect)(()=>{if(!n){u(null),document.documentElement.removeAttribute(`data-agent-widget-open`);return}return u(a.current),document.documentElement.setAttribute(`data-agent-widget-open`,`true`),()=>{u(null),document.documentElement.removeAttribute(`data-agent-widget-open`)}},[n,u]);let f=d?Math.max(280,(t??420)+d.offset):t??420,p=r===`100%`||r===`100vh`,m=typeof e?.panelGap==`number`?`${e.panelGap}px`:e?.panelGap??`var(--mantine-custom-space-150)`,h=i??0;return{panelResizableWidth:d,actualWidth:f,shellGap:m,floatingTop:h?`calc(${h}px + ${m})`:m,floatingHeight:p?`calc(100vh - ${h}px - ${m} - ${m})`:typeof r==`number`?`${r}px`:r??`100%`,floatingMaxHeight:`calc(100vh - ${h}px - ${m} - ${m})`}}function ZW(){let e=dW(),{runtimeInfo:t,setRuntimeInfo:n}=XU(),r=(0,U.useCallback)(async()=>{if(!e){n({customerId:null,hasCustomerToken:!1,hasGenaiToken:!1});return}let t=IW(e),r=await LW(e),i=hT();n({customerId:t,hasCustomerToken:!!r,hasGenaiToken:!!i})},[e,n]);return(0,U.useEffect)(()=>{r()},[e,r]),{runtimeInfo:t,refreshRuntimeInfo:r}}function QW(){let e=dW();return(0,U.useMemo)(()=>e&&RW(e)||`en-US`,[e])}function $W(e={}){let{lang:t=`en-EN`,continuous:n=!0,interimResults:r=!0,onResult:i,onError:a,onTextChange:o,pauseOnSubmit:s=!1}=e,[c,l]=(0,U.useState)(!1),[u,d]=(0,U.useState)(``),[f,p]=(0,U.useState)(!1),m=(0,U.useRef)(null),h=(0,U.useRef)(``),g=(0,U.useRef)(!1),_=(0,U.useRef)(!1),v=(0,U.useRef)(``),y=(0,U.useRef)(``),b=(0,U.useRef)(null),x=(0,U.useRef)(!1),S=(0,U.useRef)(o),C=(0,U.useRef)(c);(0,U.useEffect)(()=>{S.current=o,C.current=c}),(0,U.useEffect)(()=>{let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(typeof e!=`function`){p(!1);return}let o;try{o=new e,p(!0)}catch(e){console.log(`useAgentSpeechToText: Speech recognition is present but not constructable`,e),p(!1);return}return o.lang=t,o.continuous=n,o.interimResults=r,o.onresult=e=>{if(x.current)return;_.current=!0;let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r++){let i=e.results[r],a=i[0].transcript;i.isFinal?t+=a+` `:n+=a}t&&(h.current=(h.current+` `+t).trim());let r=(h.current+` `+n).trim();if(d(r),i?.(r,!!t),S.current)if(t){b.current!=null&&(cancelAnimationFrame(b.current),b.current=null);let e=v.current.trim(),t=[e,r.replace(e,``).trim()].filter(Boolean).join(` `).trim();v.current=t,S.current(t)}else y.current=r,b.current??=requestAnimationFrame(()=>{b.current=null;let e=y.current;S.current?.(e)})},o.onerror=e=>{console.log(`useAgentSpeechToText: Speech recognition error`,e.error),l(!1),a?.(e.error)},o.onend=()=>{if(g.current||!C.current){l(!1);return}queueMicrotask(()=>{if(!g.current)try{m.current?.start()}catch{l(!1)}})},m.current=o,()=>{m.current&&m.current.stop()}},[t,n,r,i,a]);let w=(0,U.useCallback)(()=>{if(!(!m.current||!f))try{d(``),h.current=``,g.current=!1,_.current=!1,x.current=!1,v.current=``,y.current=``,b.current!=null&&(cancelAnimationFrame(b.current),b.current=null),m.current.start(),l(!0)}catch(e){console.log(`useAgentSpeechToText: Failed to start speech recognition`,e),a?.(`Failed to start speech recognition`)}},[f,a]),T=(0,U.useCallback)(()=>{if(m.current)try{g.current=!0,m.current.stop(),l(!1)}catch(e){console.log(`useAgentSpeechToText: Failed to stop speech recognition`,e)}},[]);return{isListening:c,transcript:u,isSupported:f,startListening:w,stopListening:T,toggleListening:(0,U.useCallback)(()=>{c?T():w()},[c,w,T]),reset:(0,U.useCallback)(()=>{x.current=!0,v.current=``,y.current=``,b.current!=null&&(cancelAnimationFrame(b.current),b.current=null),s&&setTimeout(()=>{x.current=!1},500)},[s])}}var eG={bottom:24,right:24},tG=1e4;function nG(e){return{panelWidth:e?.panelWidth??420,panelHeight:e?.panelHeight??`100%`,panelHeaderHeight:e?.panelHeaderHeight??56,panelTopOffset:e?.panelTopOffset,panelGap:e?.panelGap,panelBorder:e?.panelBorder,panelBorderRadius:e?.panelBorderRadius,hostContainerSelector:e?.hostContainerSelector,zIndex:e?.zIndex??tG,fabPosition:{...typeof e?.fabTopOffset==`number`?{top:e.fabTopOffset}:{bottom:e?.fabBottomOffset??eG.bottom},...typeof e?.fabLeftOffset==`number`?{left:e.fabLeftOffset}:{right:e?.fabRightOffset??eG.right}}}}function rG({isListening:e,stopListening:t,reset:n,sendMessage:r,composerText:i,setComposerText:a,startListening:o,close:s,onSubmitComplete:c}){return{handleSubmit:()=>{e&&t(),n(),r(i),c?.()},handleToggleVoice:()=>{e?t():(a(``),o())},handleClose:()=>{e&&t(),s()}}}var iG=64;function aG(e,t={}){let{enabled:n=!0,behavior:r=`smooth`}=t,i=(0,U.useRef)(null),a=(0,U.useRef)(!0);return(0,U.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{a.current=e.scrollHeight-e.scrollTop-e.clientHeight<=iG},n=()=>{t()};return e.addEventListener(`scroll`,n),()=>e.removeEventListener(`scroll`,n)},[]),(0,U.useEffect)(()=>{if(!n||!a.current)return;let e=i.current;if(!e)return;let t=()=>{let t=globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches?`auto`:r;requestAnimationFrame(()=>{let n=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTo({top:n,behavior:t})})};requestAnimationFrame(()=>requestAnimationFrame(t))},e),i}var oG=aW({mutationKey:[`genai`,`login`],mutationFn:async({serviceAccount:e,serviceKey:t})=>iW.loginToGenai(e,t)}),sG=new hE(`useGenaiLogin`),cG=null,lG=null;function uG(e=!1,t=0){let n=(0,U.useContext)(OM),{mutateAsync:r}=oG(),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(null),f=n?.serviceAccount,p=n?.serviceKey,m=n?.tenantId;return(0,U.useEffect)(()=>{(async()=>{let n=f&&p&&m?{serviceAccount:f,serviceKey:p,tenantId:m}:null;n&&d(n);let i=e||t>0,o=hT();if(o&&!i){l(o);return}if(!n)return;let c=`${n.serviceAccount}::${n.serviceKey}`;if(cG===c&&!i){lG&&l(await lG);return}i&&(cG=null,lG=null),cG=c,a(!0),s(null),lG=(async()=>(await r({serviceAccount:n.serviceAccount,serviceKey:n.serviceKey})).access_token??null)();try{l(await lG)}catch(e){sG.error(`GenAI login failed`,{error:e instanceof Error?e.message:String(e)}),s(aE(e))}finally{lG=null,a(!1)}})()},[f,p,m,r,e,t]),{isLoggingIn:i,loginError:o,loginToken:c,genaiInit:u}}var dG=aW({mutationKey:[`genai`,`tenant-switch`],mutationFn:async({tenant_id:e,token:t})=>iW.switchTenant(e,t)}),fG=new hE(`useGenaiTenantSwitch`),pG=null,mG=null;function hG(e,t,n=!1,r=0,i=!1){let{mutateAsync:a}=dG(),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(!1);return(0,U.useEffect)(()=>{(async()=>{if(!e||!t||(n||r>0)&&i)return;let o=n||r>0,c=hT();if(c&&c!==e&&!o){d(!0);return}if(mG===e&&!o){pG&&await pG,d(!!hT());return}o&&(mG=null,pG=null),mG=e,s(!0),l(null),pG=(async()=>{await a({tenant_id:t,token:e})})();try{await pG,d(!0)}catch(e){fG.error(`GenAI tenant switch failed`,{error:e instanceof Error?e.message:String(e)}),l(aE(e))}finally{pG=null,s(!1)}})()},[e,t,a,n,r,i]),{isSwitching:o,switchError:c,hasToken:u}}function gG(e=!1,t=0){let n=uG(e,t),{isSwitching:r,switchError:i,hasToken:a}=hG(n.loginToken,n.genaiInit?.tenantId,e,t,n.isLoggingIn);return{isAuthenticating:n.isLoggingIn||r,authError:n.loginError??i,hasToken:a}}function _G(e={}){let{defaultOpen:t=!1,persist:n=!0}=e,[r,i]=Ut({key:n?LT.PANEL_OPEN:`panel-state-${Date.now()}`,defaultValue:t,getInitialValueInEffect:!1}),a=(0,U.useRef)(!1);return(0,U.useEffect)(()=>{r&&!a.current&&e.onOpen&&(a.current=!0,e.onOpen())},[r,e.onOpen]),(0,U.useEffect)(()=>{let e=document.querySelector(`main`)||document.querySelector(`.main-content`)||document.body;return r?e?.classList.add(`panel-open`):(e?.classList.remove(`panel-open`),e?.style.removeProperty(`margin-right`)),()=>{e?.classList.remove(`panel-open`),e?.style.removeProperty(`margin-right`)}},[r]),{isOpen:r,open:(0,U.useCallback)(async()=>{i(!0),e.onOpen&&!a.current&&(a.current=!0,await e.onOpen())},[i,e.onOpen]),close:(0,U.useCallback)(()=>{i(!1)},[i]),toggle:(0,U.useCallback)(()=>{i(e=>!e)},[i]),setOpen:(0,U.useCallback)(e=>{i(e)},[i])}}function vG({runtime:e,uiOptions:t}){let n=e.forceReAuth,[r,i]=(0,U.useState)(0),a=(0,U.useRef)(0),{isAuthenticating:o,hasToken:s,authError:c}=gG(n,r),{panelWidth:l,panelHeight:u,panelHeaderHeight:d,panelTopOffset:f,panelBorder:p,panelBorderRadius:m,hostContainerSelector:h,zIndex:g,fabPosition:_}=nG(t),v=(0,U.useRef)(!1),y=(0,U.useRef)(!1),[b,x]=(0,U.useState)(!1),{messages:S,composerText:C,setComposerText:w,isLoading:T,isAssistantStreaming:E,error:D,sendMessage:O,sendInitialMessage:k,agentDisplayName:A,canSend:j,chatPopupOpen:M,chatPopupMessage:N,closeChatPopup:P,cancelAgentOperation:ee,resetChat:F,canCancelBusyTurn:I}=KW(),{actions:te,handleActionClick:ne,handleComposerTextChange:re,clearSelectedAction:ie}=qW(S,w),{runtimeInfo:L,refreshRuntimeInfo:R}=ZW();(0,U.useEffect)(()=>{r>0&&!o&&s&&a.current!==r&&(a.current=r,R())},[r,s,o,R]);let ae=(0,U.useCallback)(()=>{F(),y.current=!1,x(!0),i(e=>e+1)},[F]),{isOpen:oe,open:se,close:ce}=_G({defaultOpen:!1,persist:!0,onOpen:async()=>{v.current||(v.current=!0,await R()),y.current||x(!0)}});(0,U.useEffect)(()=>{(async()=>{b&&oe&&!o&&s&&await k()&&(y.current=!0,x(!1))})()},[oe,o,s,k,b]),(0,U.useEffect)(()=>{oe||P()},[oe,P]);let le=aG([S.length,T,S.at(-1)?.text?.length??0,E]),{isListening:ue,isSupported:de,startListening:z,stopListening:fe,reset:pe}=$W({lang:QW(),continuous:!0,pauseOnSubmit:!0,onTextChange:w}),{panelResizableWidth:me,actualWidth:he,shellGap:B,floatingTop:ge,floatingHeight:_e,floatingMaxHeight:V}=XW(t,l,oe,u,f),{handleSubmit:ve,handleToggleVoice:ye,handleClose:be}=rG({isListening:ue,stopListening:fe,reset:pe,sendMessage:O,composerText:C,setComposerText:re,startListening:z,close:ce,onSubmitComplete:ie});return(0,W.jsxs)(W.Fragment,{children:[!oe&&(0,W.jsx)(VM,{onClick:()=>void se(),zIndex:g,position:_,label:A}),oe&&(0,W.jsx)(HM.Provider,{value:{sendMessage:O},children:(0,W.jsx)(BU,{visible:!0,onClose:be,messages:S,composerText:C,onComposerTextChange:re,isLoading:T,isAssistantStreaming:E,error:D??c,canSend:j,onSubmit:ve,actions:te,onActionClick:ne,isListening:ue,isVoiceSupported:de,onToggleVoice:ye,assistantDisplayName:A,panelTitle:A,runtimeInfo:L,scrollViewportRef:le,actualWidth:he,floatingTop:ge,floatingHeight:_e,floatingMaxHeight:V,shellGap:B,panelHeaderHeight:d,panelResizableWidth:me,panelBorder:p,panelBorderRadius:m,zIndex:g,chatPopupOpened:M,onChatPopupClose:P,chatPopupMessage:N,chatPopupSize:`2xl`,hostContainerSelector:h,showBusyCancel:(T||E)&&I,onCancelBusy:ee,showResetChat:!0,onResetChat:ae})})]})}function yG(e){return(0,W.jsx)(vG,{...e})}function bG(e,t){if(typeof e==`function`){e(t);return}e&&(e.current=t)}function xG(e){return{url:{app:e.app??``,api:e.api??``,apiPaths:{crm:``,uiAuthz:``}},keycloak:{url:``,realm:``,clientId:``},features:{enableThemeManager:!0}}}var SG=(0,U.forwardRef)((e,t)=>{let{config:n,runtime:r,uiOptions:i,className:a,style:o,rootElement:s}=e,c=(0,U.useRef)(null),l=xG(n);Ne.locale||Ne.activate(`en`),EE(l,n);let u=(0,U.useMemo)(()=>CM({themeName:i?.themeName}),[i?.themeName]);return(0,W.jsx)(FM,{appConfig:l,config:n,runtime:r,theme:(0,U.useMemo)(()=>i?.theme?Br(u,i.theme):u,[i?.theme,u]),rootElement:s??c.current,children:(0,W.jsx)(`div`,{className:a,ref:e=>{c.current=e,bG(t,e)},style:o,children:(0,W.jsx)(yG,{config:n,runtime:r,uiOptions:i})})})});SG.displayName=`Widget`;var CG=`:root,
|
|
405
405
|
:host {
|