recce-nightly 1.9.0.20250623__py3-none-any.whl → 1.25.0.20251112a2066__py3-none-any.whl
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.
- recce/VERSION +1 -1
- recce/__init__.py +5 -0
- recce/adapter/dbt_adapter/__init__.py +318 -240
- recce/artifact.py +76 -3
- recce/cli.py +703 -71
- recce/config.py +3 -3
- recce/connect_to_cloud.py +138 -0
- recce/core.py +3 -3
- recce/data/404.html +1 -22
- recce/data/__next.__PAGE__.txt +10 -0
- recce/data/__next._full.txt +23 -0
- recce/data/__next._index.txt +8 -0
- recce/data/__next._tree.txt +12 -0
- recce/data/_next/static/6LypcDXgyuSaiSCrsmUub/_buildManifest.js +11 -0
- recce/data/_next/static/6LypcDXgyuSaiSCrsmUub/_clientMiddlewareManifest.json +1 -0
- recce/data/_next/static/chunks/0a2b2dd4b57049c2.js +1 -0
- recce/data/_next/static/chunks/19c10d219a6a21ff.js +1 -0
- recce/data/_next/static/chunks/24fd885c7180a612.js +1 -0
- recce/data/_next/static/chunks/27e66b2eab4adc32.js +19 -0
- recce/data/_next/static/chunks/71f88fcc615bf282.js +1 -0
- recce/data/_next/static/chunks/917619ab62a32388.js +1 -0
- recce/data/_next/static/chunks/93ba5a62932b704f.js +4 -0
- recce/data/_next/static/chunks/a43a2a5e06d5a92b.js +1 -0
- recce/data/_next/static/chunks/a6c78b24bd8b84fc.js +1 -0
- recce/data/_next/static/chunks/b2610ba997ff8c4f.js +110 -0
- recce/data/_next/static/chunks/ba2d87265a68599d.css +2 -0
- recce/data/_next/static/chunks/c117fd1c1382dd83.js +11 -0
- recce/data/_next/static/chunks/c9425ca46eebdde9.js +1 -0
- recce/data/_next/static/chunks/cc8a9eadba012be0.css +6 -0
- recce/data/_next/static/chunks/e124bccf574a3361.css +1 -0
- recce/data/_next/static/chunks/e392ad92847c3e17.js +1 -0
- recce/data/_next/static/chunks/e4ce95efe88dae79.js +11 -0
- recce/data/_next/static/chunks/e69c777814fea6ed.js +2 -0
- recce/data/_next/static/chunks/turbopack-21cfd73037ff57ab.js +3 -0
- recce/data/_next/static/media/favicon.a8d38d84.ico +0 -0
- recce/data/_next/static/media/montserrat-cyrillic-800-normal.d80d830d.woff2 +0 -0
- recce/data/_next/static/media/{montserrat-cyrillic-800-normal.bd5c9f50.woff → montserrat-cyrillic-800-normal.f9d58125.woff} +0 -0
- recce/data/_next/static/media/montserrat-cyrillic-ext-800-normal.076c2a93.woff2 +0 -0
- recce/data/_next/static/media/montserrat-latin-800-normal.cde454cc.woff2 +0 -0
- recce/data/_next/static/media/{montserrat-latin-800-normal.fc315020.woff → montserrat-latin-800-normal.d5761935.woff} +0 -0
- recce/data/_next/static/media/montserrat-latin-ext-800-normal.40ec0659.woff2 +0 -0
- recce/data/_next/static/media/{montserrat-latin-ext-800-normal.2e5381b2.woff → montserrat-latin-ext-800-normal.b671449b.woff} +0 -0
- recce/data/_next/static/media/{montserrat-vietnamese-800-normal.20c545e6.woff → montserrat-vietnamese-800-normal.9f7b8541.woff} +0 -0
- recce/data/_next/static/media/montserrat-vietnamese-800-normal.f9eb854e.woff2 +0 -0
- recce/data/_not-found/__next._full.txt +17 -0
- recce/data/_not-found/__next._index.txt +8 -0
- recce/data/_not-found/__next._not-found.__PAGE__.txt +5 -0
- recce/data/_not-found/__next._not-found.txt +4 -0
- recce/data/_not-found/__next._tree.txt +10 -0
- recce/data/_not-found.html +1 -0
- recce/data/_not-found.txt +17 -0
- recce/data/auth_callback.html +68 -0
- recce/data/index.html +1 -27
- recce/data/index.txt +23 -8
- recce/event/__init__.py +9 -8
- recce/event/collector.py +6 -2
- recce/event/track.py +10 -0
- recce/github.py +1 -1
- recce/mcp_server.py +632 -0
- recce/models/types.py +23 -2
- recce/pull_request.py +1 -1
- recce/run.py +23 -16
- recce/server.py +194 -19
- recce/state/__init__.py +31 -0
- recce/state/cloud.py +632 -0
- recce/state/const.py +26 -0
- recce/state/local.py +56 -0
- recce/state/state.py +119 -0
- recce/state/state_loader.py +174 -0
- recce/summary.py +2 -1
- recce/tasks/dataframe.py +59 -2
- recce/tasks/rowcount.py +4 -1
- recce/tasks/schema.py +4 -1
- recce/tasks/valuediff.py +1 -1
- recce/util/api_token.py +11 -2
- recce/util/breaking.py +9 -0
- recce/util/cll.py +1 -2
- recce/util/io.py +2 -2
- recce/util/lineage.py +19 -18
- recce/util/perf_tracking.py +85 -0
- recce/util/recce_cloud.py +229 -5
- recce/yaml/__init__.py +2 -2
- recce_cloud/__init__.py +15 -0
- recce_cloud/api/__init__.py +17 -0
- recce_cloud/api/base.py +104 -0
- recce_cloud/api/client.py +150 -0
- recce_cloud/api/exceptions.py +26 -0
- recce_cloud/api/factory.py +63 -0
- recce_cloud/api/github.py +72 -0
- recce_cloud/api/gitlab.py +78 -0
- recce_cloud/artifact.py +57 -0
- recce_cloud/ci_providers/__init__.py +9 -0
- recce_cloud/ci_providers/base.py +82 -0
- recce_cloud/ci_providers/detector.py +147 -0
- recce_cloud/ci_providers/github_actions.py +136 -0
- recce_cloud/ci_providers/gitlab_ci.py +130 -0
- recce_cloud/cli.py +303 -0
- recce_cloud/upload.py +213 -0
- {recce_nightly-1.9.0.20250623.dist-info → recce_nightly-1.25.0.20251112a2066.dist-info}/METADATA +31 -27
- recce_nightly-1.25.0.20251112a2066.dist-info/RECORD +178 -0
- {recce_nightly-1.9.0.20250623.dist-info → recce_nightly-1.25.0.20251112a2066.dist-info}/top_level.txt +1 -0
- tests/adapter/dbt_adapter/test_dbt_cll.py +412 -79
- tests/recce_cloud/__init__.py +0 -0
- tests/recce_cloud/test_ci_providers.py +351 -0
- tests/recce_cloud/test_cli.py +372 -0
- tests/recce_cloud/test_client.py +273 -0
- tests/recce_cloud/test_platform_clients.py +279 -0
- tests/test_cli.py +106 -3
- tests/test_cli_mcp_optional.py +45 -0
- tests/test_cloud_listing_cli.py +324 -0
- tests/test_connect_to_cloud.py +82 -0
- tests/test_core.py +148 -3
- tests/test_mcp_server.py +332 -0
- tests/test_server.py +6 -6
- tests/test_summary.py +14 -6
- recce/data/_next/static/WrRUb3nV8BhAZG_R8kVma/_buildManifest.js +0 -1
- recce/data/_next/static/chunks/181-acc61ddada3bc0ca.js +0 -43
- recce/data/_next/static/chunks/1bff33f1-1ef85cf5e658a751.js +0 -1
- recce/data/_next/static/chunks/217-879a84d70f7a907c.js +0 -2
- recce/data/_next/static/chunks/29e3cc0d-60045b2e47aa3916.js +0 -1
- recce/data/_next/static/chunks/36e1c10d-8e7be4a6c1f6ab2d.js +0 -1
- recce/data/_next/static/chunks/3998a672-03adacad07b346ac.js +0 -1
- recce/data/_next/static/chunks/3a92ee20-1081c360214f9602.js +0 -1
- recce/data/_next/static/chunks/42-cd3c06533f5fd47c.js +0 -9
- recce/data/_next/static/chunks/450c323b-fd94e7ffaa4a5efa.js +0 -1
- recce/data/_next/static/chunks/47d8844f-929aed9b1c73a905.js +0 -1
- recce/data/_next/static/chunks/608-3b079b544e5d5f5e.js +0 -15
- recce/data/_next/static/chunks/6dc81886-adbfa45836061d79.js +0 -1
- recce/data/_next/static/chunks/7a8a3e83-edf6dc64b5d5f0a5.js +0 -1
- recce/data/_next/static/chunks/7f27ae6c-d5f0438edd5c2a5b.js +0 -1
- recce/data/_next/static/chunks/86730205-cfb14e3f051bab35.js +0 -1
- recce/data/_next/static/chunks/8d700b6a.8bb140898499c512.js +0 -1
- recce/data/_next/static/chunks/92-7ab55ae02606193c.js +0 -1
- recce/data/_next/static/chunks/9746af58-a42b7d169cacadf0.js +0 -1
- recce/data/_next/static/chunks/a30376cd-de84559016d7e133.js +0 -1
- recce/data/_next/static/chunks/app/_not-found/page-01ed58b7f971d311.js +0 -1
- recce/data/_next/static/chunks/app/layout-177a410a97e0d018.js +0 -1
- recce/data/_next/static/chunks/app/page-59241c42b7dd4fcf.js +0 -1
- recce/data/_next/static/chunks/b63b1b3f-4282bdcf459e075c.js +0 -1
- recce/data/_next/static/chunks/bbda5537-9ec25eb1dd62348a.js +0 -1
- recce/data/_next/static/chunks/c132bf7d-08cb668a789d6afd.js +0 -1
- recce/data/_next/static/chunks/ce84277d-2e5d1d46910cf052.js +0 -1
- recce/data/_next/static/chunks/febdd86e-c6b525341634b860.js +0 -54
- recce/data/_next/static/chunks/fee69bc6-2dbccaf9b90474e6.js +0 -1
- recce/data/_next/static/chunks/framework-ded83d71b51ce901.js +0 -1
- recce/data/_next/static/chunks/main-app-39061b0166c47f55.js +0 -1
- recce/data/_next/static/chunks/main-b5b3ae20a1405261.js +0 -1
- recce/data/_next/static/chunks/pages/_app-437c455677d62394.js +0 -1
- recce/data/_next/static/chunks/pages/_error-e7650df18ca04bde.js +0 -1
- recce/data/_next/static/chunks/webpack-7b49d5ba7e3a434d.js +0 -1
- recce/data/_next/static/css/17a96168e3a9db13.css +0 -1
- recce/data/_next/static/css/1b121dc4d36aeb4d.css +0 -3
- recce/data/_next/static/css/35c6679a098e1e34.css +0 -1
- recce/data/_next/static/css/951e2e0eea2d4a5b.css +0 -14
- recce/data/_next/static/media/montserrat-cyrillic-800-normal.22628180.woff2 +0 -0
- recce/data/_next/static/media/montserrat-cyrillic-ext-800-normal.94a63aea.woff2 +0 -0
- recce/data/_next/static/media/montserrat-latin-800-normal.6f8fa298.woff2 +0 -0
- recce/data/_next/static/media/montserrat-latin-ext-800-normal.013b84f9.woff2 +0 -0
- recce/data/_next/static/media/montserrat-vietnamese-800-normal.c0035377.woff2 +0 -0
- recce/state.py +0 -785
- recce_nightly-1.9.0.20250623.dist-info/RECORD +0 -151
- tests/test_state.py +0 -134
- /recce/data/_next/static/{WrRUb3nV8BhAZG_R8kVma → 6LypcDXgyuSaiSCrsmUub}/_ssgManifest.js +0 -0
- /recce/data/_next/static/chunks/{polyfills-42372ed130431b0a.js → a6dad97d9634a72d.js} +0 -0
- /recce/data/_next/static/media/{montserrat-cyrillic-ext-800-normal.e6e0d8d0.woff → montserrat-cyrillic-ext-800-normal.a4fa76b5.woff} +0 -0
- /recce/data/_next/static/media/{reload-image.79aabb7d.svg → reload-image.7aa931c7.svg} +0 -0
- {recce_nightly-1.9.0.20250623.dist-info → recce_nightly-1.25.0.20251112a2066.dist-info}/WHEEL +0 -0
- {recce_nightly-1.9.0.20250623.dist-info → recce_nightly-1.25.0.20251112a2066.dist-info}/entry_points.txt +0 -0
- {recce_nightly-1.9.0.20250623.dist-info → recce_nightly-1.25.0.20251112a2066.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51484,30023,e=>{"use strict";let t,r,n,i;var o,a,s,l,u=e.i(48962);function c(e,t){return function(){return e.apply(t,arguments)}}let{toString:d}=Object.prototype,{getPrototypeOf:h}=Object,{iterator:f,toStringTag:p}=Symbol,g=(t=Object.create(null),e=>{let r=d.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}),m=e=>(e=e.toLowerCase(),t=>g(t)===e),v=e=>t=>typeof t===e,{isArray:b}=Array,y=v("undefined");function x(e){return null!==e&&!y(e)&&null!==e.constructor&&!y(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let w=m("ArrayBuffer"),_=v("string"),C=v("function"),k=v("number"),S=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==g(e))return!1;let t=h(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(p in e)&&!(f in e)},O=m("Date"),I=m("File"),P=m("Blob"),T=m("FileList"),R=m("URLSearchParams"),[A,M,N,D]=["ReadableStream","Request","Response","Headers"].map(m);function L(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),b(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(x(e))return;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;for(n=0;n<a;n++)i=o[n],t.call(null,e[i],i,e)}}function V(e,t){let r;if(x(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g,j=e=>!y(e)&&e!==F,z=(r="undefined"!=typeof Uint8Array&&h(Uint8Array),e=>r&&e instanceof r),B=m("HTMLFormElement"),H=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),W=m("RegExp"),U=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};L(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},$=m("AsyncFunction"),q=(o="function"==typeof setImmediate,a=C(F.postMessage),o?setImmediate:a?(s=`axios@${Math.random()}`,l=[],F.addEventListener("message",({source:e,data:t})=>{e===F&&t===s&&l.length&&l.shift()()},!1),e=>{l.push(e),F.postMessage(s,"*")}):e=>setTimeout(e)),G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(F):void 0!==u.default&&u.default.nextTick||q,K={isArray:b,isArrayBuffer:w,isBuffer:x,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||C(e.append)&&("formdata"===(t=g(e))||"object"===t&&C(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer)},isString:_,isNumber:k,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:E,isEmptyObject:e=>{if(!S(e)||x(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:A,isRequest:M,isResponse:N,isHeaders:D,isUndefined:y,isDate:O,isFile:I,isBlob:P,isRegExp:W,isFunction:C,isStream:e=>S(e)&&C(e.pipe),isURLSearchParams:R,isTypedArray:z,isFileList:T,forEach:L,merge:function e(){let{caseless:t,skipUndefined:r}=j(this)&&this||{},n={},i=(i,o)=>{let a=t&&V(n,o)||o;E(n[a])&&E(i)?n[a]=e(n[a],i):E(i)?n[a]=e({},i):b(i)?n[a]=i.slice():r&&y(i)||(n[a]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&L(arguments[e],i);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(L(t,(t,n)=>{r&&C(t)?e[n]=c(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=!1!==r&&h(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:g,kindOfTest:m,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(b(e))return e;let t=e.length;if(!k(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[f]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:B,hasOwnProperty:H,hasOwnProp:H,reduceDescriptors:U,freezeMethods:e=>{U(e,(t,r)=>{if(C(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(C(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(b(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:V,global:F,isContextDefined:j,isSpecCompliantForm:function(e){return!!(e&&C(e.append)&&"FormData"===e[p]&&e[f])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(x(e))return e;if(!("toJSON"in e)){t[n]=e;let i=b(e)?[]:{};return L(e,(e,t)=>{let o=r(e,n+1);y(o)||(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:$,isThenable:e=>e&&(S(e)||C(e))&&C(e.then)&&C(e.catch),setImmediate:q,asap:G,isIterable:e=>null!=e&&C(e[f])};var Y=e.i(24419);function X(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits(X,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});let Q=X.prototype,Z={};function J(e){return K.isPlainObject(e)||K.isArray(e)}function ee(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function et(e,t,r){return e?e.concat(t).map(function(e,t){return e=ee(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Z[e]={value:e}}),Object.defineProperties(X,Z),Object.defineProperty(Q,"isAxiosError",{value:!0}),X.from=(e,t,r,n,i,o)=>{let a=Object.create(Q);K.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);let s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return X.call(a,s,l,r,n,i),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",o&&Object.assign(a,o),a};let er=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)}),en=function(e,t,r){if(!K.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=K.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!K.isUndefined(t[e])})).metaTokens,i=r.visitor||u,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(K.isBoolean(e))return e.toString();if(!s&&K.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Y.Buffer.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(K.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var u;if(K.isArray(e)&&(u=e,K.isArray(u)&&!u.some(J))||(K.isFileList(e)||K.endsWith(r,"[]"))&&(s=K.toArray(e)))return r=ee(r),s.forEach(function(e,n){K.isUndefined(e)||null===e||t.append(!0===a?et([r],n,o):null===a?r:r+"[]",l(e))}),!1}return!!J(e)||(t.append(et(i,r,o),l(e)),!1)}let c=[],d=Object.assign(er,{defaultVisitor:u,convertValue:l,isVisitable:J});if(!K.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!K.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),K.forEach(r,function(r,o){!0===(!(K.isUndefined(r)||null===r)&&i.call(t,r,K.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])}),c.pop()}}(e),t};function ei(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function eo(e,t){this._pairs=[],e&&en(e,this,t)}let ea=eo.prototype;function es(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function el(e,t,r){let n;if(!t)return e;let i=r&&r.encode||es;K.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize;if(n=o?o(t,r):K.isURLSearchParams(t)?t.toString():new eo(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ea.append=function(e,t){this._pairs.push([e,t])},ea.toString=function(e){let t=e?function(t){return e.call(this,t,ei)}:ei;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let eu=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,function(t){null!==t&&e(t)})}},ec={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ed="undefined"!=typeof URLSearchParams?URLSearchParams:eo,eh="undefined"!=typeof FormData?FormData:null,ef="undefined"!=typeof Blob?Blob:null,ep="undefined"!=typeof window&&"undefined"!=typeof document,eg="object"==typeof navigator&&navigator||void 0,em=ep&&(!eg||0>["ReactNative","NativeScript","NS"].indexOf(eg.product)),ev="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eb=ep&&window.location.href||"http://localhost";e.s(["hasBrowserEnv",()=>ep,"hasStandardBrowserEnv",()=>em,"hasStandardBrowserWebWorkerEnv",()=>ev,"navigator",()=>eg,"origin",()=>eb],13690);let ey={...e.i(13690),isBrowser:!0,classes:{URLSearchParams:ed,FormData:eh,Blob:ef},protocols:["http","https","file","blob","url","data"]},ex=function(e){if(K.isFormData(e)&&K.isFunction(e.entries)){let t={};return K.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;let a=Number.isFinite(+o),s=i>=t.length;return(o=!o&&K.isArray(n)?n.length:o,s)?K.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r:(n[o]&&K.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&K.isArray(n[o])&&(n[o]=function(e){let t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(n[o]))),!a}(K.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null},ew={transitional:ec,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=K.isObject(e);if(o&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return i?JSON.stringify(ex(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){var a,s;return(a=e,s=this.formSerializer,en(a,new ey.classes.URLSearchParams,{visitor:function(e,t,r,n){return ey.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...s})).toString()}if((r=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return en(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(o||i){t.setContentType("application/json",!1);var l=e;if(K.isString(l))try{return(0,JSON.parse)(l),K.trim(l)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(l)}return e}],transformResponse:[function(e){let t=this.transitional||ew.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,this.parseReviver)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw X.from(e,X.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ey.classes.FormData,Blob:ey.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{ew.headers[e]={}});let e_=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),eC=Symbol("internals");function ek(e){return e&&String(e).trim().toLowerCase()}function eS(e){return!1===e||null==e?e:K.isArray(e)?e.map(eS):String(e)}function eE(e,t,r,n,i){if(K.isFunction(n))return n.call(this,t,r);if(i&&(t=r),K.isString(t)){if(K.isString(n))return -1!==t.indexOf(n);if(K.isRegExp(n))return n.test(t)}}class eO{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=ek(t);if(!i)throw Error("header name must be a non-empty string");let o=K.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=eS(e))}let o=(e,t)=>K.forEach(e,(e,r)=>i(e,r,t));if(K.isPlainObject(e)||e instanceof this.constructor)o(e,t);else{let n;if(K.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var a;let r,n,i,s;o((s={},(a=e)&&a.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||s[r]&&e_[r]||("set-cookie"===r?s[r]?s[r].push(n):s[r]=[n]:s[r]=s[r]?s[r]+", "+n:n)}),s),t)}else if(K.isObject(e)&&K.isIterable(e)){let r={},n,i;for(let t of e){if(!K.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?K.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=ek(e)){let r=K.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(K.isFunction(t))return t.call(this,e,r);if(K.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ek(e)){let r=K.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||eE(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=ek(e)){let i=K.findKey(r,e);i&&(!t||eE(r,r[i],i,t))&&(delete r[i],n=!0)}}return K.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||eE(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return K.forEach(this,(n,i)=>{let o=K.findKey(r,i);if(o){t[o]=eS(n),delete t[i];return}let a=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();a!==i&&delete t[i],t[a]=eS(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return K.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&K.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[eC]=this[eC]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=ek(e);if(!t[n]){let i;i=K.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return K.isArray(e)?e.forEach(n):n(e),this}}function eI(e,t){let r=this||ew,n=t||r,i=eO.from(n.headers),o=n.data;return K.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function eP(e){return!!(e&&e.__CANCEL__)}function eT(e,t,r){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,r),this.name="CanceledError"}function eR(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new X("Request failed with status code "+r.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}eO.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(eO.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),K.freezeMethods(eO),K.inherits(eT,X,{__CANCEL__:!0});let eA=function(e,t){let r,n=Array(e=e||10),i=Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){let l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let c=a,d=0;for(;c!==o;)d+=n[c++],c%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),l-r<t)return;let h=u&&l-u;return h?Math.round(1e3*d/h):void 0}},eM=function(e,t){let r,n,i=0,o=1e3/t,a=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-i;s>=o?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},o-s)))},()=>r&&a(r)]},eN=(e,t,r=3)=>{let n=0,i=eA(50,250);return eM(r=>{let o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,l=i(s);n=o,e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},eD=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},eL=e=>(...t)=>K.asap(()=>e(...t)),eV=ey.hasStandardBrowserEnv?(n=new URL(ey.origin),i=ey.navigator&&/(msie|trident)/i.test(ey.navigator.userAgent),e=>(e=new URL(e,ey.origin),n.protocol===e.protocol&&n.host===e.host&&(i||n.port===e.port))):()=>!0,eF=ey.hasStandardBrowserEnv?{write(e,t,r,n,i,o,a){if("undefined"==typeof document)return;let s=[`${e}=${encodeURIComponent(t)}`];K.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),K.isString(n)&&s.push(`path=${n}`),K.isString(i)&&s.push(`domain=${i}`),!0===o&&s.push("secure"),K.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;let t=document.cookie.match(RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function ej(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let ez=e=>e instanceof eO?{...e}:e;function eB(e,t){t=t||{};let r={};function n(e,t,r,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function i(e,t,r,i){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function o(e,t){if(!K.isUndefined(t))return n(void 0,t)}function a(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}let l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>i(ez(e),ez(t),r,!0)};return K.forEach(Object.keys({...e,...t}),function(n){let o=l[n]||i,a=o(e[n],t[n],n);K.isUndefined(a)&&o!==s||(r[n]=a)}),r}let eH=e=>{let t=eB({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;if(t.headers=a=eO.from(a),t.url=el(ej(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),K.isFormData(r)){if(ey.hasStandardBrowserEnv||ey.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(K.isFunction(r.getHeaders)){let e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)})}}if(ey.hasStandardBrowserEnv&&(n&&K.isFunction(n)&&(n=n(t)),n||!1!==n&&eV(t.url))){let e=i&&o&&eF.read(o);e&&a.set(i,e)}return t},eW="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n;let i,o,a,s,l,u,c=eH(e),d=c.data,h=eO.from(c.headers).normalize(),{responseType:f,onUploadProgress:p,onDownloadProgress:g}=c;function m(){s&&s(),l&&l(),c.cancelToken&&c.cancelToken.unsubscribe(i),c.signal&&c.signal.removeEventListener("abort",i)}let v=new XMLHttpRequest;function b(){if(!v)return;let n=eO.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());eR(function(e){t(e),m()},function(e){r(e),m()},{data:f&&"text"!==f&&"json"!==f?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}v.open(c.method.toUpperCase(),c.url,!0),v.timeout=c.timeout,"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||4!==v.readyState||(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(b)},v.onabort=function(){v&&(r(new X("Request aborted",X.ECONNABORTED,e,v)),v=null)},v.onerror=function(t){let n=new X(t&&t.message?t.message:"Network Error",X.ERR_NETWORK,e,v);n.event=t||null,r(n),v=null},v.ontimeout=function(){let t=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",n=c.transitional||ec;c.timeoutErrorMessage&&(t=c.timeoutErrorMessage),r(new X(t,n.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,v)),v=null},void 0===d&&h.setContentType(null),"setRequestHeader"in v&&K.forEach(h.toJSON(),function(e,t){v.setRequestHeader(t,e)}),K.isUndefined(c.withCredentials)||(v.withCredentials=!!c.withCredentials),f&&"json"!==f&&(v.responseType=c.responseType),g&&([a,l]=eN(g,!0),v.addEventListener("progress",a)),p&&v.upload&&([o,s]=eN(p),v.upload.addEventListener("progress",o),v.upload.addEventListener("loadend",s)),(c.cancelToken||c.signal)&&(i=t=>{v&&(r(!t||t.type?new eT(null,e,v):t),v.abort(),v=null)},c.cancelToken&&c.cancelToken.subscribe(i),c.signal&&(c.signal.aborted?i():c.signal.addEventListener("abort",i)));let y=(n=c.url,(u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n))&&u[1]||"");y&&-1===ey.protocols.indexOf(y)?r(new X("Unsupported protocol "+y+":",X.ERR_BAD_REQUEST,e)):v.send(d||null)})},eU=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},e$=async function*(e,t){for await(let r of eq(e))yield*eU(r,t)},eq=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},eG=(e,t,r,n)=>{let i,o=e$(e,t),a=0,s=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t){s(),e.close();return}let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:eK}=K,eY=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:eX,TextEncoder:eQ}=K.global,eZ=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},eJ=e=>{let t,{fetch:r,Request:n,Response:i}=e=K.merge.call({skipUndefined:!0},eY,e),o=r?eK(r):"function"==typeof fetch,a=eK(n),s=eK(i);if(!o)return!1;let l=o&&eK(eX),u=o&&("function"==typeof eQ?(t=new eQ,e=>t.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer())),c=a&&l&&eZ(()=>{let e=!1,t=new n(ey.origin,{body:new eX,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&l&&eZ(()=>K.isReadableStream(new i("").body)),h={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{h[e]||(h[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new X(`Response type '${e}' is not supported`,X.ERR_NOT_SUPPORT,r)})});let f=async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){let t=new n(ey.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e))?(await u(e)).byteLength:void 0},p=async(e,t)=>{let r=K.toFiniteNumber(e.getContentLength());return null==r?f(t):r};return async e=>{let t,{url:o,method:s,data:l,signal:u,cancelToken:f,timeout:g,onDownloadProgress:m,onUploadProgress:v,responseType:b,headers:y,withCredentials:x="same-origin",fetchOptions:w}=eH(e),_=r||fetch;b=b?(b+"").toLowerCase():"text";let C=((e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,a();let t=e instanceof Error?e:this.reason;n.abort(t instanceof X?t:new eT(t instanceof Error?t.message:t))}},o=t&&setTimeout(()=>{o=null,i(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:s}=n;return s.unsubscribe=()=>K.asap(a),s}})([u,f&&f.toAbortSignal()],g),k=null,S=C&&C.unsubscribe&&(()=>{C.unsubscribe()});try{if(v&&c&&"get"!==s&&"head"!==s&&0!==(t=await p(y,l))){let e,r=new n(o,{method:"POST",body:l,duplex:"half"});if(K.isFormData(l)&&(e=r.headers.get("content-type"))&&y.setContentType(e),r.body){let[e,n]=eD(t,eN(eL(v)));l=eG(r.body,65536,e,n)}}K.isString(x)||(x=x?"include":"omit");let r=a&&"credentials"in n.prototype,u={...w,signal:C,method:s.toUpperCase(),headers:y.normalize().toJSON(),body:l,duplex:"half",credentials:r?x:void 0};k=a&&new n(o,u);let f=await (a?_(k,w):_(o,u)),g=d&&("stream"===b||"response"===b);if(d&&(m||g&&S)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});let t=K.toFiniteNumber(f.headers.get("content-length")),[r,n]=m&&eD(t,eN(eL(m),!0))||[];f=new i(eG(f.body,65536,r,()=>{n&&n(),S&&S()}),e)}b=b||"text";let E=await h[K.findKey(h,b)||"text"](f,e);return!g&&S&&S(),await new Promise((t,r)=>{eR(t,r,{data:E,headers:eO.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:k})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,e,k),{cause:t.cause||t});throw X.from(t,t&&t.code,e,k)}}},e0=new Map,e1=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,o=[n,i,r],a=o.length,s,l,u=e0;for(;a--;)s=o[a],void 0===(l=u.get(s))&&u.set(s,l=a?new Map:eJ(t)),u=l;return l};e1();let e2={http:null,xhr:eW,fetch:{get:e1}};K.forEach(e2,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let e5=e=>`- ${e}`,e3=e=>K.isFunction(e)||null===e||!1===e,e4=function(e,t){let r,n,{length:i}=e=K.isArray(e)?e:[e],o={};for(let a=0;a<i;a++){let i;if(n=r=e[a],!e3(r)&&void 0===(n=e2[(i=String(r)).toLowerCase()]))throw new X(`Unknown adapter '${i}'`);if(n&&(K.isFunction(n)||(n=n.get(t))))break;o[i||"#"+a]=n}if(!n){let e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new X("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(e5).join("\n"):" "+e5(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function e6(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eT(null,e)}function e8(e){return e6(e),e.headers=eO.from(e.headers),e.data=eI.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),e4(e.adapter||ew.adapter,e)(e).then(function(t){return e6(e),t.data=eI.call(e,e.transformResponse,t),t.headers=eO.from(t.headers),t},function(t){return!eP(t)&&(e6(e),t&&t.response&&(t.response.data=eI.call(e,e.transformResponse,t.response),t.response.headers=eO.from(t.response.headers))),Promise.reject(t)})}let e7="1.13.1",e9={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{e9[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let te={};e9.transitional=function(e,t,r){function n(e,t){return"[Axios v"+e7+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new X(n(i," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!te[i]&&(te[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},e9.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let tt=function(e,t,r){if("object"!=typeof e)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],a=t[o];if(a){let t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new X("option "+o+" must be "+r,X.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new X("Unknown option "+o,X.ERR_BAD_OPTION)}};class tr{constructor(e){this.defaults=e||{},this.interceptors={request:new eu,response:new eu}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:a}=t=eB(this.defaults,t);void 0!==i&&tt(i,{silentJSONParsing:e9.transitional(e9.boolean),forcedJSONParsing:e9.transitional(e9.boolean),clarifyTimeoutError:e9.transitional(e9.boolean)},!1),null!=o&&(K.isFunction(o)?t.paramsSerializer={serialize:o}:tt(o,{encode:e9.function,serialize:e9.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tt(t,{baseUrl:e9.spelling("baseURL"),withXsrfToken:e9.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&K.merge(a.common,a[t.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=eO.concat(s,a);let l=[],u=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(u=u&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d=0;if(!u){let e=[e8.bind(this),void 0];for(e.unshift(...l),e.push(...c),n=e.length,r=Promise.resolve(t);d<n;)r=r.then(e[d++],e[d++]);return r}n=l.length;let h=t;for(;d<n;){let e=l[d++],t=l[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{r=e8.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,n=c.length;d<n;)r=r.then(c[d++],c[d++]);return r}getUri(e){return el(ej((e=eB(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(e){tr.prototype[e]=function(t,r){return this.request(eB(r||{},{method:e,url:t,data:(r||{}).data}))}}),K.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(eB(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}tr.prototype[e]=t(),tr.prototype[e+"Form"]=t(!0)});class tn{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new eT(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new tn(function(t){e=t}),cancel:e}}}let ti={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(ti).forEach(([e,t])=>{ti[t]=e});let to=function e(t){let r=new tr(t),n=c(tr.prototype.request,r);return K.extend(n,tr.prototype,r,{allOwnKeys:!0}),K.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(eB(t,r))},n}(ew);to.Axios=tr,to.CanceledError=eT,to.CancelToken=tn,to.isCancel=eP,to.VERSION=e7,to.toFormData=en,to.AxiosError=X,to.Cancel=to.CanceledError,to.all=function(e){return Promise.all(e)},to.spread=function(e){return function(t){return e.apply(null,t)}},to.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},to.mergeConfig=eB,to.AxiosHeaders=eO,to.formToJSON=e=>ex(K.isHTMLForm(e)?new FormData(e):e),to.getAdapter=e4,to.HttpStatusCode=ti,to.default=to,e.s(["default",0,to],51484);let ta=u.default.env.NEXT_PUBLIC_API_URL,ts=ta??=window.location.origin,tl=u.default.env.NEXT_PUBLIC_CLOUD_WEB_URL;tl??="https://cloud.datarecce.io",e.s(["PUBLIC_API_URL",0,ts],30023)},51327,3741,e=>{"use strict";e.i(48962);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#e=t;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function n(e){setTimeout(e,0)}e.s(["systemSetTimeoutZero",()=>n,"timeoutManager",()=>r],3741);var i="undefined"==typeof window||"Deno"in globalThis;function o(){}function a(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function d(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==f(a,t.options))return!1}else if(!g(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&(!i||i===t.state.fetchStatus)&&(!o||!!o(t))}function h(e,t){let{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(p(t.options.mutationKey)!==p(o))return!1}else if(!g(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function f(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>y(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function g(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>g(e[r],t[r]))}var m=Object.prototype.hasOwnProperty;function v(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function y(e){if(!x(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!x(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function x(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e){return new Promise(t=>{r.setTimeout(t,e)})}function _(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=b(t)&&b(r);if(!n&&!(y(t)&&y(r)))return r;let i=(n?t:Object.keys(t)).length,o=n?r:Object.keys(r),a=o.length,s=n?Array(a):{},l=0;for(let u=0;u<a;u++){let a=n?u:o[u],c=t[a],d=r[a];if(c===d){s[a]=c,(n?u<i:m.call(t,a))&&l++;continue}if(null===c||null===d||"object"!=typeof c||"object"!=typeof d){s[a]=d;continue}let h=e(c,d);s[a]=h,h===c&&l++}return i===a&&l===i?t:s}(e,t):t}function C(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function k(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var S=Symbol();function E(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==S?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function O(e,t){return"function"==typeof e?e(...t):!!e}e.s(["addToEnd",()=>C,"addToStart",()=>k,"ensureQueryFn",()=>E,"functionalUpdate",()=>a,"hashKey",()=>p,"hashQueryKeyByOptions",()=>f,"isServer",()=>i,"isValidTimeout",()=>s,"matchMutation",()=>h,"matchQuery",()=>d,"noop",()=>o,"partialMatchKey",()=>g,"replaceData",()=>_,"resolveEnabled",()=>c,"resolveStaleTime",()=>u,"shallowEqualObjects",()=>v,"shouldThrowError",()=>O,"skipToken",()=>S,"sleep",()=>w,"timeUntilStale",()=>l],51327)},71477,e=>{"use strict";let t,r,n,i,o,a;var s=e.i(3741).systemSetTimeoutZero,l=(t=[],r=0,n=e=>{e()},i=e=>{e()},o=s,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&o(()=>{i(()=>{e.forEach(e=>{n(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):o(()=>{n(e)})},setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{o=e}});e.s(["notifyManager",()=>l])},21548,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",()=>t])},47789,e=>{"use strict";var t=e.i(21548),r=e.i(51327),n=new class extends t.Subscribable{#r;#n;#i;constructor(){super(),this.#i=e=>{if(!r.isServer&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#i=e,this.#n?.(),this.#n=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",()=>n])},11667,30518,44416,69609,96472,e=>{"use strict";e.i(48962);var t=e.i(51327),r=e.i(71477),n=e.i(47789),i=e.i(21548),o=new class extends i.Subscribable{#o=!0;#n;#i;constructor(){super(),this.#i=e=>{if(!t.isServer&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#n||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#i=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#o!==e&&(this.#o=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#o}};function a(){let e,t,r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function s(e){return Math.min(1e3*2**e,3e4)}function l(e){return(e??"online")!=="online"||o.isOnline()}e.s(["onlineManager",()=>o],30518),e.s(["pendingThenable",()=>a],44416);var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){let r,i=!1,c=0,d=a(),h=()=>n.focusManager.isFocused()&&("always"===e.networkMode||o.isOnline())&&e.canRun(),f=()=>l(e.networkMode)&&e.canRun(),p=e=>{"pending"===d.status&&(r?.(),d.resolve(e))},g=e=>{"pending"===d.status&&(r?.(),d.reject(e))},m=()=>new Promise(t=>{r=e=>{("pending"!==d.status||h())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,"pending"===d.status&&e.onContinue?.()}),v=()=>{let r;if("pending"!==d.status)return;let n=0===c?e.initialPromise:void 0;try{r=n??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(p).catch(r=>{if("pending"!==d.status)return;let n=e.retry??3*!t.isServer,o=e.retryDelay??s,a="function"==typeof o?o(c,r):o,l=!0===n||"number"==typeof n&&c<n||"function"==typeof n&&n(c,r);i||!l?g(r):(c++,e.onFail?.(c,r),(0,t.sleep)(a).then(()=>h()?void 0:m()).then(()=>{i?g(r):v()}))})};return{promise:d,status:()=>d.status,cancel:t=>{if("pending"===d.status){let r=new u(t);g(r),e.onCancel?.(r)}},continue:()=>(r?.(),d),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:f,start:()=>(f()?v():m().then(v),d)}}e.s(["CancelledError",()=>u,"canFetch",()=>l,"createRetryer",()=>c],69609);var d=e.i(3741),h=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#a=d.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(t.isServer?1/0:3e5))}clearGcTimeout(){this.#a&&(d.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",()=>h],96472);var f=class extends h{#s;#l;#u;#c;#d;#h;#f;constructor(e){super(),this.#f=!1,this.#h=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#s=m(this.options),this.state=e.state??this.#s,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#d?.promise}setOptions(e){if(this.options={...this.#h,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=m(this.options);void 0!==e.data&&(this.setState(g(e.data,e.dataUpdatedAt)),this.#s=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,r){let n=(0,t.replaceData)(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){let r=this.#d?.promise;return this.#d?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#s)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#d?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#d?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#d&&(this.#f?this.#d.cancel({revert:!0}):this.#d.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,r){let n;if("idle"!==this.state.fetchStatus&&this.#d?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#d)return this.#d.continueRetry(),this.#d.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,i.signal)})},a=()=>{let e,n=(0,t.ensureQueryFn)(this.options,r),i=(o(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(n,i,this):n(i)},s=(o(n={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:a}),n);this.options.behavior?.onFetch(s,this),this.#l=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#p({type:"fetch",meta:s.fetchOptions?.meta}),this.#d=c({initialPromise:r?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof u&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{let e=await this.#d.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof u){if(e.silent)return this.#d.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...p(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...g(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?r:void 0,r;case"error":let n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function p(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:l(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function g(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function m(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",()=>f,"fetchState",()=>p],11667)},5443,1370,e=>{"use strict";var t=e.i(51484),r=e.i(30023),n=e.i(51327),i=e.i(11667),o=e.i(71477),a=e.i(21548),s=class extends a.Subscribable{constructor(e={}){super(),this.config=e,this.#g=new Map}#g;build(e,t,r){let o=t.queryKey,a=t.queryHash??(0,n.hashQueryKeyByOptions)(o,t),s=this.get(a);return s||(s=new i.Query({client:e,queryKey:o,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(s)),s}add(e){this.#g.has(e.queryHash)||(this.#g.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#g.get(e.queryHash);t&&(e.destroy(),t===e&&this.#g.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){o.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#g.get(e)}getAll(){return[...this.#g.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,n.matchQuery)(e,t)):t}notify(e){o.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){o.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){o.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=e.i(96472),u=e.i(69609),c=class extends l.Removable{#c;#m;#v;#d;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#v=e.mutationCache,this.#m=[],this.state=e.state||d(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#m.includes(e)||(this.#m.push(e),this.clearGcTimeout(),this.#v.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#m=this.#m.filter(t=>t!==e),this.scheduleGc(),this.#v.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#m.length||("pending"===this.state.status?this.scheduleGc():this.#v.remove(this))}continue(){return this.#d?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#p({type:"continue"})},r={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#d=(0,u.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#v.canRun(this)});let n="pending"===this.state.status,i=!this.#d.canStart();try{if(n)t();else{this.#p({type:"pending",variables:e,isPaused:i}),await this.#v.config.onMutate?.(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:i})}let o=await this.#d.start();return await this.#v.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#v.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#p({type:"success",data:o}),o}catch(t){try{throw await this.#v.config.onError?.(t,e,this.state.context,this,r),await this.options.onError?.(t,e,this.state.context,r),await this.#v.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,t,e,this.state.context,r),t}finally{this.#p({type:"error",error:t})}}finally{this.#v.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),o.notifyManager.batch(()=>{this.#m.forEach(t=>{t.onMutationUpdate(e)}),this.#v.notify({mutation:this,type:"updated",action:e})})}};function d(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",()=>c,"getDefaultState",()=>d],1370);var h=a,f=class extends h.Subscribable{constructor(e={}){super(),this.config=e,this.#b=new Set,this.#y=new Map,this.#x=0}#b;#y;#x;build(e,t,r){let n=new c({client:e,mutationCache:this,mutationId:++this.#x,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#b.add(e);let t=p(e);if("string"==typeof t){let r=this.#y.get(t);r?r.push(e):this.#y.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#b.delete(e)){let t=p(e);if("string"==typeof t){let r=this.#y.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#y.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=p(e);if("string"!=typeof t)return!0;{let r=this.#y.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=p(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#y.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){o.notifyManager.batch(()=>{this.#b.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#b.clear(),this.#y.clear()})}getAll(){return Array.from(this.#b)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,n.matchMutation)(e,t))}notify(e){o.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return o.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(n.noop))))}};function p(e){return e.options.scope?.id}var g=e.i(47789),m=e.i(30518);function v(e){return{onFetch:(t,r)=>{let i=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],s=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,c=async()=>{let r=!1,c=(0,n.ensureQueryFn)(t.options,t.fetchOptions),d=async(e,i,o)=>{let a;if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let s=(Object.defineProperty(a={client:t.client,queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta},"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)}),a),l=await c(s),{maxPages:u}=t.options,d=o?n.addToStart:n.addToEnd;return{pages:d(e.pages,l,u),pageParams:d(e.pageParams,i,u)}};if(o&&a.length){let e="backward"===o,t={pages:a,pageParams:s},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:b)(i,t);l=await d(t,r,e)}else{let t=e??a.length;do{let e=0===u?s[0]??i.initialPageParam:b(i,l);if(u>0&&null==e)break;l=await d(l,e),u++}while(u<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function b(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var y=class{#w;#v;#h;#_;#C;#k;#S;#E;constructor(e={}){this.#w=e.queryCache||new s,this.#v=e.mutationCache||new f,this.#h=e.defaultOptions||{},this.#_=new Map,this.#C=new Map,this.#k=0}mount(){this.#k++,1===this.#k&&(this.#S=g.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onFocus())}),this.#E=m.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onOnline())}))}unmount(){this.#k--,0===this.#k&&(this.#S?.(),this.#S=void 0,this.#E?.(),this.#E=void 0)}isFetching(e){return this.#w.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#v.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#w.build(this,t),i=r.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#w.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let i=this.defaultQueryOptions({queryKey:e}),o=this.#w.get(i.queryHash),a=o?.state.data,s=(0,n.functionalUpdate)(t,a);if(void 0!==s)return this.#w.build(this,i).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return o.notifyManager.batch(()=>this.#w.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state}removeQueries(e){let t=this.#w;o.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#w;return o.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(o.notifyManager.batch(()=>this.#w.findAll(e).map(e=>e.cancel(r)))).then(n.noop).catch(n.noop)}invalidateQueries(e,t={}){return o.notifyManager.batch(()=>(this.#w.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(o.notifyManager.batch(()=>this.#w.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(n.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(n.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#w.build(this,t);return r.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.noop).catch(n.noop)}fetchInfiniteQuery(e){return e.behavior=v(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.noop).catch(n.noop)}ensureInfiniteQueryData(e){return e.behavior=v(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return m.onlineManager.isOnline()?this.#v.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#w}getMutationCache(){return this.#v}getDefaultOptions(){return this.#h}setDefaultOptions(e){this.#h=e}setQueryDefaults(e,t){this.#_.set((0,n.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#_.values()],r={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#C.set((0,n.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#C.values()],r={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#h.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#h.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#w.clear(),this.#v.clear()}};let x=t.default.create({baseURL:r.PUBLIC_API_URL}),w=new y;e.s(["axiosClient",0,x,"reactQueryClient",0,w],5443)},70305,(e,t,r)=>{"use strict";var n=e.r(64789),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),a(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},34960,(e,t,r)=>{"use strict";t.exports=e.r(70305)},99992,80125,e=>{"use strict";var t=e.i(64789),r=e.i(34960);let n=t.useInsertionEffect,i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect,o=n||i,a=e=>{let r=t.useRef([e,(...e)=>r[0](...e)]).current;return o(()=>{r[0]=e}),r[1]};e.s(["useEvent",()=>a,"useIsomorphicLayoutEffect",()=>i],80125);let s="pushState",l="replaceState",u=["popstate",s,l,"hashchange"],c=e=>{for(let t of u)addEventListener(t,e);return()=>{for(let t of u)removeEventListener(t,e)}},d=(e,t)=>(0,r.useSyncExternalStore)(c,e,t),h=()=>location.search,f=({ssrSearch:e=""}={})=>d(h,()=>e),p=()=>location.pathname,g=(e,{replace:t=!1,state:r=null}={})=>history[t?l:s](r,"",e),m=(e={})=>[(({ssrPath:e}={})=>d(p,e?()=>e:p))(e),g],v=Symbol.for("wouter_v3");if("undefined"!=typeof history&&void 0===window[v]){for(let e of[s,l]){let t=history[e];history[e]=function(){let r=t.apply(this,arguments),n=new Event(e);return n.arguments=arguments,dispatchEvent(n),r}}Object.defineProperty(window,v,{value:!0})}e.s(["navigate",()=>g,"useBrowserLocation",()=>m,"useLocationProperty",()=>d,"useSearch",()=>f],99992)},941,e=>{"use strict";var t=e.i(64789),r=e.i(15839),n=t.createContext(void 0),i=e=>{let r=t.useContext(n);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r},o=({client:e,children:i})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(n.Provider,{value:e,children:i}));e.s(["QueryClientProvider",()=>o,"useQueryClient",()=>i])},39092,e=>{"use strict";function t(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var r,n,i,o,a=[],s="",l=e.split("/");for(l[0]||l.shift();i=l.shift();)"*"===(r=i[0])?(a.push(r),s+="?"===i[1]?"(?:/(.*))?":"/(.*)"):":"===r?(n=i.indexOf("?",1),o=i.indexOf(".",1),a.push(i.substring(1,~n?n:~o?o:i.length)),s+=~n&&!~o?"(?:/([^/]+?))?":"/([^/]+?)",~o&&(s+=(~n?"?":"")+"\\"+i.substring(o))):s+="/"+i;return{keys:a,pattern:RegExp("^"+s+(t?"(?=$|/)":"/?$"),"i")}}e.s(["parse",()=>t])},1343,e=>{"use strict";var t=e.i(39092),r=e.i(99992),n=e.i(80125),i=e.i(64789);let o=(e="")=>"/"===e?"":e,a=e=>{try{return decodeURI(e)}catch(t){return e}},s={hook:r.useBrowserLocation,searchHook:r.useSearch,parser:t.parse,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},l=(0,i.createContext)(s),u=()=>(0,i.useContext)(l),c={},d=(0,i.createContext)(c),h=e=>{let[t,r]=e.hook(e);return[((e="",t)=>{let r,n;return r=a(o(e)),(n=a(t)).toLowerCase().indexOf(r.toLowerCase())?"~"+n:n.slice(r.length)||"/"})(e.base,t),(0,n.useEvent)((t,n)=>{let i;return r((i=e.base,"~"===t[0]?t.slice(1):o(i)+t),n)})]},f=()=>h(u()),p=(e,t,r,n)=>{let i,o,{pattern:a,keys:s}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",n),l=a.exec(r)||[],[u,...c]=l;return void 0!==u?[!0,(i=!1!==s?Object.fromEntries(s.map((e,t)=>[e,c[t]])):l.groups,o={...c},i&&Object.assign(o,i),o),...n?[u]:[]]:[!1,null]},g=e=>p(u().parser,e,f()[0]),m=({children:e,...t})=>{let r=u(),n=t.hook?s:r,o=n,[a,c]=t.ssrPath?.split("?")??[];c&&(t.ssrSearch=c,t.ssrPath=a),t.hrefs=t.hrefs??t.hook?.hrefs;let d=(0,i.useRef)({}),h=d.current,f=h;for(let e in n){let r="base"===e?n[e]+(t[e]||""):t[e]||n[e];h===f&&r!==f[e]&&(d.current=f={...f}),f[e]=r,(r!==n[e]||r!==o[e])&&(o=f)}return(0,i.createElement)(l.Provider,{value:o,children:e})},v=({children:e,component:t},r)=>t?(0,i.createElement)(t,{params:r}):"function"==typeof e?e(r):e,b=({path:e,nest:t,match:r,...n})=>{var o;let a,s,l=u(),[f]=h(l),[g,b,y]=r??p(l.parser,e,f,t),x=(o={...(0,i.useContext)(d),...b},s=(a=(0,i.useRef)(c)).current,a.current=Object.keys(o).length!==Object.keys(s).length||Object.entries(o).some(([e,t])=>t!==s[e])?o:s);if(!g)return null;let w=y?(0,i.createElement)(m,{base:y},v(n,x)):v(n,x);return(0,i.createElement)(d.Provider,{value:x,children:w})};(0,i.forwardRef)((e,t)=>{let r=u(),[o,a]=h(r),{to:s="",href:l=s,onClick:c,asChild:d,children:f,className:p,replace:g,state:m,...v}=e,b=(0,n.useEvent)(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||0!==t.button||(c?.(t),t.defaultPrevented||(t.preventDefault(),a(l,e)))}),y=r.hrefs("~"===l[0]?l.slice(1):r.base+l,r);return d&&(0,i.isValidElement)(f)?(0,i.cloneElement)(f,{onClick:b,href:y}):(0,i.createElement)("a",{...v,onClick:b,href:y,className:p?.call?p(o===l):p,children:f,ref:t})});let y=e=>Array.isArray(e)?e.flatMap(e=>y(e&&e.type===i.Fragment?e.props.children:e)):[e],x=({children:e,location:t})=>{let r=u(),[n]=h(r);for(let o of y(e)){let e=0;if((0,i.isValidElement)(o)&&(e=p(r.parser,o.props.path,t||n,o.props.nest))[0])return(0,i.cloneElement)(o,{match:e})}return null},w=e=>{let{to:t,href:r=t}=e,i=u(),[,o]=h(i),a=(0,n.useEvent)(()=>o(t||r,e)),{ssrContext:s}=i;return(0,n.useIsomorphicLayoutEffect)(()=>{a()},[]),s&&(s.redirectTo=t),null};e.s(["Redirect",()=>w,"Route",()=>b,"Router",()=>m,"Switch",()=>x,"useLocation",()=>f,"useRoute",()=>g])},75119,e=>{"use strict";var t=e.i(15839),r=e.i(64789);let n='select * from {{ ref("mymodel") }}',i=(0,r.createContext)({sqlQuery:n,setSqlQuery:()=>{},primaryKeys:void 0,setPrimaryKeys:()=>{},isCustomQueries:!1,setCustomQueries:()=>{},baseSqlQuery:n,setBaseSqlQuery:()=>{}});function o({children:e}){let[o,a]=r.default.useState(n),[s,l]=r.default.useState(n),[u,c]=r.default.useState(!1),[d,h]=r.default.useState();return(0,t.jsx)(i.Provider,{value:{setSqlQuery:a,sqlQuery:o,setPrimaryKeys:h,primaryKeys:d,isCustomQueries:u,setCustomQueries:c,baseSqlQuery:s,setBaseSqlQuery:l},children:e})}let a=(0,r.createContext)({isNodesFetching:[],setIsNodesFetching:()=>{}});function s({children:e}){let[n,i]=r.default.useState([]);return(0,t.jsx)(a.Provider,{value:{isNodesFetching:n,setIsNodesFetching:i},children:e})}e.s(["RecceQueryContextProvider",()=>o,"RowCountStateContextProvider",()=>s,"defaultSqlQuery",0,n,"useRecceQueryContext",0,()=>(0,r.useContext)(i)])},93104,(e,t,r)=>{"use strict";function n(e,t){e[t]?e[t]++:e[t]=1}function i(e,t){--e[t]||delete e[t]}function o(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}return i+"\x01"+o+"\x01"+(void 0===n?"\0":n)}function a(e,t){return o(e,t.v,t.w,t.name)}t.exports=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if("\0"===e)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(i){var o=r.parent(i);return void 0===o||t.hasNode(o)?(n[i]=o,o):o in n?n[o]:e(o)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,i){return n.length>1?r.setEdge(e,i,t):r.setEdge(e,i),i}),this}setEdge(){var e,t,r,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,r=s.name,2==arguments.length&&(i=arguments[1],a=!0)):(e=s,t=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,t=""+t,void 0!==r&&(r=""+r);var l=o(this._isDirected,e,t,r);if(Object.hasOwn(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(void 0!==r&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(e,t,r);var u=function(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return n&&(s.name=n),s}(this._isDirected,e,t,r);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[l]=u,n(this._preds[t],e),n(this._sucs[e],t),this._in[t][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?a(this._isDirected,arguments[0]):o(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?a(this._isDirected,arguments[0]):o(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var n=1==arguments.length?a(this._isDirected,arguments[0]):o(this._isDirected,e,t,r),s=this._edgeObjs[n];return s&&(e=s.v,t=s.w,delete this._edgeLabels[n],delete this._edgeObjs[n],i(this._preds[t],e),i(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,t){var r=this._in[e];if(r){var n=Object.values(r);return t?n.filter(e=>e.v===t):n}}outEdges(e,t){var r=this._out[e];if(r){var n=Object.values(r);return t?n.filter(e=>e.w===t):n}}nodeEdges(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}}},56524,(e,t,r)=>{t.exports="2.2.4"},60242,(e,t,r)=>{t.exports={Graph:e.r(93104),version:e.r(56524)}},28058,(e,t,r)=>{var n=e.r(93104);t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),i={v:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.parent=n),i}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},13595,(e,t,r)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(i){t=[],function n(i){Object.hasOwn(r,i)||(r[i]=!0,t.push(i),e.successors(i).forEach(n),e.predecessors(i).forEach(n))}(i),t.length&&n.push(t)}),n}},24053,(e,t,r)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,i=n.length;return r[e]=i,n.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}}},95904,(e,t,r)=>{var n=e.r(24053);t.exports=function(e,t,r,o){return function(e,t,r,i){var o,a,s={},l=new n,u=function(e){var t=e.v!==o?e.v:e.w,n=s[t],i=r(e),u=a.distance+i;if(i<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);u<n.distance&&(n.distance=u,n.predecessor=o,l.decrease(t,u))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;s[e]={distance:r},l.add(e,r)});l.size()>0&&(a=s[o=l.removeMin()]).distance!==1/0;)i(o).forEach(u);return s}(e,String(t),r||i,o||function(t){return e.outEdges(t)})};var i=()=>1},53242,(e,t,r)=>{var n=e.r(95904);t.exports=function(e,t,r){return e.nodes().reduce(function(i,o){return i[o]=n(e,o,t,r),i},{})}},39386,(e,t,r)=>{t.exports=function(e){var t=0,r=[],n={},i=[];return e.nodes().forEach(function(o){Object.hasOwn(n,o)||function o(a){var s=n[a]={onStack:!0,lowlink:t,index:t++};if(r.push(a),e.successors(a).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(o(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))}),s.lowlink===s.index){var l,u=[];do n[l=r.pop()].onStack=!1,u.push(l);while(a!==l)i.push(u)}}(o)}),i}},28782,(e,t,r)=>{var n=e.r(39386);t.exports=function(e){return n(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}},53449,(e,t,r)=>{t.exports=function(e,t,r){var i,o,a,s,l;return i=e,o=t||n,a=r||function(t){return e.outEdges(t)},s={},(l=i.nodes()).forEach(function(e){s[e]={},s[e][e]={distance:0},l.forEach(function(t){e!==t&&(s[e][t]={distance:1/0})}),a(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=o(t);s[e][r]={distance:n,predecessor:e}})}),l.forEach(function(e){var t=s[e];l.forEach(function(r){var n=s[r];l.forEach(function(r){var i=n[e],o=t[r],a=n[r],s=i.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)})})}),s};var n=()=>1},86103,(e,t,r)=>{function n(e){var t={},r={},n=[];if(e.sinks().forEach(function o(a){if(Object.hasOwn(r,a))throw new i;Object.hasOwn(t,a)||(r[a]=!0,t[a]=!0,e.predecessors(a).forEach(o),delete r[a],n.push(a))}),Object.keys(t).length!==e.nodeCount())throw new i;return n}class i extends Error{constructor(){super(...arguments)}}t.exports=n,n.CycleException=i},71053,(e,t,r)=>{var n=e.r(86103);t.exports=function(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}},37525,(e,t,r)=>{function n(e,t,r,n){for(var i=[[e,!1]];i.length>0;){var a=i.pop();a[1]?n.push(a[0]):Object.hasOwn(r,a[0])||(r[a[0]]=!0,i.push([a[0],!0]),o(t(a[0]),e=>i.push([e,!1])))}}function i(e,t,r,n){for(var i=[e];i.length>0;){var a=i.pop();Object.hasOwn(r,a)||(r[a]=!0,n.push(a),o(t(a),e=>i.push(e)))}}function o(e,t){for(var r=e.length;r--;)t(e[r],r,e);return e}t.exports=function(e,t,r){Array.isArray(t)||(t=[t]);var o=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),a="post"===r?n:i,s=[],l={};return t.forEach(t=>{if(!e.hasNode(t))throw Error("Graph does not have node: "+t);a(t,o,l,s)}),s}},47059,(e,t,r)=>{var n=e.r(37525);t.exports=function(e,t){return n(e,t,"post")}},81445,(e,t,r)=>{var n=e.r(37525);t.exports=function(e,t){return n(e,t,"pre")}},9712,(e,t,r)=>{var n=e.r(93104),i=e.r(24053);t.exports=function(e,t){var r,o=new n,a={},s=new i;function l(e){var n=e.v===r?e.w:e.v,i=s.priority(n);if(void 0!==i){var o=t(e);o<i&&(a[n]=r,s.decrease(n,o))}}if(0===e.nodeCount())return o;e.nodes().forEach(function(e){s.add(e,1/0),o.setNode(e)}),s.decrease(e.nodes()[0],0);for(var u=!1;s.size()>0;){if(Object.hasOwn(a,r=s.removeMin()))o.setEdge(r,a[r]);else if(u)throw Error("Input graph is not connected: "+e);else u=!0;e.nodeEdges(r).forEach(l)}return o}},81620,(e,t,r)=>{t.exports={components:e.r(13595),dijkstra:e.r(95904),dijkstraAll:e.r(53242),findCycles:e.r(28782),floydWarshall:e.r(53449),isAcyclic:e.r(71053),postorder:e.r(47059),preorder:e.r(81445),prim:e.r(9712),tarjan:e.r(39386),topsort:e.r(86103)}},76321,(e,t,r)=>{var n=e.r(60242);t.exports={Graph:n.Graph,json:e.r(28058),alg:e.r(81620),version:n.version}},38141,(e,t,r)=>{function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return n(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,i)),r=r._prev;return"["+e.join(", ")+"]"}}},35934,(e,t,r)=>{let n=e.r(76321).Graph,i=e.r(38141);t.exports=function(e,t){var r,l;let u,c,d,h,f;if(1>=e.nodeCount())return[];let p=(r=e,l=t||o,u=new n,c=0,d=0,r.nodes().forEach(e=>{u.setNode(e,{v:e,in:0,out:0})}),r.edges().forEach(e=>{let t=u.edge(e.v,e.w)||0,r=l(e);u.setEdge(e.v,e.w,t+r),d=Math.max(d,u.node(e.v).out+=r),c=Math.max(c,u.node(e.w).in+=r)}),h=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(d+c+3).map(()=>new i),f=c+1,u.nodes().forEach(e=>{s(h,f,u.node(e))}),{graph:u,buckets:h,zeroIdx:f});return(function(e,t,r){let n,i=[],o=t[t.length-1],s=t[0];for(;e.nodeCount();){for(;n=s.dequeue();)a(e,t,r,n);for(;n=o.dequeue();)a(e,t,r,n);if(e.nodeCount()){for(let o=t.length-2;o>0;--o)if(n=t[o].dequeue()){i=i.concat(a(e,t,r,n,!0));break}}}return i})(p.graph,p.buckets,p.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};let o=()=>1;function a(e,t,r,n,i){let o=i?[]:void 0;return e.inEdges(n.v).forEach(n=>{let a=e.edge(n),l=e.node(n.v);i&&o.push({v:n.v,w:n.w}),l.out-=a,s(t,r,l)}),e.outEdges(n.v).forEach(n=>{let i=e.edge(n),o=n.w,a=e.node(o);a.in-=i,s(t,r,a)}),e.removeNode(n.v),o}function s(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}},58704,(e,t,r)=>{"use strict";let n=e.r(76321).Graph;function i(e,t,r,n){for(var i=n;e.hasNode(i);)i=l(n);return r.dummy=t,e.setNode(i,r),i}t.exports={addBorderNode:function(e,t,r,n){let o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=n),i(e,"border",o,t)},addDummyNode:i,applyWithChunking:o,asNonCompoundGraph:function(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t},buildLayerMatrix:function(e){let t=u(a(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),i=n.rank;void 0!==i&&(t[i][n.order]=r)}),t},intersectRect:function(e,t){let r,n,i=e.x,o=e.y,a=t.x-i,s=t.y-o,l=e.width/2,u=e.height/2;if(!a&&!s)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(a)*u?(s<0&&(u=-u),r=u*a/s,n=u):(a<0&&(l=-l),r=l,n=l*s/a),{x:i+r,y:o+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:a,normalizeRanks:function(e){let t=o(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},range:u,removeEmptyRanks:function(e){let t=o(Math.min,e.nodes().map(t=>e.node(t).rank)),r=[];e.nodes().forEach(n=>{let i=e.node(n).rank-t;r[i]||(r[i]=[]),r[i].push(n)});let n=0,i=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%i!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:l,zipObject:c};function o(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let i=e.slice(n,n+t);r.push(i)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function a(e){return o(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}let s=0;function l(e){return e+""+ ++s}function u(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let i=[];for(let t=e;n(t);t+=r)i.push(t);return i}function c(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}},38577,(e,t,r)=>{"use strict";let n=e.r(35934),i=e.r(58704).uniqueId;t.exports={run:function(e){var t,r;let o,a,s;("greedy"===e.graph().acyclicer?n(e,(t=e,e=>t.edge(e).weight)):(o=[],a={},s={},(r=e).nodes().forEach(function e(t){Object.hasOwn(s,t)||(s[t]=!0,a[t]=!0,r.outEdges(t).forEach(t=>{Object.hasOwn(a,t.w)?o.push(t):e(t.w)}),delete a[t])}),o)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,i("rev"))})},undo:function(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}},66771,(e,t,r)=>{"use strict";let n=e.r(58704);t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let r,i,o,a=t.v,s=e.node(a).rank,l=t.w,u=e.node(l).rank,c=t.name,d=e.edge(t),h=d.labelRank;if(u!==s+1){for(e.removeEdge(t),o=0,++s;s<u;++o,++s)d.points=[],i={width:0,height:0,edgeLabel:d,edgeObj:t,rank:s},r=n.addDummyNode(e,"edge",i,"_d"),s===h&&(i.width=d.width,i.height=d.height,i.dummy="edge-label",i.labelpos=d.labelpos),e.setEdge(a,r,{weight:d.weight},c),0===o&&e.graph().dummyChains.push(r),a=r;e.setEdge(a,l,{weight:d.weight},c)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r,n=e.node(t),i=n.edgeLabel;for(e.setEdge(n.edgeObj,i);n.dummy;)r=e.successors(t)[0],e.removeNode(t),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),t=r,n=e.node(t)})}}},79466,(e,t,r)=>{"use strict";let{applyWithChunking:n}=e.r(58704);t.exports={longestPath:function(e){var t={};e.sources().forEach(function r(i){var o=e.node(i);if(Object.hasOwn(t,i))return o.rank;t[i]=!0;var a=n(Math.min,e.outEdges(i).map(t=>null==t?1/0:r(t.w)-e.edge(t).minlen));return a===1/0&&(a=0),o.rank=a})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},813,(e,t,r)=>{"use strict";var n=e.r(76321).Graph,i=e.r(79466).slack;t.exports=function(e){var t,r,o,a,s=new n({directed:!1}),l=e.nodes()[0],u=e.nodeCount();for(s.setNode(l,{});t=s,r=e,t.nodes().forEach(function e(n){r.nodeEdges(n).forEach(o=>{var a=o.v,s=n===a?o.w:a;t.hasNode(s)||i(r,o)||(t.setNode(s,{}),t.setEdge(n,s,{}),e(s))})}),t.nodeCount()<u;)o=function(e,t){return t.edges().reduce((r,n)=>{let o=1/0;return(e.hasNode(n.v)!==e.hasNode(n.w)&&(o=i(t,n)),o<r[0])?[o,n]:r},[1/0,null])[1]}(s,e),a=s.hasNode(o.v)?i(e,o):-i(e,o),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(s,e,a);return s}},46101,(e,t,r)=>{"use strict";var n=e.r(813),i=e.r(79466).slack,o=e.r(79466).longestPath,a=e.r(76321).alg.preorder,s=e.r(76321).alg.postorder,l=e.r(58704).simplify;function u(e){o(e=l(e));var t,r,i=n(e);for(h(i),c(i,e);t=f(i);)r=p(i,e,t),g(i,e,t,r)}function c(e,t){var r=s(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,i,o,a;return n=e,i=t,o=r,a=n.node(o).parent,void(n.edge(o,a).cutvalue=d(n,i,o))})}function d(e,t,r){var n=e.node(r).parent,i=!0,o=t.edge(r,n),a=0;return o||(i=!1,o=t.edge(n,r)),a=o.weight,t.nodeEdges(r).forEach(o=>{var s=o.v===r,l=s?o.w:o.v;if(l!==n){var u,c,d,h=s===i,f=t.edge(o).weight;if(a+=h?f:-f,u=e,c=r,d=l,u.hasEdge(c,d)){var p=e.edge(r,l).cutvalue;a+=h?-p:p}}}),a}function h(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,i,o){var a=n,s=t.node(i);return r[i]=!0,t.neighbors(i).forEach(o=>{Object.hasOwn(r,o)||(n=e(t,r,n,o,i))}),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}(e,{},1,t)}function f(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function p(e,t,r){var n=r.v,o=r.w;t.hasEdge(n,o)||(n=r.w,o=r.v);var a=e.node(n),s=e.node(o),l=a,u=!1;return a.lim>s.lim&&(l=s,u=!0),t.edges().filter(t=>u===m(e,e.node(t.v),l)&&u!==m(e,e.node(t.w),l)).reduce((e,r)=>i(t,r)<i(t,e)?r:e)}function g(e,t,r,n){var i,o,s,l,u=r.v,d=r.w;e.removeEdge(u,d),e.setEdge(n.v,n.w,{}),h(e),c(e,t),i=e,o=t,s=i.nodes().find(e=>!o.node(e).parent),(l=(l=a(i,s)).slice(1)).forEach(e=>{var t=i.node(e).parent,r=o.edge(e,t),n=!1;r||(r=o.edge(t,e),n=!0),o.node(e).rank=o.node(t).rank+(n?r.minlen:-r.minlen)})}function m(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=u,u.initLowLimValues=h,u.initCutValues=c,u.calcCutValue=d,u.leaveEdge=f,u.enterEdge=p,u.exchangeEdges=g},29221,(e,t,r)=>{"use strict";var n=e.r(79466).longestPath,i=e.r(813),o=e.r(46101);t.exports=function(e){var t,r=e.graph().ranker;if(r instanceof Function)return r(e);switch(e.graph().ranker){case"network-simplex":default:o(e);break;case"tight-tree":n(t=e),i(t);break;case"longest-path":a(e);case"none":}};var a=n},44809,(e,t,r)=>{t.exports=function(e){var t;let r,n,i=(r={},n=0,(t=e).children().forEach(function e(i){let o=n;t.children(i).forEach(e),r[i]={low:o,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,o=function(e,t,r,n){let i,o,a=[],s=[],l=Math.min(t[r].low,t[n].low),u=Math.max(t[r].lim,t[n].lim);i=r;do a.push(i=e.parent(i));while(i&&(t[i].low>l||u>t[i].lim))for(o=i,i=n;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,i,n.v,n.w),a=o.path,s=o.lca,l=0,u=a[0],c=!0;for(;t!==n.w;){if(r=e.node(t),c){for(;(u=a[l])!==s&&e.node(u).maxRank<r.rank;)l++;u===s&&(c=!1)}if(!c){for(;l<a.length-1&&e.node(u=a[l+1]).minRank<=r.rank;)l++;u=a[l]}e.setParent(t,u),t=e.successors(t)[0]}})}},11517,(e,t,r)=>{let n=e.r(58704);t.exports={run:function(e){var t,r,i;let o=n.addDummyNode(e,"root",{},"_root"),a=(r={},(t=e).children().forEach(e=>(function e(n,i){var o=t.children(n);o&&o.length&&o.forEach(t=>e(t,i+1)),r[n]=i})(e,1)),r),s=Object.values(a),l=n.applyWithChunking(Math.max,s)-1,u=2*l+1;e.graph().nestingRoot=o,e.edges().forEach(t=>e.edge(t).minlen*=u);let c=(i=e).edges().reduce((e,t)=>e+i.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,r,i,o,a,s,l){let u=t.children(l);if(!u.length){l!==r&&t.setEdge(r,l,{weight:0,minlen:i});return}let c=n.addBorderNode(t,"_bt"),d=n.addBorderNode(t,"_bb"),h=t.node(l);t.setParent(c,l),h.borderTop=c,t.setParent(d,l),h.borderBottom=d,u.forEach(n=>{e(t,r,i,o,a,s,n);let u=t.node(n),h=u.borderTop?u.borderTop:n,f=u.borderBottom?u.borderBottom:n,p=u.borderTop?o:2*o,g=h!==f?1:a-s[l]+1;t.setEdge(c,h,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(f,d,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(l)||t.setEdge(r,c,{weight:0,minlen:a+s[l]})})(e,o,u,c,l,a,t)),e.graph().nodeRankFactor=u},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}},34950,(e,t,r)=>{let n=e.r(58704);function i(e,t,r,i,o,a){let s=o[t][a-1],l=n.addDummyNode(e,"border",{width:0,height:0,rank:a,borderType:t},r);o[t][a]=l,e.setParent(l,i),s&&e.setEdge(s,l,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let n=e.children(r),o=e.node(r);if(n.length&&n.forEach(t),Object.hasOwn(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(let t=o.minRank,n=o.maxRank+1;t<n;++t)i(e,"borderLeft","_bl",r,o,t),i(e,"borderRight","_br",r,o,t)}})}},94453,(e,t,r)=>{"use strict";function n(e){e.nodes().forEach(t=>i(e.node(t))),e.edges().forEach(t=>i(e.edge(t)))}function i(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.y=-e.y}function a(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&n(e)},undo:function(e){var t,r;let i=e.graph().rankdir.toLowerCase();("bt"===i||"rl"===i)&&((t=e).nodes().forEach(e=>o(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(o),Object.hasOwn(r,"y")&&o(r)})),("lr"===i||"rl"===i)&&((r=e).nodes().forEach(e=>a(r.node(e))),r.edges().forEach(e=>{let t=r.edge(e);t.points.forEach(a),Object.hasOwn(t,"x")&&a(t)}),n(e))}}},34278,(e,t,r)=>{"use strict";let n=e.r(58704);t.exports=function(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),o=n.applyWithChunking(Math.max,i),a=n.range(o+1).map(()=>[]);return r.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,a[e.node(n).rank].push(n),e.successors(n).forEach(r))}),a}},35208,(e,t,r)=>{"use strict";let n=e.r(58704).zipObject;t.exports=function(e,t){let r=0;for(let i=1;i<t.length;++i)r+=function(e,t,r){let i=n(r,r.map((e,t)=>t)),o=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),a=1;for(;a<r.length;)a<<=1;let s=2*a-1;a-=1;let l=Array(s).fill(0),u=0;return o.forEach(e=>{let t=e.pos+a;l[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*r}),u}(e,t[i-1],t[i]);return r}},25077,(e,t,r)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),i=e.node(r.v);return{sum:t.sum+n.weight*i.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}},7049,(e,t,r)=>{"use strict";let n=e.r(58704);t.exports=function(e,t){let r={};return e.forEach((e,t)=>{let n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(n.barycenter=e.barycenter,n.weight=e.weight)}),t.edges().forEach(e=>{let t=r[e.v],n=r[e.w];void 0!==t&&void 0!==n&&(n.indegree++,t.out.push(r[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{!t.merged&&(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>n.pick(e,["vs","i","barycenter","weight"]))}(Object.values(r).filter(e=>!e.indegree))}},3369,(e,t,r)=>{let n=e.r(58704);function i(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var r;let o=n.partition(e,e=>Object.hasOwn(e,"barycenter")),a=o.lhs,s=o.rhs.sort((e,t)=>t.i-e.i),l=[],u=0,c=0,d=0;a.sort((r=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:r?t.i-e.i:e.i-t.i)),d=i(l,s,d),a.forEach(e=>{d+=e.vs.length,l.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,d=i(l,s,d)});let h={vs:l.flat(!0)};return c&&(h.barycenter=u/c,h.weight=c),h}},38769,(e,t,r)=>{let n=e.r(25077),i=e.r(7049),o=e.r(3369);t.exports=function e(t,r,a,s){var l,u;let c=t.children(r),d=t.node(r),h=d?d.borderLeft:void 0,f=d?d.borderRight:void 0,p={};h&&(c=c.filter(e=>e!==h&&e!==f));let g=n(t,c);g.forEach(r=>{if(t.children(r.v).length){var n,i;let o=e(t,r.v,a,s);p[r.v]=o,Object.hasOwn(o,"barycenter")&&(n=r,i=o,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+i.barycenter*i.weight)/(n.weight+i.weight),n.weight+=i.weight):(n.barycenter=i.barycenter,n.weight=i.weight))}});let m=i(g,a);l=m,u=p,l.forEach(e=>{e.vs=e.vs.flatMap(e=>u[e]?u[e].vs:e)});let v=o(m,s);if(h&&(v.vs=[h,v.vs,f].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),r=t.node(t.predecessors(f)[0]);Object.hasOwn(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+e.order+r.order)/(v.weight+2),v.weight+=2}return v}},40956,(e,t,r)=>{let n=e.r(76321).Graph,i=e.r(58704);t.exports=function(e,t,r,o){o||(o=e.nodes());let a=function(e){for(var t;e.hasNode(t=i.uniqueId("_root")););return t}(e),s=new n({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(t=>e.node(t));return o.forEach(n=>{let i=e.node(n),o=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,o||a),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),o=void 0!==i?i.weight:0;s.setEdge(r,n,{weight:e.edge(t).weight+o})}),Object.hasOwn(i,"minRank")&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}},36203,(e,t,r)=>{t.exports=function(e,t,r){let n={},i;r.forEach(r=>{let o=e.parent(r),a,s;for(;o;){if((a=e.parent(o))?(s=n[a],n[a]=o):(s=i,i=o),s&&s!==o)return void t.setEdge(s,o);o=a}})}},10571,(e,t,r)=>{"use strict";let n=e.r(34278),i=e.r(35208),o=e.r(38769),a=e.r(40956),s=e.r(36203),l=e.r(76321).Graph,u=e.r(58704);function c(e,t,r){let n=new Map,i=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&i(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&i(e,t)}return t.map(function(t){return a(e,t,r,n.get(t)||[])})}function d(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,r){if(r&&"function"==typeof r.customOrder)return void r.customOrder(t,e);let a=u.maxRank(t),h=c(t,u.range(1,a+1),"inEdges"),f=c(t,u.range(a-1,-1,-1),"outEdges"),p=n(t);if(d(t,p),r&&r.disableOptimalOrderHeuristic)return;let g=1/0,m;for(let e=0,r=0;r<4;++e,++r){(function(e,t){let r=new l;e.forEach(function(e){let n=e.graph().root,i=o(e,n,r,t);i.vs.forEach((t,r)=>e.node(t).order=r),s(e,r,i.vs)})})(e%2?h:f,e%4>=2),p=u.buildLayerMatrix(t);let n=i(t,p);n<g&&(r=0,m=Object.assign({},p),g=n)}d(t,m)}},87670,(e,t,r)=>{"use strict";let n=e.r(76321).Graph,i=e.r(58704);function o(e,t){let r={};return t.length&&t.reduce(function(t,n){let i=0,o=0,a=t.length,l=n[n.length-1];return n.forEach((t,u)=>{let c=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),d=c?e.node(c).order:a;(c||t===l)&&(n.slice(o,u+1).forEach(t=>{e.predecessors(t).forEach(n=>{let o=e.node(n),a=o.order;(a<i||d<a)&&!(o.dummy&&e.node(t).dummy)&&s(r,n,t)})}),o=u+1,i=d)}),n}),r}function a(e,t){let r={};function n(t,n,o,a,l){let u;i.range(n,o).forEach(n=>{u=t[n],e.node(u).dummy&&e.predecessors(u).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<a||n.order>l)&&s(r,t,u)})})}return t.length&&t.reduce(function(t,r){let i=-1,o,a=0;return r.forEach((s,l)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(o=e.node(t[0]).order,n(r,a,l,i,o),a=l,i=o)}n(r,a,r.length,o,t.length)}),r}),r}function s(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function l(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function u(e,t,r,n){let i={},o={},a={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,o[e]=e,a[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=n(e);if(s.length){let n=((s=s.sort((e,t)=>a[e]-a[t])).length-1)/2;for(let u=Math.floor(n),c=Math.ceil(n);u<=c;++u){let n=s[u];o[e]===e&&t<a[n]&&!l(r,e,n)&&(o[n]=e,o[e]=i[e]=i[n],t=a[n])}}})}),{root:i,align:o}}function c(e,t,r,i,o){var a,s,l,u,c,d,h;let f,p,g,m={},v=(a=e,s=t,l=r,u=o,f=new n,g=(c=(p=a.graph()).nodesep,d=p.edgesep,h=u,(e,t,r)=>{let n,i,o=e.node(t),a=e.node(r);if(n=0+o.width/2,Object.hasOwn(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":i=-o.width/2;break;case"r":i=o.width/2}if(i&&(n+=h?i:-i),i=0,n+=(o.dummy?d:c)/2,n+=(a.dummy?d:c)/2,n+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":i=a.width/2;break;case"r":i=-a.width/2}return i&&(n+=h?i:-i),i=0,n}),s.forEach(e=>{let t;e.forEach(e=>{let r=l[e];if(f.setNode(r),t){var n=l[t],i=f.edge(n,r);f.setEdge(n,r,Math.max(g(a,e,t),i||0))}t=e})}),f),b=o?"borderLeft":"borderRight";function y(e,t){let r=v.nodes(),n=r.pop(),i={};for(;n;)i[n]?e(n):(i[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return y(function(e){m[e]=v.inEdges(e).reduce((e,t)=>Math.max(e,m[t.v]+v.edge(t)),0)},v.predecessors.bind(v)),y(function(t){let r=v.outEdges(t).reduce((e,t)=>Math.min(e,m[t.w]-v.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==b&&(m[t]=Math.max(m[t],r))},v.successors.bind(v)),Object.keys(i).forEach(e=>m[e]=m[r[e]]),m}function d(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,i=1/0;Object.entries(r).forEach(([t,r])=>{var o,a;let s=(o=e,a=t,o.node(a).width/2);n=Math.max(r+s,n),i=Math.min(r-s,i)});let o=n-i;return o<t[0]&&(t=[o,r]),t},[1/0,null])[1]}function h(e,t){let r=Object.values(t),n=i.applyWithChunking(Math.min,r),o=i.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(a=>{let s=r+a,l=e[s];if(l===t)return;let u=Object.values(l),c=n-i.applyWithChunking(Math.min,u);"l"!==a&&(c=o-i.applyWithChunking(Math.max,u)),c&&(e[s]=i.mapValues(l,e=>e+c))})})}function f(e,t){return i.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t,r=i.buildLayerMatrix(e),n=Object.assign(o(e,r),a(e,r)),s={};["u","d"].forEach(o=>{t="u"===o?r:Object.values(r).reverse(),["l","r"].forEach(r=>{"r"===r&&(t=t.map(e=>Object.values(e).reverse()));let a=("u"===o?e.predecessors:e.successors).bind(e),l=u(e,t,n,a),d=c(e,t,l.root,l.align,"r"===r);"r"===r&&(d=i.mapValues(d,e=>-e)),s[o+r]=d})});let l=d(e,s);return h(s,l),f(s,e.graph().align)},findType1Conflicts:o,findType2Conflicts:a,addConflict:s,hasConflict:l,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:h,findSmallestWidthAlignment:d,balance:f}},45551,(e,t,r)=>{"use strict";let n=e.r(58704),i=e.r(87670).positionX;t.exports=function(e){var t;let r,o,a;t=e=n.asNonCompoundGraph(e),r=n.buildLayerMatrix(t),o=t.graph().ranksep,a=0,r.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>t.node(e).y=a+r/2),a+=r+o}),Object.entries(i(e)).forEach(([t,r])=>e.node(t).x=r)}},64033,(e,t,r)=>{"use strict";let n=e.r(38577),i=e.r(66771),o=e.r(29221),a=e.r(58704).normalizeRanks,s=e.r(44809),l=e.r(58704).removeEmptyRanks,u=e.r(11517),c=e.r(34950),d=e.r(94453),h=e.r(10571),f=e.r(45551),p=e.r(58704),g=e.r(76321).Graph;t.exports=function(e,t){let r=t&&t.debugTiming?p.time:p.notime;r("layout",()=>{let E=r(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new g({multigraph:!0,compound:!0}),n=S(t.graph()),r.setGraph(Object.assign({},v,k(n,m),p.pick(n,b))),t.nodes().forEach(e=>{let n=k(S(t.node(e)),y);Object.keys(x).forEach(e=>{void 0===n[e]&&(n[e]=x[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=S(t.edge(e));r.setEdge(e,Object.assign({},_,k(n,w),p.pick(n,C)))}),r});r(" runLayout",()=>{var e,g,m;return e=E,g=r,m=t,void(g(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),g(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),g(" acyclic",()=>n.run(e)),g(" nestingGraph.run",()=>u.run(e)),g(" rank",()=>o(p.asNonCompoundGraph(e))),g(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};p.addDummyNode(t,"edge-proxy",n,"_ep")}})}),g(" removeEmptyRanks",()=>l(e)),g(" nestingGraph.cleanup",()=>u.cleanup(e)),g(" normalizeRanks",()=>a(e)),g(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),g(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),g(" normalize.run",()=>i.run(e)),g(" parentDummyChains",()=>s(e)),g(" addBorderSegments",()=>c(e)),g(" order",()=>h(e,m)),g(" insertSelfEdges",()=>{var t;return t=e,void p.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var i=t.node(e);i.order=n+r,(i.selfEdges||[]).forEach(e=>{p.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}),g(" adjustCoordinateSystem",()=>d.adjust(e)),g(" position",()=>f(e)),g(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,o=n.y,a=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],r.label.x=r.x,r.label.y=r.y}})}),g(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),o=t.node(r.borderLeft[r.borderLeft.length-1]),a=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),g(" normalize.undo",()=>i.undo(e)),g(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),g(" undoCoordinateSystem",()=>d.undo(e)),g(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,i=0,o=e.graph(),a=o.marginx||0,s=o.marginy||0;function l(e){let o=e.x,a=e.y,s=e.width,l=e.height;t=Math.min(t,o-s/2),r=Math.max(r,o+s/2),n=Math.min(n,a-l/2),i=Math.max(i,a+l/2)}e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&l(r)}),t-=a,n-=s,e.nodes().forEach(r=>{let i=e.node(r);i.x-=t,i.y-=n}),e.edges().forEach(r=>{let i=e.edge(r);i.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(i,"x")&&(i.x-=t),Object.hasOwn(i,"y")&&(i.y-=n)}),o.width=r-t+a,o.height=i-n+s})(e)),g(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r,n,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=a,n=o),i.points.unshift(p.intersectRect(o,r)),i.points.push(p.intersectRect(a,n))})}),g(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),g(" acyclic.undo",()=>n.undo(e)))}),r(" updateInputGraph",()=>{var t,r;return t=e,r=E,void(t.nodes().forEach(e=>{let n=t.node(e),i=r.node(e);n&&(n.x=i.x,n.y=i.y,n.rank=i.rank,r.children(e).length&&(n.width=i.width,n.height=i.height))}),t.edges().forEach(e=>{let n=t.edge(e),i=r.edge(e);n.points=i.points,Object.hasOwn(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)})})};let m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],y=["width","height","rank"],x={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function k(e,t){return p.mapValues(p.pick(e,t),Number)}function S(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}},10271,(e,t,r)=>{let n=e.r(58704),i=e.r(76321).Graph;t.exports={debugOrdering:function(e){let t=n.buildLayerMatrix(e),r=new i({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>r.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{r.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(r.setEdge(e,t,{style:"invis"}),t))}),r}}},81624,(e,t,r)=>{t.exports="1.1.8"},35380,(e,t,r)=>{t.exports={graphlib:e.r(76321),layout:e.r(64033),debug:e.r(10271),util:{time:e.r(58704).time,notime:e.r(58704).notime},version:e.r(81624)}},23043,23795,81167,e=>{"use strict";e.i(48962);var t,r,n,i,o,a,s,l,u,c,d,h,f,p,g,m={value:()=>{}};function v(){for(var e,t=0,r=arguments.length,n={};t<r;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw Error("illegal type: "+e);n[e]=[]}return new b(n)}function b(e){this._=e}function y(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=m,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}function x(){}function w(e){return null==e?x:function(){return this.querySelector(e)}}function _(){return[]}function C(e){return null==e?_:function(){return this.querySelectorAll(e)}}function k(e){return function(){return this.matches(e)}}function S(e){return function(t){return t.matches(e)}}b.prototype=v.prototype={constructor:b,on:function(e,t){var r,n=this._,i=(e+"").trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");if(r>=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((r=(e=i[o]).type)&&(r=function(e,t){for(var r,n=0,i=e.length;n<i;++n)if((r=e[n]).name===t)return r.value}(n[r],e.name)))return r;return}if(null!=t&&"function"!=typeof t)throw Error("invalid callback: "+t);for(;++o<a;)if(r=(e=i[o]).type)n[r]=y(n[r],e.name,t);else if(null==t)for(r in n)n[r]=y(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new b(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var r,n,i=Array(r),o=0;o<r;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(n=this._[e],o=0,r=n.length;o<r;++o)n[o].value.apply(t,i)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};var E=Array.prototype.find;function O(){return this.firstElementChild}var I=Array.prototype.filter;function P(){return Array.from(this.children)}function T(e){return Array(e.length)}function R(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function A(e,t,r,n,i,o){for(var a,s=0,l=t.length,u=o.length;s<u;++s)(a=t[s])?(a.__data__=o[s],n[s]=a):r[s]=new R(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function M(e,t,r,n,i,o,a){var s,l,u,c=new Map,d=t.length,h=o.length,f=Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=u=a.call(l,l.__data__,s,t)+"",c.has(u)?i[s]=l:c.set(u,l));for(s=0;s<h;++s)u=a.call(e,o[s],s,o)+"",(l=c.get(u))?(n[s]=l,l.__data__=o[s],c.delete(u)):r[s]=new R(e,o[s]);for(s=0;s<d;++s)(l=t[s])&&c.get(f[s])===l&&(i[s]=l)}function N(e){return e.__data__}function D(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}R.prototype={constructor:R,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var L="http://www.w3.org/1999/xhtml";let V={svg:"http://www.w3.org/2000/svg",xhtml:L,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function F(e){var t=e+="",r=t.indexOf(":");return r>=0&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),V.hasOwnProperty(t)?{space:V[t],local:e}:e}function j(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function z(e,t){return e.style.getPropertyValue(t)||j(e).getComputedStyle(e,null).getPropertyValue(t)}function B(e){return e.trim().split(/^|\s+/)}function H(e){return e.classList||new W(e)}function W(e){this._node=e,this._names=B(e.getAttribute("class")||"")}function U(e,t){for(var r=H(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function $(e,t){for(var r=H(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function q(){this.textContent=""}function G(){this.innerHTML=""}function K(){this.nextSibling&&this.parentNode.appendChild(this)}function Y(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function X(e){var t=F(e);return(t.local?function(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}:function(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===L&&t.documentElement.namespaceURI===L?t.createElement(e):t.createElementNS(r,e)}})(t)}function Q(){return null}function Z(){var e=this.parentNode;e&&e.removeChild(this)}function J(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ee(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function et(e){return function(){var t=this.__on;if(t){for(var r,n=0,i=-1,o=t.length;n<o;++n)(r=t[n],e.type&&r.type!==e.type||r.name!==e.name)?t[++i]=r:this.removeEventListener(r.type,r.listener,r.options);++i?t.length=i:delete this.__on}}}function er(e,t,r){return function(){var n,i=this.__on,o=function(e){t.call(this,e,this.__data__)};if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=r),n.value=t;return}}this.addEventListener(e.type,o,r),n={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(n):this.__on=[n]}}function en(e,t,r){var n=j(e),i=n.CustomEvent;"function"==typeof i?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}W.prototype={add:function(e){0>this._names.indexOf(e)&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ei=[null];function eo(e,t){this._groups=e,this._parents=t}function ea(){return new eo([[document.documentElement]],ei)}function es(e){return"string"==typeof e?new eo([[document.querySelector(e)]],[document.documentElement]):new eo([[e]],ei)}function el(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,[(n=n.matrixTransform(t.getScreenCTM().inverse())).x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}eo.prototype=ea.prototype={constructor:eo,select:function(e){"function"!=typeof e&&(e=w(e));for(var t=this._groups,r=t.length,n=Array(r),i=0;i<r;++i)for(var o,a,s=t[i],l=s.length,u=n[i]=Array(l),c=0;c<l;++c)(o=s[c])&&(a=e.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),u[c]=a);return new eo(n,this._parents)},selectAll:function(e){if("function"==typeof e){var t;t=e,e=function(){var e;return e=t.apply(this,arguments),null==e?[]:Array.isArray(e)?e:Array.from(e)}}else e=C(e);for(var r=this._groups,n=r.length,i=[],o=[],a=0;a<n;++a)for(var s,l=r[a],u=l.length,c=0;c<u;++c)(s=l[c])&&(i.push(e.call(s,s.__data__,c,l)),o.push(s));return new eo(i,o)},selectChild:function(e){var t;return this.select(null==e?O:(t="function"==typeof e?e:S(e),function(){return E.call(this.children,t)}))},selectChildren:function(e){var t;return this.selectAll(null==e?P:(t="function"==typeof e?e:S(e),function(){return I.call(this.children,t)}))},filter:function(e){"function"!=typeof e&&(e=k(e));for(var t=this._groups,r=t.length,n=Array(r),i=0;i<r;++i)for(var o,a=t[i],s=a.length,l=n[i]=[],u=0;u<s;++u)(o=a[u])&&e.call(o,o.__data__,u,a)&&l.push(o);return new eo(n,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,N);var r=t?M:A,n=this._parents,i=this._groups;"function"!=typeof e&&(b=e,e=function(){return b});for(var o=i.length,a=Array(o),s=Array(o),l=Array(o),u=0;u<o;++u){var c=n[u],d=i[u],h=d.length,f="object"==typeof(v=e.call(c,c&&c.__data__,u,n))&&"length"in v?v:Array.from(v),p=f.length,g=s[u]=Array(p),m=a[u]=Array(p);r(c,d,g,m,l[u]=Array(h),f,t);for(var v,b,y,x,w=0,_=0;w<p;++w)if(y=g[w]){for(w>=_&&(_=w+1);!(x=m[_])&&++_<p;);y._next=x||null}}return(a=new eo(a,n))._enter=s,a._exit=l,a},enter:function(){return new eo(this._enter||this._groups.map(T),this._parents)},exit:function(){return new eo(this._exit||this._groups.map(T),this._parents)},join:function(e,t,r){var n=this.enter(),i=this,o=this.exit();return"function"==typeof e?(n=e(n))&&(n=n.selection()):n=n.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==r?o.remove():r(o),n&&i?n.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),s=Array(i),l=0;l<a;++l)for(var u,c=r[l],d=n[l],h=c.length,f=s[l]=Array(h),p=0;p<h;++p)(u=c[p]||d[p])&&(f[p]=u);for(;l<i;++l)s[l]=r[l];return new eo(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n,i=e[t],o=i.length-1,a=i[o];--o>=0;)(n=i[o])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this},sort:function(e){function t(t,r){return t&&r?e(t.__data__,r.__data__):!t-!r}e||(e=D);for(var r=this._groups,n=r.length,i=Array(n),o=0;o<n;++o){for(var a,s=r[o],l=s.length,u=i[o]=Array(l),c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(t)}return new eo(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null},size:function(){let e=0;for(let t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i,o=t[r],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var r=F(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((null==t?r.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}}:"function"==typeof t?r.local?function(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}:function(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttribute(e):this.setAttribute(e,r)}}:r.local?function(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}:function(e,t){return function(){this.setAttribute(e,t)}})(r,t))},style:function(e,t,r){return arguments.length>1?this.each((null==t?function(e){return function(){this.style.removeProperty(e)}}:"function"==typeof t?function(e,t,r){return function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}:function(e,t,r){return function(){this.style.setProperty(e,t,r)}})(e,t,null==r?"":r)):z(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?function(e){return function(){delete this[e]}}:"function"==typeof t?function(e,t){return function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}}:function(e,t){return function(){this[e]=t}})(e,t)):this.node()[e]},classed:function(e,t){var r=B(e+"");if(arguments.length<2){for(var n=H(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof t?function(e,t){return function(){(t.apply(this,arguments)?U:$)(this,e)}}:t?function(e){return function(){U(this,e)}}:function(e){return function(){$(this,e)}})(r,t))},text:function(e){return arguments.length?this.each(null==e?q:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}:function(e){return function(){this.textContent=e}})(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?G:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}:function(e){return function(){this.innerHTML=e}})(e)):this.node().innerHTML},raise:function(){return this.each(K)},lower:function(){return this.each(Y)},append:function(e){var t="function"==typeof e?e:X(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var r="function"==typeof e?e:X(e),n=null==t?Q:"function"==typeof t?t:w(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(Z)},clone:function(e){return this.select(e?ee:J)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,r){var n,i,o=(e+"").trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");return r>=0&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}}),a=o.length;if(arguments.length<2){var s=this.node().__on;if(s){for(var l,u=0,c=s.length;u<c;++u)for(n=0,l=s[u];n<a;++n)if((i=o[n]).type===l.type&&i.name===l.name)return l.value}return}for(n=0,s=t?er:et;n<a;++n)this.each(s(o[n],t,r));return this},dispatch:function(e,t){return this.each(("function"==typeof t?function(e,t){return function(){return en(this,e,t.apply(this,arguments))}}:function(e,t){return function(){return en(this,e,t)}})(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n,i=e[t],o=0,a=i.length;o<a;++o)(n=i[o])&&(yield n)}};let eu={passive:!1},ec={capture:!0,passive:!1};function ed(e){e.stopImmediatePropagation()}function eh(e){e.preventDefault(),e.stopImmediatePropagation()}function ef(e){var t=e.document.documentElement,r=es(e).on("dragstart.drag",eh,ec);"onselectstart"in t?r.on("selectstart.drag",eh,ec):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ep(e,t){var r=e.document.documentElement,n=es(e).on("dragstart.drag",null);t&&(n.on("click.drag",eh,ec),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}let eg=e=>()=>e;function em(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}function ev(e){return!e.ctrlKey&&!e.button}function eb(){return this.parentNode}function ey(e,t){return null==t?{x:e.x,y:e.y}:t}function ex(){return navigator.maxTouchPoints||"ontouchstart"in this}function ew(){var e,t,r,n,i=ev,o=eb,a=ey,s=ex,l={},u=v("start","drag","end"),c=0,d=0;function h(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",b,eu).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!n&&i.call(this,a,s)){var l=x(this,o.call(this,a,s),a,s,"mouse");l&&(es(a.view).on("mousemove.drag",p,ec).on("mouseup.drag",g,ec),ef(a.view),ed(a),r=!1,e=a.clientX,t=a.clientY,l("start",a))}}function p(n){if(eh(n),!r){var i=n.clientX-e,o=n.clientY-t;r=i*i+o*o>d}l.mouse("drag",n)}function g(e){es(e.view).on("mousemove.drag mouseup.drag",null),ep(e.view,r),eh(e),l.mouse("end",e)}function m(e,t){if(i.call(this,e,t)){var r,n,a=e.changedTouches,s=o.call(this,e,t),l=a.length;for(r=0;r<l;++r)(n=x(this,s,e,t,a[r].identifier,a[r]))&&(ed(e),n("start",e,a[r]))}}function b(e){var t,r,n=e.changedTouches,i=n.length;for(t=0;t<i;++t)(r=l[n[t].identifier])&&(eh(e),r("drag",e,n[t]))}function y(e){var t,r,i=e.changedTouches,o=i.length;for(n&&clearTimeout(n),n=setTimeout(function(){n=null},500),t=0;t<o;++t)(r=l[i[t].identifier])&&(ed(e),r("end",e,i[t]))}function x(e,t,r,n,i,o){var s,d,f,p=u.copy(),g=el(o||r,t);if(null!=(f=a.call(e,new em("beforestart",{sourceEvent:r,target:h,identifier:i,active:c,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),n)))return s=f.x-g[0]||0,d=f.y-g[1]||0,function r(o,a,u){var m,v=g;switch(o){case"start":l[i]=r,m=c++;break;case"end":delete l[i],--c;case"drag":g=el(u||a,t),m=c}p.call(o,e,new em(o,{sourceEvent:a,subject:f,target:h,identifier:i,active:m,x:g[0]+s,y:g[1]+d,dx:g[0]-v[0],dy:g[1]-v[1],dispatch:p}),n)}}return h.filter=function(e){return arguments.length?(i="function"==typeof e?e:eg(!!e),h):i},h.container=function(e){return arguments.length?(o="function"==typeof e?e:eg(e),h):o},h.subject=function(e){return arguments.length?(a="function"==typeof e?e:eg(e),h):a},h.touchable=function(e){return arguments.length?(s="function"==typeof e?e:eg(!!e),h):s},h.on=function(){var e=u.on.apply(u,arguments);return e===u?h:e},h.clickDistance=function(e){return arguments.length?(d=(e*=1)*e,h):Math.sqrt(d)},h}function e_(e){return((e=Math.exp(e))+1/e)/2}em.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};let eC=function e(t,r,n){function i(e,i){var o,a,s=e[0],l=e[1],u=e[2],c=i[0],d=i[1],h=i[2],f=c-s,p=d-l,g=f*f+p*p;if(g<1e-12)a=Math.log(h/u)/t,o=function(e){return[s+e*f,l+e*p,u*Math.exp(t*e*a)]};else{var m=Math.sqrt(g),v=(h*h-u*u+n*g)/(2*u*r*m),b=(h*h-u*u-n*g)/(2*h*r*m),y=Math.log(Math.sqrt(v*v+1)-v);a=(Math.log(Math.sqrt(b*b+1)-b)-y)/t,o=function(e){var n,i,o=e*a,c=e_(y),d=u/(r*m)*(c*(((n=Math.exp(2*(n=t*o+y)))-1)/(n+1))-((i=Math.exp(i=y))-1/i)/2);return[s+d*f,l+d*p,u*c/e_(t*o+y)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return i.rho=function(t){var r=Math.max(.001,+t),n=r*r;return e(r,n,n*n)},i}(Math.SQRT2,2,4);var ek,eS,eE=0,eO=0,eI=0,eP=0,eT=0,eR=0,eA="object"==typeof performance&&performance.now?performance:Date,eM="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function eN(){return eT||(eM(eD),eT=eA.now()+eR)}function eD(){eT=0}function eL(){this._call=this._time=this._next=null}function eV(e,t,r){var n=new eL;return n.restart(e,t,r),n}function eF(){eT=(eP=eA.now())+eR,eE=eO=0;try{eN(),++eE;for(var e,t=ek;t;)(e=eT-t._time)>=0&&t._call.call(void 0,e),t=t._next;--eE}finally{eE=0,function(){for(var e,t,r=ek,n=1/0;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:ek=t);eS=e,ez(n)}(),eT=0}}function ej(){var e=eA.now(),t=e-eP;t>1e3&&(eR-=t,eP=e)}function ez(e){!eE&&(eO&&(eO=clearTimeout(eO)),e-eT>24?(e<1/0&&(eO=setTimeout(eF,e-eA.now()-eR)),eI&&(eI=clearInterval(eI))):(eI||(eP=eA.now(),eI=setInterval(ej,1e3)),eE=1,eM(eF)))}function eB(e,t,r){var n=new eL;return t=null==t?0:+t,n.restart(r=>{n.stop(),e(r+t)},t,r),n}eL.prototype=eV.prototype={constructor:eL,restart:function(e,t,r){if("function"!=typeof e)throw TypeError("callback is not a function");r=(null==r?eN():+r)+(null==t?0:+t),this._next||eS===this||(eS?eS._next=this:ek=this,eS=this),this._call=e,this._time=r,ez()},stop:function(){this._call&&(this._call=null,this._time=1/0,ez())}};var eH=v("start","end","cancel","interrupt"),eW=[];function eU(e,t,r,n,i,o){var a=e.__transition;if(a){if(r in a)return}else e.__transition={};!function(e,t,r){var n,i=e.__transition;function o(l){var u,c,d,h;if(1!==r.state)return s();for(u in i)if((h=i[u]).name===r.name){if(3===h.state)return eB(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[u]):+u<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[u])}if(eB(function(){3===r.state&&(r.state=4,r.timer.restart(a,r.delay,r.time),a(l))}),r.state=2,r.on.call("start",e,e.__data__,r.index,r.group),2===r.state){for(u=0,r.state=3,n=Array(d=r.tween.length),c=-1;u<d;++u)(h=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(n[++c]=h);n.length=c+1}}function a(t){for(var i=t<r.duration?r.ease.call(null,t/r.duration):(r.timer.restart(s),r.state=5,1),o=-1,a=n.length;++o<a;)n[o].call(e,i);5===r.state&&(r.on.call("end",e,e.__data__,r.index,r.group),s())}function s(){for(var n in r.state=6,r.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=r,r.timer=eV(function(e){r.state=1,r.timer.restart(o,r.delay,r.time),r.delay<=e&&o(e-r.delay)},0,r.time)}(e,r,{name:t,index:n,group:i,on:eH,tween:eW,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function e$(e,t){var r=eG(e,t);if(r.state>0)throw Error("too late; already scheduled");return r}function eq(e,t){var r=eG(e,t);if(r.state>3)throw Error("too late; already running");return r}function eG(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw Error("transition not found");return r}function eK(e,t){var r,n,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o){if((r=o[i]).name!==t){a=!1;continue}n=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(n?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete o[i]}a&&delete e.__transition}}function eY(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}var eX=180/Math.PI,eQ={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function eZ(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*eX,skewX:Math.atan(l)*eX,scaleX:a,scaleY:s}}function eJ(e,t,r,n){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s,l,u,c,d=[],h=[];return o=e(o),a=e(a),!function(e,n,i,o,a,s){if(e!==i||n!==o){var l=a.push("translate(",null,t,null,r);s.push({i:l-4,x:eY(e,i)},{i:l-2,x:eY(n,o)})}else(i||o)&&a.push("translate("+i+t+o+r)}(o.translateX,o.translateY,a.translateX,a.translateY,d,h),s=o.rotate,l=a.rotate,s!==l?(s-l>180?l+=360:l-s>180&&(s+=360),h.push({i:d.push(i(d)+"rotate(",null,n)-2,x:eY(s,l)})):l&&d.push(i(d)+"rotate("+l+n),u=o.skewX,c=a.skewX,u!==c?h.push({i:d.push(i(d)+"skewX(",null,n)-2,x:eY(u,c)}):c&&d.push(i(d)+"skewX("+c+n),!function(e,t,r,n,o,a){if(e!==r||t!==n){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:eY(e,r)},{i:s-2,x:eY(t,n)})}else(1!==r||1!==n)&&o.push(i(o)+"scale("+r+","+n+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,d,h),o=a=null,function(e){for(var t,r=-1,n=h.length;++r<n;)d[(t=h[r]).i]=t.x(e);return d.join("")}}}eJ(function(e){let t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?eQ:eZ(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)");var e0=eJ(function(e){return null==e?eQ:(l||(l=document.createElementNS("http://www.w3.org/2000/svg","g")),l.setAttribute("transform",e),e=l.transform.baseVal.consolidate())?eZ((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):eQ},", ",")",")");function e1(e,t,r){var n=e._id;return e.each(function(){var e=eq(this,n);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return eG(e,n).value[t]}}function e2(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function e5(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function e3(){}var e4="\\s*([+-]?\\d+)\\s*",e6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",e8="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",e7=/^#([0-9a-f]{3,8})$/,e9=RegExp(`^rgb\\(${e4},${e4},${e4}\\)$`),te=RegExp(`^rgb\\(${e8},${e8},${e8}\\)$`),tt=RegExp(`^rgba\\(${e4},${e4},${e4},${e6}\\)$`),tr=RegExp(`^rgba\\(${e8},${e8},${e8},${e6}\\)$`),tn=RegExp(`^hsl\\(${e6},${e8},${e8}\\)$`),ti=RegExp(`^hsla\\(${e6},${e8},${e8},${e6}\\)$`),to={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function ta(){return this.rgb().formatHex()}function ts(){return this.rgb().formatRgb()}function tl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=e7.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?tu(t):3===r?new th(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?tc(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?tc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=e9.exec(e))?new th(t[1],t[2],t[3],1):(t=te.exec(e))?new th(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=tt.exec(e))?tc(t[1],t[2],t[3],t[4]):(t=tr.exec(e))?tc(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=tn.exec(e))?tb(t[1],t[2]/100,t[3]/100,1):(t=ti.exec(e))?tb(t[1],t[2]/100,t[3]/100,t[4]):to.hasOwnProperty(e)?tu(to[e]):"transparent"===e?new th(NaN,NaN,NaN,0):null}function tu(e){return new th(e>>16&255,e>>8&255,255&e,1)}function tc(e,t,r,n){return n<=0&&(e=t=r=NaN),new th(e,t,r,n)}function td(e,t,r,n){var i;return 1==arguments.length?((i=e)instanceof e3||(i=tl(i)),i)?new th((i=i.rgb()).r,i.g,i.b,i.opacity):new th:new th(e,t,r,null==n?1:n)}function th(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function tf(){return`#${tv(this.r)}${tv(this.g)}${tv(this.b)}`}function tp(){let e=tg(this.opacity);return`${1===e?"rgb(":"rgba("}${tm(this.r)}, ${tm(this.g)}, ${tm(this.b)}${1===e?")":`, ${e})`}`}function tg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tm(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tv(e){return((e=tm(e))<16?"0":"")+e.toString(16)}function tb(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new tx(e,t,r,n)}function ty(e){if(e instanceof tx)return new tx(e.h,e.s,e.l,e.opacity);if(e instanceof e3||(e=tl(e)),!e)return new tx;if(e instanceof tx)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+(r<n)*6:r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new tx(a,s,l,e.opacity)}function tx(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function tw(e){return(e=(e||0)%360)<0?e+360:e}function t_(e){return Math.max(0,Math.min(1,e||0))}function tC(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function tk(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}e2(e3,tl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ta,formatHex:ta,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ty(this).formatHsl()},formatRgb:ts,toString:ts}),e2(th,td,e5(e3,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new th(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new th(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new th(tm(this.r),tm(this.g),tm(this.b),tg(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tf,formatHex:tf,formatHex8:function(){return`#${tv(this.r)}${tv(this.g)}${tv(this.b)}${tv((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:tp,toString:tp})),e2(tx,function(e,t,r,n){return 1==arguments.length?ty(e):new tx(e,t,r,null==n?1:n)},e5(e3,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new tx(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new tx(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new th(tC(e>=240?e-240:e+120,i,n),tC(e,i,n),tC(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new tx(tw(this.h),t_(this.s),t_(this.l),tg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=tg(this.opacity);return`${1===e?"hsl(":"hsla("}${tw(this.h)}, ${100*t_(this.s)}%, ${100*t_(this.l)}%${1===e?")":`, ${e})`}`}}));let tS=e=>()=>e;function tE(e,t){var r=t-e;return r?function(t){return e+t*r}:tS(isNaN(e)?t:e)}let tO=function e(t){var r,n=1==(r=+t)?tE:function(e,t){var n,i,o;return t-e?(n=e,i=t,n=Math.pow(n,o=r),i=Math.pow(i,o)-n,o=1/o,function(e){return Math.pow(n+e*i,o)}):tS(isNaN(e)?t:e)};function i(e,t){var r=n((e=td(e)).r,(t=td(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=tE(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function tI(e){return function(t){var r,n,i=t.length,o=Array(i),a=Array(i),s=Array(i);for(r=0;r<i;++r)n=td(t[r]),o[r]=n.r||0,a[r]=n.g||0,s[r]=n.b||0;return o=e(o),a=e(a),s=e(s),n.opacity=1,function(e){return n.r=o(e),n.g=a(e),n.b=s(e),n+""}}}tI(function(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return tk((r-n/t)*t,a,i,o,s)}}),tI(function(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return tk((r-n/t)*t,i,o,a,s)}});var tP=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tT=RegExp(tP.source,"g");function tR(e,t){var r,n,i,o,a,s=tP.lastIndex=tT.lastIndex=0,l=-1,u=[],c=[];for(e+="",t+="";(i=tP.exec(e))&&(o=tT.exec(t));)(a=o.index)>s&&(a=t.slice(s,a),u[l]?u[l]+=a:u[++l]=a),(i=i[0])===(o=o[0])?u[l]?u[l]+=o:u[++l]=o:(u[++l]=null,c.push({i:l,x:eY(i,o)})),s=tT.lastIndex;return s<t.length&&(a=t.slice(s),u[l]?u[l]+=a:u[++l]=a),u.length<2?c[0]?(r=c[0].x,function(e){return r(e)+""}):(n=t,function(){return n}):(t=c.length,function(e){for(var r,n=0;n<t;++n)u[(r=c[n]).i]=r.x(e);return u.join("")})}function tA(e,t){var r;return("number"==typeof t?eY:t instanceof tl?tO:(r=tl(t))?(t=r,tO):tR)(e,t)}var tM=ea.prototype.constructor;function tN(e){return function(){this.style.removeProperty(e)}}var tD=0;function tL(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}var tV=ea.prototype;tL.prototype=(function(e){return ea().transition(e)}).prototype={constructor:tL,select:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=w(e));for(var n=this._groups,i=n.length,o=Array(i),a=0;a<i;++a)for(var s,l,u=n[a],c=u.length,d=o[a]=Array(c),h=0;h<c;++h)(s=u[h])&&(l=e.call(s,s.__data__,h,u))&&("__data__"in s&&(l.__data__=s.__data__),d[h]=l,eU(d[h],t,r,h,d,eG(s,r)));return new tL(o,this._parents,t,r)},selectAll:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=C(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l,u=n[s],c=u.length,d=0;d<c;++d)if(l=u[d]){for(var h,f=e.call(l,l.__data__,d,u),p=eG(l,r),g=0,m=f.length;g<m;++g)(h=f[g])&&eU(h,t,r,g,f,p);o.push(f),a.push(l)}return new tL(o,a,t,r)},selectChild:tV.selectChild,selectChildren:tV.selectChildren,filter:function(e){"function"!=typeof e&&(e=k(e));for(var t=this._groups,r=t.length,n=Array(r),i=0;i<r;++i)for(var o,a=t[i],s=a.length,l=n[i]=[],u=0;u<s;++u)(o=a[u])&&e.call(o,o.__data__,u,a)&&l.push(o);return new tL(n,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw Error();for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=Array(n),s=0;s<o;++s)for(var l,u=t[s],c=r[s],d=u.length,h=a[s]=Array(d),f=0;f<d;++f)(l=u[f]||c[f])&&(h[f]=l);for(;s<n;++s)a[s]=t[s];return new tL(a,this._parents,this._name,this._id)},selection:function(){return new tM(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,r=++tD,n=this._groups,i=n.length,o=0;o<i;++o)for(var a,s=n[o],l=s.length,u=0;u<l;++u)if(a=s[u]){var c=eG(a,t);eU(a,e,r,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new tL(n,this._parents,e,r)},call:tV.call,nodes:tV.nodes,node:tV.node,size:tV.size,empty:tV.empty,each:tV.each,on:function(e,t){var r,n,i,o,a,s,l=this._id;return arguments.length<2?eG(this.node(),l).on.on(e):this.each((r=l,n=e,i=t,s=(n+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})?e$:eq,function(){var e=s(this,r),t=e.on;t!==o&&(a=(o=t).copy()).on(n,i),e.on=a}))},attr:function(e,t){var r=F(e),n="transform"===r?e0:tA;return this.attrTween(e,"function"==typeof t?(r.local?function(e,t,r){var n,i,o;return function(){var a,s,l=r(this);return null==l?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===n&&s===i?o:(i=s,o=t(n=a,l))}}:function(e,t,r){var n,i,o;return function(){var a,s,l=r(this);return null==l?void this.removeAttribute(e):(a=this.getAttribute(e))===(s=l+"")?null:a===n&&s===i?o:(i=s,o=t(n=a,l))}})(r,n,e1(this,"attr."+e,t)):null==t?(r.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}})(r):(r.local?function(e,t,r){var n,i,o=r+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===n?i:i=t(n=a,r)}}:function(e,t,r){var n,i,o=r+"";return function(){var a=this.getAttribute(e);return a===o?null:a===n?i:i=t(n=a,r)}})(r,n,t))},attrTween:function(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw Error();var n=F(e);return this.tween(r,(n.local?function(e,t){var r,n;function i(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&function(t){this.setAttributeNS(e.space,e.local,i.call(this,t))}),r}return i._value=t,i}:function(e,t){var r,n;function i(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&function(t){this.setAttribute(e,i.call(this,t))}),r}return i._value=t,i})(n,t))},style:function(e,t,r){var n,i,o,a,s,l,u,c,d,h,f,p,g,m,v,b,y;return null==t?this.styleTween(e,function(){var t=z(this,e),r=(this.style.removeProperty(e),z(this,e));return t===r?null:t===n&&r===i?o:o=tA(n=t,i=r)}).on("end.style."+e,tN(e)):"function"==typeof t?this.styleTween(e,(a=e1(this,"style."+e,t),function(){var t=z(this,e),r=a(this),n=r+"";return null==r&&(this.style.removeProperty(e),n=r=z(this,e)),t===n?null:t===s&&n===l?u:(l=n,u=tA(s=t,r))})).each((c=this._id,m="end."+(g="style."+e),function(){var t=eq(this,c),r=t.on,n=null==t.value[g]?p||(p=tN(e)):void 0;(r!==d||f!==n)&&(h=(d=r).copy()).on(m,f=n),t.on=h})):this.styleTween(e,(y=t+"",function(){var r=z(this,e);return r===y?null:r===v?b:b=tA(v=r,t)}),r).on("end.style."+e,null)},styleTween:function(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw Error();return this.tween(n,function(e,t,r){var n,i;function o(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&function(t){this.style.setProperty(e,o.call(this,t),r)}),n}return o._value=t,o}(e,t,null==r?"":r))},text:function(e){var t,r;return this.tween("text","function"==typeof e?(t=e1(this,"text",e),function(){var e=t(this);this.textContent=null==e?"":e}):(r=null==e?"":e+"",function(){this.textContent=r}))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw Error();return this.tween(t,function(e){var t,r;function n(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&function(e){this.textContent=n.call(this,e)}),t}return n._value=e,n}(e))},remove:function(){var e;return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}))},tween:function(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n,i=eG(this.node(),r).tween,o=0,a=i.length;o<a;++o)if((n=i[o]).name===e)return n.value;return null}return this.each((null==t?function(e,t){var r,n;return function(){var i=eq(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){(n=n.slice()).splice(a,1);break}}i.tween=n}}:function(e,t,r){var n,i;if("function"!=typeof r)throw Error();return function(){var o=eq(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}})(r,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){e$(this,e).delay=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){e$(this,e).delay=t}})(t,e)):eG(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){eq(this,e).duration=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){eq(this,e).duration=t}})(t,e)):eG(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw Error();return function(){eq(this,e).ease=t}}(t,e)):eG(this.node(),t).ease},easeVarying:function(e){var t;if("function"!=typeof e)throw Error();return this.each((t=this._id,function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw Error();eq(this,t).ease=r}))},end:function(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};r.each(function(){var r=eq(this,n),i=r.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),r.on=t}),0===i&&o()})},[Symbol.iterator]:tV[Symbol.iterator]};var tF={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};ea.prototype.interrupt=function(e){return this.each(function(){eK(this,e)})},ea.prototype.transition=function(e){var t,r;e instanceof tL?(t=e._id,e=e._name):(t=++tD,(r=tF).time=eN(),e=null==e?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a,s=n[o],l=s.length,u=0;u<l;++u)(a=s[u])&&eU(a,e,t,u,s,r||function(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return r}(a,t));return new tL(n,this._parents,e,t)};let tj=e=>()=>e;function tz(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function tB(e,t,r){this.k=e,this.x=t,this.y=r}tB.prototype={constructor:tB,scale:function(e){return 1===e?this:new tB(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new tB(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var tH=new tB(1,0,0);function tW(e){for(;!e.__zoom;)if(!(e=e.parentNode))return tH;return e.__zoom}function tU(e){e.stopImmediatePropagation()}function t$(e){e.preventDefault(),e.stopImmediatePropagation()}function tq(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function tG(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function tK(){return this.__zoom||tH}function tY(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function tX(){return navigator.maxTouchPoints||"ontouchstart"in this}function tQ(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function tZ(){var e,t,r,n=tq,i=tG,o=tQ,a=tY,s=tX,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,d=eC,h=v("start","zoom","end"),f=0,p=10;function g(e){e.property("__zoom",tK).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",S).filter(s).on("touchstart.zoom",E).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new tB(t,e.x,e.y)}function b(e,t,r){var n=t[0]-r[0]*e.k,i=t[1]-r[1]*e.k;return n===e.x&&i===e.y?e:new tB(e.k,n,i)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,r,n){e.on("start.zoom",function(){w(this,arguments).event(n).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(n).end()}).tween("zoom",function(){var e=arguments,o=w(this,e).event(n),a=i.apply(this,e),s=null==r?y(a):"function"==typeof r?r.apply(this,e):r,l=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),u=this.__zoom,c="function"==typeof t?t.apply(this,e):t,h=d(u.invert(s).concat(l/u.k),c.invert(s).concat(l/c.k));return function(e){if(1===e)e=c;else{var t=h(e),r=l/t[2];e=new tB(r,s[0]-t[0]*r,s[1]-t[1]*r)}o.zoom(null,e)}})}function w(e,t,r){return!r&&e.__zooming||new _(e,t)}function _(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function C(e,...t){if(n.apply(this,arguments)){var r=w(this,t).event(e),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,a.apply(this,arguments)))),c=el(e);if(r.wheel)(r.mouse[0][0]!==c[0]||r.mouse[0][1]!==c[1])&&(r.mouse[1]=i.invert(r.mouse[0]=c)),clearTimeout(r.wheel);else{if(i.k===s)return;r.mouse=[c,i.invert(c)],eK(this),r.start()}t$(e),r.wheel=setTimeout(function(){r.wheel=null,r.end()},150),r.zoom("mouse",o(b(m(i,s),r.mouse[0],r.mouse[1]),r.extent,u))}}function k(e,...t){if(!r&&n.apply(this,arguments)){var i=e.currentTarget,a=w(this,t,!0).event(e),s=es(e.view).on("mousemove.zoom",function(e){if(t$(e),!a.moved){var t=e.clientX-c,r=e.clientY-d;a.moved=t*t+r*r>f}a.event(e).zoom("mouse",o(b(a.that.__zoom,a.mouse[0]=el(e,i),a.mouse[1]),a.extent,u))},!0).on("mouseup.zoom",function(e){s.on("mousemove.zoom mouseup.zoom",null),ep(e.view,a.moved),t$(e),a.event(e).end()},!0),l=el(e,i),c=e.clientX,d=e.clientY;ef(e.view),tU(e),a.mouse=[l,this.__zoom.invert(l)],eK(this),a.start()}}function S(e,...t){if(n.apply(this,arguments)){var r=this.__zoom,a=el(e.changedTouches?e.changedTouches[0]:e,this),s=r.invert(a),l=r.k*(e.shiftKey?.5:2),d=o(b(m(r,l),a,s),i.apply(this,t),u);t$(e),c>0?es(this).transition().duration(c).call(x,d,a,e):es(this).call(g.transform,d,a,e)}}function E(r,...i){if(n.apply(this,arguments)){var o,a,s,l,u=r.touches,c=u.length,d=w(this,i,r.changedTouches.length===c).event(r);for(tU(r),a=0;a<c;++a)l=[l=el(s=u[a],this),this.__zoom.invert(l),s.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,o=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),o&&(d.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),eK(this),d.start())}}function O(e,...t){if(this.__zooming){var r,n,i,a,s=w(this,t).event(e),l=e.changedTouches,c=l.length;for(t$(e),r=0;r<c;++r)i=el(n=l[r],this),s.touch0&&s.touch0[2]===n.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===n.identifier&&(s.touch1[0]=i);if(n=s.that.__zoom,s.touch1){var d=s.touch0[0],h=s.touch0[1],f=s.touch1[0],p=s.touch1[1],g=(g=f[0]-d[0])*g+(g=f[1]-d[1])*g,v=(v=p[0]-h[0])*v+(v=p[1]-h[1])*v;n=m(n,Math.sqrt(g/v)),i=[(d[0]+f[0])/2,(d[1]+f[1])/2],a=[(h[0]+p[0])/2,(h[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],a=s.touch0[1]}s.zoom("touch",o(b(n,i,a),s.extent,u))}}function I(e,...n){if(this.__zooming){var i,o,a=w(this,n).event(e),s=e.changedTouches,l=s.length;for(tU(e),r&&clearTimeout(r),r=setTimeout(function(){r=null},500),i=0;i<l;++i)o=s[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=el(o,this),Math.hypot(t[0]-o[0],t[1]-o[1])<p)){var u=es(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return g.transform=function(e,t,r,n){var i=e.selection?e.selection():e;i.property("__zoom",tK),e!==i?x(e,t,r,n):i.interrupt().each(function(){w(this,arguments).event(n).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},g.scaleBy=function(e,t,r,n){g.scaleTo(e,function(){var e=this.__zoom.k,r="function"==typeof t?t.apply(this,arguments):t;return e*r},r,n)},g.scaleTo=function(e,t,r,n){g.transform(e,function(){var e=i.apply(this,arguments),n=this.__zoom,a=null==r?y(e):"function"==typeof r?r.apply(this,arguments):r,s=n.invert(a),l="function"==typeof t?t.apply(this,arguments):t;return o(b(m(n,l),a,s),e,u)},r,n)},g.translateBy=function(e,t,r,n){g.transform(e,function(){return o(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof r?r.apply(this,arguments):r),i.apply(this,arguments),u)},null,n)},g.translateTo=function(e,t,r,n,a){g.transform(e,function(){var e=i.apply(this,arguments),a=this.__zoom,s=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n;return o(tH.translate(s[0],s[1]).scale(a.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof r?-r.apply(this,arguments):-r),e,u)},n,a)},_.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=es(this.that).datum();h.call(e,this.that,new tz(e,{sourceEvent:this.sourceEvent,target:g,type:e,transform:this.that.__zoom,dispatch:h}),t)}},g.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:tj(+e),g):a},g.filter=function(e){return arguments.length?(n="function"==typeof e?e:tj(!!e),g):n},g.touchable=function(e){return arguments.length?(s="function"==typeof e?e:tj(!!e),g):s},g.extent=function(e){return arguments.length?(i="function"==typeof e?e:tj([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),g):i},g.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],g):[l[0],l[1]]},g.translateExtent=function(e){return arguments.length?(u[0][0]=+e[0][0],u[1][0]=+e[1][0],u[0][1]=+e[0][1],u[1][1]=+e[1][1],g):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},g.constrain=function(e){return arguments.length?(o=e,g):o},g.duration=function(e){return arguments.length?(c=+e,g):c},g.interpolate=function(e){return arguments.length?(d=e,g):d},g.on=function(){var e=h.on.apply(h,arguments);return e===h?g:e},g.clickDistance=function(e){return arguments.length?(f=(e*=1)*e,g):Math.sqrt(f)},g.tapDistance=function(e){return arguments.length?(p=+e,g):p},g}function tJ(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?tS(t):("number"===i?eY:"string"===i?(n=tl(t))?(t=n,tO):tR:t instanceof tl?tO:t instanceof Date?function(e,t){var r=new Date;return e*=1,t*=1,function(n){return r.setTime(e*(1-n)+t*n),r}}:!ArrayBuffer.isView(r=t)||r instanceof DataView?Array.isArray(t)?function(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=Array(i),a=Array(n);for(r=0;r<i;++r)o[r]=tJ(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var r,n={},i={};for(r in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)r in e?n[r]=tJ(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}:eY:function(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}})(e,t)}tW.prototype=tB.prototype;let t0={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:r,targetHandle:n})=>`Couldn't create edge for ${e} handle id: "${"source"===e?r:n}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},t1=[[-1/0,-1/0],[1/0,1/0]],t2=["Enter"," ","Escape"],t5={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};(t=u||(u={})).Strict="strict",t.Loose="loose",(r=c||(c={})).Free="free",r.Vertical="vertical",r.Horizontal="horizontal",(n=d||(d={})).Partial="partial",n.Full="full";let t3={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};(i=h||(h={})).Bezier="default",i.Straight="straight",i.Step="step",i.SmoothStep="smoothstep",i.SimpleBezier="simplebezier",(o=f||(f={})).Arrow="arrow",o.ArrowClosed="arrowclosed",(a=p||(p={})).Left="left",a.Top="top",a.Right="right",a.Bottom="bottom";let t4={[p.Left]:p.Right,[p.Right]:p.Left,[p.Top]:p.Bottom,[p.Bottom]:p.Top};function t6(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(let r of e.keys())if(!t.has(r))return!1;return!0}function t8(e,t,r){if(!r)return;let n=[];e.forEach((e,r)=>{t?.has(r)||n.push(e)}),n.length&&r(n)}function t7(e){return null===e?null:e?"valid":"invalid"}let t9=e=>"id"in e&&"source"in e&&"target"in e,re=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),rt=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),rr=(e,t=[0,0])=>{let{width:r,height:n}=rR(e),i=e.origin??t,o=r*i[0],a=n*i[1];return{x:e.position.x-o,y:e.position.y-a}},rn=(e,t={nodeOrigin:[0,0]})=>0===e.length?{x:0,y:0,width:0,height:0}:rm(e.reduce((e,r)=>{let n="string"==typeof r,i=t.nodeLookup||n?void 0:r;return t.nodeLookup&&(i=n?t.nodeLookup.get(r):rt(r)?r:t.nodeLookup.get(r.id)),rp(e,i?rb(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})),ri=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},n=!1;return e.forEach(e=>{(void 0===t.filter||t.filter(e))&&(r=rp(r,rb(e)),n=!0)}),n?rm(r):{x:0,y:0,width:0,height:0}},ro=(e,t,[r,n,i]=[0,0,1],o=!1,a=!1)=>{let s={...rS(t,[r,n,i]),width:t.width/i,height:t.height/i},l=[];for(let t of e.values()){let{measured:e,selectable:r=!0,hidden:n=!1}=t;if(a&&!r||n)continue;let i=e.width??t.width??t.initialWidth??null,u=e.height??t.height??t.initialHeight??null,c=rx(s,rv(t)),d=(i??0)*(u??0),h=o&&c>0;(!t.internals.handleBounds||h||c>=d||t.dragging)&&l.push(t)}return l};async function ra({nodes:e,width:t,height:r,panZoom:n,minZoom:i,maxZoom:o},a){let s,l;if(0===e.size)return Promise.resolve(!0);let u=rI(ri((s=new Map,l=a?.nodes?new Set(a.nodes.map(e=>e.id)):null,e.forEach(e=>{e.measured.width&&e.measured.height&&(a?.includeHiddenNodes||!e.hidden)&&(!l||l.has(e.id))&&s.set(e.id,e)}),s)),t,r,a?.minZoom??i,a?.maxZoom??o,a?.padding??.1);return await n.setViewport(u,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),Promise.resolve(!0)}function rs({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:n=[0,0],nodeExtent:i,onError:o}){let a=r.get(e),s=a.parentId?r.get(a.parentId):void 0,{x:l,y:u}=s?s.internals.positionAbsolute:{x:0,y:0},c=a.origin??n,d=a.extent||i;if("parent"!==a.extent||a.expandParent)s&&rT(a.extent)&&(d=[[a.extent[0][0]+l,a.extent[0][1]+u],[a.extent[1][0]+l,a.extent[1][1]+u]]);else if(s){let e=s.measured.width,t=s.measured.height;e&&t&&(d=[[l,u],[l+e,u+t]])}else o?.("005",t0.error005());let h=rT(d)?rc(t,d,a.measured):t;return(void 0===a.measured.width||void 0===a.measured.height)&&o?.("015",t0.error015()),{position:{x:h.x-l+(a.measured.width??0)*c[0],y:h.y-u+(a.measured.height??0)*c[1]},positionAbsolute:h}}async function rl({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:n,onBeforeDelete:i}){let o,a=new Set(e.map(e=>e.id)),s=[];for(let e of r){if(!1===e.deletable)continue;let t=a.has(e.id),r=!t&&e.parentId&&s.find(t=>t.id===e.parentId);(t||r)&&s.push(e)}let l=new Set(t.map(e=>e.id)),u=n.filter(e=>!1!==e.deletable),c=(o=new Set,s.forEach(e=>{o.add(e.id)}),u.filter(e=>o.has(e.source)||o.has(e.target)));for(let e of u)l.has(e.id)&&!c.find(t=>t.id===e.id)&&c.push(e);if(!i)return{edges:c,nodes:s};let d=await i({nodes:s,edges:c});return"boolean"==typeof d?d?{edges:c,nodes:s}:{edges:[],nodes:[]}:d}let ru=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),rc=(e={x:0,y:0},t,r)=>({x:ru(e.x,t[0][0],t[1][0]-(r?.width??0)),y:ru(e.y,t[0][1],t[1][1]-(r?.height??0))});function rd(e,t,r){let{width:n,height:i}=rR(r),{x:o,y:a}=r.internals.positionAbsolute;return rc(e,[[o,a],[o+n,a+i]],t)}let rh=(e,t,r)=>e<t?ru(Math.abs(e-t),1,t)/t:e>r?-ru(Math.abs(e-r),1,t)/t:0,rf=(e,t,r=15,n=40)=>[rh(e.x,n,t.width-n)*r,rh(e.y,n,t.height-n)*r],rp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),rg=({x:e,y:t,width:r,height:n})=>({x:e,y:t,x2:e+r,y2:t+n}),rm=({x:e,y:t,x2:r,y2:n})=>({x:e,y:t,width:r-e,height:n-t}),rv=(e,t=[0,0])=>{let{x:r,y:n}=rt(e)?e.internals.positionAbsolute:rr(e,t);return{x:r,y:n,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},rb=(e,t=[0,0])=>{let{x:r,y:n}=rt(e)?e.internals.positionAbsolute:rr(e,t);return{x:r,y:n,x2:r+(e.measured?.width??e.width??e.initialWidth??0),y2:n+(e.measured?.height??e.height??e.initialHeight??0)}},ry=(e,t)=>rm(rp(rg(e),rg(t))),rx=(e,t)=>Math.ceil(Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y))),rw=e=>r_(e.width)&&r_(e.height)&&r_(e.x)&&r_(e.y),r_=e=>!isNaN(e)&&isFinite(e),rC=(e,t)=>{},rk=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),rS=({x:e,y:t},[r,n,i],o=!1,a=[1,1])=>{let s={x:(e-r)/i,y:(t-n)/i};return o?rk(s,a):s},rE=({x:e,y:t},[r,n,i])=>({x:e*i+r,y:t*i+n});function rO(e,t){if("number"==typeof e)return Math.floor((t-t/(1+e))*.5);if("string"==typeof e&&e.endsWith("px")){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if("string"==typeof e&&e.endsWith("%")){let r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}let rI=(e,t,r,n,i,o)=>{let a=function(e,t,r){if("string"==typeof e||"number"==typeof e){let n=rO(e,r),i=rO(e,t);return{top:n,right:i,bottom:n,left:i,x:2*i,y:2*n}}if("object"==typeof e){let n=rO(e.top??e.y??0,r),i=rO(e.bottom??e.y??0,r),o=rO(e.left??e.x??0,t),a=rO(e.right??e.x??0,t);return{top:n,right:a,bottom:i,left:o,x:o+a,y:n+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(o,t,r),s=ru(Math.min((t-a.x)/e.width,(r-a.y)/e.height),n,i),l=e.x+e.width/2,u=e.y+e.height/2,c=t/2-l*s,d=r/2-u*s,h=function(e,t,r,n,i,o){let{x:a,y:s}=rE(e,[t,r,n]),{x:l,y:u}=rE({x:e.x+e.width,y:e.y+e.height},[t,r,n]);return{left:Math.floor(a),top:Math.floor(s),right:Math.floor(i-l),bottom:Math.floor(o-u)}}(e,c,d,s,t,r),f={left:Math.min(h.left-a.left,0),top:Math.min(h.top-a.top,0),right:Math.min(h.right-a.right,0),bottom:Math.min(h.bottom-a.bottom,0)};return{x:c-f.left+f.right,y:d-f.top+f.bottom,zoom:s}},rP=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function rT(e){return null!=e&&"parent"!==e}function rR(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function rA(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function rM(e,t={width:0,height:0},r,n,i){let o={...e},a=n.get(r);if(a){let e=a.origin||i;o.x+=a.internals.positionAbsolute.x-(t.width??0)*e[0],o.y+=a.internals.positionAbsolute.y-(t.height??0)*e[1]}return o}function rN(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function rD(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function rL(e){return{...t5,...e||{}}}function rV(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:n,containerBounds:i}){let{x:o,y:a}=rW(e),s=rS({x:o-(i?.left??0),y:a-(i?.top??0)},n),{x:l,y:u}=r?rk(s,t):s;return{xSnapped:l,ySnapped:u,...s}}let rF=e=>({width:e.offsetWidth,height:e.offsetHeight}),rj=e=>e?.getRootNode?.()||window?.document,rz=["INPUT","SELECT","TEXTAREA"];function rB(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1&&(rz.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey"))}let rH=e=>"clientX"in e,rW=(e,t)=>{let r=rH(e),n=r?e.clientX:e.touches?.[0].clientX,i=r?e.clientY:e.touches?.[0].clientY;return{x:n-(t?.left??0),y:i-(t?.top??0)}},rU=(e,t,r,n,i)=>{let o=t.querySelectorAll(`.${e}`);return o&&o.length?Array.from(o).map(t=>{let o=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:i,position:t.getAttribute("data-handlepos"),x:(o.left-r.left)/n,y:(o.top-r.top)/n,...rF(t)}}):null};function r$({sourceX:e,sourceY:t,targetX:r,targetY:n,sourceControlX:i,sourceControlY:o,targetControlX:a,targetControlY:s}){let l=.125*e+.375*i+.375*a+.125*r,u=.125*t+.375*o+.375*s+.125*n,c=Math.abs(l-e),d=Math.abs(u-t);return[l,u,c,d]}function rq(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function rG({pos:e,x1:t,y1:r,x2:n,y2:i,c:o}){switch(e){case p.Left:return[t-rq(t-n,o),r];case p.Right:return[t+rq(n-t,o),r];case p.Top:return[t,r-rq(r-i,o)];case p.Bottom:return[t,r+rq(i-r,o)]}}function rK({sourceX:e,sourceY:t,sourcePosition:r=p.Bottom,targetX:n,targetY:i,targetPosition:o=p.Top,curvature:a=.25}){let[s,l]=rG({pos:r,x1:e,y1:t,x2:n,y2:i,c:a}),[u,c]=rG({pos:o,x1:n,y1:i,x2:e,y2:t,c:a}),[d,h,f,g]=r$({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${n},${i}`,d,h,f,g]}function rY({sourceX:e,sourceY:t,targetX:r,targetY:n}){let i=Math.abs(r-e)/2,o=Math.abs(n-t)/2;return[r<e?r+i:r-i,n<t?n+o:n-o,i,o]}function rX({sourceNode:e,targetNode:t,selected:r=!1,zIndex:n,elevateOnSelect:i=!1}){if(void 0!==n)return n;let o=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return(i&&r?1e3:0)+o}function rQ({sourceNode:e,targetNode:t,width:r,height:n,transform:i}){let o=rp(rb(e),rb(t));return o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1),rx({x:-i[0]/i[2],y:-i[1]/i[2],width:r/i[2],height:n/i[2]},rm(o))>0}let rZ=(e,t)=>{let r,n;return e.source&&e.target?(n=r=t9(e)?{...e}:{...e,id:(({source:e,sourceHandle:t,target:r,targetHandle:n})=>`xy-edge__${e}${t||""}-${r}${n||""}`)(e)},t.some(e=>e.source===n.source&&e.target===n.target&&(e.sourceHandle===n.sourceHandle||!e.sourceHandle&&!n.sourceHandle)&&(e.targetHandle===n.targetHandle||!e.targetHandle&&!n.targetHandle)))?t:(null===r.sourceHandle&&delete r.sourceHandle,null===r.targetHandle&&delete r.targetHandle,t.concat(r)):(rC("006",t0.error006()),t)};function rJ({sourceX:e,sourceY:t,targetX:r,targetY:n}){let[i,o,a,s]=rY({sourceX:e,sourceY:t,targetX:r,targetY:n});return[`M ${e},${t}L ${r},${n}`,i,o,a,s]}let r0={[p.Left]:{x:-1,y:0},[p.Right]:{x:1,y:0},[p.Top]:{x:0,y:-1},[p.Bottom]:{x:0,y:1}},r1=({source:e,sourcePosition:t=p.Bottom,target:r})=>t===p.Left||t===p.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},r2=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function r5({sourceX:e,sourceY:t,sourcePosition:r=p.Bottom,targetX:n,targetY:i,targetPosition:o=p.Top,borderRadius:a=5,centerX:s,centerY:l,offset:u=20,stepPosition:c=.5}){let[d,h,f,g,m]=function({source:e,sourcePosition:t=p.Bottom,target:r,targetPosition:n=p.Top,center:i,offset:o,stepPosition:a}){let s,l,u=r0[t],c=r0[n],d={x:e.x+u.x*o,y:e.y+u.y*o},h={x:r.x+c.x*o,y:r.y+c.y*o},f=r1({source:d,sourcePosition:t,target:h}),g=0!==f.x?"x":"y",m=f[g],v=[],b={x:0,y:0},y={x:0,y:0},[,,x,w]=rY({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(u[g]*c[g]==-1){"x"===g?(s=i.x??d.x+(h.x-d.x)*a,l=i.y??(d.y+h.y)/2):(s=i.x??(d.x+h.x)/2,l=i.y??d.y+(h.y-d.y)*a);let e=[{x:s,y:d.y},{x:s,y:h.y}],t=[{x:d.x,y:l},{x:h.x,y:l}];v=u[g]===m?"x"===g?e:t:"x"===g?t:e}else{let i=[{x:d.x,y:h.y}],a=[{x:h.x,y:d.y}];if(v="x"===g?u.x===m?a:i:u.y===m?i:a,t===n){let t=Math.abs(e[g]-r[g]);if(t<=o){let n=Math.min(o-1,o-t);u[g]===m?b[g]=(d[g]>e[g]?-1:1)*n:y[g]=(h[g]>r[g]?-1:1)*n}}if(t!==n){let e="x"===g?"y":"x",t=u[g]===c[e],r=d[e]>h[e],n=d[e]<h[e];(1===u[g]&&(!t&&r||t&&n)||1!==u[g]&&(!t&&n||t&&r))&&(v="x"===g?i:a)}let f={x:d.x+b.x,y:d.y+b.y},p={x:h.x+y.x,y:h.y+y.y};Math.max(Math.abs(f.x-v[0].x),Math.abs(p.x-v[0].x))>=Math.max(Math.abs(f.y-v[0].y),Math.abs(p.y-v[0].y))?(s=(f.x+p.x)/2,l=v[0].y):(s=v[0].x,l=(f.y+p.y)/2)}return[[e,{x:d.x+b.x,y:d.y+b.y},...v,{x:h.x+y.x,y:h.y+y.y},r],s,l,x,w]}({source:{x:e,y:t},sourcePosition:r,target:{x:n,y:i},targetPosition:o,center:{x:s,y:l},offset:u,stepPosition:c});return[d.reduce((e,t,r)=>e+(r>0&&r<d.length-1?function(e,t,r,n){let i=Math.min(r2(e,t)/2,r2(t,r)/2,n),{x:o,y:a}=t;if(e.x===o&&o===r.x||e.y===a&&a===r.y)return`L${o} ${a}`;if(e.y===a){let t=e.x<r.x?-1:1,n=e.y<r.y?1:-1;return`L ${o+i*t},${a}Q ${o},${a} ${o},${a+i*n}`}let s=e.x<r.x?1:-1,l=e.y<r.y?-1:1;return`L ${o},${a+i*l}Q ${o},${a} ${o+i*s},${a}`}(d[r-1],t,d[r+1],a):`${0===r?"M":"L"}${t.x} ${t.y}`),""),h,f,g,m]}function r3(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function r4(e){let{sourceNode:t,targetNode:r}=e;if(!r3(t)||!r3(r))return null;let n=t.internals.handleBounds||r6(t.handles),i=r.internals.handleBounds||r6(r.handles),o=r7(n?.source??[],e.sourceHandle),a=r7(e.connectionMode===u.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!o||!a)return e.onError?.("008",t0.error008(!o?"source":"target",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=o?.position||p.Bottom,l=a?.position||p.Top,c=r8(t,o,s),d=r8(r,a,l);return{sourceX:c.x,sourceY:c.y,targetX:d.x,targetY:d.y,sourcePosition:s,targetPosition:l}}function r6(e){if(!e)return null;let t=[],r=[];for(let n of e)n.width=n.width??1,n.height=n.height??1,"source"===n.type?t.push(n):"target"===n.type&&r.push(n);return{source:t,target:r}}function r8(e,t,r=p.Left,n=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,o=(t?.y??0)+e.internals.positionAbsolute.y,{width:a,height:s}=t??rR(e);if(n)return{x:i+a/2,y:o+s/2};switch(t?.position??r){case p.Top:return{x:i+a/2,y:o};case p.Right:return{x:i+a,y:o+s/2};case p.Bottom:return{x:i+a/2,y:o+s};case p.Left:return{x:i,y:o+s/2}}}function r7(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function r9(e,t){if(!e)return"";if("string"==typeof e)return e;let r=t?`${t}__`:"";return`${r}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`}function ne(e,{id:t,defaultColor:r,defaultMarkerStart:n,defaultMarkerEnd:i}){let o=new Set;return e.reduce((e,a)=>([a.markerStart||n,a.markerEnd||i].forEach(n=>{if(n&&"object"==typeof n){let i=r9(n,t);o.has(i)||(e.push({id:i,color:n.color||r,...n}),o.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}function nt(e,t,r,n,i){let o=.5;"start"===i?o=0:"end"===i&&(o=1);let a=[(e.x+e.width*o)*t.zoom+t.x,e.y*t.zoom+t.y-n],s=[-100*o,-100];switch(r){case p.Right:a=[(e.x+e.width)*t.zoom+t.x+n,(e.y+e.height*o)*t.zoom+t.y],s=[0,-100*o];break;case p.Bottom:a[1]=(e.y+e.height)*t.zoom+t.y+n,s[1]=0;break;case p.Left:a=[e.x*t.zoom+t.x-n,(e.y+e.height*o)*t.zoom+t.y],s=[-100,-100*o]}return`translate(${a[0]}px, ${a[1]}px) translate(${s[0]}%, ${s[1]}%)`}let nr={left:0,center:50,right:100},nn={top:0,center:50,bottom:100};function ni(e,t,r,n="center",i="center"){return`translate(${e}px, ${t}px) scale(${1/r}) translate(${-(nr[n]??50)}%, ${-(nn[i]??50)}%)`}let no={nodeOrigin:[0,0],nodeExtent:t1,elevateNodesOnSelect:!0,defaults:{}},na={...no,checkEquality:!0};function ns(e,t){let r={...e};for(let e in t)void 0!==t[e]&&(r[e]=t[e]);return r}function nl(e,t,r){let n=ns(no,r);for(let r of e.values())if(r.parentId)nc(r,e,t,n);else{let e=rc(rr(r,n.nodeOrigin),rT(r.extent)?r.extent:n.nodeExtent,rR(r));r.internals.positionAbsolute=e}}function nu(e,t,r,n){let i=ns(na,n),o={i:-1},a=e.length>0,s=new Map(t),l=1e3*!!i?.elevateNodesOnSelect;for(let u of(t.clear(),r.clear(),e)){let e=s.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let r=rc(rr(u,i.nodeOrigin),rT(u.extent)?u.extent:i.nodeExtent,rR(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:r,handleBounds:function(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let r=[],n=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};"source"===t.type?r.push(i):"target"===t.type&&n.push(i)}return{source:r,target:n}}(u,e),z:nd(u,l),userNode:u}},t.set(u.id,e)}void 0!==e.measured&&void 0!==e.measured.width&&void 0!==e.measured.height||e.hidden||(a=!1),u.parentId&&nc(e,t,r,n,o)}return a}function nc(e,t,r,n,i){let{elevateNodesOnSelect:o,nodeOrigin:a,nodeExtent:s}=ns(no,n),l=e.parentId,u=t.get(l);if(!u)return void console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);!function(e,t){if(!e.parentId)return;let r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}(e,r),i&&!u.parentId&&void 0===u.internals.rootParentIndex&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+10*i.i),i&&void 0!==u.internals.rootParentIndex&&(i.i=u.internals.rootParentIndex);let{x:c,y:d,z:h}=function(e,t,r,n,i){let{x:o,y:a}=t.internals.positionAbsolute,s=rR(e),l=rr(e,r),u=rT(e.extent)?rc(l,e.extent,s):l,c=rc({x:o+u.x,y:a+u.y},n,s);"parent"===e.extent&&(c=rd(c,s,t));let d=nd(e,i),h=t.internals.z??0;return{x:c.x,y:c.y,z:h>=d?h+1:d}}(e,u,a,s,1e3*!!o),{positionAbsolute:f}=e.internals,p=c!==f.x||d!==f.y;(p||h!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:p?{x:c,y:d}:f,z:h}})}function nd(e,t){return(r_(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function nh(e,t,r,n=[0,0]){let i=[],o=new Map;for(let r of e){let e=t.get(r.parentId);if(!e)continue;let n=ry(o.get(r.parentId)?.expandedRect??rv(e),r.rect);o.set(r.parentId,{expandedRect:n,parent:e})}return o.size>0&&o.forEach(({expandedRect:t,parent:o},a)=>{let s=o.internals.positionAbsolute,l=rR(o),u=o.origin??n,c=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,h=Math.max(l.width,Math.round(t.width)),f=Math.max(l.height,Math.round(t.height)),p=(h-l.width)*u[0],g=(f-l.height)*u[1];(c>0||d>0||p||g)&&(i.push({id:a,type:"position",position:{x:o.position.x-c+p,y:o.position.y-d+g}}),r.get(a)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:"position",position:{x:t.position.x+c,y:t.position.y+d}})})),(l.width<t.width||l.height<t.height||c||d)&&i.push({id:a,type:"dimensions",setAttributes:!0,dimensions:{width:h+(c?u[0]*c-p:0),height:f+(d?u[1]*d-g:0)}})}),i}function nf(e,t,r,n,i,o){let a=n?.querySelector(".xyflow__viewport"),s=!1;if(!a)return{changes:[],updatedInternals:s};let l=[],u=window.getComputedStyle(a),{m22:c}=new window.DOMMatrixReadOnly(u.transform),d=[];for(let n of e.values()){let e=t.get(n.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),s=!0;continue}let a=rF(n.nodeElement),u=e.measured.width!==a.width||e.measured.height!==a.height;if(a.width&&a.height&&(u||!e.internals.handleBounds||n.force)){let h=n.nodeElement.getBoundingClientRect(),f=rT(e.extent)?e.extent:o,{positionAbsolute:p}=e.internals;e.parentId&&"parent"===e.extent?p=rd(p,a,t.get(e.parentId)):f&&(p=rc(p,f,a));let g={...e,measured:a,internals:{...e.internals,positionAbsolute:p,handleBounds:{source:rU("source",n.nodeElement,h,c,e.id),target:rU("target",n.nodeElement,h,c,e.id)}}};t.set(e.id,g),e.parentId&&nc(g,t,r,{nodeOrigin:i}),s=!0,u&&(l.push({id:e.id,type:"dimensions",dimensions:a}),e.expandParent&&e.parentId&&d.push({id:e.id,parentId:e.parentId,rect:rv(g,i)}))}}if(d.length>0){let e=nh(d,t,r,i);l.push(...e)}return{changes:l,updatedInternals:s}}async function np({delta:e,panZoom:t,transform:r,translateExtent:n,width:i,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let a=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[i,o]],n);return Promise.resolve(!!a&&(a.x!==r[0]||a.y!==r[1]||a.k!==r[2]))}function ng(e,t,r,n,i,o){let a=i,s=n.get(a)||new Map;n.set(a,s.set(r,t)),a=`${i}-${e}`;let l=n.get(a)||new Map;if(n.set(a,l.set(r,t)),o){a=`${i}-${e}-${o}`;let s=n.get(a)||new Map;n.set(a,s.set(r,t))}}function nm(e,t,r){for(let n of(e.clear(),t.clear(),r)){let{source:r,target:i,sourceHandle:o=null,targetHandle:a=null}=n,s={edgeId:n.id,source:r,target:i,sourceHandle:o,targetHandle:a},l=`${r}-${o}--${i}-${a}`;ng("source",s,`${i}-${a}--${r}-${o}`,e,r,o),ng("target",s,l,e,i,a),t.set(n.id,n)}}function nv(e,t){if(null===e||null===t)return!1;let r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t];if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++)if(r[e].id!==n[e].id||r[e].type!==n[e].type||!Object.is(r[e].data,n[e].data))return!1;return!0}function nb(e,t,r){let n=e;do{if(n?.matches?.(t))return!0;if(n===r)break;n=n?.parentElement}while(n)return!1}function ny({nodeId:e,dragItems:t,nodeLookup:r,dragging:n=!0}){let i=[];for(let[e,o]of t){let t=r.get(e)?.internals.userNode;t&&i.push({...t,position:o.position,dragging:n})}if(!e)return[i[0],i];let o=r.get(e)?.internals.userNode;return[o?{...o,position:t.get(e)?.position||o.position,dragging:n}:i[0],i]}function nx({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:n,onDragStop:i}){let o={x:null,y:null},a=0,s=new Map,l=!1,u={x:0,y:0},c=null,d=!1,h=null,f=!1,p=!1,g=null;return{update:function({noDragClassName:m,handleSelector:v,domNode:b,isSelectable:y,nodeId:x,nodeClickDistance:w=0}){function _({x:e,y:r}){let{nodeLookup:i,nodeExtent:a,snapGrid:l,snapToGrid:u,nodeOrigin:c,onNodeDrag:d,onSelectionDrag:h,onError:f,updateNodePositions:m}=t();o={x:e,y:r};let v=!1,b=s.size>1,y=b&&a?rg(ri(s)):null,w=b&&u?function({dragItems:e,snapGrid:t,x:r,y:n}){let i=e.values().next().value;if(!i)return null;let o={x:r-i.distance.x,y:n-i.distance.y},a=rk(o,t);return{x:a.x-o.x,y:a.y-o.y}}({dragItems:s,snapGrid:l,x:e,y:r}):null;for(let[t,n]of s){if(!i.has(t))continue;let o={x:e-n.distance.x,y:r-n.distance.y};u&&(o=w?{x:Math.round(o.x+w.x),y:Math.round(o.y+w.y)}:rk(o,l));let s=null;if(b&&a&&!n.extent&&y){let{positionAbsolute:e}=n.internals,t=e.x-y.x+a[0][0],r=e.x+n.measured.width-y.x2+a[1][0];s=[[t,e.y-y.y+a[0][1]],[r,e.y+n.measured.height-y.y2+a[1][1]]]}let{position:d,positionAbsolute:h}=rs({nodeId:t,nextPosition:o,nodeLookup:i,nodeExtent:s||a,nodeOrigin:c,onError:f});v=v||n.position.x!==d.x||n.position.y!==d.y,n.position=d,n.internals.positionAbsolute=h}if(p=p||v,v&&(m(s,!0),g&&(n||d||!x&&h))){let[e,t]=ny({nodeId:x,dragItems:s,nodeLookup:i});n?.(g,s,e,t),d?.(g,e,t),x||h?.(g,t)}}async function C(){if(!c)return;let{transform:e,panBy:r,autoPanSpeed:n,autoPanOnNodeDrag:i}=t();if(!i){l=!1,cancelAnimationFrame(a);return}let[s,d]=rf(u,c,n);(0!==s||0!==d)&&(o.x=(o.x??0)-s/e[2],o.y=(o.y??0)-d/e[2],await r({x:s,y:d})&&_(o)),a=requestAnimationFrame(C)}function k(n){let{nodeLookup:i,multiSelectionActive:a,nodesDraggable:l,transform:u,snapGrid:h,snapToGrid:f,selectNodesOnDrag:p,onNodeDragStart:g,onSelectionDragStart:m,unselectNodesAndEdges:v}=t();d=!0,p&&y||a||!x||i.get(x)?.selected||v(),y&&p&&x&&e?.(x);let b=rV(n.sourceEvent,{transform:u,snapGrid:h,snapToGrid:f,containerBounds:c});if(o=b,(s=function(e,t,r,n){let i=new Map;for(let[o,a]of e)if((a.selected||a.id===n)&&(!a.parentId||!function e(t,r){if(!t.parentId)return!1;let n=r.get(t.parentId);return!!n&&(!!n.selected||e(n,r))}(a,e))&&(a.draggable||t&&void 0===a.draggable)){let t=e.get(o);t&&i.set(o,{id:o,position:t.position||{x:0,y:0},distance:{x:r.x-t.internals.positionAbsolute.x,y:r.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}(i,l,b,x)).size>0&&(r||g||!x&&m)){let[e,t]=ny({nodeId:x,dragItems:s,nodeLookup:i});r?.(n.sourceEvent,s,e,t),g?.(n.sourceEvent,e,t),x||m?.(n.sourceEvent,t)}}h=es(b);let S=ew().clickDistance(w).on("start",e=>{let{domNode:r,nodeDragThreshold:n,transform:i,snapGrid:a,snapToGrid:s}=t();c=r?.getBoundingClientRect()||null,f=!1,p=!1,g=e.sourceEvent,0===n&&k(e),o=rV(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:s,containerBounds:c}),u=rW(e.sourceEvent,c)}).on("drag",e=>{let{autoPanOnNodeDrag:r,transform:n,snapGrid:i,snapToGrid:a,nodeDragThreshold:h,nodeLookup:p}=t(),m=rV(e.sourceEvent,{transform:n,snapGrid:i,snapToGrid:a,containerBounds:c});if(g=e.sourceEvent,("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||x&&!p.has(x))&&(f=!0),!f){if(!l&&r&&d&&(l=!0,C()),!d){let t=rW(e.sourceEvent,c),r=t.x-u.x,n=t.y-u.y;Math.sqrt(r*r+n*n)>h&&k(e)}(o.x!==m.xSnapped||o.y!==m.ySnapped)&&s&&d&&(u=rW(e.sourceEvent,c),_(m))}}).on("end",e=>{if(d&&!f&&(l=!1,d=!1,cancelAnimationFrame(a),s.size>0)){let{nodeLookup:r,updateNodePositions:n,onNodeDragStop:o,onSelectionDragStop:a}=t();if(p&&(n(s,!1),p=!1),i||o||!x&&a){let[t,n]=ny({nodeId:x,dragItems:s,nodeLookup:r,dragging:!1});i?.(e.sourceEvent,s,t,n),o?.(e.sourceEvent,t,n),x||a?.(e.sourceEvent,n)}}}).filter(e=>{let t=e.target;return!e.button&&(!m||!nb(t,`.${m}`,b))&&(!v||nb(t,v,b))});h.call(S)},destroy:function(){h?.on(".drag",null)}}}function nw(e,t,r,n,i,o=!1){let a=n.get(e);if(!a)return null;let s="strict"===i?a.internals.handleBounds?.[t]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],l=(r?s?.find(e=>e.id===r):s?.[0])??null;return l&&o?{...l,...r8(a,l,l.position,!0)}:l}function n_(e,t){return e?e:t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null}let nC=()=>!0;function nk(e,{handle:t,connectionMode:r,fromNodeId:n,fromHandleId:i,fromType:o,doc:a,lib:s,flowId:l,isValidConnection:c=nC,nodeLookup:d}){let h="target"===o,f=t?a.querySelector(`.${s}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:g}=rW(e),m=a.elementFromPoint(p,g),v=m?.classList.contains(`${s}-flow__handle`)?m:f,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){let e=n_(void 0,v),t=v.getAttribute("data-nodeid"),o=v.getAttribute("data-handleid"),a=v.classList.contains("connectable"),s=v.classList.contains("connectableend");if(!t||!e)return b;let l={source:h?t:n,sourceHandle:h?o:i,target:h?n:t,targetHandle:h?i:o};b.connection=l,b.isValid=a&&s&&(r===u.Strict?h&&"source"===e||!h&&"target"===e:t!==n||o!==i)&&c(l),b.toHandle=nw(t,e,o,d,r,!0)}return b}let nS={onPointerDown:function(e,{connectionMode:t,connectionRadius:r,handleId:n,nodeId:i,edgeUpdaterType:o,isTarget:a,domNode:s,nodeLookup:l,lib:u,autoPanOnConnect:c,flowId:d,panBy:h,cancelConnection:f,onConnectStart:g,onConnect:m,onConnectEnd:v,isValidConnection:b=nC,onReconnectEnd:y,updateConnection:x,getTransform:w,getFromHandle:_,autoPanSpeed:C,dragThreshold:k=1,handleDomNode:S}){let E,O=rj(e.target),I=0,{x:P,y:T}=rW(e),R=n_(o,S),A=s?.getBoundingClientRect(),M=!1;if(!A||!R)return;let N=nw(i,R,n,l,t);if(!N)return;let D=rW(e,A),L=!1,V=null,F=!1,j=null,z={...N,nodeId:i,type:R,position:N.position},B=l.get(i),H={inProgress:!0,isValid:null,from:r8(B,z,p.Left,!0),fromHandle:z,fromPosition:z.position,fromNode:B,to:D,toHandle:null,toPosition:t4[z.position],toNode:null};function W(){M=!0,x(H),g?.(e,{nodeId:i,handleId:n,handleType:R})}function U(e){var o,s;let f;if(!M){let{x:t,y:r}=rW(e),n=t-P,i=r-T;if(!(n*n+i*i>k*k))return;W()}if(!_()||!z)return void $(e);let p=w();E=function(e,t,r,n){let i=[],o=1/0;for(let a of function(e,t,r){let n=[],i={x:e.x-r,y:e.y-r,width:2*r,height:2*r};for(let e of t.values())rx(i,rv(e))>0&&n.push(e);return n}(e,r,t+250))for(let r of[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]]){if(n.nodeId===r.nodeId&&n.type===r.type&&n.id===r.id)continue;let{x:s,y:l}=r8(a,r,r.position,!0),u=Math.sqrt(Math.pow(s-e.x,2)+Math.pow(l-e.y,2));u>t||(u<o?(i=[{...r,x:s,y:l}],o=u):u===o&&i.push({...r,x:s,y:l}))}if(!i.length)return null;if(i.length>1){let e="source"===n.type?"target":"source";return i.find(t=>t.type===e)??i[0]}return i[0]}(rS(D=rW(e,A),p,!1,[1,1]),r,l,z),L||(!function e(){if(!c||!A)return;let[t,r]=rf(D,A,C);h({x:t,y:r}),I=requestAnimationFrame(e)}(),L=!0);let g=nk(e,{handle:E,connectionMode:t,fromNodeId:i,fromHandleId:n,fromType:a?"target":"source",isValidConnection:b,doc:O,lib:u,flowId:d,nodeLookup:l});j=g.handleDomNode,V=g.connection,o=!!E,s=g.isValid,f=null,s?f=!0:o&&!s&&(f=!1),F=f;let m={...H,isValid:F,to:g.toHandle&&F?rE({x:g.toHandle.x,y:g.toHandle.y},p):D,toHandle:g.toHandle,toPosition:F&&g.toHandle?g.toHandle.position:t4[z.position],toNode:g.toHandle?l.get(g.toHandle.nodeId):null};F&&E&&H.toHandle&&m.toHandle&&H.toHandle.type===m.toHandle.type&&H.toHandle.nodeId===m.toHandle.nodeId&&H.toHandle.id===m.toHandle.id&&H.to.x===m.to.x&&H.to.y===m.to.y||(x(m),H=m)}function $(e){if(!("touches"in e)||!(e.touches.length>0)){if(M){(E||j)&&V&&F&&m?.(V);let{inProgress:t,...r}=H,n={...r,toPosition:H.toHandle?H.toPosition:null};v?.(e,n),o&&y?.(e,n)}f(),cancelAnimationFrame(I),L=!1,F=!1,V=null,j=null,O.removeEventListener("mousemove",U),O.removeEventListener("mouseup",$),O.removeEventListener("touchmove",U),O.removeEventListener("touchend",$)}}0===k&&W(),O.addEventListener("mousemove",U),O.addEventListener("mouseup",$),O.addEventListener("touchmove",U),O.addEventListener("touchend",$)},isValid:nk};function nE({domNode:e,panZoom:t,getTransform:r,getViewScale:n}){let i=es(e);return{update:function({translateExtent:e,width:o,height:a,zoomStep:s=1,pannable:l=!0,zoomable:u=!0,inversePan:c=!1}){let d=[0,0],h=tZ().on("start",e=>{("mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type)&&(d=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on("zoom",l?i=>{let s=r();if("mousemove"!==i.sourceEvent.type&&"touchmove"!==i.sourceEvent.type||!t)return;let l=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],u=[l[0]-d[0],l[1]-d[1]];d=l;let h=n()*Math.max(s[2],Math.log(s[2]))*(c?-1:1),f={x:s[0]-u[0]*h,y:s[1]-u[1]*h};t.setViewportConstrained({x:f.x,y:f.y,zoom:s[2]},[[0,0],[o,a]],e)}:null).on("zoom.wheel",u?e=>{if("wheel"!==e.sourceEvent.type||!t)return;let n=r(),i=e.sourceEvent.ctrlKey&&rP()?10:1,o=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*s,a=n[2]*Math.pow(2,o*i);t.scaleTo(a)}:null);i.call(h,{})},destroy:function(){i.on("zoom",null)},pointer:el}}let nO=e=>({x:e.x,y:e.y,zoom:e.k}),nI=({x:e,y:t,zoom:r})=>tH.translate(e,t).scale(r),nP=(e,t)=>e.target.closest(`.${t}`),nT=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),nR=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,nA=(e,t=0,r=nR,n=()=>{})=>{let i="number"==typeof t&&t>0;return i||n(),i?e.transition().duration(t).ease(r).on("end",n):e},nM=e=>{let t=e.ctrlKey&&rP()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t};function nN({domNode:e,minZoom:t,maxZoom:r,translateExtent:n,viewport:i,onPanZoom:o,onPanZoomStart:a,onPanZoomEnd:s,onDraggingChange:l}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),h=tZ().scaleExtent([t,r]).translateExtent(n),f=es(e).call(h);b({x:i.x,y:i.y,zoom:ru(i.zoom,t,r)},[[0,0],[d.width,d.height]],n);let p=f.on("wheel.zoom"),g=f.on("dblclick.zoom");function m(e,t){return f?new Promise(r=>{h?.interpolate(t?.interpolate==="linear"?tJ:eC).transform(nA(f,t?.duration,t?.ease,()=>r(!0)),e)}):Promise.resolve(!1)}function v(){h.on("zoom",null)}async function b(e,t,r){let n=nI(e),i=h?.constrain()(n,t,r);return i&&await m(i),new Promise(e=>e(i))}return h.wheelDelta(nM),{update:function({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:r,userSelectionActive:n,panOnScroll:i,panOnDrag:d,panOnScrollMode:m,panOnScrollSpeed:b,preventScrolling:y,zoomOnPinch:x,zoomOnScroll:w,zoomOnDoubleClick:_,zoomActivationKeyPressed:C,lib:k,onTransformChange:S,connectionInProgress:E,paneClickDistance:O,selectionOnDrag:I}){n&&!u.isZoomingOrPanning&&v();let P=i&&!C&&!n;h.clickDistance(I?1/0:!r_(O)||O<0?0:O);let T=P?function({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:n,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:a,onPanZoomStart:s,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(nP(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();let h=r.property("__zoom").k||1;if(d.ctrlKey&&a){let e=el(d),t=h*Math.pow(2,nM(d));n.scaleTo(r,t,e,d);return}let f=1===d.deltaMode?20:1,p=i===c.Vertical?0:d.deltaX*f,g=i===c.Horizontal?0:d.deltaY*f;!rP()&&d.shiftKey&&i!==c.Vertical&&(p=d.deltaY*f,g=0),n.translateBy(r,-(p/h)*o,-(g/h)*o,{internal:!0});let m=nO(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l?.(d,m),e.panScrollTimeout=setTimeout(()=>{u?.(d,m),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(d,m))}}({zoomPanValues:u,noWheelClassName:e,d3Selection:f,d3Zoom:h,panOnScrollMode:m,panOnScrollSpeed:b,zoomOnPinch:x,onPanZoomStart:a,onPanZoom:o,onPanZoomEnd:s}):function({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(n,i){let o="wheel"===n.type,a=!t&&o&&!n.ctrlKey,s=nP(n,e);if(n.ctrlKey&&o&&s&&n.preventDefault(),a||s)return null;n.preventDefault(),r.call(this,n,i)}}({noWheelClassName:e,preventScrolling:y,d3ZoomHandler:p});if(f.on("wheel.zoom",T,{passive:!1}),!n){let e=function({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return n=>{if(n.sourceEvent?.internal)return;let i=nO(n.transform);e.mouseButton=n.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,n.sourceEvent?.type==="mousedown"&&t(!0),r&&r?.(n.sourceEvent,i)}}({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:a});h.on("start",e);let t=function({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:n,onPanZoom:i}){return o=>{e.usedRightMouseButton=!!(r&&nT(t,e.mouseButton??0)),o.sourceEvent?.sync||n([o.transform.x,o.transform.y,o.transform.k]),i&&!o.sourceEvent?.internal&&i?.(o.sourceEvent,nO(o.transform))}}({zoomPanValues:u,panOnDrag:d,onPaneContextMenu:!!r,onPanZoom:o,onTransformChange:S});h.on("zoom",t);let n=function({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:n,onPanZoomEnd:i,onPaneContextMenu:o}){return a=>{if(!a.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,o&&nT(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&o(a.sourceEvent),e.usedRightMouseButton=!1,n(!1),i)){let t=nO(a.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(a.sourceEvent,t)},150*!!r)}}}({zoomPanValues:u,panOnDrag:d,panOnScroll:i,onPaneContextMenu:r,onPanZoomEnd:s,onDraggingChange:l});h.on("end",n)}let R=function({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:r,panOnDrag:n,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:a,noWheelClassName:s,noPanClassName:l,lib:u,connectionInProgress:c}){return d=>{let h=e||t,f=r&&d.ctrlKey,p="wheel"===d.type;if(1===d.button&&"mousedown"===d.type&&(nP(d,`${u}-flow__node`)||nP(d,`${u}-flow__edge`)))return!0;if(!n&&!h&&!i&&!o&&!r||a||c&&!p||nP(d,s)&&p||nP(d,l)&&(!p||i&&p&&!e)||!r&&d.ctrlKey&&p)return!1;if(!r&&"touchstart"===d.type&&d.touches?.length>1)return d.preventDefault(),!1;if(!h&&!i&&!f&&p||!n&&("mousedown"===d.type||"touchstart"===d.type)||Array.isArray(n)&&!n.includes(d.button)&&"mousedown"===d.type)return!1;let g=Array.isArray(n)&&n.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||p)&&g}}({zoomActivationKeyPressed:C,panOnDrag:d,zoomOnScroll:w,panOnScroll:i,zoomOnDoubleClick:_,zoomOnPinch:x,userSelectionActive:n,noPanClassName:t,noWheelClassName:e,lib:k,connectionInProgress:E});h.filter(R),_?f.on("dblclick.zoom",g):f.on("dblclick.zoom",null)},destroy:v,setViewport:async function e(e,t){let r=nI(e);return await m(r,t),new Promise(e=>e(r))},setViewportConstrained:b,getViewport:function(){let e=f?tW(f.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}},scaleTo:function(e,t){return f?new Promise(r=>{h?.interpolate(t?.interpolate==="linear"?tJ:eC).scaleTo(nA(f,t?.duration,t?.ease,()=>r(!0)),e)}):Promise.resolve(!1)},scaleBy:function(e,t){return f?new Promise(r=>{h?.interpolate(t?.interpolate==="linear"?tJ:eC).scaleBy(nA(f,t?.duration,t?.ease,()=>r(!0)),e)}):Promise.resolve(!1)},setScaleExtent:function(e){h?.scaleExtent(e)},setTranslateExtent:function(e){h?.translateExtent(e)},syncViewport:function(e){if(f){let t=nI(e),r=f.property("__zoom");(r.k!==e.zoom||r.x!==e.x||r.y!==e.y)&&h?.transform(f,t,null,{sync:!0})}},setClickDistance:function(e){let t=!r_(e)||e<0?0:e;h?.clickDistance(t)}}}(s=g||(g={})).Line="line",s.Handle="handle";let nD=["top-left","top-right","bottom-left","bottom-right"],nL=["top","right","bottom","left"];function nV(e){let t=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top");return{isHorizontal:t,isVertical:r,affectsX:e.includes("left"),affectsY:e.includes("top")}}function nF(e,t){return Math.max(0,t-e)}function nj(e,t){return Math.max(0,e-t)}function nz(e,t,r){return Math.max(0,t-e,e-r)}let nB={width:0,height:0,x:0,y:0},nH={...nB,pointerX:0,pointerY:0,aspectRatio:1};function nW({domNode:e,nodeId:t,getStoreItems:r,onChange:n,onEnd:i}){let o=es(e),a={controlDirection:nV("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};return{update:function({controlPosition:e,boundaries:s,keepAspectRatio:l,resizeDirection:u,onResizeStart:c,onResize:d,onResizeEnd:h,shouldResize:f}){let p,g,m,v,b={...nB},y={...nH};a={boundaries:s,resizeDirection:u,keepAspectRatio:l,controlDirection:nV(e)};let x=null,w=[],_=!1,C=ew().on("start",e=>{let{nodeLookup:n,transform:i,snapGrid:o,snapToGrid:a,nodeOrigin:s,paneDomNode:l}=r();if(!(p=n.get(t)))return;x=l?.getBoundingClientRect()??null;let{xSnapped:u,ySnapped:d}=rV(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:a,containerBounds:x});if(y={...b={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},pointerX:u,pointerY:d,aspectRatio:b.width/b.height},g=void 0,p.parentId&&("parent"===p.extent||p.expandParent)){var h;m=(g=n.get(p.parentId))&&"parent"===p.extent?[[0,0],[(h=g).measured.width,h.measured.height]]:void 0}for(let[e,r]of(w=[],v=void 0,n))if(r.parentId===t&&(w.push({id:e,position:{...r.position},extent:r.extent}),"parent"===r.extent||r.expandParent)){let e=function(e,t,r){let n=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,a=e.measured.height??0,s=r[0]*o,l=r[1]*a;return[[n-s,i-l],[n+o-s,i+a-l]]}(r,p,r.origin??s);v=v?[[Math.min(e[0][0],v[0][0]),Math.min(e[0][1],v[0][1])],[Math.max(e[1][0],v[1][0]),Math.max(e[1][1],v[1][1])]]:e}c?.(e,{...b})}).on("drag",e=>{let{transform:t,snapGrid:i,snapToGrid:o,nodeOrigin:s}=r(),l=rV(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:o,containerBounds:x}),u=[];if(!p)return;let{x:c,y:h,width:C,height:k}=b,S={},E=p.origin??s,{width:O,height:I,x:P,y:T}=function(e,t,r,n,i,o,a,s){var l,u,c,d;let{affectsX:h,affectsY:f}=t,{isHorizontal:p,isVertical:g}=t,m=p&&g,{xSnapped:v,ySnapped:b}=r,{minWidth:y,maxWidth:x,minHeight:w,maxHeight:_}=n,{x:C,y:k,width:S,height:E,aspectRatio:O}=e,I=Math.floor(p?v-e.pointerX:0),P=Math.floor(g?b-e.pointerY:0),T=S+(h?-I:I),R=E+(f?-P:P),A=-o[0]*S,M=-o[1]*E,N=nz(T,y,x),D=nz(R,w,_);if(a){let e=0,t=0;h&&I<0?e=nF(C+I+A,a[0][0]):!h&&I>0&&(e=nj(C+T+A,a[1][0])),f&&P<0?t=nF(k+P+M,a[0][1]):!f&&P>0&&(t=nj(k+R+M,a[1][1])),N=Math.max(N,e),D=Math.max(D,t)}if(s){let e=0,t=0;h&&I>0?e=nj(C+I,s[0][0]):!h&&I<0&&(e=nF(C+T,s[1][0])),f&&P>0?t=nj(k+P,s[0][1]):!f&&P<0&&(t=nF(k+R,s[1][1])),N=Math.max(N,e),D=Math.max(D,t)}if(i){if(p){(N=Math.max(N,nz(T/O,w,_)*O),a)&&(N=Math.max(N,(h||f)&&(!h||f||!m)?nF(k+M+(h?I:-I)/O,a[0][1])*O:nj(k+M+T/O,a[1][1])*O));s&&(N=Math.max(N,(h||f)&&(!h||f||!m)?nj(k+(h?I:-I)/O,s[0][1])*O:nF(k+T/O,s[1][1])*O))}if(g){(D=Math.max(D,nz(R*O,y,x)/O),a)&&(D=Math.max(D,(h||f)&&(!f||h||!m)?nF(C+(f?P:-P)*O+A,a[0][0])/O:nj(C+R*O+A,a[1][0])/O));s&&(D=Math.max(D,(h||f)&&(!f||h||!m)?nj(C+(f?P:-P)*O,s[0][0])/O:nF(C+R*O,s[1][0])/O))}}P+=P<0?D:-D,I+=I<0?N:-N,i&&(m?T>R*O?P=((l=h,u=f,l?!u:u)?-I:I)/O:I=((c=h,d=f,c?!d:d)?-P:P)*O:p?(P=I/O,f=h):(I=P*O,h=f));let L=h?C+I:C,V=f?k+P:k;return{width:S+(h?-I:I),height:E+(f?-P:P),x:o[0]*I*(h?-1:1)+L,y:o[1]*P*(f?-1:1)+V}}(y,a.controlDirection,l,a.boundaries,a.keepAspectRatio,E,m,v),R=O!==C,A=I!==k,M=P!==c&&R,N=T!==h&&A;if(!M&&!N&&!R&&!A)return;if((M||N||1===E[0]||1===E[1])&&(S.x=M?P:b.x,S.y=N?T:b.y,b.x=S.x,b.y=S.y,w.length>0)){let e=P-c,t=T-h;for(let r of w)r.position={x:r.position.x-e+E[0]*(O-C),y:r.position.y-t+E[1]*(I-k)},u.push(r)}if((R||A)&&(S.width=R&&(!a.resizeDirection||"horizontal"===a.resizeDirection)?O:b.width,S.height=A&&(!a.resizeDirection||"vertical"===a.resizeDirection)?I:b.height,b.width=S.width,b.height=S.height),g&&p.expandParent){let e=E[0]*(S.width??0);S.x&&S.x<e&&(b.x=e,y.x=y.x-(S.x-e));let t=E[1]*(S.height??0);S.y&&S.y<t&&(b.y=t,y.y=y.y-(S.y-t))}let D=function({width:e,prevWidth:t,height:r,prevHeight:n,affectsX:i,affectsY:o}){let a=e-t,s=r-n,l=[a>0?1:a<0?-1:0,s>0?1:s<0?-1:0];return a&&i&&(l[0]=-1*l[0]),s&&o&&(l[1]=-1*l[1]),l}({width:b.width,prevWidth:C,height:b.height,prevHeight:k,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),L={...b,direction:D};!1!==f?.(e,L)&&(_=!0,d?.(e,L),n(S,u))}).on("end",e=>{_&&(h?.(e,{...b}),i?.({...b}),_=!1)});o.call(C)},destroy:function(){o.on(".drag",null)}}}function nU(e,t,r=1e3){let n=new Set,i={},o=(e,r)=>{if(!(r<0)&&(null==i[e]||!(i[e]>=r))){for(let n of(i[e]=r,t(e)))o(n,r-1);n.add(e)}};for(let t of e)o(t,r);return n}function n$(...e){let t=new Set;return e.forEach(e=>{e.forEach(e=>{t.add(e)})}),t}e.s(["ConnectionLineType",()=>h,"ConnectionMode",()=>u,"MarkerType",()=>f,"PanOnScrollMode",()=>c,"Position",()=>p,"ResizeControlVariant",()=>g,"SelectionMode",()=>d,"XYDrag",()=>nx,"XYHandle",()=>nS,"XYMinimap",()=>nE,"XYPanZoom",()=>nN,"XYResizer",()=>nW,"XY_RESIZER_HANDLE_POSITIONS",()=>nD,"XY_RESIZER_LINE_POSITIONS",()=>nL,"addEdge",()=>rZ,"adoptUserNodes",()=>nu,"areConnectionMapsEqual",()=>t6,"areSetsEqual",()=>rN,"calculateNodePosition",()=>rs,"createMarkerIds",()=>ne,"defaultAriaLabelConfig",()=>t5,"devWarn",()=>rC,"elementSelectionKeys",()=>t2,"errorMessages",()=>t0,"evaluateAbsolutePosition",()=>rM,"fitViewport",()=>ra,"getBezierEdgeCenter",()=>r$,"getBezierPath",()=>rK,"getBoundsOfRects",()=>ry,"getConnectionStatus",()=>t7,"getDimensions",()=>rF,"getEdgePosition",()=>r4,"getEdgeToolbarTransform",()=>ni,"getElementsToRemove",()=>rl,"getElevatedEdgeZIndex",()=>rX,"getEventPosition",()=>rW,"getHostForElement",()=>rj,"getInternalNodesBounds",()=>ri,"getMarkerId",()=>r9,"getNodeDimensions",()=>rR,"getNodeToolbarTransform",()=>nt,"getNodesBounds",()=>rn,"getNodesInside",()=>ro,"getOverlappingArea",()=>rx,"getSmoothStepPath",()=>r5,"getStraightPath",()=>rJ,"getViewportForBounds",()=>rI,"handleConnectionChange",()=>t8,"handleExpandParent",()=>nh,"infiniteExtent",()=>t1,"initialConnection",()=>t3,"isEdgeBase",()=>t9,"isEdgeVisible",()=>rQ,"isInputDOMNode",()=>rB,"isMacOs",()=>rP,"isMouseEvent",()=>rH,"isNodeBase",()=>re,"isNumeric",()=>r_,"isRectObject",()=>rw,"mergeAriaLabelConfig",()=>rL,"nodeHasDimensions",()=>rA,"nodeToRect",()=>rv,"panBy",()=>np,"pointToRendererPoint",()=>rS,"rendererPointToPoint",()=>rE,"shallowNodeData",()=>nv,"snapPosition",()=>rk,"updateAbsolutePositions",()=>nl,"updateConnectionLookup",()=>nm,"updateNodeInternals",()=>nf,"withResolvers",()=>rD],23795),e.s(["getNeighborSet",()=>nU,"union",()=>n$],81167);var nq=e.i(35380);function nG(e){return"lineageGraphNode"===e.type}function nK(e){return"lineageGraphColumnNode"===e.type}function nY(e,t,r){let n={},i={},o=(e,t)=>({id:e,data:{id:e,name:e,from:t,data:{base:void 0,current:void 0},parents:{},children:{}},type:"lineageGraphNode"});for(let[t,r]of Object.entries(e.nodes))n[t]=o(t,"base"),r&&(n[t].data.data.base=r,n[t].data.name=r.name,n[t].data.resourceType=r.resource_type,n[t].data.packageName=r.package_name);for(let[e,r]of Object.entries(t.nodes))n[e]?n[e].data.from="both":n[e]=o(e,"current"),r&&(n[e].data.data.current=t.nodes[e],n[e].data.name=r.name,n[e].data.resourceType=r.resource_type,n[e].data.packageName=r.package_name);for(let[t,r]of Object.entries(e.parent_map))for(let e of r){let r=n[t],o=n[e],a=`${e}_${t}`;if(!r||!o)continue;i[a]={id:a,source:o.id,target:r.id,data:{from:"base"}};let s=i[a];r.data.parents[e]=s,o.data.children[t]=s}for(let[e,r]of Object.entries(t.parent_map))for(let t of r){let r=n[e],o=n[t],a=`${t}_${e}`;if(!r||!o)continue;i[a]&&i[a].data?i[a].data.from="both":i[a]={id:a,source:o.id,target:r.id,data:{from:"current"}};let s=i[a];r.data.parents[t]=s,o.data.children[e]=s}let a=[];for(let[e,t]of Object.entries(n)){let n=r?.[e];if(n)t.data.changeStatus=n.change_status,n.change&&(t.data.change={category:n.change.category,columns:n.change.columns}),a.push(e);else if("base"===t.data.from)t.data.changeStatus="removed",a.push(t.id);else if("current"===t.data.from)t.data.changeStatus="added",a.push(t.id);else{let e=t.data.data.base?.checksum?.checksum,r=t.data.data.current?.checksum?.checksum;e&&r&&e!==r&&(t.data.changeStatus="modified",a.push(t.id))}}for(let[e,t]of Object.entries(i))t.data&&("base"===t.data.from?t.data.changeStatus="removed":"current"===t.data.from&&(t.data.changeStatus="added"));return{nodes:n,edges:i,modifiedSet:a,manifestMetadata:{base:e.manifest_metadata??void 0,current:t.manifest_metadata??void 0},catalogMetadata:{base:e.catalog_metadata??void 0,current:t.catalog_metadata??void 0}}}function nX(e,t,r=1e3){return nU(t,t=>void 0===e.nodes[t]?[]:Object.keys(e.nodes[t].data.parents),r)}function nQ(e,t,r=1e3){return nU(t,t=>void 0===e.nodes[t]?[]:Object.keys(e.nodes[t].data.children),r)}function nZ(e,t){let r=[],n=[],{selectedNodes:i,cll:o}=t??{},a={};function s(e){return"base"===e?0:"current"===e?2:1}function l(e,t){let r=s(e.data?.from),n=s(t.data?.from);return r<n?-1:+(r>n)}let u=void 0!==i?new Set(i):void 0;for(let t of Object.values(e.nodes).sort(l)){if(u&&!u.has(t.id))continue;let e=new Set,i=0;if(o){for(let e of o?.current?.parent_map[t.id]??new Set){let r=t.id;n.push({id:`m2c_${e}_${r}`,source:e,target:r,style:{zIndex:9999}})}for(let a of Object.keys(t.data.data.current?.columns??{})){let s=`${t.id}_${a}`,l=o?.current?.columns[s],u=o?.current?.parent_map[s]??new Set;if(null!=l){for(let e of(r.push({id:s,position:{x:10,y:70+20*i},parentId:t.id,extent:"parent",draggable:!1,className:"no-track-pii-safe",data:{node:t.data,column:l.name,type:l.type,transformationType:l.transformation_type,changeStatus:l.change_status},style:{zIndex:9999},type:"lineageGraphColumnNode",targetPosition:p.Left,sourcePosition:p.Right}),u))n.push({id:`${e}_${s}`,source:e,target:s,style:{zIndex:9999}});i++,e.add(l.name)}}}a[t.id]=e;let s=60;i>0&&(s+=20+20*i),r.unshift({id:t.id,position:{x:0,y:0},width:300,height:s,className:"no-track-pii-safe",data:{...t.data},type:"lineageGraphNode",targetPosition:p.Left,sourcePosition:p.Right,style:{width:300,height:s}})}for(let t of Object.values(e.edges).sort(l))(!u||u.has(t.source)&&u.has(t.target))&&n.push({id:t.id,type:"lineageGraphEdge",source:t.source,target:t.target,data:{...t.data}});return nJ(r,n),[r,n,a]}let nJ=(e,t,r="LR")=>{let n=new nq.default.graphlib.Graph;n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:r,ranksep:50,nodesep:30}),e.forEach(e=>{if(!nG(e))return;let t=300,r=60;e.style&&e.style.height&&e.style.width&&(t=parseInt(String(e.style.width),10),r=parseInt(String(e.style.height),10)),n.setNode(e.id,{width:t,height:r})}),t.forEach(e=>{n.setEdge(e.source,e.target)}),nq.default.layout(n),e.forEach(e=>{if(!nG(e))return;let t=e.style?.width??300,r=e.style?.height??60,i=n.node(e.id);return e.position={x:i.x-Number(t)/2,y:i.y-Number(r)/2},e})};e.s(["COLUMN_HEIGHT",0,20,"buildLineageGraph",()=>nY,"isLineageGraphColumnNode",()=>nK,"isLineageGraphNode",()=>nG,"layout",0,nJ,"selectDownstream",()=>nQ,"selectUpstream",()=>nX,"toReactFlow",()=>nZ],23043)},72474,e=>{"use strict";var t=e.i(47789),r=e.i(71477),n=e.i(11667),i=e.i(21548),o=e.i(44416),a=e.i(51327),s=e.i(3741),l=class extends i.Subscribable{constructor(e,t){super(),this.options=t,this.#c=e,this.#O=null,this.#I=(0,o.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#c;#P=void 0;#T=void 0;#R=void 0;#A;#M;#I;#O;#N;#D;#L;#V;#F;#j;#z=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#P.addObserver(this),u(this.#P,this.options)?this.#B():this.updateResult(),this.#H())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return c(this.#P,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return c(this.#P,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#W(),this.#U(),this.#P.removeObserver(this)}setOptions(e){let t=this.options,r=this.#P;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,a.resolveEnabled)(this.options.enabled,this.#P))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#$(),this.#P.setOptions(this.options),t._defaulted&&!(0,a.shallowEqualObjects)(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#P,observer:this});let n=this.hasListeners();n&&d(this.#P,r,this.options,t)&&this.#B(),this.updateResult(),n&&(this.#P!==r||(0,a.resolveEnabled)(this.options.enabled,this.#P)!==(0,a.resolveEnabled)(t.enabled,this.#P)||(0,a.resolveStaleTime)(this.options.staleTime,this.#P)!==(0,a.resolveStaleTime)(t.staleTime,this.#P))&&this.#q();let i=this.#G();n&&(this.#P!==r||(0,a.resolveEnabled)(this.options.enabled,this.#P)!==(0,a.resolveEnabled)(t.enabled,this.#P)||i!==this.#j)&&this.#K(i)}getOptimisticResult(e){var t,r;let n=this.#c.getQueryCache().build(this.#c,e),i=this.createResult(n,e);return t=this,r=i,(0,a.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#R=i,this.#M=this.options,this.#A=this.#P.state),i}getCurrentResult(){return this.#R}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#I.status||this.#I.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#z.add(e)}getCurrentQuery(){return this.#P}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#c.defaultQueryOptions(e),r=this.#c.getQueryCache().build(this.#c,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#B({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#R))}#B(e){this.#$();let t=this.#P.fetch(this.options,e);return e?.throwOnError||(t=t.catch(a.noop)),t}#q(){this.#W();let e=(0,a.resolveStaleTime)(this.options.staleTime,this.#P);if(a.isServer||this.#R.isStale||!(0,a.isValidTimeout)(e))return;let t=(0,a.timeUntilStale)(this.#R.dataUpdatedAt,e);this.#V=s.timeoutManager.setTimeout(()=>{this.#R.isStale||this.updateResult()},t+1)}#G(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#P):this.options.refetchInterval)??!1}#K(e){this.#U(),this.#j=e,!a.isServer&&!1!==(0,a.resolveEnabled)(this.options.enabled,this.#P)&&(0,a.isValidTimeout)(this.#j)&&0!==this.#j&&(this.#F=s.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#B()},this.#j))}#H(){this.#q(),this.#K(this.#G())}#W(){this.#V&&(s.timeoutManager.clearTimeout(this.#V),this.#V=void 0)}#U(){this.#F&&(s.timeoutManager.clearInterval(this.#F),this.#F=void 0)}createResult(e,t){let r,i=this.#P,s=this.options,l=this.#R,c=this.#A,f=this.#M,p=e!==i?e.state:this.#T,{state:g}=e,m={...g},v=!1;if(t._optimisticResults){let r=this.hasListeners(),o=!r&&u(e,t),a=r&&d(e,i,t,s);(o||a)&&(m={...m,...(0,n.fetchState)(g.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:b,errorUpdatedAt:y,status:x}=m;r=m.data;let w=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===x){let e;l?.isPlaceholderData&&t.placeholderData===f?.placeholderData?(e=l.data,w=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#L?.state.data,this.#L):t.placeholderData,void 0!==e&&(x="success",r=(0,a.replaceData)(l?.data,e,t),v=!0)}if(t.select&&void 0!==r&&!w)if(l&&r===c?.data&&t.select===this.#N)r=this.#D;else try{this.#N=t.select,r=t.select(r),r=(0,a.replaceData)(l?.data,r,t),this.#D=r,this.#O=null}catch(e){this.#O=e}this.#O&&(b=this.#O,r=this.#D,y=Date.now(),x="error");let _="fetching"===m.fetchStatus,C="pending"===x,k="error"===x,S=C&&_,E=void 0!==r,O={status:x,fetchStatus:m.fetchStatus,isPending:C,isSuccess:"success"===x,isError:k,isInitialLoading:S,isLoading:S,data:r,dataUpdatedAt:m.dataUpdatedAt,error:b,errorUpdatedAt:y,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:_,isRefetching:_&&!C,isLoadingError:k&&!E,isPaused:"paused"===m.fetchStatus,isPlaceholderData:v,isRefetchError:k&&E,isStale:h(e,t),refetch:this.refetch,promise:this.#I,isEnabled:!1!==(0,a.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===O.status?e.reject(O.error):void 0!==O.data&&e.resolve(O.data)},r=()=>{t(this.#I=O.promise=(0,o.pendingThenable)())},n=this.#I;switch(n.status){case"pending":e.queryHash===i.queryHash&&t(n);break;case"fulfilled":("error"===O.status||O.data!==n.value)&&r();break;case"rejected":("error"!==O.status||O.error!==n.reason)&&r()}}return O}updateResult(){let e=this.#R,t=this.createResult(this.#P,this.options);if(this.#A=this.#P.state,this.#M=this.options,void 0!==this.#A.data&&(this.#L=this.#P),(0,a.shallowEqualObjects)(t,e))return;this.#R=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#z.size)return!0;let n=new Set(r??this.#z);return this.options.throwOnError&&n.add("error"),Object.keys(this.#R).some(t=>this.#R[t]!==e[t]&&n.has(t))};this.#Y({listeners:r()})}#$(){let e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#P)return;let t=this.#P;this.#P=e,this.#T=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#H()}#Y(e){r.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#R)}),this.#c.getQueryCache().notify({query:this.#P,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&c(e,t,t.refetchOnMount)}function c(e,t,r){if(!1!==(0,a.resolveEnabled)(t.enabled,e)&&"static"!==(0,a.resolveStaleTime)(t.staleTime,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&h(e,t)}return!1}function d(e,t,r,n){return(e!==t||!1===(0,a.resolveEnabled)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&h(e,r)}function h(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",()=>l])},87391,e=>{"use strict";let t;var r=e.i(72474);e.i(48962);var n=e.i(64789),i=e.i(51327),o=e.i(71477),a=e.i(941);e.i(15839);var s=n.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),l=n.createContext(!1);l.Provider;var u=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function c(e,t){return function(e,t,r){let c=n.useContext(l),d=n.useContext(s),h=(0,a.useQueryClient)(r),f=h.defaultQueryOptions(e);if(h.getDefaultOptions().queries?._experimental_beforeQuery?.(f),f._optimisticResults=c?"isRestoring":"optimistic",f.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=f.staleTime;f.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof f.gcTime&&(f.gcTime=Math.max(f.gcTime,1e3))}(f.suspense||f.throwOnError||f.experimental_prefetchInRender)&&!d.isReset()&&(f.retryOnMount=!1),n.useEffect(()=>{d.clearReset()},[d]);let p=!h.getQueryCache().get(f.queryHash),[g]=n.useState(()=>new t(h,f)),m=g.getOptimisticResult(f),v=!c&&!1!==e.subscribed;if(n.useSyncExternalStore(n.useCallback(e=>{let t=v?g.subscribe(o.notifyManager.batchCalls(e)):i.noop;return g.updateResult(),t},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),n.useEffect(()=>{g.setOptions(f)},[f,g]),f?.suspense&&m.isPending)throw u(f,g,d);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&void 0===e.data||(0,i.shouldThrowError)(r,[e.error,n])))({result:m,errorResetBoundary:d,throwOnError:f.throwOnError,query:h.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw m.error;if(h.getDefaultOptions().queries?._experimental_afterQuery?.(f,m),f.experimental_prefetchInRender&&!i.isServer&&m.isLoading&&m.isFetching&&!c){let e=p?u(f,g,d):h.getQueryCache().get(f.queryHash)?.promise;e?.catch(i.noop).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?m:g.trackResult(m)}(e,r.QueryObserver,t)}e.s(["useQuery",()=>c],87391)},7101,e=>{"use strict";e.s(["cacheKeys",0,{rowCount:e=>["row_count",e],lineage:()=>["lineage"],checks:()=>["checks","list"],check:e=>["checks",e],runs:()=>["runs"],run:e=>["runs",e],runsAggregated:()=>["runs_aggregated"],flag:()=>["flag"],instanceInfo:()=>["instance_info"],user:()=>["user"]}])},20856,60536,e=>{"use strict";var t=e.i(5443);let{Axios:r,AxiosError:n,CanceledError:i,isCancel:o,CancelToken:a,VERSION:s,all:l,Cancel:u,isAxiosError:c,spread:d,toFormData:h,AxiosHeaders:f,HttpStatusCode:p,formToJSON:g,getAdapter:m,mergeConfig:v}=e.i(51484).default;async function b(){return(await t.axiosClient.get("/api/info")).data}async function y(e){return(await t.axiosClient.get(`/api/model/${e}`)).data}e.s(["AxiosError",()=>n,"isAxiosError",()=>c],60536),e.s(["getModelInfo",()=>y,"getServerInfo",()=>b],20856)},75118,e=>{"use strict";let t=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(" "),r=/^on[A-Z]/;function n(...e){let i={};for(let n of e){for(let e in i){if(r.test(e)&&"function"==typeof i[e]&&"function"==typeof n[e]){i[e]=function(...e){return function(...t){e.forEach(e=>e?.(...t))}}(i[e],n[e]);continue}if("className"===e||"class"===e){i[e]=t(i[e],n[e]);continue}if("style"===e){i[e]=Object.assign({},i[e]??{},n[e]??{});continue}i[e]=void 0!==n[e]?n[e]:i[e]}for(let e in n)void 0===i[e]&&(i[e]=n[e])}return i}e.s(["mergeProps",()=>n],75118)},6251,e=>{"use strict";var t=e.i(64789);function r(e={}){let{name:n,strict:i=!0,hookName:o="useContext",providerName:a="Provider",errorMessage:s,defaultValue:l}=e,u=(0,t.createContext)(l);return u.displayName=n,[u.Provider,function e(){let r=(0,t.useContext)(u);if(!r&&i){let t=Error(s??`${o} returned \`undefined\`. Seems you forgot to wrap component within ${a}`);throw t.name="ContextError",Error.captureStackTrace?.(t,e),t}return r},u]}e.s(["createContext",()=>r])},30852,e=>{"use strict";let t=Object.freeze({}),r=Object.freeze({});e.s(["EMPTY_SLOT_STYLES",()=>r,"EMPTY_STYLES",()=>t])},742,(e,t,r)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case h:case a:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case m:case u:return e;default:return t}}case o:return t}}}function C(e){return _(e)===h}r.AsyncMode=d,r.ConcurrentMode=h,r.ContextConsumer=c,r.ContextProvider=u,r.Element=i,r.ForwardRef=f,r.Fragment=a,r.Lazy=v,r.Memo=m,r.Portal=o,r.Profiler=l,r.StrictMode=s,r.Suspense=p,r.isAsyncMode=function(e){return C(e)||_(e)===d},r.isConcurrentMode=C,r.isContextConsumer=function(e){return _(e)===c},r.isContextProvider=function(e){return _(e)===u},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},r.isForwardRef=function(e){return _(e)===f},r.isFragment=function(e){return _(e)===a},r.isLazy=function(e){return _(e)===v},r.isMemo=function(e){return _(e)===m},r.isPortal=function(e){return _(e)===o},r.isProfiler=function(e){return _(e)===l},r.isStrictMode=function(e){return _(e)===s},r.isSuspense=function(e){return _(e)===p},r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===h||e===l||e===s||e===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===x||e.$$typeof===w||e.$$typeof===b)},r.typeOf=_},27142,(e,t,r)=>{"use strict";t.exports=e.r(742)},5927,(e,t,r)=>{"use strict";var n=e.r(27142),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function e(t,r,n){if("string"!=typeof r){if(p){var i=f(r);i&&i!==p&&e(t,i,n)}var a=c(r);d&&(a=a.concat(d(r)));for(var s=l(t),g=l(r),m=0;m<a.length;++m){var v=a[m];if(!o[v]&&!(n&&n[v])&&!(g&&g[v])&&!(s&&s[v])){var b=h(r,v);try{u(t,v,b)}catch(e){}}}}return t}},70606,31346,3172,30330,36650,68670,37358,11006,2939,92877,e=>{"use strict";function t(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var r,n=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=t(function(e){return n.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)});e.s(["default",()=>i],70606);var o=e.i(64789),a=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t));var t,r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),s=Math.abs,l=String.fromCharCode,u=Object.assign;function c(e,t,r){return e.replace(t,r)}function d(e,t){return e.indexOf(t)}function h(e,t){return 0|e.charCodeAt(t)}function f(e,t,r){return e.slice(t,r)}function p(e){return e.length}function g(e,t){return t.push(e),e}var m=1,v=1,b=0,y=0,x=0,w="";function _(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:m,column:v,length:a,return:""}}function C(e,t){return u(_("",null,null,"",null,null,0),e,{length:-e.length},t)}function k(){return x=y<b?h(w,y++):0,v++,10===x&&(v=1,m++),x}function S(){return h(w,y)}function E(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function O(e){return m=v=1,b=p(w=e),y=0,[]}function I(e){var t,r;return(t=y-1,r=function e(t){for(;k();)switch(x){case t:return y;case 34:case 39:34!==t&&39!==t&&e(x);break;case 40:41===t&&e(t);break;case 92:k()}return y}(91===e?e+2:40===e?e+1:e),f(w,t,r)).trim()}var P="-ms-",T="-moz-",R="-webkit-",A="comm",M="rule",N="decl",D="@keyframes";function L(e,t){for(var r="",n=e.length,i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function V(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case N:return e.return=e.return||e.value;case A:return"";case D:return e.return=e.value+"{"+L(e.children,n)+"}";case M:e.value=e.props.join(",")}return p(r=L(e.children,n))?e.return=e.value+"{"+r+"}":""}function F(e,t,r,n,i,o,a,l,u,d,h){for(var p=i-1,g=0===i?o:[""],m=g.length,v=0,b=0,y=0;v<n;++v)for(var x=0,w=f(e,p+1,p=s(b=a[v])),C=e;x<m;++x)(C=(b>0?g[x]+" "+w:c(w,/&\f/g,g[x])).trim())&&(u[y++]=C);return _(e,t,r,0===i?M:l,u,d,h)}function j(e,t,r,n){return _(e,t,r,N,f(e,0,n),f(e,n+1,-1),n)}var z=function(e){var t=new WeakMap;return function(r){if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n}};e.s(["default",()=>z],31346);var B=function(e,t,r){for(var n=0,i=0;n=i,i=S(),38===n&&12===i&&(t[r]=1),!E(i);)k();return f(w,e,y)},H=function(e,t){var r=-1,n=44;do switch(E(n)){case 0:38===n&&12===S()&&(t[r]=1),e[r]+=B(y-1,t,r);break;case 2:e[r]+=I(n);break;case 4:if(44===n){e[++r]=58===S()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=l(n)}while(n=k())return e},W=function(e,t){var r;return r=H(O(e),t),w="",r},U=new WeakMap,$=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||U.get(r))&&!n){U.set(e,!0);for(var i=[],o=W(t,i),a=r.props,s=0,l=0;s<o.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[u]):a[u]+" "+o[s]}}},q=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},G=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case N:e.return=function e(t,r){switch(45^h(t,0)?(((r<<2^h(t,0))<<2^h(t,1))<<2^h(t,2))<<2^h(t,3):0){case 5103:return R+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return R+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return R+t+T+t+P+t+t;case 6828:case 4268:return R+t+P+t+t;case 6165:return R+t+P+"flex-"+t+t;case 5187:return R+t+c(t,/(\w+).+(:[^]+)/,R+"box-$1$2"+P+"flex-$1$2")+t;case 5443:return R+t+P+"flex-item-"+c(t,/flex-|-self/,"")+t;case 4675:return R+t+P+"flex-line-pack"+c(t,/align-content|flex-|-self/,"")+t;case 5548:return R+t+P+c(t,"shrink","negative")+t;case 5292:return R+t+P+c(t,"basis","preferred-size")+t;case 6060:return R+"box-"+c(t,"-grow","")+R+t+P+c(t,"grow","positive")+t;case 4554:return R+c(t,/([^-])(transform)/g,"$1"+R+"$2")+t;case 6187:return c(c(c(t,/(zoom-|grab)/,R+"$1"),/(image-set)/,R+"$1"),t,"")+t;case 5495:case 3959:return c(t,/(image-set\([^]*)/,R+"$1$`$1");case 4968:return c(c(t,/(.+:)(flex-)?(.*)/,R+"box-pack:$3"+P+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+R+t+t;case 4095:case 3583:case 4068:case 2532:return c(t,/(.+)-inline(.+)/,R+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(p(t)-1-r>6)switch(h(t,r+1)){case 109:if(45!==h(t,r+4))break;case 102:return c(t,/(.+:)(.+)-([^]+)/,"$1"+R+"$2-$3$1"+T+(108==h(t,r+3)?"$3":"$2-$3"))+t;case 115:return~d(t,"stretch")?e(c(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(115!==h(t,r+1))break;case 6444:switch(h(t,p(t)-3-(~d(t,"!important")&&10))){case 107:return c(t,":",":"+R)+t;case 101:return c(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+R+(45===h(t,14)?"inline-":"")+"box$3$1"+R+"$2$3$1"+P+"$2box$3")+t}break;case 5936:switch(h(t,r+11)){case 114:return R+t+P+c(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return R+t+P+c(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return R+t+P+c(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return R+t+P+t+t}return t}(e.value,e.length);break;case D:return L([C(e,{value:c(e.value,"@","@"+R)})],n);case M:if(e.length){var i,o;return i=e.props,o=function(t){var r;switch(r=t,(r=/(::plac\w+|:read-\w+)/.exec(r))?r[0]:r){case":read-only":case":read-write":return L([C(e,{props:[c(t,/:(read-\w+)/,":"+T+"$1")]})],n);case"::placeholder":return L([C(e,{props:[c(t,/:(plac\w+)/,":"+R+"input-$1")]}),C(e,{props:[c(t,/:(plac\w+)/,":"+T+"$1")]}),C(e,{props:[c(t,/:(plac\w+)/,P+"input-$1")]})],n)}return""},i.map(o).join("")}}}],K=function(e){var t,r,n,i,o,s=e.key;if("css"===s){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var b=e.stylisPlugins||G,C={},P=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+s+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)C[t[r]]=!0;P.push(e)});var T=(r=(t=[$,q].concat(b,[V,(n=function(e){o.insert(e)},function(e){!e.root&&(e=e.return)&&n(e)})])).length,function(e,n,i,o){for(var a="",s=0;s<r;s++)a+=t[s](e,n,i,o)||"";return a}),R=function(e){var t,r;return L((r=function e(t,r,n,i,o,a,s,u,b){for(var C,O=0,P=0,T=s,R=0,M=0,N=0,D=1,L=1,V=1,z=0,B="",H=o,W=a,U=i,$=B;L;)switch(N=z,z=k()){case 40:if(108!=N&&58==h($,T-1)){-1!=d($+=c(I(z),"&","&\f"),"&\f")&&(V=-1);break}case 34:case 39:case 91:$+=I(z);break;case 9:case 10:case 13:case 32:$+=function(e){for(;x=S();)if(x<33)k();else break;return E(e)>2||E(x)>3?"":" "}(N);break;case 92:$+=function(e,t){for(var r;--t&&k()&&!(x<48)&&!(x>102)&&(!(x>57)||!(x<65))&&(!(x>70)||!(x<97)););return r=y+(t<6&&32==S()&&32==k()),f(w,e,r)}(y-1,7);continue;case 47:switch(S()){case 42:case 47:g((C=function(e,t){for(;k();)if(e+x===57)break;else if(e+x===84&&47===S())break;return"/*"+f(w,t,y-1)+"*"+l(47===e?e:k())}(k(),y),_(C,r,n,A,l(x),f(C,2,-2),0)),b);break;default:$+="/"}break;case 123*D:u[O++]=p($)*V;case 125*D:case 59:case 0:switch(z){case 0:case 125:L=0;case 59+P:-1==V&&($=c($,/\f/g,"")),M>0&&p($)-T&&g(M>32?j($+";",i,n,T-1):j(c($," ","")+";",i,n,T-2),b);break;case 59:$+=";";default:if(g(U=F($,r,n,O,P,o,u,B,H=[],W=[],T),a),123===z)if(0===P)e($,r,U,U,H,a,T,u,W);else switch(99===R&&110===h($,3)?100:R){case 100:case 108:case 109:case 115:e(t,U,U,i&&g(F(t,U,U,0,0,o,u,B,o,H=[],T),W),o,W,T,u,i?H:W);break;default:e($,U,U,U,[""],W,0,u,W)}}O=P=M=0,D=V=1,B=$="",T=s;break;case 58:T=1+p($),M=N;default:if(D<1){if(123==z)--D;else if(125==z&&0==D++&&125==(x=y>0?h(w,--y):0,v--,10===x&&(v=1,m--),x))continue}switch($+=l(z),z*D){case 38:V=P>0?1:($+="\f",-1);break;case 44:u[O++]=(p($)-1)*V,V=1;break;case 64:45===S()&&($+=I(k())),R=S(),P=T=p(B=$+=function(e){for(;!E(S());)k();return f(w,e,y)}(y)),z++;break;case 45:45===N&&2==p($)&&(D=0)}}return a}("",null,null,null,[""],t=O(t=e),0,[0],t),w="",r),T)},M={key:s,sheet:new a({key:s,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:C,registered:{},insert:function(e,t,r,n){o=r,R(e?e+"{"+t.styles+"}":t.styles),n&&(M.inserted[t.name]=!0)}};return M.sheet.hydrate(P),M};function Y(){return(Y=Object.assign.bind()).apply(null,arguments)}function X(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")}),n}e.s(["default",()=>K],3172),e.s(["default",()=>Y],30330),e.i(5927);var Q=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},Z=function(e,t,r){Q(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next;while(void 0!==i)}};e.s(["getRegisteredStyles",()=>X,"insertStyles",()=>Z,"registerStyles",()=>Q],36650);var J={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ee=/[A-Z]|^ms/g,et=/_EMO_([^_]+?)_([^]*?)_EMO_/g,er=function(e){return 45===e.charCodeAt(1)},en=function(e){return null!=e&&"boolean"!=typeof e},ei=t(function(e){return er(e)?e:e.replace(ee,"-$&").toLowerCase()}),eo=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(et,function(e,t,n){return r={name:t,styles:n,next:r},t})}return 1===J[e]||er(e)||"number"!=typeof t||0===t?t:t+"px"};function ea(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return r={name:n.name,styles:n.styles,next:r},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)r={name:i.name,styles:i.styles,next:r},i=i.next;return n.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=ea(e,t,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=o+"{"+t[a]+"}":en(a)&&(n+=ei(o)+":"+eo(o,a)+";");else if(Array.isArray(a)&&"string"==typeof a[0]&&(null==t||void 0===t[a[0]]))for(var s=0;s<a.length;s++)en(a[s])&&(n+=ei(o)+":"+eo(o,a[s])+";");else{var l=ea(e,t,a);switch(o){case"animation":case"animationName":n+=ei(o)+":"+l+";";break;default:n+=o+"{"+l+"}"}}}return n}(e,t,n);case"function":if(void 0!==e){var o=r,a=n(e);return r=o,ea(e,t,a)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var es=/label:\s*([^\s;{]+)\s*(;|$)/g;function el(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i,o=!0,a="";r=void 0;var s=e[0];null==s||void 0===s.raw?(o=!1,a+=ea(n,t,s)):a+=s[0];for(var l=1;l<e.length;l++)a+=ea(n,t,e[l]),o&&(a+=s[l]);es.lastIndex=0;for(var u="";null!==(i=es.exec(a));)u+="-"+i[1];return{name:function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))*0x5bd1e995+((t>>>16)*59797<<16),t^=t>>>24,r=(65535&t)*0x5bd1e995+((t>>>16)*59797<<16)^(65535&r)*0x5bd1e995+((r>>>16)*59797<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r^=255&e.charCodeAt(n),r=(65535&r)*0x5bd1e995+((r>>>16)*59797<<16)}return r^=r>>>13,(((r=(65535&r)*0x5bd1e995+((r>>>16)*59797<<16))^r>>>15)>>>0).toString(36)}(a)+u,styles:a,next:r}}e.s(["serializeStyles",()=>el],68670);var eu=!!o.useInsertionEffect&&o.useInsertionEffect,ec=eu||function(e){return e()},ed=eu||o.useLayoutEffect;e.s(["useInsertionEffectAlwaysWithSyncFallback",()=>ec,"useInsertionEffectWithLayoutFallback",()=>ed],37358);var eh=o.createContext("undefined"!=typeof HTMLElement?K({key:"css"}):null),ef=eh.Provider,ep=function(e){return(0,o.forwardRef)(function(t,r){return e(t,(0,o.useContext)(eh),r)})},eg=o.createContext({}),em={}.hasOwnProperty,ev="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",eb=function(e,t){var r={};for(var n in t)em.call(t,n)&&(r[n]=t[n]);return r[ev]=e,r},ey=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return Q(t,r,n),ec(function(){return Z(t,r,n)}),null},ex=ep(function(e,t,r){var n=e.css;"string"==typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var i=e[ev],a=[n],s="";"string"==typeof e.className?s=X(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=el(a,void 0,o.useContext(eg));s+=t.key+"-"+l.name;var u={};for(var c in e)em.call(e,c)&&"css"!==c&&c!==ev&&(u[c]=e[c]);return u.className=s,r&&(u.ref=r),o.createElement(o.Fragment,null,o.createElement(ey,{cache:t,serialized:l,isStringTag:"string"==typeof i}),o.createElement(i,u))});e.s(["C",()=>ef,"E",()=>ex,"T",()=>eg,"c",()=>eb,"h",()=>em,"i",()=>!1,"w",()=>ep],11006),e.s(["withEmotionCache",()=>ep],2939),e.s(["ThemeContext",()=>eg],92877)},5768,81918,e=>{"use strict";var t,r,n=e.i(64789);let i=parseInt(n.version.split(".")[0],10)>=19;function o(e,t){if(null!=e){if("function"==typeof e)return e(t);try{e.current=t}catch(r){throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function a(...e){let t=e.filter(e=>null!=e);if(!i)return e=>{t.forEach(t=>{o(t,e)})};{let e=new Map;return r=>(t.forEach(t=>{let n=o(t,r);n&&e.set(t,n)}),()=>{t.forEach(t=>{let r=e.get(t);r&&"function"==typeof r?r():o(t,null)}),e.clear()})}}e.s(["mergeRefs",()=>a],5768);var s=e.i(11006),l=e.i(36650),u=e.i(37358),c=e.i(68670);e.i(3172),e.i(30330),e.i(31346),e.i(5927);var d=function(e,t){var r=arguments;if(null==t||!s.h.call(t,"css"))return n.createElement.apply(void 0,r);var i=r.length,o=Array(i);o[0]=s.E,o[1]=(0,s.c)(e,t);for(var a=2;a<i;a++)o[a]=r[a];return n.createElement.apply(null,o)};t=d||(d={}),r||(r=t.JSX||(t.JSX={}));var h=(0,s.w)(function(e,t){var r=e.styles,i=(0,c.serializeStyles)([r],void 0,n.useContext(s.T)),o=n.useRef();return(0,u.useInsertionEffectWithLayoutFallback)(function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,a=document.querySelector('style[data-emotion="'+e+" "+i.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==a&&(n=!0,a.setAttribute("data-emotion",e),r.hydrate([a])),o.current=[r,n],function(){r.flush()}},[t]),(0,u.useInsertionEffectWithLayoutFallback)(function(){var e=o.current,r=e[0];if(e[1]){e[1]=!1;return}if(void 0!==i.next&&(0,l.insertStyles)(t,i.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",i,r,!1)},[t,i.name]),null});function f(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,c.serializeStyles)(t)}function p(){var e=f.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}e.s(["Global",()=>h,"css",()=>f,"jsx",()=>d,"keyframes",()=>p],81918)},5376,4366,6210,52992,14138,13969,41344,e=>{"use strict";e.i(48962);var t,r=e.i(15839),n=e.i(70606),i=e.i(2939),o=e.i(92877),a=e.i(68670),s=e.i(37358),l=e.i(36650),u=e.i(64789),c=e.i(75118),d=e.i(5768),h=e.i(81918);let[f,p]=(0,e.i(6251).createContext)({name:"ChakraContext",strict:!0,providerName:"<ChakraProvider />"});function g(e){let{value:t,children:n}=e;return(0,r.jsxs)(f,{value:t,children:[!t._config.disableLayers&&(0,r.jsx)(h.Global,{styles:t.layers.atRule}),(0,r.jsx)(h.Global,{styles:t._global}),n]})}e.s(["ChakraProvider",()=>g,"useChakraContext",()=>p],4366);let m=e=>null!=e&&"object"==typeof e&&!Array.isArray(e),v=e=>"string"==typeof e,b=e=>"function"==typeof e;e.s(["isFunction",()=>b,"isObject",()=>m,"isString",()=>v],6210);let y=(e,t)=>{let r=b(t)?t:e=>t.includes(e),n={},i={};for(let t of Object.keys(e))r(t)?i[t]=e[t]:n[t]=e[t];return[i,n]};e.s(["splitProps",()=>y],52992);let x=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]),w=(...e)=>Array.from(e.reduce((e,t)=>(null!=t&&t.forEach(t=>e.add(t)),e),new Set([])));function _(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}e.s(["uniq",()=>w],14138),e.s(["compact",()=>_],13969);let C=(...e)=>e.filter(Boolean).map(e=>e.trim()).join(" ");e.s(["cx",()=>C],41344);let k=(t=n.default).default||t,S=e=>"theme"!==e,E="undefined"!=typeof document,O=({cache:e,serialized:t,isStringTag:n})=>{(0,l.registerStyles)(e,t,n);let i=(0,s.useInsertionEffectAlwaysWithSyncFallback)(()=>(0,l.insertStyles)(e,t,n));if(!E&&void 0!==i){let n=t.name,o=t.next;for(;void 0!==o;)n=C(n,o.name),o=o.next;return(0,r.jsx)("style",{...{"data-emotion":C(e.key,n),dangerouslySetInnerHTML:{__html:i},nonce:e.sheet.nonce}})}return null},I={path:["d"],text:["x","y"],circle:["cx","cy","r"],rect:["width","height","x","y","rx","ry"],ellipse:["cx","cy","rx","ry"],g:["transform"],stop:["offset","stopOpacity"]},P=((e,t={},n={})=>{let s,h;if(Object.prototype.hasOwnProperty.call(I,e)){n.forwardProps||(n.forwardProps=[]);let t=I[e];n.forwardProps=w([...n.forwardProps,...t])}let f=e.__emotion_real===e,g=f&&e.__emotion_base||e;void 0!==n&&(s=n.label,h=n.target);let m=[],b=(0,i.withEmotionCache)((i,s,b)=>{let w,{cva:E,isValidProperty:I}=p(),P=t.__cva__?t:E(t),T=A(e.__emotion_cva,P);!n.shouldForwardProp&&n.forwardProps&&(w=n.forwardProps,n.shouldForwardProp=(e,t)=>!!w.includes(e)||!t?.includes(e)&&!I(e));let R=((e,t,r)=>{let n;if(t){let r=t.shouldForwardProp;n=e.__emotion_forwardProp&&r?t=>e.__emotion_forwardProp(t)&&r(t):r}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n})(e,n,f)||((t,r)=>{let n="string"==typeof e&&e.charCodeAt(0)>96?k:S,i=!r?.includes(t)&&!I(t);return n(t)&&i}),{props:M,styles:N}=function(e,t,r){let{css:n,isValidProperty:i}=p(),{children:o,...a}=e,s=(0,u.useMemo)(()=>{let[e,n]=y(a,e=>r(e,t.variantKeys)),[o,s]=y(n,t.variantKeys),[l,u]=y(s,i);return{forwardedProps:e,variantProps:o,styleProps:l,elementProps:u}},[t.variantKeys,r,a,i]),{css:l,...c}=s.styleProps,d=(0,u.useMemo)(()=>{let e={...s.variantProps},r=t.variantKeys.includes("colorPalette"),n=t.variantKeys.includes("orientation");return r||(e.colorPalette=a.colorPalette),n||(e.orientation=a.orientation),t(e)},[t,s.variantProps,a.colorPalette,a.orientation]);return{styles:(0,u.useMemo)(()=>{let e;return n(d,...(Array.isArray(e=l)?e:[e]).filter(Boolean).flat(),c)},[n,d,l,c]),props:{...s.forwardedProps,...s.elementProps,children:o}}}(u.useMemo(()=>Object.assign({},n.defaultProps,_(i)),[i]),T,R),D="",L=[N],V=M;if(null==M.theme){for(let e in V={},M)V[e]=M[e];V.theme=u.useContext(o.ThemeContext)}"string"==typeof M.className?D=(0,l.getRegisteredStyles)(s.registered,L,M.className):null!=M.className&&(D=C(D,M.className));let F=(0,a.serializeStyles)(m.concat(L),s.registered,V);F.styles&&(D=C(D,`${s.key}-${F.name}`)),void 0!==h&&(D=C(D,h));let j=!R("as"),z=j&&M.as||g,B={};for(let e in M)if(!j||"as"!==e){if("string"==typeof e&&x.has(e)){B[e.replace("html","").toLowerCase()]=M[e];continue}R(e)&&(B[e]=M[e])}let H=D.trim();H?B.className=H:Reflect.deleteProperty(B,"className"),B.ref=b;let W=n.forwardAsChild||n.forwardProps?.includes("asChild");if(M.asChild&&!W){let e,t=u.isValidElement(M.children)?u.Children.only(M.children):u.Children.toArray(M.children).find(u.isValidElement);if(!t)throw Error("[chakra-ui > factory] No valid child found");z=t.type,B.children=null,Reflect.deleteProperty(B,"asChild"),(B=(0,c.mergeProps)(B,t.props)).ref=(0,d.mergeRefs)(b,!v(e=u.version)||e.startsWith("18.")?t?.ref:t?.props?.ref)}return B.as&&W?(B.as=void 0,(0,r.jsxs)(u.Fragment,{children:[(0,r.jsx)(O,{cache:s,serialized:F,isStringTag:"string"==typeof z}),(0,r.jsx)(z,{asChild:!0,...B,children:(0,r.jsx)(M.as,{children:B.children})})]})):(0,r.jsxs)(u.Fragment,{children:[(0,r.jsx)(O,{cache:s,serialized:F,isStringTag:"string"==typeof z}),(0,r.jsx)(z,{...B})]})});return b.displayName=void 0!==s?s:`chakra(${"string"==typeof g?g:g.displayName||g.name||"Component"})`,b.__emotion_real=b,b.__emotion_base=g,b.__emotion_forwardProp=n.shouldForwardProp,b.__emotion_cva=t,Object.defineProperty(b,"toString",{value:()=>`.${h}`}),b}).bind(),T=new Map,R=new Proxy(P,{apply:(e,t,r)=>P(...r),get:(e,t)=>(T.has(t)||T.set(t,P(t)),T.get(t))}),A=(e,t)=>e&&!t?e:!e&&t?t:e.merge(t);e.s(["chakra",()=>R],5376)},30315,90819,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(6251),i=e.i(75118),o=e.i(30852),a=e.i(5376),s=e.i(4366);function l(e){let{key:t,recipe:n}=e,i=(0,s.useChakraContext)();return(0,r.useMemo)(()=>{let e=n||(null!=t?i.getRecipe(t):{});return i.cva(structuredClone(e))},[t,n,i])}e.s(["useRecipe",()=>l],90819);var u=e.i(41344);function c(e){let s,{key:c,recipe:d}=e,h=(s=c||d.className||"Component").charAt(0).toUpperCase()+s.slice(1),[f,p]=(0,n.createContext)({strict:!1,name:`${h}PropsContext`,providerName:`${h}PropsContext`});function g(e){let{unstyled:t,...n}=e,i=l({key:c,recipe:n.recipe||d}),[a,s]=(0,r.useMemo)(()=>i.splitVariantProps(n),[i,n]);return{styles:t?o.EMPTY_STYLES:i(a),className:i.className,props:s}}return{withContext:(e,n)=>{let o=(0,a.chakra)(e,{},n),s=(0,r.forwardRef)((e,n)=>{let a=p(),s=(0,r.useMemo)(()=>(0,i.mergeProps)(a,e),[e,a]),{styles:l,className:c,props:d}=g(s);return(0,t.jsx)(o,{...d,ref:n,css:[l,s.css],className:(0,u.cx)(c,s.className)})});return s.displayName=e.displayName||e.name,s},PropsProvider:f,withPropsProvider:function(){return f},usePropsContext:p,useRecipeResult:g}}e.s(["createRecipeContext",()=>c],30315)},59760,62090,36099,76184,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(75118),i=e.i(30315),o=e.i(5376);let a=(0,o.chakra)("span");a.displayName="Span",e.s(["Span",()=>a],62090);let{withContext:s,PropsProvider:l}=(0,i.createRecipeContext)({key:"spinner"}),u=s("span");u.displayName="Spinner",e.s(["Spinner",()=>u],36099);let c=(0,o.chakra)("div",{base:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},variants:{axis:{horizontal:{insetStart:"50%",translate:"-50%",_rtl:{translate:"50%"}},vertical:{top:"50%",translate:"0 -50%"},both:{insetStart:"50%",top:"50%",translate:"-50% -50%",_rtl:{translate:"50% -50%"}}}},defaultVariants:{axis:"both"}});c.displayName="AbsoluteCenter";let d=r.forwardRef(function(e,r){let{spinner:n=(0,t.jsx)(u,{size:"inherit",borderWidth:"0.125em",color:"inherit"}),spinnerPlacement:i="start",children:o,text:s,visible:l=!0,...d}=e;return l?s?(0,t.jsxs)(a,{ref:r,display:"contents",...d,children:["start"===i&&n,s,"end"===i&&n]}):n?(0,t.jsxs)(a,{ref:r,display:"contents",...d,children:[(0,t.jsx)(c,{display:"inline-flex",children:n}),(0,t.jsx)(a,{visibility:"hidden",display:"contents",children:o})]}):(0,t.jsx)(a,{ref:r,display:"contents",...d,children:o}):o});d.displayName="Loader";var h=e.i(41344);let f=e=>e?"":void 0;e.s(["dataAttr",()=>f],76184);let{useRecipeResult:p,PropsProvider:g,usePropsContext:m}=(0,i.createRecipeContext)({key:"button"}),v=(0,r.forwardRef)(function(e,i){let a=m(),s=(0,r.useMemo)(()=>(0,n.mergeProps)(a,e),[a,e]),l=p(s),{loading:u,loadingText:c,children:g,spinner:v,spinnerPlacement:b,...y}=l.props;return(0,t.jsx)(o.chakra.button,{type:"button",ref:i,...y,"data-loading":f(u),disabled:u||y.disabled,className:(0,h.cx)(l.className,s.className),css:[l.styles,s.css],children:!s.asChild&&u?(0,t.jsx)(d,{spinner:v,text:c,spinnerPlacement:b,children:g}):g})});v.displayName="Button",e.s(["Button",()=>v,"ButtonPropsProvider",()=>g],59760)},19284,e=>{"use strict";var t=e.i(15839),r=e.i(5376);let n=e=>(0,t.jsx)(r.chakra.svg,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),i=e=>(0,t.jsx)(r.chakra.svg,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,t.jsx)("path",{d:"m6 9 6 6 6-6"})}),o=e=>(0,t.jsx)(r.chakra.svg,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,t.jsx)("path",{d:"m9 18 6-6-6-6"})}),a=e=>(0,t.jsxs)(r.chakra.svg,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,t.jsx)("circle",{cx:"19",cy:"12",r:"1"}),(0,t.jsx)("circle",{cx:"5",cy:"12",r:"1"})]}),s=e=>(0,t.jsx)(r.chakra.svg,{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11.0026 16L6.75999 11.7574L8.17421 10.3431L11.0026 13.1716L16.6595 7.51472L18.0737 8.92893L11.0026 16Z"})}),l=e=>(0,t.jsx)(r.chakra.svg,{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})}),u=e=>(0,t.jsx)(r.chakra.svg,{viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",...e,children:(0,t.jsx)("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})}),c=e=>(0,t.jsx)(r.chakra.svg,{viewBox:"0 0 24 24",fill:"currentColor",...e,children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z"})});e.s(["CheckCircleIcon",()=>s,"CheckIcon",()=>n,"ChevronDownIcon",()=>i,"ChevronRightIcon",()=>o,"CloseIcon",()=>c,"EllpsisIcon",()=>a,"InfoIcon",()=>u,"WarningIcon",()=>l])},88076,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(59760);let i=(0,r.forwardRef)(function(e,r){return(0,t.jsx)(n.Button,{px:"0",py:"0",_icon:{fontSize:"1.2em"},ref:r,...e})});i.displayName="IconButton",e.s(["IconButton",()=>i])},29801,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(19284),i=e.i(88076);let o=r.forwardRef(function(e,r){return(0,t.jsx)(i.IconButton,{variant:"ghost","aria-label":"Close",ref:r,...e,children:e.children??(0,t.jsx)(n.CloseIcon,{})})});o.displayName="CloseButton",e.s(["CloseButton",()=>o])},65283,13074,e=>{"use strict";e.s([],65283),e.s([],13074)},52713,58287,92109,24074,e=>{"use strict";let t;e.i(48962);var r,n,i=Object.defineProperty,o=e=>{throw TypeError(e)},a=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?i(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},s=(e,t,r)=>(t.has(e)||o("Cannot read from private field"),t.get(e));function l(e){return null==e?[]:Array.isArray(e)?e:[e]}var u=e=>e[0],c=e=>e[e.length-1],d=(e,...t)=>e.concat(t),h=(e,...t)=>e.filter(e=>!t.includes(e)),f=(e,t)=>e.filter((e,r)=>r!==t),p=e=>Array.from(new Set(e)),g=(e,t)=>{let r=new Set(t);return e.filter(e=>!r.has(e))},m=(e,t)=>-1!==e.indexOf(t)?h(e,t):d(e,t);function v(e,t,r={}){let{step:n=1,loop:i=!0}=r,o=t+n,a=e.length,s=a-1;return -1===t?n>0?0:s:o<0?i?s:0:o>=a?i?0:t>a?a:t:o}function b(e,t,r={}){return e[v(e,t,r)]}function y(e,t,r={}){let{step:n=1,loop:i=!0}=r;return v(e,t,{step:-n,loop:i})}function x(e,t,r={}){return e[y(e,t,r)]}function w(e,t){return e.reduce((e,r,n)=>(n%t==0?e.push([r]):c(e)?.push(r),e),[])}function _(e,t){return e.reduce(([e,r],n)=>(t(n)?e.push(n):r.push(n),[e,r]),[[],[]])}var C=e=>e?.constructor.name==="Array",k=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof e?.isEqual&&"function"==typeof t?.isEqual)return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(C(e)&&C(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!k(e[r],t[r]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;let r=Object.keys(t??Object.create(null)),n=r.length;for(let t=0;t<n;t++)if(!Reflect.has(e,r[t]))return!1;for(let i=0;i<n;i++){let n=r[i];if(!k(e[n],t[n]))return!1}return!0},S=e=>Array.isArray(e),E=e=>!0===e||!1===e,O=e=>null!=e&&"object"==typeof e,I=e=>O(e)&&!S(e),P=e=>"number"==typeof e&&!Number.isNaN(e),T=e=>"string"==typeof e,R=e=>"function"==typeof e,A=e=>null==e,M=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),N=Function.prototype.toString,D=N.call(Object),L=(e,...t)=>("function"==typeof e?e(...t):e)??void 0,V=e=>e,F=e=>e(),j=()=>{},z=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},B=(t=0,()=>(t++,t.toString(36)));function H(e,t,...r){if(e in t){let n=t[e];return R(n)?n(...r):n}let n=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(n,H),n}var W=(e,t)=>{try{return e()}catch(e){return e instanceof Error&&Error.captureStackTrace?.(e,W),t?.()}},{floor:U,abs:$,round:q,min:G,max:K,pow:Y,sign:X}=Math,Q=e=>Number.isNaN(e)?0:e,Z=(e,t)=>(e%t+t)%t,J=(e,t)=>(e%t+t)%t,ee=(e,t)=>Q(e)>=t,et=(e,t)=>Q(e)<=t,er=(e,t,r)=>{let n=Q(e);return(null==t||n>=t)&&(null==r||n<=r)},en=(e,t,r)=>G(K(Q(e),t),r),ei=(e,t,r)=>(Q(e)-t)/(r-t),eo=(e,t,r,n)=>{let i;return en((i=e*(r-t)+t,q((Q(i)-t)/n)*n+t),t,r)},ea=(e,t)=>{let r=e,n=t.toString(),i=n.indexOf("."),o=i>=0?n.length-i:0;if(o>0){let e=Y(10,o);r=q(r*e)/e}return r},es=(e,t)=>"number"==typeof t?U(e*t+.5)/t:q(e),el=(e,t,r,n)=>{let i=null!=t?Number(t):0,o=Number(r),a=(e-i)%n,s=2*$(a)>=n?e+X(a)*(n-$(a)):e-a;if(s=ea(s,n),!Number.isNaN(i)&&s<i)s=i;else if(!Number.isNaN(o)&&s>o){let e=U((o-i)/n),t=i+e*n;s=e<=0||t<i?o:t}return ea(s,n)},eu=(e,t,r)=>e[t]===r?e:[...e.slice(0,t),r,...e.slice(t+1)];function ec(e,t){let r,n,i,o,a=(r=t.values,n=t.min,0===e?n:r[e-1]),s=(i=t.values,o=t.max,e===i.length-1?o:i[e+1]),l=t.values.slice();return function(r){let n=el(r,a,s,t.step);return(l=eu(l,e,r))[e]=n,l}}function ed(e,t){let r=t.values[e]+t.step;return ec(e,t)(r)}function eh(e,t){let r=t.values[e]-t.step;return ec(e,t)(r)}var ef=(e,t,r,n)=>e.map((i,o)=>({min:0===o?t:e[o-1]+n,max:o===e.length-1?r:e[o+1]-n,value:i})),ep=(e,t)=>{let[r,n]=e,[i,o]=t;return e=>r===n||i===o?i:i+(o-i)/(n-r)*(e-r)},eg=(e,t=0,r=10)=>{let n=Math.pow(r,t);return q(e*n)/n},em=e=>{if(!Number.isFinite(e))return 0;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r+=1;return r},ev=(e,t,r)=>{let n="+"===t?e+r:e-r;if(e%1!=0||r%1!=0){let i=10**Math.max(em(e),em(r));e=Math.round(e*i),r=Math.round(r*i),n=("+"===t?e+r:e-r)/i}return n},eb=(e,t)=>ev(Q(e),"+",t),ey=(e,t)=>ev(Q(e),"-",t),ex=e=>"number"==typeof e?`${e}px`:e;function ew(e,t){let r={};for(let n of t){let t=e[n];void 0!==t&&(r[n]=t)}return r}var e_=e=>function(t){let r={},n={},i=new Set(e);for(let e of Reflect.ownKeys(t))i.has(e)?n[e]=t[e]:r[e]=t[e];return[n,r]};function eC(e,t=Object.is){let r={...e},n=new Set,i=()=>{n.forEach(e=>e())};return{subscribe:e=>(n.add(e),()=>n.delete(e)),get:e=>r[e],set:(e,n)=>{t(r[e],n)||(r[e]=n,i())},update:e=>{let n=!1;for(let i in e){let o=e[i];void 0===o||t(r[i],o)||(r[i]=o,n=!0)}n&&i()},snapshot:()=>({...r})}}var ek=class{constructor(e){this.onTick=e,a(this,"frameId",null),a(this,"pausedAtMs",null),a(this,"context"),a(this,"cancelFrame",()=>{null!==this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),a(this,"setStartMs",e=>{this.context.startMs=e}),a(this,"start",()=>{if(null!==this.frameId)return;let e=performance.now();null!==this.pausedAtMs?(this.context.startMs+=e-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=e,this.frameId=requestAnimationFrame(s(this,n))}),a(this,"pause",()=>{null!==this.frameId&&(this.cancelFrame(),this.pausedAtMs=performance.now())}),a(this,"stop",()=>{null!==this.frameId&&(this.cancelFrame(),this.pausedAtMs=null)}),((e,t,r)=>t.has(e)?o("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r))(this,n,e=>{(this.context.now=e,this.context.deltaMs=e-this.context.startMs,!1===this.onTick(this.context))?this.stop():this.frameId=requestAnimationFrame(s(this,n))}),this.context={now:0,startMs:performance.now(),deltaMs:0}}get elapsedMs(){return null!==this.pausedAtMs?this.pausedAtMs-this.context.startMs:performance.now()-this.context.startMs}};function eS(e,t){let r=new ek(({deltaMs:r})=>{if(r>=t)return e(),!1});return r.start(),()=>r.stop()}function eE(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function eO(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function eI(e,t){if(null==e)throw Error(t())}function eP(e,t,r){let n=[];for(let r of t)null==e[r]&&n.push(r);if(n.length>0)throw Error(`[zag-js${r?` > ${r}`:""}] missing required props: ${n.join(", ")}`)}n=new WeakMap,e.s(["add",()=>d,"addOrRemove",()=>m,"callAll",()=>z,"cast",()=>V,"chunk",()=>w,"clampValue",()=>en,"compact",()=>function e(t){if(!(e=>{if(!O(e)||"[object Object]"!=Object.prototype.toString.call(e)||(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e||"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e))return!1;let t=Object.getPrototypeOf(e);if(null===t)return!0;let r=M(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&N.call(r)==D})(t)||void 0===t)return t;let r=Reflect.ownKeys(t).filter(e=>"string"==typeof e),n={};for(let i of r){let r=t[i];void 0!==r&&(n[i]=e(r))}return n},"createSplitProps",()=>e_,"createStore",()=>eC,"decrementValue",()=>ey,"diff",()=>g,"ensure",()=>eI,"ensureProps",()=>eP,"first",()=>u,"flatArray",()=>function e(t){return t.reduce((t,r)=>Array.isArray(r)?t.concat(e(r)):t.concat(r),[])},"getNextStepValue",()=>ed,"getPercentValue",()=>eo,"getPreviousStepValue",()=>eh,"getValuePercent",()=>ei,"getValueRanges",()=>ef,"getValueTransformer",()=>ep,"hasProp",()=>M,"identity",()=>F,"incrementValue",()=>eb,"invariant",()=>eO,"isArray",()=>S,"isBoolean",()=>E,"isEqual",()=>k,"isFunction",()=>R,"isNull",()=>A,"isNumber",()=>P,"isObject",()=>I,"isString",()=>T,"isValueAtMax",()=>ee,"isValueAtMin",()=>et,"isValueWithinRange",()=>er,"last",()=>c,"match",()=>H,"mod",()=>Z,"next",()=>b,"nextIndex",()=>v,"noop",()=>j,"partition",()=>_,"pick",()=>ew,"prev",()=>x,"prevIndex",()=>y,"remove",()=>h,"removeAt",()=>f,"roundToDpr",()=>es,"runIfFn",()=>L,"setRafTimeout",()=>eS,"setValueAtIndex",()=>eu,"snapValueToStep",()=>el,"toArray",()=>l,"toFixedNumber",()=>eg,"toPx",()=>ex,"tryCatch",()=>W,"uniq",()=>p,"uuid",()=>B,"warn",()=>eE,"wrap",()=>J],58287);var eT=Object.defineProperty,eR=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?eT(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r};function eA(e){if(!e)return!1;try{return 0===e.selectionStart&&0===e.selectionEnd}catch{return""===e.value}}function eM(e){if(!e)return;let t=e.selectionStart??0;0!==Math.abs((e.selectionEnd??0)-t)||0===t&&e.setSelectionRange(e.value.length,e.value.length)}var eN=e=>Math.max(0,Math.min(1,e)),eD=(...e)=>t=>e.reduce((e,t)=>t(e),t),eL=()=>void 0,eV=e=>"object"==typeof e&&null!==e,eF=e=>e?"":void 0,ej=e=>e?"true":void 0,ez=e=>eV(e)&&1===e.nodeType&&"string"==typeof e.nodeName,eB=e=>eV(e)&&9===e.nodeType,eH=e=>ez(e)?e.localName||"":"#document",eW=e=>eV(e)&&void 0!==e.nodeType&&11===e.nodeType&&"host"in e,eU=e=>!!e?.matches("a[href]");function e$(e){return!!e&&eQ(e.getRootNode())===e}var eq=/(textarea|select)/;function eG(e){if(null==e||!ez(e))return!1;try{return ez(e)&&"input"===e.localName&&null!=e.selectionStart||eq.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}function eK(e,t){if(!e||!t||!ez(e)||!ez(t))return!1;let r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&eW(r)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function eY(e){return eB(e)?e:eV(e)&&e===e.window?e.document:e?.ownerDocument??document}function eX(e){return eW(e)?eX(e.host):eB(e)?e.defaultView??window:ez(e)?e.ownerDocument?.defaultView??window:window}function eQ(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e&&e!==t)t=e;else break}return t}function eZ(e){let t;try{if(t=e.getRootNode({composed:!0}),eB(t)||eW(t))return t}catch{}return e.ownerDocument??document}var eJ=new WeakMap;function e0(e){return eJ.has(e)||eJ.set(e,eX(e).getComputedStyle(e)),eJ.get(e)}var e1=new Set(["menu","listbox","dialog","grid","tree","region"]),e2=e=>e1.has(e),e5=e=>e.getAttribute("aria-controls")?.split(" ")||[];function e3(e,t){let r=new Set,n=eZ(e),i=e=>{for(let o of e.querySelectorAll("[aria-controls]"))if("true"===o.getAttribute("aria-expanded"))for(let e of e5(o)){if(!e||r.has(e))continue;r.add(e);let o=n.getElementById(e);if(o){let e=o.getAttribute("role"),r="true"===o.getAttribute("aria-modal");if(e&&e2(e)&&!r&&(o===t||o.contains(t)||i(o)))return!0}}return!1};return i(e)}function e4(e,t){let r=eZ(e),n=new Set,i=e=>{for(let o of e.querySelectorAll("[aria-controls]"))if("true"===o.getAttribute("aria-expanded"))for(let e of e5(o)){if(!e||n.has(e))continue;n.add(e);let o=r.getElementById(e);if(o){let e=o.getAttribute("role"),r="true"===o.getAttribute("aria-modal");e&&e1.has(e)&&!r&&(t(o),i(o))}}};i(e)}function e6(e){let t=new Set;return e4(e,r=>{e.contains(r)||t.add(r)}),Array.from(t)}function e8(e){return!!e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")||!!e.querySelector?.('[aria-controls][aria-expanded="true"]')}function e7(e){let t;if(!e.id)return!1;let r=eZ(e),n=CSS.escape(e.id),i=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(r.querySelector(i)&&(t=e.getAttribute("role"))&&e1.has(t))}function e9(e,t){let{type:r,quality:n=.92,background:i}=t;if(!e)throw Error("[zag-js > getDataUrl]: Could not find the svg element");let o=eX(e),a=o.document,s=e.getBoundingClientRect(),l=e.cloneNode(!0);l.hasAttribute("viewBox")||l.setAttribute("viewBox",`0 0 ${s.width} ${s.height}`);let u="data:image/svg+xml;charset=utf-8,"+encodeURIComponent('<?xml version="1.0" standalone="no"?>\r\n'+new o.XMLSerializer().serializeToString(l));if("image/svg+xml"===r)return Promise.resolve(u).then(e=>(l.remove(),e));let c=o.devicePixelRatio||1,d=a.createElement("canvas"),h=new o.Image;h.src=u,d.width=s.width*c,d.height=s.height*c;let f=d.getContext("2d");return("image/jpeg"===r||i)&&(f.fillStyle=i||"white",f.fillRect(0,0,d.width,d.height)),new Promise(e=>{h.onload=()=>{f?.drawImage(h,0,0,d.width,d.height),e(d.toDataURL(r,n)),l.remove()}})}var te=e=>{let t;return"undefined"!=typeof document&&e.test((t=navigator.userAgentData,t?.platform??navigator.platform))},tt=e=>{let t;return"undefined"!=typeof document&&e.test((t=navigator.userAgentData)&&Array.isArray(t.brands)?t.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent)},tr=()=>"undefined"!=typeof document&&!!navigator.maxTouchPoints,tn=()=>te(/^iPhone/i)||te(/^iPad/i)||to()&&navigator.maxTouchPoints>1,ti=()=>to()||tn(),to=()=>te(/^Mac/i),ta=()=>{let e;return ti()&&(e=/apple/i,"undefined"!=typeof document&&e.test(navigator.vendor))};function ts(e){let{selectionStart:t,selectionEnd:r,value:n}=e.currentTarget,i=e.data;return n.slice(0,t)+(i??"")+n.slice(r)}function tl(e){let t=e.composedPath?.()??e.nativeEvent?.composedPath?.();return t?.[0]??e.target}function tu(e){let t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;let r=1===e.button,n=th(e);return r||n}function tc(e){let t=e.currentTarget;if(!t)return!1;let r=t.localName;return!!e.altKey&&("a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type)}function td(e){return tw(e).isComposing||229===e.keyCode}function th(e){return to()?e.metaKey:e.ctrlKey}function tf(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}function tp(e){return""===e.pointerType&&!!e.isTrusted||(tt(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var tg=e=>0===e.button,tm=e=>2===e.button||to()&&e.ctrlKey&&0===e.button,tv=e=>e.ctrlKey||e.altKey||e.metaKey,tb={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ty={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function tx(e,t={}){let{dir:r="ltr",orientation:n="horizontal"}=t,i=e.key;return i=tb[i]??i,"rtl"===r&&"horizontal"===n&&i in ty&&(i=ty[i]),i}function tw(e){return e.nativeEvent??e}var t_=new Set(["PageUp","PageDown"]),tC=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function tk(e){return e.ctrlKey||e.metaKey?.1:t_.has(e.key)||e.shiftKey&&tC.has(e.key)?10:1}function tS(e,t="client"){let r="touches"in e&&e.touches.length>0?e.touches[0]||e.changedTouches[0]:e;return{x:r[`${t}X`],y:r[`${t}Y`]}}var tE=(e,t,r,n)=>{let i="function"==typeof e?e():e;return i?.addEventListener(t,r,n),()=>{i?.removeEventListener(t,r,n)}};function tO(e,t){let{type:r="HTMLInputElement",property:n="value"}=t;return Object.getOwnPropertyDescriptor(eX(e)[r].prototype,n)??{}}function tI(e,t,r="value"){if(!e)return;let n="input"===e.localName?"HTMLInputElement":"textarea"===e.localName?"HTMLTextAreaElement":"select"===e.localName?"HTMLSelectElement":void 0;if(n){let i=tO(e,{type:n,property:r});i.set?.call(e,t)}e.setAttribute(r,t)}function tP(e,t){if(!e)return;let r=tO(e,{type:"HTMLInputElement",property:"checked"});r.set?.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked")}function tT(e,t){let{value:r,bubbles:n=!0}=t;if(!e)return;let i=eX(e);e instanceof i.HTMLInputElement&&(tI(e,`${r}`),e.dispatchEvent(new i.Event("input",{bubbles:n})))}function tR(e,t){let{checked:r,bubbles:n=!0}=t;if(!e)return;let i=eX(e);e instanceof i.HTMLInputElement&&(tP(e,r),e.dispatchEvent(new i.Event("click",{bubbles:n})))}function tA(e,t){if(!e)return;let{onFieldsetDisabledChange:r,onFormReset:n}=t,i=[function(e,t){if(!e)return;let r=e.matches("textarea, input, select, button")?e.form:e.closest("form"),n=e=>{e.defaultPrevented||t()};return r?.addEventListener("reset",n,{passive:!0}),()=>r?.removeEventListener("reset",n)}(e,n),function(e,t){let r=e?.closest("fieldset");if(!r)return;t(r.disabled);let n=new(eX(r)).MutationObserver(()=>t(r.disabled));return n.observe(r,{attributes:!0,attributeFilter:["disabled"]}),()=>n.disconnect()}(e,r)];return()=>i.forEach(e=>e?.())}var tM=e=>ez(e)&&"IFRAME"===e.tagName,tN=/^(audio|video|details)$/;function tD(e){let t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function tL(e,t,r){let n=[...e],i=[...e],o=new Set,a=new Map;e.forEach((e,t)=>a.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||o.has(e))continue;o.add(e);let l=function(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;let r=t(e);return(!0===r?e.shadowRoot:r)||null}(e,t);if(l){let t=Array.from(l.querySelectorAll(tV)).filter(r),o=a.get(e);if(void 0!==o){let e=o+1;n.splice(e,0,...t),t.forEach((t,r)=>{a.set(t,e+r)});for(let r=e+t.length;r<n.length;r++)a.set(n[r],r)}else{let e=n.length;n.push(...t),t.forEach((t,r)=>{a.set(t,e+r)})}i.push(...t)}}return n}var tV="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",tF=(e,t={})=>{if(!e)return[];let{includeContainer:r=!1,getShadowRoot:n}=t,i=Array.from(e.querySelectorAll(tV));(!0==r||"if-empty"==r&&0===i.length)&&ez(e)&&tj(e)&&i.unshift(e);let o=[];for(let e of i)if(tj(e)){if(tM(e)&&e.contentDocument){let t=e.contentDocument.body;o.push(...tF(t,{getShadowRoot:n}));continue}o.push(e)}return n?tL(o,n,tj):o};function tj(e){return!(!ez(e)||e.closest("[inert]"))&&e.matches(tV)&&!!ez(e)&&(e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0)}function tz(e,t={}){if(!e)return[];let{includeContainer:r,getShadowRoot:n}=t,i=Array.from(e.querySelectorAll(tV));r&&tB(e)&&i.unshift(e);let o=[];for(let e of i)if(tB(e)){if(tM(e)&&e.contentDocument){let t=e.contentDocument.body;o.push(...tz(t,{getShadowRoot:n}));continue}o.push(e)}if(n){let e=tL(o,n,tB);return!e.length&&r?i:e}return!o.length&&r?i:o}function tB(e){return!!ez(e)&&!!(e.tabIndex>0)||tj(e)&&!(0>tD(e))}function tH(e,t={}){let r=tz(e,t);return[r[0]||null,r[r.length-1]||null]}function tW(e){return e.tabIndex<0&&(tN.test(e.localName)||eG(e))&&Number.isNaN(tD(e))?0:e.tabIndex}function tU(e){let{root:t,getInitialEl:r,filter:n,enabled:i=!0}=e;if(!i)return;let o=null;if((o="function"==typeof r?r():r)||(o=t?.querySelector("[data-autofocus],[autofocus]")),!o){let e=tz(t);o=n?e.filter(n)[0]:e[0]}return o||t||void 0}function t$(e){let t=e.currentTarget;if(!t)return!1;let[r,n]=tH(t);return!(e$(r)&&e.shiftKey||e$(n)&&!e.shiftKey)&&(!!r||!!n)}var tq=class e{constructor(){eR(this,"id",null),eR(this,"fn_cleanup"),eR(this,"cleanup",()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function tG(e){let t=tq.create();return t.request(e),t.cleanup}function tK(e){let t=new Set;function r(e){let r=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(r))}return r(()=>r(e)),function(){t.forEach(e=>e())}}function tY(e,t){let{defer:r}=t,n=[];return n.push((r?tG:e=>e())(()=>{let r="function"==typeof e?e():e;n.push(function(e,t){if(!e)return;let{attributes:r,callback:n}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)"attributes"===t.type&&t.attributeName&&r.includes(t.attributeName)&&n(t)});return i.observe(e,{attributes:!0,attributeFilter:r}),()=>i.disconnect()}(r,t))})),()=>{n.forEach(e=>e?.())}}function tX(e,t){let{defer:r}=t,n=[];return n.push((r?tG:e=>e())(()=>{let r="function"==typeof e?e():e;n.push(function(e,t){let{callback:r}=t;if(!e)return;let n=new(e.ownerDocument.defaultView||window).MutationObserver(r);return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()}(r,t))})),()=>{n.forEach(e=>e?.())}}function tQ(e){let t=()=>{let t=eX(e);e.dispatchEvent(new t.MouseEvent("click"))};if(tt(/Firefox/i)){let r,n;r=tG(()=>{e.removeEventListener("keyup",n,!0),t()}),n=()=>{r(),t()},e.addEventListener("keyup",n,{once:!0,capture:!0})}else queueMicrotask(t)}function tZ(e){let t=function(e){if("html"===eH(e))return e;let t=e.assignedSlot||e.parentNode||eW(e)&&e.host||eY(e).documentElement;return eW(t)?t.host:t}(e);return["html","body","#document"].includes(eH(t))?eY(t).body:ez(t)&&t1(t)?t:tZ(t)}var tJ=/auto|scroll|overlay|hidden|clip/,t0=new Set(["inline","contents"]);function t1(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=eX(e).getComputedStyle(e);return tJ.test(t+n+r)&&!t0.has(i)}function t2(e,t){let{rootEl:r,...n}=t||{};e&&r&&t1(r)&&(r.scrollHeight>r.clientHeight||r.scrollWidth>r.clientWidth)&&e.scrollIntoView(n)}function t5(e,t){let{left:r,top:n,width:i,height:o}=t.getBoundingClientRect(),a={x:e.x-r,y:e.y-n},s={x:eN(a.x/i),y:eN(a.y/o)};return{offset:a,percent:s,getPercentValue:function(e={}){let{dir:t="ltr",orientation:r="horizontal",inverted:n}=e,i="object"==typeof n?n.x:n,o="object"==typeof n?n.y:n;return"horizontal"===r?"rtl"===t||i?1-s.x:s.x:o?1-s.y:s.y}}}function t3(e,t){let r=e.body;if(!("pointerLockElement"in e||"mozPointerLockElement"in e))return;try{r.requestPointerLock()}catch{}let n=[tE(e,"pointerlockchange",function(){t?.(!!e.pointerLockElement)},!1),tE(e,"pointerlockerror",function(r){e.pointerLockElement&&t?.(!1),console.error("PointerLock error occurred:",r),e.exitPointerLock()},!1)];return()=>{n.forEach(e=>e()),e.exitPointerLock()}}var t4="default",t6="",t8=new WeakMap;function t7(e={}){let{defer:t,target:r,...n}=e,i=[];return i.push((t?tG:e=>e())(()=>{let e="function"==typeof r?r():r;i.push(function(e={}){let{target:t,doc:r}=e,n=r??document,i=n.documentElement;return tn()?("default"===t4&&(t6=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),t4="disabled"):t&&(t8.set(t,t.style.userSelect),t.style.userSelect="none"),()=>(function(e={}){let{target:t,doc:r}=e,n=(r??document).documentElement;if(tn()){if("disabled"!==t4)return;t4="restoring",setTimeout(()=>{tK(()=>{"restoring"===t4&&("none"===n.style.webkitUserSelect&&(n.style.webkitUserSelect=t6||""),t6="",t4="default")})},300)}else if(t&&t8.has(t)){let e=t8.get(t);"none"===t.style.userSelect&&(t.style.userSelect=e??""),""===t.getAttribute("style")&&t.removeAttribute("style"),t8.delete(t)}})({target:t,doc:n})}({...n,target:e}))})),()=>{i.forEach(e=>e?.())}}function t9(e,t){let{onPointerMove:r,onPointerUp:n}=t,i=e=>{n({point:tS(e),event:e})},o=[tE(e,"pointermove",e=>{let t=tS(e);if(!(Math.sqrt(t.x**2+t.y**2)<("touch"===e.pointerType?10:5))){if("mouse"===e.pointerType&&0===e.button)return void i(e);r({point:t,event:e})}},!1),tE(e,"pointerup",i,!1),tE(e,"pointercancel",i,!1),tE(e,"contextmenu",i,!1),t7({doc:e})];return()=>{o.forEach(e=>e())}}function re(e){let{pointerNode:t,keyboardNode:r=t,onPress:n,onPressStart:i,onPressEnd:o,isValidKey:a=e=>"Enter"===e.key}=e;if(!t)return eL;let s=eX(t),l=eL,u=eL,c=eL,d=e=>({point:tS(e),event:e});function h(e){o?.(d(e))}let f=tE(t,"pointerdown",e=>{u(),u=eD(tE(s,"pointerup",e=>{eK(t,tl(e))?n?.(d(e)):o?.(d(e))},{passive:!n,once:!0}),tE(s,"pointercancel",h,{passive:!o,once:!0})),e$(r)&&"mouse"===e.pointerType&&e.preventDefault(),i?.(d(e))},{passive:!i});return l=eD(f,tE(r,"focus",function(){c=eD(tE(r,"keydown",e=>{var t;a(e)&&(u(),u=tE(r,"keyup",e=>{if(!a(e))return;let t=d(new s.PointerEvent("pointerup"));n?.(t),o?.(t)}),t=new s.PointerEvent("pointerdown"),i?.(d(t)))}),tE(r,"blur",()=>{h(new s.PointerEvent("pointercancel"))}))})),()=>{l(),u(),c()}}function rt(e,t){let{defer:r,triggerElement:n,...i}=t,o=[];return o.push((r?tG:e=>e())(()=>{let t="function"==typeof e?e():e,r="function"==typeof n?n():n;o.push(function(e,t={}){let{triggerElement:r,onFocus:n,onFocusEnter:i,getShadowRoot:o}=t,a=e?.ownerDocument||document,s=a.body;return tE(a,"keydown",function(t){if("Tab"!==t.key)return;let a=null,[l,u]=tH(e,{includeContainer:!0,getShadowRoot:o}),c=function(e,t={}){let{current:r,getShadowRoot:n}=t,i=tz(e,{getShadowRoot:n}),o=e?.ownerDocument||document,a=r??eQ(o);if(!a)return null;let s=i.indexOf(a);return i[s+1]||null}(s,{current:r,getShadowRoot:o}),d=!l&&!u;t.shiftKey&&e$(c)?(i?.(),a=u):t.shiftKey&&(e$(l)||d)?a=r:!t.shiftKey&&e$(r)?(i?.(),a=l):!t.shiftKey&&(e$(u)||d)&&(a=c),a&&(t.preventDefault(),"function"==typeof n?n(a):a.focus())},!0)}(t,{triggerElement:r,...i}))})),()=>{o.forEach(e=>e?.())}}function rr(e,t){return Array.from(e?.querySelectorAll(t)??[])}function rn(e,t){return e?.querySelector(t)??null}var ri=e=>e.id;function ro(e,t,r=ri){return e.find(e=>r(e)===t)}function ra(e,t,r=ri){let n=ro(e,t,r);return n?e.indexOf(n):-1}function rs(e,t,r=!0){let n=ra(e,t);return n=r?(n+1)%e.length:Math.min(n+1,e.length-1),e[n]}function rl(e,t,r=!0){let n=ra(e,t);return -1===n?r?e[e.length-1]:null:(n=r?(n-1+e.length)%e.length:Math.max(0,n-1),e[n])}function ru(e,t){let{onEntry:r,measure:n,box:i="border-box"}=t,o=(Array.isArray(e)?e:[e]).filter(ez),a=eX(o[0]),s=e=>{r({rects:o.map(e=>n(e)),entries:e})};s([]);let l=new a.ResizeObserver(s);return o.forEach(e=>l.observe(e,{box:i})),()=>l.disconnect()}function rc(e,t,r){let n=e.getAttribute(t),i=null!=n;return e.setAttribute(t,r),()=>{i?e.setAttribute(t,n):e.removeAttribute(t)}}function rd(e,t){if(!e)return eL;let r=Object.keys(t).reduce((t,r)=>(t[r]=e.style.getPropertyValue(r),t),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,r),0===e.style.length&&e.removeAttribute("style")}}function rh(e,t,r){if(!e)return eL;let n=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,n),0===e.style.length&&e.removeAttribute("style")}}var rf=Object.assign(function(e,t){let{state:r,activeId:n,key:i,timeout:o=350,itemToId:a}=t,s=r.keysSoFar+i,l=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,u=function(e,t,r,n=ri){let i=r?ra(e,r,n):-1,o=r?e.map((t,r)=>e[(Math.max(i,0)+r)%e.length]):e;return 1===t.length&&(o=o.filter(e=>n(e)!==r)),o.find(e=>{let r;return r=(e.dataset?.valuetext??e.textContent??"").split("").map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace("/","\\"):""}).join("").trim(),r.trim().toLowerCase().startsWith(t.toLowerCase())})}(e.slice(),l,n,a);function c(){clearTimeout(r.timer),r.timer=-1}return!function e(t){r.keysSoFar=t,c(),""!==t&&(r.timer=+setTimeout(()=>{e(""),c()},o))}(s),u},{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:function(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}}),rp={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function rg(e,t){let{timeout:r,rootNode:n}=t,i=eX(n),o=eY(n),a=new i.AbortController;return function(e,t,r){let{signal:n}=t;return[new Promise((t,i)=>{let o=setTimeout(()=>{i(Error(`Timeout of ${r}ms exceeded`))},r);n.addEventListener("abort",()=>{clearTimeout(o),i(Error("Promise aborted"))}),e.then(e=>{n.aborted||(clearTimeout(o),t(e))}).catch(e=>{n.aborted||(clearTimeout(o),i(e))})}),()=>t.abort()]}(new Promise(t=>{let r=e();if(r)return void t(r);let n=new i.MutationObserver(()=>{let r=e();r&&r.isConnected&&(n.disconnect(),t(r))});n.observe(o.body,{childList:!0,subtree:!0})}),a,r)}e.s(["AnimationFrame",()=>tq,"MAX_Z_INDEX",()=>0x7fffffff,"addDomEvent",()=>tE,"ariaAttr",()=>ej,"clickIfLink",()=>tQ,"contains",()=>eK,"dataAttr",()=>eF,"disableTextSelection",()=>t7,"dispatchInputCheckedEvent",()=>tR,"dispatchInputValueEvent",()=>tT,"findControlledElements",()=>e4,"getActiveElement",()=>eQ,"getBeforeInputValue",()=>ts,"getByTypeahead",()=>rf,"getComputedStyle",()=>e0,"getControlledElements",()=>e6,"getDataUrl",()=>e9,"getDocument",()=>eY,"getEventKey",()=>tx,"getEventPoint",()=>tS,"getEventStep",()=>tk,"getEventTarget",()=>tl,"getFocusables",()=>tF,"getInitialFocus",()=>tU,"getNativeEvent",()=>tw,"getNearestOverflowAncestor",()=>tZ,"getOverflowAncestors",()=>function e(t,r=[]){let n=tZ(t),i=n===t.ownerDocument.body,o=eX(n);return i?r.concat(o,o.visualViewport||[],t1(n)?n:[]):r.concat(n,e(n,[]))},"getRelativePoint",()=>t5,"getTabIndex",()=>tW,"getTabbables",()=>tz,"getWindow",()=>eX,"hasControllerElements",()=>e8,"indexOfId",()=>ra,"isActiveElement",()=>e$,"isAnchorElement",()=>eU,"isApple",()=>ti,"isCaretAtStart",()=>eA,"isComposingEvent",()=>td,"isContextMenuEvent",()=>tm,"isControlledByExpandedController",()=>e7,"isControlledElement",()=>e3,"isCtrlOrMetaKey",()=>th,"isDocument",()=>eB,"isDownloadingEvent",()=>tc,"isEditableElement",()=>eG,"isFocusable",()=>tj,"isHTMLElement",()=>ez,"isIos",()=>tn,"isLeftClick",()=>tg,"isMac",()=>to,"isModifierKey",()=>tv,"isOpeningInNewTab",()=>tu,"isPrintableKey",()=>tf,"isSafari",()=>ta,"isShadowRoot",()=>eW,"isTabbable",()=>tB,"isTouchDevice",()=>tr,"isValidTabEvent",()=>t$,"isVirtualClick",()=>tp,"itemById",()=>ro,"nextById",()=>rs,"nextTick",()=>tK,"observeAttributes",()=>tY,"observeChildren",()=>tX,"prevById",()=>rl,"proxyTabFocus",()=>rt,"query",()=>rn,"queryAll",()=>rr,"raf",()=>tG,"requestPointerLock",()=>t3,"scrollIntoView",()=>t2,"setAttribute",()=>rc,"setCaretToEnd",()=>eM,"setElementChecked",()=>tP,"setElementValue",()=>tI,"setStyle",()=>rd,"setStyleProperty",()=>rh,"trackElementRect",()=>ru,"trackFormControl",()=>tA,"trackPointerMove",()=>t9,"trackPress",()=>re,"visuallyHiddenStyle",()=>rp,"waitForElement",()=>rg],92109);var rm=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(" "),rv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,rb=e=>{let t,r={};for(;t=rv.exec(e);)r[t[1]]=t[2];return r},ry=(e,t)=>{if(T(e)){if(T(t))return`${e};${t}`;e=rb(e)}else T(t)&&(t=rb(t));return Object.assign({},e??{},t??{})};function rx(...e){let t={};for(let r of e)if(r){for(let e in t){if(e.startsWith("on")&&"function"==typeof t[e]&&"function"==typeof r[e]){t[e]=z(r[e],t[e]);continue}if("className"===e||"class"===e){t[e]=rm(t[e],r[e]);continue}if("style"===e){t[e]=ry(t[e],r[e]);continue}t[e]=void 0!==r[e]?r[e]:t[e]}for(let e in r)void 0===t[e]&&(t[e]=r[e]);for(let e of Object.getOwnPropertySymbols(r))t[e]=r[e]}return t}function rw(e,t,r){let n,i=[];return o=>{let a=e(o);return(a.length!==i.length||a.some((e,t)=>!k(i[t],e)))&&(i=a,n=t(a,o),r?.onChange?.(n)),n}}function r_(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function rC(e){return e}function rk(){return{guards:r_(),createMachine:e=>e,choose:e=>function({choose:t}){return t(e)?.actions}}}var rS=((r=rS||{}).NotStarted="Not Started",r.Started="Started",r.Stopped="Stopped",r);function rE(e){let t=()=>e.getRootNode?.()??document,r=()=>eY(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>eQ(t()),isActiveElement:e$,getById:e=>t().getElementById(e)}}function rO(...e){return t=>{let r=[];for(let n of e)if("function"==typeof n){let e=n(t);"function"==typeof e&&r.push(e)}else n&&(n.current=t);if(r.length)return()=>{for(let e of r)e()}}}e.s(["INIT_STATE",()=>"__init__","MachineStatus",()=>rS,"createGuards",()=>r_,"createMachine",()=>rC,"createScope",()=>rE,"memo",()=>rw,"mergeProps",()=>rx,"setup",()=>rk],52713),e.s(["composeRefs",()=>rO],24074)},39414,e=>{"use strict";var t=e.i(64789);function r(e={}){let{name:n,strict:i=!0,hookName:o="useContext",providerName:a="Provider",errorMessage:s,defaultValue:l}=e,u=(0,t.createContext)(l);return u.displayName=n,[u.Provider,function e(){let r=(0,t.useContext)(u);if(!r&&i){let t=Error(s??`${o} returned \`undefined\`. Seems you forgot to wrap component within ${a}`);throw t.name="ContextError",Error.captureStackTrace?.(t,e),t}return r},u]}e.s(["createContext",()=>r])},46067,e=>{"use strict";let t=()=>(e,t)=>t.reduce((e,t)=>{let[r,n]=e;return void 0!==n[t]&&(r[t]=n[t]),delete n[t],[r,n]},[{},{...e}]);e.s(["createSplitProps",()=>t])},89521,63761,92242,61697,12446,67077,e=>{"use strict";let t;var r=e.i(39414),n=e.i(46067);let[i,o]=(0,r.createContext)({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),a=e=>(0,n.createSplitProps)()(e,["lazyMount","unmountOnExit"]);e.s(["RenderStrategyPropsProvider",()=>i,"splitRenderStrategyProps",()=>a,"useRenderStrategyPropsContext",()=>o],89521);var s=e.i(52713),l=e.i(64789),u=e.i(24074);let c=e=>{let t=(0,l.memo)((0,l.forwardRef)((t,r)=>{let n,{asChild:i,children:o,...a}=t;if(!i)return(0,l.createElement)(e,{...a,ref:r},o);if(!(0,l.isValidElement)(o))return null;let c=l.Children.only(o),d=(n=Object.getOwnPropertyDescriptor(c.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning?c.ref:(n=Object.getOwnPropertyDescriptor(c,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning?c.props.ref:c.props.ref||c.ref;return(0,l.cloneElement)(c,{...(0,s.mergeProps)(a,c.props),ref:r?(0,u.composeRefs)(r,d):d})}));return t.displayName=e.displayName||e.name,t},d=(t=new Map,new Proxy(c,{apply:(e,t,r)=>c(r[0]),get:(e,r)=>(t.has(r)||t.set(r,c(r)),t.get(r))}));e.s(["ark",()=>d],63761);var h=e.i(92109);function f(e){return new Proxy({},{get:(t,r)=>"style"===r?t=>e({style:t}).style:e})}var p=()=>e=>Array.from(new Set(e));e.s(["createNormalizer",()=>f,"createProps",()=>p],92242);var g=(0,s.createMachine)({props:({props:e})=>({...e,present:!!e.present}),initialState:({prop:e})=>e("present")?"mounted":"unmounted",refs:()=>({node:null,styles:null}),context:({bindable:e})=>({unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}),exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:r}){e([()=>t("present")],()=>{r({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",(0,h.getComputedStyle)(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:r,prop:n})=>{let i=n("present");if(i)return r({type:"MOUNT",src:"presence.changed"});let o=t.get("node");if(!i&&o?.ownerDocument.visibilityState==="hidden")return r({type:"UNMOUNT",src:"visibilitychange"});(0,h.raf)(()=>{let n=m(t.get("styles"));e.set("unmountAnimationName",n),"none"===n||n===e.get("prevAnimationName")||t.get("styles")?.display==="none"||t.get("styles")?.animationDuration==="0s"?r({type:"UNMOUNT",src:"presence.changed"}):r({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{(0,h.raf)(()=>{e.set("prevAnimationName",m(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:r,prop:n})=>{let i=t.get("node");if(!i)return;let o=r=>{(r.composedPath?.()?.[0]??r.target)===i&&e.set("prevAnimationName",m(t.get("styles")))},a=o=>{let a=m(t.get("styles"));(0,h.getEventTarget)(o)!==i||a!==e.get("unmountAnimationName")||n("present")||r({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",o),i.addEventListener("animationcancel",a),i.addEventListener("animationend",a);let s=(0,h.setStyle)(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",o),i.removeEventListener("animationcancel",a),i.removeEventListener("animationend",a),(0,h.nextTick)(()=>s())}}}}});function m(e){return e?.animationName||"none"}p()(["onExitComplete","present","immediate"]);var v=e.i(58287),b=e.i(62258);e.i(15839);var y=void 0!==globalThis.document?l.useLayoutEffect:l.useEffect;function x(e){let t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=(0,l.useState)(t),[i,o]=(0,l.useState)(n),a=void 0!==e().value,s=(0,l.useRef)(i);s.current=a?e().value:i;let u=(0,l.useRef)(s.current);return y(()=>{u.current=s.current},[i,e().value]),{initial:n,ref:s,get:function(){return a?e().value:i},set(t){(e().sync?b.flushSync:v.identity)(()=>{let n,i;return n=u.current,i=(0,v.isFunction)(t)?t(n):t,void(e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:i,prev:n}),!a&&o(i),!r(i,n)&&e().onChange?.(i,n))})},invoke(t,r){e().onChange?.(t,r)},hash:t=>e().hash?.(t)??String(t)}}x.cleanup=e=>{(0,l.useEffect)(()=>e,[])},x.ref=e=>{let t=(0,l.useRef)(e);return{get:()=>t.current,set:e=>{t.current=e}}};var w=(e,t)=>{let r=(0,l.useRef)(!1),n=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(e=>"function"==typeof e?e():e)]),(0,l.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[])};function _(e,t={}){var r;let n,i,o=(0,l.useMemo)(()=>{let{id:e,ids:r,getRootNode:n}=t;return(0,s.createScope)({id:e,ids:r,getRootNode:n})},[t]),a=(...t)=>{e.debug&&console.log(...t)},u=(n=C(e.props?.({props:(0,v.compact)(t),scope:o})??t),function(e){return n.current[e]}),c=C(e.context?.({prop:u,bindable:x,scope:o,flush:k,getContext:()=>d,getComputed:()=>A,getRefs:()=>E,getEvent:()=>m()})),d={get:e=>c.current?.[e].ref.current,set(e,t){c.current?.[e].set(t)},initial:e=>c.current?.[e].initial,hash(e){let t=c.current?.[e].get();return c.current?.[e].hash(t)}},h=(0,l.useRef)(new Map),f=(0,l.useRef)(null),p=(0,l.useRef)(null),g=(0,l.useRef)({type:""}),m=()=>({...g.current,current:()=>g.current,previous:()=>p.current}),S=()=>({...M,matches:(...e)=>e.includes(M.ref.current),hasTag:t=>!!e.states[M.ref.current]?.tags?.includes(t)}),E=(r=e.refs?.({prop:u,context:d})??{},i=(0,l.useRef)(r),{get:e=>i.current[e],set(e,t){i.current[e]=t}}),O=()=>({state:S(),context:d,event:m(),prop:u,send:L,action:I,guard:P,track:w,refs:E,computed:A,flush:k,scope:o,choose:R}),I=t=>{let r=(0,v.isFunction)(t)?t(O()):t;if(r)for(let t of r.map(t=>{let r=e.implementations?.actions?.[t];return r||(0,v.warn)(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),r}))t?.(O())},P=t=>(0,v.isFunction)(t)?t(O()):e.implementations?.guards?.[t](O()),T=t=>{let r=(0,v.isFunction)(t)?t(O()):t;if(!r)return;let n=r.map(t=>{let r=e.implementations?.effects?.[t];return r||(0,v.warn)(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),r}),i=[];for(let e of n){let t=e?.(O());t&&i.push(t)}return()=>i.forEach(e=>e?.())},R=e=>(0,v.toArray)(e).find(e=>{let t=!e.guard;return(0,v.isString)(e.guard)?t=!!P(e.guard):(0,v.isFunction)(e.guard)&&(t=e.guard(O())),t}),A=t=>((0,v.ensure)(e.computed,()=>"[zag-js] No computed object found on machine"),(0,e.computed[t])({context:d,event:m(),prop:u,refs:E,scope:o,computed:A})),M=x(()=>({defaultValue:e.initialState({prop:u}),onChange(t,r){if(r){let e=h.current.get(r);e?.(),h.current.delete(r)}r&&I(e.states[r]?.exit),I(f.current?.actions);let n=T(e.states[t]?.effects);if(n&&h.current.set(t,n),r===s.INIT_STATE){I(e.entry);let t=T(e.effects);t&&h.current.set(s.INIT_STATE,t)}I(e.states[t]?.entry)}})),N=(0,l.useRef)(void 0),D=(0,l.useRef)(s.MachineStatus.NotStarted);y(()=>{queueMicrotask(()=>{let e=D.current===s.MachineStatus.Started;D.current=s.MachineStatus.Started,a(e?"rehydrating...":"initializing...");let t=N.current??M.initial;M.invoke(t,e?M.get():s.INIT_STATE)});let t=h.current,r=M.ref.current;return()=>{a("unmounting..."),N.current=r,D.current=s.MachineStatus.Stopped,t.forEach(e=>e?.()),h.current=new Map,f.current=null,queueMicrotask(()=>{I(e.exit)})}},[]);let L=t=>{queueMicrotask(()=>{if(D.current!==s.MachineStatus.Started)return;p.current=g.current,g.current=t;let r="ref"in M?M.ref.current:M.get(),n=R(e.states[r].on?.[t.type]??e.on?.[t.type]);if(!n)return;f.current=n;let i=n.target??r;a("transition",t.type,n.target||r,`(${n.actions})`);let o=i!==r;o?(0,b.flushSync)(()=>M.set(i)):n.reenter&&!o?M.invoke(r,r):I(n.actions??[])})};return e.watch?.(O()),{state:S(),send:L,context:d,prop:u,scope:o,refs:E,computed:A,event:m(),getStatus:()=>D.current}}function C(e){let t=(0,l.useRef)(e);return t.current=e,t}function k(e){queueMicrotask(()=>{(0,b.flushSync)(()=>e())})}var S=f(e=>e);function E(e,t={}){var r;let n,{sync:i=!1}=t,o=(r=e,(n=(0,l.useRef)(r)).current=r,n);return(0,l.useCallback)((...e)=>i?queueMicrotask(()=>o.current?.(...e)):o.current?.(...e),[i,o])}e.s(["normalizeProps",()=>S,"useMachine",()=>_],61697),e.s(["useEvent",()=>E],12446);let O=(e={})=>{let{lazyMount:t,unmountOnExit:r,present:n,skipAnimationOnMount:i=!1,...o}=e,a=(0,l.useRef)(!1),s=function(e,t){let{state:r,send:n,context:i}=e,o=r.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:o,setNode(e){e&&n({type:"NODE.SET",node:e})},unmount(){n({type:"UNMOUNT"})}}}(_(g,{...o,present:n,onExitComplete:E(e.onExitComplete)}),0);s.present&&(a.current=!0);let u=!s.present&&!a.current&&t||r&&!s.present&&a.current;return{ref:s.setNode,getPresenceProps:()=>({"data-state":s.skip&&i?void 0:n?"open":"closed",hidden:!s.present}),present:s.present,unmounted:u}};e.s(["usePresence",()=>O],67077)},18067,25499,56226,e=>{"use strict";var t=e.i(15839),r=e.i(52713),n=e.i(64789),i=e.i(24074),o=e.i(89521),a=e.i(63761),s=e.i(67077);let[l,u]=(0,e.i(39414).createContext)({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"});e.s(["DialogProvider",()=>l,"useDialogContext",()=>u],25499);let c=(0,n.forwardRef)((e,n)=>{let l=u(),c=(0,o.useRenderStrategyPropsContext)(),d=(0,s.usePresence)({...c,present:l.open}),h=(0,r.mergeProps)(l.getBackdropProps(),d.getPresenceProps(),e);return d.unmounted?null:(0,t.jsx)(a.ark.div,{...h,ref:(0,i.composeRefs)(d.ref,n)})});c.displayName="DialogBackdrop",e.s(["DialogBackdrop",()=>c],18067);let d=(0,n.forwardRef)((e,n)=>{let i=u(),o=(0,r.mergeProps)(i.getCloseTriggerProps(),e);return(0,t.jsx)(a.ark.button,{...o,ref:n})});d.displayName="DialogCloseTrigger",e.s(["DialogCloseTrigger",()=>d],56226)},96733,e=>{"use strict";let[t,r]=(0,e.i(39414).createContext)({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"});e.s(["PresenceProvider",()=>t,"usePresenceContext",()=>r])},56385,60036,83335,17836,e=>{"use strict";var t=e.i(15839),r=e.i(52713),n=e.i(64789),i=e.i(24074),o=e.i(63761),a=e.i(96733),s=e.i(25499);let l=(0,n.forwardRef)((e,n)=>{let l=(0,s.useDialogContext)(),u=(0,a.usePresenceContext)(),c=(0,r.mergeProps)(l.getContentProps(),u.getPresenceProps(),e);return u.unmounted?null:(0,t.jsx)(o.ark.div,{...c,ref:(0,i.composeRefs)(u.ref,n)})});l.displayName="DialogContent",e.s(["DialogContent",()=>l],56385);let u=e=>e.children((0,s.useDialogContext)());e.s(["DialogContext",()=>u],60036);let c=(0,n.forwardRef)((e,n)=>{let i=(0,s.useDialogContext)(),a=(0,r.mergeProps)(i.getDescriptionProps(),e);return(0,t.jsx)(o.ark.div,{...a,ref:n})});c.displayName="DialogDescription",e.s(["DialogDescription",()=>c],83335);let d=(0,n.forwardRef)((e,n)=>{let i=(0,s.useDialogContext)(),l=(0,r.mergeProps)(i.getPositionerProps(),e);return(0,a.usePresenceContext)().unmounted?null:(0,t.jsx)(o.ark.div,{...l,ref:n})});d.displayName="DialogPositioner",e.s(["DialogPositioner",()=>d],17836)},98239,e=>{"use strict";var t=e.i(46067);let r=e=>(0,t.createSplitProps)()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);e.s(["splitPresenceProps",()=>r])},94548,e=>{"use strict";var t=(e,i=[])=>({parts:(...r)=>{if(n(i))return t(e,r);throw Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>t(e,[...i,...r]),omit:(...r)=>t(e,i.filter(e=>!r.includes(e))),rename:e=>t(e,i),keys:()=>i,build:()=>[...new Set(i)].reduce((t,n)=>Object.assign(t,{[n]:{selector:`&[data-scope="${r(e)}"][data-part="${r(n)}"], & [data-scope="${r(e)}"][data-part="${r(n)}"]`,attrs:{"data-scope":r(e),"data-part":r(n)}}}),{})}),r=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),n=e=>0===e.length;e.s(["createAnatomy",()=>t])},27958,e=>{"use strict";var t=e.i(92109),r=new WeakMap,n=new WeakMap,i={},o=0,a=e=>e&&(e.host||a(e.parentNode)),s=new Set(["script","output","status","next-route-announcer"]),l=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body;function u(e,c={}){let{defer:d=!0}=c,h=[];return h.push((d?e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)}:e=>e())(()=>{let u=("function"==typeof e?e():e).filter(Boolean);0!==u.length&&h.push(((e,u=l(e),c="data-aria-hidden",d=!0)=>{if(u)return((e,l)=>{let{parentNode:u,markerName:c,controlAttribute:d,followControlledElements:h=!0}=l,f=(Array.isArray(e)?e:[e]).map(e=>{if(u.contains(e))return e;let t=a(e);return t&&u.contains(t)?t:(console.error("[zag-js > ariaHidden] target",e,"in not contained inside",u,". Doing nothing"),null)}).filter(e=>!!e);i[c]||(i[c]=new WeakMap);let p=i[c],g=[],m=new Set,v=new Set(f),b=e=>{!e||m.has(e)||(m.add(e),b(e.parentNode))};f.forEach(e=>{b(e),h&&(0,t.isHTMLElement)(e)&&(0,t.findControlledElements)(e,e=>{b(e)})});let y=e=>{!e||v.has(e)||Array.prototype.forEach.call(e.children,e=>{if(m.has(e))y(e);else try{if(s.has(e.localName)||"status"===e.role||e.hasAttribute("aria-live")||e.matches("[data-live-announcer]"))return;let t=e.getAttribute(d),i="true"===t,o=(r.get(e)||0)+1,a=(p.get(e)||0)+1;r.set(e,o),p.set(e,a),g.push(e),1===o&&i&&n.set(e,!0),1===a&&e.setAttribute(c,""),i||e.setAttribute(d,"true")}catch(t){console.error("[zag-js > ariaHidden] cannot operate on ",e,t)}})};return y(u),m.clear(),o++,()=>{g.forEach(e=>{let t=r.get(e)-1,i=p.get(e)-1;r.set(e,t),p.set(e,i),t||(n.has(e)||e.removeAttribute(d),n.delete(e)),i||e.removeAttribute(c)}),--o||(r=new WeakMap,r=new WeakMap,n=new WeakMap,i={})}})(e,{parentNode:u,markerName:c,controlAttribute:"aria-hidden",followControlledElements:d})})(u))})),()=>{h.forEach(e=>e?.())}}e.s(["ariaHidden",()=>u])},56842,28421,e=>{"use strict";var t,r=e.i(92109),n=e.i(58287),i="pointerdown.outside",o="focus.outside";function a(e,t){if(!t||!("clientY"in e))return!1;let r=t.scrollHeight>t.clientHeight,n=r&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,o=i&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+16*!!r,height:t.clientHeight+16*!!i},s={x:e.clientX,y:e.clientY};return a.y<=s.y&&s.y<=a.y+a.height&&a.x<=s.x&&s.x<=a.x+a.width&&(n||o)}function s(e,t){let{defer:s}=t,u=s?r.raf:e=>e(),c=[];return c.push(u(()=>{let s="function"==typeof e?e():e;c.push(function(e,t){let s,u,{exclude:c,onFocusOutside:d,onPointerDownOutside:h,onInteractOutside:f,defer:p,followControlledElements:g=!0}=t;if(!e)return;let m=(0,r.getDocument)(e),v=(0,r.getWindow)(e),b=s={each(e){for(let t=0;t<v.frames?.length;t+=1){let r=v.frames[t];r&&e(r)}},addEventListener:(e,t,r)=>(s.each(n=>{try{n.document.addEventListener(e,t,r)}catch{}}),()=>{try{s.removeEventListener(e,t,r)}catch{}}),removeEventListener(e,t,r){s.each(n=>{try{n.document.removeEventListener(e,t,r)}catch{}})}},y=(u=null!=v.frameElement?v.parent:null,{addEventListener:(e,t,r)=>{try{u?.addEventListener(e,t,r)}catch{}return()=>{try{u?.removeEventListener(e,t,r)}catch{}}},removeEventListener:(e,t,r)=>{try{u?.removeEventListener(e,t,r)}catch{}}});function x(t,n){if(!(0,r.isHTMLElement)(n)||!n.isConnected||(0,r.contains)(e,n)||function(e,t){if(!("clientY"in t)||!e)return!1;let r=e.getBoundingClientRect();return 0!==r.width&&0!==r.height&&r.top<=t.clientY&&t.clientY<=r.top+r.height&&r.left<=t.clientX&&t.clientX<=r.left+r.width}(e,t)||g&&(0,r.isControlledElement)(e,n))return!1;let i=m.querySelector(`[aria-controls="${e.id}"]`);return!(i&&a(t,(0,r.getNearestOverflowAncestor)(i)))&&!a(t,(0,r.getNearestOverflowAncestor)(e))&&!c?.(n)}let w=new Set,_=(0,r.isShadowRoot)(e?.getRootNode());function C(t){function o(o){let a=p&&!(0,r.isTouchDevice)()?r.raf:e=>e(),s=o??t,u=s?.composedPath?.()??[s?.target];a(()=>{let o=_?u[0]:(0,r.getEventTarget)(t);if(e&&x(t,o)){if(h||f){let t=(0,n.callAll)(h,f);e.addEventListener(i,t,{once:!0})}l(e,i,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:(0,r.isContextMenuEvent)(s),focusable:function(e){for(let t of e)if((0,r.isHTMLElement)(t)&&(0,r.isFocusable)(t))return!0;return!1}(u),target:o}})}})}"touch"===t.pointerType?(w.forEach(e=>e()),w.add((0,r.addDomEvent)(m,"click",o,{once:!0})),w.add(y.addEventListener("click",o,{once:!0})),w.add(b.addEventListener("click",o,{once:!0}))):o()}let k=new Set,S=setTimeout(()=>{k.add((0,r.addDomEvent)(m,"pointerdown",C,!0)),k.add(y.addEventListener("pointerdown",C,!0)),k.add(b.addEventListener("pointerdown",C,!0))},0);function E(t){(p?r.raf:e=>e())(()=>{let i=t?.composedPath?.()??[t?.target],a=_?i[0]:(0,r.getEventTarget)(t);if(e&&x(t,a)){if(d||f){let t=(0,n.callAll)(d,f);e.addEventListener(o,t,{once:!0})}l(e,o,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:(0,r.isFocusable)(a),target:a}})}})}return(0,r.isTouchDevice)()||(k.add((0,r.addDomEvent)(m,"focusin",E,!0)),k.add(y.addEventListener("focusin",E,!0)),k.add(b.addEventListener("focusin",E,!0))),()=>{clearTimeout(S),w.forEach(e=>e()),k.forEach(e=>e())}}(s,t))})),()=>{c.forEach(e=>e?.())}}function l(e,t,r){let n=new(e.ownerDocument.defaultView||window).CustomEvent(t,r);return e.dispatchEvent(n)}e.s(["trackInteractOutside",()=>s],28421);var u="layer:request-dismiss",c={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){let t=this.layers[this.count()-1];return t?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let r=this.indexOf(e);return -1===r?[]:this.layers.slice(r+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let r=this.indexOf(e);if(!(r<=0))return this.layers.slice(0,r).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(e=>(0,r.contains)(e.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>(0,r.contains)(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(t=>c.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);let r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){var r,n,i,o,a,s;let l,c=this.indexOf(e);if(-1===c)return;let d=this.layers[c];r=e,n=u,i=e=>{d.requestDismiss?.(e),e.defaultPrevented||d?.dismiss()},r.addEventListener(n,i,{once:!0}),o=e,a=u,s={originalLayer:e,targetLayer:t,originalIndex:c,targetIndex:t?this.indexOf(t):-1},l=new(o.ownerDocument.defaultView||window).CustomEvent(a,{cancelable:!0,bubbles:!0,detail:s}),o.dispatchEvent(l),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function d(){c.layers.forEach(({node:e})=>{e.style.pointerEvents=c.isBelowPointerBlockingLayer(e)?"none":"auto"})}function h(e,i){let{defer:o}=i,a=o?r.raf:e=>e(),l=[];return l.push(a(()=>{let o=(0,n.isFunction)(e)?e():e;l.push(function(e,i){var o,a;let l,u,{warnOnMissingNode:h=!0}=i;if(h&&!e)return void(0,n.warn)("[@zag-js/dismissable] node is `null` or `undefined`");if(!e)return;let{onDismiss:f,onRequestDismiss:p,pointerBlocking:g,exclude:m,debug:v,type:b="dialog"}=i;c.add({dismiss:f,node:e,type:b,pointerBlocking:g,requestDismiss:p}),d();let y=[g?(o=i.persistentElements,l=(0,r.getDocument)(e),u=[],c.hasPointerBlockingLayer()&&!l.body.hasAttribute("data-inert")&&(t=document.body.style.pointerEvents,queueMicrotask(()=>{l.body.style.pointerEvents="none",l.body.setAttribute("data-inert","")})),o?.forEach(e=>{let[t,n]=(0,r.waitForElement)(()=>{let t=e();return(0,r.isHTMLElement)(t)?t:null},{timeout:1e3});t.then(e=>u.push((0,r.setStyle)(e,{pointerEvents:"auto"}))),u.push(n)}),()=>{c.hasPointerBlockingLayer()||(queueMicrotask(()=>{l.body.style.pointerEvents=t,l.body.removeAttribute("data-inert"),0===l.body.style.length&&l.body.removeAttribute("style")}),u.forEach(e=>e()))}):void 0,(a=function(t){c.isTopMost(e)&&(i.onEscapeKeyDown?.(t),!t.defaultPrevented&&f&&(t.preventDefault(),f()))},(0,r.addDomEvent)((0,r.getDocument)(e),"keydown",e=>{"Escape"!==e.key||e.isComposing||a?.(e)},{capture:!0})),s(e,{exclude:function(t){if(!e)return!1;let n="function"==typeof m?m():m,o=Array.isArray(n)?n:[n],a=i.persistentElements?.map(e=>e()).filter(r.isHTMLElement);return a&&o.push(...a),o.some(e=>(0,r.contains)(e,t))||c.isInNestedLayer(e,t)},onFocusOutside:function(e){let t=(0,r.getEventTarget)(e.detail.originalEvent);c.isInBranch(t)||(i.onFocusOutside?.(e),i.onInteractOutside?.(e),e.defaultPrevented||(v&&console.log("onFocusOutside:",e.detail.originalEvent),f?.()))},onPointerDownOutside:function(t){let n=(0,r.getEventTarget)(t.detail.originalEvent);c.isBelowPointerBlockingLayer(e)||c.isInBranch(n)||(i.onPointerDownOutside?.(t),i.onInteractOutside?.(t),t.defaultPrevented||(v&&console.log("onPointerDownOutside:",t.detail.originalEvent),f?.()))},defer:i.defer})];return()=>{c.remove(e),d(),e.style.pointerEvents="",y.forEach(e=>e?.())}}(o,i))})),()=>{l.forEach(e=>e?.())}}function f(e,t={}){let{defer:i}=t,o=i?r.raf:e=>e(),a=[];return a.push(o(()=>{let t=(0,n.isFunction)(e)?e():e;t?(c.addBranch(t),a.push(()=>{c.removeBranch(t)})):(0,n.warn)("[@zag-js/dismissable] branch node is `null` or `undefined`")})),()=>{a.forEach(e=>e?.())}}e.s(["trackDismissableBranch",()=>f,"trackDismissableElement",()=>h],56842)},43617,68642,82872,e=>{"use strict";var t=e.i(94548),r=e.i(27958),n=e.i(52713),i=e.i(56842),o=e.i(92109),a=Object.defineProperty,s=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},l={activateTrap(e,t){if(e.length>0){let r=e[e.length-1];r!==t&&r.pause()}let r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)},deactivateTrap(e,t){let r=e.indexOf(t);-1!==r&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},u=[],c=class{constructor(e,t){s(this,"trapStack"),s(this,"config"),s(this,"doc"),s(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),s(this,"portalContainers",new Set),s(this,"listenerCleanups",[]),s(this,"handleFocus",e=>{let t=(0,o.getEventTarget)(e),r=this.findContainerIndex(t,e)>=0;if(r||(0,o.isDocument)(t))r&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let r=!0;if(this.state.mostRecentlyFocusedNode)if((0,o.getTabIndex)(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:n}=this.state.containerGroups[e];if(n.length>0){let e=n.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<n.length&&(t=n[e+1],r=!1):e-1>=0&&(t=n[e-1],r=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>(0,o.getTabIndex)(e)>0))||(r=!1);else r=!1;r&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),s(this,"handlePointerDown",e=>{let t=(0,o.getEventTarget)(e);this.findContainerIndex(t,e)>=0||(h(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):h(this.config.allowOutsideClick,e)||e.preventDefault())}),s(this,"handleClick",e=>{let t=(0,o.getEventTarget)(e);this.findContainerIndex(t,e)>=0||h(this.config.clickOutsideDeactivates,e)||h(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),s(this,"handleTabKey",e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),r=this.findNextNavNode({event:e,isBackward:t});r&&(d(e)&&e.preventDefault(),this.tryFocus(r))}}),s(this,"handleEscapeKey",e=>{f(e)&&!1!==h(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())}),s(this,"_mutationObserver"),s(this,"setupMutationObserver",()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>e.nodeType===Node.ELEMENT_NODE&&(!!(0,o.hasControllerElements)(e)||!(!e.id||this.state.containers.some(t=>t.contains(e)))&&(0,o.isControlledByExpandedController)(e))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),s(this,"updateObservedNodes",()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),s(this,"getInitialFocusNode",()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!(0,o.isFocusable)(e)){let t=(0,o.getActiveElement)(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e)throw Error("Your focus-trap needs to have at least one focusable element");return e.isConnected||(e=this.getNodeForOption("fallbackFocus")),e}),s(this,"tryFocus",e=>{if(!1!==e&&e!==(0,o.getActiveElement)(this.doc)){if(!e||!e.focus)return void this.tryFocus(this.getInitialFocusNode());e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,g(e)&&e.select()}}),s(this,"deactivate",e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),l.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let r=this.getOption(t,"onDeactivate"),n=this.getOption(t,"onPostDeactivate"),i=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");r?.();let a=()=>{p(()=>{if(o){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}n?.()})};return o&&i?i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(a,a):a(),this}),s(this,"pause",e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,"onPause"),r=this.getOption(e,"onPostPause");return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),r?.(),this}),s(this,"unpause",e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,"onUnpause"),r=this.getOption(e,"onPostUnpause");return this.state.paused=!1,t?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.(),this}),s(this,"updateContainerElements",e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),s(this,"getReturnFocusNode",e=>{let t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e}),s(this,"getOption",(e,t,r)=>e&&void 0!==e[t]?e[t]:this.config[r||t]),s(this,"getNodeForOption",(e,{hasFallback:t=!1,params:r=[]}={})=>{let n=this.config[e];if("function"==typeof n&&(n=n(...r)),!0===n&&(n=void 0),!n){if(void 0===n||!1===n)return n;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=n;if("string"==typeof n){try{i=this.doc.querySelector(n)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),s(this,"findNextNavNode",e=>{let{event:t,isBackward:r=!1}=e,n=e.target||(0,o.getEventTarget)(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(n,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=r?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(r){let r=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>n===e);if(r<0&&(a?.container===n||(0,o.isFocusable)(n)&&!(0,o.isTabbable)(n)&&!a?.nextTabbableNode(n,!1))&&(r=e),r>=0){let e=0===r?this.state.tabbableGroups.length-1:r-1,t=this.state.tabbableGroups[e];i=(0,o.getTabIndex)(n)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else d(t)||(i=a?.nextTabbableNode(n,!1))}else{let r=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>n===e);if(r<0&&(a?.container===n||(0,o.isFocusable)(n)&&!(0,o.isTabbable)(n)&&!a?.nextTabbableNode(n))&&(r=e),r>=0){let e=r===this.state.tabbableGroups.length-1?0:r+1,t=this.state.tabbableGroups[e];i=(0,o.getTabIndex)(n)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else d(t)||(i=a?.nextTabbableNode(n))}}else i=this.getNodeForOption("fallbackFocus");return i}),this.trapStack=t.trapStack||u;const r={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:e=>d(e)&&!e.shiftKey,isKeyBackward:e=>d(e)&&e.shiftKey,...t};this.doc=r.document||(0,o.getDocument)(Array.isArray(e)?e[0]:e),this.config=r,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{(0,o.getControlledElements)(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let r="function"==typeof t?.composedPath?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:t,tabbableNodes:n})=>t.contains(e)||r?.includes(t)||n.find(t=>t===e)||this.isControlledElement(t,e))}isControlledElement(e,t){return!!this.config.followControlledElements&&(0,o.isControlledElement)(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=(0,o.getTabbables)(e,{getShadowRoot:this.config.getShadowRoot}),r=(0,o.getFocusables)(e,{getShadowRoot:this.config.getShadowRoot}),n=t[0],i=t[t.length-1],a=!1;for(let e=0;e<t.length;e++)if((0,o.getTabIndex)(t[e])>0){a=!0;break}return{container:e,tabbableNodes:t,focusableNodes:r,posTabIndexesFound:a,firstTabbableNode:n,lastTabbableNode:i,firstDomTabbableNode:n,lastDomTabbableNode:i,nextTabbableNode:function(e,n=!0){let i=t.indexOf(e);if(i>=0)return t[i+(n?1:-1)];let a=r.indexOf(e);if(!(a<0)){if(n){for(let e=a+1;e<r.length;e++)if((0,o.isTabbable)(r[e]))return r[e]}else for(let e=a-1;e>=0;e--)if((0,o.isTabbable)(r[e]))return r[e]}}}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return l.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?p(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push((0,o.addDomEvent)(this.doc,"focusin",this.handleFocus,!0),(0,o.addDomEvent)(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),(0,o.addDomEvent)(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),(0,o.addDomEvent)(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),(0,o.addDomEvent)(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),(0,o.addDomEvent)(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,"onActivate"),r=this.getOption(e,"onPostActivate"),n=this.getOption(e,"checkCanFocusTrap");n||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=(0,o.getActiveElement)(this.doc),t?.();let i=()=>{n&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.()};return n?n(this.state.containers.concat()).then(i,i):i(),this}},d=e=>"Tab"===e.key,h=(e,...t)=>"function"==typeof e?e(...t):e,f=e=>!e.isComposing&&"Escape"===e.key,p=e=>setTimeout(e,0),g=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;function m(e,t={}){let r,n=(0,o.raf)(()=>{let n="function"==typeof e?e():e;if(n){r=new c(n,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:n,...t,document:(0,o.getDocument)(n)});try{r.activate()}catch{}}});return function(){r?.deactivate(),n()}}e.s(["trapFocus",()=>m],68642);var v="data-scroll-lock";function b(e){let t=(0,o.getComputedStyle)(e),r=t?.scrollbarGutter;return"stable"===r||r?.startsWith("stable ")===!0}function y(e){let t,r=e??document,n=r.defaultView??window,{documentElement:i,body:a}=r;if(a.hasAttribute(v))return;let s=b(i)||b(a),l=n.innerWidth-i.clientWidth;a.setAttribute(v,"");let u=Math.round(i.getBoundingClientRect().left)+i.scrollLeft?"paddingLeft":"paddingRight",c=[(0,o.setStyleProperty)(i,"--scrollbar-width",`${l}px`),(0,o.isIos)()?(()=>{let{scrollX:e,scrollY:t,visualViewport:r}=n,i=r?.offsetLeft??0,c=r?.offsetTop??0,d={position:"fixed",overflow:"hidden",top:`${-(t-Math.floor(c))}px`,left:`${-(e-Math.floor(i))}px`,right:"0"};!s&&l>0&&(d[u]=`${l}px`);let h=(0,o.setStyle)(a,d);return()=>{h?.(),n.scrollTo({left:e,top:t,behavior:"instant"})}})():(t={overflow:"hidden"},!s&&l>0&&(t[u]=`${l}px`),(0,o.setStyle)(a,t))];return()=>{c.forEach(e=>e?.()),a.removeAttribute(v)}}e.s(["preventBodyScroll",()=>y],82872);var x=e.i(92242),w=e.i(58287),_=(0,t.createAnatomy)("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),C=_.build(),k=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,S=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,E=e=>e.ids?.content??`dialog:${e.id}:content`,O=e=>e.ids?.trigger??`dialog:${e.id}:trigger`,I=e=>e.ids?.title??`dialog:${e.id}:title`,P=e=>e.ids?.description??`dialog:${e.id}:description`,T=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,R=e=>e.getById(E(e));function A(e,t){let{state:r,send:n,context:i,prop:o,scope:a}=e,s=o("aria-label"),l=r.matches("open");return{open:l,setOpen(e){r.matches("open")!==e&&n({type:e?"OPEN":"CLOSE"})},getTriggerProps:()=>t.button({...C.trigger.attrs,dir:o("dir"),id:O(a),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":E(a),onClick(e){e.defaultPrevented||n({type:"TOGGLE"})}}),getBackdropProps:()=>t.element({...C.backdrop.attrs,dir:o("dir"),hidden:!l,id:S(a),"data-state":l?"open":"closed"}),getPositionerProps:()=>t.element({...C.positioner.attrs,dir:o("dir"),id:k(a),style:{pointerEvents:l?void 0:"none"}}),getContentProps(){let e=i.get("rendered");return t.element({...C.content.attrs,dir:o("dir"),role:o("role"),hidden:!l,id:E(a),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:I(a),"aria-describedby":e.description?P(a):void 0})},getTitleProps:()=>t.element({...C.title.attrs,dir:o("dir"),id:I(a)}),getDescriptionProps:()=>t.element({...C.description.attrs,dir:o("dir"),id:P(a)}),getCloseTriggerProps:()=>t.button({...C.closeTrigger.attrs,dir:o("dir"),id:T(a),type:"button",onClick(e){e.defaultPrevented||(e.stopPropagation(),n({type:"CLOSE"}))}})}}var M=(0,n.createMachine)({props({props:e,scope:t}){let r="alertdialog"===e.role,n=r?()=>t.getById(T(t)):void 0,i="boolean"!=typeof e.modal||e.modal;return{role:"dialog",modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:!r,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:n,...e}},initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",context:({bindable:e})=>({rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}),watch({track:e,action:t,prop:r}){e([()=>r("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>void 0!=e("open")},effects:{trackDismissableElement:({scope:e,send:t,prop:r})=>(0,i.trackDismissableElement)(()=>R(e),{type:"dialog",defer:!0,pointerBlocking:r("modal"),exclude:[e.getById(O(e))],onInteractOutside(e){r("onInteractOutside")?.(e),r("closeOnInteractOutside")||e.preventDefault()},persistentElements:r("persistentElements"),onFocusOutside:r("onFocusOutside"),onPointerDownOutside:r("onPointerDownOutside"),onRequestDismiss:r("onRequestDismiss"),onEscapeKeyDown(e){r("onEscapeKeyDown")?.(e),r("closeOnEscape")||e.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}}),preventScroll({scope:e,prop:t}){if(t("preventScroll"))return y(e.getDoc())},trapFocus({scope:e,prop:t}){if(t("trapFocus"))return m(()=>R(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:e=>t("finalFocusEl")?.()??e,getShadowRoot:!0})},hideContentBelow({scope:e,prop:t}){if(t("modal"))return(0,r.ariaHidden)(()=>[R(e)],{defer:!0})}},actions:{checkRenderedElements({context:e,scope:t}){(0,o.raf)(()=>{e.set("rendered",{title:!!t.getById(I(t)),description:!!t.getById(P(t))})})},syncZIndex({scope:e}){(0,o.raf)(()=>{let t=R(e);if(!t)return;let r=(0,o.getComputedStyle)(t);[e.getById(k(e)),e.getById(S(e))].forEach(e=>{e?.style.setProperty("--z-index",r.zIndex),e?.style.setProperty("--layer-index",r.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},toggleVisibility({prop:e,send:t,event:r}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})}}}}),N=(0,x.createProps)()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);(0,w.createSplitProps)(N),e.s(["anatomy",()=>_,"connect",()=>A,"machine",()=>M],43617)},21173,64614,e=>{"use strict";var t=e.i(39414);let[r,n]=(0,t.createContext)({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}});e.s(["useEnvironmentContext",()=>n],21173);let[i,o]=(0,t.createContext)({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});e.s(["useLocaleContext",()=>o],64614)},57909,e=>{"use strict";e.i(13074);var t=e.i(18067),r=e.i(56226),n=e.i(56385),i=e.i(60036),o=e.i(83335),a=e.i(17836),s=e.i(15839),l=e.i(52713),u=e.i(89521),c=e.i(98239),d=e.i(67077),h=e.i(96733),f=e.i(43617),p=e.i(61697),g=e.i(64789),m=e.i(21173),v=e.i(64614),b=e.i(25499);let y=e=>{let[t,{children:r,...n}]=(0,c.splitPresenceProps)(e),[i]=(0,u.splitRenderStrategyProps)(t),o=(e=>{let t=(0,g.useId)(),{getRootNode:r}=(0,m.useEnvironmentContext)(),{dir:n}=(0,v.useLocaleContext)(),i={id:t,getRootNode:r,dir:n,...e},o=(0,p.useMachine)(f.machine,i);return f.connect(o,p.normalizeProps)})(n),a=(0,d.usePresence)((0,l.mergeProps)({present:o.open},t));return(0,s.jsx)(b.DialogProvider,{value:o,children:(0,s.jsx)(u.RenderStrategyPropsProvider,{value:i,children:(0,s.jsx)(h.PresenceProvider,{value:a,children:r})})})},x=e=>{let[t,{value:r,children:n}]=(0,c.splitPresenceProps)(e),[i]=(0,u.splitRenderStrategyProps)(t),o=(0,d.usePresence)((0,l.mergeProps)({present:r.open},t));return(0,s.jsx)(b.DialogProvider,{value:r,children:(0,s.jsx)(u.RenderStrategyPropsProvider,{value:i,children:(0,s.jsx)(h.PresenceProvider,{value:o,children:n})})})};var w=e.i(63761);let _=(0,g.forwardRef)((e,t)=>{let r=(0,b.useDialogContext)(),n=(0,l.mergeProps)(r.getTitleProps(),e);return(0,s.jsx)(w.ark.h2,{...n,ref:t})});_.displayName="DialogTitle";let C=(0,g.forwardRef)((e,t)=>{let r=(0,b.useDialogContext)(),n=(0,h.usePresenceContext)(),i=(0,l.mergeProps)({...r.getTriggerProps(),"aria-controls":n.unmounted?void 0:r.getTriggerProps()["aria-controls"]},e);return(0,s.jsx)(w.ark.button,{...i,ref:t})});C.displayName="DialogTrigger",e.s(["Backdrop",()=>t.DialogBackdrop,"CloseTrigger",()=>r.DialogCloseTrigger,"Content",()=>n.DialogContent,"Context",()=>i.DialogContext,"Description",()=>o.DialogDescription,"Positioner",()=>a.DialogPositioner,"Root",()=>y,"RootProvider",()=>x,"Title",()=>_,"Trigger",()=>C],46619);var k=e.i(46619);e.s(["Dialog",0,k],57909)},45362,90304,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(6251),i=e.i(75118),o=e.i(30852),a=e.i(5376),s=e.i(4366);function l(e){let{key:t,recipe:n}=e,i=(0,s.useChakraContext)();return(0,r.useMemo)(()=>{let e=n||(null!=t?i.getSlotRecipe(t):{});return i.sva(structuredClone(e))},[t,n,i])}e.s(["useSlotRecipe",()=>l],90304);var u=e.i(41344);let c=e=>{let s,{key:c,recipe:d}=e,h=(s=c||d.className||"Component").charAt(0).toUpperCase()+s.slice(1),[f,p]=(0,n.createContext)({name:`${h}StylesContext`,errorMessage:`use${h}Styles returned is 'undefined'. Seems you forgot to wrap the components in "<${h}.Root />" `}),[g,m]=(0,n.createContext)({name:`${h}ClassNameContext`,errorMessage:`use${h}ClassNames returned is 'undefined'. Seems you forgot to wrap the components in "<${h}.Root />" `,strict:!1}),[v,b]=(0,n.createContext)({strict:!1,name:`${h}PropsContext`,providerName:`${h}PropsContext`,defaultValue:{}});function y(e){let{unstyled:t,...n}=e,i=l({key:c,recipe:n.recipe||d}),[a,s]=(0,r.useMemo)(()=>i.splitVariantProps(n),[n,i]);return{styles:(0,r.useMemo)(()=>t?o.EMPTY_SLOT_STYLES:i(a),[t,a,i]),classNames:i.classNameMap,props:s}}return{StylesProvider:f,ClassNamesProvider:g,PropsProvider:v,usePropsContext:b,useRecipeResult:y,withProvider:(e,n,o)=>{let{defaultProps:s,...l}=o??{},c=(0,a.chakra)(e,{},l),d=(0,r.forwardRef)((e,a)=>{let l=b(),d=(0,r.useMemo)(()=>(0,i.mergeProps)(s??{},l,e),[l,e]),{styles:h,props:p,classNames:m}=y(d),v=m[n],x=(0,t.jsx)(f,{value:h,children:(0,t.jsx)(g,{value:m,children:(0,t.jsx)(c,{ref:a,...p,css:[h[n],d.css],className:(0,u.cx)(d.className,v)})})});return o?.wrapElement?.(x,d)??x});return d.displayName=e.displayName||e.name,d},withContext:(e,n,i)=>{let o=(0,a.chakra)(e,{},i),s=(0,r.forwardRef)((e,r)=>{let{unstyled:i,...a}=e,s=p(),l=m(),c=l?.[n];return(0,t.jsx)(o,{...a,css:[!i&&n?s[n]:void 0,e.css],ref:r,className:(0,u.cx)(e.className,c)})});return s.displayName=e.displayName||e.name,s},withRootProvider:function(e,n={}){let{defaultProps:o}=n,a=n=>{let a=b(),{styles:s,classNames:l,props:u}=y((0,r.useMemo)(()=>(0,i.mergeProps)(o,a,n),[a,n]));return(0,t.jsx)(f,{value:s,children:(0,t.jsx)(g,{value:l,children:(0,t.jsx)(e,{...u})})})};return a.displayName=e.displayName||e.name,a},useStyles:p,useClassNames:m}};e.s(["createSlotRecipeContext",()=>c],45362)},59889,70839,e=>{"use strict";e.i(65283);var t=e.i(15839),r=e.i(57909),n=e.i(25499),i=e.i(64789),o=e.i(45362),a=e.i(5376);let{withRootProvider:s,withContext:l,useStyles:u,PropsProvider:c}=(0,o.createSlotRecipeContext)({key:"dialog"}),d=s(r.Dialog.RootProvider,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),h=s(r.Dialog.Root,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),f=l(r.Dialog.Trigger,"trigger",{forwardAsChild:!0}),p=l(r.Dialog.Positioner,"positioner",{forwardAsChild:!0}),g=l(r.Dialog.Content,"content",{forwardAsChild:!0}),m=l(r.Dialog.Description,"description",{forwardAsChild:!0}),v=l(r.Dialog.Title,"title",{forwardAsChild:!0}),b=l(r.Dialog.CloseTrigger,"closeTrigger",{forwardAsChild:!0}),y=(0,i.forwardRef)(function(e,r){let i=(0,n.useDialogContext)();return(0,t.jsx)(a.chakra.button,{...e,ref:r,onClick:()=>i.setOpen(!1)})}),x=l(r.Dialog.Backdrop,"backdrop",{forwardAsChild:!0}),w=l("div","body"),_=l("div","footer"),C=l("div","header"),k=r.Dialog.Context;e.s(["ActionTrigger",()=>y,"Backdrop",()=>x,"Body",()=>w,"CloseTrigger",()=>b,"Content",()=>g,"Context",()=>k,"Description",()=>m,"Footer",()=>_,"Header",()=>C,"Positioner",()=>p,"PropsProvider",()=>c,"Root",()=>h,"RootProvider",()=>d,"Title",()=>v,"Trigger",()=>f],82503);var S=e.i(82503);e.s(["Dialog",0,S],59889);var E=e.i(92109),O=e.i(62258),I=e.i(21173);let P=e=>{let{children:r,disabled:n}=e,[o,a]=(0,i.useState)(e.container?.current),s=(0,i.useSyncExternalStore)(R,()=>!1,()=>!0),{getRootNode:l}=(0,I.useEnvironmentContext)();if((0,i.useEffect)(()=>{a(()=>e.container?.current)},[e.container]),s||n)return(0,t.jsx)(t.Fragment,{children:r});let u=o??T(l);return(0,t.jsx)(t.Fragment,{children:i.Children.map(r,e=>(0,O.createPortal)(e,u))})},T=e=>{let t=e?.(),r=t.getRootNode();return(0,E.isShadowRoot)(r)?r:(0,E.getDocument)(t).body},R=()=>()=>{};e.s(["Portal",()=>P],70839)},23331,e=>{"use strict";let{withContext:t,PropsProvider:r}=(0,e.i(30315).createRecipeContext)({key:"text"}),n=t("p");n.displayName="Text",e.s(["Text",()=>n])},39196,62994,e=>{"use strict";var t=e.i(64789);function r(e,n=[]){let i=(0,t.useRef)(()=>{throw Error("Cannot call an event handler while rendering.")});return(0,t.useInsertionEffect)(()=>{i.current=e}),(0,t.useCallback)((...e)=>i.current?.(...e),n)}function n(e={}){let i=r(e.onOpen),o=r(e.onClose),[a,s]=(0,t.useState)(e.defaultOpen||!1),l=void 0!==e.open?e.open:a,u=void 0!==e.open,c=(0,t.useCallback)(()=>{u||s(!1),o?.()},[u,o]),d=(0,t.useCallback)(()=>{u||s(!0),i?.()},[u,i]),h=(0,t.useCallback)(()=>{l?c():d()},[l,d,c]);return{open:l,onOpen:d,onClose:c,onToggle:h,setOpen:s}}e.s(["useCallbackRef",()=>r],62994),e.s(["useDisclosure",()=>n],39196)},17359,(e,t,r)=>{!function(){"use strict";var e={114:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else if(47===r)break;else r=47;if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2)){if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var e,n,i="",o=!1,a=arguments.length-1;a>=-1&&!o;a--)a>=0?n=arguments[a]:(void 0===e&&(e=""),n=e),t(n),0!==n.length&&(i=n+"/"+i,o=47===n.charCodeAt(0));if(i=r(i,!o),o)if(i.length>0)return"/"+i;else return"/";return i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return(0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r||(e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var o=e.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var l=r.length-s,u=a<l?a:l,c=-1,d=0;d<=u;++d){if(d===u){if(l>u){if(47===r.charCodeAt(s+d))return r.slice(s+d+1);else if(0===d)return r.slice(s+d)}else a>u&&(47===e.charCodeAt(i+d)?c=d:0===d&&(c=0));break}var h=e.charCodeAt(i+d);if(h!==r.charCodeAt(s+d))break;47===h&&(c=d)}var f="";for(d=i+c+1;d<=o;++d)(d===o||47===e.charCodeAt(d))&&(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return -1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!a){i=n+1;break}}else -1===l&&(a=!1,l=n+1),s>=0&&(u===r.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){i=n+1;break}}else -1===o&&(a=!1,o=n+1);return -1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47===l){if(!o){n=s+1;break}continue}-1===i&&(o=!1,i=s+1),46===l?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1)}return -1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){var t,r;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r},parse:function(e){t(e);var r,n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i=e.charCodeAt(0),o=47===i;o?(n.root="/",r=1):r=0;for(var a=-1,s=0,l=-1,u=!0,c=e.length-1,d=0;c>=r;--c){if(47===(i=e.charCodeAt(c))){if(!u){s=c+1;break}continue}-1===l&&(u=!1,l=c+1),46===i?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1)}return -1===a||-1===l||0===d||1===d&&a===l-1&&a===s+1?-1!==l&&(0===s&&o?n.base=n.name=e.slice(1,l):n.base=n.name=e.slice(s,l)):(0===s&&o?(n.name=e.slice(1,a),n.base=e.slice(1,l)):(n.name=e.slice(s,a),n.base=e.slice(s,l)),n.ext=e.slice(a,l)),s>0?n.dir=e.slice(0,s-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}},a=!0;try{e[t](o,o.exports,n),a=!1}finally{a&&delete r[t]}return o.exports}n.ab="/ROOT/node_modules/.pnpm/next@16.0.1_@babel+core@7.28.5_babel-plugin-macros@3.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/compiled/path-browserify/",t.exports=n(114)}()},62754,e=>{"use strict";function t(e){return"query"===e.type}function r(e){return"query_base"===e.type}function n(e){return"query_diff"===e.type}function i(e){return"value_diff"===e.type}function o(e){return"value_diff_detail"===e.type}function a(e){return"profile"===e.type}function s(e){return"profile_diff"===e.type}function l(e){return"row_count"===e.type}function u(e){return"row_count_diff"===e.type}function c(e){return"top_k_diff"===e.type}function d(e){return"histogram_diff"===e.type}e.s(["isHistogramDiffRun",()=>d,"isProfileDiffRun",()=>s,"isProfileRun",()=>a,"isQueryBaseRun",()=>r,"isQueryDiffRun",()=>n,"isQueryRun",()=>t,"isRowCountDiffRun",()=>u,"isRowCountRun",()=>l,"isTopKDiffRun",()=>c,"isValueDiffDetailRun",()=>o,"isValueDiffRun",()=>i])},84404,(e,t,r)=>{!function(n,i){"use strict";var o="function",a="undefined",s="object",l="string",u="model",c="name",d="type",h="vendor",f="version",p="architecture",g="console",m="mobile",v="tablet",b="smarttv",y="wearable",x="embedded",w="Amazon",_="Apple",C="ASUS",k="BlackBerry",S="Browser",E="Chrome",O="Firefox",I="Google",P="Huawei",T="Microsoft",R="Motorola",A="Opera",M="Samsung",N="Sharp",D="Sony",L="Xiaomi",V="Zebra",F="Facebook",j=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},z=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},B=function(e,t){return typeof e===l&&-1!==H(t).indexOf(H(e))},H=function(e){return e.toLowerCase()},W=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,350)},U=function(e,t){for(var r,n,i,a,l,u,c=0;c<t.length&&!l;){var d=t[c],h=t[c+1];for(r=n=0;r<d.length&&!l;)if(l=d[r++].exec(e))for(i=0;i<h.length;i++)u=l[++n],typeof(a=h[i])===s&&a.length>0?2===a.length?typeof a[1]==o?this[a[0]]=a[1].call(this,u):this[a[0]]=a[1]:3===a.length?typeof a[1]!==o||a[1].exec&&a[1].test?this[a[0]]=u?u.replace(a[1],a[2]):void 0:this[a[0]]=u?a[1].call(this,u,a[2]):void 0:4===a.length&&(this[a[0]]=u?a[3].call(this,u.replace(a[1],a[2])):void 0):this[a]=u||void 0;c+=2}},$=function(e,t){for(var r in t)if(typeof t[r]===s&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(B(t[r][n],e))return"?"===r?void 0:r}else if(B(t[r],e))return"?"===r?void 0:r;return e},q={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},G={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,f],[/opios[\/ ]+([\w\.]+)/i],[f,[c,A+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[c,A]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[c,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],f],[/\bfocus\/([\w\.]+)/i],[f,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[c,A+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[c,A+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[f,[c,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],f],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,F],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[c,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,E+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[f,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[c,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,f],[/(cobalt)\/([\w\.]+)/i],[c,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,H]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",H]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,H]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,M],[d,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,M],[d,m]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,_],[d,m]],[/(ipad\d+,\d+)/i],[u,[h,_],[d,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,_],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,_],[d,v]],[/(macintosh);/i],[u,[h,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,P],[d,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,P],[d,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,R],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,R],[d,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,"LG"],[d,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,"LG"],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[u,[h,I],[d,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,I],[d,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,D],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,D],[d,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,C],[d,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,C],[d,m]],[/(nexus 9)/i],[u,[h,"HTC"],[d,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,m]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,N],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[d,m]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[d,v]],[/(surface duo)/i],[u,[h,T],[d,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[u,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,v]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,v]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,v]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,v]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,v]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,v]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,v]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,m]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,v]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,v]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,v]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,v]],[/(sprint) (\w+)/i],[h,u,[d,m]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,T],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,V],[d,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,V],[d,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,D],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,T],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,b]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,M],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[d,b]],[/(apple) ?tv/i],[h,[u,_+" TV"],[d,b]],[/crkey/i],[[u,E+"cast"],[h,I],[d,b]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,N],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,D],[d,b]],[/(mitv-\w{5}) bui/i],[u,[h,L],[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,W],[u,W],[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/((pebble))app/i],[h,u,[d,y]],[/droid.+; (glass) \d/i],[u,[h,I],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,V],[d,y]],[/(quest( 2)?)/i],[u,[h,F],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[f,$,q]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[f,$,q]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,f],[/\(bb(10);/i],[f,[c,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[c,E+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],f],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,f],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,f]]},K=function(e,t){if(typeof e===s&&(t=e,e=void 0),!(this instanceof K))return new K(e,t).getResult();var r=e||(typeof n!==a&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),i=t?j(G,t):G;return this.getBrowser=function(){var e,t={};return t[c]=void 0,t[f]=void 0,U.call(t,r,i.browser),t.major=typeof(e=t.version)===l?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={};return e[p]=void 0,U.call(e,r,i.cpu),e},this.getDevice=function(){var e={};return e[h]=void 0,e[u]=void 0,e[d]=void 0,U.call(e,r,i.device),e},this.getEngine=function(){var e={};return e[c]=void 0,e[f]=void 0,U.call(e,r,i.engine),e},this.getOS=function(){var e={};return e[c]=void 0,e[f]=void 0,U.call(e,r,i.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===l&&e.length>350?W(e,350):e,this},this.setUA(r),this};if(K.VERSION="0.7.33",K.BROWSER=z([c,f,"major"]),K.CPU=z([p]),K.DEVICE=z([u,h,d,g,m,b,v,y,x]),K.ENGINE=K.OS=z([c,f]),typeof r!==a)t.exports&&(r=t.exports=K),r.UAParser=K;else if(typeof define===o&&define.amd)e.r,void 0!==K&&e.v(K);else typeof n!==a&&(n.UAParser=K);var Y=typeof n!==a&&(n.jQuery||n.Zepto);if(Y&&!Y.ua){var X=new K;Y.ua=X.getResult(),Y.ua.get=function(){return X.getUA()},Y.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var r in t)Y.ua[r]=t[r]}}}("object"==typeof window?window:e.e)},3158,e=>{"use strict";let t,r;e.i(48962);var n,i,o,a,s,l,u,c,d,h,f,p,g,m,v,b,y,x,w,_,C,k,S,E,O,I,P,T,R,A,M,N,D,L,V,F,j,z,B,H,W,U,$,q,G,K,Y,X,Q=e.i(24627);(n=T||(T={})).SET="$set",n.SET_ONCE="$setOnce",n.ADD="$add",n.APPEND="$append",n.PREPEND="$prepend",n.REMOVE="$remove",n.PREINSERT="$preInsert",n.POSTINSERT="$postInsert",n.UNSET="$unset",n.CLEAR_ALL="$clearAll",(i=R||(R={})).IDENTIFY="$identify",i.GROUP_IDENTIFY="$groupidentify",i.REVENUE="revenue_amount";var Z="".concat("AMP","_unsent"),J="$default_instance",ee="https://api2.amplitude.com/2/httpapi",et="dclid",er="fbclid",en="gbraid",ei="gclid",eo="ko_click_id",ea="li_fat_id",es="msclkid",el="rdt_cid",eu="ttclid",ec="twclid",ed="wbraid",eh={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},ef=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],ep=["authorization","cookie","set-cookie"],eg=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var r=e[t];if(!em(t,r))return!1}return!0},em=function(e,t){var r,n;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=(0,Q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&eg(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else if(null==t)return!1;else if("object"==typeof t)return eg(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},ev=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,Q.__assign)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(A.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(A.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(A.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(A.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(A.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(A.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(A.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(A.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(A.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[A.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,r){return!(void 0!==this._properties[A.CLEAR_ALL]||this._propertySet.has(t))&&(e===A.ADD?"number"==typeof r:e===A.UNSET||e===A.REMOVE||em(t,r))},e}();(o=A||(A={})).SET="$set",o.SET_ONCE="$setOnce",o.ADD="$add",o.APPEND="$append",o.PREPEND="$prepend",o.REMOVE="$remove",o.PREINSERT="$preInsert",o.POSTINSERT="$postInsert",o.UNSET="$unset",o.CLEAR_ALL="$clearAll";var eb=[A.CLEAR_ALL,A.UNSET,A.SET,A.SET_ONCE,A.ADD,A.APPEND,A.PREPEND,A.PREINSERT,A.POSTINSERT,A.REMOVE];(a=M||(M={})).Unknown="unknown",a.Skipped="skipped",a.Success="success",a.RateLimit="rate_limit",a.PayloadTooLarge="payload_too_large",a.Invalid="invalid",a.Failed="failed",a.Timeout="Timeout",a.SystemError="SystemError";var ey=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=M.Unknown),{event:e,code:t,message:r}},ex=e.i(94823),ew=(0,Q.__spreadArray)([],(0,Q.__read)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),e_=function(e){var t,r=(0,ex.getGlobalScope)();if(!(null==(t=null==r?void 0:r.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e_);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,(0,Q.__spreadArray)([],(0,Q.__read)(n.entries()),!1).map(function(e){var t=(0,Q.__read)(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(ew[n]):ew[n]}).join("")},eC=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var r,n;return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return this.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=e_(),this.loggerProvider.warn("Plugin name is undefined. \n Generating a random UUID for plugin name: ".concat(e.name,". \n Set a name for the plugin to prevent it from being added multiple times."))),e.type=null!=(r=e.type)?r:"enrichment",[4,null==(n=e.setup)?void 0:n.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e,t){var r;return(0,Q.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:if(-1===(n=this.plugins.findIndex(function(t){return t.name===e})))return t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2];return i=this.plugins[n],this.plugins.splice(n,1),[4,null==(r=i.teardown)?void 0:r.call(i)];case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this.applying=!1,this.plugins.map(function(e){var t;return null==(t=e.teardown)?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(r){t.queue.push([e,r]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a,s,l,u,c,d,h,f,p,g;return(0,Q.__generator)(this,function(m){switch(m.label){case 0:if(!e)return[2];t=(0,Q.__read)(e,1)[0],r=(0,Q.__read)(e,2)[1],this.loggerProvider.log("Timeline.apply: Initial event",t),n=this.plugins.filter(function(e){return"before"===e.type}),m.label=1;case 1:m.trys.push([1,6,7,8]),o=(i=(0,Q.__values)(n)).next(),m.label=2;case 2:if(o.done)return[3,5];if(!(a=o.value).execute)return[3,4];return[4,a.execute((0,Q.__assign)({},t))];case 3:if(null===(s=m.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),m.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return h={error:m.sent()},[3,8];case 7:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(h)throw h.error}return[7];case 8:l=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),m.label=9;case 9:m.trys.push([9,14,15,16]),c=(u=(0,Q.__values)(l)).next(),m.label=10;case 10:if(c.done)return[3,13];if(!(a=c.value).execute)return[3,12];return[4,a.execute((0,Q.__assign)({},t))];case 11:if(null===(s=m.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),m.label=12;case 12:return c=u.next(),[3,10];case 13:return[3,16];case 14:return p={error:m.sent()},[3,16];case 15:try{c&&!c.done&&(g=u.return)&&g.call(u)}finally{if(p)throw p.error}return[7];case 16:return d=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(t))),Promise.all(d.map(function(e){var r=(0,Q.__assign)({},t);return e.execute(r).catch(function(e){return ey(r,0,String(e))})})).then(function(e){var n=(0,Q.__read)(e,1)[0]||ey(t,100,"Event not tracked, no destination plugins on the instance");r(n)}),[2]}})})},e.prototype.flush=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return r.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return r.sent(),[2]}})})},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onIdentityChanged)||r.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onSessionIdChanged)||r.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onOptOutChanged)||r.call(t,e)})},e}(),ek=function(e,t){return(0,Q.__assign)((0,Q.__assign)({},t),{event_type:R.IDENTIFY,user_properties:e.getUserProperties()})},eS=function(e,t,r,n){var i;return(0,Q.__assign)((0,Q.__assign)({},n),{event_type:R.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:((i={})[e]=t,i)})},eE=function(e,t,r){var n,i=new ev;return i.set(e,t),(0,Q.__assign)((0,Q.__assign)({},r),{event_type:R.IDENTIFY,user_properties:i.getUserProperties(),groups:((n={})[e]=t,n)})},eO=function(e){return{promise:e||Promise.resolve()}},eI=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new eC(this),this.name=e}return e.prototype._init=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:t=this[e],this[e]=[],s.label=1;case 1:s.trys.push([1,8,9,10]),n=(r=(0,Q.__values)(t)).next(),s.label=2;case 2:if(n.done)return[3,7];if(!((i=(0,n.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return s.sent(),[3,6];case 4:return[4,i];case 5:s.sent(),s.label=6;case 6:return n=r.next(),[3,2];case 7:return[3,10];case 8:return o={error:s.sent()},[3,10];case 9:try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(o)throw o.error}return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:s.sent(),s.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,r){var n=(0,Q.__assign)((0,Q.__assign)((0,Q.__assign)({},"string"==typeof e?{event_type:e}:e),r),t&&{event_properties:t});return eO(this.dispatch(n))},e.prototype.identify=function(e,t){var r=ek(e,t);return eO(this.dispatch(r))},e.prototype.groupIdentify=function(e,t,r,n){var i=eS(e,t,r,n);return eO(this.dispatch(i))},e.prototype.setGroup=function(e,t,r){var n=eE(e,t,r);return eO(this.dispatch(n))},e.prototype.revenue=function(e,t){var r=(0,Q.__assign)((0,Q.__assign)({},t),{event_type:R.REVENUE,event_properties:e.getEventProperties()});return eO(this.dispatch(r))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),eO())},e.prototype._addPlugin=function(e){return eO(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),eO())},e.prototype._removePlugin=function(e){return eO(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(ey(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t=this;return(0,Q.__generator)(this,function(r){return this.isReady?[2,this.process(e)]:[2,new Promise(function(r){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,r))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t={};if(void 0===e)return t;var r={};return Object.keys(e).forEach(function(t){Object.values(T).includes(t)||(r[t]=e[t])}),eb.forEach(function(r){if(Object.keys(e).includes(r)){var n=e[r];switch(r){case T.CLEAR_ALL:Object.keys(t).forEach(function(e){delete t[e]});break;case T.UNSET:Object.keys(n).forEach(function(e){delete t[e]});break;case T.SET:Object.assign(t,n)}}}),Object.assign(t,r),t},e.prototype.process=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),this.config.optOut)return[2,ey(e,0,"Event skipped due to optOut config")];return e.event_type===R.IDENTIFY&&(t=this.getOperationAppliedUserProperties(e.user_properties),this.timeline.onIdentityChanged({userProperties:t})),[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):100===r.code?this.config.loggerProvider.warn(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return n=String(i.sent()),this.config.loggerProvider.error(n),[2,r=ey(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,!!e))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.timeline.onOptOutChanged(e),this.config.optOut=!!e)},e.prototype.flush=function(){return eO(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});return void 0===t?void this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e)):t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),eP=function(e,t){var r=Math.max(t,1);return e.reduce(function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e},[])};(s=N||(N={}))[s.None=0]="None",s[s.Error=1]="Error",s[s.Warn=2]="Warn",s[s.Verbose=3]="Verbose",s[s.Debug=4]="Debug";var eT="Amplitude Logger ",eR=function(){function e(){this.logLevel=N.None}return e.prototype.disable=function(){this.logLevel=N.None},e.prototype.enable=function(e){void 0===e&&(e=N.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<N.Verbose||console.log("".concat(eT,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<N.Warn||console.warn("".concat(eT,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<N.Error||console.error("".concat(eT,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<N.Debug||console.log("".concat(eT,"[Debug]: ").concat(e.join(" ")))},e}(),eA=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:J,logLevel:N.Warn,loggerProvider:new eR,offline:!1,optOut:!1,serverUrl:ee,serverZone:"US",useBatch:!1}},eM=function(){function e(e){this._optOut=!1;var t,r,n,i,o=eA();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!=(r=e.logLevel)?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!=(n=e.optOut)?n:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=eN(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),eN=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=eA().serverZone),void 0===r&&(r=eA().useBatch),e)return{serverUrl:e,serverZone:void 0};var n,i=["US","EU"].includes(t)?t:eA().serverZone;return{serverZone:i,serverUrl:(n=r,"EU"===i?n?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":n?"https://api2.amplitude.com/batch":ee)}},eD=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function eL(e){return e>=200&&e<300}var eV=function(e){return void 0===e&&(e=0),(Error().stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},eF=function(e){return function(){var t=(0,Q.__assign)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},ej=function(e,t){var r,n;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,Q.__values)(t.split(".")),o=i.next();!o.done;o=i.next()){var a=o.value;if(!(a in e))return;e=e[a]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},ez=function(e,t){return function(){var r,n,i={};try{for(var o=(0,Q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;i[s]=ej(e,s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},eB=function(e,t,r,n,i){return void 0===i&&(i=null),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=r(),l=s.logger,u=s.logLevel;if(u&&u<N.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:eV(1),time:{start:new Date().toISOString()},states:{}};n&&c.states&&(c.states.before=n());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){n&&c.states&&(c.states.after=n()),c.time&&(c.time.end=new Date().toISOString()),l.debug(JSON.stringify(c,null,2))}):(n&&c.states&&(c.states.after=n()),c.time&&(c.time.end=new Date().toISOString()),l.debug(JSON.stringify(c,null,2))),d}};function eH(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var eW=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n=this;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(Z,"_").concat(this.config.apiKey.substring(0,10)),[4,null==(t=this.config.storageProvider)?void 0:t.get(this.storageKey)];case 1:return(r=i.sent())&&r.length>0&&Promise.all(r.map(function(e){return n.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=e_()),new Promise(function(r){t.queue.push({event:e,attempts:0,callback:function(e){return r(e)},timeout:0}),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n=this;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2];if(this.flushId)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2];return this.flushId=this.scheduleId,this.resetSchedule(),t=[],r=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):r.push(e)}),[4,eP(t,this.config.flushQueueSize).reduce(function(t,r){return(0,Q.__awaiter)(n,void 0,void 0,function(){return(0,Q.__generator)(this,function(n){switch(n.label){case 0:return[4,t];case 1:return n.sent(),[4,this.send(r,e)];case 2:return[2,n.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){return void 0===t&&(t=!0),(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n,i,o;return(0,Q.__generator)(this,function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,Q.__rest)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new eD,a.label=1;case 1:return a.trys.push([1,3,,4]),n=eN(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(n,r)];case 2:if(null===(i=a.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in i?this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(eH(i))):this.fulfillRequest(e,i.statusCode,i.status),[2];return this.handleResponse(i,e),[3,4];case 3:var s;return o=(s=a.sent())instanceof Error?s.message:String(s),this.config.loggerProvider.error(o),this.handleResponse({status:M.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var r=e.status;switch(r){case M.Success:this.handleSuccessResponse(e,t);break;case M.Invalid:this.handleInvalidResponse(e,t);break;case M.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case M.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var r=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))return void this.fulfillRequest(t,e.statusCode,e.body.error);var n=new Set((0,Q.__spreadArray)((0,Q.__spreadArray)((0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,Q.__read)(Object.values(e.body.eventsWithMissingFields)),!1),(0,Q.__read)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,Q.__read)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){return!n.has(i)||void r.fulfillRequest([t],e.statusCode,e.body.error)});i.length>0&&this.config.loggerProvider.warn(eH(e));var o=this.removeEventsExceedFlushMaxRetries(i);this.scheduleEvents(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length)return void this.fulfillRequest(t,e.statusCode,e.body.error);this.config.loggerProvider.warn(eH(e)),this.config.flushQueueSize/=2;var r=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(r)},e.prototype.handleRateLimitResponse=function(e,t){var r=this,n=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,a=new Set(n),s=new Set(i),l=new Set(o),u=t.filter(function(t,n){return t.event.user_id&&a.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)?void r.fulfillRequest([t],e.statusCode,e.body.error):(l.has(n)&&(t.timeout=r.throttleTimeout),!0)});u.length>0&&this.config.loggerProvider.warn(eH(e));var c=this.removeEventsExceedFlushMaxRetries(u);this.scheduleEvents(c)},e.prototype.handleOtherResponse=function(e){var t=this,r=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),n=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(n)},e.prototype.fulfillRequest=function(e,t,r){var n,i,o;eL(t)?null==(o=this.diagnosticsClient)||o.increment("analytics.events.sent",e.length):(null==(n=this.diagnosticsClient)||n.increment("analytics.events.dropped",e.length),null==(i=this.diagnosticsClient)||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:r,stack_trace:eV()})),this.removeEvents(e),e.forEach(function(e){return e.callback(ey(e.event,t,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),eU=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){return eg(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?(0,Q.__assign)({},this.properties):{};return e[D.REVENUE_PRODUCT_ID]=this.productId,e[D.REVENUE_QUANTITY]=this.quantity,e[D.REVENUE_PRICE]=this.price,e[D.REVENUE_TYPE]=this.revenueType,e[D.REVENUE_CURRENCY]=this.currency,e[D.REVENUE]=this.revenue,e[D.RECEIPT]=this.receipt,e[D.RECEIPT_SIG]=this.receiptSig,e},e}();(l=D||(D={})).REVENUE_PRODUCT_ID="$productId",l.REVENUE_QUANTITY="$quantity",l.REVENUE_PRICE="$price",l.REVENUE_TYPE="$revenueType",l.REVENUE_CURRENCY="$currency",l.REVENUE="$revenue",l.RECEIPT="$receipt",l.RECEIPT_SIG="$receiptSig";var e$=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:eq(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),eq=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},eG=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),eK=function(){return(eK=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function eY(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function eX(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}"function"==typeof SuppressedError&&SuppressedError;var eQ=function(e,t){var r,n,i=typeof e;if(i!==typeof t)return!1;try{for(var o=eY(["string","number","boolean","undefined"]),a=o.next();!a.done;a=o.next())if(a.value===i)return e===t}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var s=Array.isArray(e),l=Array.isArray(t);if(s!==l)return!1;if(s&&l){for(var u=0;u<e.length;u++)if(!eQ(e[u],t[u]))return!1}else{if(!eQ(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var c=!0;return Object.keys(e).forEach(function(r){eQ(e[r],t[r])||(c=!1)}),c}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var eZ=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=eK({},this.identity.userProperties),r=eK(eK({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,i,o,a,s,l=r.userProperties||{};try{for(var u=eY(Object.entries(e)),c=u.next();!c.done;c=u.next()){var d=eX(c.value,2),h=d[0],f=d[1];switch(h){case"$set":try{for(var p=(i=void 0,eY(Object.entries(f))),g=p.next();!g.done;g=p.next()){var m=eX(g.value,2),v=m[0],b=m[1];l[v]=b}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var y=(a=void 0,eY(Object.keys(f))),x=y.next();!x.done;x=y.next()){var v=x.value;delete l[v]}}catch(e){a={error:e}}finally{try{x&&!x.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return eK({},this.identity)},e.prototype.setIdentity=function(e){var t=eK({},this.identity);this.identity=eK({},e),eQ(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),eJ="undefined"!=typeof globalThis?globalThis:e.g,e0=function(){function e(){this.identityStore=new eZ,this.eventBridge=new eG,this.applicationContextProvider=new e$}return e.getInstance=function(t){return eJ.analyticsConnectorInstances||(eJ.analyticsConnectorInstances={}),eJ.analyticsConnectorInstances[t]||(eJ.analyticsConnectorInstances[t]=new e),eJ.analyticsConnectorInstances[t]},e}(),e1=function(e){return void 0===e&&(e=J),e0.getInstance(e)},e2=function(e,t){e1(t).identityStore.editIdentity().setUserId(e).commit()},e5=function(e,t){e1(t).identityStore.editIdentity().setDeviceId(e).commit()},e3=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},e4=function(){function e(){this.name="identity",this.type="before",this.identityStore=e1().identityStore}return e.prototype.execute=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(r){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return e.instanceName&&(this.identityStore=e1(e.instanceName).identityStore),[2]})})},e}(),e6=function(){var e,t=(0,ex.getGlobalScope)();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var r=t.split("=",2),n=e8(r[0]),i=e8(r[1]);return i&&(e[n]=i),e},{}):{}},e8=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},e7=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var r=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}(),e9=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.callbackInfos=[],this.apiKey=e,this.serverUrl=n||("US"===r?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new e7(e,t)}return e.prototype.subscribe=function(e,t,r){var n=e_(),i={id:n,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),n},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return -1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return[4,this.fetch()];case 1:return e=r.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(r){t.sendCallback(r,e,"remote")}),[2]}})})},e.prototype.subscribeAll=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:return t=this.fetch().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),r=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,r])];case 1:return void 0!==(n=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(n))),this.sendCallback(e,n,"cache")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:r=new Promise(function(e,r){setTimeout(function(){r("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.fetch(),r])];case 2:return n=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,n,"remote"),this.storage.setConfig(n),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(n=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,n,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,n,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,r){var n;e.lastCallback=new Date,n=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(n,r,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n,i,o,a,s,l=this;return(0,Q.__generator)(this,function(u){switch(u.label){case 0:r=t/e,n={remoteConfig:null,lastFetch:new Date},i=function(n){var i,a,s,u,c;return(0,Q.__generator)(this,function(d){switch(d.label){case 0:i=new AbortController,a=setTimeout(function(){return i.abort()},t),d.label=1;case 1:return d.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:i.signal})];case 2:if((s=d.sent()).ok)return[3,4];return[4,s.text()];case 3:return u=d.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(s.status,": ").concat(u)),[3,6];case 4:return[4,s.json()];case 5:return[2,{value:{remoteConfig:d.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(c=d.sent())instanceof Error&&"AbortError"===c.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),c),[3,9];case 8:return clearTimeout(a),[7];case 9:if(!(n<e-1))return[3,11];return[4,new Promise(function(e){return setTimeout(e,l.getJitterDelay(r))})];case 10:d.sent(),d.label=11;case 11:return[2]}})},o=this,a=0,u.label=1;case 1:if(!(a<e))return[3,4];return[5,i(a)];case 2:if("object"==typeof(s=u.sent()))return[2,s.value];u.label=3;case 3:return a++,[3,1];case 4:return[2,n]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),r=new URLSearchParams;return r.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(r.toString())},e.CONFIG_GROUP="browser",e}(),te="tags",tt="counters",tr="histograms",tn="events",ti="internal",to="last_flush_timestamp",ta=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return(null==(e=(0,ex.getGlobalScope)())?void 0:e.indexedDB)!==void 0},e.prototype.getDB=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,r){var n=indexedDB.open(e.dbName,1);n.onerror=function(){e.dbPromise=null,r(Error("Failed to open IndexedDB"))},n.onsuccess=function(){var r=n.result;r.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},r.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),r.close()},t(r)},n.onupgradeneeded=function(t){var r=t.target.result;e.createTables(r)}})},e.prototype.createTables=function(e){e.objectStoreNames.contains(te)||e.createObjectStore(te,{keyPath:"key"}),e.objectStoreNames.contains(tt)||e.createObjectStore(tt,{keyPath:"key"}),e.objectStoreNames.contains(tr)||e.createObjectStore(tr,{keyPath:"key"}),e.objectStoreNames.contains(tn)||e.createObjectStore(tn,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1}),e.objectStoreNames.contains(ti)||e.createObjectStore(ti,{keyPath:"key"})},e.prototype.setTags=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([te],"readwrite")).objectStore(te),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tags",e),n()},o.forEach(function(e){var t=(0,Q.__read)(e,2),n=t[0],o=t[1];r.put({key:n,value:o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tag",n,o,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",n),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([tt],"readwrite")).objectStore(tt),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to increment counters",e),n()},o.forEach(function(e){var t=(0,Q.__read)(e,2),n=t[0],o=t[1],a=r.get(n);a.onsuccess=function(){var e=a.result,t=e?e.value:0;r.put({key:n,value:t+o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},a.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",n),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([tr],"readwrite")).objectStore(tr),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),n()},o.forEach(function(e){var t=(0,Q.__read)(e,2),n=t[0],o=t[1],a=r.get(n);a.onsuccess=function(){var e,t=a.result;e=t?{key:n,count:t.count+o.count,min:Math.min(t.min,o.min),max:Math.max(t.max,o.max),sum:t.sum+o.sum}:{key:n,count:o.count,min:o.min,max:o.max,sum:o.sum},r.put(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},a.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===e.length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([tn],"readwrite")).objectStore(tn),[2,new Promise(function(n){t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event records",e),n()};var o=r.count();o.onsuccess=function(){var t=Math.max(0,10-o.result);t<e.length&&i.logger.debug("DiagnosticsStorage: Only added ".concat(t," of ").concat(e.length," events due to storage limit")),e.slice(0,t).forEach(function(e){r.add(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},o.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",n),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n,i;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=(r=o.sent().transaction([ti],"readwrite")).objectStore(ti),[2,new Promise(function(i,o){r.onabort=function(){return o(Error("Failed to set internal value"))};var a=n.put({key:e,value:t});a.onsuccess=function(){return i()},a.onerror=function(){return o(Error("Failed to set internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",i),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=(t=i.sent().transaction([ti],"readonly")).objectStore(ti),[2,new Promise(function(n,i){t.onabort=function(){return i(Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return n(o.result)},o.onerror=function(){return i(Error("Failed to get internal value"))}})];case 2:return n=i.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",n),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getInternal(to)];case 1:return[2,(e=r.sent())?parseInt(e.value,10):void 0];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.setInternal(to,e.toString())];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).clear();i.onsuccess=function(){return r()},i.onerror=function(){return n(Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=s.sent().transaction([te,tt,tr,tn],"readwrite"),[4,Promise.all([this.getAllFromStore(e,te),this.getAllFromStore(e,tt),this.getAllFromStore(e,tr),this.getAllFromStore(e,tn)])];case 2:return r=(t=Q.__read.apply(void 0,[s.sent(),4]))[0],n=t[1],i=t[2],o=t[3],[4,Promise.all([this.clearTable(e,tt),this.clearTable(e,tr),this.clearTable(e,tn)])];case 3:return s.sent(),[2,{tags:r,counters:n,histogramStats:i,events:o}];case 4:return a=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",a),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).getAll();i.onsuccess=function(){return r(i.result)},i.onerror=function(){return n(Error("Failed to get all from ".concat(t)))}})},e}(),ts=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t},tl=function(e,t){return 31*Math.abs(ts(e.toString()))%1e5/1e5<t},tu=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===r?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(n,null,2)),this.config=(0,Q.__assign)({enabled:!0,sampleRate:0},n),this.startTimestamp=Date.now(),this.shouldTrack=tl(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,ta.isSupported()?this.storage=new ta(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&this.increment("sdk.diagnostics.sampled.in.and.enabled")}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");this.inMemoryTags[e]=t,this.startTimersIfNeeded()}},e.prototype.increment=function(e,t){if(void 0===t&&(t=1),this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");var r=this.inMemoryHistograms[e];r?(r.count+=1,r.min=Math.min(r.min,t),r.max=Math.max(r.max,t),r.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=10)return void this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},3e5))},e.prototype.saveAllDataToStorage=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t,r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];return e=(0,Q.__assign)({},this.inMemoryTags),t=(0,Q.__assign)({},this.inMemoryCounters),r=(0,Q.__assign)({},this.inMemoryHistograms),n=(0,Q.__spreadArray)([],(0,Q.__read)(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(r),this.storage.addEventRecords(n)])];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,o,a,s,l,u;return(0,Q.__generator)(this,function(c){switch(c.label){case 0:if(!this.storage)return[2];return[4,this.saveAllDataToStorage()];case 1:return c.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:if(t=(e=c.sent()).tags,r=e.counters,n=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),a={},r.forEach(function(e){a[e.key]=e.value}),s={},n.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),l=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(a).length&&0===Object.keys(s).length&&0===l.length)return[2];return u={tags:o,histogram:s,counters:a,events:l},this.fetch(u),[2]}})})},e.prototype.fetch=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),!(0,ex.getGlobalScope)())throw Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:if(!r.sent().ok)return this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2];return this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t,r;return(0,Q.__generator)(this,function(n){switch(n.label){case 0:if(!this.storage)return[2];return e=Date.now(),[4,this.storage.getLastFlushTimestamp()];case 1:if(-1===(t=n.sent()||-1))return this.storage.setLastFlushTimestamp(e),this._setFlushTimer(3e5),[2];return(r=e-t)>=3e5?this._flush():this._setFlushTimer(3e5-r),[2]}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=tl(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),tc=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},td=function(e){return tc(e,"attribution")},th=function(e){return tc(e,"pageViews")},tf=function(e){return tc(e,"sessions")},tp=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},tg=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},tm=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},tv=function(e){if(tg(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},tb=function(e){if(tm(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},ty=function(e){var t;if(tp(e.autocapture)){var r=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?r=e.autocapture.networkTracking:e.networkTrackingOptions&&(r=e.networkTrackingOptions),(0,Q.__assign)((0,Q.__assign)({},r),{captureRules:null==(t=null==r?void 0:r.captureRules)?void 0:t.map(function(t){var r,n,i;if((null==(r=t.urls)?void 0:r.length)&&(null==(n=t.hosts)?void 0:n.length)){var o=JSON.stringify(t.hosts),a=JSON.stringify(t.urls);return null==(i=e.loggerProvider)||i.warn("Found network capture rule with both urls='".concat(a,"' and hosts='").concat(o,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),(0,Q.__assign)((0,Q.__assign)({},t),{hosts:void 0})}return t})})}},tx=function(e){var t,r=function(){return!1},n=void 0,i=e.pageCounter;return th(e.defaultTracking)&&(r=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:r,trackHistoryChanges:n,eventType:t,pageCounter:i}},tw=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var l=s.apply(e,o);"function"==typeof a&&a(null==l?void 0:l.promise)}}return e},t_=function(e){return e&&void 0!==e._q},tC=function(){if("undefined"==typeof navigator)return"";var e,t,r,n,i=navigator.userLanguage;return null!=(n=null!=(r=null!=(t=null==(e=navigator.languages)?void 0:e[0])?t:navigator.language)?r:i)?n:""},tk="2.30.0",tS="amplitude-ts",tE=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(tS,"/").concat(tk),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,r;return(0,Q.__awaiter)(this,void 0,void 0,function(){var n,i,o;return(0,Q.__generator)(this,function(a){return n=new Date().getTime(),i=null!=(t=this.config.lastEventId)?t:-1,o=null!=(r=e.event_id)?r:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=n),[2,(0,Q.__assign)((0,Q.__assign)((0,Q.__assign)((0,Q.__assign)((0,Q.__assign)((0,Q.__assign)((0,Q.__assign)((0,Q.__assign)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:n},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:tC()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:e_(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:o,library:this.library,user_agent:this.userAgent})]})})},e}(),tO=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return[4,this.get(e)];case 1:return[2,(t=r.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),tI=function(){function e(e){this.options=(0,Q.__assign)({},e)}return e.prototype.isEnabled=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r;return(0,Q.__generator)(this,function(n){switch(n.label){case 0:if(!(0,ex.getGlobalScope)())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),r="AMP_TEST",n.label=1;case 1:return n.trys.push([1,4,5,7]),[4,t.set(r,e.testValue)];case 2:return n.sent(),[4,t.get(r)];case 3:return[2,n.sent()===e.testValue];case 4:return n.sent(),[2,!1];case 5:return[4,t.remove(r)];case 6:return n.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){var t;return(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=i.sent()))return[2,void 0];try{if(n=null!=(t=tP(r))?t:tT(r),void 0===n)return console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(r)),[2,void 0];return[2,JSON.parse(n)]}catch(t){return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(r)),[2,void 0]}}})})},e.prototype.getRaw=function(e){var t,r;return(0,Q.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,Q.__generator)(this,function(o){return(i=(null!=(r=null==(t=null==(n=(0,ex.getGlobalScope)())?void 0:n.document)?void 0:t.cookie.split("; "))?r:[]).find(function(t){return 0===t.indexOf(e+"=")}))?[2,i.substring(e.length+1)]:[2,void 0]})})},e.prototype.set=function(e,t){var r;return(0,Q.__awaiter)(this,void 0,void 0,function(){var n,i,o,a,s,l,u;return(0,Q.__generator)(this,function(c){try{n=null!=(r=this.options.expirationDays)?r:0,i=null!==t?n:-1,o=void 0,i&&((a=new Date).setTime(a.getTime()+24*i*36e5),o=a),s="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(s+="; expires=".concat(o.toUTCString())),s+="; path=/",this.options.domain&&(s+="; domain=".concat(this.options.domain)),this.options.secure&&(s+="; Secure"),this.options.sameSite&&(s+="; SameSite=".concat(this.options.sameSite)),(l=(0,ex.getGlobalScope)())&&(l.document.cookie=s)}catch(t){u=t instanceof Error?t.message:String(t),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(u))}return[2]})})},e.prototype.remove=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return[2]})})},e}(),tP=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},tT=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},tR=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),["AMP",t,e.substring(0,r)].filter(Boolean).join("_")},tA=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,r,n,i,o,a,s,l,u,c,d,h,f,p,g,m,v,b,y,x,w,_,C=e.code||0,k=this.buildStatus(C);switch(k){case M.Success:return{status:k,statusCode:C,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(r=e.payload_size_bytes)?r:0,serverUploadTime:null!=(n=e.server_upload_time)?n:0}};case M.Invalid:return{status:k,statusCode:C,body:{error:null!=(i=e.error)?i:"",missingField:null!=(o=e.missing_field)?o:"",eventsWithInvalidFields:null!=(a=e.events_with_invalid_fields)?a:{},eventsWithMissingFields:null!=(s=e.events_with_missing_fields)?s:{},eventsWithInvalidIdLengths:null!=(l=e.events_with_invalid_id_lengths)?l:{},epsThreshold:null!=(u=e.eps_threshold)?u:0,exceededDailyQuotaDevices:null!=(c=e.exceeded_daily_quota_devices)?c:{},silencedDevices:null!=(d=e.silenced_devices)?d:[],silencedEvents:null!=(h=e.silenced_events)?h:[],throttledDevices:null!=(f=e.throttled_devices)?f:{},throttledEvents:null!=(p=e.throttled_events)?p:[]}};case M.PayloadTooLarge:return{status:k,statusCode:C,body:{error:null!=(g=e.error)?g:""}};case M.RateLimit:return{status:k,statusCode:C,body:{error:null!=(m=e.error)?m:"",epsThreshold:null!=(v=e.eps_threshold)?v:0,throttledDevices:null!=(b=e.throttled_devices)?b:{},throttledUsers:null!=(y=e.throttled_users)?y:{},exceededDailyQuotaDevices:null!=(x=e.exceeded_daily_quota_devices)?x:{},exceededDailyQuotaUsers:null!=(w=e.exceeded_daily_quota_users)?w:{},throttledEvents:null!=(_=e.throttled_events)?_:[]}};case M.Timeout:default:return{status:k,statusCode:C}}},e.prototype.buildStatus=function(e){return eL(e)?M.Success:429===e?M.RateLimit:413===e?M.PayloadTooLarge:408===e?M.Timeout:e>=400&&e<500?M.Invalid:e>=500?M.Failed:M.Unknown},e}(),tM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,Q.__extends)(t,e),t.prototype.send=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");return[4,fetch(e,{headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"})];case 1:return[4,(r=i.sent()).text()];case 2:n=i.sent();try{return[2,this.buildResponse(JSON.parse(n))]}catch(e){return[2,this.buildResponse({code:r.status})]}}})})},t}(tA),tN=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),r=new e(this.storage),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return i.sent(),[4,r.get(n)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=r.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var r;return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(n){try{null==(r=this.storage)||r.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),tD=function(e){function t(t){var r,n,i,o=this;try{i=null==(r=(0,ex.getGlobalScope)())?void 0:r.localStorage}catch(e){null==(n=null==t?void 0:t.loggerProvider)||n.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return(0,Q.__extends)(t,e),t.prototype.set=function(t,r){var n;return(0,Q.__awaiter)(this,void 0,void 0,function(){var i;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(r)&&r.length>1e3))return[3,2];return i=r.length-1e3,[4,e.prototype.set.call(this,t,r.slice(0,1e3))];case 1:return o.sent(),null==(n=this.loggerProvider)||n.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,r)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(tN),tL=function(e){function t(){var t;return e.call(this,null==(t=(0,ex.getGlobalScope)())?void 0:t.sessionStorage)||this}return(0,Q.__extends)(t,e),t}(tN),tV=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return(0,Q.__extends)(t,e),t.prototype.send=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){var r=this;return(0,Q.__generator)(this,function(n){return[2,new Promise(function(n,i){"undefined"==typeof XMLHttpRequest&&i(Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===r.state.done){var e=o.responseText;try{n(r.buildResponse(JSON.parse(e)))}catch(e){n(r.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))})]})})},t}(tA),tF=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,Q.__extends)(t,e),t.prototype.send=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){var r=this;return(0,Q.__generator)(this,function(n){return[2,new Promise(function(n,i){var o=(0,ex.getGlobalScope)();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var a=JSON.stringify(t);if(o.navigator.sendBeacon(e,JSON.stringify(t)))return n(r.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:a.length,server_upload_time:Date.now()}));return n(r.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tA),tj=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tz=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},tB="[Amplitude]",tH="".concat(tB," Form Started"),tW="".concat(tB," Form Submitted"),tU="".concat(tB," File Downloaded"),t$="session_start",tq="session_end",tG="".concat(tB," File Extension"),tK="".concat(tB," File Name"),tY="".concat(tB," Link ID"),tX="".concat(tB," Link Text"),tQ="".concat(tB," Link URL"),tZ="".concat(tB," Form ID"),tJ="".concat(tB," Form Name"),t0="".concat(tB," Form Destination"),t1="cookie",t2=function(e){function t(t,r,n,i,o,a,s,l,u,c,d,h,f,p,g,m,v,b,y,x,w,_,C,k,S,E,O,I,P,T,R,A,M,D,L,V,F,j,z,B){void 0===n&&(n=new tO),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===l&&(l=1e3),void 0===u&&(u=5),void 0===c&&(c=30),void 0===d&&(d=t1),void 0===m&&(m=new eR),void 0===v&&(v=N.Warn),void 0===y&&(y=!1),void 0===x&&(x=!1),void 0===C&&(C=""),void 0===k&&(k="US"),void 0===E&&(E=18e5),void 0===O&&(O=new tD({loggerProvider:m})),void 0===I&&(I={ipAddress:!0,language:!0,platform:!0}),void 0===P&&(P="fetch"),void 0===T&&(T=!1),void 0===R&&(R=!0),void 0===F&&(F=!0),void 0===j&&(j=0);var H=e.call(this,{apiKey:t,storageProvider:O,transportProvider:t3(P)})||this;return H.apiKey=t,H.appVersion=r,H.cookieOptions=i,H.defaultTracking=o,H.autocapture=a,H.flushIntervalMillis=l,H.flushMaxRetries=u,H.flushQueueSize=c,H.identityStorage=d,H.ingestionMetadata=h,H.instanceName=f,H.loggerProvider=m,H.logLevel=v,H.minIdLength=b,H.offline=y,H.partnerId=w,H.plan=_,H.serverUrl=C,H.serverZone=k,H.sessionTimeout=E,H.storageProvider=O,H.trackingOptions=I,H.transport=P,H.useBatch=T,H.fetchRemoteConfig=R,H.networkTrackingOptions=L,H.identify=V,H.enableDiagnostics=F,H.diagnosticsSampleRate=j,H.diagnosticsClient=z,H.remoteConfig=B,H.version=tk,H._optOut=!1,H._cookieStorage=n,H.deviceId=s,H.lastEventId=p,H.lastEventTime=g,H.optOut=x,H.sessionId=S,H.pageCounter=M,H.userId=A,H.debugLogsEnabled=D,H.loggerProvider.enable(D?N.Debug:H.logLevel),H.networkTrackingOptions=L,H.identify=V,H.enableDiagnostics=F,H.diagnosticsSampleRate=j,H.diagnosticsClient=z,R&&(H.remoteConfig||(H.remoteConfig={fetchRemoteConfig:R}),H.remoteConfig.fetchRemoteConfig||(H.remoteConfig.fetchRemoteConfig=R)),H}return(0,Q.__extends)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(tR(this.apiKey),e)},t}(eM),t5=function(e,t){switch(void 0===e&&(e=t1),void 0===t&&(t={}),e){case"localStorage":return new tD;case"sessionStorage":return new tL;case"none":return new tO;default:return new tI((0,Q.__assign)((0,Q.__assign)({},t),{expirationDays:t.expiration}))}},t3=function(e){return"xhr"===e?new tV:"beacon"===e?new tF:new tM},t4="data-amp-mask",t6="*****",t8=/\b(?:\d[ -]*?){13,16}\b/,t7=/(\d{3}-?\d{2}-?\d{4})/g,t9=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,re=function(e,t){if(void 0===t&&(t=[]),"string"!=typeof e)return"";var r,n,i=e;i=(i=(i=i.replace(t8,t6)).replace(t7,t6)).replace(t9,t6);try{for(var o=(0,Q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;try{i=i.replace(s,t6)}catch(e){}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},rt=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(t4)?t6:e?e(document.title):document.title},rr=function(){function e(){}return e.prototype.parse=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return[2,(0,Q.__assign)((0,Q.__assign)((0,Q.__assign)((0,Q.__assign)({},eh),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=e6();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!=(t=null==(e=r.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=e6();return(e={})[et]=t[et],e[er]=t[er],e[en]=t[en],e[ei]=t[ei],e[eo]=t[eo],e[ea]=t[ea],e[es]=t[es],e[el]=t[el],e[eu]=t[eu],e[ec]=t[ec],e[ed]=t[ed],e},e}(),rn=function(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=n)}return t},ri=function(e){void 0===e&&(e={});var t,r,n=(0,ex.getGlobalScope)(),i=void 0,o=!1,a=e.trackOn,s=e.trackHistoryChanges,l=e.eventType,u=void 0===l?"[Amplitude] Page Viewed":l,c=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==i||i.error("Malformed URI sequence: ",e)}return t},d=function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r;return(0,Q.__generator)(this,function(n){switch(n.label){case 0:return e=c("undefined"!=typeof location&&location.href||""),r={event_type:u},t=[{}],[4,ro()];case 1:return[2,(r.event_properties=Q.__assign.apply(void 0,[Q.__assign.apply(void 0,t.concat([n.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":e,"[Amplitude] Page Path":"undefined"!=typeof location&&c(location.pathname)||"","[Amplitude] Page Title":rt(re),"[Amplitude] Page URL":e.split("?")[0]}]),r)]}})})},h=function(){return void 0===a||"function"==typeof a&&a()},f="undefined"!=typeof location?location.href:null,p=function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,r,n,o;return(0,Q.__generator)(this,function(a){switch(a.label){case 0:if(r=rs(s,e=location.href,f||"")&&h(),f=e,!r)return[3,4];if(null==i||i.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return o=(n=t).track,[4,d()];case 2:o.apply(n,[a.sent()]),a.label=3;case 3:a.label=4;case 4:return[2]}})})},g=function(){p()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,a){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var s,l;return(0,Q.__generator)(this,function(u){switch(u.label){case 0:if(t=a,r=e,(i=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),o=!0,n&&(n.addEventListener("popstate",g),n.history.pushState=new Proxy(n.history.pushState,{apply:function(e,t,r){var n=(0,Q.__read)(r,3),i=n[0],a=n[1],s=n[2];e.apply(t,[i,a,s]),o&&p()}})),!h())return[3,2];return i.log("Tracking page view event"),l=(s=t).track,[4,d()];case 1:l.apply(s,[u.sent()]),u.label=2;case 2:return[2]}})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(n){switch(n.label){case 0:if(!("attribution"===a&&ra(e)))return[3,2];return null==i||i.log("Enriching campaign event to page view event with campaign parameters"),[4,d()];case 1:e.event_type=(t=n.sent()).event_type,e.event_properties=(0,Q.__assign)((0,Q.__assign)({},e.event_properties),t.event_properties),n.label=2;case 2:return r&&e.event_type===u&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=(0,Q.__assign)((0,Q.__assign)({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return n&&(n.removeEventListener("popstate",g),o=!1),[2]})})}}},ro=function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,Q.__generator)(this,function(t){switch(t.label){case 0:return e=rn,[4,new rr().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},ra=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,r=t[T.SET]||{},n=t[T.UNSET]||{},i=(0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(Object.keys(r)),!1),(0,Q.__read)(Object.keys(n)),!1);return Object.keys(eh).every(function(e){return i.includes(e)})}return!1},rs=function(e,t,r){if("pathOnly"!==e)return t!==r;if(""==r)return!0;var n=new URL(t),i=new URL(r);return n.origin+n.pathname!==i.origin+i.pathname},rl=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(t,n){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var i,o;return(0,Q.__generator)(this,function(a){return i=function(){if(!n)return void t.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");if("undefined"!=typeof document){var i=function(e){var t=!1;r(e,"change",function(){var r,i=rc(e);t||n.track(tH,((r={})[tZ]=ru(e.id),r[tJ]=ru(e.name),r[t0]=i,r)),t=!0}),r(e,"submit",function(){var r,i,o=rc(e);t||n.track(tH,((r={})[tZ]=ru(e.id),r[tJ]=ru(e.name),r[t0]=o,r)),n.track(tW,((i={})[tZ]=ru(e.id),i[tJ]=ru(e.name),i[t0]=o,i)),t=!1})};Array.from(document.getElementsByTagName("form")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=(0,ex.getGlobalScope)())?o.addEventListener("load",i):t.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},ru=function(e){if("string"==typeof e)return e},rc=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},rd=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,n){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var i,o;return(0,Q.__generator)(this,function(a){return i=function(){if(!n)return void t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");if("undefined"!=typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),a=null==i?void 0:i[1];a&&r(e,"click",function(){var r;a&&n.track(tU,((r={})[tG]=a,r[tK]=t.pathname,r[tY]=e.id,r[tX]=e.text,r[tQ]=e.href,r))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=(0,ex.getGlobalScope)())?o.addEventListener("load",i):t.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},rh=!1,rf=function(e){rh||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),rh=!0)},rp=function(){var e=(0,ex.getGlobalScope)(),t=[],r=function(r,n){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(r,n),t.push({type:r,handler:n}))},n=function(){t.forEach(function(t){var r=t.type,n=t.handler;null==e||e.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(n){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,r("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),r("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return n(),[2]})})}}};function rg(e,t,r){var n,i,o=[];try{for(var a=(0,Q.__values)(null!=t?t:[]),s=a.next();!s.done;s=a.next()){var l=s.value;try{o.push(new RegExp(l))}catch(e){r.loggerProvider.warn("Invalid regex pattern: ".concat(l),e)}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return e.concat(o)}var rm=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],rv="data-amp-track-",rb=["div","span","h1","h2","h3","h4","h5","h6"],ry="[Amplitude] Element Clicked",rx="[Amplitude] Rage Click",rw="[Amplitude] Element Tag",r_="[Amplitude] Element Text",rC="[Amplitude] Page URL",rk="https://app.amplitude.com",rS={US:rk,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},rE="data-amp-mask-attributes",rO=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function rI(e){return"function"==typeof e}function rP(e){return rI(null==e?void 0:e.then)}function rT(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var rR=rT(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function rA(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var rM=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,i,o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=(0,Q.__values)(o),s=a.next();!s.done;s=a.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var l=this.initialTeardown;if(rI(l))try{l()}catch(e){i=e instanceof rR?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=(0,Q.__values)(u),d=c.next();!d.done;d=c.next()){var h=d.value;try{rL(h)}catch(e){i=null!=i?i:[],e instanceof rR?i=(0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(i)),(0,Q.__read)(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}if(i)throw new rR(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)rL(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&rA(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&rA(r,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),rN=rM.EMPTY;function rD(e){return e instanceof rM||e&&"closed"in e&&rI(e.remove)&&rI(e.add)&&rI(e.unsubscribe)}function rL(e){rI(e)?e():e.unsubscribe()}var rV=void 0,rF={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=rF.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,Q.__spreadArray)([e,t],(0,Q.__read)(r))):setTimeout.apply(void 0,(0,Q.__spreadArray)([e,t],(0,Q.__read)(r)))},clearTimeout:function(e){var t=rF.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function rj(e){rF.setTimeout(function(){!1;throw e})}function rz(){}var rB=rH("C",void 0,void 0);function rH(e,t,r){return{kind:e,value:t,error:r}}var rW=null;function rU(e){var t,r,n,i;1;e()}var r$=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,rD(t)&&t.add(r)):r.destination=rZ,r}return(0,Q.__extends)(t,e),t.create=function(e,t,r){return new rY(e,t,r)},t.prototype.next=function(e){this.isStopped?rQ(rH("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?rQ(rH("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?rQ(rB,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(rM),rq=Function.prototype.bind;function rG(e,t){return rq.call(e,t)}var rK=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){rX(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){rX(e)}else rX(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){rX(e)}},e}(),rY=function(e){function t(t,r,n){var i,o,a=e.call(this)||this;return rI(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i=t,a.destination=new rK(i),a}return(0,Q.__extends)(t,e),t}(r$);function rX(e){1;rj(e)}function rQ(e,t){}var rZ={closed:!0,next:rz,error:function(e){throw e},complete:rz},rJ="function"==typeof Symbol&&Symbol.observable||"@@observable";function r0(e){return e}var r1=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this,i=!function(e){return e&&e instanceof r$||e&&rI(e.next)&&rI(e.error)&&rI(e.complete)&&rD(e)}(e)?new rY(e,t,r):e;return rU(function(){var e=n.operator,t=n.source;i.add(e?e.call(i,t):t?n._subscribe(i):n._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=r2(t))(function(t,n){var i=new rY({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[rJ]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?r0:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=r2(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function r2(e){var t;return null!=(t=null!=e?e:rV)?t:Promise}function r5(e){return Symbol.asyncIterator&&rI(null==e?void 0:e[Symbol.asyncIterator])}function r3(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var r4="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function r6(e){return rI(null==e?void 0:e[r4])}function r8(e){return(0,Q.__asyncGenerator)(this,arguments,function(){var t,r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,Q.__await)(t.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,(0,Q.__await)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,Q.__await)(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function r7(e){return rI(null==e?void 0:e.getReader)}function r9(e){if(e instanceof r1)return e;if(null!=e){var t,r,n,i;if(rI(e[rJ])){return t=e,new r1(function(e){var r=t[rJ]();if(rI(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(rO(e)){return r=e,new r1(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}if(rP(e)){return n=e,new r1(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,rj)})}if(r5(e))return ne(e);if(r6(e)){return i=e,new r1(function(e){var t,r;try{for(var n=(0,Q.__values)(i),o=n.next();!o.done;o=n.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}if(r7(e))return ne(r8(e))}throw r3(e)}function ne(e){return new r1(function(t){(function(e,t){var r,n,i,o;return(0,Q.__awaiter)(this,void 0,void 0,function(){var a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=(0,Q.__asyncValues)(e),s.label=1;case 1:return[4,r.next()];case 2:if((n=s.sent()).done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:s.sent()},[3,11];case 6:if(s.trys.push([6,,9,10]),!(n&&!n.done&&(o=r.return)))return[3,8];return[4,o.call(r)];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function nt(e){return function(t){if(rI(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function nr(e,t,r,n,i){return new nn(e,t,r,n,i)}var nn=function(e){function t(t,r,n,i,o,a){var s=e.call(this,t)||this;return s.onFinalize=o,s.shouldUnsubscribe=a,s._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return(0,Q.__extends)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(r$);function ni(e,t){return nt(function(r,n){var i=0;r.subscribe(nr(n,function(r){n.next(e.call(t,r,i++))}))})}function no(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}function na(e,t,r){return(void 0===r&&(r=1/0),rI(t))?na(function(r,n){return ni(function(e,i){return t(r,e,n,i)})(r9(e(r,n)))},r):("number"==typeof t&&(r=t),nt(function(t,n){var i,o,a,s,l,u,c,d;return i=r,o=[],a=0,s=0,l=!1,u=function(){!l||o.length||a||n.complete()},c=function(e){return a<i?d(e):o.push(e)},d=function(t){a++;var r=!1;r9(e(t,s++)).subscribe(nr(n,function(e){n.next(e)},function(){r=!0},void 0,function(){if(r)try{for(a--;o.length&&a<i;)!function(){var e=o.shift();d(e)}();u()}catch(e){n.error(e)}}))},t.subscribe(nr(n,c,function(){l=!0,u()})),function(){}}))}var ns=Array.isArray,nl=["addListener","removeListener"],nu=["addEventListener","removeEventListener"],nc=["on","off"];function nd(e,t,r,n){if(rI(r)&&(n=r,r=void 0),n){return nd(e,t,r).pipe((i=n,ni(function(e){return ns(e)?i.apply(void 0,(0,Q.__spreadArray)([],(0,Q.__read)(e))):i(e)})))}var i,o,a,s,l=(0,Q.__read)(rI((o=e).addEventListener)&&rI(o.removeEventListener)?nu.map(function(n){return function(i){return e[n](t,i,r)}}):rI((a=e).addListener)&&rI(a.removeListener)?nl.map(nh(e,t)):rI((s=e).on)&&rI(s.off)?nc.map(nh(e,t)):[],2),u=l[0],c=l[1];if(!u&&rO(e))return na(function(e){return nd(e,t,r)})(r9(e));if(!u)throw TypeError("Invalid event target");return new r1(function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return u(t),function(){return c(t)}})}function nh(e,t){return function(r){return function(n){return e[r](t,n)}}}var nf=rT(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),np=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,Q.__extends)(t,e),t.prototype.lift=function(e){var t=new ng(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new nf},t.prototype.next=function(e){var t=this;rU(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=(0,Q.__values)(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;rU(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;rU(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?rN:(this.currentObservers=null,i.push(e),new rM(function(){t.currentObservers=null,rA(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new r1;return e.source=this,e},t.create=function(e,t){return new ng(e,t)},t}(r1),ng=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return(0,Q.__extends)(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:rN},t}(np);function nm(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new np}:t,n=e.resetOnError,i=void 0===n||n,o=e.resetOnComplete,a=void 0===o||o,s=e.resetOnRefCountZero,l=void 0===s||s;return function(e){var t,n,o,s=0,u=!1,c=!1,d=function(){null==n||n.unsubscribe(),n=void 0},h=function(){d(),t=o=void 0,u=c=!1},f=function(){var e=t;h(),null==e||e.unsubscribe()};return nt(function(e,p){s++,c||u||d();var g=o=null!=o?o:r();p.add(function(){0!=--s||c||u||(n=nv(f,l))}),g.subscribe(p),!t&&s>0&&(t=new rY({next:function(e){return g.next(e)},error:function(e){c=!0,d(),n=nv(h,i,e),g.error(e)},complete:function(){u=!0,d(),n=nv(h,a),g.complete()}}),r9(e).subscribe(t))})(e)}}function nv(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0===t)return void e();if(!1!==t){var i=new rY({next:function(){i.unsubscribe(),e()}});return r9(t.apply(void 0,(0,Q.__spreadArray)([],(0,Q.__read)(r)))).subscribe(i)}}var nb=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},ny=function(e,t){var r=e;try{r=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return r},nx=["input","select","textarea"],nw=function(e,t){var r,n=null==(r=null==window?void 0:window.getComputedStyle)?void 0:r.call(window,e);return(null==n?void 0:n.getPropertyValue("cursor"))==="pointer"&&"click"===t},n_=function(e,t,r){return void 0===r&&(r=!1),function(n,i){var o,a,s=e.pageUrlAllowlist,l=e.pageUrlExcludelist,u=e.shouldTrackEventResolver,c=null==(a=null==(o=null==i?void 0:i.tagName)?void 0:o.toLowerCase)?void 0:a.call(o);if(!c)return!1;if(u)return u(n,i);if(!nb(window.location.href,s)||l&&l.length>0&&nb(window.location.href,l))return!1;var d=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof d)switch(d.toLowerCase()){case"hidden":case"password":return!1}var h=nw(i,n);if(r&&h)return!0;if(t&&!t.some(function(e){var t;return!!(null==(t=null==i?void 0:i.matches)?void 0:t.call(i,e))}))return!1;switch(c){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:if(h)return!0;return"click"===n}}},nC=function(e){var t,r,n,i=null==(r=null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase)?void 0:r.call(t),o=e instanceof HTMLElement&&(null==(n=e.getAttribute("contenteditable"))?void 0:n.toLowerCase())==="true";return!nx.includes(i)&&!o},nk=function(e){return Object.keys(e).reduce(function(t,r){var n=e[r];return null!=n&&("object"!=typeof n||0!==Object.keys(n).length)&&("string"!=typeof n||0!==n.trim().length)&&(t[r]=n),t},{})},nS=function(e,t){return e?t.some(function(t){var r;return null==(r=null==e?void 0:e.matches)?void 0:r.call(e,t)})?e:nS(null==e?void 0:e.parentElement,t):null},nE=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},nO="1.17.0",nI=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",rE,t4]),nP=["type"],nT=["svg","path","g"],nR=["password","hidden"],nA=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var r=document.documentElement;if(e.scope&&t&&(r=t.closest(e.scope)),r&&e.selector)return r.querySelector(e.selector);return r}}catch(e){}},nM=function(e,t,r){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var n=r.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=n}})},nN=function(e,t){var r,n,i,o=this;this.replaceSensitiveString=function(e){return re(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,r,n,i,a=performance.now(),s=[];if(!e)return[];for(var l=function(e){var t=[];if(!e)return t;t.push(e);for(var r=e.parentElement;r&&"HTML"!==r.tagName;)t.push(r),r=r.parentElement;return t}(e),u=new Map,c=l.length-1;c>=0;c--){var d=l[c];if(d){var h,f=(h=d.getAttribute(rE))?h.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[],p=c===l.length-1?[]:null!=(n=u.get(l[c+1]))?n:new Set,g=new Set((0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(p),!1),(0,Q.__read)(f),!1));u.set(d,g)}}s=l.map(function(e){var t;return function(e,t){if(null===e)return null;var r,n,i,o,a,s,l=String(e.tagName).toLowerCase(),u={tag:l},c=Array.from(null!=(o=null==(i=e.parentElement)?void 0:i.children)?o:[]);c.length&&(u.index=c.indexOf(e),u.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null==(s=null==(a=e.previousElementSibling)?void 0:a.tagName)?void 0:s.toLowerCase();d&&(u.prevSib=String(d));var h=e.getAttribute("id");h&&(u.id=String(h));var f=Array.from(e.classList);f.length&&(u.classes=f);var p={},g=Array.from(e.attributes).filter(function(e){return!nI.has(e.name)}),m=!nC(e);if(!nR.includes(String(e.getAttribute("type")))&&!nT.includes(l))try{for(var v=(0,Q.__values)(g),b=v.next();!b.done;b=v.next()){var y=b.value;if(!m||nP.includes(y.name)){if(t.has(y.name)){p[y.name]=t6;continue}p[y.name]=String(y.value).substring(0,128)}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return Object.keys(p).length&&(u.attrs=p),u}(e,null!=(t=u.get(e))?t:new Set)});var m=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var r=(0,Q.__read)(t,2),n=r[0],i=r[1];e.attrs&&(e.attrs[n]=o.replaceSensitiveString(i))})};try{for(var v=(0,Q.__values)(s),b=v.next();!b.done;b=v.next()){var y=b.value;m(y)}}catch(e){t={error:e}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}var x=performance.now();return null==(i=o.diagnosticsClient)||i.recordHistogram("autocapturePlugin.getHierarchy",x-a),s},this.getNearestLabel=function(e){var t,r=e.parentElement;if(!r)return"";try{t=r.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(r)},this.getEventProperties=function(e,t,r){var n,i,a,s,l=null==(a=null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase)?void 0:a.call(i),u="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},c=o.getHierarchy(t),d=null==(s=c[0])?void 0:s.attrs,h=o.getNearestLabel(t),f=Object.entries(null!=d?d:{}).reduce(function(e,t){var n=(0,Q.__read)(t,2),i=n[0],o=n[1];if(i.startsWith(r)){var a=i.replace(r,"");a&&(e[a]=o||"")}return e},{}),p=((n={})["[Amplitude] Element Hierarchy"]=c,n[rw]=l,n[r_]=o.getText(t),n["[Amplitude] Element Position Left"]=null==u.left?null:Math.round(u.left),n["[Amplitude] Element Position Top"]=null==u.top?null:Math.round(u.top),n["[Amplitude] Element Attributes"]=f,n["[Amplitude] Element Parent Label"]=h,n[rC]=ny(window.location.href.split("?")[0]),n["[Amplitude] Page Title"]=rt(o.replaceSensitiveString),n["[Amplitude] Viewport Height"]=window.innerHeight,n["[Amplitude] Viewport Width"]=window.innerWidth,n);return p["[Amplitude] Element ID"]=t.getAttribute("id")||"",p["[Amplitude] Element Class"]=t.getAttribute("class"),p["[Amplitude] Element Aria Label"]=null==d?void 0:d["aria-label"],"a"===l&&"click"===e&&t instanceof HTMLAnchorElement&&(p["[Amplitude] Element Href"]=o.replaceSensitiveString(t.href)),nk(p)},this.addAdditionalEventProperties=function(e,t,r,n,i){void 0===i&&(i=!1);var a={event:e,timestamp:Date.now(),type:t};if(("click"===a.type||"change"===a.type)&&null!==a.event.target){if(i&&nw(a.event.target,a.type))return a.closestTrackedAncestor=a.event.target,a.targetElementProperties=o.getEventProperties(a.type,a.closestTrackedAncestor,n),a;var s=nS(a.event.target,r);s&&(a.closestTrackedAncestor=s,a.targetElementProperties=o.getEventProperties(a.type,s,n))}return a},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var r=nA(e,t);if(r){if("TEXT"===e.elementExtractType)return o.getText(r);if("ATTRIBUTE"===e.elementExtractType&&e.attribute)return r.getAttribute(e.attribute)}}},this.getText=function(e){if(null!==e.closest("[".concat(t4,"]")))return t6;var t="";if(e.querySelector("[".concat(t4,"], [contenteditable]"))){var r=e.cloneNode(!0);r.querySelectorAll("[".concat(t4,"], [contenteditable]")).forEach(function(e){e.innerText=t6}),t=r.innerText||""}else t=e.innerText||"";return o.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){if(!e)return{};var t,r,n,i=null==(n=null==(r=null==e?void 0:e.tagName)?void 0:r.toLowerCase)?void 0:n.call(r);return nk(((t={})[rw]=i,t[r_]=o.getText(e),t[rC]=window.location.href.split("?")[0],t))},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var a=null!=(i=e.maskTextRegex)?i:[],s=[];try{for(var l=(0,Q.__values)(a),u=l.next();!u.done;u=l.next()){var c=u.value;if(s.length>=25)break;if(c instanceof RegExp)s.push(c);else if("pattern"in c&&"string"==typeof c.pattern)try{s.push(RegExp(c.pattern,"i"))}catch(e){}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}this.additionalMaskTextPatterns=s},nD=function(){function e(e){var t=(void 0===e?{}:e).origin,r=this;this.endpoint=rk,this.requestCallbacks={},this.onSelect=function(e){r.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?r.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&r.notify({action:"track-selector-moved",data:t})},this.endpoint=void 0===t?rk:t}return e.prototype.notify=function(e){var t,r,n,i;null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(n=window.opener)?void 0:n.postMessage)||i.call(n,e,this.endpoint)},e.prototype.sendRequest=function(e,t,r){var n=this;void 0===r&&(r={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){n.requestCallbacks[i]={resolve:t,reject:a},n.notify(o),(null==r?void 0:r.timeout)>0&&setTimeout(function(){a(Error("".concat(e," timed out (id: ").concat(i,")"))),delete n.requestCallbacks[i]},r.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.setup=function(e){var t=this,r=void 0===e?{dataExtractor:new nN({})}:e,n=r.logger,i=r.endpoint,o=r.isElementSelectable,a=r.cssSelectorAllowlist,s=r.actionClickAllowlist,l=r.dataExtractor;this.logger=n,i&&this.endpoint===rk&&(this.endpoint=i);var u=null;window.addEventListener("message",function(e){if(null==(n=null==(r=t.logger)?void 0:r.debug)||n.call(r,"Message received: ",JSON.stringify(e)),t.endpoint===e.origin){var r,n,i,c,d,h=null==e?void 0:e.data,f=null==h?void 0:h.action;if(f)if("id"in h)null==(c=null==(i=t.logger)?void 0:i.debug)||c.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(h);else if("ping"===f)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===f){var p,g=null==h?void 0:h.data;(p="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",new Promise(function(e,t){var r;try{var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=p,n.addEventListener("load",function(){e({status:!0})},{once:!0}),n.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(p)})}),null==(r=document.head)||r.appendChild(n)}catch(e){t(e)}})).then(function(){var e;u=null==(e=null==window?void 0:window.amplitudeVisualTaggingSelector)?void 0:e.call(window,{getEventTagProps:l.getEventTagProps,isElementSelectable:function(e){return!o||o((null==g?void 0:g.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:t,cssSelectorAllowlist:a,actionClickAllowlist:s,extractDataFromDataSource:l.extractDataFromDataSource,dataExtractor:l,diagnostics:{autocapture:{version:nO}}}),t.notify({action:"selector-loaded"})}).catch(function(){var e;null==(e=t.logger)||e.warn("Failed to initialize visual tagging selector")})}else"close-visual-tagging-selector"===f&&(null==(d=null==u?void 0:u.close)||d.call(u))}}),this.notify({action:"page-loaded"})},e}();function nL(e,t){return nt(function(r,n){var i=0;r.subscribe(nr(n,function(r){return e.call(t,r,i++)&&n.next(r)}))})}var nV=function(e){function t(t,r){return e.call(this)||this}return(0,Q.__extends)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(rM),nF={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=nF.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,Q.__spreadArray)([e,t],(0,Q.__read)(r))):setInterval.apply(void 0,(0,Q.__spreadArray)([e,t],(0,Q.__read)(r)))},clearInterval:function(e){var t=nF.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},nj=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return(0,Q.__extends)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),nF.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&nF.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,rA(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(nV),nz={now:function(){return(nz.delegate||Date).now()},delegate:void 0},nB=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=nz.now,e}(),nH=new(function(e){function t(t,r){void 0===r&&(r=nB.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return(0,Q.__extends)(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active)return void r.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift())if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(nB))(nj);function nW(e){return void 0===e&&(e=1/0),na(r0,e)}var nU=new r1(function(e){return e.complete()});function n$(e){return e&&rI(e.schedule)}function nq(e){return e[e.length-1]}function nG(e){return n$(nq(e))?e.pop():void 0}function nK(e,t){return void 0===t&&(t=0),nt(function(r,n){r.subscribe(nr(n,function(r){return no(n,e,function(){return n.next(r)},t)},function(){return no(n,e,function(){return n.complete()},t)},function(r){return no(n,e,function(){return n.error(r)},t)}))})}function nY(e,t){return void 0===t&&(t=0),nt(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function nX(e,t){if(!e)throw Error("Iterable cannot be null");return new r1(function(r){no(r,t,function(){var n=e[Symbol.asyncIterator]();no(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function nQ(e,t){return t?function(e,t){if(null!=e){if(rI(e[rJ]))return r9(e).pipe(nY(t),nK(t));if(rO(e))return new r1(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(rP(e))return r9(e).pipe(nY(t),nK(t));if(r5(e))return nX(e,t);if(r6(e))return new r1(function(r){var n;return no(r,t,function(){n=e[r4](),no(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return rI(null==n?void 0:n.return)&&n.return()}});if(r7(e))return nX(r8(e),t)}throw r3(e)}(e,t):r9(e)}function nZ(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=nG(t),i=(e=1/0,"number"==typeof nq(t)?t.pop():e);return t.length?1===t.length?r9(t[0]):nW(i)(nQ(t,n)):nU}function nJ(e){return e<=0?function(){return nU}:nt(function(t,r){var n=0;t.subscribe(nr(r,function(t){++n<=e&&(r.next(t),e<=n&&r.complete())}))})}function n0(e){return e instanceof Date&&!isNaN(e)}function n1(e,t,r){void 0===e&&(e=0),void 0===r&&(r=nH);var n=-1;return null!=t&&(n$(t)?r=t:n=t),new r1(function(t){var i=n0(e)?e-r.now():e;i<0&&(i=0);var o=0;return r.schedule(function(){t.closed||(t.next(o++),0<=n?this.schedule(void 0,n):t.complete())},i)})}var n2=rT(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function n5(e){throw new n2(e)}var n3=function(){return new r1(function(e){var t=new MutationObserver(function(t){e.next(t)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},n4=function(e){return void 0===e&&(e="click"),nd(document,e,{capture:!0})},n6=function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){console.error("Error matching event to filter",e)}return!1},n8={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},n7=function(e){var t,r,n,i,o=Object.values(n8).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var a=(0,Q.__values)(e),s=a.next();!s.done;s=a.next()){var l=s.value;try{try{for(var u=(n=void 0,(0,Q.__values)(l.definition)),c=u.next();!c.done;c=u.next()){var d=n8[c.value.event_type];d&&o[d].add(l.id)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==l?void 0:l.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return o},n9=function(e){var t,r,n,i,o=new Map;try{for(var a=(0,Q.__values)(e),s=a.next();!s.done;s=a.next()){var l=s.value;try{for(var u=(n=void 0,(0,Q.__values)(l.conditions)),c=u.next();!c.done;c=u.next()){var d=c.value;if("LABELED_EVENT"===d.type){var h=d.match.eventId,f=o.get(h);f||(f=[],o.set(h,f)),f.push(l)}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return o},ie=function(e,t){var r,n,i,o,a=new Set;try{for(var s=(0,Q.__values)(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=t.get(u.id);if(c)try{for(var d=(i=void 0,(0,Q.__values)(c)),h=d.next();!h.done;h=d.next()){var f=h.value;a.add(f)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return Array.from(a)},it=function(){function e(e,t,r,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=r,this.options=n}return e.prototype.evaluate=function(e){var t,r,n=this.options.pageActions;if(!n)return e;var i=ie(Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return n.labeledEvents[e]}).filter(function(t){return t.definition.some(function(t){return n8[t.event_type]===e.type&&t.filters.every(function(t){return n6(e,t)})})}),this.labeledEventToTriggerMap);try{for(var o=(0,Q.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value;nM(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=r},e}();(u=L||(L={})).ClickObservable="clickObservable",u.ChangeObservable="changeObservable",u.NavigateObservable="navigateObservable",u.MutationObservable="mutationObservable";var ir=function(e,t){void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",nO);var r,n,i,o,a,s,l,u,c=e.dataAttributePrefix,d=void 0===c?rv:c,h=e.visualTaggingOptions,f=void 0===h?{enabled:!0,messenger:new nD}:h;e.cssSelectorAllowlist=null!=(r=e.cssSelectorAllowlist)?r:rm,e.actionClickAllowlist=null!=(n=e.actionClickAllowlist)?n:rb,e.debounceTime=null!=(i=e.debounceTime)?i:0,e.pageUrlExcludelist=null==(o=e.pageUrlExcludelist)?void 0:o.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(e){console.warn("Invalid regex pattern: ".concat(t.pattern),e)}return e},[]);var p="@amplitude/plugin-autocapture-browser",g=[],m=new nN(e,t),v=function(){var t,r,n=n4().pipe(ni(function(t){return m.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,d)}),nm()),i=nd(document,"change",{capture:!0}).pipe(ni(function(t){return m.addAdditionalEventProperties(t,"change",e.cssSelectorAllowlist,d)}),nm());window.navigation&&(r=nd(window.navigation,"navigate").pipe(ni(function(t){return m.addAdditionalEventProperties(t,"navigate",e.cssSelectorAllowlist,d)}),nm()));var o=n3().pipe(ni(function(t){return m.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,d)}),nm());return(t={})[L.ClickObservable]=n,t[L.ChangeObservable]=i,t[L.NavigateObservable]=r,t[L.MutationObservable]=o,t},b=n7(Object.values(null!=(s=null==(a=e.pageActions)?void 0:a.labeledEvents)?s:{})),y=n9(null!=(u=null==(l=e.pageActions)?void 0:l.triggers)?u:[]),x=new it(b,y,m,e),w=function(t){var r,n;t&&(e.pageActions=(0,Q.__assign)((0,Q.__assign)({},e.pageActions),t),b=n7(Object.values(null!=(r=e.pageActions.labeledEvents)?r:{})),y=n9(null!=(n=e.pageActions.triggers)?n:[]),x.update(b,y,e))};return{name:p,type:"enrichment",setup:function(t,r){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,a,s,l,u,c,h,b;return(0,Q.__generator)(this,function(y){var _,C,k,S,E,O,I,P,T,R,A,M,N,D,L,V,F,j,z,B,H,W,U,$,q,G,K,Y,X,Z,J,ee;return"undefined"==typeof document?[2]:(t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("analyticsSDK.pageActions","all",function(e){w(e)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),n=n_(e,e.cssSelectorAllowlist),i=n_(e,e.actionClickAllowlist),C=(_={allObservables:o=v(),options:e,amplitude:r,shouldTrackEvent:n,evaluateTriggers:x.evaluate.bind(x)}).amplitude,k=_.allObservables,S=_.options,E=_.shouldTrackEvent,O=_.evaluateTriggers,R=nZ((I=k.clickObservable).pipe(nt(function(e,t){var r,n=!1;e.subscribe(nr(t,function(e){var i=r;r=e,n&&t.next([i,e]),n=!0}))}),nL(function(e){var t=(0,Q.__read)(e,2),r=t[0],n=t[1],i=r.event.target!==n.event.target,o=20>=Math.abs(n.event.screenX-r.event.screenX)&&20>=Math.abs(n.event.screenY-r.event.screenY);return i&&!o})),I.pipe((P=S.debounceTime,void 0===T&&(T=nH),nt(function(e,t){var r=null,n=null,i=null,o=function(){if(r){r.unsubscribe(),r=null;var e=n;n=null,t.next(e)}};function a(){var e=i+P,n=T.now();if(n<e){r=this.schedule(void 0,e-n),t.add(r);return}o()}e.subscribe(nr(t,function(e){n=e,i=T.now(),r||(r=T.schedule(a,P),t.add(r))},function(){o(),t.complete()},void 0,function(){n=r=null}))})),ni(function(){return"timeout"}))),a=I.pipe((void 0===A&&(A=nH),M=n1(0,A),function e(t,r){return r?function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nW(1)(nQ(e,nG(e)))}(r.pipe(nJ(1),nt(function(e,t){e.subscribe(nr(t,rz))})),n.pipe(e(t)))}:na(function(e,r){return r9(t(e,r)).pipe(nJ(1),ni(function(){return e}))})}(function(){return M})),nL(nE),nL(function(e){return E("click",e.closestTrackedAncestor)}),ni(function(e){return O(e)}),nt(function(e,t){var r=[];return e.subscribe(nr(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),r9(R).subscribe(nr(t,function(){var e=r;r=[],t.next(e)},rz)),function(){r=null}})).subscribe(function(e){var t,r,n=(e.length,ry);try{for(var i=(0,Q.__values)(e),o=i.next();!o.done;o=i.next()){var a=o.value;null==C||C.track(n,a.targetElementProperties)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),g.push(a),D=(N={allObservables:o,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return m.getEventProperties.apply(m,(0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(e),!1),[d],!1))},amplitude:r,shouldTrackEvent:n,evaluateTriggers:x.evaluate.bind(x)}).amplitude,L=N.allObservables,V=N.getEventProperties,F=N.shouldTrackEvent,j=N.evaluateTriggers,s=L.changeObservable.pipe(nL(nE),nL(function(e){return F("change",e.closestTrackedAncestor)}),ni(function(e){return j(e)})).subscribe(function(e){null==D||D.track("[Amplitude] Element Changed",V("change",e.closestTrackedAncestor))}),g.push(s),B=(z={allObservables:o,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return m.getEventProperties.apply(m,(0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(e),!1),[d],!1))},amplitude:r,shouldTrackEvent:n,shouldTrackActionClick:i}).amplitude,H=z.allObservables,W=z.options,U=z.getEventProperties,$=z.shouldTrackEvent,q=z.shouldTrackActionClick,G=H.clickObservable,K=H.mutationObservable,Y=H.navigateObservable,X=G.pipe(nL(function(e){return!$("click",e.closestTrackedAncestor)}),ni(function(e){var t=nS(e.event.target,W.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=U(e.type,e.closestTrackedAncestor)),e}),nL(nE),nL(function(e){return q("click",e.closestTrackedAncestor)})),Z=[K],Y&&Z.push(Y),J=nZ.apply(void 0,(0,Q.__spreadArray)([],(0,Q.__read)(Z),!1)),l=X.pipe((ee=function(e){return J.pipe(nJ(1),function(e,t){var r=n0(e)?{first:e}:"number"==typeof e?{each:e}:e,n=r.first,i=r.each,o=r.with,a=void 0===o?n5:o,s=r.scheduler,l=void 0===s?nH:s,u=r.meta,c=void 0===u?null:u;if(null==n&&null==i)throw TypeError("No timeout provided.");return nt(function(e,t){var r,o,s=null,u=0,d=function(e){o=no(t,l,function(){try{r.unsubscribe(),r9(a({meta:c,lastValue:s,seen:u})).subscribe(t)}catch(e){t.error(e)}},e)};r=e.subscribe(nr(t,function(e){null==o||o.unsubscribe(),u++,t.next(s=e),i>0&&d(i)},void 0,void 0,function(){(null==o?void 0:o.closed)||null==o||o.unsubscribe(),s=null})),u||d(null!=n?"number"==typeof n?n:n-l.now():i)})}({first:500,with:function(){return nU}}),ni(function(){return e}))},nt(function(e,t){var r=null,n=0,i=!1,o=function(){return i&&!r&&t.complete()};e.subscribe(nr(t,function(e){null==r||r.unsubscribe(),r9(ee(e,n++)).subscribe(r=nr(t,function(e){return t.next(e)},function(){r=null,o()}))},function(){i=!0,o()}))}))).subscribe(function(e){null==B||B.track(ry,U("click",e.closestTrackedAncestor))}),g.push(l),null==(h=null==t?void 0:t.loggerProvider)||h.log("".concat(p," has been successfully added.")),window.opener&&f.enabled&&(u=e.cssSelectorAllowlist,c=e.actionClickAllowlist,null==(b=f.messenger)||b.setup((0,Q.__assign)((0,Q.__assign)({dataExtractor:m,logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:rS[t.serverZone]}),{isElementSelectable:n_(e,(0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(u),!1),(0,Q.__read)(c),!1)),cssSelectorAllowlist:u,actionClickAllowlist:c}))),[2])})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,Q.__generator)(this,function(i){try{for(t=(e=(0,Q.__values)(g)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(r)throw r.error}}return[2]})})}}},ii=(0,Q.__spreadArray)(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],(0,Q.__read)(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),io=["*"],ia=Array.isArray;function is(e,t){var r,n,i,o,a=t.event,s=a.clientX,l=a.clientY;e.yMin=Math.min(null!=(r=e.yMin)?r:l,l),e.yMax=Math.max(null!=(n=e.yMax)?n:l,l),e.xMin=Math.min(null!=(i=e.xMin)?i:s,s),e.xMax=Math.max(null!=(o=e.xMax)?o:s,s),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function il(e){var t=e[0],r=e[e.length-1];return{rageClickEvent:(0,Q.__assign)({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.clientX,Y:e.event.clientY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}var iu=function(e){void 0===e&&(e={});var t,r,n,i,o,a="@amplitude/plugin-frustration-browser",s=[],l=null!=(r=null==(t=e.rageClicks)?void 0:t.cssSelectorAllowlist)?r:io,u=null!=(i=null==(n=e.deadClicks)?void 0:n.cssSelectorAllowlist)?i:ii,c=null!=(o=e.dataAttributePrefix)?o:rv,d=new nN(e),h=(0,Q.__spreadArray)([],(0,Q.__read)(new Set((0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(l),!1),(0,Q.__read)(u),!1))),!1),f=function(){var e,t,r=n4("pointerdown").pipe(ni(function(e){return d.addAdditionalEventProperties(e,"click",h,c,!0)}),nm());window.navigation&&(t=nd(window.navigation,"navigate").pipe(ni(function(e){return d.addAdditionalEventProperties(e,"navigate",h,c)}),nm()));var n=n3().pipe(ni(function(e){return d.addAdditionalEventProperties(e,"mutation",h,c)}),nm());return(e={})[L.ClickObservable]=r,e[L.ChangeObservable]=new r1,e[L.NavigateObservable]=t,e[L.MutationObservable]=n,e};return{name:a,type:"enrichment",setup:function(t,r){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,h,p,g;return(0,Q.__generator)(this,function(m){var v,b,y,x,w,_,C,k,S,E,O,I,P,T,R;return"undefined"==typeof document?[2]:(n=n_(e,l),i=n_(e,u),h=function(e){var t,r=e.amplitude,n=e.allObservables,i=e.shouldTrackRageClick,o=n.clickObservable,a=[],s={};function l(e){a=[],s={},e&&(is(s,e),a.push(e))}return o.pipe(nL(nE),nL(function(e){return i("click",e.closestTrackedAncestor)}),ni(function(e){if(t&&clearTimeout(t),is(s,e),0===a.length)return a.push(e),null;if((n=a).length>0&&n[n.length-1].closestTrackedAncestor!==e.closestTrackedAncestor||(o=Math.max(0,(i=a).length-4+1),u=i[o],e.timestamp-u.timestamp>=1e3)||s.isOutOfBounds){var n,i,o,u,c=a.length>=4?il(a):null;return l(e),c}return a.push(e),a.length>=4&&(t=setTimeout(function(){var e=il(a),t=e.rageClickEvent,n=e.time;r.track(rx,t,{time:n}),l()},1e3)),null}),nL(function(e){return null!==e})).subscribe(function(e){null!==e&&r.track(rx,e.rageClickEvent,{time:e.time})})}({allObservables:o=f(),amplitude:r,shouldTrackRageClick:n}),s.push(h),b=(v={amplitude:r,allObservables:o,getEventProperties:function(e,t){return d.getEventProperties(e,t,c)},shouldTrackDeadClick:i}).amplitude,y=v.allObservables,x=v.getEventProperties,w=v.shouldTrackDeadClick,_=y.clickObservable,C=y.mutationObservable,k=y.navigateObservable,S=_.pipe(nL(nE),nL(function(e){return w("click",e.closestTrackedAncestor)}),nL(function(e){return null===e.event.target.closest('a[target="_blank"]')})),E=[C],k&&E.push(k),O=nZ.apply(void 0,(0,Q.__spreadArray)([],(0,Q.__read)(E),!1)),p=S.pipe(na(function(e){var t;return(function(){for(var e,t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return 1===(r=1===(t=r).length&&ia(t[0])?t[0]:t).length?r9(r[0]):new r1((e=r,function(t){for(var r=[],n=function(n){r.push(r9(e[n]).subscribe(nr(t,function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)})))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}))})(new r1(function(r){return t=setTimeout(function(){return r.next(e)},3e3),function(){clearTimeout(t)}}),O.pipe(nJ(1),ni(function(){return null}))).pipe(nL(function(e){return null!==e}))}),(void 0===I&&(I=nH),P=n1(3e3,I),T=function(){return P},R=void 0,nt(function(e,t){var r=null!=R?R:{},n=r.leading,i=void 0===n||n,o=r.trailing,a=void 0!==o&&o,s=!1,l=null,u=null,c=!1,d=function(){null==u||u.unsubscribe(),u=null,a&&(p(),c&&t.complete())},h=function(){u=null,c&&t.complete()},f=function(e){return u=r9(T(e)).subscribe(nr(t,d,h))},p=function(){if(s){s=!1;var e=l;l=null,t.next(e),c||f(e)}};e.subscribe(nr(t,function(e){s=!0,l=e,u&&!u.closed||(i?p():f(e))},function(){c=!0,a&&s&&u&&!u.closed||t.complete()}))}))).subscribe(function(e){var t={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};b.track("[Amplitude] Dead Click",(0,Q.__assign)((0,Q.__assign)({},x("click",e.closestTrackedAncestor)),t),{time:e.timestamp})}),s.push(p),null==(g=null==t?void 0:t.loggerProvider)||g.log("".concat(a," has been successfully added.")),[2])})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,Q.__generator)(this,function(i){try{for(t=(e=(0,Q.__values)(s)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(r)throw r.error}}return[2]})})}}};function ic(e,t,r){e&&function e(t){var r,n,i=t.json,o=t.targetObject,a=t.allowlist,s=t.excludelist,l=t.ancestors,u=t.parentObject,c=t.targetKey;o||(o=i);var d=Object.keys(o);try{for(var h=(0,Q.__values)(d),f=h.next();!f.done;f=h.next()){var p,g=f.value,m=(0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(l),!1),[g],!1);(p=o[g],"string"==typeof p||"number"==typeof p||"boolean"==typeof p||null==p)?(!ih(m,a)||ih(m,s))&&delete o[g]:e({json:i,targetObject:o[g],allowlist:a,excludelist:s,ancestors:m,parentObject:o,targetKey:g})}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}0===Object.keys(o).length&&u&&c&&delete u[c]}({json:e,allowlist:t.map(id),excludelist:r.map(id),ancestors:[]})}function id(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function ih(e,t){return t.some(function(t){return function e(t,r,n,i){if(void 0===n&&(n=0),void 0===i&&(i=0),i===r.length)return n===t.length;if(n===t.length){for(;i<r.length&&"**"===r[i];)i++;return i===r.length}var o=r[i];if("**"===o){if(i+1===r.length)return!0;for(var a=n;a<=t.length;a++)if(e(t,r,a,i+1))return!0;return!1}return("*"===o||o===t[n])&&e(t,r,n+1,i+1)}(e,t)})}var ip=function(){function e(e){this.request=e}return e.prototype.headers=function(e){void 0===e&&(e=[]);var t,r,n=this.request.headers,i={};if(Array.isArray(n))n.forEach(function(e){var t=(0,Q.__read)(e,2),r=t[0],n=t[1];i[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){i[t]=e});else if("object"==typeof n&&null!==n)try{for(var o=(0,Q.__values)(Object.entries(n)),a=o.next();!a.done;a=o.next()){var s=(0,Q.__read)(a.value,2),l=s[0],u=s[1];i[l]=u}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return iw(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=(0,ex.getGlobalScope)();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=im(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return 0===e.length?[2,null]:[2,iy(this.body,e,t)]})})},e}(),ig=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),iw(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return im(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return 0===e.length?[2,null]:[2,iy(this.body,e,t)]})})},e}();function im(e,t){var r,n,i,o,a=(0,ex.getGlobalScope)(),s=null==a?void 0:a.TextEncoder;if(s){if("string"==typeof e)o=e,i=new s().encode(o).length;else if(e instanceof Blob)i=(o=e).size;else if(e instanceof URLSearchParams)o=e,i=new s().encode(o.toString()).length;else if(ArrayBuffer.isView(e))i=(o=e).byteLength;else if(e instanceof ArrayBuffer)i=(o=e).byteLength;else if(e instanceof FormData){var l=0,u=0;try{for(var c=(0,Q.__values)(e.entries()),d=c.next();!d.done;d=c.next()){var h=(0,Q.__read)(d.value,2),f=h[0],p=h[1];if(l+=f.length,"string"==typeof p)l+=new s().encode(p).length;else{if(!(p instanceof Blob))return;l+=p.size}if(++u>=t)return}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}i=l}else if(e instanceof ReadableStream){o=e;return}return i}}var iv=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null==(t=null==r?void 0:r.forEach)||t.call(r,function(e,t){n[t]=e}),iw(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(void 0!==this._bodySize)return this._bodySize;var e,t,r=null==(t=null==(e=this.response.headers)?void 0:e.get)?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){switch(e.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this.clonedResponse.text(),new Promise(function(e){return setTimeout(function(){return e(null)},500)})])];case 2:return[2,e.sent()];case 3:return e.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){switch(r.label){case 0:if(0===e.length)return[2,null];return[4,this.text()];case 1:return[2,iy(r.sent(),e,t)]}})})},e}(),ib=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){if(void 0===e&&(e=[]),!this.headersString)return{};var t,r,n={},i=this.headersString.split("\r\n");try{for(var o=(0,Q.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=(0,Q.__read)(s.split(": "),2),u=l[0],c=l[1];u&&c&&(n[u]=c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return iw(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,Q.__awaiter)(this,void 0,void 0,function(){var r;return(0,Q.__generator)(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(ic(r,e,t),[2,r]):[2,null]})})},e}();function iy(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return ic(n,t,r),n}catch(e){return null}}(c=V||(V={})).REDACT="redact",c.REMOVE="remove";var ix="[REDACTED]",iw=function(e,t){var r,n,i=t.allow,o=void 0===i?[]:i,a=t.strategy,s=void 0===a?V.REMOVE:a,l=(0,Q.__spreadArray)([],(0,Q.__read)(ep),!1),u={};try{for(var c=(0,Q.__values)(Object.keys(e)),d=c.next();!d.done;d=c.next()){var h=d.value;!function(t){var r=t.toLowerCase();l.find(function(e){return e.toLowerCase()===r})?s===V.REDACT&&(u[t]=ix):o.find(function(e){return e.toLowerCase()===r})?u[t]=e[t]:s===V.REDACT&&(u[t]=ix)}(h)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return u},i_=function(){function e(e,t,r,n,i,o,a,s,l,u,c){void 0===a&&(a=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=i,this.requestWrapper=o,this.status=a,this.duration=s,this.responseWrapper=l,this.error=u,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,r,n;return Object.fromEntries(Object.entries({type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null==(e=this.requestWrapper)?void 0:e.headers((0,Q.__spreadArray)([],(0,Q.__read)(ef),!1)),requestBodySize:null==(t=this.requestWrapper)?void 0:t.bodySize,responseHeaders:null==(r=this.responseWrapper)?void 0:r.headers((0,Q.__spreadArray)([],(0,Q.__read)(ef),!1)),responseBodySize:null==(n=this.responseWrapper)?void 0:n.bodySize}).filter(function(e){var t=(0,Q.__read)(e,2);return void 0!==(t[0],t[1])}))},e}(),iC=function(e,t){void 0===t&&(t=e_()),this.callback=e,this.id=t},ik=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=(0,ex.getGlobalScope)();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=(0,ex.getGlobalScope)();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,i,o,a,s,l,u,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var h=null==(i=null==(n=null==(r=this.globalScope)?void 0:r.XMLHttpRequest)?void 0:n.prototype)?void 0:i.open,f=null==(s=null==(a=null==(o=this.globalScope)?void 0:o.XMLHttpRequest)?void 0:a.prototype)?void 0:s.send,p=null==(c=null==(u=null==(l=this.globalScope)?void 0:l.XMLHttpRequest)?void 0:u.prototype)?void 0:c.setRequestHeader;h&&f&&p&&this.observeXhr(h,f,p);var g=null==(d=this.globalScope)?void 0:d.fetch;g&&this.observeFetch(g),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){var n;try{r.callback(e)}catch(e){null==(n=t.logger)||n.debug("an unexpected error occurred while triggering event callbacks",e)}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,i,o,a){if(void 0!==o&&void 0!==a){var s,l,u,c,d="GET";if("object"==typeof t&&null!==t&&"url"in t&&"method"in t?(l=t.url,d=t.method):l=null==(s=null==t?void 0:t.toString)?void 0:s.call(t),l)try{var h=new URL(l);l="".concat(h.protocol,"//").concat(h.host).concat(h.pathname).concat(h.search).concat(h.hash)}catch(e){}d=(null==r?void 0:r.method)||d,n&&(u=n.status),i&&(c={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},u=0);var f=Math.floor(performance.now()-a),p=Math.floor(o+f),g=new i_(e,d,o,o,l,r,u,f,n,c,p);this.triggerEventCallbacks(g)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null==(e=Date.now)?void 0:e.call(Date),durationStart:null==(t=null==performance?void 0:performance.now)?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(r,n){return(0,Q.__awaiter)(t,void 0,void 0,function(){var t,i,o,a,s;return(0,Q.__generator)(this,function(l){switch(l.label){case 0:try{t=this.getTimestamps()}catch(e){null==(a=this.logger)||a.debug("an unexpected error occurred while retrieving timestamps",e)}l.label=1;case 1:return l.trys.push([1,3,,4]),[4,e(r,n)];case 2:return i=l.sent(),[3,4];case 3:return o=l.sent(),[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,n?new ip(n):void 0,i?new iv(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){null==(s=this.logger)||s.debug("an unexpected error occurred while handling fetch",e)}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var r,n;try{if("json"===e.responseType){if(null==(r=t.globalScope)?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){r instanceof Error&&"InvalidStateError"===r.name&&(null==(n=t.logger)||n.error("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'")))}return null}},e.prototype.observeXhr=function(t,r,n){if(this.globalScope&&t&&r){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=(0,Q.__read)(n,2),s=a[0],l=a[1];try{this.$$AmplitudeAnalyticsEvent=(0,Q.__assign)({method:s,url:null==(e=null==l?void 0:l.toString)?void 0:e.call(l),headers:{}},o.getTimestamps())}catch(e){null==(r=o.logger)||r.error("an unexpected error occurred while calling xhr open",e)}return t.apply(this,n)},i.send=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this,a=e.createXhrJsonParser(this,o),s=t[0],l=i.$$AmplitudeAnalyticsEvent;return i.addEventListener("loadend",function(){var e;try{var t=i.getAllResponseHeaders(),r=i.getResponseHeader("content-length"),n=new ib(i.status,t,r?parseInt(r,10):void 0,a),u=i.$$AmplitudeAnalyticsEvent.headers,c=new ig(s,u);l.status=i.status,o.handleNetworkRequestEvent("xhr",{url:l.url,method:l.method},c,n,void 0,l.startTime,l.durationStart)}catch(t){null==(e=o.logger)||e.error("an unexpected error occurred while handling xhr send",t)}}),r.apply(i,t)},i.setRequestHeader=function(e,t){var r;try{this.$$AmplitudeAnalyticsEvent.headers[e]=t}catch(e){null==(r=o.logger)||r.error("an unexpected error occurred while calling xhr setRequestHeader",e)}n.apply(this,[e,t])}}},e}()),iS="[Amplitude] Network Request",iE="500-599";function iO(e,t){return RegExp("^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$").test(e)}function iI(e,t){var r,n,i=t.split(",");try{for(var o=(0,Q.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=(0,Q.__read)(s.split("-").map(Number),2),u=l[0],c=l[1];if(e===u&&void 0===c||e>=u&&e<=c)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}function iP(e){var t;if(e)try{var r=null==(t=(0,ex.getGlobalScope)())?void 0:t.location.href,n=new URL(e,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),a=n.href,s=n.host;n.hash="",n.search="";var l=n.href;return{query:i,fragment:o,href:a,hrefWithoutQueryOrHash:l,host:s}}catch(e){return}}function iT(e){return"object"!=typeof e||null===e?e?(0,Q.__spreadArray)([],(0,Q.__read)(ef),!1):void 0:0!==e.length?e:void 0}function iR(e){var t,r;return!(null==(t=null==e?void 0:e.allowlist)?void 0:t.length)&&!(null==(r=null==e?void 0:e.blocklist)?void 0:r.length)}(F||(F={})).NetworkObservable="networkObservable";var iA=function(e){void 0===e&&(e={});var t,r="@amplitude/plugin-network-capture-browser",n=[],i=function(){var e,r=new r1(function(e){var r=new iC(function(t){var r={event:t,timestamp:Date.now(),type:"network"};e.next(r)});return ik.subscribe(r,t),function(){ik.unsubscribe(r)}});return(e={})[F.NetworkObservable]=r,e};return{name:r,type:"enrichment",setup:function(o,a){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var s,l;return(0,Q.__generator)(this,function(u){var c,d,h,f,p;return"undefined"==typeof document?[2]:(s=i(),t=null==o?void 0:o.loggerProvider,d=(c={allObservables:s,networkTrackingOptions:e,amplitude:a,loggerProvider:t}).allObservables,h=c.networkTrackingOptions,f=c.amplitude,p=c.loggerProvider,l=d.networkObservable.pipe(nL(function(e){return function(e,t){void 0===t&&(t={});var r,n,i=iP(e.url);if(!i)return!1;var o=i.host;return!(!1!==t.ignoreAmplitudeRequests&&(iO(o,"*.amplitude.com")||iO(o,"amplitude.com"))||(null==(r=t.ignoreHosts)?void 0:r.find(function(e){return iO(o,e)})))&&(!!t.captureRules||void 0===e.status||!!iI(e.status,iE))&&(!t.captureRules||((0,Q.__spreadArray)([],(0,Q.__read)(t.captureRules),!1).reverse().find(function(t){if(n=function(e,t,r,n,i){if((!e.hosts||e.hosts.find(function(e){return iO(t,e)}))&&(!n||!e.urls||nb(n,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return(!r&&0!==r||!!iI(r,e.statusCodeRange||iE))&&!0}(t,o,e.status,e.url,e.method)){var r=iT(t.responseHeaders);if(e.responseWrapper&&r){var i=e.responseWrapper.headers(r);i&&(e.responseHeaders=i)}var a=iT(t.requestHeaders);if(e.requestWrapper&&a){var s=e.requestWrapper.headers(a);s&&(e.requestHeaders=s)}e.responseWrapper&&t.responseBody&&!iR(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!iR(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return void 0!==n}),!!n))&&!(e.requestWrapper&&function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===iS}))return!0}catch(e){}return!1}(o,e.requestWrapper))}(e.event,h)})).subscribe(function(e){var t,r,n,i=e.event,o=iP(i.url);if(o){var a=null==(r=i.responseWrapper)?void 0:r.bodySize,s=null==(n=i.requestWrapper)?void 0:n.bodySize;!function(e,t,r,n){(0,Q.__awaiter)(this,void 0,void 0,function(){var i,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:if(!(t.requestBodyJson||t.responseBodyJson))return[3,2];return[4,Promise.all([t.requestBodyJson,t.responseBodyJson])];case 1:if(o=(i=Q.__read.apply(void 0,[s.sent(),2]))[0],a=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==n||n.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==n||n.debug("Failed to stringify response body")}s.label=2;case 2:return null==r||r.track(iS,e),[2]}})})}(((t={})["[Amplitude] URL"]=o.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=o.query,t["[Amplitude] URL Fragment"]=o.fragment,t["[Amplitude] Request Method"]=i.method,t["[Amplitude] Status Code"]=i.status,t["[Amplitude] Start Time"]=i.startTime,t["[Amplitude] Completion Time"]=i.endTime,t["[Amplitude] Duration"]=i.duration,t["[Amplitude] Request Body Size"]=s,t["[Amplitude] Response Body Size"]=a,t["[Amplitude] Request Type"]=i.type,t["[Amplitude] Request Headers"]=i.requestHeaders,t["[Amplitude] Response Headers"]=i.responseHeaders,t),i,f,p)}}),n.push(l),null==t||t.log("".concat(r," has been successfully added.")),[2])})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,i;return(0,Q.__generator)(this,function(o){try{for(t=(e=(0,Q.__values)(n)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}};let iM=-1,iN=e=>{addEventListener("pageshow",t=>{t.persisted&&(iM=t.timeStamp,e(t))},!0)},iD=(e,t,r,n)=>{let i,o;return a=>{let s;t.value>=0&&(a||n)&&((o=t.value-(i??0))||void 0===i)&&(i=t.value,t.delta=o,s=t.value,t.rating=s>r[1]?"poor":s>r[0]?"needs-improvement":"good",e(t))}},iL=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},iV=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},iF=()=>{let e=iV();return e?.activationStart??0},ij=(e,t=-1)=>{let r=iV(),n="navigate";return iM>=0?n="back-forward-cache":r&&(document.prerendering||iF()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,navigationType:n}},iz=new WeakMap;function iB(e,t){return iz.get(e)||iz.set(e,new t),iz.get(e)}class iH{t;i=0;o=[];h(e){if(e.hadRecentInput)return;let t=this.o[0],r=this.o.at(-1);this.i&&t&&r&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}let iW=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},iU=e=>{let t=!1;return()=>{t||(e(),t=!0)}},i$=-1,iq=new Set,iG=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,iK=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(let e of iq)e();isFinite(i$)||(i$="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",iK,!0))}},iY=()=>{if(i$<0){let e=iF();i$=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime)??iG(),addEventListener("visibilitychange",iK,!0),addEventListener("prerenderingchange",iK,!0),iN(()=>{setTimeout(()=>{i$=iG()})})}return{get firstHiddenTime(){return i$},onHidden(e){iq.add(e)}}},iX=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},iQ=[1800,3e3],iZ=(e,t={})=>{iX(()=>{let r=iY(),n,i=ij("FCP"),o=iW("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<r.firstHiddenTime&&(i.value=Math.max(t.startTime-iF(),0),i.entries.push(t),n(!0)))});o&&(n=iD(e,i,iQ,t.reportAllChanges),iN(r=>{n=iD(e,i=ij("FCP"),iQ,t.reportAllChanges),iL(()=>{i.value=performance.now()-r.timeStamp,n(!0)})}))})},iJ=[.1,.25],i0=0,i1=1/0,i2=0,i5=e=>{for(let t of e)t.interactionId&&(i1=Math.min(i1,t.interactionId),i0=(i2=Math.max(i2,t.interactionId))?(i2-i1)/7+1:0)},i3=()=>t?i0:performance.interactionCount??0,i4=0;class i6{u=[];l=new Map;m;p;v(){i4=i3(),this.u.length=0,this.l.clear()}L(){let e=Math.min(this.u.length-1,Math.floor((i3()-i4)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;let t=this.u.at(-1),r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>t.P){if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((e,t)=>t.P-e.P),this.u.length>10)for(let e of this.u.splice(10))this.l.delete(e.id);this.p?.(r)}}}let i8=e=>{let t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(addEventListener("visibilitychange",e=iU(e),{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},i7=[200,500];class i9{m;h(e){this.m?.(e)}}let oe=[2500,4e3],ot=[800,1800],or=e=>{document.prerendering?iX(()=>or(e)):"complete"!==document.readyState?addEventListener("load",()=>or(e),!0):setTimeout(e)};function on(e){var t,r;return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor((r=(null==(t=e.entries[0])?void 0:t.startTime)||0,performance.timeOrigin+r)),navigationStart:Math.floor(performance.timeOrigin)}}var oi=function(){var e=null,r=(0,ex.getGlobalScope)(),n=null==r?void 0:r.document,i=null==r?void 0:r.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(r,o){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var a,s,l;return(0,Q.__generator)(this,function(u){return a=function(e){if(!e)return"";var t,n=e;try{n=decodeURI(e)}catch(e){null==(t=r.loggerProvider)||t.error("Malformed URI sequence: ",e)}return n},void 0===n||(s=a(null==i?void 0:i.href),l={"[Amplitude] Page Domain":(null==i?void 0:i.hostname)||"","[Amplitude] Page Location":s,"[Amplitude] Page Path":a(null==i?void 0:i.pathname),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":s.split("?")[0]},((e,t={})=>{iX(()=>{let r=iY(),n,i=ij("LCP"),o=iB(t,i9),a=e=>{for(let a of(t.reportAllChanges||(e=e.slice(-1)),e))o.h(a),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-iF(),0),i.entries=[a],n())},s=iW("largest-contentful-paint",a);if(s){n=iD(e,i,oe,t.reportAllChanges);let r=iU(()=>{a(s.takeRecords()),s.disconnect(),n(!0)}),o=e=>{e.isTrusted&&(i8(r),removeEventListener(e.type,o,{capture:!0}))};for(let e of["keydown","click","visibilitychange"])addEventListener(e,o,{capture:!0});iN(r=>{n=iD(e,i=ij("LCP"),oe,t.reportAllChanges),iL(()=>{i.value=performance.now()-r.timeStamp,n(!0)})})}})})(function(e){l["[Amplitude] LCP"]=on(e)}),iZ(function(e){l["[Amplitude] FCP"]=on(e)}),((e,r={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;let n=iY();iX(()=>{"interactionCount"in performance||t||(t=iW("event",i5,{type:"event",buffered:!0,durationThreshold:0}));let i,o=ij("INP"),a=iB(r,i6),s=e=>{i8(()=>{for(let t of e)a.h(t);let t=a.L();t&&t.P!==o.value&&(o.value=t.P,o.entries=t.entries,i())})},l=iW("event",s,{durationThreshold:r.durationThreshold??40});i=iD(e,o,i7,r.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(l.takeRecords()),i(!0)}),iN(()=>{a.v(),i=iD(e,o=ij("INP"),i7,r.reportAllChanges)}))})})(function(e){l["[Amplitude] INP"]=on(e)}),((e,t={})=>{let r=iY();iZ(iU(()=>{let n,i=ij("CLS",0),o=iB(t,iH),a=e=>{for(let t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,n())},s=iW("layout-shift",a);s&&(n=iD(e,i,iJ,t.reportAllChanges),r.onHidden(()=>{a(s.takeRecords()),n(!0)}),iN(()=>{o.i=0,n=iD(e,i=ij("CLS",0),iJ,t.reportAllChanges),iL(()=>n())}),setTimeout(n))}))})(function(e){l["[Amplitude] CLS"]=on(e)}),((e,t={})=>{let r=ij("TTFB"),n=iD(e,r,ot,t.reportAllChanges);or(()=>{let i=iV();i&&(r.value=Math.max(i.responseStart-iF(),0),r.entries=[i],n(!0),iN(()=>{(n=iD(e,r=ij("TTFB",0),ot,t.reportAllChanges))(!0)}))})})(function(e){l["[Amplitude] TTFB"]=on(e)}),e=function(){"hidden"===n.visibilityState&&e&&(o.track("[Amplitude] Web Vitals",l),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},oo=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),["AMP",t,e.substring(0,r)].filter(Boolean).join("_")},oa=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},os=function(e,t,r,n,i){void 0===i&&(i=!0),e.referrer;var o=e.referring_domain,a=(0,Q.__rest)(e,["referrer","referring_domain"]),s=t||{},l=(s.referrer,s.referring_domain),u=(0,Q.__rest)(s,["referrer","referring_domain"]);if(ol(r.excludeReferrers,e.referring_domain))return n.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&Object.values(e).every(function(e){return!e})&&t)return n.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var c=JSON.stringify(a)!==JSON.stringify(u),d=oa(o||"")!==oa(l||""),h=!t||c||d;return h?n.debug("This is a new campaign. An $identify event will be sent."):n.debug("This is not a new campaign because it's the same as the previous one."),h},ol=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},ou=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},oc=function(){function e(e,t){var r;this.shouldTrackNewCampaign=!1,this.options=(0,Q.__assign)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:ou(null==(r=t.cookieOptions)?void 0:r.domain)},e),this.storage=t.cookieStorage,this.storageKey=oo(t.apiKey,"MKTG"),this.webExpStorageKey=oo(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=eh,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=Q.__read.apply(void 0,[r.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||e3(this.sessionTimeout,this.lastEventTime),!os(this.currentCampaign,this.previousCampaign,this.options,this.logger,e))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var e;return(0,Q.__generator)(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:if(!(e=t.sent()))return[3,3];return[4,this.storage.remove(this.webExpStorageKey)];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||new rr().parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,r,n=(t=this.currentCampaign,r=this.options,ek(Object.entries((0,Q.__assign)((0,Q.__assign)({},eh),t)).reduce(function(e,t){var n,i=(0,Q.__read)(t,2),o=i[0],a=i[1];return(e.setOnce("initial_".concat(o),null!=(n=null!=a?a:r.initialEmptyValue)?n:"EMPTY"),a)?e.set(o,a):e.unset(o)},new ev)));return e&&(n.event_id=e),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),od="AMP_CURRENT_PAGE",oh="AMP_PREVIOUS_PAGE",of="AMP_URL_INFO";(d=j||(j={})).Direct="direct",d.Internal="internal",d.External="external";var op=new Set([R.IDENTIFY,R.GROUP_IDENTIFY,R.REVENUE]),og=function(){var e=(0,ex.getGlobalScope)(),t=void 0,r=!1,n=void 0,i=!1,o=!1,a=function(e){var t;try{var r=ny(e,n);t=new URL(r).hostname}catch(e){null==n||n.error("Could not parse URL: ",e)}return t},s=function(e){var t="undefined"!=typeof location&&location.hostname||"";switch(e?a(e):void 0){case void 0:return j.Direct;case t:return j.Internal;default:return j.External}},l=function(){(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,n,i,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:if(!(t&&r))return[3,3];return[4,t.get(of)];case 1:return e=s.sent(),n=ny("undefined"!=typeof location&&location.href||""),i=(null==e?void 0:e[od])||"",o=void 0,o=n===i?(null==e?void 0:e[oh])||"":i||document.referrer||"",[4,t.set(of,((a={})[od]=n,a[oh]=o,a))];case 2:s.sent(),s.label=3;case 3:return[2]}})})};return{name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(a,s){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(s){switch(s.label){case 0:if((n=a.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),o=!0,!e)return[3,2];return[4,(t=new tN(e.sessionStorage)).isEnabled()];case 1:r=s.sent(),e.addEventListener("popstate",l),i||(e.history.pushState=new Proxy(e.history.pushState,{apply:function(e,t,r){var n=(0,Q.__read)(r,3),i=n[0],a=n[1],s=n[2];e.apply(t,[i,a,s]),o&&l()}}),e.history.replaceState=new Proxy(e.history.replaceState,{apply:function(e,t,r){var n=(0,Q.__read)(r,3),i=n[0],a=n[1],s=n[2];e.apply(t,[i,a,s]),o&&l()}}),i=!0),s.label=2;case 2:return[2]}})})},execute:function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,a,l;return(0,Q.__generator)(this,function(u){switch(u.label){case 0:if(n=ny("undefined"!=typeof location&&location.href||""),!(t&&r))return[3,5];return[4,t.get(of)];case 1:if(null==(i=u.sent())?void 0:i[od])return[3,3];return[4,t.set(of,((l={})[od]=n,l[oh]=document.referrer||"",l))];case 2:u.sent(),u.label=3;case 3:return[4,t.get(of)];case 4:if(o=u.sent(),a="",o&&(a=o[oh]||""),op.has(e.event_type))return[2,e];e.event_properties=(0,Q.__assign)((0,Q.__assign)({},e.event_properties||{}),{"[Amplitude] Page Domain":om(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":om(e,"[Amplitude] Page Location",n),"[Amplitude] Page Path":om(e,"[Amplitude] Page Path","undefined"!=typeof location&&ny(location.pathname)||""),"[Amplitude] Page Title":om(e,"[Amplitude] Page Title",rt(re)),"[Amplitude] Page URL":om(e,"[Amplitude] Page URL",n.split("?")[0]),"[Amplitude] Previous Page Location":a,"[Amplitude] Previous Page Type":s(a)}),u.label=5;case 5:return[2,e]}})})},teardown:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(n){switch(n.label){case 0:if(e&&(e.removeEventListener("popstate",l),o=!1),!(t&&r))return[3,2];return[4,t.set(of,{})];case 1:n.sent(),n.label=2;case 2:return[2]}})})}}};function om(e,t,r){return(e.event_properties||(e.event_properties={}),void 0===e.event_properties[t])?r:e.event_properties[t]}var ov=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return(0,Q.__extends)(t,e),t.prototype.init=function(e,t,r){var n,i;return void 0===e&&(e=""),arguments.length>2?(n=t,i=r):"string"==typeof t?(n=t,i=void 0):(n=null==t?void 0:t.userId,i=t),eO(this._init((0,Q.__assign)((0,Q.__assign)({},i),{userId:n,apiKey:e})))},t.prototype._init=function(t){var r,n,i,o,a;return(0,Q.__awaiter)(this,void 0,void 0,function(){var s,l,u,c,d,h,f,p,g,m=this;return(0,Q.__generator)(this,function(v){var b,y,x,w,_;switch(v.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,(b=t.apiKey,y=t,x=this,void 0===y&&(y={}),(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,a,s,l,u,c,d,h,f,p,g,m,v,w,_,C,k,S,E,O,I,P,T,R,A,M,N,D,L,V,F,j,z,B,H,W,U,$,q,G;return(0,Q.__generator)(this,function(K){switch(K.label){case 0:if(e=y.identityStorage||t1,C={},e===t1)return[3,1];return r="",[3,5];case 1:if(null==(S=null==(k=y.cookieOptions)?void 0:k.domain))return[3,2];return n=S,[3,4];case 2:return[4,(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o;return(0,Q.__generator)(this,function(a){switch(a.label){case 0:return[4,new tI().isEnabled()];case 1:if(!a.sent()||"undefined"==typeof location||!location.hostname)return[2,""];for(e=(0,location.hostname).split("."),t=[],r="AMP_TLDTEST",n=e.length-2;n>=0;--n)t.push(e.slice(n).join("."));n=0,a.label=2;case 2:if(!(n<t.length))return[3,7];return[4,(o=new tI({domain:"."+(i=t[n])})).set(r,1)];case 3:return a.sent(),[4,o.get(r)];case 4:if(!a.sent())return[3,6];return[4,o.remove(r)];case 5:return a.sent(),[2,"."+i];case 6:return n++,[3,2];case 7:return[2,""]}})})];case 3:n=K.sent(),K.label=4;case 4:r=n,K.label=5;case 5:var Y,X;return t=Q.__assign.apply(void 0,[(C.domain=r,C.expiration=365,C.sameSite="Lax",C.secure=!1,C.upgrade=!0,C),y.cookieOptions]),[4,(Y=i=t5(y.identityStorage,t),void 0===(X=null==(O=null==(E=y.cookieOptions)?void 0:E.upgrade)||O)&&(X=!0),(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,a,s,l;return(0,Q.__generator)(this,function(u){switch(u.label){case 0:return e="".concat("amp","_").concat(b.substring(0,6)),[4,Y.getRaw(e)];case 1:if(!(t=u.sent()))return[2,{optOut:!1}];if(!X)return[3,3];return[4,Y.remove(e)];case 2:u.sent(),u.label=3;case 3:return n=(r=(0,Q.__read)(t.split("."),6))[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],[2,{deviceId:n,userId:tz(i),sessionId:tj(a),lastEventId:tj(l),lastEventTime:tj(s),optOut:!!o}]}})}))];case 6:return o=K.sent(),[4,i.get(tR(b))];case 7:return a=K.sent(),u=!(l=(s=e6()).ampTimestamp?Number(s.ampTimestamp):void 0)||Date.now()<l,c=null!=(A=null!=(R=null!=(T=null!=(I=y.deviceId)?I:u?null!=(P=s.ampDeviceId)?P:s.deviceId:void 0)?T:null==a?void 0:a.deviceId)?R:o.deviceId)?A:e_(),d=null!=(M=null==a?void 0:a.lastEventId)?M:o.lastEventId,h=null!=(N=null==a?void 0:a.lastEventTime)?N:o.lastEventTime,f=null!=(L=null!=(D=y.optOut)?D:null==a?void 0:a.optOut)?L:o.optOut,p=null!=(V=null==a?void 0:a.sessionId)?V:o.sessionId,g=null!=(j=null!=(F=y.userId)?F:null==a?void 0:a.userId)?j:o.userId,x.previousSessionDeviceId=null!=(z=null==a?void 0:a.deviceId)?z:o.deviceId,x.previousSessionUserId=null!=(B=null==a?void 0:a.userId)?B:o.userId,m={ipAddress:null==(W=null==(H=y.trackingOptions)?void 0:H.ipAddress)||W,language:null==($=null==(U=y.trackingOptions)?void 0:U.language)||$,platform:null==(G=null==(q=y.trackingOptions)?void 0:q.platform)||G},v=null==a?void 0:a.pageCounter,w=null==a?void 0:a.debugLogsEnabled,void 0!==y.autocapture&&(y.defaultTracking=y.autocapture),[4,(_=new t2(b,y.appVersion,i,t,y.defaultTracking,y.autocapture,c,y.flushIntervalMillis,y.flushMaxRetries,y.flushQueueSize,e,y.ingestionMetadata,y.instanceName,d,h,y.loggerProvider,y.logLevel,y.minIdLength,y.offline,f,y.partnerId,y.plan,y.serverUrl,y.serverZone,p,y.sessionTimeout,y.storageProvider,m,y.transport,y.useBatch,y.fetchRemoteConfig,g,v,w,y.networkTrackingOptions,y.identify,y.enableDiagnostics,void 0,void 0,y.remoteConfig)).storageProvider.isEnabled()];case 8:return K.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new tO),[2,_]}})}))];case 1:if(!(null==(r=(s=v.sent()).remoteConfig)?void 0:r.fetchRemoteConfig))return[3,3];return l=new e9(s.apiKey,s.loggerProvider,s.serverZone,null==(n=s.remoteConfig)?void 0:n.serverUrl),[4,new Promise(function(e){null==l||l.subscribe("configs.analyticsSDK.browserSDK","all",function(t,r,n){s.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:r,lastFetch:n},null,2)),t&&function(e,t){if(e){!function e(t){if("object"==typeof t&&null!==t&&!Array.isArray(t)){var r,n,i,o,a,s,l,u,c,d,h,f=Object.keys(t);try{for(var p=(0,Q.__values)(f),g=p.next();!g.done;g=p.next()){var m=g.value;try{var v=t[m];"boolean"==typeof(null==v?void 0:v.enabled)&&(v.enabled?(delete v.enabled,0===Object.keys(v).length&&(t[m]=!0)):t[m]=!1),e(v)}catch(e){}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}try{if(null==(c=null==(u=null==(l=t.autocapture)?void 0:l.networkTracking)?void 0:u.captureRules)?void 0:c.length)try{for(var b=(0,Q.__values)(t.autocapture.networkTracking.captureRules),y=b.next();!y.done;y=b.next()){var x=y.value;try{for(var w=(a=void 0,(0,Q.__values)(["responseHeaders","requestHeaders"])),_=w.next();!_.done;_=w.next()){var C=_.value,k=null!=(d=x[C])?d:{},S=k.captureSafeHeaders,E=k.allowlist;if(S||E){if(void 0!==E&&!Array.isArray(E)){delete x[C];continue}x[C]=(0,Q.__spreadArray)((0,Q.__spreadArray)([],(0,Q.__read)(S?ef:[]),!1),(0,Q.__read)(null!=E?E:[]),!1)}}}catch(e){a={error:e}}finally{try{_&&!_.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}}catch(e){}var O=null==(h=t.autocapture)?void 0:h.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick))}}(e);try{var r,n,i,o,a,s,l;if(t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e)),e&&"autocapture"in e){if("boolean"==typeof e.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture&&null!==e.autocapture){var u=(0,Q.__assign)({},e.autocapture);if(void 0===t.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture.elementInteractions&&null!==e.autocapture.elementInteractions&&(null==(i=e.autocapture.elementInteractions.pageUrlAllowlistRegex)?void 0:i.length)){u.elementInteractions=(0,Q.__assign)({},e.autocapture.elementInteractions);var c=u.elementInteractions,d=null!=(o=c.pageUrlAllowlist)?o:[],h=e.autocapture.elementInteractions.pageUrlAllowlistRegex;c.pageUrlAllowlist=rg(d,h,t),delete c.pageUrlAllowlistRegex}if("object"==typeof e.autocapture.networkTracking&&null!==e.autocapture.networkTracking&&(null==(a=e.autocapture.networkTracking.captureRules)?void 0:a.length)){u.networkTracking=(0,Q.__assign)({},e.autocapture.networkTracking);var f=null!=(s=u.networkTracking.captureRules)?s:[];try{for(var p=(0,Q.__values)(f),g=p.next();!g.done;g=p.next()){var m=g.value;m.urls=rg(null!=(l=m.urls)?l:[],m.urlsRegex,t),delete m.urlsRegex}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=(0,Q.__assign)({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},u)),"object"==typeof t.autocapture&&(t.autocapture=(0,Q.__assign)((0,Q.__assign)({},t.autocapture),u))}t.defaultTracking=t.autocapture}t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}(t,s),e()})})];case 2:v.sent(),v.label=3;case 3:return(u=new tu(s.apiKey,s.loggerProvider,s.serverZone,{enabled:s.enableDiagnostics,sampleRate:s.diagnosticsSampleRate||this._diagnosticsSampleRate})).setTag("library","".concat(tS,"/").concat(tk)),[4,e.prototype._init.call(this,s)];case 4:if(v.sent(),this.logBrowserOptions(s),this.config.diagnosticsClient=u,this.config.remoteConfigClient=l,!td(this.config.defaultTracking))return[3,6];return c=td((w=this.config).defaultTracking)&&w.defaultTracking&&"object"==typeof w.defaultTracking&&w.defaultTracking.attribution&&"object"==typeof w.defaultTracking.attribution?(0,Q.__assign)({},w.defaultTracking.attribution):{},this.webAttribution=new oc(c,this.config),[4,this.webAttribution.init()];case 5:v.sent(),v.label=6;case 6:if(f=!(h=(d=e6()).ampTimestamp?Number(d.ampTimestamp):void 0)||Date.now()<h,this.config.identify&&this.identify(this.config.identify),p=f&&!Number.isNaN(Number(d.ampSessionId))?Number(d.ampSessionId):void 0,this.setSessionId(null!=(a=null!=(o=null!=(i=t.sessionId)?i:p)?o:this.config.sessionId)?a:Date.now()),(g=e1(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,8];return[4,this.add(rp()).promise];case 7:v.sent(),v.label=8;case 8:return[4,this.add(new eW({diagnosticsClient:u})).promise];case 9:return v.sent(),[4,this.add(new tE).promise];case 10:return v.sent(),[4,this.add(new e4).promise];case 11:if(v.sent(),rf(this.config),!tc(this.config.defaultTracking,"fileDownloads"))return[3,13];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(rd()).promise];case 12:v.sent(),v.label=13;case 13:if(!tc(this.config.defaultTracking,"formInteractions"))return[3,15];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(rl()).promise];case 14:v.sent(),v.label=15;case 15:if(!th(this.config.defaultTracking))return[3,17];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(ri(tx(this.config))).promise];case 16:v.sent(),v.label=17;case 17:if(!tg(this.config.autocapture))return[3,19];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(ir(tv(this.config),{diagnosticsClient:u})).promise];case 18:v.sent(),v.label=19;case 19:if(!tm(this.config.autocapture))return[3,21];return this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(iu(tb(this.config))).promise];case 20:v.sent(),v.label=21;case 21:if(!tp(this.config.autocapture))return[3,23];return this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(iA(ty(this.config))).promise];case 22:v.sent(),v.label=23;case 23:if(!("boolean"==typeof(_=this.config.autocapture)?_:"object"==typeof _&&!0===_.webVitals))return[3,25];return this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(oi()).promise];case 24:v.sent(),v.label=25;case 25:if(!tc(this.config.autocapture,"pageUrlEnrichment"))return[3,27];return this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(og()).promise];case 26:v.sent(),v.label=27;case 27:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 28:return v.sent(),g.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},r=t.time,n=(0,Q.__rest)(t,["time"]);m.track(e.eventType,n,"number"==typeof r?{time:r}:void 0)}),[2]}})})},t.prototype.getUserId=function(){var e;return null==(e=this.config)?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),e2(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),e5(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(e_()),this.setUserId(void 0)},t.prototype.getIdentity=function(){var e,t;return{deviceId:null==(e=this.config)?void 0:e.deviceId,userId:null==(t=this.config)?void 0:t.userId,userProperties:this.userProperties}},t.prototype.getOptOut=function(){var e;return null==(e=this.config)?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null==(e=this.config)?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,r=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),eO(Promise.resolve());if(e===this.config.sessionId)return eO(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var n=this.getSessionId();n!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!=(t=this.config.lastEventId)?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,tf(this.config.defaultTracking)&&(n&&i&&r.push(this.track(tq,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:n,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++o,r);return tf(this.config.defaultTracking)&&r.push(this.track(t$,void 0,{event_id:a?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,eO(Promise.all(r))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=t3(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,r){if(t_(t)){var n=t._q;t._q=[],t=tw(new ev,n)}return(null==r?void 0:r.user_id)&&this.setUserId(r.user_id),(null==r?void 0:r.device_id)&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,t,r)},t.prototype.groupIdentify=function(t,r,n,i){if(t_(n)){var o=n._q;n._q=[],n=tw(new ev,o)}return e.prototype.groupIdentify.call(this,t,r,n,i)},t.prototype.revenue=function(t,r){if(t_(t)){var n=t._q;t._q=[],t=tw(new eU,n)}return e.prototype.revenue.call(this,t,r)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var r=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(r).promise):this.track(r),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n,i;return(0,Q.__generator)(this,function(o){return r=Date.now(),n=e3(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==t$&&t.event_type!==tq&&(!t.session_id||t.session_id===this.getSessionId())&&(n||i?(this.setSessionId(r),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):n||this.trackCampaignEventIfNeeded()),t.event_type===R.IDENTIFY&&t.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(t.user_properties)),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,Q.__assign)((0,Q.__assign)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){if(!(e>1)&&!(e<0)&&!this.config){this._diagnosticsSampleRate=e;return}},t}(eI);(h=z||(z={})).US="US",h.EU="EU",h.STAGING="STAGING";var ob="[Amplitude]",oy="".concat(ob," Session Replay ID"),ox=z.US,ow={enabled:!0},o_="".concat(ob," Session Replay Debug"),oC="amp-mask";(f=B||(B={})).GET_SR_PROPS="get-sr-props",f.DEBUG_INFO="debug-info",f.FETCH_REQUEST="fetch-request",f.METADATA="metadata",f.TARGETING_DECISION="targeting-decision";var ok=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){if(!this.logger)return function(){};var t,r=this.logger[e];return"function"==typeof r?(null!=(t=r.__rrweb_original__)?t:r).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}(),oS="medium",oE=function(e,t,r){switch(t){case"light":if("input"!==e)return!0;var n,i,o=r?(i=(n=r).type,n.hasAttribute("data-rr-is-password")?"password":i?i.toLowerCase():null):"";if(!o)return!1;if(["password","hidden","email","tel"].includes(o)||r.autocomplete.startsWith("cc-"))return!0;return!1;case"medium":case"conservative":return!0;default:return oE(e,oS,r)}},oO=function(e,t,r){var n,i,o;if(void 0===t&&(t={defaultMaskLevel:oS}),r){if(r.closest("."+oC)||(null!=(n=t.maskSelector)?n:[]).some(function(e){return r.closest(e)}))return!0;if(r.closest(".amp-unmask")||(null!=(i=t.unmaskSelector)?i:[]).some(function(e){return r.closest(e)}))return!1}return oE(e,null!=(o=t.defaultMaskLevel)?o:oS,r)},oI=function(e,t){return function(r,n){return oO(e,t,n)?r.replace(/[^\s]/g,"*"):r}},oP=function(){var e=(0,ex.getGlobalScope)();return(null==e?void 0:e.location)?e.location.href:""},oT=function(e,t){return t||(e===z.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===z.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")},oR=function(e){var t=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp("^".concat(t,"$"))},oA=function(e){if(!e.every(function(e){return"string"==typeof e.selector&&"string"==typeof e.replacement}))throw Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(e){var t;return"string"==typeof(t=e.selector)&&""!==t.trim()&&!!/^\/|^https?:\/\/[^\s]+$/.test(t)}))throw Error("ugcFilterRules must be an array of objects with valid globs")},oM=function(e,t){var r,n;try{for(var i=(0,Q.__values)(t),o=i.next();!o.done;o=i.next()){var a=o.value,s=oR(a.selector);if(s.test(e))return e.replace(s,a.replacement)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},oN=function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,3,,4]),!(e=(0,ex.getGlobalScope)()))return[3,2];return[4,e.navigator.storage.estimate()];case 1:return r=(t=i.sent()).usage,n=t.quota,[2,{totalStorageSize:r?Math.round(r/1024):0,percentOfQuota:r&&n?Math.round((r/n+Number.EPSILON)*1e3)/1e3:0,usageDetails:JSON.stringify(t.usageDetails)}];case 2:return[3,4];case 3:return i.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},oD=function(e){var t=(0,Q.__assign)({},e),r=t.apiKey;return t.apiKey="****".concat(r.substring(r.length-4)),t},oL=function(){return{flushMaxRetries:2,logLevel:N.Warn,loggerProvider:new eR,transportProvider:new tM}},oV=function(e){function t(t,r){var n,i,o,a,s,l=this,u=oL();return(l=e.call(this,(0,Q.__assign)((0,Q.__assign)({transportProvider:u.transportProvider,loggerProvider:new ok(r.loggerProvider||u.loggerProvider)},r),{apiKey:t}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=u.flushMaxRetries?r.flushMaxRetries:u.flushMaxRetries,l.apiKey=t,l.sampleRate=r.sampleRate||0,l.serverZone=r.serverZone||ox,l.configServerUrl=r.configServerUrl,l.trackServerUrl=r.trackServerUrl,l.shouldInlineStylesheet=r.shouldInlineStylesheet,l.version=r.version,l.performanceConfig=r.performanceConfig||ow,l.storeType=null!=(n=r.storeType)?n:"idb",l.applyBackgroundColorToBlockedElements=null!=(i=r.applyBackgroundColorToBlockedElements)&&i,l.enableUrlChangePolling=null!=(o=r.enableUrlChangePolling)&&o,l.urlChangePollingInterval=null!=(a=r.urlChangePollingInterval)?a:1e3,l.captureDocumentTitle=null!=(s=r.captureDocumentTitle)&&s,r.privacyConfig&&(l.privacyConfig=r.privacyConfig),r.interactionConfig&&(l.interactionConfig=r.interactionConfig,l.interactionConfig.ugcFilterRules&&oA(l.interactionConfig.ugcFilterRules)),r.debugMode&&(l.debugMode=r.debugMode),r.experimental&&(l.experimental=r.experimental),r.omitElementTags&&(l.omitElementTags=r.omitElementTags),l}return(0,Q.__extends)(t,e),t}(eM),oF=((p=oF||{})[p.DomContentLoaded=0]="DomContentLoaded",p[p.Load=1]="Load",p[p.FullSnapshot=2]="FullSnapshot",p[p.IncrementalSnapshot=3]="IncrementalSnapshot",p[p.Meta=4]="Meta",p[p.Custom=5]="Custom",p[p.Plugin=6]="Plugin",p),oj=((g=oj||{})[g.Mutation=0]="Mutation",g[g.MouseMove=1]="MouseMove",g[g.MouseInteraction=2]="MouseInteraction",g[g.Scroll=3]="Scroll",g[g.ViewportResize=4]="ViewportResize",g[g.Input=5]="Input",g[g.TouchMove=6]="TouchMove",g[g.MediaInteraction=7]="MediaInteraction",g[g.StyleSheetRule=8]="StyleSheetRule",g[g.CanvasMutation=9]="CanvasMutation",g[g.Font=10]="Font",g[g.Log=11]="Log",g[g.Drag=12]="Drag",g[g.StyleDeclaration=13]="StyleDeclaration",g[g.Selection=14]="Selection",g[g.AdoptedStyleSheet=15]="AdoptedStyleSheet",g[g.CustomElement=16]="CustomElement",g),oz=((m=oz||{})[m.MouseUp=0]="MouseUp",m[m.MouseDown=1]="MouseDown",m[m.Click=2]="Click",m[m.ContextMenu=3]="ContextMenu",m[m.DblClick=4]="DblClick",m[m.Focus=5]="Focus",m[m.Blur=6]="Blur",m[m.TouchStart=7]="TouchStart",m[m.TouchMove_Departed=8]="TouchMove_Departed",m[m.TouchEnd=9]="TouchEnd",m[m.TouchCancel=10]="TouchCancel",m),oB=((v=oB||{})[v.Mouse=0]="Mouse",v[v.Pen=1]="Pen",v[v.Touch=2]="Touch",v),oH=((b=oH||{})[b["2D"]=0]="2D",b[b.WebGL=1]="WebGL",b[b.WebGL2=2]="WebGL2",b),oW=((y=oW||{})[y.Play=0]="Play",y[y.Pause=1]="Pause",y[y.Seeked=2]="Seeked",y[y.VolumeChange=3]="VolumeChange",y[y.RateChange=4]="RateChange",y),oU=((x=oU||{}).Start="start",x.Pause="pause",x.Resume="resume",x.Resize="resize",x.Finish="finish",x.FullsnapshotRebuilded="fullsnapshot-rebuilded",x.LoadStylesheetStart="load-stylesheet-start",x.LoadStylesheetEnd="load-stylesheet-end",x.SkipStart="skip-start",x.SkipEnd="skip-end",x.MouseInteraction="mouse-interaction",x.EventCast="event-cast",x.CustomEvent="custom-event",x.Flush="flush",x.StateChange="state-change",x.PlayBack="play-back",x.Destroy="destroy",x),o$=((w=o$||{})[w.Document=0]="Document",w[w.DocumentType=1]="DocumentType",w[w.Element=2]="Element",w[w.Text=3]="Text",w[w.CDATA=4]="CDATA",w[w.Comment=5]="Comment",w),oq=function(e,t){var r=document.createDocumentFragment(),n=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),0!==(e=e.filter(function(e){try{r.querySelector(e)}catch(r){return t.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0})).length)return e};return e.blockSelector=n(e.blockSelector),e.maskSelector=n(e.maskSelector),e.unmaskSelector=n(e.unmaskSelector),e},oG=function(){function e(e,t){this.localConfig=t,this.remoteConfigClient=e}return e.prototype.generateJoinedConfig=function(){var e,t,r;return(0,Q.__awaiter)(this,void 0,void 0,function(){var n,i,o,a,s,l,u,c,d,h,f,p,g,m,v,b,y=this;return(0,Q.__generator)(this,function(x){switch(x.label){case 0:return(n=(0,Q.__assign)({},this.localConfig)).optOut=this.localConfig.optOut,n.captureEnabled=!0,[4,new Promise(function(e){y.remoteConfigClient.subscribe("configs.sessionReplay","all",function(t,r){var o;if(y.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(r,":"),JSON.stringify(t,null,2)),t){var a=t.sr_sampling_config,s=t.sr_privacy_config,l=t.sr_targeting_config,u=null==(o=n.interactionConfig)?void 0:o.ugcFilterRules;n.interactionConfig=t.sr_interaction_config,n.interactionConfig&&u&&(n.interactionConfig.ugcFilterRules=u),n.loggingConfig=t.sr_logging_config,(a||s||l)&&(i={},a&&(i.sr_sampling_config=a),s&&(i.sr_privacy_config=s),l&&(i.sr_targeting_config=l))}e()})})];case 1:if(x.sent(),!i)return[2,{localConfig:this.localConfig,joinedConfig:n,remoteConfig:i}];if(o=i.sr_sampling_config,a=i.sr_privacy_config,s=i.sr_targeting_config,o&&Object.keys(o).length>0?(Object.prototype.hasOwnProperty.call(o,"capture_enabled")?n.captureEnabled=o.capture_enabled:n.captureEnabled=!1,Object.prototype.hasOwnProperty.call(o,"sample_rate")&&(n.sampleRate=o.sample_rate)):(n.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),a){l=null!=(e=n.privacyConfig)?e:{},u={defaultMaskLevel:null!=(r=null!=(t=a.defaultMaskLevel)?t:l.defaultMaskLevel)?r:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},c=function(e){var t,r,n,i,o,a,s,l,u,c={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var d=(0,Q.__values)(null!=(s=e.blockSelector)?s:[]),h=d.next();!h.done;h=d.next()){var f=h.value;c[f]="block"}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var p=(0,Q.__values)(null!=(l=e.maskSelector)?l:[]),g=p.next();!g.done;g=p.next()){var f=g.value;c[f]="mask"}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}try{for(var m=(0,Q.__values)(null!=(u=e.unmaskSelector)?u:[]),v=m.next();!v.done;v=m.next()){var f=v.value;c[f]="unmask"}}catch(e){o={error:e}}finally{try{v&&!v.done&&(a=m.return)&&a.call(m)}finally{if(o)throw o.error}}return c},d=(0,Q.__assign)((0,Q.__assign)({},c(l)),c(a));try{for(f=(h=(0,Q.__values)(Object.entries(d))).next();!f.done;f=h.next())g=(p=(0,Q.__read)(f.value,2))[0],m=p[1],"mask"===m?u.maskSelector.push(g):"block"===m?u.blockSelector.push(g):"unmask"===m&&u.unmaskSelector.push(g)}catch(e){v={error:e}}finally{try{f&&!f.done&&(b=h.return)&&b.call(h)}finally{if(v)throw v.error}}n.privacyConfig=oq(u,this.localConfig.loggerProvider)}return s&&Object.keys(s).length>0&&(n.targetingConfig=s),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:oD(n)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:n,remoteConfig:i}]}})})},e}(),oK=Uint8Array,oY=Uint16Array,oX=Uint32Array,oQ=new oK([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oZ=new oK([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),oJ=new oK([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o0=function(e,t){for(var r=new oY(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new oX(r[30]),n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return[r,i]},o1=o0(oQ,2),o2=o1[0],o5=o1[1];o2[28]=258,o5[258]=28;for(var o3=o0(oZ,0),o4=(o3[0],o3[1]),o6=new oY(32768),o8=0;o8<32768;++o8){var o7=(43690&o8)>>>1|(21845&o8)<<1;o7=(61680&(o7=(52428&o7)>>>2|(13107&o7)<<2))>>>4|(3855&o7)<<4,o6[o8]=((65280&o7)>>>8|(255&o7)<<8)>>>1}for(var o9=function(e,t,r){for(var n,i=e.length,o=0,a=new oY(t);o<i;++o)++a[e[o]-1];var s=new oY(t);for(o=0;o<t;++o)s[o]=s[o-1]+a[o-1]<<1;if(r){n=new oY(1<<t);var l=15-t;for(o=0;o<i;++o)if(e[o])for(var u=o<<4|e[o],c=t-e[o],d=s[e[o]-1]++<<c,h=d|(1<<c)-1;d<=h;++d)n[o6[d]>>>l]=u}else for(o=0,n=new oY(i);o<i;++o)n[o]=o6[s[e[o]-1]++]>>>15-e[o];return n},ae=new oK(288),o8=0;o8<144;++o8)ae[o8]=8;for(var o8=144;o8<256;++o8)ae[o8]=9;for(var o8=256;o8<280;++o8)ae[o8]=7;for(var o8=280;o8<288;++o8)ae[o8]=8;for(var at=new oK(32),o8=0;o8<32;++o8)at[o8]=5;var ar=o9(ae,9,0),an=o9(at,5,0),ai=function(e){return(e/8|0)+(7&e&&1)},ao=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var n=new(e instanceof oY?oY:e instanceof oX?oX:oK)(r-t);return n.set(e.subarray(t,r)),n},aa=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>>8},as=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},al=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,o=r.slice();if(!i)return[new oK(0),0];if(1==i){var a=new oK(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var s=r[0],l=r[1],u=0,c=1,d=2;for(r[0]={s:-1,f:s.f+l.f,l:s,r:l};c!=i-1;)s=r[r[u].f<r[d].f?u++:d++],l=r[u!=c&&r[u].f<r[d].f?u++:d++],r[c++]={s:-1,f:s.f+l.f,l:s,r:l};for(var h=o[0].s,n=1;n<i;++n)o[n].s>h&&(h=o[n].s);var f=new oY(h+1),p=au(r[c-1],f,0);if(p>t){var n=0,g=0,m=p-t,v=1<<m;for(o.sort(function(e,t){return f[t.s]-f[e.s]||e.f-t.f});n<i;++n){var b=o[n].s;if(f[b]>t)g+=v-(1<<p-f[b]),f[b]=t;else break}for(g>>>=m;g>0;){var y=o[n].s;f[y]<t?g-=1<<t-f[y]++-1:++n}for(;n>=0&&g;--n){var x=o[n].s;f[x]==t&&(--f[x],++g)}p=t}return[new oK(f),p]},au=function(e,t,r){return -1==e.s?Math.max(au(e.l,t,r+1),au(e.r,t,r+1)):t[e.s]=r},ac=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new oY(++t),n=0,i=e[0],o=1,a=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[r.subarray(0,n),t]},ad=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},ah=function(e,t,r){var n=r.length,i=ai(t+2);e[i]=255&n,e[i+1]=n>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<n;++o)e[i+o+4]=r[o];return(i+4+n)*8},af=function(e,t,r,n,i,o,a,s,l,u,c){aa(t,c++,r),++i[256];for(var d,h,f,p,g=al(i,15),m=g[0],v=g[1],b=al(o,15),y=b[0],x=b[1],w=ac(m),_=w[0],C=w[1],k=ac(y),S=k[0],E=k[1],O=new oY(19),I=0;I<_.length;++I)O[31&_[I]]++;for(var I=0;I<S.length;++I)O[31&S[I]]++;for(var P=al(O,7),T=P[0],R=P[1],A=19;A>4&&!T[oJ[A-1]];--A);var M=u+5<<3,N=ad(i,ae)+ad(o,at)+a,D=ad(i,m)+ad(o,y)+a+14+3*A+ad(O,T)+(2*O[16]+3*O[17]+7*O[18]);if(M<=N&&M<=D)return ah(t,c,e.subarray(l,l+u));if(aa(t,c,1+(D<N)),c+=2,D<N){d=o9(m,v,0),h=m,f=o9(y,x,0),p=y;var L=o9(T,R,0);aa(t,c,C-257),aa(t,c+5,E-1),aa(t,c+10,A-4),c+=14;for(var I=0;I<A;++I)aa(t,c+3*I,T[oJ[I]]);c+=3*A;for(var V=[_,S],F=0;F<2;++F)for(var j=V[F],I=0;I<j.length;++I){var z=31&j[I];aa(t,c,L[z]),c+=T[z],z>15&&(aa(t,c,j[I]>>>5&127),c+=j[I]>>>12)}}else d=ar,h=ae,f=an,p=at;for(var I=0;I<s;++I)if(n[I]>255){var z=n[I]>>>18&31;as(t,c,d[z+257]),c+=h[z+257],z>7&&(aa(t,c,n[I]>>>23&31),c+=oQ[z]);var B=31&n[I];as(t,c,f[B]),c+=p[B],B>3&&(as(t,c,n[I]>>>5&8191),c+=oZ[B])}else as(t,c,d[n[I]]),c+=h[n[I]];return as(t,c,d[256]),c+h[256]},ap=new oX([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ag=function(e,t,r,n,i,o){var a=e.length,s=new oK(n+a+5*(1+Math.floor(a/7e3))+i),l=s.subarray(n,s.length-i),u=0;if(!t||a<8)for(var c=0;c<=a;c+=65535){var d=c+65535;d<a?u=ah(l,u,e.subarray(c,d)):(l[c]=o,u=ah(l,u,e.subarray(c,a)))}else{for(var h=ap[t-1],f=h>>>13,p=8191&h,g=(1<<r)-1,m=new oY(32768),v=new oY(g+1),b=Math.ceil(r/3),y=2*b,x=function(t){return(e[t]^e[t+1]<<b^e[t+2]<<y)&g},w=new oX(25e3),_=new oY(288),C=new oY(32),k=0,S=0,c=0,E=0,O=0,I=0;c<a;++c){var P=x(c),T=32767&c,R=v[P];if(m[T]=R,v[P]=T,O<=c){var A=a-c;if((k>7e3||E>24576)&&A>423){u=af(e,l,0,w,_,C,S,E,I,c-I,u),E=k=S=0,I=c;for(var M=0;M<286;++M)_[M]=0;for(var M=0;M<30;++M)C[M]=0}var N=2,D=0,L=p,V=T-R&32767;if(A>2&&P==x(c-V))for(var F=Math.min(f,A)-1,j=Math.min(32767,c),z=Math.min(258,A);V<=j&&--L&&T!=R;){if(e[c+N]==e[c+N-V]){for(var B=0;B<z&&e[c+B]==e[c+B-V];++B);if(B>N){if(N=B,D=V,B>F)break;for(var H=Math.min(V,B-2),W=0,M=0;M<H;++M){var U=c-V+M+32768&32767,$=m[U],q=U-$+32768&32767;q>W&&(W=q,R=U)}}}R=m[T=R],V+=T-R+32768&32767}if(D){w[E++]=0x10000000|o5[N]<<18|o4[D];var G=31&o5[N],K=31&o4[D];S+=oQ[G]+oZ[K],++_[257+G],++C[K],O=c+N,++k}else w[E++]=e[c],++_[e[c]]}}u=af(e,l,o,w,_,C,S,E,I,c-I,u)}return ao(s,0,n+ai(u)+i)},am=function(){var e=1,t=0;return{p:function(r){for(var n=e,i=t,o=r.length,a=0;a!=o;){for(var s=Math.min(a+5552,o);a<s;++a)n+=r[a],i+=n;n%=65521,i%=65521}e=n,t=i},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+((255&e)<<23)*2}}},av=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},ab=function(e,t){var r=t.level,n=0==r?0:r<6?1:9==r?3:2;e[0]=120,e[1]=n<<6|(n?32-2*n:1)},ay=function(){function e(e,t,r,n){var i,o=this;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t,r,n,i,o;return JSON.stringify(function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return new TextDecoder().decode(e);for(var n=0;n<e.length;){var i=e[n++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((31&i)<<6|63&e[n++]):i<240?r+=String.fromCharCode((15&i)<<12|(63&e[n++])<<6|63&e[n++]):r+=String.fromCharCode(55296|(i=((15&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536)>>10,56320|1023&i)}return r}((t=function(e,t){var r=e.length;if("undefined"!=typeof TextEncoder)return new TextEncoder().encode(e);for(var n=new oK(e.length+(e.length>>>1)),i=0,o=function(e){n[i++]=e},a=0;a<r;++a){if(i+5>n.length){var s=new oK(i+8+(r-a<<1));s.set(n),n=s}var l=e.charCodeAt(a);l<128?o(l):(l<2048?o(192|l>>>6):(l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),o(128|l>>>12&63)):o(224|l>>>12),o(128|l>>>6&63)),o(128|63&l))}return ao(n,0,i)}(JSON.stringify({...e,v:"v1"})),void 0===r&&(r={}),(n=am()).p(t),ab(o=ag(t,null==(i=r).level?6:i.level,null==i.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+i.mem,2,4,!0),r),av(o,o.length-4,n.d()),o),!0))},this.addCompressedEventToManager=function(e,t){o.eventsManager&&o.deviceId&&o.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:o.deviceId})},this.addCompressedEvent=function(e,t){if(o.worker)try{o.worker.postMessage({event:e,sessionId:t})}catch(r){"DataCloneError"===r.name?o.worker.postMessage(JSON.stringify({event:e,sessionId:t})):o.config.loggerProvider.warn("Unexpected error while posting message to worker:",r)}else{var r=o.compressEvent(e);o.addCompressedEventToManager(r,t)}},this.terminate=function(){var e;null==(e=o.worker)||e.terminate()};var a=(0,ex.getGlobalScope)();if(this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null==(i=t.performanceConfig)?void 0:i.timeout)||2e3,n){t.loggerProvider.log("[Experimental] Enabling web worker for compression");var s=new Worker(URL.createObjectURL(new Blob([n],{type:"application/javascript"})));s.onerror=function(e){t.loggerProvider.error(e)},s.onmessage=function(e){var t=e.data,r=t.compressedEvent,n=t.sessionId;o.addCompressedEventToManager(r,n)},this.worker=s}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var r;this.canUseIdleCallback&&(null==(r=this.config.performanceConfig)?void 0:r.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.taskQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){for(var t=this;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var r=this.taskQueue.shift();if(r){var n=r.event,i=r.sessionId;this.addCompressedEvent(n,i)}}this.taskQueue.length>0?requestIdleCallback(function(e){t.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e}(),ax="Failed to store session replay events in IndexedDB",aw="1.29.3",a_=function(){function e(e){var t=e.trackServerUrl,r=e.loggerProvider,n=e.payloadBatcher;this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=r,this.payloadBatcher=n||function(e){return e},this.trackServerUrl=t}return e.prototype.sendEventsList=function(e){this.addToQueue((0,Q.__assign)((0,Q.__assign)({},e),{attempts:0,timeout:0}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.filter(function(t){return t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:"Session replay event batch rejected due to exceeded retry count"}),!1)}).forEach(function(t){(e.queue=e.queue.concat(t),0===t.timeout)?e.schedule(0):setTimeout(function(){t.timeout=0,e.schedule(0)},t.timeout)})},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n=this;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:return t=[],r=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):r.push(e)}),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(t.map(function(t){return n.send(t,e)}))];case 1:return i.sent(),[2]}})})},e.prototype.send=function(e,t){var r,n;return void 0===t&&(t=!0),(0,Q.__awaiter)(this,void 0,void 0,function(){var i,o,a,s,l,u,c,d,h,f,p,g;return(0,Q.__generator)(this,function(m){switch(m.label){case 0:if(!(i=e.apiKey))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})];if(!(o=e.deviceId))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})];if(a=oP(),s=aw,l=e.sampleRate,u=new URLSearchParams({device_id:o,session_id:"".concat(e.sessionId),type:"".concat(e.type)}),c="".concat((null==(r=e.version)?void 0:r.type)||"standalone","/").concat((null==(n=e.version)?void 0:n.version)||s),0===(d=this.payloadBatcher({version:1,events:e.events})).events.length)return this.completeRequest({context:e}),[2];m.label=1;case 1:return m.trys.push([1,3,,4]),h={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(i),"X-Client-Version":s,"X-Client-Library":c,"X-Client-Url":a.substring(0,1e3),"X-Client-Sample-Rate":"".concat(l)},body:JSON.stringify(d),method:"POST"},[4,fetch("".concat(oT(e.serverZone,this.trackServerUrl),"?").concat(u.toString()),h)];case 2:if(null===(f=m.sent()))return this.completeRequest({context:e,err:"Unexpected error occurred"}),[2];if(t)this.handleReponse(f.status,e);else{p="";try{p=JSON.stringify(f.body,null,2)}catch(e){}this.completeRequest({context:e,success:"".concat(f.status,": ").concat(p)})}return[3,4];case 3:return g=m.sent(),this.completeRequest({context:e,err:g}),[3,4];case 4:return[2]}})})},e.prototype.handleReponse=function(e,t){switch(new tA().buildStatus(e)){case M.Success:this.handleSuccessResponse(t);break;case M.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){this.addToQueue((0,Q.__assign)((0,Q.__assign)({},e),{timeout:e.attempts*this.retryTimeout}))},e.prototype.completeRequest=function(e){var t=e.context,r=e.err,n=e.success;t.onComplete(),r?this.loggerProvider.warn(r):n&&this.loggerProvider.log(n)},e}(),aC=e.i(1217),ak=function(){function e(e){var t,r,n,i=this;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var r=i.getStringSize(t);return i.getEventsArraySize(e)+r>=i.maxPersistedEventsSize||Date.now()-i.timeAtLastSplit>i.interval&&!!e.length&&(i.interval=Math.min(i.maxInterval,i.interval+i.minInterval),i._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!=(t=e.minInterval)?t:this.minInterval,this.maxInterval=null!=(r=e.maxInterval)?r:this.maxInterval,this.maxPersistedEventsSize=null!=(n=e.maxPersistedEventsSize)?n:this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(e){return e.length},e.prototype.getEventsArraySize=function(e){var t,r,n=0;try{for(var i=(0,Q.__values)(e),o=i.next();!o.done;o=i.next()){var a=o.value;n+=this.getStringSize(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n+(2+Math.max(0,e.length-1)+2*e.length)},e}();(_=H||(H={})).RECORDING="recording",_.SENT="sent";var aS="sessionCurrentSequence",aE="sequencesToSend",aO=function(){var e=(0,ex.getGlobalScope)();return new Promise(function(t,r){if(!e)return r(Error("Global scope not found"));if(!e.indexedDB)return r(Error("Session Replay: cannot find indexedDB"));try{var n=e.indexedDB.open("keyval-store");n.onupgradeneeded=function(){1===n.result.version&&(n.result.close(),n.transaction&&n.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},n.onsuccess=function(){t(n.result)},n.onerror=function(){r(n.error)}}catch(e){r(e)}})},aI=function(e){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){switch(t.label){case 0:if(!(e.length>0))return[3,2];return[4,Promise.all(e.splice(0,10))];case 1:return t.sent(),[3,0];case 2:return[2]}})})},aP=function(e){var t,r;return e.objectStoreNames.contains(aS)||(r=e.createObjectStore(aS,{keyPath:"sessionId"})),e.objectStoreNames.contains(aE)||(t=e.createObjectStore(aE,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:r}},aT=function(e){function t(t){var r=e.call(this,t)||this;return r.getSequencesToSend=function(){return(0,Q.__awaiter)(r,void 0,void 0,function(){var e,t,r,n,i,o;return(0,Q.__generator)(this,function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),e=[],[4,this.db.transaction("sequencesToSend").store.openCursor()];case 1:t=a.sent(),a.label=2;case 2:if(!t)return[3,4];return n=(r=t.value).sessionId,i=r.events,e.push({events:i,sequenceId:t.key,sessionId:n}),[4,t.continue()];case 3:return t=a.sent(),[3,2];case 4:return[2,e];case 5:return o=a.sent(),this.loggerProvider.warn("".concat(ax,": ").concat(o)),[3,6];case 6:return[2,void 0]}})})},r.storeCurrentSequence=function(e){return(0,Q.__awaiter)(r,void 0,void 0,function(){var t,r,n;return(0,Q.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.db.get(aS,e)];case 1:if(!(t=i.sent()))return[2,void 0];return[4,this.db.put(aE,{sessionId:e,events:t.events})];case 2:return r=i.sent(),[4,this.db.put(aS,{sessionId:e,events:[]})];case 3:return i.sent(),[2,(0,Q.__assign)((0,Q.__assign)({},t),{sessionId:e,sequenceId:r})];case 4:return n=i.sent(),this.loggerProvider.warn("".concat(ax,": ").concat(n)),[3,5];case 5:return[2,void 0]}})})},r.addEventToCurrentSequence=function(e,t){return(0,Q.__awaiter)(r,void 0,void 0,function(){var r,n,i,o,a,s;return(0,Q.__generator)(this,function(l){switch(l.label){case 0:return l.trys.push([0,10,,11]),[4,(r=this.db.transaction(aS,"readwrite")).store.get(e)];case 1:if(n=l.sent())return[3,3];return[4,r.store.put({sessionId:e,events:[t]})];case 2:return l.sent(),[2];case 3:if(i=void 0,!this.shouldSplitEventsList(n.events,t))return[3,5];return i=n.events,[4,r.store.put({sessionId:e,events:[t]})];case 4:return l.sent(),[3,7];case 5:return o=n.events.concat(t),[4,r.store.put({sessionId:e,events:o})];case 6:l.sent(),l.label=7;case 7:return[4,r.done];case 8:if(l.sent(),!i)return[2,void 0];return[4,this.storeSendingEvents(e,i)];case 9:if(!(a=l.sent()))return[2,void 0];return[2,{events:i,sessionId:e,sequenceId:a}];case 10:return s=l.sent(),this.loggerProvider.warn("".concat(ax,": ").concat(s)),[3,11];case 11:return[2,void 0]}})})},r.storeSendingEvents=function(e,t){return(0,Q.__awaiter)(r,void 0,void 0,function(){var r;return(0,Q.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.db.put(aE,{sessionId:e,events:t})];case 1:return[2,n.sent()];case 2:return r=n.sent(),this.loggerProvider.warn("".concat(ax,": ").concat(r)),[3,3];case 3:return[2,void 0]}})})},r.cleanUpSessionEventsStore=function(e,t){return(0,Q.__awaiter)(r,void 0,void 0,function(){var e;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.db.delete(aE,t)];case 2:return r.sent(),[3,4];case 3:return e=r.sent(),this.loggerProvider.warn("".concat(ax,": ").concat(e)),[3,4];case 4:return[2]}})})},r.transitionFromKeyValStore=function(e){return(0,Q.__awaiter)(r,void 0,void 0,function(){var t,r,n,i,o,a,s,l=this;return(0,Q.__generator)(this,function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),[4,aO()];case 1:if(!(t=u.sent()))return[2];r=function(e,t){return(0,Q.__awaiter)(l,void 0,void 0,function(){var r,n,i=this;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:return r=t.sessionSequences,n=[],Object.keys(r).forEach(function(o){var a=parseInt(o,10),s=r[a];if(a===t.currentSequenceId){var l=s.events.map(function(t){return(0,Q.__awaiter)(i,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return[2,this.addEventToCurrentSequence(e,t)]})})});n.push.apply(n,(0,Q.__spreadArray)([],(0,Q.__read)(l),!1))}else s.status!==H.SENT&&n.push(i.storeSendingEvents(e,s.events))}),[4,aI(n)];case 1:return o.sent(),[2]}})})},n="".concat(Z,"_").concat(this.apiKey.substring(0,10)),u.label=2;case 2:return u.trys.push([2,4,,5]),i=t.transaction("keyval").objectStore("keyval").getAll(n),[4,new Promise(function(t){i.onsuccess=function(n){return(0,Q.__awaiter)(l,void 0,void 0,function(){var i,o,a,s=this;return(0,Q.__generator)(this,function(l){switch(l.label){case 0:if(!(o=(i=n&&n.target.result)&&i[0]))return[3,2];return a=[],Object.keys(o).forEach(function(t){var n=parseInt(t,10),i=o[n];if(e===n)a.push(r(n,i));else{var l=i.sessionSequences;Object.keys(l).forEach(function(e){var t=parseInt(e,10);l[t].status!==H.SENT&&a.push(s.storeSendingEvents(n,l[t].events))})}}),[4,aI(a)];case 1:l.sent(),l.label=2;case 2:return t(),[2]}})})}})];case 3:return u.sent(),(o=(0,ex.getGlobalScope)())&&o.indexedDB.deleteDatabase("keyval-store"),[3,5];case 4:return a=u.sent(),this.loggerProvider.warn("Failed to transition session replay events from keyval to new store: ".concat(a)),[3,5];case 5:return[3,7];case 6:return s=u.sent(),this.loggerProvider.warn("Failed to access keyval store: ".concat(s,". For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices")),[3,7];case 7:return[2]}})})},r.apiKey=t.apiKey,r.db=t.db,r}return(0,Q.__extends)(t,e),t.new=function(e,r,n){return(0,Q.__awaiter)(this,void 0,void 0,function(){var i,o,a,s;return(0,Q.__generator)(this,function(l){switch(l.label){case 0:var u;return l.trys.push([0,3,,4]),i="replay"===e?"":"_".concat(e),[4,(u="".concat(r.apiKey.substring(0,10),"_amp_session_replay_events").concat(i),(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){switch(e.label){case 0:return[4,(0,aC.openDB)(u,1,{upgrade:aP})];case 1:return[2,e.sent()]}})}))];case 1:return o=l.sent(),[4,(a=new t((0,Q.__assign)((0,Q.__assign)({},r),{db:o}))).transitionFromKeyValStore(n)];case 2:return l.sent(),[2,a];case 3:return s=l.sent(),r.loggerProvider.warn("".concat(ax,": ").concat(s)),[3,4];case 4:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:if(!e)return[3,2];return[4,this.db.get("sessionCurrentSequence",e)];case 1:if(!(t=s.sent()))return[2,void 0];return[2,[t]];case 2:r=[],s.label=3;case 3:return s.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:i=(n=Q.__values.apply(void 0,[s.sent()])).next(),s.label=5;case 5:if(i.done)return[3,7];t=i.value,r.push(t),s.label=6;case 6:return i=n.next(),[3,5];case 7:return[3,10];case 8:return o={error:s.sent()},[3,10];case 9:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}return[7];case 10:return[2,r]}})})},t}(ak),aR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t}return(0,Q.__extends)(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,r=(0,Q.__spreadArray)([],(0,Q.__read)(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}},t.prototype.getSequencesToSend=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return[2,Object.entries(this.finalizedSequences).map(function(e){var t=(0,Q.__read)(e,2),r=t[0],n=t[1],i=n.sessionId,o=n.events;return{sequenceId:Number(r),sessionId:i,events:o}})]})})},t.prototype.storeCurrentSequence=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){return this.sequences[e]?[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){var r;return(0,Q.__generator)(this,function(n){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),[2,r]})})},t.prototype.storeSendingEvents=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]})})},t}(ak),aA=function(e){var t=e.config,r=e.sessionId,n=e.minInterval,i=e.maxInterval,o=e.type,a=e.payloadBatcher,s=e.storeType;return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e,l,u,c,d;function h(t){return void 0===t&&(t=!1),(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return[2,e.flush(t)]})})}return(0,Q.__generator)(this,function(f){switch(f.label){case 0:if(e=new a_((0,Q.__assign)((0,Q.__assign)({},t),{loggerProvider:t.loggerProvider,payloadBatcher:a})),l=function(){return new aR({loggerProvider:t.loggerProvider,maxInterval:i,minInterval:n})},"idb"!==s)return[3,2];return[4,(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,Q.__generator)(this,function(a){switch(a.label){case 0:return[4,aT.new(o,{loggerProvider:t.loggerProvider,minInterval:n,maxInterval:i,apiKey:t.apiKey},r)];case 1:return e=a.sent(),t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,null!=e?e:l()]}})})];case 1:return c=f.sent(),[3,3];case 2:c=l(),f.label=3;case 3:return u=c,d=function(r){var n=r.events,i=r.sessionId,a=r.deviceId,s=r.sequenceId;t.debugMode&&oN().then(function(e){var r=e.totalStorageSize,n=e.percentOfQuota,i=e.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(r," KB, percentage of quota: ").concat(n,"%, usage details: ").concat(i))}).catch(function(){}),e.sendEventsList({events:n,sessionId:i,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:a,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:o,onComplete:function(){return(0,Q.__awaiter)(void 0,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){switch(e.label){case 0:return[4,u.cleanUpSessionEventsStore(i,s)];case 1:return e.sent(),[2]}})})}})},[2,{sendCurrentSequenceEvents:function(e){var r=e.sessionId,n=e.deviceId;u.storeCurrentSequence(r).then(function(e){e&&d({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n})}).catch(function(e){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)})},addEvent:function(e){var r=e.event,n=e.sessionId,i=e.deviceId;u.addEventToCurrentSequence(n,r.data).then(function(e){return e&&d({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:i})}).catch(function(e){t.loggerProvider.warn("Failed to add event to session replay capture:",e)})},sendStoredEvents:function(e){var t=e.deviceId;return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return[4,u.getSequencesToSend()];case 1:return(e=r.sent())&&e.forEach(function(e){d({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})}),[2]}})})},flush:h}]}})})},aM=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new Map;e.forEach(function(e){r.set(e.name,e.manager)}),this.managers=r}return e.prototype.sendStoredEvents=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEach(function(r){t.push(r.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,r=e.sessionId,n=e.event,i=e.deviceId;null==(t=this.managers.get(n.type))||t.addEvent({sessionId:r,event:n,deviceId:i})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,r=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:r})})},e.prototype.flush=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t;return(0,Q.__generator)(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEach(function(r){t.push(r.flush(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e}();let aN={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},aD={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},aL={};function aV(e){var t,r;let n;if(aL[e])return aL[e];let i=((n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e))&&globalThis[n]?globalThis[n]:void 0)||globalThis[e],o=i.prototype,a=e in aN?aN[e]:void 0,s=!!(a&&a.every(e=>{var t,r;return!!(null==(r=null==(t=Object.getOwnPropertyDescriptor(o,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),l=e in aD?aD[e]:void 0,u=!!(l&&l.every(e=>{var t;return"function"==typeof o[e]&&(null==(t=o[e])?void 0:t.toString().includes("[native code]"))}));if(s&&u)return aL[e]=i.prototype,i.prototype;try{let t=document.createElement("iframe");document.body.appendChild(t);let r=t.contentWindow;if(!r)return i.prototype;let n=r[e].prototype;if(document.body.removeChild(t),!n)return o;return aL[e]=n}catch{return o}}let aF={},aj=function(e){var t,r="Node",n=e,i="parentElement";let o=`${r}.${String(i)}`;if(aF[o])return aF[o].call(n);let a=null==(t=Object.getOwnPropertyDescriptor(aV(r),i))?void 0:t.get;return a?(aF[o]=a,a.call(n)):n[i]};function az(){var e=(0,ex.getGlobalScope)();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}function aB(){var e=(0,ex.getGlobalScope)();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function aH(e,t,r){for(var n=null,i=[],o=e,a=0;o&&"break"!==function(){var e,s,l,u,c=new Date().getTime()-$.getTime();if(void 0!==W.timeoutMs&&c>W.timeoutMs)throw Error("Timeout: Can't find a unique selector after ".concat(c,"ms"));var d=aX((e=o.getAttribute("id"))&&W.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||aX.apply(void 0,(0,Q.__spreadArray)([],(0,Q.__read)(Array.from(o.attributes).filter(function(e){return W.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||aX.apply(void 0,(0,Q.__spreadArray)([],(0,Q.__read)(Array.from(o.classList).filter(W.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||aX((s=o.tagName.toLowerCase(),W.tagName(s)?{name:s,penalty:2}:null))||[aG()],h=function(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;for(var n=0;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}(o);if("all"==t)h&&(d=d.concat(d.filter(aY).map(function(e){return aK(e,h)})));else if("two"==t)d=d.slice(0,1),h&&(d=d.concat(d.filter(aY).map(function(e){return aK(e,h)})));else if("one"==t){var f=(0,Q.__read)(d=d.slice(0,1),1)[0];h&&aY(f)&&(d=[aK(f,h)])}else"none"==t&&(d=[aG()],h&&(d=[aK(d[0],h)]));try{for(var p=(l=void 0,(0,Q.__values)(d)),g=p.next();!g.done;g=p.next()){var f=g.value;f.level=a}}catch(e){l={error:e}}finally{try{g&&!g.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}if(i.push(d),i.length>=W.seedMinLength&&(n=aW(i,r)))return"break";o=o.parentElement,a++}(););return(n||(n=aW(i,r)),!n&&r)?r():n}function aW(e,t){var r,n,i=aZ(function e(t,r){var n,i,o,a,s;return void 0===r&&(r=[]),(0,Q.__generator)(this,function(l){switch(l.label){case 0:if(!(t.length>0))return[3,9];l.label=1;case 1:l.trys.push([1,6,7,8]),i=(n=(0,Q.__values)(t[0])).next(),l.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,(0,Q.__values)(e(t.slice(1,t.length),r.concat(o)))];case 3:l.sent(),l.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return a={error:l.sent()},[3,8];case 7:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[3,11];case 9:return[4,r];case 10:l.sent(),l.label=11;case 11:return[2]}})}(e));if(i.length>W.threshold)return t?t():null;try{for(var o=(0,Q.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value;if(aq(s))return s}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function aU(e){for(var t=e[0],r=t.name,n=1;n<e.length;n++){var i=e[n].level||0;r=t.level===i-1?"".concat(e[n].name," > ").concat(r):"".concat(e[n].name," ").concat(r),t=e[n]}return r}function a$(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function aq(e){var t=aU(e);switch(U.querySelectorAll(t).length){case 0:throw Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function aG(){return{name:"*",penalty:3}}function aK(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function aY(e){return"html"!==e.name&&!e.name.startsWith("#")}function aX(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(aQ);return r.length>0?r:null}function aQ(e){return null!=e}function aZ(e){return(0,Q.__spreadArray)([],(0,Q.__read)(e),!1).sort(function(e,t){return a$(e)-a$(t)})}var aJ=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&n.push(t)}),{version:t,events:n}},a0=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(e){var t=JSON.parse(e);"click"===t.type&&n.push(t)}),{version:t,events:Object.values(n.reduce(function(e,t){var r=t.x,n=t.y,i=t.selector,o=t.timestamp,a=o-o%36e5,s="".concat(r,":").concat(n,":").concat(null!=i?i:"",":").concat(a);return e[s]?e[s].count+=1:e[s]=(0,Q.__assign)((0,Q.__assign)({},t),{timestamp:a,count:1}),e},{}))}},a1=function(e,t){var r=t.eventsManager,n=t.sessionId,i=t.deviceIdFn,o=t.mirror,a=t.ugcFilterRules;return function(t){if(t.type!==oz.Click)return;var s,l=(0,ex.getGlobalScope)();if(l){var u=l.location,c=l.innerHeight,d=l.innerWidth;if(u){var h=t.x,f=t.y;if(void 0!==h&&void 0!==f){var p,g,m,v,b,y=o.getNode(t.id);if(y)try{s=function(e,t){if($=new Date,e.nodeType!==Node.ELEMENT_NODE)throw Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r,n,i={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};r=(W=(0,Q.__assign)((0,Q.__assign)({},i),void 0)).root,n=i,U=r.nodeType===Node.DOCUMENT_NODE?r:r===n.root?r.ownerDocument:r;var o=aH(e,"all",function(){return aH(e,"two",function(){return aH(e,"one",function(){return aH(e,"none")})})});if(o){var a=aZ(function e(t,r,n){var i,o,a;return void 0===n&&(n={counter:0,visited:new Map}),(0,Q.__generator)(this,function(s){switch(s.label){case 0:if(!(t.length>2&&t.length>W.optimizedMinLength))return[3,5];i=1,s.label=1;case 1:var l,u;if(!(i<t.length-1))return[3,5];if(n.counter>W.maxNumberOfTries||(n.counter+=1,(o=(0,Q.__spreadArray)([],(0,Q.__read)(t),!1)).splice(i,1),a=aU(o),n.visited.has(a)))return[2];if(!(aq(o)&&(l=o,u=r,U.querySelector(aU(l))===u)))return[3,4];return[4,o];case 2:return s.sent(),n.visited.set(a,!0),[5,(0,Q.__values)(e(o,r,n))];case 3:s.sent(),s.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(o,e));return a.length>0&&(o=a[0]),aU(o)}throw Error("Selector was not found.")}(y)}catch(t){e.debug("error resolving selector from finder")}var x={left:(b=l.document).scrollingElement?b.scrollingElement.scrollLeft:void 0!==l.pageXOffset?l.pageXOffset:b.documentElement.scrollLeft||(null==b?void 0:b.body)&&(null==(p=aj(b.body))?void 0:p.scrollLeft)||(null==(g=null==b?void 0:b.body)?void 0:g.scrollLeft)||0,top:b.scrollingElement?b.scrollingElement.scrollTop:void 0!==l.pageYOffset?l.pageYOffset:(null==b?void 0:b.documentElement.scrollTop)||(null==b?void 0:b.body)&&(null==(m=aj(b.body))?void 0:m.scrollTop)||(null==(v=null==b?void 0:b.body)?void 0:v.scrollTop)||0},w={x:h+x.left,y:f+x.top,selector:s,viewportHeight:c,viewportWidth:d,pageUrl:oM(u.href,a),timestamp:Date.now(),type:"click"},_=i();_&&r.addEvent({sessionId:n,event:{type:"interaction",data:JSON.stringify(w)},deviceId:_})}}}}},a2=function(){function e(e,t){var r=(0,ex.getGlobalScope)();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=oT(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var r=this.context,n=r.sessionId,i=r.type,o=new URLSearchParams({device_id:e,session_id:String(n),type:String(i),api_key:this.apiKey}),a="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(a,t)||this.sendXhr(a,t)},e}(),a5=function(){function e(e,t){var r=this;this.timestamp=Date.now(),this.hook=function(e){r.update(e)},this.send=function(e){return function(t){var n,i,o=e(),a=(0,ex.getGlobalScope)();a&&o&&r.transport.send(o,{version:1,events:[{maxScrollX:r._maxScrollX,maxScrollY:r._maxScrollY,maxScrollWidth:r._maxScrollWidth,maxScrollHeight:r._maxScrollHeight,viewportHeight:az(),viewportWidth:aB(),pageUrl:oM(a.location.href,null!=(i=null==(n=r.config.interactionConfig)?void 0:n.ugcFilterRules)?i:[]),timestamp:r.timestamp,type:"scroll"}]})}},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=aB(),this._maxScrollHeight=az(),this.config=t,this.transport=e}return e.default=function(t,r){return new e(new a2(t,r),r)},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(e.x>this._maxScrollX){var r=aB();this._maxScrollX=e.x;var n=e.x+r;n>this._maxScrollWidth&&(this._maxScrollWidth=n),this.timestamp=t}if(e.y>this._maxScrollY){var i=az();this._maxScrollY=e.y;var o=e.y+i;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),a3=function(e){var t=e.sessionId,r=e.deviceId;this.deviceId=r,this.sessionId=t,t&&r&&(this.sessionReplayId="".concat(r,"/").concat(t))},a4=new function(){var e=this;this.dbs={},this.createStore=function(t){return(0,Q.__awaiter)(e,void 0,void 0,function(){return(0,Q.__generator)(this,function(e){switch(e.label){case 0:return[4,(0,aC.openDB)(t,1,{upgrade:function(e){e.objectStoreNames.contains("sessionTargetingMatch")||e.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return(0,Q.__awaiter)(e,void 0,void 0,function(){var e,r;return(0,Q.__generator)(this,function(n){switch(n.label){case 0:if(this.dbs&&this.dbs[t])return[2,this.dbs[t]];return e="".concat(t.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(e)];case 1:return r=n.sent(),this.dbs[t]=r,[2,r]}})})},this.getTargetingMatchForSession=function(t){var r=t.loggerProvider,n=t.apiKey,i=t.sessionId;return(0,Q.__awaiter)(e,void 0,void 0,function(){var e,t,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,this.openOrCreateDB(n)];case 1:return e=s.sent(),t=String(i),[4,e.get("sessionTargetingMatch",t)];case 2:return[2,null==(o=s.sent())?void 0:o.targetingMatch];case 3:return a=s.sent(),r.warn("Failed to get targeting match for session id ".concat(i,": ").concat(a)),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(t){var r=t.loggerProvider,n=t.apiKey,i=t.sessionId,o=t.targetingMatch;return(0,Q.__awaiter)(e,void 0,void 0,function(){var e,t,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,this.openOrCreateDB(n)];case 1:return e=s.sent(),t=String(i),[4,e.put("sessionTargetingMatch",{targetingMatch:o,sessionId:t,lastUpdated:Date.now()})];case 2:return[2,s.sent()];case 3:return a=s.sent(),r.warn("Failed to store targeting match for session id ".concat(i,": ").concat(a)),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(t){var r=t.loggerProvider,n=t.apiKey,i=t.currentSessionId;return(0,Q.__awaiter)(e,void 0,void 0,function(){var e,t,o,a,s,l,u,c;return(0,Q.__generator)(this,function(d){switch(d.label){case 0:return d.trys.push([0,8,,9]),[4,this.openOrCreateDB(n)];case 1:return e=d.sent(),t=String(i),[4,(o=e.transaction("sessionTargetingMatch","readwrite")).store.getAll()];case 2:a=d.sent(),s=0,d.label=3;case 3:if(!(s<a.length))return[3,6];if(l=a[s],u=Date.now()-l.lastUpdated,!(l.sessionId!==t&&u>1728e5))return[3,5];return[4,o.store.delete(l.sessionId)];case 4:d.sent(),d.label=5;case 5:return s++,[3,3];case 6:return[4,o.done];case 7:return d.sent(),[3,9];case 8:return c=d.sent(),r.warn("Failed to clear old targeting matches for sessions: ".concat(c)),[3,9];case 9:return[2]}})})}},a6=function(t){var r=t.sessionId,n=t.targetingConfig,i=t.loggerProvider,o=t.apiKey,a=t.targetingParams;return(0,Q.__awaiter)(void 0,void 0,void 0,function(){var t,s,l;return(0,Q.__generator)(this,function(u){switch(u.label){case 0:return[4,a4.clearStoreOfOldSessions({loggerProvider:i,apiKey:o,currentSessionId:r})];case 1:return u.sent(),[4,a4.getTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:r})];case 2:if(!0===u.sent())return[2,!0];t=!0,u.label=3;case 3:return u.trys.push([3,6,,7]),[4,e.A(18737)];case 4:return[4,(0,u.sent().evaluateTargeting)((0,Q.__assign)((0,Q.__assign)({},a),{flag:n,sessionId:r,apiKey:o,loggerProvider:i}))];case 5:return(s=u.sent())&&s.sr_targeting_config&&(t="on"===s.sr_targeting_config.key),a4.storeTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:r,targetingMatch:t}),[3,7];case 6:return l=u.sent(),i.warn(l.message),[3,7];case 7:return[2,t]}})})};function a8(e){return void 0===e&&(e={}),{name:"amplitude/url-tracking@1",observer:function(t,r,n){var i,o,a,s=(0,Q.__assign)((0,Q.__assign)({},e),n),l=s.ugcFilterRules||[],u=null!=(i=s.enablePolling)&&i,c=null!=(o=s.pollingInterval)?o:1e3,d=null!=(a=s.captureDocumentTitle)&&a;if(!r)return function(){};var h=void 0,f=function(){return r.location&&r.location.href||""},p=function(){var e=r.innerHeight,t=r.innerWidth,n=r.document,i=f(),o="";return d&&(o=(null==n?void 0:n.title)||""),{href:l.length>0?oM(i,l):i,title:o,viewportHeight:e,viewportWidth:t,type:"url-change-event"}},g=function(){var e=f();(void 0===h||e!==h)&&(h=e,t(p()))},m=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t);return g(),n}},v=function(){g()};if(u){var b=r.setInterval(function(){g()},c);return g(),function(){b&&r.clearInterval(b)}}if(r.history){var y=r.history.pushState.bind(r.history),x=r.history.replaceState.bind(r.history);return r.history.pushState=m(y),r.history.replaceState=m(x),r.addEventListener("popstate",g),r.addEventListener("hashchange",v),g(),function(){r.history.pushState=y,r.history.replaceState=x,r.removeEventListener("popstate",g),r.removeEventListener("hashchange",v)}}return r.addEventListener("hashchange",v),g(),function(){r.removeEventListener("hashchange",v)}},options:e}}a8();var a7=function(){function t(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.recordFunction=null,this.teardownEventListeners=function(t){var r=(0,ex.getGlobalScope)();r&&(r.removeEventListener("blur",e.blurListener),r.removeEventListener("focus",e.focusListener),t||r.addEventListener("blur",e.blurListener),t||r.addEventListener("focus",e.focusListener),r.self&&"onpagehide"in r.self?(r.removeEventListener("pagehide",e.pageLeaveListener),t||r.addEventListener("pagehide",e.pageLeaveListener)):(r.removeEventListener("beforeunload",e.pageLeaveListener),t||r.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){e.recordEvents(!1)},this.pageLeaveListener=function(t){e.pageLeaveFns.forEach(function(e){e(t)})},this.evaluateTargetingAndCapture=function(t,r,n){return void 0===r&&(r=!1),void 0===n&&(n=!1),(0,Q.__awaiter)(e,void 0,void 0,function(){var e,i;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log("Session ID has not been set yet, cannot evaluate targeting for Session Replay."):this.loggerProvider.warn("Session replay init has not been called, cannot evaluate targeting."),[2];if(!this.config.targetingConfig)if(!r)return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];else this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.");if(this.lastTargetingParams=t,!(this.config.targetingConfig&&!this.sessionTargetingMatch))return[3,2];return(e=t.event)&&Object.values(R).includes(e.event_type)&&(e=void 0),i=this,[4,a6({sessionId:this.identifiers.sessionId,targetingConfig:this.config.targetingConfig,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:t.userProperties,event:e}})];case 1:i.sessionTargetingMatch=o.sent(),this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:e,targetingParams:t},null,2)),o.label=2;case 2:if(!r)return[3,3];return this.initialize(!0),[3,5];case 3:if(!(n||!this.recordCancelCallback))return[3,5];return this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()];case 4:o.sent(),o.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n=!0),(0,Q.__awaiter)(e,void 0,void 0,function(){var e,i,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:if(s.trys.push([0,3,,4]),e=void 0,!((i=this.config)&&t!==B.METADATA)||(e={config:oD(i),version:aw},!n))return[3,2];return[4,oN()];case 1:o=s.sent(),e=(0,Q.__assign)((0,Q.__assign)({},o),e),s.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(t,(0,Q.__assign)((0,Q.__assign)({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(t," due to no ongoing recording.")),[3,4];case 3:return a=s.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",a),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var t;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null==(t=e.networkObservers)||t.stop()}catch(t){e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(t.toString()))}},this.loggerProvider=new ok(new eR)}return t.prototype.init=function(e,t){return eO(this._init(e,t))},t.prototype._init=function(t,r){var n,i,o,a,s,l,u;return(0,Q.__awaiter)(this,void 0,void 0,function(){var c,d,h,f,p,g,m,v,b,y,x,w,_,C;return(0,Q.__generator)(this,function(k){switch(k.label){case 0:return this.loggerProvider=new ok(r.loggerProvider||new eR),Object.prototype.hasOwnProperty.call(r,"logLevel")&&this.loggerProvider.enable(r.logLevel),this.identifiers=new a3({sessionId:r.sessionId,deviceId:r.deviceId}),c=this,[4,(0,Q.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,Q.__generator)(this,function(n){return e=new oV(t,r),[2,new oG(new e9(t,e.loggerProvider,e.serverZone,r.configServerUrl),e)]})})];case 1:return c.joinedConfigGenerator=k.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:h=(d=k.sent()).joinedConfig,f=d.localConfig,p=d.remoteConfig,this.config=h,this.setMetadata(r.sessionId,h,f,p,null==(n=r.version)?void 0:n.version,aw,null==(i=r.version)?void 0:i.type),r.sessionId&&(null==(o=this.config.interactionConfig)?void 0:o.enabled)&&(g=a5.default({sessionId:r.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[g.send(this.getDeviceId.bind(this)).bind(g)],this.scrollHook=g.hook.bind(g)),m=[],"idb"!==(v=this.config.storeType)||(null==(a=(0,ex.getGlobalScope)())?void 0:a.indexedDB)||(v="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(v," for event storage.")),k.label=3;case 3:return k.trys.push([3,5,,6]),[4,aA({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:v})];case 4:return b=k.sent(),m.push({name:"replay",manager:b}),[3,6];case 5:return y=k.sent(),this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(y.toString())),[3,6];case 6:if(!(null==(s=this.config.interactionConfig)?void 0:s.enabled))return[3,10];x=this.config.interactionConfig.batch?a0:aJ,k.label=7;case 7:return k.trys.push([7,9,,10]),[4,aA({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!=(l=this.config.interactionConfig.trackEveryNms)?l:3e4,maxInterval:6e4,payloadBatcher:x,storeType:v})];case 8:return w=k.sent(),m.push({name:"interaction",manager:w}),[3,10];case 9:return y=k.sent(),this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(y.toString())),[3,10];case 10:if(this.eventsManager=new(aM.bind.apply(aM,(0,Q.__spreadArray)([void 0],(0,Q.__read)(m),!1))),this.eventCompressor&&this.eventCompressor.terminate(),_=void 0,C=(0,ex.getGlobalScope)(),!((null==(u=this.config.experimental)?void 0:u.useWebWorker)&&C&&C.Worker))return[3,12];return[4,e.A(41465)];case 11:_=k.sent().compressionScript,k.label=12;case 12:return this.eventCompressor=new ay(this.eventsManager,this.config,this.getDeviceId(),_),[4,this.initializeNetworkObservers()];case 13:return k.sent(),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:r.userProperties},!0)];case 14:return k.sent(),[2]}})})},t.prototype.setSessionId=function(e,t){return eO(this.asyncSetSessionId(e,t))},t.prototype.asyncSetSessionId=function(e,t,r){var n;return(0,Q.__awaiter)(this,void 0,void 0,function(){var i,o,a;return(0,Q.__generator)(this,function(s){switch(s.label){case 0:if(this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,(i=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(i),o=t||this.getDeviceId(),this.identifiers=new a3({sessionId:e,deviceId:o}),!(this.joinedConfigGenerator&&i))return[3,2];return[4,this.joinedConfigGenerator.generateJoinedConfig()];case 1:a=s.sent().joinedConfig,this.config=a,s.label=2;case 2:if(!(null==(n=this.config)?void 0:n.targetingConfig))return[3,4];return[4,this.evaluateTargetingAndCapture({userProperties:null==r?void 0:r.userProperties},!1,!0)];case 3:return s.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:s.sent(),s.label=6;case 6:return[2]}})})},t.prototype.getSessionReplayProperties=function(){var e,t=this.config,r=this.identifiers;if(!t||!r)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var n=this.getShouldRecord(),i={};return n&&((e={})[oy]=r.sessionReplayId?r.sessionReplayId:null,i=e,t.debugMode&&(i[o_]=JSON.stringify({appHash:ts(t.apiKey).toString()}))),this.addCustomRRWebEvent(B.GET_SR_PROPS,{shouldRecord:n,eventProperties:i},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,i},t.prototype.sendEvents=function(e){var t,r=e||(null==(t=this.identifiers)?void 0:t.sessionId),n=this.getDeviceId();this.eventsManager&&r&&n&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:n})},t.prototype.initialize=function(e){var t;return void 0===e&&(e=!1),(0,Q.__awaiter)(this,void 0,void 0,function(){var r;return(0,Q.__generator)(this,function(n){return(null==(t=this.identifiers)?void 0:t.sessionId)?(r=this.getDeviceId())?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),[2,this.recordEvents()]):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),[2,Promise.resolve()]):(this.loggerProvider.log("Session is not being recorded due to lack of session id."),[2,Promise.resolve()])})})},t.prototype.shouldOptOut=function(){if(null==(e=this.config)?void 0:e.instanceName){var e,t,r;r=e1(this.config.instanceName).identityStore.getIdentity().optOut}return void 0!==r?r:null==(t=this.config)?void 0:t.optOut},t.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,r=!1,n="",i=!1;return this.config.targetingConfig?this.sessionTargetingMatch?(n="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(n),r=!0,i=!0):(n="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(n),r=!1,i=!1):(e=this.identifiers.sessionId,t=this.config.sampleRate,31*Math.abs(ts(e.toString()))%1e6/1e6<t)?(r=!0,i=!0):(n="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(n),r=!1,i=!1),this.lastShouldRecordDecision!==r&&this.config.targetingConfig&&(this.addCustomRRWebEvent(B.TARGETING_DECISION,{message:n,sessionId:this.identifiers.sessionId,matched:i,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=r),r},t.prototype.getBlockSelectors=function(){var e,t,r,n=null!=(r=null==(t=null==(e=this.config)?void 0:e.privacyConfig)?void 0:t.blockSelector)?r:[];if(0!==n.length)return n},t.prototype.getMaskTextSelectors=function(){if((null==(t=null==(e=this.config)?void 0:e.privacyConfig)?void 0:t.defaultMaskLevel)==="conservative")return"*";var e,t,r,n,i=null==(n=null==(r=this.config)?void 0:r.privacyConfig)?void 0:n.maskSelector;if(i)return i},t.prototype.getRecordingPlugins=function(t){var r,n,i,o,a,s;return(0,Q.__awaiter)(this,void 0,void 0,function(){var l,u,c,d;return(0,Q.__generator)(this,function(h){switch(h.label){case 0:l=[];try{u=a8({ugcFilterRules:(null==(n=null==(r=this.config)?void 0:r.interactionConfig)?void 0:n.ugcFilterRules)||[],enablePolling:(null==(i=this.config)?void 0:i.enableUrlChangePolling)||!1,pollingInterval:null==(o=this.config)?void 0:o.urlChangePollingInterval,captureDocumentTitle:null==(a=this.config)?void 0:a.captureDocumentTitle}),l.push(u)}catch(e){this.loggerProvider.warn("Failed to create URL tracking plugin:",e)}if(!(null==(s=null==t?void 0:t.console)?void 0:s.enabled))return[3,4];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,e.A(25120)];case 2:return c=h.sent().getRecordConsolePlugin,l.push(c({level:t.console.levels})),[3,4];case 3:return d=h.sent(),this.loggerProvider.warn("Failed to load console plugin:",d),[3,4];case 4:return[2,l.length>0?l:void 0]}})})},t.prototype.getRecordFunction=function(){return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,r;return(0,Q.__generator)(this,function(n){switch(n.label){case 0:if(this.recordFunction)return[2,this.recordFunction];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.A(97107)];case 2:return t=n.sent().record,this.recordFunction=t,[2,t];case 3:return r=n.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",r),[2,null];case 4:return[2]}})})},t.prototype.recordEvents=function(e){var t,r,n,i,o;return void 0===e&&(e=!0),(0,Q.__awaiter)(this,void 0,void 0,function(){var a,s,l,u,c,d,h,f,p,g,m,v,b,y=this;return(0,Q.__generator)(this,function(x){switch(x.label){case 0:if(a=this.config,s=this.getShouldRecord(),l=null==(t=this.identifiers)?void 0:t.sessionId,!s||!l||!a)return[2];return this.stopRecordingEvents(),[4,this.getRecordFunction()];case 1:if(!(u=x.sent()))return[2];return[4,this.initializeNetworkObservers()];case 2:x.sent(),null==(r=this.networkObservers)||r.start(function(e){y.addCustomRRWebEvent(B.FETCH_REQUEST,e)}),c=a.privacyConfig,d=a.interactionConfig,h=a.loggingConfig,f=(null==d?void 0:d.enabled)?{mouseInteraction:this.eventsManager&&a1(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:l,deviceIdFn:this.getDeviceId.bind(this),mirror:u.mirror,ugcFilterRules:null!=(n=d.ugcFilterRules)?n:[]}),scroll:this.scrollHook}:{},p=(null==d?void 0:d.enabled)&&d.ugcFilterRules?d.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(l,".")),x.label=3;case 3:return x.trys.push([3,5,,6]),g=this,m=u,b={emit:function(e){if(y.shouldOptOut()){y.loggerProvider.log("Opting session ".concat(l," out of recording due to optOut config.")),y.stopRecordingEvents(),y.sendEvents();return}e.type===oF.Meta&&(e.data.href=oM(e.data.href,p)),y.eventCompressor&&y.eventCompressor.enqueueEvent(e,l)},inlineStylesheet:a.shouldInlineStylesheet,hooks:f,maskAllInputs:!0,maskTextClass:oC,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:a.applyBackgroundColorToBlockedElements,maskInputFn:oI("input",c),maskTextFn:oI("text",c),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,slimDOMOptions:{script:null==(i=a.omitElementTags)?void 0:i.script,comment:null==(o=a.omitElementTags)?void 0:o.comment},errorHandler:function(e){if(e.message.includes("insertRule")&&e.message.includes("CSSStyleSheet")||e._external_)throw e;return y.loggerProvider.warn("Error while capturing replay: ",e.toString()),!0}},[4,this.getRecordingPlugins(h)];case 4:return g.recordCancelCallback=m.apply(void 0,[(b.plugins=x.sent(),b)]),this.addCustomRRWebEvent(B.DEBUG_INFO),e&&this.addCustomRRWebEvent(B.METADATA,this.metadata),[3,6];case 5:return v=x.sent(),this.loggerProvider.warn("Failed to initialize session replay:",v),[3,6];case 6:return[2]}})})},t.prototype.getDeviceId=function(){var e;return null==(e=this.identifiers)?void 0:e.deviceId},t.prototype.getSessionId=function(){var e;return null==(e=this.identifiers)?void 0:e.sessionId},t.prototype.flush=function(e){var t;return void 0===e&&(e=!1),(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return[2,null==(t=this.eventsManager)?void 0:t.flush(e)]})})},t.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},t.prototype.mapSDKType=function(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null},t.prototype.setMetadata=function(e,t,r,n,i,o,a){var s=(null==e?void 0:e.toString())?ts(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:r,remoteConfig:n,sessionId:e,hashValue:s,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(a),replaySDKVersion:i,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}},t.prototype.initializeNetworkObservers=function(){var t,r,n;return(0,Q.__awaiter)(this,void 0,void 0,function(){var i,o;return(0,Q.__generator)(this,function(a){switch(a.label){case 0:if(!((null==(n=null==(r=null==(t=this.config)?void 0:t.loggingConfig)?void 0:r.network)?void 0:n.enabled)&&!this.networkObservers))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e.A(29636)];case 2:return i=a.sent().NetworkObservers,this.networkObservers=new i,[3,4];case 3:return o=a.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",o),[3,4];case 4:return[2]}})})},t}(),a9=function(e){return function(){var t=e.config||oL();return{logger:t.loggerProvider,logLevel:t.logLevel}}};let se={init:eB((C=new a7).init.bind(C),"init",a9(C)),evaluateTargetingAndCapture:eB(C.evaluateTargetingAndCapture.bind(C),"evaluateTargetingAndRecord",a9(C)),setSessionId:eB(C.setSessionId.bind(C),"setSessionId",a9(C)),getSessionId:eB(C.getSessionId.bind(C),"getSessionId",a9(C)),getSessionReplayProperties:eB(C.getSessionReplayProperties.bind(C),"getSessionReplayProperties",a9(C)),flush:eB(C.flush.bind(C),"flush",a9(C)),shutdown:eB(C.shutdown.bind(C),"shutdown",a9(C))};var st=se.init,sr=se.setSessionId,sn=se.getSessionId,si=se.getSessionReplayProperties,so=se.flush,sa=se.shutdown,ss=se.evaluateTargetingAndCapture;(k=q||(q={})).SET="$set",k.SET_ONCE="$setOnce",k.ADD="$add",k.APPEND="$append",k.PREPEND="$prepend",k.REMOVE="$remove",k.PREINSERT="$preInsert",k.POSTINSERT="$postInsert",k.UNSET="$unset",k.CLEAR_ALL="$clearAll",(S=G||(G={})).REVENUE_PRODUCT_ID="$productId",S.REVENUE_QUANTITY="$quantity",S.REVENUE_PRICE="$price",S.REVENUE_TYPE="$revenueType",S.REVENUE_CURRENCY="$currency",S.REVENUE="$revenue",(E=K||(K={})).IDENTIFY="$identify",E.GROUP_IDENTIFY="$groupidentify",E.REVENUE="revenue_amount";var sl=[q.SET,q.SET_ONCE,q.ADD,q.APPEND,q.PREPEND,q.POSTINSERT],su=function(e){if(e.user_properties){var t={};return Object.keys(e.user_properties).forEach(function(r){if(sl.includes(r)){var n=e.user_properties&&e.user_properties[r];t=(0,Q.__assign)((0,Q.__assign)({},t),n)}}),t}},sc="1.23.1",sd=function(){function e(t){this.name=e.pluginName,this.type="enrichment",this.sessionReplay={flush:so,getSessionId:sn,getSessionReplayProperties:si,init:st,setSessionId:sr,shutdown:sa,evaluateTargetingAndCapture:ss},this.options=(0,Q.__assign)({forceSessionTracking:!1},t),this.srInitOptions=this.options}return e.prototype.setup=function(e,t){var r,n,i,o,a,s;return(0,Q.__awaiter)(this,void 0,void 0,function(){var t,l;return(0,Q.__generator)(this,function(u){switch(u.label){case 0:var c;return u.trys.push([0,2,,3]),null==e||e.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(sc,".")),this.config=e,this.options.forceSessionTracking&&("boolean"==typeof e.defaultTracking?!1===e.defaultTracking&&(e.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):e.defaultTracking=(0,Q.__assign)((0,Q.__assign)({},e.defaultTracking),{sessions:!0})),t=(void 0===(c=this.config.instanceName)&&(c="$default_instance"),e0.getInstance(c)).identityStore.getIdentity().userProperties,this.srInitOptions={instanceName:this.config.instanceName,deviceId:null!=(r=this.options.deviceId)?r:this.config.deviceId,optOut:this.config.optOut,sessionId:this.options.customSessionId?void 0:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,configServerUrl:this.options.configServerUrl||(null==(n=this.config.remoteConfig)?void 0:n.serverUrl),trackServerUrl:this.options.trackServerUrl,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:null==(i=this.options.privacyConfig)?void 0:i.blockSelector,maskSelector:null==(o=this.options.privacyConfig)?void 0:o.maskSelector,unmaskSelector:null==(a=this.options.privacyConfig)?void 0:a.unmaskSelector,defaultMaskLevel:null==(s=this.options.privacyConfig)?void 0:s.defaultMaskLevel},debugMode:this.options.debugMode,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:sc},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType,experimental:this.options.experimental,userProperties:t,omitElementTags:this.options.omitElementTags,applyBackgroundColorToBlockedElements:this.options.applyBackgroundColorToBlockedElements,interactionConfig:this.options.interactionConfig,captureDocumentTitle:this.options.captureDocumentTitle,enableUrlChangePolling:this.options.enableUrlChangePolling,urlChangePollingInterval:this.options.urlChangePollingInterval},[4,this.sessionReplay.init(e.apiKey,this.srInitOptions).promise];case 1:return u.sent(),[3,3];case 2:return l=u.sent(),null==e||e.loggerProvider.error("Session Replay: Failed to initialize due to ".concat(l.message)),[3,3];case 3:return[2]}})})},e.prototype.onSessionIdChanged=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){switch(t.label){case 0:return this.config.loggerProvider.debug("Analytics session id is changed to ".concat(e,", SR session id is ").concat(String(this.sessionReplay.getSessionId()),".")),[4,this.sessionReplay.setSessionId(e).promise];case 1:return t.sent(),[2]}})})},e.prototype.onOptOutChanged=function(e){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){switch(t.label){case 0:if(this.config.loggerProvider.debug("optOut is changed to ".concat(String(e),", calling ").concat(e?"sessionReplay.shutdown()":"sessionReplay.init()",".")),!e)return[3,1];return this.sessionReplay.shutdown(),[3,3];case 1:return[4,this.sessionReplay.init(this.config.apiKey,this.srInitOptions).promise];case 2:t.sent(),t.label=3;case 3:return[2]}})})},e.prototype.execute=function(e){var t;return(0,Q.__awaiter)(this,void 0,void 0,function(){var r,n,i,o;return(0,Q.__generator)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,9,,10]),!this.options.customSessionId)return[3,4];if(!(r=this.options.customSessionId(e)))return[3,3];if(r===this.sessionReplay.getSessionId())return[3,2];return[4,this.sessionReplay.setSessionId(r).promise];case 1:a.sent(),a.label=2;case 2:n=this.sessionReplay.getSessionReplayProperties(),e.event_properties=(0,Q.__assign)((0,Q.__assign)({},e.event_properties),n),a.label=3;case 3:return[3,8];case 4:if(!((r=this.config.sessionId)&&r!==this.sessionReplay.getSessionId()))return[3,6];return[4,this.sessionReplay.setSessionId(r).promise];case 5:a.sent(),a.label=6;case 6:if(!(r&&r===e.session_id))return[3,8];return i=void 0,e.event_type===R.IDENTIFY&&(i=su(e)),[4,this.sessionReplay.evaluateTargetingAndCapture({event:e,userProperties:i})];case 7:a.sent(),n=this.sessionReplay.getSessionReplayProperties(),e.event_properties=(0,Q.__assign)((0,Q.__assign)({},e.event_properties),n),a.label=8;case 8:return[2,Promise.resolve(e)];case 9:return o=a.sent(),null==(t=this.config)||t.loggerProvider.error("Session Replay: Failed to enrich event due to ".concat(o.message)),[2,Promise.resolve(e)];case 10:return[2]}})})},e.prototype.teardown=function(){var e;return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){try{this.sessionReplay.shutdown(),this.config=null}catch(t){null==(e=this.config)||e.loggerProvider.error("Session Replay: teardown failed due to ".concat(t.message))}return[2]})})},e.prototype.getSessionReplayProperties=function(){return this.sessionReplay.getSessionReplayProperties()},e.pluginName="@amplitude/plugin-session-replay-browser",e}(),sh=e.i(24419),sf=function(e,t){return(sf=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function sp(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}sf(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var sg=function(){return(sg=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function sm(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}function sv(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){var u=[s,l];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function sb(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function sy(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function sx(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var sw="is not",s_="contains",sC="does not contain",sk="less",sS="less or equal",sE="greater",sO="greater or equal",sI="version less",sP="version less or equal",sT="version greater",sR="version greater or equal",sA="set is",sM="set is not",sN="set contains",sD="set does not contain",sL="set contains any",sV="set does not contain any",sF=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return Uint8Array.from(t)},sj=function(e,t){void 0===t&&(t=0);for(var r=sF(e),n=r.length,i=n>>2,o=t,a=0;a<i;a++)o=sz(sW(r,a<<2),o);var s=i<<2,l=0;switch(n-s){case 3:l^=r[s+2]<<16,l^=r[s+1]<<8,l^=r[s],o^=l=Math.imul(l=sH(l=Math.imul(l,-0x3361d2af),15),0x1b873593);break;case 2:l^=r[s+1]<<8,l^=r[s],o^=l=Math.imul(l=sH(l=Math.imul(l,-0x3361d2af),15),0x1b873593);break;case 1:l^=r[s],o^=l=Math.imul(l=sH(l=Math.imul(l,-0x3361d2af),15),0x1b873593)}return sB(o^=n)>>>0},sz=function(e,t){var r=e,n=t;return n^=r=Math.imul(r=sH(r=Math.imul(r,-0x3361d2af),15),0x1b873593),(n=Math.imul(n=sH(n,13),5))+-0x19ab949c|0},sB=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-0x7a143595),t^=t>>>13,t=Math.imul(t,-0x3d4d51cb),t^=t>>>16},sH=function(e,t,r){void 0===r&&(r=32),t>r&&(t%=r);var n=(e&0xffffffff<<r-t>>>0)>>>0>>>r-t>>>0;return(e<<t|n)>>>0},sW=function(e,t){return void 0===t&&(t=0),sU(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},sU=function(e){return(-0x1000000&e)>>>24|(0xff0000&e)>>>8|(65280&e)<<8|(255&e)<<24},s$=function(e,t){var r,n;if(t&&0!==t.length){try{for(var i=sb(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(!a||!e||"object"!=typeof e)return;e=e[a]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(null==e)return;return e}},sq="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),sG=function(){function e(e,t,r,n){void 0===n&&(n=void 0),this.major=e,this.minor=t,this.patch=r,this.preRelease=n}return e.parse=function(t){if(t){var r=new RegExp(sq).exec(t);if(r){var n=Number(r[1]),i=Number(r[2]);if(!(isNaN(n)||isNaN(i)))return new e(n,i,Number(r[4])||0,r[5]||void 0)}}},e.prototype.compareTo=function(e){if(this.major>e.major)return 1;if(this.major<e.major)return -1;if(this.minor>e.minor)return 1;if(this.minor<e.minor)return -1;if(this.patch>e.patch)return 1;if(this.patch<e.patch||this.preRelease&&!e.preRelease)return -1;if(!this.preRelease&&e.preRelease)return 1;if(this.preRelease&&e.preRelease){if(this.preRelease>e.preRelease)return 1;if(this.preRelease<e.preRelease)return -1}return 0},e}(),sK=function(){function e(){}return e.prototype.evaluate=function(e,t){var r,n,i={},o={context:e,result:i};try{for(var a=sb(t),s=a.next();!s.done;s=a.next()){var l=s.value,u=this.evaluateFlag(o,l);u&&(i[l.key]=u)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},e.prototype.evaluateFlag=function(e,t){try{for(var r,n,i,o=sb(t.segments),a=o.next();!a.done;a=o.next()){var s=a.value;if(i=this.evaluateSegment(e,t,s)){var l=sg(sg(sg({},t.metadata),s.metadata),i.metadata);i=sg(sg({},i),{metadata:l});break}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.prototype.evaluateSegment=function(e,t,r){if(!r.conditions){var n=this.bucket(e,r);return void 0!==n?t.variants[n]:void 0}if(this.evaluateConditions(e,r.conditions)){var n=this.bucket(e,r);if(void 0!==n)return t.variants[n]}},e.prototype.evaluateConditions=function(e,t){var r,n,i,o;try{for(var a=sb(t),s=a.next();!s.done;s=a.next()){var l=s.value,u=!0;try{for(var c=(i=void 0,sb(l)),d=c.next();!d.done;d=c.next()){var h=d.value;if(!(u=this.matchCondition(e,h)))break}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}if(u)return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},e.prototype.matchCondition=function(e,t){var r=s$(e,t.selector);if(null==r)return this.matchNull(t.op,t.values);if(this.isSetOperator(t.op)){var n=this.coerceStringArray(r);return!!n&&this.matchSet(n,t.op,t.values)}var i=this.coerceString(r);return void 0!==i&&this.matchString(i,t.op,t.values)},e.prototype.getHash=function(e){return sj(e)},e.prototype.bucket=function(e,t){if(!t.bucket)return t.variant;var r,n,i,o,a=this.coerceString(s$(e,t.bucket.selector));if(!a||0===a.length)return t.variant;var s="".concat(t.bucket.salt,"/").concat(a),l=this.getHash(s),u=l%100,c=Math.floor(l/100);try{for(var d=sb(t.bucket.allocations),h=d.next();!h.done;h=d.next()){var f=h.value,p=f.range[0],g=f.range[1];if(u>=p&&u<g)try{for(var m=(i=void 0,sb(f.distributions)),v=m.next();!v.done;v=m.next()){var b=v.value,y=b.range[0],x=b.range[1];if(c>=y&&c<x)return b.variant}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}return t.variant},e.prototype.matchNull=function(e,t){var r=this.containsNone(t);switch(e){case"is":case s_:case sk:case sS:case sE:case sO:case sI:case sP:case sT:case sR:case sA:case sN:case sL:return r;case sw:case sC:case sD:case sV:return!r;default:return!1}},e.prototype.matchSet=function(e,t,r){switch(t){case sA:return this.setEquals(e,r);case sM:return!this.setEquals(e,r);case sN:return this.matchesSetContainsAll(e,r);case sD:return!this.matchesSetContainsAll(e,r);case sL:return this.matchesSetContainsAny(e,r);case sV:return!this.matchesSetContainsAny(e,r);default:return!1}},e.prototype.matchString=function(e,t,r){var n=this;switch(t){case"is":return this.matchesIs(e,r);case sw:return!this.matchesIs(e,r);case s_:return this.matchesContains(e,r);case sC:return!this.matchesContains(e,r);case sk:case sS:case sE:case sO:return this.matchesComparable(e,t,r,function(e){return n.parseNumber(e)},this.comparator);case sI:case sP:case sT:case sR:return this.matchesComparable(e,t,r,function(e){return sG.parse(e)},this.versionComparator);case"regex match":return this.matchesRegex(e,r);case"regex does not match":return!this.matchesRegex(e,r);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var r=e.toLowerCase();if("true"===r||"false"===r)return t.some(function(e){return e.toLowerCase()===r})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var r,n;try{for(var i=sb(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.toLowerCase().includes(a.toLowerCase()))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e.prototype.matchesComparable=function(e,t,r,n,i){var o=this,a=n(e),s=r.map(function(e){return n(e)}).filter(function(e){return void 0!==e});return void 0===a||0===s.length?r.some(function(r){return o.comparator(e,t,r)}):s.some(function(e){return i(a,t,e)})},e.prototype.comparator=function(e,t,r){switch(t){case sk:case sI:return e<r;case sS:case sP:return e<=r;case sE:case sT:return e>r;case sO:case sR:return e>=r;default:return!1}},e.prototype.versionComparator=function(e,t,r){var n=e.compareTo(r);switch(t){case sk:case sI:return n<0;case sS:case sP:return n<=0;case sE:case sT:return n>0;case sO:case sR:return n>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return!!new RegExp(t).exec(e)})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!=(t=Number(e))?t:void 0},e.prototype.coerceString=function(e){if(null!=e)return"object"==typeof e?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e)){var r=e;return r.map(function(e){return t.coerceString(e)}).filter(Boolean)}var n=String(e);try{var i=JSON.parse(n);if(Array.isArray(i)){var r=e;return r.map(function(e){return t.coerceString(e)}).filter(Boolean)}var o=this.coerceString(n);return o?[o]:void 0}catch(e){var o=this.coerceString(n);return o?[o]:void 0}},e.prototype.isSetOperator=function(e){switch(e){case sA:case sM:case sN:case sD:case sL:case sV:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var r=new Set(e),n=new Set(t);return r.size===n.size&&sx([],sy(n),!1).every(function(e){return r.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var r,n;if(e.length<t.length)return!1;try{for(var i=sb(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(!this.matchesIs(a,e))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var r,n;try{for(var i=sb(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(this.matchesIs(a,e))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e}(),sY=function(e,t){var r,n,i=sg({},e),o=[],a=t||Object.keys(i);try{for(var s=sb(a),l=s.next();!l.done;l=s.next()){var u=l.value,c=sX(u,i);c&&o.push.apply(o,sx([],sy(c),!1))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},sX=function(e,t,r){void 0===r&&(r=[]);var n,i,o=t[e];if(o){if(!o.dependencies||0===o.dependencies.length)return delete t[o.key],[o];r.push(o.key);var a=[],s=function(e){if(r.some(function(t){return t===e}))throw Error("Detected a cycle between flags ".concat(r));var n=sX(e,t,r);n&&a.push.apply(a,sx([],sy(n),!1))};try{for(var l=sb(o.dependencies),u=l.next();!u.done;u=l.next()){var c=u.value;s(c)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return a.push(o),r.pop(),delete t[o.key],a}};let sQ="function"==typeof sh.Buffer,sZ="function"==typeof TextDecoder?new TextDecoder:void 0,sJ="function"==typeof TextEncoder?new TextEncoder:void 0,s0=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),s1=(r={},s0.forEach((e,t)=>r[e]=t),r),s2=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,s5=String.fromCharCode.bind(String),s3="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),s4=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),s6="function"==typeof btoa?e=>btoa(e):sQ?e=>sh.Buffer.from(e,"binary").toString("base64"):e=>{let t,r,n,i,o="",a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw TypeError("invalid character found");o+=s0[(t=r<<16|n<<8|i)>>18&63]+s0[t>>12&63]+s0[t>>6&63]+s0[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},s8=sQ?e=>sh.Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(s5.apply(null,e.subarray(r,r+4096)));return s6(t.join(""))},s7=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?s5(192|t>>>6)+s5(128|63&t):s5(224|t>>>12&15)+s5(128|t>>>6&63)+s5(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return s5(240|t>>>18&7)+s5(128|t>>>12&63)+s5(128|t>>>6&63)+s5(128|63&t)},s9=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,le=sQ?e=>sh.Buffer.from(e,"utf8").toString("base64"):sJ?e=>s8(sJ.encode(e)):e=>s6(e.replace(s9,s7)),lt=(e,t=!1)=>t?s4(le(e)):le(e),lr=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ln=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return s5((t>>>10)+55296)+s5((1023&t)+56320);case 3:return s5((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return s5((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},li="function"==typeof atob?e=>atob(e.replace(/[^A-Za-z0-9\+\/]/g,"")):sQ?e=>sh.Buffer.from(e,"base64").toString("binary"):e=>{if(e=e.replace(/\s+/g,""),!s2.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r="",n,i;for(let o=0;o<e.length;)t=s1[e.charAt(o++)]<<18|s1[e.charAt(o++)]<<12|(n=s1[e.charAt(o++)])<<6|(i=s1[e.charAt(o++)]),r+=64===n?s5(t>>16&255):64===i?s5(t>>16&255,t>>8&255):s5(t>>16&255,t>>8&255,255&t);return r},lo=sQ?e=>s3(sh.Buffer.from(e,"base64")):e=>s3(li(e).split("").map(e=>e.charCodeAt(0))),la=sQ?e=>sh.Buffer.from(e,"base64").toString("utf8"):sZ?e=>sZ.decode(lo(e)):e=>li(e).replace(lr,ln);var ls=function(e){function t(r,n){var i=e.call(this,n)||this;return i.statusCode=r,Object.setPrototypeOf(i,t.prototype),i}return sp(t,e),t}(Error),ll=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return sp(t,e),t}(Error),lu=function(){function e(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}return e.prototype.getVariants=function(e,t){return sm(this,void 0,void 0,function(){var r,n,i,o;return sv(this,function(a){switch(a.label){case 0:return r=lt(JSON.stringify(e),!0),n={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":r},(null==t?void 0:t.flagKeys)&&(n["X-Amp-Exp-Flag-Keys"]=lt(JSON.stringify(t.flagKeys),!0)),(null==t?void 0:t.trackingOption)&&(n["X-Amp-Exp-Track"]=t.trackingOption),i=new URL("".concat(this.serverUrl,"/sdk/v2/vardata?v=0")),(null==t?void 0:t.evaluationMode)&&i.searchParams.append("eval_mode",null==t?void 0:t.evaluationMode),(null==t?void 0:t.deliveryMethod)&&i.searchParams.append("delivery_method",null==t?void 0:t.deliveryMethod),[4,this.httpClient.request({requestUrl:i.toString(),method:"GET",headers:n,timeoutMillis:null==t?void 0:t.timeoutMillis})];case 1:if(200!=(o=a.sent()).status)throw new ls(o.status,"Fetch error response: status=".concat(o.status));return[2,JSON.parse(o.body)]}})})},e}(),lc=function(){function e(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}return e.prototype.getFlags=function(e){return sm(this,void 0,void 0,function(){var t,r;return sv(this,function(n){switch(n.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),(null==e?void 0:e.user)&&(t["X-Amp-Exp-User"]=lt(JSON.stringify(e.user),!0)),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags")+((null==e?void 0:e.deliveryMethod)?"?delivery_method=".concat(e.deliveryMethod):""),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(r=n.sent()).status)throw Error("Flags error response: status=".concat(r.status));return[2,JSON.parse(r.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}(),ld="undefined"!=typeof globalThis?globalThis:e.g||self,lh=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:e.g},lf=function(){var e=lh();if(e)try{var t="EXP_test";return e.localStorage.setItem(t,t),e.localStorage.removeItem(t),!0}catch(e){}return!1},lp=function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){this.poller||(this.poller=ld.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&(ld.clearInterval(this.poller),this.poller=void 0)},e}(),lg=e.i(84404);function lm(e){this.amplitudeInstance=e}function lv(e){this.amplitudeInstance=e}lm.prototype.getUser=function(){var e,t,r,n,i,o,a,s,l,u;return{device_id:null==(t=null==(e=this.amplitudeInstance)?void 0:e.options)?void 0:t.deviceId,user_id:null==(n=null==(r=this.amplitudeInstance)?void 0:r.options)?void 0:n.userId,version:null==(o=null==(i=this.amplitudeInstance)?void 0:i.options)?void 0:o.versionName,language:null==(s=null==(a=this.amplitudeInstance)?void 0:a.options)?void 0:s.language,platform:null==(u=null==(l=this.amplitudeInstance)?void 0:l.options)?void 0:u.platform,os:this.getOs(),device_model:this.getDeviceModel()}},lm.prototype.getOs=function(){var e,t,r,n,i,o;return[null==(r=null==(t=null==(e=this.amplitudeInstance)?void 0:e._ua)?void 0:t.browser)?void 0:r.name,null==(o=null==(i=null==(n=this.amplitudeInstance)?void 0:n._ua)?void 0:i.browser)?void 0:o.major].filter(function(e){return null!=e}).join(" ")},lm.prototype.getDeviceModel=function(){var e,t,r;return null==(r=null==(t=null==(e=this.amplitudeInstance)?void 0:e._ua)?void 0:t.os)?void 0:r.name},lv.prototype.track=function(e){this.amplitudeInstance.logEvent(e.name,e.properties)},lv.prototype.setUserProperty=function(e){var t,r;this.amplitudeInstance.setUserProperties(((t={})[e.userProperty]=null==(r=e.variant)?void 0:r.value,t))},lv.prototype.unsetUserProperty=function(e){var t;this.amplitudeInstance._logEvent("$identify",null,null,{$unset:((t={})[e.userProperty]="-",t)})};var lb=function(){return(lb=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ly(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}function lx(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){var u=[s,l];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function lw(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l_(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function lC(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var lk=function(e,t){void 0===t&&(t=!1);var r,n,i=lO(e,t),o=void 0,a=ld.document.cookie.split("; ");try{for(var s=lw(a),l=s.next();!l.done;l=s.next()){var u=l.value,c=l_(u.split("=",2),2),d=c[0],h=c[1];d===i&&(o=decodeURIComponent(h))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}if(o)try{if(t){var f=atob(o);return JSON.parse(decodeURIComponent(f))}var p=o.split("."),g=void 0;return p.length>=2&&p[1]&&(g=atob(p[1])),{deviceId:p[0],userId:g}}catch(e){return}},lS=function(e){var t=lO(e,!0);try{var r=ld.localStorage.getItem(t);if(!r)return;var n=JSON.parse(r);if("object"!=typeof n)return;return n}catch(e){return}},lE=function(e){var t=lO(e,!0);try{var r=ld.sessionStorage.getItem(t);if(!r)return;var n=JSON.parse(r);if("object"!=typeof n)return;return n}catch(e){return}},lO=function(e,t){if(t){if((null==e?void 0:e.length)<10)return;return"AMP_".concat(e.substring(0,10))}if(!((null==e?void 0:e.length)<6))return"amp_".concat(e.substring(0,6))},lI=function(){function e(e,t,r){this.type="integration",this.apiKey=e,this.identityStore=t.identityStore,this.eventBridge=t.eventBridge,this.contextProvider=t.applicationContextProvider,this.timeoutMillis=r,this.loadPersistedState(),r<=0&&(this.setup=void 0)}return e.prototype.setup=function(e,t){return ly(this,void 0,void 0,function(){return lx(this,function(r){return(null==e?void 0:e.automaticFetchOnAmplitudeIdentityChange)&&this.identityStore.addIdentityListener(function(){null==t||t.fetch()}),[2,this.waitForConnectorIdentity(this.timeoutMillis)]})})},e.prototype.getUser=function(){var e=this.identityStore.getIdentity();return{user_id:e.userId,device_id:e.deviceId,user_properties:e.userProperties,version:this.contextProvider.versionName}},e.prototype.track=function(e){return!!this.eventBridge.receiver&&(this.eventBridge.logEvent({eventType:e.eventType,eventProperties:e.eventProperties}),!0)},e.prototype.loadPersistedState=function(){if(!this.apiKey||this.apiKey.startsWith("client-"))return!1;var e=lk(this.apiKey,!0);return!!(e||(e=lk(this.apiKey,!1))||(e=lS(this.apiKey))||(e=lE(this.apiKey)))&&(this.commitIdentityToConnector(e),!0)},e.prototype.commitIdentityToConnector=function(e){var t=this.identityStore.editIdentity();t.setDeviceId(e.deviceId),e.userId&&t.setUserId(e.userId),t.commit()},e.prototype.waitForConnectorIdentity=function(e){return ly(this,void 0,void 0,function(){var t,r=this;return lx(this,function(n){return(t=this.identityStore.getIdentity()).userId||t.deviceId?[2]:[2,Promise.race([new Promise(function(e){var t=function(){e(),r.identityStore.removeIdentityListener(t)};r.identityStore.addIdentityListener(t)}),new Promise(function(t,r){ld.setTimeout(r,e,"Timed out waiting for Amplitude Analytics SDK to initialize.")})])]})})},e}(),lP=ld.fetch||function(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],a=[],s={},l=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return o},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,r){o.push(t=t.toLowerCase()),a.push([t,r]),s[t]=s[t]?s[t]+","+r:r}),r(l())},i.onerror=n,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)})},lT=function(){function e(e){this.client=e}return e.prototype.request=function(e){return ly(this,void 0,void 0,function(){return lx(this,function(t){switch(t.label){case 0:return[4,this.client.request(e.requestUrl,e.method,e.headers,null,e.timeoutMillis)];case 1:return[2,t.sent()]}})})},e}(),lR={request:function(e,t,r,n,i){var o;return o=ly(void 0,void 0,void 0,function(){var i,o;return lx(this,function(a){switch(a.label){case 0:return[4,lP(e,{method:t,headers:r,body:n})];case 1:return o={status:(i=a.sent()).status},[4,i.text()];case 2:return o.body=a.sent(),[2,o]}})}),null==i||i<=0?o:new Promise(function(e,t){ld.setTimeout(function(){t(new ll("Request timeout after "+i+" milliseconds"))},i),o.then(e,t)})}};(O=Y||(Y={})).LocalStorage="localStorage",O.InitialVariants="initialVariants",(I=X||(X={})).LocalStorage="storage",I.InitialVariants="initial",I.SecondaryLocalStorage="secondary-storage",I.SecondaryInitialVariants="secondary-initial",I.FallbackInline="fallback-inline",I.FallbackConfig="fallback-config",I.LocalEvaluation="local-evaluation";var lA=function(e){return!e||e===X.FallbackInline||e===X.FallbackConfig||e===X.SecondaryInitialVariants},lM={debug:!1,instanceName:"$default_instance",fallbackVariant:{},initialVariants:{},initialFlags:void 0,source:Y.LocalStorage,serverUrl:"https://api.lab.amplitude.com",flagsServerUrl:"https://flag.lab.amplitude.com",serverZone:"US",fetchTimeoutMillis:1e4,retryFetchOnFailure:!0,throwOnError:!1,automaticExposureTracking:!0,pollOnStart:!0,flagConfigPollingIntervalMillis:3e5,fetchOnStart:!0,automaticFetchOnAmplitudeIdentityChange:!1,userProvider:null,analyticsProvider:null,exposureTrackingProvider:null,httpClient:lR},lN="1.18.0",lD=function(){function e(e,t){var r,n=this;this.isReady=new Promise(function(e){n.resolve=e}),this.config=e,this.client=t;var i=null!=(r=e.instanceName)?r:lM.instanceName;this.queue=new lV(i),this.cache=new lL(i)}return e.prototype.ready=function(){return this.integration?this.isReady:Promise.resolve()},e.prototype.setIntegration=function(e){var t=this;this.integration&&this.integration.teardown&&this.integration.teardown(),this.integration=e,e.setup?this.integration.setup(this.config,this.client).then(function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()},function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()}):(this.queue.setTracker(this.integration.track.bind(e)),this.resolve())},e.prototype.getUser=function(){return this.integration?this.integration.getUser():{}},e.prototype.track=function(e){if(this.cache.shouldTrack(e)){var t=this.getExposureEvent(e);this.queue.push(t)}},e.prototype.getExposureEvent=function(e){var t,r,n,i={eventType:"$exposure",eventProperties:e};return(null==(t=e.metadata)?void 0:t.exposureEvent)?i={eventType:null==(r=e.metadata)?void 0:r.exposureEvent,eventProperties:e}:(null==(n=e.metadata)?void 0:n.deliveryMethod)==="web"&&(i={eventType:"$impression",eventProperties:e}),i},e}(),lL=function(){function e(e){this.isSessionStorageAvailable=lF(),this.inMemoryCache={},this.storageKey="EXP_sent_v2_".concat(e),this.isSessionStorageAvailable&&ld.sessionStorage.removeItem("EXP_sent_".concat(e))}return e.prototype.shouldTrack=function(e){if((null==(t=e.metadata)?void 0:t.deliveryMethod)==="web")return!0;this.loadCache();var t,r=this.inMemoryCache[e.flag_key],n=!1;return r&&r.variant===e.variant||(n=!0,this.inMemoryCache[e.flag_key]=e),this.storeCache(),n},e.prototype.loadCache=function(){if(this.isSessionStorageAvailable){var e=ld.sessionStorage.getItem(this.storageKey);this.inMemoryCache=e?JSON.parse(e):{}}},e.prototype.storeCache=function(){this.isSessionStorageAvailable&&ld.sessionStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryCache))},e}(),lV=function(){function e(e,t){void 0===t&&(t=512),this.isLocalStorageAvailable=lf(),this.inMemoryQueue=[],this.storageKey="EXP_unsent_".concat(e),this.maxQueueSize=t}return e.prototype.push=function(e){this.loadQueue(),this.inMemoryQueue.push(e),this.flush(),this.storeQueue()},e.prototype.setTracker=function(e){var t=this;this.tracker=e,this.poller=ld.setInterval(function(){t.loadFlushStore()},1e3),this.loadFlushStore()},e.prototype.flush=function(){var e,t;if(this.tracker&&0!==this.inMemoryQueue.length){try{for(var r=lw(this.inMemoryQueue),n=r.next();!n.done;n=r.next()){var i=n.value;try{if(!this.tracker(i))return}catch(e){return}}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.inMemoryQueue=[],this.poller&&(ld.clearInterval(this.poller),this.poller=void 0)}},e.prototype.loadQueue=function(){if(this.isLocalStorageAvailable){var e=ld.localStorage.getItem(this.storageKey);this.inMemoryQueue=e?JSON.parse(e):[]}},e.prototype.storeQueue=function(){this.isLocalStorageAvailable&&(this.inMemoryQueue.length>this.maxQueueSize&&(this.inMemoryQueue=this.inMemoryQueue.slice(this.inMemoryQueue.length-this.maxQueueSize)),ld.localStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryQueue)))},e.prototype.loadFlushStore=function(){this.loadQueue(),this.flush(),this.storeQueue()},e}(),lF=function(){var e=lh();if(e)try{var t="EXP_test";return e.sessionStorage.setItem(t,t),e.sessionStorage.removeItem(t),!0}catch(e){}return!1},lj=function(){function e(){this.globalScope=lh()}return e.prototype.get=function(e){var t;return null==(t=this.globalScope)?void 0:t.localStorage.getItem(e)},e.prototype.put=function(e,t){var r;null==(r=this.globalScope)||r.localStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null==(t=this.globalScope)||t.localStorage.removeItem(e)},e}(),lz=function(e,t,r){var n=e.substring(e.length-6);return new lH("amp-exp-".concat(t,"-").concat(n),r,lW)},lB=function(e,t,r){void 0===r&&(r=new lj);var n=e.substring(e.length-6);return new lH("amp-exp-".concat(t,"-").concat(n,"-flags"),r)},lH=function(){function e(e,t,r){this.cache={},this.namespace=e,this.storage=t,this.transformer=r}return e.prototype.get=function(e){return this.cache[e]},e.prototype.getAll=function(){return lb({},this.cache)},e.prototype.put=function(e,t){this.cache[e]=t},e.prototype.putAll=function(e){var t,r;try{for(var n=lw(Object.keys(e)),i=n.next();!i.done;i=n.next()){var o=i.value;this.cache[o]=e[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.remove=function(e){delete this.cache[e]},e.prototype.clear=function(){this.cache={}},e.prototype.load=function(){var e,t,r,n=this.storage.get(this.namespace);try{r=JSON.parse(n)||{}}catch(e){return}var i={};try{for(var o=lw(Object.keys(r)),a=o.next();!a.done;a=o.next()){var s=a.value;try{var l=void 0;(l=this.transformer?this.transformer(r[s]):r[s])&&(i[s]=l)}catch(e){}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.clear(),this.putAll(i)},e.prototype.store=function(e){void 0===e&&(e=this.cache),this.storage.put(this.namespace,JSON.stringify(e))},e}(),lW=function(e){if("string"==typeof e)return{key:e,value:e};if("object"==typeof e){var t=e.key,r=e.value,n=e.payload,i=e.metadata,o=e.expKey;i&&i.experimentKey?o=i.experimentKey:o&&((i=i||{}).experimentKey=o);var a={};return t?a.key=t:r&&(a.key=r),r&&(a.value=r),i&&(a.metadata=i),n&&(a.payload=n),o&&(a.expKey=o),a}},lU=function(){function e(){this.globalScope=lh()}return e.prototype.get=function(e){var t;return null==(t=this.globalScope)?void 0:t.sessionStorage.getItem(e)},e.prototype.put=function(e,t){var r;null==(r=this.globalScope)||r.sessionStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null==(t=this.globalScope)||t.sessionStorage.removeItem(e)},e}(),l$=function(e,t,r,n){var i,o=null==r?void 0:r.value,a="[Experiment] ".concat(t);return{name:"[Experiment] Exposure",user:e,key:t,variant:r,userProperty:a,properties:{key:t,variant:o,source:n},userProperties:((i={})[a]=o,i)}},lq=function(e){return null==e},lG=function(e){return!!lq(e)||e&&0===Object.keys(e).length},lK=function(e){if(!e||"object"!=typeof e)return{};var t,r,n={};try{for(var i=lw(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=l_(o.value,2),s=a[0],l=a[1];lq(l)||(n[s]=l)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},lY=function(e){var t;return(null==(t=null==e?void 0:e.metadata)?void 0:t.evaluationMode)==="local"},lX=function(){function e(e,t,r,n){this.started=!1,this.done=!1,this.attempts=e,this.min=t,this.max=r,this.scalar=n}return e.prototype.start=function(e){return ly(this,void 0,void 0,function(){return lx(this,function(t){switch(t.label){case 0:if(this.started)throw Error("Backoff already started");return this.started=!0,[4,this.backoff(e,0,this.min)];case 1:return t.sent(),[2]}})})},e.prototype.cancel=function(){this.done=!0,clearTimeout(this.timeoutHandle)},e.prototype.backoff=function(e,t,r){return ly(this,void 0,void 0,function(){var n=this;return lx(this,function(i){return this.done||(this.timeoutHandle=ld.setTimeout(function(){return ly(n,void 0,void 0,function(){var n,i;return lx(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e()];case 1:return o.sent(),[3,3];case 2:return o.sent(),(n=t+1)<this.attempts&&(i=Math.min(r*this.scalar,this.max),this.backoff(e,n,i)),[3,3];case 3:return[2]}})})},r)),[2]})})},e}(),lQ=function(e){if(!e)return{};var t,r,n,i,o={user:e},a=lh();a&&(o.page={url:a.location.href});var s={};if(!e.groups)return o;try{for(var l=lw(Object.keys(e.groups)),u=l.next();!u.done;u=l.next()){var c=u.value,d=e.groups[c];if(d.length>0&&d[0]){var h=d[0],f={group_name:h},p=null==(i=null==(n=e.group_properties)?void 0:n[c])?void 0:i[h];p&&Object.keys(p).length>0&&(f.group_properties=p),s[c]=f}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return Object.keys(s).length>0&&(o.groups=s),delete o.user.groups,delete o.user.group_properties,o},lZ=function(e){return null==e?{}:"string"==typeof e?{key:e,value:e}:e},lJ=function(e){if(!e)return{};var t=void 0;e.metadata&&(t=e.metadata.experimentKey);var r={};return e.key&&(r.key=e.key),e.value&&(r.value=e.value),e.payload&&(r.payload=e.payload),t&&(r.expKey=t),e.metadata&&(r.metadata=e.metadata),r},l0=function(){function e(e){this.setProperties={},this.unsetProperties={},this.analyticsProvider=e}return e.prototype.track=function(e){this.setProperties[e.key]!=e.variant.value&&(this.setProperties[e.key]=e.variant.value,delete this.unsetProperties[e.key],this.analyticsProvider.track(e))},e.prototype.setUserProperty=function(e){this.setProperties[e.key]!=e.variant.value&&this.analyticsProvider.setUserProperty(e)},e.prototype.unsetUserProperty=function(e){this.unsetProperties[e.key]||(this.unsetProperties[e.key]="unset",delete this.setProperties[e.key],this.analyticsProvider.unsetUserProperty(e))},e}(),l1=function(){function e(e){this.tracked={},this.identity={},this.exposureTrackingProvider=e}return e.prototype.track=function(e,t){var r={userId:null==t?void 0:t.user_id,deviceId:null==t?void 0:t.device_id};this.identityEquals(this.identity,r)||(this.tracked={}),this.identity=r;var n=e.flag_key in this.tracked,i=this.tracked[e.flag_key];n&&i===e.variant||(this.tracked[e.flag_key]=e.variant,this.exposureTrackingProvider.track(e))},e.prototype.identityEquals=function(e,t){return e.userId===t.userId&&e.deviceId===t.deviceId},e}(),l2=function(){function e(e,t){var r,n,i,o,a,s=this;this.engine=new sK,this.isRunning=!1,this.apiKey=e,t=lK(t),this.config=lb(lb(lb({},lM),t),{serverUrl:(null==t?void 0:t.serverUrl)||((null==(r=null==t?void 0:t.serverZone)?void 0:r.toLowerCase())==="eu"?"https://api.lab.eu.amplitude.com":lM.serverUrl),flagsServerUrl:(null==t?void 0:t.flagsServerUrl)||((null==(n=null==t?void 0:t.serverZone)?void 0:n.toLowerCase())==="eu"?"https://flag.lab.eu.amplitude.com":lM.flagsServerUrl),flagConfigPollingIntervalMillis:t.flagConfigPollingIntervalMillis<6e4?6e4:null!=(i=t.flagConfigPollingIntervalMillis)?i:lM.flagConfigPollingIntervalMillis});var l=null==(o=this.config)?void 0:o.internalInstanceNameSuffix;if(this.isWebExperiment="web"===l,this.poller=new lp(function(){return s.doFlags()},this.config.flagConfigPollingIntervalMillis),this.config.initialVariants)for(var u in this.config.initialVariants)this.config.initialVariants[u]=lW(this.config.initialVariants[u]);this.config.userProvider&&(this.userProvider=this.config.userProvider),this.config.analyticsProvider&&(this.analyticsProvider=new l0(this.config.analyticsProvider)),this.config.exposureTrackingProvider&&(this.userSessionExposureTracker=new l1(this.config.exposureTrackingProvider)),this.integrationManager=new lD(this.config,this);var c=new lT(this.config.httpClient||lR);this.flagApi=new lc(this.apiKey,this.config.flagsServerUrl,c),this.evaluationApi=new lu(this.apiKey,this.config.serverUrl,c);var d=l?"".concat(this.config.instanceName,"-").concat(l):this.config.instanceName;a=this.isWebExperiment?new lU:new lj,this.variants=lz(this.apiKey,d,a),this.flags=lB(this.apiKey,d,a);try{this.flags.load(),this.variants.load()}catch(e){}this.mergeInitialFlagsWithStorage()}return e.prototype.start=function(e){return ly(this,void 0,void 0,function(){var t,r,n;return lx(this,function(i){switch(i.label){case 0:if(this.isRunning)return[2];this.isRunning=!0,this.setUser(e),i.label=1;case 1:if(i.trys.push([1,6,,7]),t=this.doFlags(),!(null==(n=this.config.fetchOnStart)||n))return[3,3];return[4,Promise.all([this.fetch(e),t])];case 2:return i.sent(),[3,5];case 3:return[4,t];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:if(r=i.sent(),this.config.throwOnError)throw r;return[3,7];case 7:return this.config.pollOnStart&&this.poller.start(),[2]}})})},e.prototype.stop=function(){this.isRunning&&(this.poller.stop(),this.isRunning=!1)},e.prototype.fetch=function(){return ly(this,arguments,void 0,function(e,t){var r;return void 0===e&&(e=this.user),lx(this,function(n){switch(n.label){case 0:this.setUser(e||{}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.fetchInternal(e,this.config.fetchTimeoutMillis,this.config.retryFetchOnFailure,t)];case 2:return n.sent(),[3,4];case 3:if(r=n.sent(),this.config.throwOnError)throw r;return this.config.debug&&(r instanceof ll?console.debug(r):console.error(r)),[3,4];case 4:return[2,this]}})})},e.prototype.variant=function(e,t){if(!this.apiKey)return{value:void 0};var r,n,i=this.variantAndSource(e,t);return this.config.automaticExposureTracking&&this.exposureInternal(e,i),this.debug("[Experiment] variant for ".concat(e," is ").concat((null==(r=i.variant)?void 0:r.key)||(null==(n=i.variant)?void 0:n.value))),i.variant||{}},e.prototype.exposure=function(e){var t=this.variantAndSource(e);this.exposureInternal(e,t)},e.prototype.all=function(){if(!this.apiKey)return{};var e=this.evaluate();for(var t in e)lY(this.flags.get(t))||delete e[t];return lb(lb(lb({},this.secondaryVariants()),this.sourceVariants()),e)},e.prototype.clear=function(){this.variants.clear();try{this.variants.store()}catch(e){}},e.prototype.getUser=function(){if(!this.user)return this.user;if(null==(e=this.user)||!e.user_properties)return lb({},this.user);var e,t=lb({},this.user.user_properties);return lb(lb({},this.user),{user_properties:t})},e.prototype.setUser=function(e){var t;if(!e){this.user=null;return}if(null==(t=this.user)?void 0:t.user_properties){var r=lb({},e.user_properties);this.user=lb(lb({},e),{user_properties:r})}else this.user=lb({},e)},e.prototype.getUserProvider=function(){return this.userProvider},e.prototype.setUserProvider=function(e){return this.userProvider=e,this},e.prototype.mergeInitialFlagsWithStorage=function(){var e=this;this.config.initialFlags&&JSON.parse(this.config.initialFlags).forEach(function(t){e.flags.get(t.key)||e.flags.put(t.key,t)})},e.prototype.evaluate=function(e){var t,r,n=this.addContext(this.user),i=sY(this.flags.getAll(),e),o=lQ(n),a=this.engine.evaluate(o,i),s={};try{for(var l=lw(Object.keys(a)),u=l.next();!u.done;u=l.next()){var c=u.value;s[c]=lJ(a[c])}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return s},e.prototype.variantAndSource=function(e,t){var r={};this.config.source===Y.LocalStorage?r=this.localStorageVariantAndSource(e,t):this.config.source===Y.InitialVariants&&(r=this.initialVariantsVariantAndSource(e,t));var n=this.flags.get(e);return(lY(n)||!r.variant&&n)&&(r=this.localEvaluationVariantAndSource(e,n,t)),r},e.prototype.localEvaluationVariantAndSource=function(e,t,r){var n,i={},o=this.evaluate([t.key])[e],a=X.LocalEvaluation,s=null==(n=null==o?void 0:o.metadata)?void 0:n.default;if(!lq(o)&&!s)return{variant:lZ(o),source:a,hasDefaultVariant:!1};if(s&&(i={variant:lZ(o),source:a,hasDefaultVariant:!0}),!lq(r))return{variant:lZ(r),source:X.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var l=this.config.initialVariants[e];if(!lq(l))return{variant:lZ(l),source:X.SecondaryInitialVariants,hasDefaultVariant:i.hasDefaultVariant};var u=lZ(this.config.fallbackVariant),c={variant:u,source:X.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return lG(u)?i:c},e.prototype.localStorageVariantAndSource=function(e,t){var r,n={},i=this.variants.get(e),o=null==(r=null==i?void 0:i.metadata)?void 0:r.default;if(!lq(i)&&!o)return{variant:lZ(i),source:X.LocalStorage,hasDefaultVariant:!1};if(o&&(n={variant:lZ(i),source:X.LocalStorage,hasDefaultVariant:!0}),!lq(t))return{variant:lZ(t),source:X.FallbackInline,hasDefaultVariant:n.hasDefaultVariant};var a=this.config.initialVariants[e];if(!lq(a))return{variant:lZ(a),source:X.SecondaryInitialVariants,hasDefaultVariant:n.hasDefaultVariant};var s=lZ(this.config.fallbackVariant),l={variant:s,source:X.FallbackConfig,hasDefaultVariant:n.hasDefaultVariant};return lG(s)?n:l},e.prototype.initialVariantsVariantAndSource=function(e,t){var r,n={},i=this.config.initialVariants[e];if(!lq(i))return{variant:lZ(i),source:X.InitialVariants,hasDefaultVariant:!1};var o=this.variants.get(e),a=null==(r=null==o?void 0:o.metadata)?void 0:r.default;if(!lq(o)&&!a)return{variant:lZ(o),source:X.LocalStorage,hasDefaultVariant:!1};if(a&&(n={variant:lZ(o),source:X.LocalStorage,hasDefaultVariant:!0}),!lq(t))return{variant:lZ(t),source:X.FallbackInline,hasDefaultVariant:n.hasDefaultVariant};var s=lZ(this.config.fallbackVariant),l={variant:s,source:X.FallbackConfig,hasDefaultVariant:n.hasDefaultVariant};return lG(s)?n:l},e.prototype.fetchInternal=function(e,t,r,n){return ly(this,void 0,void 0,function(){var i,o;return lx(this,function(a){switch(a.label){case 0:if(!this.apiKey)throw Error("Experiment API key is empty");this.debug("[Experiment] Fetch all: retry=".concat(r)),r&&this.stopRetries(),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.doFetch(e,t,n)];case 2:return i=a.sent(),[4,this.storeVariants(i,n)];case 3:return a.sent(),[2,i];case 4:throw o=a.sent(),r&&this.shouldRetryFetch(o)&&this.startRetries(e,n),o;case 5:return[2]}})})},e.prototype.cleanUserPropsForFetch=function(e){var t=lb({},e);return delete t.cookie,t},e.prototype.doFetch=function(e,t,r){return ly(this,void 0,void 0,function(){var n,i,o,a,s,l,u;return lx(this,function(c){switch(c.label){case 0:return[4,this.addContextOrWait(e)];case 1:return e=c.sent(),e=this.cleanUserPropsForFetch(e),this.debug("[Experiment] Fetch variants for user: ",e),[4,this.evaluationApi.getVariants(e,lb({timeoutMillis:t},r))];case 2:n=c.sent(),i={};try{for(a=(o=lw(Object.keys(n))).next();!a.done;a=o.next())i[s=a.value]=lJ(n[s])}catch(e){l={error:e}}finally{try{a&&!a.done&&(u=o.return)&&u.call(o)}finally{if(l)throw l.error}}return this.debug("[Experiment] Received variants: ",i),[2,i]}})})},e.prototype.doFlags=function(){return ly(this,void 0,void 0,function(){var e,t,r;return lx(this,function(n){switch(n.label){case 0:if(n.trys.push([0,4,,5]),e=void 0,!this.isWebExperiment)return[3,2];return[4,this.addContextOrWait(this.getUser())];case 1:e=n.sent(),n.label=2;case 2:return[4,this.flagApi.getFlags({libraryName:"experiment-js-client",libraryVersion:lN,timeoutMillis:this.config.fetchTimeoutMillis,deliveryMethod:this.isWebExperiment?"web":void 0,user:(null==e?void 0:e.user_id)||(null==e?void 0:e.device_id)?{user_id:null==e?void 0:e.user_id,device_id:null==e?void 0:e.device_id}:void 0})];case 3:return t=n.sent(),this.flags.clear(),this.flags.putAll(t),[3,5];case 4:if((r=n.sent())instanceof ll){if(this.config.debug&&console.debug(r),this.config.throwOnError)throw r}else throw r;return[3,5];case 5:try{this.flags.store()}catch(e){}return this.mergeInitialFlagsWithStorage(),[2]}})})},e.prototype.storeVariants=function(e,t){return ly(this,void 0,void 0,function(){var r,n,i,o;return lx(this,function(a){for(o in 0===(r=t&&t.flagKeys?t.flagKeys:[]).length&&this.variants.clear(),n=function(t){r=r.filter(function(e){return e!==t}),i.variants.put(t,e[t])},i=this,e)n(o);for(o in r)this.variants.remove(o);try{this.variants.store()}catch(e){}return this.debug("[Experiment] Stored variants: ",e),[2]})})},e.prototype.startRetries=function(e,t){return ly(this,void 0,void 0,function(){var r=this;return lx(this,function(n){return this.debug("[Experiment] Retry fetch"),this.retriesBackoff=new lX(8,500,1e4,1.5),this.retriesBackoff.start(function(){return ly(r,void 0,void 0,function(){return lx(this,function(r){switch(r.label){case 0:return[4,this.fetchInternal(e,1e4,!1,t)];case 1:return r.sent(),[2]}})})}),[2]})})},e.prototype.stopRetries=function(){this.retriesBackoff&&this.retriesBackoff.cancel()},e.prototype.addContext=function(e){var t,r=null==(t=this.userProvider)?void 0:t.getUser(),n=this.integrationManager.getUser(),i=lb(lb(lb({},null==r?void 0:r.user_properties),n.user_properties),null==e?void 0:e.user_properties);return lb(lb(lb(lb({library:"experiment-js-client/".concat(lN)},r),n),e),{user_properties:i})},e.prototype.addContextOrWait=function(e){return ly(this,void 0,void 0,function(){return lx(this,function(t){switch(t.label){case 0:return[4,this.integrationManager.ready()];case 1:return t.sent(),[2,this.addContext(e)]}})})},e.prototype.sourceVariants=function(){return this.config.source==Y.LocalStorage?this.variants.getAll():this.config.source==Y.InitialVariants?this.config.initialVariants:void 0},e.prototype.secondaryVariants=function(){return this.config.source==Y.LocalStorage?this.config.initialVariants:this.config.source==Y.InitialVariants?this.variants.getAll():void 0},e.prototype.exposureInternal=function(e,t){if(null==(i=null==(n=null==(r=t.variant)?void 0:r.metadata)?void 0:n.trackExposure)||i){this.legacyExposureInternal(e,t.variant,t.source);var r,n,i,o,a,s,l,u,c,d={flag_key:e},h=lA(t.source);if(!h||t.hasDefaultVariant){(null==(o=t.variant)?void 0:o.expKey)&&(d.experiment_key=null==(a=t.variant)?void 0:a.expKey);var f=null==(s=t.variant)?void 0:s.metadata;if(h||(null==f?void 0:f.default)||((null==(l=t.variant)?void 0:l.key)?d.variant=t.variant.key:(null==(u=t.variant)?void 0:u.value)&&(d.variant=t.variant.value)),f&&(d.metadata=f),this.isWebExperiment){var p=lh();if(null==p?void 0:p.location)try{var g=p.location.href;d.metadata.url=g.split("?")[0]||""}catch(e){}}var m=this.addContext(this.getUser());null==(c=this.userSessionExposureTracker)||c.track(d,m),this.integrationManager.track(d)}}},e.prototype.legacyExposureInternal=function(e,t,r){var n,i,o,a,s;if(this.analyticsProvider){var l=l$(this.addContext(this.getUser()),e,t,r);!lA(r)&&(null==t?void 0:t.value)?(null==t?void 0:t.value)&&(null==(a=null==(o=this.analyticsProvider)?void 0:o.setUserProperty)||a.call(o,l),null==(s=this.analyticsProvider)||s.track(l)):null==(i=null==(n=this.analyticsProvider)?void 0:n.unsetUserProperty)||i.call(n,l)}},e.prototype.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.config.debug&&console.debug.apply(console,lC([e],l_(t),!1))},e.prototype.shouldRetryFetch=function(e){return!(e instanceof ls)||e.statusCode<400||e.statusCode>=500||429===e.statusCode},e.prototype.addPlugin=function(e){"integration"===e.type&&this.integrationManager.setIntegration(e)},e}(),l5=function(){function e(e,t){var r,n,i;this.globalScope=lh(),this.userAgent=void 0!==(null==(r=this.globalScope)?void 0:r.navigator)?null==(n=this.globalScope)?void 0:n.navigator.userAgent:void 0,this.ua=new lg.UAParser(this.userAgent).getResult(),this.localStorage=new lj,this.sessionStorage=new lU,this.userProvider=e,this.apiKey=t,this.storageKey="EXP_".concat(null==(i=this.apiKey)?void 0:i.slice(0,10),"_DEFAULT_USER_PROVIDER")}return e.prototype.getUser=function(){var e,t,r,n,i,o=(null==(e=this.userProvider)?void 0:e.getUser())||{};return lb({language:this.getLanguage(),platform:"Web",os:this.getOs(this.ua),device_model:this.getDeviceModel(this.ua),device_category:null!=(r=null==(t=this.ua.device)?void 0:t.type)?r:"desktop",referring_url:null==(i=null==(n=this.globalScope)?void 0:n.document)?void 0:i.referrer.replace(/\/$/,""),cookie:this.getCookie(),browser:this.getBrowser(this.ua),landing_url:this.getLandingUrl(),first_seen:this.getFirstSeen(),url_param:this.getUrlParam(),user_agent:this.userAgent},o)},e.prototype.getLanguage=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},e.prototype.getOs=function(e){var t,r;return[null==(t=e.browser)?void 0:t.name,null==(r=e.browser)?void 0:r.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(e){var t;return null==(t=e.os)?void 0:t.name},e.prototype.getBrowser=function(e){var t,r=null==(t=e.browser)?void 0:t.name;return(null==r?void 0:r.includes("Chrom"))&&(r="Chrome"),(null==r?void 0:r.includes("Firefox"))&&(r="Firefox"),(null==r?void 0:r.includes("Safari"))&&(r="Safari"),(null==r?void 0:r.includes("Edge"))&&(r="Edge"),(null==r?void 0:r.includes("Opera"))&&(r="Opera"),r},e.prototype.getCookie=function(){var e,t,r,n,i;if(null==(t=null==(e=this.globalScope)?void 0:e.document)?void 0:t.cookie)return Object.fromEntries(null==(i=null==(n=null==(r=this.globalScope)?void 0:r.document)?void 0:n.cookie)?void 0:i.split("; ").map(function(e){return e.split("=")}))},e.prototype.getLandingUrl=function(){var e,t;try{var r=JSON.parse(this.sessionStorage.get(this.storageKey)||"{}");return r.landing_url||(r.landing_url=null==(t=null==(e=this.globalScope)?void 0:e.location)?void 0:t.href.replace(/\/$/,""),this.sessionStorage.put(this.storageKey,JSON.stringify(r))),r.landing_url}catch(e){return}},e.prototype.getFirstSeen=function(){try{var e=JSON.parse(this.localStorage.get(this.storageKey)||"{}");return e.first_seen||(e.first_seen=(Date.now()/1e3).toString(),this.localStorage.put(this.storageKey,JSON.stringify(e))),e.first_seen}catch(e){return}},e.prototype.getUrlParam=function(){if(this.globalScope){var e,t,r,n={};try{var i=new URL(this.globalScope.location.href);try{for(var o=lw(i.searchParams),a=o.next();!a.done;a=o.next()){var s=l_(a.value,2),l=s[0],u=s[1];n[l]=lC(lC([],l_(null!=(r=n[l])?r:[]),!1),l_(u.split(",")),!1)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}catch(e){return}return Object.entries(n).reduce(function(e,t){var r=l_(t,2),n=r[0],i=r[1];return e[n]=1==i.length?i[0]:i,e},{})}},e}();ld.experimentInstances={};var l3=ld.experimentInstances,l4=function(e){return(null==e?void 0:e.instanceName)||lM.instanceName},l6=function(e,t){var r=l4(t),n=null==t?void 0:t.internalInstanceNameSuffix;return n?"".concat(r,".").concat(e,".").concat(n):"".concat(r,".").concat(e)},l8=function(e,t,r){var n=l6(e,t),i=l3[n];return i?i:(i=new l2(e,lb(lb({},t),{userProvider:new l5(null==t?void 0:t.userProvider,e)})),r&&i.addPlugin(r()),l3[n]=i,i)};function l7(){}l7.prototype.getUser=function(){return{}},l7.prototype.start=function(e){return ly(this,void 0,void 0,function(){return lx(this,function(e){return[2]})})},l7.prototype.stop=function(){},l7.prototype.setUser=function(e){},l7.prototype.fetch=function(e,t){return ly(this,void 0,void 0,function(){return lx(this,function(e){return[2,this]})})},l7.prototype.getUserProvider=function(){return null},l7.prototype.setUserProvider=function(e){return this},l7.prototype.variant=function(e,t){return lM.fallbackVariant},l7.prototype.all=function(){return{}},l7.prototype.clear=function(){},l7.prototype.exposure=function(e){};var l9=function(){function e(t){this.name=e.pluginName,this.config=t}return e.prototype.setup=function(e,t){return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(t){var r,n;return this.experiment=l8(r=e.apiKey,n=this.config,function(){return new lI(r,e0.getInstance(l4(n)),1e4)}),[2]})})},e.pluginName="@amplitude/experiment-analytics-plugin",e}();let ue={experiment:(P=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,Q.__extends)(t,e),Object.defineProperty(t.prototype,"experiment",{get:function(){if(void 0!==this.config){var e=this.plugins(l9);return 0===e.length?void this.config.loggerProvider.debug("".concat(l9.pluginName," plugin is not found.")):1===e.length?e[0].experiment:void this.config.loggerProvider.debug("Multiple instances of ".concat(l9.pluginName," are found."))}},enumerable:!1,configurable:!0}),t.prototype.initAll=function(t,r){return(0,Q.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,Q.__generator)(this,function(o){switch(o.label){case 0:return n={serverZone:null==r?void 0:r.serverZone,instanceName:null==r?void 0:r.instanceName},e.prototype.add.call(this,{type:"enrichment",name:"@amplitude/unified-library-plugin",execute:function(e){var t;return(0,Q.__awaiter)(this,void 0,void 0,function(){return(0,Q.__generator)(this,function(r){return e.library="".concat("amplitude-ts-unified","/").concat("1.0.0-beta.2","-").concat(null!=(t=e.library)?t:""),[2,e]})})}}),[4,e.prototype.init.call(this,t,(0,Q.__assign)((0,Q.__assign)({},null==r?void 0:r.analytics),n)).promise];case 1:return o.sent(),[4,e.prototype.add.call(this,new sd((0,Q.__assign)((0,Q.__assign)({},null==r?void 0:r.sr),n))).promise];case 2:return o.sent(),[4,e.prototype.add.call(this,new l9((0,Q.__assign)((0,Q.__assign)({},null==r?void 0:r.experiment),n))).promise];case 3:return o.sent(),void 0===(i=this.plugin(sd.pluginName))?this.config.loggerProvider.debug("".concat(sd.pluginName," plugin is not found.")):this.sr=i.sr,[2]}})})},t.prototype.init=function(t,r,n){return void 0===t&&(t=""),e.prototype.init.call(this,t,r,n)},t}(ov))).experiment,sr:P.sr,initAll:eB(P.initAll.bind(P),"initAll",eF(P),ez(P,["config"])),init:eB(P.init.bind(P),"init",eF(P),ez(P,["config"])),add:eB(P.add.bind(P),"add",eF(P),ez(P,["config.apiKey","timeline.plugins"])),remove:eB(P.remove.bind(P),"remove",eF(P),ez(P,["config.apiKey","timeline.plugins"])),track:eB(P.track.bind(P),"track",eF(P),ez(P,["config.apiKey","timeline.queue.length"])),logEvent:eB(P.logEvent.bind(P),"logEvent",eF(P),ez(P,["config.apiKey","timeline.queue.length"])),identify:eB(P.identify.bind(P),"identify",eF(P),ez(P,["config.apiKey","timeline.queue.length"])),groupIdentify:eB(P.groupIdentify.bind(P),"groupIdentify",eF(P),ez(P,["config.apiKey","timeline.queue.length"])),setGroup:eB(P.setGroup.bind(P),"setGroup",eF(P),ez(P,["config.apiKey","timeline.queue.length"])),revenue:eB(P.revenue.bind(P),"revenue",eF(P),ez(P,["config.apiKey","timeline.queue.length"])),flush:eB(P.flush.bind(P),"flush",eF(P),ez(P,["config.apiKey","timeline.queue.length"])),getUserId:eB(P.getUserId.bind(P),"getUserId",eF(P),ez(P,["config","config.userId"])),setUserId:eB(P.setUserId.bind(P),"setUserId",eF(P),ez(P,["config","config.userId"])),getDeviceId:eB(P.getDeviceId.bind(P),"getDeviceId",eF(P),ez(P,["config","config.deviceId"])),setDeviceId:eB(P.setDeviceId.bind(P),"setDeviceId",eF(P),ez(P,["config","config.deviceId"])),reset:eB(P.reset.bind(P),"reset",eF(P),ez(P,["config","config.userId","config.deviceId"])),getSessionId:eB(P.getSessionId.bind(P),"getSessionId",eF(P),ez(P,["config"])),setSessionId:eB(P.setSessionId.bind(P),"setSessionId",eF(P),ez(P,["config"])),extendSession:eB(P.extendSession.bind(P),"extendSession",eF(P),ez(P,["config"])),setOptOut:eB(P.setOptOut.bind(P),"setOptOut",eF(P),ez(P,["config"])),setTransport:eB(P.setTransport.bind(P),"setTransport",eF(P),ez(P,["config"]))};var ut=ue.initAll,ur=(ue.experiment,ue.sr,ue.add,ue.extendSession,ue.flush,ue.getDeviceId,ue.getSessionId,ue.getUserId,ue.groupIdentify,ue.identify,ue.logEvent,ue.remove,ue.reset,ue.revenue,ue.setDeviceId,ue.setGroup,ue.setOptOut,ue.setSessionId,ue.setTransport,ue.setUserId,ue.track);function un(){let e,t=(e=document.cookie.match("(^|;)\\s*recce_user_id\\s*=\\s*([^;]+)"))?e.pop():"",r="b1ea2155354b7e1e41981715f16599f2";if(t&&r)try{ut(r,{analytics:{userId:t,autocapture:!0},sr:{sampleRate:1}})}catch(e){console.error(e)}}function ui(e){ur("[Web] multi_nodes_action",e)}function uo(e){ur("[Web] history_action",e)}function ua(e){ur("[Experiment] preview_change",e)}function us(e){ur("[Experiment] preview_change",e)}function ul(e){ur("[Experiment] single_environment",e)}function uu(){return!1}function uc(e){ur("Column level lineage",e)}function ud(e){ur("share_state",e)}function uh(e){ur("state_action",e)}function uf(e){ur("[Click] copy_to_clipboard",e)}e.s(["getExperimentTrackingBreakingChangeEnabled",()=>uu,"trackColumnLevelLineage",()=>uc,"trackCopyToClipboard",()=>uf,"trackHistoryAction",()=>uo,"trackInit",()=>un,"trackMultiNodesAction",()=>ui,"trackPreviewChange",()=>ua,"trackPreviewChangeFeedback",()=>us,"trackShareState",()=>ud,"trackSingleEnvironment",()=>ul,"trackStateAction",()=>uh],3158)},84663,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},60887,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(44066)._(e.r(84663)),a=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${i}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},28511,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(64789);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=o(e,n)),t&&(i.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},56093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return b},PageNotFoundError:function(){return y},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return h},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return _}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&h(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let g="undefined"!=typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class b extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function _(e){return JSON.stringify({message:e.message,stack:e.stack})}},90804,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(56093),i=e.r(65866);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},95917,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},86211,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return v},useLinkStatus:function(){return y}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(44066),a=e.r(15839),s=o._(e.r(64789)),l=e.r(60887),u=e.r(6436),c=e.r(28511),d=e.r(56093),h=e.r(44620);e.r(91272);let f=e.r(50314),p=e.r(90804),g=e.r(97625);function m(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function v(t){var r;let n,i,o,[l,v]=(0,s.useOptimistic)(f.IDLE_LINK_STATUS),y=(0,s.useRef)(null),{href:x,as:w,children:_,prefetch:C=null,passHref:k,replace:S,shallow:E,scroll:O,onClick:I,onMouseEnter:P,onTouchStart:T,legacyBehavior:R=!1,onNavigate:A,ref:M,unstable_dynamicOnHover:N,...D}=t;n=_,R&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let L=s.default.useContext(u.AppRouterContext),V=!1!==C,F=!1!==C?null===(r=C)||"auto"===r?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,{href:j,as:z}=s.default.useMemo(()=>{let e=m(x);return{href:e,as:w?m(w):e}},[x,w]);if(R){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(n)}let B=R?i&&"object"==typeof i&&i.ref:M,H=s.default.useCallback(e=>(null!==L&&(y.current=(0,f.mountLinkInstance)(e,j,L,F,V,v)),()=>{y.current&&((0,f.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,f.unmountPrefetchableInstance)(e)}),[V,j,L,F,v]),W={ref:(0,c.useMergedRef)(H,B),onClick(t){R||"function"!=typeof I||I(t),R&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!L||t.defaultPrevented||function(t,r,n,i,o,a,l){if("undefined"!=typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(46447);s.default.startTransition(()=>{d(n||r,o?"replace":"push",a??!0,i.current)})}}(t,j,z,y,S,O,A)},onMouseEnter(e){R||"function"!=typeof P||P(e),R&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),L&&V&&(0,f.onNavigationIntent)(e.currentTarget,!0===N)},onTouchStart:function(e){R||"function"!=typeof T||T(e),R&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),L&&V&&(0,f.onNavigationIntent)(e.currentTarget,!0===N)}};return(0,d.isAbsoluteUrl)(z)?W.href=z:R&&!k&&("a"!==i.type||"href"in i.props)||(W.href=(0,h.addBasePath)(z)),o=R?s.default.cloneElement(i,W):(0,a.jsx)("a",{...D,...W,children:n}),(0,a.jsx)(b.Provider,{value:l,children:o})}e.r(95917);let b=(0,s.createContext)(f.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},61566,73788,86568,9624,30520,12007,80806,40006,41967,5009,e=>{"use strict";var t=e.i(5443),r=e.i(62754),n=e.i(3158);async function i(e,r,i){let o=i?.trackProps?{...i.trackProps}:{};return(0,n.getExperimentTrackingBreakingChangeEnabled)()&&(o.breaking_change_analysis=!0),(await t.axiosClient.post("/api/runs",{type:e,params:r,nowait:i?.nowait,track_props:o})).data}async function o(e,n){var i;return null==(i=(await t.axiosClient.get(`/api/runs/${e}/wait`,{params:{timeout:n}})).data).result||(0,r.isQueryRun)(i)&&(i.result.columns=i.result.columns.map(e=>(e.key||(e.key=e.name),e))),i}async function a(e){return await t.axiosClient.post(`/api/runs/${e}/cancel`)}async function s(e,r){return(await t.axiosClient.post(`/api/checks/${e}/run`,{nowait:r?.nowait})).data}async function l(e,r,n){return(await t.axiosClient.post("/api/runs/search",{type:e,params:r,limit:n})).data}async function u(){return(await t.axiosClient.get("/api/runs")).data}async function c(){return(await t.axiosClient.post("/api/runs/aggregate",{})).data}async function d(){return(await t.axiosClient.get("/api/flag")).data}async function h(){try{await t.axiosClient.post("/api/relaunch-hint/completed")}catch(e){}}e.s(["aggregateRuns",()=>c,"cancelRun",()=>a,"listRuns",()=>u,"searchRuns",()=>l,"submitRun",()=>i,"submitRunFromCheck",()=>s,"waitRun",()=>o],61566),e.s(["getServerFlag",()=>d,"markRelaunchHintCompleted",()=>h],73788);var f=e.i(87391),p=e.i(7101);e.s(["useRecceServerFlag",0,()=>(0,f.useQuery)({queryKey:p.cacheKeys.flag(),queryFn:d})],86568);var g=e.i(15839),m=e.i(64789);async function v(){return(await t.axiosClient.get("/api/instance-info")).data}e.s(["getRecceInstanceInfo",()=>v],9624);let b=()=>(0,f.useQuery)({queryKey:p.cacheKeys.instanceInfo(),queryFn:v});e.s(["useRecceInstanceInfo",0,b],30520);let y={mode:null,disableSaveToFile:!1,disableExportStateFile:!1,disableImportStateFile:!1,disableUpdateChecklist:!1,disableDatabaseQuery:!1,disableViewActionDropdown:!1,disableNodeActionDropdown:!1,disableShare:!1},x=(0,m.createContext)({singleEnv:!1,authed:!1,lifetimeExpiredAt:void 0,featureToggles:y,shareUrl:void 0});function w({children:e}){let{data:t,isLoading:r}=b(),[n,i]=(0,m.useState)(y),[o,a]=(0,m.useState)(!1),[s,l]=(0,m.useState)(!1),[u,c]=(0,m.useState)(),[d,h]=(0,m.useState)(),[f,p]=(0,m.useState)(t);if(!r&&t&&t!==f){p(t),a(t.single_env),l(t.authed),h(t.share_url),t.lifetime_expired_at&&(c(new Date(t.lifetime_expired_at)),console.log("lifetime expired at",t.lifetime_expired_at));let e={...y};"read-only"===t.server_mode?(e.mode="read only",e.disableSaveToFile=!0,e.disableExportStateFile=!0,e.disableImportStateFile=!0,e.disableUpdateChecklist=!0,e.disableDatabaseQuery=!0,e.disableViewActionDropdown=!0,e.disableNodeActionDropdown=!0,e.disableShare=!0):"preview"===t.server_mode&&(e.mode="metadata only",e.disableSaveToFile=!0,e.disableExportStateFile=!0,e.disableImportStateFile=!0,e.disableUpdateChecklist=!1,e.disableDatabaseQuery=!0,e.disableViewActionDropdown=!1,e.disableNodeActionDropdown=!1,e.disableShare=!0),t.single_env&&(e.disableUpdateChecklist=!0,e.disableShare=!0),t.cloud_instance&&(e.disableShare=!0),i(e)}return(0,g.jsx)(x.Provider,{value:{featureToggles:n,singleEnv:o,authed:s,lifetimeExpiredAt:u,shareUrl:d},children:e})}e.s(["RecceInstanceInfoProvider",()=>w,"useRecceInstanceContext",0,()=>(0,m.useContext)(x)],12007);let _="https://cal.com/team/recce/chat";e.s(["RECCE_SUPPORT_CALENDAR_URL",0,_],80806);var C=e.i(59760),k=e.i(29801),S=e.i(59889),E=e.i(23331),O=e.i(86211);function I({connect:e}){return(0,g.jsxs)(S.Dialog.Content,{children:[(0,g.jsx)(S.Dialog.Header,{children:(0,g.jsx)(S.Dialog.Title,{children:"Server Disconnected"})}),(0,g.jsx)(S.Dialog.Body,{children:(0,g.jsx)(E.Text,{children:"The server connection has been lost. Please restart the Recce server and try again."})}),(0,g.jsx)(S.Dialog.Footer,{children:(0,g.jsx)(C.Button,{colorPalette:"iochmara",onClick:()=>{e()},children:"Retry"})}),(0,g.jsx)(S.Dialog.CloseTrigger,{asChild:!0,children:(0,g.jsx)(k.CloseButton,{size:"sm"})})]})}function P({shareUrl:e,mode:t}){let r={"read only":{title:"Share Instance Expired",body:"This Share Instance has expired. Please restart the share instance.",action:"Restart",link:e},"metadata only":{title:"Preview Instance Expired",body:"This Preview Instance has expired. To browse more, please book a meeting with us.",action:"Contact us",link:_}}[t];return(0,g.jsxs)(S.Dialog.Content,{children:[(0,g.jsx)(S.Dialog.Header,{children:(0,g.jsx)(S.Dialog.Title,{children:r.title})}),(0,g.jsx)(S.Dialog.Body,{children:(0,g.jsx)(E.Text,{children:r.body})}),(0,g.jsx)(S.Dialog.Footer,{children:"read only"===t?(0,g.jsx)(O.default,{href:r.link,passHref:!0,children:(0,g.jsx)(C.Button,{colorPalette:"blue",children:r.action})}):(0,g.jsx)(C.Button,{colorPalette:"blue",onClick:()=>window.open(r.link,"_blank"),children:r.action})})]})}e.s(["RecceInstanceDisconnectedModalContent",()=>P,"ServerDisconnectedModalContent",()=>I],40006);var T=e.i(61697),R=e.i(52713),A=e.i(92109),M=e.i(94548),N=e.i(56842),D=e.i(58287),L=(0,M.createAnatomy)("toast").parts("group","root","title","description","actionTrigger","closeTrigger").build(),V=(e,t)=>e.getById(`toast-group:${t}`),F=e=>`toast:${e.id}`,j=e=>e.getById(F(e)),z=e=>`toast:${e.id}:title`,B=e=>`toast:${e.id}:description`,H={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function W(e,t){return e??H[t]??H.DEFAULT}var{guards:U,createMachine:$}=(0,R.setup)(),{and:q}=U,G=$({props:({props:e})=>({dir:"ltr",id:(0,D.uuid)(),...e,store:e.store}),initialState:({prop:e})=>e("store").attrs.overlap?"overlap":"stack",refs:()=>({lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:A.AnimationFrame.create(),dismissableCleanup:void 0}),context:({bindable:e})=>({toasts:e(()=>({defaultValue:[],sync:!0,hash:e=>e.map(e=>e.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}),computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:r}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{r(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:q("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore:({context:e,prop:t})=>t("store").subscribe(t=>{t.dismiss?e.set("toasts",e=>e.filter(e=>e.id!==t.id)):e.set("toasts",e=>{let r=e.findIndex(e=>e.id===t.id);return -1!==r?[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]:[t,...e]})}),trackHotKeyPress:({prop:e,send:t})=>(0,A.addDomEvent)(document,"keydown",r=>{let{hotkey:n}=e("store").attrs;n.every(e=>r[e]||r.code===e)&&t({type:"DOC.HOTKEY"})},{capture:!0}),trackDocumentVisibility({prop:e,send:t,scope:r}){let{pauseOnPageIdle:n}=e("store").attrs;if(!n)return;let i=r.getDoc();return(0,A.addDomEvent)(i,"visibilitychange",()=>{t({type:"hidden"===i.visibilityState?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:r,scope:n}){let i=t.get("toasts"),o=r("placement"),a=i.length>0;if(!a)return void e.get("dismissableCleanup")?.();if(a&&e.get("dismissableCleanup"))return;let s=(0,N.trackDismissableBranch)(()=>V(n,o),{defer:!0});e.set("dismissableCleanup",s)},clearDismissableBranch({refs:e}){e.get("dismissableCleanup")?.()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{V(e,t("placement"))?.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set("heights",t=>t.filter(t=>t.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){!e.get("isFocusWithin")&&t.target&&(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){!e.get("lastFocusedEl")||e.get("isPointerWithin")||(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){e.get("lastFocusedEl")&&(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});function K(e,t){let{state:r,send:n,prop:i,scope:o,context:a,computed:s}=e,l=r.hasTag("visible"),u=r.hasTag("paused"),c=a.get("mounted"),d=s("frontmost"),h=i("parent").computed("placement"),f=i("type"),p=i("stacked"),g=i("title"),m=i("description"),v=i("action"),[b,y="center"]=h.split("-");return{type:f,title:g,description:m,placement:h,visible:l,paused:u,closable:!!i("closable"),pause(){n({type:"PAUSE"})},resume(){n({type:"RESUME"})},dismiss(){n({type:"DISMISS",src:"programmatic"})},getRootProps:()=>t.element({...L.root.attrs,dir:i("dir"),id:F(o),"data-state":l?"open":"closed","data-type":f,"data-placement":h,"data-align":y,"data-side":b,"data-mounted":(0,A.dataAttr)(c),"data-paused":(0,A.dataAttr)(u),"data-first":(0,A.dataAttr)(d),"data-sibling":(0,A.dataAttr)(!d),"data-stack":(0,A.dataAttr)(p),"data-overlap":(0,A.dataAttr)(!p),role:"status","aria-atomic":"true","aria-describedby":m?B(o):void 0,"aria-labelledby":g?z(o):void 0,tabIndex:0,style:function(e,t){let{prop:r,context:n,computed:i}=e,o=r("parent"),a=o.computed("placement"),{gap:s}=o.prop("store").attrs,[l]=a.split("-"),u=n.get("mounted"),c=n.get("remainingTime"),d=i("height"),h=i("frontmost"),f=!h,p=!r("stacked"),g=r("stacked"),m="loading"===r("type")?Number.MAX_SAFE_INTEGER:c,v=i("heightIndex")*s+i("heightBefore"),b={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${r("removeDelay")}ms`,"--duration":`${m}ms`,"--initial-height":`${d}px`,"--offset":`${v}px`,"--index":r("index"),"--z-index":i("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"};return"top"===l?Object.assign(b,{top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):"bottom"===l&&Object.assign(b,{bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),u&&(Object.assign(b,{"--y":"0","--opacity":"1"}),g&&Object.assign(b,{"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||Object.assign(b,{"--opacity":"0",pointerEvents:"none"}),f&&p&&(Object.assign(b,{"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||Object.assign(b,{"--y":"calc(var(--sign) * 40%)"})),f&&g&&!t&&Object.assign(b,{"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),h&&!t&&Object.assign(b,{"--y":"calc(var(--lift) * -100%)"}),b}(e,l),onKeyDown(e){e.defaultPrevented||"Escape"==e.key&&(n({type:"DISMISS",src:"keyboard"}),e.preventDefault())}}),getGhostBeforeProps:()=>t.element({"data-ghost":"before",style:function(e,t){let{computed:r}=e,n={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"};return r("frontmost")&&!t&&Object.assign(n,{height:"calc(var(--initial-height) + 80%)"}),n}(e,l)}),getGhostAfterProps:()=>t.element({"data-ghost":"after",style:{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}),getTitleProps:()=>t.element({...L.title.attrs,id:z(o)}),getDescriptionProps:()=>t.element({...L.description.attrs,id:B(o)}),getActionTriggerProps:()=>t.button({...L.actionTrigger.attrs,type:"button",onClick(e){e.defaultPrevented||(v?.onClick?.(),n({type:"DISMISS",src:"user"}))}}),getCloseTriggerProps:()=>t.button({id:`toast${o.id}:close`,...L.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(e){e.defaultPrevented||n({type:"DISMISS",src:"user"})}})}}var{not:Y}=(0,R.createGuards)(),X=(0,R.createMachine)({props:({props:e})=>((0,D.ensureProps)(e,["id","type","parent","removeDelay"],"toast"),{closable:!0,...e,duration:W(e.duration,e.type)}),initialState:({prop:e})=>"loading"===e("type")||e("duration")===1/0?"visible:persist":"visible",context:({prop:e,bindable:t})=>({remainingTime:t(()=>({defaultValue:W(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}),refs:()=>({closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}),computed:{zIndex:({prop:e})=>{let t=e("parent").context.get("toasts"),r=t.findIndex(t=>t.id===e("id"));return t.length-r},height:({prop:e})=>{let t=e("parent").context.get("heights").find(t=>t.id===e("id"));return t?.height??0},heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(t=>t.id===e("id")),frontmost:({prop:e})=>0===e("index"),heightBefore:({prop:e})=>{let t=e("parent").context.get("heights"),r=t.findIndex(t=>t.id===e("id"));return t.reduce((e,t,n)=>n>=r?e:e+t.height,0)},shouldPersist:({prop:e})=>"loading"===e("type")||e("duration")===1/0},watch({track:e,prop:t,send:r}){e([()=>t("message")],()=>{let e=t("message");e&&r({type:e,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{r({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:Y("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay:({prop:e,send:t})=>(0,D.setRafTimeout)(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay")),waitForDuration({send:e,context:t,computed:r}){if(!r("shouldPersist"))return(0,D.setRafTimeout)(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick:({send:e})=>(0,D.setRafTimeout)(()=>{e({type:"SHOW",src:"timer"})},0),trackHeight({scope:e,prop:t}){let r;return(0,A.raf)(()=>{let n=j(e);if(!n)return;let i=new(e.getWin()).MutationObserver(()=>{let e=n.style.height;n.style.height="auto";let r=n.getBoundingClientRect().height;n.style.height=e;let i={id:t("id"),height:r};Q(t("parent"),i)});i.observe(n,{childList:!0,subtree:!0,characterData:!0}),r=()=>i.disconnect()}),()=>r?.()}},guards:{isLoadingType:({prop:e})=>"loading"===e("type"),shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){(0,A.raf)(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:r}){queueMicrotask(()=>{let n=j(e);if(!n)return;let i=n.style.height;n.style.height="auto";let o=n.getBoundingClientRect().height;n.style.height=i,r.set("initialHeight",o);let a={id:t("id"),height:o};Q(t("parent"),a)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:r}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",W(r("duration"),r("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",e=>{let r=t.get("closeTimerStartTime"),n=Date.now()-r;return t.set("lastCloseStartTimerStartTime",Date.now()),e-n})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){e("onStatusChange")?.({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){e("onStatusChange")?.({status:"unmounted"})},invokeOnVisible({prop:e}){e("onStatusChange")?.({status:"visible"})}}}});function Q(e,t){let{id:r,height:n}=t;e.context.set("heights",e=>e.find(e=>e.id===r)?e.map(e=>e.id===r?{...e,height:n}:e):[{id:r,height:n},...e])}function Z(e={}){let t={placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0,...(0,D.compact)(e)},r=[],n=[],i=new Set,o=[],a=e=>(r.forEach(t=>t(e)),e),s=e=>{let r=e.id??`toast:${(0,D.uuid)()}`,s=n.find(e=>e.id===r);if(i.has(r)&&i.delete(r),s)n=n.map(t=>t.id===r?a({...t,...e,id:r}):t);else{var l;l={id:r,duration:t.duration,removeDelay:t.removeDelay,type:"info",...e,stacked:!t.overlap,gap:t.gap},n.length>=t.max?o.push(l):(a(l),n.unshift(l))}return r},l=e=>{if(i.add(e),e)for(r.forEach(t=>t({id:e,dismiss:!0})),n=n.filter(t=>t.id!==e);o.length>0&&n.length<t.max;){let e=o.shift();e&&(a(e),n.unshift(e))}else n.forEach(e=>{r.forEach(t=>t({id:e.id,dismiss:!0}))}),n=[],o=[];return e};return{attrs:t,subscribe:e=>(r.push(e),()=>{let t=r.indexOf(e);r.splice(t,1)}),create:s,update:(e,t)=>s({id:e,...t}),remove:l,dismiss:e=>{n=null!=e?n.map(t=>t.id===e?a({...t,message:"DISMISS"}):t):n.map(e=>a({...e,message:"DISMISS"}))},error:e=>s({...e,type:"error"}),success:e=>s({...e,type:"success"}),info:e=>s({...e,type:"info"}),warning:e=>s({...e,type:"warning"}),loading:e=>s({...e,type:"loading"}),getVisibleToasts:()=>n.filter(e=>!i.has(e.id)),getCount:()=>n.length,promise:(e,t,r={})=>{let n;if(!t||!t.loading)return void(0,D.warn)("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");let i=s({...r,...t.loading,promise:e,type:"loading"}),o=!0,a=(0,D.runIfFn)(e).then(async e=>{if(n=["resolve",e],J(e)&&!e.ok){o=!1;let n=(0,D.runIfFn)(t.error,`HTTP Error! status: ${e.status}`);s({...r,...n,id:i,type:"error"})}else if(void 0!==t.success){o=!1;let n=(0,D.runIfFn)(t.success,e);s({...r,...n,id:i,type:"success"})}}).catch(async e=>{if(n=["reject",e],void 0!==t.error){o=!1;let n=(0,D.runIfFn)(t.error,e);s({...r,...n,id:i,type:"error"})}}).finally(()=>{o&&l(i),t.finally?.()});return{id:i,unwrap:()=>new Promise((e,t)=>a.then(()=>"reject"===n[0]?t(n[1]):e(n[1])).catch(t))}},pause:e=>{n=null!=e?n.map(t=>t.id===e?a({...t,message:"PAUSE"}):t):n.map(e=>a({...e,message:"PAUSE"}))},resume:e=>{n=null!=e?n.map(t=>t.id===e?a({...t,message:"RESUME"}):t):n.map(e=>a({...e,message:"RESUME"}))},isVisible:e=>!i.has(e)&&!!n.find(t=>t.id===e),isDismissed:e=>i.has(e),expand:()=>{n=n.map(e=>a({...e,stacked:!0}))},collapse:()=>{n=n.map(e=>a({...e,stacked:!1}))}}}var J=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,ee={connect:function(e,t){let{context:r,prop:n,send:i,refs:o,computed:a}=e;return{getCount:()=>r.get("toasts").length,getToasts:()=>r.get("toasts"),getGroupProps(r={}){let{label:s="Notifications"}=r,{hotkey:l}=n("store").attrs,u=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=a("placement"),[d,h="center"]=c.split("-");return t.element({...L.group.attrs,dir:n("dir"),tabIndex:-1,"aria-label":`${c} ${s} ${u}`,id:`toast-group:${c}`,"data-placement":c,"data-side":d,"data-align":h,"aria-live":"polite",role:"region",style:function(e,t){let{prop:r,computed:n,context:i}=e,{offsets:o,gap:a}=r("store").attrs,s=i.get("heights"),l="string"==typeof o?{left:o,right:o,bottom:o,top:o}:o,u="rtl"===r("dir"),c=t.replace("-start",u?"-right":"-left").replace("-end",u?"-left":"-right"),d=c.includes("right"),h=c.includes("left"),f={position:"fixed",pointerEvents:n("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${a}px`,"--first-height":`${s[0]?.height||0}px`,zIndex:A.MAX_Z_INDEX},p="center";if(d&&(p="flex-end"),h&&(p="flex-start"),f.alignItems=p,c.includes("top")){let e=l.top;f.top=`max(env(safe-area-inset-top, 0px), ${e})`}if(c.includes("bottom")){let e=l.bottom;f.bottom=`max(env(safe-area-inset-bottom, 0px), ${e})`}if(!c.includes("left")){let e=l.right;f.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${e})`}if(!c.includes("right")){let e=l.left;f.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${e})`}return f}(e,c),onMouseEnter(){o.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:c})},onMouseMove(){o.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_ENTER",placement:c})},onMouseLeave(){o.get("ignoreMouseTimer").isActive()||i({type:"REGION.POINTER_LEAVE",placement:c})},onFocus(e){i({type:"REGION.FOCUS",target:e.relatedTarget})},onBlur(e){o.get("isFocusWithin")&&!(0,A.contains)(e.currentTarget,e.relatedTarget)&&queueMicrotask(()=>i({type:"REGION.BLUR"}))}})},subscribe:e=>n("store").subscribe(()=>e(r.get("toasts")))}},machine:G};e.s(["connect",()=>K,"createStore",()=>Z,"group",()=>ee,"machine",()=>X],41967);var et=e.i(21173),er=e.i(64614),en=e.i(63761);let[ei,eo]=(0,e.i(39414).createContext)({name:"ToastContext",hookName:"useToastContext",providerName:"<ToastProvider />"}),ea=(0,m.forwardRef)((e,t)=>{let{toaster:r,children:n,...i}=e,o=(0,er.useLocaleContext)(),a=(0,et.useEnvironmentContext)(),s=(0,T.useMachine)(ee.machine,{store:r,id:(0,m.useId)(),dir:o?.dir,getRootNode:a?.getRootNode}),l=ee.connect(s,T.normalizeProps),u=(0,R.mergeProps)(l.getGroupProps(),i);return(0,g.jsx)(en.ark.div,{...u,ref:t,children:l.getToasts().map((e,t)=>(0,g.jsx)(es,{value:e,parent:s,index:t,children:e=>n(e)},e.id))})});ea.displayName="Toaster";let es=e=>{let t=(0,et.useEnvironmentContext)(),r={...e.value,parent:e.parent,index:e.index,getRootNode:t.getRootNode},n=K((0,T.useMachine)(X,{...r}),T.normalizeProps);return(0,g.jsx)(ei,{value:n,children:e.children(e.value)})};es.displayName="ToastActor",e.s([],43133),e.i(43133);let el=(0,m.forwardRef)((e,t)=>{let r=eo(),n=(0,R.mergeProps)(r.getActionTriggerProps(),e);return(0,g.jsx)(en.ark.button,{...n,ref:t})});el.displayName="ToastActionTrigger";let eu=(0,m.forwardRef)((e,t)=>{let r=eo(),n=(0,R.mergeProps)(r.getCloseTriggerProps(),e);return(0,g.jsx)(en.ark.button,{...n,ref:t})});eu.displayName="ToastCloseTrigger";let ec=e=>e.children(eo()),ed=(0,m.forwardRef)((e,t)=>{let r=eo(),n=(0,R.mergeProps)(r.getDescriptionProps(),e);return(0,g.jsx)(en.ark.div,{...n,ref:t})});ed.displayName="ToastDescription";let eh=(0,m.forwardRef)((e,t)=>{let r=eo(),n=(0,R.mergeProps)(r.getRootProps(),e);return(0,g.jsxs)("div",{...n,ref:t,children:[(0,g.jsx)("div",{...r.getGhostBeforeProps()}),e.children,(0,g.jsx)("div",{...r.getGhostAfterProps()})]})});eh.displayName="ToastRoot";let ef=(0,m.forwardRef)((e,t)=>{let r=eo(),n=(0,R.mergeProps)(r.getTitleProps(),e);return(0,g.jsx)(en.ark.div,{...n,ref:t})});ef.displayName="ToastTitle",e.s(["ActionTrigger",()=>el,"CloseTrigger",()=>eu,"Context",()=>ec,"Description",()=>ed,"Root",()=>eh,"Title",()=>ef],23684);var ep=e.i(23684),ep=ep,eg=e.i(19284),em=e.i(45362),ev=e.i(5376);let{withProvider:eb,withContext:ey,useStyles:ex}=(0,em.createSlotRecipeContext)({key:"toast"}),ew=(0,ev.chakra)(ea,{},{forwardAsChild:!0}),e_=eb(ep.Root,"root",{forwardAsChild:!0}),eC=ey(ep.CloseTrigger,"closeTrigger",{forwardAsChild:!0,defaultProps:{children:(0,g.jsx)(eg.CloseIcon,{})}}),ek=ey(ep.Title,"title",{forwardAsChild:!0}),eS=ey(ep.Description,"description",{forwardAsChild:!0}),eE=ey(ep.ActionTrigger,"actionTrigger",{forwardAsChild:!0}),eO={warning:eg.WarningIcon,success:eg.CheckCircleIcon,error:eg.WarningIcon},eI=(0,m.forwardRef)(function(e,t){let{unstyled:r,...n}=e,i=eo(),o=ex(),a=eO[i.type];return a?(0,g.jsx)(a,{ref:t,...n,css:[r?void 0:o.indicator,e.css]}):null});e.s(["ToastActionTrigger",()=>eE,"ToastCloseTrigger",()=>eC,"ToastDescription",()=>eS,"ToastIndicator",()=>eI,"ToastRoot",()=>e_,"ToastTitle",()=>ek,"Toaster",()=>ew],5009)},52051,70332,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(6210);let i=e=>null!=e;function o(e,t,r={}){let{stop:a,getKey:s}=r;return function e(r,o=[]){if((0,n.isObject)(r)||Array.isArray(r)){let n={};for(let[l,u]of Object.entries(r)){let c=s?.(l,u)??l,d=[...o,c];if(a?.(r,d))return t(r,o);let h=e(u,d);i(h)&&(n[c]=h)}return n}return t(r,o)}(e)}function a(e,t){return Array.isArray(e)?e.map(e=>i(e)?t(e):e):(0,n.isObject)(e)?o(e,e=>t(e)):i(e)?t(e):e}e.s(["mapObject",()=>a,"walkObject",()=>o],70332);var s=e.i(5376),l=e.i(41344);let u=(0,r.forwardRef)(function(e,n){let{direction:i="column",align:o,justify:u,gap:c="0.5rem",wrap:d,children:h,separator:f,className:p,...g}=e,m=(0,r.useMemo)(()=>(function(e){let{gap:t,direction:r}=e,n={column:{marginY:t,marginX:0,borderInlineStartWidth:0,borderTopWidth:"1px"},"column-reverse":{marginY:t,marginX:0,borderInlineStartWidth:0,borderTopWidth:"1px"},row:{marginX:t,marginY:0,borderInlineStartWidth:"1px",borderTopWidth:0},"row-reverse":{marginX:t,marginY:0,borderInlineStartWidth:"1px",borderTopWidth:0}};return{"&":a(r,e=>n[e])}})({gap:c,direction:i}),[c,i]),v=(0,r.useMemo)(()=>(0,r.isValidElement)(f)?r.Children.toArray(h).filter(e=>(0,r.isValidElement)(e)).map((e,n,i)=>{let o=void 0!==e.key?e.key:n,a=(0,r.cloneElement)(f,{css:[m,f.props.css]});return(0,t.jsxs)(r.Fragment,{children:[e,n===i.length-1?null:a]},o)}):h,[h,f,m]);return(0,t.jsx)(s.chakra.div,{ref:n,display:"flex",alignItems:o,justifyContent:u,flexDirection:i,flexWrap:d,gap:f?void 0:c,className:(0,l.cx)("chakra-stack",p),...g,children:v})});u.displayName="Stack",e.s(["Stack",()=>u],52051)},16955,77855,e=>{"use strict";let t;var r=e.i(15839),n=e.i(23043),i=e.i(87391),o=e.i(941),a=e.i(64789),s=e.i(7101),l=e.i(20856),u=e.i(59760),c=e.i(29801),d=e.i(59889),h=e.i(70839),f=e.i(23331),p=e.i(39196),g=e.i(30023),m=e.i(17359),v=e.i(61566),b=e.i(73788),y=e.i(86568),x=e.i(12007),w=e.i(3158),_=e.i(40006),C=e.i(5009),k=e.i(36099),S=e.i(52051);e.s([],97489),e.i(97489),e.s(["ActionTrigger",()=>C.ToastActionTrigger,"CloseTrigger",()=>C.ToastCloseTrigger,"Description",()=>C.ToastDescription,"Indicator",()=>C.ToastIndicator,"Root",()=>C.ToastRoot,"Title",()=>C.ToastTitle],33388);var E=e.i(33388),E=E;let O=(t={placement:"bottom-end",pauseOnPageIdle:!0},e.i(41967).createStore(t));e.s(["Toaster",0,()=>(0,r.jsx)(h.Portal,{children:(0,r.jsx)(C.Toaster,{toaster:O,insetInline:{mdDown:"4"},children:e=>(0,r.jsxs)(E.Root,{width:{md:"sm"},children:["loading"===e.type?(0,r.jsx)(k.Spinner,{size:"sm",color:"blue.solid"}):(0,r.jsx)(E.Indicator,{}),(0,r.jsxs)(S.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[e.title&&(0,r.jsx)(E.Title,{children:e.title}),e.description&&(0,r.jsx)(E.Description,{children:e.description})]}),e.action&&(0,r.jsx)(E.ActionTrigger,{children:e.action.label}),e.closable&&(0,r.jsx)(E.CloseTrigger,{})]})})}),"toaster",0,O],77855);let I=(0,a.createContext)({isActionAvailable:()=>!0,isDemoSite:!1});function P({children:e}){let t=(0,i.useQuery)({queryKey:s.cacheKeys.lineage(),queryFn:l.getServerInfo}),C=(0,i.useQuery)({queryKey:s.cacheKeys.runsAggregated(),queryFn:v.aggregateRuns}),k=(0,a.useMemo)(()=>{let e=t.data?.lineage;if(e?.base)return(0,n.buildLineageGraph)(e.base,e.current,e.diff)},[t.data]),S=t.error?.message,{state_metadata:E,lineage:P,sqlmesh:T,demo:R,codespace:A,review_mode:M,cloud_mode:N,file_mode:D,filename:L,adapter_type:V,git:F,pull_request:j,support_tasks:z}=t.data??{demo:!1},B=P?.base.manifest_metadata,H=P?.current.manifest_metadata,{connectionStatus:W,connect:U,envStatus:$}=function(){let[e,t]=(0,a.useState)(void 0),r=(0,a.useRef)({ws:void 0,status:"pending",artifactsUpdatedToastId:void 0}),[n,i]=(0,a.useState)("pending"),[l,u]=(0,a.useState)(void 0);(0,a.useEffect)(()=>{r.current.status=n},[n]),(0,a.useEffect)(()=>{r.current.artifactsUpdatedToastId=e},[e]);let c=(0,o.useQueryClient)(),d=(0,a.useCallback)(()=>{c.invalidateQueries({queryKey:s.cacheKeys.lineage()}),c.invalidateQueries({queryKey:s.cacheKeys.checks()}),c.invalidateQueries({queryKey:s.cacheKeys.runs()})},[c]),h=(0,a.useCallback)(()=>{let e=new WebSocket(`${g.PUBLIC_API_URL.replace(/(http)(s)?:\/\//,"ws$2://")}/api/ws`);r.current.ws=e,e.onopen=()=>{e.send("ping")},e.onmessage=e=>{if("pong"===e.data){"disconnected"===r.current.status&&d(),i("connected");return}try{let n=JSON.parse(e.data);if("refresh"===n.command){let{eventType:e,srcPath:i}=n.event,[o,a]=i.split("/").slice(-2),s=m.default.parse(a).name,l=`${o}-${s}-${e}`;null==r.current.artifactsUpdatedToastId&&t(O.create({id:l,description:`Detected ${o} ${s} ${e}`,type:"info",duration:5e3,closable:!0})),d()}else if("relaunch"===n.command)u("relaunch");else{let{id:e,title:r,description:i,status:o,duration:a}=n.event;t(O.create({id:e||"broadcast",title:r,description:i,type:o??"info",duration:a??5e3,closable:!0}))}}catch(e){console.error(e)}},e.onerror=e=>{console.error("An error occurred during Handling WebSockets",e)},e.onclose=()=>{i(e=>"connected"===e?"disconnected":e),r.current.ws=void 0}},[d]);return(0,a.useEffect)(()=>{let e=r.current;return h(),()=>{e.ws&&e.ws.close()}},[h]),{connectionStatus:n,connect:h,envStatus:l}}(),{data:q,isLoading:G}=(0,y.useRecceServerFlag)(),{featureToggles:K,shareUrl:Y}=(0,x.useRecceInstanceContext)(),{onClose:X}=(0,p.useDisclosure)(),[Q,Z]=(0,a.useState)(!1),[J,ee]=(0,a.useState)(!1),et=(0,o.useQueryClient)(),er=(0,a.useCallback)(e=>!z||(z[e]??!0),[z]),en=!G&&"relaunch"===$&&q?.single_env_onboarding===!0&&q.show_relaunch_hint;return en!==J&&(ee(en),Z(en)),(0,a.useEffect)(()=>{en&&Q&&(0,w.trackSingleEnvironment)({action:"target_base_added"})},[en,Q]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I.Provider,{value:{lineageGraph:k,retchLineageGraph:()=>{C.refetch()},envInfo:{stateMetadata:E,adapterType:V,git:F,pullRequest:j,dbt:{base:B,current:H},sqlmesh:T},reviewMode:M,cloudMode:N,fileMode:D,fileName:L,isDemoSite:R,isCodespace:A,error:S,supportTasks:z,isActionAvailable:er,isLoading:t.isLoading,runsAggregated:C.data,refetchRunsAggregated:()=>{C.refetch()}},children:e}),(0,r.jsx)(d.Dialog.Root,{open:"disconnected"===W,onOpenChange:()=>{},placement:"center",children:(0,r.jsxs)(h.Portal,{children:[(0,r.jsx)(d.Dialog.Backdrop,{}),(0,r.jsx)(d.Dialog.Positioner,{children:Y&&null!==K.mode?(0,r.jsx)(_.RecceInstanceDisconnectedModalContent,{shareUrl:Y,mode:K.mode}):(0,r.jsx)(_.ServerDisconnectedModalContent,{connect:U})})]})}),q?.single_env_onboarding&&(0,r.jsx)(d.Dialog.Root,{open:Q,onOpenChange:()=>{X(),(0,b.markRelaunchHintCompleted)(),et.invalidateQueries({queryKey:s.cacheKeys.flag()})},placement:"center",children:(0,r.jsxs)(h.Portal,{children:[(0,r.jsx)(d.Dialog.Backdrop,{}),(0,r.jsx)(d.Dialog.Positioner,{children:(0,r.jsxs)(d.Dialog.Content,{children:[(0,r.jsx)(d.Dialog.Header,{children:(0,r.jsx)(d.Dialog.Title,{children:"Target-base Added"})}),(0,r.jsx)(d.Dialog.Body,{children:(0,r.jsx)(f.Text,{children:"Please restart the Recce server."})}),(0,r.jsx)(d.Dialog.Footer,{children:(0,r.jsx)(u.Button,{colorPalette:"blue",onClick:()=>{X(),(0,b.markRelaunchHintCompleted)(),et.invalidateQueries({queryKey:s.cacheKeys.flag()})},children:"Got it!"})}),(0,r.jsx)(d.Dialog.CloseTrigger,{asChild:!0,children:(0,r.jsx)(c.CloseButton,{size:"sm"})})]})})]})})]})}let T=()=>(0,a.useContext)(I);e.s(["LineageGraphContextProvider",()=>P,"useLineageGraphContext",0,T,"useRunsAggregated",0,()=>{let{runsAggregated:e,refetchRunsAggregated:t}=T();return[e,t]}],16955)},18128,42436,e=>{"use strict";var t=e.i(5376);let r=(0,t.chakra)("div");r.displayName="Box",e.s(["Box",()=>r],18128);var n=e.i(15839);let i=(0,e.i(64789).forwardRef)(function(e,r){let{direction:i,align:o,justify:a,wrap:s,basis:l,grow:u,shrink:c,inline:d,...h}=e;return(0,n.jsx)(t.chakra.div,{ref:r,...h,css:{display:d?"inline-flex":"flex",flexDirection:i,alignItems:o,justifyContent:a,flexWrap:s,flexBasis:l,flexGrow:u,flexShrink:c,...e.css}})});i.displayName="Flex",e.s(["Flex",()=>i],42436)},79278,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(30315),i=e.i(5376),o=e.i(41344);let{useRecipeResult:a,PropsProvider:s}=(0,n.createRecipeContext)({key:"icon"}),l=r.forwardRef(function(e,r){let{styles:n,className:s,props:l}=a({asChild:!e.as,...e});return(0,t.jsx)(i.chakra.svg,{ref:r,focusable:!1,"aria-hidden":"true",...l,css:[n,e.css],className:(0,o.cx)(s,e.className)})});l.displayName="Icon",e.s(["Icon",()=>l])},32219,e=>{"use strict";let{withContext:t,PropsProvider:r}=(0,e.i(30315).createRecipeContext)({key:"link"}),n=t("a");n.displayName="Link",e.s(["Link",()=>n])},81645,69887,71585,62085,34286,6260,82260,77183,43173,91150,69680,22672,e=>{"use strict";e.s([],81645),e.s([],69887);var t=e.i(15839),r=e.i(52713),n=e.i(64789),i=e.i(63761);let[o,a]=(0,e.i(39414).createContext)({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"});e.s(["PopoverProvider",()=>o,"usePopoverContext",()=>a],71585);let s=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,r.mergeProps)(o.getAnchorProps(),e);return(0,t.jsx)(i.ark.div,{...s,ref:n})});s.displayName="PopoverAnchor",e.s(["PopoverAnchor",()=>s],62085);let l=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,r.mergeProps)(o.getArrowProps(),e);return(0,t.jsx)(i.ark.div,{...s,ref:n})});l.displayName="PopoverArrow",e.s(["PopoverArrow",()=>l],34286);let u=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,r.mergeProps)(o.getArrowTipProps(),e);return(0,t.jsx)(i.ark.div,{...s,ref:n})});u.displayName="PopoverArrowTip",e.s(["PopoverArrowTip",()=>u],6260);let c=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,r.mergeProps)(o.getCloseTriggerProps(),e);return(0,t.jsx)(i.ark.button,{...s,ref:n})});c.displayName="PopoverCloseTrigger",e.s(["PopoverCloseTrigger",()=>c],82260);var d=e.i(24074),h=e.i(96733);let f=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,h.usePresenceContext)(),l=(0,r.mergeProps)(o.getContentProps(),s.getPresenceProps(),e);return s.unmounted?null:(0,t.jsx)(i.ark.div,{...l,ref:(0,d.composeRefs)(s.ref,n)})});f.displayName="PopoverContent",e.s(["PopoverContent",()=>f],77183);let p=e=>e.children(a());e.s(["PopoverContext",()=>p],43173);let g=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,r.mergeProps)(o.getDescriptionProps(),e);return(0,t.jsx)(i.ark.div,{...s,ref:n})});g.displayName="PopoverDescription",e.s(["PopoverDescription",()=>g],91150);let m=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,r.mergeProps)(o.getIndicatorProps(),e);return(0,t.jsx)(i.ark.div,{...s,ref:n})});m.displayName="PopoverIndicator",e.s(["PopoverIndicator",()=>m],69680);let v=(0,n.forwardRef)((e,n)=>{let o=a(),s=(0,h.usePresenceContext)(),l=(0,r.mergeProps)(o.getPositionerProps(),e);return s.unmounted?null:(0,t.jsx)(i.ark.div,{...l,ref:n})});v.displayName="PopoverPositioner",e.s(["PopoverPositioner",()=>v],22672)},10741,22957,e=>{"use strict";let t=["top","right","bottom","left"],r=Math.min,n=Math.max,i=Math.round,o=Math.floor,a=e=>({x:e,y:e}),s={left:"right",right:"left",bottom:"top",top:"bottom"},l={start:"end",end:"start"};function u(e,t){return"function"==typeof e?e(t):e}function c(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function f(e){return"y"===e?"height":"width"}let p=new Set(["top","bottom"]);function g(e){return p.has(c(e))?"y":"x"}function m(e){return e.replace(/start|end/g,e=>l[e])}let v=["left","right"],b=["right","left"],y=["top","bottom"],x=["bottom","top"];function w(e){return e.replace(/left|right|bottom|top/g,e=>s[e])}function _(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function k(e,t,r){let n,{reference:i,floating:o}=e,a=g(t),s=h(g(t)),l=f(s),u=c(t),p="y"===a,m=i.x+i.width/2-o.width/2,v=i.y+i.height/2-o.height/2,b=i[l]/2-o[l]/2;switch(u){case"top":n={x:m,y:i.y-o.height};break;case"bottom":n={x:m,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:v};break;case"left":n={x:i.x-o.width,y:v};break;default:n={x:i.x,y:i.y}}switch(d(t)){case"start":n[s]-=b*(r&&p?-1:1);break;case"end":n[s]+=b*(r&&p?-1:1)}return n}let S=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=k(u,n,l),h=n,f={},p=0;for(let r=0;r<s.length;r++){let{name:o,fn:g}=s[r],{x:m,y:v,data:b,reset:y}=await g({x:c,y:d,initialPlacement:n,placement:h,strategy:i,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=m?m:c,d=null!=v?v:d,f={...f,[o]:{...f[o],...b}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(u=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:c,y:d}=k(u,h,l)),r=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:f}};async function E(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=u(t,e),g=_(p),m=s[f?"floating"===h?"reference":"floating":h],v=C(await o.getClippingRect({element:null==(r=await (null==o.isElement?void 0:o.isElement(m)))||r?m:m.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b="floating"===h?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),x=await (null==o.isElement?void 0:o.isElement(y))&&await (null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},w=C(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(v.top-w.top+g.top)/x.y,bottom:(w.bottom-v.bottom+g.bottom)/x.y,left:(v.left-w.left+g.left)/x.x,right:(w.right-v.right+g.right)/x.x}}function O(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function I(e){return t.some(t=>e[t]>=0)}let P=new Set(["left","top"]);async function T(e,t){let{placement:r,platform:n,elements:i}=e,o=await (null==n.isRTL?void 0:n.isRTL(i.floating)),a=c(r),s=d(r),l="y"===g(r),h=P.has(a)?-1:1,f=o&&l?-1:1,p=u(t,e),{mainAxis:m,crossAxis:v,alignmentAxis:b}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&"number"==typeof b&&(v="end"===s?-1*b:b),l?{x:v*f,y:m*h}:{x:m*h,y:v*f}}function R(){return"undefined"!=typeof window}function A(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return!!R()&&(e instanceof Node||e instanceof M(e).Node)}function L(e){return!!R()&&(e instanceof Element||e instanceof M(e).Element)}function V(e){return!!R()&&(e instanceof HTMLElement||e instanceof M(e).HTMLElement)}function F(e){return!!R()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof M(e).ShadowRoot)}let j=new Set(["inline","contents"]);function z(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=Q(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!j.has(i)}let B=new Set(["table","td","th"]),H=[":popover-open",":modal"];function W(e){return H.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let U=["transform","translate","scale","rotate","perspective"],$=["transform","translate","scale","rotate","perspective","filter"],q=["paint","layout","strict","content"];function G(e){let t=K(),r=L(e)?Q(e):e;return U.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||$.some(e=>(r.willChange||"").includes(e))||q.some(e=>(r.contain||"").includes(e))}function K(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Y=new Set(["html","body","#document"]);function X(e){return Y.has(A(e))}function Q(e){return M(e).getComputedStyle(e)}function Z(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if("html"===A(e))return e;let t=e.assignedSlot||e.parentNode||F(e)&&e.host||N(e);return F(t)?t.host:t}function ee(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=J(t);return X(r)?t.ownerDocument?t.ownerDocument.body:t.body:V(r)&&z(r)?r:e(r)}(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=M(i);if(o){let e=et(a);return t.concat(a,a.visualViewport||[],z(i)?i:[],e&&r?ee(e):[])}return t.concat(i,ee(i,[],r))}function et(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function er(e){let t=Q(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=V(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,l=i(r)!==a||i(n)!==s;return l&&(r=a,n=s),{width:r,height:n,$:l}}function en(e){return L(e)?e:e.contextElement}function ei(e){let t=en(e);if(!V(t))return a(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:s}=er(t),l=(s?i(r.width):r.width)/n,u=(s?i(r.height):r.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}let eo=a(0);function ea(e){let t=M(e);return K()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eo}function es(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let o=e.getBoundingClientRect(),s=en(e),l=a(1);t&&(n?L(n)&&(l=ei(n)):l=ei(e));let u=(void 0===(i=r)&&(i=!1),n&&(!i||n===M(s))&&i)?ea(s):a(0),c=(o.left+u.x)/l.x,d=(o.top+u.y)/l.y,h=o.width/l.x,f=o.height/l.y;if(s){let e=M(s),t=n&&L(n)?M(n):n,r=e,i=et(r);for(;i&&n&&t!==r;){let e=ei(i),t=i.getBoundingClientRect(),n=Q(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,d*=e.y,h*=e.x,f*=e.y,c+=o,d+=a,i=et(r=M(i))}}return C({width:h,height:f,x:c,y:d})}function el(e,t){let r=Z(e).scrollLeft;return t?t.left+r:es(N(e)).left+r}function eu(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-el(e,r),y:r.top+t.scrollTop}}let ec=new Set(["absolute","fixed"]);function ed(e,t,r){var i;let o;if("viewport"===t)o=function(e,t){let r=M(e),n=N(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=K();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}let u=el(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else u<=25&&(o+=u);return{width:o,height:a,x:s,y:l}}(e,r);else if("document"===t){let t,r,a,s,l,u,c;i=N(e),t=N(i),r=Z(i),a=i.ownerDocument.body,s=n(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=n(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),u=-r.scrollLeft+el(i),c=-r.scrollTop,"rtl"===Q(a).direction&&(u+=n(t.clientWidth,a.clientWidth)-s),o={width:s,height:l,x:u,y:c}}else if(L(t)){let e,n,i,s,l,u;n=(e=es(t,!0,"fixed"===r)).top+t.clientTop,i=e.left+t.clientLeft,s=V(t)?ei(t):a(1),l=t.clientWidth*s.x,u=t.clientHeight*s.y,o={width:l,height:u,x:i*s.x,y:n*s.y}}else{let r=ea(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return C(o)}function eh(e){return"static"===Q(e).position}function ef(e,t){if(!V(e)||"fixed"===Q(e).position)return null;if(t)return t(e);let r=e.offsetParent;return N(e)===r&&(r=r.ownerDocument.body),r}function ep(e,t){var r;let n=M(e);if(W(e))return n;if(!V(e)){let t=J(e);for(;t&&!X(t);){if(L(t)&&!eh(t))return t;t=J(t)}return n}let i=ef(e,t);for(;i&&(r=i,B.has(A(r)))&&eh(i);)i=ef(i,t);return i&&X(i)&&eh(i)&&!G(i)?n:i||function(e){let t=J(e);for(;V(t)&&!X(t);){if(G(t))return t;if(W(t))break;t=J(t)}return null}(e)||n}let eg=async function(e){let t=this.getOffsetParent||ep,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=V(t),i=N(t),o="fixed"===r,s=es(e,!0,o,t),l={scrollLeft:0,scrollTop:0},u=a(0);if(n||!n&&!o)if(("body"!==A(t)||z(i))&&(l=Z(t)),n){let e=es(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else i&&(u.x=el(i));o&&!n&&i&&(u.x=el(i));let c=!i||n||o?a(0):eu(i,l);return{x:s.left+l.scrollLeft-u.x-c.x,y:s.top+l.scrollTop-u.y-c.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},em={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o="fixed"===i,s=N(n),l=!!t&&W(t.floating);if(n===s||l&&o)return r;let u={scrollLeft:0,scrollTop:0},c=a(1),d=a(0),h=V(n);if((h||!h&&!o)&&(("body"!==A(n)||z(s))&&(u=Z(n)),V(n))){let e=es(n);c=ei(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let f=!s||h||o?a(0):eu(s,u);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-u.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-u.scrollTop*c.y+d.y+f.y}},getDocumentElement:N,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:o,strategy:a}=e,s=[..."clippingAncestors"===i?W(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=ee(e,[],!1).filter(e=>L(e)&&"body"!==A(e)),i=null,o="fixed"===Q(e).position,a=o?J(e):e;for(;L(a)&&!X(a);){let t=Q(a),r=G(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&!!i&&ec.has(i.position)||z(a)&&!r&&function e(t,r){let n=J(t);return!(n===r||!L(n)||X(n))&&("fixed"===Q(n).position||e(n,r))}(e,a))?n=n.filter(e=>e!==a):i=t,a=J(a)}return t.set(e,n),n}(t,this._c):[].concat(i),o],l=s[0],u=s.reduce((e,i)=>{let o=ed(t,i,a);return e.top=n(o.top,e.top),e.right=r(o.right,e.right),e.bottom=r(o.bottom,e.bottom),e.left=n(o.left,e.left),e},ed(t,l,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:ep,getElementRects:eg,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=er(e);return{width:t,height:r}},getScale:ei,isElement:L,isRTL:function(e){return"rtl"===Q(e).direction}};function ev(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eb(e,t,i,a){let s;void 0===a&&(a={});let{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:h=!1}=a,f=en(e),p=l||u?[...f?ee(f):[],...ee(t)]:[];p.forEach(e=>{l&&e.addEventListener("scroll",i,{passive:!0}),u&&e.addEventListener("resize",i)});let g=f&&d?function(e,t){let i,a=null,s=N(e);function l(){var e;clearTimeout(i),null==(e=a)||e.disconnect(),a=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),l();let h=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=h;if(c||t(),!g||!m)return;let v={rootMargin:-o(p)+"px "+-o(s.clientWidth-(f+g))+"px "+-o(s.clientHeight-(p+m))+"px "+-o(f)+"px",threshold:n(0,r(1,d))||1},b=!0;function y(t){let r=t[0].intersectionRatio;if(r!==d){if(!b)return u();r?u(!1,r):i=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||ev(h,e.getBoundingClientRect())||u(),b=!1}try{a=new IntersectionObserver(y,{...v,root:s.ownerDocument})}catch(e){a=new IntersectionObserver(y,v)}a.observe(e)}(!0),l}(f,i):null,m=-1,v=null;c&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),i()}),f&&!h&&v.observe(f),v.observe(t));let b=h?es(e):null;return h&&function t(){let r=es(e);b&&!ev(b,r)&&i(),b=r,s=requestAnimationFrame(t)}(),i(),()=>{var e;p.forEach(e=>{l&&e.removeEventListener("scroll",i),u&&e.removeEventListener("resize",i)}),null==g||g(),null==(e=v)||e.disconnect(),v=null,h&&cancelAnimationFrame(s)}}let ey=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:s}=t,l=await T(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},ex=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:i,y:o,placement:a}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...f}=u(e,t),p={x:i,y:o},m=await E(t,f),v=g(c(a)),b=h(v),y=p[b],x=p[v];if(s){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",i=y+m[e],o=y-m[t];y=n(i,r(y,o))}if(l){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",i=x+m[e],o=x-m[t];x=n(i,r(x,o))}let w=d.fn({...t,[b]:y,[v]:x});return{...w,data:{x:w.x-i,y:w.y-o,enabled:{[b]:s,[v]:l}}}}}},ew=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n,i,o,a,s,l,p;let _,C,k,{placement:S,middlewareData:O,rects:I,initialPlacement:P,platform:T,elements:R}=t,{mainAxis:A=!0,crossAxis:M=!0,fallbackPlacements:N,fallbackStrategy:D="bestFit",fallbackAxisSideDirection:L="none",flipAlignment:V=!0,...F}=u(e,t);if(null!=(r=O.arrow)&&r.alignmentOffset)return{};let j=c(S),z=g(P),B=c(P)===P,H=await (null==T.isRTL?void 0:T.isRTL(R.floating)),W=N||(B||!V?[w(P)]:(_=w(P),[m(P),_,m(_)])),U="none"!==L;!N&&U&&W.push(...(C=d(P),k=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?b:v;return t?v:b;case"left":case"right":return t?y:x;default:return[]}}(c(P),"start"===L,H),C&&(k=k.map(e=>e+"-"+C),V&&(k=k.concat(k.map(m)))),k));let $=[P,...W],q=await E(t,F),G=[],K=(null==(n=O.flip)?void 0:n.overflows)||[];if(A&&G.push(q[j]),M){let e,t,r,n,i=(s=S,l=I,void 0===(p=H)&&(p=!1),e=d(s),r=f(t=h(g(s))),n="x"===t?e===(p?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[r]>l.floating[r]&&(n=w(n)),[n,w(n)]);G.push(q[i[0]],q[i[1]])}if(K=[...K,{placement:S,overflows:G}],!G.every(e=>e<=0)){let e=((null==(i=O.flip)?void 0:i.index)||0)+1,t=$[e];if(t&&("alignment"!==M||z===g(t)||K.every(e=>g(e.placement)!==z||e.overflows[0]>0)))return{data:{index:e,overflows:K},reset:{placement:t}};let r=null==(o=K.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(D){case"bestFit":{let e=null==(a=K.filter(e=>{if(U){let t=g(e.placement);return t===z||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=P}if(S!==r)return{reset:{placement:r}}}return{}}}},e_=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,o;let a,s,{placement:l,rects:h,platform:f,elements:p}=t,{apply:m=()=>{},...v}=u(e,t),b=await E(t,v),y=c(l),x=d(l),w="y"===g(l),{width:_,height:C}=h.floating;"top"===y||"bottom"===y?(a=y,s=x===(await (null==f.isRTL?void 0:f.isRTL(p.floating))?"start":"end")?"left":"right"):(s=y,a="end"===x?"top":"bottom");let k=C-b.top-b.bottom,S=_-b.left-b.right,O=r(C-b[a],k),I=r(_-b[s],S),P=!t.middlewareData.shift,T=O,R=I;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(R=S),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(T=k),P&&!x){let e=n(b.left,0),t=n(b.right,0),r=n(b.top,0),i=n(b.bottom,0);w?R=_-2*(0!==e||0!==t?e+t:n(b.left,b.right)):T=C-2*(0!==r||0!==i?r+i:n(b.top,b.bottom))}await m({...t,availableWidth:R,availableHeight:T});let A=await f.getDimensions(p.floating);return _!==A.width||C!==A.height?{reset:{rects:!0}}:{}}}},eC=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=u(e,t);switch(n){case"referenceHidden":{let e=O(await E(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:I(e)}}}case"escaped":{let e=O(await E(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:I(e)}}}default:return{}}}}},ek=e=>({name:"arrow",options:e,async fn(t){let{x:i,y:o,placement:a,rects:s,platform:l,elements:c,middlewareData:p}=t,{element:m,padding:v=0}=u(e,t)||{};if(null==m)return{};let b=_(v),y={x:i,y:o},x=h(g(a)),w=f(x),C=await l.getDimensions(m),k="y"===x,S=k?"clientHeight":"clientWidth",E=s.reference[w]+s.reference[x]-y[x]-s.floating[w],O=y[x]-s.reference[x],I=await (null==l.getOffsetParent?void 0:l.getOffsetParent(m)),P=I?I[S]:0;P&&await (null==l.isElement?void 0:l.isElement(I))||(P=c.floating[S]||s.floating[w]);let T=P/2-C[w]/2-1,R=r(b[k?"top":"left"],T),A=r(b[k?"bottom":"right"],T),M=P-C[w]-A,N=P/2-C[w]/2+(E/2-O/2),D=n(R,r(N,M)),L=!p.arrow&&null!=d(a)&&N!==D&&s.reference[w]/2-(N<R?R:A)-C[w]/2<0,V=L?N<R?N-R:N-M:0;return{[x]:y[x]+V,data:{[x]:D,centerOffset:N-D-V,...L&&{alignmentOffset:V}},reset:L}}}),eS=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:d=!0}=u(e,t),f={x:r,y:n},p=g(i),m=h(p),v=f[m],b=f[p],y=u(s,t),x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+x.mainAxis,r=o.reference[m]+o.reference[e]-x.mainAxis;v<t?v=t:v>r&&(v=r)}if(d){var w,_;let e="y"===m?"width":"height",t=P.has(c(i)),r=o.reference[p]-o.floating[e]+(t&&(null==(w=a.offset)?void 0:w[p])||0)+(t?0:x.crossAxis),n=o.reference[p]+o.reference[e]+(t?0:(null==(_=a.offset)?void 0:_[p])||0)-(t?x.crossAxis:0);b<r?b=r:b>n&&(b=n)}return{[m]:v,[p]:b}}}},eE=(e,t,r)=>{let n=new Map,i={platform:em,...r},o={...i.platform,_c:n};return S(e,t,{...i,platform:o})};e.s(["arrow",()=>ek,"autoUpdate",()=>eb,"computePosition",()=>eE,"flip",()=>ew,"hide",()=>eC,"limitShift",()=>eS,"offset",()=>ey,"shift",()=>ex,"size",()=>e_],22957);var eO=e.i(92109),eI=e.i(58287);function eP(e=0,t=0,r=0,n=0){if("function"==typeof DOMRect)return new DOMRect(e,t,r,n);let i={x:e,y:t,width:r,height:n,top:t,right:e+r,bottom:t+n,left:e};return{...i,toJSON:()=>i}}var eT=e=>({variable:e,reference:`var(${e})`}),eR={arrowSize:eT("--arrow-size"),arrowSizeHalf:eT("--arrow-size-half"),arrowBg:eT("--arrow-background"),transformOrigin:eT("--transform-origin"),arrowOffset:eT("--arrow-offset")},eA={name:"rects",fn:({rects:e})=>({data:e})};function eM(e){return e.split("-")[0]}var eN={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function eD(e,t){let r=e.devicePixelRatio||1;return Math.round(t*r)/r}function eL(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function eV(e,t,r={}){let{defer:n,...i}=r,o=n?eO.raf:e=>e(),a=[];return a.push(o(()=>{let r="function"==typeof e?e():e,n="function"==typeof t?t():t;a.push(function(e,t,r={}){var n,i,o,a;let s=(n=r.getAnchorRect,{contextElement:(0,eO.isHTMLElement)(e)?e:void 0,getBoundingClientRect:()=>{let t=n?.(e);return t||!e?function(e){if(!e)return eP();let{x:t,y:r,width:n,height:i}=e;return eP(t,r,n,i)}(t):e.getBoundingClientRect()}});if(!t||!s)return;let l=Object.assign({},eN,r),u=t.querySelector("[data-part=arrow]"),c=[function(e,t){if(!(0,eI.isNull)(t.offset??t.gutter))return ey(({placement:r})=>{let n=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,{hasAlign:o}=function(e){let[t,r]=e.split("-");return{side:t,align:r,hasAlign:null!=r}}(r),a=o?void 0:t.shift,s=t.offset?.crossAxis??a;return(0,eI.compact)({crossAxis:s,mainAxis:"number"==typeof i?i+n:i??n,alignmentAxis:t.shift})})}(u,l),function(e){if(!e.flip)return;let t=eL(e.boundary);return ew({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}(l),function(e){if(!e.slide&&!e.overlap)return;let t=eL(e.boundary);return ex({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:eS()})}(l),(i=t.ownerDocument,ek({element:u||i.createElement("div"),padding:l.arrowPadding})),(e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:r}){if(!r.arrow)return{};let{x:n,y:i}=r.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=n?`${n}px`:"",top:null!=i?`${i}px`:"",[o]:`calc(100% + ${eR.arrowOffset.reference})`}),{}}}})(u),(o={gutter:l.gutter,offset:l.offset,overlap:l.overlap},{name:"transformOrigin",fn(e){let{elements:t,middlewareData:r,placement:n,rects:i,y:a}=e,s=n.split("-")[0],l=r.arrow?.x||0,c=r.arrow?.y||0,d=u?.clientWidth||0,h=u?.clientHeight||0,f=l+d/2,p=c+h/2,g=Math.abs(r.shift?.y||0),m=i.reference.height/2,v=h/2,b=o.offset?.mainAxis??o.gutter,y="number"==typeof b?b+v:b??v,x=g>y,w={top:`${f}px calc(100% + ${y}px)`,bottom:`${f}px ${-y}px`,left:`calc(100% + ${y}px) ${p}px`,right:`${-y}px ${p}px`}[s],_=`${f}px ${i.reference.y+m-a}px`,C=!!o.overlap&&"y"==("top"===s||"bottom"===s?"y":"x")&&x;return t.floating.style.setProperty(eR.transformOrigin.variable,C?_:w),{data:{transformOrigin:C?_:w}}}}),e_({padding:l.overflowPadding,apply({elements:e,rects:t,availableHeight:r,availableWidth:n}){let i=e.floating,o=Math.round(t.reference.width),a=Math.round(t.reference.height);n=Math.floor(n),r=Math.floor(r),i.style.setProperty("--reference-width",`${o}px`),i.style.setProperty("--reference-height",`${a}px`),i.style.setProperty("--available-width",`${n}px`),i.style.setProperty("--available-height",`${r}px`)}}),function(e){if(e.hideWhenDetached)return eC({strategy:"referenceHidden",boundary:eL(e.boundary)??"clippingAncestors"})}(l),eA],{placement:d,strategy:h,onComplete:f,onPositioned:p}=l,g=async()=>{if(!s||!t)return;let e=await eE(s,t,{placement:d,middleware:c,strategy:h});f?.(e),p?.({placed:!0});let r=(0,eO.getWindow)(t),n=eD(r,e.x),i=eD(r,e.y);t.style.setProperty("--x",`${n}px`),t.style.setProperty("--y",`${i}px`),l.hideWhenDetached&&(e.middlewareData.hide?.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));let o=t.firstElementChild;if(o){let e=(0,eO.getComputedStyle)(o);t.style.setProperty("--z-index",e.zIndex)}},m=async()=>{r.updatePosition?(await r.updatePosition({updatePosition:g,floatingElement:t}),p?.({placed:!0})):await g()},v=(a=l.listeners)?!0===a?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:a:{},b=l.listeners?eb(s,t,m,v):eI.noop;return m(),()=>{b?.(),p?.({placed:!1})}}(r,n,i))})),()=>{a.forEach(e=>e?.())}}var eF={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ej(e={}){let{placement:t,sameWidth:r,fitViewport:n,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:eR.arrowSize.reference,height:eR.arrowSize.reference,[eR.arrowSizeHalf.variable]:`calc(${eR.arrowSize.reference} / 2)`,[eR.arrowOffset.variable]:`calc(${eR.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?eF[t.split("-")[0]]:void 0,background:eR.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:i,isolation:"isolate",minWidth:r?void 0:"max-content",width:r?"var(--reference-width)":void 0,maxWidth:n?"var(--available-width)":void 0,maxHeight:n?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}e.s(["getPlacement",()=>eV,"getPlacementSide",()=>eM,"getPlacementStyles",()=>ej],10741)},76452,62439,49301,72064,e=>{"use strict";var t=e.i(15839),r=e.i(18128),n=e.i(59760),i=e.i(29801),o=e.i(59889),a=e.i(42436),s=e.i(79278),l=e.i(88076),u=e.i(32219);e.i(81645),e.i(69887);var c=e.i(62085),d=e.i(34286),h=e.i(6260),f=e.i(82260),p=e.i(77183),g=e.i(43173),m=e.i(91150),v=e.i(69680),b=e.i(22672),y=e.i(52713),x=e.i(98239),w=e.i(67077),_=e.i(96733),C=e.i(94548),k=e.i(92109),S=e.i(10741),E=e.i(27958),O=e.i(56842),I=e.i(68642),P=e.i(82872),T=e.i(92242),R=e.i(58287),A=(0,C.createAnatomy)("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),M=A.build(),N=e=>e.ids?.anchor??`popover:${e.id}:anchor`,D=e=>e.ids?.trigger??`popover:${e.id}:trigger`,L=e=>e.ids?.content??`popover:${e.id}:content`,V=e=>e.ids?.positioner??`popover:${e.id}:popper`,F=e=>e.ids?.title??`popover:${e.id}:title`,j=e=>e.ids?.description??`popover:${e.id}:desc`,z=e=>e.getById(N(e)),B=e=>e.getById(D(e)),H=e=>e.getById(L(e)),W=e=>e.getById(V(e));function U(e,t){let{state:r,context:n,send:i,computed:o,prop:a,scope:s}=e,l=r.matches("open"),u=n.get("currentPlacement"),c=o("currentPortalled"),d=n.get("renderedElements"),h=(0,S.getPlacementStyles)({...a("positioning"),placement:u});return{portalled:c,open:l,setOpen(e){r.matches("open")!==e&&i({type:e?"OPEN":"CLOSE"})},reposition(e={}){i({type:"POSITIONING.SET",options:e})},getArrowProps:()=>t.element({id:s.ids?.arrow??`popover:${s.id}:arrow`,...M.arrow.attrs,dir:a("dir"),style:h.arrow}),getArrowTipProps:()=>t.element({...M.arrowTip.attrs,dir:a("dir"),style:h.arrowTip}),getAnchorProps:()=>t.element({...M.anchor.attrs,dir:a("dir"),id:N(s)}),getTriggerProps:()=>t.button({...M.trigger.attrs,dir:a("dir"),type:"button","data-placement":u,id:D(s),"aria-haspopup":"dialog","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":L(s),onPointerDown(e){(0,k.isLeftClick)(e)&&(0,k.isSafari)()&&e.currentTarget.focus()},onClick(e){e.defaultPrevented||i({type:"TOGGLE"})},onBlur(e){i({type:"TRIGGER_BLUR",target:e.relatedTarget})}}),getIndicatorProps:()=>t.element({...M.indicator.attrs,dir:a("dir"),"data-state":l?"open":"closed"}),getPositionerProps:()=>t.element({id:V(s),...M.positioner.attrs,dir:a("dir"),style:h.floating}),getContentProps:()=>t.element({...M.content.attrs,dir:a("dir"),id:L(s),tabIndex:-1,role:"dialog","aria-modal":(0,k.ariaAttr)(a("modal")),hidden:!l,"data-state":l?"open":"closed","data-expanded":(0,k.dataAttr)(l),"aria-labelledby":d.title?F(s):void 0,"aria-describedby":d.description?j(s):void 0,"data-placement":u}),getTitleProps:()=>t.element({...M.title.attrs,id:F(s),dir:a("dir")}),getDescriptionProps:()=>t.element({...M.description.attrs,id:j(s),dir:a("dir")}),getCloseTriggerProps:()=>t.button({...M.closeTrigger.attrs,dir:a("dir"),id:s.ids?.closeTrigger??`popover:${s.id}:close`,type:"button","aria-label":"close",onClick(e){e.defaultPrevented||(e.stopPropagation(),i({type:"CLOSE"}))}})}}var $=(0,y.createMachine)({props:({props:e})=>({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,...e,positioning:{placement:"bottom",...e.positioning}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",context:({bindable:e})=>({currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}),computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:r}){e([()=>t("open")],()=>{r(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>void 0!=e("open")},effects:{trackPositioning({context:e,prop:t,scope:r}){e.set("currentPlacement",t("positioning").placement);let n=z(r)??B(r);return(0,S.getPlacement)(n,()=>W(r),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})},trackDismissableElement({send:e,prop:t,scope:r}){let n=!0;return(0,O.trackDismissableElement)(()=>H(r),{type:"popover",pointerBlocking:t("modal"),exclude:B(r),defer:!0,onEscapeKeyDown(e){t("onEscapeKeyDown")?.(e),t("closeOnEscape")||e.preventDefault()},onInteractOutside(e){t("onInteractOutside")?.(e),!e.defaultPrevented&&(n=!(e.detail.focusable||e.detail.contextmenu),t("closeOnInteractOutside")||e.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:n})}})},proxyTabFocus({prop:e,scope:t}){if(!e("modal")&&e("portalled"))return(0,k.proxyTabFocus)(()=>H(t),{triggerElement:B(t),defer:!0,getShadowRoot:!0,onFocus(e){e.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){if(e("modal"))return(0,E.ariaHidden)(()=>[H(t),B(t)],{defer:!0})},preventScroll({prop:e,scope:t}){if(e("modal"))return(0,P.preventBodyScroll)(t.getDoc())},trapFocus({prop:e,scope:t}){if(e("modal"))return(0,I.trapFocus)(()=>H(t),{initialFocus:()=>(0,k.getInitialFocus)({root:H(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0})}},actions:{reposition({event:e,prop:t,scope:r,context:n}){let i=z(r)??B(r);(0,S.getPlacement)(i,()=>W(r),{...t("positioning"),...e.options,defer:!0,listeners:!1,onComplete(e){n.set("currentPlacement",e.placement)}})},checkRenderedElements({context:e,scope:t}){(0,k.raf)(()=>{Object.assign(e.get("renderedElements"),{title:!!t.getById(F(t)),description:!!t.getById(j(t))})})},setInitialFocus({prop:e,scope:t}){e("modal")||(0,k.raf)(()=>{let r=(0,k.getInitialFocus)({root:H(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});r?.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){let r=e.restoreFocus??e.previousEvent?.restoreFocus;(null==r||r)&&(0,k.raf)(()=>{let e=B(t);e?.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{e("onOpenChange")?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e("onOpenChange")?.({open:!1})})},toggleVisibility({event:e,send:t,prop:r}){t({type:r("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}}),q=(0,T.createProps)()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);(0,R.createSplitProps)(q),e.s(["anatomy",()=>A,"connect",()=>U,"machine",()=>$],62439);var G=e.i(61697),K=e.i(64789),Y=e.i(21173),X=e.i(64614),Q=e.i(71585);let Z=e=>{let[r,{children:n,...i}]=(0,x.splitPresenceProps)(e),o=(e=>{let t=(0,K.useId)(),{getRootNode:r}=(0,Y.useEnvironmentContext)(),{dir:n}=(0,X.useLocaleContext)(),i={id:t,dir:n,getRootNode:r,...e};return U((0,G.useMachine)($,i),G.normalizeProps)})(i),a=(0,w.usePresence)((0,y.mergeProps)({present:o.open},r));return(0,t.jsx)(Q.PopoverProvider,{value:o,children:(0,t.jsx)(_.PresenceProvider,{value:a,children:n})})},J=e=>{let[r,{value:n,children:i}]=(0,x.splitPresenceProps)(e),o=(0,w.usePresence)((0,y.mergeProps)({present:n.open},r));return(0,t.jsx)(Q.PopoverProvider,{value:n,children:(0,t.jsx)(_.PresenceProvider,{value:o,children:i})})};var ee=e.i(63761);let et=(0,K.forwardRef)((e,r)=>{let n=(0,Q.usePopoverContext)(),i=(0,y.mergeProps)(n.getTitleProps(),e);return(0,t.jsx)(ee.ark.div,{...i,ref:r})});et.displayName="PopoverTitle";let er=(0,K.forwardRef)((e,r)=>{let n=(0,Q.usePopoverContext)(),i=(0,_.usePresenceContext)(),o=(0,y.mergeProps)({...n.getTriggerProps(),"aria-controls":i.unmounted?void 0:n.getTriggerProps()["aria-controls"]},e);return(0,t.jsx)(ee.ark.button,{...o,ref:r})});er.displayName="PopoverTrigger",e.s(["Anchor",()=>c.PopoverAnchor,"Arrow",()=>d.PopoverArrow,"ArrowTip",()=>h.PopoverArrowTip,"CloseTrigger",()=>f.PopoverCloseTrigger,"Content",()=>p.PopoverContent,"Context",()=>g.PopoverContext,"Description",()=>m.PopoverDescription,"Indicator",()=>v.PopoverIndicator,"Positioner",()=>b.PopoverPositioner,"Root",()=>Z,"RootProvider",()=>J,"Title",()=>et,"Trigger",()=>er],92623);var en=e.i(92623),en=en;let{withRootProvider:ei,withContext:eo,useStyles:ea,PropsProvider:es}=(0,e.i(45362).createSlotRecipeContext)({key:"popover"}),el=ei(en.RootProvider),eu=ei(en.Root),ec=eo(en.Trigger,"trigger",{forwardAsChild:!0}),ed=eo(en.Positioner,"positioner",{forwardAsChild:!0}),eh=eo(en.Content,"content",{forwardAsChild:!0}),ef=eo(en.ArrowTip,"arrowTip",{forwardAsChild:!0}),ep=eo(en.Arrow,"arrow",{forwardAsChild:!0,defaultProps:{children:(0,t.jsx)(ef,{})}}),eg=eo(en.CloseTrigger,"closeTrigger",{forwardAsChild:!0});eo(en.Indicator,"indicator",{forwardAsChild:!0});let em=eo(en.Title,"title",{forwardAsChild:!0}),ev=eo(en.Description,"description",{forwardAsChild:!0}),eb=eo("footer","footer"),ey=eo("header","header"),ex=eo("div","body"),ew=eo(en.Anchor,void 0,{forwardAsChild:!0}),e_=en.Context;e.s(["Anchor",()=>ew,"Arrow",()=>ep,"ArrowTip",()=>ef,"Body",()=>ex,"CloseTrigger",()=>eg,"Content",()=>eh,"Context",()=>e_,"Description",()=>ev,"Footer",()=>eb,"Header",()=>ey,"Positioner",()=>ed,"PropsProvider",()=>es,"Root",()=>eu,"RootProvider",()=>el,"Title",()=>em,"Trigger",()=>ec,"usePopoverStyles",()=>ea],50404);var eC=e.i(50404);e.s(["Popover",0,eC],49301);var eC=eC,ek=e.i(70839);let eS=e=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,t.jsx)("path",{d:"M7.26326 6.5462H8.71794V12.3642H7.26326V6.5462ZM7.9906 3.1102C7.43278 3.1102 6.97888 3.5641 6.97888 4.12192C6.97888 4.67974 7.43278 5.13364 7.9906 5.13364C8.54842 5.13364 9.00232 4.67974 9.00232 4.12192C9.00232 3.5641 8.54842 3.1102 7.9906 3.1102ZM16 8C16 12.411 12.411 16 8 16C3.589 16 0 12.411 0 8C0 3.589 3.589 0 8 0C12.411 0 16 3.589 16 8ZM14.5453 8C14.5453 4.3906 11.6093 1.4546 7.99992 1.4546C4.39052 1.4546 1.45452 4.3914 1.45452 8.0006C1.45452 11.6098 4.39052 14.546 7.99992 14.546C11.6093 14.546 14.5453 11.6092 14.5453 8.0006V8Z",fill:"currentColor"})});e.s(["IconEdit",0,e=>(0,t.jsx)("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,t.jsx)("path",{d:"M15.9143 1.75812L14.7422 0.585938C14.3515 0.195312 13.8397 0 13.3278 0C12.8159 0 12.304 0.195312 11.9137 0.585625L9.58593 2.91344L8.5 3.99938L0.901592 11.5975L0.504719 15.1669C0.454719 15.6163 0.80878 16 1.24847 16C1.27628 16 1.3044 15.9984 1.33253 15.9953L4.89939 15.6012L12.5006 8L13.5862 6.91437L15.914 4.58656C16.6953 3.80531 16.6953 2.53906 15.9143 1.75812ZM4.21095 14.1684L2.09909 14.4016L2.3344 12.2863L9.56062 5.06L10.53 4.09062L12.4094 5.97L11.44 6.93937L4.21095 14.1684ZM14.8534 3.52562L13.4697 4.90938L11.5906 3.03L12.9744 1.64625C13.1019 1.51875 13.2506 1.49969 13.3278 1.49969C13.405 1.49969 13.554 1.51875 13.6812 1.64625L14.8534 2.81844C15.0484 3.01375 15.0484 3.33094 14.8534 3.52562Z",fill:"currentColor"})}),"IconExport",0,e=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t.jsx)("g",{clipPath:"url(#clip0_1479_25102)",children:(0,t.jsx)("path",{d:"M-1.88399 8.72062L0.358816 6.46094C0.594752 6.22344 1.00006 6.39031 1.00006 6.725V8.2525H4.00005V4.12438C4.00005 3.7275 4.16161 3.34313 4.44286 3.06219L7.06441 0.440625C7.34566 0.159375 7.72691 0 8.12347 0H14.5003C15.3281 0.003125 16 0.675 16 1.50281V14.5003C16 15.3281 15.3281 16 14.5003 16H5.50223C4.67411 16 4.00005 15.3281 4.00005 14.5003V11.2522H5.50005V14.5003H14.5003V1.50281H9.50128V4.75219C9.50128 5.16781 9.1669 5.50187 8.75128 5.50187H5.50005V8.25219H10.625C10.8322 8.25219 11 8.42 11 8.62719V9.37719C11 9.58438 10.8322 9.75219 10.625 9.75219H1.00006V11.2797C1.00006 11.6144 0.594752 11.7813 0.358816 11.5438L-1.88399 9.28406C-2.03867 9.12813 -2.03867 8.87656 -1.88399 8.72062ZM8.0016 4.00219V1.62469L5.62379 4.00219H8.0016Z",fill:"currentColor"})}),(0,t.jsx)("g",{clipPath:"url(#clip1_1479_25102)",children:(0,t.jsx)("path",{d:"M0.103056 8.72062L2.09667 6.46094C2.30639 6.22344 2.66667 6.39031 2.66667 6.725V8.2525H5.33333V4.12438C5.33333 3.7275 5.47694 3.34313 5.72694 3.06219L8.05722 0.440625C8.30722 0.159375 8.64611 0 8.99861 0H14.6669C15.4028 0.003125 16 0.675 16 1.50281V14.5003C16 15.3281 15.4028 16 14.6669 16H6.66861C5.9325 16 5.33333 15.3281 5.33333 14.5003V11.2522H6.66667V14.5003H14.6669V1.50281H10.2233V4.75219C10.2233 5.16781 9.92611 5.50187 9.55667 5.50187H6.66667V8.25219H11.2222C11.4064 8.25219 11.5556 8.42 11.5556 8.62719V9.37719C11.5556 9.58438 11.4064 9.75219 11.2222 9.75219H2.66667V11.2797C2.66667 11.6144 2.30639 11.7813 2.09667 11.5438L0.103056 9.28406C-0.0344448 9.12813 -0.0344448 8.87656 0.103056 8.72062ZM8.89028 4.00219V1.62469L6.77666 4.00219H8.89028Z",fill:"currentColor"})}),(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:"clip0_1479_25102",children:(0,t.jsx)("rect",{width:"13",height:"16",fill:"white",transform:"matrix(-1 0 0 1 16 0)"})}),(0,t.jsx)("clipPath",{id:"clip1_1479_25102",children:(0,t.jsx)("rect",{width:"3",height:"16",fill:"white"})})]})]}),"IconImport",0,e=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t.jsx)("g",{clipPath:"url(#clip0_1426_8619)",children:(0,t.jsx)("path",{d:"M15.5572 3.06188L12.9356 0.440625C12.6544 0.159375 12.2731 0 11.8766 0H5.49969C4.67188 0.003125 4 0.675 4 1.50281V8.25219H0.375C0.167812 8.25219 0 8.42 0 8.62719V9.37719C0 9.58438 0.167812 9.75219 0.375 9.75219H9V11.2797C9 11.6144 9.40531 11.7812 9.64125 11.5437L11.8841 9.28406C12.0388 9.12813 12.0388 8.87656 11.8841 8.72062L9.64125 6.46094C9.40531 6.22344 9 6.39031 9 6.725V8.2525H5.49969V1.50281H10.4987V4.75219C10.4987 5.16781 10.8331 5.50187 11.2487 5.50187H14.5V14.5003H5.49969V11.2522H4V14.5003C4 15.3281 4.67188 16 5.49969 16H14.4978C15.3259 16 16 15.3281 16 14.5003V4.12406C16 3.7275 15.8384 3.34313 15.5572 3.06188ZM11.9984 4.00219V1.62469L14.3763 4.00219H11.9984Z",fill:"black"})}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_1426_8619",children:(0,t.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]}),"IconInfo",0,eS,"IconSave",0,e=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,t.jsx)("path",{d:"M14.5607 4.06066L11.9393 1.43934C11.658 1.15804 11.2765 1 10.8787 1H2.5C1.67156 1 1 1.67156 1 2.5V13.5C1 14.3284 1.67156 15 2.5 15H13.5C14.3284 15 15 14.3284 15 13.5V5.12131C15 4.72349 14.842 4.34196 14.5607 4.06066ZM9.5 2.5V5H5.5V2.5H9.5ZM13.3125 13.5H2.6875C2.63777 13.5 2.59008 13.4802 2.55492 13.4451C2.51975 13.4099 2.5 13.3622 2.5 13.3125V2.6875C2.5 2.63777 2.51975 2.59008 2.55492 2.55492C2.59008 2.51975 2.63777 2.5 2.6875 2.5H4V5.75C4 6.16422 4.33578 6.5 4.75 6.5H10.25C10.6642 6.5 11 6.16422 11 5.75V2.62131L13.4451 5.06641C13.4625 5.08382 13.4763 5.10449 13.4857 5.12724C13.4952 5.14999 13.5 5.17438 13.5 5.199V13.3125C13.5 13.3622 13.4802 13.4099 13.4451 13.4451C13.4099 13.4802 13.3622 13.5 13.3125 13.5ZM8 7.25C6.48366 7.25 5.25 8.48366 5.25 10C5.25 11.5163 6.48366 12.75 8 12.75C9.51634 12.75 10.75 11.5163 10.75 10C10.75 8.48366 9.51634 7.25 8 7.25ZM8 11.25C7.31075 11.25 6.75 10.6892 6.75 10C6.75 9.31075 7.31075 8.75 8 8.75C8.68925 8.75 9.25 9.31075 9.25 10C9.25 10.6892 8.68925 11.25 8 11.25Z",fill:"currentColor"})}),"IconSync",0,e=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t.jsx)("g",{clipPath:"url(#clip0_1479_25070)",children:(0,t.jsx)("path",{d:"M15.625 0.25H14.759C14.5484 0.25 14.3791 0.423375 14.3841 0.633937L14.4575 3.71441C13.0691 1.62634 10.6955 0.25 8 0.25C4.21291 0.25 1.06041 2.96638 0.38425 6.557C0.340875 6.78728 0.518875 7 0.753219 7H1.64622C1.82353 7 1.97566 6.87556 2.013 6.70222C2.60753 3.9415 5.05991 1.875 8 1.875C10.4858 1.875 12.6232 3.35256 13.5836 5.47819L9.63394 5.38416C9.42341 5.37916 9.25 5.54844 9.25 5.75906V6.625C9.25 6.83209 9.41791 7 9.625 7H15.625C15.8321 7 16 6.83209 16 6.625V0.625C16 0.417906 15.8321 0.25 15.625 0.25ZM15.2468 9H14.3538C14.1765 9 14.0243 9.12444 13.987 9.29778C13.3925 12.0585 10.9401 14.125 8 14.125C5.51419 14.125 3.37681 12.6474 2.41637 10.5218L6.36606 10.6158C6.57659 10.6208 6.75 10.4516 6.75 10.2409V9.375C6.75 9.16791 6.58209 9 6.375 9H0.375C0.167906 9 0 9.16791 0 9.375V15.375C0 15.5821 0.167906 15.75 0.375 15.75H1.24097C1.45156 15.75 1.62088 15.5766 1.61588 15.3661L1.54253 12.2856C2.93087 14.3737 5.3045 15.75 8 15.75C11.7871 15.75 14.9396 13.0336 15.6158 9.443C15.6591 9.21272 15.4811 9 15.2468 9Z",fill:"currentColor"})}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_1479_25070",children:(0,t.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})],72064),e.s(["RunModal",0,({isOpen:e,onClose:c,onExecute:d,type:h,title:f,params:p,RunForm:g})=>{let[m,v]=(0,K.useState)(p??{}),[b,y]=(0,K.useState)(!1),[x,w]=(0,K.useState)(!1),_={value_diff:"https://docs.datarecce.io/features/lineage/#value-diff",profile_diff:"https://docs.datarecce.io/features/lineage/#profile-diff",histogram_diff:"https://docs.datarecce.io/features/lineage/#histogram-diff",top_k_diff:"https://docs.datarecce.io/features/lineage/#top-k-diff"}[h]||null;return(0,t.jsx)(o.Dialog.Root,{open:e,onOpenChange:c,size:"xl",scrollBehavior:"inside",children:(0,t.jsxs)(ek.Portal,{children:[(0,t.jsx)(o.Dialog.Backdrop,{}),(0,t.jsx)(o.Dialog.Positioner,{children:(0,t.jsxs)(o.Dialog.Content,{overflowY:"auto",height:"75%",minHeight:"400px",children:[(0,t.jsxs)(o.Dialog.Header,{children:[(0,t.jsxs)(o.Dialog.Title,{display:"flex",alignItems:"center",children:[f," ",_&&(0,t.jsxs)(eC.Root,{positioning:{placement:"bottom-end"},open:b,onFocusOutside:()=>{y(!1)},children:[(0,t.jsx)(eC.Trigger,{asChild:!0,children:(0,t.jsx)(l.IconButton,{display:"flex",size:"sm",variant:"plain","aria-label":"Click this button to learn more about the SQL behind",onMouseEnter:()=>{y(!0)},onClick:()=>window.open(_,"_blank"),onFocus:e=>{e.preventDefault()},children:(0,t.jsx)(s.Icon,{verticalAlign:"middle",as:eS,boxSize:"16px"})})}),(0,t.jsx)(eC.Positioner,{children:(0,t.jsx)(eC.Content,{bg:"black",color:"white",children:(0,t.jsxs)(eC.Body,{fontSize:"sm",p:2,children:["Click"," ",(0,t.jsx)(u.Link,{href:_,target:"_blank",textDecoration:"underline",color:"white",_hover:{color:"blue.300"},children:"here"})," ","to learn more about the SQL behind"]})})})]})]}),(0,t.jsx)(o.Dialog.CloseTrigger,{asChild:!0,children:(0,t.jsx)(i.CloseButton,{size:"sm"})})]}),(0,t.jsx)(o.Dialog.Body,{p:"0px",h:"100%",overflow:"auto",borderY:"1px solid lightgray",children:(0,t.jsx)(r.Box,{style:{contain:"layout"},children:g&&(0,t.jsx)(g,{params:m,onParamsChanged:v,setIsReadyToExecute:w})})}),(0,t.jsx)(o.Dialog.Footer,{children:(0,t.jsx)(a.Flex,{gap:"10px",children:(0,t.jsx)(n.Button,{disabled:!x,colorPalette:"blue",onClick:()=>{d(h,m)},children:"Execute"})})})]})})]})})}],76452)},74992,e=>{"use strict";var t=e.i(64789),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n=t.default.createContext&&t.default.createContext(r),i=["attr","size","title"];function o(){return(o=Object.assign.bind()).apply(this,arguments)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e){return r=>t.default.createElement(u,o({attr:s({},e.attr)},r),function e(r){return r&&r.map((r,n)=>t.default.createElement(r.tag,s({key:n},r.attr),e(r.child)))}(e.child))}function u(e){var a=r=>{var n,{attr:a,size:l,title:u}=e,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,i),d=l||r.size||"1em";return r.className&&(n=r.className),e.className&&(n=(n?n+" ":"")+e.className),t.default.createElement("svg",o({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,c,{className:n,style:s(s({color:e.color||r.color},r.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),u&&t.default.createElement("title",null,u),e.children)};return void 0!==n?t.default.createElement(n.Consumer,null,e=>a(e)):a(r)}e.s(["GenIcon",()=>l],74992)},6033,94444,e=>{"use strict";var t=e.i(74992);function r(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},child:[]},{tag:"path",attr:{d:"M9 17h-2"},child:[]},{tag:"path",attr:{d:"M13 12h-6"},child:[]},{tag:"path",attr:{d:"M11 7h-4"},child:[]}]})(e)}function n(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M7 12h3l3.5 6h3.5"},child:[]},{tag:"path",attr:{d:"M17 6h-3.5l-3.5 6"},child:[]}]})(e)}function i(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 3v18h18"},child:[]},{tag:"path",attr:{d:"M20 18v3"},child:[]},{tag:"path",attr:{d:"M16 16v5"},child:[]},{tag:"path",attr:{d:"M12 13v8"},child:[]},{tag:"path",attr:{d:"M8 16v5"},child:[]},{tag:"path",attr:{d:"M3 11c6 0 5 -5 9 -5s3 5 9 5"},child:[]}]})(e)}function o(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9.615 20h-2.615a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8"},child:[]},{tag:"path",attr:{d:"M14 19l2 2l4 -4"},child:[]},{tag:"path",attr:{d:"M9 8h4"},child:[]},{tag:"path",attr:{d:"M9 12h2"},child:[]}]})(e)}function a(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1"},child:[]},{tag:"path",attr:{d:"M9 15l3 -3l3 3"},child:[]},{tag:"path",attr:{d:"M12 12l0 9"},child:[]}]})(e)}function s(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},child:[]},{tag:"path",attr:{d:"M11.192 17.966c-3.242 -.28 -5.972 -2.269 -8.192 -5.966c2.4 -4 5.4 -6 9 -6c3.326 0 6.14 1.707 8.442 5.122"},child:[]},{tag:"path",attr:{d:"M18.42 15.61a2.1 2.1 0 0 1 2.97 2.97l-3.39 3.42h-3v-3l3.42 -3.39z"},child:[]}]})(e)}function l(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},child:[]},{tag:"path",attr:{d:"M12 18c-.328 0 -.652 -.017 -.97 -.05c-3.172 -.332 -5.85 -2.315 -8.03 -5.95c2.4 -4 5.4 -6 9 -6c3.465 0 6.374 1.853 8.727 5.558"},child:[]},{tag:"path",attr:{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M20.2 20.2l1.8 1.8"},child:[]}]})(e)}function u(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M5 12l14 0"},child:[]}]})(e)}function c(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"},child:[]},{tag:"path",attr:{d:"M17 8v8h4"},child:[]},{tag:"path",attr:{d:"M13 15l1 1"},child:[]},{tag:"path",attr:{d:"M3 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"},child:[]}]})(e)}e.s(["TbAlignBoxLeftStretch",()=>r,"TbBrandStackshare",()=>n,"TbChartHistogram",()=>i,"TbChecklist",()=>o,"TbCloudUpload",()=>a,"TbEyeEdit",()=>s,"TbEyeSearch",()=>l,"TbPlus",()=>u,"TbSql",()=>c],6033),e.s([],94444)},73465,40292,32363,69350,e=>{"use strict";e.s([],85952),e.i(85952);var t=e.i(39414);let[r,n]=(0,t.createContext)({name:"FieldContext",hookName:"useFieldContext",providerName:"<FieldProvider />",strict:!1});e.s(["FieldProvider",()=>r,"useFieldContext",()=>n],40292);let i=e=>e.children(n());var o=e.i(15839),a=e.i(52713),s=e.i(64789),l=e.i(63761);let u=(0,s.forwardRef)((e,t)=>{let r=n(),i=(0,a.mergeProps)(r.getErrorTextProps(),e);return r?.invalid?(0,o.jsx)(l.ark.span,{...i,ref:t}):null});u.displayName="FieldErrorText";let c=(0,s.forwardRef)((e,t)=>{let r=n(),i=(0,a.mergeProps)(r?.getHelperTextProps(),e);return(0,o.jsx)(l.ark.span,{...i,ref:t})});c.displayName="FieldHelperText";let d=(0,s.forwardRef)((e,t)=>{let r=n(),i=(0,a.mergeProps)(r?.getInputProps(),e);return(0,o.jsx)(l.ark.input,{...i,ref:t})});d.displayName="FieldInput";let h=(0,s.forwardRef)((e,t)=>{let r=n(),i=(0,a.mergeProps)(r?.getLabelProps(),e);return(0,o.jsx)(l.ark.label,{...i,ref:t})});h.displayName="FieldLabel";let f=(0,s.forwardRef)(({fallback:e,...t},r)=>{let i=n();if(!i.required)return e;let s=(0,a.mergeProps)(i.getRequiredIndicatorProps(),t);return(0,o.jsx)(l.ark.span,{...s,ref:r,children:t.children??"*"})});f.displayName="FieldRequiredIndicator";var p=e.i(24074),g=e.i(46067),m=e.i(92109),v=e.i(21173);let b="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,[y,x]=(0,t.createContext)({name:"FieldsetContext",hookName:"useFieldsetContext",providerName:"<FieldsetProvider />",strict:!1}),w=(0,e.i(94548).createAnatomy)("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator"),_=w.build();e.s(["fieldAnatomy",()=>w,"parts",()=>_],32363);let C=(0,s.forwardRef)((e,t)=>{let[n,i]=(0,g.createSplitProps)()(e,["id","ids","disabled","invalid","readOnly","required"]),u=((e={})=>{let t=x(),r=(0,v.useEnvironmentContext)(),{ids:n,disabled:i=!!t?.disabled,invalid:o=!1,readOnly:a=!1,required:l=!1}=e,[u,c]=(0,s.useState)(!1),[d,h]=(0,s.useState)(!1),f=(0,s.useId)(),p=e.id??f,g=(0,s.useRef)(null),y=n?.control??`field::${p}`,w=n?.errorText??`field::${p}::error-text`,C=n?.helperText??`field::${p}::helper-text`,k=n?.label??`field::${p}::label`;b(()=>{let e=g.current;if(!e)return;let t=()=>{let e=r.getRootNode();c(!!e.getElementById(w)),h(!!e.getElementById(C))};t();let n=new(r.getWindow()).MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[r,w,C]);let S=(0,s.useMemo)(()=>{let e=[];return u&&o&&e.push(w),d&&e.push(C),e.join(" ")||void 0},[o,w,C,u,d]),E=(0,s.useMemo)(()=>()=>({..._.root.attrs,id:y,ref:g,role:"group","data-disabled":(0,m.dataAttr)(i),"data-invalid":(0,m.dataAttr)(o),"data-readonly":(0,m.dataAttr)(a)}),[i,o,a,y]),O=(0,s.useMemo)(()=>()=>({..._.label.attrs,id:k,"data-disabled":(0,m.dataAttr)(i),"data-invalid":(0,m.dataAttr)(o),"data-readonly":(0,m.dataAttr)(a),"data-required":(0,m.dataAttr)(l),htmlFor:p}),[i,o,a,l,p,k]),I=(0,s.useMemo)(()=>()=>({"aria-describedby":S,"aria-invalid":(0,m.ariaAttr)(o),"data-invalid":(0,m.dataAttr)(o),"data-required":(0,m.dataAttr)(l),"data-readonly":(0,m.dataAttr)(a),id:p,required:l,disabled:i,readOnly:a}),[S,o,l,a,p,i]),P=(0,s.useMemo)(()=>()=>({...I(),..._.input.attrs}),[I]),T=(0,s.useMemo)(()=>()=>({...I(),..._.textarea.attrs}),[I]),R=(0,s.useMemo)(()=>()=>({...I(),..._.select.attrs}),[I]),A=(0,s.useMemo)(()=>()=>({id:C,..._.helperText.attrs,"data-disabled":(0,m.dataAttr)(i)}),[i,C]),M=(0,s.useMemo)(()=>()=>({id:w,..._.errorText.attrs,"aria-live":"polite"}),[w]);return{ariaDescribedby:S,ids:{root:y,control:p,label:k,errorText:w,helperText:C},refs:{rootRef:g},disabled:i,invalid:o,readOnly:a,required:l,getLabelProps:O,getRootProps:E,getInputProps:P,getTextareaProps:T,getSelectProps:R,getHelperTextProps:A,getErrorTextProps:M,getRequiredIndicatorProps:(0,s.useMemo)(()=>()=>({"aria-hidden":!0,..._.requiredIndicator.attrs}),[])}})(n),c=(0,a.mergeProps)(u.getRootProps(),i);return(0,o.jsx)(r,{value:u,children:(0,o.jsx)(l.ark.div,{...c,ref:(0,p.composeRefs)(t,u.refs.rootRef)})})});C.displayName="FieldRoot";let k=(0,s.forwardRef)((e,t)=>{let[{value:n},i]=(0,g.createSplitProps)()(e,["value"]),s=(0,a.mergeProps)(n.getRootProps(),i);return(0,o.jsx)(r,{value:n,children:(0,o.jsx)(l.ark.div,{...s,ref:t})})});k.displayName="FieldRootProvider";let S=(0,s.forwardRef)((e,t)=>{let r=n(),i=(0,a.mergeProps)(r?.getSelectProps(),e);return(0,o.jsx)(l.ark.select,{...i,ref:t})});function E(e){var t;if(!e)return;let r=(0,m.getDocument)(e),n=(0,m.getWindow)(e),i=((t=r.createElement("div")).id="ghost",t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",r.body.appendChild(t),t),o=function(e){if(!e)return;let t=(0,m.getComputedStyle)(e);return"box-sizing:"+t.boxSizing+";border-left:"+t.borderLeftWidth+" solid red;border-right:"+t.borderRightWidth+" solid red;font-family:"+t.fontFamily+";font-feature-settings:"+t.fontFeatureSettings+";font-kerning:"+t.fontKerning+";font-size:"+t.fontSize+";font-stretch:"+t.fontStretch+";font-style:"+t.fontStyle+";font-variant:"+t.fontVariant+";font-variant-caps:"+t.fontVariantCaps+";font-variant-ligatures:"+t.fontVariantLigatures+";font-variant-numeric:"+t.fontVariantNumeric+";font-weight:"+t.fontWeight+";letter-spacing:"+t.letterSpacing+";margin-left:"+t.marginLeft+";margin-right:"+t.marginRight+";padding-left:"+t.paddingLeft+";padding-right:"+t.paddingRight+";text-indent:"+t.textIndent+";text-transform:"+t.textTransform}(e);function a(){n.requestAnimationFrame(()=>{i.innerHTML=e.value;let t=n.getComputedStyle(i);e?.style.setProperty("width",t.width)})}return o&&(i.style.cssText+=o),a(),e?.addEventListener("input",a),e?.addEventListener("change",a),()=>{r.body.removeChild(i),e?.removeEventListener("input",a),e?.removeEventListener("change",a)}}S.displayName="FieldSelect";var O=e=>{if(!e)return;let t=(0,m.getComputedStyle)(e),r=(0,m.getWindow)(e),n=(0,m.getDocument)(e),i=()=>{requestAnimationFrame(()=>{let r;e.style.height="auto",r="content-box"===t.boxSizing?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),"none"!==t.maxHeight&&r>parseFloat(t.maxHeight)?("hidden"===t.overflowY&&(e.style.overflowY="scroll"),r=parseFloat(t.maxHeight)):"hidden"!==t.overflowY&&(e.style.overflowY="hidden"),e.style.height=`${r}px`})};e.addEventListener("input",i),e.form?.addEventListener("reset",i);let o=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value");Object.defineProperty(e,"value",{...o,set(){o?.set?.apply(this,arguments),i()}});let a=new r.ResizeObserver(()=>{requestAnimationFrame(()=>i())});a.observe(e);let s=new r.MutationObserver(()=>i());return s.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),n.fonts?.addEventListener("loadingdone",i),()=>{e.removeEventListener("input",i),e.form?.removeEventListener("reset",i),n.fonts?.removeEventListener("loadingdone",i),a.disconnect(),s.disconnect()}};e.s(["autoResizeInput",()=>E,"autoresizeTextarea",()=>O],69350);let I=(0,s.forwardRef)((e,t)=>{let{autoresize:r,...i}=e,u=(0,s.useRef)(null),c=n(),d=(0,a.mergeProps)(c?.getTextareaProps(),{style:{resize:r?"none":void 0}},i);return(0,s.useEffect)(()=>{if(r)return O(u.current)},[r]),(0,o.jsx)(l.ark.textarea,{...d,ref:(0,p.composeRefs)(t,u)})});I.displayName="FieldTextarea",e.s(["Context",()=>i,"ErrorText",()=>u,"HelperText",()=>c,"Input",()=>d,"Label",()=>h,"RequiredIndicator",()=>f,"Root",()=>C,"RootProvider",()=>k,"Select",()=>S,"Textarea",()=>I],98324);var P=e.i(98324);e.s(["Field",0,P],73465)},28337,(e,t,r)=>{(function(){var n,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=1/0,l=0/0,u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",d="[object Array]",h="[object Boolean]",f="[object Date]",p="[object Error]",g="[object Function]",m="[object GeneratorFunction]",v="[object Map]",b="[object Number]",y="[object Object]",x="[object Promise]",w="[object RegExp]",_="[object Set]",C="[object String]",k="[object Symbol]",S="[object WeakMap]",E="[object ArrayBuffer]",O="[object DataView]",I="[object Float32Array]",P="[object Float64Array]",T="[object Int8Array]",R="[object Int16Array]",A="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",L="[object Uint32Array]",V=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,j=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,H=RegExp(z.source),W=RegExp(B.source),U=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,Q=RegExp(X.source),Z=/^\s+/,J=/\s/,ee=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,et=/\{\n\/\* \[wrapped with (.+)\] \*/,er=/,? & /,en=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ei=/[()=,{}\[\]\/\s]/,eo=/\\(\\)?/g,ea=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,el=/^[-+]0x[0-9a-f]+$/i,eu=/^0b[01]+$/i,ec=/^\[object .+?Constructor\]$/,ed=/^0o[0-7]+$/i,eh=/^(?:0|[1-9]\d*)$/,ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ep=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,em="\ud800-\udfff",ev="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",eb="\\u2700-\\u27bf",ey="a-z\\xdf-\\xf6\\xf8-\\xff",ex="A-Z\\xc0-\\xd6\\xd8-\\xde",ew="\\ufe0e\\ufe0f",e_="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eC="['’]",ek="["+e_+"]",eS="["+ev+"]",eE="["+ey+"]",eO="[^"+em+e_+"\\d+"+eb+ey+ex+"]",eI="\ud83c[\udffb-\udfff]",eP="[^"+em+"]",eT="(?:\ud83c[\udde6-\uddff]){2}",eR="[\ud800-\udbff][\udc00-\udfff]",eA="["+ex+"]",eM="\\u200d",eN="(?:"+eE+"|"+eO+")",eD="(?:"+eA+"|"+eO+")",eL="(?:"+eC+"(?:d|ll|m|re|s|t|ve))?",eV="(?:"+eC+"(?:D|LL|M|RE|S|T|VE))?",eF="(?:"+eS+"|"+eI+")?",ej="["+ew+"]?",ez="(?:"+eM+"(?:"+[eP,eT,eR].join("|")+")"+ej+eF+")*",eB=ej+eF+ez,eH="(?:"+["["+eb+"]",eT,eR].join("|")+")"+eB,eW="(?:"+[eP+eS+"?",eS,eT,eR,"["+em+"]"].join("|")+")",eU=RegExp(eC,"g"),e$=RegExp(eS,"g"),eq=RegExp(eI+"(?="+eI+")|"+eW+eB,"g"),eG=RegExp([eA+"?"+eE+"+"+eL+"(?="+[ek,eA,"$"].join("|")+")",eD+"+"+eV+"(?="+[ek,eA+eN,"$"].join("|")+")",eA+"?"+eN+"+"+eL,eA+"+"+eV,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eH].join("|"),"g"),eK=RegExp("["+eM+em+ev+ew+"]"),eY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eX=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eQ=-1,eZ={};eZ[I]=eZ[P]=eZ[T]=eZ[R]=eZ[A]=eZ[M]=eZ[N]=eZ[D]=eZ[L]=!0,eZ[c]=eZ[d]=eZ[E]=eZ[h]=eZ[O]=eZ[f]=eZ[p]=eZ[g]=eZ[v]=eZ[b]=eZ[y]=eZ[w]=eZ[_]=eZ[C]=eZ[S]=!1;var eJ={};eJ[c]=eJ[d]=eJ[E]=eJ[O]=eJ[h]=eJ[f]=eJ[I]=eJ[P]=eJ[T]=eJ[R]=eJ[A]=eJ[v]=eJ[b]=eJ[y]=eJ[w]=eJ[_]=eJ[C]=eJ[k]=eJ[M]=eJ[N]=eJ[D]=eJ[L]=!0,eJ[p]=eJ[g]=eJ[S]=!1;var e0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e1=parseFloat,e2=parseInt,e5=e.g&&e.g.Object===Object&&e.g,e3="object"==typeof self&&self&&self.Object===Object&&self,e4=e5||e3||Function("return this")(),e6=r&&!r.nodeType&&r,e8=e6&&t&&!t.nodeType&&t,e7=e8&&e8.exports===e6,e9=e7&&e5.process,te=function(){try{var e=e8&&e8.require&&e8.require("util").types;if(e)return e;return e9&&e9.binding&&e9.binding("util")}catch(e){}}(),tt=te&&te.isArrayBuffer,tr=te&&te.isDate,tn=te&&te.isMap,ti=te&&te.isRegExp,to=te&&te.isSet,ta=te&&te.isTypedArray;function ts(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function tl(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function tu(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function tc(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function td(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function th(e,t){return!!(null==e?0:e.length)&&t_(e,t,0)>-1}function tf(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function tp(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function tg(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function tm(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function tv(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function tb(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var ty=tE("length");function tx(e,t,r){var n;return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function tw(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return -1}function t_(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}(e,t,r):tw(e,tk,r)}function tC(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return -1}function tk(e){return e!=e}function tS(e,t){var r=null==e?0:e.length;return r?tP(e,t)/r:l}function tE(e){return function(t){return null==t?n:t[e]}}function tO(e){return function(t){return null==e?n:e[t]}}function tI(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}function tP(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);n!==a&&(r=n===r?a:r+a)}return r}function tT(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function tR(e){return e?e.slice(0,tG(e)+1).replace(Z,""):e}function tA(e){return function(t){return e(t)}}function tM(e,t){return tp(t,function(t){return e[t]})}function tN(e,t){return e.has(t)}function tD(e,t){for(var r=-1,n=e.length;++r<n&&t_(t,e[r],0)>-1;);return r}function tL(e,t){for(var r=e.length;r--&&t_(t,e[r],0)>-1;);return r}var tV=tO({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tF=tO({"&":"&","<":"<",">":">",'"':""","'":"'"});function tj(e){return"\\"+e0[e]}function tz(e){return eK.test(e)}function tB(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function tH(e,t){return function(r){return e(t(r))}}function tW(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];(s===t||s===a)&&(e[r]=a,o[i++]=r)}return o}function tU(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function t$(e){return tz(e)?function(e){for(var t=eq.lastIndex=0;eq.test(e);)++t;return t}(e):ty(e)}function tq(e){return tz(e)?e.match(eq)||[]:e.split("")}function tG(e){for(var t=e.length;t--&&J.test(e.charAt(t)););return t}var tK=tO({"&":"&","<":"<",">":">",""":'"',"'":"'"}),tY=function e(t){var r,J,em,ev,eb=(t=null==t?e4:tY.defaults(e4.Object(),t,tY.pick(e4,eX))).Array,ey=t.Date,ex=t.Error,ew=t.Function,e_=t.Math,eC=t.Object,ek=t.RegExp,eS=t.String,eE=t.TypeError,eO=eb.prototype,eI=ew.prototype,eP=eC.prototype,eT=t["__core-js_shared__"],eR=eI.toString,eA=eP.hasOwnProperty,eM=0,eN=(r=/[^.]+$/.exec(eT&&eT.keys&&eT.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",eD=eP.toString,eL=eR.call(eC),eV=e4._,eF=ek("^"+eR.call(eA).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ej=e7?t.Buffer:n,ez=t.Symbol,eB=t.Uint8Array,eH=ej?ej.allocUnsafe:n,eW=tH(eC.getPrototypeOf,eC),eq=eC.create,eK=eP.propertyIsEnumerable,e0=eO.splice,e5=ez?ez.isConcatSpreadable:n,e3=ez?ez.iterator:n,e6=ez?ez.toStringTag:n,e8=function(){try{var e=ip(eC,"defineProperty");return e({},"",{}),e}catch(e){}}(),e9=t.clearTimeout!==e4.clearTimeout&&t.clearTimeout,te=ey&&ey.now!==e4.Date.now&&ey.now,ty=t.setTimeout!==e4.setTimeout&&t.setTimeout,tO=e_.ceil,tX=e_.floor,tQ=eC.getOwnPropertySymbols,tZ=ej?ej.isBuffer:n,tJ=t.isFinite,t0=eO.join,t1=tH(eC.keys,eC),t2=e_.max,t5=e_.min,t3=ey.now,t4=t.parseInt,t6=e_.random,t8=eO.reverse,t7=ip(t,"DataView"),t9=ip(t,"Map"),re=ip(t,"Promise"),rt=ip(t,"Set"),rr=ip(t,"WeakMap"),rn=ip(eC,"create"),ri=rr&&new rr,ro={},ra=ij(t7),rs=ij(t9),rl=ij(re),ru=ij(rt),rc=ij(rr),rd=ez?ez.prototype:n,rh=rd?rd.valueOf:n,rf=rd?rd.toString:n;function rp(e){if(oK(e)&&!oV(e)&&!(e instanceof rb)){if(e instanceof rv)return e;if(eA.call(e,"__wrapped__"))return iz(e)}return new rv(e)}var rg=function(){function e(){}return function(t){if(!oG(t))return{};if(eq)return eq(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function rm(){}function rv(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function rb(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function ry(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rx(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function r_(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new rw;++t<r;)this.add(e[t])}function rC(e){var t=this.__data__=new rx(e);this.size=t.size}function rk(e,t){var r=oV(e),n=!r&&oL(e),i=!r&&!n&&oB(e),o=!r&&!n&&!i&&o2(e),a=r||n||i||o,s=a?tT(e.length,eS):[],l=s.length;for(var u in e)(t||eA.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||iw(u,l)))&&s.push(u);return s}function rS(e){var t=e.length;return t?e[nu(0,t-1)]:n}rp.templateSettings={escape:U,evaluate:$,interpolate:q,variable:"",imports:{_:rp}},rp.prototype=rm.prototype,rp.prototype.constructor=rp,rv.prototype=rg(rm.prototype),rv.prototype.constructor=rv,rb.prototype=rg(rm.prototype),rb.prototype.constructor=rb,ry.prototype.clear=function(){this.__data__=rn?rn(null):{},this.size=0},ry.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},ry.prototype.get=function(e){var t=this.__data__;if(rn){var r=t[e];return r===o?n:r}return eA.call(t,e)?t[e]:n},ry.prototype.has=function(e){var t=this.__data__;return rn?t[e]!==n:eA.call(t,e)},ry.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=rn&&n===t?o:t,this},rx.prototype.clear=function(){this.__data__=[],this.size=0},rx.prototype.delete=function(e){var t=this.__data__,r=rI(t,e);return!(r<0)&&(r==t.length-1?t.pop():e0.call(t,r,1),--this.size,!0)},rx.prototype.get=function(e){var t=this.__data__,r=rI(t,e);return r<0?n:t[r][1]},rx.prototype.has=function(e){return rI(this.__data__,e)>-1},rx.prototype.set=function(e,t){var r=this.__data__,n=rI(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},rw.prototype.clear=function(){this.size=0,this.__data__={hash:new ry,map:new(t9||rx),string:new ry}},rw.prototype.delete=function(e){var t=id(this,e).delete(e);return this.size-=!!t,t},rw.prototype.get=function(e){return id(this,e).get(e)},rw.prototype.has=function(e){return id(this,e).has(e)},rw.prototype.set=function(e,t){var r=id(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},r_.prototype.add=r_.prototype.push=function(e){return this.__data__.set(e,o),this},r_.prototype.has=function(e){return this.__data__.has(e)};function rE(e,t,r){(n===r||oM(e[t],r))&&(n!==r||t in e)||rR(e,t,r)}function rO(e,t,r){var i=e[t];eA.call(e,t)&&oM(i,r)&&(n!==r||t in e)||rR(e,t,r)}function rI(e,t){for(var r=e.length;r--;)if(oM(e[r][0],t))return r;return -1}function rP(e,t,r,n){return rF(e,function(e,i,o){t(n,e,r(e),o)}),n}function rT(e,t){return e&&nB(t,ap(t),e)}function rR(e,t,r){"__proto__"==t&&e8?e8(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rA(e,t){for(var r=-1,i=t.length,o=eb(i),a=null==e;++r<i;)o[r]=a?n:au(e,t[r]);return o}function rM(e,t,r){return e==e&&(n!==r&&(e=e<=r?e:r),n!==t&&(e=e>=t?e:t)),e}function rN(e,t,r,i,o,a){var s,l=1&t,u=2&t,d=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),n!==s)return s;if(!oG(e))return e;var p=oV(e);if(p){if(S=(x=e).length,V=new x.constructor(S),S&&"string"==typeof x[0]&&eA.call(x,"index")&&(V.index=x.index,V.input=x.input),s=V,!l)return nz(e,s)}else{var x,S,V,F,j,z,B,H,W=iv(e),U=W==g||W==m;if(oB(e))return nN(e,l);if(W==y||W==c||U&&!o){if(s=u||U?{}:iy(e),!l){return u?(F=e,j=(H=s)&&nB(e,ag(e),H),nB(F,im(F),j)):(z=e,B=rT(s,e),nB(z,ig(z),B))}}else{if(!eJ[W])return o?e:{};s=function(e,t,r){var n,i,o=e.constructor;switch(t){case E:return nD(e);case h:case f:return new o(+e);case O:return n=r?nD(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength);case I:case P:case T:case R:case A:case M:case N:case D:case L:return nL(e,r);case v:return new o;case b:case C:return new o(e);case w:return(i=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,i;case _:return new o;case k:return rh?eC(rh.call(e)):{}}}(e,W,l)}}a||(a=new rC);var $=a.get(e);if($)return $;a.set(e,s),oJ(e)?e.forEach(function(n){s.add(rN(n,t,r,n,e,a))}):oY(e)&&e.forEach(function(n,i){s.set(i,rN(n,t,r,i,e,a))});var q=d?u?ia:io:u?ag:ap,G=p?n:q(e);return tu(G||e,function(n,i){G&&(n=e[i=n]),rO(s,i,rN(n,t,r,i,e,a))}),s}function rD(e,t,r){var i=r.length;if(null==e)return!i;for(e=eC(e);i--;){var o=r[i],a=t[o],s=e[o];if(n===s&&!(o in e)||!a(s))return!1}return!0}function rL(e,t,r){if("function"!=typeof e)throw new eE(i);return iA(function(){e.apply(n,r)},t)}function rV(e,t,r,n){var i=-1,o=th,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=tp(t,tA(r))),n?(o=tf,a=!1):t.length>=200&&(o=tN,a=!1,t=new r_(t));e:for(;++i<s;){var c=e[i],d=null==r?c:r(c);if(c=n||0!==c?c:0,a&&d==d){for(var h=u;h--;)if(t[h]===d)continue e;l.push(c)}else o(t,d,n)||l.push(c)}return l}rC.prototype.clear=function(){this.__data__=new rx,this.size=0},rC.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},rC.prototype.get=function(e){return this.__data__.get(e)},rC.prototype.has=function(e){return this.__data__.has(e)},rC.prototype.set=function(e,t){var r=this.__data__;if(r instanceof rx){var n=r.__data__;if(!t9||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new rw(n)}return r.set(e,t),this.size=r.size,this};var rF=nU(rq),rj=nU(rG,!0);function rz(e,t){var r=!0;return rF(e,function(e,n,i){return r=!!t(e,n,i)}),r}function rB(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(n===l?s==s&&!o1(s):r(s,l)))var l=s,u=a}return u}function rH(e,t){var r=[];return rF(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function rW(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=ix),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?rW(s,t-1,r,n,i):tg(i,s):n||(i[i.length]=s)}return i}var rU=n$(),r$=n$(!0);function rq(e,t){return e&&rU(e,t,ap)}function rG(e,t){return e&&r$(e,t,ap)}function rK(e,t){return td(t,function(t){return oU(e[t])})}function rY(e,t){t=nR(t,e);for(var r=0,i=t.length;null!=e&&r<i;)e=e[iF(t[r++])];return r&&r==i?e:n}function rX(e,t,r){var n=t(e);return oV(e)?n:tg(n,r(e))}function rQ(e){var t;return null==e?n===e?"[object Undefined]":"[object Null]":e6&&e6 in eC(e)?function(e){var t=eA.call(e,e6),r=e[e6];try{e[e6]=n;var i=!0}catch(e){}var o=eD.call(e);return i&&(t?e[e6]=r:delete e[e6]),o}(e):(t=e,eD.call(t))}function rZ(e,t){return e>t}function rJ(e,t){return null!=e&&eA.call(e,t)}function r0(e,t){return null!=e&&t in eC(e)}function r1(e,t,r){for(var i=r?tf:th,o=e[0].length,a=e.length,s=a,l=eb(a),u=1/0,c=[];s--;){var d=e[s];s&&t&&(d=tp(d,tA(t))),u=t5(d.length,u),l[s]=!r&&(t||o>=120&&d.length>=120)?new r_(s&&d):n}d=e[0];var h=-1,f=l[0];e:for(;++h<o&&c.length<u;){var p=d[h],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?tN(f,g):i(c,g,r))){for(s=a;--s;){var m=l[s];if(!(m?tN(m,g):i(e[s],g,r)))continue e}f&&f.push(g),c.push(p)}}return c}function r2(e,t,r){t=nR(t,e);var i=null==(e=iP(e,t))?e:e[iF(iQ(t))];return null==i?n:ts(i,e,r)}function r5(e){return oK(e)&&rQ(e)==c}function r3(e,t,r,i,o){return e===t||(null!=e&&null!=t&&(oK(e)||oK(t))?function(e,t,r,i,o,a){var s=oV(e),l=oV(t),u=s?d:iv(e),g=l?d:iv(t);u=u==c?y:u,g=g==c?y:g;var m=u==y,x=g==y,S=u==g;if(S&&oB(e)){if(!oB(t))return!1;s=!0,m=!1}if(S&&!m)return a||(a=new rC),s||o2(e)?ir(e,t,r,i,o,a):function(e,t,r,n,i,o,a){switch(r){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case E:if(e.byteLength!=t.byteLength||!o(new eB(e),new eB(t)))break;return!0;case h:case f:case b:return oM(+e,+t);case p:return e.name==t.name&&e.message==t.message;case w:case C:return e==t+"";case v:var s=tB;case _:var l=1&n;if(s||(s=tU),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var c=ir(s(e),s(t),n,i,o,a);return a.delete(e),c;case k:if(rh)return rh.call(e)==rh.call(t)}return!1}(e,t,u,r,i,o,a);if(!(1&r)){var I=m&&eA.call(e,"__wrapped__"),P=x&&eA.call(t,"__wrapped__");if(I||P){var T=I?e.value():e,R=P?t.value():t;return a||(a=new rC),o(T,R,r,i,a)}}return!!S&&(a||(a=new rC),function(e,t,r,i,o,a){var s=1&r,l=io(e),u=l.length;if(u!=io(t).length&&!s)return!1;for(var c=u;c--;){var d=l[c];if(!(s?d in t:eA.call(t,d)))return!1}var h=a.get(e),f=a.get(t);if(h&&f)return h==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++c<u;){var m=e[d=l[c]],v=t[d];if(i)var b=s?i(v,m,d,t,e,a):i(m,v,d,e,t,a);if(!(n===b?m===v||o(m,v,r,i,a):b)){p=!1;break}g||(g="constructor"==d)}if(p&&!g){var y=e.constructor,x=t.constructor;y!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x)&&(p=!1)}return a.delete(e),a.delete(t),p}(e,t,r,i,o,a))}(e,t,r,i,r3,o):e!=e&&t!=t)}function r4(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=eC(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var u=(l=r[o])[0],c=e[u],d=l[1];if(s&&l[2]){if(n===c&&!(u in e))return!1}else{var h=new rC;if(i)var f=i(c,d,u,e,t,h);if(!(n===f?r3(d,c,3,i,h):f))return!1}}return!0}function r6(e){var t;return!(!oG(e)||(t=e,eN&&eN in t))&&(oU(e)?eF:ec).test(ij(e))}function r8(e){return"function"==typeof e?e:null==e?az:"object"==typeof e?oV(e)?nr(e[0],e[1]):nt(e):aY(e)}function r7(e){if(!iE(e))return t1(e);var t=[];for(var r in eC(e))eA.call(e,r)&&"constructor"!=r&&t.push(r);return t}function r9(e,t){return e<t}function ne(e,t){var r=-1,n=oj(e)?eb(e.length):[];return rF(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function nt(e){var t=ih(e);return 1==t.length&&t[0][2]?iO(t[0][0],t[0][1]):function(r){return r===e||r4(r,e,t)}}function nr(e,t){var r;return iC(e)&&(r=t)==r&&!oG(r)?iO(iF(e),t):function(r){var i=au(r,e);return n===i&&i===t?ac(r,e):r3(t,i,3)}}function nn(e,t,r,i,o){e!==t&&rU(t,function(a,s){if(o||(o=new rC),oG(a))!function(e,t,r,i,o,a,s){var l=iT(e,r),u=iT(t,r),c=s.get(u);if(c)return rE(e,r,c);var d=a?a(l,u,r+"",e,t,s):n,h=n===d;if(h){var f=oV(u),p=!f&&oB(u),g=!f&&!p&&o2(u);d=u,f||p||g?oV(l)?d=l:oz(l)?d=nz(l):p?(h=!1,d=nN(u,!0)):g?(h=!1,d=nL(u,!0)):d=[]:oQ(u)||oL(u)?(d=l,oL(l)?d=ae(l):(!oG(l)||oU(l))&&(d=iy(u))):h=!1}h&&(s.set(u,d),o(d,u,i,a,s),s.delete(u)),rE(e,r,d)}(e,t,s,r,nn,i,o);else{var l=i?i(iT(e,s),a,s+"",e,t,o):n;n===l&&(l=a),rE(e,s,l)}},ag)}function ni(e,t){var r=e.length;if(r)return iw(t+=t<0?r:0,r)?e[t]:n}function no(e,t,r){t=t.length?tp(t,function(e){return oV(e)?function(t){return rY(t,1===e.length?e[0]:e)}:e}):[az];var n=-1;t=tp(t,tA(ic()));var i=ne(e,function(e,r,i){return{criteria:tp(t,function(t){return t(e)}),index:++n,value:e}}),o=i.length;for(i.sort(function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var l=nV(i[n],o[n]);if(l){if(n>=s)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)});o--;)i[o]=i[o].value;return i}function na(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=rY(e,a);r(s,a)&&nh(o,nR(a,e),s)}return o}function ns(e,t,r,n){var i=n?tC:t_,o=-1,a=t.length,s=e;for(e===t&&(t=nz(t)),r&&(s=tp(e,tA(r)));++o<a;)for(var l=0,u=t[o],c=r?r(u):u;(l=i(s,c,l,n))>-1;)s!==e&&e0.call(s,l,1),e0.call(e,l,1);return e}function nl(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;iw(i)?e0.call(e,i,1):nC(e,i)}}return e}function nu(e,t){return e+tX(t6()*(t-e+1))}function nc(e,t){var r="";if(!e||t<1||t>0x1fffffffffffff)return r;do t%2&&(r+=e),(t=tX(t/2))&&(e+=e);while(t)return r}function nd(e,t){return iM(iI(e,t,az),e+"")}function nh(e,t,r,i){if(!oG(e))return e;t=nR(t,e);for(var o=-1,a=t.length,s=a-1,l=e;null!=l&&++o<a;){var u=iF(t[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)break;if(o!=s){var d=l[u];c=i?i(d,u,l):n,n===c&&(c=oG(d)?d:iw(t[o+1])?[]:{})}rO(l,u,c),l=l[u]}return e}var nf=ri?function(e,t){return ri.set(e,t),e}:az,np=e8?function(e,t){return e8(e,"toString",{configurable:!0,enumerable:!1,value:aV(t),writable:!0})}:az;function ng(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=eb(i);++n<i;)o[n]=e[n+t];return o}function nm(e,t){var r;return rF(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function nv(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=0x7fffffff){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!o1(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return nb(e,t,az,r)}function nb(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,u=o1(t),c=n===t;o<a;){var d=tX((o+a)/2),h=r(e[d]),f=n!==h,p=null===h,g=h==h,m=o1(h);if(s)var v=i||g;else v=c?g&&(i||f):l?g&&f&&(i||!p):u?g&&f&&!p&&(i||!m):!p&&!m&&(i?h<=t:h<t);v?o=d+1:a=d}return t5(a,0xfffffffe)}function ny(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!oM(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function nx(e){return"number"==typeof e?e:o1(e)?l:+e}function nw(e){if("string"==typeof e)return e;if(oV(e))return tp(e,nw)+"";if(o1(e))return rf?rf.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}function n_(e,t,r){var n=-1,i=th,o=e.length,a=!0,s=[],l=s;if(r)a=!1,i=tf;else if(o>=200){var u=t?null:n6(e);if(u)return tU(u);a=!1,i=tN,l=new r_}else l=t?[]:s;e:for(;++n<o;){var c=e[n],d=t?t(c):c;if(c=r||0!==c?c:0,a&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(c)}else i(l,d,r)||(l!==s&&l.push(d),s.push(c))}return s}function nC(e,t){return t=nR(t,e),null==(e=iP(e,t))||delete e[iF(iQ(t))]}function nk(e,t,r,n){return nh(e,t,r(rY(e,t)),n)}function nS(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ng(e,n?0:o,n?o+1:i):ng(e,n?o+1:0,n?i:o)}function nE(e,t){var r=e;return r instanceof rb&&(r=r.value()),tm(t,function(e,t){return t.func.apply(t.thisArg,tg([e],t.args))},r)}function nO(e,t,r){var n=e.length;if(n<2)return n?n_(e[0]):[];for(var i=-1,o=eb(n);++i<n;)for(var a=e[i],s=-1;++s<n;)s!=i&&(o[i]=rV(o[i]||a,e[s],t,r));return n_(rW(o,1),t,r)}function nI(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function nP(e){return oz(e)?e:[]}function nT(e){return"function"==typeof e?e:az}function nR(e,t){return oV(e)?e:iC(e,t)?[e]:iV(at(e))}function nA(e,t,r){var i=e.length;return r=n===r?i:r,!t&&r>=i?e:ng(e,t,r)}var nM=e9||function(e){return e4.clearTimeout(e)};function nN(e,t){if(t)return e.slice();var r=e.length,n=eH?eH(r):new e.constructor(r);return e.copy(n),n}function nD(e){var t=new e.constructor(e.byteLength);return new eB(t).set(new eB(e)),t}function nL(e,t){var r=t?nD(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function nV(e,t){if(e!==t){var r=n!==e,i=null===e,o=e==e,a=o1(e),s=n!==t,l=null===t,u=t==t,c=o1(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!r&&u||!o)return 1;if(!i&&!a&&!c&&e<t||c&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!u)return -1}return 0}function nF(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,l=t.length,u=t2(o-a,0),c=eb(l+u),d=!n;++s<l;)c[s]=t[s];for(;++i<a;)(d||i<o)&&(c[r[i]]=e[i]);for(;u--;)c[s++]=e[i++];return c}function nj(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,l=-1,u=t.length,c=t2(o-s,0),d=eb(c+u),h=!n;++i<c;)d[i]=e[i];for(var f=i;++l<u;)d[f+l]=t[l];for(;++a<s;)(h||i<o)&&(d[f+r[a]]=e[i++]);return d}function nz(e,t){var r=-1,n=e.length;for(t||(t=eb(n));++r<n;)t[r]=e[r];return t}function nB(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=i?i(r[l],e[l],l,r,e):n;n===u&&(u=e[l]),o?rR(r,l,u):rO(r,l,u)}return r}function nH(e,t){return function(r,n){var i=oV(r)?tl:rP,o=t?t():{};return i(r,e,ic(n,2),o)}}function nW(e){return nd(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&i_(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=eC(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function nU(e,t){return function(r,n){if(null==r)return r;if(!oj(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=eC(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function n$(e){return function(t,r,n){for(var i=-1,o=eC(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}function nq(e){return function(t){var r=tz(t=at(t))?tq(t):n,i=r?r[0]:t.charAt(0),o=r?nA(r,1).join(""):t.slice(1);return i[e]()+o}}function nG(e){return function(t){return tm(aN(aE(t).replace(eU,"")),e,"")}}function nK(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=rg(e.prototype),n=e.apply(r,t);return oG(n)?n:r}}function nY(e){return function(t,r,i){var o=eC(t);if(!oj(t)){var a=ic(r,3);t=ap(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function nX(e){return ii(function(t){var r=t.length,o=r,a=rv.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new eE(i);if(a&&!l&&"wrapper"==il(s))var l=new rv([],!0)}for(o=l?o:r;++o<r;){var u=il(s=t[o]),c="wrapper"==u?is(s):n;l=c&&ik(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[il(c[0])].apply(l,c[3]):1==s.length&&ik(s)?l[u]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&oV(n))return l.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}function nQ(e,t,r,i,o,a,s,l,u,c){var d=128&t,h=1&t,f=2&t,p=24&t,g=512&t,m=f?n:nK(e);function v(){for(var b=arguments.length,y=eb(b),x=b;x--;)y[x]=arguments[x];if(p)var w=iu(v),_=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(y,w);if(i&&(y=nF(y,i,o,p)),a&&(y=nj(y,a,s,p)),b-=_,p&&b<c){var C=tW(y,w);return n3(e,t,nQ,v.placeholder,r,y,C,l,u,c-b)}var k=h?r:this,S=f?k[e]:e;return b=y.length,l?y=function(e,t){for(var r=e.length,i=t5(t.length,r),o=nz(e);i--;){var a=t[i];e[i]=iw(a,r)?o[a]:n}return e}(y,l):g&&b>1&&y.reverse(),d&&u<b&&(y.length=u),this&&this!==e4&&this instanceof v&&(S=m||nK(S)),S.apply(k,y)}return v}function nZ(e,t){return function(r,n){var i,o;return i=t(n),o={},rq(r,function(t,r,n){e(o,i(t),r,n)}),o}}function nJ(e,t){return function(r,i){var o;if(n===r&&n===i)return t;if(n!==r&&(o=r),n!==i){if(n===o)return i;"string"==typeof r||"string"==typeof i?(r=nw(r),i=nw(i)):(r=nx(r),i=nx(i)),o=e(r,i)}return o}}function n0(e){return ii(function(t){return t=tp(t,tA(ic())),nd(function(r){var n=this;return e(t,function(e){return ts(e,n,r)})})})}function n1(e,t){var r=(t=n===t?" ":nw(t)).length;if(r<2)return r?nc(t,e):t;var i=nc(t,tO(e/t$(t)));return tz(t)?nA(tq(i),0,e).join(""):i.slice(0,e)}function n2(e){return function(t,r,i){i&&"number"!=typeof i&&i_(t,r,i)&&(r=i=n),t=o6(t),n===r?(r=t,t=0):r=o6(r),i=n===i?t<r?1:-1:o6(i);for(var o=t,a=r,s=i,l=-1,u=t2(tO((a-o)/(s||1)),0),c=eb(u);u--;)c[e?u:++l]=o,o+=s;return c}}function n5(e){return function(t,r){return("string"!=typeof t||"string"!=typeof r)&&(t=o9(t),r=o9(r)),e(t,r)}}function n3(e,t,r,i,o,a,s,l,u,c){var d=8&t,h=d?s:n,f=d?n:s,p=d?a:n,g=d?n:a;t|=d?32:64,4&(t&=~(d?64:32))||(t&=-4);var m=[e,t,o,p,h,g,f,l,u,c],v=r.apply(n,m);return ik(e)&&iR(v,m),v.placeholder=i,iN(v,e,t)}function n4(e){var t=e_[e];return function(e,r){if(e=o9(e),(r=null==r?0:t5(o8(r),292))&&tJ(e)){var n=(at(e)+"e").split("e");return+((n=(at(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(n[1]-r))}return t(e)}}var n6=rt&&1/tU(new rt([,-0]))[1]==s?function(e){return new rt(e)}:a$;function n8(e){return function(t){var r,n,i=iv(t);return i==v?tB(t):i==_?(r=-1,n=Array(t.size),t.forEach(function(e){n[++r]=[e,e]}),n):tp(e(t),function(e){return[e,t[e]]})}}function n7(e,t,r,o,s,l,u,c){var d=2&t;if(!d&&"function"!=typeof e)throw new eE(i);var h=o?o.length:0;if(h||(t&=-97,o=s=n),u=n===u?u:t2(o8(u),0),c=n===c?c:o8(c),h-=s?s.length:0,64&t){var f=o,p=s;o=s=n}var g=d?n:is(e),m=[e,t,r,o,s,f,p,l,u,c];if(g&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(o||s){1&n&&(e[2]=t[2],i|=1&r?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?nF(u,l,t[4]):l,e[4]=u?tW(e[3],a):t[4]}(l=t[5])&&(u=e[5],e[5]=u?nj(u,l,t[6]):l,e[6]=u?tW(e[5],a):t[6]),(l=t[7])&&(e[7]=l),128&n&&(e[8]=null==e[8]?t[8]:t5(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}}(m,g),e=m[0],t=m[1],r=m[2],o=m[3],s=m[4],(c=m[9]=m[9]===n?d?0:e.length:t2(m[9]-h,0))||!(24&t)||(t&=-25),t&&1!=t)8==t||16==t?I=function(e,t,r){var i=nK(e);function o(){for(var a=arguments.length,s=eb(a),l=a,u=iu(o);l--;)s[l]=arguments[l];var c=a<3&&s[0]!==u&&s[a-1]!==u?[]:tW(s,u);return(a-=c.length)<r?n3(e,t,nQ,o.placeholder,n,s,c,n,n,r-a):ts(this&&this!==e4&&this instanceof o?i:e,this,s)}return o}(e,t,c):32!=t&&33!=t||s.length?I=nQ.apply(n,m):(v=e,b=t,y=r,x=o,w=1&b,_=nK(v),I=function e(){for(var t=-1,r=arguments.length,n=-1,i=x.length,o=eb(i+r),a=this&&this!==e4&&this instanceof e?_:v;++n<i;)o[n]=x[n];for(;r--;)o[n++]=arguments[++t];return ts(a,w?y:this,o)});else var v,b,y,x,w,_,C,k,S,E,O,I=(C=e,k=t,S=r,E=1&k,O=nK(C),function e(){return(this&&this!==e4&&this instanceof e?O:C).apply(E?S:this,arguments)});return iN((g?nf:iR)(I,m),e,t)}function n9(e,t,r,i){return n===e||oM(e,eP[r])&&!eA.call(i,r)?t:e}function ie(e,t,r,i,o,a){return oG(e)&&oG(t)&&(a.set(t,e),nn(e,t,n,ie,a),a.delete(t)),e}function it(e){return oQ(e)?n:e}function ir(e,t,r,i,o,a){var s=1&r,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var h=-1,f=!0,p=2&r?new r_:n;for(a.set(e,t),a.set(t,e);++h<l;){var g=e[h],m=t[h];if(i)var v=s?i(m,g,h,t,e,a):i(g,m,h,e,t,a);if(n!==v){if(v)continue;f=!1;break}if(p){if(!tb(t,function(e,t){if(!tN(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)})){f=!1;break}}else if(!(g===m||o(g,m,r,i,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function ii(e){return iM(iI(e,n,iq),e+"")}function io(e){return rX(e,ap,ig)}function ia(e){return rX(e,ag,im)}var is=ri?function(e){return ri.get(e)}:a$;function il(e){for(var t=e.name+"",r=ro[t],n=eA.call(ro,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function iu(e){return(eA.call(rp,"placeholder")?rp:e).placeholder}function ic(){var e=rp.iteratee||aB;return e=e===aB?r8:e,arguments.length?e(arguments[0],arguments[1]):e}function id(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ih(e){for(var t=ap(e),r=t.length;r--;){var n,i=t[r],o=e[i];t[r]=[i,o,(n=o)==n&&!oG(n)]}return t}function ip(e,t){var r=null==e?n:e[t];return r6(r)?r:n}var ig=tQ?function(e){return null==e?[]:td(tQ(e=eC(e)),function(t){return eK.call(e,t)})}:aZ,im=tQ?function(e){for(var t=[];e;)tg(t,ig(e)),e=eW(e);return t}:aZ,iv=rQ;function ib(e,t,r){t=nR(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=iF(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&oq(i)&&iw(a,i)&&(oV(e)||oL(e))}function iy(e){return"function"!=typeof e.constructor||iE(e)?{}:rg(eW(e))}function ix(e){return oV(e)||oL(e)||!!(e5&&e&&e[e5])}function iw(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&eh.test(e))&&e>-1&&e%1==0&&e<t}function i_(e,t,r){if(!oG(r))return!1;var n=typeof t;return("number"==n?!!(oj(r)&&iw(t,r.length)):"string"==n&&t in r)&&oM(r[t],e)}function iC(e,t){if(oV(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||o1(e))||K.test(e)||!G.test(e)||null!=t&&e in eC(t)}function ik(e){var t=il(e),r=rp[t];if("function"!=typeof r||!(t in rb.prototype))return!1;if(e===r)return!0;var n=is(r);return!!n&&e===n[0]}(t7&&iv(new t7(new ArrayBuffer(1)))!=O||t9&&iv(new t9)!=v||re&&iv(re.resolve())!=x||rt&&iv(new rt)!=_||rr&&iv(new rr)!=S)&&(iv=function(e){var t=rQ(e),r=t==y?e.constructor:n,i=r?ij(r):"";if(i)switch(i){case ra:return O;case rs:return v;case rl:return x;case ru:return _;case rc:return S}return t});var iS=eT?oU:aJ;function iE(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eP)}function iO(e,t){return function(r){return null!=r&&r[e]===t&&(n!==t||e in eC(r))}}function iI(e,t,r){return t=t2(n===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=t2(n.length-t,0),a=eb(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=eb(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),ts(e,this,s)}}function iP(e,t){return t.length<2?e:rY(e,ng(t,0,-1))}function iT(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var iR=iD(nf),iA=ty||function(e,t){return e4.setTimeout(e,t)},iM=iD(np);function iN(e,t,r){var n,i,o,a=t+"";return iM(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ee,"{\n/* [wrapped with "+t+"] */\n")}(a,(n=(o=a.match(et))?o[1].split(er):[],i=r,tu(u,function(e){var t="_."+e[0];i&e[1]&&!th(n,t)&&n.push(t)}),n.sort())))}function iD(e){var t=0,r=0;return function(){var i=t3(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function iL(e,t){var r=-1,i=e.length,o=i-1;for(t=n===t?i:t;++r<t;){var a=nu(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var iV=(em=(J=oO(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Y,function(e,r,n,i){t.push(n?i.replace(eo,"$1"):r||e)}),t},function(e){return 500===em.size&&em.clear(),e})).cache,J);function iF(e){if("string"==typeof e||o1(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function ij(e){if(null!=e){try{return eR.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function iz(e){if(e instanceof rb)return e.clone();var t=new rv(e.__wrapped__,e.__chain__);return t.__actions__=nz(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var iB=nd(function(e,t){return oz(e)?rV(e,rW(t,1,oz,!0)):[]}),iH=nd(function(e,t){var r=iQ(t);return oz(r)&&(r=n),oz(e)?rV(e,rW(t,1,oz,!0),ic(r,2)):[]}),iW=nd(function(e,t){var r=iQ(t);return oz(r)&&(r=n),oz(e)?rV(e,rW(t,1,oz,!0),n,r):[]});function iU(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:o8(r);return i<0&&(i=t2(n+i,0)),tw(e,ic(t,3),i)}function i$(e,t,r){var i=null==e?0:e.length;if(!i)return -1;var o=i-1;return n!==r&&(o=o8(r),o=r<0?t2(i+o,0):t5(o,i-1)),tw(e,ic(t,3),o,!0)}function iq(e){return(null==e?0:e.length)?rW(e,1):[]}function iG(e){return e&&e.length?e[0]:n}var iK=nd(function(e){var t=tp(e,nP);return t.length&&t[0]===e[0]?r1(t):[]}),iY=nd(function(e){var t=iQ(e),r=tp(e,nP);return t===iQ(r)?t=n:r.pop(),r.length&&r[0]===e[0]?r1(r,ic(t,2)):[]}),iX=nd(function(e){var t=iQ(e),r=tp(e,nP);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?r1(r,n,t):[]});function iQ(e){var t=null==e?0:e.length;return t?e[t-1]:n}var iZ=nd(iJ);function iJ(e,t){return e&&e.length&&t&&t.length?ns(e,t):e}var i0=ii(function(e,t){var r=null==e?0:e.length,n=rA(e,t);return nl(e,tp(t,function(e){return iw(e,r)?+e:e}).sort(nV)),n});function i1(e){return null==e?e:t8.call(e)}var i2=nd(function(e){return n_(rW(e,1,oz,!0))}),i5=nd(function(e){var t=iQ(e);return oz(t)&&(t=n),n_(rW(e,1,oz,!0),ic(t,2))}),i3=nd(function(e){var t=iQ(e);return t="function"==typeof t?t:n,n_(rW(e,1,oz,!0),n,t)});function i4(e){if(!(e&&e.length))return[];var t=0;return e=td(e,function(e){if(oz(e))return t=t2(e.length,t),!0}),tT(t,function(t){return tp(e,tE(t))})}function i6(e,t){if(!(e&&e.length))return[];var r=i4(e);return null==t?r:tp(r,function(e){return ts(t,n,e)})}var i8=nd(function(e,t){return oz(e)?rV(e,t):[]}),i7=nd(function(e){return nO(td(e,oz))}),i9=nd(function(e){var t=iQ(e);return oz(t)&&(t=n),nO(td(e,oz),ic(t,2))}),oe=nd(function(e){var t=iQ(e);return t="function"==typeof t?t:n,nO(td(e,oz),n,t)}),ot=nd(i4),or=nd(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,i6(e,r)});function on(e){var t=rp(e);return t.__chain__=!0,t}function oi(e,t){return t(e)}var oo=ii(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return rA(t,e)};return!(t>1)&&!this.__actions__.length&&i instanceof rb&&iw(r)?((i=i.slice(r,+r+ +!!t)).__actions__.push({func:oi,args:[o],thisArg:n}),new rv(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)}),oa=nH(function(e,t,r){eA.call(e,r)?++e[r]:rR(e,r,1)}),os=nY(iU),ol=nY(i$);function ou(e,t){return(oV(e)?tu:rF)(e,ic(t,3))}function oc(e,t){return(oV(e)?function(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}:rj)(e,ic(t,3))}var od=nH(function(e,t,r){eA.call(e,r)?e[r].push(t):rR(e,r,[t])}),oh=nd(function(e,t,r){var n=-1,i="function"==typeof t,o=oj(e)?eb(e.length):[];return rF(e,function(e){o[++n]=i?ts(t,e,r):r2(e,t,r)}),o}),of=nH(function(e,t,r){rR(e,r,t)});function op(e,t){return(oV(e)?tp:ne)(e,ic(t,3))}var og=nH(function(e,t,r){e[+!r].push(t)},function(){return[[],[]]}),om=nd(function(e,t){if(null==e)return[];var r=t.length;return r>1&&i_(e,t[0],t[1])?t=[]:r>2&&i_(t[0],t[1],t[2])&&(t=[t[0]]),no(e,rW(t,1),[])}),ov=te||function(){return e4.Date.now()};function ob(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,n7(e,128,n,n,n,n,t)}function oy(e,t){var r;if("function"!=typeof t)throw new eE(i);return e=o8(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var ox=nd(function(e,t,r){var n=1;if(r.length){var i=tW(r,iu(ox));n|=32}return n7(e,n,t,r,i)}),ow=nd(function(e,t,r){var n=3;if(r.length){var i=tW(r,iu(ow));n|=32}return n7(t,n,e,r,i)});function o_(e,t,r){t=r?n:t;var i=n7(e,8,n,n,n,n,n,t);return i.placeholder=o_.placeholder,i}function oC(e,t,r){t=r?n:t;var i=n7(e,16,n,n,n,n,n,t);return i.placeholder=oC.placeholder,i}function ok(e,t,r){var o,a,s,l,u,c,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new eE(i);function g(t){var r=o,i=a;return o=a=n,d=t,l=e.apply(i,r)}function m(e){var r=e-c,i=e-d;return n===c||r>=t||r<0||f&&i>=s}function v(){var e,r,n,i=ov();if(m(i))return b(i);u=iA(v,(e=i-c,r=i-d,n=t-e,f?t5(n,s-r):n))}function b(e){return(u=n,p&&o)?g(e):(o=a=n,l)}function y(){var e,r=ov(),i=m(r);if(o=arguments,a=this,c=r,i){if(n===u)return d=e=c,u=iA(v,t),h?g(e):l;if(f)return nM(u),u=iA(v,t),g(c)}return n===u&&(u=iA(v,t)),l}return t=o9(t)||0,oG(r)&&(h=!!r.leading,s=(f="maxWait"in r)?t2(o9(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),y.cancel=function(){n!==u&&nM(u),d=0,o=c=a=u=n},y.flush=function(){return n===u?l:b(ov())},y}var oS=nd(function(e,t){return rL(e,1,t)}),oE=nd(function(e,t,r){return rL(e,o9(t)||0,r)});function oO(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new eE(i);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(oO.Cache||rw),r}function oI(e){if("function"!=typeof e)throw new eE(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}oO.Cache=rw;var oP=nd(function(e,t){var r=(t=1==t.length&&oV(t[0])?tp(t[0],tA(ic())):tp(rW(t,1),tA(ic()))).length;return nd(function(n){for(var i=-1,o=t5(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return ts(e,this,n)})}),oT=nd(function(e,t){var r=tW(t,iu(oT));return n7(e,32,n,t,r)}),oR=nd(function(e,t){var r=tW(t,iu(oR));return n7(e,64,n,t,r)}),oA=ii(function(e,t){return n7(e,256,n,n,n,t)});function oM(e,t){return e===t||e!=e&&t!=t}var oN=n5(rZ),oD=n5(function(e,t){return e>=t}),oL=r5(function(){return arguments}())?r5:function(e){return oK(e)&&eA.call(e,"callee")&&!eK.call(e,"callee")},oV=eb.isArray,oF=tt?tA(tt):function(e){return oK(e)&&rQ(e)==E};function oj(e){return null!=e&&oq(e.length)&&!oU(e)}function oz(e){return oK(e)&&oj(e)}var oB=tZ||aJ,oH=tr?tA(tr):function(e){return oK(e)&&rQ(e)==f};function oW(e){if(!oK(e))return!1;var t=rQ(e);return t==p||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oQ(e)}function oU(e){if(!oG(e))return!1;var t=rQ(e);return t==g||t==m||"[object AsyncFunction]"==t||"[object Proxy]"==t}function o$(e){return"number"==typeof e&&e==o8(e)}function oq(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function oG(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function oK(e){return null!=e&&"object"==typeof e}var oY=tn?tA(tn):function(e){return oK(e)&&iv(e)==v};function oX(e){return"number"==typeof e||oK(e)&&rQ(e)==b}function oQ(e){if(!oK(e)||rQ(e)!=y)return!1;var t=eW(e);if(null===t)return!0;var r=eA.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&eR.call(r)==eL}var oZ=ti?tA(ti):function(e){return oK(e)&&rQ(e)==w},oJ=to?tA(to):function(e){return oK(e)&&iv(e)==_};function o0(e){return"string"==typeof e||!oV(e)&&oK(e)&&rQ(e)==C}function o1(e){return"symbol"==typeof e||oK(e)&&rQ(e)==k}var o2=ta?tA(ta):function(e){return oK(e)&&oq(e.length)&&!!eZ[rQ(e)]},o5=n5(r9),o3=n5(function(e,t){return e<=t});function o4(e){if(!e)return[];if(oj(e))return o0(e)?tq(e):nz(e);if(e3&&e[e3]){for(var t,r=e[e3](),n=[];!(t=r.next()).done;)n.push(t.value);return n}var i=iv(e);return(i==v?tB:i==_?tU:aC)(e)}function o6(e){return e?(e=o9(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function o8(e){var t=o6(e),r=t%1;return t==t?r?t-r:t:0}function o7(e){return e?rM(o8(e),0,0xffffffff):0}function o9(e){if("number"==typeof e)return e;if(o1(e))return l;if(oG(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=oG(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tR(e);var r=eu.test(e);return r||ed.test(e)?e2(e.slice(2),r?2:8):el.test(e)?l:+e}function ae(e){return nB(e,ag(e))}function at(e){return null==e?"":nw(e)}var ar=nW(function(e,t){if(iE(t)||oj(t))return void nB(t,ap(t),e);for(var r in t)eA.call(t,r)&&rO(e,r,t[r])}),an=nW(function(e,t){nB(t,ag(t),e)}),ai=nW(function(e,t,r,n){nB(t,ag(t),e,n)}),ao=nW(function(e,t,r,n){nB(t,ap(t),e,n)}),aa=ii(rA),as=nd(function(e,t){e=eC(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&i_(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=ag(a),l=-1,u=s.length;++l<u;){var c=s[l],d=e[c];(n===d||oM(d,eP[c])&&!eA.call(e,c))&&(e[c]=a[c])}return e}),al=nd(function(e){return e.push(n,ie),ts(av,n,e)});function au(e,t,r){var i=null==e?n:rY(e,t);return n===i?r:i}function ac(e,t){return null!=e&&ib(e,t,r0)}var ad=nZ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eD.call(t)),e[t]=r},aV(az)),ah=nZ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eD.call(t)),eA.call(e,t)?e[t].push(r):e[t]=[r]},ic),af=nd(r2);function ap(e){return oj(e)?rk(e):r7(e)}function ag(e){return oj(e)?rk(e,!0):function(e){if(!oG(e)){var t=e,r=[];if(null!=t)for(var n in eC(t))r.push(n);return r}var i=iE(e),o=[];for(var a in e)"constructor"==a&&(i||!eA.call(e,a))||o.push(a);return o}(e)}var am=nW(function(e,t,r){nn(e,t,r)}),av=nW(function(e,t,r,n){nn(e,t,r,n)}),ab=ii(function(e,t){var r={};if(null==e)return r;var n=!1;t=tp(t,function(t){return t=nR(t,e),n||(n=t.length>1),t}),nB(e,ia(e),r),n&&(r=rN(r,7,it));for(var i=t.length;i--;)nC(r,t[i]);return r}),ay=ii(function(e,t){return null==e?{}:na(e,t,function(t,r){return ac(e,r)})});function ax(e,t){if(null==e)return{};var r=tp(ia(e),function(e){return[e]});return t=ic(t),na(e,r,function(e,r){return t(e,r[0])})}var aw=n8(ap),a_=n8(ag);function aC(e){return null==e?[]:tM(e,ap(e))}var ak=nG(function(e,t,r){return t=t.toLowerCase(),e+(r?aS(t):t)});function aS(e){return aM(at(e).toLowerCase())}function aE(e){return(e=at(e))&&e.replace(ef,tV).replace(e$,"")}var aO=nG(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),aI=nG(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),aP=nq("toLowerCase"),aT=nG(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),aR=nG(function(e,t,r){return e+(r?" ":"")+aM(t)}),aA=nG(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),aM=nq("toUpperCase");function aN(e,t,r){if(e=at(e),t=r?n:t,n===t){var i;return(i=e,eY.test(i))?e.match(eG)||[]:e.match(en)||[]}return e.match(t)||[]}var aD=nd(function(e,t){try{return ts(e,n,t)}catch(e){return oW(e)?e:new ex(e)}}),aL=ii(function(e,t){return tu(t,function(t){rR(e,t=iF(t),ox(e[t],e))}),e});function aV(e){return function(){return e}}var aF=nX(),aj=nX(!0);function az(e){return e}function aB(e){return r8("function"==typeof e?e:rN(e,1))}var aH=nd(function(e,t){return function(r){return r2(r,e,t)}}),aW=nd(function(e,t){return function(r){return r2(e,r,t)}});function aU(e,t,r){var n=ap(t),i=rK(t,n);null!=r||oG(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=rK(t,ap(t)));var o=!(oG(r)&&"chain"in r)||!!r.chain,a=oU(e);return tu(i,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=nz(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,tg([this.value()],arguments))})}),e}function a$(){}var aq=n0(tp),aG=n0(tc),aK=n0(tb);function aY(e){return iC(e)?tE(iF(e)):function(t){return rY(t,e)}}var aX=n2(),aQ=n2(!0);function aZ(){return[]}function aJ(){return!1}var a0=nJ(function(e,t){return e+t},0),a1=n4("ceil"),a2=nJ(function(e,t){return e/t},1),a5=n4("floor"),a3=nJ(function(e,t){return e*t},1),a4=n4("round"),a6=nJ(function(e,t){return e-t},0);return rp.after=function(e,t){if("function"!=typeof t)throw new eE(i);return e=o8(e),function(){if(--e<1)return t.apply(this,arguments)}},rp.ary=ob,rp.assign=ar,rp.assignIn=an,rp.assignInWith=ai,rp.assignWith=ao,rp.at=aa,rp.before=oy,rp.bind=ox,rp.bindAll=aL,rp.bindKey=ow,rp.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return oV(e)?e:[e]},rp.chain=on,rp.chunk=function(e,t,r){t=(r?i_(e,t,r):n===t)?1:t2(o8(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=eb(tO(i/t));o<i;)s[a++]=ng(e,o,o+=t);return s},rp.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},rp.concat=function(){var e=arguments.length;if(!e)return[];for(var t=eb(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return tg(oV(r)?nz(r):[r],rW(t,1))},rp.cond=function(e){var t=null==e?0:e.length,r=ic();return e=t?tp(e,function(e){if("function"!=typeof e[1])throw new eE(i);return[r(e[0]),e[1]]}):[],nd(function(r){for(var n=-1;++n<t;){var i=e[n];if(ts(i[0],this,r))return ts(i[1],this,r)}})},rp.conforms=function(e){var t,r;return r=ap(t=rN(e,1)),function(e){return rD(e,t,r)}},rp.constant=aV,rp.countBy=oa,rp.create=function(e,t){var r=rg(e);return null==t?r:rT(r,t)},rp.curry=o_,rp.curryRight=oC,rp.debounce=ok,rp.defaults=as,rp.defaultsDeep=al,rp.defer=oS,rp.delay=oE,rp.difference=iB,rp.differenceBy=iH,rp.differenceWith=iW,rp.drop=function(e,t,r){var i=null==e?0:e.length;return i?ng(e,(t=r||n===t?1:o8(t))<0?0:t,i):[]},rp.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ng(e,0,(t=i-(t=r||n===t?1:o8(t)))<0?0:t):[]},rp.dropRightWhile=function(e,t){return e&&e.length?nS(e,ic(t,3),!0,!0):[]},rp.dropWhile=function(e,t){return e&&e.length?nS(e,ic(t,3),!0):[]},rp.fill=function(e,t,r,i){var o=null==e?0:e.length;if(!o)return[];r&&"number"!=typeof r&&i_(e,t,r)&&(r=0,i=o);var a=r,s=i,l=e.length;for((a=o8(a))<0&&(a=-a>l?0:l+a),(s=n===s||s>l?l:o8(s))<0&&(s+=l),s=a>s?0:o7(s);a<s;)e[a++]=t;return e},rp.filter=function(e,t){return(oV(e)?td:rH)(e,ic(t,3))},rp.flatMap=function(e,t){return rW(op(e,t),1)},rp.flatMapDeep=function(e,t){return rW(op(e,t),s)},rp.flatMapDepth=function(e,t,r){return r=n===r?1:o8(r),rW(op(e,t),r)},rp.flatten=iq,rp.flattenDeep=function(e){return(null==e?0:e.length)?rW(e,s):[]},rp.flattenDepth=function(e,t){return(null==e?0:e.length)?rW(e,t=n===t?1:o8(t)):[]},rp.flip=function(e){return n7(e,512)},rp.flow=aF,rp.flowRight=aj,rp.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},rp.functions=function(e){return null==e?[]:rK(e,ap(e))},rp.functionsIn=function(e){return null==e?[]:rK(e,ag(e))},rp.groupBy=od,rp.initial=function(e){return(null==e?0:e.length)?ng(e,0,-1):[]},rp.intersection=iK,rp.intersectionBy=iY,rp.intersectionWith=iX,rp.invert=ad,rp.invertBy=ah,rp.invokeMap=oh,rp.iteratee=aB,rp.keyBy=of,rp.keys=ap,rp.keysIn=ag,rp.map=op,rp.mapKeys=function(e,t){var r={};return t=ic(t,3),rq(e,function(e,n,i){rR(r,t(e,n,i),e)}),r},rp.mapValues=function(e,t){var r={};return t=ic(t,3),rq(e,function(e,n,i){rR(r,n,t(e,n,i))}),r},rp.matches=function(e){return nt(rN(e,1))},rp.matchesProperty=function(e,t){return nr(e,rN(t,1))},rp.memoize=oO,rp.merge=am,rp.mergeWith=av,rp.method=aH,rp.methodOf=aW,rp.mixin=aU,rp.negate=oI,rp.nthArg=function(e){return e=o8(e),nd(function(t){return ni(t,e)})},rp.omit=ab,rp.omitBy=function(e,t){return ax(e,oI(ic(t)))},rp.once=function(e){return oy(2,e)},rp.orderBy=function(e,t,r,i){return null==e?[]:(oV(t)||(t=null==t?[]:[t]),oV(r=i?n:r)||(r=null==r?[]:[r]),no(e,t,r))},rp.over=aq,rp.overArgs=oP,rp.overEvery=aG,rp.overSome=aK,rp.partial=oT,rp.partialRight=oR,rp.partition=og,rp.pick=ay,rp.pickBy=ax,rp.property=aY,rp.propertyOf=function(e){return function(t){return null==e?n:rY(e,t)}},rp.pull=iZ,rp.pullAll=iJ,rp.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,ic(r,2)):e},rp.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,n,r):e},rp.pullAt=i0,rp.range=aX,rp.rangeRight=aQ,rp.rearg=oA,rp.reject=function(e,t){return(oV(e)?td:rH)(e,oI(ic(t,3)))},rp.remove=function(e,t){var r=[];if(!(e&&e.length))return r;var n=-1,i=[],o=e.length;for(t=ic(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return nl(e,i),r},rp.rest=function(e,t){if("function"!=typeof e)throw new eE(i);return nd(e,t=n===t?t:o8(t))},rp.reverse=i1,rp.sampleSize=function(e,t,r){return t=(r?i_(e,t,r):n===t)?1:o8(t),(oV(e)?function(e,t){return iL(nz(e),rM(t,0,e.length))}:function(e,t){var r=aC(e);return iL(r,rM(t,0,r.length))})(e,t)},rp.set=function(e,t,r){return null==e?e:nh(e,t,r)},rp.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:nh(e,t,r,i)},rp.shuffle=function(e){return(oV(e)?function(e){return iL(nz(e))}:function(e){return iL(aC(e))})(e)},rp.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&i_(e,t,r)?(t=0,r=i):(t=null==t?0:o8(t),r=n===r?i:o8(r)),ng(e,t,r)):[]},rp.sortBy=om,rp.sortedUniq=function(e){return e&&e.length?ny(e):[]},rp.sortedUniqBy=function(e,t){return e&&e.length?ny(e,ic(t,2)):[]},rp.split=function(e,t,r){return(r&&"number"!=typeof r&&i_(e,t,r)&&(t=r=n),r=n===r?0xffffffff:r>>>0)?(e=at(e))&&("string"==typeof t||null!=t&&!oZ(t))&&!(t=nw(t))&&tz(e)?nA(tq(e),0,r):e.split(t,r):[]},rp.spread=function(e,t){if("function"!=typeof e)throw new eE(i);return t=null==t?0:t2(o8(t),0),nd(function(r){var n=r[t],i=nA(r,0,t);return n&&tg(i,n),ts(e,this,i)})},rp.tail=function(e){var t=null==e?0:e.length;return t?ng(e,1,t):[]},rp.take=function(e,t,r){return e&&e.length?ng(e,0,(t=r||n===t?1:o8(t))<0?0:t):[]},rp.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ng(e,(t=i-(t=r||n===t?1:o8(t)))<0?0:t,i):[]},rp.takeRightWhile=function(e,t){return e&&e.length?nS(e,ic(t,3),!1,!0):[]},rp.takeWhile=function(e,t){return e&&e.length?nS(e,ic(t,3)):[]},rp.tap=function(e,t){return t(e),e},rp.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new eE(i);return oG(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),ok(e,t,{leading:n,maxWait:t,trailing:o})},rp.thru=oi,rp.toArray=o4,rp.toPairs=aw,rp.toPairsIn=a_,rp.toPath=function(e){return oV(e)?tp(e,iF):o1(e)?[e]:nz(iV(at(e)))},rp.toPlainObject=ae,rp.transform=function(e,t,r){var n=oV(e),i=n||oB(e)||o2(e);if(t=ic(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:oG(e)&&oU(o)?rg(eW(e)):{}}return(i?tu:rq)(e,function(e,n,i){return t(r,e,n,i)}),r},rp.unary=function(e){return ob(e,1)},rp.union=i2,rp.unionBy=i5,rp.unionWith=i3,rp.uniq=function(e){return e&&e.length?n_(e):[]},rp.uniqBy=function(e,t){return e&&e.length?n_(e,ic(t,2)):[]},rp.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?n_(e,n,t):[]},rp.unset=function(e,t){return null==e||nC(e,t)},rp.unzip=i4,rp.unzipWith=i6,rp.update=function(e,t,r){return null==e?e:nk(e,t,nT(r))},rp.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:nk(e,t,nT(r),i)},rp.values=aC,rp.valuesIn=function(e){return null==e?[]:tM(e,ag(e))},rp.without=i8,rp.words=aN,rp.wrap=function(e,t){return oT(nT(t),e)},rp.xor=i7,rp.xorBy=i9,rp.xorWith=oe,rp.zip=ot,rp.zipObject=function(e,t){return nI(e||[],t||[],rO)},rp.zipObjectDeep=function(e,t){return nI(e||[],t||[],nh)},rp.zipWith=or,rp.entries=aw,rp.entriesIn=a_,rp.extend=an,rp.extendWith=ai,aU(rp,rp),rp.add=a0,rp.attempt=aD,rp.camelCase=ak,rp.capitalize=aS,rp.ceil=a1,rp.clamp=function(e,t,r){return n===r&&(r=t,t=n),n!==r&&(r=(r=o9(r))==r?r:0),n!==t&&(t=(t=o9(t))==t?t:0),rM(o9(e),t,r)},rp.clone=function(e){return rN(e,4)},rp.cloneDeep=function(e){return rN(e,5)},rp.cloneDeepWith=function(e,t){return rN(e,5,t="function"==typeof t?t:n)},rp.cloneWith=function(e,t){return rN(e,4,t="function"==typeof t?t:n)},rp.conformsTo=function(e,t){return null==t||rD(e,t,ap(t))},rp.deburr=aE,rp.defaultTo=function(e,t){return null==e||e!=e?t:e},rp.divide=a2,rp.endsWith=function(e,t,r){e=at(e),t=nw(t);var i=e.length,o=r=n===r?i:rM(o8(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},rp.eq=oM,rp.escape=function(e){return(e=at(e))&&W.test(e)?e.replace(B,tF):e},rp.escapeRegExp=function(e){return(e=at(e))&&Q.test(e)?e.replace(X,"\\$&"):e},rp.every=function(e,t,r){var i=oV(e)?tc:rz;return r&&i_(e,t,r)&&(t=n),i(e,ic(t,3))},rp.find=os,rp.findIndex=iU,rp.findKey=function(e,t){return tx(e,ic(t,3),rq)},rp.findLast=ol,rp.findLastIndex=i$,rp.findLastKey=function(e,t){return tx(e,ic(t,3),rG)},rp.floor=a5,rp.forEach=ou,rp.forEachRight=oc,rp.forIn=function(e,t){return null==e?e:rU(e,ic(t,3),ag)},rp.forInRight=function(e,t){return null==e?e:r$(e,ic(t,3),ag)},rp.forOwn=function(e,t){return e&&rq(e,ic(t,3))},rp.forOwnRight=function(e,t){return e&&rG(e,ic(t,3))},rp.get=au,rp.gt=oN,rp.gte=oD,rp.has=function(e,t){return null!=e&&ib(e,t,rJ)},rp.hasIn=ac,rp.head=iG,rp.identity=az,rp.includes=function(e,t,r,n){e=oj(e)?e:aC(e),r=r&&!n?o8(r):0;var i=e.length;return r<0&&(r=t2(i+r,0)),o0(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&t_(e,t,r)>-1},rp.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:o8(r);return i<0&&(i=t2(n+i,0)),t_(e,t,i)},rp.inRange=function(e,t,r){var i,o,a;return t=o6(t),n===r?(r=t,t=0):r=o6(r),(i=e=o9(e))>=t5(o=t,a=r)&&i<t2(o,a)},rp.invoke=af,rp.isArguments=oL,rp.isArray=oV,rp.isArrayBuffer=oF,rp.isArrayLike=oj,rp.isArrayLikeObject=oz,rp.isBoolean=function(e){return!0===e||!1===e||oK(e)&&rQ(e)==h},rp.isBuffer=oB,rp.isDate=oH,rp.isElement=function(e){return oK(e)&&1===e.nodeType&&!oQ(e)},rp.isEmpty=function(e){if(null==e)return!0;if(oj(e)&&(oV(e)||"string"==typeof e||"function"==typeof e.splice||oB(e)||o2(e)||oL(e)))return!e.length;var t=iv(e);if(t==v||t==_)return!e.size;if(iE(e))return!r7(e).length;for(var r in e)if(eA.call(e,r))return!1;return!0},rp.isEqual=function(e,t){return r3(e,t)},rp.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return n===i?r3(e,t,n,r):!!i},rp.isError=oW,rp.isFinite=function(e){return"number"==typeof e&&tJ(e)},rp.isFunction=oU,rp.isInteger=o$,rp.isLength=oq,rp.isMap=oY,rp.isMatch=function(e,t){return e===t||r4(e,t,ih(t))},rp.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,r4(e,t,ih(t),r)},rp.isNaN=function(e){return oX(e)&&e!=+e},rp.isNative=function(e){if(iS(e))throw new ex("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return r6(e)},rp.isNil=function(e){return null==e},rp.isNull=function(e){return null===e},rp.isNumber=oX,rp.isObject=oG,rp.isObjectLike=oK,rp.isPlainObject=oQ,rp.isRegExp=oZ,rp.isSafeInteger=function(e){return o$(e)&&e>=-0x1fffffffffffff&&e<=0x1fffffffffffff},rp.isSet=oJ,rp.isString=o0,rp.isSymbol=o1,rp.isTypedArray=o2,rp.isUndefined=function(e){return n===e},rp.isWeakMap=function(e){return oK(e)&&iv(e)==S},rp.isWeakSet=function(e){return oK(e)&&"[object WeakSet]"==rQ(e)},rp.join=function(e,t){return null==e?"":t0.call(e,t)},rp.kebabCase=aO,rp.last=iQ,rp.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return -1;var o=i;return n!==r&&(o=(o=o8(r))<0?t2(i+o,0):t5(o,i-1)),t==t?function(e,t,r){for(var n=r+1;n--&&e[n]!==t;);return n}(e,t,o):tw(e,tk,o,!0)},rp.lowerCase=aI,rp.lowerFirst=aP,rp.lt=o5,rp.lte=o3,rp.max=function(e){return e&&e.length?rB(e,az,rZ):n},rp.maxBy=function(e,t){return e&&e.length?rB(e,ic(t,2),rZ):n},rp.mean=function(e){return tS(e,az)},rp.meanBy=function(e,t){return tS(e,ic(t,2))},rp.min=function(e){return e&&e.length?rB(e,az,r9):n},rp.minBy=function(e,t){return e&&e.length?rB(e,ic(t,2),r9):n},rp.stubArray=aZ,rp.stubFalse=aJ,rp.stubObject=function(){return{}},rp.stubString=function(){return""},rp.stubTrue=function(){return!0},rp.multiply=a3,rp.nth=function(e,t){return e&&e.length?ni(e,o8(t)):n},rp.noConflict=function(){return e4._===this&&(e4._=eV),this},rp.noop=a$,rp.now=ov,rp.pad=function(e,t,r){e=at(e);var n=(t=o8(t))?t$(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return n1(tX(i),r)+e+n1(tO(i),r)},rp.padEnd=function(e,t,r){e=at(e);var n=(t=o8(t))?t$(e):0;return t&&n<t?e+n1(t-n,r):e},rp.padStart=function(e,t,r){e=at(e);var n=(t=o8(t))?t$(e):0;return t&&n<t?n1(t-n,r)+e:e},rp.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t*=1),t4(at(e).replace(Z,""),t||0)},rp.random=function(e,t,r){if(r&&"boolean"!=typeof r&&i_(e,t,r)&&(t=r=n),n===r&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),n===e&&n===t?(e=0,t=1):(e=o6(e),n===t?(t=e,e=0):t=o6(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=t6();return t5(e+o*(t-e+e1("1e-"+((o+"").length-1))),t)}return nu(e,t)},rp.reduce=function(e,t,r){var n=oV(e)?tm:tI,i=arguments.length<3;return n(e,ic(t,4),r,i,rF)},rp.reduceRight=function(e,t,r){var n=oV(e)?tv:tI,i=arguments.length<3;return n(e,ic(t,4),r,i,rj)},rp.repeat=function(e,t,r){return t=(r?i_(e,t,r):n===t)?1:o8(t),nc(at(e),t)},rp.replace=function(){var e=arguments,t=at(e[0]);return e.length<3?t:t.replace(e[1],e[2])},rp.result=function(e,t,r){t=nR(t,e);var i=-1,o=t.length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[iF(t[i])];n===a&&(i=o,a=r),e=oU(a)?a.call(e):a}return e},rp.round=a4,rp.runInContext=e,rp.sample=function(e){return(oV(e)?rS:function(e){return rS(aC(e))})(e)},rp.size=function(e){if(null==e)return 0;if(oj(e))return o0(e)?t$(e):e.length;var t=iv(e);return t==v||t==_?e.size:r7(e).length},rp.snakeCase=aT,rp.some=function(e,t,r){var i=oV(e)?tb:nm;return r&&i_(e,t,r)&&(t=n),i(e,ic(t,3))},rp.sortedIndex=function(e,t){return nv(e,t)},rp.sortedIndexBy=function(e,t,r){return nb(e,t,ic(r,2))},rp.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=nv(e,t);if(n<r&&oM(e[n],t))return n}return -1},rp.sortedLastIndex=function(e,t){return nv(e,t,!0)},rp.sortedLastIndexBy=function(e,t,r){return nb(e,t,ic(r,2),!0)},rp.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=nv(e,t,!0)-1;if(oM(e[r],t))return r}return -1},rp.startCase=aR,rp.startsWith=function(e,t,r){return e=at(e),r=null==r?0:rM(o8(r),0,e.length),t=nw(t),e.slice(r,r+t.length)==t},rp.subtract=a6,rp.sum=function(e){return e&&e.length?tP(e,az):0},rp.sumBy=function(e,t){return e&&e.length?tP(e,ic(t,2)):0},rp.template=function(e,t,r){var i=rp.templateSettings;r&&i_(e,t,r)&&(t=n),e=at(e),t=ai({},t,i,n9);var o,a,s=ai({},t.imports,i.imports,n9),l=ap(s),u=tM(s,l),c=0,d=t.interpolate||ep,h="__p += '",f=ek((t.escape||ep).source+"|"+d.source+"|"+(d===q?ea:ep).source+"|"+(t.evaluate||ep).source+"|$","g"),p="//# sourceURL="+(eA.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eQ+"]")+"\n";e.replace(f,function(t,r,n,i,s,l){return n||(n=i),h+=e.slice(c,l).replace(eg,tj),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),h+="';\n";var g=eA.call(t,"variable")&&t.variable;if(g){if(ei.test(g))throw new ex("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(V,""):h).replace(F,"$1").replace(j,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=aD(function(){return ew(l,p+"return "+h).apply(n,u)});if(m.source=h,oW(m))throw m;return m},rp.times=function(e,t){if((e=o8(e))<1||e>0x1fffffffffffff)return[];var r=0xffffffff,n=t5(e,0xffffffff);t=ic(t),e-=0xffffffff;for(var i=tT(n,t);++r<e;)t(r);return i},rp.toFinite=o6,rp.toInteger=o8,rp.toLength=o7,rp.toLower=function(e){return at(e).toLowerCase()},rp.toNumber=o9,rp.toSafeInteger=function(e){return e?rM(o8(e),-0x1fffffffffffff,0x1fffffffffffff):0===e?e:0},rp.toString=at,rp.toUpper=function(e){return at(e).toUpperCase()},rp.trim=function(e,t,r){if((e=at(e))&&(r||n===t))return tR(e);if(!e||!(t=nw(t)))return e;var i=tq(e),o=tq(t),a=tD(i,o),s=tL(i,o)+1;return nA(i,a,s).join("")},rp.trimEnd=function(e,t,r){if((e=at(e))&&(r||n===t))return e.slice(0,tG(e)+1);if(!e||!(t=nw(t)))return e;var i=tq(e),o=tL(i,tq(t))+1;return nA(i,0,o).join("")},rp.trimStart=function(e,t,r){if((e=at(e))&&(r||n===t))return e.replace(Z,"");if(!e||!(t=nw(t)))return e;var i=tq(e),o=tD(i,tq(t));return nA(i,o).join("")},rp.truncate=function(e,t){var r=30,i="...";if(oG(t)){var o="separator"in t?t.separator:o;r="length"in t?o8(t.length):r,i="omission"in t?nw(t.omission):i}var a=(e=at(e)).length;if(tz(e)){var s=tq(e);a=s.length}if(r>=a)return e;var l=r-t$(i);if(l<1)return i;var u=s?nA(s,0,l).join(""):e.slice(0,l);if(n===o)return u+i;if(s&&(l+=u.length-l),oZ(o)){if(e.slice(l).search(o)){var c,d=u;for(o.global||(o=ek(o.source,at(es.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var h=c.index;u=u.slice(0,n===h?l:h)}}else if(e.indexOf(nw(o),l)!=l){var f=u.lastIndexOf(o);f>-1&&(u=u.slice(0,f))}return u+i},rp.unescape=function(e){return(e=at(e))&&H.test(e)?e.replace(z,tK):e},rp.uniqueId=function(e){var t=++eM;return at(e)+t},rp.upperCase=aA,rp.upperFirst=aM,rp.each=ou,rp.eachRight=oc,rp.first=iG,aU(rp,(ev={},rq(rp,function(e,t){eA.call(rp.prototype,t)||(ev[t]=e)}),ev),{chain:!1}),rp.VERSION="4.17.21",tu(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){rp[e].placeholder=rp}),tu(["drop","take"],function(e,t){rb.prototype[e]=function(r){r=n===r?1:t2(o8(r),0);var i=this.__filtered__&&!t?new rb(this):this.clone();return i.__filtered__?i.__takeCount__=t5(r,i.__takeCount__):i.__views__.push({size:t5(r,0xffffffff),type:e+(i.__dir__<0?"Right":"")}),i},rb.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tu(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;rb.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ic(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),tu(["head","last"],function(e,t){var r="take"+(t?"Right":"");rb.prototype[e]=function(){return this[r](1).value()[0]}}),tu(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");rb.prototype[e]=function(){return this.__filtered__?new rb(this):this[r](1)}}),rb.prototype.compact=function(){return this.filter(az)},rb.prototype.find=function(e){return this.filter(e).head()},rb.prototype.findLast=function(e){return this.reverse().find(e)},rb.prototype.invokeMap=nd(function(e,t){return"function"==typeof e?new rb(this):this.map(function(r){return r2(r,e,t)})}),rb.prototype.reject=function(e){return this.filter(oI(ic(e)))},rb.prototype.slice=function(e,t){e=o8(e);var r=this;return r.__filtered__&&(e>0||t<0)?new rb(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(t=o8(t))<0?r.dropRight(-t):r.take(t-e)),r)},rb.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},rb.prototype.toArray=function(){return this.take(0xffffffff)},rq(rb.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=rp[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(rp.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof rb,u=s[0],c=l||oV(t),d=function(e){var t=o.apply(rp,tg([e],s));return i&&h?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,g=l&&!f;if(!a&&c){t=g?t:new rb(this);var m=e.apply(t,s);return m.__actions__.push({func:oi,args:[d],thisArg:n}),new rv(m,h)}return p&&g?e.apply(this,s):(m=this.thru(d),p?i?m.value()[0]:m.value():m)})}),tu(["pop","push","shift","sort","splice","unshift"],function(e){var t=eO[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);rp.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(oV(i)?i:[],e)}return this[r](function(r){return t.apply(oV(r)?r:[],e)})}}),rq(rb.prototype,function(e,t){var r=rp[t];if(r){var n=r.name+"";eA.call(ro,n)||(ro[n]=[]),ro[n].push({name:t,func:r})}}),ro[nQ(n,2).name]=[{name:"wrapper",func:n}],rb.prototype.clone=function(){var e=new rb(this.__wrapped__);return e.__actions__=nz(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nz(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nz(this.__views__),e},rb.prototype.reverse=function(){if(this.__filtered__){var e=new rb(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},rb.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=oV(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=t5(t,e+a);break;case"takeRight":e=t2(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=n?s:a-1,c=this.__iteratees__,d=c.length,h=0,f=t5(l,this.__takeCount__);if(!r||!n&&i==l&&f==l)return nE(e,this.__actions__);var p=[];e:for(;l--&&h<f;){for(var g=-1,m=e[u+=t];++g<d;){var v=c[g],b=v.iteratee,y=v.type,x=b(m);if(2==y)m=x;else if(!x)if(1==y)continue e;else break e}p[h++]=m}return p},rp.prototype.at=oo,rp.prototype.chain=function(){return on(this)},rp.prototype.commit=function(){return new rv(this.value(),this.__chain__)},rp.prototype.next=function(){this.__values__===n&&(this.__values__=o4(this.value()));var e=this.__index__>=this.__values__.length,t=e?n:this.__values__[this.__index__++];return{done:e,value:t}},rp.prototype.plant=function(e){for(var t,r=this;r instanceof rm;){var i=iz(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},rp.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof rb){var t=e;return this.__actions__.length&&(t=new rb(this)),(t=t.reverse()).__actions__.push({func:oi,args:[i1],thisArg:n}),new rv(t,this.__chain__)}return this.thru(i1)},rp.prototype.toJSON=rp.prototype.valueOf=rp.prototype.value=function(){return nE(this.__wrapped__,this.__actions__)},rp.prototype.first=rp.prototype.head,e3&&(rp.prototype[e3]=function(){return this}),rp}();if("function"==typeof define&&"object"==typeof define.amd&&define.amd)e4._=tY,e.r,n!==tY&&e.v(tY);else e8?((e8.exports=tY)._=tY,e6._=tY):e4._=tY}).call(e.e)},45364,21613,31172,905,e=>{"use strict";var t=e.i(15839),r=e.i(18128);e.i(94444);var n=e.i(73465),i=e.i(40292),o=e.i(64789),a=e.i(45362),s=e.i(79278),l=e.i(5376),u=e.i(41344);let{withProvider:c,withContext:d,useStyles:h,useClassNames:f,PropsProvider:p}=(0,a.createSlotRecipeContext)({key:"field"}),g=c(n.Field.Root,"root",{forwardAsChild:!0}),m=d(n.Field.Label,"label",{forwardAsChild:!0}),v=d(n.Field.HelperText,"helperText",{forwardAsChild:!0}),b=d(n.Field.ErrorText,"errorText",{forwardAsChild:!0}),y=function(e){let{viewBox:r="0 0 24 24",d:n,displayName:i,defaultProps:a={}}=e,l=o.Children.toArray(e.path),u=(0,o.forwardRef)((e,i)=>(0,t.jsx)(s.Icon,{ref:i,asChild:!1,viewBox:r,...a,...e,children:l.length?l:(0,t.jsx)("path",{fill:"currentColor",d:n})}));return u.displayName=i,u}({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}),x=(0,o.forwardRef)(function(e,r){let{fallback:n,children:o="*",...a}=e,s=(0,i.useFieldContext)(),c=f(),d=h();return s?.required?(0,t.jsx)(l.chakra.span,{ref:r,"aria-hidden":"true",...a,className:(0,u.cx)(c.requiredIndicator,e.className),css:[d.requiredIndicator,e.css],children:o}):n});e.s(["ErrorIcon",()=>y,"ErrorText",()=>b,"HelperText",()=>v,"Label",()=>m,"PropsProvider",()=>p,"RequiredIndicator",()=>x,"Root",()=>g],8288);var w=e.i(8288);e.s(["Field",0,w],21613);var w=w;e.s([],58789),e.i(58789);var _=e.i(6251),C=e.i(19284),k=e.i(76184);let[S,E]=(0,_.createContext)({name:"NativeSelectBasePropsContext",hookName:"useNativeSelectBaseProps",providerName:"<NativeSelectRoot />",strict:!1}),{withProvider:O,useClassNames:I,useStyles:P,PropsProvider:T}=(0,a.createSlotRecipeContext)({key:"nativeSelect"}),R=O("div","root",{wrapElement(e,r){let n=(0,i.useFieldContext)(),o=!!(n?.disabled??r.disabled),a=!!(n?.invalid??r.invalid);return(0,t.jsx)(S,{value:{disabled:o,invalid:a},children:e})}}),A=(0,l.chakra)(n.Field.Select,{},{forwardAsChild:!0}),M=(0,o.forwardRef)(function(e,r){let{children:n,placeholder:i,unstyled:o,...a}=e,{disabled:s,invalid:l}=E(),c=P(),d=I();return(0,t.jsxs)(A,{disabled:s,"data-invalid":(0,k.dataAttr)(l),...a,ref:r,className:(0,u.cx)(d.field,e.className),css:[o?void 0:c.field,e.css],children:[i&&(0,t.jsx)("option",{value:"",children:i}),n]})});function N(e){let{unstyled:r,...n}=e,i=P(),{disabled:o,invalid:a}=E(),s=I();return(0,t.jsx)(l.chakra.div,{...n,"data-disabled":(0,k.dataAttr)(o),"data-invalid":(0,k.dataAttr)(a),className:(0,u.cx)(s.indicator,e.className),css:[r?void 0:i.indicator,e.css],children:e.children??(0,t.jsx)(C.ChevronDownIcon,{})})}e.s(["Field",()=>M,"Indicator",()=>N,"PropsProvider",()=>T,"Root",()=>R],89311);var D=e.i(89311);e.s(["NativeSelect",0,D],31172);var D=D,L=e.i(20856),V=e.i(16955),F=e.i(28337);function j(e,t){let r=[];return e.forEach(e=>{r.some(t=>t.name===e.name)||r.push(e)}),t.forEach(e=>{r.some(t=>t.name===e.name)||r.push(e)}),r}let z=e=>{let{lineageGraph:t}=(0,V.useLineageGraphContext)(),r=F.default.find(t?.nodes,{data:{name:e}}),n=(0,o.useMemo)(()=>r?function(e){function t(e){return e?.columns?Object.values(e.columns).filter(e=>null!=e):[]}return j(t(e.data.data.base),t(e.data.data.current))}(r):[],[r]),[i,a]=(0,o.useState)([]),[s,l]=(0,o.useState)(),[u,c]=(0,o.useState)(!0),[d,h]=(0,o.useState)(null),[f,p]=(0,o.useState)([]),[g,m]=(0,o.useState)(r?.id),v=r?r.data.data.current?.primary_key:void 0,b=(0,o.useCallback)(async()=>{if(r)try{let e=(await (0,L.getModelInfo)(r.id)).model;if(!e.base.columns||!e.current.columns)return void a([]);l(e.current.primary_key);let t=Object.values(e.base.columns),n=Object.values(e.current.columns);a(j(t,n))}catch(e){h(e)}},[r]);return(n!==f||r?.id!==g)&&(p(n),m(r?.id),n.length>0?(a(n),l(v),c(!1)):r?.id===void 0&&(a([]),c(!1))),(0,o.useEffect)(()=>{0===n.length&&r?.id!==void 0&&(b().catch(e=>{console.error(e)}),c(!1))},[b,r?.id,n]),{columns:i,primaryKey:s,isLoading:u,error:d}};function B(e){let t=e.trim().toUpperCase();return!!["CHAR","VARCHAR","TINYTEXT","TEXT","MEDIUMTEXT","LONGTEXT","NCHAR","NVARCHAR","VARCHAR2","NVARCHAR2","CLOB","NCLOB","VARCHAR(MAX)","XML","JSON"].includes(t)||/^(VARCHAR|NVARCHAR|VARCHAR2|NVARCHAR2|CHAR|NCHAR)\(\d+\)$/.test(t)}function H(e){return["BOOLEAN","TINYINT(1)","BIT","NUMBER(1)","BOOL"].includes(e.toUpperCase())}function W(e){return["DATE","DATETIME","TIMESTAMP","TIME","YEAR","DATETIME2","SMALLDATETIME","DATETIMEOFFSET","INTERVAL","TIMESTAMPTZ","TIMETZ","TIMESTAMP WITH TIME ZONE","TIMESTAMP WITH LOCAL TIME ZONE","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP_TZ"].includes(e.toUpperCase())}function U(e){return!B(e)&&!H(e)&&!W(e)}function $({params:e,onParamsChanged:n,setIsReadyToExecute:i}){let{columns:o,isLoading:a,error:s}=z(e.model),l=o.filter(e=>!B(e.type)&&!H(e.type)&&!W(e.type));return a?(0,t.jsx)(r.Box,{children:"Loading..."}):0===o.length||s?(0,t.jsx)(r.Box,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,t.jsx)(r.Box,{m:"16px",children:(0,t.jsxs)(w.Root,{children:[(0,t.jsx)(w.Label,{children:"Pick a column to show Histogram Diff"}),(0,t.jsxs)(D.Root,{disabled:0===l.length,children:[(0,t.jsx)(D.Field,{value:e.column_name,onChange:t=>{let r=t.target.value;i(!!r);let o=l.find(e=>e.name===r)?.type??"";n({...e,column_name:r,column_type:o})},placeholder:0!==l.length?"Select column":"No numeric column is available",children:l.map(e=>(0,t.jsxs)("option",{value:e.name,className:"no-track-pii-safe",children:[e.name," : ",e.type]},e.name))}),(0,t.jsx)(D.Indicator,{})]})]})})}e.s(["default",0,z],905),e.s(["HistogramDiffForm",()=>$,"supportsHistogramDiff",()=>U],45364)},84615,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(52051);let i=(0,r.forwardRef)(function(e,r){return(0,t.jsx)(n.Stack,{align:"center",...e,direction:"row",ref:r})});i.displayName="HStack",e.s(["HStack",()=>i])},61479,e=>{"use strict";let t=(0,e.i(5376).chakra)("div",{base:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});t.displayName="Spacer",e.s(["Spacer",()=>t])},42760,(e,t,r)=>{var n,i="__lodash_hash_undefined__",o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",d="[object Number]",h="[object Object]",f="[object Promise]",p="[object RegExp]",g="[object Set]",m="[object String]",v="[object Symbol]",b="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",C="[object Int8Array]",k="[object Int16Array]",S="[object Int32Array]",E="[object Uint8Array]",O="[object Uint8ClampedArray]",I="[object Uint16Array]",P="[object Uint32Array]",T=/\w*$/,R=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[y]=M[x]=M[a]=M[s]=M[w]=M[_]=M[C]=M[k]=M[S]=M[c]=M[d]=M[h]=M[p]=M[g]=M[m]=M[v]=M[E]=M[O]=M[I]=M[P]=!0,M["[object Error]"]=M[l]=M[b]=!1;var N=e.g&&e.g.Object===Object&&e.g,D="object"==typeof self&&self&&self.Object===Object&&self,L=N||D||Function("return this")(),V=r&&!r.nodeType&&r,F=V&&t&&!t.nodeType&&t,j=F&&F.exports===V;function z(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function H(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function W(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function U(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function $(e,t){return function(r){return e(t(r))}}function q(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var G=Array.prototype,K=Function.prototype,Y=Object.prototype,X=L["__core-js_shared__"],Q=(n=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Z=K.toString,J=Y.hasOwnProperty,ee=Y.toString,et=RegExp("^"+Z.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),er=j?L.Buffer:void 0,en=L.Symbol,ei=L.Uint8Array,eo=$(Object.getPrototypeOf,Object),ea=Object.create,es=Y.propertyIsEnumerable,el=G.splice,eu=Object.getOwnPropertySymbols,ec=er?er.isBuffer:void 0,ed=$(Object.keys,Object),eh=eN(L,"DataView"),ef=eN(L,"Map"),ep=eN(L,"Promise"),eg=eN(L,"Set"),em=eN(L,"WeakMap"),ev=eN(Object,"create"),eb=eF(eh),ey=eF(ef),ex=eF(ep),ew=eF(eg),e_=eF(em),eC=en?en.prototype:void 0,ek=eC?eC.valueOf:void 0;function eS(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eE(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eO(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eI(e){this.__data__=new eE(e)}function eP(e,t,r){var n=e[t];J.call(e,t)&&ej(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function eT(e,t){for(var r=e.length;r--;)if(ej(e[r][0],t))return r;return -1}function eR(e){var t=new e.constructor(e.byteLength);return new ei(t).set(new ei(e)),t}function eA(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=n?n(r[a],e[a],a,r,e):void 0;eP(r,a,void 0===s?e[a]:s)}return r}function eM(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function eN(e,t){var r,n=null==e?void 0:e[t];return!(!eU(n)||(r=n,Q&&Q in r))&&(eW(n)||W(n)?et:R).test(eF(n))?n:void 0}eS.prototype.clear=function(){this.__data__=ev?ev(null):{}},eS.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},eS.prototype.get=function(e){var t=this.__data__;if(ev){var r=t[e];return r===i?void 0:r}return J.call(t,e)?t[e]:void 0},eS.prototype.has=function(e){var t=this.__data__;return ev?void 0!==t[e]:J.call(t,e)},eS.prototype.set=function(e,t){return this.__data__[e]=ev&&void 0===t?i:t,this},eE.prototype.clear=function(){this.__data__=[]},eE.prototype.delete=function(e){var t=this.__data__,r=eT(t,e);return!(r<0)&&(r==t.length-1?t.pop():el.call(t,r,1),!0)},eE.prototype.get=function(e){var t=this.__data__,r=eT(t,e);return r<0?void 0:t[r][1]},eE.prototype.has=function(e){return eT(this.__data__,e)>-1},eE.prototype.set=function(e,t){var r=this.__data__,n=eT(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},eO.prototype.clear=function(){this.__data__={hash:new eS,map:new(ef||eE),string:new eS}},eO.prototype.delete=function(e){return eM(this,e).delete(e)},eO.prototype.get=function(e){return eM(this,e).get(e)},eO.prototype.has=function(e){return eM(this,e).has(e)},eO.prototype.set=function(e,t){return eM(this,e).set(e,t),this},eI.prototype.clear=function(){this.__data__=new eE},eI.prototype.delete=function(e){return this.__data__.delete(e)},eI.prototype.get=function(e){return this.__data__.get(e)},eI.prototype.has=function(e){return this.__data__.has(e)},eI.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eE){var n=r.__data__;if(!ef||n.length<199)return n.push([e,t]),this;r=this.__data__=new eO(n)}return r.set(e,t),this};var eD=eu?$(eu,Object):function(){return[]},eL=function(e){return ee.call(e)};function eV(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function eF(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ej(e,t){return e===t||e!=e&&t!=t}(eh&&eL(new eh(new ArrayBuffer(1)))!=x||ef&&eL(new ef)!=c||ep&&eL(ep.resolve())!=f||eg&&eL(new eg)!=g||em&&eL(new em)!=b)&&(eL=function(e){var t=ee.call(e),r=t==h?e.constructor:void 0,n=r?eF(r):void 0;if(n)switch(n){case eb:return x;case ey:return c;case ex:return f;case ew:return g;case e_:return b}return t});var ez=Array.isArray;function eB(e){var t;return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=0x1fffffffffffff&&!eW(e)}var eH=ec||function(){return!1};function eW(e){var t=eU(e)?ee.call(e):"";return t==l||t==u}function eU(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function e$(e){return eB(e)?function(e,t){var r,n,i,a,s,l=ez(e)||(i=n=r=e)&&"object"==typeof i&&eB(n)&&J.call(r,"callee")&&(!es.call(r,"callee")||ee.call(r)==o)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=l.length,c=!!u;for(var d in e){J.call(e,d)&&!(c&&("length"==d||(a=d,(s=null==(s=u)?0x1fffffffffffff:s)&&("number"==typeof a||A.test(a))&&a>-1&&a%1==0&&a<s)))&&l.push(d)}return l}(e):function(e){if(!eV(e))return ed(e);var t=[];for(var r in Object(e))J.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}t.exports=function(e){return function e(t,r,n,i,f,b,R){if(i&&(A=b?i(t,f,b,R):i(t)),void 0!==A)return A;if(!eU(t))return t;var A,N=ez(t);if(N){if(L=(D=t).length,V=D.constructor(L),L&&"string"==typeof D[0]&&J.call(D,"index")&&(V.index=D.index,V.input=D.input),A=V,!r){var D,L,V,F=t,j=A,$=-1,G=F.length;for(j||(j=Array(G));++$<G;)j[$]=F[$];return j}}else{var K,Y,X,Q,Z,ee=eL(t),et=ee==l||ee==u;if(eH(t)){var er=t,en=r;if(en)return er.slice();var ei=new er.constructor(er.length);return er.copy(ei),ei}if(ee==h||ee==o||et&&!b){if(W(t))return b?t:{};if(A="function"!=typeof(K=et?{}:t).constructor||eV(K)?{}:eU(Y=eo(K))?ea(Y):{},!r){return X=t,Q=(Z=A)&&eA(t,e$(t),Z),eA(X,eD(X),Q)}}else{if(!M[ee])return b?t:{};A=function(e,t,r,n){var i,o,l,u=e.constructor;switch(t){case y:return eR(e);case a:case s:return new u(+e);case x:return i=n?eR(e.buffer):e.buffer,new e.constructor(i,e.byteOffset,e.byteLength);case w:case _:case C:case k:case S:case E:case O:case I:case P:return o=n?eR(e.buffer):e.buffer,new e.constructor(o,e.byteOffset,e.length);case c:return H(n?r(U(e),!0):U(e),z,new e.constructor);case d:case m:return new u(e);case p:return(l=new e.constructor(e.source,T.exec(e))).lastIndex=e.lastIndex,l;case g:return H(n?r(q(e),!0):q(e),B,new e.constructor);case v:return ek?Object(ek.call(e)):{}}}(t,ee,e,r)}}R||(R=new eI);var es=R.get(t);if(es)return es;if(R.set(t,A),!N)var el=n?function(e){var t;return t=e$(e),ez(e)?t:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(t,eD(e))}(t):e$(t);return!function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(el||t,function(o,a){el&&(o=t[a=o]),eP(A,a,e(o,r,n,i,a,t,R))}),A}(e,!0,!0)}},53406,73478,91227,38153,92421,11518,87122,16467,32713,39392,30902,22429,65521,60844,e=>{"use strict";let t,r;var n,i=e.i(15839),o=e.i(84615),a=e.i(18128),s=e.i(42436),l=e.i(61479);function u(e){return e+.5|0}let c=(e,t,r)=>Math.max(Math.min(e,r),t);function d(e){return c(u(2.55*e),0,255)}function h(e){return c(u(255*e),0,255)}function f(e){return c(u(e/2.55)/100,0,1)}function p(e){return c(u(100*e),0,100)}let g={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},m=[..."0123456789ABCDEF"],v=e=>m[15&e],b=e=>m[(240&e)>>4]+m[15&e],y=e=>(240&e)>>4==(15&e),x=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function w(e,t,r){let n=t*Math.min(r,1-r),i=(t,i=(t+e/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function _(e,t,r){let n=(n,i=(n+e/60)%6)=>r-r*t*Math.max(Math.min(i,4-i,1),0);return[n(5),n(3),n(1)]}function C(e,t,r){let n,i=w(e,1,.5);for(t+r>1&&(n=1/(t+r),t*=n,r*=n),n=0;n<3;n++)i[n]*=1-t-r,i[n]+=t;return i}function k(e){let t,r,n,i=e.r/255,o=e.g/255,a=e.b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=(s+l)/2;s!==l&&(n=s-l,r=u>.5?n/(2-s-l):n/(s+l),t=60*(t=i===s?(o-a)/n+6*(o<a):o===s?(a-i)/n+2:(i-o)/n+4)+.5);return[0|t,r||0,u]}function S(e,t,r,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,r,n)).map(h)}function E(e){return(e%360+360)%360}let O={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},I={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"},P=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,T=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,R=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function A(e,t,r){if(e){let n=k(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*r,0===t?360:1)),e.r=(n=S(w,n,void 0,void 0))[0],e.g=n[1],e.b=n[2]}}function M(e,t){return e?Object.assign(t||{},e):e}function N(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=h(e[3]))):(t=M(e,{r:0,g:0,b:0,a:1})).a=h(t.a),t}class D{constructor(e){let r;if(e instanceof D)return e;const n=typeof e;"object"===n?r=N(e):"string"===n&&(r=function(e){var t,r=e.length;return"#"===e[0]&&(4===r||5===r?t={r:255&17*g[e[1]],g:255&17*g[e[2]],b:255&17*g[e[3]],a:5===r?17*g[e[4]]:255}:(7===r||9===r)&&(t={r:g[e[1]]<<4|g[e[2]],g:g[e[3]]<<4|g[e[4]],b:g[e[5]]<<4|g[e[6]],a:9===r?g[e[7]]<<4|g[e[8]]:255})),t}(e)||function(e){t||((t=function(){let e,t,r,n,i,o={},a=Object.keys(I),s=Object.keys(O);for(e=0;e<a.length;e++){for(t=0,n=i=a[e];t<s.length;t++)r=s[t],i=i.replace(r,O[r]);r=parseInt(I[n],16),o[i]=[r>>16&255,r>>8&255,255&r]}return o}()).transparent=[0,0,0,0]);let r=t[e.toLowerCase()];return r&&{r:r[0],g:r[1],b:r[2],a:4===r.length?r[3]:255}}(e)||function(e){return"r"===e.charAt(0)?function(e){let t,r,n,i=P.exec(e),o=255;if(i){if(i[7]!==t){let e=+i[7];o=i[8]?d(e):c(255*e,0,255)}return t=+i[1],r=+i[3],n=+i[5],t=255&(i[2]?d(t):c(t,0,255)),{r:t,g:r=255&(i[4]?d(r):c(r,0,255)),b:n=255&(i[6]?d(n):c(n,0,255)),a:o}}}(e):function(e){let t,r=x.exec(e),n=255;if(!r)return;r[5]!==t&&(n=r[6]?d(+r[5]):h(+r[5]));let i=E(+r[2]),o=r[3]/100,a=r[4]/100;return{r:(t="hwb"===r[1]?S(C,i,o,a):"hsv"===r[1]?S(_,i,o,a):S(w,i,o,a))[0],g:t[1],b:t[2],a:n}}(e)}(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=M(this._rgb);return e&&(e.a=f(e.a)),e}set rgb(e){this._rgb=N(e)}rgbString(){var e;return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${f(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):void 0}hexString(){var e,t;let r,n;return this._valid?(t=y((r=e=this._rgb).r)&&y(r.g)&&y(r.b)&&y(r.a)?v:b,e?"#"+t(e.r)+t(e.g)+t(e.b)+(n=e.a,n<255?t(n):""):void 0):void 0}hslString(){return this._valid?function(e){if(!e)return;let t=k(e),r=t[0],n=p(t[1]),i=p(t[2]);return e.a<255?`hsla(${r}, ${n}%, ${i}%, ${f(e.a)})`:`hsl(${r}, ${n}%, ${i}%)`}(this._rgb):void 0}mix(e,t){if(e){let r,n=this.rgb,i=e.rgb,o=t===r?.5:t,a=2*o-1,s=n.a-i.a,l=((a*s==-1?a:(a+s)/(1+a*s))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(e,t){var r,n;let i,o,a;return e&&(this._rgb=(r=this._rgb,n=e._rgb,i=R(f(r.r)),o=R(f(r.g)),a=R(f(r.b)),{r:h(T(i+t*(R(f(n.r))-i))),g:h(T(o+t*(R(f(n.g))-o))),b:h(T(a+t*(R(f(n.b))-a))),a:r.a+t*(n.a-r.a)})),this}clone(){return new D(this.rgb)}alpha(e){return this._rgb.a=h(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=u(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return A(this._rgb,2,e),this}darken(e){return A(this._rgb,2,-e),this}saturate(e){return A(this._rgb,1,e),this}desaturate(e){return A(this._rgb,1,-e),this}rotate(e){var t,r;return t=this._rgb,(r=k(t))[0]=E(r[0]+e),t.r=(r=S(w,r,void 0,void 0))[0],t.g=r[1],t.b=r[2],this}}function L(){}let V=(r=0,()=>r++);function F(e){return null==e}function j(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function z(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function B(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function H(e,t){return B(e)?e:t}function W(e,t){return void 0===e?t:e}let U=(e,t)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function $(e,t,r){if(e&&"function"==typeof e.call)return e.apply(r,t)}function q(e,t,r,n){let i,o,a;if(j(e))if(o=e.length,n)for(i=o-1;i>=0;i--)t.call(r,e[i],i);else for(i=0;i<o;i++)t.call(r,e[i],i);else if(z(e))for(i=0,o=(a=Object.keys(e)).length;i<o;i++)t.call(r,e[a[i]],a[i])}function G(e,t){let r,n,i,o;if(!e||!t||e.length!==t.length)return!1;for(r=0,n=e.length;r<n;++r)if(i=e[r],o=t[r],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function K(e){if(j(e))return e.map(K);if(z(e)){let t=Object.create(null),r=Object.keys(e),n=r.length,i=0;for(;i<n;++i)t[r[i]]=K(e[r[i]]);return t}return e}function Y(e){return -1===["__proto__","prototype","constructor"].indexOf(e)}function X(e,t,r,n){if(!Y(e))return;let i=t[e],o=r[e];z(i)&&z(o)?Q(i,o,n):t[e]=K(o)}function Q(e,t,r){let n,i=j(t)?t:[t],o=i.length;if(!z(e))return e;let a=(r=r||{}).merger||X;for(let t=0;t<o;++t){if(!z(n=i[t]))continue;let o=Object.keys(n);for(let t=0,i=o.length;t<i;++t)a(o[t],e,n,r)}return e}function Z(e,t){return Q(e,t,{merger:J})}function J(e,t,r){if(!Y(e))return;let n=t[e],i=r[e];z(n)&&z(i)?Z(n,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=K(i))}let ee={"":e=>e,x:e=>e.x,y:e=>e.y};function et(e,t){let r;return(ee[t]||(ee[t]=(r=function(e){let t=e.split("."),r=[],n="";for(let e of t)(n+=e).endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}(t),e=>{for(let t of r){if(""===t)break;e=e&&e[t]}return e})))(e)}function er(e){return e.charAt(0).toUpperCase()+e.slice(1)}let en=e=>void 0!==e,ei=e=>"function"==typeof e,eo=(e,t)=>{if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0},ea=Math.PI,es=2*ea,el=es+ea,eu=1/0,ec=ea/180,ed=ea/2,eh=ea/4,ef=2*ea/3,ep=Math.log10,eg=Math.sign;function em(e,t,r){return Math.abs(e-t)<r}function ev(e){let t=Math.round(e),r=Math.pow(10,Math.floor(ep(e=em(e,t,e/1e3)?t:e))),n=e/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function eb(e){return"symbol"!=typeof e&&("object"!=typeof e||null===e||!!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e))&&!isNaN(parseFloat(e))&&isFinite(e)}function ey(e,t,r){let n,i,o;for(n=0,i=e.length;n<i;n++)isNaN(o=e[n][r])||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ex(e){return ea/180*e}function ew(e){if(!B(e))return;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r++;return r}function e_(e,t){let r=t.x-e.x,n=t.y-e.y,i=Math.sqrt(r*r+n*n),o=Math.atan2(n,r);return o<-.5*ea&&(o+=es),{angle:o,distance:i}}function eC(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ek(e,t){return(e-t+el)%es-ea}function eS(e){return(e%es+es)%es}function eE(e,t,r,n){let i=eS(e),o=eS(t),a=eS(r),s=eS(o-i),l=eS(a-i),u=eS(i-o),c=eS(i-a);return i===o||i===a||n&&o===a||s>l&&u<c}function eO(e,t,r){return Math.max(t,Math.min(r,e))}function eI(e,t,r,n=1e-6){return e>=Math.min(t,r)-n&&e<=Math.max(t,r)+n}function eP(e,t,r){let n;r=r||(r=>e[r]<t);let i=e.length-1,o=0;for(;i-o>1;)r(n=o+i>>1)?o=n:i=n;return{lo:o,hi:i}}let eT=(e,t,r,n)=>eP(e,r,n?n=>{let i=e[n][t];return i<r||i===r&&e[n+1][t]===r}:n=>e[n][t]<r),eR=(e,t,r)=>eP(e,r,n=>e[n][t]>=r),eA=["push","pop","shift","splice","unshift"];function eM(e,t){let r=e._chartjs;if(!r)return;let n=r.listeners,i=n.indexOf(t);-1!==i&&n.splice(i,1),n.length>0||(eA.forEach(t=>{delete e[t]}),delete e._chartjs)}function eN(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}let eD="undefined"==typeof window?function(e){return e()}:window.requestAnimationFrame;function eL(e,t){let r=[],n=!1;return function(...i){r=i,n||(n=!0,eD.call(window,()=>{n=!1,e.apply(t,r)}))}}let eV=e=>"start"===e?"left":"end"===e?"right":"center",eF=(e,t,r)=>"start"===e?t:"end"===e?r:(t+r)/2;function ej(e,t,r){let n=t.length,i=0,o=n;if(e._sorted){let{iScale:a,vScale:s,_parsed:l}=e,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,c=a.axis,{min:d,max:h,minDefined:f,maxDefined:p}=a.getUserBounds();if(f){if(i=Math.min(eT(l,c,d).lo,r?n:eT(t,c,a.getPixelForValue(d)).lo),u){let e=l.slice(0,i+1).reverse().findIndex(e=>!F(e[s.axis]));i-=Math.max(0,e)}i=eO(i,0,n-1)}if(p){let e=Math.max(eT(l,a.axis,h,!0).hi+1,r?0:eT(t,c,a.getPixelForValue(h),!0).hi+1);if(u){let t=l.slice(e-1).findIndex(e=>!F(e[s.axis]));e+=Math.max(0,t)}o=eO(e,i,n)-i}else o=n-i}return{start:i,count:o}}function ez(e){let{xScale:t,yScale:r,_scaleRanges:n}=e,i={xmin:t.min,xmax:t.max,ymin:r.min,ymax:r.max};if(!n)return e._scaleRanges=i,!0;let o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),o}let eB=e=>0===e||1===e,eH=(e,t,r)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*es/r)),eW=(e,t,r)=>Math.pow(2,-10*e)*Math.sin((e-t)*es/r)+1,eU={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ed)+1,easeOutSine:e=>Math.sin(e*ed),easeInOutSine:e=>-.5*(Math.cos(ea*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>eB(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(-Math.pow(2,-10*(2*e-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>eB(e)?e:eH(e,.075,.3),easeOutElastic:e=>eB(e)?e:eW(e,.075,.3),easeInOutElastic:e=>eB(e)?e:e<.5?.5*eH(2*e,.1125,.45):.5+.5*eW(2*e-1,.1125,.45),easeInBack:e=>e*e*(2.70158*e-1.70158),easeOutBack:e=>(e-=1)*e*(2.70158*e+1.70158)+1,easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-eU.easeOutBounce(1-e),easeOutBounce:e=>e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375,easeInOutBounce:e=>e<.5?.5*eU.easeInBounce(2*e):.5*eU.easeOutBounce(2*e-1)+.5};function e$(e){if(e&&"object"==typeof e){let t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function eq(e){return e$(e)?e:new D(e)}function eG(e){return e$(e)?e:new D(e).saturate(.5).darken(.1).hexString()}let eK=["x","y","borderWidth","radius","tension"],eY=["color","borderColor","backgroundColor"],eX=new Map;function eQ(e,t,r){var n;let i,o;return(i=t+JSON.stringify(n=(n=r)||{}),!(o=eX.get(i))&&(o=new Intl.NumberFormat(t,n),eX.set(i,o)),o).format(e)}let eZ={values:e=>j(e)?e:""+e,numeric(e,t,r){let n;if(0===e)return"0";let i=this.chart.options.locale,o=e;if(r.length>1){var a,s;let t,i=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(i<1e-4||i>1e15)&&(n="scientific"),a=e,Math.abs(t=(s=r).length>3?s[2].value-s[1].value:s[1].value-s[0].value)>=1&&a!==Math.floor(a)&&(t=a-Math.floor(a)),o=t}let l=ep(Math.abs(o)),u=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),c={notation:n,minimumFractionDigits:u,maximumFractionDigits:u};return Object.assign(c,this.options.ticks.format),eQ(e,i,c)},logarithmic(e,t,r){return 0===e?"0":[1,2,3,5,10,15].includes(r[t].significand||e/Math.pow(10,Math.floor(ep(e))))||t>.8*r.length?eZ.numeric.call(this,e,t,r):""}},eJ=Object.create(null),e0=Object.create(null);function e1(e,t){if(!t)return e;let r=t.split(".");for(let t=0,n=r.length;t<n;++t){let n=r[t];e=e[n]||(e[n]=Object.create(null))}return e}function e2(e,t,r){return"string"==typeof t?Q(e1(e,t),r):Q(e1(e,""),t)}var e5=new class{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>eG(t.backgroundColor),this.hoverBorderColor=(e,t)=>eG(t.borderColor),this.hoverColor=(e,t)=>eG(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return e2(this,e,t)}get(e){return e1(this,e)}describe(e,t){return e2(e0,e,t)}override(e,t){return e2(eJ,e,t)}route(e,t,r,n){let i=e1(this,e),o=e1(this,r),a="_"+t;Object.defineProperties(i,{[a]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[a],t=o[n];return z(e)?Object.assign({},t,e):W(e,t)},set(e){this[a]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:eY},numbers:{type:"number",properties:eK}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:eZ.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function e3(e,t,r,n,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,r.push(i)),o>n&&(n=o),n}function e4(e,t,r){let n=e.currentDevicePixelRatio,i=0!==r?Math.max(r/2,.5):0;return Math.round((t-i)*n)/n+i}function e6(e,t){(t||e)&&((t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function e8(e,t,r,n){e7(e,t,r,n,null)}function e7(e,t,r,n,i){let o,a,s,l,u,c,d,h,f=t.pointStyle,p=t.rotation,g=t.radius,m=(p||0)*ec;if(f&&"object"==typeof f&&("[object HTMLImageElement]"===(o=f.toString())||"[object HTMLCanvasElement]"===o)){e.save(),e.translate(r,n),e.rotate(m),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!isNaN(g)&&!(g<=0)){switch(e.beginPath(),f){default:i?e.ellipse(r,n,i/2,g,0,0,es):e.arc(r,n,g,0,es),e.closePath();break;case"triangle":c=i?i/2:g,e.moveTo(r+Math.sin(m)*c,n-Math.cos(m)*g),m+=ef,e.lineTo(r+Math.sin(m)*c,n-Math.cos(m)*g),m+=ef,e.lineTo(r+Math.sin(m)*c,n-Math.cos(m)*g),e.closePath();break;case"rectRounded":u=.516*g,a=Math.cos(m+eh)*(l=g-u),d=Math.cos(m+eh)*(i?i/2-u:l),s=Math.sin(m+eh)*l,h=Math.sin(m+eh)*(i?i/2-u:l),e.arc(r-d,n-s,u,m-ea,m-ed),e.arc(r+h,n-a,u,m-ed,m),e.arc(r+d,n+s,u,m,m+ed),e.arc(r-h,n+a,u,m+ed,m+ea),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,c=i?i/2:l,e.rect(r-c,n-l,2*c,2*l);break}m+=eh;case"rectRot":d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(r-d,n-s),e.lineTo(r+h,n-a),e.lineTo(r+d,n+s),e.lineTo(r-h,n+a),e.closePath();break;case"crossRot":m+=eh;case"cross":d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(r-d,n-s),e.lineTo(r+d,n+s),e.moveTo(r+h,n-a),e.lineTo(r-h,n+a);break;case"star":d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(r-d,n-s),e.lineTo(r+d,n+s),e.moveTo(r+h,n-a),e.lineTo(r-h,n+a),m+=eh,d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(r-d,n-s),e.lineTo(r+d,n+s),e.moveTo(r+h,n-a),e.lineTo(r-h,n+a);break;case"line":a=i?i/2:Math.cos(m)*g,s=Math.sin(m)*g,e.moveTo(r-a,n-s),e.lineTo(r+a,n+s);break;case"dash":e.moveTo(r,n),e.lineTo(r+Math.cos(m)*(i?i/2:g),n+Math.sin(m)*g);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}function e9(e,t,r){return r=r||.5,!t||e&&e.x>t.left-r&&e.x<t.right+r&&e.y>t.top-r&&e.y<t.bottom+r}function te(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function tt(e){e.restore()}function tr(e,t,r,n,i){if(!t)return e.lineTo(r.x,r.y);if("middle"===i){let n=(t.x+r.x)/2;e.lineTo(n,t.y),e.lineTo(n,r.y)}else"after"===i!=!!n?e.lineTo(t.x,r.y):e.lineTo(r.x,t.y);e.lineTo(r.x,r.y)}function tn(e,t,r,n){if(!t)return e.lineTo(r.x,r.y);e.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?r.cp2x:r.cp1x,n?r.cp2y:r.cp1y,r.x,r.y)}function ti(e,t,r,n,i,o={}){let a,s,l=j(t)?t:[t],u=o.strokeWidth>0&&""!==o.strokeColor;for(e.save(),e.font=i.string,o.translation&&e.translate(o.translation[0],o.translation[1]),F(o.rotation)||e.rotate(o.rotation),o.color&&(e.fillStyle=o.color),o.textAlign&&(e.textAlign=o.textAlign),o.textBaseline&&(e.textBaseline=o.textBaseline),a=0;a<l.length;++a)s=l[a],o.backdrop&&function(e,t){let r=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=r}(e,o.backdrop),u&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),F(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(s,r,n,o.maxWidth)),e.fillText(s,r,n,o.maxWidth),function(e,t,r,n,i){if(i.strikethrough||i.underline){let o=e.measureText(n),a=t-o.actualBoundingBoxLeft,s=t+o.actualBoundingBoxRight,l=r-o.actualBoundingBoxAscent,u=r+o.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,c),e.lineTo(s,c),e.stroke()}}(e,r,n,s,o),n+=Number(i.lineHeight);e.restore()}function to(e,t){let{x:r,y:n,w:i,h:o,radius:a}=t;e.arc(r+a.topLeft,n+a.topLeft,a.topLeft,1.5*ea,ea,!0),e.lineTo(r,n+o-a.bottomLeft),e.arc(r+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,ea,ed,!0),e.lineTo(r+i-a.bottomRight,n+o),e.arc(r+i-a.bottomRight,n+o-a.bottomRight,a.bottomRight,ed,0,!0),e.lineTo(r+i,n+a.topRight),e.arc(r+i-a.topRight,n+a.topRight,a.topRight,0,-ed,!0),e.lineTo(r+a.topLeft,n)}let ta=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ts=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/,tl=e=>+e||0;function tu(e,t){let r={},n=z(t),i=n?Object.keys(t):t,o=z(e)?n?r=>W(e[r],e[t[r]]):t=>e[t]:()=>e;for(let e of i)r[e]=tl(o(e));return r}function tc(e){return tu(e,{top:"y",right:"x",bottom:"y",left:"x"})}function td(e){return tu(e,["topLeft","topRight","bottomLeft","bottomRight"])}function th(e){let t=tc(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function tf(e,t){e=e||{},t=t||e5.font;let r=W(e.size,t.size);"string"==typeof r&&(r=parseInt(r,10));let n=W(e.style,t.style);n&&!(""+n).match(ts)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let i={family:W(e.family,t.family),lineHeight:function(e,t){let r=(""+e).match(ta);if(!r||"normal"===r[1])return 1.2*t;switch(e=+r[2],r[3]){case"px":return e;case"%":e/=100}return t*e}(W(e.lineHeight,t.lineHeight),r),size:r,style:n,weight:W(e.weight,t.weight),string:""};return i.string=!i||F(i.size)||F(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family,i}function tp(e,t,r,n){let i,o,a,s=!0;for(i=0,o=e.length;i<o;++i)if(void 0!==(a=e[i])&&(void 0!==t&&"function"==typeof a&&(a=a(t),s=!1),void 0!==r&&j(a)&&(a=a[r%a.length],s=!1),void 0!==a))return n&&!s&&(n.cacheable=!1),a}function tg(e,t){return Object.assign(Object.create(e),t)}function tm(e,t=[""],r,n,i=()=>e[0]){let o=r||e;return void 0===n&&(n=tS("_fallback",e)),new Proxy({[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:i,override:r=>tm([r,...e],t,o,n)},{deleteProperty:(t,r)=>(delete t[r],delete t._keys,delete e[0][r],!0),get:(r,n)=>tw(r,n,()=>(function(e,t,r,n){let i;for(let o of t)if(void 0!==(i=tS(ty(o,e),r)))return tx(e,i)?tC(r,n,e,i):i})(n,t,e,r)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>tE(e).includes(t),ownKeys:e=>tE(e),set(e,t,r){let n=e._storage||(e._storage=i());return e[t]=n[t]=r,delete e._keys,!0}})}function tv(e,t,r,n){return new Proxy({_cacheable:!1,_proxy:e,_context:t,_subProxy:r,_stack:new Set,_descriptors:tb(e,n),setContext:t=>tv(e,t,r,n),override:i=>tv(e.override(i),t,r,n)},{deleteProperty:(t,r)=>(delete t[r],delete e[r],!0),get:(e,t,r)=>tw(e,t,()=>(function(e,t,r){let{_proxy:n,_context:i,_subProxy:o,_descriptors:a}=e,s=n[t];return ei(s)&&a.isScriptable(t)&&(s=function(e,t,r,n){let{_proxy:i,_context:o,_subProxy:a,_stack:s}=r;if(s.has(e))throw Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||n);return s.delete(e),tx(e,l)&&(l=tC(i._scopes,i,e,l)),l}(t,s,e,r)),j(s)&&s.length&&(s=function(e,t,r,n){let{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=r;if(void 0!==o.index&&n(e))return t[o.index%t.length];if(z(t[0])){let r=t,n=i._scopes.filter(e=>e!==r);for(let l of(t=[],r)){let r=tC(n,i,e,l);t.push(tv(r,o,a&&a[e],s))}}return t}(t,s,e,a.isIndexable)),tx(t,s)&&(s=tv(s,i,o&&o[t],a)),s})(e,t,r)),getOwnPropertyDescriptor:(t,r)=>t._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,r)=>Reflect.has(e,r),ownKeys:()=>Reflect.ownKeys(e),set:(t,r,n)=>(e[r]=n,delete t[r],!0)})}function tb(e,t={scriptable:!0,indexable:!0}){let{_scriptable:r=t.scriptable,_indexable:n=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:r,indexable:n,isScriptable:ei(r)?r:()=>r,isIndexable:ei(n)?n:()=>n}}let ty=(e,t)=>e?e+er(t):t,tx=(e,t)=>z(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function tw(e,t,r){if(Object.prototype.hasOwnProperty.call(e,t)||"constructor"===t)return e[t];let n=r();return e[t]=n,n}let t_=(e,t)=>!0===e?t:"string"==typeof e?et(t,e):void 0;function tC(e,t,r,n){var i;let o=t._rootScopes,a=(i=t._fallback,ei(i)?i(r,n):i),s=[...e,...o],l=new Set;l.add(n);let u=tk(l,s,r,a||r,n);return null!==u&&(void 0===a||a===r||null!==(u=tk(l,s,a,u,n)))&&tm(Array.from(l),[""],o,a,()=>{var e,i,o;let a,s;return e=t,i=r,o=n,i in(a=e._getTarget())||(a[i]={}),j(s=a[i])&&z(o)?o:s||{}})}function tk(e,t,r,n,i){for(;r;)r=function(e,t,r,n,i){for(let a of t){let t=t_(r,a);if(t){var o;e.add(t);let a=(o=t._fallback,ei(o)?o(r,i):o);if(void 0!==a&&a!==r&&a!==n)return a}else if(!1===t&&void 0!==n&&r!==n)return null}return!1}(e,t,r,n,i);return r}function tS(e,t){for(let r of t){if(!r)continue;let t=r[e];if(void 0!==t)return t}}function tE(e){let t=e._keys;return t||(t=e._keys=function(e){let t=new Set;for(let r of e)for(let e of Object.keys(r).filter(e=>!e.startsWith("_")))t.add(e);return Array.from(t)}(e._scopes)),t}function tO(e,t,r,n){let i,o,a,{iScale:s}=e,{key:l="r"}=this._parsing,u=Array(n);for(i=0;i<n;++i)a=t[o=i+r],u[i]={r:s.parse(et(a,l),o)};return u}let tI=Number.EPSILON||1e-14,tP=(e,t)=>t<e.length&&!e[t].skip&&e[t],tT=e=>"x"===e?"y":"x";function tR(e,t,r){return Math.max(Math.min(e,r),t)}function tA(){return"undefined"!=typeof window&&"undefined"!=typeof document}function tM(e){let t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function tN(e,t,r){let n;return"string"==typeof e?(n=parseInt(e,10),-1!==e.indexOf("%")&&(n=n/100*t.parentNode[r])):n=e,n}let tD=e=>e.ownerDocument.defaultView.getComputedStyle(e,null),tL=["top","right","bottom","left"];function tV(e,t,r){let n={};r=r?"-"+r:"";for(let i=0;i<4;i++){let o=tL[i];n[o]=parseFloat(e[t+"-"+o+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function tF(e,t){if("native"in e)return e;let{canvas:r,currentDevicePixelRatio:n}=t,i=tD(r),o="border-box"===i.boxSizing,a=tV(i,"padding"),s=tV(i,"border","width"),{x:l,y:u,box:c}=function(e,t){let r,n,i,o=e.touches,a=o&&o.length?o[0]:e,{offsetX:s,offsetY:l}=a,u=!1;if(i=e.target,(s>0||l>0)&&(!i||!i.shadowRoot))r=s,n=l;else{let e=t.getBoundingClientRect();r=a.clientX-e.left,n=a.clientY-e.top,u=!0}return{x:r,y:n,box:u}}(e,r),d=a.left+(c&&s.left),h=a.top+(c&&s.top),{width:f,height:p}=t;return o&&(f-=a.width+s.width,p-=a.height+s.height),{x:Math.round((l-d)/f*r.width/n),y:Math.round((u-h)/p*r.height/n)}}let tj=e=>Math.round(10*e)/10;function tz(e,t,r){let n=t||1,i=tj(e.height*n),o=tj(e.width*n);e.height=tj(e.height),e.width=tj(e.width);let a=e.canvas;return a.style&&(r||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==n||a.height!==i||a.width!==o)&&(e.currentDevicePixelRatio=n,a.height=i,a.width=o,e.ctx.setTransform(n,0,0,n,0,0),!0)}let tB=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};tA()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(e){}return e}();function tH(e,t){let r=tD(e).getPropertyValue(t),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function tW(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:e.y+r*(t.y-e.y)}}function tU(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:"middle"===n?r<.5?e.y:t.y:"after"===n?r<1?e.y:t.y:r>0?t.y:e.y}}function t$(e,t,r,n){let i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=tW(e,i,r),s=tW(i,o,r),l=tW(o,t,r),u=tW(a,s,r),c=tW(s,l,r);return tW(u,c,r)}function tq(e,t,r){var n;return e?(n=r,{x:e=>t+t+n-e,setWidth(e){n=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function tG(e,t){let r,n;("ltr"===t||"rtl"===t)&&(n=[(r=e.canvas.style).getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",t,"important"),e.prevTextDirection=n)}function tK(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function tY(e){return"angle"===e?{between:eE,compare:ek,normalize:eS}:{between:eI,compare:(e,t)=>e-t,normalize:e=>e}}function tX({start:e,end:t,count:r,loop:n,style:i}){return{start:e%r,end:t%r,loop:n&&(t-e+1)%r==0,style:i}}function tQ(e,t,r){let n,i,o;if(!r)return[e];let{property:a,start:s,end:l}=r,u=t.length,{compare:c,between:d,normalize:h}=tY(a),{start:f,end:p,loop:g,style:m}=function(e,t,r){let n,{property:i,start:o,end:a}=r,{between:s,normalize:l}=tY(i),u=t.length,{start:c,end:d,loop:h}=e;if(h){for(c+=u,d+=u,n=0;n<u&&s(l(t[c%u][i]),o,a);++n)c--,d--;c%=u,d%=u}return d<c&&(d+=u),{start:c,end:d,loop:h,style:e.style}}(e,t,r),v=[],b=!1,y=null,x=()=>b||d(s,o,n)&&0!==c(s,o),w=()=>!b||0===c(l,n)||d(l,o,n);for(let e=f,r=f;e<=p;++e)(i=t[e%u]).skip||(n=h(i[a]))!==o&&(b=d(n,s,l),null===y&&x()&&(y=0===c(n,s)?e:r),null!==y&&w()&&(v.push(tX({start:y,end:e,loop:g,count:u,style:m})),y=null),r=e,o=n);return null!==y&&v.push(tX({start:y,end:p,loop:g,count:u,style:m})),v}function tZ(e,t){let r=[],n=e.segments;for(let i=0;i<n.length;i++){let o=tQ(n[i],e.points,t);o.length&&r.push(...o)}return r}function tJ(e,t,r,n){return n&&n.setContext&&r?function(e,t,r,n){let i=e._chart.getContext(),o=t0(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=r.length,u=[],c=o,d=t[0].start,h=d;function f(e,t,n,i){let o=s?-1:1;if(e!==t){for(e+=l;r[e%l].skip;)e-=o;for(;r[t%l].skip;)t+=o;e%l!=t%l&&(u.push({start:e%l,end:t%l,loop:n,style:i}),c=i,d=t%l)}}for(let e of t){let t,o=r[(d=s?d:e.start)%l];for(h=d+1;h<=e.end;h++){let s=r[h%l];(function(e,t){if(!t)return!1;let r=[],n=function(e,t){return e$(t)?(r.includes(t)||r.push(t),r.indexOf(t)):t};return JSON.stringify(e,n)!==JSON.stringify(t,n)})(t=t0(n.setContext(tg(i,{type:"segment",p0:o,p1:s,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:a}))),c)&&f(d,h-1,e.loop,c),o=s,c=t}d<h-1&&f(d,h-1,e.loop,c)}return u}(e,t,r,n):t}function t0(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function t1(e,t,r){return e.options.clip?e[r]:t[r]}function t2(e,t){let r=t._clip;if(r.disabled)return!1;let n=function(e,t){let{xScale:r,yScale:n}=e;return r&&n?{left:t1(r,t,"left"),right:t1(r,t,"right"),top:t1(n,t,"top"),bottom:t1(n,t,"bottom")}:t}(t,e.chartArea);return{left:!1===r.left?0:n.left-(!0===r.left?0:r.left),right:!1===r.right?e.width:n.right+(!0===r.right?0:r.right),top:!1===r.top?0:n.top-(!0===r.top?0:r.top),bottom:!1===r.bottom?e.height:n.bottom+(!0===r.bottom?0:r.bottom)}}var t5=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,r,n){let i=t.listeners[n],o=t.duration;i.forEach(n=>n({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(r-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=eD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((r,n)=>{let i;if(!r.running||!r.items.length)return;let o=r.items,a=o.length-1,s=!1;for(;a>=0;--a)(i=o[a])._active?(i._total>r.duration&&(r.duration=i._total),i.tick(e),s=!0):(o[a]=o[o.length-1],o.pop());s&&(n.draw(),this._notify(n,r,e,"progress")),o.length||(r.running=!1,this._notify(n,r,e,"complete"),r.initial=!1),t+=o.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){let t=this._charts,r=t.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,r)),r}listen(e,t,r){this._getAnims(e).listeners[t].push(r)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!!t&&!!t.running&&!!t.items.length}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let r=t.items,n=r.length-1;for(;n>=0;--n)r[n].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}};let t3="transparent",t4={boolean:(e,t,r)=>r>.5?t:e,color(e,t,r){let n=eq(e||t3),i=n.valid&&eq(t||t3);return i&&i.valid?i.mix(n,r).hexString():t},number:(e,t,r)=>e+(t-e)*r};class t6{constructor(e,t,r,n){const i=t[r];n=tp([e.to,n,i,e.from]);const o=tp([e.from,i,n]);this._active=!0,this._fn=e.fn||t4[e.type||typeof o],this._easing=eU[e.easing]||eU.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=r,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(e,t,r){if(this._active){this._notify(!1);let n=this._target[this._prop],i=r-this._start,o=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=tp([e.to,t,n,e.from]),this._from=tp([e.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t,r=e-this._start,n=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;if(this._active=o!==s&&(a||r<n),!this._active){this._target[i]=s,this._notify(!0);return}if(r<0){this._target[i]=o;return}t=r/n%2,t=a&&t>1?2-t:t,t=this._easing(Math.min(1,Math.max(0,t))),this._target[i]=this._fn(o,s,t)}wait(){let e=this._promises||(this._promises=[]);return new Promise((t,r)=>{e.push({res:t,rej:r})})}_notify(e){let t=e?"res":"rej",r=this._promises||[];for(let e=0;e<r.length;e++)r[e][t]()}}class t8{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!z(e))return;let t=Object.keys(e5.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{let i=e[n];if(!z(i))return;let o={};for(let e of t)o[e]=i[e];(j(i.properties)&&i.properties||[n]).forEach(e=>{e!==n&&r.has(e)||r.set(e,o)})})}_animateOptions(e,t){let r=t.options,n=function(e,t){if(!t)return;let r=e.options;if(!r){e.options=t;return}return r.$shared&&(e.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}(e,r);if(!n)return[];let i=this._createAnimations(n,r);return r.$shared&&(function(e,t){let r=[],n=Object.keys(t);for(let t=0;t<n.length;t++){let i=e[n[t]];i&&i.active()&&r.push(i.wait())}return Promise.all(r)})(e.options.$animations,r).then(()=>{e.options=r},()=>{}),i}_createAnimations(e,t){let r,n=this._properties,i=[],o=e.$animations||(e.$animations={}),a=Object.keys(t),s=Date.now();for(r=a.length-1;r>=0;--r){let l=a[r];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(e,t));continue}let u=t[l],c=o[l],d=n.get(l);if(c)if(d&&c.active()){c.update(d,u,s);continue}else c.cancel();if(!d||!d.duration){e[l]=u;continue}o[l]=c=new t6(d,e,l,u),i.push(c)}return i}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);let r=this._createAnimations(e,t);if(r.length)return t5.add(this._chart,r),!0}}function t7(e,t){let r=e&&e.options||{},n=r.reverse,i=void 0===r.min?t:0,o=void 0===r.max?t:0;return{start:n?o:i,end:n?i:o}}function t9(e,t){let r,n,i=[],o=e._getSortedDatasetMetas(t);for(r=0,n=o.length;r<n;++r)i.push(o[r].index);return i}function re(e,t,r,n={}){let i,o,a,s,l=e.keys,u="single"===n.mode;if(null===t)return;let c=!1;for(i=0,o=l.length;i<o;++i){if((a=+l[i])===r){if(c=!0,n.all)continue;break}B(s=e.values[a])&&(u||0===t||eg(t)===eg(s))&&(t+=s)}return c||n.all?t:0}function rt(e,t){let r=e&&e.options.stacked;return r||void 0===r&&void 0!==t.stack}function rr(e,t,r,n){for(let i of t.getMatchingVisibleMetas(n).reverse()){let t=e[i.index];if(r&&t>0||!r&&t<0)return i.index}return null}function rn(e,t){let r,{chart:n,_cachedMeta:i}=e,o=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:l}=i,u=a.axis,c=s.axis,d=`${a.id}.${s.id}.${i.stack||i.type}`,h=t.length;for(let e=0;e<h;++e){let n=t[e],{[u]:a,[c]:h}=n;(r=(n._stacks||(n._stacks={}))[c]=function(e,t,r){let n=e[t]||(e[t]={});return n[r]||(n[r]={})}(o,d,a))[l]=h,r._top=rr(r,s,!0,i.type),r._bottom=rr(r,s,!1,i.type),(r._visualValues||(r._visualValues={}))[l]=h}}function ri(e,t){let r=e.scales;return Object.keys(r).filter(e=>r[e].axis===t).shift()}function ro(e,t){let r=e.controller.index,n=e.vScale&&e.vScale.axis;if(n)for(let i of t=t||e._parsed){let e=i._stacks;if(!e||void 0===e[n]||void 0===e[n][r])return;delete e[n][r],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[r]&&delete e[n]._visualValues[r]}}let ra=e=>"reset"===e||"none"===e,rs=(e,t)=>t?e:Object.assign({},e);class rl{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=rt(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&ro(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,r=this.getDataset(),n=(e,t,r,n)=>"x"===e?t:"r"===e?n:r,i=t.xAxisID=W(r.xAxisID,ri(e,"x")),o=t.yAxisID=W(r.yAxisID,ri(e,"y")),a=t.rAxisID=W(r.rAxisID,ri(e,"r")),s=t.indexAxis,l=t.iAxisID=n(s,i,o,a),u=t.vAxisID=n(s,o,i,a);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(a),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&eM(this._data,this),e._stacked&&ro(e)}_dataCheck(){let e=this.getDataset(),t=e.data||(e.data=[]),r=this._data;if(z(t)){let e=this._cachedMeta;this._data=function(e,t){let r,n,i,{iScale:o,vScale:a}=t,s="x"===o.axis?"x":"y",l="x"===a.axis?"x":"y",u=Object.keys(e),c=Array(u.length);for(r=0,n=u.length;r<n;++r)i=u[r],c[r]={[s]:i,[l]:e[i]};return c}(t,e)}else if(r!==t){if(r){eM(r,this);let e=this._cachedMeta;ro(e),e._parsed=[]}t&&Object.isExtensible(t)&&(t._chartjs?t._chartjs.listeners.push(this):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),eA.forEach(e=>{let r="_onData"+er(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){let i=n.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[r]&&t[r](...e)}),i}})}))),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,r=this.getDataset(),n=!1;this._dataCheck();let i=t._stacked;t._stacked=rt(t.vScale,t),t.stack!==r.stack&&(n=!0,ro(t),t.stack=r.stack),this._resyncElements(e),(n||i!==t._stacked)&&(rn(this,t._parsed),t._stacked=rt(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let r,n,i,{_cachedMeta:o,_data:a}=this,{iScale:s,_stacked:l}=o,u=s.axis,c=0===e&&t===a.length||o._sorted,d=e>0&&o._parsed[e-1];if(!1===this._parsing)o._parsed=a,o._sorted=!0,i=a;else{i=j(a[e])?this.parseArrayData(o,a,e,t):z(a[e])?this.parseObjectData(o,a,e,t):this.parsePrimitiveData(o,a,e,t);let s=()=>null===n[u]||d&&n[u]<d[u];for(r=0;r<t;++r)o._parsed[r+e]=n=i[r],c&&(s()&&(c=!1),d=n);o._sorted=c}l&&rn(this,i)}parsePrimitiveData(e,t,r,n){let i,o,{iScale:a,vScale:s}=e,l=a.axis,u=s.axis,c=a.getLabels(),d=a===s,h=Array(n);for(i=0;i<n;++i)o=i+r,h[i]={[l]:d||a.parse(c[o],o),[u]:s.parse(t[o],o)};return h}parseArrayData(e,t,r,n){let i,o,a,{xScale:s,yScale:l}=e,u=Array(n);for(i=0;i<n;++i)a=t[o=i+r],u[i]={x:s.parse(a[0],o),y:l.parse(a[1],o)};return u}parseObjectData(e,t,r,n){let i,o,a,{xScale:s,yScale:l}=e,{xAxisKey:u="x",yAxisKey:c="y"}=this._parsing,d=Array(n);for(i=0;i<n;++i)a=t[o=i+r],d[i]={x:s.parse(et(a,u),o),y:l.parse(et(a,c),o)};return d}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,r){let n=this.chart,i=this._cachedMeta,o=t[e.axis];return re({keys:t9(n,!0),values:t._stacks[e.axis]._visualValues},o,i.index,{mode:r})}updateRangeFromParsed(e,t,r,n){let i=r[t.axis],o=null===i?NaN:i,a=n&&r._stacks[t.axis];n&&a&&(n.values=a,o=re(n,i,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,t){let r,n,i,o=this._cachedMeta,a=o._parsed,s=o._sorted&&e===o.iScale,l=a.length,u=this._getOtherScale(e),c=(i=this.chart,t&&!o.hidden&&o._stacked&&{keys:t9(i,!0),values:null}),d={min:1/0,max:-1/0},{min:h,max:f}=function(e){let{min:t,max:r,minDefined:n,maxDefined:i}=e.getUserBounds();return{min:n?t:-1/0,max:i?r:1/0}}(u);function p(){let t=(n=a[r])[u.axis];return!B(n[e.axis])||h>t||f<t}for(r=0;r<l&&(p()||(this.updateRangeFromParsed(d,e,n,c),!s));++r);if(s){for(r=l-1;r>=0;--r)if(!p()){this.updateRangeFromParsed(d,e,n,c);break}}return d}getAllParsedValues(e){let t,r,n,i=this._cachedMeta._parsed,o=[];for(t=0,r=i.length;t<r;++t)B(n=i[t][e.axis])&&o.push(n);return o}getMaxOverflow(){return!1}getLabelAndValue(e){let t=this._cachedMeta,r=t.iScale,n=t.vScale,i=this.getParsed(e);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:n?""+n.getLabelForValue(i[n.axis]):""}}_update(e){var t;let r,n,i,o,a=this._cachedMeta;this.update(e||"default"),z(t=W(this.options.clip,function(e,t,r){if(!1===r)return!1;let n=t7(e,r),i=t7(t,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}(a.xScale,a.yScale,this.getMaxOverflow())))?(r=t.top,n=t.right,i=t.bottom,o=t.left):r=n=i=o=t,a._clip={top:r,right:n,bottom:i,left:o,disabled:!1===t}}update(e){}draw(){let e,t=this._ctx,r=this.chart,n=this._cachedMeta,i=n.data||[],o=r.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,u=this.options.drawActiveElementsOnTop;for(n.dataset&&n.dataset.draw(t,o,s,l),e=s;e<s+l;++e){let r=i[e];r.hidden||(r.active&&u?a.push(r):r.draw(t,o))}for(e=0;e<a.length;++e)a[e].draw(t,o)}getStyle(e,t){let r=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,t,r){var n,i;let o,a=this.getDataset();if(e>=0&&e<this._cachedMeta.data.length){let t=this._cachedMeta.data[e];(o=t.$context||(n=this.getContext(),t.$context=tg(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"}))).parsed=this.getParsed(e),o.raw=a.data[e],o.index=o.dataIndex=e}else(o=this.$context||(this.$context=tg(this.chart.getContext(),{active:!1,dataset:void 0,datasetIndex:i=this.index,index:i,mode:"default",type:"dataset"}))).dataset=a,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=r,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",r){let n="active"===t,i=this._cachedDataOpts,o=e+"-"+t,a=i[o],s=this.enableOptionSharing&&en(r);if(a)return rs(a,s);let l=this.chart.config,u=l.datasetElementScopeKeys(this._type,e),c=n?[`${e}Hover`,"hover",e,""]:[e,""],d=l.getOptionScopes(this.getDataset(),u),h=Object.keys(e5.elements[e]),f=()=>this.getContext(r,n,t),p=l.resolveNamedOptions(d,h,f,c);return p.$shared&&(p.$shared=s,i[o]=Object.freeze(rs(p,s))),p}_resolveAnimations(e,t,r){let n,i=this.chart,o=this._cachedDataOpts,a=`animation-${t}`,s=o[a];if(s)return s;if(!1!==i.options.animation){let i=this.chart.config,o=i.datasetAnimationScopeKeys(this._type,t),a=i.getOptionScopes(this.getDataset(),o);n=i.createResolver(a,this.getContext(e,r,t))}let l=new t8(i,n&&n.animations);return n&&n._cacheable&&(o[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||ra(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let r=this.resolveDataElementOptions(e,t),n=this._sharedOptions,i=this.getSharedOptions(r),o=this.includeOptions(t,i)||i!==n;return this.updateSharedOptions(i,t,r),{sharedOptions:i,includeOptions:o}}updateElement(e,t,r,n){ra(n)?Object.assign(e,r):this._resolveAnimations(t,n).update(e,r)}updateSharedOptions(e,t,r){e&&!ra(t)&&this._resolveAnimations(void 0,t).update(e,r)}_setStyle(e,t,r,n){e.active=n;let i=this.getStyle(t,n);this._resolveAnimations(t,r,n).update(e,{options:!n&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,t,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let t=this._data,r=this._cachedMeta.data;for(let[e,t,r]of this._syncList)this[e](t,r);this._syncList=[];let n=r.length,i=t.length,o=Math.min(i,n);o&&this.parse(0,o),i>n?this._insertElements(n,i-n,e):i<n&&this._removeElements(i,n-i)}_insertElements(e,t,r=!0){let n,i=this._cachedMeta,o=i.data,a=e+t,s=e=>{for(e.length+=t,n=e.length-1;n>=a;n--)e[n]=e[n-t]};for(s(o),n=e;n<a;++n)o[n]=new this.dataElementType;this._parsing&&s(i._parsed),this.parse(e,t),r&&this.updateElements(o,e,t,"reset")}updateElements(e,t,r,n){}_removeElements(e,t){let r=this._cachedMeta;if(this._parsing){let n=r._parsed.splice(e,t);r._stacked&&ro(r,n)}r.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{let[t,r,n]=e;this[t](r,n)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){let e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);let r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ru(e,t,r,n){if(j(e)){let i,o,a,s,l,u;i=r.parse(e[0],n),a=Math.min(i,o=r.parse(e[1],n)),s=Math.max(i,o),l=a,u=s,Math.abs(a)>Math.abs(s)&&(l=s,u=a),t[r.axis]=u,t._custom={barStart:l,barEnd:u,start:i,end:o,min:a,max:s}}else t[r.axis]=r.parse(e,n);return t}function rc(e,t,r,n){let i,o,a,s,l=e.iScale,u=e.vScale,c=l.getLabels(),d=l===u,h=[];for(i=r,o=r+n;i<o;++i)s=t[i],(a={})[l.axis]=d||l.parse(c[i],i),h.push(ru(s,a,u,i));return h}function rd(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function rh(e,t,r,n){var i,o,a;return n?rf((i=e,o=t,a=r,e=i===o?a:i===a?o:i),r,t):rf(e,t,r)}function rf(e,t,r){return"start"===e?t:"end"===e?r:e}class rp extends rl{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,r,n){return rc(e,t,r,n)}parseArrayData(e,t,r,n){return rc(e,t,r,n)}parseObjectData(e,t,r,n){let i,o,a,s,{iScale:l,vScale:u}=e,{xAxisKey:c="x",yAxisKey:d="y"}=this._parsing,h="x"===l.axis?c:d,f="x"===u.axis?c:d,p=[];for(i=r,o=r+n;i<o;++i)s=t[i],(a={})[l.axis]=l.parse(et(s,h),i),p.push(ru(et(s,f),a,u,i));return p}updateRangeFromParsed(e,t,r,n){super.updateRangeFromParsed(e,t,r,n);let i=r._custom;i&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){let{iScale:t,vScale:r}=this._cachedMeta,n=this.getParsed(e),i=n._custom,o=rd(i)?"["+i.start+", "+i.end+"]":""+r.getLabelForValue(n[r.axis]);return{label:""+t.getLabelForValue(n[t.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(e){let t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,r,n){let i="reset"===n,{index:o,_cachedMeta:{vScale:a}}=this,s=a.getBasePixel(),l=a.isHorizontal(),u=this._getRuler(),{sharedOptions:c,includeOptions:d}=this._getSharedOptions(t,n);for(let h=t;h<t+r;h++){let t=this.getParsed(h),r=i||F(t[a.axis])?{base:s,head:s}:this._calculateBarValuePixels(h),f=this._calculateBarIndexPixels(h,u),p=(t._stacks||{})[a.axis],g={horizontal:l,base:r.base,enableBorderRadius:!p||rd(t._custom)||o===p._top||o===p._bottom,x:l?r.head:f.center,y:l?f.center:r.head,height:l?f.size:Math.abs(r.size),width:l?Math.abs(r.size):f.size};d&&(g.options=c||this.resolveDataElementOptions(h,e[h].active?"active":n));let m=g.options||e[h].options;!function(e,t,r,n){let i,o,a,s,l,u=t.borderSkipped,c={};if(!u){e.borderSkipped=c;return}if(!0===u){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:d,end:h,reverse:f,top:p,bottom:g}=(e.horizontal?(i=e.base>e.x,o="left",a="right"):(i=e.base<e.y,o="bottom",a="top"),i?(s="end",l="start"):(s="start",l="end"),{start:o,end:a,reverse:i,top:s,bottom:l});"middle"===u&&r&&(e.enableBorderRadius=!0,(r._top||0)===n?u=p:(r._bottom||0)===n?u=g:(c[rh(g,d,h,f)]=!0,u=p)),c[rh(u,d,h,f)]=!0,e.borderSkipped=c}(g,m,p,o),function(e,{inflateAmount:t},r){e.inflateAmount="auto"===t?.33*(1===r):t}(g,m,u.ratio),this.updateElement(e[h],h,g,n)}}_getStacks(e,t){let{iScale:r}=this._cachedMeta,n=r.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),i=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(t),s=a&&a[r.axis],l=e=>{let t=e._parsed.find(e=>e[r.axis]===s),n=t&&t[e.vScale.axis];if(F(n)||isNaN(n))return!0};for(let r of n)if(!(void 0!==t&&l(r))&&((!1===i||-1===o.indexOf(r.stack)||void 0===i&&void 0===r.stack)&&o.push(r.stack),r.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(r=>e[r].axis===t).shift()}_getAxis(){let e={},t=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)e[W("x"===this.chart.options.indexAxis?r.xAxisID:r.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,r){let n=this._getStacks(e,r),i=void 0!==t?n.indexOf(t):-1;return -1===i?n.length-1:i}_getRuler(){let e,t,r=this.options,n=this._cachedMeta,i=n.iScale,o=[];for(e=0,t=n.data.length;e<t;++e)o.push(i.getPixelForValue(this.getParsed(e)[i.axis],e));let a=r.barThickness;return{min:a||function(e){let t,r,n,i,o=e.iScale,a=function(e,t){if(!e._cache.$bar){let r=e.getMatchingVisibleMetas(t),n=[];for(let t=0,i=r.length;t<i;t++)n=n.concat(r[t].controller.getAllParsedValues(e));e._cache.$bar=eN(n.sort((e,t)=>e-t))}return e._cache.$bar}(o,e.type),s=o._length,l=()=>{32767!==n&&-32768!==n&&(en(i)&&(s=Math.min(s,Math.abs(n-i)||s)),i=n)};for(t=0,r=a.length;t<r;++t)n=o.getPixelForValue(a[t]),l();for(t=0,i=void 0,r=o.ticks.length;t<r;++t)n=o.getPixelForTick(t),l();return s}(n),pixels:o,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:r.grouped,ratio:a?1:r.categoryPercentage*r.barPercentage}}_calculateBarValuePixels(e){let t,r,{_cachedMeta:{vScale:n,_stacked:i,index:o},options:{base:a,minBarLength:s}}=this,l=a||0,u=this.getParsed(e),c=u._custom,d=rd(c),h=u[n.axis],f=0,p=i?this.applyStack(n,u,i):h;p!==h&&(f=p-h,p=h),d&&(h=c.barStart,p=c.barEnd-c.barStart,0!==h&&eg(h)!==eg(c.barEnd)&&(f=0),f+=h);let g=F(a)||d?f:a,m=n.getPixelForValue(g);if(Math.abs(r=(t=this.chart.getDataVisibility(e)?n.getPixelForValue(f+p):m)-m)<s){var v;r=(0!==(v=r)?eg(v):(n.isHorizontal()?1:-1)*(n.min>=l?1:-1))*s,h===l&&(m-=r/2);let e=n.getPixelForDecimal(0),a=n.getPixelForDecimal(1),c=Math.min(e,a);t=(m=Math.max(Math.min(m,Math.max(e,a)),c))+r,i&&!d&&(u._stacks[n.axis]._visualValues[o]=n.getValueForPixel(t)-n.getValueForPixel(m))}if(m===n.getPixelForValue(l)){let e=eg(r)*n.getLineWidthForValue(l)/2;m+=e,r-=e}return{size:r,base:m,head:t,center:t+r/2}}_calculateBarIndexPixels(e,t){let r,n,i=t.scale,o=this.options,a=o.skipNull,s=W(o.maxBarThickness,1/0),l=this._getAxisCount();if(t.grouped){var u,c;let i,d,h,f,p,g,m,v,b,y=a?this._getStackCount(e):t.stackCount,x="flex"===o.barThickness?(u=y*l,d=(i=t.pixels)[e],h=e>0?i[e-1]:null,f=e<i.length-1?i[e+1]:null,p=o.categoryPercentage,null===h&&(h=d-(null===f?t.end-t.start:f-d)),null===f&&(f=d+d-h),g=d-(d-Math.min(h,f))/2*p,{chunk:Math.abs(f-h)/2*p/u,ratio:o.barPercentage,start:g}):(c=y*l,F(b=o.barThickness)?(m=t.min*o.categoryPercentage,v=o.barPercentage):(m=b*c,v=1),{chunk:m/c,ratio:v,start:t.pixels[e]-m/2}),w="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,_=this._getAxis().indexOf(W(w,this.getFirstScaleIdForIndexAxis())),C=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0)+_;r=x.start+x.chunk*C+x.chunk/2,n=Math.min(s,x.chunk*x.ratio)}else r=i.getPixelForValue(this.getParsed(e)[i.axis],e),n=Math.min(s,t.min*t.ratio);return{base:r-n/2,head:r+n/2,center:r,size:n}}draw(){let e=this._cachedMeta,t=e.vScale,r=e.data,n=r.length,i=0;for(;i<n;++i)null===this.getParsed(i)[t.axis]||r[i].hidden||r[i].draw(this._ctx)}}class rg extends rl{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,r,n){let i=super.parsePrimitiveData(e,t,r,n);for(let e=0;e<i.length;e++)i[e]._custom=this.resolveDataElementOptions(e+r).radius;return i}parseArrayData(e,t,r,n){let i=super.parseArrayData(e,t,r,n);for(let e=0;e<i.length;e++){let n=t[r+e];i[e]._custom=W(n[2],this.resolveDataElementOptions(e+r).radius)}return i}parseObjectData(e,t,r,n){let i=super.parseObjectData(e,t,r,n);for(let e=0;e<i.length;e++){let n=t[r+e];i[e]._custom=W(n&&n.r&&+n.r,this.resolveDataElementOptions(e+r).radius)}return i}getMaxOverflow(){let e=this._cachedMeta.data,t=0;for(let r=e.length-1;r>=0;--r)t=Math.max(t,e[r].size(this.resolveDataElementOptions(r))/2);return t>0&&t}getLabelAndValue(e){let t=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:i}=t,o=this.getParsed(e),a=n.getLabelForValue(o.x),s=i.getLabelForValue(o.y),l=o._custom;return{label:r[e]||"",value:"("+a+", "+s+(l?", "+l:"")+")"}}update(e){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,r,n){let i="reset"===n,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(t,n),u=o.axis,c=a.axis;for(let d=t;d<t+r;d++){let t=e[d],r=!i&&this.getParsed(d),h={},f=h[u]=i?o.getPixelForDecimal(.5):o.getPixelForValue(r[u]),p=h[c]=i?a.getBasePixel():a.getPixelForValue(r[c]);h.skip=isNaN(f)||isNaN(p),l&&(h.options=s||this.resolveDataElementOptions(d,t.active?"active":n),i&&(h.options.radius=0)),this.updateElement(t,d,h,n)}}resolveDataElementOptions(e,t){let r=this.getParsed(e),n=super.resolveDataElementOptions(e,t);n.$shared&&(n=Object.assign({},n,{$shared:!1}));let i=n.radius;return"active"!==t&&(n.radius=0),n.radius+=W(r&&r._custom,i),n}}class rm extends rl{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data,{labels:{pointStyle:r,textAlign:n,color:i,useBorderRadius:o,borderRadius:a}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,s)=>{let l=e.getDatasetMeta(0).controller.getStyle(s);return{text:t,fillStyle:l.backgroundColor,fontColor:i,hidden:!e.getDataVisibility(s),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:n,pointStyle:r,borderRadius:o&&(a||l.borderRadius),index:s}}):[]}},onClick(e,t,r){r.chart.toggleDataVisibility(t.index),r.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){let r=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=r;else{let i,o,a=e=>+r[e];if(z(r[e])){let{key:e="value"}=this._parsing;a=t=>+et(r[t],e)}for(i=e,o=e+t;i<o;++i)n._parsed[i]=a(i)}}_getRotation(){return ex(this.options.rotation-90)}_getCircumference(){return ex(this.options.circumference)}_getRotationExtents(){let e=es,t=-es;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let n=this.chart.getDatasetMeta(r).controller,i=n._getRotation(),o=n._getCircumference();e=Math.min(e,i),t=Math.max(t,i+o)}return{rotation:e,circumference:t-e}}update(e){let t,{chartArea:r}=this.chart,n=this._cachedMeta,i=n.data,o=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-o)/2,0),s=Math.min((t=this.options.cutout,"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/a),1),l=this._getRingWeight(this.index),{circumference:u,rotation:c}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:f,offsetY:p}=function(e,t,r){let n=1,i=1,o=0,a=0;if(t<es){let s=e+t,l=Math.cos(e),u=Math.sin(e),c=Math.cos(s),d=Math.sin(s),h=(t,n,i)=>eE(t,e,s,!0)?1:Math.max(n,n*r,i,i*r),f=(t,n,i)=>eE(t,e,s,!0)?-1:Math.min(n,n*r,i,i*r),p=h(0,l,c),g=h(ed,u,d),m=f(ea,l,c),v=f(ea+ed,u,d);n=(p-m)/2,i=(g-v)/2,o=-(p+m)/2,a=-(g+v)/2}return{ratioX:n,ratioY:i,offsetX:o,offsetY:a}}(c,u,s),g=Math.max(Math.min((r.width-o)/d,(r.height-o)/h)/2,0),m=U(this.options.radius,g),v=Math.max(m*s,0),b=(m-v)/this._getVisibleDatasetWeightTotal();this.offsetX=f*m,this.offsetY=p*m,n.total=this.calculateTotal(),this.outerRadius=m-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*l,0),this.updateElements(i,0,i.length,e)}_circumference(e,t){let r=this.options,n=this._cachedMeta,i=this._getCircumference();return t&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||null===n._parsed[e]||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*i/es)}updateElements(e,t,r,n){let i,o="reset"===n,a=this.chart,s=a.chartArea,l=a.options.animation,u=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=o&&l.animateScale,h=d?0:this.innerRadius,f=d?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(t,n),m=this._getRotation();for(i=0;i<t;++i)m+=this._circumference(i,o);for(i=t;i<t+r;++i){let t=this._circumference(i,o),r=e[i],a={x:u+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+t,circumference:t,outerRadius:f,innerRadius:h};g&&(a.options=p||this.resolveDataElementOptions(i,r.active?"active":n)),m+=t,this.updateElement(r,i,a,n)}}calculateTotal(){let e,t=this._cachedMeta,r=t.data,n=0;for(e=0;e<r.length;e++){let i=t._parsed[e];null!==i&&!isNaN(i)&&this.chart.getDataVisibility(e)&&!r[e].hidden&&(n+=Math.abs(i))}return n}calculateCircumference(e){let t=this._cachedMeta.total;return t>0&&!isNaN(e)?Math.abs(e)/t*es:0}getLabelAndValue(e){let t=this._cachedMeta,r=this.chart,n=r.data.labels||[],i=eQ(t._parsed[e],r.options.locale);return{label:n[e]||"",value:i}}getMaxBorderWidth(e){let t,r,n,i,o,a=0,s=this.chart;if(!e){for(t=0,r=s.data.datasets.length;t<r;++t)if(s.isDatasetVisible(t)){e=(n=s.getDatasetMeta(t)).data,i=n.controller;break}}if(!e)return 0;for(t=0,r=e.length;t<r;++t)"inner"!==(o=i.resolveDataElementOptions(t)).borderAlign&&(a=Math.max(a,o.borderWidth||0,o.hoverBorderWidth||0));return a}getMaxOffset(e){let t=0;for(let r=0,n=e.length;r<n;++r){let e=this.resolveDataElementOptions(r);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(t+=this._getRingWeight(r));return t}_getRingWeight(e){return Math.max(W(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class rv extends rl{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){let t=this._cachedMeta,{dataset:r,data:n=[],_dataset:i}=t,o=this.chart._animationsDisabled,{start:a,count:s}=ej(t,n,o);this._drawStart=a,this._drawCount=s,ez(t)&&(a=0,s=n.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!i._decimated,r.points=n;let l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:l},e),this.updateElements(n,a,s,e)}updateElements(e,t,r,n){let i="reset"===n,{iScale:o,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,{sharedOptions:u,includeOptions:c}=this._getSharedOptions(t,n),d=o.axis,h=a.axis,{spanGaps:f,segment:p}=this.options,g=eb(f)?f:1/0,m=this.chart._animationsDisabled||i||"none"===n,v=t+r,b=e.length,y=t>0&&this.getParsed(t-1);for(let r=0;r<b;++r){let f=e[r],b=m?f:{};if(r<t||r>=v){b.skip=!0;continue}let x=this.getParsed(r),w=F(x[h]),_=b[d]=o.getPixelForValue(x[d],r),C=b[h]=i||w?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,x,s):x[h],r);b.skip=isNaN(_)||isNaN(C)||w,b.stop=r>0&&Math.abs(x[d]-y[d])>g,p&&(b.parsed=x,b.raw=l.data[r]),c&&(b.options=u||this.resolveDataElementOptions(r,f.active?"active":n)),m||this.updateElement(f,r,b,n),y=x}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,r=t.options&&t.options.borderWidth||0,n=e.data||[];return n.length?Math.max(r,n[0].size(this.resolveDataElementOptions(0)),n[n.length-1].size(this.resolveDataElementOptions(n.length-1)))/2:r}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class rb extends rl{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:r,color:n}}=e.legend.options;return t.labels.map((t,i)=>{let o=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,r){r.chart.toggleDataVisibility(t.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let t=this._cachedMeta,r=this.chart,n=r.data.labels||[],i=eQ(t._parsed[e].r,r.options.locale);return{label:n[e]||"",value:i}}parseObjectData(e,t,r,n){return tO.bind(this)(e,t,r,n)}update(e){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){let e=this._cachedMeta,t={min:1/0,max:-1/0};return e.data.forEach((e,r)=>{let n=this.getParsed(r).r;!isNaN(n)&&this.chart.getDataVisibility(r)&&(n<t.min&&(t.min=n),n>t.max&&(t.max=n))}),t}_updateRadius(){let e=this.chart,t=e.chartArea,r=e.options,n=Math.max(Math.min(t.right-t.left,t.bottom-t.top)/2,0),i=Math.max(r.cutoutPercentage?n/100*r.cutoutPercentage:1,0),o=(n-i)/e.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(e,t,r,n){let i,o="reset"===n,a=this.chart,s=a.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,c=l.yCenter,d=l.getIndexAngle(0)-.5*ea,h=d,f=360/this.countVisibleElements();for(i=0;i<t;++i)h+=this._computeAngle(i,n,f);for(i=t;i<t+r;i++){let t=e[i],r=h,p=h+this._computeAngle(i,n,f),g=a.getDataVisibility(i)?l.getDistanceFromCenterForValue(this.getParsed(i).r):0;h=p,o&&(s.animateScale&&(g=0),s.animateRotate&&(r=p=d));let m={x:u,y:c,innerRadius:0,outerRadius:g,startAngle:r,endAngle:p,options:this.resolveDataElementOptions(i,t.active?"active":n)};this.updateElement(t,i,m,n)}}countVisibleElements(){let e=this._cachedMeta,t=0;return e.data.forEach((e,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&t++}),t}_computeAngle(e,t,r){return this.chart.getDataVisibility(e)?ex(this.resolveDataElementOptions(e,t).angle||r):0}}class ry extends rm{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class rx extends rl{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){let t=this._cachedMeta.vScale,r=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(r[t.axis])}}parseObjectData(e,t,r,n){return tO.bind(this)(e,t,r,n)}update(e){let t=this._cachedMeta,r=t.dataset,n=t.data||[],i=t.iScale.getLabels();if(r.points=n,"resize"!==e){let t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);let o={_loop:!0,_fullLoop:i.length===n.length,options:t};this.updateElement(r,void 0,o,e)}this.updateElements(n,0,n.length,e)}updateElements(e,t,r,n){let i=this._cachedMeta.rScale,o="reset"===n;for(let a=t;a<t+r;a++){let t=e[a],r=this.resolveDataElementOptions(a,t.active?"active":n),s=i.getPointPositionForValue(a,this.getParsed(a).r),l=o?i.xCenter:s.x,u=o?i.yCenter:s.y,c={x:l,y:u,angle:s.angle,skip:isNaN(l)||isNaN(u),options:r};this.updateElement(t,a,c,n)}}}class rw extends rl{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){let t=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:i}=t,o=this.getParsed(e),a=n.getLabelForValue(o.x),s=i.getLabelForValue(o.y);return{label:r[e]||"",value:"("+a+", "+s+")"}}update(e){let t=this._cachedMeta,{data:r=[]}=t,n=this.chart._animationsDisabled,{start:i,count:o}=ej(t,r,n);if(this._drawStart=i,this._drawCount=o,ez(t)&&(i=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:i,_dataset:o}=t;i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=r;let a=this.resolveDatasetElementOptions(e);a.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:a},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(r,i,o,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,t,r,n){let i="reset"===n,{iScale:o,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,u=this.resolveDataElementOptions(t,n),c=this.getSharedOptions(u),d=this.includeOptions(n,c),h=o.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=eb(p)?p:1/0,v=this.chart._animationsDisabled||i||"none"===n,b=t>0&&this.getParsed(t-1);for(let u=t;u<t+r;++u){let t=e[u],r=this.getParsed(u),p=v?t:{},y=F(r[f]),x=p[h]=o.getPixelForValue(r[h],u),w=p[f]=i||y?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,r,s):r[f],u);p.skip=isNaN(x)||isNaN(w)||y,p.stop=u>0&&Math.abs(r[h]-b[h])>m,g&&(p.parsed=r,p.raw=l.data[u]),d&&(p.options=c||this.resolveDataElementOptions(u,t.active?"active":n)),v||this.updateElement(t,u,p,n),b=r}this.updateSharedOptions(c,n,u)}getMaxOverflow(){let e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}let r=e.dataset,n=r.options&&r.options.borderWidth||0;return t.length?Math.max(n,t[0].size(this.resolveDataElementOptions(0)),t[t.length-1].size(this.resolveDataElementOptions(t.length-1)))/2:n}}function r_(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class rC{static override(e){Object.assign(rC.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return r_()}parse(){return r_()}format(){return r_()}add(){return r_()}diff(){return r_()}startOf(){return r_()}endOf(){return r_()}}function rk(e,t,r,n,i){let o=e.getSortedVisibleDatasetMetas(),a=r[t];for(let e=0,r=o.length;e<r;++e){let{index:r,data:s}=o[e],{lo:l,hi:u}=function(e,t,r,n){let{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&"r"!==t&&a&&o.length){let a=s._reversePixels?eR:eT;if(n){if(i._sharedOptions){let e=o[0],n="function"==typeof e.getRange&&e.getRange(t);if(n){let e=a(o,t,r-n),i=a(o,t,r+n);return{lo:e.lo,hi:i.hi}}}}else{let n=a(o,t,r);if(l){let{vScale:t}=i._cachedMeta,{_parsed:r}=e,o=r.slice(0,n.lo+1).reverse().findIndex(e=>!F(e[t.axis]));n.lo-=Math.max(0,o);let a=r.slice(n.hi).findIndex(e=>!F(e[t.axis]));n.hi+=Math.max(0,a)}return n}}return{lo:0,hi:o.length-1}}(o[e],t,a,i);for(let e=l;e<=u;++e){let t=s[e];t.skip||n(t,r,e)}}}function rS(e,t,r,n,i){let o=[];return(i||e.isPointInArea(t))&&rk(e,r,t,function(r,a,s){(i||e9(r,e.chartArea,0))&&r.inRange(t.x,t.y,n)&&o.push({element:r,datasetIndex:a,index:s})},!0),o}function rE(e,t,r,n,i,o){let a,s,l,u,c,d;return o||e.isPointInArea(t)?"r"!==r||n?(a=[],s=-1!==r.indexOf("x"),l=-1!==r.indexOf("y"),u=function(e,t){return Math.sqrt(Math.pow(s?Math.abs(e.x-t.x):0,2)+Math.pow(l?Math.abs(e.y-t.y):0,2))},c=1/0,rk(e,r,t,function(r,s,l){let d=r.inRange(t.x,t.y,i);if(n&&!d)return;let h=r.getCenterPoint(i);if(!(o||e.isPointInArea(h))&&!d)return;let f=u(t,h);f<c?(a=[{element:r,datasetIndex:s,index:l}],c=f):f===c&&a.push({element:r,datasetIndex:s,index:l})}),a):(d=[],rk(e,r,t,function(e,r,n){let{startAngle:o,endAngle:a}=e.getProps(["startAngle","endAngle"],i),{angle:s}=e_(e,{x:t.x,y:t.y});eE(s,o,a)&&d.push({element:e,datasetIndex:r,index:n})}),d):[]}function rO(e,t,r,n,i){let o=[],a="x"===r?"inXRange":"inYRange",s=!1;return(rk(e,r,t,(e,n,l)=>{e[a]&&e[a](t[r],i)&&(o.push({element:e,datasetIndex:n,index:l}),s=s||e.inRange(t.x,t.y,i))}),n&&!s)?[]:o}var rI={modes:{index(e,t,r,n){let i=tF(t,e),o=r.axis||"x",a=r.includeInvisible||!1,s=r.intersect?rS(e,i,o,n,a):rE(e,i,o,!1,n,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=s[0].index,r=e.data[t];r&&!r.skip&&l.push({element:r,datasetIndex:e.index,index:t})}),l):[]},dataset(e,t,r,n){let i=tF(t,e),o=r.axis||"xy",a=r.includeInvisible||!1,s=r.intersect?rS(e,i,o,n,a):rE(e,i,o,!1,n,a);if(s.length>0){let t=s[0].datasetIndex,r=e.getDatasetMeta(t).data;s=[];for(let e=0;e<r.length;++e)s.push({element:r[e],datasetIndex:t,index:e})}return s},point(e,t,r,n){let i=tF(t,e);return rS(e,i,r.axis||"xy",n,r.includeInvisible||!1)},nearest(e,t,r,n){let i=tF(t,e),o=r.axis||"xy",a=r.includeInvisible||!1;return rE(e,i,o,r.intersect,n,a)},x(e,t,r,n){let i=tF(t,e);return rO(e,i,"x",r.intersect,n)},y(e,t,r,n){let i=tF(t,e);return rO(e,i,"y",r.intersect,n)}}};let rP=["left","top","right","bottom"];function rT(e,t){return e.filter(e=>e.pos===t)}function rR(e,t){return e.filter(e=>-1===rP.indexOf(e.pos)&&e.box.axis===t)}function rA(e,t){return e.sort((e,r)=>{let n=t?r:e,i=t?e:r;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function rM(e,t,r,n){return Math.max(e[r],t[r])+Math.max(e[n],t[n])}function rN(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function rD(e,t,r,n){let i,o,a,s,l,u,c=[];for(i=0,o=e.length,l=0;i<o;++i){(s=(a=e[i]).box).update(a.width||t.w,a.height||t.h,function(e,t){let r=t.maxPadding;return function(e){let n={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{n[e]=Math.max(t[e],r[e])}),n}(e?["left","right"]:["top","bottom"])}(a.horizontal,t));let{same:o,other:d}=function(e,t,r,n){let{pos:i,box:o}=r,a=e.maxPadding;if(!z(i)){r.size&&(e[i]-=r.size);let t=n[r.stack]||{size:0,count:1};t.size=Math.max(t.size,r.horizontal?o.height:o.width),r.size=t.size/t.count,e[i]+=r.size}o.getPadding&&rN(a,o.getPadding());let s=Math.max(0,t.outerWidth-rM(a,e,"left","right")),l=Math.max(0,t.outerHeight-rM(a,e,"top","bottom")),u=s!==e.w,c=l!==e.h;return e.w=s,e.h=l,r.horizontal?{same:u,other:c}:{same:c,other:u}}(t,r,a,n);l|=o&&c.length,u=u||d,s.fullSize||c.push(a)}return l&&rD(c,t,r,n)||u}function rL(e,t,r,n,i){e.top=r,e.left=t,e.right=t+n,e.bottom=r+i,e.width=n,e.height=i}function rV(e,t,r,n){let i=r.padding,{x:o,y:a}=t;for(let s of e){let e=s.box,l=n[s.stack]||{count:1,placed:0,weight:1},u=s.stackWeight/l.weight||1;if(s.horizontal){let n=t.w*u,o=l.size||e.height;en(l.start)&&(a=l.start),e.fullSize?rL(e,i.left,a,r.outerWidth-i.right-i.left,o):rL(e,t.left+l.placed,a,n,o),l.start=a,l.placed+=n,a=e.bottom}else{let n=t.h*u,a=l.size||e.width;en(l.start)&&(o=l.start),e.fullSize?rL(e,o,i.top,a,r.outerHeight-i.bottom-i.top):rL(e,o,t.top+l.placed,a,n),l.start=o,l.placed+=n,o=e.right}}t.x=o,t.y=a}var rF={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){let r=e.boxes?e.boxes.indexOf(t):-1;-1!==r&&e.boxes.splice(r,1)},configure(e,t,r){t.fullSize=r.fullSize,t.position=r.position,t.weight=r.weight},update(e,t,r,n){let i,o,a,s,l,u,c,d;if(!e)return;let h=th(e.options.layout.padding),f=Math.max(t-h.width,0),p=Math.max(r-h.height,0),g=(o=rA((i=function(e){let t,r,n,i,o,a,s=[];for(t=0,r=(e||[]).length;t<r;++t)n=e[t],({position:i,options:{stack:o,stackWeight:a=1}}=n),s.push({index:t,box:n,pos:i,horizontal:n.isHorizontal(),weight:n.weight,stack:o&&i+o,stackWeight:a});return s}(e.boxes)).filter(e=>e.box.fullSize),!0),a=rA(rT(i,"left"),!0),s=rA(rT(i,"right")),l=rA(rT(i,"top"),!0),u=rA(rT(i,"bottom")),c=rR(i,"x"),d=rR(i,"y"),{fullSize:o,leftAndTop:a.concat(l),rightAndBottom:s.concat(d).concat(u).concat(c),chartArea:rT(i,"chartArea"),vertical:a.concat(s).concat(d),horizontal:l.concat(u).concat(c)}),m=g.vertical,v=g.horizontal;q(e.boxes,e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()});let b=Object.freeze({outerWidth:t,outerHeight:r,padding:h,availableWidth:f,availableHeight:p,vBoxMaxWidth:f/2/(m.reduce((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1,0)||1),hBoxMaxHeight:p/2}),y=Object.assign({},h);rN(y,th(n));let x=Object.assign({maxPadding:y,w:f,h:p,x:h.left,y:h.top},h),w=function(e,t){let r,n,i,o=function(e){let t={};for(let r of e){let{stack:e,pos:n,stackWeight:i}=r;if(!e||!rP.includes(n))continue;let o=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return t}(e),{vBoxMaxWidth:a,hBoxMaxHeight:s}=t;for(r=0,n=e.length;r<n;++r){let{fullSize:n}=(i=e[r]).box,l=o[i.stack],u=l&&i.stackWeight/l.weight;i.horizontal?(i.width=u?u*a:n&&t.availableWidth,i.height=s):(i.width=a,i.height=u?u*s:n&&t.availableHeight)}return o}(m.concat(v),b);rD(g.fullSize,x,b,w),rD(m,x,b,w),rD(v,x,b,w)&&rD(m,x,b,w);let _=x.maxPadding;function C(e){let t=Math.max(_[e]-x[e],0);return x[e]+=t,t}x.y+=C("top"),x.x+=C("left"),C("right"),C("bottom"),rV(g.leftAndTop,x,b,w),x.x+=x.w,x.y+=x.h,rV(g.rightAndBottom,x,b,w),e.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},q(g.chartArea,t=>{let r=t.box;Object.assign(r,e.chartArea),r.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class rj{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,r){}removeEventListener(e,t,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,r,n){return t=Math.max(0,t||e.width),r=r||e.height,{width:t,height:Math.max(0,n?Math.floor(t/n):r)}}isAttached(e){return!0}updateConfig(e){}}class rz extends rj{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}let rB="$chartjs",rH={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},rW=e=>null===e||""===e,rU=!!tB&&{passive:!0};function r$(e,t){for(let r of e)if(r===t||r.contains(t))return!0}function rq(e,t,r){let n=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let r of e)t=(t=t||r$(r.addedNodes,n))&&!r$(r.removedNodes,n);t&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function rG(e,t,r){let n=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let r of e)t=(t=t||r$(r.removedNodes,n))&&!r$(r.addedNodes,n);t&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}let rK=new Map,rY=0;function rX(){let e=window.devicePixelRatio;e!==rY&&(rY=e,rK.forEach((t,r)=>{r.currentDevicePixelRatio!==e&&t()}))}function rQ(e,t,r){let n=e.canvas,i=n&&tM(n);if(!i)return;let o=eL((e,t)=>{let n=i.clientWidth;r(e,t),n<i.clientWidth&&r()},window),a=new ResizeObserver(e=>{let t=e[0],r=t.contentRect.width,n=t.contentRect.height;(0!==r||0!==n)&&o(r,n)});return a.observe(i),rK.size||window.addEventListener("resize",rX),rK.set(e,o),a}function rZ(e,t,r){r&&r.disconnect(),"resize"===t&&(rK.delete(e),rK.size||window.removeEventListener("resize",rX))}function rJ(e,t,r){let n=e.canvas,i=eL(t=>{null!==e.ctx&&r(function(e,t){let r=rH[e.type]||e.type,{x:n,y:i}=tF(e,t);return{type:r,chart:t,native:e,x:void 0!==n?n:null,y:void 0!==i?i:null}}(t,e))},e);return n&&n.addEventListener(t,i,rU),i}class r0 extends rj{acquireContext(e,t){let r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(!function(e,t){let r=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[rB]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",rW(i)){let t=tH(e,"width");void 0!==t&&(e.width=t)}if(rW(n))if(""===e.style.height)e.height=e.width/(t||2);else{let t=tH(e,"height");void 0!==t&&(e.height=t)}}(e,t),r):null}releaseContext(e){let t=e.canvas;if(!t[rB])return!1;let r=t[rB].initial;["height","width"].forEach(e=>{let n=r[e];F(n)?t.removeAttribute(e):t.setAttribute(e,n)});let n=r.style||{};return Object.keys(n).forEach(e=>{t.style[e]=n[e]}),t.width=t.width,delete t[rB],!0}addEventListener(e,t,r){this.removeEventListener(e,t);let n=e.$proxies||(e.$proxies={}),i={attach:rq,detach:rG,resize:rQ}[t]||rJ;n[t]=i(e,t,r)}removeEventListener(e,t){let r=e.$proxies||(e.$proxies={}),n=r[t];n&&((({attach:rZ,detach:rZ,resize:rZ})[t]||function(e,t,r){e&&e.canvas&&e.canvas.removeEventListener(t,r,rU)})(e,t,n),r[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,r,n){return function(e,t,r,n){let i=tD(e),o=tV(i,"margin"),a=tN(i.maxWidth,e,"clientWidth")||eu,s=tN(i.maxHeight,e,"clientHeight")||eu,l=function(e,t,r){let n,i;if(void 0===t||void 0===r){let o=e&&tM(e);if(o){let e=o.getBoundingClientRect(),a=tD(o),s=tV(a,"border","width"),l=tV(a,"padding");t=e.width-l.width-s.width,r=e.height-l.height-s.height,n=tN(a.maxWidth,o,"clientWidth"),i=tN(a.maxHeight,o,"clientHeight")}else t=e.clientWidth,r=e.clientHeight}return{width:t,height:r,maxWidth:n||eu,maxHeight:i||eu}}(e,t,r),{width:u,height:c}=l;if("content-box"===i.boxSizing){let e=tV(i,"border","width"),t=tV(i,"padding");u-=t.width+e.width,c-=t.height+e.height}return u=Math.max(0,u-o.width),c=Math.max(0,n?u/n:c-o.height),u=tj(Math.min(u,a,l.maxWidth)),c=tj(Math.min(c,s,l.maxHeight)),u&&!c&&(c=tj(u/2)),(void 0!==t||void 0!==r)&&n&&l.height&&c>l.height&&(u=tj(Math.floor((c=l.height)*n))),{width:u,height:c}}(e,t,r,n)}isAttached(e){let t=e&&tM(e);return!!(t&&t.isConnected)}}class r1{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:r}=this.getProps(["x","y"],e);return{x:t,y:r}}hasValue(){return eb(this.x)&&eb(this.y)}getProps(e,t){let r=this.$animations;if(!t||!r)return this;let n={};return e.forEach(e=>{n[e]=r[e]&&r[e].active()?r[e]._to:this[e]}),n}}function r2(e,t,r,n,i){let o,a,s,l=W(n,0),u=Math.min(W(i,e.length),e.length),c=0;for(r=Math.ceil(r),i&&(r=(o=i-n)/Math.floor(o/r)),s=l;s<0;)s=Math.round(l+ ++c*r);for(a=Math.max(l,0);a<u;a++)a===s&&(t.push(e[a]),s=Math.round(l+ ++c*r))}let r5=(e,t,r)=>"top"===t||"left"===t?e[t]+r:e[t]-r,r3=(e,t)=>Math.min(t||e,e);function r4(e,t){let r=[],n=e.length/t,i=e.length,o=0;for(;o<i;o+=n)r.push(e[Math.floor(o)]);return r}function r6(e){return e.drawTicks?e.tickLength:0}function r8(e,t){if(!e.display)return 0;let r=tf(e.font,t),n=th(e.padding);return(j(e.text)?e.text.length:1)*r.lineHeight+n.height}class r7 extends r1{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:r,_suggestedMax:n}=this;return e=H(e,1/0),t=H(t,-1/0),r=H(r,1/0),n=H(n,-1/0),{min:H(e,r),max:H(t,n),minDefined:B(e),maxDefined:B(t)}}getMinMax(e){let t,{min:r,max:n,minDefined:i,maxDefined:o}=this.getUserBounds();if(i&&o)return{min:r,max:n};let a=this.getMatchingVisibleMetas();for(let s=0,l=a.length;s<l;++s)t=a[s].controller.getMinMax(this,e),i||(r=Math.min(r,t.min)),o||(n=Math.max(n,t.max));return r=o&&r>n?n:r,n=i&&r>n?r:n,{min:H(r,H(n,r)),max:H(n,H(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$(this.options.beforeUpdate,[this])}update(e,t,r){let{beginAtZero:n,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,r){let{min:n,max:i}=e,o=U(t,(i-n)/2),a=(e,t)=>r&&0===e?0:e+t;return{min:a(n,-Math.abs(o)),max:a(i,o)}}(this,i,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=a<this.ticks.length;this._convertTicksToLabels(s?r4(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=function(e,t){var r;let n,i,o=e.options.ticks,a=(n=(r=e).options.offset,i=r._tickSize(),Math.floor(Math.min(r._length/i+ +!n,r._maxLength/i))),s=Math.min(o.maxTicksLimit||a,a),l=o.major.enabled?function(e){let t,r,n=[];for(t=0,r=e.length;t<r;t++)e[t].major&&n.push(t);return n}(t):[],u=l.length,c=l[0],d=l[u-1],h=[];if(u>s)return function(e,t,r,n){let i,o=0,a=r[0];for(i=0,n=Math.ceil(n);i<e.length;i++)i===a&&(t.push(e[i]),a=r[++o*n])}(t,h,l,u/s),h;let f=function(e,t,r){let n=function(e){let t,r,n=e.length;if(n<2)return!1;for(r=e[0],t=1;t<n;++t)if(e[t]-e[t-1]!==r)return!1;return r}(e),i=t.length/r;if(!n)return Math.max(i,1);let o=function(e){let t,r=[],n=Math.sqrt(e);for(t=1;t<n;t++)e%t==0&&(r.push(t),r.push(e/t));return n===(0|n)&&r.push(n),r.sort((e,t)=>e-t).pop(),r}(n);for(let e=0,t=o.length-1;e<t;e++){let t=o[e];if(t>i)return t}return Math.max(i,1)}(l,t,s);if(u>0){let e,r,n=u>1?Math.round((d-c)/(u-1)):null;for(r2(t,h,f,F(n)?0:c-n,c),e=0,r=u-1;e<r;e++)r2(t,h,f,l[e],l[e+1]);return r2(t,h,f,d,F(n)?t.length:d+n),h}return r2(t,h,f),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,r=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,r=!r),this._startPixel=e,this._endPixel=t,this._reversePixels=r,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$(this.options.afterUpdate,[this])}beforeSetDimensions(){$(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){$(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),$(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let t,r,n,i=this.options.ticks;for(t=0,r=e.length;t<r;t++)(n=e[t]).label=$(i.callback,[n.value,t,e],this)}afterTickToLabelConversion(){$(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e,t,r,n=this.options,i=n.ticks,o=r3(this.ticks.length,n.ticks.maxTicksLimit),a=i.minRotation||0,s=i.maxRotation,l=a;if(!this._isVisible()||!i.display||a>=s||o<=1||!this.isHorizontal()){this.labelRotation=a;return}let u=this._getLabelSizes(),c=u.widest.width,d=u.highest.height,h=eO(this.chart.width-c,0,this.maxWidth);c+6>(e=n.offset?this.maxWidth/o:h/(o-1))&&(e=h/(o-(n.offset?.5:1)),t=this.maxHeight-r6(n.grid)-i.padding-r8(n.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=Math.max(a,Math.min(s,l=180/ea*Math.min(Math.asin(eO((u.highest.height+6)/e,-1,1)),Math.asin(eO(t/r,-1,1))-Math.asin(eO(d/r,-1,1)))))),this.labelRotation=l}afterCalculateLabelRotation(){$(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:r,title:n,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){let o=r8(n,t.options.font);if(a?(e.width=this.maxWidth,e.height=r6(i)+o):(e.height=this.maxHeight,e.width=r6(i)+o),r.display&&this.ticks.length){let{first:t,last:n,widest:i,highest:o}=this._getLabelSizes(),s=2*r.padding,l=ex(this.labelRotation),u=Math.cos(l),c=Math.sin(l);if(a){let t=r.mirror?0:c*i.width+u*o.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{let t=r.mirror?0:u*i.width+c*o.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,n,c,u)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,r,n){let{ticks:{align:i,padding:o},position:a}=this.options,s=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){let a=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),c=0,d=0;s?l?(c=n*e.width,d=r*t.height):(c=r*e.height,d=n*t.width):"start"===i?d=t.width:"end"===i?c=e.width:"inner"!==i&&(c=e.width/2,d=t.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-u+o)*this.width/(this.width-u),0)}else{let r=t.height/2,n=e.height/2;"start"===i?(r=0,n=e.height):"end"===i&&(r=t.height,n=0),this.paddingTop=r+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,r;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,r=e.length;t<r;t++)F(e[t].label)&&(e.splice(t,1),r--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,r=this.ticks;t<r.length&&(r=r4(r,t)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,r){let n,i,o,a,s,l,u,c,d,h,f,{ctx:p,_longestTextCache:g}=this,m=[],v=[],b=Math.floor(t/r3(t,r)),y=0,x=0;for(n=0;n<t;n+=b){if(a=e[n].label,p.font=l=(s=this._resolveTickFontOptions(n)).string,u=g[l]=g[l]||{data:{},gc:[]},c=s.lineHeight,d=h=0,F(a)||j(a)){if(j(a))for(i=0,o=a.length;i<o;++i)F(f=a[i])||j(f)||(d=e3(p,u.data,u.gc,d,f),h+=c)}else d=e3(p,u.data,u.gc,d,a),h=c;m.push(d),v.push(h),y=Math.max(d,y),x=Math.max(h,x)}q(g,e=>{let r,n=e.gc,i=n.length/2;if(i>t){for(r=0;r<i;++r)delete e.data[n[r]];n.splice(0,i)}});let w=m.indexOf(y),_=v.indexOf(x),C=e=>({width:m[e]||0,height:v[e]||0});return{first:C(0),last:C(t-1),widest:C(w),highest:C(_),widths:m,heights:v}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return eO(this._alignToPixels?e4(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){var t,r;let n=this.ticks||[];if(e>=0&&e<n.length){let r=n[e];return r.$context||(t=this.getContext(),r.$context=tg(t,{tick:r,index:e,type:"tick"}))}return this.$context||(this.$context=(r=this.chart.getContext(),tg(r,{scale:this,type:"scale"})))}_tickSize(){let e=this.options.ticks,t=ex(this.labelRotation),r=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),i=this._getLabelSizes(),o=e.autoSkipPadding||0,a=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return this.isHorizontal()?s*r>a*n?a/r:s/n:s*n<a*r?s/r:a/n}_isVisible(){let e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let t,r,n,i,o,a,s,l,u,c,d,h,f=this.axis,p=this.chart,g=this.options,{grid:m,position:v,border:b}=g,y=m.offset,x=this.isHorizontal(),w=this.ticks.length+ +!!y,_=r6(m),C=[],k=b.setContext(this.getContext()),S=k.display?k.width:0,E=S/2,O=function(e){return e4(p,e,S)};if("top"===v)t=O(this.bottom),a=this.bottom-_,l=t-E,c=O(e.top)+E,h=e.bottom;else if("bottom"===v)t=O(this.top),c=e.top,h=O(e.bottom)-E,a=t+E,l=this.top+_;else if("left"===v)t=O(this.right),o=this.right-_,s=t-E,u=O(e.left)+E,d=e.right;else if("right"===v)t=O(this.left),u=e.left,d=O(e.right)-E,o=t+E,s=this.left+_;else if("x"===f){if("center"===v)t=O((e.top+e.bottom)/2+.5);else if(z(v)){let e=Object.keys(v)[0],r=v[e];t=O(this.chart.scales[e].getPixelForValue(r))}c=e.top,h=e.bottom,l=(a=t+E)+_}else if("y"===f){if("center"===v)t=O((e.left+e.right)/2);else if(z(v)){let e=Object.keys(v)[0],r=v[e];t=O(this.chart.scales[e].getPixelForValue(r))}s=(o=t-E)-_,u=e.left,d=e.right}let I=W(g.ticks.maxTicksLimit,w),P=Math.max(1,Math.ceil(w/I));for(r=0;r<w;r+=P){let e=this.getContext(r),t=m.setContext(e),f=b.setContext(e),g=t.lineWidth,v=t.color,w=f.dash||[],_=f.dashOffset,k=t.tickWidth,S=t.tickColor,E=t.tickBorderDash||[],O=t.tickBorderDashOffset;void 0!==(n=function(e,t,r){let n,i=e.ticks.length,o=Math.min(t,i-1),a=e._startPixel,s=e._endPixel,l=e.getPixelForTick(o);if(!r||(n=1===i?Math.max(l-a,s-l):0===t?(e.getPixelForTick(1)-l)/2:(l-e.getPixelForTick(o-1))/2,!((l+=o<t?n:-n)<a-1e-6)&&!(l>s+1e-6)))return l}(this,r,y))&&(i=e4(p,n,g),x?o=s=u=d=i:a=l=c=h=i,C.push({tx1:o,ty1:a,tx2:s,ty2:l,x1:u,y1:c,x2:d,y2:h,width:g,color:v,borderDash:w,borderDashOffset:_,tickWidth:k,tickColor:S,tickBorderDash:E,tickBorderDashOffset:O}))}return this._ticksLength=w,this._borderValue=t,C}_computeLabelItems(e){let t,r,n,i,o,a,s,l,u,c,d,h=this.axis,f=this.options,{position:p,ticks:g}=f,m=this.isHorizontal(),v=this.ticks,{align:b,crossAlign:y,padding:x,mirror:w}=g,_=r6(f.grid),C=_+x,k=w?-x:C,S=-ex(this.labelRotation),E=[],O="middle";if("top"===p)o=this.bottom-k,a=this._getXAxisLabelAlignment();else if("bottom"===p)o=this.top+k,a=this._getXAxisLabelAlignment();else if("left"===p){let e=this._getYAxisLabelAlignment(_);a=e.textAlign,i=e.x}else if("right"===p){let e=this._getYAxisLabelAlignment(_);a=e.textAlign,i=e.x}else if("x"===h){if("center"===p)o=(e.top+e.bottom)/2+C;else if(z(p)){let e=Object.keys(p)[0],t=p[e];o=this.chart.scales[e].getPixelForValue(t)+C}a=this._getXAxisLabelAlignment()}else if("y"===h){if("center"===p)i=(e.left+e.right)/2-C;else if(z(p)){let e=Object.keys(p)[0],t=p[e];i=this.chart.scales[e].getPixelForValue(t)}a=this._getYAxisLabelAlignment(_).textAlign}"y"===h&&("start"===b?O="top":"end"===b&&(O="bottom"));let I=this._getLabelSizes();for(t=0,r=v.length;t<r;++t){let e;n=v[t].label;let h=g.setContext(this.getContext(t));s=this.getPixelForTick(t)+g.labelOffset,u=(l=this._resolveTickFontOptions(t)).lineHeight;let f=(c=j(n)?n.length:1)/2,b=h.color,x=h.textStrokeColor,_=h.textStrokeWidth,C=a;if(m?(i=s,"inner"===a&&(C=t===r-1?this.options.reverse?"left":"right":0===t?this.options.reverse?"right":"left":"center"),d="top"===p?"near"===y||0!==S?-c*u+u/2:"center"===y?-I.highest.height/2-f*u+u:-I.highest.height+u/2:"near"===y||0!==S?u/2:"center"===y?I.highest.height/2-f*u:I.highest.height-c*u,w&&(d*=-1),0===S||h.showLabelBackdrop||(i+=u/2*Math.sin(S))):(o=s,d=(1-c)*u/2),h.showLabelBackdrop){let n=th(h.backdropPadding),i=I.heights[t],o=I.widths[t],s=d-n.top,l=0-n.left;switch(O){case"middle":s-=i/2;break;case"bottom":s-=i}switch(a){case"center":l-=o/2;break;case"right":l-=o;break;case"inner":t===r-1?l-=o:t>0&&(l-=o/2)}e={left:l,top:s,width:o+n.width,height:i+n.height,color:h.backdropColor}}E.push({label:n,font:l,textOffset:d,options:{rotation:S,color:b,strokeColor:x,strokeWidth:_,textAlign:C,textBaseline:O,translation:[i,o],backdrop:e}})}return E}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-ex(this.labelRotation))return"top"===e?"left":"right";let r="center";return"start"===t.align?r="left":"end"===t.align?r="right":"inner"===t.align&&(r="inner"),r}_getYAxisLabelAlignment(e){let t,r,{position:n,ticks:{crossAlign:i,mirror:o,padding:a}}=this.options,s=this._getLabelSizes(),l=e+a,u=s.widest.width;return"left"===n?o?(r=this.right+a,"near"===i?t="left":"center"===i?(t="center",r+=u/2):(t="right",r+=u)):(r=this.right-l,"near"===i?t="right":"center"===i?(t="center",r-=u/2):(t="left",r=this.left)):"right"===n?o?(r=this.left+a,"near"===i?t="right":"center"===i?(t="center",r-=u/2):(t="left",r-=u)):(r=this.left+l,"near"===i?t="left":"center"===i?(t="center",r+=u/2):(t="right",r=this.right)):t="right",{textAlign:t,x:r}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:r,top:n,width:i,height:o}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(r,n,i,o),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let r=this.ticks.findIndex(t=>t.value===e);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){let t,r,n=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),a=(e,t,r)=>{r.width&&r.color&&(i.save(),i.lineWidth=r.width,i.strokeStyle=r.color,i.setLineDash(r.borderDash||[]),i.lineDashOffset=r.borderDashOffset,i.beginPath(),i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke(),i.restore())};if(n.display)for(t=0,r=o.length;t<r;++t){let e=o[t];n.drawOnChartArea&&a({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),n.drawTicks&&a({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){let e,t,r,n,{chart:i,ctx:o,options:{border:a,grid:s}}=this,l=a.setContext(this.getContext()),u=a.display?l.width:0;if(!u)return;let c=s.setContext(this.getContext(0)).lineWidth,d=this._borderValue;this.isHorizontal()?(e=e4(i,this.left,u)-u/2,t=e4(i,this.right,c)+c/2,r=n=d):(r=e4(i,this.top,u)-u/2,n=e4(i,this.bottom,c)+c/2,e=t=d),o.save(),o.lineWidth=l.width,o.strokeStyle=l.color,o.beginPath(),o.moveTo(e,r),o.lineTo(t,n),o.stroke(),o.restore()}drawLabels(e){if(!this.options.ticks.display)return;let t=this.ctx,r=this._computeLabelArea();for(let n of(r&&te(t,r),this.getLabelItems(e))){let e=n.options,r=n.font;ti(t,n.label,0,n.textOffset,r,e)}r&&tt(t)}drawTitle(){let e,t,{ctx:r,options:{position:n,title:i,reverse:o}}=this;if(!i.display)return;let a=tf(i.font),s=th(i.padding),l=i.align,u=a.lineHeight/2;"bottom"===n||"center"===n||z(n)?(u+=s.bottom,j(i.text)&&(u+=a.lineHeight*(i.text.length-1))):u+=s.top;let{titleX:c,titleY:d,maxWidth:h,rotation:f}=function(e,t,r,n){let i,o,a,{top:s,left:l,bottom:u,right:c,chart:d}=e,{chartArea:h,scales:f}=d,p=0,g=u-s,m=c-l;if(e.isHorizontal()){if(o=eF(n,l,c),z(r)){let e=Object.keys(r)[0],n=r[e];a=f[e].getPixelForValue(n)+g-t}else a="center"===r?(h.bottom+h.top)/2+g-t:r5(e,r,t);i=c-l}else{if(z(r)){let e=Object.keys(r)[0],n=r[e];o=f[e].getPixelForValue(n)-m+t}else o="center"===r?(h.left+h.right)/2-m+t:r5(e,r,t);a=eF(n,u,s),p="left"===r?-ed:ed}return{titleX:o,titleY:a,maxWidth:i,rotation:p}}(this,u,n,l);ti(r,i.text,0,0,a,{color:i.color,maxWidth:h,rotation:f,textAlign:(e=eV(l),(o&&"right"!==n||!o&&"right"===n)&&(e="left"===(t=e)?"right":"right"===t?"left":t),e),textBaseline:"middle",translation:[c,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let e=this.options,t=e.ticks&&e.ticks.z||0,r=W(e.grid&&e.grid.z,-1),n=W(e.border&&e.border.z,0);return this._isVisible()&&this.draw===r7.prototype.draw?[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){let t,r,n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[];for(t=0,r=n.length;t<r;++t){let r=n[t];r[i]!==this.id||e&&r.type!==e||o.push(r)}return o}_resolveTickFontOptions(e){return tf(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class r9{constructor(e,t,r){this.type=e,this.scope=t,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){var t,r,n,i,o,a;let s,l,u=Object.getPrototypeOf(e);"id"in(t=u)&&"defaults"in t&&(l=this.register(u));let c=this.items,d=e.id,h=this.scope+"."+d;if(!d)throw Error("class does not have id: "+e);return d in c||(c[d]=e,r=e,n=h,i=l,s=Q(Object.create(null),[i?e5.get(i):{},e5.get(n),r.defaults]),e5.set(n,s),r.defaultRoutes&&(o=n,Object.keys(a=r.defaultRoutes).forEach(e=>{let t=e.split("."),r=t.pop(),n=[o].concat(t).join("."),i=a[e].split("."),s=i.pop(),l=i.join(".");e5.route(n,r,l,s)})),r.descriptors&&e5.describe(n,r.descriptors),this.override&&e5.override(e.id,e.overrides)),h}get(e){return this.items[e]}unregister(e){let t=this.items,r=e.id,n=this.scope;r in t&&delete t[r],n&&r in e5[n]&&(delete e5[n][r],this.override&&delete eJ[r])}}var ne=new class{constructor(){this.controllers=new r9(rl,"datasets",!0),this.elements=new r9(r1,"elements"),this.plugins=new r9(Object,"plugins"),this.scales=new r9(r7,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,r){[...t].forEach(t=>{let n=r||this._getRegistryForType(t);r||n.isForType(t)||n===this.plugins&&t.id?this._exec(e,n,t):q(t,t=>{let n=r||this._getRegistryForType(t);this._exec(e,n,t)})})}_exec(e,t,r){let n=er(e);$(r["before"+n],[],r),t[e](r),$(r["after"+n],[],r)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let r=this._typedRegistries[t];if(r.isForType(e))return r}return this.plugins}_get(e,t,r){let n=t.get(e);if(void 0===n)throw Error('"'+e+'" is not a registered '+r+".");return n}};class nt{constructor(){this._init=void 0}notify(e,t,r,n){if("beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),void 0===this._init)return;let i=n?this._descriptors(e).filter(n):this._descriptors(e),o=this._notify(i,e,t,r);return"afterDestroy"===t&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),o}_notify(e,t,r,n){for(let i of(n=n||{},e)){let e=i.plugin;if(!1===$(e[r],[t,n,i.options],e)&&n.cancelable)return!1}return!0}invalidate(){F(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){let r=e&&e.config,n=W(r.options&&r.options.plugins,{}),i=function(e){let t={},r=[],n=Object.keys(ne.plugins.items);for(let e=0;e<n.length;e++)r.push(ne.getPlugin(n[e]));let i=e.plugins||[];for(let e=0;e<i.length;e++){let n=i[e];-1===r.indexOf(n)&&(r.push(n),t[n.id]=!0)}return{plugins:r,localIds:t}}(r);return!1!==n||t?function(e,{plugins:t,localIds:r},n,i){let o=[],a=e.getContext();for(let l of t){var s;let t=l.id,u=(s=n[t],i||!1!==s?!0===s?{}:s:null);null!==u&&o.push({plugin:l,options:function(e,{plugin:t,local:r},n,i){let o=e.pluginScopeKeys(t),a=e.getOptionScopes(n,o);return r&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(e.config,{plugin:l,local:r[t]},u,a)})}return o}(e,i,n,t):[]}_notifyStateChanges(e){let t=this._oldCache||[],r=this._cache,n=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(n(t,r),e,"stop"),this._notify(n(r,t),e,"start")}}function nr(e,t){let r=e5.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||r.indexAxis||"x"}function nn(e){if("x"===e||"y"===e||"r"===e)return e}function ni(e,...t){if(nn(e))return e;for(let n of t){var r;let t=n.axis||("top"===(r=n.position)||"bottom"===r?"x":"left"===r||"right"===r?"y":void 0)||e.length>1&&nn(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function no(e,t,r){if(r[t+"AxisID"]===e)return{axis:t}}function na(e){let t,r,n,i,o=e.options||(e.options={});o.plugins=W(o.plugins,{}),t=eJ[e.type]||{scales:{}},r=o.scales||{},n=nr(e.type,o),i=Object.create(null),Object.keys(r).forEach(o=>{let a=r[o];if(!z(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);let s=ni(o,a,function(e,t){if(t.data&&t.data.datasets){let r=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(r.length)return no(e,"x",r[0])||no(e,"y",r[0])}return{}}(o,e),e5.scales[a.type]),l=s===n?"_index_":"_value_",u=t.scales||{};i[o]=Z(Object.create(null),[{axis:s},a,u[s],u[l]])}),e.data.datasets.forEach(t=>{let n=t.type||e.type,a=t.indexAxis||nr(n,o),s=(eJ[n]||{}).scales||{};Object.keys(s).forEach(e=>{let n,o=(n=e,"_index_"===e?n=a:"_value_"===e&&(n="x"===a?"y":"x"),n),l=t[o+"AxisID"]||o;i[l]=i[l]||Object.create(null),Z(i[l],[{axis:o},r[l],s[e]])})}),Object.keys(i).forEach(e=>{let t=i[e];Z(t,[e5.scales[t.type],e5.scale])}),o.scales=i}function ns(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}let nl=new Map,nu=new Set;function nc(e,t){let r=nl.get(e);return r||(r=t(),nl.set(e,r),nu.add(r)),r}let nd=(e,t,r)=>{let n=et(t,r);void 0!==n&&e.add(n)};class nh{constructor(e){this._config=function(e){return(e=e||{}).data=ns(e.data),na(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ns(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),na(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return nc(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return nc(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return nc(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,r=this.type;return nc(`${r}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let r=this._scopeCache,n=r.get(e);return(!n||t)&&(n=new Map,r.set(e,n)),n}getOptionScopes(e,t,r){let{options:n,type:i}=this,o=this._cachedScopes(e,r),a=o.get(t);if(a)return a;let s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>nd(s,e,t))),t.forEach(e=>nd(s,n,e)),t.forEach(e=>nd(s,eJ[i]||{},e)),t.forEach(e=>nd(s,e5,e)),t.forEach(e=>nd(s,e0,e))});let l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),nu.has(t)&&o.set(t,l),l}chartOptionScopes(){let{options:e,type:t}=this;return[e,eJ[t]||{},e5.datasets[t]||{},{type:t},e5,e0]}resolveNamedOptions(e,t,r,n=[""]){let i={$shared:!0},{resolver:o,subPrefixes:a}=nf(this._resolverCache,e,n),s=o;if(function(e,t){let{isScriptable:r,isIndexable:n}=tb(e);for(let i of t){let t=r(i),o=n(i),a=(o||t)&&e[i];if(t&&(ei(a)||np(a))||o&&j(a))return!0}return!1}(o,t)){i.$shared=!1,r=ei(r)?r():r;let t=this.createResolver(e,r,a);s=tv(o,r,t)}for(let e of t)i[e]=s[e];return i}createResolver(e,t,r=[""],n){let{resolver:i}=nf(this._resolverCache,e,r);return z(t)?tv(i,t,void 0,n):i}}function nf(e,t,r){let n=e.get(t);n||(n=new Map,e.set(t,n));let i=r.join(),o=n.get(i);return o||(o={resolver:tm(t,r),subPrefixes:r.filter(e=>!e.toLowerCase().includes("hover"))},n.set(i,o)),o}let np=e=>z(e)&&Object.getOwnPropertyNames(e).some(t=>ei(e[t])),ng=["top","bottom","left","right","chartArea"];function nm(e,t){return"top"===e||"bottom"===e||-1===ng.indexOf(e)&&"x"===t}function nv(e,t){return function(r,n){return r[e]===n[e]?r[t]-n[t]:r[e]-n[e]}}function nb(e){let t=e.chart,r=t.options.animation;t.notifyPlugins("afterRender"),$(r&&r.onComplete,[e],t)}function ny(e){let t=e.chart,r=t.options.animation;$(r&&r.onProgress,[e],t)}function nx(e){return tA()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}let nw={},n_=e=>{let t=nx(e);return Object.values(nw).filter(e=>e.canvas===t).pop()};class nC{static defaults=e5;static instances=nw;static overrides=eJ;static registry=ne;static version="4.5.1";static getChart=n_;static register(...e){ne.add(...e),nk()}static unregister(...e){ne.remove(...e),nk()}constructor(e,t){const r=this.config=new nh(t),n=nx(e),i=n_(n);if(i)throw Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||(!tA()||"undefined"!=typeof OffscreenCanvas&&n instanceof OffscreenCanvas?rz:r0)),this.platform.updateConfig(r);const a=this.platform.acquireContext(n,o.aspectRatio),s=a&&a.canvas,l=s&&s.height,u=s&&s.width;if(this.id=V(),this.ctx=a,this.canvas=s,this.width=u,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let r;return function(...n){return t?(clearTimeout(r),r=setTimeout(e,t,n)):e.apply(this,n),t}}(e=>this.update(e),o.resizeDelay||0),this._dataChanges=[],nw[this.id]=this,!a||!s)return void console.error("Failed to create chart: can't acquire context from the given item");t5.listen(this,"complete",nb),t5.listen(this,"progress",ny),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:r,height:n,_aspectRatio:i}=this;return F(e)?t&&i?i:n?r/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ne}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():tz(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return e6(this.canvas,this.ctx),this}stop(){return t5.stop(this),this}resize(e,t){t5.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let r=this.options,n=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,e,t,i),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,tz(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$(r.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){q(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,t=e.scales,r=this.scales,n=Object.keys(r).reduce((e,t)=>(e[t]=!1,e),{}),i=[];t&&(i=i.concat(Object.keys(t).map(e=>{let r=t[e],n=ni(e,r),i="r"===n,o="x"===n;return{options:r,dposition:i?"chartArea":o?"bottom":"left",dtype:i?"radialLinear":o?"category":"linear"}}))),q(i,t=>{let i=t.options,o=i.id,a=ni(o,i),s=W(i.type,t.dtype);(void 0===i.position||nm(i.position,a)!==nm(t.dposition))&&(i.position=t.dposition),n[o]=!0;let l=null;o in r&&r[o].type===s?l=r[o]:r[(l=new(ne.getScale(s))({id:o,type:s,ctx:this.ctx,chart:this})).id]=l,l.init(i,e)}),q(n,(e,t)=>{e||delete r[t]}),q(r,e=>{rF.configure(this,e,e.options),rF.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,r=e.length;if(e.sort((e,t)=>e.index-t.index),r>t){for(let e=t;e<r;++e)this._destroyDatasetMeta(e);e.splice(t,r-t)}this._sortedMetasets=e.slice(0).sort(nv("order","index"))}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,r)=>{0===t.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){let e,t,r=[],n=this.data.datasets;for(this._removeUnreferencedMetasets(),e=0,t=n.length;e<t;e++){let t=n[e],i=this.getDatasetMeta(e),o=t.type||this.config.type;if(i.type&&i.type!==o&&(this._destroyDatasetMeta(e),i=this.getDatasetMeta(e)),i.type=o,i.indexAxis=t.indexAxis||nr(o,this.options),i.order=t.order||0,i.index=e,i.label=""+t.label,i.visible=this.isDatasetVisible(e),i.controller)i.controller.updateIndex(e),i.controller.linkScales();else{let t=ne.getController(o),{datasetElementType:n,dataElementType:a}=e5.datasets[o];Object.assign(t,{dataElementType:ne.getElement(a),datasetElementType:n&&ne.getElement(n)}),i.controller=new t(this,e),r.push(i.controller)}}return this._updateMetasets(),r}_resetElements(){q(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let t=this.config;t.update();let r=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;let i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let e=0,t=this.data.datasets.length;e<t;e++){let{controller:t}=this.getDatasetMeta(e),r=!n&&-1===i.indexOf(t);t.buildOrUpdateElements(r),o=Math.max(+t.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),n||q(i,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(nv("z","_idx"));let{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){q(this.scales,e=>{rF.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options;eo(new Set(Object.keys(this._listeners)),new Set(e.events))&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this;for(let{method:r,start:n,count:i}of this._getUniformDataChanges()||[]){var t="_removeElements"===r?-i:i;for(let r of Object.keys(e)){let i=+r;if(i>=n){let o=e[r];delete e[r],(t>0||i>n)&&(e[i+t]=o)}}}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,r=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+","+e.splice(1).join(","))),n=r(0);for(let e=1;e<t;e++)if(!eo(n,r(e)))return;return Array.from(n).map(e=>e.split(",")).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;rF.update(this,this.width,this.height,e);let t=this.chartArea,r=t.width<=0||t.height<=0;this._layers=[],q(this.boxes,e=>{r&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,r=this.data.datasets.length;t<r;++t)this._updateDataset(t,ei(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){let r=this.getDatasetMeta(e),n={meta:r,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(r.controller._update(t),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(t5.has(this)?this.attached&&!t5.running(this)&&t5.start(this):(this.draw(),nb({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){let t,r,n=this._sortedMetasets,i=[];for(t=0,r=n.length;t<r;++t){let r=n[t];(!e||r.visible)&&i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;let e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let t=this.ctx,r={meta:e,index:e.index,cancelable:!0},n=t2(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&te(t,n),e.controller.draw(),n&&tt(t),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return e9(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,r,n){let i=rI.modes[t];return"function"==typeof i?i(this,e,r,n):[]}getDatasetMeta(e){let t=this.data.datasets[e],r=this._metasets,n=r.filter(e=>e&&e._dataset===t).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},r.push(n)),n}getContext(){return this.$context||(this.$context=tg(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let r=this.getDatasetMeta(e);return"boolean"==typeof r.hidden?!r.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,r){let n=r?"show":"hide",i=this.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,n);en(t)?(i.data[t].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),o.update(i,{visible:r}),this.update(t=>t.datasetIndex===e?n:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),t5.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),e6(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete nw[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let e=this._listeners,t=this.platform,r=(r,n)=>{t.addEventListener(this,r,n),e[r]=n},n=(e,t,r)=>{e.offsetX=t,e.offsetY=r,this._eventHandler(e)};q(this.options.events,e=>r(e,n))}bindResponsiveEvents(){let e;this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,r=this.platform,n=(e,n)=>{r.addEventListener(this,e,n),t[e]=n},i=(e,n)=>{t[e]&&(r.removeEventListener(this,e,n),delete t[e])},o=(e,t)=>{this.canvas&&this.resize(e,t)},a=()=>{i("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",e)};e=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),n("attach",a)},r.isAttached(this.canvas)?a():e()}unbindEvents(){q(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},q(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,r){let n,i,o,a=r?"set":"remove";for("dataset"===t&&this.getDatasetMeta(e[0].datasetIndex).controller["_"+a+"DatasetHoverStyle"](),i=0,o=e.length;i<o;++i){let t=(n=e[i])&&this.getDatasetMeta(n.datasetIndex).controller;t&&t[a+"HoverStyle"](n.element,n.datasetIndex,n.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){let t=this._active||[],r=e.map(({datasetIndex:e,index:t})=>{let r=this.getDatasetMeta(e);if(!r)throw Error("No dataset found at index "+e);return{datasetIndex:e,element:r.data[t],index:t}});G(r,t)||(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,t))}notifyPlugins(e,t,r){return this._plugins.notify(this,e,t,r)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(e,t,r){let n=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),o=i(t,e),a=r?e:i(e,t);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(e,t){let r={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},n=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",r,n))return;let i=this._handleEvent(e,t,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,n),(i||r.changed)&&this.render(),this}_handleEvent(e,t,r){var n;let{_active:i=[],options:o}=this,a=this._getActiveElements(e,i,r,t),s="mouseup"===e.type||"click"===e.type||"contextmenu"===e.type,l=(n=this._lastEvent,r&&"mouseout"!==e.type?s?n:e:null);r&&(this._lastEvent=null,$(o.onHover,[e,a,this],this),s&&$(o.onClick,[e,a,this],this));let u=!G(a,i);return(u||t)&&(this._active=a,this._updateHoverStyles(a,i,t)),this._lastEvent=l,u}_getActiveElements(e,t,r,n){if("mouseout"===e.type)return[];if(!r)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,n)}}function nk(){return q(nC.instances,e=>e._plugins.invalidate())}function nS(e,t,r,n){return{x:r+e*Math.cos(t),y:n+e*Math.sin(t)}}function nE(e,t,r,n,i,o){var a,s,l,u;let c,d,h,f,{x:p,y:g,startAngle:m,pixelMargin:v,innerRadius:b}=t,y=Math.max(t.outerRadius+n+r-v,0),x=b>0?b+n+r+v:0,w=0,_=i-m;if(n){let e=y>0?y-n:0,t=((b>0?b-n:0)+e)/2;w=(_-(0!==t?_*t/(t+n):_))/2}let C=Math.max(.001,_*y-r/ea)/y,k=(_-C)/2,S=m+k+w,E=i-k-w,{outerStart:O,outerEnd:I,innerStart:P,innerEnd:T}=(a=t,s=x,l=y,u=E-S,c=tu(a.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),h=Math.min(d=(l-s)/2,u*s/2),{outerStart:(f=e=>{let t=(l-Math.min(d,e))*u/2;return eO(e,0,Math.min(d,t))})(c.outerStart),outerEnd:f(c.outerEnd),innerStart:eO(c.innerStart,0,h),innerEnd:eO(c.innerEnd,0,h)}),R=y-O,A=y-I,M=S+O/R,N=E-I/A,D=x+P,L=x+T,V=S+P/D,F=E-T/L;if(e.beginPath(),o){let t=(M+N)/2;if(e.arc(p,g,y,M,t),e.arc(p,g,y,t,N),I>0){let t=nS(A,N,p,g);e.arc(t.x,t.y,I,N,E+ed)}let r=nS(L,E,p,g);if(e.lineTo(r.x,r.y),T>0){let t=nS(L,F,p,g);e.arc(t.x,t.y,T,E+ed,F+Math.PI)}let n=(E-T/x+(S+P/x))/2;if(e.arc(p,g,x,E-T/x,n,!0),e.arc(p,g,x,n,S+P/x,!0),P>0){let t=nS(D,V,p,g);e.arc(t.x,t.y,P,V+Math.PI,S-ed)}let i=nS(R,S,p,g);if(e.lineTo(i.x,i.y),O>0){let t=nS(R,M,p,g);e.arc(t.x,t.y,O,S-ed,M)}}else{e.moveTo(p,g);let t=Math.cos(M)*y+p,r=Math.sin(M)*y+g;e.lineTo(t,r);let n=Math.cos(N)*y+p,i=Math.sin(N)*y+g;e.lineTo(n,i)}e.closePath()}class nO extends r1{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,r){let{angle:n,distance:i}=e_(this.getProps(["x","y"],r),{x:e,y:t}),{startAngle:o,endAngle:a,innerRadius:s,outerRadius:l,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),c=(this.options.spacing+this.options.borderWidth)/2,d=W(u,a-o),h=eE(n,o,a)&&o!==a,f=d>=es||h,p=eI(i,s+c,l+c);return f&&p}getCenterPoint(e){let{x:t,y:r,startAngle:n,endAngle:i,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:s,spacing:l}=this.options,u=(n+i)/2,c=(o+a+l+s)/2;return{x:t+Math.cos(u)*c,y:r+Math.sin(u)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:r}=this,n=(t.offset||0)/4,i=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=.33*("inner"===t.borderAlign),this.fullCircles=r>es?Math.floor(r/es):0,0===r||this.innerRadius<0||this.outerRadius<0)return;e.save();let a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*n,Math.sin(a)*n);let s=n*(1-Math.sin(Math.min(ea,r||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,r,n,i){let{fullCircles:o,startAngle:a,circumference:s}=t,l=t.endAngle;if(o){nE(e,t,r,n,l,i);for(let t=0;t<o;++t)e.fill();isNaN(s)||(l=a+(s%es||es))}nE(e,t,r,n,l,i),e.fill()}(e,this,s,i,o),function(e,t,r,n,i){let{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:u,borderJoinStyle:c,borderDash:d,borderDashOffset:h,borderRadius:f}=l,p="inner"===l.borderAlign;if(!u)return;e.setLineDash(d||[]),e.lineDashOffset=h,p?(e.lineWidth=2*u,e.lineJoin=c||"round"):(e.lineWidth=u,e.lineJoin=c||"bevel");let g=t.endAngle;if(o){nE(e,t,r,n,g,i);for(let t=0;t<o;++t)e.stroke();isNaN(s)||(g=a+(s%es||es))}p&&function(e,t,r){let{startAngle:n,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t,u=i/s;e.beginPath(),e.arc(o,a,s,n-u,r+u),l>i?(u=i/l,e.arc(o,a,l,r+u,n-u,!0)):e.arc(o,a,i,r+ed,n-ed),e.closePath(),e.clip()}(e,t,g),l.selfJoin&&g-a>=ea&&0===f&&"miter"!==c&&function(e,t,r){let{startAngle:n,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:u,borderJoinStyle:c}=l,d=Math.min(u/a,eS(n-r));if(e.beginPath(),e.arc(i,o,a-u/2,n+d/2,r-d/2),s>0){let t=Math.min(u/s,eS(n-r));e.arc(i,o,s+u/2,r-t/2,n+t/2,!0)}else{let t=Math.min(u/2,a*eS(n-r));if("round"===c)e.arc(i,o,t,r-ea/2,n+ea/2,!0);else if("bevel"===c){let a=2*t*t,s=-a*Math.cos(r+ea/2)+i,l=-a*Math.sin(r+ea/2)+o,u=a*Math.cos(n+ea/2)+i,c=a*Math.sin(n+ea/2)+o;e.lineTo(s,l),e.lineTo(u,c)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}(e,t,g),o||(nE(e,t,r,n,g,i),e.stroke())}(e,this,s,i,o),e.restore()}}function nI(e,t,r=t){e.lineCap=W(r.borderCapStyle,t.borderCapStyle),e.setLineDash(W(r.borderDash,t.borderDash)),e.lineDashOffset=W(r.borderDashOffset,t.borderDashOffset),e.lineJoin=W(r.borderJoinStyle,t.borderJoinStyle),e.lineWidth=W(r.borderWidth,t.borderWidth),e.strokeStyle=W(r.borderColor,t.borderColor)}function nP(e,t,r){e.lineTo(r.x,r.y)}function nT(e,t,r={}){let n=e.length,{start:i=0,end:o=n-1}=r,{start:a,end:s}=t,l=Math.max(i,a),u=Math.min(o,s);return{count:n,start:l,loop:t.loop,ilen:u<l&&!(i<a&&o<a||i>s&&o>s)?n+u-l:u-l}}function nR(e,t,r,n){let i,o,a,{points:s,options:l}=t,{count:u,start:c,loop:d,ilen:h}=nT(s,r,n),f=l.stepped?tr:l.tension||"monotone"===l.cubicInterpolationMode?tn:nP,{move:p=!0,reverse:g}=n||{};for(i=0;i<=h;++i)(o=s[(c+(g?h-i:i))%u]).skip||(p?(e.moveTo(o.x,o.y),p=!1):f(e,a,o,g,l.stepped),a=o);return d&&f(e,a,o=s[(c+(g?h:0))%u],g,l.stepped),!!d}function nA(e,t,r,n){let i,o,a,s,l,u,c=t.points,{count:d,start:h,ilen:f}=nT(c,r,n),{move:p=!0,reverse:g}=n||{},m=0,v=0,b=e=>(h+(g?f-e:e))%d,y=()=>{s!==l&&(e.lineTo(m,l),e.lineTo(m,s),e.lineTo(m,u))};for(p&&(o=c[b(0)],e.moveTo(o.x,o.y)),i=0;i<=f;++i){if((o=c[b(i)]).skip)continue;let t=o.x,r=o.y,n=0|t;n===a?(r<s?s=r:r>l&&(l=r),m=(v*m+t)/++v):(y(),e.lineTo(t,r),a=n,v=0,s=l=r),u=r}y()}function nM(e){let t=e.options,r=t.borderDash&&t.borderDash.length;return e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||r?nR:nA}let nN="function"==typeof Path2D;class nD extends r1{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let r=this.options;if((r.tension||"monotone"===r.cubicInterpolationMode)&&!r.stepped&&!this._pointsUpdated){let n=r.spanGaps?this._loop:this._fullLoop;!function(e,t,r,n,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter(e=>!e.skip)),"monotone"===t.cubicInterpolationMode)!function(e,t="x"){let r,n,i,o=tT(t),a=e.length,s=Array(a).fill(0),l=Array(a),u=tP(e,0);for(r=0;r<a;++r)if(n=i,i=u,u=tP(e,r+1),i){if(u){let e=u[t]-i[t];s[r]=0!==e?(u[o]-i[o])/e:0}l[r]=n?u?eg(s[r-1])!==eg(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}!function(e,t,r){let n,i,o,a,s,l=e.length,u=tP(e,0);for(let c=0;c<l-1;++c)if(s=u,u=tP(e,c+1),s&&u){if(em(t[c],0,tI)){r[c]=r[c+1]=0;continue}(a=Math.pow(n=r[c]/t[c],2)+Math.pow(i=r[c+1]/t[c],2))<=9||(o=3/Math.sqrt(a),r[c]=n*o*t[c],r[c+1]=i*o*t[c])}}(e,s,l),function(e,t,r="x"){let n,i,o,a=tT(r),s=e.length,l=tP(e,0);for(let u=0;u<s;++u){if(i=o,o=l,l=tP(e,u+1),!o)continue;let s=o[r],c=o[a];i&&(n=(s-i[r])/3,o[`cp1${r}`]=s-n,o[`cp1${a}`]=c-n*t[u]),l&&(n=(l[r]-s)/3,o[`cp2${r}`]=s+n,o[`cp2${a}`]=c+n*t[u])}}(e,l,t)}(e,i);else{let r=n?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)l=function(e,t,r,n){let i=e.skip?t:e,o=r.skip?t:r,a=eC(t,i),s=eC(o,t),l=a/(a+s),u=s/(a+s);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let c=n*l,d=n*u;return{previous:{x:t.x-c*(o.x-i.x),y:t.y-c*(o.y-i.y)},next:{x:t.x+d*(o.x-i.x),y:t.y+d*(o.y-i.y)}}}(r,s=e[o],e[Math.min(o+1,a-!n)%a],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,r=s}t.capBezierPoints&&function(e,t){let r,n,i,o,a,s=e9(e[0],t);for(r=0,n=e.length;r<n;++r)a=o,o=s,s=r<n-1&&e9(e[r+1],t),o&&(i=e[r],a&&(i.cp1x=tR(i.cp1x,t.left,t.right),i.cp1y=tR(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=tR(i.cp2x,t.left,t.right),i.cp2y=tR(i.cp2y,t.top,t.bottom)))}(e,r)}(this._points,r,e,n,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){let r=e.points,n=e.options.spanGaps,i=r.length;if(!i)return[];let o=!!e._loop,{start:a,end:s}=function(e,t,r,n){let i=0,o=t-1;if(r&&!n)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,r&&(o+=i);o>i&&e[o%t].skip;)o--;return{start:i,end:o%=t}}(r,i,o,n);if(!0===n)return tJ(e,[{start:a,end:s,loop:o}],r,t);let l=s<a?s+i:s,u=!!e._fullLoop&&0===a&&s===i-1;return tJ(e,function(e,t,r,n){let i,o=e.length,a=[],s=t,l=e[t];for(i=t+1;i<=r;++i){let r=e[i%o];r.skip||r.stop?l.skip||(n=!1,a.push({start:t%o,end:(i-1)%o,loop:n}),t=s=r.stop?i:null):(s=i,l.skip&&(t=i)),l=r}return null!==s&&a.push({start:t%o,end:s%o,loop:n}),a}(r,a,l,u),r,t)}(this,this.options.segment))}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,r=e.length;return r&&t[e[r-1].end]}interpolate(e,t){let r,n,i=this.options,o=e[t],a=this.points,s=tZ(this,{property:t,start:o,end:o});if(!s.length)return;let l=[],u=i.stepped?tU:i.tension||"monotone"===i.cubicInterpolationMode?t$:tW;for(r=0,n=s.length;r<n;++r){let{start:n,end:c}=s[r],d=a[n],h=a[c];if(d===h){l.push(d);continue}let f=Math.abs((o-d[t])/(h[t]-d[t])),p=u(d,h,f,i.stepped);p[t]=e[t],l.push(p)}return 1===l.length?l[0]:l}pathSegment(e,t,r){return nM(this)(e,this,t,r)}path(e,t,r){let n=this.segments,i=nM(this),o=this._loop;for(let a of(t=t||0,r=r||this.points.length-t,n))o&=i(e,this,a,{start:t,end:t+r-1});return!!o}draw(e,t,r,n){let i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),function(e,t,r,n){if(nN&&!t.options.segment){let i;(i=t._path)||(i=t._path=new Path2D,t.path(i,r,n)&&i.closePath()),nI(e,t.options),e.stroke(i)}else!function(e,t,r,n){let{segments:i,options:o}=t,a=nM(t);for(let s of i)nI(e,o,s.style),e.beginPath(),a(e,t,s,{start:r,end:r+n-1})&&e.closePath(),e.stroke()}(e,t,r,n)}(e,this,r,n),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function nL(e,t){let r,n,i,o,a,{x:s,y:l,base:u,width:c,height:d}=e.getProps(["x","y","base","width","height"],t);return e.horizontal?(a=d/2,r=Math.min(s,u),n=Math.max(s,u),i=l-a,o=l+a):(r=s-(a=c/2),n=s+a,i=Math.min(l,u),o=Math.max(l,u)),{left:r,top:i,right:n,bottom:o}}function nV(e,t,r,n){return e?0:eO(t,r,n)}function nF(e,t,r,n){let i=null===t,o=null===r,a=e&&!(i&&o)&&nL(e,n);return a&&(i||eI(t,a.left,a.right))&&(o||eI(r,a.top,a.bottom))}function nj(e,t){e.rect(t.x,t.y,t.w,t.h)}function nz(e,t,r={}){let n=e.x!==r.x?-t:0,i=e.y!==r.y?-t:0,o=(e.x+e.w!==r.x+r.w?t:0)-n,a=(e.y+e.h!==r.y+r.h?t:0)-i;return{x:e.x+n,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class nB extends r1{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){var t,r,n;let i,o,a,s,l,u,c,d,{inflateAmount:h,options:{borderColor:f,backgroundColor:p}}=this,{inner:g,outer:m}=(o=(i=nL(this)).right-i.left,a=i.bottom-i.top,t=o/2,r=a/2,s=this.options.borderWidth,l=this.borderSkipped,u=tc(s),c={t:nV(l.top,u.top,0,r),r:nV(l.right,u.right,0,t),b:nV(l.bottom,u.bottom,0,r),l:nV(l.left,u.left,0,t)},d=function(e,t,r){let{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=td(i),a=Math.min(t,r),s=e.borderSkipped,l=n||z(i);return{topLeft:nV(!l||s.top||s.left,o.topLeft,0,a),topRight:nV(!l||s.top||s.right,o.topRight,0,a),bottomLeft:nV(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:nV(!l||s.bottom||s.right,o.bottomRight,0,a)}}(this,o/2,a/2),{outer:{x:i.left,y:i.top,w:o,h:a,radius:d},inner:{x:i.left+c.l,y:i.top+c.t,w:o-c.l-c.r,h:a-c.t-c.b,radius:{topLeft:Math.max(0,d.topLeft-Math.max(c.t,c.l)),topRight:Math.max(0,d.topRight-Math.max(c.t,c.r)),bottomLeft:Math.max(0,d.bottomLeft-Math.max(c.b,c.l)),bottomRight:Math.max(0,d.bottomRight-Math.max(c.b,c.r))}}}),v=(n=m.radius).topLeft||n.topRight||n.bottomLeft||n.bottomRight?to:nj;e.save(),(m.w!==g.w||m.h!==g.h)&&(e.beginPath(),v(e,nz(m,h,g)),e.clip(),v(e,nz(g,-h,m)),e.fillStyle=f,e.fill("evenodd")),e.beginPath(),v(e,nz(g,h)),e.fillStyle=p,e.fill(),e.restore()}inRange(e,t,r){return nF(this,e,t,r)}inXRange(e,t){return nF(this,e,null,t)}inYRange(e,t){return nF(this,null,e,t)}getCenterPoint(e){let{x:t,y:r,base:n,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(t+n)/2:t,y:i?r:(r+n)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}let nH=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],nW=nH.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)")),nU=(e,t)=>{let{boxHeight:r=t,boxWidth:n=t}=e;return e.usePointStyle&&(r=Math.min(r,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(t,r)}};class n$ extends r1{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,r){this.maxWidth=e,this.maxHeight=t,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=$(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,r)=>e.sort(t,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let e,t,{options:r,ctx:n}=this;if(!r.display){this.width=this.height=0;return}let i=r.labels,o=tf(i.font),a=o.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:u}=nU(i,a);n.font=o.string,this.isHorizontal()?(e=this.maxWidth,t=this._fitRows(s,a,l,u)+10):(t=this.maxHeight,e=this._fitCols(s,o,l,u)+10),this.width=Math.min(e,r.maxWidth||this.maxWidth),this.height=Math.min(t,r.maxHeight||this.maxHeight)}_fitRows(e,t,r,n){let{ctx:i,maxWidth:o,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],u=n+a,c=e;i.textAlign="left",i.textBaseline="middle";let d=-1,h=-u;return this.legendItems.forEach((e,f)=>{let p=r+t/2+i.measureText(e.text).width;(0===f||l[l.length-1]+p+2*a>o)&&(c+=u,l[l.length-(f>0?0:1)]=0,h+=u,d++),s[f]={left:0,top:h,row:d,width:p,height:n},l[l.length-1]+=p+a}),c}_fitCols(e,t,r,n){let{ctx:i,maxHeight:o,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],u=o-e,c=a,d=0,h=0,f=0,p=0;return this.legendItems.forEach((e,o)=>{var g,m,v,b,y,x,w,_,C,k,S,E;let O,I,{itemWidth:P,itemHeight:T}=(g=r,m=t,v=i,b=e,y=n,{itemWidth:(x=b,w=g,_=m,C=v,(O=x.text)&&"string"!=typeof O&&(O=O.reduce((e,t)=>e.length>t.length?e:t)),w+_.size/2+C.measureText(O).width),itemHeight:(k=y,S=b,E=m.lineHeight,I=k,"string"!=typeof S.text&&(I=nq(S,E)),I)});o>0&&h+T+2*a>u&&(c+=d+a,l.push({width:d,height:h}),f+=d+a,p++,d=h=0),s[o]={left:f,top:h,col:p,width:P,height:T},d=Math.max(d,P),h+=T+a}),c+=d,l.push({width:d,height:h}),c}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:r,labels:{padding:n},rtl:i}}=this,o=tq(i,this.left,this.width);if(this.isHorizontal()){let i=0,a=eF(r,this.left+n,this.right-this.lineWidths[i]);for(let s of t)i!==s.row&&(i=s.row,a=eF(r,this.left+n,this.right-this.lineWidths[i])),s.top+=this.top+e+n,s.left=o.leftForLtr(o.x(a),s.width),a+=s.width+n}else{let i=0,a=eF(r,this.top+e+n,this.bottom-this.columnSizes[i].height);for(let s of t)s.col!==i&&(i=s.col,a=eF(r,this.top+e+n,this.bottom-this.columnSizes[i].height)),s.top=a,s.left+=this.left+n,s.left=o.leftForLtr(o.x(s.left),s.width),a+=s.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let e=this.ctx;te(e,this),this._draw(),tt(e)}}_draw(){let e,{options:t,columnSizes:r,lineWidths:n,ctx:i}=this,{align:o,labels:a}=t,s=e5.color,l=tq(t.rtl,this.left,this.width),u=tf(a.font),{padding:c}=a,d=u.size,h=d/2;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;let{boxWidth:f,boxHeight:p,itemHeight:g}=nU(a,d),m=function(e,t,r){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;i.save();let n=W(r.lineWidth,1);if(i.fillStyle=W(r.fillStyle,s),i.lineCap=W(r.lineCap,"butt"),i.lineDashOffset=W(r.lineDashOffset,0),i.lineJoin=W(r.lineJoin,"miter"),i.lineWidth=n,i.strokeStyle=W(r.strokeStyle,s),i.setLineDash(W(r.lineDash,[])),a.usePointStyle)e7(i,{radius:p*Math.SQRT2/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:n},l.xPlus(e,f/2),t+h,a.pointStyleWidth&&f);else{let o=t+Math.max((d-p)/2,0),a=l.leftForLtr(e,f),s=td(r.borderRadius);i.beginPath(),Object.values(s).some(e=>0!==e)?to(i,{x:a,y:o,w:f,h:p,radius:s}):i.rect(a,o,f,p),i.fill(),0!==n&&i.stroke()}i.restore()},v=function(e,t,r){ti(i,r.text,e,t+g/2,u,{strikethrough:r.hidden,textAlign:l.textAlign(r.textAlign)})},b=this.isHorizontal(),y=this._computeTitleHeight();e=b?{x:eF(o,this.left+c,this.right-n[0]),y:this.top+c+y,line:0}:{x:this.left+c,y:eF(o,this.top+y+c,this.bottom-r[0].height),line:0},tG(this.ctx,t.textDirection);let x=g+c;this.legendItems.forEach((s,d)=>{var p,g;i.strokeStyle=s.fontColor,i.fillStyle=s.fontColor;let w=i.measureText(s.text).width,_=l.textAlign(s.textAlign||(s.textAlign=a.textAlign)),C=f+h+w,k=e.x,S=e.y;if(l.setWidth(this.width),b?d>0&&k+C+c>this.right&&(S=e.y+=x,e.line++,k=e.x=eF(o,this.left+c,this.right-n[e.line])):d>0&&S+x>this.bottom&&(k=e.x=k+r[e.line].width+c,e.line++,S=e.y=eF(o,this.top+y+c,this.bottom-r[e.line].height)),m(l.x(k),S,s),p=k+f+h,g=b?k+C:this.right,k=_===(t.rtl?"left":"right")?g:"center"===_?(p+g)/2:p,v(l.x(k),S,s),b)e.x+=C+c;else if("string"!=typeof s.text){let t=u.lineHeight;e.y+=nq(s,t)+c}else e.y+=x}),tK(this.ctx,t.textDirection)}drawTitle(){let e,t=this.options,r=t.title,n=tf(r.font),i=th(r.padding);if(!r.display)return;let o=tq(t.rtl,this.left,this.width),a=this.ctx,s=r.position,l=n.size/2,u=i.top+l,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),e=this.top+u,c=eF(t.align,c,this.right-d);else{let r=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);e=u+eF(t.align,this.top,this.bottom-r-t.labels.padding-this._computeTitleHeight())}let h=eF(s,c,c+d);a.textAlign=o.textAlign(eV(s)),a.textBaseline="middle",a.strokeStyle=r.color,a.fillStyle=r.color,a.font=n.string,ti(a,r.text,h,e,n)}_computeTitleHeight(){let e=this.options.title,t=tf(e.font),r=th(e.padding);return e.display?t.lineHeight+r.height:0}_getLegendItemAt(e,t){let r,n,i;if(eI(e,this.left,this.right)&&eI(t,this.top,this.bottom)){for(r=0,i=this.legendHitBoxes;r<i.length;++r)if(eI(e,(n=i[r]).left,n.left+n.width)&&eI(t,n.top,n.top+n.height))return this.legendItems[r]}return null}handleEvent(e){var t,r;let n=this.options;if(t=e.type,r=n,("mousemove"!==t&&"mouseout"!==t||!r.onHover&&!r.onLeave)&&(!r.onClick||"click"!==t&&"mouseup"!==t))return;let i=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){let t=this._hoveredItem,r=null!==t&&null!==i&&t.datasetIndex===i.datasetIndex&&t.index===i.index;t&&!r&&$(n.onLeave,[e,t,this],this),this._hoveredItem=i,i&&!r&&$(n.onHover,[e,i,this],this)}else i&&$(n.onClick,[e,i,this],this)}}function nq(e,t){return t*(e.text?e.text.length:0)}var nG={id:"legend",_element:n$,start(e,t,r){let n=e.legend=new n$({ctx:e.ctx,options:r,chart:e});rF.configure(e,n,r),rF.addBox(e,n)},stop(e){rF.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,r){let n=e.legend;rF.configure(e,n,r),n.options=r},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,r){let n=t.datasetIndex,i=r.chart;i.isDatasetVisible(n)?(i.hide(n),t.hidden=!0):(i.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let l=e.controller.getStyle(r?0:void 0),u=th(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:i||l.textAlign,borderRadius:a&&(s||l.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class nK extends r1{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let n=j(r.text)?r.text.length:1;this._padding=th(r.padding);let i=n*tf(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){let t,r,n,{top:i,left:o,bottom:a,right:s,options:l}=this,u=l.align,c=0;return this.isHorizontal()?(r=eF(u,o,s),n=i+e,t=s-o):("left"===l.position?(r=o+e,n=eF(u,a,i),c=-.5*ea):(r=s-e,n=eF(u,i,a),c=.5*ea),t=a-i),{titleX:r,titleY:n,maxWidth:t,rotation:c}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let r=tf(t.font),n=r.lineHeight/2+this._padding.top,{titleX:i,titleY:o,maxWidth:a,rotation:s}=this._drawArgs(n);ti(e,t.text,0,0,r,{color:t.color,maxWidth:a,rotation:s,textAlign:eV(t.align),textBaseline:"middle",translation:[i,o]})}}var nY={id:"title",_element:nK,start(e,t,r){let n;n=new nK({ctx:e.ctx,options:r,chart:e}),rF.configure(e,n,r),rF.addBox(e,n),e.titleBlock=n},stop(e){let t=e.titleBlock;rF.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,r){let n=e.titleBlock;rF.configure(e,n,r),n.options=r},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;let nX={average(e){let t,r;if(!e.length)return!1;let n=new Set,i=0,o=0;for(t=0,r=e.length;t<r;++t){let r=e[t].element;if(r&&r.hasValue()){let e=r.tooltipPosition();n.add(e.x),i+=e.y,++o}}return 0!==o&&0!==n.size&&{x:[...n].reduce((e,t)=>e+t)/n.size,y:i/o}},nearest(e,t){let r,n,i;if(!e.length)return!1;let o=t.x,a=t.y,s=1/0;for(r=0,n=e.length;r<n;++r){let n=e[r].element;if(n&&n.hasValue()){let e=eC(t,n.getCenterPoint());e<s&&(s=e,i=n)}}if(i){let e=i.tooltipPosition();o=e.x,a=e.y}return{x:o,y:a}}};function nQ(e,t){return t&&(j(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function nZ(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function nJ(e,t){let r=e.chart.ctx,{body:n,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=tf(t.bodyFont),u=tf(t.titleFont),c=tf(t.footerFont),d=o.length,h=i.length,f=n.length,p=th(t.padding),g=p.height,m=0,v=n.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);v+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v&&(g+=f*(t.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-f)*l.lineHeight+(v-1)*t.bodySpacing),h&&(g+=t.footerMarginTop+h*c.lineHeight+(h-1)*t.footerSpacing);let b=0,y=function(e){m=Math.max(m,r.measureText(e).width+b)};return r.save(),r.font=u.string,q(e.title,y),r.font=l.string,q(e.beforeBody.concat(e.afterBody),y),b=t.displayColors?a+2+t.boxPadding:0,q(n,e=>{q(e.before,y),q(e.lines,y),q(e.after,y)}),b=0,r.font=c.string,q(e.footer,y),r.restore(),{width:m+=p.width,height:g}}function n0(e,t,r){let n=r.yAlign||t.yAlign||function(e,t){let{y:r,height:n}=t;return r<n/2?"top":r>e.height-n/2?"bottom":"center"}(e,r);return{xAlign:r.xAlign||t.xAlign||function(e,t,r,n){let{x:i,width:o}=r,{width:a,chartArea:{left:s,right:l}}=e,u="center";return"center"===n?u=i<=(s+l)/2?"left":"right":i<=o/2?u="left":i>=a-o/2&&(u="right"),function(e,t,r,n){let{x:i,width:o}=n,a=r.caretSize+r.caretPadding;if("left"===e&&i+o+a>t.width||"right"===e&&i-o-a<0)return!0}(u,e,t,r)&&(u="center"),u}(e,t,r,n),yAlign:n}}function n1(e,t,r,n){let{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=r,u=i+o,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:f}=td(a),p=function(e,t){let{x:r,width:n}=e;return"right"===t?r-=n:"center"===t&&(r-=n/2),r}(t,s),g=function(e,t,r){let{y:n,height:i}=e;return"top"===t?n+=r:"bottom"===t?n-=i+r:n-=i/2,n}(t,l,u);return"center"===l?"left"===s?p+=u:"right"===s&&(p-=u):"left"===s?p-=Math.max(c,h)+i:"right"===s&&(p+=Math.max(d,f)+i),{x:eO(p,0,n.width-t.width),y:eO(g,0,n.height-t.height)}}function n2(e,t,r){let n=th(r.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-n.right:e.x+n.left}function n5(e,t){let r=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return r?e.override(r):e}let n3={beforeTitle:L,title(e){if(e.length>0){let t=e[0],r=t.chart.data.labels,n=r?r.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return r[t.dataIndex]}return""},afterTitle:L,beforeBody:L,beforeLabel:L,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");let r=e.formattedValue;return F(r)||(t+=r),t},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:L,afterBody:L,beforeFooter:L,footer:L,afterFooter:L};function n4(e,t,r,n){let i=e[t].call(r,n);return void 0===i?n3[t].call(r,n):i}class n6 extends r1{static positioners=nX;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let t=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&t.options.animation&&r.animations,i=new t8(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){var e;return this.$context||(this.$context=(e=this.chart.getContext(),tg(e,{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(e,t){let{callbacks:r}=t,n=n4(r,"beforeTitle",this,e),i=n4(r,"title",this,e),o=n4(r,"afterTitle",this,e),a=[];return a=nQ(a,nZ(n)),a=nQ(a,nZ(i)),a=nQ(a,nZ(o))}getBeforeBody(e,t){return nQ([],nZ(n4(t.callbacks,"beforeBody",this,e)))}getBody(e,t){let{callbacks:r}=t,n=[];return q(e,e=>{let t={before:[],lines:[],after:[]},i=n5(r,e);nQ(t.before,nZ(n4(i,"beforeLabel",this,e))),nQ(t.lines,n4(i,"label",this,e)),nQ(t.after,nZ(n4(i,"afterLabel",this,e))),n.push(t)}),n}getAfterBody(e,t){return nQ([],nZ(n4(t.callbacks,"afterBody",this,e)))}getFooter(e,t){let{callbacks:r}=t,n=n4(r,"beforeFooter",this,e),i=n4(r,"footer",this,e),o=n4(r,"afterFooter",this,e),a=[];return a=nQ(a,nZ(n)),a=nQ(a,nZ(i)),a=nQ(a,nZ(o))}_createItems(e){let t,r,n=this._active,i=this.chart.data,o=[],a=[],s=[],l=[];for(t=0,r=n.length;t<r;++t)l.push(function(e,t){let{element:r,datasetIndex:n,index:i}=t,o=e.getDatasetMeta(n).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:r}}(this.chart,n[t]));return e.filter&&(l=l.filter((t,r,n)=>e.filter(t,r,n,i))),e.itemSort&&(l=l.sort((t,r)=>e.itemSort(t,r,i))),q(l,t=>{let r=n5(e.callbacks,t);o.push(n4(r,"labelColor",this,t)),a.push(n4(r,"labelPointStyle",this,t)),s.push(n4(r,"labelTextColor",this,t))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(e,t){let r,n=this.options.setContext(this.getContext()),i=this._active,o=[];if(i.length){let e=nX[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);let t=this._size=nJ(this,n),a=Object.assign({},e,t),s=n0(this.chart,n,a),l=n1(n,a,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,r={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,r,n){let i=this.getCaretPosition(e,r,n);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,r){let n,i,o,a,s,l,{xAlign:u,yAlign:c}=this,{caretSize:d,cornerRadius:h}=r,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:m}=td(h),{x:v,y:b}=e,{width:y,height:x}=t;return"center"===c?(s=b+x/2,"left"===u?(i=(n=v)-d,a=s+d,l=s-d):(i=(n=v+y)+d,a=s-d,l=s+d),o=n):(i="left"===u?v+Math.max(f,g)+d:"right"===u?v+y-Math.max(p,m)-d:this.caretX,"top"===c?(s=(a=b)-d,n=i-d,o=i+d):(s=(a=b+x)+d,n=i+d,o=i-d),l=a),{x1:n,x2:i,x3:o,y1:a,y2:s,y3:l}}drawTitle(e,t,r){let n,i,o,a=this.title,s=a.length;if(s){let l=tq(r.rtl,this.x,this.width);for(o=0,e.x=n2(this,r.titleAlign,r),t.textAlign=l.textAlign(r.titleAlign),t.textBaseline="middle",n=tf(r.titleFont),i=r.titleSpacing,t.fillStyle=r.titleColor,t.font=n.string;o<s;++o)t.fillText(a[o],l.x(e.x),e.y+n.lineHeight/2),e.y+=n.lineHeight+i,o+1===s&&(e.y+=r.titleMarginBottom-i)}}_drawColorBox(e,t,r,n,i){let o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:s,boxWidth:l}=i,u=tf(i.bodyFont),c=n2(this,"left",i),d=n.x(c),h=s<u.lineHeight?(u.lineHeight-s)/2:0,f=t.y+h;if(i.usePointStyle){let t={radius:Math.min(l,s)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},r=n.leftForLtr(d,l)+l/2,u=f+s/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,e8(e,t,r,u),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,e8(e,t,r,u)}else{e.lineWidth=z(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;let t=n.leftForLtr(d,l),r=n.leftForLtr(n.xPlus(d,1),l-2),a=td(o.borderRadius);Object.values(a).some(e=>0!==e)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,to(e,{x:t,y:f,w:l,h:s,radius:a}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),to(e,{x:r,y:f+1,w:l-2,h:s-2,radius:a}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,f,l,s),e.strokeRect(t,f,l,s),e.fillStyle=o.backgroundColor,e.fillRect(r,f+1,l-2,s-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,t,r){let n,i,o,a,s,l,{body:u}=this,{bodySpacing:c,bodyAlign:d,displayColors:h,boxHeight:f,boxWidth:p,boxPadding:g}=r,m=tf(r.bodyFont),v=m.lineHeight,b=0,y=tq(r.rtl,this.x,this.width),x=function(r){t.fillText(r,y.x(e.x+b),e.y+v/2),e.y+=v+c},w=y.textAlign(d);for(t.textAlign=d,t.textBaseline="middle",t.font=m.string,e.x=n2(this,w,r),t.fillStyle=r.bodyColor,q(this.beforeBody,x),b=h&&"right"!==w?"center"===d?p/2+g:p+2+g:0,o=0,s=u.length;o<s;++o){for(n=u[o],t.fillStyle=this.labelTextColors[o],q(n.before,x),i=n.lines,h&&i.length&&(this._drawColorBox(t,e,o,y,r),v=Math.max(m.lineHeight,f)),a=0,l=i.length;a<l;++a)x(i[a]),v=m.lineHeight;q(n.after,x)}b=0,v=m.lineHeight,q(this.afterBody,x),e.y-=c}drawFooter(e,t,r){let n,i,o=this.footer,a=o.length;if(a){let s=tq(r.rtl,this.x,this.width);for(e.x=n2(this,r.footerAlign,r),e.y+=r.footerMarginTop,t.textAlign=s.textAlign(r.footerAlign),t.textBaseline="middle",n=tf(r.footerFont),t.fillStyle=r.footerColor,t.font=n.string,i=0;i<a;++i)t.fillText(o[i],s.x(e.x),e.y+n.lineHeight/2),e.y+=n.lineHeight+r.footerSpacing}}drawBackground(e,t,r,n){let{xAlign:i,yAlign:o}=this,{x:a,y:s}=e,{width:l,height:u}=r,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:f}=td(n.cornerRadius);t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.beginPath(),t.moveTo(a+c,s),"top"===o&&this.drawCaret(e,t,r,n),t.lineTo(a+l-d,s),t.quadraticCurveTo(a+l,s,a+l,s+d),"center"===o&&"right"===i&&this.drawCaret(e,t,r,n),t.lineTo(a+l,s+u-f),t.quadraticCurveTo(a+l,s+u,a+l-f,s+u),"bottom"===o&&this.drawCaret(e,t,r,n),t.lineTo(a+h,s+u),t.quadraticCurveTo(a,s+u,a,s+u-h),"center"===o&&"left"===i&&this.drawCaret(e,t,r,n),t.lineTo(a,s+c),t.quadraticCurveTo(a,s,a+c,s),t.closePath(),t.fill(),n.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){let t=this.chart,r=this.$animations,n=r&&r.x,i=r&&r.y;if(n||i){let r=nX[e.position].call(this,this._active,this._eventPosition);if(!r)return;let o=this._size=nJ(this,e),a=Object.assign({},r,this._size),s=n0(t,e,a),l=n1(e,a,s,t);(n._to!==l.x||i._to!==l.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=o.width,this.height=o.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){let t=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(t);let n={width:this.width,height:this.height},i={x:this.x,y:this.y};r=.001>Math.abs(r)?0:r;let o=th(t.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&a&&(e.save(),e.globalAlpha=r,this.drawBackground(i,e,n,t),tG(e,t.textDirection),i.y+=o.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),tK(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){let r=this._active,n=e.map(({datasetIndex:e,index:t})=>{let r=this.chart.getDatasetMeta(e);if(!r)throw Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:r.data[t],index:t}}),i=!G(r,n),o=this._positionChanged(n,t);(i||o)&&(this._active=n,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,r=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,i=this._active||[],o=this._getActiveElements(e,i,t,r),a=this._positionChanged(o,e),s=t||!G(o,i)||a;return s&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,r,n){let i=this.options;if("mouseout"===e.type)return[];if(!n)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index));let o=this.chart.getElementsAtEventForMode(e,i.mode,i,r);return i.reverse&&o.reverse(),o}_positionChanged(e,t){let{caretX:r,caretY:n,options:i}=this,o=nX[i.position].call(this,e,t);return!1!==o&&(r!==o.x||n!==o.y)}}var n8={id:"tooltip",_element:n6,positioners:nX,afterInit(e,t,r){r&&(e.tooltip=new n6({chart:e,options:r}))},beforeUpdate(e,t,r){e.tooltip&&e.tooltip.initialize(r)},reset(e,t,r){e.tooltip&&e.tooltip.initialize(r)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let r={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",r)}},afterEvent(e,t){if(e.tooltip){let r=t.replay;e.tooltip.handleEvent(t.event,r,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:n3},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function n7(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class n9 extends r7{static id="category";static defaults={ticks:{callback:n7}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let t=this._addedLabels;if(t.length){let e=this.getLabels();for(let{index:r,label:n}of t)e[r]===n&&e.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,t){let r,n;if(F(e))return null;let i=this.getLabels();return r=t=isFinite(t)&&i[t]===e?t:function(e,t,r,n){let i=e.indexOf(t);if(-1===i){var o;return o=r,"string"==typeof t?(o=e.push(t)-1,n.unshift({index:o,label:t})):isNaN(t)&&(o=null),o}return i!==e.lastIndexOf(t)?r:i}(i,e,W(t,e),this._addedLabels),n=i.length-1,null===r?null:eO(Math.round(r),0,n)}determineDataLimits(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),{min:r,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(r=0),t||(n=this.getLabels().length-1)),this.min=r,this.max=n}buildTicks(){let e=this.min,t=this.max,r=this.options.offset,n=[],i=this.getLabels();i=0===e&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-!r,1),this._startValue=this.min-.5*!!r;for(let r=e;r<=t;r++)n.push({value:r});return n}getLabelForValue(e){return n7.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function ie(e,t,{horizontal:r,minRotation:n}){let i=ex(n),o=(r?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class it extends r7{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return F(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:r}=this.getUserBounds(),{min:n,max:i}=this,o=e=>n=t?n:e,a=e=>i=r?i:e;if(e){let e=eg(n),t=eg(i);e<0&&t<0?a(0):e>0&&t>0&&o(0)}if(n===i){let t=0===i?1:Math.abs(.05*i);a(i+t),e||o(n-t)}this.min=n,this.max=i}getTickLimit(){let e,{maxTicksLimit:t,stepSize:r}=this.options.ticks;return r?(e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3):(e=this.computeTickLimit(),t=t||11),t&&(e=Math.min(t,e)),e}computeTickLimit(){return 1/0}buildTicks(){let e=this.options,t=e.ticks,r=this.getTickLimit(),n=function(e,t){var r,n;let i,o,a,s,l,u=[],{bounds:c,step:d,min:h,max:f,precision:p,count:g,maxTicks:m,maxDigits:v,includeBounds:b}=e,y=d||1,x=m-1,{min:w,max:_}=t,C=!F(h),k=!F(f),S=!F(g),E=(_-w)/(v+1),O=ev((_-w)/x/y)*y;if(O<1e-14&&!C&&!k)return[{value:w},{value:_}];(s=Math.ceil(_/O)-Math.floor(w/O))>x&&(O=ev(s*O/x/y)*y),F(p)||(O=Math.ceil(O*(i=Math.pow(10,p)))/i),"ticks"===c?(o=Math.floor(w/O)*O,a=Math.ceil(_/O)*O):(o=w,a=_),C&&k&&d&&(r=(f-h)/d,n=O/1e3,(l=Math.round(r))-n<=r&&l+n>=r)?(s=Math.round(Math.min((f-h)/O,m)),O=(f-h)/s,o=h,a=f):S?(o=C?h:o,O=((a=k?f:a)-o)/(s=g-1)):s=em(s=(a-o)/O,Math.round(s),O/1e3)?Math.round(s):Math.ceil(s);let I=Math.max(ew(O),ew(o));o=Math.round(o*(i=Math.pow(10,F(p)?I:p)))/i,a=Math.round(a*i)/i;let P=0;for(C&&(b&&o!==h?(u.push({value:h}),o<h&&P++,em(Math.round((o+P*O)*i)/i,h,ie(h,E,e))&&P++):o<h&&P++);P<s;++P){let e=Math.round((o+P*O)*i)/i;if(k&&e>f)break;u.push({value:e})}return k&&b&&a!==f?u.length&&em(u[u.length-1].value,f,ie(f,E,e))?u[u.length-1].value=f:u.push({value:f}):k&&a!==f||u.push({value:a}),u}({maxTicks:r=Math.max(2,r),bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&ey(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){let e=this.ticks,t=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){let n=(r-t)/Math.max(e.length-1,1)/2;t-=n,r+=n}this._startValue=t,this._endValue=r,this._valueRange=r-t}getLabelForValue(e){return eQ(e,this.chart.options.locale,this.options.ticks.format)}}class ir extends it{static id="linear";static defaults={ticks:{callback:eZ.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=B(e)?e:0,this.max=B(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,r=ex(this.options.ticks.minRotation),n=(e?Math.sin(r):Math.cos(r))||.001;return Math.ceil(t/Math.min(40,this._resolveTickFontOptions(0).lineHeight/n))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}let ii=e=>Math.floor(ep(e)),io=(e,t)=>Math.pow(10,ii(e)+t);function ia(e){return 1==e/Math.pow(10,ii(e))}function is(e,t,r){let n=Math.pow(10,r),i=Math.floor(e/n);return Math.ceil(t/n)-i}class il extends r7{static id="logarithmic";static defaults={ticks:{callback:eZ.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let r=it.prototype.parse.apply(this,[e,t]);if(0===r){this._zero=!0;return}return B(r)&&r>0?r:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=B(e)?Math.max(0,e):null,this.max=B(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!B(this._userMin)&&(this.min=e===io(this.min,0)?io(this.min,-1):io(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),r=this.min,n=this.max,i=t=>r=e?r:t,o=e=>n=t?n:e;r===n&&(r<=0?(i(1),o(10)):(i(io(r,-1)),o(io(n,1)))),r<=0&&i(io(n,-1)),n<=0&&o(io(r,1)),this.min=r,this.max=n}buildTicks(){let e=this.options,t=function(e,{min:t,max:r}){t=H(e.min,t);let n=[],i=ii(t),o=function(e,t){let r=ii(t-e);for(;is(e,t,r)>10;)r++;for(;10>is(e,t,r);)r--;return Math.min(r,ii(e))}(t,r),a=o<0?Math.pow(10,Math.abs(o)):1,s=Math.pow(10,o),l=i>o?Math.pow(10,i):0,u=Math.round((t-l)*a)/a,c=Math.floor((t-l)/s/10)*s*10,d=Math.floor((u-c)/Math.pow(10,o)),h=H(e.min,Math.round((l+c+d*Math.pow(10,o))*a)/a);for(;h<r;)n.push({value:h,major:ia(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(d=2,a=++o>=0?1:a),h=Math.round((l+c+d*Math.pow(10,o))*a)/a;let f=H(e.max,h);return n.push({value:f,major:ia(f),significand:d}),n}({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&ey(t,this,"value"),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return void 0===e?"0":eQ(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=ep(e),this._valueRange=ep(this.max)-ep(e)}getPixelForValue(e){return((void 0===e||0===e)&&(e=this.min),null===e||isNaN(e))?NaN:this.getPixelForDecimal(e===this.min?0:(ep(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function iu(e){let t=e.ticks;if(t.display&&e.display){let e=th(t.backdropPadding);return W(t.font&&t.font.size,e5.font.size)+e.height}return 0}function ic(e,t,r,n,i){return e===n||e===i?{start:t-r/2,end:t+r/2}:e<n||e>i?{start:t-r,end:t}:{start:t,end:t+r}}function id(e,t,r,n){let{ctx:i}=e;if(r)i.arc(e.xCenter,e.yCenter,t,0,es);else{let r=e.getPointPosition(0,t);i.moveTo(r.x,r.y);for(let o=1;o<n;o++)r=e.getPointPosition(o,t),i.lineTo(r.x,r.y)}}class ih extends it{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:eZ.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=th(iu(this.options)/2),t=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(t,r)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=B(e)&&!isNaN(e)?e:0,this.max=B(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/iu(this.options))}generateTickLabels(e){it.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((e,t)=>{let r=$(this.options.pointLabels.callback,[e,t],this);return r||0===r?r:""}).filter((e,t)=>this.chart.getDataVisibility(t))}fit(){let e=this.options;e.display&&e.pointLabels.display?function(e){let t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},r=Object.assign({},t),n=[],i=[],o=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?ea/o:0;for(let c=0;c<o;c++){var l,u;let o=a.setContext(e.getPointLabelContext(c));i[c]=o.padding;let d=e.getPointPosition(c,e.drawingArea+i[c],s),h=tf(o.font),f=(l=e.ctx,u=j(u=e._pointLabels[c])?u:[u],{w:function(e,t,r,n){let i,o,a,s,l,u=(n=n||{}).data=n.data||{},c=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(u=n.data={},c=n.garbageCollect=[],n.font=t),e.save(),e.font=t;let d=0,h=r.length;for(i=0;i<h;i++)if(null==(s=r[i])||j(s)){if(j(s))for(o=0,a=s.length;o<a;o++)null==(l=s[o])||j(l)||(d=e3(e,u,c,d,l))}else d=e3(e,u,c,d,s);e.restore();let f=c.length/2;if(f>r.length){for(i=0;i<f;i++)delete u[c[i]];c.splice(0,f)}return d}(l,h.string,u),h:u.length*h.lineHeight});n[c]=f;let p=eS(e.getIndexAngle(c)+s),g=Math.round(180/ea*p);!function(e,t,r,n,i){let o=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r)),s=0,l=0;n.start<t.l?(s=(t.l-n.start)/o,e.l=Math.min(e.l,t.l-s)):n.end>t.r&&(s=(n.end-t.r)/o,e.r=Math.max(e.r,t.r+s)),i.start<t.t?(l=(t.t-i.start)/a,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}(r,t,p,ic(g,d.x,f.w,0,180),ic(g,d.y,f.h,90,270))}e.setCenterPoint(t.l-r.l,r.r-t.r,t.t-r.t,r.b-t.b),e._pointLabelItems=function(e,t,r){let n,i=[],o=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:l}=a.pointLabels,u={extra:iu(a)/2,additionalAngle:s?ea/o:0};for(let a=0;a<o;a++){u.padding=r[a],u.size=t[a];let o=function(e,t,r){var n,i,o,a,s,l,u;let c=e.drawingArea,{extra:d,additionalAngle:h,padding:f,size:p}=r,g=e.getPointPosition(t,c+d+f,h),m=Math.round(180/ea*eS(g.angle+ed)),v=(n=g.y,i=p.h,90===(o=m)||270===o?n-=i/2:(o>270||o<90)&&(n-=i),n),b=0===(a=m)||180===a?"center":a<180?"left":"right",y=(s=g.x,l=p.w,"right"===(u=b)?s-=l:"center"===u&&(s-=l/2),s);return{visible:!0,x:g.x,y:v,textAlign:b,left:y,top:v,right:y+p.w,bottom:v+p.h}}(e,a,u);i.push(o),"auto"===l&&(o.visible=function(e,t){if(!t)return!0;let{left:r,top:n,right:i,bottom:o}=e;return!(e9({x:r,y:n},t)||e9({x:r,y:o},t)||e9({x:i,y:n},t)||e9({x:i,y:o},t))}(o,n),o.visible&&(n=o))}return i}(e,n,i)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,r,n){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,r,n))}getIndexAngle(e){return eS(e*(es/(this._pointLabels.length||1))+ex(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(F(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(F(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e<t.length){var r;let n=t[e];return r=this.getContext(),tg(r,{label:n,index:e,type:"pointLabel"})}}getPointPosition(e,t,r=0){let n=this.getIndexAngle(e)-ed+r;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter,angle:n}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:r,right:n,bottom:i}=this._pointLabelItems[e];return{left:t,top:r,right:n,bottom:i}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let r=this.ctx;r.save(),r.beginPath(),id(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){let e,t,r,n=this.ctx,i=this.options,{angleLines:o,grid:a,border:s}=i,l=this._pointLabels.length;if(i.pointLabels.display&&function(e,t){let{ctx:r,options:{pointLabels:n}}=e;for(let i=t-1;i>=0;i--){let t=e._pointLabelItems[i];if(!t.visible)continue;let o=n.setContext(e.getPointLabelContext(i));!function(e,t,r){let{left:n,top:i,right:o,bottom:a}=r,{backdropColor:s}=t;if(!F(s)){let r=td(t.borderRadius),l=th(t.backdropPadding);e.fillStyle=s;let u=n-l.left,c=i-l.top,d=o-n+l.width,h=a-i+l.height;Object.values(r).some(e=>0!==e)?(e.beginPath(),to(e,{x:u,y:c,w:d,h:h,radius:r}),e.fill()):e.fillRect(u,c,d,h)}}(r,o,t);let a=tf(o.font),{x:s,y:l,textAlign:u}=t;ti(r,e._pointLabels[i],s,l+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}(this,l),a.display&&this.ticks.forEach((e,r)=>{if(0!==r||0===r&&this.min<0){t=this.getDistanceFromCenterForValue(e.value);let n=this.getContext(r),i=a.setContext(n),o=s.setContext(n);!function(e,t,r,n,i){let o=e.ctx,a=t.circular,{color:s,lineWidth:l}=t;(a||n)&&s&&l&&!(r<0)&&(o.save(),o.strokeStyle=s,o.lineWidth=l,o.setLineDash(i.dash||[]),o.lineDashOffset=i.dashOffset,o.beginPath(),id(e,r,a,n),o.closePath(),o.stroke(),o.restore())}(this,i,t,l,o)}}),o.display){for(n.save(),e=l-1;e>=0;e--){let a=o.setContext(this.getPointLabelContext(e)),{color:s,lineWidth:l}=a;l&&s&&(n.lineWidth=l,n.strokeStyle=s,n.setLineDash(a.borderDash),n.lineDashOffset=a.borderDashOffset,t=this.getDistanceFromCenterForValue(i.reverse?this.min:this.max),r=this.getPointPosition(e,t),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(r.x,r.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){let e,t,r=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;let o=this.getIndexAngle(0);r.save(),r.translate(this.xCenter,this.yCenter),r.rotate(o),r.textAlign="center",r.textBaseline="middle",this.ticks.forEach((o,a)=>{if(0===a&&this.min>=0&&!n.reverse)return;let s=i.setContext(this.getContext(a)),l=tf(s.font);if(e=this.getDistanceFromCenterForValue(this.ticks[a].value),s.showLabelBackdrop){r.font=l.string,t=r.measureText(o.label).width,r.fillStyle=s.backdropColor;let n=th(s.backdropPadding);r.fillRect(-t/2-n.left,-e-l.size/2-n.top,t+n.width,l.size+n.height)}ti(r,o.label,0,-e,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),r.restore()}drawTitle(){}}let ip={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ig=Object.keys(ip);function im(e,t){return e-t}function iv(e,t){if(F(t))return null;let r=e._adapter,{parser:n,round:i,isoWeekday:o}=e._parseOpts,a=t;return("function"==typeof n&&(a=n(a)),B(a)||(a="string"==typeof n?r.parse(a,n):r.parse(a)),null===a)?null:(i&&(a="week"===i&&(eb(o)||!0===o)?r.startOf(a,"isoWeek",o):r.startOf(a,i)),+a)}function ib(e,t,r,n){let i=ig.length;for(let o=ig.indexOf(e);o<i-1;++o){let e=ip[ig[o]],i=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((r-t)/(i*e.size))<=n)return ig[o]}return ig[i-1]}function iy(e,t,r){if(r){if(r.length){let{lo:n,hi:i}=eP(r,t);e[r[n]>=t?r[n]:r[i]]=!0}}else e[t]=!0}function ix(e,t,r){let n,i,o=[],a={},s=t.length;for(n=0;n<s;++n)a[i=t[n]]=n,o.push({value:i,major:!1});return 0!==s&&r?function(e,t,r,n){let i,o,a=e._adapter,s=+a.startOf(t[0].value,n),l=t[t.length-1].value;for(i=s;i<=l;i=+a.add(i,1,n))(o=r[i])>=0&&(t[o].major=!0);return t}(e,o,a,r):o}class iw extends r7{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){let r=e.time||(e.time={}),n=this._adapter=new rC(e.adapters.date);n.init(t),Z(r.displayFormats,n.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:iv(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,t=this._adapter,r=e.time.unit||"day",{min:n,max:i,minDefined:o,maxDefined:a}=this.getUserBounds();function s(e){o||isNaN(e.min)||(n=Math.min(n,e.min)),a||isNaN(e.max)||(i=Math.max(i,e.max))}o&&a||(s(this._getLabelBounds()),("ticks"!==e.bounds||"labels"!==e.ticks.source)&&s(this.getMinMax(!1))),n=B(n)&&!isNaN(n)?n:+t.startOf(Date.now(),r),i=B(i)&&!isNaN(i)?i:+t.endOf(Date.now(),r)+1,this.min=Math.min(n,i-1),this.max=Math.max(n+1,i)}_getLabelBounds(){let e=this.getLabelTimestamps(),t=1/0,r=-1/0;return e.length&&(t=e[0],r=e[e.length-1]),{min:t,max:r}}buildTicks(){let e=this.options,t=e.time,r=e.ticks,n="labels"===r.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);let i=this.min,o=function(e,t,r){let n=0,i=e.length;for(;n<i&&e[n]<t;)n++;for(;i>n&&e[i-1]>r;)i--;return n>0||i<e.length?e.slice(n,i):e}(n,i,this.max);return this._unit=t.unit||(r.autoSkip?ib(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):function(e,t,r,n,i){for(let o=ig.length-1;o>=ig.indexOf(r);o--){let r=ig[o];if(ip[r].common&&e._adapter.diff(i,n,r)>=t-1)return r}return ig[r?ig.indexOf(r):0]}(this,o.length,t.minUnit,this.min,this.max)),this._majorUnit=r.major.enabled&&"year"!==this._unit?function(e){for(let t=ig.indexOf(e)+1,r=ig.length;t<r;++t)if(ip[ig[t]].common)return ig[t]}(this._unit):void 0,this.initOffsets(n),e.reverse&&o.reverse(),ix(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t,r,n=0,i=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),n=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,r=this.getDecimalForValue(e[e.length-1]),i=1===e.length?r:(r-this.getDecimalForValue(e[e.length-2]))/2);let o=e.length<3?.5:.25;n=eO(n,0,o),i=eO(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){let e,t,r=this._adapter,n=this.min,i=this.max,o=this.options,a=o.time,s=a.unit||ib(a.minUnit,n,i,this._getLabelCapacity(n)),l=W(o.ticks.stepSize,1),u="week"===s&&a.isoWeekday,c=eb(u)||!0===u,d={},h=n;if(c&&(h=+r.startOf(h,"isoWeek",u)),h=+r.startOf(h,c?"day":s),r.diff(i,n,s)>1e5*l)throw Error(n+" and "+i+" are too far apart with stepSize of "+l+" "+s);let f="data"===o.ticks.source&&this.getDataTimestamps();for(e=h,t=0;e<i;e=+r.add(e,l,s),t++)iy(d,e,f);return(e===i||"ticks"===o.bounds||1===t)&&iy(d,e,f),Object.keys(d).sort(im).map(e=>+e)}getLabelForValue(e){let t=this._adapter,r=this.options.time;return r.tooltipFormat?t.format(e,r.tooltipFormat):t.format(e,r.displayFormats.datetime)}format(e,t){let r=this.options.time.displayFormats,n=this._unit,i=t||r[n];return this._adapter.format(e,i)}_tickFormatFunction(e,t,r,n){let i=this.options,o=i.ticks.callback;if(o)return $(o,[e,t,r],this);let a=i.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],c=l&&a[l],d=r[t],h=l&&c&&d&&d.major;return this._adapter.format(e,n||(h?c:u))}generateTickLabels(e){let t,r,n;for(t=0,r=e.length;t<r;++t)(n=e[t]).label=this._tickFormatFunction(n.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){let t=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+r)*t.factor)}getValueForPixel(e){let t=this._offsets,r=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){let t=this.options.ticks,r=this.ctx.measureText(e).width,n=ex(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(n),o=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:r*i+a*o,h:r*o+a*i}}_getLabelCapacity(e){let t=this.options.time,r=t.displayFormats,n=r[t.unit]||r.millisecond,i=this._tickFormatFunction(e,0,ix(this,[e],this._majorUnit),n),o=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e,t,r=this._cache.data||[];if(r.length)return r;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,t=n.length;e<t;++e)r=r.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(r)}getLabelTimestamps(){let e,t,r=this._cache.labels||[];if(r.length)return r;let n=this.getLabels();for(e=0,t=n.length;e<t;++e)r.push(iv(this,n[e]));return this._cache.labels=this._normalized?r:this.normalize(r)}normalize(e){return eN(e.sort(im))}}function i_(e,t,r){let n,i,o,a,s=0,l=e.length-1;r?(t>=e[s].pos&&t<=e[l].pos&&({lo:s,hi:l}=eT(e,"pos",t)),{pos:n,time:o}=e[s],{pos:i,time:a}=e[l]):(t>=e[s].time&&t<=e[l].time&&({lo:s,hi:l}=eT(e,"time",t)),{time:n,pos:o}=e[s],{time:i,pos:a}=e[l]);let u=i-n;return u?o+(a-o)*(t-n)/u:o}class iC extends iw{static id="timeseries";static defaults=iw.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=i_(t,this.min),this._tableRange=i_(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let t,r,n,{min:i,max:o}=this,a=[],s=[];for(t=0,r=e.length;t<r;++t)(n=e[t])>=i&&n<=o&&a.push(n);if(a.length<2)return[{time:i,pos:0},{time:o,pos:1}];for(t=0,r=a.length;t<r;++t)Math.round((a[t+1]+a[t-1])/2)!==(n=a[t])&&s.push({time:n,pos:t/(r-1)});return s}_generate(){let e=this.min,t=this.max,r=super.getDataTimestamps();return r.includes(e)&&r.length||r.splice(0,0,e),r.includes(t)&&1!==r.length||r.push(t),r.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),r=this.getLabelTimestamps();return e=t.length&&r.length?this.normalize(t.concat(r)):t.length?t:r,e=this._cache.all=e}getDecimalForValue(e){return(i_(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,r=this.getDecimalForPixel(e)/t.factor-t.end;return i_(this._table,r*this._tableRange+this._minPos,!0)}}e.s(["BarController",()=>rp,"BarElement",()=>nB,"BubbleController",()=>rg,"CategoryScale",()=>n9,"Chart",()=>nC,"DoughnutController",()=>rm,"Legend",()=>nG,"LineController",()=>rv,"LinearScale",()=>ir,"PieController",()=>ry,"PolarAreaController",()=>rb,"RadarController",()=>rx,"ScatterController",()=>rw,"TimeSeriesScale",()=>iC,"Title",()=>nY,"Tooltip",()=>n8],73478);var ik=e.i(64789);let iS="label";function iE(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function iO(e,t,r=iS){let n=[];e.datasets=t.map(t=>{let i=e.datasets.find(e=>e[r]===t[r]);return!i||!t.data||n.includes(i)?{...t}:(n.push(i),Object.assign(i,t),i)})}let iI=(0,ik.forwardRef)(function(e,t){let{height:r=150,width:n=300,redraw:o=!1,datasetIdKey:a,type:s,data:l,options:u,plugins:c=[],fallbackContent:d,updateMode:h,...f}=e,p=(0,ik.useRef)(null),g=(0,ik.useRef)(null),m=()=>{p.current&&(g.current=new nC(p.current,{type:s,data:function(e,t=iS){let r={labels:[],datasets:[]};return r.labels=e.labels,iO(r,e.datasets,t),r}(l,a),options:u&&{...u},plugins:c}),iE(t,g.current))},v=()=>{iE(t,null),g.current&&(g.current.destroy(),g.current=null)};return(0,ik.useEffect)(()=>{var e;let t;!o&&g.current&&u&&(e=g.current,(t=e.options)&&u&&Object.assign(t,u))},[o,u]),(0,ik.useEffect)(()=>{!o&&g.current&&(g.current.config.data.labels=l.labels)},[o,l.labels]),(0,ik.useEffect)(()=>{!o&&g.current&&l.datasets&&iO(g.current.config.data,l.datasets,a)},[o,l.datasets]),(0,ik.useEffect)(()=>{g.current&&(o?(v(),setTimeout(m)):g.current.update(h))},[o,u,l.labels,l.datasets,h]),(0,ik.useEffect)(()=>{g.current&&(v(),setTimeout(m))},[s]),(0,ik.useEffect)(()=>(m(),()=>v()),[]),(0,i.jsx)("canvas",{ref:p,role:"img",height:r,width:n,...f,children:d})}),iP=(nC.register(rp),(0,ik.forwardRef)((e,t)=>(0,i.jsx)(iI,{...e,ref:t,type:"bar"})));e.s(["Bar",()=>iP,"Chart",()=>iI],91227),e.i(42760);let iT={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function iR(e){return (t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}let iA={date:iR({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:iR({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:iR({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},iM={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function iN(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=r?.width?String(r.width):t;n=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=r?.width?String(r.width):e.defaultWidth;n=e.values[i]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function iD(e){return(t,r={})=>{let n,i=r.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;let s=a[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(l,e=>e.test(s)):function(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(l,e=>e.test(s));return n=e.valueCallback?e.valueCallback(u):u,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(s.length)}}}let iL={code:"en-US",formatDistance:(e,t,r)=>{let n,i=iT[e];if(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),r?.addSuffix)if(r.comparison&&r.comparison>0)return"in "+n;else return n+" ago";return n},formatLong:iA,formatRelative:(e,t,r,n)=>iM[e],localize:{ordinalNumber:(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:iN({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:iN({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:iN({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:iN({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:iN({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(n={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{let r=e.match(n.matchPattern);if(!r)return null;let i=r[0],o=e.match(n.parsePattern);if(!o)return null;let a=n.valueCallback?n.valueCallback(o[0]):o[0];return{value:a=t.valueCallback?t.valueCallback(a):a,rest:e.slice(i.length)}}),era:iD({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:iD({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:iD({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:iD({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:iD({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};e.s(["defaultLocale",0,iL],38153);let iV={};function iF(){return iV}e.s(["getDefaultOptions",()=>iF],92421);let ij=Symbol.for("constructDateFrom");function iz(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&ij in e?e[ij](t):e instanceof Date?new e.constructor(t):new Date(t)}function iB(e,t){return iz(t||e,e)}function iH(e){let t=iB(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),e-r}function iW(e,...t){let r=iz.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}function iU(e,t){let r=iB(e,t?.in);return r.setHours(0,0,0,0),r}function i$(e,t){let r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??iV.weekStartsOn??iV.locale?.options?.weekStartsOn??0,n=iB(e,t?.in),i=n.getDay();return n.setDate(n.getDate()-(7*(i<r)+i-r)),n.setHours(0,0,0,0),n}function iq(e,t){return i$(e,{...t,weekStartsOn:1})}function iG(e,t){let r=iB(e,t?.in),n=r.getFullYear(),i=iz(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);let o=iq(i),a=iz(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let s=iq(a);return r.getTime()>=o.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function iK(e,t){let r=iB(e,t?.in),n=r.getFullYear(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??iV.firstWeekContainsDate??iV.locale?.options?.firstWeekContainsDate??1,o=iz(t?.in||e,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);let a=i$(o,t),s=iz(t?.in||e,0);s.setFullYear(n,0,i),s.setHours(0,0,0,0);let l=i$(s,t);return+r>=+a?n+1:+r>=+l?n:n-1}function iY(e,t){let r=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+r}e.s(["constructFromSymbol",0,ij,"millisecondsInDay",0,864e5,"millisecondsInHour",0,36e5,"millisecondsInMinute",0,6e4,"millisecondsInWeek",0,6048e5,"minutesInDay",0,1440,"minutesInMonth",0,43200],11518),e.s(["constructFrom",()=>iz],87122),e.s(["toDate",()=>iB],16467),e.s(["getTimezoneOffsetInMilliseconds",()=>iH],32713),e.s(["normalizeDates",()=>iW],39392);let iX={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return iY("yy"===t?n%100:n,t.length)},M(e,t){let r=e.getMonth();return"M"===t?String(r+1):iY(r+1,2)},d:(e,t)=>iY(e.getDate(),t.length),a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>iY(e.getHours()%12||12,t.length),H:(e,t)=>iY(e.getHours(),t.length),m:(e,t)=>iY(e.getMinutes(),t.length),s:(e,t)=>iY(e.getSeconds(),t.length),S(e,t){let r=t.length;return iY(Math.trunc(e.getMilliseconds()*Math.pow(10,r-3)),t.length)}},iQ={G:function(e,t,r){let n=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){let t=e.getFullYear();return r.ordinalNumber(t>0?t:1-t,{unit:"year"})}return iX.y(e,t)},Y:function(e,t,r,n){let i=iK(e,n),o=i>0?i:1-i;return"YY"===t?iY(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):iY(o,t.length)},R:function(e,t){return iY(iG(e),t.length)},u:function(e,t){return iY(e.getFullYear(),t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return iY(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return iY(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return iX.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return iY(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let i,o,a,s,l=Math.round((i$(i=iB(e,n?.in),n)-(o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??iV.firstWeekContainsDate??iV.locale?.options?.firstWeekContainsDate??1,a=iK(i,n),(s=iz(n?.in||i,0)).setFullYear(a,0,o),s.setHours(0,0,0,0),i$(s,n)))/6048e5)+1;return"wo"===t?r.ordinalNumber(l,{unit:"week"}):iY(l,t.length)},I:function(e,t,r){let n,i,o,a=Math.round((iq(n=iB(e,void 0))-(i=iG(n,void 0),(o=iz(n,0)).setFullYear(i,0,4),o.setHours(0,0,0,0),iq(o)))/6048e5)+1;return"Io"===t?r.ordinalNumber(a,{unit:"week"}):iY(a,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):iX.d(e,t)},D:function(e,t,r){let n,i,o=function(e,t,r){let[n,i]=iW(void 0,e,t),o=iU(n),a=iU(i);return Math.round((o-iH(o)-(a-iH(a)))/864e5)}(n=iB(e,void 0),((i=iB(n,void 0)).setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i))+1;return"Do"===t?r.ordinalNumber(o,{unit:"dayOfYear"}):iY(o,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return iY(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return iY(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return iY(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n,i=e.getHours();switch(n=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n,i=e.getHours();switch(n=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return iX.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):iX.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):iY(n,t.length)},k:function(e,t,r){let n=e.getHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):iY(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):iX.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):iX.s(e,t)},S:function(e,t){return iX.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return iJ(n);case"XXXX":case"XX":return i0(n);default:return i0(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return iJ(n);case"xxxx":case"xx":return i0(n);default:return i0(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+iZ(n,":");default:return"GMT"+i0(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+iZ(n,":");default:return"GMT"+i0(n,":")}},t:function(e,t,r){return iY(Math.trunc(e/1e3),t.length)},T:function(e,t,r){return iY(+e,t.length)}};function iZ(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return 0===o?r+String(i):r+String(i)+t+iY(o,2)}function iJ(e,t){return e%60==0?(e>0?"-":"+")+iY(Math.abs(e)/60,2):i0(e,t)}function i0(e,t=""){let r=Math.abs(e);return(e>0?"-":"+")+iY(Math.trunc(r/60),2)+t+iY(r%60,2)}let i1=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},i2=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},i5={p:i2,P:(e,t)=>{let r,n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return i1(e,t);switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",i1(i,t)).replace("{{time}}",i2(o,t))}},i3=/^D+$/,i4=/^Y+$/,i6=["D","DD","YY","YYYY"],i8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,i7=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,i9=/^'([^]*?)'?$/,oe=/''/g,ot=/[a-zA-Z]/;function or(e,t,r){let n=r?.locale??iV.locale??iL,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??iV.firstWeekContainsDate??iV.locale?.options?.firstWeekContainsDate??1,o=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??iV.weekStartsOn??iV.locale?.options?.weekStartsOn??0,a=iB(e,r?.in);if(!(a instanceof Date||"object"==typeof a&&"[object Date]"===Object.prototype.toString.call(a))&&"number"!=typeof a||isNaN(+iB(a)))throw RangeError("Invalid time value");let s=t.match(i7).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,i5[t])(e,n.formatLong):e}).join("").match(i8).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var r;let t;return{isToken:!1,value:(t=(r=e).match(i9))?t[1].replace(oe,"'"):r}}if(iQ[t])return{isToken:!0,value:e};if(t.match(ot))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});n.localize.preprocessor&&(s=n.localize.preprocessor(a,s));let l={firstWeekContainsDate:i,weekStartsOn:o,locale:n};return s.map(i=>{if(!i.isToken)return i.value;let o=i.value;return(!r?.useAdditionalWeekYearTokens&&i4.test(o)||!r?.useAdditionalDayOfYearTokens&&i3.test(o))&&function(e,t,r){var n,i,o;let a,s=(n=e,i=t,o=r,a="Y"===n[0]?"years":"days of the month",`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${i}\`) for formatting ${a} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),i6.includes(e))throw RangeError(s)}(o,t,String(e)),(0,iQ[o[0]])(a,o,n.localize,l)}).join("")}function on(e,t="en-US",r){return"number"!=typeof e?e:new Intl.NumberFormat(t,r).format(e)}function oi(e){let t=(t=e)=>on(t,"en-US",{style:"percent",minimumFractionDigits:1});if(e>0&&e<=.001){let e=t(.001);return`<${e}`}if(e<1&&e>=.999){let e=t(.999);return`>${e}`}return t()}function oo(e){if("number"!=typeof e)return e;{let t=Math.abs(e),r=t>=.01,n=t>=1e6,i=t>=1e9,o=t>=1e15;if(o||t>=1e12)return new Intl.NumberFormat("en-US",{style:"unit",unit:"liter",unitDisplay:"narrow",maximumFractionDigits:2*!o}).format(e/1e12).replace("L","T");if(i||n||t>=1e3){let t={base:i?1e9:n?1e6:1e3,unit:i?"B":n?"M":"K"};return new Intl.NumberFormat("en-US",{style:"unit",unit:"liter",unitDisplay:"narrow",maximumFractionDigits:1}).format(e/t.base).replace("L",t.unit)}if(t>=1)return new Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(e);else return new Intl.NumberFormat("en-US",{maximumFractionDigits:r?3:2,notation:r||0===t?"standard":"scientific"}).format(e)}}e.s(["format",()=>or],30902),e.s(["formatAsAbbreviatedNumber",()=>oo,"formatIntervalMinMax",()=>oi,"formatNumber",()=>on],22429);let oa="#63B3ED",os="#F6AD55",ol=`${oa}A5`,ou=`${os}A5`;function oc({color:e}){return(0,i.jsx)(a.Box,{display:"inline-block",w:"10px",h:"10px",bgColor:e,mr:"2",borderRadius:"sm"})}function od({data:e,hideAxis:t=!1,animation:r=!1}){nC.register(nB,iC,ir,n9,nY,nG,n8);let n=function(e,t=!1,{...r}={}){let{title:n,datasets:i,type:o,samples:a=0,binEdges:s}=e,[l,u]=i,c="datetime"===o;return{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{reverse:!0},title:{display:!0,text:n,font:{size:20}},tooltip:{mode:"index",intersect:!1,callbacks:{title([{dataIndex:e,datasetIndex:t}]){let r=of(s,e);return`${c?"Date Range":"string"===o?"Text Length":"Value Range"}
|
|
2
|
+
${r}`},label({datasetIndex:e,dataIndex:t,dataset:{label:r}}){let n=0===e?u.counts:l.counts,i=oi(n[t]/a),o=n[t];return`${r}: ${o} (${i})`}}}},scales:function({datasets:e,min:t=0,max:r=0,type:n,binEdges:i},o=!1){let[a,s]=e,l=Math.max(...s.counts,...a.counts),u=i.map((e,t)=>of(i,t)).slice(0,-1);return{x:"datetime"===n?{display:!o,type:"timeseries",min:t,max:r,adapters:{date:{}},time:{minUnit:"day"},grid:{display:!1},ticks:{minRotation:30,maxRotation:30,maxTicksLimit:8}}:{display:!o,type:"category",grid:{display:!1},ticks:{callback:(e,t)=>u[t]},stacked:!0},y:{display:!o,type:"linear",max:l,border:{dash:[2,2]},grid:{color:"lightgray"},ticks:{maxTicksLimit:8,callback:function(e){return oo(e)}},beginAtZero:!0}}}(e,t),...r}}(e,t,{animation:r}),o=function(e){let{datasets:t,type:r,binEdges:n}=e,[i,o]=t,a=oh(r,n,"Current",ol,o),s=oh(r,n,"Base",ou,i);return{labels:n.map((e,t)=>of(n,t)).slice(0,-1),datasets:[a,s]}}(e);return(0,i.jsx)(iI,{type:"bar",options:n,data:o,plugins:[]})}function oh(e,t,r,n,i){let{counts:o=[]}=i;return{label:r,data:"datetime"===e?o.map((e,r)=>[t[r],e]):o,backgroundColor:n,borderColor:n,hoverBackgroundColor:n,borderWidth:0,categoryPercentage:1,barPercentage:1,xAxisID:"x"}}function of(e,t){let r=e[t],n=e[t+1],i=oo(r),o=oo(n);return`${i} - ${o}`}e.s(["BASE_BAR_COLOR",0,os,"BASE_BAR_COLOR_WITH_ALPHA",0,ou,"CURRENT_BAR_COLOR",0,oa,"CURRENT_BAR_COLOR_WITH_ALPHA",0,ol,"SquareIcon",()=>oc],65521);let op=(0,ik.forwardRef)(({backgroundColor:e="white",blockSize:t,children:r,...n},o)=>(0,i.jsx)(a.Box,{ref:o,...n,overflowY:"auto",overflowX:"hidden",children:(0,i.jsx)(a.Box,{backgroundColor:e,height:"100%",blockSize:t,children:r})}));e.s(["ScreenshotBox",0,op],60844);var og=e.i(62754);let om=(0,ik.forwardRef)(function({run:e},t){if(!(0,og.isHistogramDiffRun)(e))throw Error("Run type must be histogram_diff");let r=e.params,n=e.result?.base,u=e.result?.current,c=e.result?.min,d=e.result?.max,h=e.result?.bin_edges??[];return n&&u?(0,i.jsx)(s.Flex,{direction:"column",height:"100%",children:(0,i.jsx)(op,{ref:t,height:"100%",children:(0,i.jsxs)(o.HStack,{children:[(0,i.jsx)(l.Spacer,{}),(0,i.jsx)(a.Box,{w:"80%",h:"35vh",m:"4",children:(0,i.jsx)(od,{data:{title:`Model ${r.model}.${r.column_name}`,type:e.params?.column_type??"",datasets:[n,u],min:c,max:d,samples:n.total,binEdges:h}})}),(0,i.jsx)(l.Spacer,{})]})})}):(0,i.jsx)("div",{children:"Loading..."})});e.s(["HistogramDiffResultView",0,om],53406)},51713,e=>{"use strict";let t=(0,e.i(5376).chakra)("div",{base:{display:"flex",alignItems:"center",justifyContent:"center"},variants:{inline:{true:{display:"inline-flex"}}}});t.displayName="Center",e.s(["Center",()=>t])},62234,1484,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(62258);function i(e,t,r){let n="function"==typeof e.colSpan?e.colSpan(r):1;if(Number.isInteger(n)&&n>1&&(!e.frozen||e.idx+n-1<=t))return n}function o(e){e.stopPropagation()}function a(e,t="instant"){e?.scrollIntoView({inline:"nearest",block:"nearest",behavior:t})}function s(e){let t=!1,r={...e,preventGridDefault(){t=!0},isGridDefaultPrevented:()=>t};return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),r}let l=new Set(["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Insert","ContextMenu","Escape","Pause","Play","PrintScreen","F1","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]);function u(e){return(e.ctrlKey||e.metaKey)&&"Control"!==e.key}function c(e){let t="rtl"===e;return{leftKey:t?"ArrowRight":"ArrowLeft",rightKey:t?"ArrowLeft":"ArrowRight"}}function d(e,t){return null!=e.renderEditCell&&("function"==typeof e.editable?e.editable(t):e.editable)!==!1}let h="rdg-cell cj343x07-0-0-beta-58";function f(e){return{"--rdg-grid-row-start":e}}function p(e,t,r){let n=t+1,i=`calc(${r-1} * var(--rdg-header-row-height))`;return void 0===e.parent?{insetBlockStart:0,gridRowStart:1,gridRowEnd:n,paddingBlockStart:i}:{insetBlockStart:`calc(${t-r} * var(--rdg-header-row-height))`,gridRowStart:n-r,gridRowEnd:n,paddingBlockStart:i}}function g(e,t=1){let r=e.idx+1;return{gridColumnStart:r,gridColumnEnd:r+t,insetInlineStart:e.frozen?`var(--rdg-frozen-left-${e.idx})`:void 0}}function m(...e){let t="";for(let r of e)if(r){if("string"==typeof r)t+=` ${r}`;else if("object"==typeof r)for(let e in r)r[e]&&(t+=` ${e}`)}return t.trimStart()}function v(e,...t){return m(h,{"rdg-cell-frozen csofj7r7-0-0-beta-58":e.frozen},...t)}let{min:b,max:y,floor:x,sign:w,abs:_}=Math;function C(e){if("function"!=typeof e)throw Error("Please specify the rowKeyGetter prop to use selection")}function k(e,{minWidth:t,maxWidth:r}){return(e=y(e,t),"number"==typeof r&&r>=t)?b(e,r):e}function S(e,t){return void 0===e.parent?t:e.level-e.parent.level}function E({onChange:e,indeterminate:r,...n}){return(0,t.jsx)("input",{ref:e=>{e&&(e.indeterminate=!0===r)},type:"checkbox",className:"rdg-checkbox-input c1bn88vv7-0-0-beta-58",onChange:function(t){e(t.target.checked,t.nativeEvent.shiftKey)},...n})}function O(e){try{return e.row[e.column.key]}catch{return null}}let I=(0,r.createContext)(void 0);function P(){return(0,r.useContext)(I)}let T=(0,r.createContext)(void 0),R=(0,r.createContext)(void 0),A=(0,r.createContext)(void 0),M=(0,r.createContext)(void 0),N="rdg-select-column";function D({column:e,sortDirection:r,priority:n}){return e.sortable?(0,t.jsx)(L,{sortDirection:r,priority:n,children:e.name}):e.name}function L({sortDirection:e,priority:r,children:n}){let i=P().renderSortStatus;return(0,t.jsxs)("span",{className:"h44jtk67-0-0-beta-58",children:[(0,t.jsx)("span",{className:"rdg-header-sort-name hcgkhxz7-0-0-beta-58",children:n}),(0,t.jsx)("span",{children:i({sortDirection:e,priority:r})})]})}function V(e,t){let r=`[data-measuring-cell-key="${CSS.escape(t)}"]`,n=e.current?.querySelector(r);return n?.getBoundingClientRect().width}function F(e){let t=(0,r.useRef)(e);(0,r.useLayoutEffect)(()=>{t.current=e});let n=(0,r.useCallback)((...e)=>{t.current(...e)},[]);return e?n:e}function j(e){let[t,n]=(0,r.useState)(!1);return t&&!e&&n(!1),{tabIndex:e&&!t?0:-1,childTabIndex:e?0:-1,onFocus:e?function(e){if(e.target===e.currentTarget){let t=e.currentTarget.querySelector('[tabindex="0"]');null!==t?(t.focus({preventScroll:!0}),n(!0)):n(!1)}else n(!0)}:void 0}}let z=(0,r.memo)(function({column:e,colSpan:r,isCellSelected:n,isDraggedOver:i,row:o,rowIdx:a,className:l,onMouseDown:u,onCellMouseDown:c,onClick:h,onCellClick:f,onDoubleClick:p,onCellDoubleClick:m,onContextMenu:b,onCellContextMenu:y,onRowChange:x,selectCell:w,style:_,...C}){let{tabIndex:k,childTabIndex:S,onFocus:E}=j(n),{cellClass:O}=e;l=v(e,{"rdg-cell-dragged-over c6ra8a37-0-0-beta-58":i},"function"==typeof O?O(o):O,l);let I=d(e,o);function P(t){w({rowIdx:a,idx:e.idx},{enableEditor:t})}function T(t,r){let n=!1;if(r){let i=s(t);r({rowIdx:a,row:o,column:e,selectCell:P},i),n=i.isGridDefaultPrevented()}return n}return(0,t.jsx)("div",{role:"gridcell","aria-colindex":e.idx+1,"aria-colspan":r,"aria-selected":n,"aria-readonly":!I||void 0,tabIndex:k,className:l,style:{...g(e,r),..._},onClick:function(e){h?.(e),T(e,f)},onMouseDown:function(e){u?.(e),T(e,c)||P()},onDoubleClick:function(e){p?.(e),T(e,m)||P(!0)},onContextMenu:function(e){b?.(e),T(e,y)},onFocus:E,...C,children:e.renderCell({column:e,row:o,rowIdx:a,isCellEditable:I,tabIndex:S,onRowChange:function(t){x(e,t)}})})});function B(e,r){return(0,t.jsx)(z,{...r},e)}let H="object"==typeof scheduler&&"function"==typeof scheduler.postTask;function W({column:e,colSpan:n,row:i,rowIdx:o,onRowChange:a,closeEditor:l,onKeyDown:u,navigate:c}){let d=(0,r.useRef)(void 0),h=(0,r.useRef)(void 0),f=(0,r.useRef)(void 0),p=e.editorOptions?.commitOnOutsideClick??!0,m=(0,r.useEffectEvent)(()=>{y(!0,!1)});function b(){d.current=void 0,void 0!==h.current&&(h.current.abort(),h.current=void 0),void 0!==f.current&&(cancelAnimationFrame(f.current),f.current=void 0)}function y(e=!1,t=!0){e?a(i,!0,t):l(t)}function x(e,t=!1){a(e,t,t)}(0,r.useLayoutEffect)(()=>{if(p)return addEventListener("mousedown",e,{capture:!0}),addEventListener("mousedown",t),()=>{removeEventListener("mousedown",e,{capture:!0}),removeEventListener("mousedown",t),b()};function e(e){if(d.current=e,H){let e=new AbortController,{signal:t}=e;h.current=e,scheduler.postTask(m,{priority:"user-blocking",signal:t}).catch(()=>{})}else f.current=requestAnimationFrame(m)}function t(e){d.current===e&&m()}},[p]);let{cellClass:w}=e,_=v(e,"rdg-editor-container",!e.editorOptions?.displayCellContent&&"cis5rrm7-0-0-beta-58","function"==typeof w?w(i):w);return(0,t.jsx)("div",{role:"gridcell","aria-colindex":e.idx+1,"aria-colspan":n,"aria-selected":!0,className:_,style:g(e,n),onKeyDown:function(t){if(u){let r=s(t);if(u({mode:"EDIT",row:i,column:e,rowIdx:o,navigate(){c(t)},onClose:y},r),r.isGridDefaultPrevented())return}"Escape"===t.key?y():"Enter"===t.key?y(!0):function({key:e,target:t}){return!!("Tab"===e&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement))&&t.closest(".rdg-editor-container")?.querySelectorAll("input, textarea, select").length===1}(t)&&c(t)},onMouseDownCapture:b,children:null!=e.renderEditCell&&(0,t.jsxs)(t.Fragment,{children:[e.renderEditCell({column:e,row:i,rowIdx:o,onRowChange:x,onClose:y}),e.editorOptions?.displayCellContent&&e.renderCell({column:e,row:i,rowIdx:o,isCellEditable:!0,tabIndex:-1,onRowChange:x})]})})}function U({column:e,rowIdx:r,isCellSelected:n,selectCell:i}){let{tabIndex:o,onFocus:a}=j(n),{colSpan:s}=e,l=S(e,r),u=e.idx+1;return(0,t.jsx)("div",{role:"columnheader","aria-colindex":u,"aria-colspan":s,"aria-rowspan":l,"aria-selected":n,tabIndex:o,className:m(h,e.headerCellClass),style:{...p(e,r,l),gridColumnStart:u,gridColumnEnd:u+s},onFocus:a,onMouseDown:function(){i({idx:e.idx,rowIdx:r})},children:e.name})}function $({column:e,colSpan:i,rowIdx:o,isCellSelected:a,onColumnResize:s,onColumnResizeEnd:l,onColumnsReorder:d,sortColumns:h,onSortColumnsChange:f,selectCell:m,shouldFocusGrid:b,direction:y,draggedColumnKey:x,setDraggedColumnKey:w}){let _,C,[E,O]=(0,r.useState)(!1),I=(0,r.useRef)(null),P=x===e.key,T=S(e,o),{tabIndex:R,childTabIndex:A,onFocus:M}=j(b||a),N=h?.findIndex(t=>t.columnKey===e.key),D=void 0!==N&&N>-1?h[N]:void 0,L=D?.direction,V=void 0!==D&&h.length>1?N+1:void 0,F=L&&!V?"ASC"===L?"ascending":"descending":void 0,{sortable:z,resizable:B,draggable:H}=e,W=v(e,e.headerCellClass,{"c6l2wv17-0-0-beta-58":z,"rdg-cell-resizable c1kqdw7y7-0-0-beta-58":B,"rdg-cell-draggable":H,"rdg-cell-dragging c1bezg5o7-0-0-beta-58":P,"rdg-cell-drag-over c1vc96037-0-0-beta-58":E});function U(t){if(null==f)return;let{sortDescendingFirst:r}=e;if(void 0===D){let n={columnKey:e.key,direction:r?"DESC":"ASC"};f(h&&t?[...h,n]:[n])}else{let n;if((!0===r&&"DESC"===L||!0!==r&&"ASC"===L)&&(n={columnKey:e.key,direction:"ASC"===L?"DESC":"ASC"}),t){let e=[...h];n?e[N]=n:e.splice(N,1),f(e)}else f(n?[n]:[])}}H&&(_={draggable:!0,onDragStart:function(t){(0,n.flushSync)(()=>{w(e.key)}),t.dataTransfer.setDragImage(I.current,0,0),t.dataTransfer.dropEffect="move"},onDragEnd:function(){w(void 0)}},void 0!==x&&x!==e.key&&(C={onDragOver:function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"},onDragEnter:function(e){G(e)&&O(!0)},onDragLeave:function(e){G(e)&&O(!1)},onDrop:function(t){O(!1),t.preventDefault(),d?.(x,e.key)}}));let $={...p(e,o,T),...g(e,i)},K=e.renderHeaderCell({column:e,sortDirection:L,priority:V,tabIndex:A});return(0,t.jsxs)(t.Fragment,{children:[P&&(0,t.jsx)("div",{ref:I,style:$,className:v(e,e.headerCellClass,"d8rwc9w7-0-0-beta-58"),children:K}),(0,t.jsxs)("div",{role:"columnheader","aria-colindex":e.idx+1,"aria-colspan":i,"aria-rowspan":T,"aria-selected":a,"aria-sort":F,tabIndex:R,className:W,style:$,onMouseDown:function(){m({idx:e.idx,rowIdx:o})},onFocus:function(e){M?.(e),b&&m({idx:0,rowIdx:o})},onClick:function(e){z&&U(e.ctrlKey||e.metaKey)},onKeyDown:function(t){let{key:r}=t;if(z&&(" "===r||"Enter"===r))t.preventDefault(),U(t.ctrlKey||t.metaKey);else if(B&&u(t)&&("ArrowLeft"===r||"ArrowRight"===r)){t.stopPropagation();let{width:n}=t.currentTarget.getBoundingClientRect(),{leftKey:i}=c(y),o=k(n+(r===i?-10:10),e);o!==n&&s(e,o)}},..._,...C,children:[K,B&&(0,t.jsx)(q,{direction:y,column:e,onColumnResize:s,onColumnResizeEnd:l})]})]})}function q({direction:e,column:n,onColumnResize:i,onColumnResizeEnd:a}){let s=(0,r.useRef)(void 0),l="rtl"===e;return(0,t.jsx)("div",{"aria-hidden":!0,className:"rdg-resize-handle r1y6ywlx7-0-0-beta-58",onClick:o,onPointerDown:function(e){if("mouse"===e.pointerType&&1!==e.buttons)return;e.preventDefault();let{currentTarget:t,pointerId:r}=e;t.setPointerCapture(r);let{right:n,left:i}=t.parentElement.getBoundingClientRect();s.current=l?e.clientX-i:n-e.clientX},onPointerMove:function(e){let t=s.current;if(void 0===t)return;let{width:r,right:o,left:a}=e.currentTarget.parentElement.getBoundingClientRect(),u=l?o+t-e.clientX:e.clientX+t-a;u=k(u,n),r>0&&u!==r&&i(n,u)},onLostPointerCapture:function(){a(),s.current=void 0},onDoubleClick:function(){i(n,"max-content")}})}function G(e){let t=e.relatedTarget;return!e.currentTarget.contains(t)}let K="rdg-row r1upfr807-0-0-beta-58",Y="rdg-row-selected",X="rdg-header-row h10tskcx7-0-0-beta-58";var Q=(0,r.memo)(function({headerRowClass:e,rowIdx:n,columns:o,onColumnResize:a,onColumnResizeEnd:s,onColumnsReorder:l,sortColumns:u,onSortColumnsChange:c,lastFrozenColumnIndex:d,selectedCellIdx:h,selectCell:f,shouldFocusGrid:p,direction:g}){let[v,b]=(0,r.useState)(),y=[];for(let e=0;e<o.length;e++){let r=o[e],m=i(r,d,{type:"HEADER"});void 0!==m&&(e+=m-1),y.push((0,t.jsx)($,{column:r,colSpan:m,rowIdx:n,isCellSelected:h===r.idx,onColumnResize:a,onColumnResizeEnd:s,onColumnsReorder:l,onSortColumnsChange:c,sortColumns:u,selectCell:f,shouldFocusGrid:p&&0===e,direction:g,draggedColumnKey:v,setDraggedColumnKey:b},r.key))}return(0,t.jsx)("div",{role:"row","aria-rowindex":n,className:m(X,{[Y]:-1===h},e),children:y})}),Z=(0,r.memo)(function({rowIdx:e,level:r,columns:n,selectedCellIdx:i,selectCell:o}){let a=[],s=new Set;for(let l of n){let{parent:n}=l;if(void 0!==n){for(;n.level>r&&void 0!==n.parent;)n=n.parent;if(n.level===r&&!s.has(n)){s.add(n);let{idx:r}=n;a.push((0,t.jsx)(U,{column:n,rowIdx:e,isCellSelected:i===r,selectCell:o},r))}}}return(0,t.jsx)("div",{role:"row","aria-rowindex":e,className:X,children:a})});let J=(0,r.memo)(function({className:e,rowIdx:n,gridRowStart:o,selectedCellIdx:a,isRowSelectionDisabled:s,isRowSelected:l,draggedOverCellIdx:u,lastFrozenColumnIndex:c,row:d,viewportColumns:h,selectedCellEditor:p,onCellMouseDown:g,onCellClick:v,onCellDoubleClick:b,onCellContextMenu:y,rowClass:x,onRowChange:w,selectCell:_,style:C,...k}){let S=P().renderCell,E=F((e,t)=>{w(e,n,t)});e=m(K,`rdg-row-${n%2==0?"even":"odd"}`,{[Y]:-1===a},x?.(d,n),e);let O=[];for(let e=0;e<h.length;e++){let t=h[e],{idx:r}=t,o=i(t,c,{type:"ROW",row:d});void 0!==o&&(e+=o-1);let s=a===r;s&&p?O.push(p):O.push(S(t.key,{column:t,colSpan:o,row:d,rowIdx:n,isDraggedOver:u===r,isCellSelected:s,onCellMouseDown:g,onCellClick:v,onCellDoubleClick:b,onCellContextMenu:y,onRowChange:E,selectCell:_}))}let I=(0,r.useMemo)(()=>({isRowSelected:l,isRowSelectionDisabled:s}),[s,l]);return(0,t.jsx)(T,{value:I,children:(0,t.jsx)("div",{role:"row",className:e,style:{...f(o),...C},...k,children:O})})});function ee(e,r){return(0,t.jsx)(J,{...r},e)}function et({scrollToPosition:{idx:e,rowIdx:n},gridRef:i,setScrollToCellPosition:o}){let s=(0,r.useRef)(null);return(0,r.useLayoutEffect)(()=>{a(s.current,"auto")}),(0,r.useLayoutEffect)(()=>{let e=new IntersectionObserver(function(){o(null)},{root:i.current,threshold:1});return e.observe(s.current),()=>{e.disconnect()}},[i,o]),(0,t.jsx)("div",{ref:s,style:{gridColumn:void 0===e?"1/-1":e+1,gridRow:void 0===n?"1/-1":n+2}})}function er({sortDirection:e,priority:r}){return(0,t.jsxs)(t.Fragment,{children:[function({sortDirection:e}){return void 0===e?null:(0,t.jsx)("svg",{viewBox:"0 0 12 8",width:"12",height:"8",className:"rdg-sort-arrow a3ejtar7-0-0-beta-58","aria-hidden":!0,children:(0,t.jsx)("path",{d:"ASC"===e?"M0 8 6 0 12 8":"M0 0 6 8 12 0"})})}({sortDirection:e}),function({priority:e}){return e}({priority:r})]})}var en=(0,r.memo)(function({column:e,colSpan:r,row:n,rowIdx:i,isCellSelected:o,selectCell:a}){let{tabIndex:s,childTabIndex:l,onFocus:u}=j(o),{summaryCellClass:c}=e,d=v(e,"s8wc6fl7-0-0-beta-58","function"==typeof c?c(n):c);return(0,t.jsx)("div",{role:"gridcell","aria-colindex":e.idx+1,"aria-colspan":r,"aria-selected":o,tabIndex:s,className:d,style:g(e,r),onMouseDown:function(){a({rowIdx:i,idx:e.idx})},onFocus:u,children:e.renderSummaryCell?.({column:e,row:n,tabIndex:l})})}),ei=(0,r.memo)(function({rowIdx:e,gridRowStart:r,row:n,viewportColumns:o,top:a,bottom:s,lastFrozenColumnIndex:l,selectedCellIdx:u,isTop:c,selectCell:d,"aria-rowindex":h}){let p=[];for(let r=0;r<o.length;r++){let a=o[r],s=i(a,l,{type:"SUMMARY",row:n});void 0!==s&&(r+=s-1);let c=u===a.idx;p.push((0,t.jsx)(en,{column:a,colSpan:s,row:n,rowIdx:e,isCellSelected:c,selectCell:d},a.key))}return(0,t.jsx)("div",{role:"row","aria-rowindex":h,className:m(K,`rdg-row-${e%2==0?"even":"odd"}`,"rdg-summary-row skuhp557-0-0-beta-58",{[Y]:-1===u,"rdg-top-summary-row tf8l5ub7-0-0-beta-58":c,"rdg-bottom-summary-row":!c}),style:{...f(r),"--rdg-summary-row-top":void 0!==a?`${a}px`:void 0,"--rdg-summary-row-bottom":void 0!==s?`${s}px`:void 0},children:p})});function eo(e){let{ref:o,columns:h,rows:f,topSummaryRows:p,bottomSummaryRows:v,rowKeyGetter:S,onRowsChange:T,rowHeight:L,headerRowHeight:j,summaryRowHeight:z,columnWidths:H,onColumnWidthsChange:U,selectedRows:$,isRowSelectionDisabled:q,onSelectedRowsChange:G,sortColumns:K,onSortColumnsChange:Y,defaultColumnOptions:X,onCellMouseDown:J,onCellClick:en,onCellDoubleClick:eo,onCellContextMenu:el,onCellKeyDown:eu,onSelectedCellChange:ec,onScroll:ed,onColumnResize:eh,onColumnsReorder:ef,onFill:ep,onCellCopy:eg,onCellPaste:em,enableVirtualization:ev,renderers:eb,className:ey,style:ex,rowClass:ew,headerRowClass:e_,direction:eC,role:ek,"aria-label":eS,"aria-labelledby":eE,"aria-description":eO,"aria-describedby":eI,"aria-rowcount":eP,"data-testid":eT,"data-cy":eR}=e,eA=P(),eM=ek??"grid",eN=L??35,eD=j??("number"==typeof eN?eN:35),eL=z??("number"==typeof eN?eN:35),eV=eb?.renderRow??eA?.renderRow??ee,eF=eb?.renderCell??eA?.renderCell??B,ej=eb?.renderSortStatus??eA?.renderSortStatus??er,ez=eb?.renderCheckbox??eA?.renderCheckbox??E,eB=eb?.noRowsFallback??eA?.noRowsFallback,eH=ev??!0,eW=eC??"ltr",[eU,e$]=(0,r.useState)(0),[eq,eG]=(0,r.useState)(0),[eK,eY]=(0,r.useState)(()=>H??new Map),[eX,eQ]=(0,r.useState)(!1),[eZ,eJ]=(0,r.useState)(!1),[e0,e1]=(0,r.useState)(void 0),[e2,e5]=(0,r.useState)(null),[e3,e4]=(0,r.useState)(!1),[e6,e8]=(0,r.useState)(-1),e7=null!=H&&null!=U&&!eX,e9=e7?H:eK,te=e7?e=>{eY(e),U(e)}:eY,tt=(0,r.useCallback)(e=>e9.get(e.key)?.width??e.width,[e9]),[tr,tn,ti,to]=function(){let e=(0,r.useRef)(null),[t,i]=(0,r.useState)(1),[o,a]=(0,r.useState)(1),[s,l]=(0,r.useState)(0);return(0,r.useLayoutEffect)(()=>{let{ResizeObserver:t}=window;if(null==t)return;let{clientWidth:r,clientHeight:o,offsetWidth:s,offsetHeight:u}=e.current,{width:c,height:d}=e.current.getBoundingClientRect(),h=u-o;i(c-s+r),a(d-h),l(h);let f=new t(t=>{let r=t[0].contentBoxSize[0],{clientHeight:o,offsetHeight:s}=e.current;(0,n.flushSync)(()=>{i(r.inlineSize),a(r.blockSize),l(s-o)})});return f.observe(e.current),()=>{f.disconnect()}},[]),[e,t,o,s]}(),{columns:ta,colSpanColumns:ts,lastFrozenColumnIndex:tl,headerRowsCount:tu,colOverscanStartIdx:tc,colOverscanEndIdx:td,templateColumns:th,layoutCssVars:tf,totalFrozenColumnWidth:tp}=function({rawColumns:e,defaultColumnOptions:t,getColumnWidth:n,viewportWidth:i,scrollLeft:o,enableVirtualization:a}){let s=t?.width??"auto",l=t?.minWidth??50,u=t?.maxWidth??void 0,c=t?.renderCell??O,d=t?.renderHeaderCell??D,h=t?.sortable??!1,f=t?.resizable??!1,p=t?.draggable??!1,{columns:g,colSpanColumns:m,lastFrozenColumnIndex:v,headerRowsCount:x}=(0,r.useMemo)(()=>{let t=-1,r=1,n=[];!function e(i,o,a){for(let g of i){if("children"in g){let t={name:g.name,parent:a,idx:-1,colSpan:0,level:0,headerCellClass:g.headerCellClass};e(g.children,o+1,t);continue}let i=g.frozen??!1,m={...g,parent:a,idx:0,level:0,frozen:i,width:g.width??s,minWidth:g.minWidth??l,maxWidth:g.maxWidth??u,sortable:g.sortable??h,resizable:g.resizable??f,draggable:g.draggable??p,renderCell:g.renderCell??c,renderHeaderCell:g.renderHeaderCell??d};n.push(m),i&&t++,o>r&&(r=o)}}(e,1),n.sort(({key:e,frozen:t},{key:r,frozen:n})=>e===N?-1:r===N?1:t?n?0:-1:+!!n);let i=[];return n.forEach((e,t)=>{e.idx=t,function e(t,r,n){if(n<t.level&&(t.level=n),void 0!==t.parent){let{parent:i}=t;-1===i.idx&&(i.idx=r),i.colSpan+=1,e(i,r,n-1)}}(e,t,0),null!=e.colSpan&&i.push(e)}),{columns:n,colSpanColumns:i,lastFrozenColumnIndex:t,headerRowsCount:r}},[e,s,l,u,c,d,f,h,p]),{templateColumns:w,layoutCssVars:_,totalFrozenColumnWidth:C,columnMetrics:S}=(0,r.useMemo)(()=>{let e=new Map,t=0,r=0,i=[];for(let r of g){let o=n(r);o="number"==typeof o?k(o,r):r.minWidth,i.push(`${o}px`),e.set(r,{width:o,left:t}),t+=o}if(-1!==v){let t=e.get(g[v]);r=t.left+t.width}let o={};for(let t=0;t<=v;t++){let r=g[t];o[`--rdg-frozen-left-${r.idx}`]=`${e.get(r).left}px`}return{templateColumns:i,layoutCssVars:o,totalFrozenColumnWidth:r,columnMetrics:e}},[n,g,v]),[E,I]=(0,r.useMemo)(()=>{if(!a)return[0,g.length-1];let e=o+C,t=o+i,r=g.length-1,n=b(v+1,r);if(e>=t)return[n,n];let s=n;for(;s<r;){let{left:t,width:r}=S.get(g[s]);if(t+r>e)break;s++}let l=s;for(;l<r;){let{left:e,width:r}=S.get(g[l]);if(e+r>=t)break;l++}return[y(n,s-1),b(r,l+1)]},[S,g,v,o,C,i,a]);return{columns:g,colSpanColumns:m,colOverscanStartIdx:E,colOverscanEndIdx:I,templateColumns:w,layoutCssVars:_,headerRowsCount:x,lastFrozenColumnIndex:v,totalFrozenColumnWidth:C}}({rawColumns:h,defaultColumnOptions:X,getColumnWidth:tt,scrollLeft:eq,viewportWidth:tn,enableVirtualization:eH}),tg=p?.length??0,tm=v?.length??0,tv=tg+tm,tb=tu+tg,ty=tu-1,tx=-tb,tw=tx+ty,t_=f.length+tm-1,[tC,tk]=(0,r.useState)(()=>({idx:-1,rowIdx:tx-1,mode:"SELECT"})),tS=(0,r.useRef)(null),tE="treegrid"===eM,tO=tu*eD,tI=tv*eL,tP=ti-tO-tI,tT=null!=$&&null!=G,{leftKey:tR,rightKey:tA}=c(eW),tM=eP??tu+f.length+tv,tN=(0,r.useMemo)(()=>({renderCheckbox:ez,renderSortStatus:ej,renderCell:eF}),[ez,ej,eF]),tD=(0,r.useMemo)(()=>{let e=!1,t=!1;if(null!=S&&null!=$&&$.size>0){for(let r of f)if($.has(S(r))?e=!0:t=!0,e&&t)break}return{isRowSelected:e&&!t,isIndeterminate:e&&t}},[f,$,S]),{rowOverscanStartIdx:tL,rowOverscanEndIdx:tV,totalRowHeight:tF,gridTemplateRows:tj,getRowTop:tz,getRowHeight:tB,findRowIdx:tH}=function({rows:e,rowHeight:t,clientHeight:n,scrollTop:i,enableVirtualization:o}){let{totalRowHeight:a,gridTemplateRows:s,getRowTop:l,getRowHeight:u,findRowIdx:c}=(0,r.useMemo)(()=>{if("number"==typeof t)return{totalRowHeight:t*e.length,gridTemplateRows:` repeat(${e.length}, ${t}px)`,getRowTop:e=>e*t,getRowHeight:()=>t,findRowIdx:e=>x(e/t)};let r=0,n="",i=null,o=0,a=e.map((a,s)=>{let l=t(a),u={top:r,height:l};return r+=l,null===i?(i=l,o=1):i===l?o++:(o>1?n+=`repeat(${o}, ${i}px) `:n+=`${i}px `,i=l,o=1),s===e.length-1&&(o>1?n+=`repeat(${o}, ${i}px)`:n+=`${i}px`),u}),s=t=>y(0,b(e.length-1,t));return{totalRowHeight:r,gridTemplateRows:n,getRowTop:e=>a[s(e)].top,getRowHeight:e=>a[s(e)].height,findRowIdx(e){let t=0,r=a.length-1;for(;t<=r;){let n=t+x((r-t)/2),i=a[n].top;if(i===e)return n;if(i<e?t=n+1:i>e&&(r=n-1),t>r)return r}return 0}}},[t,e]),d=0,h=e.length-1;if(o){let t=c(i),r=c(i+n);d=y(0,t-4),h=b(e.length-1,r+4)}return{rowOverscanStartIdx:d,rowOverscanEndIdx:h,totalRowHeight:a,gridTemplateRows:s,getRowTop:l,getRowHeight:u,findRowIdx:c}}({rows:f,rowHeight:eN,clientHeight:tP,scrollTop:eU,enableVirtualization:eH}),tW=function({columns:e,colSpanColumns:t,rows:n,topSummaryRows:o,bottomSummaryRows:a,colOverscanStartIdx:s,colOverscanEndIdx:l,lastFrozenColumnIndex:u,rowOverscanStartIdx:c,rowOverscanEndIdx:d}){let h=(0,r.useMemo)(()=>{if(0===s)return 0;let e=s,r=(t,r)=>void 0!==r&&t+r>s&&(e=t,!0);for(let s of t){let t=s.idx;if(t>=e||r(t,i(s,u,{type:"HEADER"})))break;for(let e=c;e<=d&&!r(t,i(s,u,{type:"ROW",row:n[e]}));e++);if(null!=o){for(let e of o)if(r(t,i(s,u,{type:"SUMMARY",row:e})))break}if(null!=a){for(let e of a)if(r(t,i(s,u,{type:"SUMMARY",row:e})))break}}return e},[c,d,n,o,a,s,u,t]);return(0,r.useMemo)(()=>{let t=[];for(let r=0;r<=l;r++){let n=e[r];(!(r<h)||n.frozen)&&t.push(n)}return t},[h,l,e])}({columns:ta,colSpanColumns:ts,colOverscanStartIdx:tc,colOverscanEndIdx:td,lastFrozenColumnIndex:tl,rowOverscanStartIdx:tL,rowOverscanEndIdx:tV,rows:f,topSummaryRows:p,bottomSummaryRows:v}),{gridTemplateColumns:tU,handleColumnResize:t$}=function(e,t,i,o,a,s,l,u,c){let[d,h]=(0,r.useState)(null),[f,p]=(0,r.useState)(null),[g,m]=(0,r.useState)(a),v=e.length===t.length,b=v&&a!==g,y=[...i],x=[];for(let{key:e,idx:r,width:n}of t){let t=s.get(e);e===d?.key?(y[r]="max-content"===d.width?d.width:`${d.width}px`,x.push(e)):"string"==typeof n&&t?.type!=="resized"&&(b||f?.has(e)===!0||void 0===t)&&(y[r]=n,x.push(e))}let w=y.join(" ");return(0,r.useLayoutEffect)(function(){if(m(a),0===x.length)return;let e=new Map(s),t=!1;for(let r of x){let n=V(o,r);t||=n!==s.get(r)?.width,void 0===n?e.delete(r):e.set(r,{type:"measured",width:n})}if(null!==d){let r=d.key,n=s.get(r)?.width,i=V(o,r);void 0!==i&&n!==i&&(t=!0,e.set(r,{type:"resized",width:i})),h(null)}t&&l(e)}),{gridTemplateColumns:w,handleColumnResize:function(e,r){let{key:i}=e;if((0,n.flushSync)(()=>{if(v){let e=new Set;for(let{key:r,width:n}of t)i!==r&&"string"==typeof n&&s.get(r)?.type!=="resized"&&e.add(r);p(e)}h({key:i,width:r}),c("number"==typeof r)}),p(null),u){let t=s.get(i)?.width,n="number"==typeof r?r:V(o,i);void 0!==n&&n!==t&&u(e,n)}}}}(ta,tW,th,tr,tn,e9,te,eh,eQ),tq=tE?-1:0,tG=ta.length-1,tK=rd(tC),tY=rh(tC),tX=eD+tF+tI+to,tQ=F(t$),tZ=F(function(){eX&&(U?.(e9),eQ(!1))}),tJ=F(ef),t0=F(Y),t1=F(J),t2=F(en),t5=F(eo),t3=F(el),t4=F(function(e){if(!G)return;C(S);let t=new Set($);for(let r of f){if(q?.(r)===!0)continue;let n=S(r);e.checked?t.add(n):t.delete(n)}G(t)}),t6=F(rt),t8=F(rr),t7=F(rp),t9=F(function({idx:e,rowIdx:t}){rp({rowIdx:tx+t-1,idx:e})}),re=(0,r.useCallback)((e=!0)=>{let t=ea(tr.current);null!==t&&(e&&a(t),t.focus({preventScroll:!0}))},[tr]);function rt(e){if(!G)return;C(S);let{row:t,checked:r,isShiftClick:n}=e;if(q?.(t)===!0)return;let i=new Set($),o=S(t),a=f.indexOf(t);if(e8(a),r?i.add(o):i.delete(o),n&&-1!==e6&&e6!==a&&e6<f.length){let e=w(a-e6);for(let t=e6+e;t!==a;t+=e){let e=f[t];q?.(e)!==!0&&(r?i.add(S(e)):i.delete(S(e)))}}G(i)}function rr(e,t,r){"function"!=typeof T||r===f[t]||T(f.with(t,r),{indexes:[t],column:e})}function rn(){"EDIT"===tC.mode&&rr(ta[tC.idx],tC.rowIdx,tC.row)}function ri(e){e.preventDefault(),("mouse"!==e.pointerType||1===e.buttons)&&(eJ(!0),e.currentTarget.setPointerCapture(e.pointerId))}function ro(e){let t=tr.current,r=tH(eU-(tO+tg*eL)+e.clientY-t.getBoundingClientRect().top);e1(r),a(t.querySelector(`:scope > [aria-rowindex="${tb+r+1}"] > [aria-colindex="${tC.idx+1}"]`))}function ra(){if(eJ(!1),void 0===e0)return;let{rowIdx:e}=tC,[t,r]=e<e0?[e+1,e0+1]:[e0,e];ru(t,r),e1(void 0)}function rs(){re(!1)}function rl(e){e.stopPropagation(),ru(tC.rowIdx+1,f.length)}function ru(e,t){if(null==T)return;let{rowIdx:r,idx:n}=tC,i=ta[n],o=f[r],a=[...f],s=[];for(let r=e;r<t;r++)if(rf({rowIdx:r,idx:n})){let e=ep({columnKey:i.key,sourceRow:o,targetRow:f[r]});e!==f[r]&&(a[r]=e,s.push(r))}s.length>0&&T(a,{indexes:s,column:i})}(0,r.useLayoutEffect)(()=>{e3&&(null!==tS.current&&-1===tC.idx?(tS.current.focus({preventScroll:!0}),a(tS.current)):re(),e4(!1))},[e3,re,tC.idx]),(0,r.useImperativeHandle)(o,()=>({element:tr.current,scrollToCell({idx:e,rowIdx:t}){let r=void 0!==e&&e>tl&&e<ta.length?e:void 0,n=void 0!==t&&rc(t)?t:void 0;(void 0!==r||void 0!==n)&&e5({idx:r,rowIdx:n})},selectCell:rp}));function rc(e){return e>=0&&e<f.length}function rd({idx:e,rowIdx:t}){var r;return t>=tx&&t<=t_&&(r=e)>=tq&&r<=tG}function rh({idx:e,rowIdx:t}){var r;return rc(t)&&(r=e)>=tq&&r<=tG}function rf(e){return function({idx:e,rowIdx:t}){return rc(t)&&e>=0&&e<=tG}(e)&&function({selectedPosition:e,columns:t,rows:r}){return d(t[e.idx],r[e.rowIdx])}({columns:ta,rows:f,selectedPosition:e})}function rp(e,t){if(!rd(e))return;rn();let r=es(tC,e);if(t?.enableEditor&&rf(e)){let t=f[e.rowIdx];tk({...e,mode:"EDIT",row:t,originalRow:t})}else r?a(ea(tr.current)):(e4(t?.shouldFocusCell===!0),tk({...e,mode:"SELECT"}));ec&&!r&&ec({rowIdx:e.rowIdx,row:rc(e.rowIdx)?f[e.rowIdx]:void 0,column:ta[e.idx]})}function rg(e){let{key:t,shiftKey:r}=e,n="NONE";if("Tab"===t){if(function({maxColIdx:e,minRowIdx:t,maxRowIdx:r,selectedPosition:{rowIdx:n,idx:i},shiftKey:o}){return o?0===i&&n===t:i===e&&n===r}({shiftKey:r,maxColIdx:tG,minRowIdx:tx,maxRowIdx:t_,selectedPosition:tC}))return void rn();n="CHANGE_ROW"}e.preventDefault();let o=function(e,t,r){let{idx:n,rowIdx:i}=tC,o=tK&&-1===n;switch(e){case"ArrowUp":return{idx:n,rowIdx:i-1};case"ArrowDown":return{idx:n,rowIdx:i+1};case tR:return{idx:n-1,rowIdx:i};case tA:return{idx:n+1,rowIdx:i};case"Tab":return{idx:n+(r?-1:1),rowIdx:i};case"Home":if(o)return{idx:n,rowIdx:tx};return{idx:0,rowIdx:t?tx:i};case"End":if(o)return{idx:n,rowIdx:t_};return{idx:tG,rowIdx:t?t_:i};case"PageUp":{if(tC.rowIdx===tx)return tC;let e=tz(i)+tB(i)-tP;return{idx:n,rowIdx:e>0?tH(e):0}}case"PageDown":{if(tC.rowIdx>=f.length)return tC;let e=tz(i)+tP;return{idx:n,rowIdx:e<tF?tH(e):f.length-1}}default:return tC}}(t,u(e),r);if(es(tC,o))return;let a=function({moveUp:e,moveNext:t,cellNavigationMode:r,columns:n,colSpanColumns:o,rows:a,topSummaryRows:s,bottomSummaryRows:l,minRowIdx:u,mainHeaderRowIdx:c,maxRowIdx:d,currentPosition:{idx:h,rowIdx:f},nextPosition:p,lastFrozenColumnIndex:g,isCellWithinBounds:m}){let{idx:v,rowIdx:b}=p,y=n.length,x=e=>{for(let t of o){let r=t.idx;if(r>v)break;let n=function({rows:e,topSummaryRows:t,bottomSummaryRows:r,rowIdx:n,mainHeaderRowIdx:o,lastFrozenColumnIndex:a,column:s}){let l=t?.length??0;return n===o?i(s,a,{type:"HEADER"}):t&&n>o&&n<=l+o?i(s,a,{type:"SUMMARY",row:t[n+l]}):n>=0&&n<e.length?i(s,a,{type:"ROW",row:e[n]}):r?i(s,a,{type:"SUMMARY",row:r[n-e.length]}):void 0}({rows:a,topSummaryRows:s,bottomSummaryRows:l,rowIdx:b,mainHeaderRowIdx:c,lastFrozenColumnIndex:g,column:t});if(n&&v>r&&v<n+r){v=r+(e?n:0);break}}},w=e=>e.level+c;if(m(p)&&(x(t),b<c&&(()=>{if(t){let e=n[v].parent;for(;void 0!==e;){let t=w(e);if(b===t){v=e.idx+e.colSpan;break}e=e.parent}}else if(e){let e=n[v].parent,t=!1;for(;void 0!==e;){let r=w(e);if(b>=r){v=e.idx,b=r,t=!0;break}e=e.parent}t||(v=h,b=f)}})()),"CHANGE_ROW"===r){let e=v===y,t=-1===v;e?b!==d&&(v=0,b+=1):t&&(b!==u&&(b-=1,v=y-1),x(!1))}if(b<c&&v>-1&&v<y){let e=n[v].parent,t=b;for(b=c;void 0!==e;){let r=w(e);r>=t&&(b=r,v=e.idx),e=e.parent}}return{idx:v,rowIdx:b}}({moveUp:"ArrowUp"===t,moveNext:t===tA||"Tab"===t&&!r,columns:ta,colSpanColumns:ts,rows:f,topSummaryRows:p,bottomSummaryRows:v,minRowIdx:tx,mainHeaderRowIdx:tw,maxRowIdx:t_,lastFrozenColumnIndex:tl,cellNavigationMode:n,currentPosition:tC,nextPosition:o,isCellWithinBounds:rd});rp(a,{shouldFocusCell:!0})}function rm(e){let t=-1===tC.idx?void 0:ta[tC.idx];return void 0===t||tC.rowIdx!==e||tW.includes(t)?tW:tC.idx>td?[...tW,t]:[...tW.slice(0,tl+1),t,...tW.slice(tl+1)]}(tC.idx>tG||tC.rowIdx>t_)&&(tk({idx:-1,rowIdx:tx-1,mode:"SELECT"}),e1(void 0)),e7&&eK!==H&&eY(H);let rv=`repeat(${tu}, ${eD}px)`;tg>0&&(rv+=` repeat(${tg}, ${eL}px)`),f.length>0&&(rv+=tj),tm>0&&(rv+=` repeat(${tm}, ${eL}px)`);let rb=-1===tC.idx&&tC.rowIdx!==tx-1;return(0,t.jsxs)("div",{role:eM,"aria-label":eS,"aria-labelledby":eE,"aria-description":eO,"aria-describedby":eI,"aria-multiselectable":!!tT||void 0,"aria-colcount":ta.length,"aria-rowcount":tM,tabIndex:-1,className:m("rdg rnvodz57-0-0-beta-58",{"rdg-viewport-dragging vlqv91k7-0-0-beta-58":eZ},ey),style:{...ex,scrollPaddingInlineStart:tC.idx>tl||e2?.idx!==void 0?`${tp}px`:void 0,scrollPaddingBlock:rc(tC.rowIdx)||e2?.rowIdx!==void 0?`${tO+tg*eL}px ${tm*eL}px`:void 0,gridTemplateColumns:tU,gridTemplateRows:rv,"--rdg-header-row-height":`${eD}px`,"--rdg-scroll-height":`${tX}px`,...tf},dir:eW,ref:tr,onScroll:function(e){let{scrollTop:t,scrollLeft:r}=e.currentTarget;(0,n.flushSync)(()=>{e$(t),eG(_(r))}),ed?.(e)},onKeyDown:function(e){let{idx:t,rowIdx:r,mode:n}=tC;if("EDIT"===n)return;if(eu&&rc(r)){let n=f[r],i=s(e);if(eu({mode:"SELECT",row:n,column:ta[t],rowIdx:r,selectCell:rp},i),i.isGridDefaultPrevented())return}if(!(e.target instanceof Element))return;let i=null!==e.target.closest(".rdg-cell"),o=tE&&e.target===tS.current;if(i||o)switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Tab":case"Home":case"End":case"PageUp":case"PageDown":rg(e);break;default:!function(e){var t;if(!tY)return;let r=f[tC.rowIdx],{key:n,shiftKey:i}=e;if(tT&&i&&" "===n){C(S);let t=S(r);rt({row:r,checked:!$.has(t),isShiftClick:!1}),e.preventDefault();return}!rf(tC)||(t=null!=em,u(e)&&(86!==e.keyCode||t)||l.has(e.key))||tk(({idx:e,rowIdx:t})=>({idx:e,rowIdx:t,mode:"EDIT",row:r,originalRow:r}))}(e)}},onCopy:function(e){if(!tY)return;let{idx:t,rowIdx:r}=tC;eg?.({row:f[r],column:ta[t]},e)},onPaste:function(e){if(!em||!T||!rf(tC))return;let{idx:t,rowIdx:r}=tC,n=ta[t],i=em({row:f[r],column:n},e);rr(n,r,i)},"data-testid":eT,"data-cy":eR,children:[(0,t.jsxs)(I,{value:tN,children:[(0,t.jsx)(M,{value:t4,children:(0,t.jsxs)(A,{value:tD,children:[Array.from({length:ty},(e,r)=>(0,t.jsx)(Z,{rowIdx:r+1,level:-ty+r,columns:rm(tx+r),selectedCellIdx:tC.rowIdx===tx+r?tC.idx:void 0,selectCell:t9},r)),(0,t.jsx)(Q,{headerRowClass:e_,rowIdx:tu,columns:rm(tw),onColumnResize:tQ,onColumnResizeEnd:tZ,onColumnsReorder:tJ,sortColumns:K,onSortColumnsChange:t0,lastFrozenColumnIndex:tl,selectedCellIdx:tC.rowIdx===tw?tC.idx:void 0,selectCell:t9,shouldFocusGrid:!tK,direction:eW})]})}),0===f.length&&eB?eB:(0,t.jsxs)(t.Fragment,{children:[p?.map((e,r)=>{let n=tu+1+r,i=tw+1+r,o=tC.rowIdx===i;return(0,t.jsx)(ei,{"aria-rowindex":n,rowIdx:i,gridRowStart:n,row:e,top:tO+eL*r,bottom:void 0,viewportColumns:rm(i),lastFrozenColumnIndex:tl,selectedCellIdx:o?tC.idx:void 0,isTop:!0,selectCell:t7},r)}),(0,t.jsx)(R,{value:t6,children:function(){let e=[],{idx:r,rowIdx:o}=tC,a=tY&&o<tL?tL-1:tL,s=tY&&o>tV?tV+1:tV;for(let l=a;l<=s;l++){let a=l===tL-1||l===tV+1,s=a?o:l,u=tW,c=-1===r?void 0:ta[r];void 0!==c&&(u=a?[c]:rm(s));let d=f[s],h=tb+s+1,p=s,g=!1;"function"==typeof S&&(p=S(d),g=$?.has(p)??!1),e.push(eV(p,{"aria-rowindex":tb+s+1,"aria-selected":tT?g:void 0,rowIdx:s,row:d,viewportColumns:u,isRowSelectionDisabled:q?.(d)??!1,isRowSelected:g,onCellMouseDown:t1,onCellClick:t2,onCellDoubleClick:t5,onCellContextMenu:t3,rowClass:ew,gridRowStart:h,selectedCellIdx:o===s?r:void 0,draggedOverCellIdx:function(e){if(void 0===e0)return;let{rowIdx:t}=tC;return(t<e0?t<e&&e<=e0:t>e&&e>=e0)?tC.idx:void 0}(s),lastFrozenColumnIndex:tl,onRowChange:t8,selectCell:t7,selectedCellEditor:function(e){if(!rh(tC)||tC.rowIdx!==e||"SELECT"===tC.mode)return;let{idx:r,row:o}=tC,a=ta[r],s=i(a,tl,{type:"ROW",row:o}),l=a.editorOptions?.closeOnExternalRowChange??!0,u=e=>{e4(e),tk(({idx:e,rowIdx:t})=>({idx:e,rowIdx:t,mode:"SELECT"}))};return l&&f[tC.rowIdx]!==tC.originalRow&&u(!1),(0,t.jsx)(W,{column:a,colSpan:s,row:o,rowIdx:e,onRowChange:(e,t,r)=>{t?(0,n.flushSync)(()=>{rr(a,tC.rowIdx,e),u(r)}):tk(t=>({...t,row:e}))},closeEditor:u,onKeyDown:eu,navigate:rg},a.key)}(s)}))}return e}()}),v?.map((e,r)=>{let n=tb+f.length+r+1,i=f.length+r,o=tC.rowIdx===i,a=tP>tF?ti-eL*(v.length-r):void 0,s=void 0===a?eL*(v.length-1-r):void 0;return(0,t.jsx)(ei,{"aria-rowindex":tM-tm+r+1,rowIdx:i,gridRowStart:n,row:e,top:a,bottom:s,viewportColumns:rm(i),lastFrozenColumnIndex:tl,selectedCellIdx:o?tC.idx:void 0,isTop:!1,selectCell:t7},r)})]})]}),function(){if(null==ep||"EDIT"===tC.mode||!rh(tC))return;let{idx:e,rowIdx:r}=tC,n=ta[e];if(null==n.renderEditCell||!1===n.editable)return;let i=r===t_,o=tt(n),a=n.colSpan?.({type:"ROW",row:f[r]})??1,{insetInlineStart:s,...l}=g(n,a),u="calc(var(--rdg-drag-handle-size) * -0.5 + 1px)",c=n.idx+a-1===tG,d={...l,gridRowStart:tb+r+1,marginInlineEnd:c?void 0:u,marginBlockEnd:i?void 0:u,insetInlineStart:s?`calc(${s} + ${o}px + var(--rdg-drag-handle-size) * -0.5 - 1px)`:void 0};return(0,t.jsx)("div",{style:d,className:m("rdg-cell-drag-handle ch2wcw87-0-0-beta-58",n.frozen&&"c1wvphzh7-0-0-beta-58"),onPointerDown:ri,onPointerMove:eZ?ro:void 0,onLostPointerCapture:eZ?ra:void 0,onClick:rs,onDoubleClick:rl})}(),tW.map(({key:e,idx:r,minWidth:n,maxWidth:i})=>(0,t.jsx)("div",{className:"mlln6zg7-0-0-beta-58",style:{gridColumnStart:r+1,minWidth:n,maxWidth:i},"data-measuring-cell-key":e},e)),tE&&(0,t.jsx)("div",{ref:tS,tabIndex:rb?0:-1,className:m("f1lsfrzw7-0-0-beta-58",{"f1cte0lg7-0-0-beta-58":!rc(tC.rowIdx),"r190mhd37-0-0-beta-58":rb,"r139qu9m7-0-0-beta-58":rb&&-1!==tl}),style:{gridRowStart:tC.rowIdx+tb+1}}),null!==e2&&(0,t.jsx)(et,{scrollToPosition:e2,setScrollToCellPosition:e5,gridRef:tr})]})}function ea(e){return e.querySelector(':scope > [role="row"] > [tabindex="0"]')}function es(e,t){return e.idx===t.idx&&e.rowIdx===t.rowIdx}var el=(0,r.memo)(function({id:e,groupKey:r,childRows:n,isExpanded:i,isCellSelected:o,column:a,row:s,groupColumnIndex:l,isGroupByColumn:u,toggleGroup:c}){let{tabIndex:d,childTabIndex:h,onFocus:f}=j(o);function p(){c(e)}let m=u&&l===a.idx;return(0,t.jsx)("div",{role:"gridcell","aria-colindex":a.idx+1,"aria-selected":o,tabIndex:d,className:v(a),style:{...g(a),cursor:m?"pointer":"default"},onMouseDown:e=>{e.preventDefault()},onClick:m?p:void 0,onFocus:f,children:(!u||m)&&a.renderGroupCell?.({groupKey:r,childRows:n,column:a,row:s,isExpanded:i,tabIndex:h,toggleGroup:p})},a.key)});(0,r.memo)(function({className:e,row:n,rowIdx:i,viewportColumns:o,selectedCellIdx:a,isRowSelected:s,selectCell:l,gridRowStart:u,groupBy:c,toggleGroup:d,isRowSelectionDisabled:h,...p}){let g=o[0].key===N?n.level+1:n.level,v=(0,r.useMemo)(()=>({isRowSelectionDisabled:!1,isRowSelected:s}),[s]);return(0,t.jsx)(T,{value:v,children:(0,t.jsx)("div",{role:"row","aria-level":n.level+1,"aria-setsize":n.setSize,"aria-posinset":n.posInSet+1,"aria-expanded":n.isExpanded,className:m(K,"rdg-group-row g1yxluv37-0-0-beta-58",`rdg-row-${i%2==0?"even":"odd"}`,-1===a&&Y,e),onMouseDown:function(){l({rowIdx:i,idx:-1},{shouldFocusCell:!0})},style:f(u),...p,children:o.map(e=>(0,t.jsx)(el,{id:n.id,groupKey:n.groupKey,childRows:n.childRows,isExpanded:n.isExpanded,isCellSelected:a===e.idx,column:e,row:n,groupColumnIndex:g,toggleGroup:d,isGroupByColumn:c.includes(e.key)},e.key))})})});function eu(e){e?.focus(),e?.select()}function ec({row:e,column:r,onRowChange:n,onClose:i}){return(0,t.jsx)("input",{className:"rdg-text-editor t7vyx3i7-0-0-beta-58",ref:eu,value:e[r.key],onChange:t=>n({...e,[r.key]:t.target.value}),onBlur:()=>i(!0,!1)})}e.s(["DataGrid",()=>eo,"textEditor",()=>ec],1484);var ed=e.i(42436),eh=e.i(23331);let ef=(0,r.forwardRef)(({...e},r)=>(0,t.jsx)(eo,{ref:r,className:e.className?e.className+" no-track-pii-safe":"no-track-pii-safe",rowClass:()=>"no-track-pii-safe",...e}));function ep({emptyMessage:e}){return(0,t.jsx)(ed.Flex,{h:"35px",alignItems:"center",justifyContent:"center",bg:"gray.100",style:{textAlign:"center",gridColumn:"1/-1"},children:(0,t.jsxs)(eh.Text,{fontWeight:"600",children:[" ",e??"No rows"]})})}e.s(["EmptyRowsRenderer",()=>ep,"ScreenshotDataGrid",0,ef],62234)},81096,69113,87219,64513,75651,73383,88239,18966,87418,16529,25740,88507,33134,69104,25398,11662,41803,3791,33977,63590,47045,e=>{"use strict";e.s([],81096),e.s([],69113);var t=e.i(15839),r=e.i(52713),n=e.i(64789),i=e.i(63761),o=e.i(39414);let[a,s]=(0,o.createContext)({name:"MenuContext",hookName:"useMenuContext",providerName:"<MenuProvider />",strict:!1});e.s(["MenuProvider",()=>a,"useMenuContext",()=>s],87219);let l=(0,n.forwardRef)((e,n)=>{let o=s(),a=(0,r.mergeProps)(o.getArrowProps(),e);return(0,t.jsx)(i.ark.div,{...a,ref:n})});l.displayName="MenuArrow",e.s(["MenuArrow",()=>l],64513);let u=(0,n.forwardRef)((e,n)=>{let o=s(),a=(0,r.mergeProps)(o.getArrowTipProps(),e);return(0,t.jsx)(i.ark.div,{...a,ref:n})});u.displayName="MenuArrowTip",e.s(["MenuArrowTip",()=>u],75651);var c=e.i(46067);let[d,h]=(0,o.createContext)({name:"MenuItemContext",hookName:"useMenuItemContext",providerName:"<MenuItemProvider />"}),[f,p]=(0,o.createContext)({name:"MenuItemPropsContext",hookName:"useMenuItemPropsContext",providerName:"<MenuItemPropsProvider />"});e.s(["MenuItemPropsProvider",()=>f,"useMenuItemPropsContext",()=>p],73383);let g=(0,n.forwardRef)((e,n)=>{let[o,a]=(0,c.createSplitProps)()(e,["checked","closeOnSelect","disabled","onCheckedChange","value","valueText"]),l={...o,type:"checkbox"},u=s(),h=(0,r.mergeProps)(u.getOptionItemProps(l),a),p=u.getOptionItemState(l);return(0,t.jsx)(f,{value:l,children:(0,t.jsx)(d,{value:p,children:(0,t.jsx)(i.ark.div,{...h,ref:n})})})});g.displayName="MenuCheckboxItem",e.s(["MenuCheckboxItem",()=>g],88239);var m=e.i(24074),v=e.i(96733);let b=(0,n.forwardRef)((e,n)=>{let o=s(),a=(0,v.usePresenceContext)(),l=(0,r.mergeProps)(o.getContentProps(),a.getPresenceProps(),e);return a.unmounted?null:(0,t.jsx)(i.ark.div,{...l,ref:(0,m.composeRefs)(a.ref,n)})});b.displayName="MenuContent",e.s(["MenuContent",()=>b],18966);let y=e=>e.children(s());e.s(["MenuContext",()=>y],87418);let x=(0,n.forwardRef)((e,n)=>{let o=s(),a=(0,r.mergeProps)(o.getContextTriggerProps(),e);return(0,t.jsx)(i.ark.button,{...a,ref:n})});x.displayName="MenuContextTrigger",e.s(["MenuContextTrigger",()=>x],16529);let w=(0,n.forwardRef)((e,n)=>{let o=s(),a=(0,r.mergeProps)(o.getIndicatorProps(),e);return(0,t.jsx)(i.ark.div,{...a,ref:n})});w.displayName="MenuIndicator",e.s(["MenuIndicator",()=>w],25740);let _=(0,n.forwardRef)((e,o)=>{let[a,l]=(0,c.createSplitProps)()(e,["closeOnSelect","disabled","value","valueText","onSelect"]),u=s(),h=(0,r.mergeProps)(u.getItemProps(a),l),p=u.getItemState(a);return(0,n.useEffect)(()=>u.addItemListener({id:p.id,onSelect:a.onSelect}),[p.id,a.onSelect]),(0,t.jsx)(f,{value:a,children:(0,t.jsx)(d,{value:p,children:(0,t.jsx)(i.ark.div,{...h,ref:o})})})});_.displayName="MenuItem",e.s(["MenuItem",()=>_],88507);let C=e=>e.children(h());e.s(["MenuItemContext",()=>C],33134);let[k,S]=(0,o.createContext)({name:"MenuItemGroupContext",hookName:"useMenuItemGroupContext",providerName:"<MenuItemGroupProvider />"}),E=(0,n.forwardRef)((e,o)=>{let[a,l]=(0,c.createSplitProps)()(e,["id"]),u=s(),d={id:(0,n.useId)(),...a},h=(0,r.mergeProps)(u.getItemGroupProps(d),l);return(0,t.jsx)(k,{value:d,children:(0,t.jsx)(i.ark.div,{...h,ref:o})})});E.displayName="MenuItemGroup",e.s(["MenuItemGroup",()=>E],69104);let O=(0,n.forwardRef)((e,n)=>{let o=s(),a=S(),l=(0,r.mergeProps)(o.getItemGroupLabelProps({htmlFor:a.id}),e);return(0,t.jsx)(i.ark.div,{...l,ref:n})});O.displayName="MenuItemGroupLabel",e.s(["MenuItemGroupLabel",()=>O],25398);let I=(0,n.forwardRef)((e,n)=>{let o=s(),a=p(),l=(0,r.mergeProps)(o.getItemIndicatorProps(a),e);return(0,t.jsx)(i.ark.div,{...l,ref:n})});I.displayName="MenuItemIndicator",e.s(["MenuItemIndicator",()=>I],11662);let P=(0,n.forwardRef)((e,n)=>{let o=s(),a=p(),l=(0,r.mergeProps)(o.getItemTextProps(a),e);return(0,t.jsx)(i.ark.div,{...l,ref:n})});P.displayName="MenuItemText",e.s(["MenuItemText",()=>P],41803);let T=(0,n.forwardRef)((e,n)=>{let o=s(),a=(0,r.mergeProps)(o.getPositionerProps(),e);return(0,v.usePresenceContext)().unmounted?null:(0,t.jsx)(i.ark.div,{...a,ref:n})});T.displayName="MenuPositioner",e.s(["MenuPositioner",()=>T],3791);let R=(0,n.forwardRef)((e,n)=>{let[o,a]=(0,c.createSplitProps)()(e,["closeOnSelect","disabled","value","valueText"]),l=s(),u=S(),h={...o,checked:u.value===o.value,type:"radio",onCheckedChange:()=>u.onValueChange?.({value:o.value})},p=(0,r.mergeProps)(l.getOptionItemProps(h),a),g=l.getOptionItemState(h);return(0,t.jsx)(f,{value:h,children:(0,t.jsx)(d,{value:g,children:(0,t.jsx)(i.ark.div,{...p,ref:n})})})});R.displayName="MenuRadioItem",e.s(["MenuRadioItem",()=>R],33977);let A=(0,n.forwardRef)((e,o)=>{let[a,l]=(0,c.createSplitProps)()(e,["id","onValueChange","value"]),u=s(),d={id:(0,n.useId)(),...a},h=(0,r.mergeProps)(u.getItemGroupProps({id:d.id}),l);return(0,t.jsx)(k,{value:d,children:(0,t.jsx)(i.ark.div,{...h,ref:o})})});A.displayName="MenuRadioItemGroup",e.s(["MenuRadioItemGroup",()=>A],63590);let M=e=>{let t=(0,n.useRef)(e),r=(0,n.useRef)(!1);(0,n.useEffect)(()=>{t.current=e}),(0,n.useEffect)(()=>{!0!==r.current&&(r.current=!0,t.current())},[])};e.s(["useEffectOnce",()=>M],47045)},64867,93888,e=>{"use strict";e.i(69113);var t=e.i(64513),r=e.i(75651),n=e.i(88239),i=e.i(18966),o=e.i(87418),a=e.i(16529),s=e.i(25740),l=e.i(88507),u=e.i(33134),c=e.i(69104),d=e.i(25398),h=e.i(11662),f=e.i(41803),p=e.i(3791),g=e.i(33977),m=e.i(63590),v=e.i(15839),b=e.i(52713),y=e.i(64789),x=e.i(46067),w=e.i(47045),_=e.i(98239),C=e.i(67077),k=e.i(96733),S=e.i(94548),E=e.i(92109),O=e.i(10741),I=e.i(58287),P=e.i(56842),T=(e,t)=>({x:e,y:t}),{min:R,max:A}=Math,{sign:M,abs:N,min:D}=Math,L=e.i(92242),V=(0,S.createAnatomy)("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),F=V.build(),j=e=>e.ids?.trigger??`menu:${e.id}:trigger`,z=e=>e.ids?.contextTrigger??`menu:${e.id}:ctx-trigger`,B=e=>e.ids?.content??`menu:${e.id}:content`,H=e=>e.ids?.positioner??`menu:${e.id}:popper`,W=(e,t)=>`${e.id}/${t}`,U=e=>e?.dataset.value??null,$=(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,q=e=>e.getById(B(e)),G=e=>e.getById(H(e)),K=e=>e.getById(j(e)),Y=e=>e.getById(z(e)),X=e=>{let t=CSS.escape(B(e)),r=`[role^="menuitem"][data-ownedby=${t}]:not([data-disabled])`;return(0,E.queryAll)(q(e),r)},Q=(e,t)=>!!t&&(e.id===t||e.dataset.value===t),Z=e=>(0,E.isHTMLElement)(e)&&(""===e.dataset.disabled||e.hasAttribute("disabled")),J="menu:select";function ee(e,t){let{context:r,send:n,state:i,computed:o,prop:a,scope:s}=e,l=i.hasTag("open"),u=r.get("isSubmenu"),c=o("isTypingAhead"),d=a("composite"),h=r.get("currentPlacement"),f=r.get("anchorPoint"),p=r.get("highlightedValue"),g=(0,O.getPlacementStyles)({...a("positioning"),placement:f?"bottom":h});function m(e){return{id:W(s,e.value),disabled:!!e.disabled,highlighted:p===e.value}}function v(e){let t=e.valueText??e.value;return{...e,id:e.value,valueText:t}}function y(e){return{...m(v(e)),checked:!!e.checked}}function x(r){let{closeOnSelect:i,valueText:o,value:a}=r,l=m(r),u=W(s,a);return t.element({...F.item.attrs,id:u,role:"menuitem","aria-disabled":(0,E.ariaAttr)(l.disabled),"data-disabled":(0,E.dataAttr)(l.disabled),"data-ownedby":B(s),"data-highlighted":(0,E.dataAttr)(l.highlighted),"data-value":a,"data-valuetext":o,onDragStart(e){e.currentTarget.matches("a[href]")&&e.preventDefault()},onPointerMove(e){if(l.disabled||"mouse"!==e.pointerType)return;let t=e.currentTarget;l.highlighted||n({type:"ITEM_POINTERMOVE",id:u,target:t,closeOnSelect:i})},onPointerLeave(t){l.disabled||"mouse"!==t.pointerType||!e.event.previous()?.type.includes("POINTER")||n({type:"ITEM_POINTERLEAVE",id:u,target:t.currentTarget,closeOnSelect:i})},onPointerDown(e){l.disabled||n({type:"ITEM_POINTERDOWN",target:e.currentTarget,id:u,closeOnSelect:i})},onClick(e){(0,E.isDownloadingEvent)(e)||(0,E.isOpeningInNewTab)(e)||l.disabled||n({type:"ITEM_CLICK",target:e.currentTarget,id:u,closeOnSelect:i})}})}return{highlightedValue:p,open:l,setOpen(e){i.hasTag("open")!==e&&n({type:e?"OPEN":"CLOSE"})},setHighlightedValue(e){n({type:"HIGHLIGHTED.SET",value:e})},setParent(e){n({type:"PARENT.SET",value:e,id:e.prop("id")})},setChild(e){n({type:"CHILD.SET",value:e,id:e.prop("id")})},reposition(e={}){n({type:"POSITIONING.SET",options:e})},addItemListener(e){let t=s.getById(e.id);if(!t)return;let r=()=>e.onSelect?.();return t.addEventListener(J,r),()=>t.removeEventListener(J,r)},getContextTriggerProps:()=>t.element({...F.contextTrigger.attrs,dir:a("dir"),id:z(s),"data-state":l?"open":"closed",onPointerDown(e){"mouse"===e.pointerType||n({type:"CONTEXT_MENU_START",point:(0,E.getEventPoint)(e)})},onPointerCancel(e){"mouse"!==e.pointerType&&n({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(e){"mouse"!==e.pointerType&&n({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(e){"mouse"!==e.pointerType&&n({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(e){n({type:"CONTEXT_MENU",point:(0,E.getEventPoint)(e)}),e.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}}),getTriggerItemProps(e){let t=e.getTriggerProps();return(0,b.mergeProps)(x({value:t.id}),t)},getTriggerProps:()=>t.button({...u?F.triggerItem.attrs:F.trigger.attrs,"data-placement":r.get("currentPlacement"),type:"button",dir:a("dir"),id:j(s),"data-uid":a("id"),"aria-haspopup":d?"menu":"dialog","aria-controls":B(s),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(e){if("mouse"!==e.pointerType||Z(e.currentTarget)||!u)return;let t=(0,E.getEventPoint)(e);n({type:"TRIGGER_POINTERMOVE",target:e.currentTarget,point:t})},onPointerLeave(e){if(Z(e.currentTarget)||"mouse"!==e.pointerType||!u)return;let t=(0,E.getEventPoint)(e);n({type:"TRIGGER_POINTERLEAVE",target:e.currentTarget,point:t})},onPointerDown(e){Z(e.currentTarget)||(0,E.isContextMenuEvent)(e)||e.preventDefault()},onClick(e){e.defaultPrevented||Z(e.currentTarget)||n({type:"TRIGGER_CLICK",target:e.currentTarget})},onBlur(){n({type:"TRIGGER_BLUR"})},onFocus(){n({type:"TRIGGER_FOCUS"})},onKeyDown(e){if(e.defaultPrevented)return;let t={ArrowDown(){n({type:"ARROW_DOWN"})},ArrowUp(){n({type:"ARROW_UP"})},Enter(){n({type:"ARROW_DOWN",src:"enter"})},Space(){n({type:"ARROW_DOWN",src:"space"})}}[(0,E.getEventKey)(e,{orientation:"vertical",dir:a("dir")})];t&&(e.preventDefault(),t(e))}}),getIndicatorProps:()=>t.element({...F.indicator.attrs,dir:a("dir"),"data-state":l?"open":"closed"}),getPositionerProps:()=>t.element({...F.positioner.attrs,dir:a("dir"),id:H(s),style:g.floating}),getArrowProps:()=>t.element({id:s.ids?.arrow??`menu:${s.id}:arrow`,...F.arrow.attrs,dir:a("dir"),style:g.arrow}),getArrowTipProps:()=>t.element({...F.arrowTip.attrs,dir:a("dir"),style:g.arrowTip}),getContentProps:()=>t.element({...F.content.attrs,id:B(s),"aria-label":a("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:d?"menu":"dialog",tabIndex:0,dir:a("dir"),"aria-activedescendant":o("highlightedId")||void 0,"aria-labelledby":j(s),"data-placement":h,onPointerEnter(e){"mouse"===e.pointerType&&n({type:"MENU_POINTERENTER"})},onKeyDown(e){if(e.defaultPrevented||!(0,E.contains)(e.currentTarget,(0,E.getEventTarget)(e)))return;let t=(0,E.getEventTarget)(e);if(t?.closest("[role=menu]")!==e.currentTarget&&t!==e.currentTarget)return;if("Tab"===e.key&&!(0,E.isValidTabEvent)(e))return void e.preventDefault();let r={ArrowDown(){n({type:"ARROW_DOWN"})},ArrowUp(){n({type:"ARROW_UP"})},ArrowLeft(){n({type:"ARROW_LEFT"})},ArrowRight(){n({type:"ARROW_RIGHT"})},Enter(){n({type:"ENTER"})},Space(e){c?n({type:"TYPEAHEAD",key:e.key}):r.Enter?.(e)},Home(){n({type:"HOME"})},End(){n({type:"END"})}},i=r[(0,E.getEventKey)(e,{dir:a("dir")})];if(i){i(e),e.stopPropagation(),e.preventDefault();return}!a("typeahead")||!(0,E.isPrintableKey)(e)||(0,E.isModifierKey)(e)||(0,E.isEditableElement)(t)||(n({type:"TYPEAHEAD",key:e.key}),e.preventDefault())}}),getSeparatorProps:()=>t.element({...F.separator.attrs,role:"separator",dir:a("dir"),"aria-orientation":"horizontal"}),getItemState:m,getItemProps:x,getOptionItemState:y,getOptionItemProps(e){let{type:r,disabled:i,closeOnSelect:o}=e,s=v(e),l=y(e);return{...x(s),...t.element({"data-type":r,...F.item.attrs,dir:a("dir"),"data-value":s.value,role:`menuitem${r}`,"aria-checked":!!l.checked,"data-state":l.checked?"checked":"unchecked",onClick(e){i||(0,E.isDownloadingEvent)(e)||(0,E.isOpeningInNewTab)(e)||n({type:"ITEM_CLICK",target:e.currentTarget,option:s,closeOnSelect:o})}})}},getItemIndicatorProps(e){let r=y((0,I.cast)(e)),n=r.checked?"checked":"unchecked";return t.element({...F.itemIndicator.attrs,dir:a("dir"),"data-disabled":(0,E.dataAttr)(r.disabled),"data-highlighted":(0,E.dataAttr)(r.highlighted),"data-state":(0,I.hasProp)(e,"checked")?n:void 0,hidden:(0,I.hasProp)(e,"checked")?!r.checked:void 0})},getItemTextProps(e){let r=y((0,I.cast)(e)),n=r.checked?"checked":"unchecked";return t.element({...F.itemText.attrs,dir:a("dir"),"data-disabled":(0,E.dataAttr)(r.disabled),"data-highlighted":(0,E.dataAttr)(r.highlighted),"data-state":(0,I.hasProp)(e,"checked")?n:void 0})},getItemGroupLabelProps:e=>t.element({...F.itemGroupLabel.attrs,id:$(s,e.htmlFor),dir:a("dir")}),getItemGroupProps:e=>{let r;return t.element({id:(r=e.id,s.ids?.group?.(r)??`menu:${s.id}:group:${r}`),...F.itemGroup.attrs,dir:a("dir"),"aria-labelledby":$(s,e.id),role:"group"})}}}var{not:et,and:er,or:en}=(0,b.createGuards)(),ei=(0,b.createMachine)({props:({props:e})=>({closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(e){(0,E.clickIfLink)(e.node)},...e,positioning:{placement:"bottom-start",gutter:8,...e.positioning}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"idle",context:({bindable:e,prop:t})=>({suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(e){t("onHighlightChange")?.({highlightedValue:e})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash:e=>`x: ${e?.x}, y: ${e?.y}`})),isSubmenu:e(()=>({defaultValue:!1}))}),refs:()=>({parent:null,children:{},typeaheadState:{...E.getByTypeahead.defaultOptions},positioningOverride:{}}),computed:{isRtl:({prop:e})=>"rtl"===e("dir"),isTypingAhead:({refs:e})=>""!==e.get("typeaheadState").keysSoFar,highlightedId:({context:e,scope:t,refs:r})=>(function(e,t,r){let n=Object.keys(e).length>0;if(!t)return null;if(!n)return W(r,t);for(let r in e){let n=j(e[r].scope);if(n===t)return n}return W(r,t)})(r.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:r,prop:n}){e([()=>r.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>r.hash("anchorPoint")],()=>{r.get("anchorPoint")&&t(["reposition"])}),e([()=>n("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:et("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:en("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:er(et("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:et("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:er("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:et("isPointerSuspended"),actions:["setHighlightedItem","focusMenu"]},{actions:["setLastHighlightedItem"]}],ITEM_POINTERLEAVE:{guard:er(et("isPointerSuspended"),et("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:er(et("isTriggerItemHighlighted"),et("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:er(et("isTriggerItemHighlighted"),et("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:er(et("isTriggerItemHighlighted"),et("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing"},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>!!(t?.closeOnSelect??e("closeOnSelect")),isTriggerItem:({event:e})=>{let t;return t=e.target,!!t?.getAttribute("role")?.startsWith("menuitem")&&!!t?.hasAttribute("aria-controls")},isTriggerItemHighlighted:({event:e,scope:t,computed:r})=>{let n=e.target??t.getById(r("highlightedId"));return!!n?.hasAttribute("aria-controls")},isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>(0,E.isEditableElement)(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>void 0!==e("open"),isArrowLeftEvent:({event:e})=>e.previousEvent?.type==="ARROW_LEFT",isArrowUpEvent:({event:e})=>e.previousEvent?.type==="ARROW_UP",isArrowDownEvent:({event:e})=>e.previousEvent?.type==="ARROW_DOWN",isOpenAutoFocusEvent:({event:e})=>e.previousEvent?.type==="OPEN_AUTOFOCUS"},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.OPEN"})},100);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},300);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:r,refs:n}){if(Y(r))return;let i={...t("positioning"),...n.get("positioningOverride")};return e.set("currentPlacement",i.placement),(0,O.getPlacement)(K(r),()=>G(r),{...i,defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})},trackInteractOutside({refs:e,scope:t,prop:r,context:n,send:i}){let o=!0;return(0,P.trackDismissableElement)(()=>q(t),{type:"menu",defer:!0,exclude:[K(t)],onInteractOutside:r("onInteractOutside"),onRequestDismiss:r("onRequestDismiss"),onFocusOutside(e){r("onFocusOutside")?.(e);let n=(0,E.getEventTarget)(e.detail.originalEvent);if((0,E.contains)(Y(t),n))return void e.preventDefault()},onEscapeKeyDown(t){r("onEscapeKeyDown")?.(t),n.get("isSubmenu")&&t.preventDefault(),eo({parent:e.get("parent")})},onPointerDownOutside(e){r("onPointerDownOutside")?.(e);let n=(0,E.getEventTarget)(e.detail.originalEvent);(0,E.contains)(Y(t),n)&&e.detail.contextmenu?e.preventDefault():o=!e.detail.focusable},onDismiss(){i({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},trackPointerMove({context:e,scope:t,send:r,refs:n,flush:i}){let o=n.get("parent");i(()=>{o.context.set("suspendPointer",!0)});let a=t.getDoc();return(0,E.addDomEvent)(a,"pointermove",t=>{var n,i;n=e.get("intentPolygon"),i={x:t.clientX,y:t.clientY},n&&function(e,t){let{x:r,y:n}=t,i=!1;for(let t=0,o=e.length-1;t<e.length;o=t++){let a=e[t].x,s=e[t].y,l=e[o].x,u=e[o].y;s>n!=u>n&&r<(l-a)*(n-s)/(u-s)+a&&(i=!i)}return i}(n,i)||(r({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),o.context.set("suspendPointer",!1))})},scrollToHighlightedItem({event:e,scope:t,computed:r}){let n=()=>{if(e.current().type.startsWith("ITEM_POINTER"))return;let n=t.getById(r("highlightedId")),i=q(t);(0,E.scrollIntoView)(n,{rootEl:i,block:"nearest"})};return(0,E.raf)(()=>n()),(0,E.observeAttributes)(()=>q(t),{defer:!0,attributes:["aria-activedescendant"],callback:n})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",e=>(0,I.isEqual)(e,t.point)?e:t.point)},setSubmenuPlacement({context:e,computed:t,refs:r}){if(!e.get("isSubmenu"))return;let n=t("isRtl")?"left-start":"right-start";r.set("positioningOverride",{placement:n,gutter:0})},reposition({context:e,scope:t,prop:r,event:n,refs:i}){let o=e.get("anchorPoint"),a={...r("positioning"),...i.get("positioningOverride")};(0,O.getPlacement)(K(t),()=>G(t),{...a,defer:!0,getAnchorRect:o?()=>({width:0,height:0,...o}):void 0,...n.options??{},listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:r,type:n}=e.option;"radio"===n?r?.(!0):"checkbox"===n&&r?.(!t)},clickHighlightedItem({scope:e,computed:t,prop:r,context:n}){let i=e.getById(t("highlightedId"));if(!i||i.dataset.disabled)return;let o=n.get("highlightedValue");(0,E.isAnchorElement)(i)?r("navigate")?.({value:o,node:i,href:i.href}):queueMicrotask(()=>i.click())},setIntentPolygon({context:e,scope:t,event:r}){let n=q(t),i=e.get("currentPlacement");if(!n||!i)return;let o=function(e,t){let r,n,i=function(e){let{x:t,y:r,width:n,height:i}=e,o=t+n/2,a=r+i/2;return{x:t,y:r,width:n,height:i,minX:t,minY:r,maxX:t+n,maxY:r+i,midX:o,midY:a,center:T(o,a)}}(e),{top:o,right:a,left:s,bottom:l}=(r=T(i.minX,i.minY),n=T(i.maxX,i.minY),{top:r,right:n,bottom:T(i.maxX,i.maxY),left:T(i.minX,i.maxY)}),[u]=t.split("-");return({top:[s,o,a,l],right:[o,a,l,s],bottom:[o,s,l,a],left:[a,o,s,l]})[u]}(n.getBoundingClientRect(),i);if(!o)return;let a="right"===(0,O.getPlacementSide)(i);e.set("intentPolygon",[{...r.point,x:r.point.x+(a?-5:5)},...o])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){let r=e.get("parent");r&&t(()=>{r.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){let r=t.value||U(t.target);e.set("highlightedValue",r)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){(0,E.raf)(()=>{let t=q(e),r=(0,E.getInitialFocus)({root:t,enabled:!(0,E.contains)(t,e.getActiveElement()),filter:e=>!e.role?.startsWith("menuitem")});r?.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(q(t)?queueMicrotask:E.raf)(()=>{let r=(0,I.first)(X(t));r&&e.set("highlightedValue",U(r))})},highlightLastItem({context:e,scope:t}){(q(t)?queueMicrotask:E.raf)(()=>{let r=(0,I.last)(X(t));r&&e.set("highlightedValue",U(r))})},highlightNextItem({context:e,scope:t,event:r,prop:n}){var i;let o,a,s=(i={loop:r.loop,value:e.get("highlightedValue"),loopFocus:n("loopFocus")},a=(o=X(t)).findIndex(e=>Q(e,i.value)),(0,I.next)(o,a,{loop:i.loop??i.loopFocus}));e.set("highlightedValue",U(s))},highlightPrevItem({context:e,scope:t,event:r,prop:n}){var i;let o,a,s=(i={loop:r.loop,value:e.get("highlightedValue"),loopFocus:n("loopFocus")},a=(o=X(t)).findIndex(e=>Q(e,i.value)),(0,I.prev)(o,a,{loop:i.loop??i.loopFocus}));e.set("highlightedValue",U(s))},invokeOnSelect({context:e,prop:t,scope:r}){let n=e.get("highlightedValue");null!=n&&(!function(e,t){if(!e)return;let r=new((0,E.getWindow)(e)).CustomEvent(J,{detail:{value:t}});e.dispatchEvent(r)}(n?r.getById(W(r,n)):null,n),t("onSelect")?.({value:n}))},focusTrigger({scope:e,context:t,event:r}){t.get("isSubmenu")||t.get("anchorPoint")||!1===r.restoreFocus||queueMicrotask(()=>K(e)?.focus({preventScroll:!0}))},highlightMatchedItem({scope:e,context:t,event:r,refs:n}){var i;let o,a,s=(i={key:r.key,value:t.get("highlightedValue"),typeaheadState:n.get("typeaheadState")},a=(o=X(e)).find(e=>Q(e,i.value)),(0,E.getByTypeahead)(o,{state:i.typeaheadState,key:i.key,activeId:a?.id??null}));s&&t.set("highlightedValue",U(s))},setParentMenu({refs:e,event:t,context:r}){e.set("parent",t.value),r.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){let r=e.get("children");r[t.id]=t.value,e.set("children",r)},closeRootMenu({refs:e}){eo({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:r}){let n=t.getById(r("highlightedId")),i=n?.getAttribute("data-uid"),o=e.get("children"),a=i?o[i]:null;a?.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){e.get("parent")?.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",U(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){e.get("parent")?.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},toggleVisibility({prop:e,event:t,send:r}){r({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}});function eo(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}var ea=(0,L.createProps)()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]);(0,I.createSplitProps)(ea);var es=(0,L.createProps)()(["closeOnSelect","disabled","value","valueText"]);(0,I.createSplitProps)(es);var el=(0,L.createProps)()(["htmlFor"]);(0,I.createSplitProps)(el);var eu=(0,L.createProps)()(["id"]);(0,I.createSplitProps)(eu);var ec=(0,L.createProps)()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]);(0,I.createSplitProps)(ec),e.s(["anatomy",()=>V,"connect",()=>ee,"machine",()=>ei],93888);var ed=e.i(61697),eh=e.i(21173),ef=e.i(64614),ep=e.i(87219),eg=e.i(39414);let[em,ev]=(0,eg.createContext)({name:"MenuMachineContext",hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),[eb,ey]=(0,eg.createContext)({name:"MenuMachineContext",hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),ex=e=>{let[t,r]=(0,_.splitPresenceProps)(e),[n,i]=(0,x.createSplitProps)()(r,["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]),o=(0,ep.useMenuContext)(),a=ev(),{api:s,service:l}=(e=>{let t=(0,y.useId)(),{getRootNode:r}=(0,eh.useEnvironmentContext)(),{dir:n}=(0,ef.useLocaleContext)(),i={id:t,dir:n,getRootNode:r,...e},o=(0,ed.useMachine)(ei,i);return{api:ee(o,ed.normalizeProps),service:o}})(n),u=(0,C.usePresence)((0,b.mergeProps)({present:s.open},t));(0,w.useEffectOnce)(()=>{!a||o&&(o.setChild(l),s.setParent(a))});let c=(0,y.useCallback)(()=>o?.getTriggerItemProps(s),[s,o]);return(0,v.jsx)(eb,{value:c,children:(0,v.jsx)(em,{value:l,children:(0,v.jsx)(ep.MenuProvider,{value:s,children:(0,v.jsx)(k.PresenceProvider,{value:u,...i})})})})},ew=e=>{let t=(0,ep.useMenuContext)(),r=ev(),[n,{value:i,children:o}]=(0,_.splitPresenceProps)(e),{api:a,service:s}=i,l=(0,C.usePresence)((0,b.mergeProps)({present:a.open},n));(0,w.useEffectOnce)(()=>{!r||t&&(t.setChild(s),a.setParent(r))});let u=(0,y.useCallback)(()=>t?.getTriggerItemProps(a),[a,t]);return(0,v.jsx)(eb,{value:u,children:(0,v.jsx)(em,{value:s,children:(0,v.jsx)(ep.MenuProvider,{value:a,children:(0,v.jsx)(k.PresenceProvider,{value:l,children:o})})})})};var e_=e.i(63761);let eC=(0,y.forwardRef)((e,t)=>{let r=(0,ep.useMenuContext)(),n=(0,b.mergeProps)(r.getSeparatorProps(),e);return(0,v.jsx)(e_.ark.hr,{...n,ref:t})});eC.displayName="MenuSeparator";let ek=(0,y.forwardRef)((e,t)=>{let r=(0,ep.useMenuContext)(),n=(0,k.usePresenceContext)(),i=(0,b.mergeProps)({...r.getTriggerProps(),"aria-controls":n.unmounted?void 0:r.getTriggerProps()["aria-controls"]},e);return(0,v.jsx)(e_.ark.button,{...i,ref:t})});ek.displayName="MenuTrigger";var eS=e.i(73383);let eE=(0,y.forwardRef)((e,t)=>{let r=ey(),n=(0,b.mergeProps)(r?.()??{},e);return(0,v.jsx)(eS.MenuItemPropsProvider,{value:{value:n["data-value"]},children:(0,v.jsx)(e_.ark.div,{...n,ref:t})})});eE.displayName="MenuTriggerItem",e.s(["Arrow",()=>t.MenuArrow,"ArrowTip",()=>r.MenuArrowTip,"CheckboxItem",()=>n.MenuCheckboxItem,"Content",()=>i.MenuContent,"Context",()=>o.MenuContext,"ContextTrigger",()=>a.MenuContextTrigger,"Indicator",()=>s.MenuIndicator,"Item",()=>l.MenuItem,"ItemContext",()=>u.MenuItemContext,"ItemGroup",()=>c.MenuItemGroup,"ItemGroupLabel",()=>d.MenuItemGroupLabel,"ItemIndicator",()=>h.MenuItemIndicator,"ItemText",()=>f.MenuItemText,"Positioner",()=>p.MenuPositioner,"RadioItem",()=>g.MenuRadioItem,"RadioItemGroup",()=>m.MenuRadioItemGroup,"Root",()=>ex,"RootProvider",()=>ew,"Separator",()=>eC,"Trigger",()=>ek,"TriggerItem",()=>eE],97314);var eO=e.i(97314);e.s(["Menu",0,eO],64867)},70496,52309,e=>{"use strict";e.i(81096);var t=e.i(15839),r=e.i(64867),n=e.i(19284);let{withRootProvider:i,withContext:o,useStyles:a,PropsProvider:s}=(0,e.i(45362).createSlotRecipeContext)({key:"menu"}),l=i(r.Menu.RootProvider),u=i(r.Menu.Root,{defaultProps:{lazyMount:!0,unmountOnExit:!0}}),c=o(r.Menu.Trigger,"trigger",{forwardAsChild:!0}),d=o(r.Menu.ContextTrigger,"contextTrigger",{forwardAsChild:!0}),h=o(r.Menu.Positioner,"positioner",{forwardAsChild:!0}),f=o(r.Menu.Separator,"separator",{forwardAsChild:!0}),p=o(r.Menu.Content,"content",{forwardAsChild:!0}),g=o(r.Menu.ArrowTip,"arrowTip",{forwardAsChild:!0}),m=o(r.Menu.Arrow,"arrow",{forwardAsChild:!0,defaultProps:{children:(0,t.jsx)(g,{})}}),v=o(r.Menu.Indicator,"indicator",{forwardAsChild:!0}),b=o(r.Menu.ItemGroup,"itemGroup",{forwardAsChild:!0}),y=o(r.Menu.ItemGroupLabel,"itemGroupLabel",{forwardAsChild:!0}),x=o(r.Menu.Item,"item",{forwardAsChild:!0}),w=o(r.Menu.TriggerItem,"item",{forwardAsChild:!0}),_=o(r.Menu.ItemText,"itemText",{forwardAsChild:!0}),C=o("kbd","itemCommand"),k=o(r.Menu.ItemIndicator,"itemIndicator",{forwardAsChild:!0,defaultProps:{children:(0,t.jsx)(n.CheckIcon,{boxSize:"4"})}}),S=o(r.Menu.CheckboxItem,"item",{forwardAsChild:!0}),E=o(r.Menu.RadioItemGroup,"itemGroup",{forwardAsChild:!0}),O=o(r.Menu.RadioItem,"item",{forwardAsChild:!0}),I=r.Menu.Context,P=r.Menu.ItemContext;e.s(["MenuArrow",()=>m,"MenuArrowTip",()=>g,"MenuCheckboxItem",()=>S,"MenuContent",()=>p,"MenuContext",()=>I,"MenuContextTrigger",()=>d,"MenuIndicator",()=>v,"MenuItem",()=>x,"MenuItemCommand",()=>C,"MenuItemContext",()=>P,"MenuItemGroup",()=>b,"MenuItemGroupLabel",()=>y,"MenuItemIndicator",()=>k,"MenuItemText",()=>_,"MenuPositioner",()=>h,"MenuPropsProvider",()=>s,"MenuRadioItem",()=>O,"MenuRadioItemGroup",()=>E,"MenuRoot",()=>u,"MenuRootProvider",()=>l,"MenuSeparator",()=>f,"MenuTrigger",()=>c,"MenuTriggerItem",()=>w],52309),e.s(["Arrow",()=>m,"ArrowTip",()=>g,"CheckboxItem",()=>S,"Content",()=>p,"Context",()=>I,"ContextTrigger",()=>d,"Indicator",()=>v,"Item",()=>x,"ItemCommand",()=>C,"ItemContext",()=>P,"ItemGroup",()=>b,"ItemGroupLabel",()=>y,"ItemIndicator",()=>k,"ItemText",()=>_,"Positioner",()=>h,"RadioItem",()=>O,"RadioItemGroup",()=>E,"Root",()=>u,"RootPropsProvider",()=>s,"RootProvider",()=>l,"Separator",()=>f,"Trigger",()=>c,"TriggerItem",()=>w],71422);var T=e.i(71422);e.s(["Menu",0,T],70496)},56949,e=>{"use strict";var t=e.i(74992);function r(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M9.588 2.215A5.808 5.808 0 0 0 8 2c-.554 0-1.082.073-1.588.215l-.006.002c-.514.141-.99.342-1.432.601A6.156 6.156 0 0 0 2.82 4.98l-.002.004A5.967 5.967 0 0 0 2.21 6.41 5.986 5.986 0 0 0 2 8c0 .555.07 1.085.21 1.591a6.05 6.05 0 0 0 1.548 2.651c.37.365.774.677 1.216.94a6.1 6.1 0 0 0 1.435.609A6.02 6.02 0 0 0 8 14c.555 0 1.085-.07 1.591-.21.515-.145.99-.348 1.426-.607l.004-.002a6.16 6.16 0 0 0 2.161-2.155 5.85 5.85 0 0 0 .6-1.432l.003-.006A5.807 5.807 0 0 0 14 8c0-.554-.072-1.082-.215-1.588l-.002-.006a5.772 5.772 0 0 0-.6-1.423l-.002-.004a5.9 5.9 0 0 0-.942-1.21l-.008-.008a5.902 5.902 0 0 0-1.21-.942l-.004-.002a5.772 5.772 0 0 0-1.423-.6l-.006-.002zm4.455 9.32a7.157 7.157 0 0 1-2.516 2.508 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674z"},child:[]}]})(e)}function n(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"},child:[]}]})(e)}function i(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 1h12l.5.5v12l-.5.5h-12l-.5-.5v-12l.5-.5zM2 13h11V2H2v11z"},child:[]},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M8 4H7v3H4v1h3v3h1V8h3V7H8V4z"},child:[]}]})(e)}function o(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 1h13l.5.5v13l-.5.5h-13l-.5-.5v-13l.5-.5zM2 2v12h12V2H2zm6 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"},child:[]}]})(e)}function a(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10 7v1H5V7h5z"},child:[]},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 1h12l.5.5v12l-.5.5h-12l-.5-.5v-12l.5-.5zM2 13h11V2H2v11z"},child:[]}]})(e)}function s(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4.5 1L4 1.5V3.02746C4.16417 3.00932 4.331 3 4.5 3C4.669 3 4.83583 3.00932 5 3.02746V2H14V7H12.2929L11 8.29289V7H8.97254C8.99068 7.16417 9 7.331 9 7.5C9 7.669 8.99068 7.83583 8.97254 8H10V9.5L10.8536 9.85355L12.7071 8H14.5L15 7.5V1.5L14.5 1H4.5Z"},child:[]},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M6.41705 10.4288C7.37039 9.80348 8 8.72527 8 7.5C8 5.567 6.433 4 4.5 4C2.567 4 1 5.567 1 7.5C1 8.72527 1.62961 9.80348 2.58295 10.4288C2.11364 10.6498 1.68557 10.9505 1.31802 11.318C0.900156 11.7359 0.568688 12.232 0.342542 12.7779C0.180451 13.1692 0.0747425 13.5807 0.0278638 14C0.00933826 14.1657 0 14.3326 0 14.5V15H1L0.999398 14.5C0.999398 14.4784 0.999599 14.4567 1 14.4351C1.00811 13.9975 1.09823 13.5651 1.26587 13.1604C1.44179 12.7357 1.69964 12.3498 2.0247 12.0247C2.34976 11.6996 2.73566 11.4418 3.16038 11.2659C3.57088 11.0958 4.00986 11.0056 4.45387 10.9997C4.46922 10.9999 4.4846 11 4.5 11C4.5154 11 4.53078 10.9999 4.54613 10.9997C4.99014 11.0056 5.42912 11.0958 5.83962 11.2659C6.26433 11.4418 6.65024 11.6996 6.9753 12.0247C7.30036 12.3498 7.55821 12.7357 7.73413 13.1604C7.90177 13.5651 7.99189 13.9975 8 14.4351C8.0004 14.4567 8.0006 14.4784 8.0006 14.5L8 15H9V14.5C9 14.3326 8.99066 14.1657 8.97214 14C8.92526 13.5807 8.81955 13.1692 8.65746 12.7779C8.43131 12.232 8.09984 11.7359 7.68198 11.318C7.31443 10.9505 6.88636 10.6498 6.41705 10.4288ZM4.5 10C3.11929 10 2 8.88071 2 7.5C2 6.11929 3.11929 5 4.5 5C5.88071 5 7 6.11929 7 7.5C7 8.88071 5.88071 10 4.5 10Z"},child:[]}]})(e)}function l(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M5.616 4.928a2.487 2.487 0 0 1-1.119.922c-.148.06-.458.138-.458.138v5.008a2.51 2.51 0 0 1 1.579 1.062c.273.412.419.895.419 1.388.008.343-.057.684-.19 1A2.485 2.485 0 0 1 3.5 15.984a2.482 2.482 0 0 1-1.388-.419A2.487 2.487 0 0 1 1.05 13c.095-.486.331-.932.68-1.283.349-.343.79-.579 1.269-.68V5.949a2.6 2.6 0 0 1-1.269-.68 2.503 2.503 0 0 1-.68-1.283 2.487 2.487 0 0 1 1.06-2.565A2.49 2.49 0 0 1 3.5 1a2.504 2.504 0 0 1 1.807.729 2.493 2.493 0 0 1 .729 1.81c.002.494-.144.978-.42 1.389zm-.756 7.861a1.5 1.5 0 0 0-.552-.579 1.45 1.45 0 0 0-.77-.21 1.495 1.495 0 0 0-1.47 1.79 1.493 1.493 0 0 0 1.18 1.179c.288.058.586.03.86-.08.276-.117.512-.312.68-.56.15-.226.235-.49.249-.76a1.51 1.51 0 0 0-.177-.78zM2.708 4.741c.247.161.536.25.83.25.271 0 .538-.075.77-.211a1.514 1.514 0 0 0 .729-1.359 1.513 1.513 0 0 0-.25-.76 1.551 1.551 0 0 0-.68-.56 1.49 1.49 0 0 0-.86-.08 1.494 1.494 0 0 0-1.179 1.18c-.058.288-.03.586.08.86.117.276.312.512.56.68zm10.329 6.296c.48.097.922.335 1.269.68.466.47.729 1.107.725 1.766.002.493-.144.977-.42 1.388a2.499 2.499 0 0 1-4.532-.899 2.5 2.5 0 0 1 1.067-2.565c.267-.183.571-.308.889-.37V5.489a1.5 1.5 0 0 0-1.5-1.499H8.687l1.269 1.27-.71.709L7.117 3.84v-.7l2.13-2.13.71.711-1.269 1.27h1.85a2.484 2.484 0 0 1 2.312 1.541c.125.302.189.628.187.957v5.548zm.557 3.509a1.493 1.493 0 0 0 .191-1.89 1.552 1.552 0 0 0-.68-.559 1.49 1.49 0 0 0-.86-.08 1.493 1.493 0 0 0-1.179 1.18 1.49 1.49 0 0 0 .08.86 1.496 1.496 0 0 0 2.448.49z"},child:[]}]})(e)}function u(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M13.507 12.324a7 7 0 0 0 .065-8.56A7 7 0 0 0 2 4.393V2H1v3.5l.5.5H5V5H2.811a6.008 6.008 0 1 1-.135 5.77l-.887.462a7 7 0 0 0 11.718 1.092zm-3.361-.97l.708-.707L8 7.792V4H7v4l.146.354 3 3z"},child:[]}]})(e)}function c(e){return(0,t.GenIcon)({tag:"svg",attr:{fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M7.444 13.832a1 1 0 1 0 1.111-1.663 1 1 0 0 0-1.11 1.662zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"},child:[]}]})(e)}function d(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.351 1.091a4.528 4.528 0 0 1 3.44 3.16c.215.724.247 1.49.093 2.23a4.583 4.583 0 0 1-4.437 3.6c-.438 0-.874-.063-1.293-.19l-.8.938-.379.175H7v1.5l-.5.5H5v1.5l-.5.5h-3l-.5-.5v-2.307l.146-.353L6.12 6.87a4.464 4.464 0 0 1-.2-1.405 4.528 4.528 0 0 1 5.431-4.375zm1.318 7.2a3.568 3.568 0 0 0 1.239-2.005l.004.005A3.543 3.543 0 0 0 9.72 2.08a3.576 3.576 0 0 0-2.8 3.4c-.01.456.07.908.239 1.33l-.11.543L2 12.404v1.6h2v-1.5l.5-.5H6v-1.5l.5-.5h1.245l.876-1.016.561-.14a3.47 3.47 0 0 0 1.269.238 3.568 3.568 0 0 0 2.218-.795zm-.838-2.732a1 1 0 1 0-1.662-1.11 1 1 0 0 0 1.662 1.11z"},child:[]}]})(e)}function h(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 5v7h-.278c-.406 0-.778-.086-1.117-.258A2.528 2.528 0 0 1 11.73 11H8.87a3.463 3.463 0 0 1-.546.828 3.685 3.685 0 0 1-.735.633c-.27.177-.565.31-.882.398a3.875 3.875 0 0 1-.985.141h-.5V9H2l-1-.5L2 8h3.222V4h.5c.339 0 .664.047.977.14.312.094.607.227.883.4A3.404 3.404 0 0 1 8.87 6h2.859a2.56 2.56 0 0 1 .875-.734c.338-.172.71-.26 1.117-.266H14zm-.778 1.086a1.222 1.222 0 0 0-.32.156 1.491 1.491 0 0 0-.43.461L12.285 7H8.183l-.117-.336a2.457 2.457 0 0 0-.711-1.047C7.027 5.331 6.427 5.09 6 5v7c.427-.088 1.027-.33 1.355-.617.328-.287.565-.636.71-1.047L8.184 10h4.102l.18.297c.057.094.122.177.195.25.073.073.153.143.242.21.088.069.195.12.32.157V6.086z"},child:[]}]})(e)}function f(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 2h7v.278c0 .406-.086.778-.258 1.117-.172.339-.42.63-.742.875v2.86c.307.145.583.328.828.546.245.219.456.464.633.735.177.27.31.565.398.882.089.318.136.646.141.985v.5H8V14l-.5 1-.5-1v-3.222H3v-.5c0-.339.047-.664.14-.977.094-.312.227-.607.4-.883A3.404 3.404 0 0 1 5 7.13V4.27a2.561 2.561 0 0 1-.734-.875A2.505 2.505 0 0 1 4 2.278V2zm1.086.778c.042.125.094.232.156.32a1.494 1.494 0 0 0 .461.43L6 3.715v4.102l-.336.117c-.411.146-.76.383-1.047.711C4.331 8.973 4.09 9.573 4 10h7c-.088-.427-.33-1.027-.617-1.355a2.456 2.456 0 0 0-1.047-.71L9 7.816V3.715l.297-.18c.094-.057.177-.122.25-.195a2.28 2.28 0 0 0 .21-.242.968.968 0 0 0 .157-.32H5.086z"},child:[]}]})(e)}e.s(["VscCircleLarge",()=>r,"VscClose",()=>n,"VscDiffAdded",()=>i,"VscDiffModified",()=>o,"VscDiffRemoved",()=>a,"VscFeedback",()=>s,"VscGitPullRequest",()=>l,"VscHistory",()=>u,"VscKebabVertical",()=>c,"VscKey",()=>d,"VscPin",()=>h,"VscPinned",()=>f])},75155,e=>{"use strict";function t(e,t){let r=[...e],n=[...t],i=[];for(;r.length>0&&n.length>0;)if(i.includes(r[0]))r.shift();else if(i.includes(n[0]))n.shift();else if(r[0]===n[0])i.push(r[0]),r.shift(),n.shift();else if(n.includes(r[0])){let e=n.indexOf(r[0]);for(let t=0;t<e;t++)i.includes(n[t])||i.push(n[t]);i.push(r[0]),r.shift(),n.splice(0,e+1)}else i.push(r[0]),r.shift();return r.forEach(e=>{i.includes(e)||i.push(e)}),n.forEach(e=>{i.includes(e)||i.push(e)}),i}function r(e,r){let n=t(e,r),i={};for(let t of n)e.includes(t)?r.includes(t)?i[t]=void 0:i[t]="removed":i[t]="added";let o={};e.forEach((e,t)=>{o[e]=t});let a=-1;for(let e of n){let t=o[e];null!=t&&(t>a?a=t:i[e]="reordered")}return i}e.s(["mergeKeys",()=>t,"mergeKeysWithStatus",()=>r])},51853,(e,t,r)=>{var n=0/0,i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,u=e.g&&e.g.Object===Object&&e.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,f=Math.max,p=Math.min,g=function(){return d.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==h.call(t))return n;if(m(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=m(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var u=a.test(e);return u||s.test(e)?l(e.slice(2),u?2:8):o.test(e)?n:+e}t.exports=function(e,t,r){var n,i,o,a,s,l,u=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var r=n,o=i;return n=i=void 0,u=t,a=e.apply(o,r)}function y(e){var r=e-l,n=e-u;return void 0===l||r>=t||r<0||d&&n>=o}function x(){var e,r,n,i=g();if(y(i))return w(i);s=setTimeout(x,(e=i-l,r=i-u,n=t-e,d?p(n,o-r):n))}function w(e){return(s=void 0,h&&n)?b(e):(n=i=void 0,a)}function _(){var e,r=g(),o=y(r);if(n=arguments,i=this,l=r,o){if(void 0===s)return u=e=l,s=setTimeout(x,t),c?b(e):a;if(d)return s=setTimeout(x,t),b(l)}return void 0===s&&(s=setTimeout(x,t)),a}return t=v(t)||0,m(r)&&(c=!!r.leading,o=(d="maxWait"in r)?f(v(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h),_.cancel=function(){void 0!==s&&clearTimeout(s),u=0,n=l=i=s=void 0},_.flush=function(){return void 0===s?a:w(g())},_}},29990,7880,328,85297,51915,96137,e=>{"use strict";var t=e.i(15839),r=e.i(1484),n=e.i(28337),i=e.i(18128),o=e.i(42436),a=e.i(79278),s=e.i(88076),l=e.i(70496),u=e.i(70839),c=e.i(23331),d=e.i(56949),h=e.i(75155),f=e.i(64789);e.i(51853);var p="undefined"!=typeof window?f.useLayoutEffect:f.useEffect;function g(){let[e,t]=(0,f.useState)(null);return[e,(0,f.useCallback)(async e=>{if(!(null==navigator?void 0:navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),t(e),!0}catch(e){return console.warn("Copy failed",e),t(null),!1}},[])]}function m(e,t){let r=(0,f.useRef)(e);p(()=>{r.current=e},[e]),(0,f.useEffect)(()=>{if(null===t)return;let e=setInterval(()=>{r.current()},t);return()=>{clearInterval(e)}},[t])}function v(e,t){let r=(0,f.useRef)(e);p(()=>{r.current=e},[e]),(0,f.useEffect)(()=>{if(!t&&0!==t)return;let e=setTimeout(()=>{r.current()},t);return()=>{clearTimeout(e)}},[t])}e.s(["useCopyToClipboard",()=>g,"useInterval",()=>m,"useTimeout",()=>v],7880);var b=e.i(74992);function y(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"},child:[]}]})(e)}function x(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"},child:[]}]})(e)}function w(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"},child:[]}]})(e)}function _(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"},child:[]}]})(e)}function C(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"},child:[]}]})(e)}function k(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"},child:[]}]})(e)}function S(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"},child:[]}]})(e)}function E(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"},child:[]}]})(e)}function O(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M24,128A72.08,72.08,0,0,1,96,56H204.69L194.34,45.66a8,8,0,0,1,11.32-11.32l24,24a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L204.69,72H96a56.06,56.06,0,0,0-56,56,8,8,0,0,1-16,0Zm200-8a8,8,0,0,0-8,8,56.06,56.06,0,0,1-56,56H51.31l10.35-10.34a8,8,0,0,0-11.32-11.32l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L51.31,200H160a72.08,72.08,0,0,0,72-72A8,8,0,0,0,224,120Z"},child:[]}]})(e)}function I(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},child:[]}]})(e)}function P(e){return(0,b.GenIcon)({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"},child:[]}]})(e)}e.s(["PiCaretDown",()=>w,"PiCheck",()=>C,"PiCheckCircle",()=>_,"PiCopy",()=>k,"PiDotsThreeVertical",()=>S,"PiInfo",()=>E,"PiInfoFill",()=>y,"PiRepeat",()=>O,"PiTrashFill",()=>x,"PiWarning",()=>I,"PiX",()=>P],328);let T=({value:e,colorPalette:r,grayOut:n,noCopy:a,fontSize:s})=>{let[l,u]=(0,f.useState)(!1);return(0,t.jsxs)(o.Flex,{p:"2px 5px",minWidth:"30px",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",color:`${r}.800`,backgroundColor:`${r}.100`,alignItems:"center",gap:"2px",rounded:"md",fontSize:s,flexShrink:a?"0":"inherit",onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},children:[(0,t.jsx)(i.Box,{overflow:"hidden",textOverflow:"ellipsis",color:n?"gray":"inherit",children:e}),(0,t.jsx)(R,{value:e,noCopy:a,grayOut:n,isHovered:l})]})};function R({value:e,noCopy:r,grayOut:n,isHovered:i}){let[o,a]=g();return r||n?(0,t.jsx)(t.Fragment,{}):o?(0,t.jsx)(t.Fragment,{children:"Copied"}):i?(0,t.jsx)(s.IconButton,{"aria-label":"Copy",size:"xs",minW:"10px",h:"10px",variant:"plain",onClick:()=>a(e),display:"flex",alignItems:"center",justifyContent:"center",children:(0,t.jsx)(k,{size:"10px"})}):(0,t.jsx)(t.Fragment,{})}e.s(["DiffText",0,T],85297);var A=e.i(22429);function M(e,t){return[{value:"Show raw value",onClick:()=>{t({[e]:"raw"})}},{value:"Show 2 decimal points",onClick:()=>{t({[e]:2})}},{value:"Show 4 decimal points",onClick:()=>{t({[e]:4})}},{value:"Show 6 decimal points",onClick:()=>{t({[e]:6})}},{value:"Show as percentage",onClick:()=>{t({[e]:"percent"})}}]}function N(e){return e.data.map((t,r)=>({...e.columns.reduce((e,r,n)=>(e[r.key]=t[n],e),{}),__status:void 0,_index:r+1}))}function D(e){let t=Number(e);return!isNaN(t)&&isFinite(t)?t:function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return Math.abs(t)}(e)}function L(e,t){let r=t.toLowerCase();return e.some(e=>e.toLowerCase()===r)}function V(e,t){let r=t.toLowerCase();if(r in e)return e[r];let n=Object.keys(e).find(e=>e.toLowerCase()===r);return n?e[n]:void 0}function F(e,t){let r=[];for(let n of t){if(0>e.findIndex(e=>e.key===n))throw Error(`Column ${n} not found`);r.push(n)}return r}function j(e,t,r){let n=[];if(0===t.length)return String(r._index);for(let i of t){let t=e.find(e=>e.key===i);if(null==t)throw Error(`Primary Column ${i} not found`);n.push(`${t.name}=${r[i]}`)}return n.join("|")}function z({name:e,columnStatus:r,onPrimaryKeyChange:n,onPinnedColumnsChange:c,columnType:h,onColumnsRenderModeChanged:f,...p}){let g=p.primaryKeys??[],m=p.pinnedColumns??[],v=g.includes(e),b=m.includes(e),y=[];return(f&&(y=M(e,f)),"index"===e)?(0,t.jsx)(t.Fragment,{}):(0,t.jsxs)(o.Flex,{alignItems:"center",gap:"10px",className:"grid-header",children:[v&&(0,t.jsx)(a.Icon,{as:d.VscKey}),(0,t.jsx)(i.Box,{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e}),"added"!==r&&"removed"!==r&&n&&(0,t.jsx)(a.Icon,{className:v?"close-icon":"key-icon",display:v?"block":"none",cursor:"pointer",as:v?d.VscClose:d.VscKey,onClick:v?()=>{let t=g.filter(t=>t!==e);n&&n(t)}:()=>{let t=[...g.filter(e=>"index"!==e),e];n&&n(t)}}),!v&&c&&(0,t.jsx)(a.Icon,{className:b?"unpin-icon":"pin-icon",display:b?"block":"none",cursor:"pointer",as:b?d.VscPinned:d.VscPin,onClick:b?()=>{let t=m.filter(t=>t!==e);c&&c(t)}:()=>{let t=[...m,e];c&&c(t)}}),!v&&"number"===h&&(0,t.jsxs)(l.Menu.Root,{children:[(0,t.jsx)(l.Menu.Trigger,{asChild:!0,children:(0,t.jsx)(s.IconButton,{"aria-label":"Options",variant:"plain",className:"!size-4 !min-w-4",children:(0,t.jsx)(d.VscKebabVertical,{})})}),(0,t.jsx)(u.Portal,{children:(0,t.jsx)(l.Menu.Positioner,{children:(0,t.jsx)(l.Menu.Content,{children:y.map(e=>(0,t.jsx)(l.Menu.Item,{value:e.value,onClick:e.onClick,children:e.value},e.value))})})})]})]})}e.s(["columnPrecisionSelectOptions",()=>M],51915),e.s(["dataFrameToRowObjects",()=>N,"getCaseInsensitive",()=>V,"includesIgnoreCase",()=>L,"keyToNumber",()=>D],96137);let B=(e,t,r,n="raw")=>{let i;if(!Object.hasOwn(e,t))return["-",!0];let o=e[t],a=!1;if("boolean"==typeof o)i=o.toString();else if(""===o)i="(empty)",a=!0;else if(null==o)i="(null)",a=!0;else if("number"==typeof o)i=String(o);else if(r&&"number"===r){var s;s=parseFloat(o),i=("number"==typeof n?(0,A.formatNumber)(s,"en-US",{maximumFractionDigits:n,minimumFractionDigits:n}):"percent"===n?(0,A.formatNumber)(s,"en-US",{style:"percent",maximumFractionDigits:2}):String(s))??""}else i=o;return[i,a]},H=({row:e,column:r})=>{let{columnType:n,columnRenderMode:i}=r,[o,a]=B(e,r.key,n,i);return(0,t.jsx)(c.Text,{style:{color:a?"gray":"inherit"},children:o})},W=({row:e,column:r})=>{let{columnType:n,columnRenderMode:i}=r,a=`base__${r.key}`,s=`current__${r.key}`;if(!Object.hasOwn(e,a)&&!Object.hasOwn(e,s))return"-";let l=Object.hasOwn(e,a),u=Object.hasOwn(e,s),[d,h]=B(e,`base__${r.key}`,n,i),[f,p]=B(e,`current__${r.key}`,n,i);return e[a]===e[s]?(0,t.jsx)(c.Text,{style:{color:p?"gray":"inherit"},children:f}):(0,t.jsxs)(o.Flex,{gap:"5px",alignItems:"center",lineHeight:"normal",height:"100%",children:[l&&(0,t.jsx)(T,{value:d,colorPalette:"red",grayOut:h}),u&&(0,t.jsx)(T,{value:f,colorPalette:"green",grayOut:p})]})};function U(e,i,o){let a,s=e??{columns:[],data:[]},l=i??{columns:[],data:[]},u=o?.primaryKeys??[],c=o?.pinnedColumns??[],d=o?.changedOnly??!1,f=o?.displayMode??"side_by_side",p=o?.columnsRenderMode??{},g=N(s),m=N(l),v=[],b=(a={},Object.entries((0,h.mergeKeysWithStatus)(s.columns.map(e=>e.key),l.columns.map(e=>e.key))).map(([e,t])=>{let r=s.columns.find(t=>t.key===e),n=l.columns.find(t=>t.key===e);a[e]={status:t,baseColumnKey:r?.key??"unknown",currentColumnKey:n?.key??"unknown",colType:s.columns.find(t=>t.key===e)?.type??"unknown",key:r?.key??"unknown"}}),a),y={},x={},w=!1,_=!1;if(0===u.length)g.forEach(e=>{y[String(e._index)]=e}),m.forEach(e=>{x[String(e._index)]=e});else{let e=F(s.columns,u);g.forEach(t=>{let r=j(s.columns,e,t);r in y&&(w=!0),y[r]=t}),e=F(l.columns,u),m.forEach(t=>{let r=j(l.columns,e,t);r in x&&(_=!0),x[r]=t})}let C=(0,h.mergeKeysWithStatus)(Object.keys(y),Object.keys(x)),k={added:0,removed:0,modified:0},S=Object.entries(C).map(([e])=>{let t=y[e],r=x[e],i={_index:D(e),__status:void 0};if(t&&s.columns.forEach(e=>{if(u.includes(e.key)){i[e.key]=t[e.key];return}i[`base__${e.key}`]=t[e.key]}),r&&l.columns.forEach(e=>{u.includes(e.key)||(i[`current__${e.key}`]=r[e.key])}),t)if(r){for(let[e,o]of Object.entries(b))!("index"===e||u.includes(e))&&"unknown"!==o.baseColumnKey&&"unknown"!==o.currentColumnKey&&(n.default.isEqual(t[o.baseColumnKey],r[o.currentColumnKey])||(i.__status="modified",o.status="modified"));"modified"===i.__status&&k.modified++}else i.__status="removed",k.removed++;else i.__status="added",k.added++;return i});d&&(S=S.filter(e=>"added"===e.__status||"removed"===e.__status||"modified"===e.__status));let E=(e,i,a,s="raw")=>{let l="added"===i?"diff-header-added":"removed"===i?"diff-header-removed":void 0;return"inline"===f?{headerCellClass:l,name:(0,t.jsx)(z,{name:e,columnStatus:i,columnType:a,...o}),key:e,renderCell:W,columnType:a,columnRenderMode:s}:{headerCellClass:l,name:(0,t.jsx)(z,{name:e,columnStatus:i,columnType:a,...o}),children:[{key:`base__${e}`,name:o?.baseTitle??"Base",renderEditCell:r.textEditor,headerCellClass:l,cellClass:t=>{let r=t.__status;if("removed"===r)return"diff-cell-removed";if("added"===r)return"diff-cell-added";if("added"===i);else if("removed"===i);else if(!n.default.isEqual(t[`base__${e}`],t[`current__${e}`]))return"diff-cell-removed"},renderCell:H,columnType:a,columnRenderMode:s},{key:`current__${e}`,name:o?.currentTitle??"Current",renderEditCell:r.textEditor,headerCellClass:l,cellClass:t=>{let r=t.__status;if("removed"===r)return"diff-cell-removed";if("added"===r)return"diff-cell-added";if("added"===i);else if("removed"===i);else if(!n.default.isEqual(t[`base__${e}`],t[`current__${e}`]))return"diff-cell-added"},renderCell:H,columnType:a,columnRenderMode:s}]}};return 0===u.length?v.push({key:"_index",width:50,maxWidth:100,name:"",cellClass:"index-column"}):u.forEach(e=>{let r=b[e].status??"",n=b[e].colType;v.push({key:e,name:(0,t.jsx)(z,{name:e,columnStatus:r,columnType:n,...o}),frozen:!0,cellClass:e=>{if(e.__status)return`diff-header-${e.__status}`},renderCell:H,columnType:n,columnRenderMode:p[e]})}),c.forEach(e=>{let t=b[e].status??"",r=b[e].colType;"index"===e||u.includes(e)||v.push(E(e,t,r,p[e]))}),Object.entries(b).forEach(([e,t])=>{let r=t.status??"",n=b[e].colType;"index"===e||u.includes(e)||c.includes(e)||d&&k.modified>0&&"added"!==r&&"removed"!==r&&"modified"!==r||v.push(E(e,r,n,p[e]))}),{columns:v,rows:S,invalidPKeyBase:w,invalidPKeyCurrent:_}}e.s(["DataFrameColumnGroupHeader",()=>z,"defaultRenderCell",0,H,"inlineRenderCell",0,W,"toDataDiffGrid",()=>U],29990)},42671,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(52051);let i=(0,r.forwardRef)(function(e,r){return(0,t.jsx)(n.Stack,{align:"center",...e,direction:"column",ref:r})});i.displayName="VStack",e.s(["VStack",()=>i])},72668,(e,t,r)=>{t.exports=e.g&&e.g.Object===Object&&e.g},18408,(e,t,r)=>{var n=e.r(72668),i="object"==typeof self&&self&&self.Object===Object&&self;t.exports=n||i||Function("return this")()},7667,(e,t,r)=>{t.exports=e.r(18408).Symbol},52930,(e,t,r)=>{var n=e.r(7667),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;t.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},21955,(e,t,r)=>{var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}},23748,(e,t,r)=>{var n=e.r(7667),i=e.r(52930),o=e.r(21955),a=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},19674,(e,t,r)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},39269,(e,t,r)=>{var n=e.r(23748),i=e.r(19674);t.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==n(e)}},57980,12103,94307,43291,43482,62031,67652,31099,41378,6850,51297,64485,52058,22430,40159,e=>{"use strict";var t=e.i(15839),r=e.i(51713),n=e.i(42436),i=e.i(62234),o=e.i(64789),a=e.i(29990),s=e.i(18128),l=e.i(61479),u=e.i(42671),c=e.i(328),d=e.i(28337);let h=({warnings:e,children:r})=>(0,t.jsxs)(n.Flex,{borderBottom:"1px solid lightgray",justifyContent:"flex-end",gap:"5px",alignItems:"center",px:"10px",bg:e&&e.length>0?"orange.100":"inherit",children:[(0,t.jsx)(u.VStack,{alignItems:"flex-start",gap:0,children:e?.map(e=>(0,t.jsxs)(s.Box,{children:[(0,t.jsx)(c.PiWarning,{color:"orange.600"})," ",e]},d.default.uniqueId(`-${e}`)))}),(0,t.jsx)(l.Spacer,{minHeight:"32px"}),r]});e.s(["RunToolbar",0,h],12103);var f=e.i(59760),p=e.i(90819),g=e.i(5376),m=e.i(76184),v=e.i(41344);let b=(0,g.chakra)("div",{base:{display:"inline-flex",gap:"var(--group-gap, 0.5rem)",isolation:"isolate",position:"relative","& [data-group-item]":{_focusVisible:{zIndex:1}}},variants:{orientation:{horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},attached:{true:{gap:"0!"}},grow:{true:{display:"flex","& > *":{flex:1}}},stacking:{"first-on-top":{"& > [data-group-item]":{zIndex:"calc(var(--group-count) - var(--group-index))"}},"last-on-top":{"& > [data-group-item]":{zIndex:"var(--group-index)"}}}},compoundVariants:[{orientation:"horizontal",attached:!0,css:{"& > *[data-first]":{borderEndRadius:"0!",marginEnd:"-1px"},"& > *[data-between]":{borderRadius:"0!",marginEnd:"-1px"},"& > *[data-last]":{borderStartRadius:"0!"}}},{orientation:"vertical",attached:!0,css:{"& > *[data-first]":{borderBottomRadius:"0!",marginBottom:"-1px"},"& > *[data-between]":{borderRadius:"0!",marginBottom:"-1px"},"& > *[data-last]":{borderTopRadius:"0!"}}}],defaultVariants:{orientation:"horizontal"}}),y=(0,o.memo)((0,o.forwardRef)(function(e,r){let{align:n="center",justify:i="flex-start",children:a,wrap:s,skip:l,...u}=e,c=(0,o.useMemo)(()=>{let e=o.Children.toArray(a).filter(o.isValidElement);if(1===e.length)return e;let t=e.filter(e=>!l?.(e)),r=t.length;return 1===t.length?e:e.map(e=>{let n=e.props;if(l?.(e))return e;let i=t.indexOf(e);return(0,o.cloneElement)(e,{...n,"data-group-item":"","data-first":(0,m.dataAttr)(0===i),"data-last":(0,m.dataAttr)(i===r-1),"data-between":(0,m.dataAttr)(i>0&&i<r-1),style:{"--group-count":r,"--group-index":i,...n?.style??{}}})})},[a,l]);return(0,t.jsx)(b,{ref:r,alignItems:n,justifyContent:i,flexWrap:s,...u,className:(0,v.cx)("chakra-group",e.className),children:c})}));y.displayName="Group",e.s(["Group",()=>y],94307);let x=(0,o.forwardRef)(function(e,r){let n=(0,p.useRecipe)({key:"button"}),[i,a]=(0,o.useMemo)(()=>n.splitVariantProps(e),[e,n]);return(0,t.jsx)(f.ButtonPropsProvider,{value:i,children:(0,t.jsx)(y,{ref:r,...a})})});x.displayName="ButtonGroup",e.s(["ButtonGroup",()=>x],43291);var w=e.i(85297);let _=({value:e,onChange:r,textOn:n,textOff:i})=>(0,t.jsxs)(x,{attached:!0,variant:"outline",borderRadius:"full",size:"xs",children:[(0,t.jsx)(f.Button,{onClick:()=>{r(!1)},color:e?"gray.400":"black",bg:e?"gray.50":"white",children:i??"Off"}),(0,t.jsx)(f.Button,{onClick:()=>{r(!0)},color:e?"black":"gray.400",bg:e?"white":"gray.50",children:n??"On"})]}),C=({displayMode:e,onDisplayModeChanged:r})=>(0,t.jsxs)(t.Fragment,{children:["inline"===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.DiffText,{value:"Base",colorPalette:"red",grayOut:!1,fontSize:"10pt",noCopy:!0}),(0,t.jsx)(w.DiffText,{value:"Current",colorPalette:"green",grayOut:!1,fontSize:"10pt",noCopy:!0})]}),(0,t.jsx)(_,{value:"side_by_side"===e,onChange:e=>{r(e?"side_by_side":"inline")},textOff:"Inline",textOn:"Side by side"})]});e.s(["DiffDisplayModeSwitch",0,C],43482);var k=e.i(79278),S=e.i(88076),E=e.i(70496),O=e.i(70839),I=e.i(62754),P=e.i(56949),T=e.i(51915),R=e.i(96137);function A({name:e,pinnedColumns:r=[],onPinnedColumnsChange:i=()=>{},columnType:o,onColumnsRenderModeChanged:a}){let l=[];a&&(l=(0,T.columnPrecisionSelectOptions)(e,a));let u=r.includes(e);return(0,t.jsxs)(n.Flex,{className:"grid-header",alignItems:"center",children:[(0,t.jsx)(s.Box,{flex:1,children:e}),(0,t.jsx)(k.Icon,{className:u?"unpin-icon":"pin-icon",display:u?"block":"none",cursor:"pointer",as:u?P.VscPinned:P.VscPin,onClick:u?()=>{i(r.filter(t=>t!==e))}:()=>{i([...r,e])}}),"number"===o&&(0,t.jsxs)(E.Menu.Root,{children:[(0,t.jsx)(E.Menu.Trigger,{asChild:!0,children:(0,t.jsx)(S.IconButton,{"aria-label":"Options",variant:"plain",className:"!size-4 !min-w-4",children:(0,t.jsx)(c.PiDotsThreeVertical,{})})}),(0,t.jsx)(O.Portal,{children:(0,t.jsx)(E.Menu.Positioner,{children:(0,t.jsx)(E.Menu.Content,{children:l.map(e=>(0,t.jsx)(E.Menu.Item,{value:e.value,onClick:e.onClick,children:e.value},e.value))})})})]})]})}function M(e,r){let n=[],i=r.primaryKeys??[],o=r.pinnedColumns??[],s=r.columnsRenderMode??{},l={};e.columns.forEach(e=>{l[e.name]={colType:e.type}});let u=(e,n,i,o="raw")=>({key:e,name:(0,t.jsx)(A,{name:n,...r,columnType:i}),width:"auto",renderCell:a.defaultRenderCell,columnType:i,columnRenderMode:o});return i.length>0?i.forEach(e=>{let i=l[e].colType;n.push(((e,n,i,o="raw")=>({key:e,name:(0,t.jsx)(a.DataFrameColumnGroupHeader,{name:n,columnStatus:"",columnType:i,...r}),width:"auto",frozen:!0,renderCell:a.defaultRenderCell,columnType:i,columnRenderMode:o}))(e,e,i,s[e]))}):n.push({key:"_index",name:"",width:50,cellClass:"index-column"}),o.forEach(t=>{let r=l[t].colType,i=d.default.findIndex(e.columns,e=>e.name===t);i<0||n.push(u(t,e.columns[i].name,r,s[t]))}),e.columns.forEach(({name:e,key:t})=>{if(i.includes(e)||o.includes(e))return;let r=l[e].colType;n.push(u(t,e,r,s[e]))}),{columns:n,rows:(0,R.dataFrameToRowObjects)(e)}}let N=(0,o.forwardRef)(({run:e,viewOptions:a,onViewOptionsChanged:u,onAddToChecklist:d},h)=>{if(!((0,I.isQueryRun)(e)||(0,I.isQueryBaseRun)(e)))throw Error("run type must be query");let p=(0,o.useMemo)(()=>a?.pinned_columns??[],[a]),g=(0,o.useMemo)(()=>a?.columnsRenderMode??{},[a]),m=e.result,v=(0,o.useMemo)(()=>m?M(m,{pinnedColumns:p,onPinnedColumnsChange:e=>{u&&u({...a,pinned_columns:e})},columnsRenderMode:g,onColumnsRenderModeChanged:e=>{let t={...a?.columnsRenderMode??{},...e};u&&u({...a,columnsRenderMode:t})}}):{rows:[],columns:[]},[m,p,a,u,g]);if(0===v.columns.length)return(0,t.jsx)(r.Center,{height:"100%",children:"No data"});let b=m?m.limit??0:0,y=b>0&&m?.more?`Warning: Displayed results are limited to ${b.toLocaleString()} records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set.`:null,x=d??y;return(0,t.jsxs)(n.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[x&&(0,t.jsxs)(n.Flex,{borderBottom:"1px solid lightgray",alignItems:"center",gap:"5px",px:"10px",bg:y?"orange.100":"inherit",children:[y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.PiWarning,{color:"orange.600",className:"self-center"})," ",(0,t.jsx)(s.Box,{children:y})]}),(0,t.jsx)(l.Spacer,{minHeight:"32px"}),d&&(0,t.jsx)(f.Button,{marginBlock:"5px",size:"xs",colorPalette:"iochmara",onClick:()=>{d(e)},children:"Add to Checklist"})]}),(0,t.jsx)(i.ScreenshotDataGrid,{ref:h,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:v.columns,rows:v.rows,renderers:{noRowsFallback:(0,t.jsx)(i.EmptyRowsRenderer,{})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light"})]})});e.s(["QueryResultView",0,N,"toDataGrid",()=>M],62031);let D=(0,o.forwardRef)(({run:e,viewOptions:s,onViewOptionsChanged:l},u)=>{if(!(0,I.isProfileDiffRun)(e))throw Error("Only run type profile_diff is supported");let c=e.result,d=(0,o.useMemo)(()=>s?.pinned_columns??[],[s]),f=(0,o.useMemo)(()=>s?.display_mode??"inline",[s]),p=(0,o.useMemo)(()=>s?.columnsRenderMode??{},[s]),g=(c?.current?.columns??[]).find(e=>"column_name"===e.name.toLowerCase()),m=g?.name??"column_name",v=(0,o.useMemo)(()=>(0,a.toDataDiffGrid)(c?.base,c?.current,{primaryKeys:[m],pinnedColumns:d,onPinnedColumnsChange:e=>{l&&l({...s,pinned_columns:e})},displayMode:f,columnsRenderMode:p,onColumnsRenderModeChanged:e=>{let t={...s?.columnsRenderMode??{},...e};l&&l({...s,columnsRenderMode:t})}}),[c,m,d,f,s,l,p]);return 0===v.columns.length?(0,t.jsx)(r.Center,{height:"100%",children:"No data"}):(0,t.jsxs)(n.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,t.jsx)(h,{run:e,children:(0,t.jsx)(C,{displayMode:f,onDisplayModeChanged:e=>{l&&l({...s,display_mode:e})}})}),(0,t.jsx)(i.ScreenshotDataGrid,{ref:u,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:v.columns,rows:v.rows,defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light"})]})}),L=(0,o.forwardRef)(({run:e,viewOptions:a,onViewOptionsChanged:s},l)=>{if(!(0,I.isProfileRun)(e))throw Error("Only run type profile_diff is supported");let u=e.result,c=u?.current,d=(0,o.useMemo)(()=>a?.pinned_columns??[],[a]),h=(0,o.useMemo)(()=>a?.columnsRenderMode??{},[a]),f=(u?.current?.columns??[]).find(e=>"column_name"===e.name.toLowerCase()),p=f?.name??"column_name",g=(0,o.useMemo)(()=>c?M(c,{primaryKeys:[p],pinnedColumns:d,onPinnedColumnsChange:e=>{s&&s({...a,pinned_columns:e})},columnsRenderMode:h,onColumnsRenderModeChanged:e=>{let t={...a?.columnsRenderMode??{},...e};s&&s({...a,columnsRenderMode:t})}}):{columns:[],rows:[]},[c,d,p,a,s,h]);return 0===g.columns.length?(0,t.jsx)(r.Center,{height:"100%",children:"No data"}):(0,t.jsx)(n.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:(0,t.jsx)(i.ScreenshotDataGrid,{ref:l,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:g.columns,rows:g.rows,defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light"})})});e.s(["ProfileDiffResultView",0,D,"ProfileResultView",0,L],57980);var V=e.i(1484),F=e.i(75155);function j({name:e,columnStatus:r,onPrimaryKeyChange:i,onPinnedColumnsChange:o,columnType:a,onColumnsRenderModeChanged:l,...u}){let c=u.primaryKeys??[],d=u.pinnedColumns??[],h=(0,R.includesIgnoreCase)(c,e),f=(0,R.includesIgnoreCase)(d,e),p=[];return(l&&(p=(0,T.columnPrecisionSelectOptions)(e,l)),"index"===e)?(0,t.jsx)(t.Fragment,{}):(0,t.jsxs)(n.Flex,{alignItems:"center",gap:"10px",className:"grid-header",children:[h&&(0,t.jsx)(k.Icon,{as:P.VscKey}),(0,t.jsx)(s.Box,{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e}),!h&&o&&(0,t.jsx)(k.Icon,{className:f?"unpin-icon":"pin-icon",display:f?"block":"none",cursor:"pointer",as:f?P.VscPinned:P.VscPin,onClick:f?()=>{let t=d.filter(t=>t!==e);o&&o(t)}:()=>{let t=[...d,e];o&&o(t)}}),!h&&"number"===a&&(0,t.jsxs)(E.Menu.Root,{children:[(0,t.jsx)(E.Menu.Trigger,{asChild:!0,children:(0,t.jsx)(S.IconButton,{"aria-label":"Options",variant:"plain",className:"!size-4 !min-w-4",children:(0,t.jsx)(P.VscKebabVertical,{})})}),(0,t.jsx)(O.Portal,{children:(0,t.jsx)(E.Menu.Positioner,{children:(0,t.jsx)(E.Menu.Content,{children:p.map(e=>(0,t.jsx)(E.Menu.Item,{value:e.value,onClick:e.onClick,children:e.value},e.value))})})})]})]})}function z(e,r,n){let i,o=n?.pinnedColumns??[],s=n?.changedOnly??!1,l=n?.displayMode??"inline",u=n?.columnsRenderMode??{},c=(0,R.dataFrameToRowObjects)(e),h=[],f=(i={},e.columns.map((e,t)=>{let r="in_a"===e.name.toLowerCase()?"IN_A":"in_b"===e.name.toLowerCase()?"IN_B":e.name,n="in_a"===e.key.toLowerCase()?"IN_A":"in_b"===e.key.toLowerCase()?"IN_B":e.key;i[r]={key:n,index:t,colType:e.type}}),i);"IN_A"in f&&(r=r.map(e=>e.toUpperCase()));let p={},g={};if(0===r.length)throw Error("Primary keys are required");let m=function(e,t){let r=[];for(let n of t){if(0>e.findIndex(e=>(0,R.includesIgnoreCase)([e.key],n)))throw Error(`Column ${n} not found`);r.push(n)}return r}(e.columns,r),v=f.IN_A.key,b=f.IN_B.key;c.forEach(t=>{let r=function(e,t,r){let n=[];if(0===t.length)return String(r._index);for(let i of t){let t=e.find(e=>(0,R.includesIgnoreCase)([e.key],i));if(null==t)throw Error(`Primary Column ${i} not found`);n.push(`${t.name}=${(0,R.getCaseInsensitive)(r,i)??""}`)}return n.join("|")}(e.columns,m,t);(0,R.getCaseInsensitive)(t,v)&&(p[r.toLowerCase()]=t),(0,R.getCaseInsensitive)(t,b)&&(g[r.toLowerCase()]=t)});let y=(0,F.mergeKeysWithStatus)(Object.keys(p),Object.keys(g)),x={added:0,removed:0,modified:0},w=Object.entries(y).map(([t])=>{let n=p[t],i=g[t],o={_index:(0,R.keyToNumber)(t),__status:void 0};if(n&&e.columns.forEach(e=>{if((0,R.includesIgnoreCase)(r,e.key)){o[e.key]=n[e.key];return}o[`base__${e.key}`]=n[e.key]}),i&&e.columns.forEach(e=>{(0,R.includesIgnoreCase)(r,e.key)||(o[`current__${e.key}`]=i[e.key])}),n)if(i)for(let[e,t]of Object.entries(f))"index"!==e&&!(0,R.includesIgnoreCase)(r,e)&&(d.default.isEqual(n[t.key],i[t.key])||(o.__status="modified",t.status="modified"));else o.__status="removed",x.removed++;else o.__status="added",x.added++;return"modified"===o.__status&&x.modified++,o});s&&(w=w.filter(e=>"added"===e.__status||"removed"===e.__status||"modified"===e.__status));let _=(e,i,o,s="raw")=>{let u="added"===i?"diff-header-added":"removed"===i?"diff-header-removed":void 0;return"inline"===l?{headerCellClass:u,name:(0,t.jsx)(j,{name:e,columnStatus:i,primaryKeys:r,columnType:o,...n}),key:e,renderCell:a.inlineRenderCell,columnType:o,columnRenderMode:s}:{headerCellClass:u,name:(0,t.jsx)(j,{name:e,columnStatus:i,primaryKeys:r,columnType:o,...n}),children:[{key:`base__${e}`,name:n?.baseTitle??"Base",renderEditCell:V.textEditor,headerCellClass:u,cellClass:t=>{let r=t.__status;if("removed"===r)return"diff-cell-removed";if("added"===r)return"diff-cell-added";if("added"===i);else if("removed"===i);else if(!d.default.isEqual(t[`base__${e}`],t[`current__${e}`]))return"diff-cell-removed"},renderCell:a.defaultRenderCell,columnType:o,columnRenderMode:s},{key:`current__${e}`,name:n?.currentTitle??"Current",renderEditCell:V.textEditor,headerCellClass:u,cellClass:t=>{let r=t.__status;if("removed"===r)return"diff-cell-removed";if("added"===r)return"diff-cell-added";if("added"===i);else if("removed"===i);else if(!d.default.isEqual(t[`base__${e}`],t[`current__${e}`]))return"diff-cell-added"},renderCell:a.defaultRenderCell,columnType:o,columnRenderMode:s}]}};return r.forEach(e=>{let i=e.toLowerCase(),o=f[i].status??"",s=f[i].colType;h.push({key:i,name:(0,t.jsx)(j,{name:i,columnStatus:o,primaryKeys:r.map(e=>e.toLowerCase()),columnType:"unknown",...n}),frozen:!0,cellClass:e=>{if(e.__status)return`diff-header-${e.__status}`},renderCell:a.defaultRenderCell,columnType:s,columnRenderMode:u[i]})}),o.forEach(e=>{let t=e.toLowerCase(),n=f[t].status??"",i=f[t].colType;(0,R.includesIgnoreCase)(r,t)||h.push(_(t,n,i,u[t]))}),Object.entries(f).forEach(([e,t])=>{let n=t.status??"";"IN_A"===e||"IN_B"===e||(0,R.includesIgnoreCase)(r,e)||(0,R.includesIgnoreCase)(o,e)||s&&x.modified>0&&"added"!==n&&"removed"!==n&&"modified"!==n||h.push(_(e.toLowerCase(),n,t.colType,u[e.toLowerCase()]))}),{columns:h,rows:w}}e.s(["toValueDiffGrid",()=>z],67652),e.s([],7375),e.i(7375),e.s([],57211),e.i(57211);var B=e.i(39414);let[H,W]=(0,B.createContext)({name:"CheckboxContext",hookName:"useCheckboxContext",providerName:"<CheckboxProvider />"}),U=e=>e.children(W());var $=e.i(52713),q=e.i(63761);let G=(0,o.forwardRef)((e,r)=>{let n=W(),i=(0,$.mergeProps)(n.getControlProps(),e);return(0,t.jsx)(q.ark.div,{...i,ref:r})});G.displayName="CheckboxControl";var K=e.i(46067),Y=e.i(94548),X=e.i(92109),Q=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),Z=null,J=new Set,ee=new Map,et=!1,er=!1,en={Tab:!0,Escape:!0};function ei(e,t){for(let r of J)r(e,t)}function eo(e){et=!0,e.metaKey||!(0,X.isMac)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(Z="keyboard",ei("keyboard",e))}function ea(e){Z="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(et=!0,ei("pointer",e))}function es(e){(0,X.isVirtualClick)(e)&&(et=!0,Z="virtual")}function el(e){let t=(0,X.getEventTarget)(e);t!==(0,X.getWindow)(t)&&t!==(0,X.getDocument)(t)&&(et||er||(Z="virtual",ei("virtual",e)),et=!1,er=!1)}function eu(){et=!1,er=!0}function ec(){return Z}function ed(){return"keyboard"===Z}function eh(e={}){let{isTextInput:t,autoFocus:r,onChange:n,root:i}=e;!function(e){if("undefined"==typeof window||ee.get((0,X.getWindow)(e)))return;let t=(0,X.getWindow)(e),r=(0,X.getDocument)(e),n=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){Z="virtual",ei("virtual",null),et=!0,n.apply(this,arguments)}})}catch{}r.addEventListener("keydown",eo,!0),r.addEventListener("keyup",eo,!0),r.addEventListener("click",es,!0),t.addEventListener("focus",el,!0),t.addEventListener("blur",eu,!1),void 0!==t.PointerEvent?(r.addEventListener("pointerdown",ea,!0),r.addEventListener("pointermove",ea,!0),r.addEventListener("pointerup",ea,!0)):(r.addEventListener("mousedown",ea,!0),r.addEventListener("mousemove",ea,!0),r.addEventListener("mouseup",ea,!0)),t.addEventListener("beforeunload",()=>{((e,t)=>{let r=(0,X.getWindow)(e),n=(0,X.getDocument)(e),i=ee.get(r);if(i){try{Object.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}n.removeEventListener("keydown",eo,!0),n.removeEventListener("keyup",eo,!0),n.removeEventListener("click",es,!0),r.removeEventListener("focus",el,!0),r.removeEventListener("blur",eu,!1),void 0!==r.PointerEvent?(n.removeEventListener("pointerdown",ea,!0),n.removeEventListener("pointermove",ea,!0),n.removeEventListener("pointerup",ea,!0)):(n.removeEventListener("mousedown",ea,!0),n.removeEventListener("mousemove",ea,!0),n.removeEventListener("mouseup",ea,!0)),ee.delete(r)}})(e)},{once:!0}),ee.set(t,{focus:n})}(i),n?.({isFocusVisible:r||ed(),modality:Z});let o=(e,r)=>{var i;let o,a;i=!!t,o=r?(0,X.getEventTarget)(r):null,a=(0,X.getWindow)(o),(i=i||o instanceof a.HTMLInputElement&&!Q.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable)&&"keyboard"===e&&r instanceof a.KeyboardEvent&&!Reflect.has(en,r.key)||n?.({isFocusVisible:ed(),modality:e})};return J.add(o),()=>{J.delete(o)}}e.s(["getInteractionModality",()=>ec,"isFocusVisible",()=>ed,"trackFocusVisible",()=>eh],31099);var ef=e.i(92242),ep=e.i(58287),eg=(0,Y.createAnatomy)("checkbox").parts("root","label","control","indicator"),em=eg.build(),ev=e=>e.ids?.root??`checkbox:${e.id}`,eb=e=>e.ids?.label??`checkbox:${e.id}:label`,ey=e=>e.ids?.hiddenInput??`checkbox:${e.id}:input`,ex=e=>e.getById(ey(e)),{not:ew}=(0,$.createGuards)(),e_=(0,$.createMachine)({props:({props:e})=>({value:"on",...e,defaultChecked:e.defaultChecked??!1}),initialState:()=>"ready",context:({prop:e,bindable:t})=>({checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(t){e("onCheckedChange")?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}),watch({track:e,context:t,prop:r,action:n}){e([()=>r("disabled")],()=>{n(["removeFocusIfNeeded"])}),e([()=>t.get("checked")],()=>{n(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:ew("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:ew("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:e})=>eC(e.get("checked")),checked:({context:e})=>{var t;return!eC(t=e.get("checked"))&&!!t},disabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:r}){if(!t("disabled"))return(0,X.trackPress)({pointerNode:r.getById(ev(r)),keyboardNode:ex(r),isValidKey:e=>" "===e.key,onPress:()=>e.set("active",!1),onPressStart:()=>e.set("active",!0),onPressEnd:()=>e.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("disabled"))return eh({root:t.getRootNode?.()})},trackFormControlState:({context:e,scope:t})=>(0,X.trackFormControl)(ex(t),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){e.set("checked",e.initial("checked"))}})},actions:{setContext({context:e,event:t}){for(let r in t.context)e.set(r,t.context[r])},syncInputElement({context:e,computed:t,scope:r}){let n=ex(r);n&&((0,X.setElementChecked)(n,t("checked")),n.indeterminate=eC(e.get("checked")))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.get("focused")&&(e.set("focused",!1),e.set("focusVisible",!1))},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e,computed:t}){let r=!!eC(t("checked"))||!t("checked");e.set("checked",r)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{let r=ex(t);(0,X.dispatchInputCheckedEvent)(r,{checked:e("checked")})})}}}});function eC(e){return"indeterminate"===e}var ek=(0,ef.createProps)()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);(0,ep.createSplitProps)(ek);let eS=eg.extendWith("group");e.s(["checkboxAnatomy",()=>eS],41378);var eE=e.i(12446);let[eO,eI]=(0,B.createContext)({name:"CheckboxGroupContext",hookName:"useCheckboxGroupContext",providerName:"<CheckboxGroupProvider />",strict:!1}),eP=(0,o.forwardRef)((e,r)=>{let[n,i]=(0,K.createSplitProps)()(e,["defaultValue","value","onValueChange","disabled","invalid","readOnly","name"]),a=function(e={}){let{defaultValue:t,value:r,onValueChange:n,disabled:i,readOnly:a,name:s,invalid:l}=e,u=!(i||a),[c,d]=function(e){let{value:t,onChange:r,defaultValue:n}=e,[i,a]=(0,o.useState)(n),s=void 0!==t;return[s?t:i,(0,o.useCallback)(e=>(s||a(e),r?.(e)),[s,r])]}({value:r,defaultValue:t||[],onChange:(0,eE.useEvent)(n,{sync:!0})}),h=e=>c.some(t=>String(t)===String(e)),f=e=>{h(e)?g(e):p(e)},p=e=>{!u||h(e)||d(c.concat(e))},g=e=>{u&&d(c.filter(t=>String(t)!==String(e)))};return{isChecked:h,value:c,name:s,disabled:!!i,readOnly:!!a,invalid:!!l,setValue:d,addValue:p,toggleValue:f,getItemProps:e=>({checked:null!=e.value?h(e.value):void 0,onCheckedChange(){null!=e.value&&f(e.value)},name:s,disabled:i,readOnly:a,invalid:l})}}(n);return(0,t.jsx)(eO,{value:a,children:(0,t.jsx)(q.ark.div,{ref:r,role:"group",...i,...eS.build().group.attrs})})});eP.displayName="CheckboxGroup";let eT=(0,o.forwardRef)((e,r)=>{let[n,i]=(0,K.createSplitProps)()(e,["value"]);return(0,t.jsx)(eO,{value:n.value,children:(0,t.jsx)(q.ark.div,{ref:r,role:"group",...i,...eS.build().group.attrs})})});eT.displayName="CheckboxGroupProvider";var eR=e.i(40292);let eA=(0,o.forwardRef)((e,r)=>{let n=W(),i=(0,$.mergeProps)(n.getHiddenInputProps(),e),o=(0,eR.useFieldContext)();return(0,t.jsx)(q.ark.input,{"aria-describedby":o?.ariaDescribedby,...i,ref:r})});eA.displayName="CheckboxHiddenInput";let eM=(0,o.forwardRef)((e,r)=>{let{indeterminate:n,...i}=e,o=W(),a=(0,$.mergeProps)(o.getIndicatorProps(),i),s=n?o.indeterminate:o.checked;return(0,t.jsx)(q.ark.div,{...a,hidden:!s,ref:r})});eM.displayName="CheckboxIndicator";let eN=(0,o.forwardRef)((e,r)=>{let n=W(),i=(0,$.mergeProps)(n.getLabelProps(),e);return(0,t.jsx)(q.ark.span,{...i,ref:r})});eN.displayName="CheckboxLabel";var eD=e.i(61697),eL=e.i(21173),eV=e.i(64614);let eF=(0,o.forwardRef)((e,r)=>{let[n,i]=(0,K.createSplitProps)()(e,["checked","defaultChecked","disabled","form","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]),a=((e={})=>{let t=eI(),r=(0,eR.useFieldContext)(),n=(0,o.useMemo)(()=>(0,$.mergeProps)(e,t?.getItemProps({value:e.value})??{}),[e,t]),i=(0,o.useId)(),{getRootNode:a}=(0,eL.useEnvironmentContext)(),{dir:s}=(0,eV.useLocaleContext)(),l={id:i,ids:{label:r?.ids.label,hiddenInput:r?.ids.control},dir:s,disabled:r?.disabled,readOnly:r?.readOnly,invalid:r?.invalid,required:r?.required,getRootNode:a,...n};return function(e,t){let{send:r,context:n,prop:i,computed:o,scope:a}=e,s=!!i("disabled"),l=!!i("readOnly"),u=!!i("required"),c=!!i("invalid"),d=!s&&n.get("focused"),h=!s&&n.get("focusVisible"),f=o("checked"),p=o("indeterminate"),g=n.get("checked"),m={"data-active":(0,X.dataAttr)(n.get("active")),"data-focus":(0,X.dataAttr)(d),"data-focus-visible":(0,X.dataAttr)(h),"data-readonly":(0,X.dataAttr)(l),"data-hover":(0,X.dataAttr)(n.get("hovered")),"data-disabled":(0,X.dataAttr)(s),"data-state":p?"indeterminate":f?"checked":"unchecked","data-invalid":(0,X.dataAttr)(c),"data-required":(0,X.dataAttr)(u)};return{checked:f,disabled:s,indeterminate:p,focused:d,checkedState:g,setChecked(e){r({type:"CHECKED.SET",checked:e,isTrusted:!1})},toggleChecked(){r({type:"CHECKED.TOGGLE",checked:f,isTrusted:!1})},getRootProps:()=>t.label({...em.root.attrs,...m,dir:i("dir"),id:ev(a),htmlFor:ey(a),onPointerMove(){s||r({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||r({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(e){(0,X.getEventTarget)(e)===ex(a)&&e.stopPropagation()}}),getLabelProps:()=>t.element({...em.label.attrs,...m,dir:i("dir"),id:eb(a)}),getControlProps:()=>t.element({...em.control.attrs,...m,dir:i("dir"),id:a.ids?.control??`checkbox:${a.id}:control`,"aria-hidden":!0}),getIndicatorProps:()=>t.element({...em.indicator.attrs,...m,dir:i("dir"),hidden:!p&&!f}),getHiddenInputProps:()=>t.input({id:ey(a),type:"checkbox",required:i("required"),defaultChecked:f,disabled:s,"aria-labelledby":eb(a),"aria-invalid":c,name:i("name"),form:i("form"),value:i("value"),style:X.visuallyHiddenStyle,onFocus(){r({type:"CONTEXT.SET",context:{focused:!0,focusVisible:ed()}})},onBlur(){r({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(e){l?e.preventDefault():r({type:"CHECKED.SET",checked:e.currentTarget.checked,isTrusted:!0})}})}}((0,eD.useMachine)(e_,l),eD.normalizeProps)})(n),s=(0,$.mergeProps)(a.getRootProps(),i);return(0,t.jsx)(H,{value:a,children:(0,t.jsx)(q.ark.label,{...s,ref:r})})});eF.displayName="CheckboxRoot";let ej=(0,o.forwardRef)((e,r)=>{let[{value:n},i]=(0,K.createSplitProps)()(e,["value"]),o=(0,$.mergeProps)(n.getRootProps(),i);return(0,t.jsx)(H,{value:n,children:(0,t.jsx)(q.ark.label,{...o,ref:r})})});ej.displayName="CheckboxRootProvider",e.s(["Context",()=>U,"Control",()=>G,"Group",()=>eP,"GroupProvider",()=>eT,"HiddenInput",()=>eA,"Indicator",()=>eM,"Label",()=>eN,"Root",()=>eF,"RootProvider",()=>ej],36786);var ez=e.i(36786),ez=ez,eB=e.i(45362),eH=e.i(30852);let eW=(0,o.forwardRef)(function(e,r){let n=(0,p.useRecipe)({key:"checkmark",recipe:e.recipe}),[i,o]=n.splitVariantProps(e),{checked:a,indeterminate:s,disabled:l,unstyled:u,children:c,...d}=o,h=u?eH.EMPTY_STYLES:n(i);return(0,t.jsx)(g.chakra.svg,{ref:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3px",strokeLinecap:"round",strokeLinejoin:"round","data-state":s?"indeterminate":a?"checked":"unchecked","data-disabled":(0,m.dataAttr)(l),css:[h,e.css],...d,children:s?(0,t.jsx)("path",{d:"M5 12h14"}):a?(0,t.jsx)("polyline",{points:"20 6 9 17 4 12"}):null})});eW.displayName="Checkmark";let{withProvider:eU,withContext:e$,useStyles:eq,PropsProvider:eG}=(0,eB.createSlotRecipeContext)({key:"checkbox"}),eK=eU(ez.RootProvider,"root",{forwardAsChild:!0}),eY=eU(ez.Root,"root",{forwardAsChild:!0}),eX=e$(ez.Label,"label",{forwardAsChild:!0}),eQ=(0,o.forwardRef)(function(e,r){let{checked:n,indeterminate:i,...o}=e,a=W(),s=eq();return n&&a.checked?(0,t.jsx)(g.chakra.svg,{ref:r,asChild:!0,...o,css:[s.indicator,e.css],children:n}):i&&a.indeterminate?(0,t.jsx)(g.chakra.svg,{ref:r,asChild:!0,...o,css:[s.indicator,e.css],children:i}):(0,t.jsx)(eW,{ref:r,checked:a.checked,indeterminate:a.indeterminate,disabled:a.disabled,unstyled:!0,...o,css:[s.indicator,e.css]})}),eZ=e$(ez.Control,"control",{forwardAsChild:!0,defaultProps:{children:(0,t.jsx)(eQ,{})}}),eJ=(0,g.chakra)(ez.Group,{base:{display:"flex",flexDirection:"column",gap:"1.5"}},{forwardAsChild:!0}),e0=ez.Context,e1=ez.HiddenInput;e.s(["Context",()=>e0,"Control",()=>eZ,"Group",()=>eJ,"HiddenInput",()=>e1,"Indicator",()=>eQ,"Label",()=>eX,"PropsProvider",()=>eG,"Root",()=>eY,"RootProvider",()=>eK],37213);var e2=e.i(37213);e.s(["Checkbox",0,e2],6850);var e2=e2;let e5=({changedOnly:e,onChange:r})=>(0,t.jsxs)(e2.Root,{size:"xs",checked:e,onCheckedChange:()=>{r()},children:[(0,t.jsx)(e2.HiddenInput,{}),(0,t.jsx)(e2.Control,{}),(0,t.jsx)(e2.Label,{children:"Changed only"})]});e.s(["ChangedOnlyCheckbox",0,e5],51297);let e3=(0,o.forwardRef)(({run:e,onAddToChecklist:s,viewOptions:l,onViewOptionsChanged:u,baseTitle:c,currentTitle:d},f)=>{let p=(0,o.useMemo)(()=>l?.primary_keys??[],[l]),g=(0,o.useMemo)(()=>l?.changed_only??!1,[l]),m=(0,o.useMemo)(()=>l?.pinned_columns??[],[l]),v=(0,o.useMemo)(()=>l?.display_mode??"inline",[l]),b=(0,o.useMemo)(()=>l?.columnsRenderMode??{},[l]);if("query_diff"!==e.type)throw Error("QueryDiffResult view should be rendered as query_diff");let y=(0,o.useMemo)(()=>(0,a.toDataDiffGrid)(e.result?.base,e.result?.current,{changedOnly:g,primaryKeys:p,onPrimaryKeyChange:e=>{u&&u({...l,primary_keys:e})},pinnedColumns:m,onPinnedColumnsChange:e=>{u&&u({...l,pinned_columns:e})},columnsRenderMode:b,onColumnsRenderModeChanged:e=>{let t={...l?.columnsRenderMode??{},...e};u&&u({...l,columnsRenderMode:t})},baseTitle:c,currentTitle:d,displayMode:v}),[e,l,g,p,m,v,u,c,d,b]),x=(0,o.useMemo)(()=>{let e=p.join(", ");return y.invalidPKeyBase&&y.invalidPKeyCurrent?`Warning: The primary key '${e}' is not unique in the base and current environments`:y.invalidPKeyBase?`Warning: The primary key '${e}' is not unique in the base environment`:y.invalidPKeyCurrent?`Warning: The primary key '${e}' is not unique in the current environment`:void 0},[y.invalidPKeyBase,y.invalidPKeyCurrent,p]),w=e.result?.current?.limit??0,_=w>0&&(e.result?.current?.more||e.result?.base?.more)?`Warning: Displayed results are limited to ${w.toLocaleString()} records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set.`:null,k=[];return(x&&k.push(x),_&&k.push(_),0===y.columns.length)?(0,t.jsx)(r.Center,{height:"100%",children:"No data"}):(0,t.jsxs)(n.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,t.jsxs)(h,{run:e,viewOptions:l,onViewOptionsChanged:u,warnings:k,children:[(0,t.jsx)(C,{displayMode:v,onDisplayModeChanged:e=>{u&&u({...l,display_mode:e})}}),(0,t.jsx)(e5,{changedOnly:l?.changed_only,onChange:()=>{let e=!l?.changed_only;u&&u({...l,changed_only:e})}})]}),(0,t.jsx)(i.ScreenshotDataGrid,{ref:f,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:y.columns,rows:y.rows,renderers:{noRowsFallback:(0,t.jsx)(i.EmptyRowsRenderer,{emptyMessage:"No mismatched rows"})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light"})]})}),e4=(0,o.forwardRef)(({run:e,viewOptions:a,onViewOptionsChanged:s,baseTitle:l,currentTitle:u},c)=>{if("query_diff"!==e.type)throw Error("QueryDiffResult view should be rendered as query_diff");let d=(0,o.useMemo)(()=>a?.changed_only??!1,[a]),f=(0,o.useMemo)(()=>a?.pinned_columns??[],[a]),p=(0,o.useMemo)(()=>a?.display_mode??"inline",[a]),g=(0,o.useMemo)(()=>a?.columnsRenderMode??{},[a]),m=(0,o.useMemo)(()=>{if(!e.result?.diff||!e.params?.primary_keys)return{columns:[],rows:[]};let t=e.params.primary_keys;return z(e.result.diff,t,{changedOnly:d,pinnedColumns:f,onPinnedColumnsChange:e=>{s&&s({...a,pinned_columns:e})},baseTitle:l,currentTitle:u,displayMode:p,columnsRenderMode:g,onColumnsRenderModeChanged:e=>{let t={...a?.columnsRenderMode??{},...e};s&&s({...a,columnsRenderMode:t})}})},[e,a,d,f,p,s,l,u,g]),v=e.result?.diff?.limit??0,b=v>0&&e.result?.diff?.more?`Warning: Displayed results are limited to ${v.toLocaleString()} records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set.`:null,y=[];return(b&&y.push(b),0===m.columns.length)?(0,t.jsx)(r.Center,{height:"100%",children:"No data"}):d&&0===m.rows.length?(0,t.jsxs)(n.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,t.jsx)(h,{run:e,viewOptions:a,onViewOptionsChanged:s,warnings:y}),(0,t.jsx)(r.Center,{height:"100%",children:"No change"})]}):(0,t.jsxs)(n.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,t.jsxs)(h,{run:e,viewOptions:a,onViewOptionsChanged:s,warnings:y,children:[(0,t.jsx)(C,{displayMode:p,onDisplayModeChanged:e=>{s&&s({...a,display_mode:e})}}),(0,t.jsx)(e5,{changedOnly:a?.changed_only,onChange:()=>{let e=!a?.changed_only;s&&s({...a,changed_only:e})}})]}),(0,t.jsx)(i.ScreenshotDataGrid,{ref:c,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:m.columns,rows:m.rows,renderers:{noRowsFallback:(0,t.jsx)(i.EmptyRowsRenderer,{emptyMessage:"No mismatched rows"})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light"})]})}),e6=(0,o.forwardRef)((e,r)=>{let n,i;return(e.run.params&&e.run.params.current_model&&(n="Original",i="Editor"),e.run.result&&"diff"in e.run.result&&null!=e.run.result.diff)?(0,t.jsx)(e4,{...e,ref:r,baseTitle:n,currentTitle:i}):(0,t.jsx)(e3,{...e,ref:r,baseTitle:n,currentTitle:i})});function e8(e,t){if(e<t){let r=(t-e)/e*100;return`+${r>=.1?r.toFixed(1):" <0.1 "}%`}if(!(e>t))return"0 %";{let r=(e-t)/e*100;return`-${r>=.1?r.toFixed(1):" <0.1 "}%`}}e.s(["QueryDiffResultView",0,e6],64485),e.s(["deltaPercentageString",()=>e8],52058);var e7=e.i(39269);let e9=(0,o.forwardRef)(function({run:e},o){if(!(0,I.isRowCountDiffRun)(e))throw Error("Run type must be row_count_diff");function a(e){if(e.base===e.current);else if(e.base<e.current||"N/A"===e.base)return"column-body-added";else if(e.base>e.current||"N/A"===e.current)return"column-body-removed";return"column-body-normal"}let s=e.result??{},l=Object.keys(e.result??{}).map(e=>{let t=s[e],r=(0,e7.default)(t.base)?t.base:null,n=(0,e7.default)(t.curr)?t.curr:null,i="=";return null!==r&&null!==n?i=r!==n?e8(r,n):"=":r===n?i="N/A":null===r?i="Added":null===n&&(i="Removed"),{name:e,base:r??"N/A",current:n??"N/A",delta:i,__status:void 0}});return 0===l.length?(0,t.jsx)(r.Center,{bg:"rgb(249,249,249)",height:"100%",children:"No nodes matched"}):(0,t.jsx)(n.Flex,{direction:"column",children:Object.keys(s).length>0&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.ScreenshotDataGrid,{ref:o,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto",fontSize:"10pt",borderWidth:1},columns:[{key:"name",name:"Name",cellClass:a},{key:"base",name:"Base Rows",cellClass:a},{key:"current",name:"Current Rows",cellClass:a},{key:"delta",name:"Delta",cellClass:a}],rows:l,renderers:{noRowsFallback:(0,t.jsx)(i.EmptyRowsRenderer,{})},className:"rdg-light"})})})}),te=(0,o.forwardRef)(function({run:e},o){if(!(0,I.isRowCountRun)(e))throw Error("Run type must be row_count");let a=e.result??{},s=Object.keys(e.result??{}).map(e=>{let t=a[e];return{name:e,current:((0,e7.default)(t.curr)?t.curr:null)??"N/A",__status:void 0}});return 0===s.length?(0,t.jsx)(r.Center,{bg:"rgb(249,249,249)",height:"100%",children:"No nodes matched"}):(0,t.jsx)(n.Flex,{direction:"column",children:Object.keys(a).length>0&&(0,t.jsx)(i.ScreenshotDataGrid,{ref:o,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto",fontSize:"10pt",borderWidth:1},columns:[{key:"name",name:"Name"},{key:"current",name:"Row Count"}],rows:s,renderers:{noRowsFallback:(0,t.jsx)(i.EmptyRowsRenderer,{})},className:"rdg-light"})})});e.s(["RowCountDiffResultView",0,e9,"RowCountResultView",0,te],22430);var tt=e.i(21613),tr=e.i(31172),tn=e.i(905);function ti({params:e,onParamsChanged:r,setIsReadyToExecute:n}){let{columns:i,isLoading:a,error:l}=(0,tn.default)(e.model),u=i.map(e=>e.name);return((0,o.useEffect)(()=>{n(!!e.column_name)},[e,n]),a)?(0,t.jsx)(s.Box,{children:"Loading..."}):0===u.length||l?(0,t.jsx)(s.Box,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,t.jsx)(s.Box,{m:"16px",children:(0,t.jsxs)(tt.Field.Root,{children:[(0,t.jsx)(tt.Field.Label,{children:"Pick a column to show top-k"}),(0,t.jsx)(tr.NativeSelect.Root,{children:(0,t.jsx)(tr.NativeSelect.Field,{placeholder:"Select column",value:e.column_name,onChange:t=>{let n=t.target.value;r({...e,column_name:n})},children:u.map(e=>(0,t.jsx)("option",{value:e,className:"no-track-pii-safe",children:e},e))})})]})})}e.s(["TopKDiffForm",()=>ti],40159)},35043,e=>{"use strict";let{withContext:t,PropsProvider:r}=(0,e.i(30315).createRecipeContext)({key:"heading"}),n=t("h2");n.displayName="Heading",e.s(["Heading",()=>n])},81955,35207,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(30315),i=e.i(5376),o=e.i(41344);function a(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}e.s(["omit",()=>a],35207);var s=e.i(6210);let{useRecipeResult:l,PropsProvider:u}=(0,n.createRecipeContext)({key:"separator"}),c=(0,r.forwardRef)(function(e,r){let{styles:n,className:u,props:c}=l(e),d=e.orientation||"horizontal";return(0,t.jsx)(i.chakra.span,{ref:r,role:(0,s.isString)(d)?"separator":"presentation","aria-orientation":(0,s.isString)(d)?d:void 0,...a(c,["orientation"]),className:(0,o.cx)(u,e.className),css:[n,e.css]})});c.displayName="Separator",e.s(["Separator",()=>c],81955)},56877,70829,46798,69236,e=>{"use strict";var t=e.i(15839),r=e.i(42436),n=e.i(84615),i=e.i(35043),o=e.i(61479),a=e.i(32219),s=e.i(22429),l=e.i(18128),u=e.i(81955),c=e.i(23331),d=e.i(64789),h=e.i(73478),f=e.i(91227),p=e.i(65521);e.s([],71074),e.i(71074),e.s([],85897),e.i(85897);var g=e.i(52713),m=e.i(63761);let[v,b]=(0,e.i(39414).createContext)({name:"TooltipContext",hookName:"useTooltipContext",providerName:"<TooltipProvider />"}),y=(0,d.forwardRef)((e,r)=>{let n=b(),i=(0,g.mergeProps)(n.getArrowProps(),e);return(0,t.jsx)(m.ark.div,{...i,ref:r})});y.displayName="TooltipArrow";let x=(0,d.forwardRef)((e,r)=>{let n=b(),i=(0,g.mergeProps)(n.getArrowTipProps(),e);return(0,t.jsx)(m.ark.div,{...i,ref:r})});x.displayName="TooltipArrowTip";var w=e.i(24074),_=e.i(96733);let C=(0,d.forwardRef)((e,r)=>{let n=b(),i=(0,_.usePresenceContext)(),o=(0,g.mergeProps)(n.getContentProps(),i.getPresenceProps(),e);return i.unmounted?null:(0,t.jsx)(m.ark.div,{...o,ref:(0,w.composeRefs)(i.ref,r)})});C.displayName="TooltipContent";let k=e=>e.children(b()),S=(0,d.forwardRef)((e,r)=>{let n=b(),i=(0,g.mergeProps)(n.getPositionerProps(),e);return(0,_.usePresenceContext)().unmounted?null:(0,t.jsx)(m.ark.div,{...i,ref:r})});S.displayName="TooltipPositioner";var E=e.i(98239),O=e.i(67077),I=e.i(61697),P=e.i(94548),T=e.i(92109),R=e.i(31099),A=e.i(10741),M=e.i(58287),N=e.i(92242),D=(0,P.createAnatomy)("tooltip").parts("trigger","arrow","arrowTip","positioner","content"),L=D.build(),V=e=>e.ids?.trigger??`tooltip:${e.id}:trigger`,F=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,j=e=>e.getById(V(e)),z=e=>e.getById(F(e)),B=(0,M.createStore)({id:null});function H(e,t){let{state:r,context:n,send:i,scope:o,prop:a,event:s}=e,l=a("id"),u=!!a("aria-label"),c=r.matches("open","closing"),d=V(o),h=o.ids?.content??`tooltip:${o.id}:content`,f=a("disabled"),p=(0,A.getPlacementStyles)({...a("positioning"),placement:n.get("currentPlacement")});return{open:c,setOpen(e){r.matches("open","closing")!==e&&i({type:e?"open":"close"})},reposition(e={}){i({type:"positioning.set",options:e})},getTriggerProps:()=>t.button({...L.trigger.attrs,id:d,dir:a("dir"),"data-expanded":(0,T.dataAttr)(c),"data-state":c?"open":"closed","aria-describedby":c?h:void 0,onClick(e){e.defaultPrevented||f||a("closeOnClick")&&i({type:"close",src:"trigger.click"})},onFocus(e){queueMicrotask(()=>{e.defaultPrevented||f||"trigger.pointerdown"===s.src||(0,R.isFocusVisible)()&&i({type:"open",src:"trigger.focus"})})},onBlur(e){e.defaultPrevented||f||l===B.get("id")&&i({type:"close",src:"trigger.blur"})},onPointerDown(e){e.defaultPrevented||f||!(0,T.isLeftClick)(e)||a("closeOnPointerDown")&&l===B.get("id")&&i({type:"close",src:"trigger.pointerdown"})},onPointerMove(e){e.defaultPrevented||f||"touch"!==e.pointerType&&i({type:"pointer.move"})},onPointerLeave(){f||i({type:"pointer.leave"})},onPointerCancel(){f||i({type:"pointer.leave"})}}),getArrowProps:()=>t.element({id:o.ids?.arrow??`tooltip:${o.id}:arrow`,...L.arrow.attrs,dir:a("dir"),style:p.arrow}),getArrowTipProps:()=>t.element({...L.arrowTip.attrs,dir:a("dir"),style:p.arrowTip}),getPositionerProps:()=>t.element({id:F(o),...L.positioner.attrs,dir:a("dir"),style:p.floating}),getContentProps:()=>t.element({...L.content.attrs,dir:a("dir"),hidden:!c,"data-state":c?"open":"closed",role:u?void 0:"tooltip",id:u?void 0:h,"data-placement":n.get("currentPlacement"),onPointerEnter(){i({type:"content.pointer.move"})},onPointerLeave(){i({type:"content.pointer.leave"})},style:{pointerEvents:a("interactive")?"auto":"none"}})}}var{and:W,not:U}=(0,g.createGuards)(),$=(0,g.createMachine)({initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",props({props:e}){let t=e.closeOnClick??!0,r=e.closeOnPointerDown??t;return{id:"x",openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:r,closeOnClick:t,positioning:{placement:"bottom",...e.positioning}}},effects:["trackFocusVisible","trackStore"],context:({bindable:e})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:!1}))}),watch({track:e,action:t,prop:r}){e([()=>r("disabled")],()=>{t(["closeIfDisabled"])}),e([()=>r("open")],()=>{t(["toggleVisibility"])})},states:{closed:{entry:["clearGlobalId"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":{actions:["clearPointerMoveOpened"]},"pointer.move":[{guard:W("noVisibleTooltip",U("hasPointerMoveOpened")),target:"opening"},{guard:U("hasPointerMoveOpened"),target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}]}},opening:{effects:["trackScroll","trackPointerlockChange","waitForOpenDelay"],on:{"after.openDelay":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"controlled.open":{target:"open"},"controlled.close":{target:"closed"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":[{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose","toggleVisibility"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],close:[{guard:"isOpenControlled",actions:["invokeOnClose","toggleVisibility"]},{target:"closed",actions:["invokeOnClose"]}]}},open:{effects:["trackEscapeKey","trackScroll","trackPointerlockChange","trackPositioning"],entry:["setGlobalId"],on:{"controlled.close":{target:"closed"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.leave":[{guard:"isVisible",target:"closing",actions:["clearPointerMoveOpened"]},{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],"content.pointer.leave":{guard:"isInteractive",target:"closing"},"positioning.set":{actions:["reposition"]}}},closing:{effects:["trackPositioning","waitForCloseDelay"],on:{"after.closeDelay":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"controlled.close":{target:"closed"},"controlled.open":{target:"open"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.move":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen","toggleVisibility"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"content.pointer.move":{guard:"isInteractive",target:"open"},"positioning.set":{actions:["reposition"]}}}},implementations:{guards:{noVisibleTooltip:()=>null===B.get("id"),isVisible:({prop:e})=>e("id")===B.get("id"),isInteractive:({prop:e})=>!!e("interactive"),hasPointerMoveOpened:({context:e})=>e.get("hasPointerMoveOpened"),isOpenControlled:({prop:e})=>void 0!==e("open")},actions:{setGlobalId:({prop:e})=>{B.set("id",e("id"))},clearGlobalId:({prop:e})=>{e("id")===B.get("id")&&B.set("id",null)},invokeOnOpen:({prop:e})=>{e("onOpenChange")?.({open:!0})},invokeOnClose:({prop:e})=>{e("onOpenChange")?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e("disabled")&&t({type:"close",src:"disabled.change"})},reposition:({context:e,event:t,prop:r,scope:n})=>{if("positioning.set"===t.type)return(0,A.getPlacement)(j(n),()=>z(n),{...r("positioning"),...t.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},toggleVisibility:({prop:e,event:t,send:r})=>{queueMicrotask(()=>{r({type:e("open")?"controlled.open":"controlled.close",previousEvent:t})})},setPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!0)},clearPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!1)}},effects:{trackFocusVisible:({scope:e})=>(0,R.trackFocusVisible)({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:r})=>(e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement),(0,A.getPlacement)(j(r),()=>z(r),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>{let r=t.getDoc();return(0,T.addDomEvent)(r,"pointerlockchange",()=>e({type:"close",src:"pointerlock:change"}),!1)},trackScroll:({send:e,prop:t,scope:r})=>{if(!t("closeOnScroll"))return;let n=j(r);if(!n)return;let i=(0,T.getOverflowAncestors)(n).map(t=>(0,T.addDomEvent)(t,"scroll",()=>{e({type:"close",src:"scroll"})},{passive:!0,capture:!0}));return()=>{i.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let r;return queueMicrotask(()=>{r=B.subscribe(()=>{B.get("id")!==e("id")&&t({type:"close",src:"id.change"})})}),()=>r?.()},trackEscapeKey:({send:e,prop:t})=>{if(t("closeOnEscape"))return(0,T.addDomEvent)(document,"keydown",t=>{(0,T.isComposingEvent)(t)||"Escape"===t.key&&(t.stopPropagation(),e({type:"close",src:"keydown.escape"}))},!0)},waitForOpenDelay:({send:e,prop:t})=>{let r=setTimeout(()=>{e({type:"after.openDelay"})},t("openDelay"));return()=>clearTimeout(r)},waitForCloseDelay:({send:e,prop:t})=>{let r=setTimeout(()=>{e({type:"after.closeDelay"})},t("closeDelay"));return()=>clearTimeout(r)}}}}),q=(0,N.createProps)()(["aria-label","closeDelay","closeOnEscape","closeOnPointerDown","closeOnScroll","closeOnClick","dir","disabled","getRootNode","id","ids","interactive","onOpenChange","defaultOpen","open","openDelay","positioning"]);(0,M.createSplitProps)(q),e.s(["anatomy",()=>D,"connect",()=>H,"machine",()=>$],70829);var G=e.i(21173),K=e.i(64614);let Y=e=>{let[r,{children:n,...i}]=(0,E.splitPresenceProps)(e),o=(e=>{let t=(0,d.useId)(),{getRootNode:r}=(0,G.useEnvironmentContext)(),{dir:n}=(0,K.useLocaleContext)(),i={id:t,dir:n,getRootNode:r,...e};return H((0,I.useMachine)($,i),I.normalizeProps)})(i),a=(0,O.usePresence)((0,g.mergeProps)({present:o.open},r));return(0,t.jsx)(v,{value:o,children:(0,t.jsx)(_.PresenceProvider,{value:a,children:n})})},X=e=>{let[r,{value:n,children:i}]=(0,E.splitPresenceProps)(e),o=(0,O.usePresence)((0,g.mergeProps)({present:n.open},r));return(0,t.jsx)(v,{value:n,children:(0,t.jsx)(_.PresenceProvider,{value:o,children:i})})},Q=(0,d.forwardRef)((e,r)=>{let n=b(),i=(0,g.mergeProps)(n.getTriggerProps(),e);return(0,t.jsx)(m.ark.button,{...i,ref:r})});Q.displayName="TooltipTrigger",e.s(["Arrow",()=>y,"ArrowTip",()=>x,"Content",()=>C,"Context",()=>k,"Positioner",()=>S,"Root",()=>Y,"RootProvider",()=>X,"Trigger",()=>Q],43997);var Z=e.i(43997),Z=Z;let{withRootProvider:J,withContext:ee,useStyles:et,PropsProvider:er}=(0,e.i(45362).createSlotRecipeContext)({key:"tooltip"}),en=J(Z.RootProvider),ei=J(Z.Root,{defaultProps:{lazyMount:!0,unmountOnExit:!0}}),eo=ee(Z.Trigger,"trigger",{forwardAsChild:!0}),ea=ee(Z.Positioner,"positioner",{forwardAsChild:!0}),es=ee(Z.Content,"content",{forwardAsChild:!0}),el=ee(Z.ArrowTip,"arrowTip",{forwardAsChild:!0}),eu=ee(Z.Arrow,"arrow",{forwardAsChild:!0,defaultProps:{children:(0,t.jsx)(el,{})}}),ec=Z.Context;e.s(["Arrow",()=>eu,"ArrowTip",()=>el,"Content",()=>es,"Context",()=>ec,"Positioner",()=>ea,"PropsProvider",()=>er,"Root",()=>ei,"RootProvider",()=>en,"Trigger",()=>eo],30103);var ed=e.i(30103),ed=ed,eh=e.i(70839);let ef=d.forwardRef(function(e,r){let{showArrow:n,children:i,disabled:o,portalled:a=!0,content:s,contentProps:l,portalRef:u,...c}=e;return o?i:(0,t.jsxs)(ed.Root,{...c,children:[(0,t.jsx)(ed.Trigger,{asChild:!0,children:i}),(0,t.jsx)(eh.Portal,{disabled:!a,container:u,children:(0,t.jsx)(ed.Positioner,{children:(0,t.jsxs)(ed.Content,{ref:r,...l,children:[n&&(0,t.jsx)(ed.Arrow,{children:(0,t.jsx)(ed.ArrowTip,{})}),s]})})})]})});e.s(["Tooltip",0,ef],46798);let ep="#63B3ED";function eg(e,t){let r=t?10:e.counts.length,n=e.counts.slice(0,r),i=e.valids-n.reduce((e,t)=>e+t,0);return e.values.slice(0,r).concat([i]).map((t,r)=>{let o,a=r===n.length,l=a?i:n[r],u=!1;return a?(o="(others)",u=!0):null==t?(o="(null)",u=!0):"string"==typeof t&&0===t.length?(o="(empty)",u=!0):o=String(t),{isLastItemOthers:a,isSpecialLabel:u,label:o,count:l,displayCount:(0,s.formatAsAbbreviatedNumber)(l),displayRatio:(0,s.formatIntervalMinMax)(l/e.valids)??"N/A"}})}function em({base:e,current:r,children:n}){return(0,t.jsx)(ef,{content:(0,t.jsxs)(l.Box,{children:[(0,t.jsxs)(c.Text,{children:[(0,t.jsx)(p.SquareIcon,{color:p.CURRENT_BAR_COLOR}),"Current: ",r.count," (",r.displayRatio,")"]}),(0,t.jsxs)(c.Text,{children:[(0,t.jsx)(p.SquareIcon,{color:p.BASE_BAR_COLOR}),"Base: ",e.count," (",e.displayRatio,")"]})]}),showArrow:!0,children:n})}function ev({topKDiff:e,isDisplayTopTen:n}){let i=eg(e.current,n),a=eg(e.base,n);return(0,t.jsxs)(l.Box,{w:"100%",px:20,py:4,children:[(0,t.jsxs)(r.Flex,{alignItems:"center",direction:"row",children:[(0,t.jsx)(o.Spacer,{}),(0,t.jsxs)(c.Text,{as:"h3",fontSize:"sm",p:"2",color:"gray",children:[(0,t.jsx)(p.SquareIcon,{color:p.BASE_BAR_COLOR})," Base"]}),(0,t.jsxs)(c.Text,{as:"h3",fontSize:"sm",p:"2",color:"gray",children:[(0,t.jsx)(p.SquareIcon,{color:p.CURRENT_BAR_COLOR})," Current"]}),(0,t.jsx)(o.Spacer,{})]}),i.map((n,i)=>{let o=a[i];return n.isLastItemOthers&&0===n.count&&0===o.count?(0,t.jsx)(t.Fragment,{}):(0,t.jsxs)(d.Fragment,{children:[(0,t.jsx)(em,{base:o,current:n,children:(0,t.jsxs)(r.Flex,{alignItems:"center",width:"100%",_hover:{bg:"blackAlpha.300"},px:4,children:[(0,t.jsx)(c.Text,{lineClamp:1,width:"10em",fontSize:"sm",color:n.isSpecialLabel?"gray.400":"inherit",children:n.label}),(0,t.jsxs)(r.Flex,{width:"70%",direction:"column",children:[(0,t.jsxs)(r.Flex,{height:"1em",children:[(0,t.jsx)(eb,{topkCount:n.count,topkLabel:n.label,valids:e.current.valids,color:p.CURRENT_BAR_COLOR}),(0,t.jsx)(c.Text,{ml:5,mr:2,fontSize:"sm",width:"6em",children:n.displayCount}),(0,t.jsx)(c.Text,{color:"gray.400",fontSize:"sm",width:"4em",children:n.displayRatio})]}),(0,t.jsxs)(r.Flex,{height:"1em",children:[(0,t.jsx)(eb,{topkCount:o.count,topkLabel:o.label,valids:e.base.valids,color:p.BASE_BAR_COLOR}),(0,t.jsx)(c.Text,{ml:5,mr:2,fontSize:"sm",width:"6em",children:o.displayCount}),(0,t.jsx)(c.Text,{color:"gray.400",fontSize:"sm",width:"4em",children:o.displayRatio})]})]})]})}),(0,t.jsx)(u.Separator,{})]},n.label)})]})}function eb({topkCount:e,topkLabel:r,valids:n,animation:i=!1,color:o=ep}){h.Chart.register(h.CategoryScale,h.BarElement,h.LinearScale);let a=function(e,t,{...r}={}){return{responsive:!0,maintainAspectRatio:!1,indexAxis:"y",scales:{x:{display:!1,max:t,grid:{display:!1}},y:{display:!1}},plugins:{tooltip:{enabled:!1}},...r}}(0,n,{animation:i}),s=function({topkLabel:e,topkCount:t,color:r=ep}){return{labels:[e],datasets:[{indexAxis:"y",data:[t],backgroundColor:r,hoverBackgroundColor:r,borderWidth:0,borderColor:r,barPercentage:1,categoryPercentage:.6}]}}({topkCount:e,topkLabel:r,color:o});return(0,t.jsx)(f.Bar,{data:s,options:a,plugins:[]})}var ey=e.i(60844);let ex=(0,d.forwardRef)(({run:e},s)=>{let[l,u]=(0,d.useState)(!0),c=e.result,h=e.params,f=c.base,p=c.current;return(0,t.jsxs)(r.Flex,{direction:"column",height:"100%",children:[(0,t.jsxs)(ey.ScreenshotBox,{ref:s,blockSize:"auto",children:[(0,t.jsxs)(i.Heading,{as:"h1",size:"md",paddingTop:4,textAlign:"center",color:"gray.600",children:["Model ",h.model,".",h.column_name]}),(0,t.jsxs)(n.HStack,{children:[(0,t.jsx)(o.Spacer,{}),(0,t.jsx)(ev,{topKDiff:c,valids:p.valids||0,isDisplayTopTen:l}),(0,t.jsx)(o.Spacer,{})]})]}),(0,t.jsx)(o.Spacer,{}),(f.values.length>10||p.values.length>10)&&(0,t.jsx)(r.Flex,{p:5,justify:"start",children:(0,t.jsx)(a.Link,{onClick:()=>{u(e=>!e)},colorPalette:"blue",children:l?"View More Items":"View Only Top-10"})})]})});e.s(["TopKDiffResultView",0,ex],56877);var ew=e.i(51713),e_=e.i(62754),eC=e.i(62234),ek=e.i(67652),eS=e.i(12103),eE=e.i(43482),eO=e.i(51297);let eI=(0,d.forwardRef)(({run:e,onAddToChecklist:n,viewOptions:i,onViewOptionsChanged:o},a)=>{if(!(0,e_.isValueDiffDetailRun)(e))throw Error("run type must be value_diff_detail");let s=(0,d.useMemo)(()=>i?.changed_only??!1,[i]),l=(0,d.useMemo)(()=>i?.pinned_columns??[],[i]),u=(0,d.useMemo)(()=>i?.display_mode??"inline",[i]),c=(0,d.useMemo)(()=>i?.columnsRenderMode??{},[i]),h=(0,d.useMemo)(()=>{if(!e.result||!e.params?.primary_key)return{columns:[],rows:[]};let t=e.params.primary_key,r=Array.isArray(t)?t:[t];return(0,ek.toValueDiffGrid)(e.result,r,{changedOnly:s,pinnedColumns:l,onPinnedColumnsChange:e=>{o&&o({...i,pinned_columns:e})},columnsRenderMode:c,onColumnsRenderModeChanged:e=>{let t={...i?.columnsRenderMode??{},...e};o&&o({...i,columnsRenderMode:t})},displayMode:u})},[e,i,s,l,u,o,c]),f=e.result?.limit??0,p=f>0&&e.result?.more?`Warning: Displayed results are limited to ${f.toLocaleString()} records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set.`:null,g=[];return(p&&g.push(p),0===h.columns.length)?(0,t.jsx)(ew.Center,{height:"100%",children:"No data"}):s&&0===h.rows.length?(0,t.jsxs)(r.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,t.jsx)(eS.RunToolbar,{run:e,viewOptions:i,onViewOptionsChanged:o,warnings:g}),(0,t.jsx)(ew.Center,{height:"100%",children:"No change"}),";"]}):(0,t.jsxs)(r.Flex,{direction:"column",backgroundColor:"rgb(249, 249, 249)",height:"100%",children:[(0,t.jsxs)(eS.RunToolbar,{run:e,viewOptions:i,onViewOptionsChanged:o,warnings:g,children:[(0,t.jsx)(eE.DiffDisplayModeSwitch,{displayMode:u,onDisplayModeChanged:e=>{o&&o({...i,display_mode:e})}}),(0,t.jsx)(eO.ChangedOnlyCheckbox,{changedOnly:i?.changed_only,onChange:()=>{let e=!i?.changed_only;o&&o({...i,changed_only:e})}})]}),(0,t.jsx)(eC.ScreenshotDataGrid,{ref:a,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto"},columns:h.columns,rows:h.rows,renderers:{noRowsFallback:(0,t.jsx)(eC.EmptyRowsRenderer,{emptyMessage:"No mismatched rows"})},defaultColumnOptions:{resizable:!0,maxWidth:800,minWidth:35},className:"rdg-light"})]})});e.s(["ValueDiffDetailResultView",0,eI],69236)},94707,e=>{"use strict";var t=e.i(73465);let{withContext:r,PropsProvider:n}=(0,e.i(30315).createRecipeContext)({key:"input"}),i=r(t.Field.Input);e.s(["Input",()=>i])},29134,10280,72230,e=>{"use strict";e.s(["RecceActionContextProvider",()=>ry,"useRecceActionContext",()=>rx],29134);var t,r,n,i=e.i(15839),o=e.i(64789),a=e.i(76452),s=e.i(39196),l=e.i(1343),u=e.i(61566);e.s(["findByRunType",()=>rp,"runTypeHasRef",()=>rh],72230);var c=e.i(6033),d=e.i(45364),h=e.i(53406),f=e.i(57980),p=e.i(64485),g=e.i(62031),m=e.i(22430),v=e.i(40159),b=e.i(56877),y=e.i(69236),x=e.i(18128),w=e.i(6850),_=e.i(21613),C=e.i(94707),k=e.i(42671);function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=S(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==S(t)?t:t+""}function O(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach(function(t){O(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function R(e,t){if(e){if("string"==typeof e)return T(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||R(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var N=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function D(e){var t=e.defaultInputValue,r=e.defaultMenuIsOpen,n=e.defaultValue,i=e.inputValue,a=e.menuIsOpen,s=e.onChange,l=e.onInputChange,u=e.onMenuClose,c=e.onMenuOpen,d=e.value,h=M(e,N),f=A((0,o.useState)(void 0!==i?i:void 0===t?"":t),2),p=f[0],g=f[1],m=A((0,o.useState)(void 0!==a?a:void 0!==r&&r),2),v=m[0],b=m[1],y=A((0,o.useState)(void 0!==d?d:void 0===n?null:n),2),x=y[0],w=y[1],_=(0,o.useCallback)(function(e,t){"function"==typeof s&&s(e,t),w(e)},[s]),C=(0,o.useCallback)(function(e,t){var r;"function"==typeof l&&(r=l(e,t)),g(void 0!==r?r:e)},[l]),k=(0,o.useCallback)(function(){"function"==typeof c&&c(),b(!0)},[c]),S=(0,o.useCallback)(function(){"function"==typeof u&&u(),b(!1)},[u]),E=void 0!==i?i:p,O=void 0!==a?a:v,I=void 0!==d?d:x;return P(P({},h),{},{inputValue:E,menuIsOpen:O,onChange:_,onInputChange:C,onMenuClose:S,onMenuOpen:k,value:I})}var L=e.i(30330);function V(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function F(e,t){return(F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(z=function(){return!!e})()}function B(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.i(48962);var H=e.i(81918),W=e.i(62258),U=e.i(22957),$=o.useLayoutEffect,q=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],G=function(){};function K(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];var o=[].concat(n);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(a?"-"===a[0]?e+a:e+"__"+a:e));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var Y=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===S(e)&&null!==e?[e]:[]},X=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,P({},M(e,q))},Q=function(e,t,r){var n=e.cx,i=e.getStyles,o=e.getClassNames,a=e.className;return{css:i(t,e),className:n(null!=r?r:{},o(t,e),a)}};function Z(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function J(e){return Z(e)?window.pageYOffset:e.scrollTop}function ee(e,t){Z(e)?window.scrollTo(0,t):e.scrollTop=t}function et(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:G,i=J(e),o=t-i,a=0;!function t(){var s;a+=10,ee(e,o*((s=(s=a)/r-1)*s*s+1)+i),a<r?window.requestAnimationFrame(t):n(e)}()}function er(e,t){var r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),i=t.offsetHeight/3;n.bottom+i>r.bottom?ee(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):n.top-i<r.top&&ee(e,Math.max(t.offsetTop-i,0))}function en(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var ei=!1,eo="undefined"!=typeof window?window:{};eo.addEventListener&&eo.removeEventListener&&(eo.addEventListener("p",G,{get passive(){return ei=!0}}),eo.removeEventListener("p",G,!1));var ea=ei;function es(e){return null!=e}var el=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.entries(e).filter(function(e){var t=A(e,1)[0];return!r.includes(t)}).reduce(function(e,t){var r=A(t,2),n=r[0],i=r[1];return e[n]=i,e},{})},eu=["children","innerProps"],ec=["children","innerProps"],ed=function(e){return"auto"===e?"bottom":e},eh=(0,o.createContext)(null),ef=function(e){var t=e.children,r=e.minMenuHeight,n=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,s=e.menuShouldScrollIntoView,l=e.theme,u=((0,o.useContext)(eh)||{}).setPortalPlacement,c=(0,o.useRef)(null),d=A((0,o.useState)(n),2),h=d[0],f=d[1],p=A((0,o.useState)(null),2),g=p[0],m=p[1],v=l.spacing.controlHeight;return $(function(){var e=c.current;if(e){var t="fixed"===a,o=function(e){var t,r=e.maxHeight,n=e.menuEl,i=e.minHeight,o=e.placement,a=e.shouldScroll,s=e.isFixedPosition,l=e.controlHeight,u=function(e){var t=getComputedStyle(e),r="absolute"===t.position,n=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!r||"static"!==t.position)&&n.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}(n),c={placement:"bottom",maxHeight:r};if(!n||!n.offsetParent)return c;var d=u.getBoundingClientRect().height,h=n.getBoundingClientRect(),f=h.bottom,p=h.height,g=h.top,m=n.offsetParent.getBoundingClientRect().top,v=s||Z(t=u)?window.innerHeight:t.clientHeight,b=J(u),y=parseInt(getComputedStyle(n).marginBottom,10),x=parseInt(getComputedStyle(n).marginTop,10),w=m-x,_=v-g,C=w+b,k=d-b-g,S=f-v+b+y,E=b+g-x;switch(o){case"auto":case"bottom":if(_>=p)return{placement:"bottom",maxHeight:r};if(k>=p&&!s)return a&&et(u,S,160),{placement:"bottom",maxHeight:r};if(!s&&k>=i||s&&_>=i)return a&&et(u,S,160),{placement:"bottom",maxHeight:s?_-y:k-y};if("auto"===o||s){var O=r,I=s?w:C;return I>=i&&(O=Math.min(I-y-l,r)),{placement:"top",maxHeight:O}}if("bottom"===o)return a&&ee(u,S),{placement:"bottom",maxHeight:r};break;case"top":if(w>=p)return{placement:"top",maxHeight:r};if(C>=p&&!s)return a&&et(u,E,160),{placement:"top",maxHeight:r};if(!s&&C>=i||s&&w>=i){var P=r;return(!s&&C>=i||s&&w>=i)&&(P=s?w-x:C-x),a&&et(u,E,160),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:r};default:throw Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:n,menuEl:e,minHeight:r,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:v});f(o.maxHeight),m(o.placement),null==u||u(o.placement)}},[n,i,a,s,r,u,v]),t({ref:c,placerProps:P(P({},e),{},{placement:g||ed(i),maxHeight:h})})},ep=function(e,t){var r=e.theme,n=r.spacing.baseUnit,i=r.colors;return P({textAlign:"center"},t?{}:{color:i.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px")})},eg=["size"],em=["innerProps","isRtl","size"],ev={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},eb=function(e){var t=e.size,r=M(e,eg);return(0,H.jsx)("svg",(0,L.default)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ev},r))},ey=function(e){return(0,H.jsx)(eb,(0,L.default)({size:20},e),(0,H.jsx)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ex=function(e){return(0,H.jsx)(eb,(0,L.default)({size:20},e),(0,H.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ew=function(e,t){var r=e.isFocused,n=e.theme,i=n.spacing.baseUnit,o=n.colors;return P({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:r?o.neutral60:o.neutral20,padding:2*i,":hover":{color:r?o.neutral80:o.neutral40}})},e_=(0,H.keyframes)(n||(t=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],r||(r=t.slice(0)),n=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}})))),eC=function(e){var t=e.delay,r=e.offset;return(0,H.jsx)("span",{css:(0,H.css)({animation:"".concat(e_," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ek=["data"],eS=["innerRef","isDisabled","isHidden","inputClassName"],eE={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},eO={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":P({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},eE)},eI=function(e){var t=e.children,r=e.innerProps;return(0,H.jsx)("div",r,t)},eP={ClearIndicator:function(e){var t=e.children,r=e.innerProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),t||(0,H.jsx)(ey,null))},Control:function(e){var t=e.children,r=e.isDisabled,n=e.isFocused,i=e.innerRef,o=e.innerProps,a=e.menuIsOpen;return(0,H.jsx)("div",(0,L.default)({ref:i},Q(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":n,"control--menu-is-open":a}),o,{"aria-disabled":r||void 0}),t)},DropdownIndicator:function(e){var t=e.children,r=e.innerProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),t||(0,H.jsx)(ex,null))},DownChevron:ex,CrossIcon:ey,Group:function(e){var t=e.children,r=e.cx,n=e.getStyles,i=e.getClassNames,o=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"group",{group:!0}),s),(0,H.jsx)(o,(0,L.default)({},a,{selectProps:c,theme:u,getStyles:n,getClassNames:i,cx:r}),l),(0,H.jsx)("div",null,t))},GroupHeading:function(e){var t=X(e);t.data;var r=M(t,ek);return(0,H.jsx)("div",(0,L.default)({},Q(e,"groupHeading",{"group-heading":!0}),r))},IndicatorsContainer:function(e){var t=e.children,r=e.innerProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"indicatorsContainer",{indicators:!0}),r),t)},IndicatorSeparator:function(e){var t=e.innerProps;return(0,H.jsx)("span",(0,L.default)({},t,Q(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,r=e.value,n=X(e),i=n.innerRef,o=n.isDisabled,a=n.isHidden,s=n.inputClassName,l=M(n,eS);return(0,H.jsx)("div",(0,L.default)({},Q(e,"input",{"input-container":!0}),{"data-value":r||""}),(0,H.jsx)("input",(0,L.default)({className:t({input:!0},s),ref:i,style:P({label:"input",color:"inherit",background:0,opacity:+!a,width:"100%"},eE),disabled:o},l)))},LoadingIndicator:function(e){var t=e.innerProps,r=e.isRtl,n=e.size,i=M(e,em);return(0,H.jsx)("div",(0,L.default)({},Q(P(P({},i),{},{innerProps:t,isRtl:r,size:void 0===n?4:n}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),(0,H.jsx)(eC,{delay:0,offset:r}),(0,H.jsx)(eC,{delay:160,offset:!0}),(0,H.jsx)(eC,{delay:320,offset:!r}))},Menu:function(e){var t=e.children,r=e.innerRef,n=e.innerProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"menu",{menu:!0}),{ref:r},n),t)},MenuList:function(e){var t=e.children,r=e.innerProps,n=e.innerRef,i=e.isMulti;return(0,H.jsx)("div",(0,L.default)({},Q(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:n},r),t)},MenuPortal:function(e){var t=e.appendTo,r=e.children,n=e.controlElement,i=e.innerProps,a=e.menuPlacement,s=e.menuPosition,l=(0,o.useRef)(null),u=(0,o.useRef)(null),c=A((0,o.useState)(ed(a)),2),d=c[0],h=c[1],f=(0,o.useMemo)(function(){return{setPortalPlacement:h}},[]),p=A((0,o.useState)(null),2),g=p[0],m=p[1],v=(0,o.useCallback)(function(){if(n){var e,t={bottom:(e=n.getBoundingClientRect()).bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width},r="fixed"===s?0:window.pageYOffset,i=t[d]+r;(i!==(null==g?void 0:g.offset)||t.left!==(null==g?void 0:g.rect.left)||t.width!==(null==g?void 0:g.rect.width))&&m({offset:i,rect:t})}},[n,s,d,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);$(function(){v()},[v]);var b=(0,o.useCallback)(function(){"function"==typeof u.current&&(u.current(),u.current=null),n&&l.current&&(u.current=(0,U.autoUpdate)(n,l.current,v,{elementResize:"ResizeObserver"in window}))},[n,v]);$(function(){b()},[b]);var y=(0,o.useCallback)(function(e){l.current=e,b()},[b]);if(!t&&"fixed"!==s||!g)return null;var x=(0,H.jsx)("div",(0,L.default)({ref:y},Q(P(P({},e),{},{offset:g.offset,position:s,rect:g.rect}),"menuPortal",{"menu-portal":!0}),i),r);return(0,H.jsx)(eh.Provider,{value:f},t?(0,W.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,r=void 0===t?"Loading...":t,n=e.innerProps,i=M(e,ec);return(0,H.jsx)("div",(0,L.default)({},Q(P(P({},i),{},{children:r,innerProps:n}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),r)},NoOptionsMessage:function(e){var t=e.children,r=void 0===t?"No options":t,n=e.innerProps,i=M(e,eu);return(0,H.jsx)("div",(0,L.default)({},Q(P(P({},i),{},{children:r,innerProps:n}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),r)},MultiValue:function(e){var t=e.children,r=e.components,n=e.data,i=e.innerProps,o=e.isDisabled,a=e.removeProps,s=e.selectProps,l=r.Container,u=r.Label,c=r.Remove;return(0,H.jsx)(l,{data:n,innerProps:P(P({},Q(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:s},(0,H.jsx)(u,{data:n,innerProps:P({},Q(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),(0,H.jsx)(c,{data:n,innerProps:P(P({},Q(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:eI,MultiValueLabel:eI,MultiValueRemove:function(e){var t=e.children,r=e.innerProps;return(0,H.jsx)("div",(0,L.default)({role:"button"},r),t||(0,H.jsx)(ey,{size:14}))},Option:function(e){var t=e.children,r=e.isDisabled,n=e.isFocused,i=e.isSelected,o=e.innerRef,a=e.innerProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":n,"option--is-selected":i}),{ref:o,"aria-disabled":r},a),t)},Placeholder:function(e){var t=e.children,r=e.innerProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"placeholder",{placeholder:!0}),r),t)},SelectContainer:function(e){var t=e.children,r=e.innerProps,n=e.isDisabled,i=e.isRtl;return(0,H.jsx)("div",(0,L.default)({},Q(e,"container",{"--is-disabled":n,"--is-rtl":i}),r),t)},SingleValue:function(e){var t=e.children,r=e.isDisabled,n=e.innerProps;return(0,H.jsx)("div",(0,L.default)({},Q(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),n),t)},ValueContainer:function(e){var t=e.children,r=e.innerProps,n=e.isMulti,i=e.hasValue;return(0,H.jsx)("div",(0,L.default)({},Q(e,"valueContainer",{"value-container":!0,"value-container--is-multi":n,"value-container--has-value":i}),r),t)}},eT=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function eR(e,t){if(e.length!==t.length)return!1;for(var r,n,i=0;i<e.length;i++)if(!((r=e[i])===(n=t[i])||eT(r)&&eT(n))&&1)return!1;return!0}for(var eA={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},eM=function(e){return(0,H.jsx)("span",(0,L.default)({css:eA},e))},eN={guidance:function(e){var t=e.isSearchable,r=e.isMulti,n=e.tabSelectsValue,i=e.context,o=e.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(n?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,r=e.label,n=void 0===r?"":r,i=e.labels,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return o?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.");default:return""}},onFocus:function(e){var t=e.context,r=e.focused,n=e.options,i=e.label,o=void 0===i?"":i,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(o," focused, ").concat(c(a,r),".");if("menu"===t&&u){var d="".concat(l?" selected":"").concat(s?" disabled":"");return"".concat(o).concat(d,", ").concat(c(n,r),".")}return""},onFilter:function(e){var t=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(t?" for search term "+t:"",".")}},eD=function(e){var t=e.ariaSelection,r=e.focusedOption,n=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,u=e.id,c=e.isAppleDevice,d=l.ariaLiveMessages,h=l.getOptionLabel,f=l.inputValue,p=l.isMulti,g=l.isOptionDisabled,m=l.isSearchable,v=l.menuIsOpen,b=l.options,y=l.screenReaderStatus,x=l.tabSelectsValue,w=l.isLoading,_=l["aria-label"],C=l["aria-live"],k=(0,o.useMemo)(function(){return P(P({},eN),d||{})},[d]),S=(0,o.useMemo)(function(){var e="";if(t&&k.onChange){var r=t.option,n=t.options,i=t.removedValue,o=t.removedValues,a=t.value,l=i||r||(Array.isArray(a)?null:a),u=l?h(l):"",c=n||o||void 0,d=c?c.map(h):[],f=P({isDisabled:l&&g(l,s),label:u,labels:d},t);e=k.onChange(f)}return e},[t,k,g,s,h]),E=(0,o.useMemo)(function(){var e="",t=r||n,o=!!(r&&s&&s.includes(r));if(t&&k.onFocus){var a={focused:t,label:h(t),isDisabled:g(t,s),isSelected:o,options:i,context:t===r?"menu":"value",selectValue:s,isAppleDevice:c};e=k.onFocus(a)}return e},[r,n,h,g,k,i,s,c]),O=(0,o.useMemo)(function(){var e="";if(v&&b.length&&!w&&k.onFilter){var t=y({count:i.length});e=k.onFilter({inputValue:f,resultsMessage:t})}return e},[i,f,v,k,b,y,w]),I=(null==t?void 0:t.action)==="initial-input-focus",T=(0,o.useMemo)(function(){var e="";if(k.guidance){var t=n?"value":v?"menu":"input";e=k.guidance({"aria-label":_,context:t,isDisabled:r&&g(r,s),isMulti:p,isSearchable:m,tabSelectsValue:x,isInitialFocus:I})}return e},[_,r,n,p,g,m,v,k,s,x,I]),R=(0,H.jsx)(o.Fragment,null,(0,H.jsx)("span",{id:"aria-selection"},S),(0,H.jsx)("span",{id:"aria-focused"},E),(0,H.jsx)("span",{id:"aria-results"},O),(0,H.jsx)("span",{id:"aria-guidance"},T));return(0,H.jsx)(o.Fragment,null,(0,H.jsx)(eM,{id:u},I&&R),(0,H.jsx)(eM,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!I&&R))},eL=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],eV=RegExp("["+eL.map(function(e){return e.letters}).join("")+"]","g"),eF={},ej=0;ej<eL.length;ej++)for(var ez=eL[ej],eB=0;eB<ez.letters.length;eB++)eF[ez.letters[eB]]=ez.base;var eH=function(e){return e.replace(eV,function(e){return eF[e]})},eW=function(e,t){void 0===t&&(t=eR);var r=null;function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(r&&r.lastThis===this&&t(n,r.lastArgs))return r.lastResult;var o=e.apply(this,n);return r={lastResult:o,lastArgs:n,lastThis:this},o}return n.clear=function(){r=null},n}(eH),eU=function(e){return e.replace(/^\s+|\s+$/g,"")},e$=function(e){return"".concat(e.label," ").concat(e.value)},eq=["innerRef"];function eG(e){var t=e.innerRef,r=el(M(e,eq),"onExited","in","enter","exit","appear");return(0,H.jsx)("input",(0,L.default)({ref:t},r,{css:(0,H.css)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var eK=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()},eY=["boxSizing","height","overflow","paddingRight","position"],eX={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function eQ(e){e.cancelable&&e.preventDefault()}function eZ(e){e.stopPropagation()}function eJ(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;0===e?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function e0(){return"ontouchstart"in window||navigator.maxTouchPoints}var e1=!!("undefined"!=typeof window&&window.document&&window.document.createElement),e2=0,e5={capture:!1,passive:!1},e3=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},e4={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function e6(e){var t,r,n,i,a,s,l,u,c,d,h,f,p,g,m,v,b,y,x,w,_,C,k,S,E=e.children,O=e.lockEnabled,I=e.captureEnabled,P=(r=(t={isEnabled:void 0===I||I,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}).isEnabled,n=t.onBottomArrive,i=t.onBottomLeave,a=t.onTopArrive,s=t.onTopLeave,l=(0,o.useRef)(!1),u=(0,o.useRef)(!1),c=(0,o.useRef)(0),d=(0,o.useRef)(null),h=(0,o.useCallback)(function(e,t){if(null!==d.current){var r=d.current,o=r.scrollTop,c=r.scrollHeight,h=r.clientHeight,f=d.current,p=t>0,g=c-h-o,m=!1;g>t&&l.current&&(i&&i(e),l.current=!1),p&&u.current&&(s&&s(e),u.current=!1),p&&t>g?(n&&!l.current&&n(e),f.scrollTop=c,m=!0,l.current=!0):!p&&-t>o&&(a&&!u.current&&a(e),f.scrollTop=0,m=!0,u.current=!0),m&&eK(e)}},[n,i,a,s]),f=(0,o.useCallback)(function(e){h(e,e.deltaY)},[h]),p=(0,o.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),g=(0,o.useCallback)(function(e){var t=c.current-e.changedTouches[0].clientY;h(e,t)},[h]),m=(0,o.useCallback)(function(e){if(e){var t=!!ea&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",g,t)}},[g,p,f]),v=(0,o.useCallback)(function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",g,!1))},[g,p,f]),(0,o.useEffect)(function(){if(r){var e=d.current;return m(e),function(){v(e)}}},[r,m,v]),function(e){d.current=e}),T=(y=(b={isEnabled:O}).isEnabled,w=void 0===(x=b.accountForScrollbars)||x,_=(0,o.useRef)({}),C=(0,o.useRef)(null),k=(0,o.useCallback)(function(e){if(e1){var t=document.body,r=t&&t.style;if(w&&eY.forEach(function(e){var t=r&&r[e];_.current[e]=t}),w&&e2<1){var n=parseInt(_.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,o=window.innerWidth-i+n||0;Object.keys(eX).forEach(function(e){var t=eX[e];r&&(r[e]=t)}),r&&(r.paddingRight="".concat(o,"px"))}t&&e0()&&(t.addEventListener("touchmove",eQ,e5),e&&(e.addEventListener("touchstart",eJ,e5),e.addEventListener("touchmove",eZ,e5))),e2+=1}},[w]),S=(0,o.useCallback)(function(e){if(e1){var t=document.body,r=t&&t.style;e2=Math.max(e2-1,0),w&&e2<1&&eY.forEach(function(e){var t=_.current[e];r&&(r[e]=t)}),t&&e0()&&(t.removeEventListener("touchmove",eQ,e5),e&&(e.removeEventListener("touchstart",eJ,e5),e.removeEventListener("touchmove",eZ,e5)))}},[w]),(0,o.useEffect)(function(){if(y){var e=C.current;return k(e),function(){S(e)}}},[y,k,S]),function(e){C.current=e});return(0,H.jsx)(o.Fragment,null,O&&(0,H.jsx)("div",{onClick:e3,css:e4}),E(function(e){P(e),T(e)}))}var e8={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},e7=function(e){var t=e.name,r=e.onFocus;return(0,H.jsx)("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:e8,value:"",onChange:function(){}})};function e9(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}var te=function(e){return e.label},tt=function(e){return e.value},tr={clearIndicator:ew,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var r=e.isDisabled,n=e.isFocused,i=e.theme,o=i.colors,a=i.borderRadius;return P({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:n?o.primary:o.neutral30}})},dropdownIndicator:ew,group:function(e,t){var r=e.theme.spacing;return t?{}:{paddingBottom:2*r.baseUnit,paddingTop:2*r.baseUnit}},groupHeading:function(e,t){var r=e.theme,n=r.colors,i=r.spacing;return P({label:"group",cursor:"default",display:"block"},t?{}:{color:n.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*i.baseUnit,paddingRight:3*i.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var r=e.isDisabled,n=e.theme,i=n.spacing.baseUnit,o=n.colors;return P({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:2*i,marginTop:2*i})},input:function(e,t){var r=e.isDisabled,n=e.value,i=e.theme,o=i.spacing,a=i.colors;return P(P({visibility:r?"hidden":"visible",transform:n?"translateZ(0)":""},eO),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var r=e.isFocused,n=e.size,i=e.theme,o=i.colors,a=i.spacing.baseUnit;return P({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"},t?{}:{color:r?o.neutral60:o.neutral20,padding:2*a})},loadingMessage:ep,menu:function(e,t){var r,n=e.placement,i=e.theme,o=i.borderRadius,a=i.spacing,s=i.colors;return P((O(r={label:"menu"},n?({bottom:"top",top:"bottom"})[n]:"bottom","100%"),O(r,"position","absolute"),O(r,"width","100%"),O(r,"zIndex",1),r),t?{}:{backgroundColor:s.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var r=e.maxHeight,n=e.theme.spacing.baseUnit;return P({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:n,paddingTop:n})},menuPortal:function(e){var t=e.rect,r=e.offset,n=e.position;return{left:t.left,position:n,top:r,width:t.width,zIndex:1}},multiValue:function(e,t){var r=e.theme,n=r.spacing,i=r.borderRadius,o=r.colors;return P({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:n.baseUnit/2})},multiValueLabel:function(e,t){var r=e.theme,n=r.borderRadius,i=r.colors,o=e.cropWithEllipsis;return P({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:n/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var r=e.theme,n=r.spacing,i=r.borderRadius,o=r.colors,a=e.isFocused;return P({alignItems:"center",display:"flex"},t?{}:{borderRadius:i/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:ep,option:function(e,t){var r=e.isDisabled,n=e.isFocused,i=e.isSelected,o=e.theme,a=o.spacing,s=o.colors;return P({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:i?s.primary:n?s.primary25:"transparent",color:r?s.neutral20:i?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:r?void 0:i?s.primary:s.primary50}})},placeholder:function(e,t){var r=e.theme,n=r.spacing,i=r.colors;return P({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:i.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2})},singleValue:function(e,t){var r=e.isDisabled,n=e.theme,i=n.spacing,o=n.colors;return P({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:r?o.neutral40:o.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},valueContainer:function(e,t){var r=e.theme.spacing,n=e.isMulti,i=e.hasValue,o=e.selectProps.controlShouldRenderValue;return P({alignItems:"center",display:n&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(2*r.baseUnit,"px")})}},tn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},ti={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:en(),captureMenuScroll:!en(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var r=P({ignoreCase:!0,ignoreAccents:!0,stringify:e$,trim:!0,matchFrom:"any"},void 0),n=r.ignoreCase,i=r.ignoreAccents,o=r.stringify,a=r.trim,s=r.matchFrom,l=a?eU(t):t,u=a?eU(o(e)):o(e);return n&&(l=l.toLowerCase(),u=u.toLowerCase()),i&&(l=eW(l),u=eH(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:te,getOptionValue:tt,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function to(e,t,r,n){var i=tf(e,t,r),o=tp(e,t,r),a=td(e,t),s=th(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:n}}function ta(e,t){return e.options.map(function(r,n){if("options"in r){var i=r.options.map(function(r,n){return to(e,r,t,n)}).filter(function(t){return tu(e,t)});return i.length>0?{type:"group",data:r,options:i,index:n}:void 0}var o=to(e,r,t,n);return tu(e,o)?o:void 0}).filter(es)}function ts(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,B(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function tl(e,t){return e.reduce(function(e,r){return"group"===r.type?e.push.apply(e,B(r.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(r.index,"-").concat(e.index)}}))):e.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),e},[])}function tu(e,t){var r=e.inputValue,n=t.data,i=t.isSelected,o=t.label,a=t.value;return(!tm(e)||!i)&&tg(e,{label:o,value:a,data:n},void 0===r?"":r)}var tc=function(e,t){var r;return(null==(r=e.find(function(e){return e.data===t}))?void 0:r.id)||null},td=function(e,t){return e.getOptionLabel(t)},th=function(e,t){return e.getOptionValue(t)};function tf(e,t,r){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,r)}function tp(e,t,r){if(r.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,r);var n=th(e,t);return r.some(function(t){return th(e,t)===n})}function tg(e,t,r){return!e.filterOption||e.filterOption(t,r)}var tm=function(e){var t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t},tv=1,tb=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),e&&F(a,e);var t,r,n,i=(t=z(),function(){var e,r=j(a);e=t?Reflect.construct(r,arguments,j(this).constructor):r.apply(this,arguments);if(e&&("object"==S(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this});function a(e){var t;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");if((t=i.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,r){var n=t.props,i=n.onChange;r.name=n.name,t.ariaOnChange(e,r),i(e,r)},t.setValue=function(e,r,n){var i=t.props,o=i.closeMenuOnSelect,a=i.isMulti,s=i.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),o&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:r,option:n})},t.selectOption=function(e){var r=t.props,n=r.blurInputOnSelect,i=r.isMulti,o=r.name,a=t.state.selectValue,s=i&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var u=t.getOptionValue(e);t.setValue(a.filter(function(e){return t.getOptionValue(e)!==u}),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:o});i?t.setValue([].concat(B(a),[e]),"select-option",e):t.setValue(e,"select-option")}n&&t.blurInput()},t.removeValue=function(e){var r,n=t.props.isMulti,i=t.state.selectValue,o=t.getOptionValue(e),a=i.filter(function(e){return t.getOptionValue(e)!==o}),s=(r=a[0]||null,n?a:r);t.onChange(s,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e,r,n=t.state.selectValue;t.onChange((e=t.props.isMulti,r=[],e?r:null),{action:"clear",removedValues:n})},t.popValue=function(){var e,r=t.props.isMulti,n=t.state.selectValue,i=n[n.length-1],o=n.slice(0,n.length-1),a=(e=o[0]||null,r?o:e);i&&t.onChange(a,{action:"pop-value",removedValue:i})},t.getFocusedOptionId=function(e){return tc(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return tl(ta(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return K.apply(void 0,[t.props.classNamePrefix].concat(r))},t.getOptionLabel=function(e){return td(t.props,e)},t.getOptionValue=function(e){return th(t.props,e)},t.getStyles=function(e,r){var n=t.props.unstyled,i=tr[e](r,n);i.boxSizing="border-box";var o=t.props.styles[e];return o?o(i,r):i},t.getClassNames=function(e,r){var n,i;return null==(n=(i=t.props.classNames)[e])?void 0:n.call(i,r)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){var e;return e=t.props,P(P({},eP),e.components)},t.buildCategorizedOptions=function(){return ta(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return ts(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,r){t.setState({ariaSelection:P({value:e},r)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var r=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():r&&t.openMenu("first"):(r&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!t.props.isDisabled){var r=t.props,n=r.isMulti,i=r.menuIsOpen;t.focusInput(),i?(t.setState({inputIsHiddenAfterUpdate:!n}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout(function(){return t.focusInput()}))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Z(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var r=e.touches,n=r&&r.item(0);n&&(t.initialTouchX=n.clientX,t.initialTouchY=n.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var r=e.touches,n=r&&r.item(0);if(n){var i=Math.abs(n.clientX-t.initialTouchX),o=Math.abs(n.clientY-t.initialTouchY);t.userIsDragging=i>5||o>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var r=t.props.inputValue,n=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(n,{action:"input-change",prevInputValue:r}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var r=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:r}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var r=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:r>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return tm(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var r=t.props,n=r.isMulti,i=r.backspaceRemovesValue,o=r.escapeClearsValue,a=r.inputValue,s=r.isClearable,l=r.isDisabled,u=r.menuIsOpen,c=r.onKeyDown,d=r.tabSelectsValue,h=r.openMenuOnFocus,f=t.state,p=f.focusedOption,g=f.focusedValue,m=f.selectValue;if(!l){if("function"==typeof c&&(c(e),e.defaultPrevented))return;switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;t.focusValue("previous");break;case"ArrowRight":if(!n||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)t.removeValue(g);else{if(!i)return;n?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing||e.shiftKey||!u||!d||!p||h&&t.isOptionSelected(p,m))return;t.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(u){if(!p||t.isComposing)return;t.selectOption(p);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&o&&t.clearValue();break;case" ":if(a)return;if(!u){t.openMenu("first");break}if(!p)return;t.selectOption(p);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++tv),t.state.selectValue=Y(e.value),e.menuIsOpen&&t.state.selectValue.length){var r=t.getFocusableOptionsWithIds(),n=t.buildFocusableOptions(),o=n.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=r,t.state.focusedOption=n[o],t.state.focusedOptionId=tc(r,n[o])}return t}return r=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&er(this.menuListRef,this.focusedOptionRef),(e9(/^Mac/i)||e9(/^iPhone/i)||e9(/^iPad/i)||e9(/^Mac/i)&&navigator.maxTouchPoints>1)&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isDisabled,n=t.menuIsOpen,i=this.state.isFocused;(i&&!r&&e.isDisabled||i&&n&&!e.menuIsOpen)&&this.focusInput(),i&&r&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):i||r||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(er(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,r=this.state,n=r.selectValue,i=r.isFocused,o=this.buildFocusableOptions(),a="first"===e?0:o.length-1;if(!this.props.isMulti){var s=o.indexOf(n[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[a],focusedOptionId:this.getFocusedOptionId(o[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,r=t.selectValue,n=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=r.indexOf(n);n||(i=-1);var o=r.length-1,a=-1;if(r.length){switch(e){case"previous":a=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i<o&&(a=i+1)}this.setState({inputIsHidden:-1!==a,focusedValue:r[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,r=this.state.focusedOption,n=this.getFocusableOptions();if(n.length){var i=0,o=n.indexOf(r);r||(o=-1),"up"===e?i=o>0?o-1:n.length-1:"down"===e?i=(o+1)%n.length:"pageup"===e?(i=o-t)<0&&(i=0):"pagedown"===e?(i=o+t)>n.length-1&&(i=n.length-1):"last"===e&&(i=n.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:n[i],focusedValue:null,focusedOptionId:this.getFocusedOptionId(n[i])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(tn):P(P({},tn),this.props.theme):tn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,r=this.getStyles,n=this.getClassNames,i=this.getValue,o=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:r,getClassNames:n,getValue:i,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:o,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,r=e.isMulti;return void 0===t?r:t}},{key:"isOptionDisabled",value:function(e,t){return tf(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return tp(this.props,e,t)}},{key:"filterOption",value:function(e,t){return tg(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"!=typeof this.props.formatOptionLabel)return this.getOptionLabel(e);var r=this.props.inputValue,n=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:r,selectValue:n})}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,r=e.isSearchable,n=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,l=e.menuIsOpen,u=e.required,c=this.getComponents().Input,d=this.state,h=d.inputIsHidden,f=d.ariaSelection,p=this.commonProps,g=n||this.getElementId("input"),m=P(P(P({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?(null==f?void 0:f.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?o.createElement(c,(0,L.default)({},p,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},m)):o.createElement(eG,(0,L.default)({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:G,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),r=t.MultiValue,n=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,h=c.isDisabled,f=c.isMulti,p=c.inputValue,g=c.placeholder,m=this.state,v=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!d)return p?null:o.createElement(l,(0,L.default)({},u,{key:"placeholder",isDisabled:h,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),g);if(f)return v.map(function(t,s){var l=t===b,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(r,(0,L.default)({},u,{components:{Container:n,Label:i,Remove:a},isFocused:l,isDisabled:h,key:c,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(p)return null;var x=v[0];return o.createElement(s,(0,L.default)({},u,{data:x,isDisabled:h}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||n||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,(0,L.default)({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,a=this.state.isFocused;return e&&i?o.createElement(e,(0,L.default)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:n,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,r=e.IndicatorSeparator;if(!t||!r)return null;var n=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return o.createElement(r,(0,L.default)({},n,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,r=this.props.isDisabled,n=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,(0,L.default)({},t,{innerProps:i,isDisabled:r,isFocused:n}))}},{key:"renderMenu",value:function(){var e,t=this,r=this.getComponents(),n=r.Group,i=r.GroupHeading,a=r.Menu,s=r.MenuList,l=r.MenuPortal,u=r.LoadingMessage,c=r.NoOptionsMessage,d=r.Option,h=this.commonProps,f=this.state.focusedOption,p=this.props,g=p.captureMenuScroll,m=p.inputValue,v=p.isLoading,b=p.loadingMessage,y=p.minMenuHeight,x=p.maxMenuHeight,w=p.menuIsOpen,_=p.menuPlacement,C=p.menuPosition,k=p.menuPortalTarget,S=p.menuShouldBlockScroll,E=p.menuShouldScrollIntoView,O=p.noOptionsMessage,I=p.onMenuScrollToTop,P=p.onMenuScrollToBottom;if(!w)return null;var T=function(e,r){var n=e.type,i=e.data,a=e.isDisabled,s=e.isSelected,l=e.label,u=e.value,c=f===i,p=a?void 0:function(){return t.onOptionHover(i)},g=a?void 0:function(){return t.selectOption(i)},m="".concat(t.getElementId("option"),"-").concat(r),v={id:m,onClick:g,onMouseMove:p,onMouseOver:p,tabIndex:-1,role:"option","aria-selected":t.state.isAppleDevice?void 0:s};return o.createElement(d,(0,L.default)({},h,{innerProps:v,data:i,isDisabled:a,isSelected:s,key:m,label:l,type:n,value:u,isFocused:c,innerRef:c?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(e.data,"menu"))};if(this.hasOptions())e=this.getCategorizedOptions().map(function(e){if("group"===e.type){var r=e.data,a=e.options,s=e.index,l="".concat(t.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return o.createElement(n,(0,L.default)({},h,{key:l,data:r,options:a,Heading:i,headingProps:{id:u,data:e.data},label:t.formatGroupLabel(e.data)}),e.options.map(function(e){return T(e,"".concat(s,"-").concat(e.index))}))}if("option"===e.type)return T(e,"".concat(e.index))});else if(v){var R=b({inputValue:m});if(null===R)return null;e=o.createElement(u,h,R)}else{var A=O({inputValue:m});if(null===A)return null;e=o.createElement(c,h,A)}var M={minMenuHeight:y,maxMenuHeight:x,menuPlacement:_,menuPosition:C,menuShouldScrollIntoView:E},N=o.createElement(ef,(0,L.default)({},h,M),function(r){var n=r.ref,i=r.placerProps,l=i.placement,u=i.maxHeight;return o.createElement(a,(0,L.default)({},h,M,{innerRef:n,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:v,placement:l}),o.createElement(e6,{captureEnabled:g,onTopArrive:I,onBottomArrive:P,lockEnabled:S},function(r){return o.createElement(s,(0,L.default)({},h,{innerRef:function(e){t.getMenuListRef(e),r(e)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:t.getElementId("listbox")},isLoading:v,maxHeight:u,focusedOption:f}),e)}))});return k||"fixed"===C?o.createElement(l,(0,L.default)({},h,{appendTo:k,controlElement:this.controlRef,menuPlacement:_,menuPosition:C}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,r=t.delimiter,n=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!n)return o.createElement(e7,{name:a,onFocus:this.onValueInputFocus});if(a&&!n)if(i)if(r){var u=l.map(function(t){return e.getOptionValue(t)}).join(r);return o.createElement("input",{name:a,type:"hidden",value:u})}else{var c=l.length>0?l.map(function(t,r){return o.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:e.getOptionValue(t)})}):o.createElement("input",{name:a,type:"hidden",value:""});return o.createElement("div",null,c)}else{var d=l[0]?this.getOptionValue(l[0]):"";return o.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,r=t.ariaSelection,n=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return o.createElement(eD,(0,L.default)({},e,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:n,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,r=e.IndicatorsContainer,n=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,h=this.commonProps=this.getCommonProps();return o.createElement(n,(0,L.default)({},h,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),o.createElement(t,(0,L.default)({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),o.createElement(i,(0,L.default)({},h,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(r,(0,L.default)({},h,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],n=[{key:"getDerivedStateFromProps",value:function(e,t){var r,n=t.prevProps,i=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,s=t.isFocused,l=t.prevWasFocused,u=t.instancePrefix,c=e.options,d=e.value,h=e.menuIsOpen,f=e.inputValue,p=e.isMulti,g=Y(d),m={};if(n&&(d!==n.value||c!==n.options||h!==n.menuIsOpen||f!==n.inputValue)){var v,b=h?ts(ta(e,g)):[],y=h?tl(ta(e,g),"".concat(u,"-option")):[],x=i?function(e,t){var r=e.focusedValue,n=e.selectValue.indexOf(r);if(n>-1){if(t.indexOf(r)>-1)return r;if(n<t.length)return t[n]}return null}(t,g):null,w=(v=t.focusedOption)&&b.indexOf(v)>-1?v:b[0],_=tc(y,w);m={selectValue:g,focusedOption:w,focusedOptionId:_,focusableOptionsWithIds:y,focusedValue:x,clearFocusValueOnUpdate:!1}}var C=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},k=a,S=s&&l;return s&&!S&&(k={value:(r=g[0]||null,p?g:r),options:g,action:"initial-input-focus"},S=!l),(null==a?void 0:a.action)==="initial-input-focus"&&(k=null),P(P(P({},m),C),{},{prevProps:e,ariaSelection:k,prevWasFocused:S})}}],r&&V(a.prototype,r),n&&V(a,n),Object.defineProperty(a,"prototype",{writable:!1}),a}(o.Component);tb.defaultProps=ti,e.i(11006),e.i(3172);var ty=(0,o.forwardRef)(function(e,t){var r=D(e);return o.createElement(tb,(0,L.default)({ref:t},r))}),tx=e.i(5376),tw=e.i(40292),t_=e.i(90304),tC=e.i(62090),tk=e.i(4366),tS=e.i(36099),tE=e.i(81955),tO=e.i(90819),tI=e.i(88076),tP=e.i(62994),tT=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],tR=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=String(e).toLowerCase(),i=String(r.getOptionValue(t)).toLowerCase(),o=String(r.getOptionLabel(t)).toLowerCase();return i===n||o===n},tA=function(e){return'Create "'.concat(e,'"')},tM=function(e,t,r,n){return!(!e||t.some(function(t){return tR(e,t,n)})||r.some(function(t){return tR(e,t,n)}))},tN=function(e,t){return{label:t,value:e,__isNew__:!0}};function tD(e){var t=e.allowCreateWhileLoading,r=void 0!==t&&t,n=e.createOptionPosition,i=void 0===n?"last":n,a=e.formatCreateLabel,s=void 0===a?tA:a,l=e.isValidNewOption,u=void 0===l?tM:l,c=e.getNewOptionData,d=void 0===c?tN:c,h=e.onCreateOption,f=e.options,p=void 0===f?[]:f,g=e.onChange,m=M(e,tT),v=m.getOptionValue,b=void 0===v?tt:v,y=m.getOptionLabel,x=void 0===y?te:y,w=m.inputValue,_=m.isLoading,C=m.isMulti,k=m.value,S=m.name,E=(0,o.useMemo)(function(){return u(w,Y(k),p,{getOptionValue:b,getOptionLabel:x})?d(w,s(w)):void 0},[s,d,x,b,w,u,p,k]),O=(0,o.useMemo)(function(){return(r||!_)&&E?"first"===i?[E].concat(B(p)):[].concat(B(p),[E]):p},[r,i,_,E,p]),I=(0,o.useCallback)(function(e,t){if("select-option"!==t.action)return g(e,t);var r=Array.isArray(e)?e:[e];if(r[r.length-1]===E){if(h)h(w);else{var n,i=d(w,w);g((n=[].concat(B(Y(k)),[i]),C?n:i),{action:"create-option",name:S,option:i})}return}g(e,t)},[d,w,C,S,E,h,g,k]);return P(P({},m),{},{options:O,onChange:I})}var tL=(0,o.forwardRef)(function(e,t){var r=tD(D(e));return o.createElement(tb,(0,L.default)({ref:t},r))}),tV=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function tF(e){var t=e.defaultOptions,r=void 0!==t&&t,n=e.cacheOptions,i=void 0!==n&&n,a=e.loadOptions;e.options;var s=e.isLoading,l=e.onInputChange,u=e.filterOption,c=M(e,tV),d=c.inputValue,h=(0,o.useRef)(void 0),f=(0,o.useRef)(!1),p=A((0,o.useState)(Array.isArray(r)?r:void 0),2),g=p[0],m=p[1],v=A((0,o.useState)(void 0!==d?d:""),2),b=v[0],y=v[1],x=A((0,o.useState)(!0===r),2),w=x[0],_=x[1],C=A((0,o.useState)(void 0),2),k=C[0],S=C[1],E=A((0,o.useState)([]),2),I=E[0],T=E[1],R=A((0,o.useState)(!1),2),N=R[0],D=R[1],L=A((0,o.useState)({}),2),V=L[0],F=L[1],j=A((0,o.useState)(void 0),2),z=j[0],B=j[1],H=A((0,o.useState)(void 0),2),W=H[0],U=H[1];i!==W&&(F({}),U(i)),r!==z&&(m(Array.isArray(r)?r:void 0),B(r)),(0,o.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]);var $=(0,o.useCallback)(function(e,t){if(!a)return t();var r=a(e,t);r&&"function"==typeof r.then&&r.then(t,function(){return t()})},[a]);(0,o.useEffect)(function(){!0===r&&$(b,function(e){f.current&&(m(e||[]),_(!!h.current))})},[]);var q=(0,o.useCallback)(function(e,t){var r=function(e,t,r){if(r){var n=r(e,t);if("string"==typeof n)return n}return e}(e,t,l);if(!r){h.current=void 0,y(""),S(""),T([]),_(!1),D(!1);return}if(i&&V[r])y(r),S(r),T(V[r]),_(!1),D(!1);else{var n=h.current={};y(r),_(!0),D(!k),$(r,function(e){f&&n===h.current&&(h.current=void 0,_(!1),S(r),T(e||[]),D(!1),F(e?P(P({},V),{},O({},r,e)):V))})}},[i,$,k,V,l]),G=N?[]:b&&k?I:g||[];return P(P({},c),{},{options:G,isLoading:w||void 0!==s&&s,onInputChange:q,filterOption:void 0===u?null:u})}var tj=(0,o.forwardRef)(function(e,t){var r=D(tF(e));return o.createElement(tb,(0,L.default)({ref:t},r))}),tz=(0,o.forwardRef)(function(e,t){var r=tD(D(tF(e)));return o.createElement(tb,(0,L.default)({ref:t},r))}),tB=(0,tx.chakra)("svg"),tH=e=>(0,i.jsx)(tB,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,i.jsx)("path",{d:"M20 6 9 17l-5-5"})}),tW=e=>(0,i.jsx)(tB,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,i.jsx)("path",{d:"m6 9 6 6 6-6"})}),tU=e=>(0,i.jsx)(tB,{viewBox:"0 0 24 24",fill:"currentColor",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z"})}),t$=e=>{let{className:t,clearValue:r,cx:n,getStyles:i,getClassNames:o,getValue:a,hasValue:s,isMulti:l,isRtl:u,options:c,selectOption:d,selectProps:h,setValue:f,theme:p,...g}=e;return{...g}},tq=e=>{var t,r,n,i,a,s,l;let u,c,d="string"==typeof(s=a=null==(r=null==(t=(0,tk.useChakraContext)().getSlotRecipe("select"))?void 0:t.defaultVariants)?void 0:r.size)&&["sm","md","lg"].includes(s)?a:"xs"===a?"sm":"xl"===a?"lg":"md";return null!=(l=null!=(n="string"==typeof e?[e]:e)?n:[d],c=function(e={}){e.fallback||(e.fallback="base");let t=(0,tk.useChakraContext)(),r=!1,n=t.breakpoints.values.map(({min:t,name:n})=>{let i={breakpoint:n,query:`(min-width: ${t})`,fallback:!r};return n===e.fallback&&(r=!0),i}).filter(({breakpoint:t})=>!!e.breakpoints?.includes(t)),i=n.map(({fallback:e})=>e),a=(function(e,t={}){let{fallback:r=[],ssr:n=!0,getWindow:i}=t,a=(0,tP.useCallbackRef)(i),s=Array.isArray(e)?e:[e],l=r?.filter(e=>null!=e),[u,c]=(0,o.useState)(()=>s.map((e,t)=>{if(!n){let{media:t,matches:r}=(i?.()??window).matchMedia(e);return{media:t,matches:r}}return{media:e,matches:!!l[t]}}));return(0,o.useEffect)(()=>{let e=a()??window;c(t=>{let r=s.map(t=>{let{media:r,matches:n}=e.matchMedia(t);return{media:r,matches:n}});return t.every((e,t)=>e.matches===r[t].matches&&e.media===r[t].media)?t:r});let t=s.map(t=>e.matchMedia(t)),r=e=>{c(t=>t.slice().map(t=>t.media===e.media?{...t,matches:e.matches}:t))},n=t.map(e=>(function(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch(r){return e.addListener(t),()=>e.removeListener(t)}})(e,r));return()=>n.forEach(e=>e())},[a]),u.map(e=>e.matches)})(n.map(e=>e.query),{fallback:i,ssr:e.ssr}).lastIndexOf(!0);return n[a]?.breakpoint??e.fallback}({breakpoints:Object.keys(u=(0,tk.useChakraContext)().normalizeValue(l)),...void 0}),i=u[c])?i:d},tG=(0,tx.chakra)("input"),tK={sm:1.5,md:2,lg:2.5},tY=e=>(0,i.jsx)(tC.Span,{...e,children:(0,i.jsx)(tH,{})}),tX={ClearIndicator:e=>{let{children:t,className:r,cx:n,innerProps:o,selectProps:{chakraStyles:a,size:s,variant:l}}=e,u={...(0,t_.useSlotRecipe)({key:"select"})({size:s,variant:l}).clearTrigger},c=(null==a?void 0:a.clearIndicator)?a.clearIndicator(u,e):u,d={},h=(null==a?void 0:a.crossIcon)?a.crossIcon(d,e):d;return(0,i.jsx)(x.Box,{className:n({indicator:!0,"clear-indicator":!0},r),css:c,"aria-label":"Clear selected options",asChild:!0,...o,children:(0,i.jsx)(tI.IconButton,{size:"sm",boxSize:8,minWidth:"unset",variant:"plain",pointerEvents:"auto",tabIndex:-1,children:t||(0,i.jsx)(tU,{css:h})})})},Control:e=>{let{className:t,cx:r,children:n,innerRef:o,innerProps:a,isDisabled:s,isFocused:l,menuIsOpen:u,selectProps:{chakraStyles:c,size:d,variant:h,invalid:f,readOnly:p,focusRingColor:g}}=e,m={...(0,tO.useRecipe)({key:"input"})({size:d,variant:h}),display:"flex",height:"auto",minHeight:"var(--select-trigger-height)",...s?{pointerEvents:"none"}:{}},v=(null==c?void 0:c.control)?c.control(m,e):m;return(0,i.jsx)(x.Box,{ref:o,className:r({control:!0,"control--is-disabled":s,"control--is-focused":l,"control--menu-is-open":u},t),css:v,...a,focusRingColor:g,"data-focus":!!l||void 0,"data-focus-visible":!!l||void 0,"data-invalid":!!f||void 0,"data-disabled":!!s||void 0,"data-readonly":!!p||void 0,children:n})},DropdownIndicator:e=>{let{children:t,className:r,cx:n,innerProps:o,selectProps:{chakraStyles:a,size:s,variant:l}}=e,u={...(0,t_.useSlotRecipe)({key:"select"})({size:s,variant:l}).indicator},c=(null==a?void 0:a.dropdownIndicator)?a.dropdownIndicator(u,e):u,d={},h=(null==a?void 0:a.downChevron)?a.downChevron(d,e):d;return(0,i.jsx)(x.Box,{...o,className:n({indicator:!0,"dropdown-indicator":!0},r),css:c,children:t||(0,i.jsx)(tW,{css:h})})},Group:e=>{let{children:t,className:r,cx:n,theme:o,getStyles:a,Heading:s,headingProps:l,label:u,selectProps:c,innerProps:d,getClassNames:h}=e,{chakraStyles:f,size:p,variant:g}=c,m={...(0,t_.useSlotRecipe)({key:"select"})({size:p,variant:g}).itemGroup},v=(null==f?void 0:f.group)?f.group(m,e):m;return(0,i.jsxs)(x.Box,{...d,className:n({group:!0},r),css:v,children:[(0,i.jsx)(s,{...l,selectProps:c,cx:n,theme:o,getStyles:a,getClassNames:h,children:u}),(0,i.jsx)(x.Box,{children:t})]})},GroupHeading:e=>{let{cx:t,className:r,selectProps:{chakraStyles:n,size:o,variant:a}}=e,{data:s,...l}=t$(e),u={...(0,t_.useSlotRecipe)({key:"select"})({size:o,variant:a}).itemGroupLabel},c=(null==n?void 0:n.groupHeading)?n.groupHeading(u,e):u;return(0,i.jsx)(x.Box,{...l,className:t({"group-heading":!0},r),css:c})},IndicatorSeparator:e=>{let{className:t,cx:r,selectProps:{chakraStyles:n}}=e,o={display:"none"},a=(null==n?void 0:n.indicatorSeparator)?n.indicatorSeparator(o,e):o;return(0,i.jsx)(tE.Separator,{className:r({"indicator-separator":!0},t),css:a,orientation:"vertical"})},IndicatorsContainer:e=>{let{children:t,className:r,cx:n,innerProps:o,selectProps:{chakraStyles:a,size:s,variant:l}}=e,u={...(0,t_.useSlotRecipe)({key:"select"})({size:s,variant:l}).indicatorGroup,position:"static",paddingRight:0},c=(null==a?void 0:a.indicatorsContainer)?a.indicatorsContainer(u,e):u;return(0,i.jsx)(x.Box,{...o,className:n({indicators:!0},r),css:c,children:t})},Input:e=>{let{className:t,cx:r,value:n,selectProps:{chakraStyles:o,readOnly:a}}=e,{innerRef:s,isDisabled:l,isHidden:u,inputClassName:c,...d}=t$(e),h={gridArea:"1 / 2",minW:"2px",border:0,margin:0,outline:0,padding:0},f={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content",color:"inherit",marginX:"0.125rem",paddingY:"0.125rem",visibility:l?"hidden":"visible",transform:n?"translateZ(0)":"",_after:{content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre",padding:0,...h}},p=(null==o?void 0:o.inputContainer)?o.inputContainer(f,e):f,g={background:0,opacity:+!u,width:"100%",...h},m=(null==o?void 0:o.input)?o.input(g,e):g;return(0,i.jsx)(x.Box,{className:r({"input-container":!0},t),"data-value":n||"",css:p,children:(0,i.jsx)(tG,{className:r({input:!0},c),ref:s,css:m,disabled:l,readOnly:!!a||void 0,...d})})},LoadingIndicator:e=>{let{className:t,cx:r,innerProps:n,selectProps:{chakraStyles:o},color:a,colorPalette:s,trackColor:l,animationDuration:u,borderWidth:c,spinnerSize:d}=e,h={marginRight:3,...l?{"--spinner-track-color":l}:{}},f=(null==o?void 0:o.loadingIndicator)?o.loadingIndicator(h,e):h;return(0,i.jsx)(tS.Spinner,{className:r({indicator:!0,"loading-indicator":!0},t),css:f,...n,size:d,colorPalette:s,color:a,animationDuration:u,borderWidth:c})},LoadingMessage:e=>{let{children:t,className:r,cx:n,innerProps:o,selectProps:{chakraStyles:a,size:s}}=e,l={color:"fg.muted",textAlign:"center",paddingY:tK[tq(s)]},u=(null==a?void 0:a.loadingMessage)?a.loadingMessage(l,e):l;return(0,i.jsx)(x.Box,{...o,className:n({"menu-notice":!0,"menu-notice--loading":!0},r),css:u,children:t})},Menu:e=>{let{className:t,cx:r,children:n,innerProps:o,innerRef:a,placement:s,selectProps:{chakraStyles:l}}=e,u={position:"absolute",..."top"===s?{bottom:"100%"}:{top:"100%"},marginY:"8px",width:"100%",zIndex:1},c=(null==l?void 0:l.menu)?l.menu(u,e):u;return(0,i.jsx)(x.Box,{...o,ref:a,className:r({menu:!0},t),css:c,children:n})},MenuList:e=>{let{className:t,cx:r,innerRef:n,children:o,maxHeight:a,isMulti:s,innerProps:l,selectProps:{chakraStyles:u,size:c,variant:d}}=e,h={...(0,t_.useSlotRecipe)({key:"select"})({size:c,variant:d}).content,maxHeight:`${a}px`,position:"relative"},f=(null==u?void 0:u.menuList)?u.menuList(h,e):h;return(0,i.jsx)(x.Box,{...l,className:r({"menu-list":!0,"menu-list--is-multi":s},t),css:f,ref:n,children:o})},MultiValue:e=>{var t;let{children:r,className:n,components:o,cx:a,data:s,innerProps:l,isDisabled:u,isFocused:c,removeProps:d,selectProps:h,cropWithEllipsis:f}=e,{Container:p,Label:g,Remove:m}=o,{chakraStyles:v,tagColorPalette:b,tagVariant:y,size:x}=h,{colorPalette:w,variant:_}=null!=(t=(0,tk.useChakraContext)().getSlotRecipe("tag").defaultVariants)?t:{},C=w;"object"==typeof s&&null!==s&&"colorPalette"in s&&"string"==typeof s.colorPalette?C=s.colorPalette:b&&(C=b);let k=_;"object"==typeof s&&null!==s&&"variant"in s&&"string"==typeof s.variant?k=s.variant:y&&(k=y);let S=(0,t_.useSlotRecipe)({key:"tag"})({size:x,variant:k}),E={...S.root,colorPalette:C,minWidth:0,margin:"0.125rem"},O=(null==v?void 0:v.multiValue)?v.multiValue(E,e):E,I={...S.label,overflow:"hidden",textOverflow:f||void 0===f?"ellipsis":void 0,whiteSpace:"nowrap"},P=(null==v?void 0:v.multiValueLabel)?v.multiValueLabel(I,e):I,T={...S.endElement},R=(null==v?void 0:v.multiValueEndElement)?v.multiValueEndElement(T,e):T,A={...S.closeTrigger,cursor:"pointer"},M=(null==v?void 0:v.multiValueRemove)?v.multiValueRemove(A,e):A;return(0,i.jsxs)(p,{data:s,innerProps:{className:a({"multi-value":!0,"multi-value--is-disabled":u},n),...l},css:O,selectProps:h,children:[(0,i.jsx)(g,{data:s,innerProps:{className:a({"multi-value__label":!0},n)},css:P,selectProps:h,children:r}),(0,i.jsx)(m,{data:s,innerProps:{className:a({"multi-value__remove":!0},n),"aria-label":`Remove ${r||"option"}`,...d},endElementCss:R,css:M,selectProps:h,isFocused:c})]})},MultiValueContainer:e=>{let{children:t,innerProps:r,css:n}=e;return(0,i.jsx)(tC.Span,{...r,css:n,children:t})},MultiValueLabel:e=>{let{children:t,innerProps:r,css:n}=e;return(0,i.jsx)(tC.Span,{...r,css:n,children:t})},MultiValueRemove:e=>{let{children:t,innerProps:r,isFocused:n,endElementCss:o,css:a}=e;return(0,i.jsx)(tC.Span,{css:o,...r,children:(0,i.jsx)(tC.Span,{role:"button",css:a,"data-focus-visible":!!n||void 0,children:t||(0,i.jsx)(tU,{})})})},NoOptionsMessage:e=>{let{children:t,className:r,cx:n,innerProps:o,selectProps:{chakraStyles:a,size:s}}=e,l={color:"fg.muted",textAlign:"center",paddingY:tK[tq(s)]},u=(null==a?void 0:a.noOptionsMessage)?a.noOptionsMessage(l,e):l;return(0,i.jsx)(x.Box,{...o,className:n({"menu-notice":!0,"menu-notice--no-options":!0},r),css:u,children:t})},Option:e=>{let{className:t,cx:r,innerRef:n,innerProps:o,children:a,isFocused:s,isDisabled:l,isSelected:u,selectProps:{chakraStyles:c,isMulti:d,hideSelectedOptions:h,selectedOptionStyle:f,selectedOptionColorPalette:p,size:g,variant:m}}=e,v=(0,t_.useSlotRecipe)({key:"select"})({size:g,variant:m}),b="color"===f&&u,y={...v.item,...b?{color:"colorPalette.contrast",bg:"colorPalette.solid",_active:{bg:"colorPalette.solid"}}:{}},w=(null==c?void 0:c.option)?c.option(y,e):y;return(0,i.jsxs)(x.Box,{...o,colorPalette:p,className:r({option:!0,"option--is-disabled":l,"option--is-focused":s,"option--is-selected":u},t),css:w,ref:n,"data-highlighted":!!s||void 0,"aria-disabled":!!l||void 0,"aria-selected":u,children:[a,"check"===f&&(!d||!1===h)&&(0,i.jsx)(tY,{css:{...v.itemIndicator},hidden:!u,children:(0,i.jsx)(tH,{})})]})},Placeholder:e=>{let{children:t,className:r,cx:n,innerProps:o,selectProps:{chakraStyles:a}}=e,s={gridArea:"1 / 1 / 2 / 3",color:"fg.muted/80",mx:"0.125rem",userSelect:"none"},l=(null==a?void 0:a.placeholder)?a.placeholder(s,e):s;return(0,i.jsx)(x.Box,{...o,className:n({placeholder:!0},r),css:l,children:t})},SelectContainer:e=>{let{children:t,className:r,cx:n,innerProps:o,isDisabled:a,isRtl:s,hasValue:l,selectProps:{chakraStyles:u,size:c,variant:d}}=e,h={...(0,t_.useSlotRecipe)({key:"select"})({size:c,variant:d}).root,gap:0,position:"relative",direction:s?"rtl":void 0,...a?{cursor:"not-allowed"}:{}},f=(null==u?void 0:u.container)?u.container(h,e):h;return(0,i.jsx)(x.Box,{...o,className:n({"--is-disabled":a,"--is-rtl":s,"--has-value":l},r),css:f,children:t})},SingleValue:e=>{let{children:t,className:r,cx:n,isDisabled:o,innerProps:a,selectProps:{chakraStyles:s}}=e,l={gridArea:"1 / 1 / 2 / 3",mx:"0.125rem",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},u=(null==s?void 0:s.singleValue)?s.singleValue(l,e):l;return(0,i.jsx)(x.Box,{className:n({"single-value":!0,"single-value--is-disabled":o},r),css:u,...a,children:t})},ValueContainer:e=>{let{children:t,className:r,cx:n,isMulti:o,hasValue:a,innerProps:s,selectProps:{chakraStyles:l,controlShouldRenderValue:u}}=e,c={display:o&&a&&u?"flex":"grid",alignItems:"center",flex:1,paddingY:"2px",flexWrap:"wrap",position:"relative",overflow:"hidden"},d=(null==l?void 0:l.valueContainer)?l.valueContainer(c,e):c;return(0,i.jsx)(x.Box,{...s,className:n({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},r),css:d,children:t})}},tQ=({components:e={},disabled:t,isDisabled:r,invalid:n,readOnly:i,required:o,inputId:a,selectedOptionStyle:s="color",selectedOptionColorPalette:l="blue",menuIsOpen:u,menuPlacement:c="auto",theme:d,...h})=>{var f,p;let g=(0,tw.useFieldContext)(),m=null!=i?i:null==g?void 0:g.readOnly,v=s;["color","check"].includes(s)||(v="color");let b=l||"blue";return"string"!=typeof b&&(b="blue"),{components:{...tX,...e},selectedOptionStyle:v,selectedOptionColorPalette:b,isDisabled:null!=(f=null!=t?t:r)?f:null==g?void 0:g.disabled,invalid:null!=n?n:null==g?void 0:g.invalid,inputId:null!=a?a:null==g?void 0:g.ids.control,readOnly:m,required:null!=o?o:null==g?void 0:g.required,menuIsOpen:null!=u?u:!m&&void 0,menuPlacement:c,unstyled:!0,...h,"aria-invalid":null!=(p=h["aria-invalid"])?p:null==g?void 0:g.invalid}},tZ=(0,o.forwardRef)((e,t)=>{let r=tQ(e);return(0,i.jsx)(ty,{ref:t,...r})});(0,o.forwardRef)((e,t)=>{let r=tQ(e);return(0,i.jsx)(tL,{ref:t,...r})}),(0,o.forwardRef)((e,t)=>{let r=tQ(e);return(0,i.jsx)(tj,{ref:t,...r})}),(0,o.forwardRef)((e,t)=>{let r=tQ(e);return(0,i.jsx)(tz,{ref:t,...r})});var tJ=e.i(905);function t0({params:e,onParamsChanged:t,setIsReadyToExecute:r}){let[n,a]=(0,o.useState)(!e.columns||0===e.columns.length),s=e.model,l=e.primary_key,{columns:u,primaryKey:c,isLoading:d,error:h}=(0,tJ.default)(e.model);(0,o.useEffect)(()=>{!l&&c&&t({...e,primary_key:c})},[l,c,e,t]),(0,o.useEffect)(()=>{r(!!(l&&s))},[l,s,r]);let f=u.map(e=>e.name),p=Array.isArray(l)?l:l?[l]:void 0;return d?(0,i.jsx)(x.Box,{children:"Loading..."}):0===f.length||h?(0,i.jsx)(x.Box,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,i.jsxs)(k.VStack,{gap:5,m:"8px 24px",paddingBottom:"200px",children:[(0,i.jsxs)(_.Field.Root,{children:[(0,i.jsx)(_.Field.Label,{children:"Model"}),(0,i.jsx)(C.Input,{readOnly:!0,value:e.model})]}),(0,i.jsxs)(_.Field.Root,{children:[(0,i.jsx)(_.Field.Label,{children:"Primary key"}),(0,i.jsx)(tZ,{placeholder:"Select primary key",className:"no-track-pii-safe",isMulti:!0,closeMenuOnSelect:!1,options:f.map(e=>({label:e,value:e})),value:(p??[]).map(e=>({label:e,value:e})),onChange:r=>{t({...e,primary_key:1==r.length?r[0].value:r.map(e=>e.value)})}})]}),(0,i.jsxs)(_.Field.Root,{children:[(0,i.jsx)(_.Field.Label,{children:"Columns"}),(0,i.jsxs)(w.Checkbox.Root,{marginBottom:"10px",size:"xs",checked:n,onCheckedChange:r=>{a(!!r.checked),t({...e,columns:void 0})},children:[(0,i.jsx)(w.Checkbox.HiddenInput,{}),(0,i.jsx)(w.Checkbox.Control,{}),(0,i.jsx)(w.Checkbox.Label,{children:"All columns"})]}),!n&&(0,i.jsx)(tZ,{isMulti:!0,className:"no-track-pii-safe",closeMenuOnSelect:!1,options:f.map(e=>({label:e,value:e})),value:(e.columns??[]).map(e=>({label:e,value:e})),onChange:r=>{let n,i=r.map(e=>e.value);n=0===i.length?void 0:i,t({...e,columns:n})}})]})]})}var t1=e.i(51713),t2=e.i(42436),t5=e.i(79278),t3=e.i(70496),t4=e.i(70839),t6=e.i(61479),t8=e.i(62234),t7=e.i(56949),t9=e.i(12007),re=e.i(62754),rt=e.i(328),rr=e.i(96137);function rn({params:e,column:t}){let{runAction:r}=rx(),{featureToggles:n}=(0,t9.useRecceInstanceContext)(),o=(t,n)=>{r("value_diff_detail",{...e,...t},n)};return(0,i.jsxs)(t2.Flex,{children:[(0,i.jsx)(x.Box,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t}),(0,i.jsx)(t6.Spacer,{}),(0,i.jsxs)(t3.Menu.Root,{lazyMount:!0,children:[(0,i.jsx)(t3.Menu.Trigger,{asChild:!0,children:(0,i.jsx)(tI.IconButton,{className:"row-context-menu",variant:"plain",size:"sm",disabled:n.disableDatabaseQuery,children:(0,i.jsx)(rt.PiDotsThreeVertical,{})})}),(0,i.jsx)(t4.Portal,{children:(0,i.jsx)(t3.Menu.Positioner,{children:(0,i.jsx)(t3.Menu.Content,{lineHeight:"20px",children:(0,i.jsxs)(t3.Menu.ItemGroup,{title:"Action",as:x.Box,fontSize:"8pt",children:[(0,i.jsx)(t3.Menu.Item,{value:"show-mismatched-values",fontSize:"10pt",onClick:()=>{o({},{showForm:!0})},children:"Show mismatched values..."}),(0,i.jsxs)(t3.Menu.Item,{value:"show-mismatched-columns",fontSize:"10pt",onClick:()=>{o({columns:[t]},{showForm:!1})},children:["Show mismatched values for '",t,"'"]})]})})})})]})]})}let ri=(0,o.forwardRef)(function({run:e},t){if(!(0,re.isValueDiffRun)(e))throw Error("Run type must be value_diff");let r=e.result,n=e.params,o=e=>{let t=e[2];return null!=t&&t<1?"diff-cell-modified":""},a=Array.isArray(n.primary_key)?n.primary_key:[n.primary_key],s=[{key:"__is_pk__",name:"",width:30,maxWidth:30,renderCell:({row:e})=>(0,i.jsx)(t1.Center,{height:"100%",children:a.includes(String(e[0]))&&(0,i.jsx)(t5.Icon,{as:t7.VscKey})})},{key:"0",name:"Column",resizable:!0,renderCell:({row:e,column:t})=>(0,i.jsx)(rn,{column:String(e[t.key]),params:n}),cellClass:"cell-show-context-menu"},{key:"1",name:"Matched",resizable:!0,cellClass:o},{key:"2",name:"Matched %",resizable:!0,renderCell:({column:e,row:t})=>{let r=t[e.key];return(0,i.jsx)(x.Box,{textAlign:"end",children:null!=r?`${(100*r).toFixed(2)} %`:"N/A"})},cellClass:o}];return r.data.columns=[{key:"0",name:"Column",type:"text"},{key:"1",name:"Matched",type:"number"},{key:"2",name:"Matched %",type:"number"}],(0,i.jsxs)(t2.Flex,{direction:"column",gap:"5px",pt:"5px",height:"100%",children:[(0,i.jsxs)(x.Box,{px:"16px",children:["Model: ",n.model,", ",r.summary.total," total (",r.summary.total-r.summary.added-r.summary.removed," common,"," ",r.summary.added," added, ",r.summary.removed," removed)"]}),(0,i.jsx)(t8.ScreenshotDataGrid,{ref:t,style:{blockSize:"auto",maxHeight:"100%",overflow:"auto",borderBlock:"1px solid lightgray"},columns:s,rows:(0,rr.dataFrameToRowObjects)(r.data),renderers:{noRowsFallback:(0,i.jsx)(t8.EmptyRowsRenderer,{})},defaultColumnOptions:{resizable:!0},className:"rdg-light"})]})});var ro=e.i(74992);function ra(e){return(0,ro.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 3v16a2 2 0 0 0 2 2h16"},child:[]},{tag:"rect",attr:{x:"7",y:"13",width:"9",height:"4",rx:"1"},child:[]},{tag:"rect",attr:{x:"7",y:"5",width:"12",height:"4",rx:"1"},child:[]}]})(e)}function rs(e){return(0,ro.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 3h6v6"},child:[]},{tag:"path",attr:{d:"M10 14 21 3"},child:[]},{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]}]})(e)}function rl(e){return(0,ro.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"},child:[]}]})(e)}function ru(e){return(0,ro.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"path",attr:{d:"M12 2v2"},child:[]},{tag:"path",attr:{d:"M12 20v2"},child:[]},{tag:"path",attr:{d:"m4.93 4.93 1.41 1.41"},child:[]},{tag:"path",attr:{d:"m17.66 17.66 1.41 1.41"},child:[]},{tag:"path",attr:{d:"M2 12h2"},child:[]},{tag:"path",attr:{d:"M20 12h2"},child:[]},{tag:"path",attr:{d:"m6.34 17.66-1.41 1.41"},child:[]},{tag:"path",attr:{d:"m19.07 4.93-1.41 1.41"},child:[]}]})(e)}function rc(e){return(0,ro.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 17h2v.5h-1v1h1v.5h-2v1h3v-4h-3zm1-9h1V4h-2v1h1zm-1 3h1.8L18 13.1v.9h3v-1h-1.8l1.8-2.1V10h-3zM2 5h14v2H2zm0 12h14v2H2zm0-6h14v2H2z"},child:[]}]})(e)}function rd({params:e,onParamsChanged:t,setIsReadyToExecute:r}){let[n,a]=(0,o.useState)(!e.columns||0===e.columns.length),s=e.model,{columns:l,isLoading:u,error:c}=(0,tJ.default)(e.model);(0,o.useEffect)(()=>{r(!!s)},[s,r]);let d=l.map(e=>e.name);return u?(0,i.jsx)(x.Box,{children:"Loading..."}):0===d.length||c?(0,i.jsx)(x.Box,{children:"Error: Please provide the 'catalog.json' to list column candidates"}):(0,i.jsxs)(k.VStack,{gap:5,m:"8px 24px",paddingBottom:"200px",children:[(0,i.jsxs)(_.Field.Root,{children:[(0,i.jsx)(_.Field.Label,{children:"Model"}),(0,i.jsx)(C.Input,{readOnly:!0,value:e.model})]}),(0,i.jsxs)(_.Field.Root,{children:[(0,i.jsx)(_.Field.Label,{children:"Columns"}),(0,i.jsxs)(w.Checkbox.Root,{marginBottom:"10px",checked:n,onCheckedChange:r=>{a(!!r.checked),t({...e,columns:void 0})},children:[(0,i.jsx)(w.Checkbox.HiddenInput,{}),(0,i.jsx)(w.Checkbox.Control,{}),(0,i.jsx)(w.Checkbox.Label,{children:"All columns"})]}),!n&&(0,i.jsx)(tZ,{isMulti:!0,className:"no-track-pii-safe",closeMenuOnSelect:!1,options:d.map(e=>({label:e,value:e})),value:(e.columns??[]).map(e=>({label:e,value:e})),onChange:r=>{let n,i=r.map(e=>e.value);n=0===i.length?void 0:i,t({...e,columns:n})}})]})]})}function rh(e){return["query","query_base","query_diff","row_count","row_count_diff","profile","profile_diff","value_diff","value_diff_detail","top_k_diff","histogram_diff"].includes(e)}e.s(["LuChartBarBig",()=>ra,"LuExternalLink",()=>rs,"LuMoon",()=>rl,"LuSun",()=>ru],10280);let rf={lineage_diff:{title:"Lineage Diff",icon:c.TbBrandStackshare},schema_diff:{title:"Schema Diff",icon:function(e){return(0,ro.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 9v2h-3V9H8.5V7H11V1H4v6h2.5v2H4v6h2.5v2H4v6h7v-6H8.5v-2H11v-2h3v2h7V9h-7z"},child:[]}]})(e)}},query:{title:"Query",icon:c.TbSql,RunResultView:g.QueryResultView},query_base:{title:"Query Base",icon:c.TbSql,RunResultView:g.QueryResultView},query_diff:{title:"Query Diff",icon:c.TbSql,RunResultView:p.QueryDiffResultView},row_count:{title:"Row Count",icon:rc,RunResultView:m.RowCountResultView},row_count_diff:{title:"Row Count Diff",icon:rc,RunResultView:m.RowCountDiffResultView},profile:{title:"Profile",icon:c.TbEyeSearch,RunResultView:f.ProfileResultView,RunForm:rd},profile_diff:{title:"Profile Diff",icon:c.TbEyeSearch,RunResultView:f.ProfileDiffResultView,RunForm:rd},value_diff:{title:"Value Diff",icon:c.TbAlignBoxLeftStretch,RunResultView:ri,RunForm:t0},value_diff_detail:{title:"Value Diff Detail",icon:c.TbAlignBoxLeftStretch,RunResultView:y.ValueDiffDetailResultView,RunForm:t0},top_k_diff:{title:"Top-K Diff",icon:ra,RunResultView:b.TopKDiffResultView,RunForm:v.TopKDiffForm},histogram_diff:{title:"Histogram Diff",icon:c.TbChartHistogram,RunResultView:h.HistogramDiffResultView,RunForm:d.HistogramDiffForm},sandbox:{title:"Sandbox",icon:c.TbEyeEdit},simple:{title:"Simple",icon:c.TbEyeEdit}},rp=e=>rf[e];var rg=e.i(941),rm=e.i(7101),rv=e.i(77855);let rb=(0,o.createContext)({runAction:()=>{},showRunId:e=>{},isRunResultOpen:!1,closeRunResult:()=>{},isHistoryOpen:!1,closeHistory:()=>{},showHistory:()=>{},setHistoryOpen:e=>{},clearRunResult:()=>{}});function ry({children:e}){let[t,r]=(0,o.useState)(),{open:n,onOpen:c,onClose:d}=(0,s.useDisclosure)(),{open:h,onOpen:f,onClose:p}=(0,s.useDisclosure)(),{open:g,onOpen:m,onClose:v,setOpen:b}=(0,s.useDisclosure)(),[y,x]=(0,o.useState)(),[w,_]=(0,l.useLocation)(),C=(0,rg.useQueryClient)(),k=(0,o.useCallback)(async(e,t)=>{x(e),f(),!1!==t&&await C.invalidateQueries({queryKey:rm.cacheKeys.runs()})},[x,f,C]),S=(0,o.useCallback)(()=>{x(void 0),p()},[p,x]),E=(0,o.useCallback)(async(e,t,n)=>{try{let i,o=new Date().getTime().toString();if(n?.showLast){let r=await (0,u.searchRuns)(e,t,1);1===r.length&&(i=r[0])}let a=rp(e),s=a.RunResultView,{title:l,RunForm:d}=a;if(void 0===s)throw Error(`Run type ${e} does not have a result view`);if(void 0!=d&&n?.showForm)r({session:o,title:l,type:e,params:t,lastRun:i,options:n,RunForm:d}),c();else{let{run_id:r}=await (0,u.submitRun)(e,t,{nowait:!0,trackProps:n?.trackProps});await k(r),await C.invalidateQueries({queryKey:rm.cacheKeys.runs()}),w.startsWith("/lineage")&&_("/lineage")}}catch(e){rv.toaster.create({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,type:"error",duration:5e3,closable:!0})}},[r,c,k,w,_,C]);(e=>{let[t]=(0,l.useLocation)();(0,o.useEffect)(()=>{e()},[e,t])})(d);let O=async(e,r)=>{try{d();let{run_id:n}=await (0,u.submitRun)(e,r,{nowait:!0,trackProps:t?.options?.trackProps});await k(n)}catch(e){rv.toaster.create({title:"Failed to submit a run",description:e instanceof Error?e.message:void 0,type:"error",duration:5e3,closable:!0})}};return(0,i.jsxs)(rb.Provider,{value:{runAction:E,runId:y,showRunId:k,isRunResultOpen:h,closeRunResult:p,isHistoryOpen:g,closeHistory:v,showHistory:m,setHistoryOpen:b,clearRunResult:S},children:[t&&(0,i.jsx)(a.RunModal,{isOpen:n,onClose:d,onExecute:O,title:t.title,type:t.type,params:t.params,initialRun:t.lastRun,RunForm:t.options?.showForm&&t.RunForm?t.RunForm:void 0},t.session),e]})}let rx=()=>(0,o.useContext)(rb)},69993,e=>{"use strict";var t=e.i(15839),r=e.i(64789);let n=(0,r.createContext)({latestSelectedCheckId:"",setLatestSelectedCheckId:()=>{}});function i({children:e}){let[i,o]=r.default.useState("");return(0,t.jsx)(n.Provider,{value:{setLatestSelectedCheckId:o,latestSelectedCheckId:i},children:e})}e.s(["RecceCheckContextProvider",()=>i,"useRecceCheckContext",0,()=>(0,r.useContext)(n)])},60214,5288,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(60536),i=e.i(5443);async function o(e){return(await i.axiosClient.post("/api/save-as",e)).data}async function a(e){return(await i.axiosClient.post("/api/rename",e)).data}async function s(){return(await i.axiosClient.post("/api/export")).data}async function l(e,t){let r=new FormData;return r.append("file",e),r.append("checks_only",(!!t).toString()),(await i.axiosClient.post("/api/import",r)).data}async function u(){return 208===(await i.axiosClient.get("/api/sync")).status}async function c(e){try{let t=await i.axiosClient.post("/api/sync",e);if(202===t.status)return{status:"accepted"};if(208===t.status)return{status:"syncing"}}catch(e){if((0,n.isAxiosError)(e)&&e.response?.status===409)return{status:"conflict"}}throw Error("Failed to sync state")}async function d(){return(await i.axiosClient.post("/api/share")).data}e.s(["exportState",()=>s,"importState",()=>l,"isStateSyncing",()=>u,"rename",()=>a,"saveAs",()=>o,"shareState",()=>d,"syncState",()=>c],5288);let h=(0,r.createContext)(void 0);function f({children:e}){let[n,i]=(0,r.useState)(),[o,a]=(0,r.useState)(!1),[s,l]=(0,r.useState)(),u=async()=>{a(!0),l(void 0),i(void 0);try{let e=await d();if("success"!==e.status)return void l(e.message);i(e.share_url)}catch(e){l(e.message)}finally{a(!1)}};return(0,t.jsx)(h.Provider,{value:{shareUrl:n,isLoading:o,error:s,handleShareClick:u},children:e})}e.s(["RecceShareStateContextProvider",()=>f,"useRecceShareStateContext",0,()=>{let e=(0,r.useContext)(h);if(!e)throw Error("useRecceShareStateContext must be used within a RecceShareStateContextProvider");return e}],60214)},52077,e=>{"use strict";var t=e.i(15839),r=e.i(64789),n=e.i(18128);let i=(0,r.forwardRef)(function(e,r){let{size:i,...o}=e;return(0,t.jsx)(n.Box,{...o,ref:r,boxSize:i,css:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexGrow:0,...e.css}})});i.displayName="Square";let o=(0,r.forwardRef)(function(e,r){let{size:n,...o}=e;return(0,t.jsx)(i,{size:n,ref:r,borderRadius:"9999px",...o})});o.displayName="Circle";var a=e.i(30315),s=e.i(52051);let{withContext:l,PropsProvider:u}=(0,a.createRecipeContext)({key:"skeleton"}),c=l("div");c.displayName="Skeleton",r.forwardRef(function(e,r){let{size:n,...i}=e;return(0,t.jsx)(o,{size:n,asChild:!0,ref:r,children:(0,t.jsx)(c,{...i})})}).displayName="SkeletonCircle";let d=r.forwardRef(function(e,r){let{noOfLines:n=3,gap:i,rootProps:o,...a}=e;return(0,t.jsx)(s.Stack,{gap:i,width:"full",ref:r,...o,children:Array.from({length:n}).map((e,r)=>(0,t.jsx)(c,{height:"4",_last:{maxW:1===n?"100%":"80%"},...a},r))})});d.displayName="SkeletonText",e.s(["Skeleton",()=>c,"SkeletonText",()=>d],52077)},69251,99995,13683,26163,60945,32525,79313,76858,95368,73945,58360,76883,84163,36292,16466,96019,93424,61292,38674,69081,11567,42582,97018,27598,248,57372,68718,69311,34843,42697,21875,36794,92071,11021,67537,49666,24098,63024,72051,23258,43797,18401,24004,15127,924,61722,90963,91864,62345,e=>{"use strict";let t;var r,n=new Map("WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical".split(",").concat("".split(",")).map(e=>[e,!0])),i=/&|@/,o=(r=e=>n.has(e)||e.startsWith("--")||i.test(e),t=Object.create(null),e=>(void 0===t[e]&&(t[e]=r(e)),t[e]));function a(e=""){let t=new RegExp(String.raw`-?\d+(?:\.\d+|\d*)`),r=RegExp("px|em|rem"),n=e.match(RegExp(`${t.source}(${r.source})`));return n?.[1]}function s(e=""){if("number"==typeof e)return`${e}px`;let t=a(e);return t&&"px"!==t?"em"===t||"rem"===t?`${16*parseFloat(e)}px`:void 0:e}function l(e=""){let t=a(e);return t&&"rem"!==t?"em"===t?`${parseFloat(e)}rem`:"px"===t?`${parseFloat(e)/16}rem`:void 0:e}var u=e.i(14138);function c(e){let t=parseFloat(s(e)??"")-.04;return l(`${t}px`)}function d({min:e,max:t}){return null==e&&null==t?"":["@media screen",e&&`(min-width: ${e})`,t&&`(max-width: ${t})`].filter(Boolean).join(" and ")}function h(e,t){let r={};for(let n in e){let i=t(n,e[n]);r[i[0]]=i[1]}return r}var f=Object.defineProperty,p=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?f(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r};function g(e){if(null===e)return"null";if(void 0===e)return"undefined";let t=typeof e;if("string"===t)return`s:${e}`;if("number"===t)return`n:${e}`;if("boolean"===t)return`b:${e}`;if("function"===t)return`f:${e.name||"anonymous"}`;if(Array.isArray(e))return`a:[${e.map(g).join(",")}]`;if("object"===t){let t=Object.keys(e).sort();return`o:{${t.map(t=>`${t}:${g(e[t])}`).join(",")}}`}return String(e)}class m{constructor(e=500){p(this,"cache",new Map),p(this,"maxSize"),this.maxSize=e}get(e){let t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;void 0!==e&&this.cache.delete(e)}this.cache.set(e,t)}clear(){this.cache.clear()}}let v=e=>{let t=new m;return function(...r){let n=1===r.length?g(r[0]):r.map(g).join("|"),i=t.get(n);return void 0===i&&(i=e.apply(this,r),t.set(n,i)),i}},b=/^@|&|&$/,y=Object.freeze(Object.create(null)),x=Object.freeze([]);function w(){return Object.create(null)}let _=e=>({minMax:RegExp(`(!?\\(\\s*min(-device-)?-${e})(.|
|
|
3
|
+
)+\\(\\s*max(-device)?-${e}`,"i"),min:RegExp(`\\(\\s*min(-device)?-${e}`,"i"),maxMin:RegExp(`(!?\\(\\s*max(-device)?-${e})(.|
|
|
4
|
+
)+\\(\\s*min(-device)?-${e}`,"i"),max:RegExp(`\\(\\s*max(-device)?-${e}`,"i")}),C=_("width"),k=_("height"),S=e=>({isMin:V(e.minMax,e.maxMin,e.min),isMax:V(e.maxMin,e.minMax,e.max)}),{isMin:E,isMax:O}=S(C),{isMin:I,isMax:P}=S(k),T=/print/i,R=/^print$/i,A=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/,M=/(\d)/,N=Number.MAX_VALUE,D={ch:8.8984375,em:16,rem:16,ex:8.296875,px:1};function L(e){let t=A.exec(e)||(E(e)||I(e)?M.exec(e):null);return t?"0"===t[0]?0:parseFloat(t[1])*(D[t[2]]||1):N}function V(e,t,r){return n=>e.test(n)||!t.test(n)&&r.test(n)}let F=v((e,t)=>{var r,n;let i,o,a,s,l=(r=e,n=t,i=T.test(r),o=R.test(r),a=T.test(n),s=R.test(n),i&&a?!o&&s?1:o&&!s?-1:r.localeCompare(n):i?1:a?-1:null);if(null!==l)return l;let u=E(e)||I(e),c=O(e)||P(e),d=E(t)||I(t),h=O(t)||P(t);if(u&&h)return -1;if(c&&d)return 1;let f=L(e),p=L(t);return f===N&&p===N?e.localeCompare(t):f===N?1:p===N?-1:f!==p?f>p?c?-1:1:c?1:-1:e.localeCompare(t)});var j=e.i(6210);function z(e){return e.sort(([e],[t])=>F(e,t))}var B=e.i(70332);function H(e,...t){for(let r of t)!function e(t,r){if(null==r)return t;for(let n of Object.keys(r))if(void 0!==r[n]&&"__proto__"!==n)if(!(0,j.isObject)(t[n])&&(0,j.isObject)(r[n]))Object.assign(t,{[n]:r[n]});else if(t[n]&&(0,j.isObject)(r[n]))e(t[n],r[n]);else if(Array.isArray(r[n])&&Array.isArray(t[n])){let i=0;for(;i<r[n].length;i++)(0,j.isObject)(t[n][i])&&(0,j.isObject)(r[n][i])?e(t[n][i],r[n][i]):t[n][i]=r[n][i]}else Object.assign(t,{[n]:r[n]});return t}(e,r);return e}var W=e.i(13969);let U=/\s*!(important)?/i,$=v(e=>!!(0,j.isString)(e)&&U.test(e)),q=v(e=>(0,j.isString)(e)?e.replace(U,"").trim():e);function G(e){var t;let{transform:r,conditions:n,normalize:i}=e,o=(t=e,v(function(...e){let r;return H({},...1===(r=function(...e){return e.filter(e=>!!(0,j.isObject)(e)&&Object.keys((0,W.compact)(e)).length>0)}(...e)).length?r:r.map(e=>t.normalize(e)))}));return v(function(...e){let t=i(o(...e)),a=w();return(0,B.walkObject)(t,(e,t)=>{let i=$(e);if(null==e)return;let[o,...s]=n.sort(t).map(n.resolve);i&&(e=q(e));let l=r(o,e)??y;l=(0,B.walkObject)(l,e=>(0,j.isString)(e)&&i?`${e} !important`:e,{getKey:e=>n.expandAtRule(e)}),function(e,t,r){let n=e;for(let e of t)e&&(n[e]||(n[e]=w()),n=n[e]);H(n,r)}(a,s.flat(),l)}),function e(t){let r=[],n=[],i={};for(let[o,a]of Object.entries(t))o.startsWith("@media")?r.push([o,a]):o.startsWith("@container")?n.push([o,a]):(0,j.isObject)(a)?i[o]=e(a):i[o]=a;let o=z(r),a=z(n);return{...i,...Object.fromEntries(o),...Object.fromEntries(a)}}(a)})}var K=e.i(35207),Y=e.i(52992),X=e.i(41344);let Q=e=>({base:y,variants:y,defaultVariants:y,compoundVariants:[],...e}),Z={reset:"reset",base:"base",tokens:"tokens",recipes:"recipes"},J={reset:0,base:1,tokens:2,recipes:3},ee=/[^a-zA-Z0-9_\u0081-\uffff-]/g,et=/[A-Z]/g;function er(e,t={}){let{fallback:r="",prefix:n=""}=t,i=["-",n,`${e}`.replace(ee,e=>`\\${e}`)].filter(Boolean).join("-").replace(et,e=>`-${e.toLowerCase()}`);return{var:i,ref:`var(${i}${r?`, ${r}`:""})`}}let en=/([\0-\x1f\x7f]|^-?\d)|^-$|^-|[^\x80-\uFFFF\w-]/g,ei=function(e,t){return t?"\0"===e?"�":"-"===e&&1===e.length?"\\-":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16):"\\"+e},eo=e=>(e+"").replace(en,ei),ea=(e,t)=>{let r="",n=0,i="char",o="",a="",s=[];for(;n<e.length;){let l=e[n];if("{"===l){let i=e.indexOf("}",n);if(-1===i)break;let o=e.slice(n+1,i);r+=t(o)??o,n=i+1;continue}if("token"===i&&","===l){""===e[n]&&n++,i="fallback",s.push(i);let l=t(o);l?.endsWith(")")&&(r+=l.slice(0,-1)),o="",a="";continue}if("fallback"===i&&", var("===a+l){let t=es(e.slice(n+1))+n+1,o=e.slice(n+1,t);if(-1===t)break;r+=", var("+o+")",n=t+1,i=s.pop()??i,a="";continue}if("token"===i||"fallback"===i){if(n++,")"===l){i=s.pop()??i??"char",a+=l;let e=o?t(o)??eo(o):o;if(a){if(!(a=a.slice(1).trim()).startsWith("token(")&&a.endsWith(")")&&(a=a.slice(0,-1)),a.includes("token(")){let e=ea(a,t);e&&(a=e.slice(0,-1))}else if(a){let e=t(a);e&&(a=e)}}let n=r.at(-1);a?n?.trim()?r+=e.slice(0,-1)+", "+a+")":r+=a:r+=e||")",o="",a="",i="char";continue}"token"===i&&(o+=l),"fallback"===i&&(a+=l);continue}let u=e.indexOf("token(",n);if(-1!==u){let t=u+6;r+=e.slice(n,u),n=t,i="token",s.push(i);continue}r+=l,n++}return r},es=e=>{let t=0,r=["("];for(;t<e.length;){let n=e[t];if("("===n)r.push(n);else if(")"===n&&(r.pop(),0===r.length))break;t++}return t};function el(e){let t={};return e.forEach((e,r)=>{e instanceof Map?t[r]=Object.fromEntries(e):t[r]=e}),t}let eu=/({([^}]*)})/g,ec=/[{}]/g,ed=/\w+\.\w+/,eh=e=>{if(!(0,j.isString)(e))return[];let t=e.match(eu);return t?t.map(e=>e.replace(ec,"").trim()):[]},ef=/calc/g;function ep(e){return(0,j.isObject)(e)&&e.reference?e.reference:String(e)}let eg=(e,...t)=>t.map(ep).join(` ${e} `).replace(ef,""),em=(...e)=>`calc(${eg("+",...e)})`,ev=(...e)=>`calc(${eg("-",...e)})`,eb=(...e)=>`calc(${eg("*",...e)})`,ey=(...e)=>`calc(${eg("/",...e)})`,ex=e=>{let t=ep(e);return null==t||Number.isNaN(parseFloat(t))?eb(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},ew=Object.assign(e=>({add:(...t)=>ew(em(e,...t)),subtract:(...t)=>ew(ev(e,...t)),multiply:(...t)=>ew(eb(e,...t)),divide:(...t)=>ew(ey(e,...t)),negate:()=>ew(ex(e)),toString:()=>e.toString()}),{add:em,subtract:ev,multiply:eb,divide:ey,negate:ex}),e_=new Set(["spacing","sizes","borderWidths","fontSizes","radii"]),eC=[{enforce:"pre",transform(e){let{prefix:t,allTokens:r,formatCssVar:n,formatTokenName:i,registerToken:o}=e;r.filter(({extensions:e})=>"spacing"===e.category).forEach(e=>{let r=e.path.slice(),a=n(r,t);if((0,j.isString)(e.value)&&"0rem"===e.value)return;let s=[...e.path],l=s[s.length-1];null!=l&&(s[s.length-1]=`-${l}`),o({...e,value:ew.negate(a.ref),name:i(s),path:s,extensions:{...e.extensions,negative:!0,prop:`-${e.extensions.prop}`,originalPath:r}})})}},{enforce:"post",transform(e){let{allTokens:t,registerToken:r,formatTokenName:n}=e,i=t.filter(({extensions:e})=>"colors"===e.category),o=new Map,a=new Map;i.forEach(e=>{let{colorPalette:t}=e.extensions;t&&(t.keys.forEach(e=>{o.set(n(e),e)}),t.roots.forEach(r=>{let i=n(r),s=a.get(i)||[];if(s.push(e),a.set(i,s),e.extensions.default&&1===r.length){let e=t.keys[0]?.filter(Boolean);if(!e.length)return;let i=r.concat(e);o.set(n(i),[])}}))}),o.forEach(e=>{let t=["colors","colorPalette",...e].filter(Boolean),i=n(t),o=n(t.slice(1));r({name:i,value:i,originalValue:i,path:t,extensions:{condition:"base",originalPath:t,category:"colors",prop:o,virtual:!0}},"pre")})}},{enforce:"post",transform(e){e.allTokens.filter(e=>e_.has(e.extensions.category)&&!e.extensions.negative).forEach(e=>{Object.assign(e.extensions,{pixelValue:s(e.value)})})}},{enforce:"post",transform(e){e.allTokens=e.allTokens.filter(e=>""!==e.value)}}],ek=[{type:"extensions",enforce:"pre",name:"tokens/css-var",transform(e,t){let{prefix:r,formatCssVar:n}=t,{negative:i,originalPath:o}=e.extensions;return{cssVar:n((i?o:e.path).filter(Boolean),r)}}},{enforce:"post",type:"value",name:"tokens/conditionals",transform(e,t){let{prefix:r,formatCssVar:n}=t,i=eh(e.value);return i.length&&i.forEach(t=>{let i=n(t.split("."),r);e.value=e.value.replace(`{${i.ref}}`,i)}),e.value}},{type:"extensions",enforce:"pre",name:"tokens/colors/colorPalette",match:e=>"colors"===e.extensions.category&&!e.extensions.virtual,transform(e,t){let r=e.path.slice();if(r.pop(),r.shift(),0===r.length){let t=[...e.path];t.shift(),r=t}if(0===r.length)return{};let n=r.reduce((e,t,r,n)=>{let i=n.slice(0,r+1);return e.push(i),e},[]),i=r[0],o=t.formatTokenName(r),a=e.path.slice(e.path.indexOf(i)+1).reduce((e,t,r,n)=>(e.push(n.slice(r)),e),[]);return 0===a.length&&a.push([""]),{colorPalette:{value:o,roots:n,keys:a}}}}],eS=e=>(0,j.isObject)(e)&&Object.prototype.hasOwnProperty.call(e,"value");function eE(e){return"DEFAULT"===e[0]?e:e.filter(e=>"DEFAULT"!==e)}function eO(e){return e.filter(e=>"base"!==e)}Array.from(new Set(["aspectRatios","zIndex","opacity","colors","fonts","fontSizes","fontWeights","lineHeights","letterSpacings","sizes","shadows","spacing","radii","cursor","borders","borderWidths","borderStyles","durations","easings","animations","blurs","gradients","breakpoints","assets"]));let eI=e=>(t,r)=>{let n=r.utils.colorMix(t);if(n.invalid)return{[e]:t};let i="--mix-"+e;return{[i]:n.value,[e]:`var(${i}, ${n.color})`}},eP=["value","type","description"],eT=(...e)=>{let t=H({},...e.map(function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));let r=Object.create(Object.getPrototypeOf(t));for(let n of Object.keys(t))r[n]=e(t[n]);return r}));return t.theme?.tokens&&(0,B.walkObject)(t.theme.tokens,e=>{let t=Object.keys(e).filter(e=>!eP.includes(e)).length>0,r=eP.some(t=>null!=e[t]);return t&&r&&(e.DEFAULT||(e.DEFAULT={}),eP.forEach(t=>{var r;null!=e[t]&&((r=e.DEFAULT)[t]||(r[t]=e[t]),delete e[t])})),e},{stop:e=>e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).some(e=>eP.includes(e)||e!==e.toLowerCase()&&e!==e.toUpperCase())}),t};function eR(e,t){let r={};return(0,B.walkObject)(e,(e,t)=>{e&&(r[t.join(".")]=e.value)},{stop:t}),r}function eA(...e){var t;let r,n,i,a=eT(...e),{theme:s={},utilities:f={},globalCss:p={},cssVarsRoot:g=":where(:root, :host)",cssVarsPrefix:m="chakra",preflight:_}=a,C={names:i=Object.values(n=a.layers??Z).sort((e,t)=>J[e]-J[t]),atRule:`@layer ${i.join(", ")};`,wrap(e,t){if(a.disableLayers)return t;let r=n[e];return{[`@layer ${r}`]:t}}},k=function(e){let{prefix:t="",tokens:r={},semanticTokens:n={},breakpoints:i={}}=e,o=e=>e.join("."),a=[],s=new Map,l=new Map,u=new Map,c=new Map,d=new Map,f=new Map,p=new Map,g=new Map,m=[];function b(e,t){a.push(e),s.set(e.name,e),t&&g.forEach(r=>{r.enforce===t&&O(r,e)})}let y=i?{breakpoints:(0,B.mapObject)(i,e=>({value:e})),sizes:h(i,(e,t)=>[`breakpoint-${e}`,{value:t}])}:{breakpoints:{},sizes:{}},x=(0,W.compact)({...r,breakpoints:y.breakpoints,sizes:{...r.sizes,...y.sizes}});function w(e){return s.get(e)}let _={},C=v((e,t)=>d.get(e)??t),k=v(e=>_[e]||null),S=v(e=>ea(e,e=>{if(!e)return;if(e.includes("/")){let t=((e,t)=>{if(!e||"string"!=typeof e)return{invalid:!0,value:e};let[r,n]=e.split("/");if(!r||!n)return{invalid:!0,value:r};let i=t(r),o=w(`opacity.${n}`)?.value;if(!o&&isNaN(Number(n)))return{invalid:!0,value:r};let a=o?100*Number(o)+"%":`${n}%`,s=i??r;return{invalid:!1,color:s,value:`color-mix(in srgb, ${s} ${a}, transparent)`}})(e,e=>C(e));if(t.invalid)throw Error("Invalid color mix at "+e+": "+t.value);return t.value}let t=C(e);return t||(ed.test(e)?eo(e):e)})),E={prefix:t,allTokens:a,tokenMap:s,registerToken:b,getByName:w,formatTokenName:o,formatCssVar:(e,t)=>er(e.join("-"),{prefix:t}),flatMap:d,cssVarMap:u,categoryMap:p,colorPaletteMap:c,getVar:C,getCategoryValues:k,expandReferenceInValue:S};function O(e,t){if(t.extensions.references||(0,j.isFunction)(e.match)&&!e.match(t))return;let r=e.transform(t,E);switch(!0){case"extensions"===e.type:Object.assign(t.extensions,r);break;case"value"===e.type:t.value=r;break;default:t[e.type]=r}}function I(e){m.forEach(t=>{t.enforce===e&&t.transform(E)})}function P(e){g.forEach(t=>{t.enforce===e&&a.forEach(e=>{O(t,e)})})}return(0,B.walkObject)(x,(e,t)=>{let r=t.includes("DEFAULT"),n=(t=eE(t))[0],i=o(t),a=(0,j.isString)(e)?{value:e}:e,s={value:a.value,originalValue:a.value,name:i,path:t,extensions:{condition:"base",originalPath:t,category:n,prop:o(t.slice(1))}};r&&(s.extensions.default=!0),b(s)},{stop:eS}),(0,B.walkObject)(n,(e,t)=>{let r=t.includes("DEFAULT"),n=(t=eO(eE(t)))[0],i=o(t),a=(0,j.isString)(e.value)?{value:{base:e.value}}:e,s={value:a.value.base||"",originalValue:a.value.base||"",name:i,path:t,extensions:{originalPath:t,category:n,conditions:a.value,condition:"base",prop:o(t.slice(1))}};r&&(s.extensions.default=!0),b(s)},{stop:eS}),!function(...e){e.forEach(e=>{g.set(e.name,e)})}(...ek),!function(...e){m.push(...e)}(...eC),I("pre"),P("pre"),a.forEach(e=>{let t=function(e){if(!e.extensions.conditions)return;let{conditions:t}=e.extensions,r=[];return(0,B.walkObject)(t,(t,n)=>{let i=eO(n);if(!i.length)return;let o={...e,value:t,extensions:{...e.extensions,condition:i.join(":")}};r.push(o)}),r}(e);t&&0!==t.length&&t.forEach(e=>{b(e)})}),a.forEach(e=>{let t;if(t=e.value,!eu.test(t))return;let r=function(e){let t=eh(e),r=[];for(let e=0;e<t.length;e++){let n=w(t[e]);n&&r.push(n)}return r}(e.value);e.extensions.references=r.reduce((e,t)=>(e[t.name]=t,e),{})}),a.forEach(e=>{!function e(t){if(!t.extensions?.references)return t.extensions?.cssVar?.ref??t.value;let r=t.extensions.references??{},n=t.value,i=Object.keys(r);for(let t=0;t<i.length;t++){let o=i[t],a=r[o];if(a.extensions.conditions)continue;let s=e(a);n=n.replace(`{${o}}`,s)}return t.value=n,delete t.extensions.references,t.value}(e)}),I("post"),P("post"),a.forEach(e=>{!function(e){let{condition:t}=e.extensions;t&&(l.has(t)||l.set(t,new Set),l.get(t).add(e))}(e),function(e){let{category:t,prop:r}=e.extensions;t&&(p.has(t)||p.set(t,new Map),p.get(t).set(r,e))}(e),function(e){let{condition:t,negative:r,virtual:n,cssVar:i}=e.extensions;!r&&!n&&t&&i&&(u.has(t)||u.set(t,new Map),u.get(t).set(i.var,e.value))}(e),function(e){let{category:t,prop:r,cssVar:n,negative:i}=e.extensions;if(!t)return;f.has(t)||f.set(t,new Map);let o=i?e.extensions.conditions?e.originalValue:e.value:n.ref;f.get(t).set(r,o),d.set([t,r].join("."),o)}(e),function(e){let{colorPalette:t,virtual:r,default:n}=e.extensions;t&&!r&&t.roots.forEach(r=>{var i,a;let s,l=o(r);c.has(l)||c.set(l,new Map);let u=w(o((i=[...e.path],a=[...r],-1===(s=i.findIndex((e,t)=>a.every((e,r)=>i[t+r]===e)))||(i.splice(s,a.length),i.splice(s,0,"colorPalette")),i)));if(!u||!u.extensions.cssVar)return;let{var:d}=u.extensions.cssVar;if(c.get(l).set(d,e.extensions.cssVar.ref),n&&1===r.length){let n=w(o(["colors","colorPalette"]));if(!n)return;let i=w(o(e.path));if(!i)return;let a=t.keys[0]?.filter(Boolean);if(!a.length)return;let s=o(r.concat(a));c.has(s)||c.set(s,new Map),c.get(s).set(n.extensions.cssVar.var,i.extensions.cssVar.ref)}})}(e)}),_=el(f),E}({breakpoints:s.breakpoints,tokens:s.tokens,semanticTokens:s.semanticTokens,prefix:m}),S=function(e){var t;let r,n,i,o=Object.fromEntries(Object.entries(e).sort(([,e],[,t])=>parseInt(e,10)<parseInt(t,10)?-1:1).map(([e,t],r,n)=>{let i=null;return r<=n.length-1&&(i=n[r+1]?.[1]),null!=i&&(i=c(i)),[e,{name:e,min:l(t),max:i}]}));function a(e){return d(o[e])}let s=Object.fromEntries(Object.entries((n=Object.keys(o),r=[],(t=n).forEach((e,n)=>{let i=n,o=t[++i];for(;o;)r.push([e,o]),o=t[++i]}),i=r,Object.fromEntries(n.flatMap(e=>{let t=o[e],r=[`${e}Down`,d({max:c(t.min)})];return[[e,d({min:t.min})],[`${e}Only`,a(e)],r]}).filter(([,e])=>""!==e).concat(i.map(([e,t])=>{let r=o[e],n=o[t];return[`${e}To${t.charAt(0).toUpperCase()+t.slice(1)}`,d({min:r.min,max:c(n.min)})]}))))));return{values:Object.values(o),only:a,keys:function(){return(0,u.uniq)(["base",...Object.keys(o)])},conditions:s,getCondition:e=>s[e],up:function(e){return d({min:o[e].min})},down:function(e){return d({max:c(o[e].min)})}}}(s.breakpoints??y),E=(e=>{let{breakpoints:t,conditions:r={}}=e,n=Object.assign({},h(r,(e,t)=>[`_${e}`,t]),t.conditions);function i(){return Object.keys(n)}function o(e){return i().includes(e)||b.test(e)||e.startsWith("_")}return{keys:i,sort:v(e=>e.filter(e=>"base"!==e).sort((e,t)=>{let r=o(e),n=o(t);return r&&!n?1:!r&&n?-1:0})),has:o,resolve:function(e){return Reflect.get(n,e)||e},breakpoints:t.keys(),expandAtRule:function(e){return e.startsWith("@breakpoint")?t.getCondition(e.replace("@breakpoint ","")):e}}})({conditions:a.conditions??y,breakpoints:S}),O=function(e){let t,r=h(e.config,(e,t)=>[e,t]),n=e.tokens,i=new Map,o=new Map;function a(e,t){r[e]=t,s(e,t)}let s=(e,t)=>{let r=c(t);r&&(o.set(e,r),u(e,t))},l=new Map,u=(e,t)=>{if(!t)return;let r=c(t,e=>`type:Tokens["${e}"]`);if("object"==typeof r&&r.type)return void l.set(e,new Set([`type:${r.type}`]));if(r){let t=new Set(Object.keys(r));l.set(e,t)}let n=l.get(e)??new Set;t.property&&l.set(e,n.add(`CssProperties["${t.property}"]`))},c=(e,t)=>{let{values:r}=e,i=e=>{let r=t?.(e);return r?{[r]:r}:void 0};if((0,j.isString)(r))return i?.(r)??n.getCategoryValues(r)??y;if(Array.isArray(r)){let e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return(0,j.isFunction)(r)?r(t?i:n.getCategoryValues):r},d=v((e,t)=>({[e]:e.startsWith("--")?n.getVar(t,t):t})),f=Object.assign(n.getVar,{raw:e=>n.getByName(e)}),p=v((e,t)=>{let i=m(e);(0,j.isString)(t)&&!t.includes("_EMO_")&&(t=n.expandReferenceInValue(t));let a=r[i];if(!a)return d(i,t);let s=o.get(i)?.[t];return a.transform?a.transform(s??t,{raw:t,token:f,utils:{colorMix:e=>((e,t)=>{if(!e||"string"!=typeof e)return{invalid:!0,value:e};let[r,n]=e.split("/");if(!r||!n||"currentBg"===r)return{invalid:!0,value:r};let i=t(`colors.${r}`),o=t.raw(`opacity.${n}`)?.value;if(!o&&isNaN(Number(n)))return{invalid:!0,value:r};let a=o?100*Number(o)+"%":`${n}%`,s=i??r;return{invalid:!1,color:s,value:`color-mix(in srgb, ${s} ${a}, transparent)`}})(e,f)}}):d(e,s??t)});for(let[e,t]of Object.entries(r)){let{shorthand:r}=t??{};r&&(Array.isArray(r)?r:[r]).forEach(t=>i.set(t,e))}for(let[e,i]of(a("colorPalette",{values:Object.keys(t=el(n.colorPaletteMap)),transform:v(e=>t[e])}),Object.entries(r)))i&&s(e,i);for(let[e,t]of Object.entries(r))t&&u(e,t);let g=i.size>0,m=v(e=>i.get(e)??e);return{keys:()=>[...Array.from(i.keys()),...Object.keys(r)],hasShorthand:g,transform:p,shorthands:i,resolveShorthand:m,register:a,getTypes:()=>{let e=new Map;for(let[t,r]of l.entries()){if(0===r.size){e.set(t,["string"]);continue}let n=Array.from(r).map(e=>e.startsWith("CssProperties")?e:e.startsWith("type:")?e.replace("type:",""):JSON.stringify(e));e.set(t,n)}return e},addPropertyType:(e,t)=>{let r=l.get(e)??new Set;l.set(e,new Set([...r,...t]))}}}({config:f,tokens:k});!function(){let{textStyles:e,layerStyles:t,animationStyles:r}=s;for(let[n,i]of Object.entries((0,W.compact)({textStyle:e,layerStyle:t,animationStyle:r}))){let e=eR(i??y,eM);O.register(n,{values:Object.keys(e),transform:t=>M(e[t])})}}(),O.addPropertyType("animationName",Object.keys(s.keyframes??y));let I=new Set(["css",...O.keys(),...E.keys()]),P=v(e=>I.has(e)||o(e)),T=e=>{if(Array.isArray(e)){let t=w();for(let r=0;r<e.length;r++){let n=e[r];null!=n&&(t[E.breakpoints[r]]=n)}return t}return e},R=function(e){let{utility:t,normalize:r}=e,{hasShorthand:n,resolveShorthand:i}=t;return function(e){return(0,B.walkObject)(e,r,{stop:e=>Array.isArray(e),getKey:n?i:void 0})}}({utility:O,normalize:T}),A=function(e){let{conditions:t,isValidProperty:r}=e;return function(e){return(0,B.walkObject)(e,e=>e,{getKey:(e,n)=>(0,j.isObject)(n)?t.has(e)||r(e)?e:(function(e){let t=[],r=0,n="",i=!1;for(let o=0;o<e.length;o++){let a=e[o];if("\\"===a&&!i){i=!0,n+=a;continue}if(i){i=!1,n+=a;continue}"("===a?r++:")"===a&&r--,","===a&&0===r?(t.push(n.trim()),n=""):n+=a}return n&&t.push(n.trim()),t})(e).map(e=>{let t,r=e.startsWith("&")?e.slice(1):e;return(t=r.toLowerCase()).startsWith(":host-context")||t.startsWith(":host")||t.startsWith("::slotted")?`${r} &`:`&${r}`}).join(", "):e})}}({conditions:E,isValidProperty:P}),M=G({transform:O.transform,conditions:E,normalize:R}),N=function(e){let{css:t,conditions:r,normalize:n,layers:i}=e;return function o(a={}){let s=Q(a),{base:l,defaultVariants:c,compoundVariants:d}=s,f=h(s.variants,(e,t)=>[e,h(t,(e,t)=>[e,n(t)])]),p=G({conditions:r,normalize:n,transform:(e,t)=>f[e]?.[t]}),g=(e={})=>{var r,o;let a,s=n({...c,...(0,W.compact)(e)}),u={...l};H(u,p(s));let h=(r=d,o=s,a=y,r.forEach(e=>{Object.entries(e).every(([e,t])=>"css"===e||(Array.isArray(t)?t:[t]).some(t=>o[e]===t))&&(a=t(a,e.css))}),a);return i.wrap("recipes",t(u,h))},m=Object.keys(f),v=h(f,(e,t)=>[e,Object.keys(t)]);return Object.assign(e=>t(g(e)),{className:a.className,__cva__:!0,variantMap:v,variantKeys:m,raw:g,config:a,splitVariantProps:e=>{let t=(0,K.omit)(e,["recipe"]),[r,n]=(0,Y.splitProps)(t,m),i=m.includes("colorPalette"),o=m.includes("orientation");return i||(r.colorPalette=e.colorPalette||c.colorPalette),o&&(n.orientation=e.orientation),[r,n]},merge(t){return o((function(e){let{css:t}=e;return function(e,r){let n=Q(r.config),i=(0,u.uniq)(e.variantKeys,Object.keys(r.variants)),o=t(e.base,n.base),a=Object.fromEntries(i.map(r=>[r,t(e.config.variants[r],n.variants[r])])),s=H(e.config.defaultVariants,n.defaultVariants),l=[...e.compoundVariants,...n.compoundVariants];return{className:(0,X.cx)(e.className,r.className),base:o,variants:a,defaultVariants:s,compoundVariants:l}}})(e)(this,t))}})}}({css:M,conditions:E,normalize:R,layers:C}),D=function(e){let{cva:t}=e;return function(e=y){let r=Object.entries(((e=y)=>{let t=(e.slots??[]).map(t=>{let r,n;return[t,{base:e.base?.[t]??y,variants:w(),defaultVariants:e.defaultVariants??y,compoundVariants:e.compoundVariants?(r=e.compoundVariants,n=t,r.filter(e=>e.css[n]).map(e=>({...e,css:e.css[n]}))):x}]});for(let[r,n]of Object.entries(e.variants??{}))for(let[e,i]of Object.entries(n))t.forEach(([t,n])=>{var o;(o=n.variants)[r]??(o[r]={}),n.variants[r][e]=i[t]??y});return Object.fromEntries(t)})(e)).map(([e,r])=>[e,t(r)]),n=e.variants??y,i=Object.keys(n),o=h(n,(e,t)=>[e,Object.keys(t)]),a={};return e.className&&(a=Object.fromEntries(e.slots.map(t=>[t,`${e.className}__${t}`]))),Object.assign(function(e){return Object.fromEntries(r.map(([t,r])=>[t,r(e)]))},{variantMap:o,variantKeys:i,splitVariantProps:function(t){let r=(0,K.omit)(t,["recipe"]),[n,o]=(0,Y.splitProps)(r,i),a=i.includes("colorPalette"),s=i.includes("orientation");return a||(n.colorPalette=t.colorPalette||e.defaultVariants?.colorPalette),s&&(o.orientation=t.orientation),[n,o]},classNameMap:a})}}({cva:N});function L(){let e={};for(let[t,r]of k.cssVarMap.entries()){let n=Object.fromEntries(r);if(0===Object.keys(n).length)continue;let i="base"===t?g:E.resolve(t),o=i.startsWith("@");H(e,M(A({[i]:o?{[g]:n}:n})))}return C.wrap("tokens",e)}function V(){let e=Object.assign({},h(s.keyframes??y,(e,t)=>[`@keyframes ${e}`,t]),M(A(p)));return C.wrap("base",e)}function F(){let e=function(e){let{preflight:t}=e;if(!t)return{};let{scope:r="",level:n="parent"}=(0,j.isObject)(t)?t:{},i="";r&&"parent"===n?i=`${r} `:r&&"element"===n&&(i=`&${r}`);let o={"*":{margin:"0px",padding:"0px",font:"inherit",wordWrap:"break-word",WebkitTapHighlightColor:"transparent"},"*, *::before, *::after, *::backdrop":{boxSizing:"border-box",borderWidth:"0px",borderStyle:"solid",borderColor:"var(--global-color-border, currentColor)"},hr:{height:"0px",color:"inherit",borderTopWidth:"1px"},body:{minHeight:"100dvh",position:"relative"},img:{borderStyle:"none"},"img, svg, video, canvas, audio, iframe, embed, object":{display:"block",verticalAlign:"middle"},iframe:{border:"none"},"img, video":{maxWidth:"100%",height:"auto"},"p, h1, h2, h3, h4, h5, h6":{overflowWrap:"break-word"},"ol, ul":{listStyle:"none"},"code, kbd, pre, samp":{fontSize:"1em"},"button, [type='button'], [type='reset'], [type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},"button, input, optgroup, select, textarea":{color:"inherit"},"button, select":{textTransform:"none"},table:{textIndent:"0px",borderColor:"inherit",borderCollapse:"collapse"},"*::placeholder":{opacity:"unset",color:"#9ca3af",userSelect:"none"},textarea:{resize:"vertical"},summary:{display:"list-item"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},dialog:{padding:"0px"},a:{color:"inherit",textDecoration:"inherit"},"abbr:where([title])":{textDecoration:"underline dotted"},"b, strong":{fontWeight:"bolder"},"code, kbd, samp, pre":{fontSize:"1em","--font-mono-fallback":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New'",fontFamily:"var(--global-font-mono, var(--font-mono-fallback))"},'input[type="text"], input[type="email"], input[type="search"], input[type="password"]':{WebkitAppearance:"none",MozAppearance:"none"},"input[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration, ::-webkit-search-cancel-button":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},'input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button':{height:"auto"},"input[type='number']":{MozAppearance:"textfield"},":-moz-ui-invalid":{boxShadow:"none"},":-moz-focusring":{outline:"auto"},"[hidden]:where(:not([hidden='until-found']))":{display:"none !important"}},a={[r||"html"]:{lineHeight:1.5,"--font-fallback":"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",WebkitTextSizeAdjust:"100%",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",textRendering:"optimizeLegibility",touchAction:"manipulation",MozTabSize:"4",tabSize:"4",fontFamily:"var(--global-font-body, var(--font-fallback))"}};return"element"===n?Object.assign(a,Object.entries(o).reduce((e,[t,r])=>(e[t]={[i]:r},e),{})):i?a[i]=o:Object.assign(a,o),a}({preflight:_});return C.wrap("reset",e)}let z=(t=k,r=new Map,t.allTokens.forEach(e=>{let{cssVar:t,virtual:n,conditions:i}=e.extensions,o=i||n?t.ref:e.value;r.set(e.name,{value:o,variable:t.ref})}),r),U=(e,t)=>z.get(e)?.value||t;function $(e){return Object.hasOwnProperty.call(s.recipes??y,e)}function q(e){return Object.hasOwnProperty.call(s.slotRecipes??y,e)}U.var=(e,t)=>z.get(e)?.variable||t;let ee=[F(),V(),L()],et={layerStyles:eN(s.layerStyles??y),textStyles:eN(s.textStyles??y),animationStyles:eN(s.animationStyles??y),tokens:eD(k,Object.keys(s.tokens??y),(e,t)=>!e.extensions.conditions&&!t.includes("colorPalette")),semanticTokens:eD(k,Object.keys(s.semanticTokens??y),e=>!!e.extensions.conditions),keyframes:eL(s.keyframes??y),breakpoints:eL(s.breakpoints??y)};return{$$chakra:!0,_config:a,_global:ee,breakpoints:S,tokens:k,conditions:E,utility:O,token:U,properties:I,layers:C,isValidProperty:P,splitCssProps:function(e){return(0,Y.splitProps)(e,P)},normalizeValue:T,getTokenCss:L,getGlobalCss:V,getPreflightCss:F,css:M,cva:N,sva:D,getRecipe:function(e,t){return s.recipes?.[e]??t},getSlotRecipe:function(e,t){return s.slotRecipes?.[e]??t},hasRecipe:function(e){return $(e)||q(e)},isRecipe:$,isSlotRecipe:q,query:et}}e.s(["mergeConfigs",()=>eT],99995);let eM=e=>(0,j.isObject)(e)&&"value"in e,eN=e=>({list:()=>Object.keys(eR(e,eM)),search(e){return this.list().filter(t=>t.includes(e))}}),eD=(e,t,r)=>({categoryKeys:t,list(t){let n=e.categoryMap.get(t),i=n?[...n.entries()]:[],o=[];for(let e=0;e<i.length;e++){let[t,n]=i[e];r(n,t)&&o.push(t)}return o},search(e,t){return this.list(e).filter(e=>e.includes(t))}}),eL=e=>({list:()=>Object.keys(e),search(e){return this.list().filter(t=>t.includes(e))}});e.s(["createSystem",()=>eA],69251);let eV=e=>e,eF=e=>e,ej=e=>e,ez=e=>e,eB=e=>e,eH=e=>e,eW=e=>e,eU=e=>e,e$=e=>e;function eq(){let e=e=>e;return new Proxy(e,{get:()=>e})}let eG=eq(),eK=eq(),eY=e=>e;e.s(["defineAnimationStyles",()=>eU,"defineConditions",()=>eV,"defineConfig",()=>eY,"defineGlobalStyles",()=>eB,"defineKeyframes",()=>ez,"defineLayerStyles",()=>e$,"defineRecipe",()=>eF,"defineSemanticTokens",()=>eK,"defineSlotRecipe",()=>ej,"defineStyle",()=>eH,"defineTextStyles",()=>eW,"defineTokens",()=>eG],13683);let eX=(e,t)=>null!=t?`${e}(${t})`:t,eQ=e=>{if(/^var\(--.+\)$/.test(e)||null==e)return e;let t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},eZ=e=>({values:["outside","inside","mixed","none"],transform(t,{token:r}){let n=r("colors.colorPalette.focusRing");return({inside:{"--focus-ring-color":n,[e]:{outlineOffset:"0px",outlineWidth:"var(--focus-ring-width, 1px)",outlineColor:"var(--focus-ring-color)",outlineStyle:"var(--focus-ring-style, solid)",borderColor:"var(--focus-ring-color)"}},outside:{"--focus-ring-color":n,[e]:{outlineWidth:"var(--focus-ring-width, 2px)",outlineOffset:"var(--focus-ring-offset, 2px)",outlineStyle:"var(--focus-ring-style, solid)",outlineColor:"var(--focus-ring-color)"}},mixed:{"--focus-ring-color":n,[e]:{outlineWidth:"var(--focus-ring-width, 3px)",outlineStyle:"var(--focus-ring-style, solid)",outlineColor:"color-mix(in srgb, var(--focus-ring-color), transparent 60%)",borderColor:"var(--focus-ring-color)"}},none:{"--focus-ring-color":n,[e]:{outline:"none"}}})[t]??{}}}),eJ=eI("borderColor"),e0=e=>({transition:e,transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"}),e1=eV({hover:["@media (hover: hover)","&:is(:hover, [data-hover]):not(:disabled, [data-disabled])"],active:"&:is(:active, [data-active]):not(:disabled, [data-disabled], [data-state=open])",focus:"&:is(:focus, [data-focus])",focusWithin:"&:is(:focus-within, [data-focus-within])",focusVisible:"&:is(:focus-visible, [data-focus-visible])",disabled:"&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])",visited:"&:visited",target:"&:target",readOnly:"&:is([data-readonly], [aria-readonly=true], [readonly])",readWrite:"&:read-write",empty:"&:is(:empty, [data-empty])",checked:"&:is(:checked, [data-checked], [aria-checked=true], [data-state=checked])",enabled:"&:enabled",expanded:"&:is([aria-expanded=true], [data-expanded], [data-state=expanded])",highlighted:"&[data-highlighted]",complete:"&[data-complete]",incomplete:"&[data-incomplete]",dragging:"&[data-dragging]",before:"&::before",after:"&::after",firstLetter:"&::first-letter",firstLine:"&::first-line",marker:"&::marker",selection:"&::selection",file:"&::file-selector-button",backdrop:"&::backdrop",first:"&:first-of-type",last:"&:last-of-type",notFirst:"&:not(:first-of-type)",notLast:"&:not(:last-of-type)",only:"&:only-child",even:"&:nth-of-type(even)",odd:"&:nth-of-type(odd)",peerFocus:".peer:is(:focus, [data-focus]) ~ &",peerHover:".peer:is(:hover, [data-hover]):not(:disabled, [data-disabled]) ~ &",peerActive:".peer:is(:active, [data-active]):not(:disabled, [data-disabled]) ~ &",peerFocusWithin:".peer:focus-within ~ &",peerFocusVisible:".peer:is(:focus-visible, [data-focus-visible]) ~ &",peerDisabled:".peer:is(:disabled, [disabled], [data-disabled]) ~ &",peerChecked:".peer:is(:checked, [data-checked], [aria-checked=true], [data-state=checked]) ~ &",peerInvalid:".peer:is(:invalid, [data-invalid], [aria-invalid=true]) ~ &",peerExpanded:".peer:is([aria-expanded=true], [data-expanded], [data-state=expanded]) ~ &",peerPlaceholderShown:".peer:placeholder-shown ~ &",groupFocus:".group:is(:focus, [data-focus]) &",groupHover:".group:is(:hover, [data-hover]):not(:disabled, [data-disabled]) &",groupActive:".group:is(:active, [data-active]):not(:disabled, [data-disabled]) &",groupFocusWithin:".group:focus-within &",groupFocusVisible:".group:is(:focus-visible, [data-focus-visible]) &",groupDisabled:".group:is(:disabled, [disabled], [data-disabled]) &",groupChecked:".group:is(:checked, [data-checked], [aria-checked=true], [data-state=checked]) &",groupExpanded:".group:is([aria-expanded=true], [data-expanded], [data-state=expanded]) &",groupInvalid:".group:invalid &",indeterminate:"&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate])",required:"&:is([data-required], [aria-required=true])",valid:"&:is([data-valid], [data-state=valid])",invalid:"&:is([data-invalid], [aria-invalid=true], [data-state=invalid])",autofill:"&:autofill",inRange:"&:is(:in-range, [data-in-range])",outOfRange:"&:is(:out-of-range, [data-outside-range])",placeholder:"&::placeholder, &[data-placeholder]",placeholderShown:"&:is(:placeholder-shown, [data-placeholder-shown])",pressed:"&:is([aria-pressed=true], [data-pressed])",selected:"&:is([aria-selected=true], [data-selected])",grabbed:"&:is([aria-grabbed=true], [data-grabbed])",underValue:"&[data-state=under-value]",overValue:"&[data-state=over-value]",atValue:"&[data-state=at-value]",default:"&:default",optional:"&:optional",open:"&:is([open], [data-open], [data-state=open])",closed:"&:is([closed], [data-closed], [data-state=closed])",fullscreen:"&:is(:fullscreen, [data-fullscreen])",loading:"&:is([data-loading], [aria-busy=true])",hidden:"&:is([hidden], [data-hidden])",current:"&[data-current]",currentPage:"&[aria-current=page]",currentStep:"&[aria-current=step]",today:"&[data-today]",unavailable:"&[data-unavailable]",rangeStart:"&[data-range-start]",rangeEnd:"&[data-range-end]",now:"&[data-now]",topmost:"&[data-topmost]",motionReduce:"@media (prefers-reduced-motion: reduce)",motionSafe:"@media (prefers-reduced-motion: no-preference)",print:"@media print",landscape:"@media (orientation: landscape)",portrait:"@media (orientation: portrait)",dark:".dark &, .dark .chakra-theme:not(.light) &",light:":root &, .light &",osDark:"@media (prefers-color-scheme: dark)",osLight:"@media (prefers-color-scheme: light)",highContrast:"@media (forced-colors: active)",lessContrast:"@media (prefers-contrast: less)",moreContrast:"@media (prefers-contrast: more)",ltr:"[dir=ltr] &",rtl:"[dir=rtl] &",scrollbar:"&::-webkit-scrollbar",scrollbarThumb:"&::-webkit-scrollbar-thumb",scrollbarTrack:"&::-webkit-scrollbar-track",horizontal:"&[data-orientation=horizontal]",vertical:"&[data-orientation=vertical]",icon:"& :where(svg)",starting:"@starting-style"}),e2=er("bg-currentcolor"),e5=e=>e===e2.ref||"currentBg"===e,e3=e=>({...e("colors"),currentBg:e2}),e4=eY({conditions:e1,utilities:{background:{values:e3,shorthand:["bg"],transform(e,t){if(e5(t.raw))return{background:e2.ref};let r=eI("background")(e,t);return{...r,[e2.var]:r?.background}}},backgroundColor:{values:e3,shorthand:["bgColor"],transform(e,t){if(e5(t.raw))return{backgroundColor:e2.ref};let r=eI("backgroundColor")(e,t);return{...r,[e2.var]:r?.backgroundColor}}},backgroundSize:{shorthand:["bgSize"]},backgroundPosition:{shorthand:["bgPos"]},backgroundRepeat:{shorthand:["bgRepeat"]},backgroundAttachment:{shorthand:["bgAttachment"]},backgroundClip:{shorthand:["bgClip"],values:["text"],transform:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},backgroundGradient:{shorthand:["bgGradient"],values:e=>({...e("gradients"),"to-t":"linear-gradient(to top, var(--gradient))","to-tr":"linear-gradient(to top right, var(--gradient))","to-r":"linear-gradient(to right, var(--gradient))","to-br":"linear-gradient(to bottom right, var(--gradient))","to-b":"linear-gradient(to bottom, var(--gradient))","to-bl":"linear-gradient(to bottom left, var(--gradient))","to-l":"linear-gradient(to left, var(--gradient))","to-tl":"linear-gradient(to top left, var(--gradient))"}),transform:e=>({"--gradient-stops":"var(--gradient-from), var(--gradient-to)","--gradient":"var(--gradient-via-stops, var(--gradient-stops))",backgroundImage:e})},gradientFrom:{values:e3,transform:eI("--gradient-from")},gradientTo:{values:e3,transform:eI("--gradient-to")},gradientVia:{values:e3,transform:(e,t)=>({...eI("--gradient-via")(e,t),"--gradient-via-stops":"var(--gradient-from), var(--gradient-via), var(--gradient-to)"})},backgroundImage:{values:e=>({...e("gradients"),...e("assets")}),shorthand:["bgImg","bgImage"]},border:{values:"borders"},borderTop:{values:"borders"},borderLeft:{values:"borders"},borderBlockStart:{values:"borders"},borderRight:{values:"borders"},borderBottom:{values:"borders"},borderBlockEnd:{values:"borders"},borderInlineStart:{values:"borders",shorthand:["borderStart"]},borderInlineEnd:{values:"borders",shorthand:["borderEnd"]},borderInline:{values:"borders",shorthand:["borderX"]},borderBlock:{values:"borders",shorthand:["borderY"]},borderColor:{values:e3,transform:eI("borderColor")},borderTopColor:{values:e3,transform:eI("borderTopColor")},borderBlockStartColor:{values:e3,transform:eI("borderBlockStartColor")},borderBottomColor:{values:e3,transform:eI("borderBottomColor")},borderBlockEndColor:{values:e3,transform:eI("borderBlockEndColor")},borderLeftColor:{values:e3,transform:eI("borderLeftColor")},borderInlineStartColor:{values:e3,shorthand:["borderStartColor"],transform:eI("borderInlineStartColor")},borderRightColor:{values:e3,transform:eI("borderRightColor")},borderInlineEndColor:{values:e3,shorthand:["borderEndColor"],transform:eI("borderInlineEndColor")},borderStyle:{values:"borderStyles"},borderTopStyle:{values:"borderStyles"},borderBlockStartStyle:{values:"borderStyles"},borderBottomStyle:{values:"borderStyles"},borderBlockEndStyle:{values:"borderStyles"},borderInlineStartStyle:{values:"borderStyles",shorthand:["borderStartStyle"]},borderInlineEndStyle:{values:"borderStyles",shorthand:["borderEndStyle"]},borderLeftStyle:{values:"borderStyles"},borderRightStyle:{values:"borderStyles"},borderRadius:{values:"radii",shorthand:["rounded"]},borderTopLeftRadius:{values:"radii",shorthand:["roundedTopLeft"]},borderStartStartRadius:{values:"radii",shorthand:["roundedStartStart","borderTopStartRadius"]},borderEndStartRadius:{values:"radii",shorthand:["roundedEndStart","borderBottomStartRadius"]},borderTopRightRadius:{values:"radii",shorthand:["roundedTopRight"]},borderStartEndRadius:{values:"radii",shorthand:["roundedStartEnd","borderTopEndRadius"]},borderEndEndRadius:{values:"radii",shorthand:["roundedEndEnd","borderBottomEndRadius"]},borderBottomLeftRadius:{values:"radii",shorthand:["roundedBottomLeft"]},borderBottomRightRadius:{values:"radii",shorthand:["roundedBottomRight"]},borderInlineStartRadius:{values:"radii",property:"borderRadius",shorthand:["roundedStart","borderStartRadius"],transform:e=>({borderStartStartRadius:e,borderEndStartRadius:e})},borderInlineEndRadius:{values:"radii",property:"borderRadius",shorthand:["roundedEnd","borderEndRadius"],transform:e=>({borderStartEndRadius:e,borderEndEndRadius:e})},borderTopRadius:{values:"radii",property:"borderRadius",shorthand:["roundedTop"],transform:e=>({borderTopLeftRadius:e,borderTopRightRadius:e})},borderBottomRadius:{values:"radii",property:"borderRadius",shorthand:["roundedBottom"],transform:e=>({borderBottomLeftRadius:e,borderBottomRightRadius:e})},borderLeftRadius:{values:"radii",property:"borderRadius",shorthand:["roundedLeft"],transform:e=>({borderTopLeftRadius:e,borderBottomLeftRadius:e})},borderRightRadius:{values:"radii",property:"borderRadius",shorthand:["roundedRight"],transform:e=>({borderTopRightRadius:e,borderBottomRightRadius:e})},borderWidth:{values:"borderWidths"},borderBlockStartWidth:{values:"borderWidths"},borderTopWidth:{values:"borderWidths"},borderBottomWidth:{values:"borderWidths"},borderBlockEndWidth:{values:"borderWidths"},borderRightWidth:{values:"borderWidths"},borderInlineWidth:{values:"borderWidths",shorthand:["borderXWidth"]},borderInlineStartWidth:{values:"borderWidths",shorthand:["borderStartWidth"]},borderInlineEndWidth:{values:"borderWidths",shorthand:["borderEndWidth"]},borderLeftWidth:{values:"borderWidths"},borderBlockWidth:{values:"borderWidths",shorthand:["borderYWidth"]},color:{values:e3,transform:eI("color")},fill:{values:e3,transform:eI("fill")},stroke:{values:e3,transform:eI("stroke")},accentColor:{values:e3,transform:eI("accentColor")},divideX:{values:{type:"string"},transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderInlineStartWidth:e,borderInlineEndWidth:"0px"}})},divideY:{values:{type:"string"},transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderTopWidth:e,borderBottomWidth:"0px"}})},divideColor:{values:e3,transform:(e,t)=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":eJ(e,t)})},divideStyle:{property:"borderStyle",transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderStyle:e}})},boxShadow:{values:"shadows",shorthand:["shadow"]},boxShadowColor:{values:e3,transform:eI("--shadow-color"),shorthand:["shadowColor"]},mixBlendMode:{shorthand:["blendMode"]},backgroundBlendMode:{shorthand:["bgBlendMode"]},opacity:{values:"opacity"},filter:{transform:e=>"auto"!==e?{filter:e}:{filter:"var(--blur) var(--brightness) var(--contrast) var(--grayscale) var(--hue-rotate) var(--invert) var(--saturate) var(--sepia) var(--drop-shadow)"}},blur:{values:"blurs",transform:e=>({"--blur":eX("blur",e)})},brightness:{transform:e=>({"--brightness":eX("brightness",e)})},contrast:{transform:e=>({"--contrast":eX("contrast",e)})},grayscale:{transform:e=>({"--grayscale":eX("grayscale",e)})},hueRotate:{transform:e=>({"--hue-rotate":eX("hue-rotate",eQ(e))})},invert:{transform:e=>({"--invert":eX("invert",e)})},saturate:{transform:e=>({"--saturate":eX("saturate",e)})},sepia:{transform:e=>({"--sepia":eX("sepia",e)})},dropShadow:{transform:e=>({"--drop-shadow":eX("drop-shadow",e)})},backdropFilter:{transform:e=>"auto"!==e?{backdropFilter:e}:{backdropFilter:"var(--backdrop-blur) var(--backdrop-brightness) var(--backdrop-contrast) var(--backdrop-grayscale) var(--backdrop-hue-rotate) var(--backdrop-invert) var(--backdrop-opacity) var(--backdrop-saturate) var(--backdrop-sepia)"}},backdropBlur:{values:"blurs",transform:e=>({"--backdrop-blur":eX("blur",e)})},backdropBrightness:{transform:e=>({"--backdrop-brightness":eX("brightness",e)})},backdropContrast:{transform:e=>({"--backdrop-contrast":eX("contrast",e)})},backdropGrayscale:{transform:e=>({"--backdrop-grayscale":eX("grayscale",e)})},backdropHueRotate:{transform:e=>({"--backdrop-hue-rotate":eX("hue-rotate",eQ(e))})},backdropInvert:{transform:e=>({"--backdrop-invert":eX("invert",e)})},backdropOpacity:{transform:e=>({"--backdrop-opacity":eX("opacity",e)})},backdropSaturate:{transform:e=>({"--backdrop-saturate":eX("saturate",e)})},backdropSepia:{transform:e=>({"--backdrop-sepia":eX("sepia",e)})},flexBasis:{values:"sizes"},gap:{values:"spacing"},rowGap:{values:"spacing",shorthand:["gapY"]},columnGap:{values:"spacing",shorthand:["gapX"]},flexDirection:{shorthand:["flexDir"]},gridGap:{values:"spacing"},gridColumnGap:{values:"spacing"},gridRowGap:{values:"spacing"},outlineColor:{values:e3,transform:eI("outlineColor")},focusRing:eZ("&:is(:focus, [data-focus])"),focusVisibleRing:eZ("&:is(:focus-visible, [data-focus-visible])"),focusRingColor:{values:e3,transform:eI("--focus-ring-color")},focusRingOffset:{values:"spacing",transform:e=>({"--focus-ring-offset":e})},focusRingWidth:{values:"borderWidths",property:"outlineWidth",transform:e=>({"--focus-ring-width":e})},focusRingStyle:{values:"borderStyles",property:"outlineStyle",transform:e=>({"--focus-ring-style":e})},aspectRatio:{values:"aspectRatios"},width:{values:"sizes",shorthand:["w"]},inlineSize:{values:"sizes"},height:{values:"sizes",shorthand:["h"]},blockSize:{values:"sizes"},boxSize:{values:"sizes",property:"width",transform:e=>({width:e,height:e})},minWidth:{values:"sizes",shorthand:["minW"]},minInlineSize:{values:"sizes"},minHeight:{values:"sizes",shorthand:["minH"]},minBlockSize:{values:"sizes"},maxWidth:{values:"sizes",shorthand:["maxW"]},maxInlineSize:{values:"sizes"},maxHeight:{values:"sizes",shorthand:["maxH"]},maxBlockSize:{values:"sizes"},hideFrom:{values:"breakpoints",transform:(e,{raw:t,token:r})=>({[r.raw(`breakpoints.${t}`)?`@breakpoint ${t}`:`@media screen and (min-width: ${e})`]:{display:"none"}})},hideBelow:{values:"breakpoints",transform:(e,{raw:t,token:r})=>({[r.raw(`breakpoints.${t}`)?`@breakpoint ${t}Down`:`@media screen and (max-width: ${e})`]:{display:"none"}})},overscrollBehavior:{shorthand:["overscroll"]},overscrollBehaviorX:{shorthand:["overscrollX"]},overscrollBehaviorY:{shorthand:["overscrollY"]},scrollbar:{values:["visible","hidden"],transform(e){switch(e){case"visible":return{msOverflowStyle:"auto",scrollbarWidth:"auto","&::-webkit-scrollbar":{display:"block"}};case"hidden":return{msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}};default:return{}}}},scrollbarColor:{values:e3,transform:eI("scrollbarColor")},scrollbarGutter:{values:"spacing"},scrollbarWidth:{values:"sizes"},scrollMargin:{values:"spacing"},scrollMarginTop:{values:"spacing"},scrollMarginBottom:{values:"spacing"},scrollMarginLeft:{values:"spacing"},scrollMarginRight:{values:"spacing"},scrollMarginX:{values:"spacing",transform:e=>({scrollMarginLeft:e,scrollMarginRight:e})},scrollMarginY:{values:"spacing",transform:e=>({scrollMarginTop:e,scrollMarginBottom:e})},scrollPadding:{values:"spacing"},scrollPaddingTop:{values:"spacing"},scrollPaddingBottom:{values:"spacing"},scrollPaddingLeft:{values:"spacing"},scrollPaddingRight:{values:"spacing"},scrollPaddingInline:{values:"spacing",shorthand:["scrollPaddingX"]},scrollPaddingBlock:{values:"spacing",shorthand:["scrollPaddingY"]},scrollSnapType:{values:{none:"none",x:"x var(--scroll-snap-strictness)",y:"y var(--scroll-snap-strictness)",both:"both var(--scroll-snap-strictness)"}},scrollSnapStrictness:{values:["mandatory","proximity"],transform:e=>({"--scroll-snap-strictness":e})},scrollSnapMargin:{values:"spacing"},scrollSnapMarginTop:{values:"spacing"},scrollSnapMarginBottom:{values:"spacing"},scrollSnapMarginLeft:{values:"spacing"},scrollSnapMarginRight:{values:"spacing"},listStylePosition:{shorthand:["listStylePos"]},listStyleImage:{values:"assets",shorthand:["listStyleImg"]},position:{shorthand:["pos"]},zIndex:{values:"zIndex"},inset:{values:"spacing"},insetInline:{values:"spacing",shorthand:["insetX"]},insetBlock:{values:"spacing",shorthand:["insetY"]},top:{values:"spacing"},insetBlockStart:{values:"spacing"},bottom:{values:"spacing"},insetBlockEnd:{values:"spacing"},left:{values:"spacing"},right:{values:"spacing"},insetInlineStart:{values:"spacing",shorthand:["insetStart"]},insetInlineEnd:{values:"spacing",shorthand:["insetEnd"]},ring:{transform:e=>({"--ring-offset-shadow":"var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color)","--ring-shadow":"var(--ring-inset) 0 0 0 calc(var(--ring-width) + var(--ring-offset-width)) var(--ring-color)","--ring-width":e,boxShadow:"var(--ring-offset-shadow), var(--ring-shadow), var(--shadow, 0 0 #0000)"})},ringColor:{values:e3,transform:eI("--ring-color")},ringOffset:{transform:e=>({"--ring-offset-width":e})},ringOffsetColor:{values:e3,transform:eI("--ring-offset-color")},ringInset:{transform:e=>({"--ring-inset":e})},margin:{values:"spacing",shorthand:["m"]},marginTop:{values:"spacing",shorthand:["mt"]},marginBlockStart:{values:"spacing"},marginRight:{values:"spacing",shorthand:["mr"]},marginBottom:{values:"spacing",shorthand:["mb"]},marginBlockEnd:{values:"spacing"},marginLeft:{values:"spacing",shorthand:["ml"]},marginInlineStart:{values:"spacing",shorthand:["ms","marginStart"]},marginInlineEnd:{values:"spacing",shorthand:["me","marginEnd"]},marginInline:{values:"spacing",shorthand:["mx","marginX"]},marginBlock:{values:"spacing",shorthand:["my","marginY"]},padding:{values:"spacing",shorthand:["p"]},paddingTop:{values:"spacing",shorthand:["pt"]},paddingRight:{values:"spacing",shorthand:["pr"]},paddingBottom:{values:"spacing",shorthand:["pb"]},paddingBlockStart:{values:"spacing"},paddingBlockEnd:{values:"spacing"},paddingLeft:{values:"spacing",shorthand:["pl"]},paddingInlineStart:{values:"spacing",shorthand:["ps","paddingStart"]},paddingInlineEnd:{values:"spacing",shorthand:["pe","paddingEnd"]},paddingInline:{values:"spacing",shorthand:["px","paddingX"]},paddingBlock:{values:"spacing",shorthand:["py","paddingY"]},textDecoration:{shorthand:["textDecor"]},textDecorationColor:{values:e3,transform:eI("textDecorationColor")},textShadow:{values:"shadows"},transform:{transform:e=>{let t=e;return"auto"===e&&(t="translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) rotate(var(--rotate, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0))"),"auto-gpu"===e&&(t="translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) rotate(var(--rotate, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0))"),{transform:t}}},skewX:{transform:e=>({"--skew-x":eQ(e)})},skewY:{transform:e=>({"--skew-y":eQ(e)})},scaleX:{transform:e=>({"--scale-x":e})},scaleY:{transform:e=>({"--scale-y":e})},scale:{transform:e=>"auto"!==e?{scale:e}:{scale:"var(--scale-x, 1) var(--scale-y, 1)"}},spaceXReverse:{values:{type:"boolean"},transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-x-reverse":e?"1":void 0}})},spaceX:{property:"marginInlineStart",values:"spacing",transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-x-reverse":"0",marginInlineStart:`calc(${e} * calc(1 - var(--space-x-reverse)))`,marginInlineEnd:`calc(${e} * var(--space-x-reverse))`}})},spaceYReverse:{values:{type:"boolean"},transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-y-reverse":e?"1":void 0}})},spaceY:{property:"marginTop",values:"spacing",transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-y-reverse":"0",marginTop:`calc(${e} * calc(1 - var(--space-y-reverse)))`,marginBottom:`calc(${e} * var(--space-y-reverse))`}})},rotate:{transform:e=>"auto"!==e?{rotate:eQ(e)}:{rotate:"var(--rotate-x, 0) var(--rotate-y, 0) var(--rotate-z, 0)"}},rotateX:{transform:e=>({"--rotate-x":eQ(e)})},rotateY:{transform:e=>({"--rotate-y":eQ(e)})},translate:{transform:e=>"auto"!==e?{translate:e}:{translate:"var(--translate-x) var(--translate-y)"}},translateX:{values:"spacing",transform:e=>({"--translate-x":e})},translateY:{values:"spacing",transform:e=>({"--translate-y":e})},transition:{values:["all","common","colors","opacity","position","backgrounds","size","shadow","transform"],transform(e){switch(e){case"all":return e0("all");case"position":return e0("left, right, top, bottom, inset-inline, inset-block");case"colors":return e0("color, background-color, border-color, text-decoration-color, fill, stroke");case"opacity":return e0("opacity");case"shadow":return e0("box-shadow");case"transform":return e0("transform");case"size":return e0("width, height");case"backgrounds":return e0("background, background-color, background-image, background-position");case"common":return e0("color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter");default:return{transition:e}}}},transitionDuration:{values:"durations"},transitionProperty:{values:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, translate, transform",colors:"background-color, border-color, color, fill, stroke",size:"width, height",position:"left, right, top, bottom, inset-inline, inset-block",background:"background, background-color, background-image, background-position"}},transitionTimingFunction:{values:"easings"},animation:{values:"animations"},animationDuration:{values:"durations"},animationDelay:{values:"durations"},animationTimingFunction:{values:"easings"},fontFamily:{values:"fonts"},fontSize:{values:"fontSizes"},fontWeight:{values:"fontWeights"},lineHeight:{values:"lineHeights"},letterSpacing:{values:"letterSpacings"},textIndent:{values:"spacing"},truncate:{values:{type:"boolean"},transform:e=>!0===e?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{}},lineClamp:{transform:e=>"none"===e?{WebkitLineClamp:"unset"}:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",textWrap:"wrap"}},borderSpacing:{values:e=>({...e("spacing"),auto:"var(--border-spacing-x, 0) var(--border-spacing-y, 0)"})},borderSpacingX:{values:"spacing",transform:e=>({"--border-spacing-x":e})},borderSpacingY:{values:"spacing",transform:e=>({"--border-spacing-y":e})},srOnly:{values:{type:"boolean"},transform:e=>e6[e]||{}},debug:{values:{type:"boolean"},transform:e=>e?{outline:"1px solid blue !important","& > *":{outline:"1px solid red !important"}}:{}},caretColor:{values:e3,transform:eI("caretColor")},cursor:{values:"cursor"}}}),e6={true:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},false:{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",clip:"auto",whiteSpace:"normal"}};e.s(["defaultBaseConfig",()=>e4],26163);let e8={sm:"480px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};e.s(["breakpoints",()=>e8],60945);let e7="var(--chakra-empty,/*!*/ /*!*/)",e9=eB({"*":{fontFeatureSettings:'"cv11"',"--ring-inset":e7,"--ring-offset-width":"0px","--ring-offset-color":"#fff","--ring-color":"rgba(66, 153, 225, 0.6)","--ring-offset-shadow":"0 0 #0000","--ring-shadow":"0 0 #0000",...Object.fromEntries(["brightness","contrast","grayscale","hue-rotate","invert","saturate","sepia","drop-shadow"].map(e=>[`--${e}`,e7])),...Object.fromEntries(["blur","brightness","contrast","grayscale","hue-rotate","invert","opacity","saturate","sepia"].map(e=>[`--backdrop-${e}`,e7])),"--global-font-mono":"fonts.mono","--global-font-body":"fonts.body","--global-color-border":"colors.border"},html:{color:"fg",bg:"bg",lineHeight:"1.5",colorPalette:"gray"},"*::placeholder, *[data-placeholder]":{color:"fg.muted/80"},"*::selection":{bg:"colorPalette.emphasized/80"}});e.s(["globalCss",()=>e9],32525);let te=e$({"fill.muted":{value:{background:"colorPalette.muted",color:"colorPalette.fg"}},"fill.subtle":{value:{background:"colorPalette.subtle",color:"colorPalette.fg"}},"fill.surface":{value:{background:"colorPalette.subtle",color:"colorPalette.fg",boxShadow:"0 0 0px 1px var(--shadow-color)",boxShadowColor:"colorPalette.muted"}},"fill.solid":{value:{background:"colorPalette.solid",color:"colorPalette.contrast"}},"outline.subtle":{value:{color:"colorPalette.fg",boxShadow:"inset 0 0 0px 1px var(--shadow-color)",boxShadowColor:"colorPalette.subtle"}},"outline.solid":{value:{borderWidth:"1px",borderColor:"colorPalette.solid",color:"colorPalette.fg"}},"indicator.bottom":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",bottom:"var(--indicator-offset-y, 0)",insetInline:"var(--indicator-offset-x, 0)",height:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},"indicator.top":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",top:"var(--indicator-offset-y, 0)",insetInline:"var(--indicator-offset-x, 0)",height:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},"indicator.start":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",insetInlineStart:"var(--indicator-offset-x, 0)",insetBlock:"var(--indicator-offset-y, 0)",width:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},"indicator.end":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",insetInlineEnd:"var(--indicator-offset-x, 0)",insetBlock:"var(--indicator-offset-y, 0)",width:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},disabled:{value:{opacity:"0.5",cursor:"not-allowed"}},none:{value:{}}});e.s(["layerStyles",()=>te],79313);let tt=eU({"slide-fade-in":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-from-bottom, fade-in"},"&[data-placement^=bottom]":{animationName:"slide-from-top, fade-in"},"&[data-placement^=left]":{animationName:"slide-from-right, fade-in"},"&[data-placement^=right]":{animationName:"slide-from-left, fade-in"}}},"slide-fade-out":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-to-bottom, fade-out"},"&[data-placement^=bottom]":{animationName:"slide-to-top, fade-out"},"&[data-placement^=left]":{animationName:"slide-to-right, fade-out"},"&[data-placement^=right]":{animationName:"slide-to-left, fade-out"}}},"scale-fade-in":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-in, fade-in"}},"scale-fade-out":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-out, fade-out"}}});e.s(["animationStyles",()=>tt],76858);let tr=eF({className:"chakra-badge",base:{display:"inline-flex",alignItems:"center",borderRadius:"l2",gap:"1",fontWeight:"medium",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",userSelect:"none"},variants:{variant:{solid:{bg:"colorPalette.solid",color:"colorPalette.contrast"},subtle:{bg:"colorPalette.subtle",color:"colorPalette.fg"},outline:{color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},surface:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},plain:{color:"colorPalette.fg"}},size:{xs:{textStyle:"2xs",px:"1",minH:"4"},sm:{textStyle:"xs",px:"1.5",minH:"5"},md:{textStyle:"sm",px:"2",minH:"6"},lg:{textStyle:"sm",px:"2.5",minH:"7"}}},defaultVariants:{variant:"subtle",size:"sm"}});e.s(["badgeRecipe",()=>tr],95368);let tn=eF({className:"chakra-button",base:{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",borderRadius:"l2",whiteSpace:"nowrap",verticalAlign:"middle",borderWidth:"1px",borderColor:"transparent",cursor:"button",flexShrink:"0",outline:"0",lineHeight:"1.2",isolation:"isolate",fontWeight:"medium",transitionProperty:"common",transitionDuration:"moderate",focusVisibleRing:"outside",_disabled:{layerStyle:"disabled"},_icon:{flexShrink:"0"}},variants:{size:{"2xs":{h:"6",minW:"6",textStyle:"xs",px:"2",gap:"1",_icon:{width:"3.5",height:"3.5"}},xs:{h:"8",minW:"8",textStyle:"xs",px:"2.5",gap:"1",_icon:{width:"4",height:"4"}},sm:{h:"9",minW:"9",px:"3.5",textStyle:"sm",gap:"2",_icon:{width:"4",height:"4"}},md:{h:"10",minW:"10",textStyle:"sm",px:"4",gap:"2",_icon:{width:"5",height:"5"}},lg:{h:"11",minW:"11",textStyle:"md",px:"5",gap:"3",_icon:{width:"5",height:"5"}},xl:{h:"12",minW:"12",textStyle:"md",px:"5",gap:"2.5",_icon:{width:"5",height:"5"}},"2xl":{h:"16",minW:"16",textStyle:"lg",px:"7",gap:"3",_icon:{width:"6",height:"6"}}},variant:{solid:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"transparent",_hover:{bg:"colorPalette.solid/90"},_expanded:{bg:"colorPalette.solid/90"}},subtle:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderColor:"transparent",_hover:{bg:"colorPalette.muted"},_expanded:{bg:"colorPalette.muted"}},surface:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted",_hover:{bg:"colorPalette.muted"},_expanded:{bg:"colorPalette.muted"}},outline:{borderWidth:"1px",borderColor:"colorPalette.muted",color:"colorPalette.fg",_hover:{bg:"colorPalette.subtle"},_expanded:{bg:"colorPalette.subtle"}},ghost:{bg:"transparent",color:"colorPalette.fg",_hover:{bg:"colorPalette.subtle"},_expanded:{bg:"colorPalette.subtle"}},plain:{color:"colorPalette.fg"}}},defaultVariants:{size:"md",variant:"solid"}}),ti=eF({className:"chakra-checkmark",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0",color:"white",borderWidth:"1px",borderColor:"transparent",borderRadius:"l1",cursor:"checkbox",focusVisibleRing:"outside",_icon:{boxSize:"full"},_invalid:{colorPalette:"red",borderColor:"border.error"},_disabled:{opacity:"0.5",cursor:"disabled"}},variants:{size:{xs:{boxSize:"3"},sm:{boxSize:"4"},md:{boxSize:"5",p:"0.5"},lg:{boxSize:"6",p:"0.5"}},variant:{solid:{borderColor:"border.emphasized","&:is([data-state=checked], [data-state=indeterminate])":{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},outline:{borderColor:"border","&:is([data-state=checked], [data-state=indeterminate])":{color:"colorPalette.fg",borderColor:"colorPalette.solid"}},subtle:{bg:"colorPalette.muted",borderColor:"colorPalette.muted","&:is([data-state=checked], [data-state=indeterminate])":{color:"colorPalette.fg"}},plain:{"&:is([data-state=checked], [data-state=indeterminate])":{color:"colorPalette.fg"}},inverted:{borderColor:"border",color:"colorPalette.fg","&:is([data-state=checked], [data-state=indeterminate])":{borderColor:"colorPalette.solid"}}},filled:{true:{bg:"bg"}}},defaultVariants:{variant:"solid",size:"md"}}),{variants:to,defaultVariants:ta}=tr,ts=eF({className:"chakra-code",base:{fontFamily:"mono",alignItems:"center",display:"inline-flex",borderRadius:"l2"},variants:to,defaultVariants:ta}),tl=eF({className:"color-swatch",base:{boxSize:"var(--swatch-size)",shadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.1)","--checker-size":"8px","--checker-bg":"colors.bg","--checker-fg":"colors.bg.emphasized",background:"linear-gradient(var(--color), var(--color)), repeating-conic-gradient(var(--checker-fg) 0%, var(--checker-fg) 25%, var(--checker-bg) 0%, var(--checker-bg) 50%) 0% 50% / var(--checker-size) var(--checker-size) !important",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0"},variants:{size:{"2xs":{"--swatch-size":"sizes.3.5"},xs:{"--swatch-size":"sizes.4"},sm:{"--swatch-size":"sizes.4.5"},md:{"--swatch-size":"sizes.5"},lg:{"--swatch-size":"sizes.6"},xl:{"--swatch-size":"sizes.7"},"2xl":{"--swatch-size":"sizes.8"},inherit:{"--swatch-size":"inherit"},full:{"--swatch-size":"100%"}},shape:{square:{borderRadius:"none"},circle:{borderRadius:"full"},rounded:{borderRadius:"l1"}}},defaultVariants:{size:"md",shape:"rounded"}}),tu=eF({className:"chakra-container",base:{position:"relative",maxWidth:"8xl",w:"100%",mx:"auto",px:{base:"4",md:"6",lg:"8"}},variants:{centerContent:{true:{display:"flex",flexDirection:"column",alignItems:"center"}},fluid:{true:{maxWidth:"full"}}}}),tc=eF({className:"chakra-heading",base:{fontFamily:"heading",fontWeight:"semibold"},variants:{size:{xs:{textStyle:"xs"},sm:{textStyle:"sm"},md:{textStyle:"md"},lg:{textStyle:"lg"},xl:{textStyle:"xl"},"2xl":{textStyle:"2xl"},"3xl":{textStyle:"3xl"},"4xl":{textStyle:"4xl"},"5xl":{textStyle:"5xl"},"6xl":{textStyle:"6xl"},"7xl":{textStyle:"7xl"}}},defaultVariants:{size:"xl"}}),td=eF({className:"chakra-icon",base:{display:"inline-block",lineHeight:"1em",flexShrink:"0",color:"currentcolor",verticalAlign:"middle"},variants:{size:{inherit:{},xs:{boxSize:"3"},sm:{boxSize:"4"},md:{boxSize:"5"},lg:{boxSize:"6"},xl:{boxSize:"7"},"2xl":{boxSize:"8"}}},defaultVariants:{size:"inherit"}}),th=eF({className:"chakra-input",base:{width:"100%",minWidth:"0",outline:"0",position:"relative",appearance:"none",textAlign:"start",borderRadius:"l2",_disabled:{layerStyle:"disabled"},height:"var(--input-height)",minW:"var(--input-height)","--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"}},variants:{size:{"2xs":{textStyle:"xs",px:"2","--input-height":"sizes.7"},xs:{textStyle:"xs",px:"2","--input-height":"sizes.8"},sm:{textStyle:"sm",px:"2.5","--input-height":"sizes.9"},md:{textStyle:"sm",px:"3","--input-height":"sizes.10"},lg:{textStyle:"md",px:"4","--input-height":"sizes.11"},xl:{textStyle:"md",px:"4.5","--input-height":"sizes.12"},"2xl":{textStyle:"lg",px:"5","--input-height":"sizes.16"}},variant:{outline:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusVisibleRing:"inside",focusRingColor:"var(--focus-color)"},subtle:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusVisibleRing:"inside",focusRingColor:"var(--focus-color)"},flushed:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focusVisible:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)",_invalid:{borderColor:"var(--error-color)",boxShadow:"0px 1px 0px 0px var(--error-color)"}}}}},defaultVariants:{size:"md",variant:"outline"}}),tf=eF({className:"chakra-input-addon",base:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap",alignSelf:"stretch",borderRadius:"l2"},variants:{size:th.variants.size,variant:{outline:{borderWidth:"1px",borderColor:"border",bg:"bg.muted"},subtle:{borderWidth:"1px",borderColor:"transparent",bg:"bg.emphasized"},flushed:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}},defaultVariants:{size:"md",variant:"outline"}}),tp=eF({className:"chakra-kbd",base:{display:"inline-flex",alignItems:"center",fontWeight:"medium",fontFamily:"mono",flexShrink:"0",whiteSpace:"nowrap",wordSpacing:"-0.5em",userSelect:"none",px:"1",borderRadius:"l2"},variants:{variant:{raised:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderWidth:"1px",borderBottomWidth:"2px",borderColor:"colorPalette.muted"},outline:{borderWidth:"1px",color:"colorPalette.fg"},subtle:{bg:"colorPalette.muted",color:"colorPalette.fg"},plain:{color:"colorPalette.fg"}},size:{sm:{textStyle:"xs",height:"4.5"},md:{textStyle:"sm",height:"5"},lg:{textStyle:"md",height:"6"}}},defaultVariants:{size:"md",variant:"raised"}}),tg=eF({className:"chakra-link",base:{display:"inline-flex",alignItems:"center",outline:"none",gap:"1.5",cursor:"pointer",borderRadius:"l1",focusRing:"outside"},variants:{variant:{underline:{color:"colorPalette.fg",textDecoration:"underline",textUnderlineOffset:"3px",textDecorationColor:"currentColor/20"},plain:{color:"colorPalette.fg",_hover:{textDecoration:"underline",textUnderlineOffset:"3px",textDecorationColor:"currentColor/20"}}}},defaultVariants:{variant:"plain"}}),tm=eF({className:"chakra-mark",base:{bg:"transparent",color:"inherit",whiteSpace:"nowrap"},variants:{variant:{subtle:{bg:"colorPalette.subtle",color:"inherit"},solid:{bg:"colorPalette.solid",color:"colorPalette.contrast"},text:{fontWeight:"medium"},plain:{}}}}),tv=eF({className:"chakra-radiomark",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,verticalAlign:"top",color:"white",borderWidth:"1px",borderColor:"transparent",borderRadius:"full",cursor:"radio",_focusVisible:{outline:"2px solid",outlineColor:"colorPalette.focusRing",outlineOffset:"2px"},_invalid:{colorPalette:"red",borderColor:"red.500"},_disabled:{opacity:"0.5",cursor:"disabled"},"& .dot":{height:"100%",width:"100%",borderRadius:"full",bg:"currentColor",scale:"0.4"}},variants:{variant:{solid:{borderWidth:"1px",borderColor:"border.emphasized",_checked:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},subtle:{borderWidth:"1px",bg:"colorPalette.muted",borderColor:"colorPalette.muted",color:"transparent",_checked:{color:"colorPalette.fg"}},outline:{borderWidth:"1px",borderColor:"inherit",_checked:{color:"colorPalette.fg",borderColor:"colorPalette.solid"},"& .dot":{scale:"0.6"}},inverted:{bg:"bg",borderWidth:"1px",borderColor:"inherit",_checked:{color:"colorPalette.solid",borderColor:"currentcolor"}}},size:{xs:{boxSize:"3"},sm:{boxSize:"4"},md:{boxSize:"5"},lg:{boxSize:"6"}},filled:{true:{bg:"bg"}}},defaultVariants:{variant:"solid",size:"md"}});e.s(["radiomarkRecipe",()=>tv],73945);let tb={badge:tr,button:tn,code:ts,container:tu,heading:tc,input:th,inputAddon:tf,kbd:tp,link:tg,mark:tm,separator:eF({className:"chakra-separator",base:{display:"block",borderColor:"border"},variants:{variant:{solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"},dotted:{borderStyle:"dotted"}},orientation:{vertical:{borderInlineStartWidth:"var(--separator-thickness)"},horizontal:{borderTopWidth:"var(--separator-thickness)"}},size:{xs:{"--separator-thickness":"0.5px"},sm:{"--separator-thickness":"1px"},md:{"--separator-thickness":"2px"},lg:{"--separator-thickness":"3px"}}},defaultVariants:{size:"sm",variant:"solid",orientation:"horizontal"}}),skeleton:eF({className:"chakra-skeleton",base:{},variants:{loading:{true:{borderRadius:"l2",boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none",flexShrink:"0","&::before, &::after, *":{visibility:"hidden"}},false:{background:"unset",animation:"fade-in var(--fade-duration, 0.1s) ease-out !important"}},variant:{pulse:{background:"bg.emphasized",animation:"pulse",animationDuration:"var(--duration, 1.2s)"},shine:{"--animate-from":"200%","--animate-to":"-200%","--start-color":"colors.bg.muted","--end-color":"colors.bg.emphasized",backgroundImage:"linear-gradient(270deg,var(--start-color),var(--end-color),var(--end-color),var(--start-color))",backgroundSize:"400% 100%",animation:"bg-position var(--duration, 5s) ease-in-out infinite"},none:{animation:"none"}}},defaultVariants:{variant:"pulse",loading:!0}}),skipNavLink:eF({className:"chakra-skip-nav",base:{display:"inline-flex",bg:"bg.panel",padding:"2.5",borderRadius:"l2",fontWeight:"semibold",focusVisibleRing:"outside",textStyle:"sm",userSelect:"none",border:"0",height:"1px",width:"1px",margin:"-1px",outline:"0",overflow:"hidden",position:"absolute",clip:"rect(0 0 0 0)",_focusVisible:{clip:"auto",width:"auto",height:"auto",position:"fixed",top:"6",insetStart:"6"}}}),spinner:eF({className:"chakra-spinner",base:{display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderWidth:"2px",borderRadius:"full",width:"var(--spinner-size)",height:"var(--spinner-size)",animation:"spin",animationDuration:"slowest","--spinner-track-color":"transparent",borderBottomColor:"var(--spinner-track-color)",borderInlineStartColor:"var(--spinner-track-color)"},variants:{size:{inherit:{"--spinner-size":"1em"},xs:{"--spinner-size":"sizes.3"},sm:{"--spinner-size":"sizes.4"},md:{"--spinner-size":"sizes.5"},lg:{"--spinner-size":"sizes.8"},xl:{"--spinner-size":"sizes.10"}}},defaultVariants:{size:"md"}}),textarea:eF({className:"chakra-textarea",base:{width:"100%",minWidth:"0",outline:"0",position:"relative",appearance:"none",textAlign:"start",borderRadius:"l2",_disabled:{layerStyle:"disabled"},"--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"}},variants:{size:{xs:{textStyle:"xs",px:"2",py:"1.5",scrollPaddingBottom:"1.5"},sm:{textStyle:"sm",px:"2.5",py:"2",scrollPaddingBottom:"2"},md:{textStyle:"sm",px:"3",py:"2",scrollPaddingBottom:"2"},lg:{textStyle:"md",px:"4",py:"3",scrollPaddingBottom:"3"},xl:{textStyle:"md",px:"4.5",py:"3.5",scrollPaddingBottom:"3.5"}},variant:{outline:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusVisibleRing:"inside"},subtle:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusVisibleRing:"inside"},flushed:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focusVisible:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)"}}}},defaultVariants:{size:"md",variant:"outline"}}),icon:td,checkmark:ti,radiomark:tv,colorSwatch:tl};e.s(["recipes",()=>tb],58360);let ty=eK.colors({bg:{DEFAULT:{value:{_light:"{colors.white}",_dark:"{colors.black}"}},subtle:{value:{_light:"{colors.gray.50}",_dark:"{colors.gray.950}"}},muted:{value:{_light:"{colors.gray.100}",_dark:"{colors.gray.900}"}},emphasized:{value:{_light:"{colors.gray.200}",_dark:"{colors.gray.800}"}},inverted:{value:{_light:"{colors.black}",_dark:"{colors.white}"}},panel:{value:{_light:"{colors.white}",_dark:"{colors.gray.950}"}},error:{value:{_light:"{colors.red.50}",_dark:"{colors.red.950}"}},warning:{value:{_light:"{colors.orange.50}",_dark:"{colors.orange.950}"}},success:{value:{_light:"{colors.green.50}",_dark:"{colors.green.950}"}},info:{value:{_light:"{colors.blue.50}",_dark:"{colors.blue.950}"}}},fg:{DEFAULT:{value:{_light:"{colors.black}",_dark:"{colors.gray.50}"}},muted:{value:{_light:"{colors.gray.600}",_dark:"{colors.gray.400}"}},subtle:{value:{_light:"{colors.gray.400}",_dark:"{colors.gray.500}"}},inverted:{value:{_light:"{colors.gray.50}",_dark:"{colors.black}"}},error:{value:{_light:"{colors.red.500}",_dark:"{colors.red.400}"}},warning:{value:{_light:"{colors.orange.600}",_dark:"{colors.orange.300}"}},success:{value:{_light:"{colors.green.600}",_dark:"{colors.green.300}"}},info:{value:{_light:"{colors.blue.600}",_dark:"{colors.blue.300}"}}},border:{DEFAULT:{value:{_light:"{colors.gray.200}",_dark:"{colors.gray.800}"}},muted:{value:{_light:"{colors.gray.100}",_dark:"{colors.gray.900}"}},subtle:{value:{_light:"{colors.gray.50}",_dark:"{colors.gray.950}"}},emphasized:{value:{_light:"{colors.gray.300}",_dark:"{colors.gray.700}"}},inverted:{value:{_light:"{colors.gray.800}",_dark:"{colors.gray.200}"}},error:{value:{_light:"{colors.red.500}",_dark:"{colors.red.400}"}},warning:{value:{_light:"{colors.orange.500}",_dark:"{colors.orange.400}"}},success:{value:{_light:"{colors.green.500}",_dark:"{colors.green.400}"}},info:{value:{_light:"{colors.blue.500}",_dark:"{colors.blue.400}"}}},gray:{contrast:{value:{_light:"{colors.white}",_dark:"{colors.black}"}},fg:{value:{_light:"{colors.gray.800}",_dark:"{colors.gray.200}"}},subtle:{value:{_light:"{colors.gray.100}",_dark:"{colors.gray.900}"}},muted:{value:{_light:"{colors.gray.200}",_dark:"{colors.gray.800}"}},emphasized:{value:{_light:"{colors.gray.300}",_dark:"{colors.gray.700}"}},solid:{value:{_light:"{colors.gray.900}",_dark:"{colors.white}"}},focusRing:{value:{_light:"{colors.gray.400}",_dark:"{colors.gray.400}"}}},red:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.red.700}",_dark:"{colors.red.300}"}},subtle:{value:{_light:"{colors.red.100}",_dark:"{colors.red.900}"}},muted:{value:{_light:"{colors.red.200}",_dark:"{colors.red.800}"}},emphasized:{value:{_light:"{colors.red.300}",_dark:"{colors.red.700}"}},solid:{value:{_light:"{colors.red.600}",_dark:"{colors.red.600}"}},focusRing:{value:{_light:"{colors.red.500}",_dark:"{colors.red.500}"}}},orange:{contrast:{value:{_light:"white",_dark:"black"}},fg:{value:{_light:"{colors.orange.700}",_dark:"{colors.orange.300}"}},subtle:{value:{_light:"{colors.orange.100}",_dark:"{colors.orange.900}"}},muted:{value:{_light:"{colors.orange.200}",_dark:"{colors.orange.800}"}},emphasized:{value:{_light:"{colors.orange.300}",_dark:"{colors.orange.700}"}},solid:{value:{_light:"{colors.orange.600}",_dark:"{colors.orange.500}"}},focusRing:{value:{_light:"{colors.orange.500}",_dark:"{colors.orange.500}"}}},green:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.green.700}",_dark:"{colors.green.300}"}},subtle:{value:{_light:"{colors.green.100}",_dark:"{colors.green.900}"}},muted:{value:{_light:"{colors.green.200}",_dark:"{colors.green.800}"}},emphasized:{value:{_light:"{colors.green.300}",_dark:"{colors.green.700}"}},solid:{value:{_light:"{colors.green.600}",_dark:"{colors.green.600}"}},focusRing:{value:{_light:"{colors.green.500}",_dark:"{colors.green.500}"}}},blue:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.blue.700}",_dark:"{colors.blue.300}"}},subtle:{value:{_light:"{colors.blue.100}",_dark:"{colors.blue.900}"}},muted:{value:{_light:"{colors.blue.200}",_dark:"{colors.blue.800}"}},emphasized:{value:{_light:"{colors.blue.300}",_dark:"{colors.blue.700}"}},solid:{value:{_light:"{colors.blue.600}",_dark:"{colors.blue.600}"}},focusRing:{value:{_light:"{colors.blue.500}",_dark:"{colors.blue.500}"}}},yellow:{contrast:{value:{_light:"black",_dark:"black"}},fg:{value:{_light:"{colors.yellow.800}",_dark:"{colors.yellow.300}"}},subtle:{value:{_light:"{colors.yellow.100}",_dark:"{colors.yellow.900}"}},muted:{value:{_light:"{colors.yellow.200}",_dark:"{colors.yellow.800}"}},emphasized:{value:{_light:"{colors.yellow.300}",_dark:"{colors.yellow.700}"}},solid:{value:{_light:"{colors.yellow.300}",_dark:"{colors.yellow.300}"}},focusRing:{value:{_light:"{colors.yellow.500}",_dark:"{colors.yellow.500}"}}},teal:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.teal.700}",_dark:"{colors.teal.300}"}},subtle:{value:{_light:"{colors.teal.100}",_dark:"{colors.teal.900}"}},muted:{value:{_light:"{colors.teal.200}",_dark:"{colors.teal.800}"}},emphasized:{value:{_light:"{colors.teal.300}",_dark:"{colors.teal.700}"}},solid:{value:{_light:"{colors.teal.600}",_dark:"{colors.teal.600}"}},focusRing:{value:{_light:"{colors.teal.500}",_dark:"{colors.teal.500}"}}},purple:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.purple.700}",_dark:"{colors.purple.300}"}},subtle:{value:{_light:"{colors.purple.100}",_dark:"{colors.purple.900}"}},muted:{value:{_light:"{colors.purple.200}",_dark:"{colors.purple.800}"}},emphasized:{value:{_light:"{colors.purple.300}",_dark:"{colors.purple.700}"}},solid:{value:{_light:"{colors.purple.600}",_dark:"{colors.purple.600}"}},focusRing:{value:{_light:"{colors.purple.500}",_dark:"{colors.purple.500}"}}},pink:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.pink.700}",_dark:"{colors.pink.300}"}},subtle:{value:{_light:"{colors.pink.100}",_dark:"{colors.pink.900}"}},muted:{value:{_light:"{colors.pink.200}",_dark:"{colors.pink.800}"}},emphasized:{value:{_light:"{colors.pink.300}",_dark:"{colors.pink.700}"}},solid:{value:{_light:"{colors.pink.600}",_dark:"{colors.pink.600}"}},focusRing:{value:{_light:"{colors.pink.500}",_dark:"{colors.pink.500}"}}},cyan:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.cyan.700}",_dark:"{colors.cyan.300}"}},subtle:{value:{_light:"{colors.cyan.100}",_dark:"{colors.cyan.900}"}},muted:{value:{_light:"{colors.cyan.200}",_dark:"{colors.cyan.800}"}},emphasized:{value:{_light:"{colors.cyan.300}",_dark:"{colors.cyan.700}"}},solid:{value:{_light:"{colors.cyan.600}",_dark:"{colors.cyan.600}"}},focusRing:{value:{_light:"{colors.cyan.500}",_dark:"{colors.cyan.500}"}}}});e.s(["semanticColors",()=>ty],76883);let tx=eK.radii({l1:{value:"{radii.xs}"},l2:{value:"{radii.sm}"},l3:{value:"{radii.md}"}});e.s(["semanticRadii",()=>tx],84163);let tw=eK.shadows({xs:{value:{_light:"0px 1px 2px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/20}",_dark:"0px 1px 1px {black/64}, 0px 0px 1px inset {colors.gray.300/20}"}},sm:{value:{_light:"0px 2px 4px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 2px 4px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},md:{value:{_light:"0px 4px 8px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 4px 8px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},lg:{value:{_light:"0px 8px 16px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 8px 16px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},xl:{value:{_light:"0px 16px 24px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 16px 24px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},"2xl":{value:{_light:"0px 24px 40px {colors.gray.900/16}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 24px 40px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},inner:{value:{_light:"inset 0 2px 4px 0 {black/5}",_dark:"inset 0 2px 4px 0 black"}},inset:{value:{_light:"inset 0 0 0 1px {black/5}",_dark:"inset 0 0 0 1px {colors.gray.300/5}"}}});e.s(["semanticShadows",()=>tw],36292);var t_=e.i(94548),tC=e.i(58287),tk=Object.defineProperty,tS=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?tk(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},tE={itemToValue:e=>"string"==typeof e?e:(0,tC.isObject)(e)&&(0,tC.hasProp)(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:(0,tC.isObject)(e)&&(0,tC.hasProp)(e,"label")?e.label:tE.itemToValue(e),isItemDisabled:e=>!!((0,tC.isObject)(e)&&(0,tC.hasProp)(e,"disabled"))&&!!e.disabled},tO=class e{constructor(t){this.options=t,tS(this,"items"),tS(this,"indexMap",null),tS(this,"copy",t=>new e({...this.options,items:t??[...this.items]})),tS(this,"isEqual",e=>(0,tC.isEqual)(this.items,e.items)),tS(this,"setItems",e=>this.copy(e)),tS(this,"getValues",(e=this.items)=>{let t=[];for(let r of e){let e=this.getItemValue(r);null!=e&&t.push(e)}return t}),tS(this,"find",e=>{if(null==e)return null;let t=this.indexOf(e);return -1!==t?this.at(t):null}),tS(this,"findMany",e=>{let t=[];for(let r of e){let e=this.find(r);null!=e&&t.push(e)}return t}),tS(this,"at",e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;for(let[,r]of this.group())for(let n of r){if(t===e)return n;t++}return null}),tS(this,"sortFn",(e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0)),tS(this,"sort",e=>[...e].sort(this.sortFn.bind(this))),tS(this,"getItemValue",e=>null==e?null:this.options.itemToValue?.(e)??tE.itemToValue(e)),tS(this,"getItemDisabled",e=>null!=e&&(this.options.isItemDisabled?.(e)??tE.isItemDisabled(e))),tS(this,"stringifyItem",e=>null==e?null:this.options.itemToString?.(e)??tE.itemToString(e)),tS(this,"stringify",e=>null==e?null:this.stringifyItem(this.find(e))),tS(this,"stringifyItems",(e,t=", ")=>{let r=[];for(let t of e){let e=this.stringifyItem(t);null!=e&&r.push(e)}return r.join(t)}),tS(this,"stringifyMany",(e,t)=>this.stringifyItems(this.findMany(e),t)),tS(this,"has",e=>-1!==this.indexOf(e)),tS(this,"hasItem",e=>null!=e&&this.has(this.getItemValue(e))),tS(this,"group",()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];let r=new Map;this.items.forEach((t,n)=>{let i=e(t,n);r.has(i)||r.set(i,[]),r.get(i).push(t)});let n=Array.from(r.entries());return t&&n.sort(([e],[r])=>{if("function"==typeof t)return t(e,r);if(Array.isArray(t)){let n=t.indexOf(e),i=t.indexOf(r);return -1===n?1:-1===i?-1:n-i}return"asc"===t?e.localeCompare(r):"desc"===t?r.localeCompare(e):0}),n}),tS(this,"getNextValue",(e,t=1,r=!1)=>{let n=this.indexOf(e);if(-1===n)return null;for(n=r?Math.min(n+t,this.size-1):n+t;n<=this.size&&this.getItemDisabled(this.at(n));)n++;return this.getItemValue(this.at(n))}),tS(this,"getPreviousValue",(e,t=1,r=!1)=>{let n=this.indexOf(e);if(-1===n)return null;for(n=r?Math.max(n-t,0):n-t;n>=0&&this.getItemDisabled(this.at(n));)n--;return this.getItemValue(this.at(n))}),tS(this,"indexOf",e=>{if(null==e)return -1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0;for(let[,t]of this.group())for(let r of t){let t=this.getItemValue(r);null!=t&&this.indexMap.set(t,e),e++}}return this.indexMap.get(e)??-1}),tS(this,"getByText",(e,t)=>{let r=null!=t?this.indexOf(t):-1,n=1===e.length;for(let i=0;i<this.items.length;i++){let o=this.items[(r+i+1)%this.items.length];if((!n||this.getItemValue(o)!==t)&&!this.getItemDisabled(o)&&tI(this.stringifyItem(o),e))return o}}),tS(this,"search",(e,t)=>{let{state:r,currentValue:n,timeout:i=350}=t,o=r.keysSoFar+e,a=o.length>1&&Array.from(o).every(e=>e===o[0])?o[0]:o,s=this.getByText(a,n),l=this.getItemValue(s);function u(){clearTimeout(r.timer),r.timer=-1}return!function e(t){r.keysSoFar=t,u(),""!==t&&(r.timer=+setTimeout(()=>{e(""),u()},i))}(o),l}),tS(this,"update",(e,t)=>{let r=this.indexOf(e);return -1===r?this:this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),tS(this,"upsert",(e,t,r="append")=>{let n=this.indexOf(e);return -1===n?("append"===r?this.append:this.prepend)(t):this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),tS(this,"insert",(e,...t)=>this.copy(tP(this.items,e,...t))),tS(this,"insertBefore",(e,...t)=>{let r=this.indexOf(e);if(-1===r)if(0!==this.items.length)return this;else r=0;return this.copy(tP(this.items,r,...t))}),tS(this,"insertAfter",(e,...t)=>{let r=this.indexOf(e);if(-1===r)if(0!==this.items.length)return this;else r=0;return this.copy(tP(this.items,r+1,...t))}),tS(this,"prepend",(...e)=>this.copy(tP(this.items,0,...e))),tS(this,"append",(...e)=>this.copy(tP(this.items,this.items.length,...e))),tS(this,"filter",e=>{let t=this.items.filter((t,r)=>e(this.stringifyItem(t),r,t));return this.copy(t)}),tS(this,"remove",(...e)=>{let t=e.map(e=>"string"==typeof e?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let r=this.getItemValue(e);return null!=r&&!t.includes(r)}))}),tS(this,"move",(e,t)=>{let r=this.indexOf(e);return -1===r?this:this.copy(tT(this.items,[r],t))}),tS(this,"moveBefore",(e,...t)=>{let r=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===r)return this;let n=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(tT(this.items,n,r))}),tS(this,"moveAfter",(e,...t)=>{let r=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===r)return this;let n=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(tT(this.items,n,r+1))}),tS(this,"reorder",(e,t)=>this.copy(tT(this.items,[e],t))),tS(this,"compareValue",(e,t)=>{let r=this.indexOf(e),n=this.indexOf(t);return r<n?-1:+(r>n)}),tS(this,"range",(e,t)=>{let r=[],n=e;for(;null!=n;){if(this.find(n)&&r.push(n),n===t)return r;n=this.getNextValue(n)}return[]}),tS(this,"getValueRange",(e,t)=>e&&t?0>=this.compareValue(e,t)?this.range(e,t):this.range(t,e):[]),tS(this,"toString",()=>{let e="";for(let t of this.items)e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+",";return e}),tS(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},tI=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function tP(e,t,...r){return[...e.slice(0,t),...r,...e.slice(t)]}function tT(e,t,r){let n=(t=[...t].sort((e,t)=>e-t)).map(t=>e[t]);for(let r=t.length-1;r>=0;r--)e=[...e.slice(0,t[r]),...e.slice(t[r]+1)];return r=Math.max(0,r-t.filter(e=>e<r).length),[...e.slice(0,r),...n,...e.slice(r)]}var tR=class extends tO{constructor(e){const{columnCount:t}=e;super(e),tS(this,"columnCount"),tS(this,"rows",null),tS(this,"getRows",()=>(this.rows||(this.rows=(0,tC.chunk)([...this.items],this.columnCount)),this.rows)),tS(this,"getRowCount",()=>Math.ceil(this.items.length/this.columnCount)),tS(this,"getCellIndex",(e,t)=>e*this.columnCount+t),tS(this,"getCell",(e,t)=>this.at(this.getCellIndex(e,t))),tS(this,"getValueCell",e=>{let t=this.indexOf(e);return -1===t?null:{row:Math.floor(t/this.columnCount),column:t%this.columnCount}}),tS(this,"getLastEnabledColumnIndex",e=>{for(let t=this.columnCount-1;t>=0;t--){let r=this.getCell(e,t);if(r&&!this.getItemDisabled(r))return t}return null}),tS(this,"getFirstEnabledColumnIndex",e=>{for(let t=0;t<this.columnCount;t++){let r=this.getCell(e,t);if(r&&!this.getItemDisabled(r))return t}return null}),tS(this,"getPreviousRowValue",(e,t=!1)=>{let r=this.getValueCell(e);if(null===r)return null;let n=this.getRows(),i=n.length,o=r.row,a=r.column;for(let e=1;e<=i;e++){o=(0,tC.prevIndex)(n,o,{loop:t});let e=n[o];if(!e)continue;if(!e[a]){let e=this.getLastEnabledColumnIndex(o);null!=e&&(a=e)}let r=this.getCell(o,a);if(!this.getItemDisabled(r))return this.getItemValue(r)}return this.firstValue}),tS(this,"getNextRowValue",(e,t=!1)=>{let r=this.getValueCell(e);if(null===r)return null;let n=this.getRows(),i=n.length,o=r.row,a=r.column;for(let e=1;e<=i;e++){o=(0,tC.nextIndex)(n,o,{loop:t});let e=n[o];if(!e)continue;if(!e[a]){let e=this.getLastEnabledColumnIndex(o);null!=e&&(a=e)}let r=this.getCell(o,a);if(!this.getItemDisabled(r))return this.getItemValue(r)}return this.lastValue}),this.columnCount=t}};function tA(e){return(0,tC.hasProp)(e,"columnCount")&&(0,tC.hasProp)(e,"getRows")}var tM=class e extends Set{constructor(t=[]){super(t),tS(this,"selectionMode","single"),tS(this,"deselectable",!0),tS(this,"copy",()=>{let t=new e([...this]);return this.sync(t)}),tS(this,"sync",e=>(e.selectionMode=this.selectionMode,e.deselectable=this.deselectable,e)),tS(this,"isEmpty",()=>0===this.size),tS(this,"isSelected",e=>"none"!==this.selectionMode&&null!=e&&this.has(e)),tS(this,"canSelect",(e,t)=>"none"!==this.selectionMode||!e.getItemDisabled(e.find(t))),tS(this,"firstSelectedValue",e=>{let t=null;for(let r of this)(!t||0>e.compareValue(r,t))&&(t=r);return t}),tS(this,"lastSelectedValue",e=>{let t=null;for(let r of this)(!t||e.compareValue(r,t)>0)&&(t=r);return t}),tS(this,"extendSelection",(e,t,r)=>{if("none"===this.selectionMode)return this;if("single"===this.selectionMode)return this.replaceSelection(e,r);let n=this.copy(),i=Array.from(this).pop();for(let o of e.getValueRange(t,i??r))n.delete(o);for(let i of e.getValueRange(r,t))this.canSelect(e,i)&&n.add(i);return n}),tS(this,"toggleSelection",(e,t)=>{if("none"===this.selectionMode)return this;if("single"===this.selectionMode&&!this.isSelected(t))return this.replaceSelection(e,t);let r=this.copy();return r.has(t)?r.delete(t):r.canSelect(e,t)&&r.add(t),r}),tS(this,"replaceSelection",(t,r)=>{if("none"===this.selectionMode||null==r||!this.canSelect(t,r))return this;let n=new e([r]);return this.sync(n)}),tS(this,"setSelection",t=>{if("none"===this.selectionMode)return this;let r=new e;for(let e of t)if(null!=e&&(r.add(e),"single"===this.selectionMode))break;return this.sync(r)}),tS(this,"clearSelection",()=>{let e=this.copy();return e.deselectable&&e.size>0&&e.clear(),e}),tS(this,"select",(e,t,r)=>{if("none"===this.selectionMode)return this;if("single"===this.selectionMode)if(this.isSelected(t)&&this.deselectable)return this.toggleSelection(e,t);else return this.replaceSelection(e,t);return"multiple"===this.selectionMode||r?this.toggleSelection(e,t):this.replaceSelection(e,t)}),tS(this,"deselect",e=>{let t=this.copy();return t.delete(e),t}),tS(this,"isEqual",e=>(0,tC.isEqual)(Array.from(this),Array.from(e)))}};function tN(e,t,r){for(let n=0;n<t.length;n++)e=r.getChildren(e,t.slice(n+1))[t[n]];return e}function tD(e,t){for(let r=0;r<Math.min(e.length,t.length);r++){if(e[r]<t[r])return -1;if(e[r]>t[r])return 1}return e.length-t.length}function tL(e,t){let r;return tW(e,{onEnter:(e,n)=>{if(t.predicate(e,n))return r=[...n],"stop"},getChildren:t.getChildren}),r}function tV(){return{type:"replace"}}function tF(e){return[e.slice(0,-1),e[e.length-1]]}function tj(e,t,r=new Map){let[n,i]=tF(e);for(let e=n.length-1;e>=0;e--){let t=n.slice(0,e).join();r.get(t)?.type!=="remove"&&r.set(t,tV())}let o=r.get(n.join());if(o?.type==="remove")r.set(n.join(),{type:"removeThenInsert",removeIndexes:o.indexes,insertIndex:i,insertNodes:t});else r.set(n.join(),{type:"insert",index:i,nodes:t});return r}function tz(e){let t=new Map,r=new Map;for(let t of e){let e=t.slice(0,-1).join(),n=r.get(e)??[];n.push(t[t.length-1]),r.set(e,n.sort((e,t)=>e-t))}for(let r of e)for(let e=r.length-2;e>=0;e--){let n=r.slice(0,e).join();t.has(n)||t.set(n,tV())}for(let[e,n]of r)t.set(e,{type:"remove",indexes:n});return t}function tB(e,t,r){var n,i;let o;return n=e,i={...r,getChildren:(e,n)=>{let i=n.join(),o=t.get(i);switch(o?.type){case"replace":case"remove":case"removeThenInsert":case"insert":return r.getChildren(e,n);default:return[]}},transform:(e,n,i)=>{let o=i.join(),a=t.get(o);switch(a?.type){case"remove":return r.create(e,n.filter((e,t)=>!a.indexes.includes(t)),i);case"removeThenInsert":let s=n.filter((e,t)=>!a.removeIndexes.includes(t)),l=a.removeIndexes.reduce((e,t)=>t<e?e-1:e,a.insertIndex);return r.create(e,tH(s,l,0,...a.insertNodes),i);case"insert":return r.create(e,tH(n,a.index,0,...a.nodes),i);case"replace":return r.create(e,n,i);default:return e}}},o={},tW(n,{...i,onLeave:(e,t)=>{let r=[0,...t],n=r.join(),a=i.transform(e,o[n]??[],t),s=r.slice(0,-1).join(),l=o[s]??[];l.push(a),o[s]=l}}),o[""][0]}function tH(e,t,r,...n){return[...e.slice(0,t),...n,...e.slice(t+r)]}function tW(e,t){let{onEnter:r,onLeave:n,getChildren:i}=t,o=[],a=[{node:e}],s=t.reuseIndexPath?()=>o:()=>o.slice();for(;a.length>0;){let e=a[a.length-1];if(void 0===e.state){let t=r?.(e.node,s());if("stop"===t)return;e.state="skip"===t?-1:0}let t=e.children||i(e.node,s());if(e.children||(e.children=t),-1!==e.state){if(e.state<t.length){let r=e.state;o.push(r),a.push({node:t[r]}),e.state=r+1;continue}if("stop"===n?.(e.node,s()))return}o.pop(),a.pop()}}var tU=class e{constructor(t){this.options=t,tS(this,"rootNode"),tS(this,"isEqual",e=>(0,tC.isEqual)(this.rootNode,e.rootNode)),tS(this,"getNodeChildren",e=>this.options.nodeToChildren?.(e)??tq.nodeToChildren(e)??[]),tS(this,"resolveIndexPath",e=>"string"==typeof e?this.getIndexPath(e):e),tS(this,"resolveNode",e=>{let t=this.resolveIndexPath(e);return t?this.at(t):void 0}),tS(this,"getNodeChildrenCount",e=>this.options.nodeToChildrenCount?.(e)??tq.nodeToChildrenCount(e)),tS(this,"getNodeValue",e=>this.options.nodeToValue?.(e)??tq.nodeToValue(e)),tS(this,"getNodeDisabled",e=>this.options.isNodeDisabled?.(e)??tq.isNodeDisabled(e)),tS(this,"stringify",e=>{let t=this.findNode(e);return t?this.stringifyNode(t):null}),tS(this,"stringifyNode",e=>this.options.nodeToString?.(e)??tq.nodeToString(e)),tS(this,"getFirstNode",(e=this.rootNode)=>{let t;return tW(e,{getChildren:this.getNodeChildren,onEnter:(e,r)=>{if(!t&&r.length>0&&!this.getNodeDisabled(e))return t=e,"stop"}}),t}),tS(this,"getLastNode",(e=this.rootNode,t={})=>{let r;return tW(e,{getChildren:this.getNodeChildren,onEnter:(n,i)=>{if(!this.isSameNode(n,e)){if(t.skip?.({value:this.getNodeValue(n),node:n,indexPath:i}))return"skip";i.length>0&&!this.getNodeDisabled(n)&&(r=n)}}}),r}),tS(this,"at",e=>tN(this.rootNode,e,{getChildren:this.getNodeChildren})),tS(this,"findNode",(e,t=this.rootNode)=>{var r;let n;return tW(t,{...r={getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e},onEnter:(e,t)=>{if(r.predicate(e,t))return n=e,"stop"}}),n}),tS(this,"findNodes",(e,t=this.rootNode)=>{var r;let n,i=new Set(e.filter(e=>null!=e));return r={getChildren:this.getNodeChildren,predicate:e=>i.has(this.getNodeValue(e))},n=[],tW(t,{onEnter:(e,t)=>{r.predicate(e,t)&&n.push(e)},getChildren:r.getChildren}),n}),tS(this,"sort",e=>e.reduce((e,t)=>{let r=this.getIndexPath(t);return r&&e.push({value:t,indexPath:r}),e},[]).sort((e,t)=>tD(e.indexPath,t.indexPath)).map(({value:e})=>e)),tS(this,"getIndexPath",e=>tL(this.rootNode,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e})),tS(this,"getValue",e=>{let t=this.at(e);return t?this.getNodeValue(t):void 0}),tS(this,"getValuePath",e=>{if(!e)return[];let t=[],r=[...e];for(;r.length>0;){let e=this.at(r);e&&t.unshift(this.getNodeValue(e)),r.pop()}return t}),tS(this,"getDepth",e=>{let t=tL(this.rootNode,{getChildren:this.getNodeChildren,predicate:t=>this.getNodeValue(t)===e});return t?.length??0}),tS(this,"isSameNode",(e,t)=>this.getNodeValue(e)===this.getNodeValue(t)),tS(this,"isRootNode",e=>this.isSameNode(e,this.rootNode)),tS(this,"contains",(e,t)=>!!e&&!!t&&t.slice(0,e.length).every((r,n)=>e[n]===t[n])),tS(this,"getNextNode",(e,t={})=>{let r,n=!1;return tW(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,o)=>{if(this.isRootNode(i))return;let a=this.getNodeValue(i);return t.skip?.({value:a,node:i,indexPath:o})?(a===e&&(n=!0),"skip"):n&&!this.getNodeDisabled(i)?(r=i,"stop"):void(a===e&&(n=!0))}}),r}),tS(this,"getPreviousNode",(e,t={})=>{let r,n=!1;return tW(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,o)=>{if(this.isRootNode(i))return;let a=this.getNodeValue(i);return t.skip?.({value:a,node:i,indexPath:o})?"skip":a===e?(n=!0,"stop"):void(!this.getNodeDisabled(i)&&(r=i))}}),n?r:void 0}),tS(this,"getParentNodes",e=>{let t=this.resolveIndexPath(e)?.slice();if(!t)return[];let r=[];for(;t.length>0;){t.pop();let e=this.at(t);e&&!this.isRootNode(e)&&r.unshift(e)}return r}),tS(this,"getDescendantNodes",(e,t)=>{let r=this.resolveNode(e);if(!r)return[];let n=[];return tW(r,{getChildren:this.getNodeChildren,onEnter:(e,r)=>{0===r.length||!t?.withBranch&&this.isBranchNode(e)||n.push(e)}}),n}),tS(this,"getDescendantValues",(e,t)=>this.getDescendantNodes(e,t).map(e=>this.getNodeValue(e))),tS(this,"getParentIndexPath",e=>e.slice(0,-1)),tS(this,"getParentNode",e=>{let t=this.resolveIndexPath(e);return t?this.at(this.getParentIndexPath(t)):void 0}),tS(this,"visit",e=>{let{skip:t,...r}=e;tW(this.rootNode,{...r,getChildren:this.getNodeChildren,onEnter:(e,n)=>{if(!this.isRootNode(e))return t?.({value:this.getNodeValue(e),node:e,indexPath:n})?"skip":r.onEnter?.(e,n)}})}),tS(this,"getPreviousSibling",e=>{let t=this.getParentNode(e);if(!t)return;let r=this.getNodeChildren(t),n=e[e.length-1];for(;--n>=0;){let e=r[n];if(!this.getNodeDisabled(e))return e}}),tS(this,"getNextSibling",e=>{let t=this.getParentNode(e);if(!t)return;let r=this.getNodeChildren(t),n=e[e.length-1];for(;++n<r.length;){let e=r[n];if(!this.getNodeDisabled(e))return e}}),tS(this,"getSiblingNodes",e=>{let t=this.getParentNode(e);return t?this.getNodeChildren(t):[]}),tS(this,"getValues",(e=this.rootNode)=>{var t,r;let n;return(t={getChildren:this.getNodeChildren,transform:e=>[this.getNodeValue(e)]},n=(r={...t,initialResult:[],nextResult:(e,r,n)=>(e.push(...t.transform(r,n)),e)}).initialResult,tW(e,{...r,onEnter:(e,t)=>{n=r.nextResult(n,e,t)}}),n).slice(1)}),tS(this,"isValidDepth",(e,t)=>null==t||("function"==typeof t?t(e.length):e.length===t)),tS(this,"isBranchNode",e=>this.getNodeChildren(e).length>0||null!=this.getNodeChildrenCount(e)),tS(this,"getBranchValues",(e=this.rootNode,t={})=>{let r=[];return tW(e,{getChildren:this.getNodeChildren,onEnter:(e,n)=>{if(0===n.length)return;let i=this.getNodeValue(e);if(t.skip?.({value:i,node:e,indexPath:n}))return"skip";this.isBranchNode(e)&&this.isValidDepth(n,t.depth)&&r.push(this.getNodeValue(e))}}),r}),tS(this,"flatten",(e=this.rootNode)=>{var t;let r,n,i,o;return t={getChildren:this.getNodeChildren},r=[],n=0,i=new Map,o=new Map,tW(e,{getChildren:t.getChildren,onEnter:(e,a)=>{i.has(e)||i.set(e,n++);let s=t.getChildren(e,a);s.forEach(t=>{o.has(t)||o.set(t,e),i.has(t)||i.set(t,n++)});let l=s.length>0?s.map(e=>i.get(e)):void 0,u=o.get(e),c=u?i.get(u):void 0,d=i.get(e);r.push({...e,_children:l,_parent:c,_index:d})}}),r}),tS(this,"_create",(e,t)=>this.getNodeChildren(e).length>0||t.length>0?{...e,children:t}:{...e}),tS(this,"_insert",(e,t,r)=>this.copy(function(e,t){let{nodes:r,at:n}=t;if(0===n.length)throw Error("Can't insert nodes at the root");return tB(e,tj(n,r),t)}(e,{at:t,nodes:r,getChildren:this.getNodeChildren,create:this._create}))),tS(this,"copy",t=>new e({...this.options,rootNode:t})),tS(this,"_replace",(e,t,r)=>{var n;return this.copy(0===(n={at:t,node:r,getChildren:this.getNodeChildren,create:this._create}).at.length?n.node:tB(e,function(e,t){let r=new Map,[n,i]=tF(e);for(let e=n.length-1;e>=0;e--){let t=n.slice(0,e).join();r.set(t,tV())}return r.set(n.join(),{type:"removeThenInsert",removeIndexes:[i],insertIndex:i,insertNodes:[t]}),r}(n.at,n.node),n))}),tS(this,"_move",(e,t,r)=>this.copy(function(e,t){if(0===t.indexPaths.length)return e;for(let e of t.indexPaths)if(0===e.length)throw Error("Can't move the root node");if(0===t.to.length)throw Error("Can't move nodes to the root");let r=function(e){let t=e.sort(tD),r=[],n=new Set;for(let e of t){let t=e.join();n.has(t)||(n.add(t),r.push(e))}return r}(t.indexPaths),n=r.map(r=>tN(e,r,t));return tB(e,tj(t.to,n,tz(r)),t)}(e,{indexPaths:t,to:r,getChildren:this.getNodeChildren,create:this._create}))),tS(this,"_remove",(e,t)=>this.copy(function(e,t){if(0===t.indexPaths.length)return e;for(let e of t.indexPaths)if(0===e.length)throw Error("Can't remove the root node");return tB(e,tz(t.indexPaths),t)}(e,{indexPaths:t,getChildren:this.getNodeChildren,create:this._create}))),tS(this,"replace",(e,t)=>this._replace(this.rootNode,e,t)),tS(this,"remove",e=>this._remove(this.rootNode,e)),tS(this,"insertBefore",(e,t)=>this.getParentNode(e)?this._insert(this.rootNode,e,t):void 0),tS(this,"insertAfter",(e,t)=>{if(!this.getParentNode(e))return;let r=[...e.slice(0,-1),e[e.length-1]+1];return this._insert(this.rootNode,r,t)}),tS(this,"move",(e,t)=>this._move(this.rootNode,e,t)),tS(this,"filter",e=>{let t=function(e,t){let{predicate:r,create:n,getChildren:i}=t,o=(e,t)=>{let a=i(e,t),s=[];a.forEach((e,r)=>{let n=o(e,[...t,r]);n&&s.push(n)});let l=0===t.length,u=r(e,t),c=s.length>0;return l||u||c?n(e,s,t):null};return o(e,[])||n(e,[],[])}(this.rootNode,{predicate:e,getChildren:this.getNodeChildren,create:this._create});return this.copy(t)}),tS(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}};function t$(e){let t={label:"",value:"ROOT",children:[]};return e.forEach(e=>{let r=e.split("/"),n=t;r.forEach((e,t)=>{let i=n.children?.find(t=>t.label===e);i||(i={value:r.slice(0,t+1).join("/"),label:e},n.children||(n.children=[]),n.children.push(i)),n=i})}),new tU({rootNode:t})}var tq={nodeToValue:e=>"string"==typeof e?e:(0,tC.isObject)(e)&&(0,tC.hasProp)(e,"value")?e.value:"",nodeToString:e=>"string"==typeof e?e:(0,tC.isObject)(e)&&(0,tC.hasProp)(e,"label")?e.label:tq.nodeToValue(e),isNodeDisabled:e=>!!((0,tC.isObject)(e)&&(0,tC.hasProp)(e,"disabled"))&&!!e.disabled,nodeToChildren:e=>e.children,nodeToChildrenCount(e){if((0,tC.isObject)(e)&&(0,tC.hasProp)(e,"childrenCount"))return e.childrenCount}};e.s(["GridCollection",()=>tR,"ListCollection",()=>tO,"Selection",()=>tM,"TreeCollection",()=>tU,"filePathToTree",()=>t$,"isGridCollection",()=>tA],16466);var tG=e.i(92109),tK=e.i(10741),tY=e.i(27958),tX=e.i(52713),tQ=e.i(56842),tZ=e.i(92242),tJ=(0,t_.createAnatomy)("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");tJ.build();var t0=e=>new tO(e);t0.empty=()=>new tO({items:[]});var t1=e=>e.getById(e.ids?.content??`combobox:${e.id}:content`),t2=e=>e.getById(e.ids?.input??`combobox:${e.id}:input`),t5=e=>e.getById(e.ids?.positioner??`combobox:${e.id}:popper`),t3=e=>e.getById(e.ids?.control??`combobox:${e.id}:control`),t4=e=>e.getById(e.ids?.trigger??`combobox:${e.id}:toggle-btn`),t6=e=>e.getById(e.ids?.clearTrigger??`combobox:${e.id}:clear-btn`),t8=(e,t)=>{if(null==t)return null;let r=`[role=option][data-value="${CSS.escape(t)}"]`;return(0,tG.query)(t1(e),r)},t7=e=>{let t=t2(e);e.isActiveElement(t)||t?.focus({preventScroll:!0})},{guards:t9,createMachine:re,choose:rt}=(0,tX.setup)(),{and:rr,not:rn}=t9;function ri(e){return(e.previousEvent||e).src}re({props:({props:e})=>({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){(0,tG.clickIfLink)(e)},collection:t0.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"suggesting":"idle",context:({prop:e,bindable:t,getContext:r,getEvent:n})=>({currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:tC.isEqual,hash:e=>e.join(","),onChange(t){let n=r(),i=n.get("selectedItems"),o=e("collection"),a=t.map(e=>i.find(t=>o.getItemValue(t)===e)||o.find(e));n.set("selectedItems",a),e("onValueChange")?.({value:t,items:a})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){let r=e("collection").find(t);e("onHighlightChange")?.({highlightedValue:t,highlightedItem:r})}})),inputValue:t(()=>{let t=e("inputValue")||e("defaultInputValue"),r=e("value")||e("defaultValue");if(!t.trim()&&!e("multiple")){let n=e("collection").stringifyMany(r);t=(0,tC.match)(e("selectionBehavior"),{preserve:t||n,replace:n,clear:""})}return{defaultValue:t,value:e("inputValue"),onChange(t){let r=n(),i=(r.previousEvent||r).src;e("onInputValueChange")?.({inputValue:t,reason:i})}}}),highlightedItem:t(()=>{let t=e("highlightedValue");return{defaultValue:e("collection").find(t)}}),selectedItems:t(()=>{let t=e("value")||e("defaultValue")||[];return{defaultValue:e("collection").findMany(t)}})}),computed:{isInputValueEmpty:({context:e})=>0===e.get("inputValue").length,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>"autocomplete"===e("inputBehavior"),autoHighlight:({prop:e})=>"autohighlight"===e("inputBehavior"),hasSelectedItems:({context:e})=>e.get("value").length>0,valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:r,action:n,send:i}){r([()=>e.hash("value")],()=>{n(["syncSelectedItems"])}),r([()=>e.get("inputValue")],()=>{n(["syncInputValue"])}),r([()=>e.get("highlightedValue")],()=>{n(["syncHighlightedItem","autofillInputValue"])}),r([()=>t("open")],()=>{n(["toggleVisibility"])}),r([()=>t("collection").toString()],()=>{i({type:"CHILDREN_CHANGE"})})},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:rt([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{idle:{tags:["idle","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused","closed"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"suggesting"},{target:"interacting"}],"INPUT.CHANGE":[{guard:rr("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:rr("isCustomValue",rn("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:rr("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{guard:"autoComplete",target:"interacting",actions:["invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}},interacting:{tags:["open","focused"],entry:["setInitialFocus"],effects:["scrollToHighlightedItem","trackDismissableLayer","trackPlacement","hideOtherElements"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:rr("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:rr("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.ENTER":[{guard:rr("isOpenControlled","isCustomValue",rn("hasHighlightedItem"),rn("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:rr("isCustomValue",rn("hasHighlightedItem"),rn("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:rr("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"ITEM.CLICK":[{guard:rr("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"LAYER.ESCAPE":[{guard:rr("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:rr("isOpenControlled","isCustomValue",rn("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:rr("isCustomValue",rn("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}},suggesting:{tags:["open","focused"],effects:["trackDismissableLayer","scrollToHighlightedItem","trackPlacement","hideOtherElements"],entry:["setInitialFocus"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["setFinalFocus"]},{target:"idle"}],CHILDREN_CHANGE:[{guard:"autoHighlight",actions:["highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.ENTER":[{guard:rr("isOpenControlled","isCustomValue",rn("hasHighlightedItem"),rn("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:rr("isCustomValue",rn("hasHighlightedItem"),rn("allowCustomValue")),target:"focused",actions:["revertInputValue","invokeOnClose"]},{guard:rr("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.INTERACT_OUTSIDE":[{guard:rr("isOpenControlled","isCustomValue",rn("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:rr("isCustomValue",rn("allowCustomValue")),target:"idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose"]}],"ITEM.CLICK":[{guard:rr("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open"),openOnChange:({prop:e,context:t})=>{let r=e("openOnChange");return(0,tC.isBoolean)(r)?r:!!r?.({inputValue:t.get("inputValue")})},restoreFocus:({event:e})=>null==e.restoreFocus||!!e.restoreFocus,isChangeEvent:({event:e})=>e.previousEvent?.type==="INPUT.CHANGE",autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue"))},effects:{trackDismissableLayer({send:e,prop:t,scope:r}){if(!t("disableLayer"))return(0,tQ.trackDismissableElement)(()=>t1(r),{type:"listbox",defer:!0,exclude:()=>[t2(r),t4(r),t6(r)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},hideOtherElements:({scope:e})=>(0,tY.ariaHidden)([t2(e),t1(e),t4(e),t6(e)]),trackPlacement:({context:e,prop:t,scope:r})=>(e.set("currentPlacement",t("positioning").placement),(0,tK.getPlacement)(()=>t3(r)||t4(r),()=>t5(r),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:r,event:n}){let i=t2(r),o=[],a=i=>{let a=n.current().type.includes("POINTER"),s=e.get("highlightedValue");if(a||!s)return;let l=t1(r),u=t("scrollToIndexFn");if(u)return void u({index:t("collection").indexOf(s),immediate:i,getElement:()=>t8(r,s)});let c=t8(r,s),d=(0,tG.raf)(()=>{(0,tG.scrollIntoView)(c,{rootEl:l,block:"nearest"})});o.push(d)},s=(0,tG.raf)(()=>a(!0));o.push(s);let l=(0,tG.observeAttributes)(i,{attributes:["aria-activedescendant"],callback:()=>a(!1)});return o.push(l),()=>{o.forEach(e=>e())}}},actions:{reposition({context:e,prop:t,scope:r,event:n}){(0,tK.getPlacement)(()=>t3(r),()=>t5(r),{...t("positioning"),...n.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setHighlightedValue({context:e,event:t}){null!=t.value&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){let{context:t,prop:r}=e,n=r("collection"),i=t.get("highlightedValue");if(!i||!n.has(i))return;let o=r("multiple")?(0,tC.addOrRemove)(t.get("value"),i):[i];r("onSelect")?.({value:o,itemValue:i}),t.set("value",o);let a=(0,tC.match)(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:n.stringifyMany(o),clear:""});t.set("inputValue",a)},scrollToHighlightedItem({context:e,prop:t,scope:r}){(0,tG.nextTick)(()=>{let n=e.get("highlightedValue");if(null==n)return;let i=t8(r,n),o=t1(r),a=t("scrollToIndexFn");a?a({index:t("collection").indexOf(n),immediate:!0,getElement:()=>t8(r,n)}):(0,tG.scrollIntoView)(i,{rootEl:o,block:"nearest"})})},selectItem(e){let{context:t,event:r,flush:n,prop:i}=e;null!=r.value&&n(()=>{let e=i("multiple")?(0,tC.addOrRemove)(t.get("value"),r.value):[r.value];i("onSelect")?.({value:e,itemValue:r.value}),t.set("value",e);let n=(0,tC.match)(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(e),clear:""});t.set("inputValue",n)})},clearItem(e){let{context:t,event:r,flush:n,prop:i}=e;null!=r.value&&n(()=>{let e=(0,tC.remove)(t.get("value"),r.value);t.set("value",e);let n=(0,tC.match)(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(e),clear:""});t.set("inputValue",n)})},setInitialFocus({scope:e}){(0,tG.raf)(()=>{t7(e)})},setFinalFocus({scope:e}){(0,tG.raf)(()=>{let t=t4(e);if(t?.dataset.focusable==null)t7(e);else{let t;t=t4(e),e.isActiveElement(t)||t?.focus({preventScroll:!0})}})},syncInputValue({context:e,scope:t,event:r}){let n=t2(t);n&&(n.value=e.get("inputValue"),queueMicrotask(()=>{"INPUT.CHANGE"!==r.current().type&&(0,tG.setCaretToEnd)(n)}))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:r}){let n=t("selectionBehavior"),i=(0,tC.match)(n,{replace:r("hasSelectedItems")?r("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",i)},setValue(e){let{context:t,flush:r,event:n,prop:i}=e;r(()=>{t.set("value",n.value);let e=(0,tC.match)(i("selectionBehavior"),{preserve:t.get("inputValue"),replace:i("collection").stringifyMany(n.value),clear:""});t.set("inputValue",e)})},clearSelectedItems(e){let{context:t,flush:r,prop:n}=e;r(()=>{t.set("value",[]);let e=(0,tC.match)(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:n("collection").stringifyMany([]),clear:""});t.set("inputValue",e)})},scrollContentToTop({prop:e,scope:t}){let r=e("scrollToIndexFn");if(r){let n=e("collection").firstValue;r({index:0,immediate:!0,getElement:()=>t8(t,n)})}else{let e=t1(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t}){let r=ri(t);e("onOpenChange")?.({open:!0,reason:r})},invokeOnClose({prop:e,event:t}){let r=ri(t);e("onOpenChange")?.({open:!1,reason:r})},highlightFirstItem({context:e,prop:t,scope:r}){(t1(r)?queueMicrotask:tG.raf)(()=>{let r=t("collection").firstValue;r&&e.set("highlightedValue",r)})},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:r}){(t1(r)?queueMicrotask:tG.raf)(()=>{let r=t("collection").lastValue;r&&e.set("highlightedValue",r)})},highlightNextItem({context:e,prop:t}){let r=null,n=e.get("highlightedValue"),i=t("collection");n?!(r=i.getNextValue(n))&&t("loopFocus")&&(r=i.firstValue):r=i.firstValue,r&&e.set("highlightedValue",r)},highlightPrevItem({context:e,prop:t}){let r=null,n=e.get("highlightedValue"),i=t("collection");n?!(r=i.getPreviousValue(n))&&t("loopFocus")&&(r=i.lastValue):r=i.lastValue,r&&e.set("highlightedValue",r)},highlightFirstSelectedItem({context:e,prop:t}){(0,tG.raf)(()=>{let[r]=t("collection").sort(e.get("value"));r&&e.set("highlightedValue",r)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:r}){(0,tG.raf)(()=>{let n=null;(n=r("hasSelectedItems")?t("collection").sort(e.get("value"))[0]:t("collection").firstValue)&&e.set("highlightedValue",n)})},highlightLastOrSelectedItem({context:e,prop:t,computed:r}){(0,tG.raf)(()=>{let n=t("collection"),i=null;(i=r("hasSelectedItems")?n.sort(e.get("value"))[0]:n.lastValue)&&e.set("highlightedValue",i)})},autofillInputValue({context:e,computed:t,prop:r,event:n,scope:i}){let o=t2(i),a=r("collection");if(!t("autoComplete")||!o||!n.keypress)return;let s=a.stringify(e.get("highlightedValue"));(0,tG.raf)(()=>{o.value=s||e.get("inputValue")})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:r}=e,n=r("collection"),i=t.get("value"),o=i.map(e=>t.get("selectedItems").find(t=>n.getItemValue(t)===e)||n.find(e));t.set("selectedItems",o);let a=(0,tC.match)(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:n.stringifyMany(i),clear:""});t.set("inputValue",a)})},syncHighlightedItem({context:e,prop:t}){let r=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",r)},toggleVisibility({event:e,send:t,prop:r}){t({type:r("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});var ro=(0,tZ.createProps)()(["allowCustomValue","autoFocus","closeOnSelect","collection","composite","defaultHighlightedValue","defaultInputValue","defaultOpen","defaultValue","dir","disabled","disableLayer","form","getRootNode","highlightedValue","id","ids","inputBehavior","inputValue","invalid","loopFocus","multiple","name","navigate","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onOpenChange","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","openOnChange","openOnClick","openOnKeyPress","placeholder","positioning","readOnly","required","scrollToIndexFn","selectionBehavior","translations","value","alwaysSubmitOnEnter"]);(0,tC.createSplitProps)(ro);var ra=(0,tZ.createProps)()(["htmlFor"]);(0,tC.createSplitProps)(ra);var rs=(0,tZ.createProps)()(["id"]);(0,tC.createSplitProps)(rs);var rl=(0,tZ.createProps)()(["item","persistFocus"]);(0,tC.createSplitProps)(rl);let ru=tJ.extendWith("empty");var rc=(0,t_.createAnatomy)("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator");rc.build();var rd=e=>e.ids?.root??`accordion:${e.id}`,rh=(e,t)=>e.ids?.itemTrigger?.(t)??`accordion:${e.id}:trigger:${t}`,rf=e=>{let t=CSS.escape(rd(e)),r=`[aria-controls][data-ownedby='${t}']:not([disabled])`;return(0,tG.queryAll)(e.getById(rd(e)),r)},{and:rp,not:rg}=(0,tX.createGuards)();(0,tX.createMachine)({props:({props:e})=>({collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[],...e}),initialState:()=>"idle",context:({prop:e,bindable:t})=>({focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(t){e("onFocusChange")?.({value:t})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(t){e("onValueChange")?.({value:t})}}))}),computed:{isHorizontal:({prop:e})=>"horizontal"===e("orientation")},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:rp("isExpanded","canToggle"),actions:["collapse"]},{guard:rg("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:r}){let n=t("multiple")?(0,tC.remove)(e.get("value"),r.value):[];e.set("value",n)},expand({context:e,prop:t,event:r}){let n=t("multiple")?(0,tC.add)(e.get("value"),r.value):[r.value];e.set("value",n)},focusFirstTrigger({scope:e}){(0,tC.first)(rf(e))?.focus()},focusLastTrigger({scope:e}){(0,tC.last)(rf(e))?.focus()},focusNextTrigger({context:e,scope:t}){let r=e.get("focusedValue");if(!r)return;let n=(0,tG.nextById)(rf(t),rh(t,r));n?.focus()},focusPrevTrigger({context:e,scope:t}){let r=e.get("focusedValue");if(!r)return;let n=(0,tG.prevById)(rf(t),rh(t,r));n?.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&((0,tC.warn)("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}});var rm=(0,tZ.createProps)()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);(0,tC.createSplitProps)(rm);var rv=(0,tZ.createProps)()(["value","disabled"]);(0,tC.createSplitProps)(rv);var rb=(0,t_.createAnatomy)("clipboard").parts("root","control","trigger","indicator","input","label");rb.build(),(0,tX.createMachine)({props:({props:e})=>({timeout:3e3,defaultValue:"",...e}),initialState:()=>"idle",context:({prop:e,bindable:t})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(t){e("onValueChange")?.({value:t})}}))}),watch({track:e,context:t,action:r}){e([()=>t.get("value")],()=>{r(["syncInputElement"])})},on:{"VALUE.SET":{actions:["setValue"]},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]}},states:{idle:{on:{"INPUT.COPY":{target:"copied",actions:["invokeOnCopy"]}}},copied:{effects:["waitForTimeout"],on:{"COPY.DONE":{target:"idle"},COPY:{target:"copied",actions:["copyToClipboard","invokeOnCopy"]},"INPUT.COPY":{actions:["invokeOnCopy"]}}}},implementations:{effects:{waitForTimeout:({prop:e,send:t})=>(0,tC.setRafTimeout)(()=>{t({type:"COPY.DONE"})},e("timeout"))},actions:{setValue({context:e,event:t}){e.set("value",t.value)},copyToClipboard({context:e,scope:t}){let r;r=e.get("value"),function(e,t){let r,n=e.defaultView||window;if(n.navigator.clipboard?.writeText!==void 0)return n.navigator.clipboard.writeText(t);if(!e.body)return Promise.reject(Error());let i=(Object.assign((r=e.createElement("pre")).style,{width:"1px",height:"1px",position:"fixed",top:"5px"}),r.textContent=t,r);e.body.appendChild(i),function(e){let t=(0,tG.getWindow)(e).getSelection();if(null==t)return Promise.reject(Error());t.removeAllRanges();let r=e.ownerDocument,n=r.createRange();n.selectNodeContents(e),t.addRange(n),r.execCommand("copy"),t.removeAllRanges(),Promise.resolve()}(i),e.body.removeChild(i),Promise.resolve()}(t.getDoc(),r)},invokeOnCopy({prop:e}){e("onStatusChange")?.({copied:!0})},syncInputElement({context:e,scope:t}){let r=t.getById(t.ids?.input??`clip:${t.id}:input`);r&&(0,tG.setElementValue)(r,e.get("value"))}}}});var ry=(0,tZ.createProps)()(["getRootNode","id","ids","value","defaultValue","timeout","onStatusChange","onValueChange"]);(0,tC.createSplitProps)(ry);var rx=(0,tZ.createProps)()(["copied"]);(0,tC.createSplitProps)(rx);var rw=Object.defineProperty,r_=(e,t,r)=>{let n;return(n=t+"")in e?rw(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},rC=class{toHexInt(){return this.toFormat("rgba").toHexInt()}getChannelValue(e){if(e in this)return this[e];throw Error("Unsupported color channel: "+e)}getChannelValuePercent(e,t){let r=t??this.getChannelValue(e),{minValue:n,maxValue:i}=this.getChannelRange(e);return(0,tC.getValuePercent)(r,n,i)}getChannelPercentValue(e,t){let{minValue:r,maxValue:n,step:i}=this.getChannelRange(e),o=(0,tC.getPercentValue)(t,r,n,i);return(0,tC.snapValueToStep)(o,r,n,i)}withChannelValue(e,t){let{minValue:r,maxValue:n}=this.getChannelRange(e);if(e in this){let i=this.clone();return i[e]=(0,tC.clampValue)(t,r,n),i}throw Error("Unsupported color channel: "+e)}getColorAxes(e){let{xChannel:t,yChannel:r}=e,n=t||this.getChannels().find(e=>e!==r),i=r||this.getChannels().find(e=>e!==n),o=this.getChannels().find(e=>e!==n&&e!==i);return{xChannel:n,yChannel:i,zChannel:o}}incrementChannel(e,t){let{minValue:r,maxValue:n,step:i}=this.getChannelRange(e),o=(0,tC.snapValueToStep)((0,tC.clampValue)(this.getChannelValue(e)+t,r,n),r,n,i);return this.withChannelValue(e,o)}decrementChannel(e,t){return this.incrementChannel(e,-t)}isEqual(e){return((e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0})(this.toJSON(),e.toJSON())&&this.getChannelValue("alpha")===e.getChannelValue("alpha")}},rk=/^#[\da-f]+$/i,rS=/^rgba?\((.*)\)$/,rE=/[^#]/gi,rO=class e extends rC{constructor(e,t,r,n){super(),this.red=e,this.green=t,this.blue=r,this.alpha=n}static parse(t){let r=[];if(rk.test(t)&&[4,5,7,9].includes(t.length)){let e=(t.length<6?t.replace(rE,"$&$&"):t).slice(1).split("");for(;e.length>0;)r.push(parseInt(e.splice(0,2).join(""),16));r[3]=void 0!==r[3]?r[3]/255:void 0}let n=t.match(rS);return n?.[1]&&(r=n[1].split(",").map(e=>Number(e.trim())).map((e,t)=>(0,tC.clampValue)(e,0,t<3?255:1))),r.length<3?void 0:new e(r[0],r[1],r[2],r[3]??1)}toString(e){switch(e){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(255*this.alpha).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"hsb":return this.toHSB().toString("hsb");default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case"rgba":return this;case"hsba":return this.toHSB();case"hsla":return this.toHSL();default:throw Error("Unsupported color conversion: rgb -> "+e)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){let e=this.red/255,t=this.green/255,r=this.blue/255,n=Math.min(e,t,r),i=Math.max(e,t,r),o=i-n,a=0;if(0!==o){switch(i){case e:a=(t-r)/o+6*(t<r);break;case t:a=(r-e)/o+2;break;case r:a=(e-t)/o+4}a/=6}return new rM((0,tC.toFixedNumber)(360*a,2),(0,tC.toFixedNumber)(100*(0===i?0:o/i),2),(0,tC.toFixedNumber)(100*i,2),(0,tC.toFixedNumber)(this.alpha,2))}toHSL(){let e=this.red/255,t=this.green/255,r=this.blue/255,n=Math.min(e,t,r),i=Math.max(e,t,r),o=(i+n)/2,a=i-n,s=-1,l=-1;if(0===a)s=l=0;else{switch(l=a/(o<.5?i+n:2-i-n),i){case e:s=(t-r)/a+6*(t<r);break;case t:s=(r-e)/a+2;break;case r:s=(e-t)/a+4}s/=6}return new rT((0,tC.toFixedNumber)(360*s,2),(0,tC.toFixedNumber)(100*l,2),(0,tC.toFixedNumber)(100*o,2),(0,tC.toFixedNumber)(this.alpha,2))}clone(){return new e(this.red,this.green,this.blue,this.alpha)}getChannelFormatOptions(e){switch(e){case"red":case"green":case"blue":return{style:"decimal"};case"alpha":return{style:"percent"};default:throw Error("Unknown color channel: "+e)}}formatChannelValue(e,t){let r=this.getChannelFormatOptions(e),n=this.getChannelValue(e);return new Intl.NumberFormat(t,r).format(n)}getChannelRange(e){switch(e){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw Error("Unknown color channel: "+e)}}toJSON(){return{r:this.red,g:this.green,b:this.blue,a:this.alpha}}getFormat(){return"rgba"}getChannels(){return e.colorChannels}};r_(rO,"colorChannels",["red","green","blue"]);var rI=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,rP=class e extends rC{constructor(e,t,r,n){super(),this.hue=e,this.saturation=t,this.lightness=r,this.alpha=n}static parse(t){let r;if(r=t.match(rI)){let[t,n,i,o]=(r[1]??r[2]).split(",").map(e=>Number(e.trim().replace("%","")));return new e((0,tC.mod)(t,360),(0,tC.clampValue)(n,0,100),(0,tC.clampValue)(i,0,100),(0,tC.clampValue)(o??1,0,1))}}toString(e){switch(e){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${(0,tC.toFixedNumber)(this.saturation,2)}%, ${(0,tC.toFixedNumber)(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${(0,tC.toFixedNumber)(this.saturation,2)}%, ${(0,tC.toFixedNumber)(this.lightness,2)}%, ${this.alpha})`;case"hsb":return this.toHSB().toString("hsb");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case"hsla":return this;case"hsba":return this.toHSB();case"rgba":return this.toRGB();default:throw Error("Unsupported color conversion: hsl -> "+e)}}toHSB(){let e=this.saturation/100,t=this.lightness/100,r=t+e*Math.min(t,1-t);return e=0===r?0:2*(1-t/r),new rM((0,tC.toFixedNumber)(this.hue,2),(0,tC.toFixedNumber)(100*e,2),(0,tC.toFixedNumber)(100*r,2),(0,tC.toFixedNumber)(this.alpha,2))}toRGB(){let e=this.hue,t=this.saturation/100,r=this.lightness/100,n=t*Math.min(r,1-r),i=(t,i=(t+e/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1);return new rO(Math.round(255*i(0)),Math.round(255*i(8)),Math.round(255*i(4)),(0,tC.toFixedNumber)(this.alpha,2))}clone(){return new e(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(e){switch(e){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw Error("Unknown color channel: "+e)}}formatChannelValue(e,t){let r=this.getChannelFormatOptions(e),n=this.getChannelValue(e);return("saturation"===e||"lightness"===e)&&(n/=100),new Intl.NumberFormat(t,r).format(n)}getChannelRange(e){switch(e){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw Error("Unknown color channel: "+e)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return"hsla"}getChannels(){return e.colorChannels}};r_(rP,"colorChannels",["hue","saturation","lightness"]);var rT=rP,rR=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,rA=class e extends rC{constructor(e,t,r,n){super(),this.hue=e,this.saturation=t,this.brightness=r,this.alpha=n}static parse(t){let r;if(r=t.match(rR)){let[t,n,i,o]=(r[1]??r[2]).split(",").map(e=>Number(e.trim().replace("%","")));return new e((0,tC.mod)(t,360),(0,tC.clampValue)(n,0,100),(0,tC.clampValue)(i,0,100),(0,tC.clampValue)(o??1,0,1))}}toString(e){switch(e){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${(0,tC.toFixedNumber)(this.saturation,2)}%, ${(0,tC.toFixedNumber)(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${(0,tC.toFixedNumber)(this.saturation,2)}%, ${(0,tC.toFixedNumber)(this.brightness,2)}%, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case"hsba":return this;case"hsla":return this.toHSL();case"rgba":return this.toRGB();default:throw Error("Unsupported color conversion: hsb -> "+e)}}toHSL(){let e=this.saturation/100,t=this.brightness/100,r=t*(1-e/2);return e=0===r||1===r?0:(t-r)/Math.min(r,1-r),new rT((0,tC.toFixedNumber)(this.hue,2),(0,tC.toFixedNumber)(100*e,2),(0,tC.toFixedNumber)(100*r,2),(0,tC.toFixedNumber)(this.alpha,2))}toRGB(){let e=this.hue,t=this.saturation/100,r=this.brightness/100,n=(n,i=(n+e/60)%6)=>r-t*r*Math.max(Math.min(i,4-i,1),0);return new rO(Math.round(255*n(5)),Math.round(255*n(3)),Math.round(255*n(1)),(0,tC.toFixedNumber)(this.alpha,2))}clone(){return new e(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(e){switch(e){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw Error("Unknown color channel: "+e)}}formatChannelValue(e,t){let r=this.getChannelFormatOptions(e),n=this.getChannelValue(e);return("saturation"===e||"brightness"===e)&&(n/=100),new Intl.NumberFormat(t,r).format(n)}getChannelRange(e){switch(e){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw Error("Unknown color channel: "+e)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return"hsba"}getChannels(){return e.colorChannels}};r_(rA,"colorChannels",["hue","saturation","brightness"]);var rM=rA,rN=(e=>{let t=new Map,r=e.split(",");for(let e=0;e<r.length;e++){let[n,i]=r[e].split(":");t.set(n,`#${i}`),n.includes("gray")&&t.set(n.replace("gray","grey"),`#${i}`)}return t})("aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32"),rD=e=>{if(rN.has(e))return rD(rN.get(e));let t=rO.parse(e)||rM.parse(e)||rT.parse(e);if(!t){let t=Error("Invalid color value: "+e);throw Error.captureStackTrace?.(t,rD),t}return t},rL=(0,t_.createAnatomy)("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]);rL.build();var rV=e=>e.getById(e.ids?.content??`color-picker:${e.id}:content`),rF=e=>e.getById(e.ids?.hiddenInput??`color-picker:${e.id}:hidden-input`),rj=e=>e.getById(e.ids?.trigger??`color-picker:${e.id}:trigger`);RegExp("^(hsba|hsla|rgba)$");var rz=/^[0-9a-fA-F]{3,8}$/,{and:rB}=(0,tX.createGuards)();function rH(e,t,r){let n=[...(0,tG.queryAll)(rV(e),"input[data-channel]"),...(0,tG.queryAll)(e.getById(e.ids?.control??`color-picker:${e.id}:control`),"input[data-channel]")];(0,tG.raf)(()=>{n.forEach(e=>{let n=e.dataset.channel;(0,tG.setElementValue)(e,function(e,t){if(null==t)return"";if("hex"===t)return e.toString("hex");if("css"===t)return e.toString("css");if(t in e)return e.getChannelValue(t).toString();let r="hsla"===e.getFormat();switch(t){case"hue":return r?e.toFormat("hsla").getChannelValue("hue").toString():e.toFormat("hsba").getChannelValue("hue").toString();case"saturation":return r?e.toFormat("hsla").getChannelValue("saturation").toString():e.toFormat("hsba").getChannelValue("saturation").toString();case"lightness":return e.toFormat("hsla").getChannelValue("lightness").toString();case"brightness":return e.toFormat("hsba").getChannelValue("brightness").toString();case"red":case"green":case"blue":return e.toFormat("rgba").getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}(r||t,n))})})}(0,tX.createMachine)({props:({props:e})=>({dir:"ltr",defaultValue:rD("#000000"),defaultFormat:"rgba",openAutoFocus:!0,...e,positioning:{placement:"bottom",...e.positioning}}),initialState:({prop:e})=>e("open")||e("defaultOpen")||e("inline")?"open":"idle",context:({prop:e,bindable:t,getContext:r})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:(e,t)=>e.toString("css")===t?.toString("css"),hash:e=>e.toString("css"),onChange(t){let n=r(),i=t.toString(n.get("format"));e("onValueChange")?.({value:t,valueAsString:i})}})),format:t(()=>({defaultValue:e("defaultFormat"),value:e("format"),onChange(t){e("onFormatChange")?.({format:t})}})),activeId:t(()=>({defaultValue:null})),activeChannel:t(()=>({defaultValue:null})),activeOrientation:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),restoreFocus:t(()=>({defaultValue:!0})),currentPlacement:t(()=>({defaultValue:void 0}))}),computed:{rtl:({prop:e})=>"rtl"===e("dir"),disabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),interactive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e})=>e.get("value").toString(e.get("format")),areaValue:({context:e})=>{let t=e.get("format").startsWith("hsl")?"hsla":"hsba";return e.get("value").toFormat(t)}},effects:["trackFormControl"],watch({prop:e,context:t,action:r,track:n}){n([()=>t.hash("value")],()=>{r(["syncInputElements","dispatchChangeEvent"])}),n([()=>t.get("format")],()=>{r(["syncFormatSelectElement"])}),n([()=>e("open")],()=>{r(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setValue"]},"FORMAT.SET":{actions:["setFormat"]},"CHANNEL_INPUT.CHANGE":{actions:["setChannelColorFromInput"]},"EYEDROPPER.CLICK":{actions:["openEyeDropper"]},"SWATCH_TRIGGER.CLICK":{actions:["setValue"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"CHANNEL_INPUT.FOCUS":{target:"focused",actions:["setActiveChannel"]}}},focused:{tags:["closed","focused"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"CHANNEL_INPUT.FOCUS":{actions:["setActiveChannel"]},"CHANNEL_INPUT.BLUR":{target:"idle",actions:["setChannelColorFromInput"]},"TRIGGER.BLUR":{target:"idle"}}},open:{tags:["open"],effects:["trackPositioning","trackDismissableElement"],on:{"CONTROLLED.CLOSE":[{guard:"shouldRestoreFocus",target:"focused",actions:["setReturnFocus"]},{target:"idle"}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"AREA.POINTER_DOWN":{target:"open:dragging",actions:["setActiveChannel","setAreaColorFromPoint","focusAreaThumb"]},"AREA.FOCUS":{actions:["setActiveChannel"]},"CHANNEL_SLIDER.POINTER_DOWN":{target:"open:dragging",actions:["setActiveChannel","setChannelColorFromPoint","focusChannelThumb"]},"CHANNEL_SLIDER.FOCUS":{actions:["setActiveChannel"]},"AREA.ARROW_LEFT":{actions:["decrementAreaXChannel"]},"AREA.ARROW_RIGHT":{actions:["incrementAreaXChannel"]},"AREA.ARROW_UP":{actions:["incrementAreaYChannel"]},"AREA.ARROW_DOWN":{actions:["decrementAreaYChannel"]},"AREA.PAGE_UP":{actions:["incrementAreaXChannel"]},"AREA.PAGE_DOWN":{actions:["decrementAreaXChannel"]},"CHANNEL_SLIDER.ARROW_LEFT":{actions:["decrementChannel"]},"CHANNEL_SLIDER.ARROW_RIGHT":{actions:["incrementChannel"]},"CHANNEL_SLIDER.ARROW_UP":{actions:["incrementChannel"]},"CHANNEL_SLIDER.ARROW_DOWN":{actions:["decrementChannel"]},"CHANNEL_SLIDER.PAGE_UP":{actions:["incrementChannel"]},"CHANNEL_SLIDER.PAGE_DOWN":{actions:["decrementChannel"]},"CHANNEL_SLIDER.HOME":{actions:["setChannelToMin"]},"CHANNEL_SLIDER.END":{actions:["setChannelToMax"]},"CHANNEL_INPUT.BLUR":{actions:["setChannelColorFromInput"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["invokeOnClose","setReturnFocus"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"SWATCH_TRIGGER.CLICK":[{guard:rB("isOpenControlled","closeOnSelect"),actions:["setValue","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setValue","invokeOnClose","setReturnFocus"]},{actions:["setValue"]}]}},"open:dragging":{tags:["open"],exit:["clearActiveChannel"],effects:["trackPointerMove","disableTextSelection","trackPositioning","trackDismissableElement"],on:{"CONTROLLED.CLOSE":[{guard:"shouldRestoreFocus",target:"focused",actions:["setReturnFocus"]},{target:"idle"}],"AREA.POINTER_MOVE":{actions:["setAreaColorFromPoint","focusAreaThumb"]},"AREA.POINTER_UP":{target:"open",actions:["invokeOnChangeEnd"]},"CHANNEL_SLIDER.POINTER_MOVE":{actions:["setChannelColorFromPoint","focusChannelThumb"]},"CHANNEL_SLIDER.POINTER_UP":{target:"open",actions:["invokeOnChangeEnd"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["invokeOnClose","setReturnFocus"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}]}}},implementations:{guards:{closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open")||!!e("inline"),shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus")},effects:{trackPositioning({context:e,prop:t,scope:r}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning")?.placement);let n=rj(r);return(0,tK.getPlacement)(n,()=>r.getById(r.ids?.positioner??`color-picker:${r.id}:positioner`),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})},trackDismissableElement({context:e,scope:t,prop:r,send:n}){if(!r("inline"))return(0,tQ.trackDismissableElement)(()=>rV(t),{type:"popover",exclude:rj(t),defer:!0,onInteractOutside(t){r("onInteractOutside")?.(t),t.defaultPrevented||e.set("restoreFocus",!(t.detail.focusable||t.detail.contextmenu))},onPointerDownOutside:r("onPointerDownOutside"),onFocusOutside:r("onFocusOutside"),onDismiss(){n({type:"INTERACT_OUTSIDE"})}})},trackFormControl({context:e,scope:t,send:r}){let n=rF(t);return(0,tG.trackFormControl)(n,{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){r({type:"VALUE.SET",value:e.initial("value"),src:"form.reset"})}})},trackPointerMove:({context:e,scope:t,event:r,send:n})=>(0,tG.trackPointerMove)(t.getDoc(),{onPointerMove({point:t}){n({type:"area"===e.get("activeId")?"AREA.POINTER_MOVE":"CHANNEL_SLIDER.POINTER_MOVE",point:t,format:r.format})},onPointerUp(){n({type:"area"===e.get("activeId")?"AREA.POINTER_UP":"CHANNEL_SLIDER.POINTER_UP"})}}),disableTextSelection:({scope:e})=>(0,tG.disableTextSelection)({doc:e.getDoc(),target:rV(e)})},actions:{openEyeDropper({scope:e,context:t}){let r=e.getWin();"EyeDropper"in r&&new r.EyeDropper().open().then(({sRGBHex:e})=>{let r=t.get("value").getFormat(),n=rD(e).toFormat(r);t.set("value",n)}).catch(()=>void 0)},setActiveChannel({context:e,event:t}){e.set("activeId",t.id),t.channel&&e.set("activeChannel",t.channel),t.orientation&&e.set("activeOrientation",t.orientation)},clearActiveChannel({context:e}){e.set("activeChannel",null),e.set("activeId",null),e.set("activeOrientation",null)},setAreaColorFromPoint({context:e,event:t,computed:r,scope:n,prop:i}){let o=t.format?e.get("value").toFormat(t.format):r("areaValue"),{xChannel:a,yChannel:s}=t.channel||e.get("activeChannel"),l=((e,t,r)=>{let n=e.getById(e.ids?.area??`color-picker:${e.id}:area`);if(!n)return;let{getPercentValue:i}=(0,tG.getRelativePoint)(t,n);return{x:i({dir:r,orientation:"horizontal"}),y:i({orientation:"vertical"})}})(n,t.point,i("dir"));if(!l)return;let u=o.getChannelPercentValue(a,l.x),c=o.getChannelPercentValue(s,1-l.y),d=o.withChannelValue(a,u).withChannelValue(s,c);e.set("value",d)},setChannelColorFromPoint({context:e,event:t,computed:r,scope:n,prop:i}){let o=t.channel||e.get("activeId"),a=t.format?e.get("value").toFormat(t.format):r("areaValue"),s=((e,t,r,n)=>{let i=e.getById(e.ids?.channelSliderTrack?.(r)??`color-picker:${e.id}:slider-track:${r}`);if(!i)return;let{getPercentValue:o}=(0,tG.getRelativePoint)(t,i);return{x:o({dir:n,orientation:"horizontal"}),y:o({orientation:"vertical"})}})(n,t.point,o,i("dir"));if(!s)return;let l="horizontal"===(e.get("activeOrientation")||"horizontal")?s.x:s.y,u=a.getChannelPercentValue(o,l),c=a.withChannelValue(o,u);e.set("value",c)},setValue({context:e,event:t}){e.set("value",t.value)},setFormat({context:e,event:t}){e.set("format",t.format)},dispatchChangeEvent({scope:e,computed:t}){(0,tG.dispatchInputValueEvent)(rF(e),{value:t("valueAsString")})},syncInputElements({context:e,scope:t}){rH(t,e.get("value"))},invokeOnChangeEnd({context:e,prop:t,computed:r}){t("onValueChangeEnd")?.({value:e.get("value"),valueAsString:r("valueAsString")})},setChannelColorFromInput({context:e,event:t,scope:r,prop:n}){let i,{channel:o,isTextField:a,value:s}=t,l=e.get("value").getChannelValue("alpha");if("alpha"===o){let t=parseFloat(s);t=Number.isNaN(t)?l:t,i=e.get("value").withChannelValue("alpha",t)}else if(a)i=(0,tC.tryCatch)(()=>rD("hex"===o?function(e){return e.startsWith("#")?e:rz.test(e)?`#${e}`:e}(s):s).withChannelValue("alpha",l),()=>e.get("value"));else{let t=e.get("value").toFormat(e.get("format")),r=Number.isNaN(s)?t.getChannelValue(o):s;i=t.withChannelValue(o,r)}rH(r,e.get("value"),i),e.set("value",i),n("onValueChangeEnd")?.({value:i,valueAsString:i.toString(e.get("format"))})},incrementChannel({context:e,event:t}){let r=e.get("value").incrementChannel(t.channel,t.step);e.set("value",r)},decrementChannel({context:e,event:t}){let r=e.get("value").decrementChannel(t.channel,t.step);e.set("value",r)},incrementAreaXChannel({context:e,event:t,computed:r}){let{xChannel:n}=t.channel,i=r("areaValue").incrementChannel(n,t.step);e.set("value",i)},decrementAreaXChannel({context:e,event:t,computed:r}){let{xChannel:n}=t.channel,i=r("areaValue").decrementChannel(n,t.step);e.set("value",i)},incrementAreaYChannel({context:e,event:t,computed:r}){let{yChannel:n}=t.channel,i=r("areaValue").incrementChannel(n,t.step);e.set("value",i)},decrementAreaYChannel({context:e,event:t,computed:r}){let{yChannel:n}=t.channel,i=r("areaValue").decrementChannel(n,t.step);e.set("value",i)},setChannelToMax({context:e,event:t}){let r=e.get("value"),n=r.getChannelRange(t.channel),i=r.withChannelValue(t.channel,n.maxValue);e.set("value",i)},setChannelToMin({context:e,event:t}){let r=e.get("value"),n=r.getChannelRange(t.channel),i=r.withChannelValue(t.channel,n.minValue);e.set("value",i)},focusAreaThumb({scope:e}){(0,tG.raf)(()=>{e.getById(e.ids?.areaThumb??`color-picker:${e.id}:area-thumb`)?.focus({preventScroll:!0})})},focusChannelThumb({event:e,scope:t}){(0,tG.raf)(()=>{var r;(r=e.channel,t.getById(t.ids?.channelSliderThumb?.(r)??`color-picker:${t.id}:slider-thumb:${r}`))?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e("openAutoFocus")&&(0,tG.raf)(()=>{let r=(0,tG.getInitialFocus)({root:rV(t),getInitialEl:e("initialFocusEl")});r?.focus({preventScroll:!0})})},setReturnFocus({scope:e}){(0,tG.raf)(()=>{rj(e)?.focus({preventScroll:!0})})},syncFormatSelectElement({context:e,scope:t}){!function(e,t){let r=e.getById(e.ids?.formatSelect??`color-picker:${e.id}:format-select`);r&&(0,tG.raf)(()=>(0,tG.setElementValue)(r,t))}(t,e.get("format"))},invokeOnOpen({prop:e}){e("inline")||e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("inline")||e("onOpenChange")?.({open:!1})},toggleVisibility({prop:e,event:t,send:r}){r({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}});var rW=(0,tZ.createProps)()(["closeOnSelect","dir","disabled","format","defaultFormat","getRootNode","id","ids","initialFocusEl","inline","name","positioning","onFocusOutside","onFormatChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","onValueChangeEnd","defaultOpen","open","positioning","required","readOnly","value","defaultValue","invalid","openAutoFocus"]);(0,tC.createSplitProps)(rW);var rU=(0,tZ.createProps)()(["xChannel","yChannel"]);(0,tC.createSplitProps)(rU);var r$=(0,tZ.createProps)()(["channel","orientation"]);(0,tC.createSplitProps)(r$);var rq=(0,tZ.createProps)()(["value","disabled"]);(0,tC.createSplitProps)(rq);var rG=(0,tZ.createProps)()(["value","respectAlpha"]);(0,tC.createSplitProps)(rG);var rK=(0,tZ.createProps)()(["size"]);(0,tC.createSplitProps)(rK);let rY=rL.extendWith("view");var rX=e.i(43617),rX=rX,rQ=e.i(28421),rZ=(0,t_.createAnatomy)("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");rZ.build();var rJ=e=>e.getById(e.ids?.input??`editable:${e.id}:input`);(0,tX.createMachine)({props:({props:e})=>({activationMode:"focus",submitMode:"both",defaultValue:"",selectOnFocus:!0,...e,translations:{input:"editable input",edit:"edit",submit:"submit",cancel:"cancel",...e.translations}}),initialState:({prop:e})=>e("edit")||e("defaultEdit")?"edit":"preview",entry:["focusInputIfNeeded"],context:({bindable:e,prop:t})=>({value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange:e=>t("onValueChange")?.({value:e})})),previousValue:e(()=>({defaultValue:""}))}),watch({track:e,action:t,context:r,prop:n}){e([()=>r.get("value")],()=>{t(["syncInputValue"])}),e([()=>n("edit")],()=>{t(["toggleEditing"])})},computed:{submitOnEnter({prop:e}){let t=e("submitMode");return"both"===t||"enter"===t},submitOnBlur({prop:e}){let t=e("submitMode");return"both"===t||"blur"===t},isInteractive:({prop:e})=>!(e("disabled")||e("readOnly"))},on:{"VALUE.SET":{actions:["setValue"]}},states:{preview:{entry:["blurInput"],on:{"CONTROLLED.EDIT":{target:"edit",actions:["setPreviousValue","focusInput"]},EDIT:[{guard:"isEditControlled",actions:["invokeOnEdit"]},{target:"edit",actions:["setPreviousValue","focusInput","invokeOnEdit"]}]}},edit:{effects:["trackInteractOutside"],entry:["syncInputValue"],on:{"CONTROLLED.PREVIEW":[{guard:"isSubmitEvent",target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel"]}],CANCEL:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["revertValue","restoreFocus","invokeOnCancel","invokeOnPreview"]}],SUBMIT:[{guard:"isEditControlled",actions:["invokeOnPreview"]},{target:"preview",actions:["setPreviousValue","restoreFocus","invokeOnSubmit","invokeOnPreview"]}]}}},implementations:{guards:{isEditControlled:({prop:e})=>void 0!=e("edit"),isSubmitEvent:({event:e})=>e.previousEvent?.type==="SUBMIT"},effects:{trackInteractOutside:({send:e,scope:t,prop:r,computed:n})=>(0,rQ.trackInteractOutside)(rJ(t),{exclude:e=>[t.getById(t.ids?.cancelTrigger??`editable:${t.id}:cancel`),t.getById(t.ids?.submitTrigger??`editable:${t.id}:submit`)].some(t=>(0,tG.contains)(t,e)),onFocusOutside:r("onFocusOutside"),onPointerDownOutside:r("onPointerDownOutside"),onInteractOutside(t){if(r("onInteractOutside")?.(t),t.defaultPrevented)return;let{focusable:i}=t.detail;e({type:n("submitOnBlur")?"SUBMIT":"CANCEL",src:"interact-outside",focusable:i})}})},actions:{restoreFocus({event:e,scope:t,prop:r}){e.focusable||(0,tG.raf)(()=>{let e=r("finalFocusEl")?.()??t.getById(t.ids?.editTrigger??`editable:${t.id}:edit`);e?.focus({preventScroll:!0})})},clearValue({context:e}){e.set("value","")},focusInputIfNeeded({action:e,prop:t}){(t("edit")||t("defaultEdit"))&&e(["focusInput"])},focusInput({scope:e,prop:t}){(0,tG.raf)(()=>{let r=rJ(e);r&&(t("selectOnFocus")?r.select():r.focus({preventScroll:!0}))})},invokeOnCancel({prop:e,context:t}){let r=t.get("previousValue");e("onValueRevert")?.({value:r})},invokeOnSubmit({prop:e,context:t}){let r=t.get("value");e("onValueCommit")?.({value:r})},invokeOnEdit({prop:e}){e("onEditChange")?.({edit:!0})},invokeOnPreview({prop:e}){e("onEditChange")?.({edit:!1})},toggleEditing({prop:e,send:t,event:r}){t({type:e("edit")?"CONTROLLED.EDIT":"CONTROLLED.PREVIEW",previousEvent:r})},syncInputValue({context:e,scope:t}){let r=rJ(t);r&&(0,tG.setElementValue)(r,e.get("value"))},setValue({context:e,prop:t,event:r}){let n=t("maxLength"),i=null!=n?r.value.slice(0,n):r.value;e.set("value",i)},setPreviousValue({context:e}){e.set("previousValue",e.get("value"))},revertValue({context:e}){let t=e.get("previousValue");t&&e.set("value",t)},blurInput({scope:e}){rJ(e)?.blur()}}}});var r0=(0,tZ.createProps)()(["activationMode","autoResize","dir","disabled","finalFocusEl","form","getRootNode","id","ids","invalid","maxLength","name","onEditChange","onFocusOutside","onInteractOutside","onPointerDownOutside","onValueChange","onValueCommit","onValueRevert","placeholder","readOnly","required","selectOnFocus","edit","defaultEdit","submitMode","translations","defaultValue","value"]);(0,tC.createSplitProps)(r0);var r1=e.i(32363);let r2=(0,t_.createAnatomy)("fieldset").parts("root","errorText","helperText","legend");r2.build();var r5=e=>"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)||/^.*\.[\w]+$/.test(e),r3=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,r4=new Map("3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip".split("[").flatMap(e=>{let[t,r]=e.split("_");return t.split(",").map(e=>[e,r])}));function r6(e){let t=new Map;return function(r,n){let i=r+(n?Object.entries(n).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(t.has(i))return t.get(i);let o=new e(r,n);return t.set(i,o),o}}r6(Intl.Collator),r6(Intl.Collator),r6(Intl.NumberFormat),r6(Intl.ListFormat),r6(Intl.RelativeTimeFormat);var r8=(0,t_.createAnatomy)("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger");r8.build();var r7=e=>e.getById(e.ids?.hiddenInput??`file:${e.id}:input`);function r9(e,t,r=[],n=[]){let{prop:i,computed:o}=e,a=[],s=[],l={acceptedFiles:r,rejectedFiles:n};return t.forEach(e=>{var t;let r,[n,u]=(t=o("acceptAttr"),[r="application/x-moz-file"===e.type||function(e,t){if(e&&t){let r,n=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];if(0===n.length)return!0;let i=e.name||"",o=(e.type||(r=i.split(".").pop())&&r4.get(r)||"").toLowerCase(),a=o.replace(/\/.*$/,"");return n.some(e=>{let t=e.trim().toLowerCase();return"."===t.charAt(0)?i.toLowerCase().endsWith(t):t.endsWith("/*")?a===t.replace(/\/.*$/,""):o===t})}return!0}(e,t),r?null:"FILE_INVALID_TYPE"]),[c,d]=function(e,t,r){if(null!=e.size)if(null!=t&&null!=r){if(e.size>r)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(null!=t&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(null!=r&&e.size>r)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,i("minFileSize"),i("maxFileSize")),h=i("validate")?.(e,l),f=!h||0===h.length;if(n&&c&&f)a.push(e);else{let t=[u,d];f||t.push(...h??[]),s.push({file:e,errors:t.filter(Boolean)})}}),!function(e,t,r){let{prop:n,computed:i}=e;return(!!i("multiple")||!(t>1))&&(!i("multiple")&&t+r.length===2||!(t+r.length>n("maxFiles")))}(e,a.length,r)&&(a.forEach(e=>{s.push({file:e,errors:["TOO_MANY_FILES"]})}),a.splice(0)),{acceptedFiles:a,rejectedFiles:s}}(0,tX.createMachine)({props:({props:e})=>({minFileSize:0,maxFileSize:1/0,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:r})=>({acceptedFiles:t(()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(e,t)=>e.length===t?.length&&e.every((e,r)=>r3(e,t[r])),hash:e=>e.map(e=>`${e.name}-${e.size}`).join(","),onChange(t){let n=r();e("onFileAccept")?.({files:t}),e("onFileChange")?.({acceptedFiles:t,rejectedFiles:n.get("rejectedFiles")})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(e,t)=>e.length===t?.length&&e.every((e,r)=>r3(e.file,t[r].file)),onChange(t){let n=r();e("onFileReject")?.({files:t}),e("onFileChange")?.({acceptedFiles:n.get("acceptedFiles"),rejectedFiles:t})}})),transforming:t(()=>({defaultValue:!1}))}),computed:{acceptAttr:({prop:e})=>(function(e){if(null!=e)return"string"==typeof e?e:Array.isArray(e)?e.filter(r5).join(","):Object.entries(e).reduce((e,[t,r])=>[...e,t,...r],[]).filter(r5).join(",")})(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:r}){e([()=>t.hash("acceptedFiles")],()=>{r(["syncInputElement"])})},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop")||!e("allowDrop")||e("disabled"))return;let r=t.getDoc();return(0,tC.callAll)((0,tG.addDomEvent)(r,"dragover",e=>{e?.preventDefault()},!1),(0,tG.addDomEvent)(r,"drop",e=>{(0,tG.contains)(t.getById(t.ids?.root??`file:${t.id}`),(0,tG.getEventTarget)(e))||e.preventDefault()},!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{let r=r7(e);if(!r)return;var n=t.get("acceptedFiles");let i=(0,tG.getWindow)(r);try{if("DataTransfer"in i){let e=new i.DataTransfer;n.forEach(t=>{e.items.add(t)}),r.files=e.files}}catch{}let o=e.getWin();r.dispatchEvent(new o.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){(0,tG.raf)(()=>{r7(e)?.click()})},setFiles(e){let{computed:t,context:r,event:n}=e,{acceptedFiles:i,rejectedFiles:o}=r9(e,n.files);r.set("acceptedFiles",t("multiple")?i:i.length>0?[i[0]]:[]),r.set("rejectedFiles",o)},setEventFiles(e){let{computed:t,context:r,event:n,prop:i}=e,o=r.get("acceptedFiles"),a=r.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=r9(e,n.files,o,a),u=e=>{if(t("multiple")){r.set("acceptedFiles",t=>[...t,...e]),r.set("rejectedFiles",l);return}if(e.length){r.set("acceptedFiles",[e[0]]),r.set("rejectedFiles",l);return}l.length&&(r.set("acceptedFiles",r.get("acceptedFiles")),r.set("rejectedFiles",l))},c=i("transformFiles");c?(r.set("transforming",!0),c(s).then(u).catch(e=>{(0,tC.warn)(`[zag-js/file-upload] error transforming files
|
|
5
|
+
${e}`)}).finally(()=>{r.set("transforming",!1)})):u(s)},removeFile({context:e,event:t}){if("rejected"===t.itemType){let r=e.get("rejectedFiles").filter(e=>!r3(e.file,t.file));e.set("rejectedFiles",r)}else{let r=e.get("acceptedFiles").filter(e=>!r3(e,t.file));e.set("acceptedFiles",r)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}});var ne=(0,tZ.createProps)()(["accept","acceptedFiles","allowDrop","capture","defaultAcceptedFiles","dir","directory","disabled","getRootNode","id","ids","invalid","locale","maxFiles","maxFileSize","minFileSize","name","onFileAccept","onFileChange","onFileReject","preventDocumentDrop","required","transformFiles","translations","validate"]);(0,tC.createSplitProps)(ne);var nt=(0,tZ.createProps)()(["file","type"]);(0,tC.createSplitProps)(nt);var nr=e.i(31099),nn=(0,t_.createAnatomy)("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText");nn.build();var ni=e=>new tO(e);ni.empty=()=>new tO({items:[]});var no=e=>e.getById(e.ids?.content??`select:${e.id}:content`),na=(e,t)=>e.getById(e.ids?.item?.(t)??`select:${e.id}:option:${t}`),{guards:ns,createMachine:nl}=(0,tX.setup)(),{or:nu}=ns;function nc(e,t,r){for(let n of((e,t)=>{let r=new Set(e);for(let e of t)r.delete(e);return r})(t,e))r?.({value:n})}nl({props:({props:e})=>({loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:ni.empty(),orientation:"vertical",selectionMode:"single",...e}),context:({prop:e,bindable:t})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:tC.isEqual,onChange(t){let r=e("collection").findMany(t);return e("onValueChange")?.({value:t,items:r})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(t){e("onHighlightChange")?.({highlightedValue:t,highlightedItem:e("collection").find(t),highlightedIndex:e("collection").indexOf(t)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{let t=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(t)}}),focused:t(()=>({sync:!0,defaultValue:!1}))}),refs:()=>({typeahead:{...tG.getByTypeahead.defaultOptions},focusVisible:!1}),computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>""!==e.get("typeahead").keysSoFar,isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{let r=new tM(e.get("value"));return r.selectionMode=t("selectionMode"),r.deselectable=!!t("deselectable"),r},multiple:({prop:e})=>"multiple"===e("selectionMode")||"extended"===e("selectionMode"),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState:()=>"idle",watch({context:e,prop:t,track:r,action:n}){r([()=>e.get("value").toString()],()=>{n(["syncSelectedItems"])}),r([()=>e.get("highlightedValue")],()=>{n(["syncHighlightedItem"])}),r([()=>t("collection").toString()],()=>{n(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused"]},"CONTENT.FOCUS":[{guard:nu("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>null!=e.get("highlightedValue")},effects:{trackFocusVisible:({scope:e,refs:t})=>(0,nr.trackFocusVisible)({root:e.getRootNode?.(),onChange(e){t.set("focusVisible",e.isFocusVisible)}}),scrollToHighlightedItem({context:e,prop:t,scope:r}){let n=n=>{let i=e.get("highlightedValue");if(null==i||"keyboard"!==(0,nr.getInteractionModality)())return;let o=no(r),a=t("scrollToIndexFn");if(a){let e=t("collection").indexOf(i);a?.({index:e,immediate:n,getElement:()=>na(r,i)});return}let s=na(r,i);(0,tG.scrollIntoView)(s,{rootEl:o,block:"nearest"})};return(0,tG.raf)(()=>n(!0)),(0,tG.observeAttributes)(()=>no(r),{defer:!0,attributes:["data-activedescendant"],callback(){n(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:r,computed:n}){let i=r.value??e.get("highlightedValue"),o=t("collection");if(null==i||!o.has(i))return;let a=n("selection");if(r.shiftKey&&n("multiple")&&r.anchorValue){let n=a.extendSelection(o,r.anchorValue,i);nc(a,n,t("onSelect")),e.set("value",Array.from(n))}else{let n=a.select(o,i,r.metaKey);nc(a,n,t("onSelect")),e.set("value",Array.from(n))}},selectWithKeyboard({context:e,prop:t,event:r,computed:n}){let i=n("selection"),o=t("collection");if(r.shiftKey&&n("multiple")&&r.anchorValue){let n=i.extendSelection(o,r.anchorValue,r.value);nc(i,n,t("onSelect")),e.set("value",Array.from(n));return}if(t("selectOnHighlight")){let n=i.replaceSelection(o,r.value);nc(i,n,t("onSelect")),e.set("value",Array.from(n))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:r,refs:n}){let i=t("collection").search(r.key,{state:n.get("typeahead"),currentValue:e.get("highlightedValue")});null!=i&&e.set("highlightedValue",i)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:r,computed:n}){let i=t("collection"),o=n("selection"),a=o.select(i,r.value);nc(o,a,t("onSelect")),e.set("value",Array.from(a))},clearItem({context:e,event:t,computed:r}){let n=r("selection").deselect(t.value);e.set("value",Array.from(n))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){let r=t("collection"),n=e.get("selectedItems"),i=e.get("value").map(e=>n.find(t=>r.getItemValue(t)===e)||r.find(e));e.set("selectedItems",i)},syncHighlightedItem({context:e,prop:t}){let r=t("collection"),n=e.get("highlightedValue"),i=n?r.find(n):null;e.set("highlightedItem",i)},syncHighlightedValue({context:e,prop:t}){let r=t("collection"),n=e.get("highlightedValue");null==n||r.has(n)||e.set("highlightedValue",null)},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){let r=t("collection").firstValue;null!=r&&e.set("highlightedValue",r)},clearFocused({context:e}){e.set("focused",!1)}}}});var nd=(0,tZ.createProps)()(["collection","defaultHighlightedValue","defaultValue","dir","disabled","deselectable","disallowSelectAll","getRootNode","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]);(0,tC.createSplitProps)(nd);var nh=(0,tZ.createProps)()(["item","highlightOnHover"]);(0,tC.createSplitProps)(nh);var nf=(0,tZ.createProps)()(["id"]);(0,tC.createSplitProps)(nf);var np=(0,tZ.createProps)()(["htmlFor"]);(0,tC.createSplitProps)(np);let ng=nn.extendWith("empty");var nm=e.i(93888),nm=nm,nv=e.i(62439),nv=nv,nb=(0,t_.createAnatomy)("radio-group").parts("root","label","item","itemText","itemControl","indicator"),ny=nb.build(),nx=e=>e.ids?.root??`radio-group:${e.id}`,nw=e=>e.ids?.label??`radio-group:${e.id}:label`,n_=(e,t)=>e.ids?.item?.(t)??`radio-group:${e.id}:radio:${t}`,nC=(e,t)=>e.ids?.itemHiddenInput?.(t)??`radio-group:${e.id}:radio:input:${t}`,nk=e=>e.ids?.indicator??`radio-group:${e.id}:indicator`,nS=e=>e.getById(nx(e)),nE=e=>{let t=CSS.escape(nx(e)),r=`input[type=radio][data-ownedby='${t}']:not([disabled])`;return(0,tG.queryAll)(nS(e),r)};function nO(e,t){let{context:r,send:n,computed:i,prop:o,scope:a,refs:s}=e,l=i("isDisabled"),u=o("readOnly");function c(e){return{value:e.value,invalid:!!e.invalid,disabled:!!e.disabled||l,checked:r.get("value")===e.value,focused:r.get("focusedValue")===e.value,focusVisible:s.get("focusVisibleValue")===e.value,hovered:r.get("hoveredValue")===e.value,active:r.get("activeValue")===e.value}}function d(e){let t=c(e);return{"data-focus":(0,tG.dataAttr)(t.focused),"data-focus-visible":(0,tG.dataAttr)(t.focusVisible),"data-disabled":(0,tG.dataAttr)(t.disabled),"data-readonly":(0,tG.dataAttr)(u),"data-state":t.checked?"checked":"unchecked","data-hover":(0,tG.dataAttr)(t.hovered),"data-invalid":(0,tG.dataAttr)(t.invalid),"data-orientation":o("orientation"),"data-ssr":(0,tG.dataAttr)(r.get("ssr"))}}let h=()=>{let e=nS(a)?.querySelector("input:not(:disabled):checked")??nS(a)?.querySelector("input:not(:disabled)");e?.focus()};return{focus:h,value:r.get("value"),setValue(e){n({type:"SET_VALUE",value:e,isTrusted:!1})},clearValue(){n({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps:()=>t.element({...ny.root.attrs,role:"radiogroup",id:nx(a),"aria-labelledby":nw(a),"data-orientation":o("orientation"),"data-disabled":(0,tG.dataAttr)(l),"aria-orientation":o("orientation"),dir:o("dir"),style:{position:"relative"}}),getLabelProps:()=>t.element({...ny.label.attrs,dir:o("dir"),"data-orientation":o("orientation"),"data-disabled":(0,tG.dataAttr)(l),id:nw(a),onClick:h}),getItemState:c,getItemProps(e){let r=c(e);return t.label({...ny.item.attrs,dir:o("dir"),id:n_(a,e.value),htmlFor:nC(a,e.value),...d(e),onPointerMove(){r.disabled||r.hovered||n({type:"SET_HOVERED",value:e.value,hovered:!0})},onPointerLeave(){r.disabled||n({type:"SET_HOVERED",value:null})},onPointerDown(t){r.disabled||(0,tG.isLeftClick)(t)&&(r.focused&&"mouse"===t.pointerType&&t.preventDefault(),n({type:"SET_ACTIVE",value:e.value,active:!0}))},onPointerUp(){r.disabled||n({type:"SET_ACTIVE",value:null})},onClick(){let t;!r.disabled&&(0,tG.isSafari)()&&(t=e.value,a.getById(nC(a,t)))?.focus()}})},getItemTextProps:e=>{let r;return t.element({...ny.itemText.attrs,dir:o("dir"),id:(r=e.value,a.ids?.itemLabel?.(r)??`radio-group:${a.id}:radio:label:${r}`),...d(e)})},getItemControlProps(e){let r,n=c(e);return t.element({...ny.itemControl.attrs,dir:o("dir"),id:(r=e.value,a.ids?.itemControl?.(r)??`radio-group:${a.id}:radio:control:${r}`),"data-active":(0,tG.dataAttr)(n.active),"aria-hidden":!0,...d(e)})},getItemHiddenInputProps(e){let r=c(e);return t.input({"data-ownedby":nx(a),id:nC(a,e.value),type:"radio",name:o("name")||o("id"),form:o("form"),value:e.value,onClick(t){u?t.preventDefault():t.currentTarget.checked&&n({type:"SET_VALUE",value:e.value,isTrusted:!0})},onBlur(){n({type:"SET_FOCUSED",value:null,focused:!1})},onFocus(){let t=(0,nr.isFocusVisible)();n({type:"SET_FOCUSED",value:e.value,focused:!0,focusVisible:t})},onKeyDown(t){t.defaultPrevented||" "===t.key&&n({type:"SET_ACTIVE",value:e.value,active:!0})},onKeyUp(e){e.defaultPrevented||" "===e.key&&n({type:"SET_ACTIVE",value:null})},disabled:r.disabled||u,defaultChecked:r.checked,style:tG.visuallyHiddenStyle})},getIndicatorProps(){let e=r.get("indicatorRect");return t.element({id:nk(a),...ny.indicator.attrs,dir:o("dir"),hidden:null==r.get("value"),"data-disabled":(0,tG.dataAttr)(l),"data-orientation":o("orientation"),style:{"--transition-property":"left, top, width, height","--left":e?.left,"--top":e?.top,"--width":e?.width,"--height":e?.height,position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:r.get("canIndicatorTransition")?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",["horizontal"===o("orientation")?"left":"top"]:"horizontal"===o("orientation")?"var(--left)":"var(--top)"}})}}}var{not:nI}=(0,tX.createGuards)(),nP=(0,tX.createMachine)({props:({props:e})=>({orientation:"vertical",...e}),initialState:()=>"idle",context:({prop:e,bindable:t})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(t){e("onValueChange")?.({value:t})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:{}})),canIndicatorTransition:t(()=>({defaultValue:!1})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}),refs:()=>({indicatorCleanup:null,focusVisibleValue:null}),computed:{isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:e,action:t,context:r}){e([()=>r.get("value")],()=>{t(["setIndicatorTransition","syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:nI("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState:({context:e,scope:t})=>(0,tG.trackFormControl)(nS(t),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){e.set("value",e.initial("value"))}}),trackFocusVisible:({scope:e})=>(0,nr.trackFocusVisible)({root:e.getRootNode?.()})},actions:{setValue({context:e,event:t}){e.set("value",t.value)},setHovered({context:e,event:t}){e.set("hoveredValue",t.value)},setActive({context:e,event:t}){e.set("activeValue",t.value)},setFocused({context:e,event:t,refs:r}){e.set("focusedValue",t.value),r.set("focusVisibleValue",t.focusVisible?t.value:null)},syncInputElements({context:e,scope:t}){nE(t).forEach(t=>{t.checked=t.value===e.get("value")})},setIndicatorTransition({context:e}){e.set("canIndicatorTransition",(0,tC.isString)(e.get("value")))},cleanupObserver({refs:e}){e.get("indicatorCleanup")?.()},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,scope:t,refs:r}){if(r.get("indicatorCleanup")?.(),!t.getById(nk(t)))return;let n=e.get("value"),i=((e,t)=>{if(t)return e.getById(n_(e,t))})(t,n);if(null==n||!i){e.set("canIndicatorTransition",!1),e.set("indicatorRect",{});return}let o=(0,tG.trackElementRect)([i],{measure:e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),onEntry({rects:t}){let r;e.set("indicatorRect",(r=t[0],{width:`${r.width}px`,height:`${r.height}px`,left:`${r.left}px`,top:`${r.top}px`}))}});r.set("indicatorCleanup",o)},dispatchChangeEvent({context:e,scope:t}){nE(t).forEach(t=>{let r=t.value===e.get("value");r!==t.checked&&(0,tG.dispatchInputCheckedEvent)(t,{checked:r})})}}}}),nT=(0,tZ.createProps)()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);(0,tC.createSplitProps)(nT);var nR=(0,tZ.createProps)()(["value","disabled","invalid"]);(0,tC.createSplitProps)(nR),e.s(["anatomy",()=>nb,"connect",()=>nO,"machine",()=>nP],96019);var nA=(0,t_.createAnatomy)("rating-group").parts("root","label","item","control");nA.build();var nM=e=>e.getById(e.ids?.control??`rating:${e.id}:control`),nN=e=>e.getById(e.ids?.hiddenInput??`rating:${e.id}:input`);(0,tX.createMachine)({props:({props:e})=>({name:"rating",count:5,dir:"ltr",defaultValue:-1,...e,translations:{ratingValueText:e=>`${e} stars`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(t){e("onValueChange")?.({value:t})}})),hoveredValue:t(()=>({defaultValue:-1,onChange(t){e("onHoverChange")?.({hoveredValue:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}),watch({track:e,action:t,prop:r,context:n}){e([()=>r("allowHalf")],()=>{t(["roundValueIfNeeded"])}),e([()=>n.get("value")],()=>{t(["dispatchChangeEvent"])})},computed:{isDisabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled"),isInteractive:({computed:e,prop:t})=>!(e("isDisabled")||t("readOnly")),isHovering:({context:e})=>e.get("hoveredValue")>-1},effects:["trackFormControlState"],on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]}},states:{idle:{entry:["clearHoveredValue"],on:{GROUP_POINTER_OVER:{target:"hover"},FOCUS:{target:"focus"},CLICK:{actions:["setValue","focusActiveRadio"]}}},focus:{on:{POINTER_OVER:{actions:["setHoveredValue"]},GROUP_POINTER_LEAVE:{actions:["clearHoveredValue"]},BLUR:{target:"idle"},SPACE:{guard:"isValueEmpty",actions:["setValue"]},CLICK:{actions:["setValue","focusActiveRadio"]},ARROW_LEFT:{actions:["setPrevValue","focusActiveRadio"]},ARROW_RIGHT:{actions:["setNextValue","focusActiveRadio"]},HOME:{actions:["setValueToMin","focusActiveRadio"]},END:{actions:["setValueToMax","focusActiveRadio"]}}},hover:{on:{POINTER_OVER:{actions:["setHoveredValue"]},GROUP_POINTER_LEAVE:[{guard:"isRadioFocused",target:"focus",actions:["clearHoveredValue"]},{target:"idle",actions:["clearHoveredValue"]}],CLICK:{actions:["setValue","focusActiveRadio"]}}}},implementations:{guards:{isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),isHoveredValueEmpty:({context:e})=>-1===e.get("hoveredValue"),isValueEmpty:({context:e})=>0>=e.get("value"),isRadioFocused:({scope:e})=>!!nM(e)?.contains(e.getActiveElement())},effects:{trackFormControlState:({context:e,scope:t})=>(0,tG.trackFormControl)(nN(t),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){e.set("value",e.initial("value"))}})},actions:{clearHoveredValue({context:e}){e.set("hoveredValue",-1)},focusActiveRadio({scope:e,context:t}){(0,tG.raf)(()=>{var r;let n;return(r=t.get("value"),n=`[role=radio][aria-posinset='${Math.ceil(r)}']`,(0,tG.query)(nM(e),n))?.focus()})},setPrevValue({context:e,prop:t}){let r=t("allowHalf")?.5:1;e.set("value",Math.max(0,e.get("value")-r))},setNextValue({context:e,prop:t}){let r=t("allowHalf")?.5:1,n=-1===e.get("value")?0:e.get("value");e.set("value",Math.min(t("count"),n+r))},setValueToMin({context:e}){e.set("value",1)},setValueToMax({context:e,prop:t}){e.set("value",t("count"))},setValue({context:e,event:t}){let r=e.get("hoveredValue"),n=-1===r?t.value:r;e.set("value",n)},clearValue({context:e}){e.set("value",-1)},setHoveredValue({context:e,prop:t,event:r}){let n=t("allowHalf")&&r.isMidway;e.set("hoveredValue",r.index-.5*!!n)},roundValueIfNeeded({context:e,prop:t}){t("allowHalf")||e.set("value",Math.round(e.get("value")))},dispatchChangeEvent({context:e,scope:t}){var r;let n;r=e.get("value"),(n=nN(t))&&(0,tG.dispatchInputValueEvent)(n,{value:r})}}}});var nD=(0,tZ.createProps)()(["allowHalf","autoFocus","count","dir","disabled","form","getRootNode","id","ids","name","onHoverChange","onValueChange","required","readOnly","translations","value","defaultValue"]);(0,tC.createSplitProps)(nD);var nL=(0,tZ.createProps)()(["index"]);(0,tC.createSplitProps)(nL);var nV=(0,t_.createAnatomy)("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText");nV.build();var nF=e=>new tO(e);nF.empty=()=>new tO({items:[]});var nj=e=>e.getById(e.ids?.hiddenSelect??`select:${e.id}:select`),nz=e=>e.getById(e.ids?.content??`select:${e.id}:content`),nB=e=>e.getById(e.ids?.trigger??`select:${e.id}:trigger`),nH=e=>e.getById(e.ids?.positioner??`select:${e.id}:positioner`),nW=(e,t)=>null==t?null:e.getById(e.ids?.item?.(t)??`select:${e.id}:option:${t}`),{and:nU,not:n$,or:nq}=(0,tX.createGuards)();function nG(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return null==t||!!t}(0,tX.createMachine)({props:({props:e})=>({loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??nF.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}),context:({prop:e,bindable:t})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:tC.isEqual,onChange(t){let r=e("collection").findMany(t);return e("onValueChange")?.({value:t,items:r})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){e("onHighlightChange")?.({highlightedValue:t,highlightedItem:e("collection").find(t),highlightedIndex:e("collection").indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{let t=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(t)}})}),refs:()=>({typeahead:{...tG.getByTypeahead.defaultOptions}}),computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>""!==e.get("typeahead").keysSoFar,isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"idle",entry:["syncSelectElement"],watch({context:e,prop:t,track:r,action:n}){r([()=>e.get("value").toString()],()=>{n(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),r([()=>t("open")],()=>{n(["toggleVisibility"])}),r([()=>e.get("highlightedValue")],()=>{n(["syncHighlightedItem"])}),r([()=>t("collection").toString()],()=>{n(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:nq("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:nU(n$("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:n$("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:nU(n$("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:n$("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:n$("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:n$("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:n$("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:nU("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:nU("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:nU("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>nG(e),isOpenControlled:({prop:e})=>void 0!==e("open"),isTriggerClickEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.CLICK",isTriggerEnterEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ENTER",isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_UP",isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_DOWN"},effects:{trackFormControlState:({context:e,scope:t})=>(0,tG.trackFormControl)(nj(t),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){let t=e.initial("value");e.set("value",t)}}),trackDismissableElement({scope:e,send:t,prop:r}){let n=!0;return(0,tQ.trackDismissableElement)(()=>nz(e),{type:"listbox",defer:!0,exclude:[nB(e),e.getById(e.ids?.clearTrigger??`select:${e.id}:clear-trigger`)],onFocusOutside:r("onFocusOutside"),onPointerDownOutside:r("onPointerDownOutside"),onInteractOutside(e){r("onInteractOutside")?.(e),n=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:n})}})},computePlacement({context:e,prop:t,scope:r}){let n=t("positioning");return e.set("currentPlacement",n.placement),(0,tK.getPlacement)(()=>nB(r),()=>nH(r),{defer:!0,...n,onComplete(t){e.set("currentPlacement",t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:r,event:n}){let i=i=>{let o=e.get("highlightedValue");if(null==o||n.current().type.includes("POINTER"))return;let a=nz(r),s=t("scrollToIndexFn");if(s){let e=t("collection").indexOf(o);s?.({index:e,immediate:i,getElement:()=>nW(r,o)});return}let l=nW(r,o);(0,tG.scrollIntoView)(l,{rootEl:a,block:"nearest"})};return(0,tG.raf)(()=>i(!0)),(0,tG.observeAttributes)(()=>nz(r),{defer:!0,attributes:["data-activedescendant"],callback(){i(!1)}})}},actions:{reposition({context:e,prop:t,scope:r,event:n}){(0,tK.getPlacement)(nB(r),()=>nH(r),{...t("positioning"),...n.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},toggleVisibility({send:e,prop:t,event:r}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})},highlightPreviousItem({context:e,prop:t}){let r=e.get("highlightedValue");if(null==r)return;let n=t("collection").getPreviousValue(r,1,t("loopFocus"));null!=n&&e.set("highlightedValue",n)},highlightNextItem({context:e,prop:t}){let r=e.get("highlightedValue");if(null==r)return;let n=t("collection").getNextValue(r,1,t("loopFocus"));null!=n&&e.set("highlightedValue",n)},highlightFirstItem({context:e,prop:t}){let r=t("collection").firstValue;e.set("highlightedValue",r)},highlightLastItem({context:e,prop:t}){let r=t("collection").lastValue;e.set("highlightedValue",r)},setInitialFocus({scope:e}){(0,tG.raf)(()=>{let t=(0,tG.getInitialFocus)({root:nz(e)});t?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){nG(e)&&(0,tG.raf)(()=>{let e=nB(t);e?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:r}){let n=r.value??e.get("highlightedValue");null!=n&&t("collection").has(n)&&(t("onSelect")?.({value:n}),n=t("deselectable")&&!t("multiple")&&e.get("value").includes(n)?null:n,e.set("value",e=>null==n?[]:t("multiple")?(0,tC.addOrRemove)(e,n):[n]))},highlightComputedFirstItem({context:e,prop:t,computed:r}){let n=t("collection"),i=r("hasSelectedItems")?n.sort(e.get("value"))[0]:n.firstValue;e.set("highlightedValue",i)},highlightComputedLastItem({context:e,prop:t,computed:r}){let n=t("collection"),i=r("hasSelectedItems")?n.sort(e.get("value"))[0]:n.lastValue;e.set("highlightedValue",i)},highlightFirstSelectedItem({context:e,prop:t,computed:r}){if(!r("hasSelectedItems"))return;let n=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",n)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:r,refs:n}){let i=t("collection").search(r.key,{state:n.get("typeahead"),currentValue:e.get("highlightedValue")});null!=i&&e.set("highlightedValue",i)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:r}){t("onSelect")?.({value:r.value});let n=t("deselectable")&&!t("multiple")&&e.get("value").includes(r.value)?null:r.value;e.set("value",e=>null==n?[]:t("multiple")?(0,tC.addOrRemove)(e,n):[n])},clearItem({context:e,event:t}){e.set("value",e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){let[r]=e.get("value"),n=t("collection").getPreviousValue(r);n&&e.set("value",[n])},selectNextItem({context:e,prop:t}){let[r]=e.get("value"),n=t("collection").getNextValue(r);n&&e.set("value",[n])},selectFirstItem({context:e,prop:t}){let r=t("collection").firstValue;r&&e.set("value",[r])},selectLastItem({context:e,prop:t}){let r=t("collection").lastValue;r&&e.set("value",[r])},selectMatchingItem({context:e,prop:t,event:r,refs:n}){let i=t("collection").search(r.key,{state:n.get("typeahead"),currentValue:e.get("value")[0]});null!=i&&e.set("value",[i])},scrollContentToTop({prop:e,scope:t}){if(e("scrollToIndexFn")){let r=e("collection").firstValue;e("scrollToIndexFn")?.({index:0,immediate:!0,getElement:()=>nW(t,r)})}else nz(t)?.scrollTo(0,0)},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},syncSelectElement({context:e,prop:t,scope:r}){let n=nj(r);if(n){if(0===e.get("value").length&&!t("multiple")){n.selectedIndex=-1;return}for(let t of n.options)t.selected=e.get("value").includes(t.value)}},syncCollection({context:e,prop:t}){let r=t("collection"),n=r.find(e.get("highlightedValue"));n&&e.set("highlightedItem",n);let i=r.findMany(e.get("value"));e.set("selectedItems",i)},syncSelectedItems({context:e,prop:t}){let r=t("collection"),n=e.get("selectedItems"),i=e.get("value").map(e=>n.find(t=>r.getItemValue(t)===e)||r.find(e));e.set("selectedItems",i)},syncHighlightedItem({context:e,prop:t}){let r=t("collection"),n=e.get("highlightedValue"),i=n?r.find(n):null;e.set("highlightedItem",i)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=nj(e);if(!t)return;let r=new(e.getWin()).Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(r)})}}}});var nK=(0,tZ.createProps)()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]);(0,tC.createSplitProps)(nK);var nY=(0,tZ.createProps)()(["item","persistFocus"]);(0,tC.createSplitProps)(nY);var nX=(0,tZ.createProps)()(["id"]);(0,tC.createSplitProps)(nX);var nQ=(0,tZ.createProps)()(["htmlFor"]);(0,tC.createSplitProps)(nQ);var nZ=(0,t_.createAnatomy)("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator");nZ.build();var nJ=(e,t)=>e.getById(e.ids?.hiddenInput?.(t)??`slider:${e.id}:input:${t}`),n0=e=>e.getById(e.ids?.control??`slider:${e.id}:control`),n1=(e,t)=>{let{prop:r,scope:n,refs:i}=e,o=n0(n);if(!o)return;let a=i.get("thumbDragOffset"),s={x:t.x-(a?.x??0),y:t.y-(a?.y??0)},l=(0,tG.getRelativePoint)(s,o).getPercentValue({orientation:r("orientation"),dir:r("dir"),inverted:{y:!0}});return(0,tC.getPercentValue)(l,r("min"),r("max"),r("step"))};function n2(e,t){let{context:r,prop:n}=e,i=n("step")*n("minStepsBetweenThumbs");return(0,tC.getValueRanges)(r.get("value"),n("min"),n("max"),i)[t]}function n5(e,t,r){let{prop:n}=e,i=n2(e,r),o=(0,tC.snapValueToStep)(t,n("min"),n("max"),n("step"));return(0,tC.clampValue)(o,i.min,i.max)}function n3(e,t){let{context:r,prop:n}=e,i=r.get("value"),o=n("max");if(i[t]===o){let e=t;for(;e>0&&i[e-1]===o;)e-=1;return e}return t}var n4=(e,t,r,n,i)=>(0,tC.getValueRanges)(e,t,r,i*n).map(e=>{let i=(0,tC.snapValueToStep)(e.value,e.min,e.max,n),o=(0,tC.clampValue)(i,e.min,e.max);if(!(0,tC.isValueWithinRange)(o,t,r))throw Error("[zag-js/slider] The configured `min`, `max`, `step` or `minStepsBetweenThumbs` values are invalid");return o});(0,tX.createMachine)({props({props:e}){let t=e.min??0,r=e.max??100,n=e.step??1,i=e.defaultValue??[t],o=e.minStepsBetweenThumbs??0;return{dir:"ltr",thumbAlignment:"contain",origin:"start",orientation:"horizontal",minStepsBetweenThumbs:o,...e,defaultValue:n4(i,t,r,n,o),value:e.value?n4(e.value,t,r,n,o):void 0,max:r,step:n,min:t}},initialState:()=>"idle",context:({prop:e,bindable:t,getContext:r})=>({thumbSize:t(()=>({defaultValue:e("thumbSize")||null})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:tC.isEqual,hash:e=>e.join(","),onChange(t){e("onValueChange")?.({value:t})}})),focusedIndex:t(()=>({defaultValue:-1,onChange(t){let n=r();e("onFocusChange")?.({focusedIndex:t,value:n.get("value")})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}),refs:()=>({thumbDragOffset:null}),computed:{isHorizontal:({prop:e})=>"horizontal"===e("orientation"),isVertical:({prop:e})=>"vertical"===e("orientation"),isRtl:({prop:e})=>"horizontal"===e("orientation")&&"rtl"===e("dir"),isDisabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled"),isInteractive:({prop:e,computed:t})=>!(e("readOnly")||t("isDisabled")),hasMeasuredThumbSize:({context:e})=>null!=e.get("thumbSize"),valuePercent:(0,tX.memo)(({context:e,prop:t})=>[e.get("value"),t("min"),t("max")],([e,t,r])=>e.map(e=>100*(0,tC.getValuePercent)(e,t,r)))},watch({track:e,action:t,context:r,computed:n,send:i}){e([()=>r.hash("value")],()=>{t(["syncInputElements","dispatchChangeEvent"])}),e([()=>n("isDisabled")],()=>{n("isDisabled")&&i({type:"POINTER_CANCEL"})})},effects:["trackFormControlState","trackThumbSize"],on:{SET_VALUE:[{guard:"hasIndex",actions:["setValueAtIndex","invokeOnChangeEnd"]},{actions:["setValue","invokeOnChangeEnd"]}],INCREMENT:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},DECREMENT:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]}},states:{idle:{on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},FOCUS:{target:"focus",actions:["setFocusedIndex"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","setThumbDragOffset","focusActiveThumb"]}}},focus:{entry:["focusActiveThumb"],on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","setThumbDragOffset","focusActiveThumb"]},ARROW_DEC:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]},ARROW_INC:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},HOME:{actions:["setFocusedThumbToMin","invokeOnChangeEnd"]},END:{actions:["setFocusedThumbToMax","invokeOnChangeEnd"]},BLUR:{target:"idle",actions:["clearFocusedIndex"]}}},dragging:{entry:["focusActiveThumb"],effects:["trackPointerMove"],on:{POINTER_UP:{target:"focus",actions:["invokeOnChangeEnd","clearThumbDragOffset"]},POINTER_MOVE:{actions:["setPointerValue"]},POINTER_CANCEL:{target:"idle",actions:["clearFocusedIndex","clearThumbDragOffset"]}}}},implementations:{guards:{hasIndex:({event:e})=>null!=e.index},effects:{trackFormControlState:({context:e,scope:t})=>(0,tG.trackFormControl)(t.getById(t.ids?.root??`slider:${t.id}`),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){e.set("value",e.initial("value"))}}),trackPointerMove:({scope:e,send:t})=>(0,tG.trackPointerMove)(e.getDoc(),{onPointerMove(e){t({type:"POINTER_MOVE",point:e.point})},onPointerUp(){t({type:"POINTER_UP"})}}),trackThumbSize({context:e,scope:t,prop:r}){if(!("contain"!==r("thumbAlignment")||r("thumbSize")))return(0,tG.trackElementRect)((0,tG.queryAll)(n0(t),"[role=slider]"),{box:"border-box",measure:e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),onEntry({rects:t}){let r;if(0===t.length)return;let n=(0,tC.pick)(t[0],["width","height"]);r=e.get("thumbSize"),(r?.width!==n?.width||r?.height!==n?.height)&&e.set("thumbSize",n)}})}},actions:{dispatchChangeEvent({context:e,scope:t}){e.get("value").forEach((e,r)=>{let n=nJ(t,r);n&&(0,tG.dispatchInputValueEvent)(n,{value:e})})},syncInputElements({context:e,scope:t}){e.get("value").forEach((e,r)=>{let n=nJ(t,r);(0,tG.setElementValue)(n,e.toString())})},invokeOnChangeEnd({prop:e,context:t}){queueMicrotask(()=>{e("onValueChangeEnd")?.({value:t.get("value")})})},setClosestThumbIndex(e){let{context:t,event:r}=e,n=n1(e,r.point);if(null==n)return;let i=function(e,t){let{context:r}=e,n=r.get("value"),i=0,o=Math.abs(n[0]-t);for(let e=1;e<n.length;e++){let r=Math.abs(n[e]-t);r<=o&&(i=e,o=r)}return n3(e,i)}(e,n);t.set("focusedIndex",i)},setFocusedIndex(e){let{context:t,event:r}=e,n=n3(e,r.index);t.set("focusedIndex",n)},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setThumbDragOffset(e){let{refs:t,event:r}=e;t.set("thumbDragOffset",r.offset??null)},clearThumbDragOffset({refs:e}){e.set("thumbDragOffset",null)},setPointerValue(e){queueMicrotask(()=>{let{context:t,event:r}=e,n=n1(e,r.point);if(null==n)return;let i=t.get("focusedIndex"),o=n5(e,n,i);t.set("value",e=>(0,tC.setValueAtIndex)(e,i,o))})},focusActiveThumb({scope:e,context:t}){(0,tG.raf)(()=>{var r;let n=(r=t.get("focusedIndex"),e.getById(e.ids?.thumb?.(r)??`slider:${e.id}:thumb:${r}`));n?.focus({preventScroll:!0})})},decrementThumbAtIndex(e){let{context:t,event:r}=e,n=function(e,t,r){let{context:n,prop:i}=e,o=t??n.get("focusedIndex"),a=n2(e,o),s=(0,tC.getPreviousStepValue)(o,{...a,step:r??i("step"),values:n.get("value")});return s[o]=(0,tC.clampValue)(s[o],a.min,a.max),s}(e,r.index,r.step);t.set("value",n)},incrementThumbAtIndex(e){let{context:t,event:r}=e,n=function(e,t,r){let{context:n,prop:i}=e,o=t??n.get("focusedIndex"),a=n2(e,o),s=(0,tC.getNextStepValue)(o,{...a,step:r??i("step"),values:n.get("value")});return s[o]=(0,tC.clampValue)(s[o],a.min,a.max),s}(e,r.index,r.step);t.set("value",n)},setFocusedThumbToMin(e){let{context:t}=e,r=t.get("focusedIndex"),{min:n}=n2(e,r);t.set("value",e=>(0,tC.setValueAtIndex)(e,r,n))},setFocusedThumbToMax(e){let{context:t}=e,r=t.get("focusedIndex"),{max:n}=n2(e,r);t.set("value",e=>(0,tC.setValueAtIndex)(e,r,n))},setValueAtIndex(e){let{context:t,event:r}=e,n=n5(e,r.value,r.index);t.set("value",e=>(0,tC.setValueAtIndex)(e,r.index,n))},setValue(e){let{context:t,event:r}=e,n=r.value.map((t,r)=>n5(e,t,r));t.set("value",n)}}}});var n6=(0,tZ.createProps)()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);(0,tC.createSplitProps)(n6);var n8=(0,tZ.createProps)()(["index","name"]);(0,tC.createSplitProps)(n8);var n7=(0,tZ.createProps)()(["value"]);(0,tC.createSplitProps)(n7);var n9=(0,t_.createAnatomy)("switch").parts("root","label","control","thumb"),ie=n9.build(),it=e=>e.ids?.root??`switch:${e.id}`,ir=e=>e.ids?.label??`switch:${e.id}:label`,ii=e=>e.ids?.hiddenInput??`switch:${e.id}:input`,io=e=>e.getById(ii(e));function ia(e,t){let{context:r,send:n,prop:i,scope:o}=e,a=!!i("disabled"),s=!!i("readOnly"),l=!!i("required"),u=!!r.get("checked"),c=!a&&r.get("focused"),d=!a&&r.get("focusVisible"),h=!a&&r.get("active"),f={"data-active":(0,tG.dataAttr)(h),"data-focus":(0,tG.dataAttr)(c),"data-focus-visible":(0,tG.dataAttr)(d),"data-readonly":(0,tG.dataAttr)(s),"data-hover":(0,tG.dataAttr)(r.get("hovered")),"data-disabled":(0,tG.dataAttr)(a),"data-state":u?"checked":"unchecked","data-invalid":(0,tG.dataAttr)(i("invalid")),"data-required":(0,tG.dataAttr)(l)};return{checked:u,disabled:a,focused:c,setChecked(e){n({type:"CHECKED.SET",checked:e,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:u,isTrusted:!1})},getRootProps:()=>t.label({...ie.root.attrs,...f,dir:i("dir"),id:it(o),htmlFor:ii(o),onPointerMove(){a||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(e){a||((0,tG.getEventTarget)(e)===io(o)&&e.stopPropagation(),(0,tG.isSafari)()&&io(o)?.focus())}}),getLabelProps:()=>t.element({...ie.label.attrs,...f,dir:i("dir"),id:ir(o)}),getThumbProps:()=>t.element({...ie.thumb.attrs,...f,dir:i("dir"),id:o.ids?.thumb??`switch:${o.id}:thumb`,"aria-hidden":!0}),getControlProps:()=>t.element({...ie.control.attrs,...f,dir:i("dir"),id:o.ids?.control??`switch:${o.id}:control`,"aria-hidden":!0}),getHiddenInputProps:()=>t.input({id:ii(o),type:"checkbox",required:i("required"),defaultChecked:u,disabled:a,"aria-labelledby":ir(o),"aria-invalid":i("invalid"),name:i("name"),form:i("form"),value:i("value"),style:tG.visuallyHiddenStyle,onFocus(){n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:(0,nr.isFocusVisible)()}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(e){s?e.preventDefault():n({type:"CHECKED.SET",checked:e.currentTarget.checked,isTrusted:!0})}})}}var{not:is}=(0,tX.createGuards)(),il=(0,tX.createMachine)({props:({props:e})=>({defaultChecked:!1,label:"switch",value:"on",...e}),initialState:()=>"ready",context:({prop:e,bindable:t})=>({checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(t){e("onCheckedChange")?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}),computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:r,action:n}){e([()=>t("disabled")],()=>{n(["removeFocusIfNeeded"])}),e([()=>r.get("checked")],()=>{n(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:is("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:is("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:r}){if(!e("isDisabled"))return(0,tG.trackPress)({pointerNode:t.getById(it(t)),keyboardNode:io(t),isValidKey:e=>" "===e.key,onPress:()=>r.set("active",!1),onPressStart:()=>r.set("active",!0),onPressEnd:()=>r.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return(0,nr.trackFocusVisible)({root:t.getRootNode()})},trackFormControlState:({context:e,send:t,scope:r})=>(0,tG.trackFormControl)(io(r),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){t({type:"CHECKED.SET",checked:!!e.initial("checked"),src:"form-reset"})}})},actions:{setContext({context:e,event:t}){for(let r in t.context)e.set(r,t.context[r])},syncInputElement({context:e,scope:t}){let r=io(t);r&&(0,tG.setElementChecked)(r,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){let r=io(t);(0,tG.dispatchInputCheckedEvent)(r,{checked:e.get("checked")})}}}}),iu=(0,tZ.createProps)()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);(0,tC.createSplitProps)(iu),e.s(["anatomy",()=>n9,"connect",()=>ia,"machine",()=>il],93424);let ic=rc.extendWith("itemBody"),id=(0,t_.createAnatomy)("action-bar").parts("positioner","content","separator","selectionTrigger","closeTrigger"),ih=(0,t_.createAnatomy)("alert").parts("title","description","root","indicator","content"),ip=(0,t_.createAnatomy)("breadcrumb").parts("link","currentLink","item","list","root","ellipsis","separator"),ig=(0,t_.createAnatomy)("blockquote").parts("root","icon","content","caption"),im=(0,t_.createAnatomy)("card").parts("root","header","body","footer","title","description"),iv=(0,t_.createAnatomy)("checkbox-card",["root","control","label","description","addon","indicator","content"]),ib=(0,t_.createAnatomy)("data-list").parts("root","item","itemLabel","itemValue"),iy=rX.anatomy.extendWith("header","body","footer","backdrop"),ix=rX.anatomy.extendWith("header","body","footer","backdrop"),iw=rZ.extendWith("textarea"),i_=(0,t_.createAnatomy)("empty-state",["root","content","indicator","title","description"]),iC=r1.fieldAnatomy.extendWith("requiredIndicator"),ik=r2.extendWith("content"),iS=r8.extendWith("itemContent","dropzoneContent","fileText"),iE=(0,t_.createAnatomy)("list").parts("root","item","indicator"),iO=nm.anatomy.extendWith("itemCommand"),iI=(0,t_.createAnatomy)("select").parts("root","field","indicator"),iP=nv.anatomy.extendWith("header","body","footer"),iT=nb.extendWith("itemAddon","itemIndicator"),iR=iT.extendWith("itemContent","itemDescription"),iA=nA.extendWith("itemIndicator"),iM=nV.extendWith("indicatorGroup"),iN=ru.extendWith("indicatorGroup","empty"),iD=nZ.extendWith("markerIndicator"),iL=(0,t_.createAnatomy)("stat").parts("root","label","helpText","valueText","valueUnit","indicator"),iV=(0,t_.createAnatomy)("status").parts("root","indicator"),iF=(0,t_.createAnatomy)("steps",["root","list","item","trigger","indicator","separator","content","title","description","nextTrigger","prevTrigger","progress"]),ij=n9.extendWith("indicator"),iz=(0,t_.createAnatomy)("table").parts("root","header","body","row","columnHeader","cell","footer","caption"),iB=(0,t_.createAnatomy)("toast").parts("root","title","description","indicator","closeTrigger","actionTrigger"),iH=(0,t_.createAnatomy)("tabs").parts("root","trigger","list","content","contentGroup","indicator"),iW=(0,t_.createAnatomy)("tag").parts("root","label","closeTrigger","startElement","endElement"),iU=(0,t_.createAnatomy)("timeline").parts("root","item","content","separator","indicator","connector","title","description"),i$=rY.extendWith("channelText"),iq=(0,t_.createAnatomy)("code-block",["root","content","title","header","footer","control","overlay","code","codeText","copyTrigger","copyIndicator","collapseTrigger","collapseIndicator","collapseText"]);rb.extendWith("valueText"),e.s(["accordionAnatomy",()=>ic,"actionBarAnatomy",()=>id,"alertAnatomy",()=>ih,"blockquoteAnatomy",()=>ig,"breadcrumbAnatomy",()=>ip,"cardAnatomy",()=>im,"checkboxCardAnatomy",()=>iv,"codeBlockAnatomy",()=>iq,"colorPickerAnatomy",()=>i$,"comboboxAnatomy",()=>iN,"dataListAnatomy",()=>ib,"dialogAnatomy",()=>iy,"drawerAnatomy",()=>ix,"editableAnatomy",()=>iw,"emptyStateAnatomy",()=>i_,"fieldAnatomy",()=>iC,"fieldsetAnatomy",()=>ik,"fileUploadAnatomy",()=>iS,"listAnatomy",()=>iE,"listboxAnatomy",()=>ng,"menuAnatomy",()=>iO,"nativeSelectAnatomy",()=>iI,"popoverAnatomy",()=>iP,"radioCardAnatomy",()=>iR,"radioGroupAnatomy",()=>iT,"ratingGroupAnatomy",()=>iA,"selectAnatomy",()=>iM,"sliderAnatomy",()=>iD,"statAnatomy",()=>iL,"statusAnatomy",()=>iV,"stepsAnatomy",()=>iF,"switchAnatomy",()=>ij,"tableAnatomy",()=>iz,"tabsAnatomy",()=>iH,"tagAnatomy",()=>iW,"timelineAnatomy",()=>iU,"toastAnatomy",()=>iB],61292);let iG=ej({className:"chakra-accordion",slots:ic.keys(),base:{root:{width:"full","--accordion-radius":"radii.l2"},item:{overflowAnchor:"none"},itemTrigger:{display:"flex",alignItems:"center",textAlign:"start",width:"full",outline:"0",gap:"3",fontWeight:"medium",borderRadius:"var(--accordion-radius)",_focusVisible:{outline:"2px solid",outlineColor:"colorPalette.focusRing"},_disabled:{layerStyle:"disabled"}},itemBody:{pt:"var(--accordion-padding-y)",pb:"calc(var(--accordion-padding-y) * 2)"},itemContent:{overflow:"hidden",borderRadius:"var(--accordion-radius)",_open:{animationName:"expand-height, fade-in",animationDuration:"moderate"},_closed:{animationName:"collapse-height, fade-out",animationDuration:"moderate"}},itemIndicator:{transition:"rotate 0.2s",transformOrigin:"center",color:"fg.subtle",_open:{rotate:"180deg"},_icon:{width:"1.2em",height:"1.2em"}}},variants:{variant:{outline:{item:{borderBottomWidth:"1px"}},subtle:{itemTrigger:{px:"var(--accordion-padding-x)"},itemContent:{px:"var(--accordion-padding-x)"},item:{borderRadius:"var(--accordion-radius)",_open:{bg:"colorPalette.subtle"}}},enclosed:{root:{borderWidth:"1px",borderRadius:"var(--accordion-radius)",divideY:"1px",overflow:"hidden"},itemTrigger:{px:"var(--accordion-padding-x)"},itemContent:{px:"var(--accordion-padding-x)"},item:{_open:{bg:"bg.subtle"}}},plain:{}},size:{sm:{root:{"--accordion-padding-x":"spacing.3","--accordion-padding-y":"spacing.2"},itemTrigger:{textStyle:"sm",py:"var(--accordion-padding-y)"}},md:{root:{"--accordion-padding-x":"spacing.4","--accordion-padding-y":"spacing.2"},itemTrigger:{textStyle:"md",py:"var(--accordion-padding-y)"}},lg:{root:{"--accordion-padding-x":"spacing.4.5","--accordion-padding-y":"spacing.2.5"},itemTrigger:{textStyle:"lg",py:"var(--accordion-padding-y)"}}}},defaultVariants:{size:"md",variant:"outline"}});e.s(["accordionSlotRecipe",()=>iG],38674);let iK=ej({className:"chakra-action-bar",slots:id.keys(),base:{positioner:{position:"fixed",display:"flex",justifyContent:"center",pointerEvents:"none",insetInline:"0",top:"unset",bottom:"calc(env(safe-area-inset-bottom) + 20px)"},content:{bg:"bg.panel",shadow:"md",display:"flex",alignItems:"center",gap:"3",borderRadius:"l3",py:"2.5",px:"3",pointerEvents:"auto",translate:"calc(-1 * var(--scrollbar-width) / 2) 0px",_open:{animationName:"slide-from-bottom, fade-in",animationDuration:"moderate"},_closed:{animationName:"slide-to-bottom, fade-out",animationDuration:"faster"}},separator:{width:"1px",height:"5",bg:"border"},selectionTrigger:{display:"inline-flex",alignItems:"center",gap:"2",alignSelf:"stretch",textStyle:"sm",px:"4",py:"1",borderRadius:"l2",borderWidth:"1px",borderStyle:"dashed"}}});e.s(["actionBarSlotRecipe",()=>iK],69081);let iY=ej({slots:ih.keys(),className:"chakra-alert",base:{root:{width:"full",display:"flex",alignItems:"flex-start",position:"relative",borderRadius:"l3"},title:{fontWeight:"medium"},description:{display:"inline"},indicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0",width:"1em",height:"1em",_icon:{boxSize:"full"}},content:{display:"flex",flex:"1",gap:"1"}},variants:{status:{info:{root:{colorPalette:"blue"}},warning:{root:{colorPalette:"orange"}},success:{root:{colorPalette:"green"}},error:{root:{colorPalette:"red"}},neutral:{root:{colorPalette:"gray"}}},inline:{true:{content:{display:"inline-flex",flexDirection:"row",alignItems:"center"}},false:{content:{display:"flex",flexDirection:"column"}}},variant:{subtle:{root:{bg:"colorPalette.subtle",color:"colorPalette.fg"}},surface:{root:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},indicator:{color:"colorPalette.fg"}},outline:{root:{color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},indicator:{color:"colorPalette.fg"}},solid:{root:{bg:"colorPalette.solid",color:"colorPalette.contrast"},indicator:{color:"colorPalette.contrast"}}},size:{sm:{root:{gap:"2",px:"3",py:"3",textStyle:"xs"},indicator:{textStyle:"lg"}},md:{root:{gap:"3",px:"4",py:"4",textStyle:"sm"},indicator:{textStyle:"xl"}},lg:{root:{gap:"3",px:"4",py:"4",textStyle:"md"},indicator:{textStyle:"2xl"}}}},defaultVariants:{status:"info",variant:"subtle",size:"md",inline:!1}});e.s(["alertSlotRecipe",()=>iY],11567);var iX=(0,t_.createAnatomy)("avatar").parts("root","image","fallback"),iQ=iX.build(),iZ=e=>e.ids?.root??`avatar:${e.id}`,iJ=e=>e.ids?.image??`avatar:${e.id}:image`,i0=e=>e.getById(iJ(e));function i1(e,t){let{state:r,send:n,prop:i,scope:o}=e,a=r.matches("loaded");return{loaded:a,setSrc(e){let t=i0(o);t?.setAttribute("src",e)},setLoaded(){n({type:"img.loaded",src:"api"})},setError(){n({type:"img.error",src:"api"})},getRootProps:()=>t.element({...iQ.root.attrs,dir:i("dir"),id:iZ(o)}),getImageProps:()=>t.img({...iQ.image.attrs,hidden:!a,dir:i("dir"),id:iJ(o),"data-state":a?"visible":"hidden",onLoad(){n({type:"img.loaded",src:"element"})},onError(){n({type:"img.error",src:"element"})}}),getFallbackProps:()=>t.element({...iQ.fallback.attrs,dir:i("dir"),id:o.ids?.fallback??`avatar:${o.id}:fallback`,hidden:a,"data-state":a?"hidden":"visible"})}}var i2=(0,tX.createMachine)({initialState:()=>"loading",effects:["trackImageRemoval","trackSrcChange"],on:{"src.change":{target:"loading"},"img.unmount":{target:"error"}},states:{loading:{entry:["checkImageStatus"],on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]},"img.error":{target:"error",actions:["invokeOnError"]}}},error:{on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]}}},loaded:{on:{"img.error":{target:"error",actions:["invokeOnError"]}}}},implementations:{actions:{invokeOnLoad({prop:e}){e("onStatusChange")?.({status:"loaded"})},invokeOnError({prop:e}){e("onStatusChange")?.({status:"error"})},checkImageStatus({send:e,scope:t}){var r;let n=i0(t);n?.complete&&e({type:(r=n).complete&&0!==r.naturalWidth&&0!==r.naturalHeight?"img.loaded":"img.error",src:"ssr"})}},effects:{trackImageRemoval({send:e,scope:t}){let r=t.getById(iZ(t));return(0,tG.observeChildren)(r,{callback(t){Array.from(t[0].removedNodes).find(e=>e.nodeType===Node.ELEMENT_NODE&&e.matches("[data-scope=avatar][data-part=image]"))&&e({type:"img.unmount"})}})},trackSrcChange({send:e,scope:t}){let r=i0(t);return(0,tG.observeAttributes)(r,{attributes:["src","srcset"],callback(){e({type:"src.change"})}})}}}}),i5=(0,tZ.createProps)()(["dir","id","ids","onStatusChange","getRootNode"]);(0,tC.createSplitProps)(i5),e.s(["anatomy",()=>iX,"connect",()=>i1,"machine",()=>i2],42582);let i3=ej({slots:iX.keys(),className:"chakra-avatar",base:{root:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:"medium",position:"relative",verticalAlign:"top",flexShrink:"0",userSelect:"none",width:"var(--avatar-size)",height:"var(--avatar-size)",fontSize:"var(--avatar-font-size)",borderRadius:"var(--avatar-radius)","&[data-group-item]":{borderWidth:"2px",borderColor:"bg"}},image:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"var(--avatar-radius)"},fallback:{lineHeight:"1",textTransform:"uppercase",fontWeight:"medium",fontSize:"var(--avatar-font-size)",borderRadius:"var(--avatar-radius)"}},variants:{size:{full:{root:{"--avatar-size":"100%","--avatar-font-size":"100%"}},"2xs":{root:{"--avatar-font-size":"fontSizes.2xs","--avatar-size":"sizes.6"}},xs:{root:{"--avatar-font-size":"fontSizes.xs","--avatar-size":"sizes.8"}},sm:{root:{"--avatar-font-size":"fontSizes.sm","--avatar-size":"sizes.9"}},md:{root:{"--avatar-font-size":"fontSizes.md","--avatar-size":"sizes.10"}},lg:{root:{"--avatar-font-size":"fontSizes.md","--avatar-size":"sizes.11"}},xl:{root:{"--avatar-font-size":"fontSizes.lg","--avatar-size":"sizes.12"}},"2xl":{root:{"--avatar-font-size":"fontSizes.xl","--avatar-size":"sizes.16"}}},variant:{solid:{root:{bg:"colorPalette.solid",color:"colorPalette.contrast"}},subtle:{root:{bg:"colorPalette.muted",color:"colorPalette.fg"}},outline:{root:{color:"colorPalette.fg",borderWidth:"1px",borderColor:"colorPalette.muted"}}},shape:{square:{},rounded:{root:{"--avatar-radius":"radii.l3"}},full:{root:{"--avatar-radius":"radii.full"}}},borderless:{true:{root:{"&[data-group-item]":{borderWidth:"0px"}}}}},defaultVariants:{size:"md",shape:"full",variant:"subtle"}});e.s(["avatarSlotRecipe",()=>i3],97018);let i4=ej({className:"chakra-blockquote",slots:ig.keys(),base:{root:{position:"relative",display:"flex",flexDirection:"column",gap:"2"},caption:{textStyle:"sm",color:"fg.muted"},icon:{boxSize:"5"}},variants:{justify:{start:{root:{alignItems:"flex-start",textAlign:"start"}},center:{root:{alignItems:"center",textAlign:"center"}},end:{root:{alignItems:"flex-end",textAlign:"end"}}},variant:{subtle:{root:{paddingX:"5",borderStartWidth:"4px",borderStartColor:"colorPalette.muted"},icon:{color:"colorPalette.fg"}},solid:{root:{paddingX:"5",borderStartWidth:"4px",borderStartColor:"colorPalette.solid"},icon:{color:"colorPalette.solid"}},plain:{root:{paddingX:"5"},icon:{color:"colorPalette.solid"}}}},defaultVariants:{variant:"subtle",justify:"start"}});e.s(["blockquoteSlotRecipe",()=>i4],27598);let i6=ej({className:"chakra-breadcrumb",slots:ip.keys(),base:{list:{display:"flex",alignItems:"center",wordBreak:"break-word",color:"fg.muted",listStyle:"none"},link:{outline:"0",textDecoration:"none",borderRadius:"l1",focusRing:"outside",display:"inline-flex",alignItems:"center",gap:"2"},item:{display:"inline-flex",alignItems:"center"},separator:{color:"fg.muted",opacity:"0.8",_icon:{boxSize:"1em"},_rtl:{rotate:"180deg"}},ellipsis:{display:"inline-flex",alignItems:"center",justifyContent:"center",_icon:{boxSize:"1em"}}},variants:{variant:{underline:{link:{color:"colorPalette.fg",textDecoration:"underline",textUnderlineOffset:"0.2em",textDecorationColor:"colorPalette.muted"},currentLink:{color:"colorPalette.fg"}},plain:{link:{color:"fg.muted",_hover:{color:"fg"}},currentLink:{color:"fg"}}},size:{sm:{list:{gap:"1",textStyle:"xs"}},md:{list:{gap:"1.5",textStyle:"sm"}},lg:{list:{gap:"2",textStyle:"md"}}}},defaultVariants:{variant:"plain",size:"md"}});e.s(["breadcrumbSlotRecipe",()=>i6],248);let i8=ej({className:"chakra-card",slots:im.keys(),base:{root:{display:"flex",flexDirection:"column",position:"relative",minWidth:"0",wordWrap:"break-word",borderRadius:"l3",color:"fg",textAlign:"start"},title:{fontWeight:"semibold"},description:{color:"fg.muted",fontSize:"sm"},header:{paddingInline:"var(--card-padding)",paddingTop:"var(--card-padding)",display:"flex",flexDirection:"column",gap:"1.5"},body:{padding:"var(--card-padding)",flex:"1",display:"flex",flexDirection:"column"},footer:{display:"flex",alignItems:"center",gap:"2",paddingInline:"var(--card-padding)",paddingBottom:"var(--card-padding)"}},variants:{size:{sm:{root:{"--card-padding":"spacing.4"},title:{textStyle:"md"}},md:{root:{"--card-padding":"spacing.6"},title:{textStyle:"lg"}},lg:{root:{"--card-padding":"spacing.7"},title:{textStyle:"xl"}}},variant:{elevated:{root:{bg:"bg.panel",boxShadow:"md"}},outline:{root:{bg:"bg.panel",borderWidth:"1px",borderColor:"border"}},subtle:{root:{bg:"bg.muted"}}}},defaultVariants:{variant:"outline",size:"md"}});e.s(["cardSlotRecipe",()=>i8],57372);let i7=ej({slots:e.i(41378).checkboxAnatomy.keys(),className:"chakra-checkbox",base:{root:{display:"inline-flex",gap:"2",alignItems:"center",verticalAlign:"top",position:"relative"},control:ti.base,label:{fontWeight:"medium",userSelect:"none",_disabled:{opacity:"0.5"}}},variants:{size:{xs:{root:{gap:"1.5"},label:{textStyle:"xs"},control:ti.variants?.size?.xs},sm:{root:{gap:"2"},label:{textStyle:"sm"},control:ti.variants?.size?.sm},md:{root:{gap:"2.5"},label:{textStyle:"sm"},control:ti.variants?.size?.md},lg:{root:{gap:"3"},label:{textStyle:"md"},control:ti.variants?.size?.lg}},variant:{outline:{control:ti.variants?.variant?.outline},solid:{control:ti.variants?.variant?.solid},subtle:{control:ti.variants?.variant?.subtle}}},defaultVariants:{variant:"solid",size:"md"}});e.s(["checkboxSlotRecipe",()=>i7],68718);let i9=ej({slots:iv.keys(),className:"chakra-checkbox-card",base:{root:{display:"flex",flexDirection:"column",userSelect:"none",position:"relative",borderRadius:"l2",flex:"1",focusVisibleRing:"outside",_disabled:{opacity:"0.8"},_invalid:{outline:"2px solid",outlineColor:"border.error"}},control:{display:"inline-flex",flex:"1",position:"relative",borderRadius:"inherit",justifyContent:"var(--checkbox-card-justify)",alignItems:"var(--checkbox-card-align)"},label:{fontWeight:"medium",display:"flex",alignItems:"center",gap:"2",flex:"1",_disabled:{opacity:"0.5"}},description:{opacity:"0.64",textStyle:"sm",_disabled:{opacity:"0.5"}},addon:{_disabled:{opacity:"0.5"}},indicator:ti.base,content:{display:"flex",flexDirection:"column",flex:"1",gap:"1",justifyContent:"var(--checkbox-card-justify)",alignItems:"var(--checkbox-card-align)"}},variants:{size:{sm:{root:{textStyle:"sm"},control:{padding:"3",gap:"1.5"},addon:{px:"3",py:"1.5",borderTopWidth:"1px"},indicator:ti.variants?.size.sm},md:{root:{textStyle:"sm"},control:{padding:"4",gap:"2.5"},addon:{px:"4",py:"2",borderTopWidth:"1px"},indicator:ti.variants?.size.md},lg:{root:{textStyle:"md"},control:{padding:"4",gap:"3.5"},addon:{px:"4",py:"2",borderTopWidth:"1px"},indicator:ti.variants?.size.lg}},variant:{surface:{root:{borderWidth:"1px",borderColor:"border",_checked:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderColor:"colorPalette.muted"},_disabled:{bg:"bg.muted"}},indicator:ti.variants?.variant.solid},subtle:{root:{bg:"bg.muted"},control:{_checked:{bg:"colorPalette.muted",color:"colorPalette.fg"}},indicator:ti.variants?.variant.plain},outline:{root:{borderWidth:"1px",borderColor:"border",_checked:{boxShadow:"0 0 0 1px var(--shadow-color)",boxShadowColor:"colorPalette.solid",borderColor:"colorPalette.solid"}},indicator:ti.variants?.variant.solid},solid:{root:{borderWidth:"1px",_checked:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},indicator:ti.variants?.variant.inverted}},justify:{start:{root:{"--checkbox-card-justify":"flex-start"}},end:{root:{"--checkbox-card-justify":"flex-end"}},center:{root:{"--checkbox-card-justify":"center"}}},align:{start:{root:{"--checkbox-card-align":"flex-start"},content:{textAlign:"start"}},end:{root:{"--checkbox-card-align":"flex-end"},content:{textAlign:"end"}},center:{root:{"--checkbox-card-align":"center"},content:{textAlign:"center"}}},orientation:{vertical:{control:{flexDirection:"column"}},horizontal:{control:{flexDirection:"row"}}}},defaultVariants:{size:"md",variant:"outline",align:"start",orientation:"horizontal"}});e.s(["checkboxCardSlotRecipe",()=>i9],69311);let oe=ej({slots:iq.keys(),className:"code-block",base:{root:{colorPalette:"gray",rounded:"var(--code-block-radius)",overflow:"hidden",bg:"bg",color:"fg",borderWidth:"1px","--code-block-max-height":"320px","--code-block-bg":"colors.bg","--code-block-fg":"colors.fg","--code-block-obscured-opacity":"0.5","--code-block-obscured-blur":"1px","--code-block-line-number-width":"sizes.3","--code-block-line-number-margin":"spacing.4","--code-block-highlight-bg":"{colors.teal.focusRing/20}","--code-block-highlight-border":"colors.teal.focusRing","--code-block-highlight-added-bg":"{colors.green.focusRing/20}","--code-block-highlight-added-border":"colors.green.focusRing","--code-block-highlight-removed-bg":"{colors.red.focusRing/20}","--code-block-highlight-removed-border":"colors.red.focusRing"},header:{display:"flex",alignItems:"center",gap:"2",position:"relative",px:"var(--code-block-padding)",minH:"var(--code-block-header-height)",mb:"calc(var(--code-block-padding) / 2 * -1)"},title:{display:"inline-flex",alignItems:"center",gap:"1.5",flex:"1",color:"fg.muted"},control:{gap:"1.5",display:"inline-flex",alignItems:"center"},footer:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2",px:"var(--code-block-padding)",minH:"var(--code-block-header-height)"},content:{position:"relative",colorScheme:"dark",overflowX:"auto",overflowY:"hidden",borderBottomRadius:"var(--code-block-radius)",maxHeight:"var(--code-block-max-height)","& ::selection":{bg:"blue.500/40"},_expanded:{maxHeight:"unset"}},overlay:{"--bg":"{colors.black/50}",display:"flex",alignItems:"flex-end",justifyContent:"center",padding:"4",bgImage:"linear-gradient(0deg,var(--bg) 25%,transparent 100%)",color:"white",minH:"5rem",pos:"absolute",bottom:"0",insetInline:"0",zIndex:"1",fontWeight:"medium",_expanded:{display:"none"}},code:{fontFamily:"mono",lineHeight:"tall",whiteSpace:"pre",counterReset:"line 0"},codeText:{px:"var(--code-block-padding)",py:"var(--code-block-padding)",position:"relative",display:"block",width:"100%","&[data-has-focused]":{"& [data-line]:not([data-focused])":{transitionProperty:"opacity, filter",transitionDuration:"moderate",transitionTimingFunction:"ease-in-out",opacity:"var(--code-block-obscured-opacity)",filter:"blur(var(--code-block-obscured-blur))"},"&:hover":{"--code-block-obscured-opacity":"1","--code-block-obscured-blur":"0px"}},"&[data-has-line-numbers][data-plaintext]":{paddingInlineStart:"calc(var(--code-block-line-number-width) + var(--code-block-line-number-margin) + var(--code-block-padding))"},"& [data-line]":{position:"relative",paddingInlineEnd:"var(--code-block-padding)","--highlight-bg":"var(--code-block-highlight-bg)","--highlight-border":"var(--code-block-highlight-border)","&[data-highlight], &[data-diff]":{display:"inline-block",width:"full","&:after":{content:"''",display:"block",position:"absolute",top:"0",insetStart:"calc(var(--code-block-padding) * -1)",insetEnd:"0px",width:"calc(100% + var(--code-block-padding) * 2)",height:"100%",bg:"var(--highlight-bg)",borderStartWidth:"2px",borderStartColor:"var(--highlight-border)"}},"&[data-diff='added']":{"--highlight-bg":"var(--code-block-highlight-added-bg)","--highlight-border":"var(--code-block-highlight-added-border)"},"&[data-diff='removed']":{"--highlight-bg":"var(--code-block-highlight-removed-bg)","--highlight-border":"var(--code-block-highlight-removed-border)"}},"&[data-word-wrap]":{"&[data-plaintext], & [data-line]":{whiteSpace:"pre-wrap",wordBreak:"break-all"}},"&[data-has-line-numbers]":{"--content":"counter(line)","& [data-line]:before":{content:"var(--content)",counterIncrement:"line",width:"var(--code-block-line-number-width)",marginRight:"var(--code-block-line-number-margin)",display:"inline-block",textAlign:"end",userSelect:"none",whiteSpace:"nowrap",opacity:.4},"& [data-diff='added']:before":{content:"'+'"},"& [data-diff='removed']:before":{content:"'-'"}}}},variants:{size:{sm:{root:{"--code-block-padding":"spacing.4","--code-block-radius":"radii.md","--code-block-header-height":"sizes.8"},title:{textStyle:"xs"},code:{fontSize:"xs"}},md:{root:{"--code-block-padding":"spacing.4","--code-block-radius":"radii.lg","--code-block-header-height":"sizes.10"},title:{textStyle:"xs"},code:{fontSize:"sm"}},lg:{root:{"--code-block-padding":"spacing.5","--code-block-radius":"radii.xl","--code-block-header-height":"sizes.12"},title:{textStyle:"sm"},code:{fontSize:"sm"}}}},defaultVariants:{size:"md"}});e.s(["codeBlockSlotRecipe",()=>oe],34843);var ot=(0,t_.createAnatomy)("collapsible").parts("root","trigger","content","indicator");ot.build();var or=e=>e.getById(e.ids?.content??`collapsible:${e.id}:content`);(0,tX.createMachine)({initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",context:({bindable:e})=>({size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}),refs:()=>({cleanup:void 0,stylesRef:void 0}),watch({track:e,prop:t,action:r}){e([()=>t("open")],()=>{r(["setInitial","computeSize","toggleVisibility"])})},exit:["clearInitial","cleanupNode"],states:{closed:{effects:["trackTabbableElements"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>void 0!=e("open")},effects:{trackEnterAnimation:({send:e,scope:t})=>{let r,n=(0,tG.raf)(()=>{let n=or(t);if(!n)return;let i=(0,tG.getComputedStyle)(n).animationName;if(!i||"none"===i)return void e({type:"animation.end"});let o=t=>{(0,tG.getEventTarget)(t)===n&&e({type:"animation.end"})};n.addEventListener("animationend",o),r=()=>{n.removeEventListener("animationend",o)}});return()=>{n(),r?.()}},trackExitAnimation:({send:e,scope:t})=>{let r,n=(0,tG.raf)(()=>{let n=or(t);if(!n)return;let i=(0,tG.getComputedStyle)(n).animationName;if(!i||"none"===i)return void e({type:"animation.end"});let o=t=>{(0,tG.getEventTarget)(t)===n&&e({type:"animation.end"})};n.addEventListener("animationend",o);let a=(0,tG.setStyle)(n,{animationFillMode:"forwards"});r=()=>{n.removeEventListener("animationend",o),(0,tG.nextTick)(()=>a())}});return()=>{n(),r?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t("collapsedHeight")&&!t("collapsedWidth"))return;let r=or(e);if(!r)return;let n=()=>{let e=(0,tG.getTabbables)(r).map(e=>(0,tG.setAttribute)(e,"inert",""));return()=>{e.forEach(e=>e())}},i=n(),o=(0,tG.observeChildren)(r,{callback(){i(),i=n()}});return()=>{i(),o()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{let r=or(t);if(!r)return;let{height:n,width:i}=r.getBoundingClientRect();e.set("size",{height:n,width:i})},computeSize:({refs:e,scope:t,context:r})=>{e.get("cleanup")?.();let n=(0,tG.raf)(()=>{let e=or(t);if(!e)return;let n=e.hidden;e.style.animationName="none",e.style.animationDuration="0s",e.hidden=!1;let i=e.getBoundingClientRect();r.set("size",{height:i.height,width:i.width}),r.get("initial")&&(e.style.animationName="",e.style.animationDuration=""),e.hidden=n});e.set("cleanup",n)},invokeOnOpen:({prop:e})=>{e("onOpenChange")?.({open:!0})},invokeOnClose:({prop:e})=>{e("onOpenChange")?.({open:!1})},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}});var on=(0,tZ.createProps)()(["dir","disabled","getRootNode","id","ids","collapsedHeight","collapsedWidth","onExitComplete","onOpenChange","defaultOpen","open"]);(0,tC.createSplitProps)(on);let oi=ej({slots:ot.keys(),className:"chakra-collapsible",base:{content:{overflow:"hidden",_open:{animationName:"expand-height, fade-in",animationDuration:"moderate","&[data-has-collapsed-size]":{animationName:"expand-height"}},_closed:{animationName:"collapse-height, fade-out",animationDuration:"moderate","&[data-has-collapsed-size]":{animationName:"collapse-height"}}}}});e.s(["collapsibleSlotRecipe",()=>oi],42697);let oo=ej({className:"colorPicker",slots:i$.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5"},label:{color:"fg",fontWeight:"medium",textStyle:"sm",_disabled:{opacity:"0.5"}},valueText:{textAlign:"start"},control:{display:"flex",alignItems:"center",flexDirection:"row",gap:"2",position:"relative"},swatchTrigger:{display:"flex",alignItems:"center",justifyContent:"center"},trigger:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"row",flexShrink:"0",gap:"2",textStyle:"sm",minH:"var(--input-height)",minW:"var(--input-height)",px:"1",rounded:"l2",_disabled:{opacity:"0.5"},"--focus-color":"colors.colorPalette.focusRing","&:focus-visible":{borderColor:"var(--focus-color)",outline:"1px solid var(--focus-color)"},"&[data-fit-content]":{"--input-height":"unset",px:"0",border:"0"}},content:{display:"flex",flexDirection:"column",bg:"bg.panel",borderRadius:"l3",boxShadow:"lg",width:"64",p:"4",gap:"3",zIndex:"dropdown",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"faster"}},area:{height:"180px",borderRadius:"l2",overflow:"hidden"},areaThumb:{borderRadius:"full",height:"var(--thumb-size)",width:"var(--thumb-size)",borderWidth:"2px",borderColor:"white",shadow:"sm",focusVisibleRing:"mixed",focusRingColor:"white"},areaBackground:{height:"full"},channelSlider:{borderRadius:"l2",flex:"1"},channelSliderTrack:{height:"var(--slider-height)",borderRadius:"inherit",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"},channelText:{textStyle:"xs",color:"fg.muted",fontWeight:"medium",textTransform:"capitalize"},swatchGroup:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"2"},swatch:{...tl.base,borderRadius:"l1"},swatchIndicator:{color:"white",rounded:"full"},channelSliderThumb:{borderRadius:"full",height:"var(--thumb-size)",width:"var(--thumb-size)",borderWidth:"2px",borderColor:"white",shadow:"sm",transform:"translate(-50%, -50%)",focusVisibleRing:"outside",focusRingOffset:"1px"},channelInput:{...th.base,"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0}},formatSelect:{textStyle:"xs",textTransform:"uppercase",borderWidth:"1px",minH:"6",focusRing:"inside",rounded:"l2"},transparencyGrid:{borderRadius:"l2"},view:{display:"flex",flexDirection:"column",gap:"2"}},variants:{size:{"2xs":{channelInput:th.variants?.size?.["2xs"],swatch:{"--swatch-size":"sizes.4.5"},trigger:{"--input-height":"sizes.7"},area:{"--thumb-size":"sizes.3"},channelSlider:{"--slider-height":"sizes.3","--thumb-size":"sizes.3"}},xs:{channelInput:th.variants?.size?.xs,swatch:{"--swatch-size":"sizes.5"},trigger:{"--input-height":"sizes.8"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},sm:{channelInput:th.variants?.size?.sm,swatch:{"--swatch-size":"sizes.6"},trigger:{"--input-height":"sizes.9"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},md:{channelInput:th.variants?.size?.md,swatch:{"--swatch-size":"sizes.7"},trigger:{"--input-height":"sizes.10"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},lg:{channelInput:th.variants?.size?.lg,swatch:{"--swatch-size":"sizes.7"},trigger:{"--input-height":"sizes.11"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},xl:{channelInput:th.variants?.size?.xl,swatch:{"--swatch-size":"sizes.8"},trigger:{"--input-height":"sizes.12"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},"2xl":{channelInput:th.variants?.size?.["2xl"],swatch:{"--swatch-size":"sizes.10"},trigger:{"--input-height":"sizes.16"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}}},variant:{outline:{channelInput:th.variants?.variant?.outline,trigger:{borderWidth:"1px"}},subtle:{channelInput:th.variants?.variant?.subtle,trigger:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted"}}}},defaultVariants:{size:"md",variant:"outline"}});e.s(["colorPickerSlotRecipe",()=>oo],21875);let oa=ej({className:"chakra-combobox",slots:iN.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},label:{fontWeight:"medium",userSelect:"none",textStyle:"sm",_disabled:{layerStyle:"disabled"}},input:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"bg.panel",width:"full",minH:"var(--combobox-input-height)",px:"var(--combobox-input-padding-x)","--input-height":"var(--combobox-input-height)",borderRadius:"l2",outline:0,userSelect:"none",textAlign:"start",_placeholderShown:{color:"fg.muted"},_disabled:{layerStyle:"disabled"},"--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"}},trigger:{display:"inline-flex",alignItems:"center",justifyContent:"center","--input-height":"var(--combobox-input-height)"},clearTrigger:{color:"fg.muted",pointerEvents:"auto",focusVisibleRing:"inside",focusRingWidth:"2px",rounded:"l1"},control:{pos:"relative"},indicatorGroup:{display:"flex",alignItems:"center",justifyContent:"center",gap:"1",pos:"absolute",insetEnd:"0",top:"0",bottom:"0",px:"var(--combobox-input-padding-x)",_icon:{boxSize:"var(--combobox-indicator-size)"},"[data-disabled] &":{opacity:.5}},content:{background:"bg.panel",display:"flex",flexDirection:"column",zIndex:"dropdown",borderRadius:"l2",outline:0,maxH:"96",overflowY:"auto",boxShadow:"md",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"0s"},"&[data-empty]:not(:has([data-scope=combobox][data-part=empty]))":{opacity:0}},item:{position:"relative",userSelect:"none",display:"flex",alignItems:"center",gap:"2",py:"var(--combobox-item-padding-y)",px:"var(--combobox-item-padding-x)",cursor:"option",justifyContent:"space-between",flex:"1",textAlign:"start",borderRadius:"l1",_highlighted:{bg:"bg.emphasized/60"},_disabled:{pointerEvents:"none",opacity:"0.5"},_icon:{boxSize:"var(--combobox-indicator-size)"}},empty:{py:"var(--combobox-item-padding-y)",px:"var(--combobox-item-padding-x)"},itemText:{flex:"1"},itemGroup:{pb:"var(--combobox-item-padding-y)",_last:{pb:"0"}},itemGroupLabel:{fontWeight:"medium",py:"var(--combobox-item-padding-y)",px:"var(--combobox-item-padding-x)"}},variants:{variant:{outline:{input:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusVisibleRing:"inside"}},subtle:{input:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusVisibleRing:"inside"}},flushed:{input:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focusVisible:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)"}},indicatorGroup:{px:"0"}}},size:{xs:{root:{"--combobox-input-height":"sizes.8","--combobox-input-padding-x":"spacing.2","--combobox-indicator-size":"sizes.3.5"},input:{textStyle:"xs"},content:{"--combobox-item-padding-x":"spacing.1.5","--combobox-item-padding-y":"spacing.1","--combobox-indicator-size":"sizes.3.5",p:"1",textStyle:"xs"},trigger:{textStyle:"xs",gap:"1"}},sm:{root:{"--combobox-input-height":"sizes.9","--combobox-input-padding-x":"spacing.2.5","--combobox-indicator-size":"sizes.4"},input:{textStyle:"sm"},content:{"--combobox-item-padding-x":"spacing.2","--combobox-item-padding-y":"spacing.1.5","--combobox-indicator-size":"sizes.4",p:"1",textStyle:"sm"},trigger:{textStyle:"sm",gap:"1"}},md:{root:{"--combobox-input-height":"sizes.10","--combobox-input-padding-x":"spacing.3","--combobox-indicator-size":"sizes.4"},input:{textStyle:"sm"},content:{"--combobox-item-padding-x":"spacing.2","--combobox-item-padding-y":"spacing.1.5","--combobox-indicator-size":"sizes.4",p:"1",textStyle:"sm"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center"},trigger:{textStyle:"sm",gap:"2"}},lg:{root:{"--combobox-input-height":"sizes.12","--combobox-input-padding-x":"spacing.4","--combobox-indicator-size":"sizes.5"},input:{textStyle:"md"},content:{"--combobox-item-padding-y":"spacing.2","--combobox-item-padding-x":"spacing.3","--combobox-indicator-size":"sizes.5",p:"1.5",textStyle:"md"},trigger:{textStyle:"md",py:"3",gap:"2"}}}},defaultVariants:{size:"md",variant:"outline"}});e.s(["comboboxSlotRecipe",()=>oa],36794);let os=ej({slots:ib.keys(),className:"chakra-data-list",base:{itemLabel:{display:"flex",alignItems:"center",gap:"1"},itemValue:{display:"flex",minWidth:"0",flex:"1"}},variants:{orientation:{horizontal:{root:{display:"flex",flexDirection:"column"},item:{display:"inline-flex",alignItems:"center",gap:"4"},itemLabel:{minWidth:"120px"}},vertical:{root:{display:"flex",flexDirection:"column"},item:{display:"flex",flexDirection:"column",gap:"1"}}},size:{sm:{root:{gap:"3"},item:{textStyle:"xs"}},md:{root:{gap:"4"},item:{textStyle:"sm"}},lg:{root:{gap:"5"},item:{textStyle:"md"}}},variant:{subtle:{itemLabel:{color:"fg.muted"}},bold:{itemLabel:{fontWeight:"medium"},itemValue:{color:"fg.muted"}}}},defaultVariants:{size:"md",orientation:"vertical",variant:"subtle"}});e.s(["dataListSlotRecipe",()=>os],92071);let ol=ej({slots:iy.keys(),className:"chakra-dialog",base:{backdrop:{bg:"blackAlpha.500",pos:"fixed",left:0,top:0,w:"100dvw",h:"100dvh",zIndex:"var(--z-index)",_open:{animationName:"fade-in",animationDuration:"slow"},_closed:{animationName:"fade-out",animationDuration:"moderate"}},positioner:{display:"flex",width:"100dvw",height:"100dvh",position:"fixed",left:0,top:0,"--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",justifyContent:"center",overscrollBehaviorY:"none"},content:{display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,borderRadius:"l3",textStyle:"sm",my:"var(--dialog-margin, var(--dialog-base-margin))","--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",bg:"bg.panel",boxShadow:"lg",_open:{animationDuration:"moderate"},_closed:{animationDuration:"faster"}},header:{display:"flex",gap:"2",flex:0,px:"6",pt:"6",pb:"4"},body:{flex:"1",px:"6",pt:"2",pb:"6"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"3",px:"6",pt:"2",pb:"4"},title:{textStyle:"lg",fontWeight:"semibold"},description:{color:"fg.muted"},closeTrigger:{pos:"absolute",top:"2",insetEnd:"2"}},variants:{placement:{center:{positioner:{alignItems:"center"},content:{"--dialog-base-margin":"auto",mx:"auto"}},top:{positioner:{alignItems:"flex-start"},content:{"--dialog-base-margin":"spacing.16",mx:"auto"}},bottom:{positioner:{alignItems:"flex-end"},content:{"--dialog-base-margin":"spacing.16",mx:"auto"}}},scrollBehavior:{inside:{positioner:{overflow:"hidden"},content:{maxH:"calc(100% - 7.5rem)"},body:{overflow:"auto"}},outside:{positioner:{overflow:"auto",pointerEvents:"auto"}}},size:{xs:{content:{maxW:"sm"}},sm:{content:{maxW:"md"}},md:{content:{maxW:"lg"}},lg:{content:{maxW:"2xl"}},xl:{content:{maxW:"4xl"}},cover:{positioner:{padding:"10"},content:{width:"100%",height:"100%","--dialog-margin":"0"}},full:{content:{maxW:"100dvw",minH:"100dvh","--dialog-margin":"0",borderRadius:"0"}}},motionPreset:{scale:{content:{_open:{animationName:"scale-in, fade-in"},_closed:{animationName:"scale-out, fade-out"}}},"slide-in-bottom":{content:{_open:{animationName:"slide-from-bottom, fade-in"},_closed:{animationName:"slide-to-bottom, fade-out"}}},"slide-in-top":{content:{_open:{animationName:"slide-from-top, fade-in"},_closed:{animationName:"slide-to-top, fade-out"}}},"slide-in-left":{content:{_open:{animationName:"slide-from-left, fade-in"},_closed:{animationName:"slide-to-left, fade-out"}}},"slide-in-right":{content:{_open:{animationName:"slide-from-right, fade-in"},_closed:{animationName:"slide-to-right, fade-out"}}},none:{}}},defaultVariants:{size:"md",scrollBehavior:"outside",placement:"top",motionPreset:"scale"}});e.s(["dialogSlotRecipe",()=>ol],11021);let ou=ej({slots:ix.keys(),className:"chakra-drawer",base:{backdrop:{bg:"blackAlpha.500",pos:"fixed",insetInlineStart:0,top:0,w:"100vw",h:"100dvh",zIndex:"overlay",_open:{animationName:"fade-in",animationDuration:"slow"},_closed:{animationName:"fade-out",animationDuration:"moderate"}},positioner:{display:"flex",width:"100vw",height:"100dvh",position:"fixed",insetInlineStart:0,top:0,zIndex:"modal",overscrollBehaviorY:"none"},content:{display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,zIndex:"modal",textStyle:"sm",maxH:"100dvh",color:"inherit",bg:"bg.panel",boxShadow:"lg",_open:{animationDuration:"slowest",animationTimingFunction:"ease-in-smooth"},_closed:{animationDuration:"slower",animationTimingFunction:"ease-in-smooth"}},header:{display:"flex",alignItems:"center",gap:"2",flex:0,px:"6",pt:"6",pb:"4"},body:{px:"6",py:"2",flex:"1",overflow:"auto"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"3",px:"6",pt:"2",pb:"4"},title:{flex:"1",textStyle:"lg",fontWeight:"semibold"},description:{color:"fg.muted"},closeTrigger:{pos:"absolute",top:"3",insetEnd:"2"}},variants:{size:{xs:{content:{maxW:"xs"}},sm:{content:{maxW:"md"}},md:{content:{maxW:"lg"}},lg:{content:{maxW:"2xl"}},xl:{content:{maxW:"4xl"}},full:{content:{maxW:"100vw",h:"100dvh"}}},placement:{start:{positioner:{justifyContent:"flex-start",alignItems:"stretch"},content:{_open:{animationName:{base:"slide-from-left-full, fade-in",_rtl:"slide-from-right-full, fade-in"}},_closed:{animationName:{base:"slide-to-left-full, fade-out",_rtl:"slide-to-right-full, fade-out"}}}},end:{positioner:{justifyContent:"flex-end",alignItems:"stretch"},content:{_open:{animationName:{base:"slide-from-right-full, fade-in",_rtl:"slide-from-left-full, fade-in"}},_closed:{animationName:{base:"slide-to-right-full, fade-out",_rtl:"slide-to-left-full, fade-out"}}}},top:{positioner:{justifyContent:"stretch",alignItems:"flex-start"},content:{maxW:"100%",_open:{animationName:"slide-from-top-full, fade-in"},_closed:{animationName:"slide-to-top-full, fade-out"}}},bottom:{positioner:{justifyContent:"stretch",alignItems:"flex-end"},content:{maxW:"100%",_open:{animationName:"slide-from-bottom-full, fade-in"},_closed:{animationName:"slide-to-bottom-full, fade-out"}}}},contained:{true:{positioner:{padding:"4"},content:{borderRadius:"l3"}}}},defaultVariants:{size:"xs",placement:"end"}});e.s(["drawerSlotRecipe",()=>ou],67537);let oc=eH({fontSize:"inherit",fontWeight:"inherit",textAlign:"inherit",bg:"transparent",borderRadius:"l2"}),od=ej({slots:iw.keys(),className:"chakra-editable",base:{root:{display:"inline-flex",alignItems:"center",position:"relative",gap:"1.5",width:"full"},preview:{...oc,py:"1",px:"1",display:"inline-flex",alignItems:"center",transitionProperty:"common",transitionDuration:"moderate",cursor:"text",_hover:{bg:"bg.muted"},_disabled:{userSelect:"none"}},input:{...oc,outline:"0",py:"1",px:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",focusVisibleRing:"inside",focusRingWidth:"2px",_placeholder:{opacity:.6}},control:{display:"inline-flex",alignItems:"center",gap:"1.5"}},variants:{size:{sm:{root:{textStyle:"sm"},preview:{minH:"8"},input:{minH:"8"}},md:{root:{textStyle:"sm"},preview:{minH:"9"},input:{minH:"9"}},lg:{root:{textStyle:"md"},preview:{minH:"10"},input:{minH:"10"}}}},defaultVariants:{size:"md"}});e.s(["editableSlotRecipe",()=>od],49666);let oh=ej({slots:i_.keys(),className:"chakra-empty-state",base:{root:{width:"full"},content:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},indicator:{display:"flex",alignItems:"center",justifyContent:"center",color:"fg.subtle",_icon:{boxSize:"1em"}},title:{fontWeight:"semibold"},description:{textStyle:"sm",color:"fg.muted"}},variants:{size:{sm:{root:{px:"4",py:"6"},title:{textStyle:"md"},content:{gap:"4"},indicator:{textStyle:"2xl"}},md:{root:{px:"8",py:"12"},title:{textStyle:"lg"},content:{gap:"6"},indicator:{textStyle:"4xl"}},lg:{root:{px:"12",py:"16"},title:{textStyle:"xl"},content:{gap:"8"},indicator:{textStyle:"6xl"}}}},defaultVariants:{size:"md"}});e.s(["emptyStateSlotRecipe",()=>oh],24098);let of=ej({className:"chakra-field",slots:iC.keys(),base:{requiredIndicator:{color:"fg.error",lineHeight:"1"},root:{display:"flex",width:"100%",position:"relative",gap:"1.5"},label:{display:"flex",alignItems:"center",textAlign:"start",textStyle:"sm",fontWeight:"medium",gap:"1",userSelect:"none",_disabled:{opacity:"0.5"}},errorText:{display:"inline-flex",alignItems:"center",fontWeight:"medium",gap:"1",color:"fg.error",textStyle:"xs"},helperText:{color:"fg.muted",textStyle:"xs"}},variants:{orientation:{vertical:{root:{flexDirection:"column",alignItems:"flex-start"}},horizontal:{root:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},label:{flex:"0 0 var(--field-label-width, 80px)"}}}},defaultVariants:{orientation:"vertical"}});e.s(["fieldSlotRecipe",()=>of],63024);let op=ej({className:"fieldset",slots:ik.keys(),base:{root:{display:"flex",flexDirection:"column",width:"full"},content:{display:"flex",flexDirection:"column",width:"full"},legend:{color:"fg",fontWeight:"medium",_disabled:{opacity:"0.5"}},helperText:{color:"fg.muted",textStyle:"sm"},errorText:{display:"inline-flex",alignItems:"center",color:"fg.error",gap:"2",fontWeight:"medium",textStyle:"sm"}},variants:{size:{sm:{root:{spaceY:"2"},content:{gap:"1.5"},legend:{textStyle:"sm"}},md:{root:{spaceY:"4"},content:{gap:"4"},legend:{textStyle:"sm"}},lg:{root:{spaceY:"6"},content:{gap:"4"},legend:{textStyle:"md"}}}},defaultVariants:{size:"md"}});e.s(["fieldsetSlotRecipe",()=>op],72051);let og=ej({className:"chakra-file-upload",slots:iS.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"4",width:"100%",alignItems:"flex-start"},label:{fontWeight:"medium",textStyle:"sm"},dropzone:{background:"bg",borderRadius:"l3",borderWidth:"2px",borderStyle:"dashed",display:"flex",alignItems:"center",flexDirection:"column",gap:"4",justifyContent:"center",minHeight:"2xs",px:"3",py:"2",transition:"backgrounds",focusVisibleRing:"outside",_hover:{bg:"bg.subtle"},_dragging:{bg:"colorPalette.subtle",borderStyle:"solid",borderColor:"colorPalette.solid"}},dropzoneContent:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:"1",textStyle:"sm"},item:{pos:"relative",textStyle:"sm",animationName:"fade-in",animationDuration:"moderate",background:"bg",borderRadius:"l2",borderWidth:"1px",width:"100%",display:"flex",alignItems:"center",gap:"3",p:"4"},itemGroup:{width:"100%",display:"flex",flexDirection:"column",gap:"3",_empty:{display:"none"}},itemName:{color:"fg",fontWeight:"medium",lineClamp:"1"},itemContent:{display:"flex",flexDirection:"column",gap:"0.5",flex:"1"},itemSizeText:{color:"fg.muted",textStyle:"xs"},itemDeleteTrigger:{display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"flex-start",boxSize:"5",p:"2px",color:"fg.muted",cursor:"button"},itemPreview:{color:"fg.muted",_icon:{boxSize:"4.5"}}},defaultVariants:{}});e.s(["fileUploadSlotRecipe",()=>og],23258);var om=(0,t_.createAnatomy)("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");om.build();var ov=e=>e.getById(e.ids?.trigger??`hover-card:${e.id}:trigger`),ob=e=>e.getById(e.ids?.positioner??`hover-card:${e.id}:popper`),{not:oy,and:ox}=(0,tX.createGuards)();(0,tX.createMachine)({props:({props:e})=>({disabled:!1,openDelay:600,closeDelay:300,...e,positioning:{placement:"bottom",...e.positioning}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",context:({prop:e,bindable:t})=>({open:t(()=>({defaultValue:e("defaultOpen"),value:e("open"),onChange(t){e("onOpenChange")?.({open:t})}})),currentPlacement:t(()=>({defaultValue:void 0})),isPointer:t(()=>({defaultValue:!1}))}),watch({track:e,context:t,action:r,prop:n,send:i}){e([()=>n("disabled")],()=>{n("disabled")&&i({type:"CLOSE",src:"disabled.change"})}),e([()=>t.get("open")],()=>{r(["toggleVisibility"])})},states:{closed:{tags:["closed"],entry:["clearIsPointer"],on:{"CONTROLLED.OPEN":{target:"open"},POINTER_ENTER:{target:"opening",actions:["setIsPointer"]},TRIGGER_FOCUS:{target:"opening"},OPEN:{target:"opening"}}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{OPEN_DELAY:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},POINTER_LEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose","toggleVisibility"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_BLUR:[{guard:ox("isOpenControlled",oy("isPointer")),actions:["invokeOnClose","toggleVisibility"]},{guard:oy("isPointer"),target:"closed",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose","toggleVisibility"]},{target:"closed",actions:["invokeOnClose"]}]}},open:{tags:["open"],effects:["trackDismissableElement","trackPositioning"],on:{"CONTROLLED.CLOSE":{target:"closed"},POINTER_ENTER:{actions:["setIsPointer"]},POINTER_LEAVE:{target:"closing"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_BLUR:[{guard:ox("isOpenControlled",oy("isPointer")),actions:["invokeOnClose"]},{guard:oy("isPointer"),target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}},closing:{tags:["open"],effects:["trackPositioning","waitForCloseDelay"],on:{CLOSE_DELAY:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"CONTROLLED.CLOSE":{target:"closed"},"CONTROLLED.OPEN":{target:"open"},POINTER_ENTER:{target:"open",actions:["setIsPointer"]}}}},implementations:{guards:{isPointer:({context:e})=>!!e.get("isPointer"),isOpenControlled:({prop:e})=>null!=e("open")},effects:{waitForOpenDelay({send:e,prop:t}){let r=setTimeout(()=>{e({type:"OPEN_DELAY"})},t("openDelay"));return()=>clearTimeout(r)},waitForCloseDelay({send:e,prop:t}){let r=setTimeout(()=>{e({type:"CLOSE_DELAY"})},t("closeDelay"));return()=>clearTimeout(r)},trackPositioning:({context:e,prop:t,scope:r})=>(e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement),(0,tK.getPlacement)(ov(r),()=>ob(r),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),trackDismissableElement:({send:e,scope:t,prop:r})=>(0,tQ.trackDismissableElement)(()=>t.getById(t.ids?.content??`hover-card:${t.id}:content`),{type:"popover",defer:!0,exclude:[ov(t)],onDismiss(){e({type:"CLOSE",src:"interact-outside"})},onInteractOutside:r("onInteractOutside"),onPointerDownOutside:r("onPointerDownOutside"),onFocusOutside(e){e.preventDefault(),r("onFocusOutside")?.(e)}})},actions:{invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},setIsPointer({context:e}){e.set("isPointer",!0)},clearIsPointer({context:e}){e.set("isPointer",!1)},reposition({context:e,prop:t,scope:r,event:n}){(0,tK.getPlacement)(ov(r),()=>ob(r),{...t("positioning"),...n.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},toggleVisibility({prop:e,event:t,send:r}){queueMicrotask(()=>{r({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})})}}}});var ow=(0,tZ.createProps)()(["closeDelay","dir","getRootNode","id","ids","disabled","onOpenChange","defaultOpen","open","openDelay","positioning","onInteractOutside","onPointerDownOutside","onFocusOutside"]);(0,tC.createSplitProps)(ow);let o_=ej({className:"chakra-hover-card",slots:om.keys(),base:{content:{position:"relative",display:"flex",flexDirection:"column",textStyle:"sm","--hovercard-bg":"colors.bg.panel",bg:"var(--hovercard-bg)",boxShadow:"lg",maxWidth:"80",borderRadius:"l3",zIndex:"popover",transformOrigin:"var(--transform-origin)",outline:"0",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"faster"}},arrow:{"--arrow-size":"sizes.3","--arrow-background":"var(--hovercard-bg)"},arrowTip:{borderTopWidth:"0.5px",borderInlineStartWidth:"0.5px"}},variants:{size:{xs:{content:{padding:"3"}},sm:{content:{padding:"4"}},md:{content:{padding:"5"}},lg:{content:{padding:"6"}}}},defaultVariants:{size:"md"}});e.s(["hoverCardSlotRecipe",()=>o_],43797);let oC=ej({className:"chakra-list",slots:iE.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"var(--list-gap)","& :where(ul, ol)":{marginTop:"var(--list-gap)"}},item:{whiteSpace:"normal",display:"list-item"},indicator:{marginEnd:"2",minHeight:"1lh",flexShrink:0,display:"inline-block",verticalAlign:"middle"}},variants:{variant:{marker:{root:{listStyle:"revert"},item:{_marker:{color:"fg.subtle"}}},plain:{item:{alignItems:"flex-start",display:"inline-flex"}}},align:{center:{item:{alignItems:"center"}},start:{item:{alignItems:"flex-start"}},end:{item:{alignItems:"flex-end"}}}},defaultVariants:{variant:"marker"}});e.s(["listSlotRecipe",()=>oC],18401);let ok=ej({className:"chakra-listbox",slots:ng.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},content:{display:"flex",maxH:"96",p:"1",gap:"1",textStyle:"sm",outline:"none",scrollPadding:"1",_horizontal:{flexDirection:"row",overflowX:"auto"},_vertical:{flexDirection:"column",overflowY:"auto"},"--listbox-item-padding-x":"spacing.2","--listbox-item-padding-y":"spacing.1.5"},item:{position:"relative",userSelect:"none",display:"flex",alignItems:"center",gap:"2",cursor:"pointer",justifyContent:"space-between",flex:"1",textAlign:"start",borderRadius:"l1",py:"var(--listbox-item-padding-y)",px:"var(--listbox-item-padding-x)",_highlighted:{outline:"2px solid",outlineColor:"border.emphasized"},_disabled:{pointerEvents:"none",opacity:"0.5"}},empty:{py:"var(--listbox-item-padding-y)",px:"var(--listbox-item-padding-x)"},itemText:{flex:"1"},itemGroup:{mt:"1.5",_first:{mt:"0"}},itemGroupLabel:{py:"1.5",px:"2",fontWeight:"medium"},label:{fontWeight:"medium",userSelect:"none",textStyle:"sm",_disabled:{layerStyle:"disabled"}},valueText:{lineClamp:"1",maxW:"80%"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center",_icon:{boxSize:"4"}}},variants:{variant:{subtle:{content:{bg:"bg.panel",borderWidth:"1px",borderRadius:"l2"},item:{_hover:{bg:"bg.emphasized/60"},_selected:{bg:"bg.muted"}}},solid:{content:{bg:"bg.panel",borderWidth:"1px",borderRadius:"l2"},item:{_selected:{bg:"colorPalette.solid",color:"colorPalette.contrast"}}},plain:{}}},defaultVariants:{variant:"subtle"}});e.s(["listboxSlotRecipe",()=>ok],24004);let oS=ej({className:"chakra-menu",slots:iO.keys(),base:{content:{outline:0,bg:"bg.panel",boxShadow:"lg",color:"fg",maxHeight:"var(--available-height)","--menu-z-index":"zIndex.dropdown",zIndex:"calc(var(--menu-z-index) + var(--layer-index, 0))",borderRadius:"l2",overflow:"hidden",overflowY:"auto",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"faster"}},item:{textDecoration:"none",color:"fg",userSelect:"none",borderRadius:"l1",width:"100%",display:"flex",cursor:"menuitem",alignItems:"center",textAlign:"start",position:"relative",flex:"0 0 auto",outline:0,_disabled:{layerStyle:"disabled"},"&[data-type]":{ps:"8"}},itemText:{flex:"1"},itemIndicator:{position:"absolute",insetStart:"2",transform:"translateY(-50%)",top:"50%"},itemGroupLabel:{px:"2",py:"1.5",fontWeight:"semibold",textStyle:"sm"},indicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0"},itemCommand:{opacity:"0.6",textStyle:"xs",ms:"auto",ps:"4",letterSpacing:"widest",fontFamily:"inherit"},separator:{height:"1px",bg:"bg.muted",my:"1",mx:"-1"}},variants:{variant:{subtle:{item:{_highlighted:{bg:"bg.emphasized/60"}}},solid:{item:{_highlighted:{bg:"colorPalette.solid",color:"colorPalette.contrast"}}}},size:{sm:{content:{minW:"8rem",padding:"1",scrollPadding:"1"},item:{gap:"1",textStyle:"xs",py:"1",px:"1.5"}},md:{content:{minW:"8rem",padding:"1.5",scrollPadding:"1.5"},item:{gap:"2",textStyle:"sm",py:"1.5",px:"2"}}}},defaultVariants:{size:"md",variant:"subtle"}});e.s(["menuSlotRecipe",()=>oS],15127);let oE=ej({className:"chakra-select",slots:iM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"full",minH:"var(--select-trigger-height)","--input-height":"var(--select-trigger-height)",px:"var(--select-trigger-padding-x)",borderRadius:"l2",userSelect:"none",textAlign:"start",focusVisibleRing:"inside",_placeholderShown:{color:"fg.muted/80"},_disabled:{layerStyle:"disabled"},_invalid:{borderColor:"border.error"}},indicatorGroup:{display:"flex",alignItems:"center",gap:"1",pos:"absolute",insetEnd:"0",top:"0",bottom:"0",px:"var(--select-trigger-padding-x)",pointerEvents:"none"},indicator:{display:"flex",alignItems:"center",justifyContent:"center",color:{base:"fg.muted",_disabled:"fg.subtle",_invalid:"fg.error"}},content:{background:"bg.panel",display:"flex",flexDirection:"column",zIndex:"dropdown",borderRadius:"l2",outline:0,maxH:"96",overflowY:"auto",boxShadow:"md",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"fastest"}},item:{position:"relative",userSelect:"none",display:"flex",alignItems:"center",gap:"2",cursor:"option",justifyContent:"space-between",flex:"1",textAlign:"start",borderRadius:"l1",_highlighted:{bg:"bg.emphasized/60"},_disabled:{pointerEvents:"none",opacity:"0.5"},_icon:{width:"4",height:"4"}},control:{pos:"relative"},itemText:{flex:"1"},itemGroup:{_first:{mt:"0"}},itemGroupLabel:{py:"1",fontWeight:"medium"},label:{fontWeight:"medium",userSelect:"none",textStyle:"sm",_disabled:{layerStyle:"disabled"}},valueText:{lineClamp:"1",maxW:"80%"},clearTrigger:{color:"fg.muted",pointerEvents:"auto",focusVisibleRing:"inside",focusRingWidth:"2px",rounded:"l1"}},variants:{variant:{outline:{trigger:{bg:"transparent",borderWidth:"1px",borderColor:"border",_expanded:{borderColor:"border.emphasized"}}},subtle:{trigger:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted"}}},size:{xs:{root:{"--select-trigger-height":"sizes.8","--select-trigger-padding-x":"spacing.2"},content:{p:"1",gap:"1",textStyle:"xs"},trigger:{textStyle:"xs",gap:"1"},item:{py:"1",px:"2"},itemGroupLabel:{py:"1",px:"2"},indicator:{_icon:{width:"3.5",height:"3.5"}}},sm:{root:{"--select-trigger-height":"sizes.9","--select-trigger-padding-x":"spacing.2.5"},content:{p:"1",textStyle:"sm"},trigger:{textStyle:"sm",gap:"1"},indicator:{_icon:{width:"4",height:"4"}},item:{py:"1",px:"1.5"},itemGroup:{mt:"1"},itemGroupLabel:{py:"1",px:"1.5"}},md:{root:{"--select-trigger-height":"sizes.10","--select-trigger-padding-x":"spacing.3"},content:{p:"1",textStyle:"sm"},itemGroup:{mt:"1.5"},item:{py:"1.5",px:"2"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center"},itemGroupLabel:{py:"1.5",px:"2"},trigger:{textStyle:"sm",gap:"2"},indicator:{_icon:{width:"4",height:"4"}}},lg:{root:{"--select-trigger-height":"sizes.12","--select-trigger-padding-x":"spacing.4"},content:{p:"1.5",textStyle:"md"},itemGroup:{mt:"2"},item:{py:"2",px:"3"},itemGroupLabel:{py:"2",px:"3"},trigger:{textStyle:"md",py:"3",gap:"2"},indicator:{_icon:{width:"5",height:"5"}}}}},defaultVariants:{size:"md",variant:"outline"}});e.s(["selectSlotRecipe",()=>oE],924);let oO=ej({className:"chakra-native-select",slots:iI.keys(),base:{root:{height:"fit-content",display:"flex",width:"100%",position:"relative"},field:{width:"100%",minWidth:"0",outline:"0",appearance:"none",borderRadius:"l2","--error-color":"colors.border.error","--input-height":"var(--select-field-height)",height:"var(--select-field-height)",_disabled:{layerStyle:"disabled"},_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"},focusVisibleRing:"inside",lineHeight:"normal","& > option, & > optgroup":{bg:"bg"}},indicator:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)",height:"100%",color:"fg.muted",_disabled:{opacity:"0.5"},_invalid:{color:"fg.error"},_icon:{width:"1em",height:"1em"}}},variants:{variant:{outline:{field:oE.variants?.variant.outline.trigger},subtle:{field:oE.variants?.variant.subtle.trigger},plain:{field:{bg:"transparent",color:"fg",focusRingWidth:"2px"}}},size:{xs:{root:{"--select-field-height":"sizes.8"},field:{textStyle:"xs",ps:"2",pe:"6"},indicator:{textStyle:"sm",insetEnd:"1.5"}},sm:{root:{"--select-field-height":"sizes.9"},field:{textStyle:"sm",ps:"2.5",pe:"8"},indicator:{textStyle:"md",insetEnd:"2"}},md:{root:{"--select-field-height":"sizes.10"},field:{textStyle:"sm",ps:"3",pe:"8"},indicator:{textStyle:"lg",insetEnd:"2"}},lg:{root:{"--select-field-height":"sizes.11"},field:{textStyle:"md",ps:"4",pe:"8"},indicator:{textStyle:"xl",insetEnd:"3"}},xl:{root:{"--select-field-height":"sizes.12"},field:{textStyle:"md",ps:"4.5",pe:"10"},indicator:{textStyle:"xl",insetEnd:"3"}}}},defaultVariants:oE.defaultVariants});e.s(["nativeSelectSlotRecipe",()=>oO],61722);let oI=new Map,oP=!1;try{oP="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let oT=!1;try{oT="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}let oR={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class oA{format(e){let t="";if(t=oP||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,t,r){if("auto"===t)return e.format(r);{if("never"===t)return e.format(Math.abs(r));let n=!1;if("always"===t?n=r>0||Object.is(r,0):"exceptZero"===t&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),!n)return e.format(r);{let t=e.format(-r),n=e.format(r),i=t.replace(n,"").replace(/\u200e|\u061C/,"");return 1!=[...i].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),t.replace(n,"!!!").replace(i,"+").replace("!!!",n)}}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!oT){var r;let{unit:e,unitDisplay:n="short",locale:i}=this.resolvedOptions();if(!e)return t;let o=null==(r=oR[e])?void 0:r[n];t+=o[i]||o.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return oP||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),oT||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=function(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),"unit"===t.style&&!oT){var n;let{unit:e,unitDisplay:r="short"}=t;if(!e)throw Error('unit option must be provided with style: "unit"');if(!(null==(n=oR[e])?void 0:n[r]))throw Error(`Unsupported unit ${e} with unitDisplay = ${r}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(oI.has(i))return oI.get(i);let o=new Intl.NumberFormat(e,t);return oI.set(i,o),o}(e,t),this.options=t}}let oM=RegExp("^.*\\(.*\\).*$"),oN=["latn","arab","hanidec","deva","beng","fullwide"];class oD{parse(e){return oV(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,r){return oV(this.locale,this.options,e).isValidPartialNumber(e,t,r)}getNumberingSystem(e){return oV(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}let oL=new Map;function oV(e,t,r){let n=oF(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(r)){for(let i of oN)if(i!==n.options.numberingSystem){let n=oF(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(n.isValidPartialNumber(r))return n}}return n}function oF(e,t){let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():""),n=oL.get(r);return n||(n=new oj(e,t),oL.set(r,n)),n}class oj{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=oH(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=t.indexOf("-"),r=(t=(t=t.replace("-","")).replace("+","")).indexOf(".");-1===r&&(r=t.length),t=t.replace(".",""),t=r-2==0?`0.${t}`:r-2==-1?`0.0${t}`:r-2==-2?"0.00":`${t.slice(0,r-2)}.${t.slice(r-2)}`,e>-1&&(t=`-${t}`)}let r=t?+t:NaN;if(isNaN(r))return NaN;if("percent"===this.options.style){var n,i;let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((null!=(n=this.options.minimumFractionDigits)?n:0)+2,20),maximumFractionDigits:Math.min((null!=(i=this.options.maximumFractionDigits)?i:0)+2,20)};return new oD(this.locale,e).parse(new oA(this.locale,e).format(r))}return"accounting"===this.options.currencySign&&oM.test(e)&&(r*=-1),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=(e=e.replace(",",this.symbols.decimal)).replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(e=oH(e,".",this.symbols.group))),"’"===this.symbols.group&&e.includes("'")&&(e=oH(e,"'",this.symbols.group)),"fr-FR"===this.options.locale&&this.symbols.group&&(e=oH(e," ",this.symbols.group),e=oH(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),!(this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&0===this.options.maximumFractionDigits)&&(this.symbols.group&&(e=oH(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0===e.length)}constructor(e,t={}){var r,n;this.locale=e,1!==t.roundingIncrement&&null!=t.roundingIncrement&&(null==t.maximumFractionDigits&&null==t.minimumFractionDigits?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):null==t.maximumFractionDigits?t.maximumFractionDigits=t.minimumFractionDigits:null==t.minimumFractionDigits&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,r,n){var i,o,a,s,l;let u=new Intl.NumberFormat(e,{...r,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=u.formatToParts(-10000.111),d=u.formatToParts(10000.111),h=oB.map(e=>u.formatToParts(e)),f=null!=(l=null==(i=c.find(e=>"minusSign"===e.type))?void 0:i.value)?l:"-",p=null==(o=d.find(e=>"plusSign"===e.type))?void 0:o.value;p||(null==n?void 0:n.signDisplay)!=="exceptZero"&&(null==n?void 0:n.signDisplay)!=="always"||(p="+");let g=null==(a=new Intl.NumberFormat(e,{...r,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>"decimal"===e.type))?void 0:a.value,m=null==(s=c.find(e=>"group"===e.type))?void 0:s.value,v=[...new Set([...c.filter(e=>!oz.has(e.type)).map(e=>oW(e.value)),...h.flatMap(e=>e.filter(e=>!oz.has(e.type)).map(e=>oW(e.value)))])].sort((e,t)=>t.length-e.length),b=0===v.length?RegExp("[\\p{White_Space}]","gu"):RegExp(`${v.join("|")}|[\\p{White_Space}]`,"gu"),y=[...new Intl.NumberFormat(r.locale,{useGrouping:!1}).format(0x24cb016ea)].reverse(),x=new Map(y.map((e,t)=>[e,t]));return{minusSign:f,plusSign:p,decimal:g,group:m,literals:b,numeral:RegExp(`[${y.join("")}]`,"g"),index:e=>String(x.get(e))}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((null!=(r=this.options.minimumFractionDigits)?r:0)>18||(null!=(n=this.options.maximumFractionDigits)?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}let oz=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),oB=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function oH(e,t,r){return e.replaceAll?e.replaceAll(t,r):e.split(t).join(r)}function oW(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var oU=(0,t_.createAnatomy)("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber");oU.build();var o$=e=>`number-input:${e.id}:cursor`,oq=e=>e.getById(e.ids?.input??`number-input:${e.id}:input`),oG=e=>e.getDoc().getElementById(o$(e));function oK(e,t,r){let n=e.slice(0,r),i=e.slice(r),o=0,a=Math.min(n.length,t.length);for(let e=0;e<a;e++)if(n[e]===t[e])o=e+1;else break;let s=0,l=Math.min(i.length,t.length-o);for(let e=0;e<l;e++){let r=i.length-1-e,n=t.length-1-e;if(i[r]===t[n])s=e+1;else break}return o>=n.length?o:s>=i.length?t.length-s:o>0?o:s>0?t.length-s:e.length>0?Math.round(r/e.length*t.length):t.length}var oY=(e,t)=>{let{prop:r,computed:n}=t;return r("formatOptions")?""===e?NaN:n("parser").parse(e):parseFloat(e)},oX=(e,t)=>{let{prop:r,computed:n}=t;return Number.isNaN(e)?"":r("formatOptions")?n("formatter").format(e):e.toString()},{choose:oQ,guards:oZ,createMachine:oJ}=(0,tX.setup)(),{not:o0,and:o1}=oZ;oJ({props({props:e}){var t,r;let n,i=(t=e.step,r=e.formatOptions,n=void 0===t||Number.isNaN(t)?1:t,r?.style==="percent"&&(void 0===t||Number.isNaN(t))&&(n=.01),n);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:i,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,translations:{incrementLabel:"increment value",decrementLabel:"decrease value",...e.translations}}},initialState:()=>"idle",context:({prop:e,bindable:t,getComputed:r})=>({value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(t){let n=oY(t,{computed:r(),prop:e});e("onValueChange")?.({value:t,valueAsNumber:n})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash:e=>e?`x:${e.x}, y:${e.y}`:""})),fieldsetDisabled:t(()=>({defaultValue:!1}))}),computed:{isRtl:({prop:e})=>"rtl"===e("dir"),valueAsNumber:({context:e,computed:t,prop:r})=>oY(e.get("value"),{computed:t,prop:r}),formattedValue:({computed:e,prop:t})=>oX(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>(0,tC.isValueAtMin)(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>(0,tC.isValueAtMax)(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!(0,tC.isValueWithinRange)(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>""===e.get("value"),isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>e("translations").valueText?.(t.get("value")),formatter:(0,tX.memo)(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>((e,t={})=>new Intl.NumberFormat(e,t))(e,t)),parser:(0,tX.memo)(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>((e,t={})=>new oD(e,t))(e,t))},watch({track:e,action:t,context:r,computed:n,prop:i}){e([()=>r.get("value"),()=>i("locale")],()=>{t(["syncInputElement"])}),e([()=>n("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>r.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:o1("clampValueOnBlur",o0("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur"]},{guard:o0("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:oQ([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:o1("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>"touch"===e.pointerType},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){let r=oq(t);return(0,tG.trackFormControl)(r,{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){var r,n;let i,o,a=e.get("scrubberCursorPoint");return(0,tG.isSafari)()?void 0:(r=t,n=a,(o=(i=r.getDoc()).createElement("div")).className="scrubber--cursor",o.id=o$(r),Object.assign(o.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:tG.MAX_Z_INDEX,transform:n?`translate3d(${n.x}px, ${n.y}px, 0px)`:void 0,willChange:"transform"}),o.innerHTML=`
|
|
6
|
+
<svg width="46" height="15" style="left: -15.5px; position: absolute; top: 0; filter: drop-shadow(rgba(0, 0, 0, 0.4) 0px 1px 1.1px);">
|
|
7
|
+
<g transform="translate(2 3)">
|
|
8
|
+
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z" style="stroke-width: 2px; stroke: white;"></path>
|
|
9
|
+
<path fill-rule="evenodd" d="M 15 4.5L 15 2L 11.5 5.5L 15 9L 15 6.5L 31 6.5L 31 9L 34.5 5.5L 31 2L 31 4.5Z"></path>
|
|
10
|
+
</g>
|
|
11
|
+
</svg>`,i.body.appendChild(o),()=>{oG(t)?.remove()})},preventTextSelection:({scope:e})=>{let t,r,n;return r=(t=e.getDoc()).documentElement,(n=t.body).style.pointerEvents="none",r.style.userSelect="none",r.style.cursor="ew-resize",()=>{n.style.pointerEvents="",r.style.userSelect="",r.style.cursor="",r.style.length||r.removeAttribute("style"),n.style.length||n.removeAttribute("style")}},trackButtonDisabled({context:e,scope:t,send:r}){let n,i=e.get("hint"),o=(n=null,"increment"===i&&(n=t.getById(t.ids?.incrementTrigger??`number-input:${t.id}:inc`)),"decrement"===i&&(n=t.getById(t.ids?.decrementTrigger??`number-input:${t.id}:dec`)),n);return(0,tG.observeAttributes)(o,{attributes:["disabled"],callback(){r({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:r}){let n=oq(e);if(n&&e.isActiveElement(n)&&r("allowMouseWheel"))return(0,tG.addDomEvent)(n,"wheel",function(e){e.preventDefault();let r=-1*Math.sign(e.deltaY);1===r?t({type:"VALUE.INCREMENT"}):-1===r&&t({type:"VALUE.DECREMENT"})},{passive:!1})},activatePointerLock({scope:e}){if(!(0,tG.isSafari)())return(0,tG.requestPointerLock)(e.getDoc())},trackMousemove({scope:e,send:t,context:r,computed:n}){let i=e.getDoc();return(0,tC.callAll)((0,tG.addDomEvent)(i,"mousemove",function(i){let o=((e,t)=>{let{point:r,isRtl:n,event:i}=t,o=e.getWin(),a=(0,tC.roundToDpr)(i.movementX,o.devicePixelRatio),s=(0,tC.roundToDpr)(i.movementY,o.devicePixelRatio),l=a>0?"increment":a<0?"decrement":null;n&&"increment"===l&&(l="decrement"),n&&"decrement"===l&&(l="increment");let u={x:r.x+a,y:r.y+s},c=o.innerWidth,d=(0,tC.roundToDpr)(7.5,o.devicePixelRatio);return u.x=(0,tC.wrap)(u.x+d,c)-d,{hint:l,point:u}})(e,{point:r.get("scrubberCursorPoint"),isRtl:n("isRtl"),event:i});o.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:o.hint,point:o.point})},!1),(0,tG.addDomEvent)(i,"mouseup",function(){t({type:"SCRUBBER.POINTER_UP"})},!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;let r=oq(e);e.isActiveElement(r)||(0,tG.raf)(()=>r?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:r,computed:n}){let i=(0,tC.incrementValue)(n("valueAsNumber"),t.step??r("step"));r("allowOverflow")||(i=(0,tC.clampValue)(i,r("min"),r("max"))),e.set("value",oX(i,{computed:n,prop:r}))},decrement({context:e,event:t,prop:r,computed:n}){let i=(0,tC.decrementValue)(n("valueAsNumber"),t.step??r("step"));r("allowOverflow")||(i=(0,tC.clampValue)(i,r("min"),r("max"))),e.set("value",oX(i,{computed:n,prop:r}))},setClampedValue({context:e,prop:t,computed:r}){let n=(0,tC.clampValue)(r("valueAsNumber"),t("min"),t("max"));e.set("value",oX(n,{computed:r,prop:t}))},setRawValue({context:e,event:t,prop:r,computed:n}){let i=oY(t.value,{computed:n,prop:r});r("allowOverflow")||(i=(0,tC.clampValue)(i,r("min"),r("max"))),e.set("value",oX(i,{computed:n,prop:r}))},setValue({context:e,event:t}){let r=t.target?.value??t.value;e.set("value",r)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:r}){let n=oX(t("max"),{computed:r,prop:t});e.set("value",n)},decrementToMin({context:e,prop:t,computed:r}){let n=oX(t("min"),{computed:r,prop:t});e.set("value",n)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){t("onFocusChange")?.({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){t("onFocusChange")?.({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:r}){if("INPUT.CHANGE"===r.type)return;let n=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";t("onValueInvalid")?.({reason:n,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:r,scope:n}){let i=t.type.endsWith("CHANGE")?e.get("value"):r("formattedValue"),o=oq(n),a=t.selection;(0,tG.raf)(()=>{(0,tG.setElementValue)(o,i),function(e,t,r){if(e&&r.isActiveElement(e)){if(!t){let t=e.value.length;e.setSelectionRange(t,t);return}try{let r=e.value,{start:n,end:i,value:o}=t;if(r===o)return void e.setSelectionRange(n,i);let a=oK(o,r,n),s=n===i?a:oK(o,r,i),l=Math.max(0,Math.min(a,r.length)),u=Math.max(l,Math.min(s,r.length));e.setSelectionRange(l,u)}catch{let t=e.value.length;e.setSelectionRange(t,t)}}}(o,a,n)})},setFormattedValue({context:e,computed:t}){e.set("value",t("formattedValue"))},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){let r=oG(t),n=e.get("scrubberCursorPoint");r&&n&&(r.style.transform=`translate3d(${n.x}px, ${n.y}px, 0px)`)}}}});var o2=(0,tZ.createProps)()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]);(0,tC.createSplitProps)(o2);let o5=eH({display:"flex",justifyContent:"center",alignItems:"center",flex:"1",userSelect:"none",cursor:"button",lineHeight:"1",color:"fg.muted","--stepper-base-radius":"radii.l1","--stepper-radius":"calc(var(--stepper-base-radius) + 1px)",_icon:{boxSize:"1em"},_disabled:{opacity:"0.5"},_hover:{bg:"bg.muted"},_active:{bg:"bg.emphasized"}}),o3=ej({className:"chakra-number-input",slots:oU.keys(),base:{root:{position:"relative",zIndex:"0",isolation:"isolate"},input:{...th.base,verticalAlign:"top",pe:"calc(var(--stepper-width) + 0.5rem)"},control:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",width:"var(--stepper-width)",height:"calc(100% - 2px)",zIndex:"1",borderStartWidth:"1px",divideY:"1px"},incrementTrigger:{...o5,borderTopEndRadius:"var(--stepper-radius)"},decrementTrigger:{...o5,borderBottomEndRadius:"var(--stepper-radius)"},valueText:{fontWeight:"medium",fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"}},variants:{size:{xs:{input:th.variants.size.xs,control:{fontSize:"2xs","--stepper-width":"sizes.4"}},sm:{input:th.variants.size.sm,control:{fontSize:"xs","--stepper-width":"sizes.5"}},md:{input:th.variants.size.md,control:{fontSize:"sm","--stepper-width":"sizes.6"}},lg:{input:th.variants.size.lg,control:{fontSize:"sm","--stepper-width":"sizes.6"}}},variant:h(th.variants.variant,(e,t)=>[e,{input:t}])},defaultVariants:{size:"md",variant:"outline"}});e.s(["numberInputSlotRecipe",()=>o3],90963);var o4=(0,t_.createAnatomy)("pinInput").parts("root","label","input","control");o4.build();var o6=e=>e.ids?.root??`pin-input:${e.id}`,o8=e=>{let t=CSS.escape(o6(e)),r=`input[data-ownedby=${t}]`;return(0,tG.queryAll)(e.getById(o6(e)),r)},o7=(e,t)=>o8(e)[t],o9=e=>e.getById(e.ids?.hiddenInput??`pin-input:${e.id}:hidden`),ae=(e,t)=>{e.value=t,e.setAttribute("value",t)},{choose:at,createMachine:ar}=(0,tX.setup)();function an(e,t){let r=t;e[0]===t[0]?r=t[1]:e[0]===t[1]&&(r=t[0]);let n=r.split("");return(r=n[n.length-1])??""}function ai(e,t){return Array.from({length:t}).fill("").map((t,r)=>e[r]||t)}ar({props:({props:e})=>({placeholder:"○",otp:!1,type:"numeric",defaultValue:e.count?ai([],e.count):[],...e,translations:{inputLabel:(e,t)=>`pin code ${e+1} of ${t}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t})=>({value:t(()=>({value:e("value"),defaultValue:e("defaultValue"),isEqual:tC.isEqual,onChange(t){e("onValueChange")?.({value:t,valueAsString:t.join("")})}})),focusedIndex:t(()=>({sync:!0,defaultValue:-1})),count:t(()=>({defaultValue:e("count")}))}),computed:{_value:({context:e})=>ai(e.get("value"),e.get("count")),valueLength:({computed:e})=>e("_value").length,filledValueLength:({computed:e})=>e("_value").filter(e=>e?.trim()!=="").length,isValueComplete:({computed:e})=>e("valueLength")===e("filledValueLength"),valueAsString:({computed:e})=>e("_value").join(""),focusedValue:({computed:e,context:t})=>e("_value")[t.get("focusedIndex")]||""},entry:at([{guard:"autoFocus",actions:["setInputCount","setFocusIndexToFirst"]},{actions:["setInputCount"]}]),watch({action:e,track:t,context:r,computed:n}){t([()=>r.get("focusedIndex")],()=>{e(["focusInput","selectInputIfNeeded"])}),t([()=>r.get("value").join(",")],()=>{e(["syncInputElements","dispatchInputEvent"])}),t([()=>n("isValueComplete")],()=>{e(["invokeOnComplete","blurFocusedInputIfNeeded"])})},on:{"VALUE.SET":[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],"VALUE.CLEAR":{actions:["clearValue","setFocusIndexToFirst"]}},states:{idle:{on:{"INPUT.FOCUS":{target:"focused",actions:["setFocusedIndex"]}}},focused:{on:{"INPUT.CHANGE":{actions:["setFocusedValue","syncInputValue","setNextFocusedIndex"]},"INPUT.PASTE":{actions:["setPastedValue","setLastValueFocusIndex"]},"INPUT.FOCUS":{actions:["setFocusedIndex"]},"INPUT.BLUR":{target:"idle",actions:["clearFocusedIndex"]},"INPUT.DELETE":{guard:"hasValue",actions:["clearFocusedValue"]},"INPUT.ARROW_LEFT":{actions:["setPrevFocusedIndex"]},"INPUT.ARROW_RIGHT":{actions:["setNextFocusedIndex"]},"INPUT.BACKSPACE":[{guard:"hasValue",actions:["clearFocusedValue"]},{actions:["setPrevFocusedIndex","clearFocusedValue"]}],"INPUT.ENTER":{guard:"isValueComplete",actions:["requestFormSubmit"]},"VALUE.INVALID":{actions:["invokeOnInvalid"]}}}},implementations:{guards:{autoFocus:({prop:e})=>!!e("autoFocus"),hasValue:({context:e})=>""!==e.get("value")[e.get("focusedIndex")],isValueComplete:({computed:e})=>e("isValueComplete"),hasIndex:({event:e})=>void 0!==e.index},actions:{dispatchInputEvent({computed:e,scope:t}){let r=o9(t);(0,tG.dispatchInputValueEvent)(r,{value:e("valueAsString")})},setInputCount({scope:e,context:t,prop:r}){if(r("count"))return;let n=o8(e);t.set("count",n.length)},focusInput({context:e,scope:t}){let r=e.get("focusedIndex");-1!==r&&o7(t,r)?.focus({preventScroll:!0})},selectInputIfNeeded({context:e,prop:t,scope:r}){let n=e.get("focusedIndex");t("selectOnFocus")&&-1!==n&&(0,tG.raf)(()=>{o7(r,n)?.select()})},invokeOnComplete({computed:e,prop:t}){e("isValueComplete")&&t("onValueComplete")?.({value:e("_value"),valueAsString:e("valueAsString")})},invokeOnInvalid({context:e,event:t,prop:r}){r("onValueInvalid")?.({value:t.value,index:e.get("focusedIndex")})},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},setValue({context:e,event:t}){let r=ai(t.value,e.get("count"));e.set("value",r)},setFocusedValue({context:e,event:t,computed:r,flush:n}){let i=r("focusedValue"),o=e.get("focusedIndex"),a=an(i,t.value);n(()=>{e.set("value",(0,tC.setValueAtIndex)(r("_value"),o,a))})},revertInputValue({context:e,computed:t,scope:r}){ae(o7(r,e.get("focusedIndex")),t("focusedValue"))},syncInputValue({context:e,event:t,scope:r}){let n=e.get("value");ae(o7(r,t.index),n[t.index])},syncInputElements({context:e,scope:t}){let r=o8(t),n=e.get("value");r.forEach((e,t)=>{ae(e,n[t])})},setPastedValue({context:e,event:t,computed:r,flush:n}){(0,tG.raf)(()=>{let i=r("valueAsString"),o=e.get("focusedIndex"),a=r("valueLength"),s=Math.min(o,r("filledValueLength")),l=s>0?i.substring(0,o):"",u=t.value.substring(0,a-s),c=ai(`${l}${u}`.split(""),a);n(()=>{e.set("value",c)})})},setValueAtIndex({context:e,event:t,computed:r}){let n=an(r("focusedValue"),t.value);e.set("value",(0,tC.setValueAtIndex)(r("_value"),t.index,n))},clearValue({context:e}){let t=Array.from({length:e.get("count")}).fill("");queueMicrotask(()=>{e.set("value",t)})},clearFocusedValue({context:e,computed:t}){let r=e.get("focusedIndex");-1!==r&&e.set("value",(0,tC.setValueAtIndex)(t("_value"),r,""))},setFocusIndexToFirst({context:e}){e.set("focusedIndex",0)},setNextFocusedIndex({context:e,computed:t}){e.set("focusedIndex",Math.min(e.get("focusedIndex")+1,t("valueLength")-1))},setPrevFocusedIndex({context:e}){e.set("focusedIndex",Math.max(e.get("focusedIndex")-1,0))},setLastValueFocusIndex({context:e,computed:t}){(0,tG.raf)(()=>{e.set("focusedIndex",Math.min(t("filledValueLength"),t("valueLength")-1))})},blurFocusedInputIfNeeded({context:e,prop:t,scope:r}){t("blurOnComplete")&&(0,tG.raf)(()=>{o7(r,e.get("focusedIndex"))?.blur()})},requestFormSubmit({computed:e,prop:t,scope:r}){if(!t("name")||!e("isValueComplete"))return;let n=o9(r);n?.form?.requestSubmit()}}}});var ao=(0,tZ.createProps)()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]);(0,tC.createSplitProps)(ao);let{variants:aa,defaultVariants:as}=th,al=ej({className:"chakra-pin-input",slots:o4.keys(),base:{input:{...th.base,textAlign:"center",width:"var(--input-height)"},control:{display:"inline-flex",gap:"2",isolation:"isolate"}},variants:{size:h(aa.size,(e,t)=>[e,{input:{...t,px:"1"}}]),variant:h(aa.variant,(e,t)=>[e,{input:t}]),attached:{true:{control:{gap:"0",spaceX:"-1px"},input:{_notFirst:{borderStartRadius:"0"},_notLast:{borderEndRadius:"0"},_focusVisible:{zIndex:"1"}}}}},defaultVariants:as});e.s(["pinInputSlotRecipe",()=>al],91864);let au=ej({className:"chakra-popover",slots:iP.keys(),base:{content:{position:"relative",display:"flex",flexDirection:"column",textStyle:"sm","--popover-bg":"colors.bg.panel",bg:"var(--popover-bg)",boxShadow:"lg","--popover-size":"sizes.xs","--popover-mobile-size":"calc(100dvw - 1rem)",width:{base:"min(var(--popover-mobile-size), var(--popover-size))",sm:"var(--popover-size)"},borderRadius:"l3","--popover-z-index":"zIndex.popover",zIndex:"calc(var(--popover-z-index) + var(--layer-index, 0))",outline:"0",transformOrigin:"var(--transform-origin)",maxHeight:"var(--available-height)",_open:{animationStyle:"scale-fade-in",animationDuration:"fast"},_closed:{animationStyle:"scale-fade-out",animationDuration:"faster"}},header:{paddingInline:"var(--popover-padding)",paddingTop:"var(--popover-padding)"},body:{padding:"var(--popover-padding)",flex:"1"},footer:{display:"flex",alignItems:"center",paddingInline:"var(--popover-padding)",paddingBottom:"var(--popover-padding)"},arrow:{"--arrow-size":"sizes.3","--arrow-background":"var(--popover-bg)"},arrowTip:{borderTopWidth:"1px",borderInlineStartWidth:"1px"}},variants:{size:{xs:{content:{"--popover-padding":"spacing.3"}},sm:{content:{"--popover-padding":"spacing.4"}},md:{content:{"--popover-padding":"spacing.5"}},lg:{content:{"--popover-padding":"spacing.6"}}}},defaultVariants:{size:"md"}});e.s(["popoverSlotRecipe",()=>au],62345)},39289,e=>{"use strict";var t=e.i(94548),r=e.i(52713),n=e.i(58287),i=e.i(92242),o=(0,t.createAnatomy)("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange"),a=o.build();function s(e,t){var r,n;let{context:i,computed:o,prop:s,send:c,scope:d}=e,h=o("percent"),f=o("isIndeterminate")?"":o("formatter").format(h/100),p=s("max"),g=s("min"),m=s("orientation"),v=s("translations"),b=o("isIndeterminate"),y=i.get("value"),x=v?.value({value:y,max:p,percent:h,min:g,formatter:o("formatter")})??"",w=(r=y,n=p,null==r?"indeterminate":r===n?"complete":"loading"),_={role:"progressbar","aria-label":x,"data-max":p,"aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":y??void 0,"data-orientation":m,"data-state":w},C=function(e){let{context:t,computed:r}=e;return{root:u,track:l,range:{opacity:0===t.get("value")?0:void 0,style:{...l.style,"--percent":r("percent"),"--circumference":"calc(2 * 3.14159 * var(--radius))","--offset":"calc(var(--circumference) * (100 - var(--percent)) / 100)",strokeDashoffset:"calc(var(--circumference) * ((100 - var(--percent)) / 100))",strokeDasharray:r("isIndeterminate")?void 0:"var(--circumference)",transformOrigin:"center",transform:"rotate(-90deg)"}}}}(e);return{value:y,valueAsString:x,min:g,max:p,percent:h,percentAsString:f,indeterminate:b,setValue(e){c({type:"VALUE.SET",value:e})},setToMax(){c({type:"VALUE.SET",value:p})},setToMin(){c({type:"VALUE.SET",value:g})},getRootProps:()=>t.element({dir:s("dir"),...a.root.attrs,id:d.ids?.root??`progress-${d.id}`,"data-max":p,"data-value":y??void 0,"data-state":w,"data-orientation":m,style:{"--percent":b?void 0:h}}),getLabelProps:()=>t.element({dir:s("dir"),id:d.ids?.label??`progress-${d.id}-label`,...a.label.attrs,"data-orientation":m}),getValueTextProps:()=>t.element({dir:s("dir"),"aria-live":"polite",...a.valueText.attrs}),getTrackProps:()=>t.element({dir:s("dir"),id:d.ids?.track??`progress-${d.id}-track`,...a.track.attrs,..._}),getRangeProps:()=>t.element({dir:s("dir"),...a.range.attrs,"data-orientation":m,"data-state":w,style:{[o("isHorizontal")?"width":"height"]:b?void 0:`${h}%`}}),getCircleProps:()=>t.element({dir:s("dir"),id:d.ids?.circle??`progress-${d.id}-circle`,...a.circle.attrs,..._,...C.root}),getCircleTrackProps:()=>t.element({dir:s("dir"),"data-orientation":m,...a.circleTrack.attrs,...C.track}),getCircleRangeProps:()=>t.element({dir:s("dir"),...a.circleRange.attrs,...C.range,"data-state":w}),getViewProps:e=>t.element({dir:s("dir"),...a.view.attrs,"data-state":e.state,hidden:e.state!==w})}}var l={style:{"--radius":"calc(var(--size) / 2 - var(--thickness) / 2)",cx:"calc(var(--size) / 2)",cy:"calc(var(--size) / 2)",r:"var(--radius)",fill:"transparent",strokeWidth:"var(--thickness)"}},u={style:{width:"var(--size)",height:"var(--size)"}},c=(0,r.createMachine)({props({props:e}){let t=e.min??0,r=e.max??100;return{orientation:"horizontal",...e,max:r,min:t,defaultValue:void 0!==e.defaultValue?e.defaultValue:p(t,r),formatOptions:{style:"percent",...e.formatOptions},translations:{value:({value:e,percent:t,formatter:r})=>{if(null===e)return"loading...";if(r){let n="percent"===r.resolvedOptions().style?t/100:e;return r.format(n)}return e.toString()},...e.translations}}},initialState:()=>"idle",entry:["validateContext"],context:({bindable:e,prop:t})=>({value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(e){t("onValueChange")?.({value:e})}}))}),computed:{isIndeterminate:({context:e})=>null===e.get("value"),percent({context:e,prop:t}){let r=e.get("value");return(0,n.isNumber)(r)?100*(0,n.getValuePercent)(r,t("min"),t("max")):-1},formatter:(0,r.memo)(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>new Intl.NumberFormat(e,t)),isHorizontal:({prop:e})=>"horizontal"===e("orientation")},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]}}}},implementations:{actions:{setValue:({context:e,event:t,prop:r})=>{let n=null===t.value?null:Math.max(0,Math.min(t.value,r("max")));e.set("value",n)},validateContext:({context:e,prop:t})=>{let r=t("max"),n=t("min"),i=e.get("value");if(null!=i){if(!d(r))throw Error(`[progress] The max value passed \`${r}\` is not a valid number`);if(!h(i,r))throw Error(`[progress] The value passed \`${i}\` exceeds the max value \`${r}\``);if(!f(i,n))throw Error(`[progress] The value passed \`${i}\` exceeds the min value \`${n}\``)}}}}}),d=e=>(0,n.isNumber)(e)&&!isNaN(e),h=(e,t)=>d(e)&&e<=t,f=(e,t)=>d(e)&&e>=t,p=(e,t)=>e+(t-e)/2,g=(0,i.createProps)()(["dir","getRootNode","id","ids","max","min","orientation","translations","value","onValueChange","defaultValue","formatOptions","locale"]);(0,n.createSplitProps)(g),e.s(["anatomy",()=>o,"connect",()=>s,"machine",()=>c])},99180,e=>{"use strict";var t,r=e.i(69251),n=e.i(26163),i=e.i(60945),o=e.i(32525),a=e.i(79313),s=e.i(76858),l=e.i(58360),u=e.i(76883),c=e.i(84163),d=e.i(36292),h=e.i(38674),f=e.i(69081),p=e.i(11567),g=e.i(97018),m=e.i(27598),v=e.i(248),b=e.i(57372),y=e.i(68718),x=e.i(69311),w=e.i(34843),_=e.i(42697),C=e.i(21875),k=e.i(36794),S=e.i(92071),E=e.i(11021),O=e.i(67537),I=e.i(49666),P=e.i(24098),T=e.i(63024),R=e.i(72051),A=e.i(23258),M=e.i(43797),N=e.i(18401),D=e.i(24004),L=e.i(15127),V=e.i(61722),F=e.i(90963),j=e.i(91864),z=e.i(62345),B=e.i(13683),H=e.i(39289),H=H;let W=(0,B.defineSlotRecipe)({slots:H.anatomy.keys(),className:"chakra-progress",base:{root:{textStyle:"sm",position:"relative"},track:{overflow:"hidden",position:"relative"},range:{display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"width, height",transitionDuration:"slow",height:"100%",bgColor:"var(--track-color)",_indeterminate:{"--animate-from-x":"-40%","--animate-to-x":"100%",position:"absolute",willChange:"left",minWidth:"50%",animation:"position 1s ease infinite normal none running",backgroundImage:"linear-gradient(to right, transparent 0%, var(--track-color) 50%, transparent 100%)"}},label:{display:"inline-flex",fontWeight:"medium",alignItems:"center",gap:"1"},valueText:{textStyle:"xs",lineHeight:"1",fontWeight:"medium"}},variants:{variant:{outline:{track:{shadow:"inset",bgColor:"bg.muted"},range:{bgColor:"colorPalette.solid"}},subtle:{track:{bgColor:"colorPalette.muted"},range:{bgColor:"colorPalette.solid/72"}}},shape:{square:{},rounded:{track:{borderRadius:"l1"}},full:{track:{borderRadius:"full"}}},striped:{true:{range:{backgroundImage:"linear-gradient(45deg, var(--stripe-color) 25%, transparent 25%, transparent 50%, var(--stripe-color) 50%, var(--stripe-color) 75%, transparent 75%, transparent)",backgroundSize:"var(--stripe-size) var(--stripe-size)","--stripe-size":"1rem","--stripe-color":{_light:"rgba(255, 255, 255, 0.3)",_dark:"rgba(0, 0, 0, 0.3)"}}}},animated:{true:{range:{"--animate-from":"var(--stripe-size)",animation:"bg-position 1s linear infinite"}}},size:{xs:{track:{h:"1.5"}},sm:{track:{h:"2"}},md:{track:{h:"2.5"}},lg:{track:{h:"3"}},xl:{track:{h:"4"}}}},defaultVariants:{variant:"outline",size:"md",shape:"rounded"}});var H=H;let U=(0,B.defineSlotRecipe)({className:"chakra-progress-circle",slots:H.anatomy.keys(),base:{root:{display:"inline-flex",textStyle:"sm",position:"relative"},circle:{_indeterminate:{animation:"spin 2s linear infinite"}},circleTrack:{"--track-color":"colors.colorPalette.muted",stroke:"var(--track-color)"},circleRange:{stroke:"colorPalette.solid",transitionProperty:"stroke-dashoffset, stroke-dasharray",transitionDuration:"0.6s",_indeterminate:{animation:"circular-progress 1.5s linear infinite"}},label:{display:"inline-flex"},valueText:{lineHeight:"1",fontWeight:"medium",letterSpacing:"tight",fontVariantNumeric:"tabular-nums"}},variants:{size:{xs:{circle:{"--size":"24px","--thickness":"4px"},valueText:{textStyle:"2xs"}},sm:{circle:{"--size":"32px","--thickness":"5px"},valueText:{textStyle:"2xs"}},md:{circle:{"--size":"40px","--thickness":"6px"},valueText:{textStyle:"xs"}},lg:{circle:{"--size":"48px","--thickness":"7px"},valueText:{textStyle:"sm"}},xl:{circle:{"--size":"64px","--thickness":"8px"},valueText:{textStyle:"sm"}}}},defaultVariants:{size:"md"}});var $=e.i(94548),q=e.i(92109),G=e.i(52713),K=((t=K||{})[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t),Y=Object.defineProperty,X=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?Y(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};let Q=[1,0],Z=[2,3],J=[3,2],ee={L:[0,1],M:Q,Q:Z,H:J},et=/^[0-9]*$/,er=/^[A-Z0-9 $%*+.\/:-]*$/,en="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",ei=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],eo=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class ea{constructor(e,t,r,n){if(this.version=e,this.ecc=t,X(this,"size"),X(this,"mask"),X(this,"modules",[]),X(this,"types",[]),e<1||e>40)throw RangeError("Version value out of range");if(n<-1||n>7)throw RangeError("Mask value out of range");this.size=4*e+17;const i=Array.from({length:this.size},()=>!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();const o=this.addEccAndInterleave(r);if(this.drawCodewords(o),-1===n){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(n=t,e=r),this.applyMask(t)}}this.mask=n,this.applyMask(n),this.drawFormatBits(n)}getModule(e,t){return e>=0&&e<this.size&&t>=0&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0,K.Timing),this.setFunctionModule(e,6,e%2==0,K.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)(0!==r||0!==n)&&(0!==r||n!==t-1)&&(r!==t-1||0!==n)&&this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.ecc[1]<<3|e,r=t;for(let e=0;e<10;e++)r=r<<1^(r>>>9)*1335;let n=(t<<10|r)^21522;for(let e=0;e<=5;e++)this.setFunctionModule(8,e,el(n,e));this.setFunctionModule(8,7,el(n,6)),this.setFunctionModule(8,8,el(n,7)),this.setFunctionModule(7,8,el(n,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,el(n,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,el(n,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,el(n,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;for(let e=0;e<18;e++){let r=el(t,e),n=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(n,i,r),this.setFunctionModule(i,n,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){let i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,a=t+r;o>=0&&o<this.size&&a>=0&&a<this.size&&this.setFunctionModule(o,a,2!==i&&4!==i,K.Position)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!==Math.max(Math.abs(n),Math.abs(r)),K.Alignment)}setFunctionModule(e,t,r,n=K.Function){this.modules[t][e]=r,this.types[t][e]=n}addEccAndInterleave(e){let t=this.version,r=this.ecc;if(e.length!==em(t,r))throw RangeError("Invalid argument");let n=eo[r[0]][t],i=ei[r[0]][t],o=Math.floor(eg(t)/8),a=n-o%n,s=Math.floor(o/n),l=[],u=function(e){if(e<1||e>255)throw RangeError("Degree out of range");let t=[];for(let r=0;r<e-1;r++)t.push(0);t.push(1);let r=1;for(let n=0;n<e;n++){for(let e=0;e<t.length;e++)t[e]=ev(t[e],r),e+1<t.length&&(t[e]^=t[e+1]);r=ev(r,2)}return t}(i);for(let t=0,r=0;t<n;t++){let n=e.slice(r,r+s-i+(t<a?0:1));r+=n.length;let o=function(e,t){let r=t.map(e=>0);for(let n of e){let e=n^r.shift();r.push(0),t.forEach((t,n)=>r[n]^=ev(t,e))}return r}(n,u);t<a&&n.push(0),l.push(n.concat(o))}let c=[];for(let e=0;e<l[0].length;e++)l.forEach((t,r)=>{(e!==s-i||r>=a)&&c.push(t[e])});return c}drawCodewords(e){if(e.length!==Math.floor(eg(this.version)/8))throw RangeError("Invalid argument");let t=0;for(let r=this.size-1;r>=1;r-=2){6===r&&(r=5);for(let n=0;n<this.size;n++)for(let i=0;i<2;i++){let o=r-i,a=(r+1&2)==0?this.size-1-n:n;!this.types[a][o]&&t<8*e.length&&(this.modules[a][o]=el(e[t>>>3],7-(7&t)),t++)}}}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw Error("Unreachable")}!this.types[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let t=0;t<this.size;t++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[t][o]===r?5==++n?e+=3:n>5&&e++:(this.finderPenaltyAddHistory(n,i),r||(e+=40*this.finderPenaltyCountPatterns(i)),r=this.modules[t][o],n=1);e+=40*this.finderPenaltyTerminateAndCount(r,n,i)}for(let t=0;t<this.size;t++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][t]===r?5==++n?e+=3:n>5&&e++:(this.finderPenaltyAddHistory(n,i),r||(e+=40*this.finderPenaltyCountPatterns(i)),r=this.modules[o][t],n=1);e+=40*this.finderPenaltyTerminateAndCount(r,n,i)}for(let t=0;t<this.size-1;t++)for(let r=0;r<this.size-1;r++){let n=this.modules[t][r];n===this.modules[t][r+1]&&n===this.modules[t+1][r]&&n===this.modules[t+1][r+1]&&(e+=3)}let t=0;for(let e of this.modules)t=e.reduce((e,t)=>e+ +!!t,t);let r=this.size*this.size;return e+(Math.ceil(Math.abs(20*t-10*r)/r)-1)*10}getAlignmentPatternPositions(){if(1===this.version)return[];{let e=Math.floor(this.version/7)+2,t=32===this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}finderPenaltyCountPatterns(e){let t=e[1],r=t>0&&e[2]===t&&e[3]===3*t&&e[4]===t&&e[5]===t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0===t[0]&&(e+=this.size),t.pop(),t.unshift(e)}}function es(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function el(e,t){return(e>>>t&1)!=0}class eu{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}}let ec=[1,10,12,14],ed=[2,9,11,13],eh=[4,8,16,16];function ef(e,t){return e[Math.floor((t+7)/17)+1]}function ep(e){let t=[];for(let r of e)es(r,8,t);return new eu(eh,e.length,t)}function eg(e){if(e<1||e>40)throw RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){let r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}function em(e,t){return Math.floor(eg(e)/8)-ei[t[0]][e]*eo[t[0]][e]}function ev(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285^(t>>>n&1)*e;return r}var eb=e.i(92242),ey=e.i(58287),ex=(0,$.createAnatomy)("qr-code").parts("root","frame","pattern","overlay","downloadTrigger");ex.build(),(0,G.createMachine)({props:({props:e})=>({defaultValue:"",pixelSize:10,...e}),initialState:()=>"idle",context:({prop:e,bindable:t})=>({value:t(()=>({value:e("value"),defaultValue:e("defaultValue"),onChange(t){e("onValueChange")?.({value:t})}}))}),computed:{encoded:(0,G.memo)(({context:e,prop:t})=>[e.get("value"),t("encoding")],([e,t])=>(function(e,t){let{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:a=-1,border:s=1}=t||{},l="string"==typeof e?function(e){var t,r;if(""===e)return[];if(t=e,et.test(t))return[function(e){var t;if(t=e,!et.test(t))throw RangeError("String contains non-numeric characters");let r=[];for(let t=0;t<e.length;){let n=Math.min(e.length-t,3);es(Number.parseInt(e.substring(t,t+n),10),3*n+1,r),t+=n}return new eu(ec,e.length,r)}(e)];return(r=e,er.test(r))?[function(e){var t;let r;if(t=e,!er.test(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let n=[];for(r=0;r+2<=e.length;r+=2){let t=45*en.indexOf(e.charAt(r));es(t+=en.indexOf(e.charAt(r+1)),11,n)}return r<e.length&&es(en.indexOf(e.charAt(r)),6,n),new eu(ed,e.length,n)}(e)]:[ep(function(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!==e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(Number.parseInt(e.substring(r+1,r+3),16)),r+=2);return t}(e))]}(e):Array.isArray(e)?[ep(e)]:void 0;if(!l)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let u=function(e,t,r=1,n=40,i=-1,o=!0){let a,s;if(!(1<=r&&r<=n&&n<=40)||i<-1||i>7)throw RangeError("Invalid value");for(a=r;;a++){let r=8*em(a,t),i=function(e,t){let r=0;for(let n of e){let e=ef(n.mode,t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}(e,a);if(i<=r){s=i;break}if(a>=n)throw RangeError("Data too long")}for(let e of[Q,Z,J])o&&s<=8*em(a,e)&&(t=e);let l=[];for(let t of e)for(let e of(es(t.mode[0],4,l),es(t.numChars,ef(t.mode,a),l),t.getData()))l.push(e);let u=8*em(a,t);es(0,Math.min(4,u-l.length),l),es(0,(8-l.length%8)%8,l);for(let e=236;l.length<u;e^=253)es(e,8,l);let c=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((e,t)=>c[t>>>3]|=e<<7-(7&t)),new ea(a,t,c,i)}(l,ee[r],i,o,a,n),c=function(e,t=1){if(!t)return e;let{size:r}=e,n=r+2*t;e.size=n,e.data.forEach(e=>{for(let r=0;r<t;r++)e.unshift(!1),e.push(!1)});for(let r=0;r<t;r++)e.data.unshift(Array.from({length:n},e=>!1)),e.data.push(Array.from({length:n},e=>!1));let i=K.Border;e.types.forEach(e=>{for(let r=0;r<t;r++)e.unshift(i),e.push(i)});for(let r=0;r<t;r++)e.types.unshift(Array.from({length:n},e=>i)),e.types.push(Array.from({length:n},e=>i));return e}({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},s);return t?.invert&&(c.data=c.data.map(e=>e.map(e=>!e))),t?.onEncoded?.(c),c})(e,t))},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]},"DOWNLOAD_TRIGGER.CLICK":{actions:["downloadQrCode"]}}}},implementations:{actions:{setValue({context:e,event:t}){e.set("value",t.value)},downloadQrCode({event:e,scope:t}){let{mimeType:r,quality:n,fileName:i}=e,o=t.getById(t.ids?.frame??`qrcode:${t.id}:frame`),a=t.getDoc();(0,q.getDataUrl)(o,{type:r,quality:n}).then(e=>{let t=a.createElement("a");t.href=e,t.rel="noopener",t.download=i,t.click(),setTimeout(()=>{t.remove()},0)})}}}});var ew=(0,eb.createProps)()(["ids","defaultValue","value","id","encoding","dir","getRootNode","onValueChange","pixelSize"]);(0,ey.createSplitProps)(ew);let e_=(0,B.defineSlotRecipe)({slots:ex.keys(),className:"chakra-qr-code",base:{root:{position:"relative",width:"fit-content","--qr-code-overlay-size":"calc(var(--qr-code-size) / 3)"},frame:{width:"var(--qr-code-size)",height:"var(--qr-code-size)",fill:"currentColor"},overlay:{display:"flex",alignItems:"center",justifyContent:"center",width:"var(--qr-code-overlay-size)",height:"var(--qr-code-overlay-size)",padding:"1",bg:"bg",rounded:"l1"}},variants:{size:{"2xs":{root:{"--qr-code-size":"40px"}},xs:{root:{"--qr-code-size":"64px"}},sm:{root:{"--qr-code-size":"80px"}},md:{root:{"--qr-code-size":"120px"}},lg:{root:{"--qr-code-size":"160px"}},xl:{root:{"--qr-code-size":"200px"}},"2xl":{root:{"--qr-code-size":"240px"}},full:{root:{"--qr-code-size":"100%"}}}},defaultVariants:{size:"md"}});var eC=e.i(61292),ek=e.i(73945);let eS=(0,B.defineSlotRecipe)({className:"chakra-radio-card",slots:eC.radioCardAnatomy.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",isolation:"isolate"},item:{flex:"1",display:"flex",flexDirection:"column",userSelect:"none",position:"relative",borderRadius:"l2",_focus:{bg:"colorPalette.muted/20"},_disabled:{opacity:"0.8",borderColor:"border.disabled"},_checked:{zIndex:"1"}},label:{display:"inline-flex",fontWeight:"medium",textStyle:"sm",_disabled:{opacity:"0.5"}},itemText:{fontWeight:"medium",flex:"1"},itemDescription:{opacity:"0.64",textStyle:"sm"},itemControl:{display:"inline-flex",flex:"1",pos:"relative",rounded:"inherit",justifyContent:"var(--radio-card-justify)",alignItems:"var(--radio-card-align)",_disabled:{bg:"bg.muted"}},itemIndicator:ek.radiomarkRecipe.base,itemAddon:{roundedBottom:"inherit",_disabled:{color:"fg.muted"}},itemContent:{display:"flex",flexDirection:"column",flex:"1",gap:"1",justifyContent:"var(--radio-card-justify)",alignItems:"var(--radio-card-align)"}},variants:{size:{sm:{item:{textStyle:"sm"},itemControl:{padding:"3",gap:"1.5"},itemAddon:{px:"3",py:"1.5",borderTopWidth:"1px"},itemIndicator:ek.radiomarkRecipe.variants?.size.sm},md:{item:{textStyle:"sm"},itemControl:{padding:"4",gap:"2.5"},itemAddon:{px:"4",py:"2",borderTopWidth:"1px"},itemIndicator:ek.radiomarkRecipe.variants?.size.md},lg:{item:{textStyle:"md"},itemControl:{padding:"4",gap:"3.5"},itemAddon:{px:"4",py:"2",borderTopWidth:"1px"},itemIndicator:ek.radiomarkRecipe.variants?.size.lg}},variant:{surface:{item:{borderWidth:"1px",_checked:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderColor:"colorPalette.muted"}},itemIndicator:ek.radiomarkRecipe.variants?.variant.solid},subtle:{item:{bg:"bg.muted"},itemControl:{_checked:{bg:"colorPalette.muted",color:"colorPalette.fg"}},itemIndicator:ek.radiomarkRecipe.variants?.variant.outline},outline:{item:{borderWidth:"1px",_checked:{boxShadow:"0 0 0 1px var(--shadow-color)",boxShadowColor:"colorPalette.solid",borderColor:"colorPalette.solid"}},itemIndicator:ek.radiomarkRecipe.variants?.variant.solid},solid:{item:{borderWidth:"1px",_checked:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},itemIndicator:ek.radiomarkRecipe.variants?.variant.inverted}},justify:{start:{item:{"--radio-card-justify":"flex-start"}},end:{item:{"--radio-card-justify":"flex-end"}},center:{item:{"--radio-card-justify":"center"}}},align:{start:{item:{"--radio-card-align":"flex-start"},itemControl:{textAlign:"start"}},end:{item:{"--radio-card-align":"flex-end"},itemControl:{textAlign:"end"}},center:{item:{"--radio-card-align":"center"},itemControl:{textAlign:"center"}}},orientation:{vertical:{itemControl:{flexDirection:"column"}},horizontal:{itemControl:{flexDirection:"row"}}}},defaultVariants:{size:"md",variant:"outline",align:"start",orientation:"horizontal"}}),eE=(0,B.defineSlotRecipe)({className:"chakra-radio-group",slots:eC.radioGroupAnatomy.keys(),base:{item:{display:"inline-flex",alignItems:"center",position:"relative",fontWeight:"medium",_disabled:{cursor:"disabled"}},itemControl:ek.radiomarkRecipe.base,label:{userSelect:"none",textStyle:"sm",_disabled:{opacity:"0.5"}}},variants:{variant:{outline:{itemControl:ek.radiomarkRecipe.variants?.variant?.outline},subtle:{itemControl:ek.radiomarkRecipe.variants?.variant?.subtle},solid:{itemControl:ek.radiomarkRecipe.variants?.variant?.solid}},size:{xs:{item:{textStyle:"xs",gap:"1.5"},itemControl:ek.radiomarkRecipe.variants?.size?.xs},sm:{item:{textStyle:"sm",gap:"2"},itemControl:ek.radiomarkRecipe.variants?.size?.sm},md:{item:{textStyle:"sm",gap:"2.5"},itemControl:ek.radiomarkRecipe.variants?.size?.md},lg:{item:{textStyle:"md",gap:"3"},itemControl:ek.radiomarkRecipe.variants?.size?.lg}}},defaultVariants:{size:"md",variant:"solid"}}),eO=(0,B.defineSlotRecipe)({className:"chakra-rating-group",slots:eC.ratingGroupAnatomy.keys(),base:{root:{display:"inline-flex"},control:{display:"inline-flex",alignItems:"center"},item:{display:"inline-flex",alignItems:"center",justifyContent:"center",userSelect:"none"},itemIndicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",position:"relative","--clip-path":{base:"inset(0 50% 0 0)",_rtl:"inset(0 0 0 50%)"},_icon:{stroke:"currentColor",width:"100%",height:"100%",display:"inline-block",flexShrink:0,position:"absolute",left:0,top:0},"& [data-bg]":{color:"bg.emphasized"},"& [data-fg]":{color:"transparent"},"&[data-highlighted]:not([data-half])":{"& [data-fg]":{color:"colorPalette.solid"}},"&[data-half]":{"& [data-fg]":{color:"colorPalette.solid",clipPath:"var(--clip-path)"}}}},variants:{size:{xs:{item:{textStyle:"sm"}},sm:{item:{textStyle:"md"}},md:{item:{textStyle:"xl"}},lg:{item:{textStyle:"2xl"}}}},defaultVariants:{size:"md"}});var eI=Object.defineProperty,eP=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?eI(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},eT=(0,$.createAnatomy)("scroll-area").parts("root","viewport","content","scrollbar","thumb","corner");eT.build();var eR=e=>e.ids?.root??`scroll-area-${e.id}`,eA=e=>e.getById(eR(e)),eM=e=>e.getById(e.ids?.viewport??`scroll-area-${e.id}:viewport`),eN=e=>(0,q.query)(eA(e),`[data-part=scrollbar][data-orientation=horizontal][data-ownedby="${eR(e)}"]`),eD=e=>(0,q.query)(eA(e),`[data-part=scrollbar][data-orientation=vertical][data-ownedby="${eR(e)}"]`),eL=e=>(0,q.query)(eN(e),`[data-part=thumb][data-orientation=horizontal][data-ownedby="${eR(e)}"]`),eV=e=>(0,q.query)(eD(e),`[data-part=thumb][data-orientation=vertical][data-ownedby="${eR(e)}"]`);function eF(e,t,r){if(!e)return 0;let n=(0,q.getComputedStyle)(e),i="x"===r?"Inline":"Block";return"x"===r&&"margin"===t?2*parseFloat(n[`${t}InlineStart`]):parseFloat(n[`${t}${i}Start`])+parseFloat(n[`${t}${i}End`])}function ej(e,t){let r=e.scrollTop,n=e.scrollLeft,i=e.scrollHeight-e.clientHeight>1,o=e.scrollWidth-e.clientWidth>1,a=e.scrollWidth-e.clientWidth,s=e.scrollHeight-e.clientHeight,l=!1,u=!1,c=!1,d=!1;return o&&("rtl"===t&&n<=0?(l=Math.abs(n)>=a-1,u=1>=Math.abs(n)):(l=n<=1,u=n>=a-1)),i&&(c=r<=1,d=r>=s-1),{top:c,right:u,bottom:d,left:l}}var ez=class{constructor(){eP(this,"currentId",0),eP(this,"clear",()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)}),eP(this,"disposeEffect",()=>this.clear)}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}};(0,G.createMachine)({props:({props:e})=>((0,ey.ensureProps)(e,["id"]),e),context:({bindable:e})=>({scrollingX:e(()=>({defaultValue:!1})),scrollingY:e(()=>({defaultValue:!1})),hovering:e(()=>({defaultValue:!1})),dragging:e(()=>({defaultValue:!1})),touchModality:e(()=>({defaultValue:!1})),atSides:e(()=>({defaultValue:{top:!0,right:!1,bottom:!1,left:!0}})),cornerSize:e(()=>({defaultValue:{width:0,height:0}})),thumbSize:e(()=>({defaultValue:{width:0,height:0}})),hiddenState:e(()=>({defaultValue:{scrollbarYHidden:!1,scrollbarXHidden:!1,cornerHidden:!1},hash:e=>`Y:${e.scrollbarYHidden} X:${e.scrollbarXHidden} C:${e.cornerHidden}`}))}),refs:()=>({orientation:"vertical",scrollPosition:{x:0,y:0},scrollYTimeout:new ez,scrollXTimeout:new ez,scrollEndTimeout:new ez,startX:0,startY:0,startScrollTop:0,startScrollLeft:0,programmaticScroll:!0}),initialState:()=>"idle",watch({track:e,prop:t,context:r,send:n}){e([()=>t("dir"),()=>r.hash("hiddenState")],()=>{n({type:"thumb.measure"})})},effects:["trackContentResize","trackViewportVisibility","trackWheelEvent"],entry:["checkHovering"],exit:["clearTimeouts"],on:{"thumb.measure":{actions:["setThumbSize"]},"viewport.scroll":{actions:["setThumbSize","setScrolling","setProgrammaticScroll"]},"root.pointerenter":{actions:["setTouchModality","setHovering"]},"root.pointerdown":{actions:["setTouchModality"]},"root.pointerleave":{actions:["clearHovering"]}},states:{idle:{on:{"scrollbar.pointerdown":{target:"dragging",actions:["scrollToPointer","startDragging"]},"thumb.pointerdown":{target:"dragging",actions:["startDragging"]}}},dragging:{effects:["trackPointerMove"],on:{"thumb.pointermove":{actions:["setDraggingScroll"]},"scrollbar.pointerup":{target:"idle",actions:["stopDragging"]},"thumb.pointerup":{target:"idle",actions:["clearScrolling","stopDragging"]}}}},implementations:{actions:{setTouchModality({context:e,event:t}){e.set("touchModality","touch"===t.pointerType)},setHovering({context:e}){e.set("hovering",!0)},clearHovering({context:e}){e.set("hovering",!1)},setProgrammaticScroll({refs:e}){e.get("scrollEndTimeout").start(100,()=>{e.set("programmaticScroll",!0)})},clearScrolling({context:e,event:t}){e.set("vertical"===t.orientation?"scrollingY":"scrollingX",!1)},setThumbSize({context:e,scope:t,prop:r}){let n=eM(t);if(!n)return;let i=n.scrollHeight,o=n.scrollWidth;if(0===i||0===o)return;let a=eD(t),s=eN(t),l=eV(t),u=eL(t),c=n.clientHeight,d=n.clientWidth,h=n.scrollTop,f=n.scrollLeft,p=c>=i,g=d>=o,m=eF(s,"padding","x"),v=eF(a,"padding","y"),b=eF(u,"margin","x"),y=eF(l,"margin","y"),x=(g?0:d)-m-b,w=(p?0:c)-v-y,_=s?Math.min(s.offsetWidth,x):x,C=a?Math.min(a.offsetHeight,w):w,k=Math.max(20,d/o*_),S=Math.max(20,c/i*C);if(e.set("thumbSize",e=>e.height===S&&e.width===k?e:{width:k,height:S}),a&&l){let e=a.offsetHeight-S-v-y,t=Math.min(e,Math.max(0,h/(i-c)*e));l.style.transform=`translate3d(0,${t}px,0)`}if(s&&u){let e=s.offsetWidth-k-m-b,t=f/(o-d),n="rtl"===r("dir")?(0,ey.clampValue)(t*e,-e,0):(0,ey.clampValue)(t*e,0,e);u.style.transform=`translate3d(${n}px,0,0)`}if((0,q.query)(eA(t),`[data-part=corner][data-ownedby="${eR(t)}"]`)){if(g||p)e.set("cornerSize",{width:0,height:0});else if(!g&&!p){let t=a?.offsetWidth||0,r=s?.offsetHeight||0;e.set("cornerSize",{width:t,height:r})}}e.set("hiddenState",e=>{let t=p||g;return e.scrollbarYHidden===p&&e.scrollbarXHidden===g&&e.cornerHidden===t?e:{scrollbarYHidden:p,scrollbarXHidden:g,cornerHidden:t}}),e.set("atSides",e=>{let t=ej(n,r("dir"));return(0,ey.isEqual)(e,t)?e:t})},checkHovering({scope:e,context:t}){let r=eM(e);r?.matches(":hover")&&t.set("hovering",!0)},setScrolling({event:e,refs:t,context:r,prop:n}){let i={x:e.target.scrollLeft,y:e.target.scrollTop},o=t.get("scrollPosition"),a=i.x-o.x,s=i.y-o.y;t.set("scrollPosition",i),r.set("atSides",t=>{let r=ej(e.target,n("dir"));return(0,ey.isEqual)(t,r)?t:r}),0!==s&&(r.set("scrollingY",!0),t.get("scrollYTimeout").start(1e3,()=>{r.set("scrollingY",!1)})),0!==a&&(r.set("scrollingX",!0),t.get("scrollXTimeout").start(1e3,()=>{r.set("scrollingX",!1)}))},scrollToPointer({event:e,scope:t,prop:r}){let n=eM(t);if(!n)return;let i=eV(t),o=eD(t),a=eL(t),s=eN(t),l=e.point;if(i&&o&&"vertical"===e.orientation){let e=eF(i,"margin","y"),t=eF(o,"padding","y"),r=i.offsetHeight,a=o.getBoundingClientRect(),s=l.y-a.top-r/2-t+e/2,u=n.scrollHeight,c=n.clientHeight;n.scrollTop=s/(o.offsetHeight-r-t-e)*(u-c)}if(a&&s&&"horizontal"===e.orientation){let e,t=eF(a,"margin","x"),i=eF(s,"padding","x"),o=a.offsetWidth,u=s.getBoundingClientRect(),c=l.x-u.left-o/2-i+t/2,d=n.scrollWidth,h=n.clientWidth,f=c/(s.offsetWidth-o-i-t);"rtl"===r("dir")?(e=(1-f)*(d-h),n.scrollLeft<=0&&(e=-e)):e=f*(d-h),n.scrollLeft=e}},startDragging({event:e,refs:t,scope:r}){t.set("startX",e.point.x),t.set("startY",e.point.y),t.set("orientation",e.orientation);let n=eM(r);n&&(t.set("startScrollTop",n.scrollTop),t.set("startScrollLeft",n.scrollLeft))},setDraggingScroll({event:e,refs:t,scope:r,context:n}){let i=t.get("startY"),o=t.get("startX"),a=t.get("startScrollTop"),s=t.get("startScrollLeft"),l=e.point,u=l.y-i,c=l.x-o,d=eM(r);if(!d)return;let h=d.scrollHeight,f=d.clientHeight,p=d.scrollWidth,g=d.clientWidth,m=t.get("orientation"),v=eV(r),b=eD(r);if(v&&b&&"vertical"===m){let e=eF(b,"padding","y"),r=eF(v,"margin","y"),i=v.offsetHeight;d.scrollTop=a+u/(b.offsetHeight-i-e-r)*(h-f),n.set("scrollingY",!0),t.get("scrollYTimeout").start(1e3,()=>{n.set("scrollingY",!1)})}let y=eL(r),x=eN(r);if(y&&x&&"horizontal"===m){let e=eF(x,"padding","x"),r=eF(y,"margin","x"),i=y.offsetWidth;d.scrollLeft=s+c/(x.offsetWidth-i-e-r)*(p-g),n.set("scrollingX",!0),t.get("scrollXTimeout").start(1e3,()=>{n.set("scrollingX",!1)})}},stopDragging({refs:e}){e.set("orientation",null)},clearTimeouts({refs:e}){e.get("scrollYTimeout").clear(),e.get("scrollXTimeout").clear(),e.get("scrollEndTimeout").clear()}},effects:{trackContentResize({scope:e,send:t}){let r=e.getById(e.ids?.content??`scroll-area-${e.id}:content`),n=eA(e);if(!r||!n)return;let i=new(e.getWin()).ResizeObserver(()=>{setTimeout(()=>{t({type:"thumb.measure"})},1)});return i.observe(r),i.observe(n),()=>{i.disconnect()}},trackViewportVisibility({scope:e,send:t}){let r=e.getWin(),n=eM(e);if(!n)return;let i=new r.IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>0&&(t({type:"thumb.measure"}),i.disconnect())})});return i.observe(n),()=>{i.disconnect()}},trackWheelEvent({scope:e}){let t=eD(e),r=eN(e);if(!t&&!r)return;let n=t=>{let r=eM(e);if(!r||t.ctrlKey)return;let n=t.currentTarget.dataset.orientation;if("vertical"===n){let e=r.scrollHeight>r.clientHeight,n=0===r.scrollTop&&t.deltaY<0,i=r.scrollTop===r.scrollHeight-r.clientHeight&&t.deltaY>0;if(!(e&&0!==t.deltaY&&!(n||i)))return;t.preventDefault(),r.scrollTop+=t.deltaY}else if("horizontal"===n){let e=r.scrollWidth>r.clientWidth,n=0===r.scrollLeft&&t.deltaX<0,i=r.scrollLeft===r.scrollWidth-r.clientWidth&&t.deltaX>0;if(!(e&&0!==t.deltaX&&!(n||i)))return;t.preventDefault(),r.scrollLeft+=t.deltaX}};return(0,ey.callAll)(t&&(0,q.addDomEvent)(t,"wheel",n,{passive:!1}),r&&(0,q.addDomEvent)(r,"wheel",n,{passive:!1}))},trackPointerMove({scope:e,send:t,refs:r}){let n=e.getDoc(),i=r.get("orientation");return(0,q.trackPointerMove)(n,{onPointerMove({point:e}){t({type:"thumb.pointermove",orientation:i,point:e})},onPointerUp(){t({type:"thumb.pointerup",orientation:i})}})}}}});var eB=(0,eb.createProps)()(["dir","getRootNode","ids","id"]);(0,ey.createSplitProps)(eB);let eH=(0,B.defineSlotRecipe)({className:"chakra-scroll-area",slots:eT.keys(),base:{root:{display:"flex",flexDirection:"column",width:"100%",height:"100%",position:"relative",overflow:"hidden","--scrollbar-margin":"2px","--scrollbar-click-area":"calc(var(--scrollbar-size) + calc(var(--scrollbar-margin) * 2))"},viewport:{display:"flex",flexDirection:"column",height:"100%",width:"100%",borderRadius:"inherit",WebkitOverflowScrolling:"touch",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},content:{minWidth:"100%"},scrollbar:{display:"flex",userSelect:"none",touchAction:"none",borderRadius:"full",colorPalette:"gray",transition:"opacity 150ms 300ms",position:"relative",margin:"var(--scrollbar-margin)","&:not([data-overflow-x], [data-overflow-y])":{display:"none"},bg:"{colors.colorPalette.solid/10}","--thumb-bg":"{colors.colorPalette.solid/25}","&:is(:hover, :active)":{"--thumb-bg":"{colors.colorPalette.solid/50}"},_before:{content:'""',position:"absolute"},_vertical:{width:"var(--scrollbar-size)",flexDirection:"column","&::before":{width:"var(--scrollbar-click-area)",height:"100%",insetInlineStart:"calc(var(--scrollbar-margin) * -1)"}},_horizontal:{height:"var(--scrollbar-size)",flexDirection:"row","&::before":{height:"var(--scrollbar-click-area)",width:"100%",top:"calc(var(--scrollbar-margin) * -1)"}}},thumb:{borderRadius:"inherit",bg:"var(--thumb-bg)",transition:"backgrounds",_vertical:{width:"full"},_horizontal:{height:"full"}},corner:{bg:"bg.muted",margin:"var(--scrollbar-margin)",opacity:0,transition:"opacity 150ms 300ms","&[data-hover]":{transitionDelay:"0ms",opacity:1}}},variants:{variant:{hover:{scrollbar:{opacity:"0","&[data-hover], &[data-scrolling]":{opacity:"1",transitionDuration:"faster",transitionDelay:"0ms"}}},always:{scrollbar:{opacity:"1"}}},size:{xs:{root:{"--scrollbar-size":"sizes.1"}},sm:{root:{"--scrollbar-size":"sizes.1.5"}},md:{root:{"--scrollbar-size":"sizes.2"}},lg:{root:{"--scrollbar-size":"sizes.3"}}}},defaultVariants:{size:"md",variant:"hover"}}),eW=e.i(96019).anatomy.rename("segment-group");eW.build();let eU=(0,B.defineSlotRecipe)({className:"chakra-segment-group",slots:eW.keys(),base:{root:{"--segment-radius":"radii.l2","--segment-indicator-bg":{_light:"colors.bg",_dark:"colors.bg.emphasized"},"--segment-indicator-shadow":"shadows.sm",borderRadius:"var(--segment-radius)",display:"inline-flex",boxShadow:"inset",minW:"max-content",textAlign:"center",position:"relative",isolation:"isolate",bg:"bg.muted",_vertical:{flexDirection:"column"}},item:{display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",fontSize:"sm",position:"relative",color:"fg",borderRadius:"var(--segment-radius)",_disabled:{opacity:"0.5"},"&:has(input:focus-visible)":{focusRing:"outside"},_before:{content:'""',position:"absolute",bg:"border",transition:"opacity 0.2s"},_horizontal:{_before:{insetInlineStart:0,insetBlock:"1.5",width:"1px"}},_vertical:{_before:{insetBlockStart:0,insetInline:"1.5",height:"1px"}},"& + &[data-state=checked], &[data-state=checked] + &, &:first-of-type":{_before:{opacity:"0"}},"&[data-state=checked][data-ssr]":{shadow:"sm",bg:"bg",borderRadius:"var(--segment-radius)"}},indicator:{shadow:"var(--segment-indicator-shadow)",pos:"absolute",bg:"var(--segment-indicator-bg)",width:"var(--width)",height:"var(--height)",top:"var(--top)",left:"var(--left)",zIndex:-1,borderRadius:"var(--segment-radius)"}},variants:{size:{xs:{item:{textStyle:"xs",px:"3",gap:"1",height:"6"}},sm:{item:{textStyle:"sm",px:"4",gap:"2",height:"8"}},md:{item:{textStyle:"sm",px:"4",gap:"2",height:"10"}},lg:{item:{textStyle:"md",px:"4.5",gap:"3",height:"11"}}}},defaultVariants:{size:"md"}});var e$=e.i(924);let eq=(0,B.defineSlotRecipe)({className:"chakra-slider",slots:eC.sliderAnatomy.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1",textStyle:"sm",position:"relative",isolation:"isolate",touchAction:"none"},label:{fontWeight:"medium",textStyle:"sm"},control:{display:"inline-flex",alignItems:"center",position:"relative"},track:{overflow:"hidden",borderRadius:"full",flex:"1"},range:{width:"inherit",height:"inherit",_disabled:{bg:"border.emphasized!"}},markerGroup:{position:"absolute!",zIndex:"1"},marker:{"--marker-bg":{base:"white",_underValue:"colors.bg"},display:"flex",alignItems:"center",gap:"calc(var(--slider-thumb-size) / 2)",color:"fg.muted",textStyle:"xs"},markerIndicator:{width:"var(--slider-marker-size)",height:"var(--slider-marker-size)",borderRadius:"full",bg:"var(--marker-bg)"},thumb:{width:"var(--slider-thumb-size)",height:"var(--slider-thumb-size)",display:"flex",alignItems:"center",justifyContent:"center",outline:0,zIndex:"2",borderRadius:"full",_focusVisible:{ring:"2px",ringColor:"colorPalette.focusRing",ringOffset:"2px",ringOffsetColor:"bg"}}},variants:{size:{sm:{root:{"--slider-thumb-size":"sizes.4","--slider-track-size":"sizes.1.5","--slider-marker-center":"6px","--slider-marker-size":"sizes.1","--slider-marker-inset":"3px"}},md:{root:{"--slider-thumb-size":"sizes.5","--slider-track-size":"sizes.2","--slider-marker-center":"8px","--slider-marker-size":"sizes.1","--slider-marker-inset":"4px"}},lg:{root:{"--slider-thumb-size":"sizes.6","--slider-track-size":"sizes.2.5","--slider-marker-center":"9px","--slider-marker-size":"sizes.1.5","--slider-marker-inset":"5px"}}},variant:{outline:{track:{shadow:"inset",bg:"bg.emphasized/72"},range:{bg:"colorPalette.solid"},thumb:{borderWidth:"2px",borderColor:"colorPalette.solid",bg:"bg",_disabled:{bg:"border.emphasized",borderColor:"border.emphasized"}}},solid:{track:{bg:"colorPalette.subtle",_disabled:{bg:"bg.muted"}},range:{bg:"colorPalette.solid"},thumb:{bg:"colorPalette.solid",_disabled:{bg:"border.emphasized"}}}},orientation:{vertical:{root:{display:"inline-flex"},control:{flexDirection:"column",height:"100%",minWidth:"var(--slider-thumb-size)","&[data-has-mark-label], &:has(.chakra-slider__marker-label)":{marginEnd:"4"}},track:{width:"var(--slider-track-size)"},thumb:{left:"50%",translate:"-50% 0"},markerGroup:{insetStart:"var(--slider-marker-center)",insetBlock:"var(--slider-marker-inset)"},marker:{flexDirection:"row"}},horizontal:{control:{flexDirection:"row",width:"100%",minHeight:"var(--slider-thumb-size)","&[data-has-mark-label], &:has(.chakra-slider__marker-label)":{marginBottom:"4"}},track:{height:"var(--slider-track-size)"},thumb:{top:"50%",translate:"0 -50%"},markerGroup:{top:"var(--slider-marker-center)",insetInline:"var(--slider-marker-inset)"},marker:{flexDirection:"column"}}}},defaultVariants:{size:"md",variant:"outline",orientation:"horizontal"}}),eG=(0,B.defineSlotRecipe)({className:"chakra-stat",slots:eC.statAnatomy.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1",position:"relative",flex:"1"},label:{display:"inline-flex",gap:"1.5",alignItems:"center",color:"fg.muted",textStyle:"sm"},helpText:{color:"fg.muted",textStyle:"xs"},valueUnit:{color:"fg.muted",textStyle:"xs",fontWeight:"initial",letterSpacing:"initial"},valueText:{verticalAlign:"baseline",fontWeight:"semibold",letterSpacing:"tight",fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums",display:"inline-flex",gap:"1"},indicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",marginEnd:1,"& :where(svg)":{w:"1em",h:"1em"},"&[data-type=up]":{color:"fg.success"},"&[data-type=down]":{color:"fg.error"}}},variants:{size:{sm:{valueText:{textStyle:"xl"}},md:{valueText:{textStyle:"2xl"}},lg:{valueText:{textStyle:"3xl"}}}},defaultVariants:{size:"md"}}),eK=(0,B.defineSlotRecipe)({className:"chakra-status",slots:eC.statusAnatomy.keys(),base:{root:{display:"inline-flex",alignItems:"center",gap:"2"},indicator:{width:"0.64em",height:"0.64em",flexShrink:0,borderRadius:"full",forcedColorAdjust:"none",bg:"colorPalette.solid"}},variants:{size:{sm:{root:{textStyle:"xs"}},md:{root:{textStyle:"sm"}},lg:{root:{textStyle:"md"}}}},defaultVariants:{size:"md"}}),eY=(0,B.defineSlotRecipe)({className:"chakra-steps",slots:eC.stepsAnatomy.keys(),base:{root:{display:"flex",width:"full"},list:{display:"flex",justifyContent:"space-between","--steps-gutter":"spacing.3","--steps-thickness":"2px"},title:{fontWeight:"medium",color:"fg"},description:{color:"fg.muted"},separator:{bg:"border",flex:"1"},indicator:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0",borderRadius:"full",fontWeight:"medium",width:"var(--steps-size)",height:"var(--steps-size)",_icon:{flexShrink:"0",width:"var(--steps-icon-size)",height:"var(--steps-icon-size)"}},item:{position:"relative",display:"flex",gap:"3",flex:"1 0 0","&:last-of-type":{flex:"initial","& [data-part=separator]":{display:"none"}}},trigger:{display:"flex",alignItems:"center",gap:"3",textAlign:"start",focusVisibleRing:"outside",borderRadius:"l2"},content:{focusVisibleRing:"outside"}},variants:{orientation:{vertical:{root:{flexDirection:"row",height:"100%"},list:{flexDirection:"column",alignItems:"flex-start"},separator:{position:"absolute",width:"var(--steps-thickness)",height:"100%",maxHeight:"calc(100% - var(--steps-size) - var(--steps-gutter) * 2)",top:"calc(var(--steps-size) + var(--steps-gutter))",insetStart:"calc(var(--steps-size) / 2 - 1px)"},item:{alignItems:"flex-start"}},horizontal:{root:{flexDirection:"column",width:"100%"},list:{flexDirection:"row",alignItems:"center"},separator:{width:"100%",height:"var(--steps-thickness)",marginX:"var(--steps-gutter)"},item:{alignItems:"center"}}},variant:{solid:{indicator:{_incomplete:{borderWidth:"var(--steps-thickness)"},_current:{bg:"colorPalette.muted",borderWidth:"var(--steps-thickness)",borderColor:"colorPalette.solid",color:"colorPalette.fg"},_complete:{bg:"colorPalette.solid",borderColor:"colorPalette.solid",color:"colorPalette.contrast"}},separator:{_complete:{bg:"colorPalette.solid"}}},subtle:{indicator:{_incomplete:{bg:"bg.muted"},_current:{bg:"colorPalette.muted",color:"colorPalette.fg"},_complete:{bg:"colorPalette.emphasized",color:"colorPalette.fg"}},separator:{_complete:{bg:"colorPalette.emphasized"}}}},size:{xs:{root:{gap:"2.5"},list:{"--steps-size":"sizes.6","--steps-icon-size":"sizes.3.5",textStyle:"xs"},title:{textStyle:"sm"}},sm:{root:{gap:"3"},list:{"--steps-size":"sizes.8","--steps-icon-size":"sizes.4",textStyle:"xs"},title:{textStyle:"sm"}},md:{root:{gap:"4"},list:{"--steps-size":"sizes.10","--steps-icon-size":"sizes.4",textStyle:"sm"},title:{textStyle:"sm"}},lg:{root:{gap:"6"},list:{"--steps-size":"sizes.11","--steps-icon-size":"sizes.5",textStyle:"md"},title:{textStyle:"md"}}}},defaultVariants:{size:"md",variant:"solid",orientation:"horizontal"}}),eX=(0,B.defineSlotRecipe)({slots:eC.switchAnatomy.keys(),className:"chakra-switch",base:{root:{display:"inline-flex",gap:"2.5",alignItems:"center",position:"relative",verticalAlign:"middle","--switch-diff":"calc(var(--switch-width) - var(--switch-height))","--switch-x":{base:"var(--switch-diff)",_rtl:"calc(var(--switch-diff) * -1)"}},label:{lineHeight:"1",userSelect:"none",fontSize:"sm",fontWeight:"medium",_disabled:{opacity:"0.5"}},indicator:{position:"absolute",height:"var(--switch-height)",width:"var(--switch-height)",fontSize:"var(--switch-indicator-font-size)",fontWeight:"medium",flexShrink:0,userSelect:"none",display:"grid",placeContent:"center",transition:"inset-inline-start 0.12s ease",insetInlineStart:"calc(var(--switch-x) - 2px)",_checked:{insetInlineStart:"2px"}},control:{display:"inline-flex",gap:"0.5rem",flexShrink:0,justifyContent:"flex-start",cursor:"switch",borderRadius:"full",position:"relative",width:"var(--switch-width)",height:"var(--switch-height)",transition:"backgrounds",_disabled:{opacity:"0.5",cursor:"not-allowed"},_invalid:{outline:"2px solid",outlineColor:"border.error",outlineOffset:"2px"}},thumb:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transitionProperty:"translate",transitionDuration:"fast",borderRadius:"inherit",_checked:{translate:"var(--switch-x) 0"}}},variants:{variant:{solid:{control:{borderRadius:"full",bg:"bg.emphasized",focusVisibleRing:"outside",_checked:{bg:"colorPalette.solid"}},thumb:{bg:"white",width:"var(--switch-height)",height:"var(--switch-height)",scale:"0.8",boxShadow:"sm",_checked:{bg:"colorPalette.contrast"}}},raised:{control:{borderRadius:"full",height:"calc(var(--switch-height) / 2)",bg:"bg.muted",boxShadow:"inset",_checked:{bg:"colorPalette.solid/60"}},thumb:{width:"var(--switch-height)",height:"var(--switch-height)",position:"relative",top:"calc(var(--switch-height) * -0.25)",bg:"white",boxShadow:"xs",focusVisibleRing:"outside",_checked:{bg:"colorPalette.solid"}}}},size:{xs:{root:{"--switch-width":"sizes.6","--switch-height":"sizes.3","--switch-indicator-font-size":"fontSizes.xs"}},sm:{root:{"--switch-width":"sizes.8","--switch-height":"sizes.4","--switch-indicator-font-size":"fontSizes.xs"}},md:{root:{"--switch-width":"sizes.10","--switch-height":"sizes.5","--switch-indicator-font-size":"fontSizes.sm"}},lg:{root:{"--switch-width":"sizes.12","--switch-height":"sizes.6","--switch-indicator-font-size":"fontSizes.md"}}}},defaultVariants:{variant:"solid",size:"md"}}),eQ=(0,B.defineSlotRecipe)({className:"chakra-table",slots:eC.tableAnatomy.keys(),base:{root:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full",textAlign:"start",verticalAlign:"top"},row:{_selected:{bg:"colorPalette.subtle"}},cell:{textAlign:"start",alignItems:"center"},columnHeader:{fontWeight:"medium",textAlign:"start",color:"fg"},caption:{fontWeight:"medium",textStyle:"xs"},footer:{fontWeight:"medium"}},variants:{interactive:{true:{body:{"& tr":{_hover:{bg:"colorPalette.subtle"}}}}},stickyHeader:{true:{header:{"& :where(tr)":{top:"var(--table-sticky-offset, 0)",position:"sticky",zIndex:1}}}},striped:{true:{row:{"&:nth-of-type(odd) td":{bg:"bg.muted"}}}},showColumnBorder:{true:{columnHeader:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}},cell:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}}}},variant:{line:{columnHeader:{borderBottomWidth:"1px"},cell:{borderBottomWidth:"1px"},row:{bg:"bg"}},outline:{root:{boxShadow:"0 0 0 1px {colors.border}"},columnHeader:{borderBottomWidth:"1px"},header:{bg:"bg.muted"},row:{"&:not(:last-of-type)":{borderBottomWidth:"1px"}},footer:{borderTopWidth:"1px"}}},size:{sm:{root:{textStyle:"sm"},columnHeader:{px:"2",py:"2"},cell:{px:"2",py:"2"}},md:{root:{textStyle:"sm"},columnHeader:{px:"3",py:"3"},cell:{px:"3",py:"3"}},lg:{root:{textStyle:"md"},columnHeader:{px:"4",py:"3"},cell:{px:"4",py:"3"}}}},defaultVariants:{variant:"line",size:"md"}}),eZ=(0,B.defineSlotRecipe)({slots:eC.tabsAnatomy.keys(),className:"chakra-tabs",base:{root:{"--tabs-trigger-radius":"radii.l2","--tabs-indicator-shadow":"shadows.xs","--tabs-indicator-bg":"colors.bg",position:"relative",_horizontal:{display:"block"},_vertical:{display:"flex"}},list:{display:"inline-flex",position:"relative",isolation:"isolate",minH:"var(--tabs-height)",_horizontal:{flexDirection:"row"},_vertical:{flexDirection:"column"}},trigger:{outline:"0",minW:"var(--tabs-height)",height:"var(--tabs-height)",display:"flex",alignItems:"center",fontWeight:"medium",position:"relative",cursor:"button",gap:"2",_focusVisible:{zIndex:1,outline:"2px solid",outlineColor:"colorPalette.focusRing"},_disabled:{cursor:"not-allowed",opacity:.5}},content:{focusVisibleRing:"inside",_horizontal:{width:"100%",pt:"var(--tabs-content-padding)"},_vertical:{height:"100%",ps:"var(--tabs-content-padding)"}},indicator:{width:"var(--width)",height:"var(--height)",borderRadius:"var(--tabs-trigger-radius)",bg:"var(--tabs-indicator-bg)",shadow:"var(--tabs-indicator-shadow)",zIndex:-1}},variants:{fitted:{true:{list:{display:"flex"},trigger:{flex:1,textAlign:"center",justifyContent:"center"}}},justify:{start:{list:{justifyContent:"flex-start"}},center:{list:{justifyContent:"center"}},end:{list:{justifyContent:"flex-end"}}},size:{sm:{root:{"--tabs-height":"sizes.9","--tabs-content-padding":"spacing.3"},trigger:{py:"1",px:"3",textStyle:"sm"}},md:{root:{"--tabs-height":"sizes.10","--tabs-content-padding":"spacing.4"},trigger:{py:"2",px:"4",textStyle:"sm"}},lg:{root:{"--tabs-height":"sizes.11","--tabs-content-padding":"spacing.4.5"},trigger:{py:"2",px:"4.5",textStyle:"md"}}},variant:{line:{list:{display:"flex",borderColor:"border",_horizontal:{borderBottomWidth:"1px"},_vertical:{borderEndWidth:"1px"}},trigger:{color:"fg.muted",_disabled:{_active:{bg:"initial"}},_selected:{color:"fg",_horizontal:{layerStyle:"indicator.bottom","--indicator-offset-y":"-1px","--indicator-color":"colors.colorPalette.solid"},_vertical:{layerStyle:"indicator.end","--indicator-offset-x":"-1px"}}}},subtle:{trigger:{borderRadius:"var(--tabs-trigger-radius)",color:"fg.muted",_selected:{bg:"colorPalette.subtle",color:"colorPalette.fg"}}},enclosed:{list:{bg:"bg.muted",padding:"1",borderRadius:"l3",minH:"calc(var(--tabs-height) - 4px)"},trigger:{justifyContent:"center",color:"fg.muted",borderRadius:"var(--tabs-trigger-radius)",_selected:{bg:"bg",color:"colorPalette.fg",shadow:"xs"}}},outline:{list:{"--line-thickness":"1px","--line-offset":"calc(var(--line-thickness) * -1)",borderColor:"border",display:"flex",_horizontal:{_before:{content:'""',position:"absolute",bottom:"0px",width:"100%",borderBottomWidth:"var(--line-thickness)",borderBottomColor:"border"}},_vertical:{_before:{content:'""',position:"absolute",insetInline:"var(--line-offset)",height:"calc(100% - calc(var(--line-thickness) * 2))",borderEndWidth:"var(--line-thickness)",borderEndColor:"border"}}},trigger:{color:"fg.muted",borderWidth:"1px",borderColor:"transparent",_selected:{bg:"currentBg",color:"colorPalette.fg"},_horizontal:{borderTopRadius:"var(--tabs-trigger-radius)",marginBottom:"var(--line-offset)",marginEnd:{_notLast:"var(--line-offset)"},_selected:{borderColor:"border",borderBottomColor:"transparent"}},_vertical:{borderStartRadius:"var(--tabs-trigger-radius)",marginEnd:"var(--line-offset)",marginBottom:{_notLast:"var(--line-offset)"},_selected:{borderColor:"border",borderEndColor:"transparent"}}}},plain:{trigger:{color:"fg.muted",_selected:{color:"colorPalette.fg"},borderRadius:"var(--tabs-trigger-radius)","&[data-selected][data-ssr]":{bg:"var(--tabs-indicator-bg)",shadow:"var(--tabs-indicator-shadow)",borderRadius:"var(--tabs-trigger-radius)"}}}}},defaultVariants:{size:"md",variant:"line"}});var eJ=e.i(95368);let e0=eJ.badgeRecipe.variants?.variant,e1=(0,B.defineSlotRecipe)({slots:eC.tagAnatomy.keys(),className:"chakra-tag",base:{root:{display:"inline-flex",alignItems:"center",verticalAlign:"top",maxWidth:"100%",userSelect:"none",borderRadius:"l2",focusVisibleRing:"outside"},label:{lineClamp:"1"},closeTrigger:{display:"flex",alignItems:"center",justifyContent:"center",outline:"0",borderRadius:"l1",color:"currentColor",focusVisibleRing:"inside",focusRingWidth:"2px"},startElement:{flexShrink:0,boxSize:"var(--tag-element-size)",ms:"var(--tag-element-offset)","&:has([data-scope=avatar])":{boxSize:"var(--tag-avatar-size)",ms:"calc(var(--tag-element-offset) * 1.5)"},_icon:{boxSize:"100%"}},endElement:{flexShrink:0,boxSize:"var(--tag-element-size)",me:"var(--tag-element-offset)",_icon:{boxSize:"100%"},"&:has(button)":{ms:"calc(var(--tag-element-offset) * -1)"}}},variants:{size:{sm:{root:{px:"1.5",minH:"4.5",gap:"1","--tag-avatar-size":"spacing.3","--tag-element-size":"spacing.3","--tag-element-offset":"-2px"},label:{textStyle:"xs"}},md:{root:{px:"1.5",minH:"5",gap:"1","--tag-avatar-size":"spacing.3.5","--tag-element-size":"spacing.3.5","--tag-element-offset":"-2px"},label:{textStyle:"xs"}},lg:{root:{px:"2",minH:"6",gap:"1.5","--tag-avatar-size":"spacing.4.5","--tag-element-size":"spacing.4","--tag-element-offset":"-3px"},label:{textStyle:"sm"}},xl:{root:{px:"2.5",minH:"8",gap:"1.5","--tag-avatar-size":"spacing.6","--tag-element-size":"spacing.4.5","--tag-element-offset":"-4px"},label:{textStyle:"sm"}}},variant:{subtle:{root:e0?.subtle},solid:{root:e0?.solid},outline:{root:e0?.outline},surface:{root:e0?.surface}}},defaultVariants:{size:"md",variant:"surface"}});var e2=e.i(69350),e5=e.i(28421),e3="__live-region__",e4=(0,$.createAnatomy)("tagsInput").parts("root","label","control","input","clearTrigger","item","itemPreview","itemInput","itemText","itemDeleteTrigger");e4.build();var e6=(e,t)=>e.ids?.item?.(t)??`tags-input:${e.id}:tag:${t.value}:${t.index}`,e8=(e,t)=>e.getById(`${t}:input`),e7=e=>e.getById(e.ids?.root??`tags-input:${e.id}`),e9=e=>e.getById(e.ids?.input??`tags-input:${e.id}:input`),te=e=>e.getById(e.ids?.hiddenInput??`tags-input:${e.id}:hidden-input`),tt=e=>(0,q.queryAll)(e7(e),"[data-part=item-preview]:not([data-disabled])"),tr=(e,t)=>(0,q.indexOfId)(tt(e),t),{and:tn,not:ti,or:to}=(0,G.createGuards)();(0,G.createMachine)({props:({props:e})=>({dir:"ltr",addOnPaste:!1,editable:!0,validate:()=>!0,delimiter:",",defaultValue:[],defaultInputValue:"",max:1/0,...e,translations:{clearTriggerLabel:"Clear all tags",deleteTagTriggerLabel:e=>`Delete tag ${e}`,tagAdded:e=>`Added tag ${e}`,tagsPasted:e=>`Pasted ${e.length} tags`,tagEdited:e=>`Editing tag ${e}. Press enter to save or escape to cancel.`,tagUpdated:e=>`Tag update to ${e}`,tagDeleted:e=>`Tag ${e} deleted`,tagSelected:e=>`Tag ${e} selected. Press enter to edit, delete or backspace to remove.`,...e.translations}}),initialState:({prop:e})=>e("autoFocus")?"focused:input":"idle",refs:()=>({liveRegion:null,log:{current:null,prev:null}}),context:({bindable:e,prop:t})=>({value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),isEqual:ey.isEqual,hash:e=>e.join(", "),onChange(e){t("onValueChange")?.({value:e})}})),inputValue:e(()=>({sync:!0,defaultValue:t("defaultInputValue"),value:t("inputValue"),onChange(e){t("onInputValueChange")?.({inputValue:e})}})),fieldsetDisabled:e(()=>({defaultValue:!1})),editedTagValue:e(()=>({defaultValue:""})),editedTagId:e(()=>({defaultValue:null})),editedTagIndex:e(()=>({defaultValue:null,sync:!0})),highlightedTagId:e(()=>({defaultValue:null,sync:!0,onChange(e){t("onHighlightChange")?.({highlightedValue:e})}}))}),computed:{count:({context:e})=>e.get("value").length,valueAsString:({context:e})=>e.hash("value"),trimmedInputValue:({context:e})=>e.get("inputValue").trim(),isDisabled:({prop:e})=>!!e("disabled"),isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),isAtMax:({context:e,prop:t})=>e.get("value").length===t("max"),isOverflowing:({context:e,prop:t})=>e.get("value").length>t("max")},watch({track:e,context:t,action:r,computed:n,refs:i}){e([()=>t.get("editedTagValue")],()=>{r(["syncEditedTagInputValue"])}),e([()=>t.get("inputValue")],()=>{r(["syncInputValue"])}),e([()=>t.get("highlightedTagId")],()=>{r(["logHighlightedTag"])}),e([()=>n("isOverflowing")],()=>{r(["invokeOnInvalid"])}),e([()=>JSON.stringify(i.get("log"))],()=>{r(["announceLog"])})},effects:["trackLiveRegion","trackFormControlState"],exit:["clearLog"],on:{DOUBLE_CLICK_TAG:{guard:"isTagEditable",target:"editing:tag",actions:["setEditedId"]},POINTER_DOWN_TAG:{target:"navigating:tag",actions:["highlightTag","focusInput"]},CLICK_DELETE_TAG:{target:"focused:input",actions:["deleteTag"]},SET_INPUT_VALUE:{actions:["setInputValue"]},SET_VALUE:{actions:["setValue"]},CLEAR_TAG:{actions:["deleteTag"]},SET_VALUE_AT_INDEX:{actions:["setValueAtIndex"]},CLEAR_VALUE:{actions:["clearTags","clearInputValue","focusInput"]},ADD_TAG:{actions:["addTag"]},INSERT_TAG:{guard:tn(to(ti("isAtMax"),"allowOverflow"),ti("isInputValueEmpty")),actions:["addTag","clearInputValue"]},EXTERNAL_BLUR:[{guard:"addOnBlur",actions:["raiseInsertTagEvent"]},{guard:"clearOnBlur",actions:["clearInputValue"]}]},states:{idle:{on:{FOCUS:{target:"focused:input"},POINTER_DOWN:{guard:ti("hasHighlightedTag"),target:"focused:input"}}},"focused:input":{tags:["focused"],entry:["focusInput","clearHighlightedId"],effects:["trackInteractOutside"],on:{TYPE:{actions:["setInputValue"]},BLUR:[{guard:"addOnBlur",target:"idle",actions:["raiseInsertTagEvent"]},{guard:"clearOnBlur",target:"idle",actions:["clearInputValue"]},{target:"idle"}],ENTER:{actions:["raiseInsertTagEvent"]},DELIMITER_KEY:{actions:["raiseInsertTagEvent"]},ARROW_LEFT:{guard:tn("hasTags","isCaretAtStart"),target:"navigating:tag",actions:["highlightLastTag"]},BACKSPACE:{target:"navigating:tag",guard:tn("hasTags","isCaretAtStart"),actions:["highlightLastTag"]},DELETE:{guard:"hasHighlightedTag",actions:["deleteHighlightedTag","highlightTagAtIndex"]},PASTE:[{guard:"addOnPaste",actions:["setInputValue","addTagFromPaste"]},{actions:["setInputValue"]}]}},"navigating:tag":{tags:["focused"],effects:["trackInteractOutside"],on:{ARROW_RIGHT:[{guard:tn("hasTags","isCaretAtStart",ti("isLastTagHighlighted")),actions:["highlightNextTag"]},{target:"focused:input"}],ARROW_LEFT:[{guard:ti("isCaretAtStart"),target:"focused:input"},{actions:["highlightPrevTag"]}],BLUR:{target:"idle",actions:["clearHighlightedId"]},ENTER:{guard:tn("isTagEditable","hasHighlightedTag"),target:"editing:tag",actions:["setEditedId","focusEditedTagInput"]},ARROW_DOWN:{target:"focused:input"},ESCAPE:{target:"focused:input"},TYPE:{target:"focused:input",actions:["setInputValue"]},BACKSPACE:[{guard:ti("isCaretAtStart"),target:"focused:input"},{guard:"isFirstTagHighlighted",actions:["deleteHighlightedTag","highlightFirstTag"]},{guard:"hasHighlightedTag",actions:["deleteHighlightedTag","highlightPrevTag"]},{actions:["highlightLastTag"]}],DELETE:[{guard:ti("isCaretAtStart"),target:"focused:input"},{target:"focused:input",actions:["deleteHighlightedTag","highlightTagAtIndex"]}],PASTE:[{guard:"addOnPaste",target:"focused:input",actions:["setInputValue","addTagFromPaste"]},{target:"focused:input",actions:["setInputValue"]}]}},"editing:tag":{tags:["editing","focused"],entry:["focusEditedTagInput"],effects:["autoResize"],on:{TAG_INPUT_TYPE:{actions:["setEditedTagValue"]},TAG_INPUT_ESCAPE:{target:"navigating:tag",actions:["clearEditedTagValue","focusInput","clearEditedId","highlightTagAtIndex"]},TAG_INPUT_BLUR:[{guard:"isInputRelatedTarget",target:"navigating:tag",actions:["clearEditedTagValue","clearHighlightedId","clearEditedId"]},{target:"idle",actions:["clearEditedTagValue","clearHighlightedId","clearEditedId","raiseExternalBlurEvent"]}],TAG_INPUT_ENTER:[{guard:"isEditedTagEmpty",target:"navigating:tag",actions:["deleteHighlightedTag","focusInput","clearEditedId","highlightTagAtIndex"]},{target:"navigating:tag",actions:["submitEditedTagValue","focusInput","clearEditedId","highlightTagAtIndex"]}]}}},implementations:{guards:{isInputRelatedTarget:({scope:e,event:t})=>t.relatedTarget===e9(e),isAtMax:({computed:e})=>e("isAtMax"),hasHighlightedTag:({context:e})=>null!=e.get("highlightedTagId"),isFirstTagHighlighted:({context:e,scope:t})=>e6(t,{value:e.get("value")[0],index:0})===e.get("highlightedTagId"),isEditedTagEmpty:({context:e})=>""===e.get("editedTagValue").trim(),isLastTagHighlighted:({context:e,scope:t})=>{let r=e.get("value"),n=r.length-1;return e6(t,{value:r[n],index:n})===e.get("highlightedTagId")},isInputValueEmpty:({context:e})=>0===e.get("inputValue").trim().length,hasTags:({context:e})=>e.get("value").length>0,allowOverflow:({prop:e})=>!!e("allowOverflow"),autoFocus:({prop:e})=>!!e("autoFocus"),addOnBlur:({prop:e})=>"add"===e("blurBehavior"),clearOnBlur:({prop:e})=>"clear"===e("blurBehavior"),addOnPaste:({prop:e})=>!!e("addOnPaste"),isTagEditable:({prop:e})=>!!e("editable"),isCaretAtStart:({scope:e})=>(0,q.isCaretAtStart)(e9(e))},effects:{trackInteractOutside:({scope:e,prop:t,send:r})=>(0,e5.trackInteractOutside)(e9(e),{exclude:t=>(0,q.queryAll)(e7(e),"[data-part=item]").some(e=>(0,q.contains)(e,t)),onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside(e){t("onInteractOutside")?.(e),e.defaultPrevented||r({type:"BLUR",src:"interact-outside"})}}),trackFormControlState:({context:e,send:t,scope:r})=>(0,q.trackFormControl)(te(r),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){t({type:"SET_VALUE",value:e.initial("value"),src:"form-reset"})}}),autoResize({context:e,prop:t,scope:r}){let n;return queueMicrotask(()=>{var i;let o=e.get("editedTagValue"),a=e.get("editedTagIndex");if(!o||null==a||!t("editable"))return;let s=(i={value:o,index:a},r.getById(r.ids?.itemInput?.(i)??`${e6(r,i)}:input`));n=(0,e2.autoResizeInput)(s)}),()=>{n?.()}},trackLiveRegion({scope:e,refs:t}){let r=function(e={}){let{level:t="polite",document:r=document,root:n,delay:i=0}=e,o=r.defaultView??window,a=n??r.body;return{announce:function(e,n){let s=r.getElementById(e3);s?.remove(),n=n??i;let l=r.createElement("span");l.id=e3,l.dataset.liveAnnouncer="true",l.setAttribute("aria-live",t),l.setAttribute("role","assertive"!==t?"status":"alert"),Object.assign(l.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}),a.appendChild(l),o.setTimeout(()=>{l.textContent=e},n)},destroy:function(){let e=r.getElementById(e3);e?.remove()},toJSON:()=>e3}}({level:"assertive",document:e.getDoc()});return t.set("liveRegion",r),()=>r.destroy()}},actions:{raiseInsertTagEvent({send:e}){e({type:"INSERT_TAG"})},raiseExternalBlurEvent({send:e,event:t}){e({type:"EXTERNAL_BLUR",id:t.id})},dispatchChangeEvent({scope:e,computed:t}){var r;let n;r=t("valueAsString"),(n=te(e))&&(0,q.dispatchInputValueEvent)(n,{value:r})},highlightNextTag({context:e,scope:t}){let r=e.get("highlightedTagId");if(null==r)return;let n=(0,q.nextById)(tt(t),r,!1);e.set("highlightedTagId",n?.id??null)},highlightFirstTag({context:e,scope:t}){(0,q.raf)(()=>{let r=tt(t)[0];e.set("highlightedTagId",r?.id??null)})},highlightLastTag({context:e,scope:t}){let r=tt(t)[tt(t).length-1];e.set("highlightedTagId",r?.id??null)},highlightPrevTag({context:e,scope:t}){let r=e.get("highlightedTagId");if(null==r)return;let n=(0,q.prevById)(tt(t),r,!1);e.set("highlightedTagId",n?.id??null)},highlightTag({context:e,event:t}){e.set("highlightedTagId",t.id)},highlightTagAtIndex({context:e,scope:t}){(0,q.raf)(()=>{let r=e.get("editedTagIndex");if(null==r)return;let n=tt(t)[r];null!=n&&(e.set("highlightedTagId",n.id),e.set("editedTagIndex",null))})},deleteTag({context:e,scope:t,event:r,refs:n}){let i=tr(t,r.id),o=e.get("value")[i],a=n.get("log");n.set("log",{prev:a.current,current:{type:"delete",value:o}}),e.set("value",e=>(0,ey.removeAt)(e,i))},deleteHighlightedTag({context:e,scope:t,refs:r}){let n=e.get("highlightedTagId");if(null==n)return;let i=tr(t,n);e.set("editedTagIndex",i);let o=e.get("value"),a=r.get("log");r.set("log",{prev:a.current,current:{type:"delete",value:o[i]}}),e.set("value",e=>(0,ey.removeAt)(e,i))},setEditedId({context:e,event:t,scope:r}){let n=e.get("highlightedTagId"),i=t.id??n;e.set("editedTagId",i);let o=tr(r,i),a=e.get("value")[o];e.set("editedTagIndex",o),e.set("editedTagValue",a)},clearEditedId({context:e}){e.set("editedTagId",null)},clearEditedTagValue({context:e}){e.set("editedTagValue","")},setEditedTagValue({context:e,event:t}){e.set("editedTagValue",t.value)},submitEditedTagValue({context:e,scope:t,refs:r}){let n=e.get("editedTagId");if(!n)return;let i=tr(t,n);e.set("value",t=>{let r=t.slice();return r[i]=e.get("editedTagValue"),r});let o=r.get("log");r.set("log",{prev:o.current,current:{type:"update",value:e.get("editedTagValue")}})},setValueAtIndex({context:e,event:t,refs:r}){if(t.value){e.set("value",e=>{let r=e.slice();return r[t.index]=t.value,r});let n=r.get("log");r.set("log",{prev:n.current,current:{type:"update",value:t.value}})}else(0,ey.warn)("You need to provide a value for the tag")},focusEditedTagInput({context:e,scope:t}){(0,q.raf)(()=>{let r=e.get("editedTagId");if(!r)return;let n=e8(t,r);n?.select()})},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearHighlightedId({context:e}){e.set("highlightedTagId",null)},focusInput({scope:e}){(0,q.raf)(()=>{e9(e)?.focus()})},clearInputValue({context:e}){(0,q.raf)(()=>{e.set("inputValue","")})},syncInputValue({context:e,scope:t}){let r=e9(t);r&&(0,q.setElementValue)(r,e.get("inputValue"))},syncEditedTagInputValue({context:e,event:t,scope:r}){let n=e.get("editedTagId")||e.get("highlightedTagId")||t.id;if(null==n)return;let i=e8(r,n);i&&(0,q.setElementValue)(i,e.get("editedTagValue"))},addTag({context:e,event:t,computed:r,prop:n,refs:i}){let o=t.value??r("trimmedInputValue"),a=e.get("value");if(n("validate")?.({inputValue:o,value:Array.from(a)})){let t=(0,ey.uniq)(a.concat(o));e.set("value",t);let r=i.get("log");i.set("log",{prev:r.current,current:{type:"add",value:o}})}else n("onValueInvalid")?.({reason:"invalidTag"})},addTagFromPaste({context:e,computed:t,prop:r,refs:n}){(0,q.raf)(()=>{let i=t("trimmedInputValue"),o=e.get("value");if(r("validate")?.({inputValue:i,value:Array.from(o)})){let t=r("delimiter"),a=t?i.split(t).map(e=>e.trim()):[i],s=(0,ey.uniq)(o.concat(...a));e.set("value",s);let l=n.get("log");n.set("log",{prev:l.current,current:{type:"paste",values:a}})}else r("onValueInvalid")?.({reason:"invalidTag"});e.set("inputValue","")})},clearTags({context:e,refs:t}){e.set("value",[]);let r=t.get("log");t.set("log",{prev:r.current,current:{type:"clear"}})},setValue({context:e,event:t}){e.set("value",t.value)},invokeOnInvalid({prop:e,computed:t}){t("isOverflowing")&&e("onValueInvalid")?.({reason:"rangeOverflow"})},clearLog({refs:e}){let t=e.get("log");t.prev=t.current=null},logHighlightedTag({refs:e,context:t,scope:r}){let n=t.get("highlightedTagId"),i=e.get("log");if(null==n||!i.current)return;let o=tr(r,n),a=t.get("value")[o],s=e.get("log");e.set("log",{prev:s.current,current:{type:"select",value:a}})},announceLog({refs:e,prop:t}){let r,n=e.get("liveRegion"),i=t("translations"),o=e.get("log");if(!o.current||null==n)return;let{current:a,prev:s}=o;switch(a.type){case"add":r=i.tagAdded(a.value);break;case"delete":r=i.tagDeleted(a.value);break;case"update":r=i.tagUpdated(a.value);break;case"paste":r=i.tagsPasted(a.values);break;case"select":r=i.tagSelected(a.value),s?.type==="delete"?r=`${i.tagDeleted(s.value)}. ${r}`:s?.type==="update"&&(r=`${i.tagUpdated(s.value)}. ${r}`)}r&&n.announce(r)}}}});var ta=(0,eb.createProps)()(["addOnPaste","allowOverflow","autoFocus","blurBehavior","delimiter","dir","disabled","editable","form","getRootNode","id","ids","inputValue","invalid","max","maxLength","name","onFocusOutside","onHighlightChange","onInputValueChange","onInteractOutside","onPointerDownOutside","onValueChange","onValueInvalid","required","readOnly","translations","validate","value","defaultValue","defaultInputValue"]);(0,ey.createSplitProps)(ta);var ts=(0,eb.createProps)()(["index","disabled","value"]);(0,ey.createSplitProps)(ts);let tl=(0,B.defineSlotRecipe)({slots:e4.keys(),className:"tags-input",base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},label:{fontWeight:"medium",textStyle:"sm",_disabled:{opacity:"0.5"}},control:{"--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",minH:"var(--tags-input-height)","--input-height":"var(--tags-input-height)",px:"var(--tags-input-px)",py:"var(--tags-input-py)",gap:"var(--tags-input-gap)",display:"flex",flexWrap:"wrap",alignItems:"center",borderRadius:"l2",pos:"relative",transitionProperty:"border-color, box-shadow",transitionDuration:"normal",_disabled:{opacity:"0.5"},_invalid:{borderColor:"var(--error-color)"}},input:{flex:"1",minWidth:"20",outline:"none",bg:"transparent",color:"fg",px:"calc(var(--tags-input-item-px) / 1.25)",height:"var(--tags-input-item-height)",_readOnly:{display:"none"}},itemText:{lineClamp:"1"},itemInput:{outline:"none",bg:"transparent",minWidth:"2ch",color:"inherit",px:"var(--tags-input-item-px)",height:"var(--tags-input-item-height)"},itemPreview:{height:"var(--tags-input-item-height)",userSelect:"none",display:"inline-flex",alignItems:"center",gap:"1",rounded:"l1",px:"var(--tags-input-item-px)"},itemDeleteTrigger:{display:"flex",alignItems:"center",justifyContent:"center",boxSize:"calc(var(--tags-input-item-height) / 1.5)",cursor:{base:"button",_disabled:"initial"},me:"-1",opacity:"0.4",_hover:{opacity:"1"},"[data-highlighted] &":{opacity:"1"},_icon:{boxSize:"80%"}},clearTrigger:{display:"flex",alignItems:"center",justifyContent:"center",boxSize:"calc(var(--tags-input-item-height) / 1.5)",cursor:{base:"button",_disabled:"initial"},color:"fg.muted",focusVisibleRing:"inside",focusRingWidth:"2px",rounded:"l1",_icon:{boxSize:"5"}}},variants:{size:{xs:{root:{"--tags-input-height":"sizes.8","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.6","--tags-input-item-px":"spacing.2",textStyle:"xs"}},sm:{root:{"--tags-input-height":"sizes.9","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.6","--tags-input-item-px":"spacing.2",textStyle:"sm"}},md:{root:{"--tags-input-height":"sizes.10","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.7","--tags-input-item-px":"spacing.2",textStyle:"sm"}},lg:{root:{"--tags-input-height":"sizes.11","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.8","--tags-input-item-px":"spacing.2",textStyle:"md"}}},variant:{outline:{control:{borderWidth:"1px",bg:"bg",_focus:{outlineWidth:"1px",outlineStyle:"solid",outlineColor:"var(--focus-color)",borderColor:"var(--focus-color)",_invalid:{outlineColor:"var(--error-color)",borderColor:"var(--error-color)"}}},itemPreview:{bg:"colorPalette.subtle",_highlighted:{bg:"colorPalette.muted"}}},subtle:{control:{bg:"bg.muted",borderWidth:"1px",borderColor:"transparent",_focus:{outlineWidth:"1px",outlineStyle:"solid",outlineColor:"var(--focus-color)",borderColor:"var(--focus-color)",_invalid:{outlineColor:"var(--error-color)",borderColor:"var(--error-color)"}}},itemPreview:{bg:"bg",borderWidth:"1px",_highlighted:{bg:"colorPalette.subtle",borderColor:"colorPalette.emphasized"}}},flushed:{control:{borderRadius:"0",px:"0",bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",_focus:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)"}},itemPreview:{bg:"colorPalette.subtle",_highlighted:{bg:"colorPalette.muted"}}}}},defaultVariants:{size:"md",variant:"outline"}}),tu=(0,B.defineSlotRecipe)({slots:eC.timelineAnatomy.keys(),className:"chakra-timeline",base:{root:{display:"flex",flexDirection:"column",width:"full","--timeline-thickness":"1px","--timeline-gutter":"4px"},item:{"--timeline-content-gap":"spacing.6",display:"flex",position:"relative",alignItems:"flex-start",flexShrink:0,gap:"4",_last:{"--timeline-content-gap":"0"}},separator:{display:"var(--timeline-separator-display)",position:"absolute",borderStartWidth:"var(--timeline-thickness)",ms:"calc(-1 * var(--timeline-thickness) / 2)",insetInlineStart:"calc(var(--timeline-indicator-size) / 2)",insetBlock:"0",borderColor:"border"},indicator:{outline:"2px solid {colors.bg}",position:"relative",flexShrink:"0",boxSize:"var(--timeline-indicator-size)",fontSize:"var(--timeline-font-size)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",fontWeight:"medium"},connector:{alignSelf:"stretch",position:"relative"},content:{pb:"var(--timeline-content-gap)",display:"flex",flexDirection:"column",width:"full",gap:"2"},title:{display:"flex",fontWeight:"medium",flexWrap:"wrap",gap:"1.5",alignItems:"center",mt:"var(--timeline-margin)"},description:{color:"fg.muted",textStyle:"xs"}},variants:{variant:{subtle:{indicator:{bg:"colorPalette.muted"}},solid:{indicator:{bg:"colorPalette.solid",color:"colorPalette.contrast"}},outline:{indicator:{bg:"currentBg",borderWidth:"1px",borderColor:"colorPalette.muted"}},plain:{}},showLastSeparator:{true:{item:{_last:{"--timeline-separator-display":"initial"}}},false:{item:{_last:{"--timeline-separator-display":"none"}}}},size:{sm:{root:{"--timeline-indicator-size":"sizes.4","--timeline-font-size":"fontSizes.2xs"},title:{textStyle:"xs"}},md:{root:{"--timeline-indicator-size":"sizes.5","--timeline-font-size":"fontSizes.xs"},title:{textStyle:"sm"}},lg:{root:{"--timeline-indicator-size":"sizes.6","--timeline-font-size":"fontSizes.xs"},title:{mt:"0.5",textStyle:"sm"}},xl:{root:{"--timeline-indicator-size":"sizes.8","--timeline-font-size":"fontSizes.sm"},title:{mt:"1.5",textStyle:"sm"}}}},defaultVariants:{size:"md",variant:"solid",showLastSeparator:!1}}),tc=(0,B.defineSlotRecipe)({slots:eC.toastAnatomy.keys(),className:"chakra-toast",base:{root:{width:"full",display:"flex",alignItems:"flex-start",position:"relative",gap:"3",py:"4",ps:"4",pe:"6",borderRadius:"l2",translate:"var(--x) var(--y)",scale:"var(--scale)",zIndex:"var(--z-index)",height:"var(--height)",opacity:"var(--opacity)",willChange:"translate, opacity, scale",transition:"translate 400ms, scale 400ms, opacity 400ms, height 400ms, box-shadow 200ms",transitionTimingFunction:"cubic-bezier(0.21, 1.02, 0.73, 1)",_closed:{transition:"translate 400ms, scale 400ms, opacity 200ms",transitionTimingFunction:"cubic-bezier(0.06, 0.71, 0.55, 1)"},bg:"bg.panel",color:"fg",boxShadow:"xl","--toast-trigger-bg":"colors.bg.muted","&[data-type=warning]":{bg:"orange.solid",color:"orange.contrast","--toast-trigger-bg":"{white/10}","--toast-border-color":"{white/40}"},"&[data-type=success]":{bg:"green.solid",color:"green.contrast","--toast-trigger-bg":"{white/10}","--toast-border-color":"{white/40}"},"&[data-type=error]":{bg:"red.solid",color:"red.contrast","--toast-trigger-bg":"{white/10}","--toast-border-color":"{white/40}"}},title:{fontWeight:"medium",textStyle:"sm",marginEnd:"2"},description:{display:"inline",textStyle:"sm",opacity:"0.8"},indicator:{flexShrink:"0",boxSize:"5"},actionTrigger:{textStyle:"sm",fontWeight:"medium",height:"8",px:"3",borderRadius:"l2",alignSelf:"center",borderWidth:"1px",borderColor:"var(--toast-border-color, inherit)",transition:"background 200ms",_hover:{bg:"var(--toast-trigger-bg)"}},closeTrigger:{position:"absolute",top:"1",insetEnd:"1",padding:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"{currentColor/60}",borderRadius:"l2",textStyle:"md",transition:"background 200ms",_icon:{boxSize:"1em"}}}});var td=e.i(70829),td=td;let th=(0,B.defineSlotRecipe)({slots:td.anatomy.keys(),className:"chakra-tooltip",base:{content:{"--tooltip-bg":"colors.bg.inverted",bg:"var(--tooltip-bg)",color:"fg.inverted",px:"2.5",py:"1",borderRadius:"l2",fontWeight:"medium",textStyle:"xs",boxShadow:"md",maxW:"xs",zIndex:"tooltip",transformOrigin:"var(--transform-origin)",_open:{animationStyle:"scale-fade-in",animationDuration:"fast"},_closed:{animationStyle:"scale-fade-out",animationDuration:"fast"}},arrow:{"--arrow-size":"sizes.2","--arrow-background":"var(--tooltip-bg)"},arrowTip:{borderTopWidth:"1px",borderInlineStartWidth:"1px",borderColor:"var(--tooltip-bg)"}}});var tf=e.i(16466),tp=(0,$.createAnatomy)("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree");tp.build();var tg=e=>new tf.TreeCollection(e);tg.empty=()=>new tf.TreeCollection({rootNode:{children:[]}});var tm=(e,t)=>{null!=t&&e.getById(e.ids?.node?.(t)??`tree:${e.id}:node:${t}`)?.focus()},tv=(e,t)=>e.getById(`tree:${e.id}:rename-input:${t}`);function tb(e,t){let{context:r,prop:n,refs:i}=e;if(!n("loadChildren"))return void r.set("expandedValue",e=>(0,ey.uniq)((0,ey.add)(e,...t)));let o=r.get("loadingStatus"),[a,s]=(0,ey.partition)(t,e=>"loaded"===o[e]);if(a.length>0&&r.set("expandedValue",e=>(0,ey.uniq)((0,ey.add)(e,...a))),0===s.length)return;let l=n("collection"),[u,c]=(0,ey.partition)(s,e=>{let t=l.findNode(e);return l.getNodeChildren(t).length>0});if(u.length>0&&r.set("expandedValue",e=>(0,ey.uniq)((0,ey.add)(e,...u))),0===c.length)return;r.set("loadingStatus",e=>({...e,...c.reduce((e,t)=>({...e,[t]:"loading"}),{})}));let d=c.map(e=>{let t=l.getIndexPath(e),r=l.getValuePath(t),n=l.findNode(e);return{id:e,indexPath:t,valuePath:r,node:n}}),h=i.get("pendingAborts"),f=n("loadChildren");(0,ey.ensure)(f,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion"),Promise.allSettled(d.map(({id:e,indexPath:t,valuePath:r,node:n})=>{let i=h.get(e);i&&(i.abort(),h.delete(e));let o=new AbortController;return h.set(e,o),f({valuePath:r,indexPath:t,node:n,signal:o.signal})})).then(e=>{let t=[],i=[],o=r.get("loadingStatus"),a=n("collection");e.forEach((e,r)=>{let{id:n,indexPath:s,node:l,valuePath:u}=d[r];"fulfilled"===e.status?(o[n]="loaded",t.push(n),a=a.replace(s,{...l,children:e.value})):(h.delete(n),Reflect.deleteProperty(o,n),i.push({node:l,error:e.reason,indexPath:s,valuePath:u}))}),r.set("loadingStatus",o),t.length&&(r.set("expandedValue",e=>(0,ey.uniq)((0,ey.add)(e,...t))),n("onLoadChildrenComplete")?.({collection:a})),i.length&&n("onLoadChildrenError")?.({nodes:i})})}function ty(e){let{prop:t,context:r}=e;return function({indexPath:e}){return t("collection").getValuePath(e).slice(0,-1).some(e=>!r.get("expandedValue").includes(e))}}var{and:tx}=(0,G.createGuards)();(0,G.createMachine)({props:({props:e})=>({selectionMode:"single",collection:tg.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[],...e}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:r})=>({expandedValue:t(()=>({defaultValue:e("defaultExpandedValue"),value:e("expandedValue"),isEqual:ey.isEqual,onChange(t){let n=r().get("focusedValue");e("onExpandedChange")?.({expandedValue:t,focusedValue:n,get expandedNodes(){return e("collection").findNodes(t)}})}})),selectedValue:t(()=>({defaultValue:e("defaultSelectedValue"),value:e("selectedValue"),isEqual:ey.isEqual,onChange(t){let n=r().get("focusedValue");e("onSelectionChange")?.({selectedValue:t,focusedValue:n,get selectedNodes(){return e("collection").findNodes(t)}})}})),focusedValue:t(()=>({defaultValue:e("defaultFocusedValue")||null,value:e("focusedValue"),onChange(t){e("onFocusChange")?.({focusedValue:t,get focusedNode(){return t?e("collection").findNode(t):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:e("defaultCheckedValue")||[],value:e("checkedValue"),isEqual:ey.isEqual,onChange(t){e("onCheckedChange")?.({checkedValue:t})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}),refs:()=>({typeaheadState:{...q.getByTypeahead.defaultOptions},pendingAborts:new Map}),computed:{isMultipleSelection:({prop:e})=>"multiple"===e("selectionMode"),isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:e,context:t})=>{let r=[];return e("collection").visit({skip:ty({prop:e,context:t}),onEnter:(e,t)=>{r.push({node:e,indexPath:t})}}),r}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:tx("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:tx("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:tx("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:tx("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:tx("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:tx("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:tx("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:tx("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:tx("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:tx("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:e,event:t})=>e.get("focusedValue")===t.id,isBranchExpanded:({context:e,event:t})=>e.get("expandedValue").includes(t.id),isShiftKey:({event:e})=>e.shiftKey,isCtrlKey:({event:e})=>e.ctrlKey,hasSelectedItems:({context:e})=>e.get("selectedValue").length>0,isMultipleSelection:({prop:e})=>"multiple"===e("selectionMode"),moveFocus:({event:e})=>!!e.moveFocus,expandOnClick:({prop:e})=>!!e("expandOnClick"),isRenameLabelValid:({event:e})=>""!==e.label.trim()},actions:{selectNode({context:e,event:t}){let r=t.id||t.value;e.set("selectedValue",e=>null==r?e:!t.isTrusted&&(0,ey.isArray)(r)?e.concat(...r):[(0,ey.isArray)(r)?(0,ey.last)(r):r].filter(Boolean))},deselectNode({context:e,event:t}){let r=(0,ey.toArray)(t.id||t.value);e.set("selectedValue",e=>(0,ey.remove)(e,...r))},setFocusedNode({context:e,event:t}){e.set("focusedValue",t.id)},clearFocusedNode({context:e}){e.set("focusedValue",null)},clearSelectedItem({context:e}){e.set("selectedValue",[])},toggleBranchNode({context:e,event:t,action:r}){r(e.get("expandedValue").includes(t.id)?["collapseBranch"]:["expandBranch"])},expandBranch(e){let{event:t}=e;tb(e,[t.id])},expandBranches(e){let{context:t,event:r}=e,n=(0,ey.toArray)(r.value);tb(e,(0,ey.diff)(n,t.get("expandedValue")))},collapseBranch({context:e,event:t}){e.set("expandedValue",e=>(0,ey.remove)(e,t.id))},collapseBranches(e){let{context:t,event:r}=e,n=(0,ey.toArray)(r.value);t.set("expandedValue",e=>(0,ey.remove)(e,...n))},setExpanded({context:e,event:t}){(0,ey.isArray)(t.value)&&e.set("expandedValue",t.value)},clearExpanded({context:e}){e.set("expandedValue",[])},setSelected({context:e,event:t}){(0,ey.isArray)(t.value)&&e.set("selectedValue",t.value)},clearSelected({context:e}){e.set("selectedValue",[])},focusTreeFirstNode({prop:e,scope:t}){let r=e("collection"),n=r.getFirstNode();tm(t,r.getNodeValue(n))},focusTreeLastNode(e){let{prop:t,scope:r}=e,n=t("collection"),i=n.getLastNode(void 0,{skip:ty(e)});tm(r,n.getNodeValue(i))},focusBranchFirstNode({event:e,prop:t,scope:r}){let n=t("collection"),i=n.findNode(e.id),o=n.getFirstNode(i);tm(r,n.getNodeValue(o))},focusTreeNextNode(e){let{event:t,prop:r,scope:n}=e,i=r("collection"),o=i.getNextNode(t.id,{skip:ty(e)});o&&tm(n,i.getNodeValue(o))},focusTreePrevNode(e){let{event:t,prop:r,scope:n}=e,i=r("collection"),o=i.getPreviousNode(t.id,{skip:ty(e)});o&&tm(n,i.getNodeValue(o))},focusBranchNode({event:e,prop:t,scope:r}){let n=t("collection"),i=n.getParentNode(e.id);tm(r,i?n.getNodeValue(i):void 0)},selectAllNodes({context:e,prop:t}){e.set("selectedValue",t("collection").getValues())},focusMatchedNode(e){let{context:t,prop:r,refs:n,event:i,scope:o,computed:a}=e,s=a("visibleNodes").map(({node:e})=>({textContent:r("collection").stringifyNode(e),id:r("collection").getNodeValue(e)})),l=(0,q.getByTypeahead)(s,{state:n.get("typeaheadState"),activeId:t.get("focusedValue"),key:i.key});tm(o,l?.id)},toggleNodeSelection({context:e,event:t}){let r=(0,ey.addOrRemove)(e.get("selectedValue"),t.id);e.set("selectedValue",r)},expandAllBranches(e){let{context:t,prop:r}=e,n=r("collection").getBranchValues();tb(e,(0,ey.diff)(n,t.get("expandedValue")))},expandSiblingBranches(e){let{context:t,event:r,prop:n}=e,i=n("collection"),o=i.getIndexPath(r.id);if(!o)return;let a=i.getSiblingNodes(o).map(e=>i.getNodeValue(e));tb(e,(0,ey.diff)(a,t.get("expandedValue")))},extendSelectionToNode(e){let{context:t,event:r,prop:n,computed:i}=e,o=n("collection"),a=(0,ey.first)(t.get("selectedValue"))||o.getNodeValue(o.getFirstNode()),s=r.id,l=[a,s],u=0;i("visibleNodes").forEach(({node:e})=>{let t=o.getNodeValue(e);1===u&&l.push(t),(t===a||t===s)&&u++}),t.set("selectedValue",(0,ey.uniq)(l))},extendSelectionToNextNode(e){let{context:t,event:r,prop:n}=e,i=n("collection"),o=i.getNextNode(r.id,{skip:ty(e)});if(!o)return;let a=new Set(t.get("selectedValue")),s=i.getNodeValue(o);null!=s&&(a.has(r.id)&&a.has(s)?a.delete(r.id):a.has(s)||a.add(s),t.set("selectedValue",Array.from(a)))},extendSelectionToPrevNode(e){let{context:t,event:r,prop:n}=e,i=n("collection"),o=i.getPreviousNode(r.id,{skip:ty(e)});if(!o)return;let a=new Set(t.get("selectedValue")),s=i.getNodeValue(o);null!=s&&(a.has(r.id)&&a.has(s)?a.delete(r.id):a.has(s)||a.add(s),t.set("selectedValue",Array.from(a)))},extendSelectionToFirstNode(e){let{context:t,prop:r}=e,n=r("collection"),i=(0,ey.first)(t.get("selectedValue")),o=[];n.visit({skip:ty(e),onEnter:e=>{let t=n.getNodeValue(e);if(o.push(t),t===i)return"stop"}}),t.set("selectedValue",o)},extendSelectionToLastNode(e){let{context:t,prop:r}=e,n=r("collection"),i=(0,ey.first)(t.get("selectedValue")),o=[],a=!1;n.visit({skip:ty(e),onEnter:e=>{let t=n.getNodeValue(e);t===i&&(a=!0),a&&o.push(t)}}),t.set("selectedValue",o)},clearPendingAborts({refs:e}){let t=e.get("pendingAborts");t.forEach(e=>e.abort()),t.clear()},toggleChecked({context:e,event:t,prop:r}){let n=r("collection");e.set("checkedValue",e=>{var r;let i,o;return t.isBranch?(r=t.value,o=(i=n.getDescendantValues(r)).every(t=>e.includes(t)),(0,ey.uniq)(o?(0,ey.remove)(e,...i):(0,ey.add)(e,...i))):(0,ey.addOrRemove)(e,t.value)})},setChecked({context:e,event:t}){e.set("checkedValue",t.value)},clearChecked({context:e}){e.set("checkedValue",[])},setRenamingValue({context:e,event:t,prop:r}){e.set("renamingValue",t.value);let n=r("onRenameStart");if(n){let e=r("collection"),i=e.getIndexPath(t.value);if(i){let r=e.at(i);r&&n({value:t.value,node:r,indexPath:i})}}},submitRenaming({context:e,event:t,prop:r,scope:n}){let i=e.get("renamingValue");if(!i)return;let o=r("collection").getIndexPath(i);if(!o)return;let a=t.label.trim(),s=r("onBeforeRename");if(s&&!s({value:i,label:a,indexPath:o})){e.set("renamingValue",null),tm(n,i);return}r("onRenameComplete")?.({value:i,label:a,indexPath:o}),e.set("renamingValue",null),tm(n,i)},cancelRenaming({context:e,scope:t}){let r=e.get("renamingValue");e.set("renamingValue",null),r&&tm(t,r)},syncRenameInput({context:e,scope:t,prop:r}){let n=e.get("renamingValue");if(!n)return;let i=r("collection"),o=i.findNode(n);if(!o)return;let a=i.stringifyNode(o),s=tv(t,n);(0,q.setElementValue)(s,a)},focusRenameInput({context:e,scope:t}){let r=e.get("renamingValue");if(!r)return;let n=tv(t,r);n&&(n.focus(),n.select())}}}});var tw=(0,eb.createProps)()(["ids","collection","dir","expandedValue","expandOnClick","defaultFocusedValue","focusedValue","getRootNode","id","onExpandedChange","onFocusChange","onSelectionChange","checkedValue","selectedValue","selectionMode","typeahead","defaultExpandedValue","defaultSelectedValue","defaultCheckedValue","onCheckedChange","onLoadChildrenComplete","onLoadChildrenError","loadChildren","canRename","onRenameStart","onBeforeRename","onRenameComplete"]);(0,ey.createSplitProps)(tw);var t_=(0,eb.createProps)()(["node","indexPath"]);(0,ey.createSplitProps)(t_);let tC=(0,B.defineStyle)({display:"flex",alignItems:"center",gap:"var(--tree-item-gap)",rounded:"l2",userSelect:"none",position:"relative","--tree-depth":"calc(var(--depth) - 1)","--tree-indentation-offset":"calc(var(--tree-indentation) * var(--tree-depth))","--tree-icon-offset":"calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)","--tree-offset":"calc(var(--tree-padding-inline) + var(--tree-indentation-offset) + var(--tree-icon-offset))",ps:"var(--tree-offset)",pe:"var(--tree-padding-inline)",py:"var(--tree-padding-block)",focusVisibleRing:"inside",focusRingColor:"border.emphasized",focusRingWidth:"2px","&:hover, &:focus-visible":{bg:"bg.muted"},_disabled:{layerStyle:"disabled"}}),tk=(0,B.defineStyle)({flex:"1"}),tS=(0,B.defineStyle)({_selected:{bg:"colorPalette.subtle",color:"colorPalette.fg"}}),tE=(0,B.defineStyle)({_selected:{layerStyle:"fill.solid"}}),tO=(0,B.defineSlotRecipe)({slots:tp.keys(),className:"chakra-tree-view",base:{root:{width:"full",display:"flex",flexDirection:"column",gap:"2"},tree:{display:"flex",flexDirection:"column","--tree-item-gap":"spacing.2",_icon:{boxSize:"var(--tree-icon-size)"}},label:{fontWeight:"medium",textStyle:"sm"},branch:{position:"relative"},branchContent:{position:"relative"},branchIndentGuide:{height:"100%",width:"1px",bg:"border",position:"absolute","--tree-depth":"calc(var(--depth) - 1)","--tree-indentation-offset":"calc(var(--tree-indentation) * var(--tree-depth))","--tree-offset":"calc(var(--tree-padding-inline) + var(--tree-indentation-offset))","--tree-icon-offset":"calc(var(--tree-icon-size) * 0.5 * var(--depth))",insetInlineStart:"calc(var(--tree-offset) + var(--tree-icon-offset))",zIndex:"1"},branchIndicator:{color:"fg.muted",transformOrigin:"center",transitionDuration:"normal",transitionProperty:"transform",transitionTimingFunction:"default",_open:{transform:"rotate(90deg)"}},branchTrigger:{display:"inline-flex",alignItems:"center",justifyContent:"center"},branchControl:tC,item:tC,itemText:tk,branchText:tk,nodeCheckbox:{display:"inline-flex"}},variants:{size:{md:{tree:{textStyle:"sm","--tree-indentation":"spacing.4","--tree-padding-inline":"spacing.3","--tree-padding-block":"spacing.1.5","--tree-icon-size":"spacing.4"}},sm:{tree:{textStyle:"sm","--tree-indentation":"spacing.4","--tree-padding-inline":"spacing.3","--tree-padding-block":"spacing.1","--tree-icon-size":"spacing.3"}},xs:{tree:{textStyle:"xs","--tree-indentation":"spacing.4","--tree-padding-inline":"spacing.2","--tree-padding-block":"spacing.1","--tree-icon-size":"spacing.3"}}},variant:{subtle:{branchControl:tS,item:tS},solid:{branchControl:tE,item:tE}},animateContent:{true:{branchContent:{_open:{animationName:"expand-height, fade-in",animationDuration:"moderate"},_closed:{animationName:"collapse-height, fade-out",animationDuration:"moderate"}}}}},defaultVariants:{size:"md",variant:"subtle"}}),tI={accordion:h.accordionSlotRecipe,actionBar:f.actionBarSlotRecipe,alert:p.alertSlotRecipe,avatar:g.avatarSlotRecipe,blockquote:m.blockquoteSlotRecipe,breadcrumb:v.breadcrumbSlotRecipe,card:b.cardSlotRecipe,checkbox:y.checkboxSlotRecipe,checkboxCard:x.checkboxCardSlotRecipe,codeBlock:w.codeBlockSlotRecipe,collapsible:_.collapsibleSlotRecipe,dataList:S.dataListSlotRecipe,dialog:E.dialogSlotRecipe,drawer:O.drawerSlotRecipe,editable:I.editableSlotRecipe,emptyState:P.emptyStateSlotRecipe,field:T.fieldSlotRecipe,fieldset:R.fieldsetSlotRecipe,fileUpload:A.fileUploadSlotRecipe,hoverCard:M.hoverCardSlotRecipe,list:N.listSlotRecipe,listbox:D.listboxSlotRecipe,menu:L.menuSlotRecipe,nativeSelect:V.nativeSelectSlotRecipe,numberInput:F.numberInputSlotRecipe,pinInput:j.pinInputSlotRecipe,popover:z.popoverSlotRecipe,progress:W,progressCircle:U,radioCard:eS,radioGroup:eE,ratingGroup:eO,scrollArea:eH,segmentGroup:eU,select:e$.selectSlotRecipe,combobox:k.comboboxSlotRecipe,slider:eq,stat:eG,steps:eY,switch:eX,table:eQ,tabs:eZ,tag:e1,tagsInput:tl,toast:tc,tooltip:th,status:eK,timeline:tu,colorPicker:C.colorPickerSlotRecipe,qrCode:e_,treeView:tO},tP=(0,B.defineTextStyles)({"2xs":{value:{fontSize:"2xs",lineHeight:"0.75rem"}},xs:{value:{fontSize:"xs",lineHeight:"1rem"}},sm:{value:{fontSize:"sm",lineHeight:"1.25rem"}},md:{value:{fontSize:"md",lineHeight:"1.5rem"}},lg:{value:{fontSize:"lg",lineHeight:"1.75rem"}},xl:{value:{fontSize:"xl",lineHeight:"1.875rem"}},"2xl":{value:{fontSize:"2xl",lineHeight:"2rem"}},"3xl":{value:{fontSize:"3xl",lineHeight:"2.375rem"}},"4xl":{value:{fontSize:"4xl",lineHeight:"2.75rem",letterSpacing:"-0.025em"}},"5xl":{value:{fontSize:"5xl",lineHeight:"3.75rem",letterSpacing:"-0.025em"}},"6xl":{value:{fontSize:"6xl",lineHeight:"4.5rem",letterSpacing:"-0.025em"}},"7xl":{value:{fontSize:"7xl",lineHeight:"5.75rem",letterSpacing:"-0.025em"}},none:{value:{}},label:{value:{fontSize:"sm",lineHeight:"1.25rem",fontWeight:"medium"}}}),tT=B.defineTokens.animations({spin:{value:"spin 1s linear infinite"},ping:{value:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite"},pulse:{value:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"},bounce:{value:"bounce 1s infinite"}}),tR=B.defineTokens.aspectRatios({square:{value:"1 / 1"},landscape:{value:"4 / 3"},portrait:{value:"3 / 4"},wide:{value:"16 / 9"},ultrawide:{value:"18 / 5"},golden:{value:"1.618 / 1"}}),tA=B.defineTokens.blurs({none:{value:" "},sm:{value:"4px"},md:{value:"8px"},lg:{value:"12px"},xl:{value:"16px"},"2xl":{value:"24px"},"3xl":{value:"40px"},"4xl":{value:"64px"}}),tM=B.defineTokens.borders({xs:{value:"0.5px solid"},sm:{value:"1px solid"},md:{value:"2px solid"},lg:{value:"4px solid"},xl:{value:"8px solid"}}),tN=B.defineTokens.colors({transparent:{value:"transparent"},current:{value:"currentColor"},black:{value:"#09090B"},white:{value:"#FFFFFF"},whiteAlpha:{50:{value:"rgba(255, 255, 255, 0.04)"},100:{value:"rgba(255, 255, 255, 0.06)"},200:{value:"rgba(255, 255, 255, 0.08)"},300:{value:"rgba(255, 255, 255, 0.16)"},400:{value:"rgba(255, 255, 255, 0.24)"},500:{value:"rgba(255, 255, 255, 0.36)"},600:{value:"rgba(255, 255, 255, 0.48)"},700:{value:"rgba(255, 255, 255, 0.64)"},800:{value:"rgba(255, 255, 255, 0.80)"},900:{value:"rgba(255, 255, 255, 0.92)"},950:{value:"rgba(255, 255, 255, 0.95)"}},blackAlpha:{50:{value:"rgba(0, 0, 0, 0.04)"},100:{value:"rgba(0, 0, 0, 0.06)"},200:{value:"rgba(0, 0, 0, 0.08)"},300:{value:"rgba(0, 0, 0, 0.16)"},400:{value:"rgba(0, 0, 0, 0.24)"},500:{value:"rgba(0, 0, 0, 0.36)"},600:{value:"rgba(0, 0, 0, 0.48)"},700:{value:"rgba(0, 0, 0, 0.64)"},800:{value:"rgba(0, 0, 0, 0.80)"},900:{value:"rgba(0, 0, 0, 0.92)"},950:{value:"rgba(0, 0, 0, 0.95)"}},gray:{50:{value:"#fafafa"},100:{value:"#f4f4f5"},200:{value:"#e4e4e7"},300:{value:"#d4d4d8"},400:{value:"#a1a1aa"},500:{value:"#71717a"},600:{value:"#52525b"},700:{value:"#3f3f46"},800:{value:"#27272a"},900:{value:"#18181b"},950:{value:"#111111"}},red:{50:{value:"#fef2f2"},100:{value:"#fee2e2"},200:{value:"#fecaca"},300:{value:"#fca5a5"},400:{value:"#f87171"},500:{value:"#ef4444"},600:{value:"#dc2626"},700:{value:"#991919"},800:{value:"#511111"},900:{value:"#300c0c"},950:{value:"#1f0808"}},orange:{50:{value:"#fff7ed"},100:{value:"#ffedd5"},200:{value:"#fed7aa"},300:{value:"#fdba74"},400:{value:"#fb923c"},500:{value:"#f97316"},600:{value:"#ea580c"},700:{value:"#92310a"},800:{value:"#6c2710"},900:{value:"#3b1106"},950:{value:"#220a04"}},yellow:{50:{value:"#fefce8"},100:{value:"#fef9c3"},200:{value:"#fef08a"},300:{value:"#fde047"},400:{value:"#facc15"},500:{value:"#eab308"},600:{value:"#ca8a04"},700:{value:"#845209"},800:{value:"#713f12"},900:{value:"#422006"},950:{value:"#281304"}},green:{50:{value:"#f0fdf4"},100:{value:"#dcfce7"},200:{value:"#bbf7d0"},300:{value:"#86efac"},400:{value:"#4ade80"},500:{value:"#22c55e"},600:{value:"#16a34a"},700:{value:"#116932"},800:{value:"#124a28"},900:{value:"#042713"},950:{value:"#03190c"}},teal:{50:{value:"#f0fdfa"},100:{value:"#ccfbf1"},200:{value:"#99f6e4"},300:{value:"#5eead4"},400:{value:"#2dd4bf"},500:{value:"#14b8a6"},600:{value:"#0d9488"},700:{value:"#0c5d56"},800:{value:"#114240"},900:{value:"#032726"},950:{value:"#021716"}},blue:{50:{value:"#eff6ff"},100:{value:"#dbeafe"},200:{value:"#bfdbfe"},300:{value:"#a3cfff"},400:{value:"#60a5fa"},500:{value:"#3b82f6"},600:{value:"#2563eb"},700:{value:"#173da6"},800:{value:"#1a3478"},900:{value:"#14204a"},950:{value:"#0c142e"}},cyan:{50:{value:"#ecfeff"},100:{value:"#cffafe"},200:{value:"#a5f3fc"},300:{value:"#67e8f9"},400:{value:"#22d3ee"},500:{value:"#06b6d4"},600:{value:"#0891b2"},700:{value:"#0c5c72"},800:{value:"#134152"},900:{value:"#072a38"},950:{value:"#051b24"}},purple:{50:{value:"#faf5ff"},100:{value:"#f3e8ff"},200:{value:"#e9d5ff"},300:{value:"#d8b4fe"},400:{value:"#c084fc"},500:{value:"#a855f7"},600:{value:"#9333ea"},700:{value:"#641ba3"},800:{value:"#4a1772"},900:{value:"#2f0553"},950:{value:"#1a032e"}},pink:{50:{value:"#fdf2f8"},100:{value:"#fce7f3"},200:{value:"#fbcfe8"},300:{value:"#f9a8d4"},400:{value:"#f472b6"},500:{value:"#ec4899"},600:{value:"#db2777"},700:{value:"#a41752"},800:{value:"#6d0e34"},900:{value:"#45061f"},950:{value:"#2c0514"}}}),tD=B.defineTokens.cursor({button:{value:"pointer"},checkbox:{value:"default"},disabled:{value:"not-allowed"},menuitem:{value:"default"},option:{value:"default"},radio:{value:"default"},slider:{value:"default"},switch:{value:"pointer"}}),tL=B.defineTokens.durations({fastest:{value:"50ms"},faster:{value:"100ms"},fast:{value:"150ms"},moderate:{value:"200ms"},slow:{value:"300ms"},slower:{value:"400ms"},slowest:{value:"500ms"}}),tV=B.defineTokens.easings({"ease-in":{value:"cubic-bezier(0.42, 0, 1, 1)"},"ease-out":{value:"cubic-bezier(0, 0, 0.58, 1)"},"ease-in-out":{value:"cubic-bezier(0.42, 0, 0.58, 1)"},"ease-in-smooth":{value:"cubic-bezier(0.32, 0.72, 0, 1)"}}),tF=B.defineTokens.fontSizes({"2xs":{value:"0.625rem"},xs:{value:"0.75rem"},sm:{value:"0.875rem"},md:{value:"1rem"},lg:{value:"1.125rem"},xl:{value:"1.25rem"},"2xl":{value:"1.5rem"},"3xl":{value:"1.875rem"},"4xl":{value:"2.25rem"},"5xl":{value:"3rem"},"6xl":{value:"3.75rem"},"7xl":{value:"4.5rem"},"8xl":{value:"6rem"},"9xl":{value:"8rem"}}),tj=B.defineTokens.fontWeights({thin:{value:"100"},extralight:{value:"200"},light:{value:"300"},normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"},extrabold:{value:"800"},black:{value:"900"}}),tz='-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',tB=B.defineTokens.fonts({heading:{value:`Inter, ${tz}`},body:{value:`Inter, ${tz}`},mono:{value:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'}}),tH=(0,B.defineKeyframes)({spin:{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}},pulse:{"50%":{opacity:"0.5"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}},"bg-position":{from:{backgroundPosition:"var(--animate-from, 1rem) 0"},to:{backgroundPosition:"var(--animate-to, 0) 0"}},position:{from:{insetInlineStart:"var(--animate-from-x)",insetBlockStart:"var(--animate-from-y)"},to:{insetInlineStart:"var(--animate-to-x)",insetBlockStart:"var(--animate-to-y)"}},"circular-progress":{"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100%"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260%"}},"expand-height":{from:{height:"var(--collapsed-height, 0)"},to:{height:"var(--height)"}},"collapse-height":{from:{height:"var(--height)"},to:{height:"var(--collapsed-height, 0)"}},"expand-width":{from:{width:"var(--collapsed-width, 0)"},to:{width:"var(--width)"}},"collapse-width":{from:{height:"var(--width)"},to:{height:"var(--collapsed-width, 0)"}},"fade-in":{from:{opacity:0},to:{opacity:1}},"fade-out":{from:{opacity:1},to:{opacity:0}},"slide-from-left-full":{from:{translate:"-100% 0"},to:{translate:"0 0"}},"slide-from-right-full":{from:{translate:"100% 0"},to:{translate:"0 0"}},"slide-from-top-full":{from:{translate:"0 -100%"},to:{translate:"0 0"}},"slide-from-bottom-full":{from:{translate:"0 100%"},to:{translate:"0 0"}},"slide-to-left-full":{from:{translate:"0 0"},to:{translate:"-100% 0"}},"slide-to-right-full":{from:{translate:"0 0"},to:{translate:"100% 0"}},"slide-to-top-full":{from:{translate:"0 0"},to:{translate:"0 -100%"}},"slide-to-bottom-full":{from:{translate:"0 0"},to:{translate:"0 100%"}},"slide-from-top":{"0%":{translate:"0 -0.5rem"},to:{translate:"0"}},"slide-from-bottom":{"0%":{translate:"0 0.5rem"},to:{translate:"0"}},"slide-from-left":{"0%":{translate:"-0.5rem 0"},to:{translate:"0"}},"slide-from-right":{"0%":{translate:"0.5rem 0"},to:{translate:"0"}},"slide-to-top":{"0%":{translate:"0"},to:{translate:"0 -0.5rem"}},"slide-to-bottom":{"0%":{translate:"0"},to:{translate:"0 0.5rem"}},"slide-to-left":{"0%":{translate:"0"},to:{translate:"-0.5rem 0"}},"slide-to-right":{"0%":{translate:"0"},to:{translate:"0.5rem 0"}},"scale-in":{from:{scale:"0.95"},to:{scale:"1"}},"scale-out":{from:{scale:"1"},to:{scale:"0.95"}}}),tW=B.defineTokens.letterSpacings({tighter:{value:"-0.05em"},tight:{value:"-0.025em"},wide:{value:"0.025em"},wider:{value:"0.05em"},widest:{value:"0.1em"}}),tU=B.defineTokens.lineHeights({shorter:{value:1.25},short:{value:1.375},moderate:{value:1.5},tall:{value:1.625},taller:{value:2}}),t$=B.defineTokens.radii({none:{value:"0"},"2xs":{value:"0.0625rem"},xs:{value:"0.125rem"},sm:{value:"0.25rem"},md:{value:"0.375rem"},lg:{value:"0.5rem"},xl:{value:"0.75rem"},"2xl":{value:"1rem"},"3xl":{value:"1.5rem"},"4xl":{value:"2rem"},full:{value:"9999px"}}),tq=B.defineTokens.spacing({.5:{value:"0.125rem"},1:{value:"0.25rem"},1.5:{value:"0.375rem"},2:{value:"0.5rem"},2.5:{value:"0.625rem"},3:{value:"0.75rem"},3.5:{value:"0.875rem"},4:{value:"1rem"},4.5:{value:"1.125rem"},5:{value:"1.25rem"},6:{value:"1.5rem"},7:{value:"1.75rem"},8:{value:"2rem"},9:{value:"2.25rem"},10:{value:"2.5rem"},11:{value:"2.75rem"},12:{value:"3rem"},14:{value:"3.5rem"},16:{value:"4rem"},20:{value:"5rem"},24:{value:"6rem"},28:{value:"7rem"},32:{value:"8rem"},36:{value:"9rem"},40:{value:"10rem"},44:{value:"11rem"},48:{value:"12rem"},52:{value:"13rem"},56:{value:"14rem"},60:{value:"15rem"},64:{value:"16rem"},72:{value:"18rem"},80:{value:"20rem"},96:{value:"24rem"}}),tG=B.defineTokens.sizes({"3xs":{value:"14rem"},"2xs":{value:"16rem"},xs:{value:"20rem"},sm:{value:"24rem"},md:{value:"28rem"},lg:{value:"32rem"},xl:{value:"36rem"},"2xl":{value:"42rem"},"3xl":{value:"48rem"},"4xl":{value:"56rem"},"5xl":{value:"64rem"},"6xl":{value:"72rem"},"7xl":{value:"80rem"},"8xl":{value:"90rem"}}),tK=B.defineTokens.sizes({max:{value:"max-content"},min:{value:"min-content"},fit:{value:"fit-content"},prose:{value:"60ch"},full:{value:"100%"},dvh:{value:"100dvh"},svh:{value:"100svh"},lvh:{value:"100lvh"},dvw:{value:"100dvw"},svw:{value:"100svw"},lvw:{value:"100lvw"},vw:{value:"100vw"},vh:{value:"100vh"}}),tY=B.defineTokens.sizes({"1/2":{value:"50%"},"1/3":{value:"33.333333%"},"2/3":{value:"66.666667%"},"1/4":{value:"25%"},"3/4":{value:"75%"},"1/5":{value:"20%"},"2/5":{value:"40%"},"3/5":{value:"60%"},"4/5":{value:"80%"},"1/6":{value:"16.666667%"},"2/6":{value:"33.333333%"},"3/6":{value:"50%"},"4/6":{value:"66.666667%"},"5/6":{value:"83.333333%"},"1/12":{value:"8.333333%"},"2/12":{value:"16.666667%"},"3/12":{value:"25%"},"4/12":{value:"33.333333%"},"5/12":{value:"41.666667%"},"6/12":{value:"50%"},"7/12":{value:"58.333333%"},"8/12":{value:"66.666667%"},"9/12":{value:"75%"},"10/12":{value:"83.333333%"},"11/12":{value:"91.666667%"}}),tX=B.defineTokens.sizes({...tG,...tq,...tY,...tK}),tQ=B.defineTokens.zIndex({hide:{value:-1},base:{value:0},docked:{value:10},dropdown:{value:1e3},sticky:{value:1100},banner:{value:1200},overlay:{value:1300},modal:{value:1400},popover:{value:1500},skipNav:{value:1600},toast:{value:1700},tooltip:{value:1800},max:{value:0x7fffffff}}),tZ={colors:u.semanticColors,shadows:d.semanticShadows,radii:c.semanticRadii},tJ=(0,B.defineConfig)({preflight:!0,cssVarsPrefix:"chakra",cssVarsRoot:":where(html, .chakra-theme)",globalCss:o.globalCss,theme:{breakpoints:i.breakpoints,keyframes:tH,tokens:{aspectRatios:tR,animations:tT,blurs:tA,borders:tM,colors:tN,durations:tL,easings:tV,fonts:tB,fontSizes:tF,fontWeights:tj,letterSpacings:tW,lineHeights:tU,radii:t$,spacing:tq,sizes:tX,zIndex:tQ,cursor:tD},semanticTokens:tZ,recipes:l.recipes,slotRecipes:tI,textStyles:tP,layerStyles:a.layerStyles,animationStyles:s.animationStyles}}),t0=(0,e.i(99995).mergeConfigs)(n.defaultBaseConfig,tJ);(0,r.createSystem)(t0);let t1=(0,r.createSystem)(t0,{preflight:{scope:".chakra-style-reset"},theme:{tokens:{colors:{iochmara:{50:{value:"#EAF3FB"},100:{value:"#C4DDF3"},200:{value:"#9EC6EB"},300:{value:"#79B0E2"},400:{value:"#5599D8"},DEFAULT:{value:"#3182CE"},500:{value:"#3182CE"},600:{value:"#2A6CA7"},700:{value:"#225581"},800:{value:"#193E5C"},900:{value:"#102638"},950:{value:"#060E14"}},cyan:{50:{value:"#ECFEFF"},100:{value:"#CFFAFE"},200:{value:"#A5F3FC"},300:{value:"#67E8F9"},400:{value:"#22D3EE"},DEFAULT:{value:"#06B6D4"},500:{value:"#06B6D4"},600:{value:"#0891B2"},700:{value:"#0E7490"},800:{value:"#155E75"},900:{value:"#164E63"},950:{value:"#083344"}},neutral:{50:{value:"#FAFAFA"},100:{value:"#F5F5F5"},200:{value:"#E5E5E5"},300:{value:"#D4D4D4"},400:{value:"#A3A3A3"},DEFAULT:{value:"#737373"},500:{value:"#737373"},600:{value:"#525252"},700:{value:"#404040"},800:{value:"#262626"},900:{value:"#171717"},950:{value:"#0A0A0A"}},amber:{50:{value:"#FFFBEB"},100:{value:"#FEF3C7"},200:{value:"#FDE68A"},300:{value:"#FCD34D"},400:{value:"#FBBF24"},DEFAULT:{value:"#F59E0B"},500:{value:"#F59E0B"},600:{value:"#D97706"},700:{value:"#B45309"},800:{value:"#92400E"},900:{value:"#78350F"},950:{value:"#431407"}},green:{50:{value:"#F0FDF4"},100:{value:"#DCFCE7"},200:{value:"#BBF7D0"},300:{value:"#86EFAC"},400:{value:"#4ADE80"},DEFAULT:{value:"#22C55E"},500:{value:"#22C55E"},600:{value:"#16A34A"},700:{value:"#15803D"},800:{value:"#166534"},900:{value:"#14532D"},950:{value:"#052E16"}},red:{50:{value:"#FEF2F2"},100:{value:"#FEE2E2"},200:{value:"#FECACA"},300:{value:"#FCA5A5"},400:{value:"#F87171"},DEFAULT:{value:"#EF4444"},500:{value:"#EF4444"},600:{value:"#DC2626"},700:{value:"#B91C1C"},800:{value:"#991B1B"},900:{value:"#7F1D1D"},950:{value:"#450A0A"}},rose:{50:{value:"#FFF1F2"},100:{value:"#FFE4E6"},200:{value:"#FECDD3"},300:{value:"#FDA4AF"},400:{value:"#FB7185"},DEFAULT:{value:"#F43F5E"},500:{value:"#F43F5E"},600:{value:"#E11D48"},700:{value:"#BE123C"},800:{value:"#9F1239"},900:{value:"#881337"},950:{value:"#4C0519"}},brand:{50:{value:"#FFDED5"},100:{value:"#FFC1B0"},200:{value:"#FFA58C"},300:{value:"#FF8967"},400:{value:"#FF6E42"},DEFAULT:{value:"#FD541E"},500:{value:"#FD541E"},600:{value:"#F04104"},700:{value:"#C93A06"},800:{value:"#A23206"},900:{value:"#7C2906"},950:{value:"#571E05"}}}},semanticTokens:{colors:{iochmara:{solid:{value:"{colors.iochmara.500}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.iochmara.700}"},subtle:{value:"{colors.iochmara.100}"},muted:{value:"{colors.iochmara.200}"},emphasized:{value:"{colors.iochmara.300}"},focusRing:{value:"{colors.iochmara.400}"}},cyan:{solid:{value:"{colors.cyan.600}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.cyan.700}"},subtle:{value:"{colors.cyan.100}"},muted:{value:"{colors.cyan.200}"},emphasized:{value:"{colors.cyan.300}"},focusRing:{value:"{colors.cyan.500}"}},neutral:{solid:{value:"{colors.neutral.900}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.neutral.800}"},subtle:{value:"{colors.neutral.100}"},muted:{value:"{colors.neutral.200}"},emphasized:{value:"{colors.neutral.300}"},focusRing:{value:"{colors.neutral.400}"}},green:{solid:{value:"{colors.green.600}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.green.700}"},subtle:{value:"{colors.green.100}"},muted:{value:"{colors.green.200}"},emphasized:{value:"{colors.green.300}"},focusRing:{value:"{colors.green.500}"}},amber:{solid:{value:"{colors.amber.500}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.amber.700}"},subtle:{value:"{colors.amber.100}"},muted:{value:"{colors.amber.200}"},emphasized:{value:"{colors.amber.300}"},focusRing:{value:"{colors.amber.400}"}},red:{solid:{value:"{colors.red.600}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.red.700}"},subtle:{value:"{colors.red.100}"},muted:{value:"{colors.red.200}"},emphasized:{value:"{colors.red.300}"},focusRing:{value:"{colors.red.500}"}},rose:{solid:{value:"{colors.rose.500}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.rose.700}"},subtle:{value:"{colors.rose.100}"},muted:{value:"{colors.rose.200}"},emphasized:{value:"{colors.rose.300}"},focusRing:{value:"{colors.rose.400}"}},brand:{solid:{value:"{colors.brand.500}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.brand.700}"},subtle:{value:"{colors.brand.100}"},muted:{value:"{colors.brand.200}"},emphasized:{value:"{colors.brand.300}"},focusRing:{value:"{colors.brand.500}"}},blue:{solid:{value:"{colors.iochmara.500}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.iochmara.700}"},subtle:{value:"{colors.iochmara.100}"},muted:{value:"{colors.iochmara.200}"},emphasized:{value:"{colors.iochmara.300}"},focusRing:{value:"{colors.iochmara.400}"}},gray:{solid:{value:"{colors.neutral.900}"},contrast:{value:"{colors.white}"},fg:{value:"{colors.neutral.800}"},subtle:{value:"{colors.neutral.100}"},muted:{value:"{colors.neutral.200}"},emphasized:{value:"{colors.neutral.300}"},focusRing:{value:"{colors.neutral.400}"}},success:{value:"{colors.green}"},warning:{value:"{colors.amber}"},danger:{value:"{colors.red}"}}}}});e.s(["system",0,t1],99180)}]);
|