UNPKG

@nodefony/monitoring-bundle

Version:
7 lines 871 kB
(self["webpackChunk_nodefony_monitoring_bundle"]=self["webpackChunk_nodefony_monitoring_bundle"]||[]).push([[3973],{14447:function(e,t,n){"use strict"; /*! * set-value <https://github.com/jonschlinkert/set-value> * * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert). * Released under the MIT License. */const{deleteProperty:r}=Reflect,i=n(99969),o=n(87128),a=e=>"object"===typeof e&&null!==e||"function"===typeof e,s=e=>"__proto__"===e||"constructor"===e||"prototype"===e,l=e=>{if(!i(e))throw new TypeError("Object keys must be strings or symbols");if(s(e))throw new Error(`Cannot set unsafe key: "${e}"`)},u=e=>Array.isArray(e)?e.flat().map(String).join(","):e,c=(e,t)=>{if("string"!==typeof e||!t)return e;let n=e+";";return void 0!==t.arrays&&(n+=`arrays=${t.arrays};`),void 0!==t.separator&&(n+=`separator=${t.separator};`),void 0!==t.split&&(n+=`split=${t.split};`),void 0!==t.merge&&(n+=`merge=${t.merge};`),void 0!==t.preservePaths&&(n+=`preservePaths=${t.preservePaths};`),n},d=(e,t,n)=>{const r=u(t?c(e,t):e);l(r);const i=m.cache.get(r)||n();return m.cache.set(r,i),i},f=(e,t={})=>{const n=t.separator||".",r="/"!==n&&t.preservePaths;if("string"===typeof e&&!1!==r&&/\//.test(e))return[e];const i=[];let o="";const a=e=>{let t;""!==e.trim()&&Number.isInteger(t=Number(e))?i.push(t):i.push(e)};for(let s=0;s<e.length;s++){const t=e[s];"\\"!==t?t!==n?o+=t:(a(o),o=""):o+=e[++s]}return o&&a(o),i},p=(e,t)=>t&&"function"===typeof t.split?t.split(e):"symbol"===typeof e?[e]:Array.isArray(e)?e:d(e,t,(()=>f(e,t))),h=(e,t,n,i)=>{if(l(t),void 0===n)r(e,t);else if(i&&i.merge){const r="function"===i.merge?i.merge:Object.assign;r&&o(e[t])&&o(n)?e[t]=r(e[t],n):e[t]=n}else e[t]=n;return e},m=(e,t,n,r)=>{if(!t||!a(e))return e;const i=p(t,r);let o=e;for(let s=0;s<i.length;s++){const e=i[s],t=i[s+1];if(l(e),void 0===t){h(o,e,n,r);break}"number"!==typeof t||Array.isArray(o[e])?(a(o[e])||(o[e]={}),o=o[e]):o=o[e]=[]}return e};m.split=p,m.cache=new Map,m.clear=()=>{m.cache=new Map},e.exports=m},49953:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,{decode:function(){return lu},encode:function(){return fu},format:function(){return pu},parse:function(){return Du}});var i={};n.r(i),n.d(i,{Any:function(){return Ru},Cc:function(){return Fu},Cf:function(){return Lu},P:function(){return Iu},S:function(){return Ou},Z:function(){return Pu}});var o={};n.r(o),n.d(o,{arrayReplaceAt:function(){return fc},assign:function(){return dc},escapeHtml:function(){return _c},escapeRE:function(){return Nc},fromCodePoint:function(){return hc},has:function(){return cc},isMdAsciiPunct:function(){return Oc},isPunctChar:function(){return Ic},isSpace:function(){return Ac},isString:function(){return lc},isValidEntityCode:function(){return pc},isWhiteSpace:function(){return Dc},lib:function(){return Fc},normalizeReference:function(){return Rc},unescapeAll:function(){return wc},unescapeMd:function(){return Ec}});var a={};n.r(a),n.d(a,{parseLinkDestination:function(){return Pc},parseLinkLabel:function(){return Lc},parseLinkTitle:function(){return Mc}});var s=n(96540),l=n.t(s,2),u=n(40961),c=n(74848);function d(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=d(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function f(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=d(e))&&(r&&(r+=" "),r+=t);return r}var p=n(11751),h=n(33296),m=n(88746),v=n(82636),g=n(80129),y=n(46286),b=n(59321),E=n(12475),w=n(79004),x=n(7613),k=n(45449),T=n(9488),C=n(35994),_=n(70726);function S(e,t){(0,E.A)(e)&&(0,E.A)(e.__schema)||(0,y.A)(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '.concat((0,g.A)(e),"."));for(var n=e.__schema,r=(0,b.A)(n.types,(function(e){return e.name}),(function(e){return S(e)})),i=0,o=[].concat(k.YC,T.V4);i<o.length;i++){var a=o[i];r[a.name]&&(r[a.name]=a)}var s=n.queryType?p(n.queryType):null,l=n.mutationType?p(n.mutationType):null,u=n.subscriptionType?p(n.subscriptionType):null,c=n.directives?n.directives.map(V):[];return new m.V4({description:n.description,query:s,mutation:l,subscription:u,types:(0,v.A)(r),directives:c,assumeValid:null===t||void 0===t?void 0:t.assumeValid});function d(e){if(e.kind===T.fY.LIST){var t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return new C.KT(d(t))}if(e.kind===T.fY.NON_NULL){var n=e.ofType;if(!n)throw new Error("Decorated type deeper than introspection query.");var r=d(n);return new C.Gc((0,C.wG)(r))}return f(e)}function f(e){var t=e.name;if(!t)throw new Error("Unknown type reference: ".concat((0,g.A)(e),"."));var n=r[t];if(!n)throw new Error("Invalid or incomplete schema, unknown type: ".concat(t,". Ensure that a full introspection query is used in order to build a client schema."));return n}function p(e){return(0,C.qC)(f(e))}function h(e){return(0,C.qL)(f(e))}function S(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case T.fY.SCALAR:return N(e);case T.fY.OBJECT:return D(e);case T.fY.INTERFACE:return I(e);case T.fY.UNION:return O(e);case T.fY.ENUM:return R(e);case T.fY.INPUT_OBJECT:return F(e)}var t=(0,g.A)(e);throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ".concat(t,"."))}function N(e){return new C.Ag({name:e.name,description:e.description,specifiedByUrl:e.specifiedByUrl})}function A(e){if(null===e.interfaces&&e.kind===T.fY.INTERFACE)return[];if(!e.interfaces){var t=(0,g.A)(e);throw new Error("Introspection result missing interfaces: ".concat(t,"."))}return e.interfaces.map(h)}function D(e){return new C.bh({name:e.name,description:e.description,interfaces:function(){return A(e)},fields:function(){return L(e)}})}function I(e){return new C.VA({name:e.name,description:e.description,interfaces:function(){return A(e)},fields:function(){return L(e)}})}function O(e){if(!e.possibleTypes){var t=(0,g.A)(e);throw new Error("Introspection result missing possibleTypes: ".concat(t,"."))}return new C.hI({name:e.name,description:e.description,types:function(){return e.possibleTypes.map(p)}})}function R(e){if(!e.enumValues){var t=(0,g.A)(e);throw new Error("Introspection result missing enumValues: ".concat(t,"."))}return new C.Zb({name:e.name,description:e.description,values:(0,b.A)(e.enumValues,(function(e){return e.name}),(function(e){return{description:e.description,deprecationReason:e.deprecationReason}}))})}function F(e){if(!e.inputFields){var t=(0,g.A)(e);throw new Error("Introspection result missing inputFields: ".concat(t,"."))}return new C.zP({name:e.name,description:e.description,fields:function(){return M(e.inputFields)}})}function L(e){if(!e.fields)throw new Error("Introspection result missing fields: ".concat((0,g.A)(e),"."));return(0,b.A)(e.fields,(function(e){return e.name}),P)}function P(e){var t=d(e.type);if(!(0,C.oH)(t)){var n=(0,g.A)(t);throw new Error("Introspection must provide output type for fields, but received: ".concat(n,"."))}if(!e.args){var r=(0,g.A)(e);throw new Error("Introspection result missing field args: ".concat(r,"."))}return{description:e.description,deprecationReason:e.deprecationReason,type:t,args:M(e.args)}}function M(e){return(0,b.A)(e,(function(e){return e.name}),j)}function j(e){var t=d(e.type);if(!(0,C.dX)(t)){var n=(0,g.A)(t);throw new Error("Introspection must provide input type for arguments, but received: ".concat(n,"."))}var r=null!=e.defaultValue?(0,_.i)((0,w.$x)(e.defaultValue),t):void 0;return{description:e.description,type:t,defaultValue:r,deprecationReason:e.deprecationReason}}function V(e){if(!e.args){var t=(0,g.A)(e);throw new Error("Introspection result missing directive args: ".concat(t,"."))}if(!e.locations){var n=(0,g.A)(e);throw new Error("Introspection result missing directive locations: ".concat(n,"."))}return new x.RR({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:M(e.args)})}}var N=n(28055);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){var t=D({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByUrl":"",i=t.directiveIsRepeatable?"isRepeatable":"",o=t.schemaDescription?n:"";function a(e){return t.inputValueDeprecation?e:""}return"\n query IntrospectionQuery {\n __schema {\n ".concat(o,"\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ").concat(n,"\n ").concat(i,"\n locations\n args").concat(a("(includeDeprecated: true)")," {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ").concat(n,"\n ").concat(r,"\n fields(includeDeprecated: true) {\n name\n ").concat(n,"\n args").concat(a("(includeDeprecated: true)")," {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields").concat(a("(includeDeprecated: true)")," {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ").concat(n,"\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ").concat(n,"\n type { ...TypeRef }\n defaultValue\n ").concat(a("isDeprecated"),"\n ").concat(a("deprecationReason"),"\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n ")}var R=n(84705),F=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r["throw"](e))}catch(t){o(t)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function L(e){return"object"===typeof e&&null!==e&&"function"===typeof e.then}function P(e){return new Promise(((t,n)=>{const r=e.subscribe({next(e){t(e),r.unsubscribe()},error:n,complete(){n(new Error("no value resolved"))}})}))}function M(e){return"object"===typeof e&&null!==e&&"subscribe"in e&&"function"===typeof e.subscribe}function j(e){return"object"===typeof e&&null!==e&&("AsyncGenerator"===e[Symbol.toStringTag]||Symbol.asyncIterator in e)}function V(e){var t;return F(this,void 0,void 0,(function*(){const n=null===(t=("return"in e?e:e[Symbol.asyncIterator]()).return)||void 0===t?void 0:t.bind(e),r=("next"in e?e:e[Symbol.asyncIterator]()).next.bind(e),i=yield r();return null===n||void 0===n||n(),i.value}))}function U(e){return F(this,void 0,void 0,(function*(){const t=yield e;return j(t)?V(t):M(t)?P(t):t}))}function B(e){return JSON.stringify(e,null,2)}function q(e){return Object.assign(Object.assign({},e),{message:e.message,stack:e.stack})}function z(e){return e instanceof Error?q(e):e}function H(e){return Array.isArray(e)?B({errors:e.map((e=>z(e)))}):B({errors:[z(e)]})}function Y(e){return B(e)}var $=n(92327),G=n(43298);function W(e,t,n){const r=[];if(!e||!t)return{insertions:r,result:t};let i;try{i=(0,w.qg)(t)}catch(Au){return{insertions:r,result:t}}const o=n||Q,a=new $.D(e);return(0,R.YR)(i,{leave(e){a.leave(e)},enter(e){if(a.enter(e),"Field"===e.kind&&!e.selectionSet){const n=a.getType(),i=K(Z(n),o);if(i&&e.loc){const n=J(t,e.loc.start);r.push({index:e.loc.end,string:" "+(0,p.y)(i).replaceAll("\n","\n"+n)})}}}}),{insertions:r,result:X(t,r)}}function Q(e){if(!("getFields"in e))return[];const t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];const n=[];for(const r of Object.keys(t))(0,C.zf)(t[r].type)&&n.push(r);return n}function K(e,t){const n=(0,C.MR)(e);if(!e||(0,C.zf)(e))return;const r=t(n);return Array.isArray(r)&&0!==r.length&&"getFields"in n?{kind:G.b.SELECTION_SET,selections:r.map((e=>{const r=n.getFields()[e],i=r?r.type:null;return{kind:G.b.FIELD,name:{kind:G.b.NAME,value:e},selectionSet:K(i,t)}}))}:void 0}function X(e,t){if(0===t.length)return e;let n="",r=0;for(const{index:i,string:o}of t)n+=e.slice(r,i)+o,r=i;return n+=e.slice(r),n}function J(e,t){let n=t,r=t;while(n){const t=e.charCodeAt(n-1);if(10===t||13===t||8232===t||8233===t)break;n--,9!==t&&11!==t&&12!==t&&32!==t&&160!==t&&(r=n)}return e.slice(n,r)}function Z(e){if(e)return e}function ee(e,t){var n;const r=new Map,i=[];for(const o of e)if("Field"===o.kind){const e=t(o),a=r.get(e);if(null===(n=o.directives)||void 0===n?void 0:n.length){const e=Object.assign({},o);i.push(e)}else if((null===a||void 0===a?void 0:a.selectionSet)&&o.selectionSet)a.selectionSet.selections=[...a.selectionSet.selections,...o.selectionSet.selections];else if(!a){const t=Object.assign({},o);r.set(e,t),i.push(t)}}else i.push(o);return i}function te(e,t,n){var r;const i=n?(0,C.MR)(n).name:null,o=[],a=[];for(let s of t){if("FragmentSpread"===s.kind){const t=s.name.value;if(!s.directives||0===s.directives.length){if(a.includes(t))continue;a.push(t)}const n=e[s.name.value];if(n){const{typeCondition:e,directives:t,selectionSet:r}=n;s={kind:G.b.INLINE_FRAGMENT,typeCondition:e,directives:t,selectionSet:r}}}if(s.kind===G.b.INLINE_FRAGMENT&&(!s.directives||0===(null===(r=s.directives)||void 0===r?void 0:r.length))){const t=s.typeCondition?s.typeCondition.name.value:null;if(!t||t===i){o.push(...te(e,s.selectionSet.selections,n));continue}}o.push(s)}return o}function ne(e,t){const n=t?new $.D(t):null,r=Object.create(null);for(const s of e.definitions)s.kind===G.b.FRAGMENT_DEFINITION&&(r[s.name.value]=s);const i={SelectionSet(e){const t=n?n.getParentType():null;let{selections:i}=e;return i=te(r,i,t),Object.assign(Object.assign({},e),{selections:i})},FragmentDefinition(){return null}},o=(0,R.YR)(e,n?(0,$.S)(n,i):i),a={SelectionSet(e){let{selections:t}=e;return t=ee(t,(e=>e.alias?e.alias.value:e.name.value)),Object.assign(Object.assign({},e),{selections:t})},FragmentDefinition(){return null}};return(0,R.YR)(o,a)}function re(e,t,n){if(!n||n.length<1)return;const r=n.map((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.value}));if(t&&r.includes(t))return t;if(t&&e){const n=e.map((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.value})),i=n.indexOf(t);if(-1!==i&&i<r.length)return r[i]}return r[0]}function ie(e,t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==e.length}class oe{constructor(e){e?this.storage=e:null===e||"undefined"===typeof window?this.storage=null:this.storage={getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),get length(){let e=0;for(const t in localStorage)0===t.indexOf(`${ae}:`)&&(e+=1);return e},clear(){for(const e in localStorage)0===e.indexOf(`${ae}:`)&&localStorage.removeItem(e)}}}get(e){if(!this.storage)return null;const t=`${ae}:${e}`,n=this.storage.getItem(t);return"null"===n||"undefined"===n?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,r=null;if(this.storage){const o=`${ae}:${e}`;if(t)try{this.storage.setItem(o,t)}catch(i){r=i instanceof Error?i:new Error(`${i}`),n=ie(this.storage,i)}else this.storage.removeItem(o)}return{isQuotaError:n,error:r}}clear(){this.storage&&this.storage.clear()}}const ae="graphiql";class se{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName))}edit(e,t){if("number"===typeof t&&this.items[t]){const n=this.items[t];if(n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName)return this.items.splice(t,1,e),void this.save()}const n=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==n&&(this.items.splice(n,1,e),this.save())}delete(e){const t=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==t&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){const t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){const e=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(null===e||void 0===e?void 0:e.error){if(!e.isQuotaError||!this.maxSize)return;t.shift()}else this.items=t}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}const le=1e5;class ue{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:e,variables:t,headers:n,operationName:r})=>{if(!this.shouldSaveQuery(e,t,n,this.history.fetchRecent()))return;this.history.push({query:e,variables:t,headers:n,operationName:r});const i=this.history.items,o=this.favorite.items;this.queries=i.concat(o)},this.deleteHistory=({query:e,variables:t,headers:n,operationName:r,favorite:i},o=!1)=>{function a(i){const o=i.items.find((i=>i.query===e&&i.variables===t&&i.headers===n&&i.operationName===r));o&&i.delete(o)}(i||o)&&a(this.favorite),i&&!o||a(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new se("queries",this.storage,this.maxHistoryLength),this.favorite=new se("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,r){if(!e)return!1;try{(0,w.qg)(e)}catch(Au){return!1}if(e.length>le)return!1;if(!r)return!0;if(JSON.stringify(e)===JSON.stringify(r.query)){if(JSON.stringify(t)===JSON.stringify(r.variables)){if(JSON.stringify(n)===JSON.stringify(r.headers))return!1;if(n&&!r.headers)return!1}if(t&&!r.variables)return!1}return!0}toggleFavorite({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o}){const a={query:e,variables:t,headers:n,operationName:r,label:i};o?(a.favorite=!1,this.favorite.delete(a),this.history.push(a)):(a.favorite=!0,this.favorite.push(a),this.history.delete(a)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o},a){const s={query:e,variables:t,headers:n,operationName:r,label:i};o?this.favorite.edit(Object.assign(Object.assign({},s),{favorite:o}),a):this.history.edit(s,a),this.queries=[...this.history.items,...this.favorite.items]}}var ce=n(74291),de=n(14447),fe=n(17965);function pe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function he(e,t){"function"===typeof e?e(t):null!==e&&void 0!==e&&(e.current=t)}function me(...e){return t=>e.forEach((e=>he(e,t)))}function ve(...e){return s.useCallback(me(...e),e)}function ge(e,t){const n=s.createContext(t),r=e=>{const{children:t,...r}=e,i=s.useMemo((()=>r),Object.values(r));return(0,c.jsx)(n.Provider,{value:i,children:t})};function i(r){const i=s.useContext(n);if(i)return i;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,i]}function ye(e,t=[]){let n=[];function r(t,r){const i=s.createContext(r),o=n.length;n=[...n,r];const a=t=>{const{scope:n,children:r,...a}=t,l=n?.[e]?.[o]||i,u=s.useMemo((()=>a),Object.values(a));return(0,c.jsx)(l.Provider,{value:u,children:r})};function l(n,a){const l=a?.[e]?.[o]||i,u=s.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}return a.displayName=t+"Provider",[a,l]}const i=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=n?.[e]||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return i.scopeName=e,[r,be(i,...t)]}function be(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>{const i=n(e),o=i[`__scope${r}`];return{...t,...o}}),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var Ee=Boolean(globalThis?.document)?s.useLayoutEffect:()=>{},we=l["useId".toString()]||(()=>{}),xe=0;function ke(e){const[t,n]=s.useState(we());return Ee((()=>{e||n((e=>e??String(xe++)))}),[e]),e||(t?`radix-${t}`:"")}function Te(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>t.current?.(...e)),[])}function Ce({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=_e({defaultProp:t,onChange:n}),o=void 0!==e,a=o?e:r,l=Te(n),u=s.useCallback((t=>{if(o){const n=t,r="function"===typeof t?n(e):t;r!==e&&l(r)}else i(t)}),[o,e,i,l]);return[a,u]}function _e({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,i=s.useRef(r),o=Te(t);return s.useEffect((()=>{i.current!==r&&(o(r),i.current=r)}),[r,i,o]),n}var Se=s.forwardRef(((e,t)=>{const{children:n,...r}=e,i=s.Children.toArray(n),o=i.find(De);if(o){const e=o.props.children,n=i.map((t=>t===o?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t));return(0,c.jsx)(Ne,{...r,ref:t,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return(0,c.jsx)(Ne,{...r,ref:t,children:n})}));Se.displayName="Slot";var Ne=s.forwardRef(((e,t)=>{const{children:n,...r}=e;if(s.isValidElement(n)){const e=Oe(n);return s.cloneElement(n,{...Ie(r,n.props),ref:t?me(t,e):e})}return s.Children.count(n)>1?s.Children.only(null):null}));Ne.displayName="SlotClone";var Ae=({children:e})=>(0,c.jsx)(c.Fragment,{children:e});function De(e){return s.isValidElement(e)&&e.type===Ae}function Ie(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Oe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Re=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Fe=Re.reduce(((e,t)=>{const n=s.forwardRef(((e,n)=>{const{asChild:r,...i}=e,o=r?Se:t;return"undefined"!==typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,c.jsx)(o,{...i,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Le(e,t){e&&u.flushSync((()=>e.dispatchEvent(t)))}function Pe(e,t=globalThis?.document){const n=Te(e);s.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var Me,je="DismissableLayer",Ve="dismissableLayer.update",Ue="dismissableLayer.pointerDownOutside",Be="dismissableLayer.focusOutside",qe=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ze=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...u}=e,d=s.useContext(qe),[f,p]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,m]=s.useState({}),v=ve(t,(e=>p(e))),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),E=f?g.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,x=E>=b,k=$e((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));x&&!n&&(i?.(e),a?.(e),e.defaultPrevented||l?.())}),h),T=Ge((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));n||(o?.(e),a?.(e),e.defaultPrevented||l?.())}),h);return Pe((e=>{const t=E===d.layers.size-1;t&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),h),s.useEffect((()=>{if(f)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Me=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),We(),()=>{n&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Me)}}),[f,h,n,d]),s.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),We())}),[f,d]),s.useEffect((()=>{const e=()=>m({});return document.addEventListener(Ve,e),()=>document.removeEventListener(Ve,e)}),[]),(0,c.jsx)(Fe.div,{...u,ref:v,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,k.onPointerDownCapture)})}));ze.displayName=je;var He="DismissableLayerBranch",Ye=s.forwardRef(((e,t)=>{const n=s.useContext(qe),r=s.useRef(null),i=ve(t,r);return s.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),(0,c.jsx)(Fe.div,{...e,ref:i})}));function $e(e,t=globalThis?.document){const n=Te(e),r=s.useRef(!1),i=s.useRef((()=>{}));return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Qe(Ue,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ge(e,t=globalThis?.document){const n=Te(e),r=s.useRef(!1);return s.useEffect((()=>{const e=e=>{if(e.target&&!r.current){const t={originalEvent:e};Qe(Be,n,t,{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function We(){const e=new CustomEvent(Ve);document.dispatchEvent(e)}function Qe(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Le(i,o):i.dispatchEvent(o)}Ye.displayName=He;var Ke="focusScope.autoFocusOnMount",Xe="focusScope.autoFocusOnUnmount",Je={bubbles:!1,cancelable:!0},Ze="FocusScope",et=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[l,u]=s.useState(null),d=Te(i),f=Te(o),p=s.useRef(null),h=ve(t,(e=>u(e))),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:st(p.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||st(p.current,{select:!0}))},n=function(e){const t=document.activeElement;if(t===document.body)for(const n of e)n.removedNodes.length>0&&st(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,m.paused]),s.useEffect((()=>{if(l){lt.add(m);const e=document.activeElement,t=l.contains(e);if(!t){const t=new CustomEvent(Ke,Je);l.addEventListener(Ke,d),l.dispatchEvent(t),t.defaultPrevented||(tt(dt(rt(l)),{select:!0}),document.activeElement===e&&st(l))}return()=>{l.removeEventListener(Ke,d),setTimeout((()=>{const t=new CustomEvent(Xe,Je);l.addEventListener(Xe,f),l.dispatchEvent(t),t.defaultPrevented||st(e??document.body,{select:!0}),l.removeEventListener(Xe,f),lt.remove(m)}),0)}}}),[l,d,f,m]);const v=s.useCallback((e=>{if(!n&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){const t=e.currentTarget,[r,o]=nt(t),a=r&&o;a?e.shiftKey||i!==o?e.shiftKey&&i===r&&(e.preventDefault(),n&&st(o,{select:!0})):(e.preventDefault(),n&&st(r,{select:!0})):i===t&&e.preventDefault()}}),[n,r,m.paused]);return(0,c.jsx)(Fe.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})}));function tt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(st(r,{select:t}),document.activeElement!==n)return}function nt(e){const t=rt(e),n=it(t,e),r=it(t.reverse(),e);return[n,r]}function rt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});while(n.nextNode())t.push(n.currentNode);return t}function it(e,t){for(const n of e)if(!ot(n,{upTo:t}))return n}function ot(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;while(e){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function at(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&at(e)&&t&&e.select()}}et.displayName=Ze;var lt=ut();function ut(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ct(e,t),e.unshift(t)},remove(t){e=ct(e,t),e[0]?.resume()}}}function ct(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function dt(e){return e.filter((e=>"A"!==e.tagName))}var ft="Portal",pt=s.forwardRef(((e,t)=>{const{container:n,...r}=e,[i,o]=s.useState(!1);Ee((()=>o(!0)),[]);const a=n||i&&globalThis?.document?.body;return a?u.createPortal((0,c.jsx)(Fe.div,{...r,ref:t}),a):null}));pt.displayName=ft;function ht(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return r??e}),e)}var mt=e=>{const{present:t,children:n}=e,r=vt(t),i="function"===typeof n?n({present:r.isPresent}):s.Children.only(n),o=ve(r.ref,yt(i)),a="function"===typeof n;return a||r.isPresent?s.cloneElement(i,{ref:o}):null};function vt(e){const[t,n]=s.useState(),r=s.useRef({}),i=s.useRef(e),o=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=ht(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=gt(r.current);o.current="mounted"===l?e:"none"}),[l]),Ee((()=>{const t=r.current,n=i.current,a=n!==e;if(a){const r=o.current,a=gt(t);if(e)u("MOUNT");else if("none"===a||"none"===t?.display)u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,u]),Ee((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=o=>{const a=gt(r.current),s=a.includes(o.animationName);if(o.target===t&&s&&(u("ANIMATION_END"),!i.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=gt(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function gt(e){return e?.animationName||"none"}function yt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}mt.displayName="Presence";var bt=0;function Et(){s.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wt()),document.body.insertAdjacentElement("beforeend",e[1]??wt()),bt++,()=>{1===bt&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),bt--}}),[])}function wt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var xt=function(e,t){return xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xt(e,t)};function kt(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}xt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Tt=function(){return Tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tt.apply(this,arguments)};function Ct(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;function _t(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)a.push(r.value)}catch(Tp){i={error:Tp}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return a}function St(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var Nt="right-scroll-bar-position",At="width-before-scroll-bar",Dt="with-scroll-bars-hidden",It="--removed-body-scroll-bar-size";function Ot(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}function Rt(e,t){var n=(0,s.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}var Ft="undefined"!==typeof window?s.useLayoutEffect:s.useEffect,Lt=new WeakMap;function Pt(e,t){var n=Rt(t||null,(function(t){return e.forEach((function(e){return Ot(e,t)}))}));return Ft((function(){var t=Lt.get(n);if(t){var r=new Set(t),i=new Set(e),o=n.current;r.forEach((function(e){i.has(e)||Ot(e,null)})),i.forEach((function(e){r.has(e)||Ot(e,o)}))}Lt.set(n,e)}),[e]),n}function Mt(e){return e}function jt(e,t){void 0===t&&(t=Mt);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){r=!0;while(n.length){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return i}function Vt(e){void 0===e&&(e={});var t=jt(null);return t.options=Tt({async:!0,ssr:!1},e),t}var Ut=Vt(),Bt=function(){},qt=s.forwardRef((function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:Bt,onWheelCapture:Bt,onTouchMoveCapture:Bt}),i=r[0],o=r[1],a=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,E=Ct(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,x=Pt([n,t]),k=Tt(Tt({},E),i);return s.createElement(s.Fragment,null,d&&s.createElement(w,{sideCar:Ut,removeScrollBar:c,shards:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:b}),a?s.cloneElement(s.Children.only(l),Tt(Tt({},k),{ref:x})):s.createElement(y,Tt({},k,{className:u,ref:x}),l))}));qt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},qt.classNames={fullWidth:At,zeroRight:Nt};var zt,Ht=function(e){var t=e.sideCar,n=Ct(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,Tt({},n))};function Yt(e,t){return e.useMedium(t),Ht}Ht.isSideCarExport=!0;var $t=function(){return zt||n.nc};function Gt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$t();return t&&e.setAttribute("nonce",t),e}function Wt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Kt=function(){var e=0,t=null;return{add:function(n){0==e&&(t=Gt())&&(Wt(t,n),Qt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xt=function(){var e=Kt();return function(t,n){s.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])}},Jt=function(){var e=Xt(),t=function(t){var n=t.styles,r=t.dynamic;return e(n,r),null};return t},Zt={left:0,top:0,right:0,gap:0},en=function(e){return parseInt(e||"",10)||0},tn=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[en(n),en(r),en(i)]},nn=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return Zt;var t=tn(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},rn=Jt(),on="data-scroll-locked",an=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat(Dt," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(on,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Nt," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(At," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Nt," .").concat(Nt," {\n right: 0 ").concat(r,";\n }\n \n .").concat(At," .").concat(At," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(on,"] {\n ").concat(It,": ").concat(s,"px;\n }\n")},sn=function(){var e=parseInt(document.body.getAttribute(on)||"0",10);return isFinite(e)?e:0},ln=function(){s.useEffect((function(){return document.body.setAttribute(on,(sn()+1).toString()),function(){var e=sn()-1;e<=0?document.body.removeAttribute(on):document.body.setAttribute(on,e.toString())}}),[])},un=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;ln();var o=s.useMemo((function(){return nn(i)}),[i]);return s.createElement(rn,{styles:an(o,!t,i,n?"":"!important")})},cn=!1;if("undefined"!==typeof window)try{var dn=Object.defineProperty({},"passive",{get:function(){return cn=!0,!0}});window.addEventListener("test",dn,dn),window.removeEventListener("test",dn,dn)}catch(cI){cn=!1}var fn=!!cn&&{passive:!1},pn=function(e){return"TEXTAREA"===e.tagName},hn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!pn(e)&&"visible"===n[t])},mn=function(e){return hn(e,"overflowY")},vn=function(e){return hn(e,"overflowX")},gn=function(e,t){var n=t.ownerDocument,r=t;do{"undefined"!==typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host);var i=En(e,r);if(i){var o=wn(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yn=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},bn=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},En=function(e,t){return"v"===e?mn(t):vn(t)},wn=function(e,t){return"v"===e?yn(t):bn(t)},xn=function(e,t){return"h"===e&&"rtl"===t?-1:1},kn=function(e,t,n,r,i){var o=xn(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var p=wn(e,s),h=p[0],m=p[1],v=p[2],g=m-v-o*h;(h||g)&&En(e,s)&&(d+=g,f+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(i&&Math.abs(d)<1||!i&&a>d)||!c&&(i&&Math.abs(f)<1||!i&&-a>f))&&(u=!0),u},Tn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cn=function(e){return[e.deltaX,e.deltaY]},_n=function(e){return e&&"current"in e?e.current:e},Sn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nn=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},An=0,Dn=[];function In(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),i=s.useState(An++)[0],o=s.useState(Jt)[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=St([e.lockRef.current],(e.shards||[]).map(_n),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var i,o=Tn(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],u="deltaY"in e?e.deltaY:s[1]-o[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=gn(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=gn(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=i),!i)return!0;var p=r.current||i;return kn(p,t,e,"h"===p?l:u,!0)}),[]),u=s.useCallback((function(e){var n=e;if(Dn.length&&Dn[Dn.length-1]===o){var r="deltaY"in n?Cn(n):Tn(n),i=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Sn(e.delta,r)}))[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var s=(a.current.shards||[]).map(_n).filter(Boolean).filter((function(e){return e.contains(n.target)})),u=s.length>0?l(n,s[0]):!a.current.noIsolation;u&&n.cancelable&&n.preventDefault()}}}),[]),c=s.useCallback((function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:On(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),d=s.useCallback((function(e){n.current=Tn(e),r.current=void 0}),[]),f=s.useCallback((function(t){c(t.type,Cn(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){c(t.type,Tn(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return Dn.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,fn),document.addEventListener("touchmove",u,fn),document.addEventListener("touchstart",d,fn),function(){Dn=Dn.filter((function(e){return e!==o})),document.removeEventListener("wheel",u,fn),document.removeEventListener("touchmove",u,fn),document.removeEventListener("touchstart",d,fn)}}),[]);var h=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(o,{styles:Nn(i)}):null,h?s.createElement(un,{gapMode:e.gapMode}):null)}function On(e){var t=null;while(null!==e)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Rn=Yt(Ut,In),Fn=s.forwardRef((function(e,t){return s.createElement(qt,Tt({},e,{ref:t,sideCar:Rn}))}));Fn.classNames=qt.classNames;var Ln=Fn,Pn=function(e){if("undefined"===typeof document)return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mn=new WeakMap,jn=new WeakMap,Vn={},Un=0,Bn=function(e){return e&&(e.host||Bn(e.parentNode))},qn=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Bn(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))},zn=function(e,t,n,r){var i=qn(t,Array.isArray(e)?e:[e]);Vn[n]||(Vn[n]=new WeakMap);var o=Vn[n],a=[],s=new Set,l=new Set(i),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};i.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(r),i=null!==t&&"false"!==t,l=(Mn.get(e)||0)+1,u=(o.get(e)||0)+1;Mn.set(e,l),o.set(e,u),a.push(e),1===l&&i&&jn.set(e,!0),1===u&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}catch(d){console.error("aria-hidden: cannot operate on ",e,d)}}))};return c(t),s.clear(),Un++,function(){a.forEach((function(e){var t=Mn.get(e)-1,i=o.get(e)-1;Mn.set(e,t),o.set(e,i),t||(jn.has(e)||e.removeAttribute(r),jn.delete(e)),i||e.removeAttribute(n)})),Un--,Un||(Mn=new WeakMap,Mn=new WeakMap,jn=new WeakMap,Vn={})}},Hn=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Pn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),zn(r,i,n,"aria-hidden")):function(){return null}},Yn="Dialog",[$n,Gn]=ye(Yn),[Wn,Qn]=$n(Yn),Kn=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=s.useRef(null),u=s.useRef(null),[d=!1,f]=Ce({prop:r,defaultProp:i,onChange:o});return(0,c.jsx)(Wn,{scope:t,triggerRef:l,contentRef:u,contentId:ke(),titleId:ke(),descriptionId:ke(),open:d,onOpenChange:f,onOpenToggle:s.useCallback((()=>f((e=>!e))),[f]),modal:a,children:n})};Kn.displayName=Yn;var Xn="DialogTrigger",Jn=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qn(Xn,n),o=ve(t,i.triggerRef);return(0,c.jsx)(Fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":gr(i.open),...r,ref:o,onClick:pe(e.onClick,i.onOpenToggle)})}));Jn.displayName=Xn;var Zn="DialogPortal",[er,tr]=$n(Zn,{forceMount:void 0}),nr=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Qn(Zn,t);return(0,c.jsx)(er,{scope:t,forceMount:n,children:s.Children.map(r,(e=>(0,c.jsx)(mt,{present:n||o.open,children:(0,c.jsx)(pt,{asChild:!0,container:i,children:e})})))})};nr.displayName=Zn;var rr="DialogOverlay",ir=s.forwardRef(((e,t)=>{const n=tr(rr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Qn(rr,e.__scopeDialog);return o.modal?(0,c.jsx)(mt,{present:r||o.open,children:(0,c.jsx)(or,{...i,ref:t})}):null}));ir.displayName=rr;var or=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qn(rr,n);return(0,c.jsx)(Ln,{as:Se,allowPinchZoom:!0,shards:[i.contentRef],children:(0,c.jsx)(Fe.div,{"data-state":gr(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),ar="DialogContent",sr=s.forwardRef(((e,t)=>{const n=tr(ar,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Qn(ar,e.__scopeDialog);return(0,c.jsx)(mt,{present:r||o.open,children:o.modal?(0,c.jsx)(lr,{...i,ref:t}):(0,c.jsx)(ur,{...i,ref:t})})}));sr.displayName=ar;var lr=s.forwardRef(((e,t)=>{const n=Qn(ar,e.__scopeDialog),r=s.useRef(null),i=ve(t,n.contentRef,r);return s.useEffect((()=>{const e=r.current;if(e)return Hn(e)}),[]),(0,c.jsx)(cr,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,(e=>{e.preventDefault(),n.triggerRef.current?.focus()})),onPointerDownOutside:pe(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;r&&e.preventDefault()})),onFocusOutside:pe(e.onFocusOutside,(e=>e.preventDefault()))})})),ur=s.forwardRef(((e,t)=>{const n=Qn(ar,e.__scopeDialog),r=s.useRef(!1),i=s.useRef(!1);return(0,c.jsx)(cr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),