@skybridge/devtools 0.0.0-dev.8f7fa8a → 0.0.0-dev.90051cf
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.
|
@@ -59,7 +59,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
59
59
|
`)?c.slice(0,-1):c}),s=void 0,c=``,l=``}function m(e={}){a&&e.consume&&d(a),o=!0,s=void 0,c=``,l=``,a=``}return{feed:u,reset:m}}function Kw(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
|
|
60
60
|
`,r),o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i===-1?a!==-1&&(o=a):o=i===e.length-1?-1:i,o===-1){n=e.slice(r);break}else{let n=e.slice(r,o);t.push(n),r=o+1,e[r-1]===`\r`&&e[r]===`
|
|
61
61
|
`&&r++}}return[t,n]}var qw=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=Gw({onEvent:e=>{i.enqueue(e)},onError(t){e===`terminate`?i.error(t):typeof e==`function`&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}},Jw={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},Yw=class extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}},Xw=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=Hw(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??Jw}async _authThenStart(){if(!this._authProvider)throw new Gm(`No auth provider`);let e;try{e=await th(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(e){throw this.onerror?.(e),e}if(e!==`AUTHORIZED`)throw new Gm;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let e={};if(this._authProvider){let t=await this._authProvider.tokens();t&&(e.Authorization=`Bearer ${t.access_token}`)}this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let t=Vw(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){let{resumptionToken:t}=e;try{let n=await this._commonHeaders();n.set(`Accept`,`text/event-stream`),t&&n.set(`last-event-id`,t);let r=await(this._fetch??fetch)(this._url,{method:`GET`,headers:n,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new Yw(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(e){throw this.onerror?.(e),e}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*n**+e,r)}_scheduleReconnection(e,t=0){let n=this._reconnectionOptions.maxRetries;if(t>=n){this.onerror?.(Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(n=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,n){if(!e)return;let{onresumptiontoken:r,replayMessageId:i}=t,a,o=!1,s=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new qw({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(a=e.id,o=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=rf.parse(JSON.parse(e.data));$d(t)&&(s=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`))}}})()}async start(){if(this._abortController)throw Error(`StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.`);this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new Gm(`No auth provider`);if(await th(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Gm(`Failed to authorize`)}async close(){this._reconnectionTimeout&&=(clearTimeout(this._reconnectionTimeout),void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{let{resumptionToken:n,onresumptiontoken:r}=t||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:Yd(e)?e.id:void 0}).catch(e=>this.onerror?.(e));return}let i=await this._commonHeaders();i.set(`content-type`,`application/json`),i.set(`accept`,`application/json, text/event-stream`);let a={...this._requestInit,method:`POST`,headers:i,body:JSON.stringify(e),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._url,a),s=o.headers.get(`mcp-session-id`);if(s&&(this._sessionId=s),!o.ok){let t=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Yw(401,`Server returned 401 after successful authentication`);let{resourceMetadataUrl:t,scope:n}=ah(o);if(this._resourceMetadataUrl=t,this._scope=n,await th(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Gm;return this._hasCompletedAuthFlow=!0,this.send(e)}if(o.status===403&&this._authProvider){let{resourceMetadataUrl:t,scope:n,error:r}=ah(o);if(r===`insufficient_scope`){let r=o.headers.get(`WWW-Authenticate`);if(this._lastUpscopingHeader===r)throw new Yw(403,`Server returned 403 after trying upscoping`);if(n&&(this._scope=n),t&&(this._resourceMetadataUrl=t),this._lastUpscopingHeader=r??void 0,await th(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!==`AUTHORIZED`)throw new Gm;return this.send(e)}}throw new Yw(o.status,`Error POSTing to endpoint: ${t}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,o.status===202){await o.body?.cancel(),bf(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let c=(Array.isArray(e)?e:[e]).filter(e=>`method`in e&&`id`in e&&e.id!==void 0).length>0,l=o.headers.get(`content-type`);if(c)if(l?.includes(`text/event-stream`))this._handleSseStream(o.body,{onresumptiontoken:r},!1);else if(l?.includes(`application/json`)){let e=await o.json(),t=Array.isArray(e)?e.map(e=>rf.parse(e)):[rf.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await o.body?.cancel(),new Yw(-1,`Unexpected content type: ${l}`);else await o.body?.cancel()}catch(e){throw this.onerror?.(e),e}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),t={...this._requestInit,method:`DELETE`,headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,t);if(await n.body?.cancel(),!n.ok&&n.status!==405)throw new Yw(n.status,`Failed to terminate session: ${n.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}},Zw=new class{client=null;transport=null;async connect(e,t){this.transport=new Xw(typeof e==`string`?new URL(e):e,{authProvider:t}),this.client=new Bw({name:`mcp-client`,version:`1.0.0`},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);try{return(await this.client.listTools()).tools}catch(e){if(e instanceof Error&&e.message.includes(`MCP error -32601: Method not found`))return[];throw e}}async callTool(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);let{_meta:n,...r}=await this.client.callTool({name:e,arguments:t??{}});return{...r,meta:n}}async listResources(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listResources()).resources}async readResource(e){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.readResource({uri:e})}async listPrompts(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listPrompts()).prompts}async getPrompt(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.getPrompt({name:e,...t&&{arguments:t}})}getServerInfo(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return this.client._serverVersion}async finishAuth(e){if(!this.transport)throw Error(`Transport not available. Call connect() first.`);await this.transport.finishAuth(e)}async close(){this.client&&=(await this.client.close(),null),this.transport&&=null}},Qw=null,$w=()=>`${window.location.origin}/mcp`;async function eT(){let e=$w(),{setStatus:t,setRequiresAuth:n,setError:r}=bi.getState();t(`connecting`),r(null),await Zw.close();let i=!1;try{(await sh(e))?.authorization_servers?.length&&(i=!0)}catch{}n(i);try{i?(Qw=new cC,await Zw.connect(e,Qw)):(Qw=null,await Zw.connect(e)),t(`authenticated`),aC.invalidateQueries({queryKey:[`list-tools`]})}catch(e){if(e instanceof Gm){t(`unauthenticated`);return}t(`error`),r(e instanceof Error?e.message:`Connection failed`)}}async function tT(e){let t=$w();await th(new cC,{serverUrl:t,authorizationCode:e}),await eT()}async function nT(){Qw?.invalidateCredentials(`all`),Qw=null,await Zw.close(),bi.getState().reset(),aC.invalidateQueries({queryKey:[`list-tools`]})}var rT={theme:`light`,userAgent:{device:{type:`desktop`},capabilities:{hover:!0,touch:!1}},locale:`en-US`,maxHeight:void 0,displayMode:`inline`,safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:`inline`},widgetState:null},iT=()=>{let{data:e}=it({queryKey:[`list-tools`],queryFn:()=>Zw.listTools()});return e},aT=()=>{if(bi(e=>e.status)===`authenticated`)return Zw.getServerInfo()},oT=()=>{let{setToolData:e}=GS();return at({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});let r=await Zw.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...rT,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null},openInAppUrl:null}),r}})},sT=()=>{let[e]=iC();return iT().find(t=>t.name===e)??null},cT=()=>{let e=sT();if(!e)throw Error(`No tool is currently selected`);return e},lT=e=>it({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await Zw.readResource(e)}});function uT(){return typeof window<`u`}function dT(e){return mT(e)?(e.nodeName||``).toLowerCase():`#document`}function fT(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pT(e){return((mT(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function mT(e){return uT()?e instanceof Node||e instanceof fT(e).Node:!1}function hT(e){return uT()?e instanceof Element||e instanceof fT(e).Element:!1}function gT(e){return uT()?e instanceof HTMLElement||e instanceof fT(e).HTMLElement:!1}function _T(e){return!uT()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof fT(e).ShadowRoot}function vT(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kT(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function yT(e){return/^(table|td|th)$/.test(dT(e))}function bT(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xT=/transform|translate|scale|rotate|perspective|filter/,ST=/paint|layout|strict|content/,CT=e=>!!e&&e!==`none`,wT;function TT(e){let t=hT(e)?kT(e):e;return CT(t.transform)||CT(t.translate)||CT(t.scale)||CT(t.rotate)||CT(t.perspective)||!DT()&&(CT(t.backdropFilter)||CT(t.filter))||xT.test(t.willChange||``)||ST.test(t.contain||``)}function ET(e){let t=jT(e);for(;gT(t)&&!OT(t);){if(TT(t))return t;if(bT(t))return null;t=jT(t)}return null}function DT(){return wT??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),wT}function OT(e){return/^(html|body|#document)$/.test(dT(e))}function kT(e){return fT(e).getComputedStyle(e)}function AT(e){return hT(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jT(e){if(dT(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_T(e)&&e.host||pT(e);return _T(t)?t.host:t}function MT(e){let t=jT(e);return OT(t)?e.ownerDocument?e.ownerDocument.body:e.body:gT(t)&&vT(t)?t:MT(t)}function NT(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=MT(e),i=r===e.ownerDocument?.body,a=fT(r);if(i){let e=PT(a);return t.concat(a,a.visualViewport||[],vT(r)?r:[],e&&n?NT(e):[])}else return t.concat(r,NT(r,[],n))}function PT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var FT={};function IT(e,t){let n=b.useRef(FT);return n.current===FT&&(n.current=e(t)),n}var LT=b[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],RT=LT&<!==b.useLayoutEffect?LT:e=>e();function zT(e){let t=IT(BT).current;return t.next=e,RT(t.effect),t.trampoline}function BT(){let e={next:void 0,callback:VT,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function VT(){}var HT={...b},$=typeof document<`u`?b.useLayoutEffect:()=>{};function UT(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var WT={};function GT(e,t,n,r,i){let a={...ZT(e,WT)};return t&&(a=qT(a,t)),n&&(a=qT(a,n)),r&&(a=qT(a,r)),i&&(a=qT(a,i)),a}function KT(e){if(e.length===0)return WT;if(e.length===1)return ZT(e[0],WT);let t={...ZT(e[0],WT)};for(let n=1;n<e.length;n+=1)t=qT(t,e[n]);return t}function qT(e,t){return XT(t)?t(e):JT(e,t)}function JT(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=UT(e.style,r);break;case`className`:e[n]=eE(e.className,r);break;default:YT(n,r)?e[n]=QT(e[n],r):e[n]=r}}return e}function YT(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function XT(e){return typeof e==`function`}function ZT(e,t){return XT(e)?e(t):e??WT}function QT(e,t){return t?e?n=>{if(tE(n)){let r=n;$T(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function $T(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function eE(e,t){return t?e?t+` `+e:t:e}function tE(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function nE(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var rE=nE(`https://base-ui.com/production-error`,`Base UI`),iE=b.createContext(void 0);function aE(e=!1){let t=b.useContext(iE);if(t===void 0&&!e)throw Error(rE(16));return t}function oE(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function sE(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=aE(!0),c=a??s!==void 0,{props:l}=oE({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;cE(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return $(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return GT({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||($T(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=cE(a),l=!i&&lE(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if($T(e),a?.(e),e.target===e.currentTarget&&i&&c&&cE(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:zT(e=>{o.current=e,u()})}}function cE(e){return gT(e)&&e.tagName===`BUTTON`}function lE(e){return!!(e?.tagName===`A`&&e?.href)}function uE(e,t,n,r){let i=IT(fE).current;return pE(i,e,t,n,r)&&hE(i,[e,t,n,r]),i.callback}function dE(e){let t=IT(fE).current;return mE(t,e)&&hE(t,e),t.callback}function fE(){return{callback:null,cleanup:null,refs:[]}}function pE(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function mE(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function hE(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var gE=19;function _E(e){return gE>=e}function vE(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(_E(19)?n?.ref:t.ref)??null}function yE(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function bE(e,t){return typeof e==`function`?e(t):e}function xE(e,t){return typeof e==`function`?e(t):e}function SE(){}var CE=Object.freeze([]),wE=Object.freeze({}),TE={style:{transition:`none`}},EE=`data-base-ui-click-trigger`,DE={fallbackAxisSide:`none`},OE={fallbackAxisSide:`end`},kE={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function AE(e,t,n={}){let r=t.render,i=jE(t,n);return n.enabled===!1?null:NE(e,r,i,n.state??wE)}function jE(e,t={}){let{className:n,style:r,render:i}=e,{state:a=wE,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?bE(n,a):void 0,d=l?xE(r,a):void 0,f=l?yE(a,c):wE,p=l?UT(f,Array.isArray(s)?KT(s):s)??wE:wE;return typeof document<`u`&&(l?Array.isArray(o)?p.ref=dE([p.ref,vE(i),...o]):p.ref=uE(p.ref,vE(i),o):uE(null,null)),l?(u!==void 0&&(p.className=eE(p.className,u)),d!==void 0&&(p.style=UT(p.style,d)),p):wE}var ME=Symbol.for(`react.lazy`);function NE(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=GT(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===ME&&(i=b.Children.toArray(t)[0]),b.cloneElement(i,e)}if(e&&typeof e==`string`)return PE(e,n);throw Error(rE(8))}function PE(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var FE=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,...s}=e,{getButtonProps:c,buttonRef:l}=sE({disabled:i,focusableWhenDisabled:a,native:o});return AE(`button`,e,{state:{disabled:i},ref:[t,l],props:[s,c]})});function IE(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=IE(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function LE(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=IE(e))&&(r&&(r+=` `),r+=t);return r}var RE=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,zE=LE,BE=(e,t)=>n=>{if(t?.variants==null)return zE(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=RE(t)||RE(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return zE(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},VE=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},HE=(e,t)=>({classGroupId:e,validator:t}),UE=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),WE=`-`,GE=[],KE=`arbitrary..`,qE=e=>{let t=XE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return YE(e);let n=e.split(WE);return JE(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?VE(i,t):t:i||GE}return n[e]||GE}}},JE=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=JE(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(WE):e.slice(t).join(WE),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},YE=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?KE+r:void 0})(),XE=e=>{let{theme:t,classGroups:n}=e;return ZE(n,t)},ZE=(e,t)=>{let n=UE();for(let r in e){let i=e[r];QE(i,n,r,t)}return n},QE=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Dte(i,t,n,r)}},Dte=(e,t,n,r)=>{if(typeof e==`string`){$E(e,t,n);return}if(typeof e==`function`){eD(e,t,n,r);return}tD(e,t,n,r)},$E=(e,t,n)=>{let r=e===``?t:nD(t,e);r.classGroupId=n},eD=(e,t,n,r)=>{if(rD(e)){QE(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(HE(n,e))},tD=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];QE(o,nD(t,a),n,r)}},nD=(e,t)=>{let n=e,r=t.split(WE),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=UE(),n.nextPart.set(t,i)),n=i}return n},rD=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,iD=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},aD=`!`,oD=`:`,sD=[],cD=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),lD=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===oD){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(aD)?(c=s.slice(0,-1),l=!0):s.startsWith(aD)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return cD(t,l,c,u)};if(t){let e=t+oD,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):cD(sD,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},uD=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},dD=e=>({cache:iD(e.cacheSize),parseClassName:lD(e),sortModifiers:uD(e),...qE(e)}),fD=/\s+/,pD=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(fD),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+aD:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},mD=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=hD(n))&&(i&&(i+=` `),i+=r);return i},hD=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=hD(e[r]))&&(n&&(n+=` `),n+=t);return n},gD=(e,...t)=>{let n,r,i,a,o=o=>(n=dD(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=pD(e,n);return i(e,a),a};return a=o,(...e)=>a(mD(...e))},_D=[],vD=e=>{let t=t=>t[e]||_D;return t.isThemeGetter=!0,t},yD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bD=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,SD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ED=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,DD=e=>xD.test(e),OD=e=>!!e&&!Number.isNaN(Number(e)),kD=e=>!!e&&Number.isInteger(Number(e)),AD=e=>e.endsWith(`%`)&&OD(e.slice(0,-1)),jD=e=>SD.test(e),MD=()=>!0,ND=e=>CD.test(e)&&!wD.test(e),PD=()=>!1,FD=e=>TD.test(e),ID=e=>ED.test(e),LD=e=>!zD(e)&&!qD(e),RD=e=>QD(e,nO,PD),zD=e=>yD.test(e),BD=e=>QD(e,rO,ND),VD=e=>QD(e,jte,OD),HD=e=>QD(e,aO,MD),UD=e=>QD(e,iO,PD),WD=e=>QD(e,eO,PD),GD=e=>QD(e,tO,ID),KD=e=>QD(e,oO,FD),qD=e=>bD.test(e),JD=e=>$D(e,rO),YD=e=>$D(e,iO),XD=e=>$D(e,eO),Ote=e=>$D(e,nO),kte=e=>$D(e,tO),ZD=e=>$D(e,oO,!0),Ate=e=>$D(e,aO,!0),QD=(e,t,n)=>{let r=yD.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$D=(e,t,n=!1)=>{let r=bD.exec(e);return r?r[1]?t(r[1]):n:!1},eO=e=>e===`position`||e===`percentage`,tO=e=>e===`image`||e===`url`,nO=e=>e===`length`||e===`size`||e===`bg-size`,rO=e=>e===`length`,jte=e=>e===`number`,iO=e=>e===`family-name`,aO=e=>e===`number`||e===`weight`,oO=e=>e===`shadow`,sO=gD(()=>{let e=vD(`color`),t=vD(`font`),n=vD(`text`),r=vD(`font-weight`),i=vD(`tracking`),a=vD(`leading`),o=vD(`breakpoint`),s=vD(`container`),c=vD(`spacing`),l=vD(`radius`),u=vD(`shadow`),d=vD(`inset-shadow`),f=vD(`text-shadow`),p=vD(`drop-shadow`),m=vD(`blur`),h=vD(`perspective`),g=vD(`aspect`),_=vD(`ease`),v=vD(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),qD,zD],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[qD,zD,c],T=()=>[DD,`full`,`auto`,...w()],E=()=>[kD,`none`,`subgrid`,qD,zD],D=()=>[`auto`,{span:[`full`,kD,qD,zD]},kD,qD,zD],O=()=>[kD,`auto`,qD,zD],k=()=>[`auto`,`min`,`max`,`fr`,qD,zD],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[DD,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[DD,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[DD,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,qD,zD],L=()=>[...b(),XD,WD,{position:[qD,zD]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,Ote,RD,{size:[qD,zD]}],B=()=>[AD,JD,BD],V=()=>[``,`none`,`full`,l,qD,zD],H=()=>[``,OD,JD,BD],U=()=>[`solid`,`dashed`,`dotted`,`double`],ee=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],W=()=>[OD,AD,XD,WD],te=()=>[``,`none`,m,qD,zD],ne=()=>[`none`,OD,qD,zD],re=()=>[`none`,OD,qD,zD],ie=()=>[OD,qD,zD],ae=()=>[DD,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[jD],breakpoint:[jD],color:[MD],container:[jD],"drop-shadow":[jD],ease:[`in`,`out`,`in-out`],font:[LD],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[jD],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[jD],shadow:[jD],spacing:[`px`,OD],text:[jD],"text-shadow":[jD],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,DD,zD,qD,g]}],container:[`container`],columns:[{columns:[OD,zD,qD,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[kD,`auto`,qD,zD]}],basis:[{basis:[DD,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[OD,DD,`auto`,`initial`,`none`,zD]}],grow:[{grow:[``,OD,qD,zD]}],shrink:[{shrink:[``,OD,qD,zD]}],order:[{order:[kD,`first`,`last`,`none`,qD,zD]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,JD,BD]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ate,HD]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,AD,zD]}],"font-family":[{font:[YD,UD,t]}],"font-features":[{"font-features":[zD]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,qD,zD]}],"line-clamp":[{"line-clamp":[OD,`none`,qD,VD]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,qD,zD]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,qD,zD]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...U(),`wavy`]}],"text-decoration-thickness":[{decoration:[OD,`from-font`,`auto`,qD,BD]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[OD,`auto`,qD,zD]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,qD,zD]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,qD,zD]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},kD,qD,zD],radial:[``,qD,zD],conic:[kD,qD,zD]},kte,GD]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":H()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...U(),`hidden`,`none`]}],"divide-style":[{divide:[...U(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...U(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[OD,qD,zD]}],"outline-w":[{outline:[``,OD,JD,BD]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,ZD,KD]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,ZD,KD]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:H()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[OD,BD]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,ZD,KD]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[OD,qD,zD]}],"mix-blend":[{"mix-blend":[...ee(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[OD]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[qD,zD]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[OD]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,qD,zD]}],filter:[{filter:[``,`none`,qD,zD]}],blur:[{blur:te()}],brightness:[{brightness:[OD,qD,zD]}],contrast:[{contrast:[OD,qD,zD]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ZD,KD]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,OD,qD,zD]}],"hue-rotate":[{"hue-rotate":[OD,qD,zD]}],invert:[{invert:[``,OD,qD,zD]}],saturate:[{saturate:[OD,qD,zD]}],sepia:[{sepia:[``,OD,qD,zD]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,qD,zD]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[OD,qD,zD]}],"backdrop-contrast":[{"backdrop-contrast":[OD,qD,zD]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,OD,qD,zD]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[OD,qD,zD]}],"backdrop-invert":[{"backdrop-invert":[``,OD,qD,zD]}],"backdrop-opacity":[{"backdrop-opacity":[OD,qD,zD]}],"backdrop-saturate":[{"backdrop-saturate":[OD,qD,zD]}],"backdrop-sepia":[{"backdrop-sepia":[``,OD,qD,zD]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,qD,zD]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[OD,`initial`,qD,zD]}],ease:[{ease:[`linear`,`initial`,_,qD,zD]}],delay:[{delay:[OD,qD,zD]}],animate:[{animate:[`none`,v,qD,zD]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,qD,zD]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":[`scale-3d`],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[qD,zD,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,qD,zD]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,qD,zD]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[OD,JD,BD,VD]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function cO(...e){return sO(LE(e))}var Mte=BE(`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8`,"icon-xs":`size-6 rounded-none [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-none`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function lO({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,G.jsx)(FE,{"data-slot":`button`,className:cO(Mte({variant:t,size:n,className:e})),...r})}var Nte={idle:{bg:`bg-gray-100`,dot:`bg-gray-400`,text:`text-gray-600`,label:`Disconnected`},connecting:{bg:`bg-yellow-100`,dot:`bg-yellow-500`,text:`text-yellow-800`,label:`Connecting...`},authenticated:{bg:`bg-green-100`,dot:`bg-green-500`,text:`text-green-800`,label:`Connected`},unauthenticated:{bg:`bg-orange-100`,dot:`bg-orange-500`,text:`text-orange-800`,label:`Login required`},error:{bg:`bg-red-100`,dot:`bg-red-500`,text:`text-red-800`,label:`Error`}};function Pte({status:e}){let t=Nte[e];return(0,G.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full ${t.bg} px-2 py-0.5 text-xs font-semibold ${t.text}`,children:[(0,G.jsx)(`span`,{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}var Fte=()=>{let e=aT(),t=e?.name,n=e?.version,[,r]=iC(),{status:i,requiresAuth:a,error:o}=bi();return(0,G.jsx)(`div`,{className:`flex flex-col border-b border-border bg-background`,children:(0,G.jsxs)(`div`,{className:`flex h-14 items-center justify-between px-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsx)(`button`,{type:`button`,className:`font-semibold cursor-pointer`,onClick:()=>{r(null)},children:`Skybridge`}),(0,G.jsx)(`span`,{className:`h-4 w-px bg-border`,"aria-hidden":`true`}),t&&(0,G.jsxs)(`div`,{className:`flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1`,children:[(0,G.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:t}),n&&(0,G.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`v`,n]})]}),o&&(0,G.jsx)(`span`,{className:`text-xs text-red-600 max-w-48 truncate`,children:o})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a&&(0,G.jsx)(Pte,{status:i}),a&&(i===`authenticated`?(0,G.jsxs)(lO,{variant:`outline`,size:`sm`,onClick:()=>{nT()},children:[(0,G.jsx)(ln,{className:`h-3.5 w-3.5`}),`Sign out`]}):(0,G.jsxs)(lO,{variant:`outline`,size:`sm`,onClick:eT,children:[(0,G.jsx)(fn,{className:`h-3.5 w-3.5`}),`Connect`]})),(0,G.jsx)(lO,{variant:`ghost`,size:`sm`,className:`h-8 gap-2`,children:(0,G.jsxs)(`a`,{href:`https://docs.skybridge.tech/`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2`,children:[`Learn more about Skybridge`,(0,G.jsx)(K,{className:`h-3.5 w-3.5`})]})})]})]})})},uO=(0,b.createContext)({});function Ite(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Lte=typeof window<`u`?b.useLayoutEffect:b.useEffect,dO=(0,b.createContext)(null);function fO(e,t){e.indexOf(t)===-1&&e.push(t)}function pO(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var mO=(e,t,n)=>n>t?t:n<e?e:n,hO={},gO=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function _O(e){return typeof e==`object`&&!!e}var vO=e=>/^0[^.\s]+$/u.test(e);function yO(e){let t;return()=>(t===void 0&&(t=e()),t)}var bO=e=>e,Rte=(e,t)=>n=>t(e(n)),xO=(...e)=>e.reduce(Rte),SO=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},CO=class{constructor(){this.subscriptions=[]}add(e){return fO(this.subscriptions,e),()=>pO(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},wO=e=>e*1e3,TO=e=>e/1e3;function EO(e,t){return t?1e3/t*e:0}var DO=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,zte=1e-7,Bte=12;function Vte(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=DO(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>zte&&++s<Bte);return o}function OO(e,t,n,r){if(e===t&&n===r)return bO;let i=t=>Vte(t,0,1,e,n);return e=>e===0||e===1?e:DO(i(e),t,r)}var kO=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,AO=e=>t=>1-e(1-t),jO=OO(.33,1.53,.69,.99),MO=AO(jO),NO=kO(MO),PO=e=>e>=1?1:(e*=2)<1?.5*MO(e):.5*(2-2**(-10*(e-1))),FO=e=>1-Math.sin(Math.acos(e)),IO=AO(FO),LO=kO(FO),RO=OO(.42,0,1,1),zO=OO(0,0,.58,1),BO=OO(.42,0,.58,1),VO=e=>Array.isArray(e)&&typeof e[0]!=`number`,HO=e=>Array.isArray(e)&&typeof e[0]==`number`,UO={linear:bO,easeIn:RO,easeInOut:BO,easeOut:zO,circIn:FO,circInOut:LO,circOut:IO,backIn:MO,backInOut:NO,backOut:jO,anticipate:PO},WO=e=>typeof e==`string`,GO=e=>{if(HO(e)){e.length;let[t,n,r,i]=e;return OO(t,n,r,i)}else if(WO(e))return UO[e],`${e}`,UO[e];return e},KO=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],qO={value:null,addProjectionMetrics:null};function JO(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&qO.value&&qO.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var YO=40;function XO(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=KO.reduce((e,n)=>(e[n]=JO(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=hO.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,YO),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:KO.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<KO.length;t++)o[KO[t]].cancel(e)},state:i,steps:o}}var{schedule:ZO,cancel:QO,state:$O,steps:ek}=XO(typeof requestAnimationFrame<`u`?requestAnimationFrame:bO,!0),tk;function nk(){tk=void 0}var rk={now:()=>(tk===void 0&&rk.set($O.isProcessing||hO.useManualTiming?$O.timestamp:performance.now()),tk),set:e=>{tk=e,queueMicrotask(nk)}},ik={layout:0,mainThread:0,waapi:0},ak=e=>t=>typeof t==`string`&&t.startsWith(e),ok=ak(`--`),sk=ak(`var(--`),ck=e=>sk(e)?lk.test(e.split(`/*`)[0].trim()):!1,lk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function uk(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var dk={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},fk={...dk,transform:e=>mO(0,1,e)},pk={...dk,default:1},mk=e=>Math.round(e*1e5)/1e5,hk=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gk(e){return e==null}var _k=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vk=(e,t)=>n=>!!(typeof n==`string`&&_k.test(n)&&n.startsWith(e)||t&&!gk(n)&&Object.prototype.hasOwnProperty.call(n,t)),yk=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(hk);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},bk=e=>mO(0,255,e),xk={...dk,transform:e=>Math.round(bk(e))},Sk={test:vk(`rgb`,`red`),parse:yk(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+xk.transform(e)+`, `+xk.transform(t)+`, `+xk.transform(n)+`, `+mk(fk.transform(r))+`)`};function Ck(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var wk={test:vk(`#`),parse:Ck,transform:Sk.transform},Tk=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ek=Tk(`deg`),Dk=Tk(`%`),Ok=Tk(`px`),kk=Tk(`vh`),Ak=Tk(`vw`),jk={...Dk,parse:e=>Dk.parse(e)/100,transform:e=>Dk.transform(e*100)},Mk={test:vk(`hsl`,`hue`),parse:yk(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Dk.transform(mk(t))+`, `+Dk.transform(mk(n))+`, `+mk(fk.transform(r))+`)`},Nk={test:e=>Sk.test(e)||wk.test(e)||Mk.test(e),parse:e=>Sk.test(e)?Sk.parse(e):Mk.test(e)?Mk.parse(e):wk.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Sk.transform(e):Mk.transform(e),getAnimatableNone:e=>{let t=Nk.parse(e);return t.alpha=0,Nk.transform(t)}},Pk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fk(e){return isNaN(e)&&typeof e==`string`&&(e.match(hk)?.length||0)+(e.match(Pk)?.length||0)>0}var Ik=`number`,Lk=`color`,Rk=`var`,zk=`var(`,Bk="${}",Vk=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Hk(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Vk,e=>(Nk.test(e)?(r.color.push(a),i.push(Lk),n.push(Nk.parse(e))):e.startsWith(zk)?(r.var.push(a),i.push(Rk),n.push(e)):(r.number.push(a),i.push(Ik),n.push(parseFloat(e))),++a,Bk)).split(Bk),indexes:r,types:i}}function Uk(e){return Hk(e).values}function Wk({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Ik?i+=mk(r[a]):e===Lk?i+=Nk.transform(r[a]):i+=r[a]}return i}}function Gk(e){return Wk(Hk(e))}var Kk=e=>typeof e==`number`?0:Nk.test(e)?Nk.getAnimatableNone(e):e,qk=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Kk(e);function Jk(e){let t=Hk(e);return Wk(t)(t.values.map((e,n)=>qk(e,t.split[n])))}var Yk={test:Fk,parse:Uk,createTransformer:Gk,getAnimatableNone:Jk};function Xk(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Zk({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Xk(s,r,e+1/3),a=Xk(s,r,e),o=Xk(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Qk(e,t){return n=>n>0?t:e}var $k=(e,t,n)=>e+(t-e)*n,eA=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},tA=[wk,Sk,Mk],nA=e=>tA.find(t=>t.test(e));function rA(e){let t=nA(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Mk&&(n=Zk(n)),n}var iA=(e,t)=>{let n=rA(e),r=rA(t);if(!n||!r)return Qk(e,t);let i={...n};return e=>(i.red=eA(n.red,r.red,e),i.green=eA(n.green,r.green,e),i.blue=eA(n.blue,r.blue,e),i.alpha=$k(n.alpha,r.alpha,e),Sk.transform(i))},aA=new Set([`none`,`hidden`]);function oA(e,t){return aA.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sA(e,t){return n=>$k(e,t,n)}function cA(e){return typeof e==`number`?sA:typeof e==`string`?ck(e)?Qk:Nk.test(e)?iA:fA:Array.isArray(e)?lA:typeof e==`object`?Nk.test(e)?iA:uA:Qk}function lA(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>cA(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function uA(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=cA(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function dA(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var fA=(e,t)=>{let n=Yk.createTransformer(t),r=Hk(e),i=Hk(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?aA.has(e)&&!i.values.length||aA.has(t)&&!r.values.length?oA(e,t):xO(lA(dA(r,i),i.values),n):(`${e}${t}`,Qk(e,t))};function pA(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?$k(e,t,n):cA(e)(e,t)}var mA=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ZO.update(t,e),stop:()=>QO(t),now:()=>$O.isProcessing?$O.timestamp:rk.now()}},hA=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},gA=2e4;function _A(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function vA(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(_A(r),gA);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:TO(i)}}var yA={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function bA(e,t){return e*Math.sqrt(1-t*t)}var xA=12;function SA(e,t,n){let r=n;for(let n=1;n<xA;n++)r-=e(r)/t(r);return r}var CA=.001;function wA({duration:e=yA.duration,bounce:t=yA.bounce,velocity:n=yA.velocity,mass:r=yA.mass}){let i,a;yA.maxDuration;let o=1-t;o=mO(yA.minDamping,yA.maxDamping,o),e=mO(yA.minDuration,yA.maxDuration,TO(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=bA(t,o),c=Math.exp(-i);return CA-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=bA(t**2,o);return(-i(t)+CA>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-CA+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=SA(i,a,s);if(e=wO(e),isNaN(c))return{stiffness:yA.stiffness,damping:yA.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var TA=[`duration`,`bounce`],EA=[`stiffness`,`damping`,`mass`];function DA(e,t){return t.some(t=>e[t]!==void 0)}function OA(e){let t={velocity:yA.velocity,stiffness:yA.stiffness,damping:yA.damping,mass:yA.mass,isResolvedFromDuration:!1,...e};if(!DA(e,EA)&&DA(e,TA))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*mO(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:yA.mass,stiffness:i,damping:a}}else{let n=wA({...e,velocity:0});t={...t,...n,mass:yA.mass},t.isResolvedFromDuration=!0}return t}function kA(e=yA.visualDuration,t=yA.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=OA({...n,velocity:-TO(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=TO(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?yA.restSpeed.granular:yA.restSpeed.default,i||=v?yA.restDelta.granular:yA.restDelta.default;let y,b,x,S,C,w;if(h<1)x=bA(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>wO(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=wO(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=wO(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(_A(T),gA),t=hA(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}kA.applyToOptions=e=>{let t=vA(e,100,kA);return e.ease=t.ease,e.duration=wO(t.duration),e.type=`keyframes`,e};var AA=5;function jA(e,t,n){let r=Math.max(t-AA,0);return EO(n-e(r),t-r)}function MA({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=kA({keyframes:[f.value,m(f.value)],velocity:jA(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function NA(e,t,n){let r=[],i=n||hO.mix||pA,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=xO(Array.isArray(t)?t[n]||bO:t,a)),r.push(a)}return r}function PA(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=NA(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=SO(e[r],e[r+1],n);return s[r](i)};return n?t=>l(mO(e[0],e[a-1],t)):l}function FA(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=SO(0,t,r);e.push($k(n,1,i))}}function IA(e){let t=[0];return FA(t,e.length-1),t}function LA(e,t){return e.map(e=>e*t)}function RA(e,t){return e.map(()=>t||BO).splice(0,e.length-1)}function zA({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=VO(r)?r.map(GO):GO(r),a={done:!1,value:t[0]},o=PA(LA(n&&n.length===t.length?n:IA(t),e),t,{ease:Array.isArray(i)?i:RA(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var BA=e=>e!==null;function VA(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(BA),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var HA={decay:MA,inertia:MA,tween:zA,keyframes:zA,spring:kA};function UA(e){typeof e.type==`string`&&(e.type=HA[e.type])}var WA=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},GA=e=>e/100,KA=class extends WA{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==rk.now()&&this.tick(rk.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},ik.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;UA(e);let{type:t=zA,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||zA;s!==zA&&typeof o[0]!=`number`&&(this.mixKeyframes=xO(GA,pA(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=_A(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=mO(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==MA&&(b.value=VA(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return TO(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+TO(e)}get time(){return TO(this.currentTime)}set time(e){e=wO(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return jA(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(rk.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=TO(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=mA,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(rk.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,ik.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function qA(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var JA=e=>e*180/Math.PI,YA=e=>ZA(JA(Math.atan2(e[1],e[0]))),XA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:YA,rotateZ:YA,skewX:e=>JA(Math.atan(e[1])),skewY:e=>JA(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ZA=e=>(e%=360,e<0&&(e+=360),e),QA=YA,$A=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ej=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),tj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$A,scaleY:ej,scale:e=>($A(e)+ej(e))/2,rotateX:e=>ZA(JA(Math.atan2(e[6],e[5]))),rotateY:e=>ZA(JA(Math.atan2(-e[2],e[0]))),rotateZ:QA,rotate:QA,skewX:e=>JA(Math.atan(e[4])),skewY:e=>JA(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function nj(e){return e.includes(`scale`)?1:0}function rj(e,t){if(!e||e===`none`)return nj(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=tj,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=XA,i=t}if(!i)return nj(t);let a=r[t],o=i[1].split(`,`).map(aj);return typeof a==`function`?a(o):o[a]}var ij=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return rj(n,t)};function aj(e){return parseFloat(e.trim())}var oj=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],sj=new Set(oj),cj=e=>e===dk||e===Ok,lj=new Set([`x`,`y`,`z`]),uj=oj.filter(e=>!lj.has(e));function dj(e){let t=[];return uj.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var fj={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>rj(t,`x`),y:(e,{transform:t})=>rj(t,`y`)};fj.translateX=fj.x,fj.translateY=fj.y;var pj=new Set,mj=!1,hj=!1,gj=!1;function _j(){if(hj){let e=Array.from(pj).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=dj(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}hj=!1,mj=!1,pj.forEach(e=>e.complete(gj)),pj.clear()}function vj(){pj.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hj=!0)})}function yj(){gj=!0,vj(),_j(),gj=!1}var bj=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(pj.add(this),mj||(mj=!0,ZO.read(vj),ZO.resolveKeyframes(_j))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}qA(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),pj.delete(this)}cancel(){this.state===`scheduled`&&(pj.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},xj=e=>e.startsWith(`--`);function Sj(e,t,n){xj(t)?e.style.setProperty(t,n):e.style[t]=n}var Cj={};function wj(e,t){let n=yO(e);return()=>Cj[t]??n()}var Tj=wj(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Ej=wj(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Dj=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Oj={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Dj([0,.65,.55,1]),circOut:Dj([.55,0,1,.45]),backIn:Dj([.31,.01,.66,-.59]),backOut:Dj([.33,1.53,.69,.99])};function kj(e,t){if(e)return typeof e==`function`?Ej()?hA(e,t):`ease-out`:HO(e)?Dj(e):Array.isArray(e)?e.map(e=>kj(e,t)||Oj.easeOut):Oj[e]}function Aj(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=kj(s,i);Array.isArray(d)&&(u.easing=d),qO.value&&ik.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return qO.value&&p.finished.finally(()=>{ik.waapi--}),p}function jj(e){return typeof e==`function`&&`applyToOptions`in e}function Mj({type:e,...t}){return jj(e)&&Ej()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Nj=class extends WA{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Mj(e);this.animation=Aj(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=VA(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Sj(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return TO(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+TO(e)}get time(){return TO(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=wO(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Tj()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),bO):r(this)}},Pj={anticipate:PO,backInOut:NO,circInOut:LO};function Fj(e){return e in Pj}function Ij(e){typeof e.ease==`string`&&Fj(e.ease)&&(e.ease=Pj[e.ease])}var Lj=10,Rj=class extends Nj{constructor(e){Ij(e),UA(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new KA({...a,autoplay:!1}),s=Math.max(Lj,rk.now()-this.startTime),c=mO(0,Lj,s-Lj),l=o.sample(s).value,{name:u}=this.options;i&&u&&Sj(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},zj=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Yk.test(e)||e===`0`)&&!e.startsWith(`url(`));function Bj(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Vj(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=zj(i,t),s=zj(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Bj(e)||(n===`spring`||jj(n))&&r}function Hj(e){e.duration=0,e.type=`keyframes`}var Uj=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Wj=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Gj(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Wj.test(e[t]))return!0;return!1}var Kj=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),qj=yO(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Jj(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return qj()&&n&&(Uj.has(n)||Kj.has(n)&&Gj(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Yj=40,Xj=class extends WA{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=rk.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||bj)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=rk.now();let u=!0;Vj(e,i,a,o)||(u=!1,(hO.instantAnimations||!s)&&l?.(VA(e,n,t)),e[0]=e[e.length-1],Hj(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Yj?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Jj(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Rj({...d,element:p})}catch{m=new KA(d)}else m=new KA(d);m.finished.then(()=>{this.notifyFinished()}).catch(bO),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),yj()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Zj(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Qj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $j(e){let t=Qj.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function eM(e,t,n=1){`${e}`;let[r,i]=$j(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return gO(e)?parseFloat(e):e}return ck(i)?eM(i,t,n+1):i}var tM={type:`spring`,stiffness:500,damping:25,restSpeed:10},nM=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),rM={type:`keyframes`,duration:.8},iM={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},aM=(e,{keyframes:t})=>t.length>2?rM:sj.has(e)?e.startsWith(`scale`)?nM(t[1]):tM:iM;function oM(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function sM(e,t){let n=e?.[t]??e?.default??e;return n===e?n:oM(n,e)}var cM=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function lM(e){for(let t in e)if(!cM.has(t))return!0;return!1}var uM=(e,t,n,r={},i,a)=>o=>{let s=sM(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=wO(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};lM(s)||Object.assign(u,aM(e,u)),u.duration&&=wO(u.duration),u.repeatDelay&&=wO(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Hj(u),u.delay===0&&(d=!0)),(hO.instantAnimations||hO.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Hj(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=VA(u.keyframes,s);if(e!==void 0){ZO.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new KA(u):new Xj(u)};function dM(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function fM(e,t,n,r){if(typeof t==`function`){let[i,a]=dM(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=dM(r);t=t(n===void 0?e.custom:n,i,a)}return t}function pM(e,t,n){let r=e.getProps();return fM(r,t,n===void 0?r.custom:n,e)}var mM=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...oj]),hM=30,gM=e=>!isNaN(parseFloat(e)),_M={current:void 0},vM=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=rk.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=rk.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gM(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new CO);let n=this.events[e].add(t);return e===`change`?()=>{n(),ZO.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return _M.current&&_M.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=rk.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>hM)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,hM);return EO(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function yM(e,t){return new vM(e,t)}var bM=e=>Array.isArray(e);function xM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yM(n))}function SM(e){return bM(e)?e[e.length-1]||0:e}function CM(e,t){let{transitionEnd:n={},transition:r={},...i}=pM(e,t)||{};i={...i,...n};for(let t in i)xM(e,t,SM(i[t]))}var wM=e=>!!(e&&e.getVelocity);function TM(e){return!!(wM(e)&&e.add)}function EM(e,t){let n=e.getValue(`willChange`);if(TM(n))return n.add(t);if(!n&&hO.WillChange){let n=new hO.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function DM(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var OM=`data-`+DM(`framerAppearId`);function kM(e){return e.props[OM]}function AM({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jM(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?oM(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&AM(d,t))continue;let o={delay:n,...sM(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ZO.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=kM(e);if(n){let e=window.MotionHandoffAnimation(n,t,ZO);e!==null&&(o.startTime=e,f=!0)}}EM(e,t);let p=l??e.shouldReduceMotion;r.start(uM(t,r,i,p&&mM.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>ZO.update(()=>{o&&CM(e,o)});u.length?Promise.all(u).then(t):t()}return u}function MM(e,t,n={}){let r=pM(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(jM(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return NM(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function NM(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(MM(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Zj(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function PM(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>MM(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=MM(e,t,n);else{let i=typeof t==`function`?pM(e,t,n.custom):t;r=Promise.all(jM(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var FM={test:e=>e===`auto`,parse:e=>e},IM=e=>t=>t.test(e),LM=[dk,Ok,Dk,Ek,Ak,kk,FM],RM=e=>LM.find(IM(e));function zM(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||vO(e)}var BM=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function VM(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(hk)||[];if(!r)return e;let i=n.replace(r,``),a=BM.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var HM=/\b([a-z-]*)\(.*?\)/gu,UM={...Yk,getAnimatableNone:e=>{let t=e.match(HM);return t?t.map(VM).join(` `):e}},WM={...Yk,getAnimatableNone:e=>{let t=Yk.parse(e);return Yk.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},GM={...dk,transform:Math.round},KM={borderWidth:Ok,borderTopWidth:Ok,borderRightWidth:Ok,borderBottomWidth:Ok,borderLeftWidth:Ok,borderRadius:Ok,borderTopLeftRadius:Ok,borderTopRightRadius:Ok,borderBottomRightRadius:Ok,borderBottomLeftRadius:Ok,width:Ok,maxWidth:Ok,height:Ok,maxHeight:Ok,top:Ok,right:Ok,bottom:Ok,left:Ok,inset:Ok,insetBlock:Ok,insetBlockStart:Ok,insetBlockEnd:Ok,insetInline:Ok,insetInlineStart:Ok,insetInlineEnd:Ok,padding:Ok,paddingTop:Ok,paddingRight:Ok,paddingBottom:Ok,paddingLeft:Ok,paddingBlock:Ok,paddingBlockStart:Ok,paddingBlockEnd:Ok,paddingInline:Ok,paddingInlineStart:Ok,paddingInlineEnd:Ok,margin:Ok,marginTop:Ok,marginRight:Ok,marginBottom:Ok,marginLeft:Ok,marginBlock:Ok,marginBlockStart:Ok,marginBlockEnd:Ok,marginInline:Ok,marginInlineStart:Ok,marginInlineEnd:Ok,fontSize:Ok,backgroundPositionX:Ok,backgroundPositionY:Ok,rotate:Ek,rotateX:Ek,rotateY:Ek,rotateZ:Ek,scale:pk,scaleX:pk,scaleY:pk,scaleZ:pk,skew:Ek,skewX:Ek,skewY:Ek,distance:Ok,translateX:Ok,translateY:Ok,translateZ:Ok,x:Ok,y:Ok,z:Ok,perspective:Ok,transformPerspective:Ok,opacity:fk,originX:jk,originY:jk,originZ:Ok,zIndex:GM,fillOpacity:fk,strokeOpacity:fk,numOctaves:GM},qM={...KM,color:Nk,backgroundColor:Nk,outlineColor:Nk,fill:Nk,stroke:Nk,borderColor:Nk,borderTopColor:Nk,borderRightColor:Nk,borderBottomColor:Nk,borderLeftColor:Nk,filter:UM,WebkitFilter:UM,mask:WM,WebkitMask:WM},JM=e=>qM[e],YM=new Set([UM,WM]);function XM(e,t){let n=JM(e);return YM.has(n)||(n=Yk),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var ZM=new Set([`auto`,`none`,`0`]);function QM(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!ZM.has(t)&&Hk(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=XM(n,i)}var $M=class extends bj{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),ck(r))){let i=eM(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!mM.has(n)||e.length!==2)return;let[r,i]=e,a=RM(r),o=RM(i);if(uk(r)!==uk(i)&&fj[n]){this.needsMeasurement=!0;return}if(a!==o)if(cj(a)&&cj(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else fj[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||zM(e[t]))&&n.push(t);n.length&&QM(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fj[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=fj[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function eN(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var tN=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function nN(e){return _O(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:rN,cancel:Hte}=XO(queueMicrotask,!1),iN={x:!1,y:!1};function aN(){return iN.x||iN.y}function oN(e){return e===`x`||e===`y`?iN[e]?null:(iN[e]=!0,()=>{iN[e]=!1}):iN.x||iN.y?null:(iN.x=iN.y=!0,()=>{iN.x=iN.y=!1})}function sN(e,t){let n=eN(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function cN(e){return!(e.pointerType===`touch`||aN())}function lN(e,t,n={}){let[r,i,a]=sN(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!cN(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var uN=(e,t)=>t?e===t?!0:uN(e,t.parentElement):!1,dN=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,fN=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function pN(e){return fN.has(e.tagName)||e.isContentEditable===!0}var mN=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function hN(e){return mN.has(e.tagName)||e.isContentEditable===!0}var gN=new WeakSet;function _N(e){return t=>{t.key===`Enter`&&e(t)}}function vN(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var yN=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=_N(()=>{if(gN.has(n))return;vN(n,`down`);let e=_N(()=>{vN(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>vN(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function bN(e){return dN(e)&&!aN()}var xN=new WeakSet;function SN(e,t,n={}){let[r,i,a]=sN(e,n),o=e=>{let r=e.currentTarget;if(!bN(e)||xN.has(e))return;gN.add(r),n.stopPropagation&&xN.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),gN.has(r)&&gN.delete(r),bN(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||uN(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),nN(e)&&(e.addEventListener(`focus`,e=>yN(e,i)),!pN(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function CN(e){return _O(e)&&`ownerSVGElement`in e}var wN=new WeakMap,TN,EN=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:CN(r)&&`getBBox`in r?r.getBBox()[t]:r[n],DN=EN(`inline`,`width`,`offsetWidth`),ON=EN(`block`,`height`,`offsetHeight`);function kN({target:e,borderBoxSize:t}){wN.get(e)?.forEach(n=>{n(e,{get width(){return DN(e,t)},get height(){return ON(e,t)}})})}function AN(e){e.forEach(kN)}function jN(){typeof ResizeObserver>`u`||(TN=new ResizeObserver(AN))}function MN(e,t){TN||jN();let n=eN(e);return n.forEach(e=>{let n=wN.get(e);n||(n=new Set,wN.set(e,n)),n.add(t),TN?.observe(e)}),()=>{n.forEach(e=>{let n=wN.get(e);n?.delete(t),n?.size||TN?.unobserve(e)})}}var NN=new Set,PN;function FN(){PN=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};NN.forEach(t=>t(e))},window.addEventListener(`resize`,PN)}function IN(e){return NN.add(e),PN||FN(),()=>{NN.delete(e),!NN.size&&typeof PN==`function`&&(window.removeEventListener(`resize`,PN),PN=void 0)}}function LN(e,t){return typeof e==`function`?IN(e):MN(e,t)}function RN(e){return CN(e)&&e.tagName===`svg`}var zN=[...LM,Nk,Yk],BN=e=>zN.find(IM(e)),VN=()=>({translate:0,scale:1,origin:0,originPoint:0}),HN=()=>({x:VN(),y:VN()}),UN=()=>({min:0,max:0}),WN=()=>({x:UN(),y:UN()}),GN=new WeakMap;function KN(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function qN(e){return typeof e==`string`||Array.isArray(e)}var JN=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],YN=[`initial`,...JN];function XN(e){return KN(e.animate)||YN.some(t=>qN(e[t]))}function ZN(e){return!!(XN(e)||e.variants)}function QN(e,t,n){for(let r in t){let i=t[r],a=n[r];if(wM(i))e.addValue(r,i);else if(wM(a))e.addValue(r,yM(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,yM(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var $N={current:null},eP={current:!1},tP=typeof window<`u`;function nP(){if(eP.current=!0,tP)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>$N.current=e.matches;e.addEventListener(`change`,t),t()}else $N.current=!1}var rP=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],iP={};function aP(e){iP=e}function oP(){return iP}var sP=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bj,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=rk.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ZO.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=XN(t),this.isVariantNode=ZN(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&wM(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,GN.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(eP.current||nP(),this.shouldReduceMotion=$N.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),QO(this.notifyUpdate),QO(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Uj.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Nj({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:wO(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=sj.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ZO.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in iP){let t=iP[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):WN()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<rP.length;t++){let n=rP[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=QN(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=yM(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(gO(n)||vO(n))?n=parseFloat(n):!BN(n)&&Yk.test(t)&&(n=XM(e,t)),this.setBaseTarget(e,wM(n)?n.get():n)),wM(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=fM(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!wM(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new CO),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){rN.render(this.render)}},cP=class extends sP{constructor(){super(...arguments),this.KeyframeResolver=$M}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;wM(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},lP=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function uP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function dP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function fP(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function pP(e){return e===void 0||e===1}function mP({scale:e,scaleX:t,scaleY:n}){return!pP(e)||!pP(t)||!pP(n)}function hP(e){return mP(e)||gP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gP(e){return _P(e.x)||_P(e.y)}function _P(e){return e&&e!==`0%`}function vP(e,t,n){return n+t*(e-n)}function yP(e,t,n,r,i){return i!==void 0&&(e=vP(e,i,r)),vP(e,n,r)+t}function bP(e,t=0,n=1,r,i){e.min=yP(e.min,t,n,r,i),e.max=yP(e.max,t,n,r,i)}function xP(e,{x:t,y:n}){bP(e.x,t.translate,t.scale,t.originPoint),bP(e.y,n.translate,n.scale,n.originPoint)}var SP=.999999999999,CP=1.0000000000001;function wP(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(TP(e.x,-a.scroll.offset.x),TP(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,xP(e,o)),r&&hP(a.latestValues)&&OP(e,a.latestValues,a.layout?.layoutBox))}t.x<CP&&t.x>SP&&(t.x=1),t.y<CP&&t.y>SP&&(t.y=1)}function TP(e,t){e.min+=t,e.max+=t}function EP(e,t,n,r,i=.5){bP(e,t,n,$k(e.min,e.max,i),r)}function DP(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function OP(e,t,n){let r=n??e;EP(e.x,DP(t.x,r.x),t.scaleX,t.scale,t.originX),EP(e.y,DP(t.y,r.y),t.scaleY,t.scale,t.originY)}function kP(e,t){return uP(fP(e.getBoundingClientRect(),t))}function AP(e,t,n){let r=kP(e,n),{scroll:i}=t;return i&&(TP(r.x,i.offset.x),TP(r.y,i.offset.y)),r}var jP={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},MP=oj.length;function NP(e,t,n){let r=``,i=!0;for(let a=0;a<MP;a++){let o=oj[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===(o.startsWith(`scale`)?1:0);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=tN(s,KM[o]);if(!c){i=!1;let t=jP[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function PP(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(sj.has(e)){o=!0;continue}else if(ok(e)){i[e]=n;continue}else{let t=tN(n,KM[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=NP(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function FP(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function IP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var LP={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Ok.test(e))e=parseFloat(e);else return e;return`${IP(e,t.target.x)}% ${IP(e,t.target.y)}%`}},RP={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Yk.parse(e);if(i.length>5)return r;let a=Yk.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=$k(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},zP={borderRadius:{...LP,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:LP,borderTopRightRadius:LP,borderBottomLeftRadius:LP,borderBottomRightRadius:LP,boxShadow:RP};function BP(e,{layout:t,layoutId:n}){return sj.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!zP[e]||e===`opacity`)}function VP(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(wM(r[t])||i&&wM(i[t])||BP(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function HP(e){return window.getComputedStyle(e)}var UP=class extends cP{constructor(){super(...arguments),this.type=`html`,this.renderInstance=FP}readValueFromInstance(e,t){if(sj.has(t))return this.projection?.isProjecting?nj(t):ij(e,t);{let n=HP(e),r=(ok(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return kP(e,t)}build(e,t,n){PP(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return VP(e,t,n)}},WP={offset:`stroke-dashoffset`,array:`stroke-dasharray`},GP={offset:`strokeDashoffset`,array:`strokeDasharray`};function KP(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?WP:GP;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var qP=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function JP(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(PP(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of qP)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&KP(d,i,a,o,!1)}var YP=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),XP=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ZP(e,t,n,r){FP(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(YP.has(n)?n:DM(n),t.attrs[n])}function QP(e,t,n){let r=VP(e,t,n);for(let n in e)if(wM(e[n])||wM(t[n])){let t=oj.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var $P=class extends cP{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=WN}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(sj.has(t)){let e=JM(t);return e&&e.default||0}return t=YP.has(t)?t:DM(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return QP(e,t,n)}build(e,t,n){JP(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ZP(e,t,n,r)}mount(e){this.isSVGTag=XP(e.tagName),super.mount(e)}},eF=YN.length;function tF(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&tF(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<eF;n++){let r=YN[n],i=e.props[r];(qN(i)||i===!1)&&(t[r]=i)}return t}function nF(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var rF=[...JN].reverse(),iF=JN.length;function aF(e){return t=>Promise.all(t.map(({animation:t,options:n})=>PM(e,t,n)))}function oF(e){let t=aF(e),n=lF(),r=!0,i=!1,a=t=>(n,r)=>{let i=pM(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=tF(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<iF;t++){let p=rF[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=qN(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||KN(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=sF(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=bM(t)&&bM(n)?!nF(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=pM(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Zj(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=pM(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=lF(),i=!0}}}function sF(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!nF(t,e):!1}function cF(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lF(){return{animate:cF(!0),whileInView:cF(),whileHover:cF(),whileTap:cF(),whileDrag:cF(),whileFocus:cF(),exit:cF()}}function uF(e,t){e.min=t.min,e.max=t.max}function dF(e,t){uF(e.x,t.x),uF(e.y,t.y)}function fF(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var pF=1e-4,mF=1-pF,hF=1+pF,gF=.01,_F=0-gF,vF=0+gF;function yF(e){return e.max-e.min}function bF(e,t,n){return Math.abs(e-t)<=n}function xF(e,t,n,r=.5){e.origin=r,e.originPoint=$k(t.min,t.max,e.origin),e.scale=yF(n)/yF(t),e.translate=$k(n.min,n.max,e.origin)-e.originPoint,(e.scale>=mF&&e.scale<=hF||isNaN(e.scale))&&(e.scale=1),(e.translate>=_F&&e.translate<=vF||isNaN(e.translate))&&(e.translate=0)}function SF(e,t,n,r){xF(e.x,t.x,n.x,r?r.originX:void 0),xF(e.y,t.y,n.y,r?r.originY:void 0)}function CF(e,t,n,r=0){e.min=(r?$k(n.min,n.max,r):n.min)+t.min,e.max=e.min+yF(t)}function wF(e,t,n,r){CF(e.x,t.x,n.x,r?.x),CF(e.y,t.y,n.y,r?.y)}function TF(e,t,n,r=0){let i=r?$k(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+yF(t)}function EF(e,t,n,r){TF(e.x,t.x,n.x,r?.x),TF(e.y,t.y,n.y,r?.y)}function DF(e,t,n,r,i){return e-=t,e=vP(e,1/n,r),i!==void 0&&(e=vP(e,1/i,r)),e}function OF(e,t=0,n=1,r=.5,i,a=e,o=e){if(Dk.test(t)&&(t=parseFloat(t),t=$k(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=$k(a.min,a.max,r);e===a&&(s-=t),e.min=DF(e.min,t,n,s,i),e.max=DF(e.max,t,n,s,i)}function kF(e,t,[n,r,i],a,o){OF(e,t[n],t[r],t[i],t.scale,a,o)}var AF=[`x`,`scaleX`,`originX`],jF=[`y`,`scaleY`,`originY`];function MF(e,t,n,r){kF(e.x,t,AF,n?n.x:void 0,r?r.x:void 0),kF(e.y,t,jF,n?n.y:void 0,r?r.y:void 0)}function NF(e){return e.translate===0&&e.scale===1}function PF(e){return NF(e.x)&&NF(e.y)}function FF(e,t){return e.min===t.min&&e.max===t.max}function IF(e,t){return FF(e.x,t.x)&&FF(e.y,t.y)}function LF(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function RF(e,t){return LF(e.x,t.x)&&LF(e.y,t.y)}function zF(e){return yF(e.x)/yF(e.y)}function BF(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function VF(e){return[e(`x`),e(`y`)]}function HF(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var UF=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],WF=UF.length,GF=e=>typeof e==`string`?parseFloat(e):e,KF=e=>typeof e==`number`||Ok.test(e);function qF(e,t,n,r,i,a){i?(e.opacity=$k(0,n.opacity??1,YF(r)),e.opacityExit=$k(t.opacity??1,0,XF(r))):a&&(e.opacity=$k(t.opacity??1,n.opacity??1,r));for(let i=0;i<WF;i++){let a=UF[i],o=JF(t,a),s=JF(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||KF(o)===KF(s)?(e[a]=Math.max($k(GF(o),GF(s),r),0),(Dk.test(s)||Dk.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=$k(t.rotate||0,n.rotate||0,r))}function JF(e,t){return e[t]===void 0?e.borderRadius:e[t]}var YF=ZF(0,.5,IO),XF=ZF(.5,.95,bO);function ZF(e,t,n){return r=>r<e?0:r>t?1:n(SO(e,t,r))}function QF(e,t,n){let r=wM(e)?e:yM(e);return r.start(uM(``,r,t,n)),r.animation}function $F(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var eI=(e,t)=>e.depth-t.depth,tI=class{constructor(){this.children=[],this.isDirty=!1}add(e){fO(this.children,e),this.isDirty=!0}remove(e){pO(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(eI),this.isDirty=!1,this.children.forEach(e)}};function nI(e,t){let n=rk.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(QO(r),e(a-t))};return ZO.setup(r,!0),()=>QO(r)}function rI(e){return wM(e)?e.get():e}var iI=class{constructor(){this.members=[]}add(e){fO(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(pO(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(pO(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},aI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},oI={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},sI=[``,`X`,`Y`,`Z`],cI=1e3,lI=0;function uI(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=kM(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ZO,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dI(r)}function fI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=lI++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,qO.value&&(oI.nodes=oI.calculatedTargetDeltas=oI.calculatedProjections=0),this.nodes.forEach(hI),this.nodes.forEach(wI),this.nodes.forEach(TI),this.nodes.forEach(gI),qO.addProjectionMetrics&&qO.addProjectionMetrics(oI)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new tI)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new CO),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=CN(t)&&!RN(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ZO.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=nI(i,250),aI.hasAnimatedSinceResize&&(aI.hasAnimatedSinceResize=!1,this.nodes.forEach(CI)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||MI,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!RF(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...sM(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||CI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),QO(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(EI),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(yI),this.nodes.forEach(vI);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bI);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xI),this.nodes.forEach(SI),this.nodes.forEach(pI),this.nodes.forEach(mI)):this.nodes.forEach(bI),this.clearAllSnapshots();let e=rk.now();$O.delta=mO(0,1e3/60,e-$O.timestamp),$O.timestamp=e,$O.isProcessing=!0,ek.update.process($O),ek.preRender.process($O),ek.render.process($O),$O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rN.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_I),this.sharedNodes.forEach(DI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ZO.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ZO.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!yF(this.snapshot.measuredBox.x)&&!yF(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=WN(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!PF(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||hP(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),II(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return WN();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(RI))){let{scroll:e}=this.root;e&&(TP(t.x,e.offset.x),TP(t.y,e.offset.y))}return t}removeElementScroll(e){let t=WN();if(dF(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&dF(t,e),TP(t.x,i.offset.x),TP(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||WN();dF(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(TP(r.x,-n.scroll.offset.x),TP(r.y,-n.scroll.offset.y)),hP(n.latestValues)&&OP(r,n.latestValues,n.layout?.layoutBox)}return hP(this.latestValues)&&OP(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=WN();dF(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!hP(n.latestValues))continue;let r;n.instance&&(mP(n.latestValues)&&n.updateSnapshot(),r=WN(),dF(r,n.measurePageBox())),MF(t,n.latestValues,n.snapshot?.layoutBox,r)}return hP(this.latestValues)&&MF(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=$O.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=WN(),this.targetWithTransforms=WN()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wF(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):dF(this.target,this.layout.layoutBox),xP(this.target,this.targetDelta)):dF(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),qO.value&&oI.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||mP(this.parent.latestValues)||gP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=WN(),this.relativeTargetOrigin=WN(),EF(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),dF(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===$O.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;dF(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;wP(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=WN());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fF(this.prevProjectionDelta.x,this.projectionDelta.x),fF(this.prevProjectionDelta.y,this.projectionDelta.y)),SF(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!BF(this.projectionDelta.x,this.prevProjectionDelta.x)||!BF(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),qO.value&&oI.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=HN(),this.projectionDelta=HN(),this.projectionDeltaWithTransform=HN()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=HN();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=WN(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(jI));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;OI(a.x,e.x,n),OI(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(EF(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),AI(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&IF(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=WN(),dF(d,this.relativeTarget)),s&&(this.animationValues=i,qF(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(QO(this.pendingAnimation),void 0),this.pendingAnimation=ZO.update(()=>{aI.hasAnimatedSinceResize=!0,ik.layout++,this.motionValue||=yM(0),this.motionValue.jump(0,!1),this.currentAnimation=QF(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{ik.layout--},onComplete:()=>{ik.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&LI(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||WN();let t=yF(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=yF(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}dF(t,n),OP(t,i),SF(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iI),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&uI(`z`,e,r,this.animationValues);for(let t=0;t<sI.length;t++)uI(`rotate${sI[t]}`,e,r,this.animationValues),uI(`skew${sI[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=rI(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=rI(t?.pointerEvents)||``),this.hasProjected&&!hP(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=HF(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in zP){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=zP[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?rI(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(vI),this.root.sharedNodes.clear()}}}function pI(e){e.updateLayout()}function mI(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)VF(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=yF(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;uF(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else LI(i,t.layoutBox,n)&&VF(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=yF(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=HN();SF(o,n,t.layoutBox);let s=HN();a?SF(s,e.applyTransform(r,!0),t.measuredBox):SF(s,n,t.layoutBox);let c=!PF(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=WN();EF(s,t.layoutBox,i.layoutBox,o);let c=WN();EF(c,n,a.layoutBox,o),RF(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function hI(e){qO.value&&oI.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function gI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _I(e){e.clearSnapshot()}function vI(e){e.clearMeasurements()}function yI(e){e.isLayoutDirty=!0,e.updateLayout()}function bI(e){e.isLayoutDirty=!1}function xI(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function SI(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function CI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wI(e){e.resolveTargetDelta()}function TI(e){e.calcProjection()}function EI(e){e.resetSkewAndRotation()}function DI(e){e.removeLeadSnapshot()}function OI(e,t,n){e.translate=$k(t.translate,0,n),e.scale=$k(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kI(e,t,n,r){e.min=$k(t.min,n.min,r),e.max=$k(t.max,n.max,r)}function AI(e,t,n,r){kI(e.x,t.x,n.x,r),kI(e.y,t.y,n.y,r)}function jI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var MI={duration:.45,ease:[.4,0,.1,1]},NI=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),PI=NI(`applewebkit/`)&&!NI(`chrome/`)?Math.round:bO;function FI(e){e.min=PI(e.min),e.max=PI(e.max)}function II(e){FI(e.x),FI(e.y)}function LI(e,t,n){return e===`position`||e===`preserve-aspect`&&!bF(zF(t),zF(n),.2)}function RI(e){return e!==e.root&&e.scroll?.wasRoot}var zI=fI({attachResizeListener:(e,t)=>$F(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),BI={current:void 0},VI=fI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!BI.current){let e=new zI({});e.mount(window),e.setOptions({layoutScroll:!0}),BI.current=e}return BI.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),HI=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function UI(e=!0){let t=(0,b.useContext)(dO);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var WI=(0,b.createContext)({strict:!1}),GI={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},KI=!1;function qI(){if(KI)return;let e={};for(let t in GI)e[t]={isEnabled:e=>GI[t].some(t=>!!e[t])};aP(e),KI=!0}function JI(){return qI(),oP()}function YI(e){let t=JI();for(let n in e)t[n]={...t[n],...e[n]};aP(t)}var XI=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function ZI(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||XI.has(e)}var QI=c({default:()=>$I}),$I,eL=o((()=>{throw $I={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),tL=e=>!ZI(e);function nL(e){typeof e==`function`&&(tL=t=>t.startsWith(`on`)?!ZI(t):e(t))}try{nL((eL(),d(QI)).default)}catch{}function rL(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||wM(e[i])||(tL(i)||n===!0&&ZI(i)||!t&&!ZI(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var iL=(0,b.createContext)({});function aL(e,t){if(XN(e)){let{initial:t,animate:n}=e;return{initial:t===!1||qN(t)?t:void 0,animate:qN(n)?n:void 0}}return e.inherit===!1?{}:t}function oL(e){let{initial:t,animate:n}=aL(e,(0,b.useContext)(iL));return(0,b.useMemo)(()=>({initial:t,animate:n}),[sL(t),sL(n)])}function sL(e){return Array.isArray(e)?e.join(` `):e}var cL=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function lL(e,t,n){for(let r in t)!wM(t[r])&&!BP(r,n)&&(e[r]=t[r])}function uL({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=cL();return PP(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dL(e,t){let n=e.style||{},r={};return lL(r,n,e),Object.assign(r,uL(e,t)),r}function fL(e,t){let n={},r=dL(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var pL=()=>({...cL(),attrs:{}});function Ute(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=pL();return JP(n,t,XP(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};lL(t,e.style,e),i.style={...t,...i.style}}return i}var Wte=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function mL(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Wte.indexOf(e)>-1||/[A-Z]/u.test(e))}function Gte(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??mL(e)?Ute:fL)(t,r,i,e),c=rL(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>wM(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function Kte({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:qte(n,r,i,e),renderState:t()}}function qte(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=rI(a[e]);let{initial:o,animate:s}=e,c=XN(e),l=ZN(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!KN(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=fM(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var hL=e=>(t,n)=>{let r=(0,b.useContext)(iL),i=(0,b.useContext)(dO),a=()=>Kte(e,t,r,i);return n?a():Ite(a)},Jte=hL({scrapeMotionValuesFromProps:VP,createRenderState:cL}),Yte=hL({scrapeMotionValuesFromProps:QP,createRenderState:pL}),Xte=Symbol.for(`motionComponentSymbol`);function Zte(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var gL=(0,b.createContext)({});function _L(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Qte(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(iL),s=(0,b.useContext)(WI),c=(0,b.useContext)(dO),l=(0,b.useContext)(HI),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(gL);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&$te(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[OM],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Lte(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function $te(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:vL(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&_L(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function vL(e){if(e)return e.options.allowProjection===!1?vL(e.parent):e.projection}function yL(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&YI(r);let a=n?n===`svg`:mL(e),o=a?Yte:Jte;function s(n,s){let c,l={...(0,b.useContext)(HI),...n,layoutId:ene(n)},{isStatic:u}=l,d=oL(n),f=o(n,u);if(!u&&typeof window<`u`){tne(l,r);let t=nne(l);c=t.MeasureLayout,d.visualElement=Qte(e,f,l,i,t.ProjectionNode,a)}return(0,G.jsxs)(iL.Provider,{value:d,children:[c&&d.visualElement?(0,G.jsx)(c,{visualElement:d.visualElement,...l}):null,Gte(e,n,Zte(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[Xte]=e,c}function ene({layoutId:e}){let t=(0,b.useContext)(uO).id;return t&&e!==void 0?t+`-`+e:e}function tne(e,t){(0,b.useContext)(WI).strict}function nne(e){let{drag:t,layout:n}=JI();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function rne(e,t){if(typeof Proxy>`u`)return yL;let n=new Map,r=(n,r)=>yL(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,yL(a,void 0,e,t)),n.get(a))})}var ine=(e,t)=>t.isSVG??mL(e)?new $P(t):new UP(t,{allowProjection:e!==b.Fragment}),ane=class extends lP{constructor(e){super(e),e.animationState||=oF(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();KN(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},one=0,sne={animation:{Feature:ane},exit:{Feature:class extends lP{constructor(){super(...arguments),this.id=one++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=pM(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function bL(e){return{point:{x:e.pageX,y:e.pageY}}}var cne=e=>t=>dN(t)&&e(t,bL(t));function xL(e,t,n,r){return $F(e,t,cne(n),r)}var SL=({current:e})=>e?e.ownerDocument.defaultView:null,CL=(e,t)=>Math.abs(e-t);function lne(e,t){let n=CL(e.x,t.x),r=CL(e.y,t.y);return Math.sqrt(n**2+r**2)}var wL=new Set([`auto`,`scroll`]),TL=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=EL(this.lastRawMoveEventInfo,this.transformPagePoint));let e=OL(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=lne(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=$O;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=EL(t,this.transformPagePoint),ZO.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=OL(e.type===`pointercancel`?this.lastMoveEventInfo:EL(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!dN(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=EL(bL(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=$O;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,OL(s,this.history)),this.removeListeners=xO(xL(this.contextWindow,`pointermove`,this.handlePointerMove),xL(this.contextWindow,`pointerup`,this.handlePointerUp),xL(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(wL.has(e.overflowX)||wL.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),ZO.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),QO(this.updatePoint)}};function EL(e,t){return t?{point:t(e.point)}:e}function DL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function OL({point:e},t){return{point:e,delta:DL(e,kL(t)),offset:DL(e,une(t)),velocity:dne(t,.1)}}function une(e){return e[0]}function kL(e){return e[e.length-1]}function dne(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=kL(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>wO(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>wO(t)*2&&(r=e[1]);let a=TO(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fne(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?$k(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?$k(n,e,r.max):Math.min(e,n)),e}function AL(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function pne(e,{top:t,left:n,bottom:r,right:i}){return{x:AL(e.x,n,i),y:AL(e.y,t,r)}}function jL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function mne(e,t){return{x:jL(e.x,t.x),y:jL(e.y,t.y)}}function hne(e,t){let n=.5,r=yF(e),i=yF(t);return i>r?n=SO(t.min,t.max-r,e.min):r>i&&(n=SO(e.min,e.max-i,t.min)),mO(0,1,n)}function gne(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var ML=.35;function _ne(e=ML){return e===!1?e=0:e===!0&&(e=ML),{x:NL(e,`left`,`right`),y:NL(e,`top`,`bottom`)}}function NL(e,t,n){return{min:PL(e,t),max:PL(e,n)}}function PL(e,t){return typeof e==`number`?e:e[t]||0}var vne=new WeakMap,yne=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=WN(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(bL(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oN(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),VF(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Dk.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=yF(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ZO.update(()=>i(e,t),!1,!0),EM(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=xne(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&ZO.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new TL(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:SL(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&ZO.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!IL(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=fne(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&_L(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=pne(n.layoutBox,e):this.constraints=!1,this.elastic=_ne(t),r!==this.constraints&&!_L(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&VF(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=gne(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!_L(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=AP(n,r.root,this.visualElement.getTransformPagePoint()),a=mne(r.layout.layoutBox,i);if(t){let e=t(dP(a));this.hasMutatedConstraints=!!e,e&&(a=uP(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=VF(o=>{if(!IL(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return EM(this.visualElement,e),n.start(uM(e,n,0,t,this.visualElement,!1))}stopAnimation(){VF(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){VF(t=>{let{drag:n}=this.getProps();if(!IL(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-$k(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!_L(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};VF(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=hne({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),VF(t=>{if(!IL(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set($k(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;vne.set(this.visualElement,this);let e=this.visualElement.current,t=xL(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&hN(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();_L(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=bne(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ZO.read(r);let o=$F(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(VF(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=ML,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function FL(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function bne(e,t,n){let r=LN(e,FL(n)),i=LN(t,FL(n));return()=>{r(),i()}}function IL(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xne(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Sne=class extends lP{constructor(e){super(e),this.removeGroupControls=bO,this.removeListeners=bO,this.controls=new yne(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bO}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},LL=e=>(t,n)=>{e&&ZO.update(()=>e(t,n),!1,!0)},Cne=class extends lP{constructor(){super(...arguments),this.removePointerDownListener=bO}onPointerDown(e){this.session=new TL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:SL(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:LL(e),onStart:LL(t),onMove:LL(n),onEnd:(e,t)=>{delete this.session,r&&ZO.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=xL(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},RL=!1,wne=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),RL&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),aI.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),RL=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||ZO.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),rN.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;RL=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function zL(e){let[t,n]=UI(),r=(0,b.useContext)(uO);return(0,G.jsx)(wne,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(gL),isPresent:t,safeToRemove:n})}var Tne={pan:{Feature:Cne},drag:{Feature:Sne,ProjectionNode:VI,MeasureLayout:zL}};function BL(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&ZO.postRender(()=>i(t,bL(t)))}var Ene=class extends lP{mount(){let{current:e}=this.node;e&&(this.unmount=lN(e,(e,t)=>(BL(this.node,t,`Start`),e=>BL(this.node,e,`End`))))}unmount(){}},Dne=class extends lP{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=xO($F(this.node.current,`focus`,()=>this.onFocus()),$F(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function VL(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&ZO.postRender(()=>i(t,bL(t)))}var One=class extends lP{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=SN(e,(e,t)=>(VL(this.node,t,`Start`),(e,{success:t})=>VL(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},HL=new WeakMap,UL=new WeakMap,kne=e=>{let t=HL.get(e.target);t&&t(e)},Ane=e=>{e.forEach(kne)};function jne({root:e,...t}){let n=e||document;UL.has(n)||UL.set(n,{});let r=UL.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ane,{root:e,...t})),r[i]}function Mne(e,t,n){let r=jne(t);return HL.set(e,n),r.observe(e),()=>{HL.delete(e),r.unobserve(e)}}var Nne={some:0,all:1},Pne=class extends lP{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Nne[r]};this.stopObserver=Mne(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Fne(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Fne({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ine={inView:{Feature:Pne},tap:{Feature:One},focus:{Feature:Dne},hover:{Feature:Ene}},Lne={layout:{ProjectionNode:VI,MeasureLayout:zL}},WL=rne({...sne,...Ine,...Tne,...Lne},ine),GL=b.memo(({className:e})=>{let t=`M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875.M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867.M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859.M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851.M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843.M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835.M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827.M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819.M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811.M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803.M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795.M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787.M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779.M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771.M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763.M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755.M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747.M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739.M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731.M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723.M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715.M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707.M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699.M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691.M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683.M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675.M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667.M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659.M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651.M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643.M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635.M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627.M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619.M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611.M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603.M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595.M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587.M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579.M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571.M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563.M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555.M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547.M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539.M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531.M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523.M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515.M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507.M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499.M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491.M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483`.split(`.`);return(0,G.jsx)(`div`,{className:cO(`absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center`,e),children:(0,G.jsxs)(`svg`,{className:`z-0 h-full w-full pointer-events-none absolute`,width:`100%`,height:`100%`,viewBox:`0 0 696 316`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,G.jsx)(`title`,{children:`Background Beams`}),(0,G.jsx)(`path`,{d:`M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419`,stroke:`url(#paint0_radial_242_278)`,strokeOpacity:`0.05`,strokeWidth:`0.5`}),t.map((e,t)=>(0,G.jsx)(WL.path,{d:e,stroke:`url(#linearGradient-${t})`,strokeOpacity:`0.4`,strokeWidth:`0.5`},`path-${t}`)),(0,G.jsxs)(`defs`,{children:[t.map((e,t)=>(0,G.jsxs)(WL.linearGradient,{id:`linearGradient-${t}`,initial:{x1:`0%`,x2:`0%`,y1:`0%`,y2:`0%`},animate:{x1:[`0%`,`100%`],x2:[`0%`,`95%`],y1:[`0%`,`100%`],y2:[`0%`,`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:`easeInOut`,repeat:1/0,delay:0},children:[(0,G.jsx)(`stop`,{stopColor:`#000000`,stopOpacity:`0`}),(0,G.jsx)(`stop`,{stopColor:`#111111`}),(0,G.jsx)(`stop`,{offset:`32.5%`,stopColor:`#666666`}),(0,G.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]},`gradient-${t}`)),(0,G.jsxs)(`radialGradient`,{id:`paint0_radial_242_278`,cx:`0`,cy:`0`,r:`1`,gradientUnits:`userSpaceOnUse`,gradientTransform:`translate(352 34) rotate(90) scale(555 1560.62)`,children:[(0,G.jsx)(`stop`,{offset:`0.0666667`,stopColor:`var(--neutral-300)`}),(0,G.jsx)(`stop`,{offset:`0.243243`,stopColor:`var(--neutral-300)`}),(0,G.jsx)(`stop`,{offset:`0.43594`,stopColor:`white`,stopOpacity:`0`})]})]})]})})});GL.displayName=`BackgroundBeams`;var Rne=()=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(GL,{className:`absolute inset-0`}),(0,G.jsx)(`div`,{className:`relative z-10 flex-1 flex items-center justify-center`,children:(0,G.jsxs)(`div`,{className:`text-center`,children:[(0,G.jsx)(`h1`,{className:`text-2xl font-semibold text-foreground mb-2`,children:`Welcome to Skybridge`}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose a tool from the sidebar to begin`})]})})]});function KL(e){return typeof e!=`object`||!e||typeof e.lastModified==`number`&&typeof File<`u`&&e instanceof File||typeof e.getMonth==`function`&&typeof Date<`u`&&e instanceof Date?!1:!Array.isArray(e)}function zne(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),KL(e.additionalItems)}function qL(e){if(e===``)return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)?t:e}var JL=`__additional_property`,YL=`additionalProperties`,XL=`allOf`,ZL=`anyOf`,QL=`const`,$L=`default`,eR=`__errors`,tR=`items`,Bne=`_$junk_option_schema_id$_`,nR=`$name`,rR=`oneOf`,iR=`properties`,aR=`readonly`,Vne=`required`,oR=`submitButtonOptions`,sR=`$ref`,cR=`__rjsf_ref`,lR=`root`,Hne=[`discriminator`,`propertyName`],Une=`formContext`,Wne=`layoutGridLookupMap`,uR=`__rjsf_additionalProperties`,dR=`__rjsf_rootSchema`,fR=`ui:options`,pR=`ui:globalOptions`;function mR(e={},t={}){return e?Object.keys(e).filter(e=>e.indexOf(`ui:`)===0).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&KL(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&KL(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function hR(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=mR(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function gR(e){let t={[eR]:[],addError(e){this[eR].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:gR(t)}),t);if(Zv(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:gR(n[t])}),t)}return t}function _R(e,t){return fS(e,t,(e,t)=>{if(typeof e==`function`&&typeof t==`function`)return!0})}var Gne=Object.prototype;function vR(e){for(let t in e)if(Gne.hasOwnProperty.call(e,t))return!1;return!0}var yR=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(yR);var bR=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(bR);var xR=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(xR),[...yR,...bR,...xR];function SR(e){return typeof e==`object`}function CR(e){return SR(e)?vR(e):e===!0}function wR(e,t){return e<t?-1:e>t?1:0}function TR(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){let i=e;e=t,t=i,r=n}let i=new Set(e);for(let e=0;e<r;e++)i.add(t[e]);return Array.from(i)}function ER(e,t){let n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){let n=e;e=t,t=n}let r=new Set(t);for(let t=0;t<e.length&&r.size>0;t++){let i=e[t];r.delete(i)&&n.push(i)}return n}function DR(e){return e.length===0}function OR(e){return(t,n)=>{let r=t.length-n.length;if(r!==0)return r;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){let i=e(t[r],n[r]);if(i!==0)return i}return 0}}function kR(e,{threshold:t=12}={}){return n=>{let r=n.length;if(r===0)return n;if(r<=t){let t=[],i=0;outer:for(let a=0;a<r;a++){let r=n[a];for(let n=0;n<i;n++)if(e(r,t[n])===0)continue outer;i=t.push(r)}return t}let i=n.slice().sort(e),a=0;for(let t=1;t<r;t++)e(i[a],i[t])!==0&&++a!==t&&(i[a]=i[t]);return i.length=a+1,i}}function AR(e){return(t,n)=>{let r=[],i=t.length,a=n.length;if(i===0||a===0)return r;if(i>a){let e=t;t=n,n=e;let r=i;i=a,a=r}let o=[...t].sort(e),s=[...n].sort(e),c=0,l=0;for(;c<i&&l<a;){let t=e(o[c],s[l]);t===0?((r.length===0||e(r[r.length-1],o[c])!==0)&&r.push(o[c]),c++,l++):t<0?c++:l++}return r}}function jR(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var MR=jR,NR=()=>0,PR=e=>e===void 0,FR=e=>typeof e!=`object`,IR={boolean:0,number:1,string:2};function LR(e,t){let n=typeof e,r=typeof t;return n===r?wR(e,t):IR[n]-IR[r]}function RR(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(r>n){let n=e;e=t,t=n}let i=new Set(e),a=t.length;for(let n=0;n<a;n++){let r=t[n];i.has(r)||e.push(r)}return e}function zR(e,t,n=NR){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function BR(e){return zR(PR,e)}function VR(e,t){return zR(t=>t===void 0||e(t),t)}function HR(e,t){return zR(Array.isArray,e,t)}var UR=BR(wR),WR=VR(e=>e===0,(e,t)=>e-t);function GR({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=MR(t,e=>Object.keys(e).sort());function r(e){return(t,r)=>{let i=n(t),a=n(r),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=wR(i[e],a[e]);if(t!==0)return t}if(i.length!==a.length)return i.length-a.length;for(let n=0;n<o;n++){let a=i[n],o=e(t[a],r[a]);if(o!==0)return o}return 0}}function i(t){let n=OR(t),r=MR(e,kR(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(wR);function o(e,t){if(SR(e)){if(SR(t)){let n=RR(Object.keys(e),Object.keys(t)),r=n.length;for(let i=0;i<r;i++){let r=n[i];if(e[r]===t[r])continue;let a=(m[r]??s)(e[r],t[r]);if(a!==0)return a}return 0}return t===!0&&vR(e)?0:1}return SR(t)?e===!0&&vR(t)?0:-1:wR(e,t)}let s=BR(l),c=zR(FR,HR(r(s),OR(l)),LR);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=BR(o),d=VR(vR,r(u)),f=BR(i(o)),p=VR(CR,o),m={$id:UR,$comment:UR,$defs:d,$ref:UR,$schema:UR,const:s,contains:u,contentEncoding:UR,contentMediaType:UR,default:s,definitions:d,description:UR,else:u,examples:s,exclusiveMaximum:UR,exclusiveMinimum:UR,format:UR,if:u,maximum:UR,maxItems:UR,maxLength:UR,maxProperties:UR,minimum:UR,multipleOf:UR,not:u,pattern:UR,propertyNames:u,readOnly:UR,then:u,title:UR,writeOnly:UR,uniqueItems:VR(e=>e===!1,NR),minLength:WR,minItems:WR,minProperties:WR,required:VR(DR,a),enum:VR(DR,i(l)),type:BR((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?wR(e,t):a(n?e:[e],r?t:[t])}),items:VR(e=>!Array.isArray(e)&&CR(e),HR(o,OR(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:VR(vR,r(BR(HR(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function KR(e){return e}var qR=(e,t)=>e?qR(t%e,e):t,JR=(e,t)=>Math.abs(e*t)/qR(e,t);function YR(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*XR(e,t,n){let r=e.length,i=t.length;if(r>0&&i>0)for(let a=0;a<r;a++){let r=e[a];for(let e=0;e<i;e++)yield n(r,t[e])}}function ZR(e,t){return e||t}function QR(e){return(t,n)=>{let r={...t},i=Object.keys(n),a=i.length;for(let o=0;o<a;o++){let a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function $R(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function ez(e,t,n){n===void 0||CR(n)?delete e[t]:e[t]=n}var tz=[`properties`,`patternProperties`,`additionalProperties`];function nz(e){let t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){let n=t[i];r.push({regExp:new RegExp(n),schema:e[n]})}return[r,t]}var rz=[[],[]];function iz(e,t,n){let r=n.length;for(let i=0;i<r;i++){let r=n[i];if(!r.regExp.test(t))continue;let a=r.schema;if(a===!1)return!0;e.push(a)}return!1}var az=[`items`,`additionalItems`],oz=[`if`,`then`,`else`];function sz(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function cz(e,t){if(e===t)return e;switch(e){case`number`:if(t===`integer`)return`integer`;case`integer`:if(t===`number`)return`integer`;default:return}}function lz(e,t,n){return[e,t,n]}function uz(e){let t=new Map;for(let[n,r,i]of e){let e=e=>{if(!i(e))throw Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(e[n])}, ${r}: ${JSON.stringify(e[r])})`)};for(let i of[[n,r],[r,n]]){let n=t.get(i[0]);n===void 0&&(n=[],t.set(i[0],n)),n.push({oppositeKey:i[1],check:e})}}return t}var dz=[lz(`minimum`,`maximum`,e=>e.maximum>=e.minimum),lz(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),lz(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),lz(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),lz(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),lz(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),lz(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function fz({mergePatterns:e=YR,isSubRegExp:t=Object.is,intersectJson:n=ER,deduplicateJsonSchemaDef:r=KR,defaultMerger:i=KR,assigners:a=[],checks:o=dz,mergers:s}={}){function c(e){let t=e.length,n=e[0];for(let r=1;r<t;r++){let t=_(n,e[r]);if(t===!1)return!1;CR(t)||(n=t)}return n}function l(e,t,n,r,i,a,o){if(e.length=0,n===!1)return!1;if(e.push(n),i!==void 0){if(i===!1)return!1;e.push(i)}if(iz(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(iz(e,t,r))return!1}else s&&o!==void 0&&e.push(o);return e.length===1?e[0]:c(e)}function u(e,t,n,r,i,a){let o=n.length;if(o>0&&i!==!1)if(a)Object.assign(e,t);else for(let a=0;a<o;a++){let o=n[a];r.has(o)||(e[o]=_(t[o],i))}return e}let d=(n,{properties:r={},patternProperties:i,additionalProperties:a=!0},{properties:o={},patternProperties:s,additionalProperties:c=!0})=>{let d=CR(a),f=CR(c);if(d&&f)return ez(n,`properties`,v(r,o)),ez(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;ez(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?nz(i):rz,[b,x]=s?nz(s):rz,S=[],C=new Set,w=f?void 0:c;for(let e=0;e<h;e++){let t=m[e];C.add(t);let n=l(S,t,r[t],g,o[t],b,w);n!==void 0&&(p[t]=n)}let T=Object.keys(o),E=T.length,D=d?void 0:a;for(let e=0;e<E;e++){let t=T[e];if(C.has(t))continue;let n=l(S,t,o[t],b,void 0,g,D);n!==void 0&&(p[t]=n)}ez(n,`properties`,p);let O={},k=new Set;if(y.length>0&&x.length>0){let n=XR(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])});for(;!n.next().done;);}return O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),ez(n,`patternProperties`,O),n},f=(e,{items:t=[],additionalItems:n},{items:r=[],additionalItems:i})=>{let a=Array.isArray(t),o=Array.isArray(r),s=[];if(e.items=s,a&&o){let[a,o,c]=t.length<r.length?[t.length,n,r]:[r.length,i,t],l=0;for(;l<a;l++)s.push(_(t[l],r[l]));if(o===!1)e.additionalItems=!1;else{let t=o===void 0||CR(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));ez(e,`additionalItems`,n!==void 0&&i!==void 0?_(n,i):n??i)}}else if(a||o){let[o,c,l]=a?[t,r,n]:[r,t,i];ez(e,`additionalItems`,l&&_(l,c));for(let e=0;e<o.length;e++)s.push(_(o[e],c))}else delete e.additionalItems,e.items=_(t,r);return e},p=(e,t,n)=>{sz(e,t);let r=sz({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){return r(Array.from(XR(e,t,_)))}let h=$R([[tz,d],[az,f],[oz,p],...a]),g=uz(o);function _(e,t){if(e===!1||t===!1)return!1;if(CR(e))return CR(t)?!0:t;if(CR(t))return e;let n={...e},r=new Set,a=new Set,o=Object.keys(t),s=o.length;for(let c=0;c<s;c++){let s=o[c],l=t[s];if(l===void 0)continue;let u=g.get(s);if(u!==void 0){let t=u.length;for(let n=0;n<t;n++){let t=u[n];e[t.oppositeKey]!==void 0&&a.add(t.check)}}let d=e[s];if(d===void 0){n[s]=l;continue}let f=h.get(s);if(f){r.add(f);continue}let p=y[s]??i;n[s]=p(d,l)}for(let i of r)n=i(n,e,t);for(let e of a)e(n);return n}let v=QR(_),y={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(e,t)=>{if(e===t)return e;let n=Array.isArray(e),r=Array.isArray(t);if(!n&&!r){let n=cz(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)for(let n of XR(e,t,cz))n!==void 0&&i.add(n);else{let r=n?e:t,a=n?t:e,o=r.length;for(let e=0;e<o;e++){let t=cz(a,r[e]);t!==void 0&&i.add(t)}}let a=i.size;if(a===1)return i.values().next().value;if(a>1)return Array.from(i)}throw Error(`It is not possible to create an intersection of the following incompatible types: ${e.toString()}, ${t.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(e,t)=>{let n=r([e,t]);return n.length===1?n[0]:{anyOf:n}},pattern:e,readOnly:ZR,writeOnly:ZR,enum:(e,t)=>{let r=n(e,t);if(r.length===0)throw Error(`Intersection of the following enums is empty: "${JSON.stringify(e)}", "${JSON.stringify(t)}"`);return r},anyOf:m,oneOf:m,allOf:(e,t)=>r(e.concat(t)),propertyNames:_,contains:_,dependencies:QR((e,t)=>Array.isArray(e)?Array.isArray(t)?TR(e,t):_(t,{required:e}):Array.isArray(t)?_(e,{required:t}):_(e,t)),examples:(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))throw Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return TR(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return JR(e,t)/n},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:ZR,required:TR,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function pz(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(typeof e==`boolean`||e.allOf===void 0){t.push(e);continue}let{allOf:r,...i}=e;t.push(i);for(let e=r.length-1;e>=0;e--)n.push(r[e])}return t}function mz(e){return t=>e(pz(t))}var hz=u(s((e=>{var t=/~/,n=/~[01]/g;function r(e){switch(e){case`~1`:return`/`;case`~0`:return`~`}throw Error(`Invalid tilde escape: `+e)}function i(e){return t.test(e)?e.replace(n,r):e}function a(e){if(typeof e==`string`){if(e=e.split(`/`),e[0]===``)return e;throw Error(`Invalid JSON pointer.`)}else if(Array.isArray(e)){for(let t of e)if(typeof t!=`string`&&typeof t!=`number`)throw Error(`Invalid JSON pointer. Must be of type string or number.`);return e}throw Error(`Invalid JSON pointer.`)}function o(e,t){if(typeof e!=`object`)throw Error(`Invalid input object.`);t=a(t);var n=t.length;if(n===1)return e;for(var r=1;r<n;){if(e=e[i(t[r++])],n===r)return e;if(typeof e!=`object`||!e)return}}e.get=o}))(),1),gz=u(YC(),1);function _z(e,t){if(`$id`in e&&gz.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(Xh(e)){let n=_z(e,t);if(n!==void 0)return n}}else if(Xh(n)){let e=_z(n,t);if(e!==void 0)return e}}function vz(e,t){let n=Q(e,`$id`,t);`$ref`in e&&(e={...e,[sR]:gz.default.resolve(n,e[sR])});for(let[t,r]of Object.entries(e))Array.isArray(r)?e={...e,[t]:r.map(e=>Xh(e)?vz(e,n):e)}:Xh(r)&&(e={...e,[t]:vz(r,n)});return e}function yz(e,t){let n=t[e];return[wS(t,[e]),n]}function bz(e,t={},n=[],r=Q(t,[`$id`])){let i=e||``,a;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));r===void 0||`$id`in t&&t.$id===r?a=hz.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=_z(t,r.replace(/\/$/,``)),a!==void 0&&(a=hz.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(r?gz.default.resolve(r,i):i).replace(/#\/?$/,``).split(`#`);a=_z(t,e.replace(/\/$/,``)),a!==void 0&&(r=a.$id,uS(n)||(a=hz.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let o=a[sR];if(o){if(n.includes(o)){if(n.length===1)throw Error(`Definition for ${e} is a circular reference`);let[t,...r]=n,a=[...r,i,t].join(` -> `);throw Error(`Definition for ${t} contains a circular reference through ${a}`)}let[s,c]=yz(sR,a),l=bz(c,t,[...n,i],r);return Object.keys(s).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[XL]:[s,l]}:{...s,...l}:l}return a}function xz(e,t={},n=Q(t,[`$id`])){return bz(e,t,[],n)}function Sz(e){let t,n=Q(e,Hne);return Zx(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function Cz(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:e==null?`null`:typeof e==`boolean`?`boolean`:isNaN(e)?typeof e==`object`?`object`:`string`:`number`}function wz(e){let{type:t}=e;return!t&&e.const?Cz(e.const):!t&&e.enum?`string`:!t&&(e.properties||e.additionalProperties||e.patternProperties)?`object`:(Array.isArray(t)&&(t=t.length===2&&t.includes(`null`)?t.find(e=>e!==`null`):t[0]),t)}function Tz(e,t){let n=Object.assign({},e);return Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&KL(a)?n[r]=Tz(i,a):e&&t&&(wz(e)===`object`||wz(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=BS(i,a):n[r]=a,n},n)}function Ez(e,t,n){if(e&&n){let r=Q(e,n);if(r===void 0)return;for(let e=0;e<t.length;e++){let i=t[e],a=Q(i,[iR,n],{});if(!(a.type===`object`||a.type===`array`)&&(a.const===r||a.enum?.includes(r)))return e}}}function Dz(e,t,n,r,i){if(t===void 0)return 0;let a=Ez(t,n,i);if(mS(a))return a;for(let a=0;a<n.length;a++){let o=n[a];if(i&&Yx(o,[`properties`,i])){let n=Q(t,i),s=Q(o,[iR,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[iR]).map(e=>({required:[e]}))},i;if(o.anyOf){let{...e}=o;e.allOf?e.allOf=e.allOf.slice():e.allOf=[],e.allOf.push(n),i=e}else i=Object.assign({},o,n);if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}function Oz(e,t,n={},r,i,a=!1){return Vz(e,t,n,r,void 0,void 0,i,a)[0]}function kz(e,t,n,r,i,a,o){let{if:s,then:c,else:l,...u}=t,d=e.isValid(s,a||{},n),f=[u],p=[];if(r)c&&typeof c!=`boolean`&&(p=p.concat(Vz(e,c,n,a,r,i,o))),l&&typeof l!=`boolean`&&(p=p.concat(Vz(e,l,n,a,r,i,o)));else{let t=d?c:l;t&&typeof t!=`boolean`&&(p=p.concat(Vz(e,t,n,a,r,i,o)))}return p.length&&(f=p.map(e=>Tz(u,e))),f.flatMap(t=>Vz(e,t,n,a,r,i,o))}function Az(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>PS(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function jz(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(MS(t,[n],e.patternProperties[n]),t),{})}function Mz(e,t,n,r,i,a,o,s){let c=Nz(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?Uz(e,t,n,r,i,a,o).flatMap(t=>Vz(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?Az(t.allOf.map(t=>Vz(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function Nz(e,t,n,r,i,a,o,s){let c=Pz(t,n,i,void 0,s);return c===t?[t]:Vz(e,c,n,a,r,i,o,s)}function Pz(e,t,n,r,i){if(!KL(e))return e;let a=e;if(`$ref`in a){let{$ref:e,...i}=a;if(n.includes(e))return a;n.push(e),a={...xz(e,t,r),...i,[cR]:e},`$id`in a&&(r=a.$id)}if(`properties`in a){let e=[],o=IS(a[iR],(a,o,s)=>{let c=[...n];a[s]=Pz(o,t,c,r,i),e.push(c)},{});_S(n,VS(qx(e))),a={...a,[iR]:o}}if(`items`in a&&!Array.isArray(a.items)&&typeof a.items!=`boolean`&&(a={...a,items:Pz(a.items,t,n,r,i)}),i){let o,s;`anyOf`in e&&Array.isArray(e.anyOf)?(o=ZL,s=a[ZL]):`oneOf`in e&&Array.isArray(e.oneOf)&&(o=rR,s=a[rR]),o&&s&&(a={...a,[o]:s.map(e=>Pz(e,t,n,r,i))})}return _R(e,a)?e:a}function Fz(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&KL(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=jz(a,t);if(!uS(r)){a.properties[t]=Oz(e,{[XL]:Object.values(r)},n,Q(o,[t]),i),MS(a.properties,[t,JL],!0);return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:Cz(Q(o,[t]))}:`$ref`in a.additionalProperties?Oz(e,{[sR]:Q(a.additionalProperties,[sR])},n,o,i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:Cz(Q(o,[t]))},a.properties[t]=r,MS(a.properties,[t,JL],!0)}else a.properties[t]={type:`null`},MS(a.properties,[t,JL],!0)}}),a}var{compareSchemaDefinitions:Iz,compareSchemaValues:Lz}=GR(),{mergeArrayOfSchemaDefinitions:Rz}=fz({intersectJson:AR(Lz),deduplicateJsonSchemaDef:kR(Iz)}),zz=mz(Rz);function Bz(e){return zz(e)}function Vz(e,t,n,r,i=!1,a=[],o,s){return KL(t)?Mz(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return kz(e,c,n,i,a,r,o);if(`allOf`in c){if(i){let{allOf:e,...t}=c;return[...e,t]}try{let e=[],t=[];(s=c.allOf)==null||s.forEach(n=>{typeof n==`object`&&n.contains?e.push(n):t.push(n)}),e.length&&(c={...c,allOf:t}),c=o?o(c):Bz(c),e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
|
|
62
|
-
`,e);let{allOf:t,...n}=c;return n}}return`properties`in c&&`patternProperties`in c&&(c=Object.keys(c.properties).reduce((t,i)=>{let a=jz(t,i);return uS(a)||(t.properties[i]=Oz(e,{allOf:[t.properties[i],...Object.values(a)]},n,Q(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?Fz(e,c,n,r,o):c}):[{}]}function Hz(e,t,n,r,i){let a,{oneOf:o,anyOf:s,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(s)&&(a=s),a){let o=i===void 0&&r?{}:i,s=Sz(t);a=a.map(e=>Pz(e,n,[]));let l=Dz(e,o,a,n,s);if(r)return a.map(e=>Tz(c,e));t=Tz(c,a[l])}return[t]}function Uz(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return Hz(e,c,n,r,a).flatMap(t=>Wz(e,s,t,n,r,i,a,o))}function Wz(e,t,n,r,i,a,o,s){let c=[n];for(let l in t){if(!i&&Q(o,[l])===void 0||n.properties&&!(l in n.properties))continue;let[u,d]=yz(l,t);return Array.isArray(d)?c[0]=Gz(n,d):KL(d)&&(c=Kz(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>Wz(e,u,t,r,i,a,o,s))}return c}function Gz(e,t){if(!t)return e;let n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Kz(e,t,n,r,i,a,o,s,c){return Vz(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i;return t=Tz(t,u),l===void 0?t:Az(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:Nz(e,t,n,a,o,s))).flatMap(i=>qz(e,t,n,r,i,a,o,s,c))})}function qz(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!t||!t.properties)return!1;let{[r]:i}=t.properties;if(i){let t={type:`object`,properties:{[r]:i}};return e.isValid(t,s,n)||a}return!1});return!a&&l.length!==1?(console.warn(`ignoring oneOf in dependencies because there isn't exactly one subschema that is valid`),[t]):l.flatMap(i=>{let l=i,[u]=yz(r,l.properties);return Vz(e,{...l,properties:u},n,s,a,o,c).map(e=>Tz(t,e))})}function Jz(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=Sz(n)||r,c=n[i].map(n=>Oz(e,n,t,a,o)),l=Q(a,s);if(l!==void 0)return c.find(e=>dS(Q(e,[iR,s,$L],Q(e,[iR,s,QL])),l))}}function Yz(e,t,n,r,i){let a=n;if(Yx(n,`$ref`)&&(a=Oz(e,n,t,void 0,i)),uS(r))return a;let[o,...s]=Array.isArray(r)?r:r.split(`.`);if(o&&Yx(a,o))return a=Q(a,o),Yz(e,t,a,s,i)}function Xz(e,t,n,r,i,a){let o=Yz(e,t,n,r,a);return o===void 0?i:o}var Zz={title:`!@#$_UNKNOWN_$#@!`};function Qz(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop();o.length&&o.forEach(n=>{s=Xz(e,t,s,[iR,n],{},a),Yx(s,`oneOf`)?s=Jz(e,t,s,c,rR,Q(i,n),a):Yx(s,`anyOf`)&&(s=Jz(e,t,s,c,ZL,Q(i,n),a))}),Yx(s,`oneOf`)?s=Jz(e,t,s,c,rR,i,a):Yx(s,`anyOf`)&&(s=Jz(e,t,s,c,ZL,i,a));let l=Xz(e,t,s,[iR,c],Zz,a);l===Zz&&(l=void 0);let u=Xz(e,t,s,Vne,[],a),d;return l&&Array.isArray(u)&&(d=u.includes(c)),{field:l,isRequired:d}}var $z={type:`object`,$id:Bne,properties:{__not_really_there__:{type:`number`}}};function eB(e,t,n,r,i){let a=0;return n&&(Xh(n.properties)?a+=jS(n.properties,(n,a,o)=>{let s=Q(r,o);if(typeof a==`boolean`)return n;if(Yx(a,`$ref`)){let r=Oz(e,a,t,s,i);return n+eB(e,t,r,s||{},i)}if((Yx(a,`oneOf`)||Yx(a,`anyOf`))&&s){let r=Yx(a,`oneOf`)?rR:ZL,o=Sz(a);return n+tB(e,t,s,Q(a,r),-1,o,i)}if(a.type===`object`)return Xh(s)&&(n+=1),n+eB(e,t,a,s,i);if(a.type===Cz(s)){let e=n+1;return a.default?e+=s===a.default?1:-1:a.const&&(e+=s===a.const?1:-1),e}return n},0):Zx(n.type)&&n.type===Cz(r)&&(a+=1)),a}function tB(e,t,n,r,i=-1,a,o){let s=r.map(e=>Pz(e,t,[])),c=Ez(n,r,a);if(mS(c))return c;let l=s.reduce((r,i,o)=>(Dz(e,n,[$z,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||PS(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=eB(e,t,c,n,o);return u.add(l),l>a?{bestIndex:i,bestScore:l}:r},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function nB(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(e=>KL(e))}function rB(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){let a=Array.isArray(e)?e:[],o=i?a:t,s=i?t:a,c=o.map((e,o)=>s[o]===void 0?e:rB(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(KL(t)){let a=Object.assign({},e);return Object.keys(t).reduce((a,o)=>{let s=Q(t,o),c=KL(e)&&o in e,l=o in t,u=Q(e,o)??{},d=c&&Object.entries(u).some(([,e])=>KL(e)),f=c&&KL(Q(e,o)),p=l&&KL(s);return f&&p&&!d?(a[o]={...Q(e,o),...s},a):(a[o]=rB(Q(e,o),s,n,r,i&&(c||!l)),a)},a)}return r&&(e!==void 0&&hS(t)||typeof t==`number`&&isNaN(t))||i&&!hS(t)?e:t}function iB(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&KL(o))r[i]=iB(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let e=o;n===`preventDuplicates`&&(e=o.reduce((e,t)=>(a.includes(t)||e.push(t),e),[])),r[i]=a.concat(e)}else r[i]=o;return r},Object.assign({},e))}function aB(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function oB(e,t,n={},r){let i=Oz(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(e=>typeof e!=`boolean`&&aB(e)):!1}function sB(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:oB(e,t.items,n,r)}function cB(e){let t=e[QL],n=wz(e);return KL(t)&&Zx(t?.$data)&&n!==`object`&&n!==`array`}function lB(e){if(`enum`in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(`const`in e)return e.const;throw Error(`schema cannot be inferred as a constant`)}function uB(e,t){let n=new Map(e.map(e=>[String(e.value),e])),r=new Set(t.filter(e=>e!==`*`).map(String)),i=e.filter(e=>!r.has(String(e.value)));return t.flatMap(e=>{if(e===`*`)return i;let t=n.get(String(e));return t?[t]:[]})}function dB(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=mR(t);n=e,r=i}let i=e.enum.map((e,t)=>({label:Array.isArray(n)?n[t]||String(e):n?.[String(e)]||String(e),value:e}));return r&&(i=uB(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Sz(e);if(t){let{optionsSchemaSelector:e=i}=mR(t);i=e}return n&&n.map((e,t)=>{let{title:n}=mR(r?.[t]),a=e,o,s=n;if(i){let e=Q(a,[`properties`,i],{});o=Q(e,`default`,Q(e,`const`)),s=s||e?.title||a.title||String(o)}else o=lB(a),s=s||a.title||String(o);return{schema:a,label:s,value:o}})}var fB=[`string`,`number`,`integer`,`boolean`,`null`],pB;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(pB||={});function mB(e,t=pB.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){let t=e.items[n];if(typeof t!=`boolean`)return t}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!=`boolean`)return e.items;return t!==pB.Ignore&&KL(e.additionalItems)?e.additionalItems:{}}function hB(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&uS(t)&&n===null?null:t}function gB(e,t,n,r,i,a=[],o={},s=!1,c=!1){let{emptyObjectFields:l=`populateAllDefaults`}=o;if(r===!0||s)e[t]=n;else if(r===`excludeObjectChildren`)(c&&n!==void 0||!KL(n)||!uS(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;KL(n)?l===`skipEmptyDefaults`?uS(n)||(e[t]=n):(!uS(n)||a.includes(t))&&(r||l!==`populateRequiredDefaults`)&&(e[t]=n):n!==void 0&&(l===`populateAllDefaults`||l===`skipEmptyDefaults`||r&&a.includes(t))&&(e[t]=n)}}function _B(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:l=void 0,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=KL(i)?i:{},m=KL(t)?t:{},h=r,g=null,_=c,v=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!cB(m))h=m[QL];else if(KL(h)&&KL(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=iB(h,m.default);else if(`default`in m&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[sR];s.includes(e)||(v=s.concat(e),g=xz(e,a));let t=i===void 0||KL(i)&&uS(i);g&&!h&&t&&(h=m.default),d&&g&&!KL(i)&&(p=i)}else if(`dependencies`in m)g=Uz(e,m,a,!1,[],{...xB(e,m,n,h),...p},l)[0];else if(nB(m))h=m.items.map((t,n)=>_B(e,t,{rootSchema:a,includeUndefinedValues:o,_recurseList:s,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,parentDefaults:Array.isArray(r)?r[n]:void 0,rawFormData:p,required:u,shouldMergeDefaultsIntoFormData:d}));else if(`oneOf`in m){let{oneOf:t,...n}=m;if(t.length===0)return;let r=Sz(m),{type:o=`null`}=n;!Array.isArray(o)&&fB.includes(o)&&_?.constAsDefaults===`skipOneOf`&&(_={..._,constAsDefaults:`never`}),g=t[tB(e,a,i??m.default,t,0,r,l)],g=Tz(n,g)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=Sz(m);g=t[tB(e,a,i??m.default,t,0,r,l)],g=Tz(n,g)}if(g)return _B(e,g,{rootSchema:a,includeUndefinedValues:o,_recurseList:v,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let y=xB(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=vB(e,m,a,i,c,l);(!KL(i)||`allOf`in m)&&(y=rB(y,r,n,!0))}return y}function vB(e,t,n,r,i,a){let o=!aB(t)&&oB(e,t,n,a),s=r;return o&&(s=dB(t)?.some(e=>_R(e.value,r))?r:void 0),t.const&&i?.constAsDefaults===`always`&&(s=t.const),s}function yB(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:s=void 0,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=KL(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?Oz(e,p,r,f,s):p,h=m[QL],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=Q(m,[iR,n],{}),g=KL(h)&&h[n]!==void 0,_=(KL(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!cB(p);return gB(t,n,_B(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,m.required,o,_,p?.type===`null`),t},{});if(m.additionalProperties&&!u){let t=KL(m.additionalProperties)?m.additionalProperties:{},n=new Set;KL(d)&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e));let p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),n.forEach(n=>{gB(g,n,_B(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,p)})}return hB(t,g)}}function bB(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:o=void 0,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=t,p=a?.arrayMinItems??{},{populate:m,mergeExtraDefaults:h}=p,g=m===`never`,_=m===`requiredOnly`,v=m===`all`||!g&&!_,y=p?.computeSkipPopulate??(()=>!1),b=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(d)&&(d=d.map((t,c)=>_B(e,mB(f,pB.Fallback,c),{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:t,rawFormData:Array.isArray(n)?n[c]:void 0,required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}))),Array.isArray(n)){let t=mB(f);if(g)d=n;else{let c=n.map((n,c)=>_B(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:Q(d,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));d=rB(d,c,(_&&s||v)&&h)}}if((KL(f)&&`const`in f&&a?.constAsDefaults!==`never`)===!1){if(g)return d??b;if(_&&!s)return d||void 0}let x,S=Array.isArray(d)?d.length:0;if(!f.minItems||sB(e,f,r,o)||y(e,f,r)||f.minItems<=S)x=d||!s&&!c?d:b;else{let t=d||[],n=mB(f,pB.Invert),c=n.default,u=Array.from({length:f.minItems-S},()=>_B(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));x=t.concat(u)}return hB(t,x)}function xB(e,t,n={},r){switch(wz(t)){case`object`:return yB(e,t,n,r);case`array`:return bB(e,t,n,r)}}function SB(e,t,n,r,i=!1,a,o,s){if(!KL(t))throw Error(`Invalid schema: `+t);let c=Oz(e,t,r,n,o),l=_B(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&KL(c.default))return{...l,...n};if(KL(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:e}=a||{};return rB(l,n,!0,e===`useDefaultIfFormDataUndefined`,!0)}return l}function CB(e={}){return`widget`in mR(e)&&mR(e).widget!==`hidden`}function wB(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=Oz(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function TB(e,t,n={},r,i,a){let{label:o=!0}=mR(n,i),s=!!o;if(s){let i=wz(t),o=Q(t,JL,!1);i===`array`&&(s=o||sB(e,t,r,a)||wB(e,t,n,r,a)||CB(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n&&n[`ui:field`]&&(s=!1)}return s}function EB(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=Oz(e,t,r,i,o);if(a.findIndex(e=>_R(e,s))===-1)return EB(e,s,n,r,i,a.concat(s),o)}let s={[nR]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[tB(e,r,i,c,0,Sz(t),o)];s={...s,...EB(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){MS(s,uR,!0);let c=Xh(t.additionalProperties)?t[YL]:{},l=Q(t,iR,{});for(let t of Object.keys(i??{}))t in l||(s[t]=EB(e,c,`${n}.${t}`,r,Q(i,[t]),a,o))}if(`items`in t&&Array.isArray(i)){let{items:c,additionalItems:l}=t;Array.isArray(c)?i.forEach((t,i)=>{c[i]?s[i]=EB(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=EB(e,l,`${n}.${i}`,r,t,a,o):console.warn(`Unable to generate path schema for "${n}.${i}". No schema defined for it`)}):i.forEach((t,i)=>{s[i]=EB(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=Q(t,[iR,c],{});s[c]=EB(e,l,`${n}.${c}`,r,Q(i,[c]),a,o)}return s}function DB(e,t,n=``,r,i,a){return EB(e,t,n,r,i,void 0,a)}function OB(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=kS(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function kB(e,t){let n=(e,t)=>typeof e!=`object`||uS(e)||t&&!uS(e),r=(e,i=[],a=[[]])=>{let o=Object.keys(e);return o.forEach(s=>{let c=e[s];if(typeof c==`object`){let e=a.map(e=>[...e,s]);c.__rjsf_additionalProperties&&c.$name!==``?i.push(c[nR]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=Q(t,e),a=o.length===1;(n(r,a)||Array.isArray(r)&&r.every(e=>n(e,a)))&&i.push(e)})}),i};return r(e)}function AB(e,t,n={},r){return OB(r,kB(DB(e,Oz(e,t,n,r),``,n,r),r).map(e=>Array.isArray(e)?e.join(`.`):e))}var jB=Symbol(`no Value`);function MB(e,t,n,r,i={},a){let o;if(Yx(n,`properties`)){let s={};if(Yx(r,`properties`)){let e=Q(r,iR,{});Object.keys(e).forEach(e=>{Yx(i,e)&&(s[e]=void 0)})}let c=Object.keys(Q(n,iR,{})),l={};c.forEach(o=>{let c=Q(i,o),u=Q(r,[iR,o],{}),d=Q(n,[iR,o],{});Yx(u,`$ref`)&&(u=Oz(e,u,t,c,a)),Yx(d,`$ref`)&&(d=Oz(e,d,t,c,a));let f=Q(u,`type`),p=Q(d,`type`);if(!f||f===p)if(Yx(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=MB(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=Q(d,`default`,jB),t=Q(u,`default`,jB);e!==jB&&e!==c&&(t===c?s[o]=e:Q(d,`readOnly`)===!0&&(s[o]=void 0));let n=Q(d,`const`,jB),r=Q(u,`const`,jB);n!==jB&&n!==c&&(s[o]=r===c?n:void 0)}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(Q(r,`type`)===`array`&&Q(n,`type`)===`array`&&Array.isArray(i)){let s=Q(r,`items`),c=Q(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){Yx(s,`$ref`)&&(s=Oz(e,s,t,i,a)),Yx(c,`$ref`)&&(c=Oz(e,c,t,i,a));let r=Q(s,`type`),l=Q(c,`type`);if(!r||r===l){let r=Q(n,`maxItems`,-1);o=l===`object`?i.reduce((n,i)=>{let o=MB(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]):r>0&&i.length>r?i.slice(0,r):i}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}var NB=class{constructor(e,t,n,r){t&&t.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=vz(t,Q(t,`$id`,`#`)):this.rootSchema=t,this.validator=e,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=r}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,t,n={},r){return!e||!t?!1:this.validator!==e||!_R(this.rootSchema,t)||!_R(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return Qz(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return Jz(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return SB(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return TB(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return tB(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return Dz(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return Xz(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return wB(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return sB(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return oB(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return AB(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return Oz(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return MB(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return DB(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function PB(e,t,n={},r){return new NB(e,t,n,r)}function FB(e){if(e.indexOf(`data:`)===-1)throw Error(`File is invalid: URI must be a dataURI`);let t=e.slice(5).split(`;base64,`);if(t.length!==2)throw Error(`File is invalid: dataURI must be base64`);let[n,r]=t,[i,...a]=n.split(`;`),o=i||``,s=decodeURI(a.map(e=>e.split(`=`)).find(([e])=>e===`name`)?.[1]||`unknown`);try{let e=atob(r),t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return{blob:new window.Blob([new Uint8Array(t)],{type:o}),name:s}}catch(e){throw Error(`File is invalid: `+e.message)}}function IB(e,t){let n=String(e);for(;n.length<t;)n=`0`+n;return n}function LB(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return LB(t,e).reverse();let n=[];for(let r=e;r<=t;r++)n.push({value:r,label:IB(r,2)});return n}function RB(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function zB(e,t){let n=e;if(Array.isArray(t)){let e=n.split(/(%\d)/);t.forEach((t,n)=>{let r=e.findIndex(e=>e===`%${n+1}`);r>=0&&(e[r]=t)}),n=e.join(``)}return n}function BB(e,t){return zB(e,t)}function VB(e,t=[],n){if(Array.isArray(e))return e.map(e=>VB(e,t)).filter(e=>e!==n);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function HB(e,t,n=[]){let r=VB(e,n);return Array.isArray(t)?t.filter(e=>!_R(e,r)):_R(r,t)?void 0:t}function UB(e,t){return Array.isArray(t)?t.some(t=>_R(t,e)):_R(t,e)}function WB(e,t=[],n=!1){let r=t.map((t,n)=>UB(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function GB(e,t,n=[]){let r=VB(e,n);if(!hS(r)){let e=n.findIndex(e=>r===e.value),i=n.map(({value:e})=>e);return t.slice(0,e).concat(r,t.slice(e)).sort((e,t)=>Number(i.indexOf(e)>i.indexOf(t)))}return t}var KB=class{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let t=Array.isArray(e)&&e.length>0||typeof e==`string`?Q(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},ite(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?ox(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=Q(n,eR);return Array.isArray(r)||(r=[],n[eR]=r),Array.isArray(e)?MS(n,eR,[...new Set([...r,...e])]):MS(n,eR,[...new Set([...r,e])]),this}setErrors(e,t){return MS(this.getOrCreateErrorBlock(t),eR,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return MS(this.getOrCreateErrorBlock(e),eR,[]),this}};function qB(e,t){let n=Zv(e),r=Zv(t);if(e===t||!n&&!r)return[];if(n&&!r)return H_(e);if(!n&&r)return H_(t);{let n=H_(DS(e,(e,n)=>!_R(e,Q(t,n)))),r=Hx(H_(t),H_(e));return[...n,...r]}}function JB(e,t,n=[1900,new Date().getFullYear()+2],r=`YMD`){let{day:i,month:a,year:o,hour:s,minute:c,second:l}=e,u={type:`day`,range:[1,31],value:i},d={type:`month`,range:[1,12],value:a},f={type:`year`,range:n,value:o},p=[];switch(r){case`MDY`:p.push(d,u,f);break;case`DMY`:p.push(u,d,f);break;default:p.push(f,d,u)}return t&&p.push({type:`hour`,range:[0,23],value:s},{type:`minute`,range:[0,59],value:c},{type:`second`,range:[0,59],value:l}),p}function YB(e){let t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function XB(e,t,n={},r=!0){let i={type:t||`text`,...YB(e)};return n.inputType?i.type=n.inputType:t||(e.type===`number`?(i.type=`number`,r&&i.step===void 0&&(i.step=`any`)):e.type===`integer`&&(i.type=`number`,i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}var ZB={props:{disabled:!1},submitText:`Submit`,norender:!1};function QB(e={}){let t=mR(e);if(t&&t.submitButtonOptions){let e=t[oR];return{...ZB,...e}}return ZB}function $B(e,t,n={}){let{templates:r}=t;return e===`ButtonTemplates`?r[e]:Object.hasOwn(n,e)&&typeof n[e]==`string`&&Object.hasOwn(r,n[e])?r[n[e]]:n[e]||r[e]}function eV(){if(typeof process>`u`||Q(process,`env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,US(`test-id-`)),e.get(n)}})}var tV=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isForwardRef=function(e){return m(e)===l},e.isMemo=function(e){return m(e)===f}})),nV=u(s(((e,t)=>{t.exports=tV()}))(),1),rV={boolean:{checkbox:`CheckboxWidget`,radio:`RadioWidget`,select:`SelectWidget`,hidden:`HiddenWidget`},string:{text:`TextWidget`,password:`PasswordWidget`,email:`EmailWidget`,hostname:`TextWidget`,ipv4:`TextWidget`,ipv6:`TextWidget`,uri:`URLWidget`,"data-url":`FileWidget`,radio:`RadioWidget`,select:`SelectWidget`,textarea:`TextareaWidget`,hidden:`HiddenWidget`,date:`DateWidget`,datetime:`DateTimeWidget`,"date-time":`DateTimeWidget`,"alt-date":`AltDateWidget`,"alt-datetime":`AltDateTimeWidget`,time:`TimeWidget`,color:`ColorWidget`,file:`FileWidget`},number:{text:`TextWidget`,select:`SelectWidget`,updown:`UpDownWidget`,range:`RangeWidget`,radio:`RadioWidget`,hidden:`HiddenWidget`},integer:{text:`TextWidget`,select:`SelectWidget`,updown:`UpDownWidget`,range:`RangeWidget`,radio:`RadioWidget`,hidden:`HiddenWidget`},array:{select:`SelectWidget`,checkboxes:`CheckboxesWidget`,files:`FileWidget`,hidden:`HiddenWidget`}};function iV(e){let t=Q(e,`MergedWidget`);if(!t){let n=e.defaultProps&&e.defaultProps.options||{};t=({options:t,...r})=>(0,G.jsx)(e,{options:{...n,...t},...r}),MS(e,`MergedWidget`,t)}return t}function aV(e,t,n={}){let r=wz(e);if(typeof t==`function`||t&&nV.isForwardRef((0,b.createElement)(t))||nV.isMemo(t))return iV(t);if(typeof t!=`string`)throw Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){let r=n[t];return aV(e,r,n)}if(typeof r==`string`){if(!(r in rV))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in rV[r]){let i=n[rV[r][t]];return aV(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function oV(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function sV(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function cV(e){return oV(sV(e))}function lV(e){return cV(e)}function uV(e,t,n={}){try{return aV(e,t,n),!0}catch(e){let t=e;if(t.message&&(t.message.startsWith(`No widget`)||t.message.startsWith(`Unsupported widget`)))return!1;throw e}}function dV(e,t){return`${Zx(e)?e:e.$id}__${t}`}function fV(e){return dV(e,`description`)}function pV(e){return dV(e,`error`)}function mV(e){return dV(e,`examples`)}function hV(e){return dV(e,`help`)}function gV(e){return dV(e,`title`)}function _V(e,t=!1){let n=t?` ${mV(e)}`:``;return`${pV(e)} ${fV(e)} ${hV(e)}${n}`}function vV(e,t){return`${e}-${t}`}function yV(e,t){return dV(e,t)}function bV(e,t){return dV(e,`optional${t}`)}function xV(e){return!hS(e)&&(!Xh(e)||Array.isArray(e)||!uS(e))}function SV(e,t){let{rootSchema:n,schemaUtils:r}=e;return dS(t,n)?!0:`$ref`in n?dS(t,wS(r.retrieveSchema(n),cR)):!1}function CV(e,t,n){return t?n:e}function wV(e){return e?new Date(e).toJSON():void 0}function TV(e,t,n){let r=[Wne];return Yx(e,`formContext`)&&r.unshift(Une),Q(e,[...r,t],n)}function EV(e,t){if(!Array.isArray(t))return e;let n=e=>e.reduce((e,t)=>(e[t]=!0,e),{}),r=e=>e.length>1?`properties '${e.join(`', '`)}'`:`property '${e[0]}'`,i=n(e),a=t.filter(e=>e===`*`||i[e]),o=n(a),s=e.filter(e=>!o[e]),c=a.indexOf(`*`);if(c===-1){if(s.length)throw Error(`uiSchema order list does not contain ${r(s)}`);return a}if(c!==a.lastIndexOf(`*`))throw Error(`uiSchema order list contains more than one wildcard item`);let l=[...a];return l.splice(c,1,...s),l}function DV(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};let n=new Date(e);if(Number.isNaN(n.getTime()))throw Error(`Unable to parse date `+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}var OV=[tR,YL],kV=[rR,ZL,XL];function AV(e,t,n,r=new Set){let{rootSchema:i,uiSchemaDefinitions:a}=n,o={...t},s=e,c=e[sR],l=c&&r.has(c);if(c){if(r.add(c),a&&c in a&&(o=iB(a[c],o)),l)return o;try{s=xz(c,i)}catch{s=e}}let u=s[iR];if(u&&KL(u))for(let[e,t]of Object.entries(u)){let i=AV(t,o[e]||{},n,new Set(r));Object.keys(i).length>0&&(o[e]=i)}for(let e of OV){let t=s[e];if(t&&KL(t)&&!Array.isArray(t)){let i=o[e];if(typeof i!=`function`){let a=AV(t,i||{},n,new Set(r));Object.keys(a).length>0&&(o[e]=a)}}}for(let e of kV){let t=s[e];if(Array.isArray(t)&&t.length>0){let i=o[e],a=Array.isArray(i)?[...i]:[],s=!1;for(let e=0;e<t.length;e++){let i=t[e],o=AV(i,a[e]||{},n,new Set(r));Object.keys(o).length>0&&(a[e]=o,s=!0)}s&&(o[e]=a)}}return o}function jV(e,t,n){let r=e.__rjsf_ref??e[sR],i=r?n.uiSchemaDefinitions?.[r]:void 0;return i?!t||Object.keys(t).length===0?{...i}:iB(i,t):t||{}}function MV(e){return e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0?!0:e.anyOf&&e.anyOf.length===1?MV(e.anyOf[0]):e.oneOf&&e.oneOf.length===1?MV(e.oneOf[0]):e.allOf?e.allOf.some(e=>MV(e)):!1}function NV(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!RB(r,t)||!RB(i,n)}let{props:i,state:a}=e;return!_R(i,t)||!_R(a,n)}function PV(e){let t=VS(e.map(e=>Xh(e)?wz(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function FV(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=mR(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?PV(t[ZL]):`oneOf`in t&&Array.isArray(t.oneOf)?PV(t[rR]):wz(t),!SV(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function IV(e,t=!0){let{year:n,month:r,day:i,hour:a=0,minute:o=0,second:s=0}=e,c=Date.UTC(n,r-1,i,a,o,s),l=new Date(c).toJSON();return t?l:l.slice(0,10)}function LV(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[eR].map(e=>{let n=`.${t.join(`.`)}`;return{property:n,message:e,stack:`${n} ${e}`}}))),Object.keys(e).reduce((n,r)=>{if(r!==`__errors`){let i=e[r];Zv(i)&&(n=n.concat(LV(i,[...t,r])))}return n},n)}function RV(e){let t=new KB;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:FS(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function zV(e,t,n,r){let i=Array.isArray(n)?n:n?.path,a=e===``?[]:[e],o=i?i.concat(...a):a,s=[t.idPrefix,...o].join(t.idSeparator),c;return t.nameGenerator&&o.length>0&&(c=t.nameGenerator(o,t.idPrefix,r)),{path:o,$id:s,...c!==void 0&&{name:c}}}function BV(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;{let r=e[n];return Zv(r)?{...t,[n]:BV(r)}:{...t,[n]:r}}},{})}function VV(e){return Object.values(e).every(e=>e!==-1)}function HV(e){let{className:t=`form-control`,type:n,range:r,value:i,select:a,rootId:o,name:s,disabled:c,readonly:l,autofocus:u,registry:d,onBlur:f,onFocus:p}=e,m=`${o}_${n}`,{SelectWidget:h}=d.widgets,g=(0,b.useCallback)(e=>a(n,e),[a,n]);return(0,G.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:LB(r[0],r[1])},placeholder:n,value:i,disabled:c,readonly:l,autofocus:u,onChange:g,onBlur:f,onFocus:p,registry:d,label:``,"aria-describedby":_V(o)})}function UV(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(DV(o,t));(0,b.useEffect)(()=>{c(DV(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};VV(r)?a(IV(r,t)):c(r)},[s,a,t]),u=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(void 0)},[n,r,a]),d=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(IV(DV(new Date().toJSON(),t),t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>JB(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function WV(e){let t=(0,b.useRef)(e);return dS(e,t.current)||(t.current=e),t.current}function GV(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}function KV(e){let{name:t,size:n,type:r}=e;return new Promise((i,a)=>{let o=new window.FileReader;o.onerror=a,o.onload=e=>{typeof e.target?.result==`string`?i({dataURL:GV(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function qV(e){return Promise.all(Array.from(e).map(KV))}function JV(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=FB(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function YV(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>JV(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(e=>{qV(e).then(e=>{let i=e.map(e=>e.dataURL||null);t(n?r.concat(...i):i[0])})},[r,n,t]),handleRemove:(0,b.useCallback)(e=>{t(n?r.filter((t,n)=>n!==e):void 0)},[r,n,t])}}function XV(e){if(!e)return``;let t=new Date(e);return`${IB(t.getFullYear(),4)}-${IB(t.getMonth()+1,2)}-${IB(t.getDate(),2)}T${IB(t.getHours(),2)}:${IB(t.getMinutes(),2)}:${IB(t.getSeconds(),2)}.${IB(t.getMilliseconds(),3)}`}function ZV(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=LV(t),o=t;return uS(i)||(o=iB(i,t,n?`preventDuplicates`:!0),a=[...r].concat(a)),{errorSchema:o,errors:a}}function QV(e){for(let t in e){let n=e,r=n[t];t===`$ref`&&typeof r==`string`&&r.startsWith(`#`)?n[t]=dR+r:n[t]=eH(r)}return e}function $V(e){for(let t=0;t<e.length;t++)e[t]=eH(e[t]);return e}function eH(e){return Array.isArray(e)?$V([...e]):Xh(e)?QV({...e}):e}var tH;(function(e){e.ArrayItemTitle=`Item`,e.MissingItems=`Missing items definition`,e.EmptyArray=`No items yet. Use the button below to add some.`,e.YesLabel=`Yes`,e.NoLabel=`No`,e.CloseLabel=`Close`,e.ErrorsLabel=`Errors`,e.NewStringDefault=`New Value`,e.AddButton=`Add`,e.AddItemButton=`Add Item`,e.CopyButton=`Copy`,e.MoveDownButton=`Move down`,e.MoveUpButton=`Move up`,e.RemoveButton=`Remove`,e.NowLabel=`Now`,e.ClearLabel=`Clear`,e.AriaDateLabel=`Select a date`,e.PreviewLabel=`Preview`,e.DecrementAriaLabel=`Decrease value by 1`,e.IncrementAriaLabel=`Increase value by 1`,e.OptionalObjectAdd=`Add data for optional field`,e.OptionalObjectRemove=`Remove data for optional field`,e.OptionalObjectEmptyMsg=`No data for optional field`,e.Type=`Type`,e.Value=`Value`,e.ClearButton=`clear input`,e.UnknownFieldType=`Unknown field type %1`,e.OptionPrefix=`Option %1`,e.TitleOptionPrefix=`%1 option %2`,e.KeyLabel=`%1 Key`,e.InvalidObjectField=`Invalid "%1" object field configuration: _%2_.`,e.UnsupportedField=`Unsupported field schema.`,e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason=`Unsupported field schema: _%1_.`,e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo=`**%1** (%2, %3 bytes)`})(tH||={});function nH(){return US(`rjsf-array-item-`)}function rH(e){return Array.isArray(e)?e.map(e=>({key:nH(),item:e})):[]}function iH(e){return Array.isArray(e)?e.map(e=>e.item):[]}function aH(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function oH(e,t,n,r){let{addable:i}=mR(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0?!0:n.length<t.maxItems),i}function sH(e,t,n,r){if(typeof e.items==`function`)try{return e.items(t,n,r)}catch(e){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,e);return}else return e.items}function cH(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:nB(t)&&zne(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function lH(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,placeholder:l,onBlur:u,onFocus:d,registry:f,rawErrors:p,name:m,onSelectChange:h}=e,{widgets:g,schemaUtils:_,globalFormOptions:v,globalUiOptions:y}=f,b=dB(_.retrieveSchema(t.items,i),r?.items??{}),{widget:x=`select`,title:S,...C}=mR(r,y),w=aV(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=WV(zV(``,v,n,!0));return(0,G.jsx)(w,{id:D.$id,name:m,multiple:!0,onChange:h,onBlur:u,onFocus:d,options:{...C,enumOptions:b},schema:t,uiSchema:r,registry:f,value:i,disabled:a,readonly:o,required:c,label:T,hideLabel:!E,placeholder:l,autofocus:s,rawErrors:p,htmlName:D.name})}function uH(e){let{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:a=!1,autofocus:o=!1,required:s=!1,hideError:c,placeholder:l,onBlur:u,onFocus:d,formData:f=[],registry:p,rawErrors:m,name:h,onSelectChange:g}=e,{widgets:_,schemaUtils:v,globalFormOptions:y,globalUiOptions:b}=p,{widget:x,title:S,...C}=mR(r,b),w=aV(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=WV(zV(``,y,n,!0));return(0,G.jsx)(w,{id:D.$id,name:h,multiple:!0,onChange:g,onBlur:u,onFocus:d,options:C,schema:t,uiSchema:r,registry:p,value:f,disabled:i,readonly:a,hideError:c,required:s,label:T,hideLabel:!E,placeholder:l,autofocus:o,rawErrors:m,htmlName:D.name})}function dH(e){let{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,onBlur:l,onFocus:u,registry:d,formData:f=[],rawErrors:p,onSelectChange:m}=e,{widgets:h,schemaUtils:g,globalFormOptions:_,globalUiOptions:v}=d,{widget:y=`files`,title:b,...x}=mR(n,v),S=aV(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=WV(zV(``,_,r,!0));return(0,G.jsx)(S,{options:x,id:T.$id,name:i,multiple:!0,onChange:m,onBlur:l,onFocus:u,schema:t,uiSchema:n,value:f,disabled:a,readonly:o,required:c,registry:d,autofocus:s,rawErrors:p,label:C,hideLabel:!w,htmlName:T.name})}function fH(e){let{itemKey:t,index:n,name:r,disabled:i,hideError:a,readonly:o,registry:s,uiOptions:c,parentUiSchema:l,canAdd:u,canRemove:d=!0,canMoveUp:f,canMoveDown:p,itemSchema:m,itemData:h,itemUiSchema:g,itemFieldPathId:_,itemErrorSchema:v,autofocus:y,onBlur:x,onFocus:S,onChange:C,rawErrors:w,totalItems:T,title:E,handleAddItem:D,handleCopyItem:O,handleRemoveItem:k,handleReorderItems:A}=e,{schemaUtils:j,fields:{ArraySchemaField:M,SchemaField:N},globalUiOptions:P}=s,F=WV(_),I=M||N,L=$B(`ArrayFieldItemTemplate`,s,c),R=j.getDisplayLabel(m,g,P),{description:z}=mR(g),B=!!z||!!m.description,{orderable:V=!0,removable:H=!0,copyable:U=!1}=c,ee={moveUp:V&&f,moveDown:V&&p,copy:U&&u,remove:H&&d,toolbar:!1};ee.toolbar=Object.keys(ee).some(e=>ee[e]);let W=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),te=(0,b.useCallback)(e=>{O(e,n)},[O,n]),ne=(0,b.useCallback)(e=>{k(e,n)},[k,n]),re=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),ie=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,G.jsx)(L,{children:(0,G.jsx)(I,{name:r,title:E,index:n,schema:m,uiSchema:g,formData:h,errorSchema:v,fieldPathId:F,required:aH(m),onChange:C,onBlur:x,onFocus:S,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:w}),buttonsProps:{fieldPathId:F,disabled:i,readonly:o,canAdd:u,hasCopy:ee.copy,hasMoveUp:ee.moveUp,hasMoveDown:ee.moveDown,hasRemove:ee.remove,index:n,totalItems:T,onAddItem:W,onCopyItem:te,onRemoveItem:ne,onMoveUpItem:re,onMoveDownItem:ie,registry:s,schema:m,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:ee.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:m,uiSchema:g,parentUiSchema:l,displayLabel:R,hasDescription:B})}function pH(e){let{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,onChange:_,keyedFormData:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,C=t.title||s||o,{schemaUtils:w,fields:T,formContext:E,globalFormOptions:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=T,A=mR(n,O),j=Xh(t.items)?t.items:{},M=w.retrieveSchema(j),N=iH(v),P=FV(p,t,d,n),F=xV(a),I=oH(p,t,N,n)&&(!P||F),L=F?v:[],R=P?` rjsf-optional-array-field`:``,z=e.childFieldPathId??i,B=P?(0,G.jsx)(k,{...e,fieldPathId:z}):void 0,V={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,T=w.retrieveSchema(j,s),O=r?r[t]:void 0,k=zV(t,D,z),M=sH(n,a,t,E);return(0,G.jsx)(fH,{itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:A,hideError:f,readonly:l,disabled:c,required:d,title:C?`${C}-${t+1}`:void 0,canAdd:I,canMoveUp:t>0,canMoveDown:t<N.length-1,itemSchema:T,itemFieldPathId:k,itemErrorSchema:O,itemData:s,itemUiSchema:M,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S,onChange:_},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${M.type}${R}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:C,formData:N,rawErrors:g,registry:p,optionalDataControl:B};return(0,G.jsx)($B(`ArrayFieldTemplate`,p,A),{...V})}function mH(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,keyedFormData:_,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,{formData:C=[]}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalFormOptions:O,globalUiOptions:k}=p,A=mR(n,k),{OptionalDataControlsField:j}=E,M=FV(p,t,d,n),N=xV(r),P=(Xh(t.items)?t.items:[]).map((e,t)=>T.retrieveSchema(e,C[t])),F=Xh(t.additionalItems)?T.retrieveSchema(t.additionalItems,r):null,I=e.childFieldPathId??a;C.length<P.length&&(C=C.concat(Array(P.length-C.length)));let L=N?_:[],R=M?` rjsf-optional-array-field`:``,z=M?(0,G.jsx)(j,{...e,fieldPathId:I}):void 0,B=oH(p,t,C,n)&&!!F&&(!M||N),V={canAdd:B,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${R}`,disabled:c,fieldPathId:a,formData:r,items:L.map((e,r)=>{let{key:a,item:s}=e,E=s,k=r>=P.length,j=(k&&Xh(t.additionalItems)?T.retrieveSchema(t.additionalItems,E):P[r])||{},M=zV(r,O,I),N;N=k?n.additionalItems:Array.isArray(n.items)?n.items[r]:sH(n,s,r,D);let F=i?i[r]:void 0;return(0,G.jsx)(fH,{index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:A,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${r+1}`:void 0,canAdd:B,canRemove:k,canMoveUp:r>=P.length+1,canMoveDown:k&&r<C.length-1,itemSchema:j,itemData:E,itemUiSchema:N,itemFieldPathId:M,itemErrorSchema:F,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:w,errorSchema:i,rawErrors:g,optionalDataControl:z};return(0,G.jsx)($B(`ArrayFieldTemplate`,p,A),{...V})}function hH(e=[]){let t=(0,b.useMemo)(()=>cV(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:rH(e)})),{keyedFormData:i,formDataHash:a}=n;if(t!==a){let n=Array.isArray(e)?e:[],o=i||[];i=n.length===o.length?o.map((e,t)=>({key:e.key,item:n[t]})):rH(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=iH(e);return r({formDataHash:cV(t),keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function gH(e){let{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:a,formData:o,onChange:s}=e,{globalFormOptions:c,schemaUtils:l,translateString:u}=a,{keyedFormData:d,updateKeyedFormData:f}=hH(o),p=e.childFieldPathId??i,m=(0,b.useCallback)((e,n)=>{e&&e.preventDefault();let i;if(r){i={};for(let e in r){let t=parseInt(e);n===void 0||t<n?MS(i,[t],r[e]):t>=n&&MS(i,[t+1],r[e])}}let o={key:nH(),item:cH(a,t)},c=[...d];n===void 0?c.push(o):c.splice(n,0,o),s(f(c),p.path,i)},[d,a,t,s,f,r,p]),h=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<=t?MS(n,[i],r[e]):i>t&&MS(n,[i+1],r[e])}}let i={key:nH(),item:ox(d[t].item)},a=[...d];t===void 0?a.push(i):a.splice(t+1,0,i),s(f(a),p.path,n)},[d,s,f,r,p]),g=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<t?MS(n,[i],r[e]):i>t&&MS(n,[i-1],r[e])}}s(f(d.filter((e,n)=>n!==t)),p.path,n)},[d,s,f,r,p]),_=(0,b.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let i;if(r){i={};for(let e in r){let a=parseInt(e);a==t?MS(i,[n],r[t]):a==n?MS(i,[t],r[n]):MS(i,[e],r[a])}}function a(){let e=d.slice();return e.splice(t,1),e.splice(n,0,d[t]),e}s(f(a()),p.path,i)},[d,s,f,r,p]),v=(0,b.useCallback)((e,t,n,r)=>{s(e===void 0?null:e,t,n,r)},[s]),y=(0,b.useCallback)(e=>{s(e,p.path,void 0,p?.$id)},[s,p]),x={...e,formData:o,fieldPathId:p,onSelectChange:y},S={...e,handleAddItem:m,handleCopyItem:h,handleRemoveItem:g,handleReorderItems:_,keyedFormData:d,onChange:v};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,G.jsx)($B(`UnsupportedFieldTemplate`,a,mR(n)),{schema:t,fieldPathId:i,reason:u(tH.MissingItems),registry:a});let e={...t,[tR]:{type:void 0}};x.schema=e,S.schema=e}return l.isMultiSelect(x.schema)?(0,G.jsx)(lH,{...x}):CB(n)?(0,G.jsx)(uH,{...x}):nB(x.schema)?(0,G.jsx)(mH,{...S}):l.isFilesArray(x.schema,n)?(0,G.jsx)(dH,{...x}):(0,G.jsx)(pH,{...S})}function _H(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,registry:o,required:s,disabled:c,readonly:l,hideError:u,autofocus:d,title:f,onChange:p,onFocus:m,onBlur:h,rawErrors:g}=e,{title:_}=t,{widgets:v,translateString:y,globalUiOptions:x}=o,{widget:S=`checkbox`,title:C,label:w=!0,enumNames:T,...E}=mR(r,x),D=aV(t,S,v),O=y(tH.YesLabel),k=y(tH.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=dB({oneOf:t.oneOf.map(e=>{if(Xh(e))return{...e,title:e.title||(e.const===!0?O:k)}}).filter(e=>e)},r);else{let e=t.enum??[!0,!1];A=!T&&e.length===2&&e.every(e=>typeof e==`boolean`)?[{value:e[0],label:e[0]?O:k},{value:e[1],label:e[1]?O:k}]:dB({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,G.jsx)(D,{options:{...E,enumOptions:A},schema:t,uiSchema:r,id:i.$id,name:n,onChange:M,onFocus:m,onBlur:h,label:j,hideLabel:!w,value:a,required:s,disabled:c,readonly:l,hideError:u,registry:o,autofocus:d,rawErrors:g,htmlName:i.name})}function vH(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function yH(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function bH(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function xH(e){let{id:t,formData:n,displayLabel:r=!0,schema:i,name:a,uiSchema:o,required:s,disabled:c=!1,readonly:l=!1,onBlur:u,onFocus:d,registry:f,fieldPathId:p,onChange:m,errorSchema:h}=e,{translateString:g,fields:_,globalFormOptions:v}=f,[y,x]=(0,b.useState)(yH(n)),S=mR(o),C=WV(zV(`__internal_type_selector`,v,p)),w=g(tH.Type),T=(0,b.useMemo)(()=>vH(w),[w]),E=e=>{e!=null&&(x(e),m(bH(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(tH.UnknownFieldType,[String(i.type)])}=e;return(0,G.jsx)($B(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=$B(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,G.jsx)(D,{schema:i,registry:f,typeSelector:(0,G.jsx)(O,{fieldPathId:C,name:`${a}__fallback_type`,schema:T,formData:y,onChange:E,onBlur:u,onFocus:d,registry:f,hideLabel:!r,disabled:c,readonly:l,required:s},n?cV(n):`__empty__`),schemaField:(0,G.jsx)(O,{...e,schema:{type:y,title:g(tH.Value),...y===`object`&&{additionalProperties:!0}}})})}var SH;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(SH||={});var CH;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(CH||={});var wH=/^\$lookup=(.+)/,TH=`layoutGrid`;`${TH}`;function EH(e,t){return e??t}function DH(e){return/^\d+?$/.test(e)}var OH=eV();function kH(e,t,n,r,i){let a=Q(n,[pR],{}),o=Q(n,e),s={...Q(o,[fR],{}),...t,...a},c={...o};uS(s)||MS(c,[fR],s),uS(a)||MS(c,[pR],a);let{readonly:l}=mR(c);return(i===!0||gS(l)&&r===!0)&&(l=!0,Yx(s,`readonly`)?MS(c,[fR,aR],!0):MS(c,`ui:${aR}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function AH(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=Hv([t]).sort(),i=Hv([n]).sort();switch(e){case CH.ALL:return dS(r,i);case CH.SOME:return aS(r,i).length>0;case CH.NONE:return aS(r,i).length===0;default:return!1}}function jH(e,t,n){let r={},i=e[t];if(Zv(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>TV(n,e,e)).join(` `);r={...a,className:e}}else r=a}if(!Array.isArray(i))throw TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function MH(e,t,n){let r;if(DH(n)&&e&&e?.type===`array`&&Yx(e,`items`)){let i=Number(n),a=e[tR];r=Array.isArray(a)?i>a.length?Ux(a):a[i]:a,t={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function NH(e,t,n,r,i){let{schemaUtils:a,globalFormOptions:o}=e,s=n,c=i,l=t.split(`.`),u=l.pop(),d=a.retrieveSchema(s,r),f=r,p=d.readOnly;l.forEach(e=>{if(c=zV(e,o,c),Yx(d,`properties`))s=Q(d,[iR,e],{});else if(d&&(Yx(d,`oneOf`)||Yx(d,`anyOf`))){let t=Yx(d,`oneOf`)?rR:ZL;s=Q(a.findSelectedOptionInXxxOf(d,e,t,f),[iR,e],{})}else{let t=MH(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=Q(f,e,{}),d=a.retrieveSchema(s,f),p=EH(d.readOnly,p)});let m,h=!1;if(uS(d)&&(d=void 0),d&&u){if(d&&(Yx(d,`oneOf`)||Yx(d,`anyOf`))){let e=Yx(d,`oneOf`)?rR:ZL;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=zV(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&tS(d.required,u);let e=MH(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=Q(d,[iR,u]),d&&=a.retrieveSchema(d)),p=EH(d?.readOnly,p),d&&(Yx(d,`oneOf`)||Yx(d,`anyOf`))){let e=Yx(d,`oneOf`)?rR:ZL,t=Sz(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function PH(e,t){let n=e;return Zx(n)&&(n=TV(t,n)),ug(n)?n:null}function FH(e,t){let n,r=null,i={},a;if(Zx(t)||gS(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,uS(i)||Gx(i,(t,n)=>{if(Zx(t)){let r=wH.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=TV(e,t,t)}}}),r=PH(s,e),!o&&r&&(a=(0,G.jsx)(r,{...c,"data-testid":OH.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function IH(e){let{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:a}=n,{schemaUtils:o}=r,s=o.retrieveSchema(i,a);return t.map(e=>(0,b.createElement)(HH,{...n,key:`layoutGrid-${cV(e)}`,schema:s,layoutGridSchema:e}))}function LH(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=jH(t,SH.CONDITION,i),{operator:s,field:c=``,value:l}=o;return AH(s,Q(r,c,null),l)?(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:a}):null}function RH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=jH(t,SH.COLUMN,r);return(0,G.jsx)($B(`GridTemplate`,r,mR(i)),{column:!0,"data-testid":OH.col,...o,children:(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:a})})}function zH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=jH(t,SH.COLUMNS,r),s=$B(`GridTemplate`,r,mR(i));return a.map(e=>(0,G.jsx)(s,{column:!0,"data-testid":OH.col,...o,children:(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:[e]})},`column-${cV(e)}`))}function BH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=jH(t,SH.ROW,r);return(0,G.jsx)($B(`GridTemplate`,r,mR(i)),{...o,"data-testid":OH.row,children:(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:a})})}function VH(e){let{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:a,onBlur:o,onFocus:s,formData:c,readonly:l,registry:u,layoutGridSchema:d,...f}=e,{onChange:p}=f,{fields:m}=u,{SchemaField:h,LayoutMultiSchemaField:g}=m,_=FH(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=NH(u,v,n,c,a),E=WV(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=kH(v,b,r,C,l);return(0,G.jsx)(e,{"data-testid":w?.hasDiscriminator?OH.layoutMultiSchemaField:OH.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:Q(i,v),fieldPathId:E,formData:Q(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,G.jsx)(y,{"data-testid":OH.uiComponent,...f,name:v,required:S,formData:c,readOnly:!!C||l,errorSchema:i,uiSchema:r,schema:n,fieldPathId:a,onBlur:o,onFocus:s,registry:u,...b}):null}function HH(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=mR(t);if(!n&&`layoutGrid`in r&&Xh(r.layoutGrid)&&(n=r[TH]),Xh(n)){if(SH.ROW in n)return(0,G.jsx)(BH,{...e,layoutGridSchema:n});if(SH.COLUMN in n)return(0,G.jsx)(RH,{...e,layoutGridSchema:n});if(SH.COLUMNS in n)return(0,G.jsx)(zH,{...e,layoutGridSchema:n});if(SH.CONDITION in n)return(0,G.jsx)(LH,{...e,layoutGridSchema:n})}return(0,G.jsx)(VH,{...e,gridSchema:n})}HH.TEST_IDS=OH;function UH(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=mR(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,G.jsx)($B(`TitleFieldTemplate`,o,c),{id:gV(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function WH(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=Q(e,[iR,t]);return Q(r,$L,Q(r,QL,`!@#!@$@#$!@$#`))===n})}function GH(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;Yx(e,`oneOf`)?o={...e,[rR]:a}:Yx(e,`anyOf`)&&(o={...e,[ZL]:a});let s=dB(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function KH(e){let{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:a,onBlur:o,onChange:s,options:c,onFocus:l,registry:u,uiSchema:d,schema:f,autofocus:p,readonly:m,required:h,errorSchema:g,hideError:_=!1}=e,{widgets:v,schemaUtils:y,globalUiOptions:x}=u,[S,C]=(0,b.useState)(GH(f,c,y,d,i)),w=Q(a,`$id`),T=Sz(f),E=$B(`FieldErrorTemplate`,u,c),D=$B(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(GH(f,c,y,d,i))},[cV(f),cV(c),y,d?cV(d):``,i?cV(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=mR(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=Q(i,j),F=Q(S[0]?.schema,[iR,j],{}),I=WH(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=aV(F,O,v),R=M===void 0?_:!!M,z=Q(g,[eR],[]),B=wS(g,[eR]),V=y.getDisplayLabel(f,d,x),H=e=>{let t=WH(S,j,e),n=WH(S,j,P),r=y.sanitizeDataForNewSchema(t,n,i);r&&t&&(r=y.getDefaultFormState(t,r,`excludeObjectChildren`)),r&&MS(r,j,e),s(r,a.path,void 0,w)},U={enumOptions:S,...N},ee=!R&&z.length>0?(0,G.jsx)(E,{fieldPathId:a,schema:f,errors:z,registry:u}):void 0;return(0,G.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&uS(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:V,errors:ee,onChange:s,onKeyRename:Sg,onKeyRenameBlur:Sg,onRemoveProperty:Sg,children:(0,G.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&uS(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:z,hideError:R,hideLabel:!V,errorSchema:B,placeholder:A,onChange:H,onBlur:o,onFocus:l,value:P,options:U,htmlName:a.name})})}var qH=class extends b.Component{constructor(e){super(e);let{formData:t,options:n,registry:{schemaUtils:r}}=this.props,i=n.map(e=>r.retrieveSchema(e,t));this.state={retrievedOptions:i,selectedOption:this.getMatchingOption(0,t,i)}}componentDidUpdate(e,t){let{formData:n,options:r,fieldPathId:i}=this.props,{selectedOption:a}=this.state,o=this.state;if(!_R(e.options,r)){let{registry:{schemaUtils:e}}=this.props;o={selectedOption:a,retrievedOptions:r.map(t=>e.retrieveSchema(t,n))}}if(!_R(n,e.formData)&&i.$id===e.fieldPathId.$id){let{retrievedOptions:e}=o,r=this.getMatchingOption(a,n,e);t&&r!==a&&(o={selectedOption:r,retrievedOptions:e})}o!==this.state&&this.setState(o)}getMatchingOption(e,t,n){let{schema:r,registry:{schemaUtils:i}}=this.props,a=Sz(r);return i.getClosestMatchingOption(t,n,e,a)}onOptionChange=e=>{let{selectedOption:t,retrievedOptions:n}=this.state,{formData:r,onChange:i,registry:a,fieldPathId:o}=this.props,{schemaUtils:s}=a,c=e===void 0?-1:parseInt(e,10);if(c===t)return;let l=c>=0?n[c]:void 0,u=t>=0?n[t]:void 0,d=s.sanitizeDataForNewSchema(l,u,r);l&&(d=s.getDefaultFormState(l,d,`excludeObjectChildren`)),this.setState({selectedOption:c},()=>{i(d,o.path,void 0,this.getFieldId())})};getFieldId(){let{fieldPathId:e,schema:t}=this.props;return`${e.$id}${t.oneOf?`__oneof_select`:`__anyof_select`}`}render(){let{name:e,disabled:t=!1,errorSchema:n={},formData:r,onBlur:i,onFocus:a,readonly:o,required:s=!1,registry:c,schema:l,uiSchema:u}=this.props,{widgets:d,fields:f,translateString:p,globalUiOptions:m,schemaUtils:h}=c,{SchemaField:g}=f,_=$B(`MultiSchemaFieldTemplate`,c,m),v=FV(c,l,s,u),y=xV(r),{selectedOption:b,retrievedOptions:x}=this.state,{widget:S=`select`,placeholder:C,autofocus:w,autocomplete:T,title:E=l.title,...D}=mR(u,m),O=aV({type:`number`},S,d),k=Q(n,eR,[]),A=wS(n,[eR]),j=h.getDisplayLabel(l,u,m),M=b>=0&&x[b]||null,N;if(M){let{required:e}=l;N=e?Tz({required:e},M):M}let P=[];`oneOf`in l&&u&&`oneOf`in u?Array.isArray(u.oneOf)?P=u[rR]:console.warn(`uiSchema.oneOf is not an array for "${E||e}"`):`anyOf`in l&&u&&`anyOf`in u&&(Array.isArray(u.anyOf)?P=u[ZL]:console.warn(`uiSchema.anyOf is not an array for "${E||e}"`));let F=u;b>=0&&P.length>b&&(F=P[b]);let I=E?tH.TitleOptionPrefix:tH.OptionPrefix,L=E?[E]:[],R=x.map((e,t)=>{let{title:n=e.title}=mR(P[t]);return{label:n||p(I,L.concat(String(t+1))),value:t}});return(0,G.jsx)(_,{schema:l,registry:c,uiSchema:u,selector:!v||y?(0,G.jsx)(O,{id:this.getFieldId(),name:`${e}${l.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:this.onOptionChange,onBlur:i,onFocus:a,disabled:t||uS(R),multiple:!1,rawErrors:k,errorSchema:A,value:b>=0?b:void 0,options:{enumOptions:R,...D},registry:c,placeholder:C,autocomplete:T,autofocus:w,label:E??e,hideLabel:!j,readonly:o}):void 0,optionSchemaField:N&&N.type!==`null`&&(0,G.jsx)(g,{...this.props,schema:N,uiSchema:F})||null})}},JH=/\.([0-9]*0)*$/,YH=/[0.]0*$/;function XH(e){let{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=(0,b.useState)(i),{StringField:s}=t.fields,c=r,l=(0,b.useCallback)((e,t,r,i)=>{o(e),`${e}`.charAt(0)===`.`&&(e=`0${e}`),n(typeof e==`string`&&e.match(JH)?qL(e.replace(YH,``)):qL(e),t,r,i)},[n]);if(typeof a==`string`&&typeof c==`number`){let e=RegExp(`^(${String(c).replace(`.`,`\\.`)})?\\.?0*$`);a.match(e)&&(c=a)}return(0,G.jsx)(s,{...e,formData:c,onChange:l})}function ZH(){return ZH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZH.apply(null,arguments)}var QH=[`strong`,`em`,`del`,`mark`],$H=[[`**`,QH[0]],[`__`,QH[0]],[`~~`,QH[2]],[`==`,QH[3]],[`*`,`em`],[`_`,`em`]];function eU(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]===`\\`?r+=2:(e[r]===`[`&&n++,e[r]===`]`&&n--,r++);if(n===0&&r<e.length&&(e[r]===`(`||e[r]===`[`)){var i=e[r]===`(`?`)`:`]`,a=1;for(r++;r<e.length&&a>0;)e[r]===`\\`?r+=2:(e[r]===`(`&&i===`)`&&a++,e[r]===i&&a--,r++);if(a===0)return r}return-1}function tU(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!==`*`&&n!==`_`&&n!==`~`&&n!==`=`)return null;for(var r=``,i=0,a=``,o=0;o<6;o++){var s=$H[o][0];if(e.startsWith(s)&&e.length>=2*s.length){r=s,i=s.length,a=$H[o][1];break}}if(!r)return null;for(var c=i,l=!1,u=!1,d=``,f=0,p=``,m=!1,h=``;c<e.length;){var g=e[c];if(m)p+=g,m=!1,h=g,c++;else if(g!==`\\`)if(g!=="`"||f!==0){if(g===`[`&&!l&&f===0){var _=eU(e,c);if(_!==-1){p+=e.slice(c,_),c=_,h=e[_-1];continue}}if(u)p+=g,d?g===d&&(d=``):g===`"`||g===`'`?d=g:g===`>`&&(u=!1),h=g,c++;else if(g!==`<`||l){if(g===`
|
|
62
|
+
`,e);let{allOf:t,...n}=c;return n}}return`properties`in c&&`patternProperties`in c&&(c=Object.keys(c.properties).reduce((t,i)=>{let a=jz(t,i);return uS(a)||(t.properties[i]=Oz(e,{allOf:[t.properties[i],...Object.values(a)]},n,Q(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?Fz(e,c,n,r,o):c}):[{}]}function Hz(e,t,n,r,i){let a,{oneOf:o,anyOf:s,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(s)&&(a=s),a){let o=i===void 0&&r?{}:i,s=Sz(t);a=a.map(e=>Pz(e,n,[]));let l=Dz(e,o,a,n,s);if(r)return a.map(e=>Tz(c,e));t=Tz(c,a[l])}return[t]}function Uz(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return Hz(e,c,n,r,a).flatMap(t=>Wz(e,s,t,n,r,i,a,o))}function Wz(e,t,n,r,i,a,o,s){let c=[n];for(let l in t){if(!i&&Q(o,[l])===void 0||n.properties&&!(l in n.properties))continue;let[u,d]=yz(l,t);return Array.isArray(d)?c[0]=Gz(n,d):KL(d)&&(c=Kz(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>Wz(e,u,t,r,i,a,o,s))}return c}function Gz(e,t){if(!t)return e;let n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Kz(e,t,n,r,i,a,o,s,c){return Vz(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i;return t=Tz(t,u),l===void 0?t:Az(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:Nz(e,t,n,a,o,s))).flatMap(i=>qz(e,t,n,r,i,a,o,s,c))})}function qz(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!t||!t.properties)return!1;let{[r]:i}=t.properties;if(i){let t={type:`object`,properties:{[r]:i}};return e.isValid(t,s,n)||a}return!1});return!a&&l.length!==1?(console.warn(`ignoring oneOf in dependencies because there isn't exactly one subschema that is valid`),[t]):l.flatMap(i=>{let l=i,[u]=yz(r,l.properties);return Vz(e,{...l,properties:u},n,s,a,o,c).map(e=>Tz(t,e))})}function Jz(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=Sz(n)||r,c=n[i].map(n=>Oz(e,n,t,a,o)),l=Q(a,s);if(l!==void 0)return c.find(e=>dS(Q(e,[iR,s,$L],Q(e,[iR,s,QL])),l))}}function Yz(e,t,n,r,i){let a=n;if(Yx(n,`$ref`)&&(a=Oz(e,n,t,void 0,i)),uS(r))return a;let[o,...s]=Array.isArray(r)?r:r.split(`.`);if(o&&Yx(a,o))return a=Q(a,o),Yz(e,t,a,s,i)}function Xz(e,t,n,r,i,a){let o=Yz(e,t,n,r,a);return o===void 0?i:o}var Zz={title:`!@#$_UNKNOWN_$#@!`};function Qz(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop();o.length&&o.forEach(n=>{s=Xz(e,t,s,[iR,n],{},a),Yx(s,`oneOf`)?s=Jz(e,t,s,c,rR,Q(i,n),a):Yx(s,`anyOf`)&&(s=Jz(e,t,s,c,ZL,Q(i,n),a))}),Yx(s,`oneOf`)?s=Jz(e,t,s,c,rR,i,a):Yx(s,`anyOf`)&&(s=Jz(e,t,s,c,ZL,i,a));let l=Xz(e,t,s,[iR,c],Zz,a);l===Zz&&(l=void 0);let u=Xz(e,t,s,Vne,[],a),d;return l&&Array.isArray(u)&&(d=u.includes(c)),{field:l,isRequired:d}}var $z={type:`object`,$id:Bne,properties:{__not_really_there__:{type:`number`}}};function eB(e,t,n,r,i){let a=0;return n&&(Xh(n.properties)?a+=jS(n.properties,(n,a,o)=>{let s=Q(r,o);if(typeof a==`boolean`)return n;if(Yx(a,`$ref`)){let r=Oz(e,a,t,s,i);return n+eB(e,t,r,s||{},i)}if((Yx(a,`oneOf`)||Yx(a,`anyOf`))&&s){let r=Yx(a,`oneOf`)?rR:ZL,o=Sz(a);return n+tB(e,t,s,Q(a,r),-1,o,i)}if(a.type===`object`)return Xh(s)&&(n+=1),n+eB(e,t,a,s,i);if(a.type===Cz(s)){let e=n+1;return a.default?e+=s===a.default?1:-1:a.const&&(e+=s===a.const?1:-1),e}return n},0):Zx(n.type)&&n.type===Cz(r)&&(a+=1)),a}function tB(e,t,n,r,i=-1,a,o){let s=r.map(e=>Pz(e,t,[])),c=Ez(n,r,a);if(mS(c))return c;let l=s.reduce((r,i,o)=>(Dz(e,n,[$z,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||PS(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=eB(e,t,c,n,o);return u.add(l),l>a?{bestIndex:i,bestScore:l}:r},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function nB(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(e=>KL(e))}function rB(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){let a=Array.isArray(e)?e:[],o=i?a:t,s=i?t:a,c=o.map((e,o)=>s[o]===void 0?e:rB(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(KL(t)){let a=Object.assign({},e);return Object.keys(t).reduce((a,o)=>{let s=Q(t,o),c=KL(e)&&o in e,l=o in t,u=Q(e,o)??{},d=c&&Object.entries(u).some(([,e])=>KL(e)),f=c&&KL(Q(e,o)),p=l&&KL(s);return f&&p&&!d?(a[o]={...Q(e,o),...s},a):(a[o]=rB(Q(e,o),s,n,r,i&&(c||!l)),a)},a)}return r&&(e!==void 0&&hS(t)||typeof t==`number`&&isNaN(t))||i&&!hS(t)?e:t}function iB(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&KL(o))r[i]=iB(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let e=o;n===`preventDuplicates`&&(e=o.reduce((e,t)=>(a.includes(t)||e.push(t),e),[])),r[i]=a.concat(e)}else r[i]=o;return r},Object.assign({},e))}function aB(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function oB(e,t,n={},r){let i=Oz(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(e=>typeof e!=`boolean`&&aB(e)):!1}function sB(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:oB(e,t.items,n,r)}function cB(e){let t=e[QL],n=wz(e);return KL(t)&&Zx(t?.$data)&&n!==`object`&&n!==`array`}function lB(e){if(`enum`in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(`const`in e)return e.const;throw Error(`schema cannot be inferred as a constant`)}function uB(e,t){let n=new Map(e.map(e=>[String(e.value),e])),r=new Set(t.filter(e=>e!==`*`).map(String)),i=e.filter(e=>!r.has(String(e.value)));return t.flatMap(e=>{if(e===`*`)return i;let t=n.get(String(e));return t?[t]:[]})}function dB(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=mR(t);n=e,r=i}let i=e.enum.map((e,t)=>({label:Array.isArray(n)?n[t]||String(e):n?.[String(e)]||String(e),value:e}));return r&&(i=uB(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Sz(e);if(t){let{optionsSchemaSelector:e=i}=mR(t);i=e}return n&&n.map((e,t)=>{let{title:n}=mR(r?.[t]),a=e,o,s=n;if(i){let e=Q(a,[`properties`,i],{});o=Q(e,`default`,Q(e,`const`)),s=s||e?.title||a.title||String(o)}else o=lB(a),s=s||a.title||String(o);return{schema:a,label:s,value:o}})}var fB=[`string`,`number`,`integer`,`boolean`,`null`],pB;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(pB||={});function mB(e,t=pB.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){let t=e.items[n];if(typeof t!=`boolean`)return t}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!=`boolean`)return e.items;return t!==pB.Ignore&&KL(e.additionalItems)?e.additionalItems:{}}function hB(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&uS(t)&&n===null?null:t}function gB(e,t,n,r,i,a=[],o={},s=!1,c=!1){let{emptyObjectFields:l=`populateAllDefaults`}=o;if(r===!0||s)e[t]=n;else if(r===`excludeObjectChildren`)(c&&n!==void 0||!KL(n)||!uS(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;KL(n)?l===`skipEmptyDefaults`?uS(n)||(e[t]=n):(!uS(n)||a.includes(t))&&(r||l!==`populateRequiredDefaults`)&&(e[t]=n):n!==void 0&&(l===`populateAllDefaults`||l===`skipEmptyDefaults`||r&&a.includes(t))&&(e[t]=n)}}function _B(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:l=void 0,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=KL(i)?i:{},m=KL(t)?t:{},h=r,g=null,_=c,v=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!cB(m))h=m[QL];else if(KL(h)&&KL(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=iB(h,m.default);else if(`default`in m&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[sR];s.includes(e)||(v=s.concat(e),g=xz(e,a));let t=i===void 0||KL(i)&&uS(i);g&&!h&&t&&(h=m.default),d&&g&&!KL(i)&&(p=i)}else if(`dependencies`in m)g=Uz(e,m,a,!1,[],{...xB(e,m,n,h),...p},l)[0];else if(nB(m))h=m.items.map((t,n)=>_B(e,t,{rootSchema:a,includeUndefinedValues:o,_recurseList:s,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,parentDefaults:Array.isArray(r)?r[n]:void 0,rawFormData:p,required:u,shouldMergeDefaultsIntoFormData:d}));else if(`oneOf`in m){let{oneOf:t,...n}=m;if(t.length===0)return;let r=Sz(m),{type:o=`null`}=n;!Array.isArray(o)&&fB.includes(o)&&_?.constAsDefaults===`skipOneOf`&&(_={..._,constAsDefaults:`never`}),g=t[tB(e,a,i??m.default,t,0,r,l)],g=Tz(n,g)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=Sz(m);g=t[tB(e,a,i??m.default,t,0,r,l)],g=Tz(n,g)}if(g)return _B(e,g,{rootSchema:a,includeUndefinedValues:o,_recurseList:v,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let y=xB(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=vB(e,m,a,i,c,l);(!KL(i)||`allOf`in m)&&(y=rB(y,r,n,!0))}return y}function vB(e,t,n,r,i,a){let o=!aB(t)&&oB(e,t,n,a),s=r;return o&&(s=dB(t)?.some(e=>_R(e.value,r))?r:void 0),t.const&&i?.constAsDefaults===`always`&&(s=t.const),s}function yB(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:s=void 0,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=KL(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?Oz(e,p,r,f,s):p,h=m[QL],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=Q(m,[iR,n],{}),g=KL(h)&&h[n]!==void 0,_=(KL(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!cB(p);return gB(t,n,_B(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,m.required,o,_,p?.type===`null`),t},{});if(m.additionalProperties&&!u){let t=KL(m.additionalProperties)?m.additionalProperties:{},n=new Set;KL(d)&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e));let p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),n.forEach(n=>{gB(g,n,_B(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,p)})}return hB(t,g)}}function bB(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:o=void 0,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=t,p=a?.arrayMinItems??{},{populate:m,mergeExtraDefaults:h}=p,g=m===`never`,_=m===`requiredOnly`,v=m===`all`||!g&&!_,y=p?.computeSkipPopulate??(()=>!1),b=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(d)&&(d=d.map((t,c)=>_B(e,mB(f,pB.Fallback,c),{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:t,rawFormData:Array.isArray(n)?n[c]:void 0,required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}))),Array.isArray(n)){let t=mB(f);if(g)d=n;else{let c=n.map((n,c)=>_B(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:Q(d,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));d=rB(d,c,(_&&s||v)&&h)}}if((KL(f)&&`const`in f&&a?.constAsDefaults!==`never`)===!1){if(g)return d??b;if(_&&!s)return d||void 0}let x,S=Array.isArray(d)?d.length:0;if(!f.minItems||sB(e,f,r,o)||y(e,f,r)||f.minItems<=S)x=d||!s&&!c?d:b;else{let t=d||[],n=mB(f,pB.Invert),c=n.default,u=Array.from({length:f.minItems-S},()=>_B(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));x=t.concat(u)}return hB(t,x)}function xB(e,t,n={},r){switch(wz(t)){case`object`:return yB(e,t,n,r);case`array`:return bB(e,t,n,r)}}function SB(e,t,n,r,i=!1,a,o,s){if(!KL(t))throw Error(`Invalid schema: `+t);let c=Oz(e,t,r,n,o),l=_B(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&KL(c.default))return{...l,...n};if(KL(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:e}=a||{};return rB(l,n,!0,e===`useDefaultIfFormDataUndefined`,!0)}return l}function CB(e={}){return`widget`in mR(e)&&mR(e).widget!==`hidden`}function wB(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=Oz(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function TB(e,t,n={},r,i,a){let{label:o=!0}=mR(n,i),s=!!o;if(s){let i=wz(t),o=Q(t,JL,!1);i===`array`&&(s=o||sB(e,t,r,a)||wB(e,t,n,r,a)||CB(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n&&n[`ui:field`]&&(s=!1)}return s}function EB(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=Oz(e,t,r,i,o);if(a.findIndex(e=>_R(e,s))===-1)return EB(e,s,n,r,i,a.concat(s),o)}let s={[nR]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[tB(e,r,i,c,0,Sz(t),o)];s={...s,...EB(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){MS(s,uR,!0);let c=Xh(t.additionalProperties)?t[YL]:{},l=Q(t,iR,{});for(let t of Object.keys(i??{}))t in l||(s[t]=EB(e,c,`${n}.${t}`,r,Q(i,[t]),a,o))}if(`items`in t&&Array.isArray(i)){let{items:c,additionalItems:l}=t;Array.isArray(c)?i.forEach((t,i)=>{c[i]?s[i]=EB(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=EB(e,l,`${n}.${i}`,r,t,a,o):console.warn(`Unable to generate path schema for "${n}.${i}". No schema defined for it`)}):i.forEach((t,i)=>{s[i]=EB(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=Q(t,[iR,c],{});s[c]=EB(e,l,`${n}.${c}`,r,Q(i,[c]),a,o)}return s}function DB(e,t,n=``,r,i,a){return EB(e,t,n,r,i,void 0,a)}function OB(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=kS(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function kB(e,t){let n=(e,t)=>typeof e!=`object`||uS(e)||t&&!uS(e),r=(e,i=[],a=[[]])=>{let o=Object.keys(e);return o.forEach(s=>{let c=e[s];if(typeof c==`object`){let e=a.map(e=>[...e,s]);c.__rjsf_additionalProperties&&c.$name!==``?i.push(c[nR]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=Q(t,e),a=o.length===1;(n(r,a)||Array.isArray(r)&&r.every(e=>n(e,a)))&&i.push(e)})}),i};return r(e)}function AB(e,t,n={},r){return OB(r,kB(DB(e,Oz(e,t,n,r),``,n,r),r).map(e=>Array.isArray(e)?e.join(`.`):e))}var jB=Symbol(`no Value`);function MB(e,t,n,r,i={},a){let o;if(Yx(n,`properties`)){let s={};if(Yx(r,`properties`)){let e=Q(r,iR,{});Object.keys(e).forEach(e=>{Yx(i,e)&&(s[e]=void 0)})}let c=Object.keys(Q(n,iR,{})),l={};c.forEach(o=>{let c=Q(i,o),u=Q(r,[iR,o],{}),d=Q(n,[iR,o],{});Yx(u,`$ref`)&&(u=Oz(e,u,t,c,a)),Yx(d,`$ref`)&&(d=Oz(e,d,t,c,a));let f=Q(u,`type`),p=Q(d,`type`);if(!f||f===p)if(Yx(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=MB(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=Q(d,`default`,jB),t=Q(u,`default`,jB);e!==jB&&e!==c&&(t===c?s[o]=e:Q(d,`readOnly`)===!0&&(s[o]=void 0));let n=Q(d,`const`,jB),r=Q(u,`const`,jB);n!==jB&&n!==c&&(s[o]=r===c?n:void 0)}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(Q(r,`type`)===`array`&&Q(n,`type`)===`array`&&Array.isArray(i)){let s=Q(r,`items`),c=Q(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){Yx(s,`$ref`)&&(s=Oz(e,s,t,i,a)),Yx(c,`$ref`)&&(c=Oz(e,c,t,i,a));let r=Q(s,`type`),l=Q(c,`type`);if(!r||r===l){let r=Q(n,`maxItems`,-1);o=l===`object`?i.reduce((n,i)=>{let o=MB(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]):r>0&&i.length>r?i.slice(0,r):i}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}var NB=class{constructor(e,t,n,r){t&&t.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=vz(t,Q(t,`$id`,`#`)):this.rootSchema=t,this.validator=e,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=r}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,t,n={},r){return!e||!t?!1:this.validator!==e||!_R(this.rootSchema,t)||!_R(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return Qz(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return Jz(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return SB(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return TB(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return tB(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return Dz(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return Xz(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return wB(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return sB(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return oB(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return AB(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return Oz(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return MB(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return DB(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function PB(e,t,n={},r){return new NB(e,t,n,r)}function FB(e){if(e.indexOf(`data:`)===-1)throw Error(`File is invalid: URI must be a dataURI`);let t=e.slice(5).split(`;base64,`);if(t.length!==2)throw Error(`File is invalid: dataURI must be base64`);let[n,r]=t,[i,...a]=n.split(`;`),o=i||``,s=decodeURI(a.map(e=>e.split(`=`)).find(([e])=>e===`name`)?.[1]||`unknown`);try{let e=atob(r),t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return{blob:new window.Blob([new Uint8Array(t)],{type:o}),name:s}}catch(e){throw Error(`File is invalid: `+e.message)}}function IB(e,t){let n=String(e);for(;n.length<t;)n=`0`+n;return n}function LB(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return LB(t,e).reverse();let n=[];for(let r=e;r<=t;r++)n.push({value:r,label:IB(r,2)});return n}function RB(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function zB(e,t){let n=e;if(Array.isArray(t)){let e=n.split(/(%\d)/);t.forEach((t,n)=>{let r=e.findIndex(e=>e===`%${n+1}`);r>=0&&(e[r]=t)}),n=e.join(``)}return n}function BB(e,t){return zB(e,t)}function VB(e,t=[],n){if(Array.isArray(e))return e.map(e=>VB(e,t)).filter(e=>e!==n);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function HB(e,t,n=[]){let r=VB(e,n);return Array.isArray(t)?t.filter(e=>!_R(e,r)):_R(r,t)?void 0:t}function UB(e,t){return Array.isArray(t)?t.some(t=>_R(t,e)):_R(t,e)}function WB(e,t=[],n=!1){let r=t.map((t,n)=>UB(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function GB(e,t,n=[]){let r=VB(e,n);if(!hS(r)){let e=n.findIndex(e=>r===e.value),i=n.map(({value:e})=>e);return t.slice(0,e).concat(r,t.slice(e)).sort((e,t)=>Number(i.indexOf(e)>i.indexOf(t)))}return t}var KB=class{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let t=Array.isArray(e)&&e.length>0||typeof e==`string`?Q(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},ite(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?ox(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=Q(n,eR);return Array.isArray(r)||(r=[],n[eR]=r),Array.isArray(e)?MS(n,eR,[...new Set([...r,...e])]):MS(n,eR,[...new Set([...r,e])]),this}setErrors(e,t){return MS(this.getOrCreateErrorBlock(t),eR,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return MS(this.getOrCreateErrorBlock(e),eR,[]),this}};function qB(e,t){let n=Zv(e),r=Zv(t);if(e===t||!n&&!r)return[];if(n&&!r)return H_(e);if(!n&&r)return H_(t);{let n=H_(DS(e,(e,n)=>!_R(e,Q(t,n)))),r=Hx(H_(t),H_(e));return[...n,...r]}}function JB(e,t,n=[1900,new Date().getFullYear()+2],r=`YMD`){let{day:i,month:a,year:o,hour:s,minute:c,second:l}=e,u={type:`day`,range:[1,31],value:i},d={type:`month`,range:[1,12],value:a},f={type:`year`,range:n,value:o},p=[];switch(r){case`MDY`:p.push(d,u,f);break;case`DMY`:p.push(u,d,f);break;default:p.push(f,d,u)}return t&&p.push({type:`hour`,range:[0,23],value:s},{type:`minute`,range:[0,59],value:c},{type:`second`,range:[0,59],value:l}),p}function YB(e){let t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function XB(e,t,n={},r=!0){let i={type:t||`text`,...YB(e)};return n.inputType?i.type=n.inputType:t||(e.type===`number`?(i.type=`number`,r&&i.step===void 0&&(i.step=`any`)):e.type===`integer`&&(i.type=`number`,i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}var ZB={props:{disabled:!1},submitText:`Submit`,norender:!1};function QB(e={}){let t=mR(e);if(t&&t.submitButtonOptions){let e=t[oR];return{...ZB,...e}}return ZB}function $B(e,t,n={}){let{templates:r}=t;return e===`ButtonTemplates`?r[e]:Object.hasOwn(n,e)&&typeof n[e]==`string`&&Object.hasOwn(r,n[e])?r[n[e]]:n[e]||r[e]}function eV(){if(typeof process>`u`||Q(process,`env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,US(`test-id-`)),e.get(n)}})}var tV=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isForwardRef=function(e){return m(e)===l},e.isMemo=function(e){return m(e)===f}})),nV=u(s(((e,t)=>{t.exports=tV()}))(),1),rV={boolean:{checkbox:`CheckboxWidget`,radio:`RadioWidget`,select:`SelectWidget`,hidden:`HiddenWidget`},string:{text:`TextWidget`,password:`PasswordWidget`,email:`EmailWidget`,hostname:`TextWidget`,ipv4:`TextWidget`,ipv6:`TextWidget`,uri:`URLWidget`,"data-url":`FileWidget`,radio:`RadioWidget`,select:`SelectWidget`,textarea:`TextareaWidget`,hidden:`HiddenWidget`,date:`DateWidget`,datetime:`DateTimeWidget`,"date-time":`DateTimeWidget`,"alt-date":`AltDateWidget`,"alt-datetime":`AltDateTimeWidget`,time:`TimeWidget`,color:`ColorWidget`,file:`FileWidget`},number:{text:`TextWidget`,select:`SelectWidget`,updown:`UpDownWidget`,range:`RangeWidget`,radio:`RadioWidget`,hidden:`HiddenWidget`},integer:{text:`TextWidget`,select:`SelectWidget`,updown:`UpDownWidget`,range:`RangeWidget`,radio:`RadioWidget`,hidden:`HiddenWidget`},array:{select:`SelectWidget`,checkboxes:`CheckboxesWidget`,files:`FileWidget`,hidden:`HiddenWidget`}};function iV(e){let t=Q(e,`MergedWidget`);if(!t){let n=e.defaultProps&&e.defaultProps.options||{};t=({options:t,...r})=>(0,G.jsx)(e,{options:{...n,...t},...r}),MS(e,`MergedWidget`,t)}return t}function aV(e,t,n={}){let r=wz(e);if(typeof t==`function`||t&&nV.isForwardRef((0,b.createElement)(t))||nV.isMemo(t))return iV(t);if(typeof t!=`string`)throw Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){let r=n[t];return aV(e,r,n)}if(typeof r==`string`){if(!(r in rV))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in rV[r]){let i=n[rV[r][t]];return aV(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function oV(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function sV(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function cV(e){return oV(sV(e))}function lV(e){return cV(e)}function uV(e,t,n={}){try{return aV(e,t,n),!0}catch(e){let t=e;if(t.message&&(t.message.startsWith(`No widget`)||t.message.startsWith(`Unsupported widget`)))return!1;throw e}}function dV(e,t){return`${Zx(e)?e:e.$id}__${t}`}function fV(e){return dV(e,`description`)}function pV(e){return dV(e,`error`)}function mV(e){return dV(e,`examples`)}function hV(e){return dV(e,`help`)}function gV(e){return dV(e,`title`)}function _V(e,t=!1){let n=t?` ${mV(e)}`:``;return`${pV(e)} ${fV(e)} ${hV(e)}${n}`}function vV(e,t){return`${e}-${t}`}function yV(e,t){return dV(e,t)}function bV(e,t){return dV(e,`optional${t}`)}function xV(e){return!hS(e)&&(!Xh(e)||Array.isArray(e)||!uS(e))}function SV(e,t){let{rootSchema:n,schemaUtils:r}=e;return dS(t,n)?!0:`$ref`in n?dS(t,wS(r.retrieveSchema(n),cR)):!1}function CV(e,t,n){return t?n:e}function wV(e){return e?new Date(e).toJSON():void 0}function TV(e,t,n){let r=[Wne];return Yx(e,`formContext`)&&r.unshift(Une),Q(e,[...r,t],n)}function EV(e,t){if(!Array.isArray(t))return e;let n=e=>e.reduce((e,t)=>(e[t]=!0,e),{}),r=e=>e.length>1?`properties '${e.join(`', '`)}'`:`property '${e[0]}'`,i=n(e),a=t.filter(e=>e===`*`||i[e]),o=n(a),s=e.filter(e=>!o[e]),c=a.indexOf(`*`);if(c===-1){if(s.length)throw Error(`uiSchema order list does not contain ${r(s)}`);return a}if(c!==a.lastIndexOf(`*`))throw Error(`uiSchema order list contains more than one wildcard item`);let l=[...a];return l.splice(c,1,...s),l}function DV(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};let n=new Date(e);if(Number.isNaN(n.getTime()))throw Error(`Unable to parse date `+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}var OV=[tR,YL],kV=[rR,ZL,XL];function AV(e,t,n,r=new Set){let{rootSchema:i,uiSchemaDefinitions:a}=n,o={...t},s=e,c=e[sR],l=c&&r.has(c);if(c){if(r.add(c),a&&c in a&&(o=iB(a[c],o)),l)return o;try{s=xz(c,i)}catch{s=e}}let u=s[iR];if(u&&KL(u))for(let[e,t]of Object.entries(u)){let i=AV(t,o[e]||{},n,new Set(r));Object.keys(i).length>0&&(o[e]=i)}for(let e of OV){let t=s[e];if(t&&KL(t)&&!Array.isArray(t)){let i=o[e];if(typeof i!=`function`){let a=AV(t,i||{},n,new Set(r));Object.keys(a).length>0&&(o[e]=a)}}}for(let e of kV){let t=s[e];if(Array.isArray(t)&&t.length>0){let i=o[e],a=Array.isArray(i)?[...i]:[],s=!1;for(let e=0;e<t.length;e++){let i=t[e],o=AV(i,a[e]||{},n,new Set(r));Object.keys(o).length>0&&(a[e]=o,s=!0)}s&&(o[e]=a)}}return o}function jV(e,t,n){let r=e.__rjsf_ref??e[sR],i=r?n.uiSchemaDefinitions?.[r]:void 0;return i?!t||Object.keys(t).length===0?{...i}:iB(i,t):t||{}}function MV(e){return e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0?!0:e.anyOf&&e.anyOf.length===1?MV(e.anyOf[0]):e.oneOf&&e.oneOf.length===1?MV(e.oneOf[0]):e.allOf?e.allOf.some(e=>MV(e)):!1}function NV(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!RB(r,t)||!RB(i,n)}let{props:i,state:a}=e;return!_R(i,t)||!_R(a,n)}function PV(e){let t=VS(e.map(e=>Xh(e)?wz(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function FV(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=mR(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?PV(t[ZL]):`oneOf`in t&&Array.isArray(t.oneOf)?PV(t[rR]):wz(t),!SV(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function IV(e,t=!0){let{year:n,month:r,day:i,hour:a=0,minute:o=0,second:s=0}=e,c=Date.UTC(n,r-1,i,a,o,s),l=new Date(c).toJSON();return t?l:l.slice(0,10)}function LV(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[eR].map(e=>{let n=`.${t.join(`.`)}`;return{property:n,message:e,stack:`${n} ${e}`}}))),Object.keys(e).reduce((n,r)=>{if(r!==`__errors`){let i=e[r];Zv(i)&&(n=n.concat(LV(i,[...t,r])))}return n},n)}function RV(e){let t=new KB;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:FS(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function zV(e,t,n,r){let i=Array.isArray(n)?n:n?.path,a=e===``?[]:[e],o=i?i.concat(...a):a,s=[t.idPrefix,...o].join(t.idSeparator),c;return t.nameGenerator&&o.length>0&&(c=t.nameGenerator(o,t.idPrefix,r)),{path:o,$id:s,...c!==void 0&&{name:c}}}function BV(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;{let r=e[n];return Zv(r)?{...t,[n]:BV(r)}:{...t,[n]:r}}},{})}function VV(e){return Object.values(e).every(e=>e!==-1)}function HV(e){let{className:t=`form-control`,type:n,range:r,value:i,select:a,rootId:o,name:s,disabled:c,readonly:l,autofocus:u,registry:d,onBlur:f,onFocus:p}=e,m=`${o}_${n}`,{SelectWidget:h}=d.widgets,g=(0,b.useCallback)(e=>a(n,e),[a,n]);return(0,G.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:LB(r[0],r[1])},placeholder:n,value:i,disabled:c,readonly:l,autofocus:u,onChange:g,onBlur:f,onFocus:p,registry:d,label:``,"aria-describedby":_V(o)})}function UV(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(DV(o,t));(0,b.useEffect)(()=>{c(DV(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};VV(r)?a(IV(r,t)):c(r)},[s,a,t]),u=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(void 0)},[n,r,a]),d=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(IV(DV(new Date().toJSON(),t),t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>JB(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function WV(e){let t=(0,b.useRef)(e);return dS(e,t.current)||(t.current=e),t.current}function GV(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}function KV(e){let{name:t,size:n,type:r}=e;return new Promise((i,a)=>{let o=new window.FileReader;o.onerror=a,o.onload=e=>{typeof e.target?.result==`string`?i({dataURL:GV(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function qV(e){return Promise.all(Array.from(e).map(KV))}function JV(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=FB(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function YV(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>JV(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(e=>{qV(e).then(e=>{let i=e.map(e=>e.dataURL||null);t(n?r.concat(...i):i[0])})},[r,n,t]),handleRemove:(0,b.useCallback)(e=>{t(n?r.filter((t,n)=>n!==e):void 0)},[r,n,t])}}function XV(e){if(!e)return``;let t=new Date(e);return`${IB(t.getFullYear(),4)}-${IB(t.getMonth()+1,2)}-${IB(t.getDate(),2)}T${IB(t.getHours(),2)}:${IB(t.getMinutes(),2)}:${IB(t.getSeconds(),2)}.${IB(t.getMilliseconds(),3)}`}function ZV(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=LV(t),o=t;return uS(i)||(o=iB(i,t,n?`preventDuplicates`:!0),a=[...r].concat(a)),{errorSchema:o,errors:a}}function QV(e){for(let t in e){let n=e,r=n[t];t===`$ref`&&typeof r==`string`&&r.startsWith(`#`)?n[t]=dR+r:n[t]=eH(r)}return e}function $V(e){for(let t=0;t<e.length;t++)e[t]=eH(e[t]);return e}function eH(e){return Array.isArray(e)?$V([...e]):Xh(e)?QV({...e}):e}var tH;(function(e){e.ArrayItemTitle=`Item`,e.MissingItems=`Missing items definition`,e.EmptyArray=`No items yet. Use the button below to add some.`,e.YesLabel=`Yes`,e.NoLabel=`No`,e.CloseLabel=`Close`,e.ErrorsLabel=`Errors`,e.NewStringDefault=`New Value`,e.AddButton=`Add`,e.AddItemButton=`Add Item`,e.CopyButton=`Copy`,e.MoveDownButton=`Move down`,e.MoveUpButton=`Move up`,e.RemoveButton=`Remove`,e.NowLabel=`Now`,e.ClearLabel=`Clear`,e.AriaDateLabel=`Select a date`,e.PreviewLabel=`Preview`,e.DecrementAriaLabel=`Decrease value by 1`,e.IncrementAriaLabel=`Increase value by 1`,e.OptionalObjectAdd=`Add data for optional field`,e.OptionalObjectRemove=`Remove data for optional field`,e.OptionalObjectEmptyMsg=`No data for optional field`,e.Type=`Type`,e.Value=`Value`,e.ClearButton=`clear input`,e.UnknownFieldType=`Unknown field type %1`,e.OptionPrefix=`Option %1`,e.TitleOptionPrefix=`%1 option %2`,e.KeyLabel=`%1 Key`,e.InvalidObjectField=`Invalid "%1" object field configuration: _%2_.`,e.UnsupportedField=`Unsupported field schema.`,e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason=`Unsupported field schema: _%1_.`,e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo=`**%1** (%2, %3 bytes)`})(tH||={});function nH(){return US(`rjsf-array-item-`)}function rH(e){return Array.isArray(e)?e.map(e=>({key:nH(),item:e})):[]}function iH(e){return Array.isArray(e)?e.map(e=>e.item):[]}function aH(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function oH(e,t,n,r){let{addable:i}=mR(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0?!0:n.length<t.maxItems),i}function sH(e,t,n,r){if(typeof e.items==`function`)try{return e.items(t,n,r)}catch(e){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,e);return}else return e.items}function cH(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:nB(t)&&zne(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function lH(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,placeholder:l,onBlur:u,onFocus:d,registry:f,rawErrors:p,name:m,onSelectChange:h}=e,{widgets:g,schemaUtils:_,globalFormOptions:v,globalUiOptions:y}=f,b=dB(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=mR(r,y),w=aV(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=WV(zV(``,v,n,!0));return(0,G.jsx)(w,{id:D.$id,name:m,multiple:!0,onChange:h,onBlur:u,onFocus:d,options:{...C,enumOptions:b},schema:t,uiSchema:r,registry:f,value:i,disabled:a,readonly:o,required:c,label:T,hideLabel:!E,placeholder:l,autofocus:s,rawErrors:p,htmlName:D.name})}function uH(e){let{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:a=!1,autofocus:o=!1,required:s=!1,hideError:c,placeholder:l,onBlur:u,onFocus:d,formData:f=[],registry:p,rawErrors:m,name:h,onSelectChange:g}=e,{widgets:_,schemaUtils:v,globalFormOptions:y,globalUiOptions:b}=p,{widget:x,title:S,...C}=mR(r,b),w=aV(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=WV(zV(``,y,n,!0));return(0,G.jsx)(w,{id:D.$id,name:h,multiple:!0,onChange:g,onBlur:u,onFocus:d,options:C,schema:t,uiSchema:r,registry:p,value:f,disabled:i,readonly:a,hideError:c,required:s,label:T,hideLabel:!E,placeholder:l,autofocus:o,rawErrors:m,htmlName:D.name})}function dH(e){let{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,onBlur:l,onFocus:u,registry:d,formData:f=[],rawErrors:p,onSelectChange:m}=e,{widgets:h,schemaUtils:g,globalFormOptions:_,globalUiOptions:v}=d,{widget:y=`files`,title:b,...x}=mR(n,v),S=aV(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=WV(zV(``,_,r,!0));return(0,G.jsx)(S,{options:x,id:T.$id,name:i,multiple:!0,onChange:m,onBlur:l,onFocus:u,schema:t,uiSchema:n,value:f,disabled:a,readonly:o,required:c,registry:d,autofocus:s,rawErrors:p,label:C,hideLabel:!w,htmlName:T.name})}function fH(e){let{itemKey:t,index:n,name:r,disabled:i,hideError:a,readonly:o,registry:s,uiOptions:c,parentUiSchema:l,canAdd:u,canRemove:d=!0,canMoveUp:f,canMoveDown:p,itemSchema:m,itemData:h,itemUiSchema:g,itemFieldPathId:_,itemErrorSchema:v,autofocus:y,onBlur:x,onFocus:S,onChange:C,rawErrors:w,totalItems:T,title:E,handleAddItem:D,handleCopyItem:O,handleRemoveItem:k,handleReorderItems:A}=e,{schemaUtils:j,fields:{ArraySchemaField:M,SchemaField:N},globalUiOptions:P}=s,F=WV(_),I=M||N,L=$B(`ArrayFieldItemTemplate`,s,c),R=j.getDisplayLabel(m,g,P),{description:z}=mR(g),B=!!z||!!m.description,{orderable:V=!0,removable:H=!0,copyable:U=!1}=c,ee={moveUp:V&&f,moveDown:V&&p,copy:U&&u,remove:H&&d,toolbar:!1};ee.toolbar=Object.keys(ee).some(e=>ee[e]);let W=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),te=(0,b.useCallback)(e=>{O(e,n)},[O,n]),ne=(0,b.useCallback)(e=>{k(e,n)},[k,n]),re=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),ie=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,G.jsx)(L,{children:(0,G.jsx)(I,{name:r,title:E,index:n,schema:m,uiSchema:g,formData:h,errorSchema:v,fieldPathId:F,required:aH(m),onChange:C,onBlur:x,onFocus:S,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:w}),buttonsProps:{fieldPathId:F,disabled:i,readonly:o,canAdd:u,hasCopy:ee.copy,hasMoveUp:ee.moveUp,hasMoveDown:ee.moveDown,hasRemove:ee.remove,index:n,totalItems:T,onAddItem:W,onCopyItem:te,onRemoveItem:ne,onMoveUpItem:re,onMoveDownItem:ie,registry:s,schema:m,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:ee.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:m,uiSchema:g,parentUiSchema:l,displayLabel:R,hasDescription:B})}function pH(e){let{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,onChange:_,keyedFormData:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,C=t.title||s||o,{schemaUtils:w,fields:T,formContext:E,globalFormOptions:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=T,A=mR(n,O),j=Xh(t.items)?t.items:{},M=w.retrieveSchema(j),N=iH(v),P=FV(p,t,d,n),F=xV(a),I=oH(p,t,N,n)&&(!P||F),L=F?v:[],R=P?` rjsf-optional-array-field`:``,z=e.childFieldPathId??i,B=P?(0,G.jsx)(k,{...e,fieldPathId:z}):void 0,V={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,T=w.retrieveSchema(j,s),O=r?r[t]:void 0,k=zV(t,D,z),M=sH(n,a,t,E);return(0,G.jsx)(fH,{itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:C?`${C}-${t+1}`:void 0,canAdd:I,canMoveUp:t>0,canMoveDown:t<N.length-1,itemSchema:T,itemFieldPathId:k,itemErrorSchema:O,itemData:s,itemUiSchema:M,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S,onChange:_},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${M.type}${R}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:C,formData:N,rawErrors:g,registry:p,optionalDataControl:B};return(0,G.jsx)($B(`ArrayFieldTemplate`,p,A),{...V})}function mH(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,keyedFormData:_,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,{formData:C=[]}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalFormOptions:O,globalUiOptions:k}=p,A=mR(n,k),{OptionalDataControlsField:j}=E,M=FV(p,t,d,n),N=xV(r),P=(Xh(t.items)?t.items:[]).map((e,t)=>T.retrieveSchema(e,C[t])),F=Xh(t.additionalItems)?T.retrieveSchema(t.additionalItems,r):null,I=e.childFieldPathId??a;C.length<P.length&&(C=C.concat(Array(P.length-C.length)));let L=N?_:[],R=M?` rjsf-optional-array-field`:``,z=M?(0,G.jsx)(j,{...e,fieldPathId:I}):void 0,B=oH(p,t,C,n)&&!!F&&(!M||N),V={canAdd:B,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${R}`,disabled:c,fieldPathId:a,formData:r,items:L.map((e,r)=>{let{key:a,item:s}=e,E=s,k=r>=P.length,j=(k&&Xh(t.additionalItems)?T.retrieveSchema(t.additionalItems,E):P[r])||{},M=zV(r,O,I),N;N=k?n.additionalItems:Array.isArray(n.items)?n.items[r]:sH(n,s,r,D);let F=i?i[r]:void 0;return(0,G.jsx)(fH,{index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${r+1}`:void 0,canAdd:B,canRemove:k,canMoveUp:r>=P.length+1,canMoveDown:k&&r<C.length-1,itemSchema:j,itemData:E,itemUiSchema:N,itemFieldPathId:M,itemErrorSchema:F,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:w,errorSchema:i,rawErrors:g,optionalDataControl:z};return(0,G.jsx)($B(`ArrayFieldTemplate`,p,A),{...V})}function hH(e=[]){let t=(0,b.useMemo)(()=>cV(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:rH(e)})),{keyedFormData:i,formDataHash:a}=n;if(t!==a){let n=Array.isArray(e)?e:[],o=i||[];i=n.length===o.length?o.map((e,t)=>({key:e.key,item:n[t]})):rH(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=iH(e);return r({formDataHash:cV(t),keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function gH(e){let{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:a,formData:o,onChange:s}=e,{globalFormOptions:c,schemaUtils:l,translateString:u}=a,{keyedFormData:d,updateKeyedFormData:f}=hH(o),p=e.childFieldPathId??i,m=(0,b.useCallback)((e,n)=>{e&&e.preventDefault();let i;if(r){i={};for(let e in r){let t=parseInt(e);n===void 0||t<n?MS(i,[t],r[e]):t>=n&&MS(i,[t+1],r[e])}}let o={key:nH(),item:cH(a,t)},c=[...d];n===void 0?c.push(o):c.splice(n,0,o),s(f(c),p.path,i)},[d,a,t,s,f,r,p]),h=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<=t?MS(n,[i],r[e]):i>t&&MS(n,[i+1],r[e])}}let i={key:nH(),item:ox(d[t].item)},a=[...d];t===void 0?a.push(i):a.splice(t+1,0,i),s(f(a),p.path,n)},[d,s,f,r,p]),g=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<t?MS(n,[i],r[e]):i>t&&MS(n,[i-1],r[e])}}s(f(d.filter((e,n)=>n!==t)),p.path,n)},[d,s,f,r,p]),_=(0,b.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let i;if(r){i={};for(let e in r){let a=parseInt(e);a==t?MS(i,[n],r[t]):a==n?MS(i,[t],r[n]):MS(i,[e],r[a])}}function a(){let e=d.slice();return e.splice(t,1),e.splice(n,0,d[t]),e}s(f(a()),p.path,i)},[d,s,f,r,p]),v=(0,b.useCallback)((e,t,n,r)=>{s(e===void 0?null:e,t,n,r)},[s]),y=(0,b.useCallback)(e=>{s(e,p.path,void 0,p?.$id)},[s,p]),x={...e,formData:o,fieldPathId:p,onSelectChange:y},S={...e,handleAddItem:m,handleCopyItem:h,handleRemoveItem:g,handleReorderItems:_,keyedFormData:d,onChange:v};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,G.jsx)($B(`UnsupportedFieldTemplate`,a,mR(n)),{schema:t,fieldPathId:i,reason:u(tH.MissingItems),registry:a});let e={...t,[tR]:{type:void 0}};x.schema=e,S.schema=e}return l.isMultiSelect(x.schema)?(0,G.jsx)(lH,{...x}):CB(n)?(0,G.jsx)(uH,{...x}):nB(x.schema)?(0,G.jsx)(mH,{...S}):l.isFilesArray(x.schema,n)?(0,G.jsx)(dH,{...x}):(0,G.jsx)(pH,{...S})}function _H(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,registry:o,required:s,disabled:c,readonly:l,hideError:u,autofocus:d,title:f,onChange:p,onFocus:m,onBlur:h,rawErrors:g}=e,{title:_}=t,{widgets:v,translateString:y,globalUiOptions:x}=o,{widget:S=`checkbox`,title:C,label:w=!0,enumNames:T,...E}=mR(r,x),D=aV(t,S,v),O=y(tH.YesLabel),k=y(tH.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=dB({oneOf:t.oneOf.map(e=>{if(Xh(e))return{...e,title:e.title||(e.const===!0?O:k)}}).filter(e=>e)},r);else{let e=t.enum??[!0,!1];A=!T&&e.length===2&&e.every(e=>typeof e==`boolean`)?[{value:e[0],label:e[0]?O:k},{value:e[1],label:e[1]?O:k}]:dB({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,G.jsx)(D,{options:{...E,enumOptions:A},schema:t,uiSchema:r,id:i.$id,name:n,onChange:M,onFocus:m,onBlur:h,label:j,hideLabel:!w,value:a,required:s,disabled:c,readonly:l,hideError:u,registry:o,autofocus:d,rawErrors:g,htmlName:i.name})}function vH(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function yH(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function bH(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function xH(e){let{id:t,formData:n,displayLabel:r=!0,schema:i,name:a,uiSchema:o,required:s,disabled:c=!1,readonly:l=!1,onBlur:u,onFocus:d,registry:f,fieldPathId:p,onChange:m,errorSchema:h}=e,{translateString:g,fields:_,globalFormOptions:v}=f,[y,x]=(0,b.useState)(yH(n)),S=mR(o),C=WV(zV(`__internal_type_selector`,v,p)),w=g(tH.Type),T=(0,b.useMemo)(()=>vH(w),[w]),E=e=>{e!=null&&(x(e),m(bH(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(tH.UnknownFieldType,[String(i.type)])}=e;return(0,G.jsx)($B(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=$B(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,G.jsx)(D,{schema:i,registry:f,typeSelector:(0,G.jsx)(O,{fieldPathId:C,name:`${a}__fallback_type`,schema:T,formData:y,onChange:E,onBlur:u,onFocus:d,registry:f,hideLabel:!r,disabled:c,readonly:l,required:s},n?cV(n):`__empty__`),schemaField:(0,G.jsx)(O,{...e,schema:{type:y,title:g(tH.Value),...y===`object`&&{additionalProperties:!0}}})})}var SH;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(SH||={});var CH;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(CH||={});var wH=/^\$lookup=(.+)/,TH=`layoutGrid`;`${TH}`;function EH(e,t){return e??t}function DH(e){return/^\d+?$/.test(e)}var OH=eV();function kH(e,t,n,r,i){let a=Q(n,[pR],{}),o=Q(n,e),s={...Q(o,[fR],{}),...t,...a},c={...o};uS(s)||MS(c,[fR],s),uS(a)||MS(c,[pR],a);let{readonly:l}=mR(c);return(i===!0||gS(l)&&r===!0)&&(l=!0,Yx(s,`readonly`)?MS(c,[fR,aR],!0):MS(c,`ui:${aR}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function AH(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=Hv([t]).sort(),i=Hv([n]).sort();switch(e){case CH.ALL:return dS(r,i);case CH.SOME:return aS(r,i).length>0;case CH.NONE:return aS(r,i).length===0;default:return!1}}function jH(e,t,n){let r={},i=e[t];if(Zv(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>TV(n,e,e)).join(` `);r={...a,className:e}}else r=a}if(!Array.isArray(i))throw TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function MH(e,t,n){let r;if(DH(n)&&e&&e?.type===`array`&&Yx(e,`items`)){let i=Number(n),a=e[tR];r=Array.isArray(a)?i>a.length?Ux(a):a[i]:a,t={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function NH(e,t,n,r,i){let{schemaUtils:a,globalFormOptions:o}=e,s=n,c=i,l=t.split(`.`),u=l.pop(),d=a.retrieveSchema(s,r),f=r,p=d.readOnly;l.forEach(e=>{if(c=zV(e,o,c),Yx(d,`properties`))s=Q(d,[iR,e],{});else if(d&&(Yx(d,`oneOf`)||Yx(d,`anyOf`))){let t=Yx(d,`oneOf`)?rR:ZL;s=Q(a.findSelectedOptionInXxxOf(d,e,t,f),[iR,e],{})}else{let t=MH(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=Q(f,e,{}),d=a.retrieveSchema(s,f),p=EH(d.readOnly,p)});let m,h=!1;if(uS(d)&&(d=void 0),d&&u){if(d&&(Yx(d,`oneOf`)||Yx(d,`anyOf`))){let e=Yx(d,`oneOf`)?rR:ZL;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=zV(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&tS(d.required,u);let e=MH(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=Q(d,[iR,u]),d&&=a.retrieveSchema(d)),p=EH(d?.readOnly,p),d&&(Yx(d,`oneOf`)||Yx(d,`anyOf`))){let e=Yx(d,`oneOf`)?rR:ZL,t=Sz(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function PH(e,t){let n=e;return Zx(n)&&(n=TV(t,n)),ug(n)?n:null}function FH(e,t){let n,r=null,i={},a;if(Zx(t)||gS(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,uS(i)||Gx(i,(t,n)=>{if(Zx(t)){let r=wH.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=TV(e,t,t)}}}),r=PH(s,e),!o&&r&&(a=(0,G.jsx)(r,{...c,"data-testid":OH.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function IH(e){let{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:a}=n,{schemaUtils:o}=r,s=o.retrieveSchema(i,a);return t.map(e=>(0,b.createElement)(HH,{...n,key:`layoutGrid-${cV(e)}`,schema:s,layoutGridSchema:e}))}function LH(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=jH(t,SH.CONDITION,i),{operator:s,field:c=``,value:l}=o;return AH(s,Q(r,c,null),l)?(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:a}):null}function RH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=jH(t,SH.COLUMN,r);return(0,G.jsx)($B(`GridTemplate`,r,mR(i)),{column:!0,"data-testid":OH.col,...o,children:(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:a})})}function zH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=jH(t,SH.COLUMNS,r),s=$B(`GridTemplate`,r,mR(i));return a.map(e=>(0,G.jsx)(s,{column:!0,"data-testid":OH.col,...o,children:(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:[e]})},`column-${cV(e)}`))}function BH(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=jH(t,SH.ROW,r);return(0,G.jsx)($B(`GridTemplate`,r,mR(i)),{...o,"data-testid":OH.row,children:(0,G.jsx)(IH,{...n,childrenLayoutGridSchemaId:a})})}function VH(e){let{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:a,onBlur:o,onFocus:s,formData:c,readonly:l,registry:u,layoutGridSchema:d,...f}=e,{onChange:p}=f,{fields:m}=u,{SchemaField:h,LayoutMultiSchemaField:g}=m,_=FH(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=NH(u,v,n,c,a),E=WV(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=kH(v,b,r,C,l);return(0,G.jsx)(e,{"data-testid":w?.hasDiscriminator?OH.layoutMultiSchemaField:OH.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:Q(i,v),fieldPathId:E,formData:Q(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,G.jsx)(y,{"data-testid":OH.uiComponent,...f,name:v,required:S,formData:c,readOnly:!!C||l,errorSchema:i,uiSchema:r,schema:n,fieldPathId:a,onBlur:o,onFocus:s,registry:u,...b}):null}function HH(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=mR(t);if(!n&&`layoutGrid`in r&&Xh(r.layoutGrid)&&(n=r[TH]),Xh(n)){if(SH.ROW in n)return(0,G.jsx)(BH,{...e,layoutGridSchema:n});if(SH.COLUMN in n)return(0,G.jsx)(RH,{...e,layoutGridSchema:n});if(SH.COLUMNS in n)return(0,G.jsx)(zH,{...e,layoutGridSchema:n});if(SH.CONDITION in n)return(0,G.jsx)(LH,{...e,layoutGridSchema:n})}return(0,G.jsx)(VH,{...e,gridSchema:n})}HH.TEST_IDS=OH;function UH(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=mR(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,G.jsx)($B(`TitleFieldTemplate`,o,c),{id:gV(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function WH(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=Q(e,[iR,t]);return Q(r,$L,Q(r,QL,`!@#!@$@#$!@$#`))===n})}function GH(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;Yx(e,`oneOf`)?o={...e,[rR]:a}:Yx(e,`anyOf`)&&(o={...e,[ZL]:a});let s=dB(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function KH(e){let{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:a,onBlur:o,onChange:s,options:c,onFocus:l,registry:u,uiSchema:d,schema:f,autofocus:p,readonly:m,required:h,errorSchema:g,hideError:_=!1}=e,{widgets:v,schemaUtils:y,globalUiOptions:x}=u,[S,C]=(0,b.useState)(GH(f,c,y,d,i)),w=Q(a,`$id`),T=Sz(f),E=$B(`FieldErrorTemplate`,u,c),D=$B(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(GH(f,c,y,d,i))},[cV(f),cV(c),y,d?cV(d):``,i?cV(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=mR(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=Q(i,j),F=Q(S[0]?.schema,[iR,j],{}),I=WH(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=aV(F,O,v),R=M===void 0?_:!!M,z=Q(g,[eR],[]),B=wS(g,[eR]),V=y.getDisplayLabel(f,d,x),H=e=>{let t=WH(S,j,e),n=WH(S,j,P),r=y.sanitizeDataForNewSchema(t,n,i);r&&t&&(r=y.getDefaultFormState(t,r,`excludeObjectChildren`)),r&&MS(r,j,e),s(r,a.path,void 0,w)},U={enumOptions:S,...N},ee=!R&&z.length>0?(0,G.jsx)(E,{fieldPathId:a,schema:f,errors:z,registry:u}):void 0;return(0,G.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&uS(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:V,errors:ee,onChange:s,onKeyRename:Sg,onKeyRenameBlur:Sg,onRemoveProperty:Sg,children:(0,G.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&uS(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:z,hideError:R,hideLabel:!V,errorSchema:B,placeholder:A,onChange:H,onBlur:o,onFocus:l,value:P,options:U,htmlName:a.name})})}var qH=class extends b.Component{constructor(e){super(e);let{formData:t,options:n,registry:{schemaUtils:r}}=this.props,i=n.map(e=>r.retrieveSchema(e,t));this.state={retrievedOptions:i,selectedOption:this.getMatchingOption(0,t,i)}}componentDidUpdate(e,t){let{formData:n,options:r,fieldPathId:i}=this.props,{selectedOption:a}=this.state,o=this.state;if(!_R(e.options,r)){let{registry:{schemaUtils:e}}=this.props;o={selectedOption:a,retrievedOptions:r.map(t=>e.retrieveSchema(t,n))}}if(!_R(n,e.formData)&&i.$id===e.fieldPathId.$id){let{retrievedOptions:e}=o,r=this.getMatchingOption(a,n,e);t&&r!==a&&(o={selectedOption:r,retrievedOptions:e})}o!==this.state&&this.setState(o)}getMatchingOption(e,t,n){let{schema:r,registry:{schemaUtils:i}}=this.props,a=Sz(r);return i.getClosestMatchingOption(t,n,e,a)}onOptionChange=e=>{let{selectedOption:t,retrievedOptions:n}=this.state,{formData:r,onChange:i,registry:a,fieldPathId:o}=this.props,{schemaUtils:s}=a,c=e===void 0?-1:parseInt(e,10);if(c===t)return;let l=c>=0?n[c]:void 0,u=t>=0?n[t]:void 0,d=s.sanitizeDataForNewSchema(l,u,r);l&&(d=s.getDefaultFormState(l,d,`excludeObjectChildren`)),this.setState({selectedOption:c},()=>{i(d,o.path,void 0,this.getFieldId())})};getFieldId(){let{fieldPathId:e,schema:t}=this.props;return`${e.$id}${t.oneOf?`__oneof_select`:`__anyof_select`}`}render(){let{name:e,disabled:t=!1,errorSchema:n={},formData:r,onBlur:i,onFocus:a,readonly:o,required:s=!1,registry:c,schema:l,uiSchema:u}=this.props,{widgets:d,fields:f,translateString:p,globalUiOptions:m,schemaUtils:h}=c,{SchemaField:g}=f,_=$B(`MultiSchemaFieldTemplate`,c,m),v=FV(c,l,s,u),y=xV(r),{selectedOption:b,retrievedOptions:x}=this.state,{widget:S=`select`,placeholder:C,autofocus:w,autocomplete:T,title:E=l.title,...D}=mR(u,m),O=aV({type:`number`},S,d),k=Q(n,eR,[]),A=wS(n,[eR]),j=h.getDisplayLabel(l,u,m),M=b>=0&&x[b]||null,N;if(M){let{required:e}=l;N=e?Tz({required:e},M):M}let P=[];`oneOf`in l&&u&&`oneOf`in u?Array.isArray(u.oneOf)?P=u[rR]:console.warn(`uiSchema.oneOf is not an array for "${E||e}"`):`anyOf`in l&&u&&`anyOf`in u&&(Array.isArray(u.anyOf)?P=u[ZL]:console.warn(`uiSchema.anyOf is not an array for "${E||e}"`));let F=u;b>=0&&P.length>b&&(F=P[b]);let I=E?tH.TitleOptionPrefix:tH.OptionPrefix,L=E?[E]:[],R=x.map((e,t)=>{let{title:n=e.title}=mR(P[t]);return{label:n||p(I,L.concat(String(t+1))),value:t}});return(0,G.jsx)(_,{schema:l,registry:c,uiSchema:u,selector:!v||y?(0,G.jsx)(O,{id:this.getFieldId(),name:`${e}${l.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:this.onOptionChange,onBlur:i,onFocus:a,disabled:t||uS(R),multiple:!1,rawErrors:k,errorSchema:A,value:b>=0?b:void 0,options:{enumOptions:R,...D},registry:c,placeholder:C,autocomplete:T,autofocus:w,label:E??e,hideLabel:!j,readonly:o}):void 0,optionSchemaField:N&&N.type!==`null`&&(0,G.jsx)(g,{...this.props,schema:N,uiSchema:F})||null})}},JH=/\.([0-9]*0)*$/,YH=/[0.]0*$/;function XH(e){let{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=(0,b.useState)(i),{StringField:s}=t.fields,c=r,l=(0,b.useCallback)((e,t,r,i)=>{o(e),`${e}`.charAt(0)===`.`&&(e=`0${e}`),n(typeof e==`string`&&e.match(JH)?qL(e.replace(YH,``)):qL(e),t,r,i)},[n]);if(typeof a==`string`&&typeof c==`number`){let e=RegExp(`^(${String(c).replace(`.`,`\\.`)})?\\.?0*$`);a.match(e)&&(c=a)}return(0,G.jsx)(s,{...e,formData:c,onChange:l})}function ZH(){return ZH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZH.apply(null,arguments)}var QH=[`strong`,`em`,`del`,`mark`],$H=[[`**`,QH[0]],[`__`,QH[0]],[`~~`,QH[2]],[`==`,QH[3]],[`*`,`em`],[`_`,`em`]];function eU(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]===`\\`?r+=2:(e[r]===`[`&&n++,e[r]===`]`&&n--,r++);if(n===0&&r<e.length&&(e[r]===`(`||e[r]===`[`)){var i=e[r]===`(`?`)`:`]`,a=1;for(r++;r<e.length&&a>0;)e[r]===`\\`?r+=2:(e[r]===`(`&&i===`)`&&a++,e[r]===i&&a--,r++);if(a===0)return r}return-1}function tU(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!==`*`&&n!==`_`&&n!==`~`&&n!==`=`)return null;for(var r=``,i=0,a=``,o=0;o<6;o++){var s=$H[o][0];if(e.startsWith(s)&&e.length>=2*s.length){r=s,i=s.length,a=$H[o][1];break}}if(!r)return null;for(var c=i,l=!1,u=!1,d=``,f=0,p=``,m=!1,h=``;c<e.length;){var g=e[c];if(m)p+=g,m=!1,h=g,c++;else if(g!==`\\`)if(g!=="`"||f!==0){if(g===`[`&&!l&&f===0){var _=eU(e,c);if(_!==-1){p+=e.slice(c,_),c=_,h=e[_-1];continue}}if(u)p+=g,d?g===d&&(d=``):g===`"`||g===`'`?d=g:g===`>`&&(u=!1),h=g,c++;else if(g!==`<`||l){if(g===`
|
|
63
63
|
`&&h===`
|
|
64
64
|
`&&!l&&f===0)return null;if(!l&&f===0){for(var v=0;c+v<e.length&&e[c+v]===r[0];)v++;if(v>=i&&(i!==1||r!==`*`&&r!==`_`||e[c-1]!==r&&e[c+1]!==r)){var y=[e.slice(0,c+v),a,p+e.slice(c+i,c+v)];return y.index=0,y.input=e,y}}p+=g,h=g,c++}else{var b=e[c+1],x=e.indexOf(`>`,c);if(x!==-1){var S=e.slice(c,x+1).endsWith(`/>`);b===`/`?f=Math.max(0,f-1):S||f++}u=!0,p+=g,h=g,c++}}else l=!l,p+=g,h=g,c++;else p+=g,m=!0,h=g,c++}return null}var nU=[`children`,`options`],rU=`allowFullScreen.allowTransparency.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),iU={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},aU=[`style`,`script`,`pre`],oU=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],sU=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,cU=/\n{2,}$/,lU=/^(\s*>[\s\S]*?)(?=\n\n|$)/,uU=/^ *> ?/gm,dU=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,fU=/^ {2,}\n/,pU=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,mU=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,hU=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,gU=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,_U=/^(?:\n *)*\n/,vU=/\r\n?/g,yU=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,bU=/^\[\^([^\]]+)]/,xU=/\f/g,SU=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,CU=/^\[(x|\s)\]/,wU=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,TU=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,EU=/^([^\n]+)\n *(=|-)\2{2,} *\n/,DU=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function OU(e){let t=DU.exec(e);if(!t)return null;let n=t[1],r=n.toLowerCase(),i=r.length+1,a=t[0].length;e[a]===`
|
|
65
65
|
`&&a++;let o=a,s=a,c=1,l=e.length;for(;c>0;){let t=e.indexOf(`<`,a);if(t===-1)return null;let o=-1,u=-1;if(e[t+1]===`/`)u=t;else if(e[t+1]===r[0]||e[t+1]===n[0]){let a=!0;for(let i=0;i<r.length;i++){let o=e[t+1+i];if(o!==r[i]&&o!==n[i]){a=!1;break}}!a||e[t+i]!==` `&&e[t+i]!==`>`||(o=t)}if(o!==-1||u!==-1)if(o!==-1&&(u===-1||o<u))a=o+i+1,c++;else{let t=u+2;for(;t<l;){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
@@ -82,7 +82,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
82
82
|
`))return null;let n=``,r=0;for(;;){let t=e.indexOf(`
|
|
83
83
|
`,r),i=e.slice(r,t===-1?void 0:t+1),o=e[r];if((o===`>`||o===`#`||o===`|`||o==="`"||o===`~`||o===`*`||o===`-`||o===`_`||o===` `)&&WW(a,i)||(n+=i,t===-1||!i.trim()))break;r=t+1}let i=yW(n);return i===``?null:[n,,i]}),u:3,i:zW},22:{t:[`[`],o:kW(zU),u:0,i:e=>(u[e[1]]={target:e[2],title:e[4]},{})},23:{t:[`![`],o:AW(BU),u:0,i:e=>({alt:e[1]?FW(e[1]):void 0,ref:e[2]})},24:{t:e=>e[0]===`[`&&!xW(e,`](`),o:kW(VU),u:0,i:(e,t,n)=>({children:t(e[1],n),fallbackChildren:e[0],ref:e[2]})},25:{t:[`|`],o:jW(LU),u:1,i:EW},27:{o:OW(function(e,t){let n;return bW(e,`:`)&&(n=JU.exec(e)),n||ZU.exec(e)}),u:4,i(e){let n=e[0];return{text:xW(n,`&`)?n.replace(kU,(e,n)=>t.namedCodesToUnicode[n]||e):n}}},34:{t:[`*`,`_`,`~`,`=`],o:OW(tU),u:2,i:(e,t,n)=>({children:t(e[2],n),tag:e[1]})},28:{t:[`\\`],o:AW(YU),u:1,i:e=>({text:e[1],type:`27`})}};!0===t.disableParsingRawHTML&&(delete d[11],delete d[13]);let f=function(e){var t=Object.keys(e);function n(r,i){var a=[];if(i.prevCapture=i.prevCapture||``,r.trim())for(;r;)for(var o=0;o<t.length;){var s=t[o],c=e[s];if(!c.t||SW(r,i,c.t)){var l=c.o(r,i);if(l&&l[0]){r=r.substring(l[0].length);var u=c.i(l,n,i);i.prevCapture+=l[0],u.type||=s,a.push(u);break}o++}else o++}return i.prevCapture=``,a}return t.sort(function(t,n){return e[t].u-e[n].u||(t<n?-1:1)}),function(e,t){return n(function(e){return e.replace(vU,`
|
|
84
84
|
`).replace(xU,``).replace(UU,` `)}(e),t)}}(d),p=function(e,t,n,r,i){function a(e){return Array.isArray(e)?e.map(e=>`text`in e?e.text:``):`text`in e?e.text:``}return function o(s,c={}){let l=(c.renderDepth||0)+1;if(l>2500)return a(s);c.renderDepth=l;try{if(Array.isArray(s)){let e=c.key,t=[],n=!1;for(let e=0;e<s.length;e++){c.key=e;let r=o(s[e],c),i=vW(r);i&&n?t[t.length-1]+=r:r!==null&&t.push(r),n=i}return c.key=e,c.renderDepth=l-1,t}let a=function(a,o,s){let c=()=>function(e,t,n,r,i,a,o){switch(e.type){case`0`:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),CW),e.children.unshift({attrs:{},children:[{type:`27`,text:e.alert}],noInnerParse:!0,type:`11`,tag:`header`})),r(`blockquote`,i,t(e.children,n))}case`1`:return r(`br`,{key:n.key});case`2`:return r(`hr`,{key:n.key});case`3`:return r(`pre`,{key:n.key},r(`code`,ZH({},e.attrs,{className:e.lang?`lang-`+e.lang:``}),e.text));case`5`:return r(`code`,{key:n.key},e.text);case`7`:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)},r(`sup`,{key:n.key},e.text));case`8`:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case`9`:return r(`h`+e.level,{id:e.id,key:n.key},t(e.children,n));case`11`:return r(e.tag,ZH({key:n.key},e.attrs),e.text||(e.children?t(e.children,n):``));case`13`:return r(e.tag,ZH({},e.attrs,{key:n.key}));case`14`:return r(`img`,{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:i(e.target,`img`,`src`)});case`15`:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`),title:e.title},t(e.children,n));case`23`:return o[e.ref]?r(`img`,{key:n.key,alt:e.alt,src:i(o[e.ref].target,`img`,`src`),title:o[e.ref].title}):null;case`24`:return o[e.ref]?r(`a`,{key:n.key,href:i(o[e.ref].target,`a`,`href`),title:o[e.ref].title},t(e.children,n)):r(`span`,{key:n.key},e.fallbackChildren);case`25`:{let i=e;return r(`table`,{key:n.key},r(`thead`,null,r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:DW(i,a)},t(e,n))}))),r(`tbody`,null,i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:DW(i,a)},t(e,n))}))})))}case`27`:return e.text;case`34`:return r(e.tag,{key:n.key},t(e.children,n));case`20`:case`30`:return r(e.ordered?`ol`:`ul`,{key:n.key,start:e.type===`20`?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case`19`:return`
|
|
85
|
-
`;case`21`:return r(`p`,{key:n.key},t(e.children,n));default:return null}}(a,o,s,t,n,r,i);return e?e(c,a,o,s):c()}(s,o,c);return c.renderDepth=l-1,a}catch(e){if(e instanceof RangeError&&e.message.includes(`Maximum call stack`))return a(s);throw e}}}(t.renderRule,s,r,n,u);return c(e)}var KW=e=>{let{children:t,options:n}=e,r=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(e,nU);return GW(t??``,ZH({},n,{wrapperProps:ZH({},n?.wrapperProps,r)}))},qW=Symbol(`remove-this-key`),JW=Symbol(`reset`);function YW(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function XW(e,t){switch(t){case`array`:return[];case`boolean`:return!1;case`null`:return null;case`number`:return 0;case`object`:return{};default:return e(tH.NewStringDefault)}}function ZW(e){let{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:a,formData:o,onChange:s,onBlur:c,onFocus:l,disabled:u,readonly:d,required:f,hideError:p,propertyName:m,handleKeyRename:h,handleRemoveProperty:g,addedByAdditionalProperties:_}=e,[v,y]=(0,b.useState)(!1),{globalFormOptions:x,fields:S}=r,{SchemaField:C}=S,w=WV(zV(m,x,t.path)),T=(0,b.useCallback)((e,t,n,r)=>{e===void 0&&_&&(e=``),s(e,t,n,r)},[s,_]),E=(0,b.useCallback)(e=>{m!==e&&y(!0),h(m,e)},[m,h]);return(0,G.jsx)(C,{name:m,required:f,schema:n,uiSchema:i,errorSchema:a,fieldPathId:w,formData:o,wasPropertyKeyModified:v,onKeyRename:E,onKeyRenameBlur:(0,b.useCallback)(e=>{let{target:{value:t}}=e;E(t)},[E]),onRemoveProperty:(0,b.useCallback)(()=>{g(m)},[m,g]),onChange:T,onBlur:c,onFocus:l,registry:r,disabled:u,readonly:d,hideError:p})}function QW(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,required:s=!1,disabled:c,readonly:l,hideError:u,onBlur:d,onFocus:f,onChange:p,registry:m,title:h}=e,{fields:g,schemaUtils:_,translateString:v,globalUiOptions:y}=m,{OptionalDataControlsField:x}=g,S=_.retrieveSchema(t,r,!0),C=mR(n,y),{properties:w={}}=S,T=e.childFieldPathId??a,E=C.title??S.title??h??o,D=C.description??S.description,O=FV(m,S,s,n),k=xV(r),A=[],j=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=mR(n,y),i=0,a=e;for(;Yx(t,a);)a=`${e}${r}${++i}`;return a},[n,y]),M=(0,b.useCallback)(()=>{if(!(S.additionalProperties||S.patternProperties))return;let{translateString:e}=m,t={...r},n=j(`newKey`,t);if(S.patternProperties)MS(t,n,null);else{let i,a,o;if(Xh(S.additionalProperties)){i=S.additionalProperties.type,a=S.additionalProperties.const,o=S.additionalProperties.default;let e=S.additionalProperties;if(`$ref`in e){let{schemaUtils:t}=m;e=t.retrieveSchema({[sR]:e[sR]},r),i=e.type,a=e.const,o=e.default}!i&&(`anyOf`in e||`oneOf`in e)&&(i=`object`)}MS(t,n,a??o??XW(e,i))}p(t,T.path)},[r,p,m,T,j,S]),N=(0,b.useCallback)((e,t)=>{if(e!==t){let n=j(t,r),i={...r},a={[e]:n},o=Object.keys(i).map(e=>({[a[e]||e]:i[e]}));p(Object.assign({},...o),T.path)}},[r,p,T,j]),P=(0,b.useCallback)(e=>{p(qW,[...T.path,e])},[p,T]);if(!O||k)try{A=EV(Object.keys(w),C.order)}catch(e){return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},children:v(tH.InvalidObjectField,[o||`root`,e.message])})}),(0,G.jsx)(`pre`,{children:JSON.stringify(S)})]})}let F=$B(`ObjectFieldTemplate`,m,C),I=O?(0,G.jsx)(x,{...e,fieldPathId:T,schema:S}):void 0;return(0,G.jsx)(F,{title:C.label===!1?``:E,description:C.label===!1?void 0:D,properties:A.map(e=>{let t=Yx(S,[iR,e,JL]),a=t?n.additionalProperties:n[e],o=mR(a).widget===`hidden`;return{content:(0,G.jsx)(ZW,{propertyName:e,required:YW(S,e),schema:Q(S,[iR,e],{}),uiSchema:a,errorSchema:Q(i,[e]),fieldPathId:T,formData:Q(r,[e]),handleKeyRename:N,handleRemoveProperty:P,addedByAdditionalProperties:t,onChange:p,onBlur:d,onFocus:f,registry:m,disabled:c,readonly:l,hideError:u},e),name:e,readonly:l,disabled:c,required:s,hidden:o}}),readonly:l,disabled:c,required:s,fieldPathId:a,uiSchema:n,errorSchema:i,schema:S,formData:r,registry:m,optionalDataControl:I,className:O?`rjsf-optional-object-field`:void 0,onAddProperty:M})}function $W(e){let{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:a=!1,onChange:o,errorSchema:s,fieldPathId:c,registry:l}=e,{globalUiOptions:u={},schemaUtils:d,translateString:f}=l,p=$B(`OptionalDataControlsTemplate`,l,mR(n,u)),m=xV(r),h,g,_,v;return i||a?(h=bV(c,`Msg`),g=m?void 0:f(tH.OptionalObjectEmptyMsg)):(g=f(m?tH.OptionalObjectRemove:tH.OptionalObjectAdd),m?(h=bV(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=bV(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=wz(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,G.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var eG={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function tG(e,t,n){let r=t.field,{fields:i}=n;if(typeof r==`function`)return r;if(typeof r==`string`&&r in i)return i[r];let a=wz(e),o=Array.isArray(a)?a[0]:a||``,s=e.$id,c=eG[o];return s&&s in i&&(c=s),!c&&(e.anyOf||e.oneOf)?()=>null:c in i?i[c]:i.FallbackField}function nG(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:a,name:o,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d=!1,registry:f,wasPropertyKeyModified:p=!1}=e,{schemaUtils:m,globalFormOptions:h,globalUiOptions:g,fields:_}=f,{AnyOfField:v,OneOfField:y}=_,x=jV(t,r,f),S=mR(x,g),C=$B(`FieldTemplate`,f,S),w=$B(`DescriptionFieldTemplate`,f,S),T=$B(`FieldHelpTemplate`,f,S),E=$B(`FieldErrorTemplate`,f,S),D=m.retrieveSchema(t,i),O=n.$id,k=(0,b.useCallback)((e,t,n,r)=>s(e,t,n,r||O),[O,s]),A=tG(D,S,f),j=!!(S.disabled??e.disabled),M=!!(S.readonly??(e.readonly||e.schema.readOnly||D.readOnly)),N=S.hideError,P=N===void 0?e.hideError:!!N,F=!!(S.autofocus??e.autofocus);if(Object.keys(D).length===0)return null;let I=m.getDisplayLabel(D,x,g),L=S.field&&S.fieldReplacesAnyOrOneOf===!0,R,z,B={fieldPathId:n};if((`anyOf`in D||`oneOf`in D)&&!L&&!m.isSelect(D)){D.anyOf?(R=v,z=D[ZL].map(e=>m.retrieveSchema(Xh(e)?e:{},i))):D.oneOf&&(R=y,z=D[rR].map(e=>m.retrieveSchema(Xh(e)?e:{},i)));let e=FV(f,D,d,x),t=xV(i);I&&=!e||t,B={childFieldPathId:n,fieldPathId:zV(`XxxOf`,h,n)}}let{__errors:V,...H}=a||{},U=wS(x,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in U&&(U[fR]=wS(U[fR],[`classNames`,`style`]));let ee=(0,G.jsx)(A,{...e,onChange:k,...B,schema:D,uiSchema:U,disabled:j,readonly:M,hideError:P,autofocus:F,errorSchema:H,rawErrors:V}),W=n.$id,te;te=p||`__additional_property`in D?o:S.title||e.schema.title||D.title||e.title||o;let ne=S.description||e.schema.description||D.description||``,re=S.help,ie=S.widget===`hidden`,ae=[`rjsf-field`,`rjsf-field-${wz(D)}`];!P&&V&&V.length>0&&ae.push(`rjsf-field-error`),S.classNames&&ae.push(S.classNames);let oe=(0,G.jsx)(T,{help:re,fieldPathId:n,schema:D,uiSchema:x,hasErrors:!P&&V&&V.length>0,registry:f}),se=P||R&&!m.isSelect(D)?void 0:(0,G.jsx)(E,{errors:V,errorSchema:a,fieldPathId:n,schema:D,uiSchema:x,registry:f});return(0,G.jsx)(C,{description:(0,G.jsx)(w,{id:fV(W),description:ne,schema:D,uiSchema:x,registry:f}),rawDescription:ne,help:oe,rawHelp:typeof re==`string`?re:void 0,errors:se,rawErrors:P?void 0:V,fieldPathId:n,id:W,label:te,hidden:ie,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:j,readonly:M,hideError:P,displayLabel:I,classNames:ae.join(` `).trim(),style:S.style,formData:i,schema:D,uiSchema:x,registry:f,children:(0,G.jsxs)(G.Fragment,{children:[ee,R&&(0,G.jsx)(R,{name:o,disabled:j,readonly:M,hideError:P,errorSchema:a,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:z,registry:f,required:d,schema:D,uiSchema:x})]})})}var rG=class extends b.Component{shouldComponentUpdate(e){let{registry:{globalFormOptions:t}}=this.props,{experimental_componentUpdateStrategy:n=`customDeep`}=t;return NV(this,e,this.state,n)}render(){return(0,G.jsx)(nG,{...this.props})}};function iG(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,required:o,disabled:s=!1,readonly:c=!1,autofocus:l=!1,onChange:u,onBlur:d,onFocus:f,registry:p,rawErrors:m,hideError:h,title:g}=e,{title:_,format:v}=t,{widgets:y,schemaUtils:x,globalUiOptions:S}=p,C=x.isSelect(t)?dB(t,r):void 0,w=C?`select`:`text`;v&&uV(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=mR(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=aV(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,G.jsx)(j,{options:{...O,enumOptions:C},schema:t,uiSchema:r,id:i.$id,name:n,label:A,hideLabel:!k,hideError:h,value:a,onChange:M,onBlur:d,onFocus:f,required:o,disabled:s,readonly:c,autofocus:l,registry:p,placeholder:E,rawErrors:m,htmlName:i.name})}function aG(e){let{formData:t,onChange:n,fieldPathId:r}=e;return(0,b.useEffect)(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function oG(){return{AnyOfField:qH,ArrayField:gH,BooleanField:_H,FallbackField:xH,LayoutGridField:HH,LayoutHeaderField:UH,LayoutMultiSchemaField:KH,NumberField:XH,ObjectField:QW,OneOfField:qH,OptionalDataControlsField:$W,SchemaField:rG,StringField:iG,NullField:aG}}function sG(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=mR(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,G.jsx)($B(`DescriptionFieldTemplate`,r,o),{id:fV(t),description:n,schema:i,uiSchema:a,registry:r})}function cG(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=$B(`ArrayFieldItemButtonsTemplate`,s,mR(c)),u={flex:1,paddingLeft:6,paddingRight:6,fontWeight:`bold`},d=a?31:9,f={display:`flex`,alignItems:i?`center`:`baseline`},p={display:`flex`,justifyContent:`flex-end`,marginTop:i?`${d}px`:0};return(0,G.jsxs)(`div`,{className:n,style:f,children:[(0,G.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,G.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,G.jsx)(`div`,{className:`btn-group`,style:p,children:(0,G.jsx)(l,{...r,style:u})})})]})}function lG(e){let{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:a,fieldPathId:o,onCopyItem:s,onRemoveItem:c,onMoveDownItem:l,onMoveUpItem:u,readonly:d,registry:f,uiSchema:p}=e,{CopyButton:m,MoveDownButton:h,MoveUpButton:g,RemoveButton:_}=f.templates.ButtonTemplates;return(0,G.jsxs)(G.Fragment,{children:[(i||r)&&(0,G.jsx)(g,{id:yV(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,G.jsx)(h,{id:yV(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,G.jsx)(m,{id:yV(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,G.jsx)(_,{id:yV(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function uG(e){let{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:a,items:o,optionalDataControl:s,onAddClick:c,readonly:l,registry:u,required:d,schema:f,title:p}=e,m=mR(a),h=$B(`ArrayFieldDescriptionTemplate`,u,m),g=$B(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,G.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,G.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,G.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,G.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,G.jsx)(v,{id:yV(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function dG(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=mR(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,G.jsx)($B(`TitleFieldTemplate`,o,c),{id:gV(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function fG(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,G.jsx)(`datalist`,{id:mV(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,G.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function pG(e){let{id:t,name:n,htmlName:r,value:i,readonly:a,disabled:o,autofocus:s,onBlur:c,onFocus:l,onChange:u,onChangeOverride:d,options:f,schema:p,uiSchema:m,registry:h,rawErrors:g,type:_,hideLabel:v,hideError:y,...x}=e,{ClearButton:S}=h.templates.ButtonTemplates;if(!t)throw console.log(`No id for`,e),Error(`no id for props ${JSON.stringify(e)}`);let C={...x,...XB(p,_,f)},w;w=C.type===`number`||C.type===`integer`?i||i===0?i:``:i??``;let T=(0,b.useCallback)(({target:{value:e}})=>u(e===``?f.emptyValue:e),[u,f]),E=(0,b.useCallback)(({target:e})=>c(t,e&&e.value),[c,t]),D=(0,b.useCallback)(({target:e})=>l(t,e&&e.value),[l,t]),O=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),u(f.emptyValue??``)},[u,f.emptyValue]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?mV(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":_V(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,G.jsx)(S,{registry:h,onClick:O}),(0,G.jsx)(fG,{id:t,schema:p})]})}function mG({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=QB(e);return n?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function hG(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,G.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,G.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}function gG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.CopyButton),...e,icon:`copy`})}function _G(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.MoveDownButton),...e,icon:`arrow-down`})}function vG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.MoveUpButton),...e,icon:`arrow-up`})}function yG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.RemoveButton),...e,iconType:`danger`,icon:`remove`})}function bG({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,G.jsx)(hG,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(tH.ClearButton),onClick:n,disabled:r,registry:i,...a})}function xG({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,G.jsx)(`div`,{className:`row`,children:(0,G.jsx)(`p`,{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:(0,G.jsx)(hG,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(tH.AddButton),onClick:n,disabled:r,registry:i})})})}function SG(){return{SubmitButton:mG,AddButton:xG,CopyButton:gG,MoveDownButton:_G,MoveUpButton:vG,RemoveButton:yG,ClearButton:bG}}var CG=eV();function wG({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return mR(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},"data-testid":CG.markdown,children:e}):e}wG.TEST_IDS=CG;function TG(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,G.jsx)(`div`,{id:t,className:`field-description`,children:(0,G.jsx)(wG,{description:n,registry:r,uiSchema:i})}):null}function EG({errors:e,registry:t}){let{translateString:n}=t;return(0,G.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,G.jsx)(`div`,{className:`panel-heading`,children:(0,G.jsx)(`h3`,{className:`panel-title`,children:n(tH.ErrorsLabel)})}),(0,G.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,G.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function DG(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,G.jsx)($B(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}var OG=`*`;function kG(e){let{label:t,required:n,id:r}=e;return t?(0,G.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,G.jsx)(`span`,{className:`required`,children:OG})]}):null}function AG(e){let{id:t,label:n,children:r,errors:i,help:a,description:o,hidden:s,required:c,displayLabel:l,registry:u,uiSchema:d}=e,f=mR(d),p=$B(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,G.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,G.jsxs)(p,{...e,children:[l&&!m&&(0,G.jsx)(kG,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var jG=AG;function MG(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(`ul`,{id:pV(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,G.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var NG=eV();function PG({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return mR(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},"data-testid":NG.markdown,children:e}):e}PG.TEST_IDS=NG;function FG(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,G.jsx)(`div`,{id:hV(t),className:`help-block`,children:(0,G.jsx)(PG,{help:n,registry:i,uiSchema:r})}):null}function IG(e){let{children:t,column:n,className:r,...i}=e;return(0,G.jsx)(`div`,{className:r,...i,children:t})}function LG(e){let{selector:t,optionSchemaField:n}=e;return(0,G.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,G.jsx)(`div`,{className:`form-group`,children:t}),n]})}function RG(e){let{className:t,description:n,disabled:r,formData:i,fieldPathId:a,onAddProperty:o,optionalDataControl:s,properties:c,readonly:l,registry:u,required:d,schema:f,title:p,uiSchema:m}=e,h=mR(m),g=$B(`TitleFieldTemplate`,u,h),_=$B(`DescriptionFieldTemplate`,u,h);if((f.oneOf||f.anyOf)&&!f.properties&&c.length===0)return null;let v=!l&&!r,{ButtonTemplates:{AddButton:y}}=u.templates;return(0,G.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,G.jsx)(g,{id:gV(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,G.jsx)(_,{id:fV(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),hR(f,m,i)&&(0,G.jsx)(y,{id:yV(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function zG(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,G.jsx)(hG,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,G.jsx)(hG,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,G.jsx)(`em`,{id:t,children:r})}var BG=`*`;function VG(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,G.jsxs)(`legend`,{id:t,children:[n,r&&(0,G.jsx)(`span`,{className:`required`,children:BG}),i&&(0,G.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function HG(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=tH.UnsupportedField,s=[];return n&&n.$id&&(o=tH.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===tH.UnsupportedField?tH.UnsupportedFieldWithReason:tH.UnsupportedFieldWithIdAndReason,s.push(r)),(0,G.jsxs)(`div`,{className:`unsupported-field`,children:[(0,G.jsx)(`p`,{children:(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,G.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function UG(e){let{id:t,classNames:n,style:r,disabled:i,displayLabel:a,label:o,onKeyRenameBlur:s,onRemoveProperty:c,rawDescription:l,readonly:u,required:d,schema:f,hideError:p,rawErrors:m,children:h,uiSchema:g,registry:_}=e,{templates:v,translateString:y}=_,{RemoveButton:b}=v.ButtonTemplates,x=y(tH.KeyLabel,[o]),S=JL in f,C=!!l,w=[`form-group`,n];!p&&m&&m.length>0&&w.push(`has-error has-danger`);let T=w.join(` `).trim();if(!S)return(0,G.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,G.jsx)(`div`,{className:T,style:r,children:(0,G.jsxs)(`div`,{className:`row`,children:[(0,G.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,G.jsxs)(`div`,{className:`form-group`,children:[a&&(0,G.jsx)(kG,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,G.jsx)(`div`,{children:`\xA0`}),(0,G.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o})]})}),(0,G.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,G.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,G.jsx)(b,{id:yV(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function WG(){return{ArrayFieldDescriptionTemplate:sG,ArrayFieldItemTemplate:cG,ArrayFieldItemButtonsTemplate:lG,ArrayFieldTemplate:uG,ArrayFieldTitleTemplate:dG,ButtonTemplates:SG(),BaseInputTemplate:pG,DescriptionFieldTemplate:TG,ErrorListTemplate:EG,FallbackFieldTemplate:DG,FieldTemplate:jG,FieldErrorTemplate:MG,FieldHelpTemplate:FG,GridTemplate:IG,MultiSchemaFieldTemplate:LG,ObjectFieldTemplate:RG,OptionalDataControlsTemplate:zG,TitleFieldTemplate:VG,UnsupportedFieldTemplate:HG,WrapIfAdditionalTemplate:UG}}function GG(e){let{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:a,name:o,registry:s,onBlur:c,onFocus:l}=e,{translateString:u}=s,{elements:d,handleChange:f,handleClear:p,handleSetNow:m}=UV(e);return(0,G.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(HV,{rootId:a,name:o,select:f,...e,disabled:t,readonly:n,registry:s,onBlur:c,onFocus:l,autofocus:r&&i===0})},i)),(i.hideNowButton===`undefined`?!0:!i.hideNowButton)&&(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(`a`,{href:`#`,className:`btn btn-info btn-now`,onClick:m,children:u(tH.NowLabel)})}),(i.hideClearButton===`undefined`?!0:!i.hideClearButton)&&(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(`a`,{href:`#`,className:`btn btn-warning btn-clear`,onClick:p,children:u(tH.ClearLabel)})})]})}function KG({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,G.jsx)(n,{time:e,...t})}function qG({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:a,readonly:o,label:s,hideLabel:c,autofocus:l=!1,onBlur:u,onFocus:d,onChange:f,registry:p,htmlName:m}){let h=$B(`DescriptionFieldTemplate`,p,n),g=MV(e),_=(0,b.useCallback)(e=>f(e.target.checked),[f]),v=(0,b.useCallback)(e=>u(r,e.target.checked),[u,r]),y=(0,b.useCallback)(e=>d(r,e.target.checked),[d,r]),x=mR(t).widget===`checkbox`?void 0:n.description??e.description;return(0,G.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,G.jsx)(h,{id:fV(r),description:x,schema:e,uiSchema:t,registry:p}),(0,G.jsxs)(`label`,{children:[(0,G.jsx)(`input`,{type:`checkbox`,id:r,name:m||r,checked:i===void 0?!1:i,required:g,disabled:a||o,autoFocus:l,onChange:_,onBlur:v,onFocus:y,"aria-describedby":_V(r)}),CV((0,G.jsx)(`span`,{children:s}),c)]})]})}function JG({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:a},value:o,autofocus:s=!1,readonly:c,onChange:l,onBlur:u,onFocus:d,htmlName:f}){let p=Array.isArray(o)?o:[o],m=(0,b.useCallback)(({target:t})=>u(e,VB(t&&t.value,r,a)),[u,e,r,a]),h=(0,b.useCallback)(({target:t})=>d(e,VB(t&&t.value,r,a)),[d,e,r,a]);return(0,G.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(r)&&r.map((a,o)=>{let u=UB(a.value,p),d=Array.isArray(i)&&i.indexOf(a.value)!==-1,g=t||d||c?`disabled`:``,_=(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`input`,{type:`checkbox`,id:vV(e,o),name:f||e,checked:u,value:String(o),disabled:t||d||c,autoFocus:s&&o===0,onChange:e=>{e.target.checked?l(GB(o,p,r)):l(HB(o,p,r))},onBlur:m,onFocus:h,"aria-describedby":_V(e)}),(0,G.jsx)(`span`,{children:a.label})]});return n?(0,G.jsx)(`label`,{className:`checkbox-inline ${g}`,children:_},o):(0,G.jsx)(`div`,{className:`checkbox ${g}`,children:(0,G.jsx)(`label`,{children:_})},o)})})}function YG(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,G.jsx)($B(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function XG(e){let{onChange:t,options:n,registry:r}=e,i=$B(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,G.jsx)(i,{type:`date`,...e,onChange:a})}function ZG(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,G.jsx)($B(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:XV(n),onChange:e=>t(wV(e))})}function QG(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`email`,...e})}function $G({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;return r?[`image/jpeg`,`image/png`].includes(i)?(0,G.jsx)(`img`,{src:r,style:{maxWidth:`100%`},className:`file-preview`}):(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:n(tH.PreviewLabel)})]}):null}function eK({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=$B(`ButtonTemplates`,t,i);return(0,G.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,G.jsxs)(`li`,{children:[(0,G.jsx)(KW,{children:a(tH.FilesInfo,[s,l,String(c)])}),n&&(0,G.jsx)($G,{fileInfo:e,registry:t}),(0,G.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function tK(e){let{disabled:t,readonly:n,required:r,multiple:i,onChange:a,value:o,options:s,registry:c}=e,{filesInfo:l,handleChange:u,handleRemove:d}=YV(o,a,i),f=$B(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(f,{...e,disabled:t||n,type:`file`,required:o?!1:r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,G.jsx)(eK,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function nK({id:e,value:t,htmlName:n}){return(0,G.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function rK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`password`,...e})}function iK({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:a=!1,onBlur:o,onFocus:s,onChange:c,id:l,htmlName:u}){let{enumOptions:d,enumDisabled:f,inline:p,emptyValue:m}=e,h=(0,b.useCallback)(({target:e})=>o(l,VB(e&&e.value,d,m)),[o,d,m,l]),g=(0,b.useCallback)(({target:e})=>s(l,VB(e&&e.value,d,m)),[s,d,m,l]);return(0,G.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=UB(e.value,t),d=Array.isArray(f)&&f.indexOf(e.value)!==-1,m=r||d||i?`disabled`:``,_=(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`input`,{type:`radio`,id:vV(l,o),checked:s,name:u||l,required:n,value:String(o),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:h,onFocus:g,"aria-describedby":_V(l)}),(0,G.jsx)(`span`,{children:e.label})]});return p?(0,G.jsx)(`label`,{className:`radio-inline ${m}`,children:_},o):(0,G.jsx)(`div`,{className:`radio ${m}`,children:(0,G.jsx)(`label`,{children:_})},o)})})}function aK(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,G.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,G.jsx)(n,{type:`range`,...e}),(0,G.jsx)(`span`,{className:`range-view`,children:t})]})}function oK({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:a,onChange:o,onFocus:s,onBlur:c,schema:l,options:u,htmlName:d}){let{stars:f=5,shape:p=`star`}=u,m=l.maximum?Math.min(l.maximum,5):Math.min(Math.max(f,1),5),h=l.minimum||0,g=(0,b.useCallback)(e=>{!r&&!i&&o(e)},[o,r,i]),_=(0,b.useCallback)(t=>{s&&s(e,Number(t.target.dataset.value))},[s,e]),v=(0,b.useCallback)(t=>{c&&c(e,Number(t.target.dataset.value))},[c,e]),y=e=>p===`heart`?e?`♥`:`♡`:e?`★`:`☆`;return(0,G.jsx)(G.Fragment,{children:(0,G.jsxs)(`div`,{className:`rating-widget`,style:{display:`inline-flex`,fontSize:`1.5rem`,cursor:r||i?`default`:`pointer`},children:[[...Array(m)].map((e,n)=>{let a=h+n,o=a<=t;return(0,G.jsx)(`span`,{onClick:()=>g(a),onFocus:_,onBlur:v,"data-value":a,tabIndex:r||i?-1:0,role:`radio`,"aria-checked":a===t,"aria-label":`${a} ${p===`heart`?`heart`:`star`}${a===1?``:`s`}`,style:{color:o?`#FFD700`:`#ccc`,padding:`0 0.2rem`,transition:`color 0.2s`,userSelect:`none`},children:y(o)},n)}),(0,G.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})})}function sK(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function cK({schema:e,id:t,options:n,value:r,required:i,disabled:a,readonly:o,multiple:s=!1,autofocus:c=!1,onChange:l,onBlur:u,onFocus:d,placeholder:f,htmlName:p}){let{enumOptions:m,enumDisabled:h,emptyValue:g}=n,_=s?[]:``,v=(0,b.useCallback)(e=>d(t,VB(sK(e,s),m,g)),[d,t,s,m,g]),y=(0,b.useCallback)(e=>u(t,VB(sK(e,s),m,g)),[u,t,s,m,g]),x=(0,b.useCallback)(e=>l(VB(sK(e,s),m,g)),[l,s,m,g]),S=WB(r,m,s),C=!s&&e.default===void 0;return(0,G.jsxs)(`select`,{id:t,name:p||t,multiple:s,role:`combobox`,className:`form-control`,value:S===void 0?_:S,required:i,disabled:a||o,autoFocus:c,onBlur:y,onFocus:v,onChange:x,"aria-describedby":_V(t),children:[C&&(0,G.jsx)(`option`,{value:``,children:f}),Array.isArray(m)&&m.map(({value:e,label:t},n)=>{let r=h&&h.indexOf(e)!==-1;return(0,G.jsx)(`option`,{value:String(n),disabled:r,children:t},n)})]})}function lK({id:e,options:t={},placeholder:n,value:r,required:i,disabled:a,readonly:o,autofocus:s=!1,onChange:c,onBlur:l,onFocus:u,htmlName:d}){let f=(0,b.useCallback)(({target:{value:e}})=>c(e===``?t.emptyValue:e),[c,t.emptyValue]),p=(0,b.useCallback)(({target:t})=>l(e,t&&t.value),[l,e]),m=(0,b.useCallback)(({target:t})=>u(e,t&&t.value),[e,u]);return(0,G.jsx)(`textarea`,{id:e,name:d||e,className:`form-control`,value:r||``,placeholder:n,required:i,disabled:a,readOnly:o,autoFocus:s,rows:t.rows,onBlur:p,onFocus:m,onChange:f,"aria-describedby":_V(e)})}function uK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{...e})}function dK(e){let{onChange:t,options:n,registry:r}=e,i=$B(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,G.jsx)(i,{type:`time`,...e,onChange:a})}function fK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`url`,...e})}function pK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`number`,...e})}function mK(){return{AltDateWidget:GG,AltDateTimeWidget:KG,CheckboxWidget:qG,CheckboxesWidget:JG,ColorWidget:YG,DateWidget:XG,DateTimeWidget:ZG,EmailWidget:QG,FileWidget:tK,HiddenWidget:nK,PasswordWidget:rK,RadioWidget:iK,RangeWidget:aK,RatingWidget:oK,SelectWidget:cK,TextWidget:uK,TextareaWidget:lK,TimeWidget:dK,UpDownWidget:pK,URLWidget:fK}}function hK(){return{fields:oG(),templates:WG(),widgets:mK(),rootSchema:{},formContext:{},translateString:BB,globalFormOptions:{idPrefix:lR,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function gK(e,t){return{...kS(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var _K=class extends b.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,t){if(e.extraErrors!==t._prevExtraErrors){let n={errors:t.schemaValidationErrors||[],errorSchema:t.schemaValidationErrorSchema||{}},{errors:r,errorSchema:i}=n;return e.extraErrors&&({errors:r,errorSchema:i}=ZV(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=ZV({errors:r,errorSchema:i},t.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:r,errorSchema:i}}return null}constructor(e){if(super(e),!e.validator)throw Error(`A validator is required for Form functionality to work`);let{formData:t,initialFormData:n,onChange:r}=e,i=t??n;this.state={...this.getStateFromProps(e,i,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},r&&!_R(this.state.formData,i)&&r(gK(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!_R(this.props,e)){let n=qB(this.props.formData,e.formData),r=qB(this.props.formData,this.state.formData),i=!_R(e.schema,this.props.schema),a=n.length>0||!_R(e.formData,this.props.formData),o=r.length>0||!_R(this.state.formData,this.props.formData),s=this.getStateFromProps(this.props,this.props.formData,i||a?void 0:this.state.retrievedSchema,i,n,!o);return{nextState:s,shouldUpdate:!_R(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!_R(e.formData,this.props.formData),i=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,i&&r)return;r&&!_R(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(gK(e)),this.setState(e)}}getStateFromProps(e,t,n,r=!1,i=[],a=!1){let o=this.state||{},s=`schema`in e?e.schema:this.props.schema,c=`validator`in e?e.validator:this.props.validator,l=(`uiSchema`in e?e.uiSchema:this.props.uiSchema)||{},u=e.formData===void 0&&this.props.formData===void 0,d=t!==void 0,f=`liveValidate`in e?e.liveValidate:this.props.liveValidate,p=d&&!e.noValidate&&f,m=`experimental_defaultFormStateBehavior`in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,h=`experimental_customMergeAllOf`in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf,g=o.schemaUtils;(!g||g.doesSchemaUtilsDiffer(c,s,m,h))&&(g=PB(c,s,m,h));let _=g.getRootSchema(),v=t;t===JW?v=void 0:t===void 0&&u&&(v=o.formData);let y=g.getDefaultFormState(_,v,!1,o.initialDefaultsGenerated),b=this.updateRetrievedSchema(n??g.retrieveSchema(_,y)),x=()=>e.noValidate||r?{errors:[],errorSchema:{}}:e.liveValidate?{errors:o.errors||[],errorSchema:o.errorSchema||{}}:{errors:o.schemaValidationErrors||[],errorSchema:o.schemaValidationErrorSchema||{}},S,C,w=o.schemaValidationErrors,T=o.schemaValidationErrorSchema;if(p&&!a){let e=this.liveValidate(_,g,o.errorSchema,y,void 0,o.customErrors,n,n!==void 0);S=e.errors,C=e.errorSchema,w=e.schemaValidationErrors,T=e.schemaValidationErrorSchema}else{let t=x();if(S=t.errors,C=t.errorSchema,i.length>0&&!p){let e=i.reduce((e,t)=>(e[t]=void 0,e),{});C=T=iB(t.errorSchema,e,`preventDuplicates`)}let n=this.mergeErrors({errorSchema:C,errors:S},e.extraErrors,o.customErrors);S=n.errors,C=n.errorSchema}let E=this.getRegistry(e,_,g),D=_R(o.registry,E)?o.registry:E,O=D.uiSchemaDefinitions?AV(_,l,D):l,k=o.fieldPathId&&o.fieldPathId?.$id===D.globalFormOptions.idPrefix?o.fieldPathId:zV(``,D.globalFormOptions);return{schemaUtils:g,schema:_,uiSchema:O,fieldPathId:k,formData:y,edit:d,errors:S,errorSchema:C,schemaValidationErrors:w,schemaValidationErrorSchema:T,retrievedSchema:b,initialDefaultsGenerated:!0,registry:D}}shouldComponentUpdate(e,t){let{experimental_componentUpdateStrategy:n=`customDeep`}=this.props;return NV(this,e,t,n)}validate(e,t=this.state.schema,n,r){let i=n||this.state.schemaUtils,{customValidate:a,transformErrors:o,uiSchema:s}=this.props,c=r??i.retrieveSchema(t,e);return i.getValidator().validateFormData(e,c,a,o,s)}renderErrors(e){let{errors:t,errorSchema:n,schema:r,uiSchema:i}=this.state,a=$B(`ErrorListTemplate`,e,mR(i));return t&&t.length?(0,G.jsx)(a,{errors:t,errorSchema:n||{},schema:r,uiSchema:i,registry:e}):null}mergeErrors(e,t,n){let r=e.errorSchema,i=e.errors;if(t){let n=ZV(e,t);r=n.errorSchema,i=n.errors}if(n){let t=ZV(e,n.ErrorSchema,!0);r=t.errorSchema,i=t.errors}return{errors:i,errorSchema:r}}liveValidate(e,t,n,r,i,a,o,s=!1){let c=this.validate(r,e,t,o),l=c.errors,u=c.errorSchema;s&&(u=iB(n,c.errorSchema,`preventDuplicates`));let d=l,f=u;return{...this.mergeErrors({errorSchema:u,errors:l},i,a),schemaValidationErrors:d,schemaValidationErrorSchema:f}}getUsedFormData=(e,t)=>OB(e,t);getFieldNames=(e,t)=>kB(e,t);omitExtraData=e=>{let{schema:t,schemaUtils:n}=this.state;return n.omitExtraData(t,e)};setFieldValue=(e,t)=>{let{registry:n}=this.state,r=Array.isArray(e)?e:e.split(`.`),i=zV(``,n.globalFormOptions,r);this.onChange(t,r,void 0,i.$id)};onChange=(e,t,n,r)=>{this.pendingChanges.push({newValue:e,path:t,newErrorSchema:n,id:r}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;let{newValue:e,path:t,id:n}=this.pendingChanges[0],{newErrorSchema:r}=this.pendingChanges[0],{extraErrors:i,omitExtraData:a,liveOmit:o,noValidate:s,liveValidate:c,onChange:l}=this.props,{formData:u,schemaUtils:d,schema:f,fieldPathId:p,schemaValidationErrorSchema:m,errors:h}=this.state,{customErrors:g,errorSchema:_}=this.state,v=p.path[0]||``,y=!t||t.length===0||t.length===1&&t[0]===v,b=this.state.retrievedSchema,x=y?e:ox(u),S=KL(x)&&Object.keys(x).length>0&&Object.values(x).every(e=>e===void 0)&&u==null?void 0:x;if(KL(x)||Array.isArray(x)){e===qW?WS(x,t):y||MS(x,t,e);let n=this.getStateFromProps(this.props,S,void 0,void 0,void 0,!0);x=n.formData,b=n.retrievedSchema}let C=!s&&(c===!0||c===`onChange`),w={formData:x,schema:f},T=x;if(a===!0&&(o===!0||o===`onChange`)&&(T=this.omitExtraData(x),w={formData:T}),r)if(!uS(y?m:Q(m,t)))y?_=r:MS(_,t,r);else if(g||=new KB,y){let e=Q(r,eR);e&&g.setErrors(e)}else MS(g.ErrorSchema,t,r);else g&&Q(g.ErrorSchema,[...t,`__errors`])&&g.clearErrors(t);if(C&&this.pendingChanges.length===1){let e=this.liveValidate(f,d,_,T,i,g,b);w={formData:T,...e,customErrors:g}}else if(!s&&r){let e=this.mergeErrors({errorSchema:_,errors:h},i,g);w={formData:T,...e,customErrors:g}}this.setState(w,()=>{l&&l(gK({...this.state,...w}),n),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return _R(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=JW,onChange:n}=this.props,r={formData:this.getStateFromProps(this.props,e??t,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(r,()=>n&&n(gK({...this.state,...r})))};onBlur=(e,t)=>{let{onBlur:n,omitExtraData:r,liveOmit:i,liveValidate:a}=this.props;if(n&&n(e,t),r===!0&&i===`onBlur`||a===`onBlur`){let{onChange:t,extraErrors:n}=this.props,{formData:o}=this.state,s=o,c={formData:s};if(r===!0&&i===`onBlur`&&(s=this.omitExtraData(o),c={formData:s}),a===`onBlur`){let{schema:e,schemaUtils:t,errorSchema:r,customErrors:i,retrievedSchema:a}=this.state,o=this.liveValidate(e,t,r,s,n,i,a);c={formData:s,...o,customErrors:i}}let l=Object.keys(c).filter(e=>!e.startsWith(`schemaValidation`)).some(e=>!_R(Q(this.state,e),Q(c,e)));this.setState(c,()=>{t&&l&&t(gK({...this.state,...c}),e)})}};onFocus=(e,t)=>{let{onFocus:n}=this.props;n&&n(e,t)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();let{omitExtraData:t,extraErrors:n,noValidate:r,onSubmit:i}=this.props,{formData:a}=this.state;if(t===!0&&(a=this.omitExtraData(a)),r||this.validateFormWithFormData(a)){let t=n||{},r=n?LV(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(gK({...this.state,formData:a},`submitted`),e)})}};getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=lR,nameGenerator:a,useFallbackUiForUnsupportedType:o=!1}=e;return{idPrefix:t[`ui:rootFieldId`]||i,idSeparator:r,useFallbackUiForUnsupportedType:o,...n!==void 0&&{experimental_componentUpdateStrategy:n},...a!==void 0&&{nameGenerator:a}}}getRegistry(e,t,n){let{translateString:r,uiSchema:i={}}=e,{fields:a,templates:o,widgets:s,formContext:c,translateString:l}=hK();return{fields:{...a,...e.fields},templates:{...o,...e.templates,ButtonTemplates:{...o.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...s,...e.widgets},rootSchema:t,formContext:e.formContext||c,schemaUtils:n,translateString:r||l,globalUiOptions:i[pR],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:i[`ui:definitions`]??{}}}submit=()=>{if(this.formElement.current){let e=new CustomEvent(`submit`,{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){let{idPrefix:t=`root`,idSeparator:n=`_`}=this.props,{property:r}=e,i=FS(r);i[0]===``?i[0]=t:i.unshift(t);let a=i.join(n),o=this.formElement.current.elements[a];o||=this.formElement.current.querySelector(`input[id^="${a}"`),o&&o.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=e=>{let{extraErrors:t,extraErrorsBlockSubmit:n,focusOnFirstError:r,onError:i}=this.props,{errors:a}=this.state,o=this.validate(e),{errors:s,errorSchema:c}=t?this.mergeErrors(o,t):o,l=o.errors.length>0||t&&n;return l?(r&&(typeof r==`function`?r(s[0]):this.focusOnError(s[0])),this.setState({errors:s,errorSchema:c,schemaValidationErrors:o.errors,schemaValidationErrorSchema:o.errorSchema},()=>{i?i(s):console.error(`Form validation failed`,s)})):s.length>0?this.setState({errors:s,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):a.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!l};validateForm(){let{omitExtraData:e}=this.props,{formData:t}=this.state;return e===!0&&(t=this.omitExtraData(t)),this.validateFormWithFormData(t)}render(){let{children:e,id:t,className:n=``,tagName:r,name:i,method:a,target:o,action:s,autoComplete:c,enctype:l,acceptCharset:u,noHtml5Validate:d=!1,disabled:f,readonly:p,showErrorList:m=`top`,_internalFormWrapper:h}=this.props,{schema:g,uiSchema:_,formData:v,errorSchema:y,fieldPathId:b,registry:x}=this.state,{SchemaField:S}=x.fields,{SubmitButton:C}=x.templates.ButtonTemplates,w=h?r:void 0,T=h||r||`form`,{[oR]:E={}}=mR(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[fR]:{[oR]:E}};return(0,G.jsxs)(T,{className:n||`rjsf`,id:t,name:i,method:a,target:o,action:s,autoComplete:c,encType:l,acceptCharset:u,noValidate:d,onSubmit:this.onSubmit,as:w,ref:this.formElement,children:[m===`top`&&this.renderErrors(x),(0,G.jsx)(S,{name:``,schema:g,uiSchema:_,errorSchema:y,fieldPathId:b,formData:v,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:f,readonly:p}),e||(0,G.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function vK(e){return(0,b.forwardRef)(({fields:t,widgets:n,templates:r,...i},a)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},(0,G.jsx)(_K,{...e,...i,fields:t,widgets:n,templates:r,ref:a})))}var yK=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c,l),"date-time":t(d,f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:w,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:_,int32:{type:`number`,validate:b},int64:{type:`number`,validate:x},float:{type:`number`,validate:S},double:{type:`number`,validate:S},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(e,t){let n=s.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[5];return(r<=23&&i<=59&&a<=59||r===23&&i===59&&a===60)&&(!t||o!==``)}function l(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3]+(n[4]||``),t=r[1]+r[2]+r[3]+(r[4]||``),e>t?1:e<t?-1:0}var u=/t|\s/i;function d(e){let t=e.split(u);return t.length===2&&a(t[0])&&c(t[1],!0)}function f(e,t){if(!(e&&t))return;let[n,r]=e.split(u),[i,a]=t.split(u),s=o(n,i);if(s!==void 0)return s||l(r,a)}var p=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function h(e){return p.test(e)&&m.test(e)}var g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(e){return g.lastIndex=0,g.test(e)}var v=-(2**31),y=2**31-1;function b(e){return Number.isInteger(e)&&e<=y&&e>=v}function x(e){return Number.isInteger(e)}function S(){return!0}var C=/[^\\]\\Z/;function w(e){if(C.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),bK=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatLimitDefinition=void 0;var t=Dw(),n=xC(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>n.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,n._`${t}[${d.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?n._`${l.code.formats}${n.getProperty(t)}`:void 0});e.fail$data(m(a))}function m(e){return n._`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),xK=u(s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=yK(),r=bK(),i=xC(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&r.default(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=i._`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s}))(),1),SK={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},CK=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,wK=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function TK(e,t,n={},r,i=jw.default,a){let o=new i({...SK,...n});return r?(0,xK.default)(o,r):r!==!1&&(0,xK.default)(o),o.addFormat(`data-url`,wK),o.addFormat(`color`,CK),o.addKeyword(JL),o.addKeyword(uR),Array.isArray(e)&&o.addMetaSchema(e),Xh(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}function EK(e=[],t){return e.map(e=>{let{instancePath:n,keyword:r,params:i,schemaPath:a,parentSchema:o,...s}=e,{message:c=``}=s,l=n.replace(/\//g,`.`),u=`${l} ${c}`.trim(),d=``,f=[...i.deps?.split(`, `)||[],i.missingProperty,i.property].filter(e=>e);if(f.length>0)f.forEach(e=>{let n=mR(Q(t,`${(l?`${l}.${e}`:e).replace(/^\./,``)}`)).title;if(n===void 0&&(n=mR(Q(t,a.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n)c=c.replace(`'${e}'`,`'${n}'`),d=n;else{let t=Q(o,[iR,e,`title`]);t&&(c=c.replace(`'${e}'`,`'${t}'`),d=t)}}),u=c;else{let e=mR(Q(t,`${l.replace(/^\./,``)}`)).title;if(e)u=`'${e}' ${c}`.trim(),d=e;else{let e=o?.title;e&&(u=`'${e}' ${c}`.trim(),d=e)}}return`missingProperty`in i&&(l=l?`${l}.${i.missingProperty}`:i.missingProperty),{name:r,property:l,message:c,params:i,stack:u,schemaPath:a,title:d}}).reduce((e,t)=>{let{message:n,schemaPath:r}=t,i=r?.indexOf(`/${ZL}/`),a=r?.indexOf(`/${rR}/`),o;return i&&i>=0?o=r?.substring(0,i):a&&a>=0&&(o=r?.substring(0,a)),o&&e.find(e=>e.message===n&&e.schemaPath?.startsWith(o))||e.push(t),e},[])}function DK(e,t,n,r,i,a,o){let{validationError:s}=t,c=EK(t.errors,o);s&&(c=[...c,{stack:s.message}]),typeof a==`function`&&(c=a(c,o));let l=RV(c);if(s&&(l={...l,$schema:{__errors:[s.message]}}),typeof i!=`function`)return{errors:c,errorSchema:l};let u=SB(e,r,n,r,!0),d=BV(i(u,gR(u),o,l));return ZV({errors:c,errorSchema:l},d)}var OK=class{constructor(e,t){let{additionalMetaSchemas:n,customFormats:r,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:o,extenderFn:s}=e;this.ajv=TK(n,r,i,a,o,s),this.localizer=t}reset(){this.ajv.removeSchema()}rawValidation(e,t){let n,r;try{e.$id&&(r=this.ajv.getSchema(e.$id)),r===void 0&&(r=this.ajv.compile(e)),r(t)}catch(e){n=e}let i;return r&&(typeof this.localizer==`function`&&((r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=`'${e.params[t]}'`)}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>`'${e}'`).join(`, `))}),this.localizer(r.errors),(r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=e.params[t].slice(1,-1))}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>e.slice(1,-1)).join(`, `))})),i=r.errors||void 0,r.errors=null),{errors:i,validationError:n}}validateFormData(e,t,n,r,i){let a=this.rawValidation(t,e);return DK(this,a,e,t,n,r,i)}handleSchemaUpdate(e){let t=e.$id??dR;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):_R(e,this.ajv.getSchema(t)?.schema)||(this.ajv.removeSchema(t),this.ajv.addSchema(e,t))}isValid(e,t,n){try{this.handleSchemaUpdate(n);let r=eH(e),i=r.$id??lV(r),a;return a=this.ajv.getSchema(i),a===void 0&&(a=this.ajv.addSchema(r,i).getSchema(i)||this.ajv.compile(r)),a(t)}catch(e){return console.warn(`Error encountered compiling schema:`,e),!1}}};function kK(e={},t){return new OK(e,t)}var AK=kK(),jK=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),MK=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),NK=e=>{let t=MK(e);return t.charAt(0).toUpperCase()+t.slice(1)},PK=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),FK=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},IK={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},LK=(0,b.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,b.createElement)(`svg`,{ref:c,...IK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:PK(`lucide`,i),...!a&&!FK(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])),RK=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(LK,{ref:i,iconNode:t,className:PK(`lucide-${jK(NK(e))}`,`lucide-${e}`,n),...r}));return n.displayName=NK(e),n},zK=RK(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),BK=RK(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),VK=RK(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),HK=RK(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),UK=RK(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),WK=RK(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),GK=RK(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),KK=RK(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),qK=RK(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),JK=RK(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function YK(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function XK(...e){return t=>{let n=!1,r=e.map(e=>{let r=YK(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():YK(e[t],null)}}}}function ZK(...e){return b.useCallback(XK(...e),e)}var QK=Symbol.for(`react.lazy`),$K=b.use;function eq(e){return typeof e==`object`&&!!e&&`then`in e}function tq(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===QK&&`_payload`in e&&eq(e._payload)}function nq(e){let t=iq(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;tq(r)&&typeof $K==`function`&&(r=$K(r._payload));let a=b.Children.toArray(r),o=a.find(oq);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var rq=nq(`Slot`);function iq(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(tq(n)&&typeof $K==`function`&&(n=$K(n._payload)),b.isValidElement(n)){let e=cq(n),i=sq(r,n.props);return n.type!==b.Fragment&&(i.ref=t?XK(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aq=Symbol(`radix.slottable`);function oq(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===aq}function sq(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function cq(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)}function lq(...e){return sO(LE(e))}var uq=BE(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,xs:`h-6 rounded-md gap-1 px-2 has-[>svg]:px-2`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function dq({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,G.jsx)(r?rq:`button`,{"data-slot":`button`,className:lq(uq({variant:t,size:n,className:e})),...i})}function fq({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,G.jsx)(`div`,{className:`p-0 m-0`,children:(0,G.jsxs)(dq,{...r,className:lq(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,G.jsx)(UK,{size:16}),` `,i(tH.AddItemButton)]})})}function pq(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=$B(`ArrayFieldItemButtonsTemplate`,s,mR(o)),l=i?-6:22;return(0,G.jsx)(`div`,{children:(0,G.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,G.jsx)(`div`,{className:`grow shrink`,children:t}),(0,G.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,G.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,G.jsx)(c,{...n})})})]})})}function mq(e){let{canAdd:t,disabled:n,fieldPathId:r,uiSchema:i,items:a,optionalDataControl:o,onAddClick:s,readonly:c,registry:l,required:u,schema:d,title:f}=e,p=mR(i),m=$B(`ArrayFieldDescriptionTemplate`,l,p),h=$B(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,G.jsx)(`div`,{children:(0,G.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,G.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,G.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,G.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,G.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsx)(_,{id:yV(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function hq({className:e,type:t,...n}){return(0,G.jsx)(`input`,{type:t,"data-slot":`input`,className:lq(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...n})}function gq({id:e,htmlName:t,placeholder:n,required:r,readonly:i,disabled:a,type:o,value:s,onChange:c,onChangeOverride:l,onBlur:u,onFocus:d,autofocus:f,options:p,schema:m,rawErrors:h=[],children:g,extraProps:_,className:v,registry:y}){let{ClearButton:x}=y.templates.ButtonTemplates,S={..._,...XB(m,o,p)},C=({target:{value:e}})=>c(e===``?p.emptyValue:e),w=({target:t})=>u(e,t&&t.value),T=({target:t})=>d(e,t&&t.value),E=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(p.emptyValue??``)},[c,p.emptyValue]);return(0,G.jsxs)(`div`,{className:`p-0.5`,children:[(0,G.jsx)(hq,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:lq({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?mV(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":_V(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,G.jsx)(x,{onClick:E,registry:y}),g,(0,G.jsx)(fG,{id:e,schema:m})]})}function _q({id:e,description:t,registry:n,uiSchema:r}){return t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,G.jsx)(wG,{description:t,registry:n,uiSchema:r})})}):null}var vq=BE(`relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`}},defaultVariants:{variant:`default`}});function yq({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:lq(vq({variant:t}),e),...n})}function bq({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-title`,className:lq(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function xq({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-description`,className:lq(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function Sq({errors:e,registry:t}){let{translateString:n}=t;return(0,G.jsxs)(yq,{variant:`destructive`,className:`mb-2`,children:[(0,G.jsx)(HK,{className:`h-4 w-4`}),(0,G.jsx)(bq,{children:n(tH.ErrorsLabel)}),(0,G.jsx)(xq,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,G.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function Cq(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,G.jsx)(`div`,{className:`flex flex-col gap-1`,id:pV(n),children:t.map((e,t)=>(0,G.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function wq(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,G.jsx)(`span`,{className:lq(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:hV(t),children:(0,G.jsx)(PG,{help:n,registry:i,uiSchema:r})}):null}function Tq({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:i,help:a,description:o,rawDescription:s,classNames:c,style:l,disabled:u,label:d,hidden:f,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,readonly:g,required:_,schema:v,uiSchema:y,registry:b}){let x=mR(y),S=$B(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,G.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,G.jsx)(S,{classNames:c,style:l,disabled:u,id:e,label:d,displayLabel:n,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,rawDescription:s,readonly:g,required:_,schema:v,uiSchema:y,registry:b,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,G.jsxs)(`label`,{className:lq(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,{" text-destructive":r.length>0}),htmlFor:e,children:[d,_?`*`:null]}),t,n&&s&&!C&&(0,G.jsx)(`span`,{className:lq(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function Eq(e){let{children:t,column:n,className:r,...i}=e;return(0,G.jsx)(`div`,{className:lq(`grid gap-2`,r),...i,children:t})}function Dq(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,G.jsx)(dq,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}function Oq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.CopyButton),...e,icon:(0,G.jsx)(GK,{className:`h-4 w-4`})})}function kq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.MoveDownButton),...e,icon:(0,G.jsx)(BK,{className:`h-4 w-4`})})}function Aq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.MoveUpButton),...e,icon:(0,G.jsx)(VK,{className:`h-4 w-4`})})}function jq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.RemoveButton),...e,className:`border-destructive`,icon:(0,G.jsx)(qK,{className:`h-4 w-4 stroke-destructive`})})}function Mq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.ClearButton),...e,icon:(0,G.jsx)(JK,{})})}function Nq({selector:e,optionSchemaField:t}){return(0,G.jsxs)(`div`,{className:lq(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,G.jsx)(`div`,{className:lq(`mb-4`),children:e}),t]})}function Pq({description:e,title:t,properties:n,required:r,uiSchema:i,fieldPathId:a,schema:o,formData:s,optionalDataControl:c,onAddProperty:l,disabled:u,readonly:d,registry:f}){let p=mR(i),m=$B(`TitleFieldTemplate`,f,p),h=$B(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(m,{id:gV(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,G.jsx)(h,{id:fV(a),description:e,schema:o,uiSchema:i,registry:f}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map((e,t)=>(0,G.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,G.jsx)(`div`,{className:`w-full`,children:e.content})},t)),hR(o,i,s)?(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsx)(_,{id:yV(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function Fq(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,G.jsx)(Dq,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,G.jsx)(UK,{}),size:`xs`}):a?(0,G.jsx)(jq,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,G.jsx)(`em`,{id:t,children:r})}function Iq(e){let{submitText:t,norender:n,props:r}=QB(e.uiSchema);return n?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(dq,{type:`submit`,...r,className:lq(`my-2`,r?.className),children:t})})}var Lq=u(_(),1),Rq=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=nq(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),zq=`Separator`,Bq=`horizontal`,Vq=[`horizontal`,`vertical`],Hq=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=Bq,...i}=e,a=Uq(r)?r:Bq,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,G.jsx)(Rq.div,{"data-orientation":a,...s,...i,ref:t})});Hq.displayName=zq;function Uq(e){return Vq.includes(e)}var Wq=Hq;function Gq({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,G.jsx)(Wq,{"data-slot":`separator`,decorative:n,orientation:t,className:lq(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function Kq({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,G.jsx)(`h5`,{children:mR(n).title||t});return r&&(i=(0,G.jsxs)(`div`,{className:`flex flex-row`,children:[(0,G.jsx)(`div`,{className:`flex-grow`,children:i}),(0,G.jsx)(`div`,{className:`flex`,children:r})]})),(0,G.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,G.jsx)(Gq,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function qq({classNames:e,style:t,children:n,disabled:r,id:i,label:a,displayLabel:o,onRemoveProperty:s,onKeyRenameBlur:c,rawDescription:l,readonly:u,required:d,schema:f,uiSchema:p,registry:m}){let{templates:h,translateString:g}=m,{RemoveButton:_}=h.ButtonTemplates,v=g(tH.KeyLabel,[a]);if(!(`__additional_property`in f))return(0,G.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,G.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,G.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,G.jsx)(`div`,{className:`pl-0.5`,children:(0,G.jsx)(hq,{required:d,defaultValue:a,disabled:r||u,id:b,name:b,onBlur:u?void 0:c,type:`text`,className:`w-full border shadow-sm`})}),!!l&&(0,G.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,G.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,G.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,G.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,G.jsx)(_,{id:yV(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,G.jsx)(Gq,{dir:`horizontal`,className:`mt-2`})]})}function Jq(){return{ArrayFieldItemTemplate:pq,ArrayFieldTemplate:mq,BaseInputTemplate:gq,ButtonTemplates:{AddButton:fq,CopyButton:Oq,MoveDownButton:kq,MoveUpButton:Aq,RemoveButton:jq,SubmitButton:Iq,ClearButton:Mq},DescriptionFieldTemplate:_q,ErrorListTemplate:Sq,FieldErrorTemplate:Cq,FieldHelpTemplate:wq,FieldTemplate:Tq,GridTemplate:Eq,MultiSchemaFieldTemplate:Nq,ObjectFieldTemplate:Pq,OptionalDataControlsTemplate:Fq,TitleFieldTemplate:Kq,WrapIfAdditionalTemplate:qq}}function Yq(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,G.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Xq(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,G.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Zq(i,...t)]}function Zq(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function Qq(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var $q=globalThis?.document?b.useLayoutEffect:()=>{},eJ=b.useInsertionEffect||$q;function tJ({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=nJ({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=rJ(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function nJ({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return eJ(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function rJ(e){return typeof e==`function`}function iJ(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function aJ(e){let[t,n]=b.useState(void 0);return $q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function oJ(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var sJ=e=>{let{present:t,children:n}=e,r=cJ(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=ZK(r.ref,uJ(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};sJ.displayName=`Presence`;function cJ(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=oJ(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=lJ(r.current);a.current=o===`mounted`?e:`none`},[o]),$q(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=lJ(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),$q(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=lJ(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=lJ(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function lJ(e){return e?.animationName||`none`}function uJ(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)}function dJ(e){let t=fJ(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(mJ);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function fJ(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=gJ(n),i=hJ(r,n.props);return n.type!==b.Fragment&&(i.ref=t?XK(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pJ=Symbol(`radix.slottable`);function mJ(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===pJ}function hJ(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function gJ(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 _J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=dJ(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vJ(e,t){e&&Lq.flushSync(()=>e.dispatchEvent(t))}var yJ=`Checkbox`,[bJ,Kne]=Xq(yJ),[xJ,SJ]=bJ(yJ);function CJ(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=tJ({prop:n,defaultProp:i??!1,onChange:c,caller:yJ}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:MJ(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,G.jsx)(xJ,{scope:t,...x,children:jJ(d)?d(x):r})}var wJ=`CheckboxTrigger`,TJ=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=SJ(wJ,e),h=ZK(i,u),g=b.useRef(c);return b.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,G.jsx)(_J.button,{type:`button`,role:`checkbox`,"aria-checked":MJ(c)?`mixed`:c,"aria-required":l,"data-state":NJ(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Qq(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Qq(n,e=>{d(e=>MJ(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});TJ.displayName=wJ;var EJ=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,G.jsx)(CJ,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(TJ,{...d,ref:t,__scopeCheckbox:n}),e&&(0,G.jsx)(AJ,{__scopeCheckbox:n})]})})});EJ.displayName=yJ;var DJ=`CheckboxIndicator`,OJ=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=SJ(DJ,n);return(0,G.jsx)(sJ,{present:r||MJ(a.checked)||a.checked===!0,children:(0,G.jsx)(_J.span,{"data-state":NJ(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});OJ.displayName=DJ;var kJ=`CheckboxBubbleInput`,AJ=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=SJ(kJ,e),m=ZK(n,p),h=iJ(a),g=aJ(r);b.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=MJ(a),n.call(e,MJ(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(MJ(a)?!1:a);return(0,G.jsx)(_J.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});AJ.displayName=kJ;function jJ(e){return typeof e==`function`}function MJ(e){return e===`indeterminate`}function NJ(e){return MJ(e)?`indeterminate`:e?`checked`:`unchecked`}function PJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var FJ=[`color`],IJ=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=PJ(e,FJ);return(0,b.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i,{ref:t}),(0,b.createElement)(`path`,{d:`M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z`,fill:r,fillRule:`evenodd`,clipRule:`evenodd`}))});function LJ({className:e,...t}){return(0,G.jsx)(EJ,{"data-slot":`checkbox`,className:lq(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,G.jsx)(OJ,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,G.jsx)(IJ,{className:`size-3.5`})})})}var RJ=`Label`,zJ=b.forwardRef((e,t)=>(0,G.jsx)(Rq.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));zJ.displayName=RJ;var BJ=zJ;function VJ({className:e,...t}){return(0,G.jsx)(BJ,{"data-slot":`label`,className:lq(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function HJ(e){let{id:t,htmlName:n,value:r,disabled:i,readonly:a,label:o,hideLabel:s,schema:c,autofocus:l,options:u,onChange:d,onBlur:f,onFocus:p,registry:m,uiSchema:h,className:g}=e,_=MV(c),v=$B(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,G.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":_V(t),children:[!s&&S&&(0,G.jsx)(v,{id:fV(t),description:S,schema:c,uiSchema:h,registry:m}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,G.jsx)(LJ,{id:t,name:n||t,checked:r===void 0?!1:!!r,required:_,disabled:i||a,autoFocus:l,onCheckedChange:y,onBlur:b,onFocus:x,className:g}),(0,G.jsx)(VJ,{className:`leading-tight`,htmlFor:t,children:CV(o,s||!o)})]})]})}function UJ({id:e,htmlName:t,disabled:n,options:r,value:i,autofocus:a,readonly:o,required:s,onChange:c,onBlur:l,onFocus:u,className:d}){let{enumOptions:f,enumDisabled:p,inline:m,emptyValue:h}=r,g=Array.isArray(i)?i:[i],_=({target:t})=>l(e,VB(t&&t.value,f,h)),v=({target:t})=>u(e,VB(t&&t.value,f,h));return(0,G.jsx)(`div`,{className:lq({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=UB(r.value,g),u=Array.isArray(p)&&p.indexOf(r.value)!==-1,m=vV(e,i);return(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(LJ,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?GB(i,g,f):HB(i,g,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:_,onFocus:v,"aria-describedby":_V(e)}),(0,G.jsx)(VJ,{className:`leading-tight`,htmlFor:vV(e,i),children:r.label})]},m)})})}function WJ(e){let t=e+`CollectionProvider`,[n,r]=Xq(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,G.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=dJ(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,G.jsx)(c,{ref:ZK(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=dJ(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=ZK(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,G.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var GJ=b.useId||(()=>void 0),KJ=0;function qJ(e){let[t,n]=b.useState(GJ());return $q(()=>{e||n(e=>e??String(KJ++))},[e]),e||(t?`radix-${t}`:``)}function JJ(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}var YJ=b.createContext(void 0);function XJ(e){let t=b.useContext(YJ);return e||t||`ltr`}var ZJ=`rovingFocusGroup.onEntryFocus`,QJ={bubbles:!1,cancelable:!0},$J=`RovingFocusGroup`,[eY,tY,nY]=WJ($J),[rY,iY]=Xq($J,[nY]),[aY,oY]=rY($J),sY=b.forwardRef((e,t)=>(0,G.jsx)(eY.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,G.jsx)(eY.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,G.jsx)(cY,{...e,ref:t})})}));sY.displayName=$J;var cY=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=ZK(t,f),m=XJ(a),[h,g]=tJ({prop:o,defaultProp:s??null,onChange:c,caller:$J}),[_,v]=b.useState(!1),y=JJ(l),x=tY(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(ZJ,y),()=>e.removeEventListener(ZJ,y)},[y]),(0,G.jsx)(aY,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,G.jsx)(_J.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Qq(e.onMouseDown,()=>{S.current=!0}),onFocus:Qq(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(ZJ,QJ);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);mY([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:Qq(e.onBlur,()=>v(!1))})})}),lY=`RovingFocusGroupItem`,uY=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=qJ(),l=a||c,u=oY(lY,n),d=u.currentTabStopId===l,f=tY(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,G.jsx)(eY.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,G.jsx)(_J.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Qq(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Qq(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Qq(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=pY(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?hY(n,r+1):n.slice(r+1)}setTimeout(()=>mY(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});uY.displayName=lY;var dY={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function fY(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function pY(e,t,n){let r=fY(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return dY[r]}function mY(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function hY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gY=sY,_Y=uY,vY=`Radio`,[yY,bY]=Xq(vY),[xY,SY]=yY(vY),CY=b.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=b.useState(null),p=ZK(t,e=>f(e)),m=b.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,G.jsxs)(xY,{scope:n,checked:i,disabled:o,children:[(0,G.jsx)(_J.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":OY(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:Qq(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,G.jsx)(DY,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});CY.displayName=vY;var wY=`RadioIndicator`,TY=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=SY(wY,n);return(0,G.jsx)(sJ,{present:r||a.checked,children:(0,G.jsx)(_J.span,{"data-state":OY(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});TY.displayName=wY;var EY=`RadioBubbleInput`,DY=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=b.useRef(null),s=ZK(o,a),c=iJ(n),l=aJ(t);return b.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,G.jsx)(_J.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});DY.displayName=EY;function OY(e){return e?`checked`:`unchecked`}var kY=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],AY=`RadioGroup`,[jY,qne]=Xq(AY,[iY,bY]),MY=iY(),NY=bY(),[PY,FY]=jY(AY),IY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=MY(n),m=XJ(l),[h,g]=tJ({prop:a,defaultProp:i??null,onChange:d,caller:AY});return(0,G.jsx)(PY,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,G.jsx)(gY,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,G.jsx)(_J.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});IY.displayName=AY;var LY=`RadioGroupItem`,RY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=FY(LY,n),o=a.disabled||r,s=MY(n),c=NY(n),l=b.useRef(null),u=ZK(t,l),d=a.value===i.value,f=b.useRef(!1);return b.useEffect(()=>{let e=e=>{kY.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,G.jsx)(_Y,{asChild:!0,...s,focusable:!o,active:d,children:(0,G.jsx)(CY,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:Qq(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:Qq(i.onFocus,()=>{f.current&&l.current?.click()})})})});RY.displayName=LY;var zY=`RadioGroupIndicator`,BY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,G.jsx)(TY,{...NY(n),...r,ref:t})});BY.displayName=zY;var VY=IY,HY=RY,UY=BY;function WY({className:e,...t}){return(0,G.jsx)(VY,{"data-slot":`radio-group`,className:lq(`grid gap-3`,e),...t})}function GY({className:e,...t}){return(0,G.jsx)(HY,{"data-slot":`radio-group-item`,className:lq(`border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,G.jsx)(UY,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,G.jsx)(WK,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function KY({id:e,options:t,value:n,required:r,disabled:i,readonly:a,onChange:o,onBlur:s,onFocus:c,className:l}){let{enumOptions:u,enumDisabled:d,emptyValue:f}=t,p=e=>o(VB(e,u,f)),m=({target:t})=>s(e,VB(t&&t.value,u,f)),h=({target:t})=>c(e,VB(t&&t.value,u,f)),g=!!(t&&t.inline);return(0,G.jsx)(`div`,{className:`mb-0`,children:(0,G.jsx)(WY,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{p(e)},onBlur:m,onFocus:h,"aria-describedby":_V(e),orientation:g?`horizontal`:`vertical`,className:lq(`flex flex-wrap`,{"flex-col":!g},l),children:Array.isArray(u)&&u.map((t,r)=>{let i=Array.isArray(d)&&d.indexOf(t.value)!==-1;return(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(GY,{checked:UB(t.value,n),value:r.toString(),id:vV(e,r),disabled:i}),(0,G.jsx)(VJ,{className:`leading-tight`,htmlFor:vV(e,r),children:t.label})]},vV(e,r))})})})}function qY(e,[t,n]){return Math.min(n,Math.max(t,e))}var JY=[`PageUp`,`PageDown`],YY=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],XY={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},ZY=`Slider`,[QY,$Y,eX]=WJ(ZY),[tX,Jne]=Xq(ZY,[eX]),[nX,rX]=tX(ZY),iX=b.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=b.useRef(new Set),_=b.useRef(0),v=o===`horizontal`?sX:cX,[y=[],x]=tJ({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,SX(y,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];y[_.current]!==e&&f(y)}function E(e,t,{commit:n}={commit:!1}){let o=DX(a),s=qY(OX(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=yX(e,s,t);if(TX(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,G.jsx)(nX,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,G.jsx)(QY.Provider,{scope:e.__scopeSlider,children:(0,G.jsx)(QY.Slot,{scope:e.__scopeSlider,children:(0,G.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:Qq(h.onPointerDown,()=>{s||(S.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&E(r,0,{commit:!0}),onEndKeyDown:()=>!s&&E(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=JY.includes(e.key)||e.shiftKey&&YY.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});iX.displayName=ZY;var[aX,oX]=tX(ZY,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),sX=b.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=b.useState(null),p=ZK(t,e=>f(e)),m=b.useRef(void 0),h=XJ(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=EX([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,G.jsx)(aX,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,G.jsx)(lX,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=XY[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),cX=b.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=b.useRef(null),d=ZK(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=EX([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,G.jsx)(aX,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,G.jsx)(lX,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=XY[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),lX=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=rX(ZY,n);return(0,G.jsx)(_J.span,{...l,ref:t,onKeyDown:Qq(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):JY.concat(YY).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:Qq(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:Qq(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Qq(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),uX=`SliderTrack`,dX=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=rX(uX,n);return(0,G.jsx)(_J.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});dX.displayName=uX;var fX=`SliderRange`,pX=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=rX(fX,n),a=oX(fX,n),o=ZK(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>bX(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,G.jsx)(_J.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});pX.displayName=fX;var mX=`SliderThumb`,hX=b.forwardRef((e,t)=>{let n=$Y(e.__scopeSlider),[r,i]=b.useState(null),a=ZK(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,G.jsx)(gX,{...e,ref:a,index:o})}),gX=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=rX(mX,n),s=oX(mX,n),[c,l]=b.useState(null),u=ZK(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=aJ(c),p=o.values[r],m=p===void 0?0:bX(p,o.min,o.max),h=xX(r,o.values.length),g=f?.[s.size],_=g?CX(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,G.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,G.jsx)(QY.ItemSlot,{scope:e.__scopeSlider,children:(0,G.jsx)(_J.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:Qq(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,G.jsx)(vX,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});hX.displayName=mX;var _X=`RadioBubbleInput`,vX=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=ZK(i,r),o=iJ(t);return b.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,G.jsx)(_J.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});vX.displayName=_X;function yX(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function bX(e,t,n){return qY(100/(n-t)*(e-t),[0,100])}function xX(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function SX(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function CX(e,t,n){let r=e/2;return(r-EX([0,50],[0,r])(t)*n)*n}function wX(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function TX(e,t){if(t>0){let n=wX(e);return Math.min(...n)>=t}return!0}function EX(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function DX(e){return(String(e).split(`.`)[1]||``).length}function OX(e,t){let n=10**t;return Math.round(e*n)/n}var kX=iX,AX=dX,jX=pX,MX=hX;function NX({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=(0,b.useMemo)(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return(0,G.jsxs)(kX,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:lq(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,e),...a,children:[(0,G.jsx)(AX,{"data-slot":`slider-track`,className:lq(`bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:(0,G.jsx)(jX,{"data-slot":`slider-range`,className:lq(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,G.jsx)(MX,{"data-slot":`slider-thumb`,className:`border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`},t))]})}var PX=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function FX({value:e,readonly:t,disabled:n,options:r,schema:i,onChange:a,label:o,id:s}){let c=e=>a(e[0]),l={value:e,label:o,id:s,...YB(i)},u={id:s,...kS(r.props||{},PX)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(NX,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":_V(s)}),e]})}var IX=1,LX=.9,RX=.8,zX=.17,BX=.1,VX=.999,HX=.9999,UX=.99,WX=/[\\\/_+.#"@\[\(\{&]/,GX=/[\\\/_+.#"@\[\(\{&]/g,KX=/[\s-]/,qX=/[\s-]/g;function JX(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?IX:UX;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=JX(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=IX:WX.test(e.charAt(l-1))?(d*=RX,p=e.slice(i,l-1).match(GX),p&&i>0&&(d*=VX**+p.length)):KX.test(e.charAt(l-1))?(d*=LX,m=e.slice(i,l-1).match(qX),m&&i>0&&(d*=VX**+m.length)):(d*=zX,i>0&&(d*=VX**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=HX)),(d<BX&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=JX(e,t,n,r,l+1,a+2,o),f*BX>d&&(d=f*BX)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function YX(e){return e.toLowerCase().replace(qX,` `)}function XX(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,JX(e,t,YX(e),YX(t),0,0,{})}function ZX(e,t=globalThis?.document){let n=JJ(e);b.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var QX=`DismissableLayer`,$X=`dismissableLayer.update`,eZ=`dismissableLayer.pointerDownOutside`,tZ=`dismissableLayer.focusOutside`,nZ,rZ=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iZ=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(rZ),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=ZK(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=sZ(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=cZ(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ZX(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),b.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nZ=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),lZ(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nZ)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),lZ())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener($X,e),()=>document.removeEventListener($X,e)},[]),(0,G.jsx)(_J.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Qq(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Qq(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Qq(e.onPointerDownCapture,S.onPointerDownCapture)})});iZ.displayName=QX;var aZ=`DismissableLayerBranch`,oZ=b.forwardRef((e,t)=>{let n=b.useContext(rZ),r=b.useRef(null),i=ZK(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,G.jsx)(_J.div,{...e,ref:i})});oZ.displayName=aZ;function sZ(e,t=globalThis?.document){let n=JJ(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){uZ(eZ,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(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},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cZ(e,t=globalThis?.document){let n=JJ(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&uZ(tZ,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lZ(){let e=new CustomEvent($X);document.dispatchEvent(e)}function uZ(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vJ(i,a):i.dispatchEvent(a)}var dZ=`focusScope.autoFocusOnMount`,fZ=`focusScope.autoFocusOnUnmount`,pZ={bubbles:!1,cancelable:!0},mZ=`FocusScope`,hZ=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=JJ(i),u=JJ(a),d=b.useRef(null),f=ZK(t,e=>c(e)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:SZ(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||SZ(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&SZ(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){CZ.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(dZ,pZ);s.addEventListener(dZ,l),s.dispatchEvent(t),t.defaultPrevented||(gZ(EZ(vZ(s)),{select:!0}),document.activeElement===e&&SZ(s))}return()=>{s.removeEventListener(dZ,l),setTimeout(()=>{let t=new CustomEvent(fZ,pZ);s.addEventListener(fZ,u),s.dispatchEvent(t),t.defaultPrevented||SZ(e??document.body,{select:!0}),s.removeEventListener(fZ,u),CZ.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_Z(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&SZ(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&SZ(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,G.jsx)(_J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});hZ.displayName=mZ;function gZ(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(SZ(r,{select:t}),document.activeElement!==n)return}function _Z(e){let t=vZ(e);return[yZ(t,e),yZ(t.reverse(),e)]}function vZ(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yZ(e,t){for(let n of e)if(!bZ(n,{upTo:t}))return n}function bZ(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function xZ(e){return e instanceof HTMLInputElement&&`select`in e}function SZ(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xZ(e)&&t&&e.select()}}var CZ=wZ();function wZ(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=TZ(e,t),e.unshift(t)},remove(t){e=TZ(e,t),e[0]?.resume()}}}function TZ(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function EZ(e){return e.filter(e=>e.tagName!==`A`)}var DZ=`Portal`,OZ=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);$q(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Lq.createPortal((0,G.jsx)(_J.div,{...r,ref:t}),o):null});OZ.displayName=DZ;var kZ=0;function AZ(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??jZ()),document.body.insertAdjacentElement(`beforeend`,e[1]??jZ()),kZ++,()=>{kZ===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),kZ--}},[])}function jZ(){let 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 MZ=function(){return MZ=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},MZ.apply(this,arguments)};function NZ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,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}function PZ(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function FZ(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var IZ=`right-scroll-bar-position`,LZ=`width-before-scroll-bar`,RZ=`with-scroll-bars-hidden`,zZ=`--removed-body-scroll-bar-size`;function BZ(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function VZ(e,t){var n=(0,b.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 HZ=typeof window<`u`?b.useLayoutEffect:b.useEffect,UZ=new WeakMap;function WZ(e,t){var n=VZ(t||null,function(t){return e.forEach(function(e){return BZ(e,t)})});return HZ(function(){var t=UZ.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||BZ(e,null)}),i.forEach(function(e){r.has(e)||BZ(e,a)})}UZ.set(n,e)},[e]),n}function GZ(e){return e}function KZ(e,t){t===void 0&&(t=GZ);var n=[],r=!1;return{read:function(){if(r)throw 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){for(r=!0;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 a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function qZ(e){e===void 0&&(e={});var t=KZ(null);return t.options=MZ({async:!0,ssr:!1},e),t}var JZ=function(e){var t=e.sideCar,n=NZ(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,MZ({},n))};JZ.isSideCarExport=!0;function YZ(e,t){return e.useMedium(t),JZ}var XZ=qZ(),ZZ=function(){},QZ=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:ZZ,onWheelCapture:ZZ,onTouchMoveCapture:ZZ}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=NZ(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=WZ([n,t]),w=MZ(MZ({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:XZ,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),MZ(MZ({},w),{ref:C})):b.createElement(v,MZ({},w,{className:c,ref:C}),s))});QZ.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},QZ.classNames={fullWidth:LZ,zeroRight:IZ};var $Z,eQ=function(){if($Z)return $Z;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function tQ(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=eQ();return t&&e.setAttribute(`nonce`,t),e}function nQ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rQ(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var iQ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tQ())&&(nQ(t,n),rQ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aQ=function(){var e=iQ();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oQ=function(){var e=aQ();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},sQ={left:0,top:0,right:0,gap:0},cQ=function(e){return parseInt(e||``,10)||0},lQ=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[cQ(n),cQ(r),cQ(i)]},uQ=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return sQ;var t=lQ(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])}},dQ=oQ(),fQ=`data-scroll-locked`,pQ=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
85
|
+
`;case`21`:return r(`p`,{key:n.key},t(e.children,n));default:return null}}(a,o,s,t,n,r,i);return e?e(c,a,o,s):c()}(s,o,c);return c.renderDepth=l-1,a}catch(e){if(e instanceof RangeError&&e.message.includes(`Maximum call stack`))return a(s);throw e}}}(t.renderRule,s,r,n,u);return c(e)}var KW=e=>{let{children:t,options:n}=e,r=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(e,nU);return GW(t??``,ZH({},n,{wrapperProps:ZH({},n?.wrapperProps,r)}))},qW=Symbol(`remove-this-key`),JW=Symbol(`reset`);function YW(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function XW(e,t){switch(t){case`array`:return[];case`boolean`:return!1;case`null`:return null;case`number`:return 0;case`object`:return{};default:return e(tH.NewStringDefault)}}function ZW(e){let{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:a,formData:o,onChange:s,onBlur:c,onFocus:l,disabled:u,readonly:d,required:f,hideError:p,propertyName:m,handleKeyRename:h,handleRemoveProperty:g,addedByAdditionalProperties:_}=e,[v,y]=(0,b.useState)(!1),{globalFormOptions:x,fields:S}=r,{SchemaField:C}=S,w=WV(zV(m,x,t.path)),T=(0,b.useCallback)((e,t,n,r)=>{e===void 0&&_&&(e=``),s(e,t,n,r)},[s,_]),E=(0,b.useCallback)(e=>{m!==e&&y(!0),h(m,e)},[m,h]);return(0,G.jsx)(C,{name:m,required:f,schema:n,uiSchema:i,errorSchema:a,fieldPathId:w,formData:o,wasPropertyKeyModified:v,onKeyRename:E,onKeyRenameBlur:(0,b.useCallback)(e=>{let{target:{value:t}}=e;E(t)},[E]),onRemoveProperty:(0,b.useCallback)(()=>{g(m)},[m,g]),onChange:T,onBlur:c,onFocus:l,registry:r,disabled:u,readonly:d,hideError:p})}function QW(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,required:s=!1,disabled:c,readonly:l,hideError:u,onBlur:d,onFocus:f,onChange:p,registry:m,title:h}=e,{fields:g,schemaUtils:_,translateString:v,globalUiOptions:y}=m,{OptionalDataControlsField:x}=g,S=_.retrieveSchema(t,r,!0),C=mR(n,y),{properties:w={}}=S,T=e.childFieldPathId??a,E=C.title??S.title??h??o,D=C.description??S.description,O=FV(m,S,s,n),k=xV(r),A=[],j=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=mR(n,y),i=0,a=e;for(;Yx(t,a);)a=`${e}${r}${++i}`;return a},[n,y]),M=(0,b.useCallback)(()=>{if(!(S.additionalProperties||S.patternProperties))return;let{translateString:e}=m,t={...r},n=j(`newKey`,t);if(S.patternProperties)MS(t,n,null);else{let i,a,o;if(Xh(S.additionalProperties)){i=S.additionalProperties.type,a=S.additionalProperties.const,o=S.additionalProperties.default;let e=S.additionalProperties;if(`$ref`in e){let{schemaUtils:t}=m;e=t.retrieveSchema({[sR]:e[sR]},r),i=e.type,a=e.const,o=e.default}!i&&(`anyOf`in e||`oneOf`in e)&&(i=`object`)}MS(t,n,a??o??XW(e,i))}p(t,T.path)},[r,p,m,T,j,S]),N=(0,b.useCallback)((e,t)=>{if(e!==t){let n=j(t,r),i={...r},a={[e]:n},o=Object.keys(i).map(e=>({[a[e]||e]:i[e]}));p(Object.assign({},...o),T.path)}},[r,p,T,j]),P=(0,b.useCallback)(e=>{p(qW,[...T.path,e])},[p,T]);if(!O||k)try{A=EV(Object.keys(w),C.order)}catch(e){return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},children:v(tH.InvalidObjectField,[o||`root`,e.message])})}),(0,G.jsx)(`pre`,{children:JSON.stringify(S)})]})}let F=$B(`ObjectFieldTemplate`,m,C),I=O?(0,G.jsx)(x,{...e,fieldPathId:T,schema:S}):void 0;return(0,G.jsx)(F,{title:C.label===!1?``:E,description:C.label===!1?void 0:D,properties:A.map(e=>{let t=Yx(S,[iR,e,JL]),a=t?n.additionalProperties:n[e],o=mR(a).widget===`hidden`;return{content:(0,G.jsx)(ZW,{propertyName:e,required:YW(S,e),schema:Q(S,[iR,e],{}),uiSchema:a,errorSchema:Q(i,[e]),fieldPathId:T,formData:Q(r,[e]),handleKeyRename:N,handleRemoveProperty:P,addedByAdditionalProperties:t,onChange:p,onBlur:d,onFocus:f,registry:m,disabled:c,readonly:l,hideError:u},e),name:e,readonly:l,disabled:c,required:s,hidden:o}}),readonly:l,disabled:c,required:s,fieldPathId:a,uiSchema:n,errorSchema:i,schema:S,formData:r,registry:m,optionalDataControl:I,className:O?`rjsf-optional-object-field`:void 0,onAddProperty:M})}function $W(e){let{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:a=!1,onChange:o,errorSchema:s,fieldPathId:c,registry:l}=e,{globalUiOptions:u={},schemaUtils:d,translateString:f}=l,p=$B(`OptionalDataControlsTemplate`,l,mR(n,u)),m=xV(r),h,g,_,v;return i||a?(h=bV(c,`Msg`),g=m?void 0:f(tH.OptionalObjectEmptyMsg)):(g=f(m?tH.OptionalObjectRemove:tH.OptionalObjectAdd),m?(h=bV(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=bV(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=wz(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,G.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var eG={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function tG(e,t,n){let r=t.field,{fields:i}=n;if(typeof r==`function`)return r;if(typeof r==`string`&&r in i)return i[r];let a=wz(e),o=Array.isArray(a)?a[0]:a||``,s=e.$id,c=eG[o];return s&&s in i&&(c=s),!c&&(e.anyOf||e.oneOf)?()=>null:c in i?i[c]:i.FallbackField}function nG(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:a,name:o,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d=!1,registry:f,wasPropertyKeyModified:p=!1}=e,{schemaUtils:m,globalFormOptions:h,globalUiOptions:g,fields:_}=f,{AnyOfField:v,OneOfField:y}=_,x=jV(t,r,f),S=mR(x,g),C=$B(`FieldTemplate`,f,S),w=$B(`DescriptionFieldTemplate`,f,S),T=$B(`FieldHelpTemplate`,f,S),E=$B(`FieldErrorTemplate`,f,S),D=m.retrieveSchema(t,i),O=n.$id,k=(0,b.useCallback)((e,t,n,r)=>s(e,t,n,r||O),[O,s]),A=tG(D,S,f),j=!!(S.disabled??e.disabled),M=!!(S.readonly??(e.readonly||e.schema.readOnly||D.readOnly)),N=S.hideError,P=N===void 0?e.hideError:!!N,F=!!(S.autofocus??e.autofocus);if(Object.keys(D).length===0)return null;let I=m.getDisplayLabel(D,x,g),L=S.field&&S.fieldReplacesAnyOrOneOf===!0,R,z,B={fieldPathId:n};if((`anyOf`in D||`oneOf`in D)&&!L&&!m.isSelect(D)){D.anyOf?(R=v,z=D[ZL].map(e=>m.retrieveSchema(Xh(e)?e:{},i))):D.oneOf&&(R=y,z=D[rR].map(e=>m.retrieveSchema(Xh(e)?e:{},i)));let e=FV(f,D,d,x),t=xV(i);I&&=!e||t,B={childFieldPathId:n,fieldPathId:zV(`XxxOf`,h,n)}}let{__errors:V,...H}=a||{},U=wS(x,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in U&&(U[fR]=wS(U[fR],[`classNames`,`style`]));let ee=(0,G.jsx)(A,{...e,onChange:k,...B,schema:D,uiSchema:U,disabled:j,readonly:M,hideError:P,autofocus:F,errorSchema:H,rawErrors:V}),W=n.$id,te;te=p||`__additional_property`in D?o:S.title||e.schema.title||D.title||e.title||o;let ne=S.description||e.schema.description||D.description||``,re=S.help,ie=S.widget===`hidden`,ae=[`rjsf-field`,`rjsf-field-${wz(D)}`];!P&&V&&V.length>0&&ae.push(`rjsf-field-error`),S.classNames&&ae.push(S.classNames);let oe=(0,G.jsx)(T,{help:re,fieldPathId:n,schema:D,uiSchema:x,hasErrors:!P&&V&&V.length>0,registry:f}),se=P||R&&!m.isSelect(D)?void 0:(0,G.jsx)(E,{errors:V,errorSchema:a,fieldPathId:n,schema:D,uiSchema:x,registry:f});return(0,G.jsx)(C,{description:(0,G.jsx)(w,{id:fV(W),description:ne,schema:D,uiSchema:x,registry:f}),rawDescription:ne,help:oe,rawHelp:typeof re==`string`?re:void 0,errors:se,rawErrors:P?void 0:V,fieldPathId:n,id:W,label:te,hidden:ie,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:j,readonly:M,hideError:P,displayLabel:I,classNames:ae.join(` `).trim(),style:S.style,formData:i,schema:D,uiSchema:x,registry:f,children:(0,G.jsxs)(G.Fragment,{children:[ee,R&&(0,G.jsx)(R,{name:o,disabled:j,readonly:M,hideError:P,errorSchema:a,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:z,registry:f,required:d,schema:D,uiSchema:x})]})})}var rG=class extends b.Component{shouldComponentUpdate(e){let{registry:{globalFormOptions:t}}=this.props,{experimental_componentUpdateStrategy:n=`customDeep`}=t;return NV(this,e,this.state,n)}render(){return(0,G.jsx)(nG,{...this.props})}};function iG(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,required:o,disabled:s=!1,readonly:c=!1,autofocus:l=!1,onChange:u,onBlur:d,onFocus:f,registry:p,rawErrors:m,hideError:h,title:g}=e,{title:_,format:v}=t,{widgets:y,schemaUtils:x,globalUiOptions:S}=p,C=x.isSelect(t)?dB(t,r):void 0,w=C?`select`:`text`;v&&uV(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=mR(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=aV(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,G.jsx)(j,{options:{...O,enumOptions:C},schema:t,uiSchema:r,id:i.$id,name:n,label:A,hideLabel:!k,hideError:h,value:a,onChange:M,onBlur:d,onFocus:f,required:o,disabled:s,readonly:c,autofocus:l,registry:p,placeholder:E,rawErrors:m,htmlName:i.name})}function aG(e){let{formData:t,onChange:n,fieldPathId:r}=e;return(0,b.useEffect)(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function oG(){return{AnyOfField:qH,ArrayField:gH,BooleanField:_H,FallbackField:xH,LayoutGridField:HH,LayoutHeaderField:UH,LayoutMultiSchemaField:KH,NumberField:XH,ObjectField:QW,OneOfField:qH,OptionalDataControlsField:$W,SchemaField:rG,StringField:iG,NullField:aG}}function sG(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=mR(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,G.jsx)($B(`DescriptionFieldTemplate`,r,o),{id:fV(t),description:n,schema:i,uiSchema:a,registry:r})}function cG(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=$B(`ArrayFieldItemButtonsTemplate`,s,mR(c)),u={flex:1,paddingLeft:6,paddingRight:6,fontWeight:`bold`},d=a?31:9,f={display:`flex`,alignItems:i?`center`:`baseline`},p={display:`flex`,justifyContent:`flex-end`,marginTop:i?`${d}px`:0};return(0,G.jsxs)(`div`,{className:n,style:f,children:[(0,G.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,G.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,G.jsx)(`div`,{className:`btn-group`,style:p,children:(0,G.jsx)(l,{...r,style:u})})})]})}function lG(e){let{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:a,fieldPathId:o,onCopyItem:s,onRemoveItem:c,onMoveDownItem:l,onMoveUpItem:u,readonly:d,registry:f,uiSchema:p}=e,{CopyButton:m,MoveDownButton:h,MoveUpButton:g,RemoveButton:_}=f.templates.ButtonTemplates;return(0,G.jsxs)(G.Fragment,{children:[(i||r)&&(0,G.jsx)(g,{id:yV(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,G.jsx)(h,{id:yV(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,G.jsx)(m,{id:yV(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,G.jsx)(_,{id:yV(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function uG(e){let{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:a,items:o,optionalDataControl:s,onAddClick:c,readonly:l,registry:u,required:d,schema:f,title:p}=e,m=mR(a),h=$B(`ArrayFieldDescriptionTemplate`,u,m),g=$B(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,G.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,G.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,G.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,G.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,G.jsx)(v,{id:yV(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function dG(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=mR(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,G.jsx)($B(`TitleFieldTemplate`,o,c),{id:gV(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function fG(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,G.jsx)(`datalist`,{id:mV(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,G.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function pG(e){let{id:t,name:n,htmlName:r,value:i,readonly:a,disabled:o,autofocus:s,onBlur:c,onFocus:l,onChange:u,onChangeOverride:d,options:f,schema:p,uiSchema:m,registry:h,rawErrors:g,type:_,hideLabel:v,hideError:y,...x}=e,{ClearButton:S}=h.templates.ButtonTemplates;if(!t)throw console.log(`No id for`,e),Error(`no id for props ${JSON.stringify(e)}`);let C={...x,...XB(p,_,f)},w;w=C.type===`number`||C.type===`integer`?i||i===0?i:``:i??``;let T=(0,b.useCallback)(({target:{value:e}})=>u(e===``?f.emptyValue:e),[u,f]),E=(0,b.useCallback)(({target:e})=>c(t,e&&e.value),[c,t]),D=(0,b.useCallback)(({target:e})=>l(t,e&&e.value),[l,t]),O=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),u(f.emptyValue??``)},[u,f.emptyValue]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?mV(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":_V(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,G.jsx)(S,{registry:h,onClick:O}),(0,G.jsx)(fG,{id:t,schema:p})]})}function mG({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=QB(e);return n?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function hG(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,G.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,G.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}function gG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.CopyButton),...e,icon:`copy`})}function _G(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.MoveDownButton),...e,icon:`arrow-down`})}function vG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.MoveUpButton),...e,icon:`arrow-up`})}function yG(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(hG,{title:t(tH.RemoveButton),...e,iconType:`danger`,icon:`remove`})}function bG({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,G.jsx)(hG,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(tH.ClearButton),onClick:n,disabled:r,registry:i,...a})}function xG({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,G.jsx)(`div`,{className:`row`,children:(0,G.jsx)(`p`,{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:(0,G.jsx)(hG,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(tH.AddButton),onClick:n,disabled:r,registry:i})})})}function SG(){return{SubmitButton:mG,AddButton:xG,CopyButton:gG,MoveDownButton:_G,MoveUpButton:vG,RemoveButton:yG,ClearButton:bG}}var CG=eV();function wG({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return mR(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},"data-testid":CG.markdown,children:e}):e}wG.TEST_IDS=CG;function TG(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,G.jsx)(`div`,{id:t,className:`field-description`,children:(0,G.jsx)(wG,{description:n,registry:r,uiSchema:i})}):null}function EG({errors:e,registry:t}){let{translateString:n}=t;return(0,G.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,G.jsx)(`div`,{className:`panel-heading`,children:(0,G.jsx)(`h3`,{className:`panel-title`,children:n(tH.ErrorsLabel)})}),(0,G.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,G.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function DG(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,G.jsx)($B(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}var OG=`*`;function kG(e){let{label:t,required:n,id:r}=e;return t?(0,G.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,G.jsx)(`span`,{className:`required`,children:OG})]}):null}function AG(e){let{id:t,label:n,children:r,errors:i,help:a,description:o,hidden:s,required:c,displayLabel:l,registry:u,uiSchema:d}=e,f=mR(d),p=$B(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,G.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,G.jsxs)(p,{...e,children:[l&&!m&&(0,G.jsx)(kG,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var jG=AG;function MG(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(`ul`,{id:pV(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,G.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var NG=eV();function PG({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return mR(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},"data-testid":NG.markdown,children:e}):e}PG.TEST_IDS=NG;function FG(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,G.jsx)(`div`,{id:hV(t),className:`help-block`,children:(0,G.jsx)(PG,{help:n,registry:i,uiSchema:r})}):null}function IG(e){let{children:t,column:n,className:r,...i}=e;return(0,G.jsx)(`div`,{className:r,...i,children:t})}function LG(e){let{selector:t,optionSchemaField:n}=e;return(0,G.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,G.jsx)(`div`,{className:`form-group`,children:t}),n]})}function RG(e){let{className:t,description:n,disabled:r,formData:i,fieldPathId:a,onAddProperty:o,optionalDataControl:s,properties:c,readonly:l,registry:u,required:d,schema:f,title:p,uiSchema:m}=e,h=mR(m),g=$B(`TitleFieldTemplate`,u,h),_=$B(`DescriptionFieldTemplate`,u,h);if((f.oneOf||f.anyOf)&&!f.properties&&c.length===0)return null;let v=!l&&!r,{ButtonTemplates:{AddButton:y}}=u.templates;return(0,G.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,G.jsx)(g,{id:gV(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,G.jsx)(_,{id:fV(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),hR(f,m,i)&&(0,G.jsx)(y,{id:yV(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function zG(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,G.jsx)(hG,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,G.jsx)(hG,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,G.jsx)(`em`,{id:t,children:r})}var BG=`*`;function VG(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,G.jsxs)(`legend`,{id:t,children:[n,r&&(0,G.jsx)(`span`,{className:`required`,children:BG}),i&&(0,G.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function HG(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=tH.UnsupportedField,s=[];return n&&n.$id&&(o=tH.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===tH.UnsupportedField?tH.UnsupportedFieldWithReason:tH.UnsupportedFieldWithIdAndReason,s.push(r)),(0,G.jsxs)(`div`,{className:`unsupported-field`,children:[(0,G.jsx)(`p`,{children:(0,G.jsx)(KW,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,G.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function UG(e){let{id:t,classNames:n,style:r,disabled:i,displayLabel:a,label:o,onKeyRenameBlur:s,onRemoveProperty:c,rawDescription:l,readonly:u,required:d,schema:f,hideError:p,rawErrors:m,children:h,uiSchema:g,registry:_}=e,{templates:v,translateString:y}=_,{RemoveButton:b}=v.ButtonTemplates,x=y(tH.KeyLabel,[o]),S=JL in f,C=!!l,w=[`form-group`,n];!p&&m&&m.length>0&&w.push(`has-error has-danger`);let T=w.join(` `).trim();if(!S)return(0,G.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,G.jsx)(`div`,{className:T,style:r,children:(0,G.jsxs)(`div`,{className:`row`,children:[(0,G.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,G.jsxs)(`div`,{className:`form-group`,children:[a&&(0,G.jsx)(kG,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,G.jsx)(`div`,{children:`\xA0`}),(0,G.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o})]})}),(0,G.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,G.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,G.jsx)(b,{id:yV(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function WG(){return{ArrayFieldDescriptionTemplate:sG,ArrayFieldItemTemplate:cG,ArrayFieldItemButtonsTemplate:lG,ArrayFieldTemplate:uG,ArrayFieldTitleTemplate:dG,ButtonTemplates:SG(),BaseInputTemplate:pG,DescriptionFieldTemplate:TG,ErrorListTemplate:EG,FallbackFieldTemplate:DG,FieldTemplate:jG,FieldErrorTemplate:MG,FieldHelpTemplate:FG,GridTemplate:IG,MultiSchemaFieldTemplate:LG,ObjectFieldTemplate:RG,OptionalDataControlsTemplate:zG,TitleFieldTemplate:VG,UnsupportedFieldTemplate:HG,WrapIfAdditionalTemplate:UG}}function GG(e){let{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:a,name:o,registry:s,onBlur:c,onFocus:l}=e,{translateString:u}=s,{elements:d,handleChange:f,handleClear:p,handleSetNow:m}=UV(e);return(0,G.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(HV,{rootId:a,name:o,select:f,...e,disabled:t,readonly:n,registry:s,onBlur:c,onFocus:l,autofocus:r&&i===0})},i)),(i.hideNowButton===`undefined`?!0:!i.hideNowButton)&&(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(`a`,{href:`#`,className:`btn btn-info btn-now`,onClick:m,children:u(tH.NowLabel)})}),(i.hideClearButton===`undefined`?!0:!i.hideClearButton)&&(0,G.jsx)(`li`,{className:`list-inline-item`,children:(0,G.jsx)(`a`,{href:`#`,className:`btn btn-warning btn-clear`,onClick:p,children:u(tH.ClearLabel)})})]})}function KG({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,G.jsx)(n,{time:e,...t})}function qG({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:a,readonly:o,label:s,hideLabel:c,autofocus:l=!1,onBlur:u,onFocus:d,onChange:f,registry:p,htmlName:m}){let h=$B(`DescriptionFieldTemplate`,p,n),g=MV(e),_=(0,b.useCallback)(e=>f(e.target.checked),[f]),v=(0,b.useCallback)(e=>u(r,e.target.checked),[u,r]),y=(0,b.useCallback)(e=>d(r,e.target.checked),[d,r]),x=mR(t).widget===`checkbox`?void 0:n.description??e.description;return(0,G.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,G.jsx)(h,{id:fV(r),description:x,schema:e,uiSchema:t,registry:p}),(0,G.jsxs)(`label`,{children:[(0,G.jsx)(`input`,{type:`checkbox`,id:r,name:m||r,checked:i===void 0?!1:i,required:g,disabled:a||o,autoFocus:l,onChange:_,onBlur:v,onFocus:y,"aria-describedby":_V(r)}),CV((0,G.jsx)(`span`,{children:s}),c)]})]})}function JG({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:a},value:o,autofocus:s=!1,readonly:c,onChange:l,onBlur:u,onFocus:d,htmlName:f}){let p=Array.isArray(o)?o:[o],m=(0,b.useCallback)(({target:t})=>u(e,VB(t&&t.value,r,a)),[u,e,r,a]),h=(0,b.useCallback)(({target:t})=>d(e,VB(t&&t.value,r,a)),[d,e,r,a]);return(0,G.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(r)&&r.map((a,o)=>{let u=UB(a.value,p),d=Array.isArray(i)&&i.indexOf(a.value)!==-1,g=t||d||c?`disabled`:``,_=(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`input`,{type:`checkbox`,id:vV(e,o),name:f||e,checked:u,value:String(o),disabled:t||d||c,autoFocus:s&&o===0,onChange:e=>{e.target.checked?l(GB(o,p,r)):l(HB(o,p,r))},onBlur:m,onFocus:h,"aria-describedby":_V(e)}),(0,G.jsx)(`span`,{children:a.label})]});return n?(0,G.jsx)(`label`,{className:`checkbox-inline ${g}`,children:_},o):(0,G.jsx)(`div`,{className:`checkbox ${g}`,children:(0,G.jsx)(`label`,{children:_})},o)})})}function YG(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,G.jsx)($B(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function XG(e){let{onChange:t,options:n,registry:r}=e,i=$B(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,G.jsx)(i,{type:`date`,...e,onChange:a})}function ZG(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,G.jsx)($B(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:XV(n),onChange:e=>t(wV(e))})}function QG(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`email`,...e})}function $G({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;return r?[`image/jpeg`,`image/png`].includes(i)?(0,G.jsx)(`img`,{src:r,style:{maxWidth:`100%`},className:`file-preview`}):(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:n(tH.PreviewLabel)})]}):null}function eK({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=$B(`ButtonTemplates`,t,i);return(0,G.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,G.jsxs)(`li`,{children:[(0,G.jsx)(KW,{children:a(tH.FilesInfo,[s,l,String(c)])}),n&&(0,G.jsx)($G,{fileInfo:e,registry:t}),(0,G.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function tK(e){let{disabled:t,readonly:n,required:r,multiple:i,onChange:a,value:o,options:s,registry:c}=e,{filesInfo:l,handleChange:u,handleRemove:d}=YV(o,a,i),f=$B(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(f,{...e,disabled:t||n,type:`file`,required:o?!1:r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,G.jsx)(eK,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function nK({id:e,value:t,htmlName:n}){return(0,G.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function rK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`password`,...e})}function iK({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:a=!1,onBlur:o,onFocus:s,onChange:c,id:l,htmlName:u}){let{enumOptions:d,enumDisabled:f,inline:p,emptyValue:m}=e,h=(0,b.useCallback)(({target:e})=>o(l,VB(e&&e.value,d,m)),[o,d,m,l]),g=(0,b.useCallback)(({target:e})=>s(l,VB(e&&e.value,d,m)),[s,d,m,l]);return(0,G.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=UB(e.value,t),d=Array.isArray(f)&&f.indexOf(e.value)!==-1,m=r||d||i?`disabled`:``,_=(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`input`,{type:`radio`,id:vV(l,o),checked:s,name:u||l,required:n,value:String(o),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:h,onFocus:g,"aria-describedby":_V(l)}),(0,G.jsx)(`span`,{children:e.label})]});return p?(0,G.jsx)(`label`,{className:`radio-inline ${m}`,children:_},o):(0,G.jsx)(`div`,{className:`radio ${m}`,children:(0,G.jsx)(`label`,{children:_})},o)})})}function aK(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,G.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,G.jsx)(n,{type:`range`,...e}),(0,G.jsx)(`span`,{className:`range-view`,children:t})]})}function oK({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:a,onChange:o,onFocus:s,onBlur:c,schema:l,options:u,htmlName:d}){let{stars:f=5,shape:p=`star`}=u,m=l.maximum?Math.min(l.maximum,5):Math.min(Math.max(f,1),5),h=l.minimum||0,g=(0,b.useCallback)(e=>{!r&&!i&&o(e)},[o,r,i]),_=(0,b.useCallback)(t=>{s&&s(e,Number(t.target.dataset.value))},[s,e]),v=(0,b.useCallback)(t=>{c&&c(e,Number(t.target.dataset.value))},[c,e]),y=e=>p===`heart`?e?`♥`:`♡`:e?`★`:`☆`;return(0,G.jsx)(G.Fragment,{children:(0,G.jsxs)(`div`,{className:`rating-widget`,style:{display:`inline-flex`,fontSize:`1.5rem`,cursor:r||i?`default`:`pointer`},children:[[...Array(m)].map((e,n)=>{let a=h+n,o=a<=t;return(0,G.jsx)(`span`,{onClick:()=>g(a),onFocus:_,onBlur:v,"data-value":a,tabIndex:r||i?-1:0,role:`radio`,"aria-checked":a===t,"aria-label":`${a} ${p===`heart`?`heart`:`star`}${a===1?``:`s`}`,style:{color:o?`#FFD700`:`#ccc`,padding:`0 0.2rem`,transition:`color 0.2s`,userSelect:`none`},children:y(o)},n)}),(0,G.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})})}function sK(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function cK({schema:e,id:t,options:n,value:r,required:i,disabled:a,readonly:o,multiple:s=!1,autofocus:c=!1,onChange:l,onBlur:u,onFocus:d,placeholder:f,htmlName:p}){let{enumOptions:m,enumDisabled:h,emptyValue:g}=n,_=s?[]:``,v=(0,b.useCallback)(e=>d(t,VB(sK(e,s),m,g)),[d,t,s,m,g]),y=(0,b.useCallback)(e=>u(t,VB(sK(e,s),m,g)),[u,t,s,m,g]),x=(0,b.useCallback)(e=>l(VB(sK(e,s),m,g)),[l,s,m,g]),S=WB(r,m,s),C=!s&&e.default===void 0;return(0,G.jsxs)(`select`,{id:t,name:p||t,multiple:s,role:`combobox`,className:`form-control`,value:S===void 0?_:S,required:i,disabled:a||o,autoFocus:c,onBlur:y,onFocus:v,onChange:x,"aria-describedby":_V(t),children:[C&&(0,G.jsx)(`option`,{value:``,children:f}),Array.isArray(m)&&m.map(({value:e,label:t},n)=>{let r=h&&h.indexOf(e)!==-1;return(0,G.jsx)(`option`,{value:String(n),disabled:r,children:t},n)})]})}function lK({id:e,options:t={},placeholder:n,value:r,required:i,disabled:a,readonly:o,autofocus:s=!1,onChange:c,onBlur:l,onFocus:u,htmlName:d}){let f=(0,b.useCallback)(({target:{value:e}})=>c(e===``?t.emptyValue:e),[c,t.emptyValue]),p=(0,b.useCallback)(({target:t})=>l(e,t&&t.value),[l,e]),m=(0,b.useCallback)(({target:t})=>u(e,t&&t.value),[e,u]);return(0,G.jsx)(`textarea`,{id:e,name:d||e,className:`form-control`,value:r||``,placeholder:n,required:i,disabled:a,readOnly:o,autoFocus:s,rows:t.rows,onBlur:p,onFocus:m,onChange:f,"aria-describedby":_V(e)})}function uK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{...e})}function dK(e){let{onChange:t,options:n,registry:r}=e,i=$B(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,G.jsx)(i,{type:`time`,...e,onChange:a})}function fK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`url`,...e})}function pK(e){let{options:t,registry:n}=e;return(0,G.jsx)($B(`BaseInputTemplate`,n,t),{type:`number`,...e})}function mK(){return{AltDateWidget:GG,AltDateTimeWidget:KG,CheckboxWidget:qG,CheckboxesWidget:JG,ColorWidget:YG,DateWidget:XG,DateTimeWidget:ZG,EmailWidget:QG,FileWidget:tK,HiddenWidget:nK,PasswordWidget:rK,RadioWidget:iK,RangeWidget:aK,RatingWidget:oK,SelectWidget:cK,TextWidget:uK,TextareaWidget:lK,TimeWidget:dK,UpDownWidget:pK,URLWidget:fK}}function hK(){return{fields:oG(),templates:WG(),widgets:mK(),rootSchema:{},formContext:{},translateString:BB,globalFormOptions:{idPrefix:lR,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function gK(e,t){return{...kS(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var _K=class extends b.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,t){if(e.extraErrors!==t._prevExtraErrors){let n={errors:t.schemaValidationErrors||[],errorSchema:t.schemaValidationErrorSchema||{}},{errors:r,errorSchema:i}=n;return e.extraErrors&&({errors:r,errorSchema:i}=ZV(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=ZV({errors:r,errorSchema:i},t.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:r,errorSchema:i}}return null}constructor(e){if(super(e),!e.validator)throw Error(`A validator is required for Form functionality to work`);let{formData:t,initialFormData:n,onChange:r}=e,i=t??n;this.state={...this.getStateFromProps(e,i,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},r&&!_R(this.state.formData,i)&&r(gK(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!_R(this.props,e)){let n=qB(this.props.formData,e.formData),r=qB(this.props.formData,this.state.formData),i=!_R(e.schema,this.props.schema),a=n.length>0||!_R(e.formData,this.props.formData),o=r.length>0||!_R(this.state.formData,this.props.formData),s=this.getStateFromProps(this.props,this.props.formData,i||a?void 0:this.state.retrievedSchema,i,n,!o);return{nextState:s,shouldUpdate:!_R(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!_R(e.formData,this.props.formData),i=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,i&&r)return;r&&!_R(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(gK(e)),this.setState(e)}}getStateFromProps(e,t,n,r=!1,i=[],a=!1){let o=this.state||{},s=`schema`in e?e.schema:this.props.schema,c=`validator`in e?e.validator:this.props.validator,l=(`uiSchema`in e?e.uiSchema:this.props.uiSchema)||{},u=e.formData===void 0&&this.props.formData===void 0,d=t!==void 0,f=`liveValidate`in e?e.liveValidate:this.props.liveValidate,p=d&&!e.noValidate&&f,m=`experimental_defaultFormStateBehavior`in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,h=`experimental_customMergeAllOf`in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf,g=o.schemaUtils;(!g||g.doesSchemaUtilsDiffer(c,s,m,h))&&(g=PB(c,s,m,h));let _=g.getRootSchema(),v=t;t===JW?v=void 0:t===void 0&&u&&(v=o.formData);let y=g.getDefaultFormState(_,v,!1,o.initialDefaultsGenerated),b=this.updateRetrievedSchema(n??g.retrieveSchema(_,y)),x=()=>e.noValidate||r?{errors:[],errorSchema:{}}:e.liveValidate?{errors:o.errors||[],errorSchema:o.errorSchema||{}}:{errors:o.schemaValidationErrors||[],errorSchema:o.schemaValidationErrorSchema||{}},S,C,w=o.schemaValidationErrors,T=o.schemaValidationErrorSchema;if(p&&!a){let e=this.liveValidate(_,g,o.errorSchema,y,void 0,o.customErrors,n,n!==void 0);S=e.errors,C=e.errorSchema,w=e.schemaValidationErrors,T=e.schemaValidationErrorSchema}else{let t=x();if(S=t.errors,C=t.errorSchema,i.length>0&&!p){let e=i.reduce((e,t)=>(e[t]=void 0,e),{});C=T=iB(t.errorSchema,e,`preventDuplicates`)}let n=this.mergeErrors({errorSchema:C,errors:S},e.extraErrors,o.customErrors);S=n.errors,C=n.errorSchema}let E=this.getRegistry(e,_,g),D=_R(o.registry,E)?o.registry:E,O=D.uiSchemaDefinitions?AV(_,l,D):l,k=o.fieldPathId&&o.fieldPathId?.$id===D.globalFormOptions.idPrefix?o.fieldPathId:zV(``,D.globalFormOptions);return{schemaUtils:g,schema:_,uiSchema:O,fieldPathId:k,formData:y,edit:d,errors:S,errorSchema:C,schemaValidationErrors:w,schemaValidationErrorSchema:T,retrievedSchema:b,initialDefaultsGenerated:!0,registry:D}}shouldComponentUpdate(e,t){let{experimental_componentUpdateStrategy:n=`customDeep`}=this.props;return NV(this,e,t,n)}validate(e,t=this.state.schema,n,r){let i=n||this.state.schemaUtils,{customValidate:a,transformErrors:o,uiSchema:s}=this.props,c=r??i.retrieveSchema(t,e);return i.getValidator().validateFormData(e,c,a,o,s)}renderErrors(e){let{errors:t,errorSchema:n,schema:r,uiSchema:i}=this.state,a=$B(`ErrorListTemplate`,e,mR(i));return t&&t.length?(0,G.jsx)(a,{errors:t,errorSchema:n||{},schema:r,uiSchema:i,registry:e}):null}mergeErrors(e,t,n){let r=e.errorSchema,i=e.errors;if(t){let n=ZV(e,t);r=n.errorSchema,i=n.errors}if(n){let e=ZV({errors:i,errorSchema:r},n.ErrorSchema,!0);r=e.errorSchema,i=e.errors}return{errors:i,errorSchema:r}}liveValidate(e,t,n,r,i,a,o,s=!1){let c=this.validate(r,e,t,o),l=c.errors,u=c.errorSchema;s&&(u=iB(n,c.errorSchema,`preventDuplicates`));let d=l,f=u;return{...this.mergeErrors({errorSchema:u,errors:l},i,a),schemaValidationErrors:d,schemaValidationErrorSchema:f}}getUsedFormData=(e,t)=>OB(e,t);getFieldNames=(e,t)=>kB(e,t);omitExtraData=e=>{let{schema:t,schemaUtils:n}=this.state;return n.omitExtraData(t,e)};setFieldValue=(e,t)=>{let{registry:n}=this.state,r=Array.isArray(e)?e:e.split(`.`),i=zV(``,n.globalFormOptions,r);this.onChange(t,r,void 0,i.$id)};onChange=(e,t,n,r)=>{this.pendingChanges.push({newValue:e,path:t,newErrorSchema:n,id:r}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;let{newValue:e,path:t,id:n}=this.pendingChanges[0],{newErrorSchema:r}=this.pendingChanges[0],{extraErrors:i,omitExtraData:a,liveOmit:o,noValidate:s,liveValidate:c,onChange:l}=this.props,{formData:u,schemaUtils:d,schema:f,fieldPathId:p,schemaValidationErrorSchema:m,errors:h}=this.state,{customErrors:g,errorSchema:_}=this.state,v=p.path[0]||``,y=!t||t.length===0||t.length===1&&t[0]===v,b=this.state.retrievedSchema,x=y?e:ox(u),S=KL(x)&&Object.keys(x).length>0&&Object.values(x).every(e=>e===void 0)&&u==null?void 0:x;if(KL(x)||Array.isArray(x)){e===qW?WS(x,t):y||MS(x,t,e);let n=this.getStateFromProps(this.props,S,void 0,void 0,void 0,!0);x=n.formData,b=n.retrievedSchema}let C=!s&&(c===!0||c===`onChange`),w={formData:x,schema:f},T=x;if(a===!0&&(o===!0||o===`onChange`)&&(T=this.omitExtraData(x),w={formData:T}),r)if(!uS(y?m:Q(m,t)))y?_=r:MS(_,t,r);else if(g||=new KB,y){let e=Q(r,eR);e&&g.setErrors(e)}else MS(g.ErrorSchema,t,r);else g&&Q(g.ErrorSchema,[...t,`__errors`])&&g.clearErrors(t);if(C&&this.pendingChanges.length===1){let e=this.liveValidate(f,d,_,T,i,g,b);w={formData:T,...e,customErrors:g}}else if(!s&&r){let e=this.mergeErrors({errorSchema:_,errors:h},i,g);w={formData:T,...e,customErrors:g}}this.setState(w,()=>{l&&l(gK({...this.state,...w}),n),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return _R(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=JW,onChange:n}=this.props,r={formData:this.getStateFromProps(this.props,e??t,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(r,()=>n&&n(gK({...this.state,...r})))};onBlur=(e,t)=>{let{onBlur:n,omitExtraData:r,liveOmit:i,liveValidate:a}=this.props;if(n&&n(e,t),r===!0&&i===`onBlur`||a===`onBlur`){let{onChange:t,extraErrors:n}=this.props,{formData:o}=this.state,s=o,c={formData:s};if(r===!0&&i===`onBlur`&&(s=this.omitExtraData(o),c={formData:s}),a===`onBlur`){let{schema:e,schemaUtils:t,errorSchema:r,customErrors:i,retrievedSchema:a}=this.state,o=this.liveValidate(e,t,r,s,n,i,a);c={formData:s,...o,customErrors:i}}let l=Object.keys(c).filter(e=>!e.startsWith(`schemaValidation`)).some(e=>!_R(Q(this.state,e),Q(c,e)));this.setState(c,()=>{t&&l&&t(gK({...this.state,...c}),e)})}};onFocus=(e,t)=>{let{onFocus:n}=this.props;n&&n(e,t)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();let{omitExtraData:t,extraErrors:n,noValidate:r,onSubmit:i}=this.props,{formData:a}=this.state;if(t===!0&&(a=this.omitExtraData(a)),r||this.validateFormWithFormData(a)){let t=n||{},r=n?LV(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(gK({...this.state,formData:a},`submitted`),e)})}};getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=lR,nameGenerator:a,useFallbackUiForUnsupportedType:o=!1}=e;return{idPrefix:t[`ui:rootFieldId`]||i,idSeparator:r,useFallbackUiForUnsupportedType:o,...n!==void 0&&{experimental_componentUpdateStrategy:n},...a!==void 0&&{nameGenerator:a}}}getRegistry(e,t,n){let{translateString:r,uiSchema:i={}}=e,{fields:a,templates:o,widgets:s,formContext:c,translateString:l}=hK();return{fields:{...a,...e.fields},templates:{...o,...e.templates,ButtonTemplates:{...o.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...s,...e.widgets},rootSchema:t,formContext:e.formContext||c,schemaUtils:n,translateString:r||l,globalUiOptions:i[pR],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:i[`ui:definitions`]??{}}}submit=()=>{if(this.formElement.current){let e=new CustomEvent(`submit`,{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){let{idPrefix:t=`root`,idSeparator:n=`_`}=this.props,{property:r}=e,i=FS(r);i[0]===``?i[0]=t:i.unshift(t);let a=i.join(n),o=this.formElement.current.elements[a];o||=this.formElement.current.querySelector(`input[id^="${a}"`),o&&o.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=e=>{let{extraErrors:t,extraErrorsBlockSubmit:n,focusOnFirstError:r,onError:i}=this.props,{errors:a}=this.state,o=this.validate(e),{errors:s,errorSchema:c}=t?this.mergeErrors(o,t):o,l=o.errors.length>0||t&&n;return l?(r&&(typeof r==`function`?r(s[0]):this.focusOnError(s[0])),this.setState({errors:s,errorSchema:c,schemaValidationErrors:o.errors,schemaValidationErrorSchema:o.errorSchema},()=>{i?i(s):console.error(`Form validation failed`,s)})):s.length>0?this.setState({errors:s,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):a.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!l};validateForm(){let{omitExtraData:e}=this.props,{formData:t}=this.state;return e===!0&&(t=this.omitExtraData(t)),this.validateFormWithFormData(t)}render(){let{children:e,id:t,className:n=``,tagName:r,name:i,method:a,target:o,action:s,autoComplete:c,enctype:l,acceptCharset:u,noHtml5Validate:d=!1,disabled:f,readonly:p,showErrorList:m=`top`,_internalFormWrapper:h}=this.props,{schema:g,uiSchema:_,formData:v,errorSchema:y,fieldPathId:b,registry:x}=this.state,{SchemaField:S}=x.fields,{SubmitButton:C}=x.templates.ButtonTemplates,w=h?r:void 0,T=h||r||`form`,{[oR]:E={}}=mR(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[fR]:{[oR]:E}};return(0,G.jsxs)(T,{className:n||`rjsf`,id:t,name:i,method:a,target:o,action:s,autoComplete:c,encType:l,acceptCharset:u,noValidate:d,onSubmit:this.onSubmit,as:w,ref:this.formElement,children:[m===`top`&&this.renderErrors(x),(0,G.jsx)(S,{name:``,schema:g,uiSchema:_,errorSchema:y,fieldPathId:b,formData:v,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:f,readonly:p}),e||(0,G.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function vK(e){return(0,b.forwardRef)(({fields:t,widgets:n,templates:r,...i},a)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},(0,G.jsx)(_K,{...e,...i,fields:t,widgets:n,templates:r,ref:a})))}var yK=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c,l),"date-time":t(d,f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:w,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:_,int32:{type:`number`,validate:b},int64:{type:`number`,validate:x},float:{type:`number`,validate:S},double:{type:`number`,validate:S},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(e,t){let n=s.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[5];return(r<=23&&i<=59&&a<=59||r===23&&i===59&&a===60)&&(!t||o!==``)}function l(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3]+(n[4]||``),t=r[1]+r[2]+r[3]+(r[4]||``),e>t?1:e<t?-1:0}var u=/t|\s/i;function d(e){let t=e.split(u);return t.length===2&&a(t[0])&&c(t[1],!0)}function f(e,t){if(!(e&&t))return;let[n,r]=e.split(u),[i,a]=t.split(u),s=o(n,i);if(s!==void 0)return s||l(r,a)}var p=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function h(e){return p.test(e)&&m.test(e)}var g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(e){return g.lastIndex=0,g.test(e)}var v=-(2**31),y=2**31-1;function b(e){return Number.isInteger(e)&&e<=y&&e>=v}function x(e){return Number.isInteger(e)}function S(){return!0}var C=/[^\\]\\Z/;function w(e){if(C.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),bK=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatLimitDefinition=void 0;var t=Dw(),n=xC(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>n.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,n._`${t}[${d.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?n._`${l.code.formats}${n.getProperty(t)}`:void 0});e.fail$data(m(a))}function m(e){return n._`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),xK=u(s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=yK(),r=bK(),i=xC(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&r.default(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=i._`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s}))(),1),SK={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},CK=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,wK=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function TK(e,t,n={},r,i=jw.default,a){let o=new i({...SK,...n});return r?(0,xK.default)(o,r):r!==!1&&(0,xK.default)(o),o.addFormat(`data-url`,wK),o.addFormat(`color`,CK),o.addKeyword(JL),o.addKeyword(uR),Array.isArray(e)&&o.addMetaSchema(e),Xh(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}function EK(e=[],t){return e.map(e=>{let{instancePath:n,keyword:r,params:i,schemaPath:a,parentSchema:o,...s}=e,{message:c=``}=s,l=n.replace(/\//g,`.`),u=`${l} ${c}`.trim(),d=``,f=[...i.deps?.split(`, `)||[],i.missingProperty,i.property].filter(e=>e);if(f.length>0)f.forEach(e=>{let n=mR(Q(t,`${(l?`${l}.${e}`:e).replace(/^\./,``)}`)).title;if(n===void 0&&(n=mR(Q(t,a.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n)c=c.replace(`'${e}'`,`'${n}'`),d=n;else{let t=Q(o,[iR,e,`title`]);t&&(c=c.replace(`'${e}'`,`'${t}'`),d=t)}}),u=c;else{let e=mR(Q(t,`${l.replace(/^\./,``)}`)).title;if(e)u=`'${e}' ${c}`.trim(),d=e;else{let e=o?.title;e&&(u=`'${e}' ${c}`.trim(),d=e)}}return`missingProperty`in i&&(l=l?`${l}.${i.missingProperty}`:i.missingProperty),{name:r,property:l,message:c,params:i,stack:u,schemaPath:a,title:d}}).reduce((e,t)=>{let{message:n,schemaPath:r}=t,i=r?.indexOf(`/${ZL}/`),a=r?.indexOf(`/${rR}/`),o;return i&&i>=0?o=r?.substring(0,i):a&&a>=0&&(o=r?.substring(0,a)),o&&e.find(e=>e.message===n&&e.schemaPath?.startsWith(o))||e.push(t),e},[])}function DK(e,t,n,r,i,a,o){let{validationError:s}=t,c=EK(t.errors,o);s&&(c=[...c,{stack:s.message}]),typeof a==`function`&&(c=a(c,o));let l=RV(c);if(s&&(l={...l,$schema:{__errors:[s.message]}}),typeof i!=`function`)return{errors:c,errorSchema:l};let u=SB(e,r,n,r,!0),d=BV(i(u,gR(u),o,l));return ZV({errors:c,errorSchema:l},d)}var OK=class{constructor(e,t){let{additionalMetaSchemas:n,customFormats:r,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:o,extenderFn:s}=e;this.ajv=TK(n,r,i,a,o,s),this.localizer=t}reset(){this.ajv.removeSchema()}rawValidation(e,t){let n,r;try{e.$id&&(r=this.ajv.getSchema(e.$id)),r===void 0&&(r=this.ajv.compile(e)),r(t)}catch(e){n=e}let i;return r&&(typeof this.localizer==`function`&&((r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=`'${e.params[t]}'`)}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>`'${e}'`).join(`, `))}),this.localizer(r.errors),(r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=e.params[t].slice(1,-1))}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>e.slice(1,-1)).join(`, `))})),i=r.errors||void 0,r.errors=null),{errors:i,validationError:n}}validateFormData(e,t,n,r,i){let a=this.rawValidation(t,e);return DK(this,a,e,t,n,r,i)}handleSchemaUpdate(e){let t=e.$id??dR;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):_R(e,this.ajv.getSchema(t)?.schema)||(this.ajv.removeSchema(t),this.ajv.addSchema(e,t))}isValid(e,t,n){try{this.handleSchemaUpdate(n);let r=eH(e),i=r.$id??lV(r),a;return a=this.ajv.getSchema(i),a===void 0&&(a=this.ajv.addSchema(r,i).getSchema(i)||this.ajv.compile(r)),a(t)}catch(e){return console.warn(`Error encountered compiling schema:`,e),!1}}};function kK(e={},t){return new OK(e,t)}var AK=kK(),jK=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),MK=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),NK=e=>{let t=MK(e);return t.charAt(0).toUpperCase()+t.slice(1)},PK=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),FK=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},IK={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},LK=(0,b.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,b.createElement)(`svg`,{ref:c,...IK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:PK(`lucide`,i),...!a&&!FK(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])),RK=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(LK,{ref:i,iconNode:t,className:PK(`lucide-${jK(NK(e))}`,`lucide-${e}`,n),...r}));return n.displayName=NK(e),n},zK=RK(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),BK=RK(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),VK=RK(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),HK=RK(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),UK=RK(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),WK=RK(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),GK=RK(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),KK=RK(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),qK=RK(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),JK=RK(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function YK(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function XK(...e){return t=>{let n=!1,r=e.map(e=>{let r=YK(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():YK(e[t],null)}}}}function ZK(...e){return b.useCallback(XK(...e),e)}var QK=Symbol.for(`react.lazy`),$K=b.use;function eq(e){return typeof e==`object`&&!!e&&`then`in e}function tq(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===QK&&`_payload`in e&&eq(e._payload)}function nq(e){let t=iq(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;tq(r)&&typeof $K==`function`&&(r=$K(r._payload));let a=b.Children.toArray(r),o=a.find(oq);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var rq=nq(`Slot`);function iq(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(tq(n)&&typeof $K==`function`&&(n=$K(n._payload)),b.isValidElement(n)){let e=cq(n),i=sq(r,n.props);return n.type!==b.Fragment&&(i.ref=t?XK(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aq=Symbol(`radix.slottable`);function oq(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===aq}function sq(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function cq(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)}function lq(...e){return sO(LE(e))}var uq=BE(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,xs:`h-6 rounded-md gap-1 px-2 has-[>svg]:px-2`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function dq({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,G.jsx)(r?rq:`button`,{"data-slot":`button`,className:lq(uq({variant:t,size:n,className:e})),...i})}function fq({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,G.jsx)(`div`,{className:`p-0 m-0`,children:(0,G.jsxs)(dq,{...r,className:lq(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,G.jsx)(UK,{size:16}),` `,i(tH.AddItemButton)]})})}function pq(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=$B(`ArrayFieldItemButtonsTemplate`,s,mR(o)),l=i?-6:22;return(0,G.jsx)(`div`,{children:(0,G.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,G.jsx)(`div`,{className:`grow shrink`,children:t}),(0,G.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,G.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,G.jsx)(c,{...n})})})]})})}function mq(e){let{canAdd:t,disabled:n,fieldPathId:r,uiSchema:i,items:a,optionalDataControl:o,onAddClick:s,readonly:c,registry:l,required:u,schema:d,title:f}=e,p=mR(i),m=$B(`ArrayFieldDescriptionTemplate`,l,p),h=$B(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,G.jsx)(`div`,{children:(0,G.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,G.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,G.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,G.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,G.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsx)(_,{id:yV(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function hq({className:e,type:t,...n}){return(0,G.jsx)(`input`,{type:t,"data-slot":`input`,className:lq(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...n})}function gq({id:e,htmlName:t,placeholder:n,required:r,readonly:i,disabled:a,type:o,value:s,onChange:c,onChangeOverride:l,onBlur:u,onFocus:d,autofocus:f,options:p,schema:m,rawErrors:h=[],children:g,extraProps:_,className:v,registry:y}){let{ClearButton:x}=y.templates.ButtonTemplates,S={..._,...XB(m,o,p)},C=({target:{value:e}})=>c(e===``?p.emptyValue:e),w=({target:t})=>u(e,t&&t.value),T=({target:t})=>d(e,t&&t.value),E=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(p.emptyValue??``)},[c,p.emptyValue]);return(0,G.jsxs)(`div`,{className:`p-0.5`,children:[(0,G.jsx)(hq,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:lq({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?mV(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":_V(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,G.jsx)(x,{onClick:E,registry:y}),g,(0,G.jsx)(fG,{id:e,schema:m})]})}function _q({id:e,description:t,registry:n,uiSchema:r}){return t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,G.jsx)(wG,{description:t,registry:n,uiSchema:r})})}):null}var vq=BE(`relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`}},defaultVariants:{variant:`default`}});function yq({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:lq(vq({variant:t}),e),...n})}function bq({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-title`,className:lq(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function xq({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-description`,className:lq(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function Sq({errors:e,registry:t}){let{translateString:n}=t;return(0,G.jsxs)(yq,{variant:`destructive`,className:`mb-2`,children:[(0,G.jsx)(HK,{className:`h-4 w-4`}),(0,G.jsx)(bq,{children:n(tH.ErrorsLabel)}),(0,G.jsx)(xq,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,G.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function Cq(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,G.jsx)(`div`,{className:`flex flex-col gap-1`,id:pV(n),children:t.map((e,t)=>(0,G.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function wq(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,G.jsx)(`span`,{className:lq(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:hV(t),children:(0,G.jsx)(PG,{help:n,registry:i,uiSchema:r})}):null}function Tq({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:i,help:a,description:o,rawDescription:s,classNames:c,style:l,disabled:u,label:d,hidden:f,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,readonly:g,required:_,schema:v,uiSchema:y,registry:b}){let x=mR(y),S=$B(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,G.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,G.jsx)(S,{classNames:c,style:l,disabled:u,id:e,label:d,displayLabel:n,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,rawDescription:s,readonly:g,required:_,schema:v,uiSchema:y,registry:b,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,G.jsxs)(`label`,{className:lq(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,{" text-destructive":r.length>0}),htmlFor:e,children:[d,_?`*`:null]}),t,n&&s&&!C&&(0,G.jsx)(`span`,{className:lq(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function Eq(e){let{children:t,column:n,className:r,...i}=e;return(0,G.jsx)(`div`,{className:lq(`grid gap-2`,r),...i,children:t})}function Dq(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,G.jsx)(dq,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}function Oq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.CopyButton),...e,icon:(0,G.jsx)(GK,{className:`h-4 w-4`})})}function kq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.MoveDownButton),...e,icon:(0,G.jsx)(BK,{className:`h-4 w-4`})})}function Aq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.MoveUpButton),...e,icon:(0,G.jsx)(VK,{className:`h-4 w-4`})})}function jq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.RemoveButton),...e,className:`border-destructive`,icon:(0,G.jsx)(qK,{className:`h-4 w-4 stroke-destructive`})})}function Mq(e){let{registry:{translateString:t}}=e;return(0,G.jsx)(Dq,{title:t(tH.ClearButton),...e,icon:(0,G.jsx)(JK,{})})}function Nq({selector:e,optionSchemaField:t}){return(0,G.jsxs)(`div`,{className:lq(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,G.jsx)(`div`,{className:lq(`mb-4`),children:e}),t]})}function Pq({description:e,title:t,properties:n,required:r,uiSchema:i,fieldPathId:a,schema:o,formData:s,optionalDataControl:c,onAddProperty:l,disabled:u,readonly:d,registry:f}){let p=mR(i),m=$B(`TitleFieldTemplate`,f,p),h=$B(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(m,{id:gV(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,G.jsx)(h,{id:fV(a),description:e,schema:o,uiSchema:i,registry:f}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map((e,t)=>(0,G.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,G.jsx)(`div`,{className:`w-full`,children:e.content})},t)),hR(o,i,s)?(0,G.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,G.jsx)(_,{id:yV(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function Fq(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,G.jsx)(Dq,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,G.jsx)(UK,{}),size:`xs`}):a?(0,G.jsx)(jq,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,G.jsx)(`em`,{id:t,children:r})}function Iq(e){let{submitText:t,norender:n,props:r}=QB(e.uiSchema);return n?null:(0,G.jsx)(`div`,{children:(0,G.jsx)(dq,{type:`submit`,...r,className:lq(`my-2`,r?.className),children:t})})}var Lq=u(_(),1),Rq=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=nq(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),zq=`Separator`,Bq=`horizontal`,Vq=[`horizontal`,`vertical`],Hq=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=Bq,...i}=e,a=Uq(r)?r:Bq,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,G.jsx)(Rq.div,{"data-orientation":a,...s,...i,ref:t})});Hq.displayName=zq;function Uq(e){return Vq.includes(e)}var Wq=Hq;function Gq({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,G.jsx)(Wq,{"data-slot":`separator`,decorative:n,orientation:t,className:lq(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function Kq({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,G.jsx)(`h5`,{children:mR(n).title||t});return r&&(i=(0,G.jsxs)(`div`,{className:`flex flex-row`,children:[(0,G.jsx)(`div`,{className:`flex-grow`,children:i}),(0,G.jsx)(`div`,{className:`flex`,children:r})]})),(0,G.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,G.jsx)(Gq,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function qq({classNames:e,style:t,children:n,disabled:r,id:i,label:a,displayLabel:o,onRemoveProperty:s,onKeyRenameBlur:c,rawDescription:l,readonly:u,required:d,schema:f,uiSchema:p,registry:m}){let{templates:h,translateString:g}=m,{RemoveButton:_}=h.ButtonTemplates,v=g(tH.KeyLabel,[a]);if(!(`__additional_property`in f))return(0,G.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,G.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,G.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,G.jsx)(`div`,{className:`pl-0.5`,children:(0,G.jsx)(hq,{required:d,defaultValue:a,disabled:r||u,id:b,name:b,onBlur:u?void 0:c,type:`text`,className:`w-full border shadow-sm`})}),!!l&&(0,G.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,G.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,G.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,G.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,G.jsx)(_,{id:yV(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,G.jsx)(Gq,{dir:`horizontal`,className:`mt-2`})]})}function Jq(){return{ArrayFieldItemTemplate:pq,ArrayFieldTemplate:mq,BaseInputTemplate:gq,ButtonTemplates:{AddButton:fq,CopyButton:Oq,MoveDownButton:kq,MoveUpButton:Aq,RemoveButton:jq,SubmitButton:Iq,ClearButton:Mq},DescriptionFieldTemplate:_q,ErrorListTemplate:Sq,FieldErrorTemplate:Cq,FieldHelpTemplate:wq,FieldTemplate:Tq,GridTemplate:Eq,MultiSchemaFieldTemplate:Nq,ObjectFieldTemplate:Pq,OptionalDataControlsTemplate:Fq,TitleFieldTemplate:Kq,WrapIfAdditionalTemplate:qq}}function Yq(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,G.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Xq(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,G.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Zq(i,...t)]}function Zq(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function Qq(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var $q=globalThis?.document?b.useLayoutEffect:()=>{},eJ=b.useInsertionEffect||$q;function tJ({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=nJ({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=rJ(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function nJ({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return eJ(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function rJ(e){return typeof e==`function`}function iJ(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function aJ(e){let[t,n]=b.useState(void 0);return $q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function oJ(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var sJ=e=>{let{present:t,children:n}=e,r=cJ(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=ZK(r.ref,uJ(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};sJ.displayName=`Presence`;function cJ(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=oJ(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=lJ(r.current);a.current=o===`mounted`?e:`none`},[o]),$q(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=lJ(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),$q(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=lJ(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=lJ(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function lJ(e){return e?.animationName||`none`}function uJ(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)}function dJ(e){let t=fJ(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(mJ);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function fJ(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=gJ(n),i=hJ(r,n.props);return n.type!==b.Fragment&&(i.ref=t?XK(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pJ=Symbol(`radix.slottable`);function mJ(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===pJ}function hJ(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function gJ(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 _J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=dJ(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vJ(e,t){e&&Lq.flushSync(()=>e.dispatchEvent(t))}var yJ=`Checkbox`,[bJ,Kne]=Xq(yJ),[xJ,SJ]=bJ(yJ);function CJ(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=tJ({prop:n,defaultProp:i??!1,onChange:c,caller:yJ}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:MJ(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,G.jsx)(xJ,{scope:t,...x,children:jJ(d)?d(x):r})}var wJ=`CheckboxTrigger`,TJ=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=SJ(wJ,e),h=ZK(i,u),g=b.useRef(c);return b.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,G.jsx)(_J.button,{type:`button`,role:`checkbox`,"aria-checked":MJ(c)?`mixed`:c,"aria-required":l,"data-state":NJ(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Qq(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Qq(n,e=>{d(e=>MJ(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});TJ.displayName=wJ;var EJ=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,G.jsx)(CJ,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(TJ,{...d,ref:t,__scopeCheckbox:n}),e&&(0,G.jsx)(AJ,{__scopeCheckbox:n})]})})});EJ.displayName=yJ;var DJ=`CheckboxIndicator`,OJ=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=SJ(DJ,n);return(0,G.jsx)(sJ,{present:r||MJ(a.checked)||a.checked===!0,children:(0,G.jsx)(_J.span,{"data-state":NJ(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});OJ.displayName=DJ;var kJ=`CheckboxBubbleInput`,AJ=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=SJ(kJ,e),m=ZK(n,p),h=iJ(a),g=aJ(r);b.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=MJ(a),n.call(e,MJ(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(MJ(a)?!1:a);return(0,G.jsx)(_J.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});AJ.displayName=kJ;function jJ(e){return typeof e==`function`}function MJ(e){return e===`indeterminate`}function NJ(e){return MJ(e)?`indeterminate`:e?`checked`:`unchecked`}function PJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var FJ=[`color`],IJ=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=PJ(e,FJ);return(0,b.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i,{ref:t}),(0,b.createElement)(`path`,{d:`M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z`,fill:r,fillRule:`evenodd`,clipRule:`evenodd`}))});function LJ({className:e,...t}){return(0,G.jsx)(EJ,{"data-slot":`checkbox`,className:lq(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,G.jsx)(OJ,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,G.jsx)(IJ,{className:`size-3.5`})})})}var RJ=`Label`,zJ=b.forwardRef((e,t)=>(0,G.jsx)(Rq.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));zJ.displayName=RJ;var BJ=zJ;function VJ({className:e,...t}){return(0,G.jsx)(BJ,{"data-slot":`label`,className:lq(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function HJ(e){let{id:t,htmlName:n,value:r,disabled:i,readonly:a,label:o,hideLabel:s,schema:c,autofocus:l,options:u,onChange:d,onBlur:f,onFocus:p,registry:m,uiSchema:h,className:g}=e,_=MV(c),v=$B(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,G.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":_V(t),children:[!s&&S&&(0,G.jsx)(v,{id:fV(t),description:S,schema:c,uiSchema:h,registry:m}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,G.jsx)(LJ,{id:t,name:n||t,checked:r===void 0?!1:!!r,required:_,disabled:i||a,autoFocus:l,onCheckedChange:y,onBlur:b,onFocus:x,className:g}),(0,G.jsx)(VJ,{className:`leading-tight`,htmlFor:t,children:CV(o,s||!o)})]})]})}function UJ({id:e,htmlName:t,disabled:n,options:r,value:i,autofocus:a,readonly:o,required:s,onChange:c,onBlur:l,onFocus:u,className:d}){let{enumOptions:f,enumDisabled:p,inline:m,emptyValue:h}=r,g=Array.isArray(i)?i:[i],_=({target:t})=>l(e,VB(t&&t.value,f,h)),v=({target:t})=>u(e,VB(t&&t.value,f,h));return(0,G.jsx)(`div`,{className:lq({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=UB(r.value,g),u=Array.isArray(p)&&p.indexOf(r.value)!==-1,m=vV(e,i);return(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(LJ,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?GB(i,g,f):HB(i,g,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:_,onFocus:v,"aria-describedby":_V(e)}),(0,G.jsx)(VJ,{className:`leading-tight`,htmlFor:vV(e,i),children:r.label})]},m)})})}function WJ(e){let t=e+`CollectionProvider`,[n,r]=Xq(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,G.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=dJ(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,G.jsx)(c,{ref:ZK(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=dJ(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=ZK(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,G.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var GJ=b.useId||(()=>void 0),KJ=0;function qJ(e){let[t,n]=b.useState(GJ());return $q(()=>{e||n(e=>e??String(KJ++))},[e]),e||(t?`radix-${t}`:``)}function JJ(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}var YJ=b.createContext(void 0);function XJ(e){let t=b.useContext(YJ);return e||t||`ltr`}var ZJ=`rovingFocusGroup.onEntryFocus`,QJ={bubbles:!1,cancelable:!0},$J=`RovingFocusGroup`,[eY,tY,nY]=WJ($J),[rY,iY]=Xq($J,[nY]),[aY,oY]=rY($J),sY=b.forwardRef((e,t)=>(0,G.jsx)(eY.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,G.jsx)(eY.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,G.jsx)(cY,{...e,ref:t})})}));sY.displayName=$J;var cY=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=ZK(t,f),m=XJ(a),[h,g]=tJ({prop:o,defaultProp:s??null,onChange:c,caller:$J}),[_,v]=b.useState(!1),y=JJ(l),x=tY(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(ZJ,y),()=>e.removeEventListener(ZJ,y)},[y]),(0,G.jsx)(aY,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,G.jsx)(_J.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Qq(e.onMouseDown,()=>{S.current=!0}),onFocus:Qq(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(ZJ,QJ);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);mY([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:Qq(e.onBlur,()=>v(!1))})})}),lY=`RovingFocusGroupItem`,uY=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=qJ(),l=a||c,u=oY(lY,n),d=u.currentTabStopId===l,f=tY(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,G.jsx)(eY.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,G.jsx)(_J.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Qq(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Qq(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Qq(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=pY(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?hY(n,r+1):n.slice(r+1)}setTimeout(()=>mY(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});uY.displayName=lY;var dY={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function fY(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function pY(e,t,n){let r=fY(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return dY[r]}function mY(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function hY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gY=sY,_Y=uY,vY=`Radio`,[yY,bY]=Xq(vY),[xY,SY]=yY(vY),CY=b.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=b.useState(null),p=ZK(t,e=>f(e)),m=b.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,G.jsxs)(xY,{scope:n,checked:i,disabled:o,children:[(0,G.jsx)(_J.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":OY(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:Qq(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,G.jsx)(DY,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});CY.displayName=vY;var wY=`RadioIndicator`,TY=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=SY(wY,n);return(0,G.jsx)(sJ,{present:r||a.checked,children:(0,G.jsx)(_J.span,{"data-state":OY(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});TY.displayName=wY;var EY=`RadioBubbleInput`,DY=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=b.useRef(null),s=ZK(o,a),c=iJ(n),l=aJ(t);return b.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,G.jsx)(_J.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});DY.displayName=EY;function OY(e){return e?`checked`:`unchecked`}var kY=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],AY=`RadioGroup`,[jY,qne]=Xq(AY,[iY,bY]),MY=iY(),NY=bY(),[PY,FY]=jY(AY),IY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=MY(n),m=XJ(l),[h,g]=tJ({prop:a,defaultProp:i??null,onChange:d,caller:AY});return(0,G.jsx)(PY,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,G.jsx)(gY,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,G.jsx)(_J.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});IY.displayName=AY;var LY=`RadioGroupItem`,RY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=FY(LY,n),o=a.disabled||r,s=MY(n),c=NY(n),l=b.useRef(null),u=ZK(t,l),d=a.value===i.value,f=b.useRef(!1);return b.useEffect(()=>{let e=e=>{kY.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,G.jsx)(_Y,{asChild:!0,...s,focusable:!o,active:d,children:(0,G.jsx)(CY,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:Qq(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:Qq(i.onFocus,()=>{f.current&&l.current?.click()})})})});RY.displayName=LY;var zY=`RadioGroupIndicator`,BY=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,G.jsx)(TY,{...NY(n),...r,ref:t})});BY.displayName=zY;var VY=IY,HY=RY,UY=BY;function WY({className:e,...t}){return(0,G.jsx)(VY,{"data-slot":`radio-group`,className:lq(`grid gap-3`,e),...t})}function GY({className:e,...t}){return(0,G.jsx)(HY,{"data-slot":`radio-group-item`,className:lq(`border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,G.jsx)(UY,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,G.jsx)(WK,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function KY({id:e,options:t,value:n,required:r,disabled:i,readonly:a,onChange:o,onBlur:s,onFocus:c,className:l}){let{enumOptions:u,enumDisabled:d,emptyValue:f}=t,p=e=>o(VB(e,u,f)),m=({target:t})=>s(e,VB(t&&t.value,u,f)),h=({target:t})=>c(e,VB(t&&t.value,u,f)),g=!!(t&&t.inline);return(0,G.jsx)(`div`,{className:`mb-0`,children:(0,G.jsx)(WY,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{p(e)},onBlur:m,onFocus:h,"aria-describedby":_V(e),orientation:g?`horizontal`:`vertical`,className:lq(`flex flex-wrap`,{"flex-col":!g},l),children:Array.isArray(u)&&u.map((t,r)=>{let i=Array.isArray(d)&&d.indexOf(t.value)!==-1;return(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(GY,{checked:UB(t.value,n),value:r.toString(),id:vV(e,r),disabled:i}),(0,G.jsx)(VJ,{className:`leading-tight`,htmlFor:vV(e,r),children:t.label})]},vV(e,r))})})})}function qY(e,[t,n]){return Math.min(n,Math.max(t,e))}var JY=[`PageUp`,`PageDown`],YY=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],XY={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},ZY=`Slider`,[QY,$Y,eX]=WJ(ZY),[tX,Jne]=Xq(ZY,[eX]),[nX,rX]=tX(ZY),iX=b.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=b.useRef(new Set),_=b.useRef(0),v=o===`horizontal`?sX:cX,[y=[],x]=tJ({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,SX(y,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];y[_.current]!==e&&f(y)}function E(e,t,{commit:n}={commit:!1}){let o=DX(a),s=qY(OX(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=yX(e,s,t);if(TX(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,G.jsx)(nX,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,G.jsx)(QY.Provider,{scope:e.__scopeSlider,children:(0,G.jsx)(QY.Slot,{scope:e.__scopeSlider,children:(0,G.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:Qq(h.onPointerDown,()=>{s||(S.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&E(r,0,{commit:!0}),onEndKeyDown:()=>!s&&E(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=JY.includes(e.key)||e.shiftKey&&YY.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});iX.displayName=ZY;var[aX,oX]=tX(ZY,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),sX=b.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=b.useState(null),p=ZK(t,e=>f(e)),m=b.useRef(void 0),h=XJ(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=EX([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,G.jsx)(aX,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,G.jsx)(lX,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=XY[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),cX=b.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=b.useRef(null),d=ZK(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=EX([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,G.jsx)(aX,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,G.jsx)(lX,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=XY[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),lX=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=rX(ZY,n);return(0,G.jsx)(_J.span,{...l,ref:t,onKeyDown:Qq(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):JY.concat(YY).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:Qq(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:Qq(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Qq(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),uX=`SliderTrack`,dX=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=rX(uX,n);return(0,G.jsx)(_J.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});dX.displayName=uX;var fX=`SliderRange`,pX=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=rX(fX,n),a=oX(fX,n),o=ZK(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>bX(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,G.jsx)(_J.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});pX.displayName=fX;var mX=`SliderThumb`,hX=b.forwardRef((e,t)=>{let n=$Y(e.__scopeSlider),[r,i]=b.useState(null),a=ZK(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,G.jsx)(gX,{...e,ref:a,index:o})}),gX=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=rX(mX,n),s=oX(mX,n),[c,l]=b.useState(null),u=ZK(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=aJ(c),p=o.values[r],m=p===void 0?0:bX(p,o.min,o.max),h=xX(r,o.values.length),g=f?.[s.size],_=g?CX(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,G.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,G.jsx)(QY.ItemSlot,{scope:e.__scopeSlider,children:(0,G.jsx)(_J.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:Qq(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,G.jsx)(vX,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});hX.displayName=mX;var _X=`RadioBubbleInput`,vX=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=ZK(i,r),o=iJ(t);return b.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,G.jsx)(_J.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});vX.displayName=_X;function yX(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function bX(e,t,n){return qY(100/(n-t)*(e-t),[0,100])}function xX(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function SX(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function CX(e,t,n){let r=e/2;return(r-EX([0,50],[0,r])(t)*n)*n}function wX(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function TX(e,t){if(t>0){let n=wX(e);return Math.min(...n)>=t}return!0}function EX(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function DX(e){return(String(e).split(`.`)[1]||``).length}function OX(e,t){let n=10**t;return Math.round(e*n)/n}var kX=iX,AX=dX,jX=pX,MX=hX;function NX({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=(0,b.useMemo)(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return(0,G.jsxs)(kX,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:lq(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,e),...a,children:[(0,G.jsx)(AX,{"data-slot":`slider-track`,className:lq(`bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:(0,G.jsx)(jX,{"data-slot":`slider-range`,className:lq(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,G.jsx)(MX,{"data-slot":`slider-thumb`,className:`border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`},t))]})}var PX=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function FX({value:e,readonly:t,disabled:n,options:r,schema:i,onChange:a,label:o,id:s}){let c=e=>a(e[0]),l={value:e,label:o,id:s,...YB(i)},u={id:s,...kS(r.props||{},PX)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(NX,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":_V(s)}),e]})}var IX=1,LX=.9,RX=.8,zX=.17,BX=.1,VX=.999,HX=.9999,UX=.99,WX=/[\\\/_+.#"@\[\(\{&]/,GX=/[\\\/_+.#"@\[\(\{&]/g,KX=/[\s-]/,qX=/[\s-]/g;function JX(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?IX:UX;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=JX(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=IX:WX.test(e.charAt(l-1))?(d*=RX,p=e.slice(i,l-1).match(GX),p&&i>0&&(d*=VX**+p.length)):KX.test(e.charAt(l-1))?(d*=LX,m=e.slice(i,l-1).match(qX),m&&i>0&&(d*=VX**+m.length)):(d*=zX,i>0&&(d*=VX**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=HX)),(d<BX&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=JX(e,t,n,r,l+1,a+2,o),f*BX>d&&(d=f*BX)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function YX(e){return e.toLowerCase().replace(qX,` `)}function XX(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,JX(e,t,YX(e),YX(t),0,0,{})}function ZX(e,t=globalThis?.document){let n=JJ(e);b.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var QX=`DismissableLayer`,$X=`dismissableLayer.update`,eZ=`dismissableLayer.pointerDownOutside`,tZ=`dismissableLayer.focusOutside`,nZ,rZ=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iZ=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(rZ),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=ZK(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=sZ(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=cZ(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ZX(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),b.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nZ=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),lZ(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nZ)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),lZ())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener($X,e),()=>document.removeEventListener($X,e)},[]),(0,G.jsx)(_J.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Qq(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Qq(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Qq(e.onPointerDownCapture,S.onPointerDownCapture)})});iZ.displayName=QX;var aZ=`DismissableLayerBranch`,oZ=b.forwardRef((e,t)=>{let n=b.useContext(rZ),r=b.useRef(null),i=ZK(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,G.jsx)(_J.div,{...e,ref:i})});oZ.displayName=aZ;function sZ(e,t=globalThis?.document){let n=JJ(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){uZ(eZ,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(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},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cZ(e,t=globalThis?.document){let n=JJ(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&uZ(tZ,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lZ(){let e=new CustomEvent($X);document.dispatchEvent(e)}function uZ(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vJ(i,a):i.dispatchEvent(a)}var dZ=`focusScope.autoFocusOnMount`,fZ=`focusScope.autoFocusOnUnmount`,pZ={bubbles:!1,cancelable:!0},mZ=`FocusScope`,hZ=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=JJ(i),u=JJ(a),d=b.useRef(null),f=ZK(t,e=>c(e)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:SZ(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||SZ(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&SZ(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){CZ.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(dZ,pZ);s.addEventListener(dZ,l),s.dispatchEvent(t),t.defaultPrevented||(gZ(EZ(vZ(s)),{select:!0}),document.activeElement===e&&SZ(s))}return()=>{s.removeEventListener(dZ,l),setTimeout(()=>{let t=new CustomEvent(fZ,pZ);s.addEventListener(fZ,u),s.dispatchEvent(t),t.defaultPrevented||SZ(e??document.body,{select:!0}),s.removeEventListener(fZ,u),CZ.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_Z(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&SZ(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&SZ(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,G.jsx)(_J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});hZ.displayName=mZ;function gZ(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(SZ(r,{select:t}),document.activeElement!==n)return}function _Z(e){let t=vZ(e);return[yZ(t,e),yZ(t.reverse(),e)]}function vZ(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yZ(e,t){for(let n of e)if(!bZ(n,{upTo:t}))return n}function bZ(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function xZ(e){return e instanceof HTMLInputElement&&`select`in e}function SZ(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xZ(e)&&t&&e.select()}}var CZ=wZ();function wZ(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=TZ(e,t),e.unshift(t)},remove(t){e=TZ(e,t),e[0]?.resume()}}}function TZ(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function EZ(e){return e.filter(e=>e.tagName!==`A`)}var DZ=`Portal`,OZ=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);$q(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Lq.createPortal((0,G.jsx)(_J.div,{...r,ref:t}),o):null});OZ.displayName=DZ;var kZ=0;function AZ(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??jZ()),document.body.insertAdjacentElement(`beforeend`,e[1]??jZ()),kZ++,()=>{kZ===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),kZ--}},[])}function jZ(){let 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 MZ=function(){return MZ=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},MZ.apply(this,arguments)};function NZ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,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}function PZ(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function FZ(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var IZ=`right-scroll-bar-position`,LZ=`width-before-scroll-bar`,RZ=`with-scroll-bars-hidden`,zZ=`--removed-body-scroll-bar-size`;function BZ(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function VZ(e,t){var n=(0,b.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 HZ=typeof window<`u`?b.useLayoutEffect:b.useEffect,UZ=new WeakMap;function WZ(e,t){var n=VZ(t||null,function(t){return e.forEach(function(e){return BZ(e,t)})});return HZ(function(){var t=UZ.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||BZ(e,null)}),i.forEach(function(e){r.has(e)||BZ(e,a)})}UZ.set(n,e)},[e]),n}function GZ(e){return e}function KZ(e,t){t===void 0&&(t=GZ);var n=[],r=!1;return{read:function(){if(r)throw 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){for(r=!0;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 a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function qZ(e){e===void 0&&(e={});var t=KZ(null);return t.options=MZ({async:!0,ssr:!1},e),t}var JZ=function(e){var t=e.sideCar,n=NZ(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,MZ({},n))};JZ.isSideCarExport=!0;function YZ(e,t){return e.useMedium(t),JZ}var XZ=qZ(),ZZ=function(){},QZ=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:ZZ,onWheelCapture:ZZ,onTouchMoveCapture:ZZ}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=NZ(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=WZ([n,t]),w=MZ(MZ({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:XZ,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),MZ(MZ({},w),{ref:C})):b.createElement(v,MZ({},w,{className:c,ref:C}),s))});QZ.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},QZ.classNames={fullWidth:LZ,zeroRight:IZ};var $Z,eQ=function(){if($Z)return $Z;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function tQ(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=eQ();return t&&e.setAttribute(`nonce`,t),e}function nQ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rQ(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var iQ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tQ())&&(nQ(t,n),rQ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aQ=function(){var e=iQ();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oQ=function(){var e=aQ();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},sQ={left:0,top:0,right:0,gap:0},cQ=function(e){return parseInt(e||``,10)||0},lQ=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[cQ(n),cQ(r),cQ(i)]},uQ=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return sQ;var t=lQ(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])}},dQ=oQ(),fQ=`data-scroll-locked`,pQ=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
86
86
|
.${RZ} {
|
|
87
87
|
overflow: hidden ${r};
|
|
88
88
|
padding-right: ${s}px ${r};
|