arize-phoenix 10.13.2__py3-none-any.whl → 10.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-10.13.2.dist-info → arize_phoenix-10.15.0.dist-info}/METADATA +3 -2
- {arize_phoenix-10.13.2.dist-info → arize_phoenix-10.15.0.dist-info}/RECORD +25 -24
- phoenix/config.py +3 -1
- phoenix/db/types/model_provider.py +1 -0
- phoenix/server/api/helpers/playground_clients.py +459 -0
- phoenix/server/api/helpers/prompts/conversions/aws.py +83 -0
- phoenix/server/api/helpers/prompts/models.py +67 -0
- phoenix/server/api/input_types/GenerativeModelInput.py +2 -0
- phoenix/server/api/types/GenerativeProvider.py +33 -20
- phoenix/server/email/sender.py +2 -2
- phoenix/server/main.py +9 -6
- phoenix/server/static/.vite/manifest.json +36 -36
- phoenix/server/static/assets/{components-D-yJsfVa.js → components-SpUMF1qV.js} +257 -257
- phoenix/server/static/assets/{index-BXRcSHM6.js → index-DIlhmbjB.js} +3 -3
- phoenix/server/static/assets/{pages-Dn4XFHMU.js → pages-YX47cEoQ.js} +369 -386
- phoenix/server/static/assets/{vendor-BKYy4SMr.js → vendor-DCZoBorz.js} +2 -2
- phoenix/server/static/assets/{vendor-arizeai-CaqmrQdQ.js → vendor-arizeai-Ckci3irT.js} +1 -1
- phoenix/server/static/assets/{vendor-codemirror-BlmFw5CA.js → vendor-codemirror-BODM513D.js} +1 -1
- phoenix/server/static/assets/{vendor-recharts-Bz7zqjbW.js → vendor-recharts-C9O2a-N3.js} +1 -1
- phoenix/server/static/assets/{vendor-shiki-BitvudxD.js → vendor-shiki-Dq54rRC7.js} +1 -1
- phoenix/version.py +1 -1
- {arize_phoenix-10.13.2.dist-info → arize_phoenix-10.15.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-10.13.2.dist-info → arize_phoenix-10.15.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-10.13.2.dist-info → arize_phoenix-10.15.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-10.13.2.dist-info → arize_phoenix-10.15.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -570,7 +570,7 @@ No matching component was found for:
|
|
|
570
570
|
]))`;continue}else if(i[c]==="$"){a+=`($|(?=[\r
|
|
571
571
|
]))`;continue}}if(n.s&&i[c]==="."){a+=s?`${i[c]}\r
|
|
572
572
|
`:`[${i[c]}\r
|
|
573
|
-
]`;continue}a+=i[c],i[c]==="\\"?o=!0:s&&i[c]==="]"?s=!1:!s&&i[c]==="["&&(s=!0)}try{const c=new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),r.source}return a};function Lce(e,t){var n,i,a,o;if(t.target==="openApi3"&&((n=e.keyType)==null?void 0:n._def.typeName)===Nt.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((s,u)=>({...s,[u]:li(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",u]})??{}}),{}),additionalProperties:!1};const r={type:"object",additionalProperties:li(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??{}};if(t.target==="openApi3")return r;if(((i=e.keyType)==null?void 0:i._def.typeName)===Nt.ZodString&&((a=e.keyType._def.checks)!=null&&a.length)){const s=Object.entries(Nce(e.keyType._def,t)).reduce((u,[l,c])=>l==="type"?u:{...u,[l]:c},{});return{...r,propertyNames:s}}else if(((o=e.keyType)==null?void 0:o._def.typeName)===Nt.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};return r}function sIe(e,t){if(t.mapStrategy==="record")return Lce(e,t);const r=li(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},n=li(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function uIe(e){const t=e.values,n=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),i=Array.from(new Set(n.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}function lIe(){return{not:{}}}function cIe(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const W2={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function fIe(e,t){if(t.target==="openApi3")return OK(e,t);const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in W2&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((i,a)=>{const o=W2[a._def.typeName];return o&&!i.includes(o)?[...i,o]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((i,a)=>{const o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];case"symbol":case"undefined":case"function":default:return i}},[]);if(n.length===r.length){const i=n.filter((a,o,s)=>s.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:r.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(a=>!n.includes(a))],[])};return OK(e,t)}const OK=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,i)=>li(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function dIe(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:W2[e.innerType._def.typeName],nullable:!0}:{type:[W2[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const n=li(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}const r=li(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function hIe(e,t){const r={type:"number"};if(!e.checks)return r;for(const n of e.checks)switch(n.kind){case"int":r.type="integer",Ice(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?Ci(r,"minimum",n.value,n.message,t):Ci(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),Ci(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?Ci(r,"maximum",n.value,n.message,t):Ci(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),Ci(r,"maximum",n.value,n.message,t));break;case"multipleOf":Ci(r,"multipleOf",n.value,n.message,t);break}return r}function pIe(e,t){return t.removeAdditionalStrategy==="strict"?e.catchall._def.typeName==="ZodNever"?e.unknownKeys!=="strict":li(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??!0:e.catchall._def.typeName==="ZodNever"?e.unknownKeys==="passthrough":li(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??!0}function mIe(e,t){const r={type:"object",...Object.entries(e.shape()).reduce((n,[i,a])=>{if(a===void 0||a._def===void 0)return n;const o=li(a._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});return o===void 0?n:{properties:{...n.properties,[i]:o},required:a.isOptional()?n.required:[...n.required,i]}},{properties:{},required:[]}),additionalProperties:pIe(e,t)};return r.required.length||delete r.required,r}const gIe=(e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return li(e.innerType._def,t);const r=li(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}},vIe=(e,t)=>{if(t.pipeStrategy==="input")return li(e.in._def,t);if(t.pipeStrategy==="output")return li(e.out._def,t);const r=li(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=li(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}};function yIe(e,t){return li(e.type._def,t)}function bIe(e,t){const n={type:"array",uniqueItems:!0,items:li(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&Ci(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&Ci(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}function OIe(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>li(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:li(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>li(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function xIe(){return{not:{}}}function _Ie(){return{}}const SIe=(e,t)=>li(e.innerType._def,t);function li(e,t,r=!1){var o;const n=t.seen.get(e);if(t.override){const s=(o=t.override)==null?void 0:o.call(t,e,t,n,r);if(s!==VFe)return s}if(n&&!r){const s=wIe(n,t);if(s!==void 0)return s}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const a=$Ie(e,e.typeName,t);return a&&CIe(e,t,a),i.jsonSchema=a,a}const wIe=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:EIe(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):t.$refStrategy==="seen"?{}:void 0}},EIe=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")},$Ie=(e,t,r)=>{switch(t){case Nt.ZodString:return Nce(e,r);case Nt.ZodNumber:return hIe(e,r);case Nt.ZodObject:return mIe(e,r);case Nt.ZodBigInt:return HFe(e,r);case Nt.ZodBoolean:return GFe();case Nt.ZodDate:return Mce(e,r);case Nt.ZodUndefined:return xIe();case Nt.ZodNull:return cIe(r);case Nt.ZodArray:return KFe(e,r);case Nt.ZodUnion:case Nt.ZodDiscriminatedUnion:return fIe(e,r);case Nt.ZodIntersection:return iIe(e,r);case Nt.ZodTuple:return OIe(e,r);case Nt.ZodRecord:return Lce(e,r);case Nt.ZodLiteral:return aIe(e,r);case Nt.ZodEnum:return rIe(e);case Nt.ZodNativeEnum:return uIe(e);case Nt.ZodNullable:return dIe(e,r);case Nt.ZodOptional:return gIe(e,r);case Nt.ZodMap:return sIe(e,r);case Nt.ZodSet:return bIe(e,r);case Nt.ZodLazy:return li(e.getter()._def,r);case Nt.ZodPromise:return yIe(e,r);case Nt.ZodNaN:case Nt.ZodNever:return lIe();case Nt.ZodEffects:return tIe(e,r);case Nt.ZodAny:return ZFe();case Nt.ZodUnknown:return _Ie();case Nt.ZodDefault:return eIe(e,r);case Nt.ZodBranded:return YFe(e,r);case Nt.ZodReadonly:return SIe(e,r);case Nt.ZodCatch:return XFe(e,r);case Nt.ZodPipeline:return vIe(e,r);case Nt.ZodFunction:case Nt.ZodVoid:case Nt.ZodSymbol:return;default:return(n=>{})()}},CIe=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),mht=(e,t)=>{const r=WFe(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((u,[l,c])=>({...u,[l]:li(c._def,{...r,currentPath:[...r.basePath,r.definitionPath,l]},!0)??{}}),{}):void 0,i=typeof t=="string"?t:(t==null?void 0:t.nameStrategy)==="title"||t==null?void 0:t.name,a=li(e._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??{},o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(a.title=o);const s=i===void 0?n?{...a,[r.definitionPath]:n}:a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:a}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":r.target==="jsonSchema2019-09"&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),s};var ght={output:"output",llm:"llm",retrieval:"retrieval",reranker:"reranker",message:"message",document:"document",embedding:"embedding",tool:"tool",tool_call:"tool_call",user:"user"},vht={provider:"provider",model_name:"model_name",input_messages:"input_messages",output_messages:"output_messages",invocation_parameters:"invocation_parameters",prompts:"prompts",prompt_template:"prompt_template",tools:"tools"},yht={documents:"documents"},bht={input_documents:"input_documents",output_documents:"output_documents",query:"query"},Oht={embeddings:"embeddings",text:"text",model_name:"model_name"},xht={name:"name",description:"description",parameters:"parameters",json_schema:"json_schema"},_ht={role:"role",content:"content",contents:"contents",name:"name",function_call_name:"function_call_name",function_call_arguments_json:"function_call_arguments_json",tool_calls:"tool_calls",tool_call_id:"tool_call_id"},Sht={id:"id",content:"content",score:"score",metadata:"metadata"},wht={id:"id"},xK;(function(e){e.LLM="LLM",e.CHAIN="CHAIN",e.TOOL="TOOL",e.RETRIEVER="RETRIEVER",e.RERANKER="RERANKER",e.EMBEDDING="EMBEDDING",e.AGENT="AGENT",e.GUARDRAIL="GUARDRAIL",e.EVALUATOR="EVALUATOR"})(xK||(xK={}));var _K;(function(e){e.TEXT="text/plain",e.JSON="application/json"})(_K||(_K={}));var SK;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.MISTRALAI="mistralai",e.COHERE="cohere",e.VERTEXAI="vertexai"})(SK||(SK={}));var wK;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.MISTRALAI="mistralai",e.COHERE="cohere",e.GOOGLE="google",e.AWS="aws",e.AZURE="azure"})(wK||(wK={}));function O9(){return O9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O9.apply(this,arguments)}var zce=["shift","alt","meta","mod","ctrl"],DIe={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function rg(e){return(DIe[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function PIe(e){return zce.includes(e)}function NT(e,t){return t===void 0&&(t=","),e.split(t)}function LT(e,t,r){t===void 0&&(t="+");var n=e.toLocaleLowerCase().split(t).map(function(o){return rg(o)}),i={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},a=n.filter(function(o){return!zce.includes(o)});return O9({},i,{keys:a,description:r})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Qce([rg(e.key),rg(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Bce([rg(e.key),rg(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){ng.clear()})})();var ng=new Set;function fL(e){return Array.isArray(e)}function RIe(e,t){t===void 0&&(t=",");var r=fL(e)?e:e.split(t);return r.every(function(n){return ng.has(n.trim().toLowerCase())})}function Qce(e){var t=Array.isArray(e)?e:[e];ng.has("meta")&&ng.forEach(function(r){return!PIe(r)&&ng.delete(r.toLowerCase())}),t.forEach(function(r){return ng.add(r.toLowerCase())})}function Bce(e){var t=Array.isArray(e)?e:[e];e==="meta"?ng.clear():t.forEach(function(r){return ng.delete(r.toLowerCase())})}function kIe(e,t,r){(typeof r=="function"&&r(e,t)||r===!0)&&e.preventDefault()}function TIe(e,t,r){return typeof r=="function"?r(e,t):r===!0||r===void 0}function AIe(e){return qce(e,["input","textarea","select"])}function qce(e,t){var r=e.target;t===void 0&&(t=!1);var n=r&&r.tagName;return fL(t)?!!(n&&t&&t.some(function(i){return i.toLowerCase()===n.toLowerCase()})):!!(n&&t&&t===!0)}function FIe(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(r){return t.includes(r)})||e.includes("*"):!0}var IIe=function(t,r,n){n===void 0&&(n=!1);var i=r.alt,a=r.meta,o=r.mod,s=r.shift,u=r.ctrl,l=r.keys,c=t.key,f=t.code,d=t.ctrlKey,h=t.metaKey,g=t.shiftKey,m=t.altKey,v=rg(f),y=c.toLowerCase();if(!(l!=null&&l.includes(v))&&!(l!=null&&l.includes(y))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!n){if(i===!m&&y!=="alt"||s===!g&&y!=="shift")return!1;if(o){if(!h&&!d)return!1}else if(a===!h&&y!=="meta"&&y!=="os"||u===!d&&y!=="ctrl"&&y!=="control")return!1}return l&&l.length===1&&(l.includes(y)||l.includes(v))?!0:l?RIe(l):!l},MIe=F.createContext(void 0),NIe=function(){return F.useContext(MIe)};function Uce(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(r,n){return r&&Uce(e[n],t[n])},!0):e===t}var LIe=F.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),zIe=function(){return F.useContext(LIe)};function QIe(e){var t=F.useRef(void 0);return Uce(t.current,e)||(t.current=e),t.current}var EK=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},BIe=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Eht(e,t,r,n){var i=F.useRef(null),a=F.useRef(!1),o=r instanceof Array?n instanceof Array?void 0:n:r,s=fL(e)?e.join(o==null?void 0:o.splitKey):e,u=r instanceof Array?r:n instanceof Array?n:void 0,l=F.useCallback(t,u??[]),c=F.useRef(l);u?c.current=l:c.current=t;var f=QIe(o),d=zIe(),h=d.enabledScopes,g=NIe();return BIe(function(){if(!((f==null?void 0:f.enabled)===!1||!FIe(h,f==null?void 0:f.scopes))){var m=function(C,$){var w;if($===void 0&&($=!1),!(AIe(C)&&!qce(C,f==null?void 0:f.enableOnFormTags))){if(i.current!==null){var P=i.current.getRootNode();if((P instanceof Document||P instanceof ShadowRoot)&&P.activeElement!==i.current&&!i.current.contains(P.activeElement)){EK(C);return}}(w=C.target)!=null&&w.isContentEditable&&!(f!=null&&f.enableOnContentEditable)||NT(s,f==null?void 0:f.splitKey).forEach(function(k){var N,L=LT(k,f==null?void 0:f.combinationKey);if(IIe(C,L,f==null?void 0:f.ignoreModifiers)||(N=L.keys)!=null&&N.includes("*")){if(f!=null&&f.ignoreEventWhen!=null&&f.ignoreEventWhen(C)||$&&a.current)return;if(kIe(C,L,f==null?void 0:f.preventDefault),!TIe(C,L,f==null?void 0:f.enabled)){EK(C);return}c.current(C,L),$||(a.current=!0)}})}},v=function(C){C.key!==void 0&&(Qce(rg(C.code)),((f==null?void 0:f.keydown)===void 0&&(f==null?void 0:f.keyup)!==!0||f!=null&&f.keydown)&&m(C))},y=function(C){C.key!==void 0&&(Bce(rg(C.code)),a.current=!1,f!=null&&f.keyup&&m(C,!0))},O=i.current||(o==null?void 0:o.document)||document;return O.addEventListener("keyup",y),O.addEventListener("keydown",v),g&&NT(s,f==null?void 0:f.splitKey).forEach(function(_){return g.addHotkey(LT(_,f==null?void 0:f.combinationKey,f==null?void 0:f.description))}),function(){O.removeEventListener("keyup",y),O.removeEventListener("keydown",v),g&&NT(s,f==null?void 0:f.splitKey).forEach(function(_){return g.removeHotkey(LT(_,f==null?void 0:f.combinationKey,f==null?void 0:f.description))})}}},[s,f,h]),i}F.createContext(null);F.createContext(null);F.createContext(null);F.createContext(null);F.createContext(null);const Vce=F.createContext({}),SS=Symbol("default");function Ma({values:e,children:t}){for(let[r,n]of e)t=Ce.createElement(r.Provider,{value:n},t);return t}function hn(e){let{className:t,style:r,children:n,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s}=e;return F.useMemo(()=>{let u,l,c;return typeof t=="function"?u=t({...s,defaultClassName:i}):u=t,typeof r=="function"?l=r({...s,defaultStyle:o||{}}):l=r,typeof n=="function"?c=n({...s,defaultChildren:a}):n==null?c=a:c=n,{className:u??i,style:l||o?{...o,...l}:void 0,children:c??a,"data-rac":""}},[t,r,n,i,a,o,s])}function Xf(e,t){let r=F.useContext(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=t||SS;if(!r.slots[n]){let i=new Intl.ListFormat().format(Object.keys(r.slots).map(o=>`"${o}"`)),a=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${a} Valid slot names are ${i}.`)}return r.slots[n]}return r}function Un(e,t,r){let n=Xf(r,e.slot)||{},{ref:i,...a}=n,o=ml(F.useMemo(()=>cO(t,i),[t,i])),s=Qt(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&(typeof a.style=="function"||typeof e.style=="function"?s.style=u=>{let l=typeof a.style=="function"?a.style(u):a.style,c={...u.defaultStyle,...l},f=typeof e.style=="function"?e.style({...u,defaultStyle:c}):e.style;return{...c,...f}}:s.style={...a.style,...e.style}),[s,o]}function Jf(e=!0){let[t,r]=F.useState(e),n=F.useRef(!1),i=F.useCallback(a=>{n.current=!0,r(!!a)},[]);return An(()=>{n.current||r(!1)},[]),[i,t]}function q0(e){const t=/^(data-.*)$/;let r={};for(const n in e)t.test(n)||(r[n]=e[n]);return r}class dL{get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new dL(this.type,this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t.colSpan=this.colSpan,t.colIndex=this.colIndex,t}constructor(t,r){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=t,this.key=r}}class hL{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(t),i=(n==null?void 0:n.firstChildKey)!=null?r.get(n.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?r.get(i.nextKey):void 0}}}getKeyBefore(t){let r=this.keyMap.get(t);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);var n;return(n=r==null?void 0:r.key)!==null&&n!==void 0?n:null}return r.parentKey}getKeyAfter(t){let r=this.keyMap.get(t);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(t==null?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);var r;return(r=t==null?void 0:t.key)!==null&&r!==void 0?r:null}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,r=new t;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(t.key,t)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(t)}commit(t,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=r,this.frozen=!n}UNSTABLE_filter(t){let r=new hL,n=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let a=i.clone(),o=null;for(let s of this.getChildren(i.key))if($K(s,t,this,r)){let u=s.clone();o==null&&(a.firstChildKey=u.key),r.firstKey==null&&(r.firstKey=a.key),o&&o.parentKey===u.parentKey?(o.nextKey=u.key,u.prevKey=o.key):u.prevKey=null,u.nextKey=null,r.addNode(u),o=u}o&&(o.type!=="header"?(a.lastChildKey=o.key,n==null?a.prevKey=null:(n.type==="section"||n.type==="separator")&&(n.nextKey=a.key,a.prevKey=n.key),a.nextKey=null,n=a,r.addNode(a)):(r.firstKey===a.key&&(r.firstKey=null),r.removeNode(o.key)))}else if(i.type==="separator"){let a=i.clone();a.nextKey=null,(n==null?void 0:n.type)==="section"&&(n.nextKey=a.key,a.prevKey=n.key,n=a,r.addNode(a))}else{let a=i.clone();$K(a,t,this,r)&&(r.firstKey==null&&(r.firstKey=a.key),n!=null&&n.type!=="section"&&n.type!=="separator"&&n.parentKey===a.parentKey?(n.nextKey=a.key,a.prevKey=n.key):a.prevKey=null,a.nextKey=null,r.addNode(a),n=a)}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let i;n.prevKey!=null&&(i=r.getItem(n.prevKey),i.nextKey=null),r.removeNode(n.key),n=i}return r.lastKey=(n==null?void 0:n.key)||null,r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function $K(e,t,r,n){if(e.type==="subdialogtrigger"||e.type==="submenutrigger"){let i=[...r.getChildren(e.key)][0];if(i&&t(i.textValue)){let a=i.clone();return n.addNode(a),!0}else return!1}else return e.type==="header"?!0:t(e.textValue)}class jce{*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)===null||t===void 0?void 0:t.isConnected)||!1}invalidateChildIndices(t){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||t.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=t,this.ownerDocument.markDirty(this))}updateChildIndices(){let t=this._minInvalidChildIndex;for(;t;)t.index=t.previousSibling?t.previousSibling.index+1:0,t=t.nextSibling;this._minInvalidChildIndex=null}appendChild(t){t.parentNode&&t.parentNode.removeChild(t),this.firstChild==null&&(this.firstChild=t),this.lastChild?(this.lastChild.nextSibling=t,t.index=this.lastChild.index+1,t.previousSibling=this.lastChild):(t.previousSibling=null,t.index=0),t.parentNode=this,t.nextSibling=null,this.lastChild=t,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(t,r){if(r==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t),t.nextSibling=r,t.previousSibling=r.previousSibling,t.index=r.index-1,this.firstChild===r?this.firstChild=t:r.previousSibling&&(r.previousSibling.nextSibling=t),r.previousSibling=t,t.parentNode=r.parentNode,this.invalidateChildIndices(t),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(t){t.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===t&&(this._minInvalidChildIndex=null),t.nextSibling&&(this.invalidateChildIndices(t.nextSibling),t.nextSibling.previousSibling=t.previousSibling),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),this.firstChild===t&&(this.firstChild=t.nextSibling),this.lastChild===t&&(this.lastChild=t.previousSibling),t.parentNode=null,t.nextSibling=null,t.previousSibling=null,t.index=0,this.ownerDocument.markDirty(t),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let t=this.previousSibling;for(;t&&t.isHidden;)t=t.previousSibling;return t}get nextVisibleSibling(){let t=this.nextSibling;for(;t&&t.isHidden;)t=t.nextSibling;return t}get firstVisibleChild(){let t=this.firstChild;for(;t&&t.isHidden;)t=t.nextSibling;return t}get lastVisibleChild(){let t=this.lastChild;for(;t&&t.isHidden;)t=t.previousSibling;return t}constructor(t){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=t}}class Eb extends jce{get index(){return this._index}set index(t){this._index=t,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof Eb?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var t,r,n;let i=this.nextVisibleSibling,a=this.getMutableNode();a.index=this.index,a.level=this.level,a.parentKey=this.parentNode instanceof Eb?this.parentNode.node.key:null;var o;a.prevKey=(o=(t=this.previousVisibleSibling)===null||t===void 0?void 0:t.node.key)!==null&&o!==void 0?o:null;var s;a.nextKey=(s=i==null?void 0:i.node.key)!==null&&s!==void 0?s:null,a.hasChildNodes=!!this.firstChild;var u;a.firstChildKey=(u=(r=this.firstVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&u!==void 0?u:null;var l;if(a.lastChildKey=(l=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&l!==void 0?l:null,(a.colSpan!=null||a.colIndex!=null)&&i){var c,f;let d=((c=a.colIndex)!==null&&c!==void 0?c:a.index)+((f=a.colSpan)!==null&&f!==void 0?f:1);if(d!==i.node.colIndex){let h=i.getMutableNode();h.colIndex=d}}}setProps(t,r,n,i){let a=this.getMutableNode(),{value:o,textValue:s,id:u,...l}=t;if(l.ref=r,a.props=l,a.rendered=n,a.render=i,a.value=o,a.textValue=s||(typeof l.children=="string"?l.children:"")||t["aria-label"]||"",u!=null&&u!==a.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");a.key=u}l.colSpan!=null&&(a.colSpan=l.colSpan),this.hasSetProps=!0,this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let t=this;return{get display(){return t.isHidden?"none":""},set display(r){let n=r==="none";if(t.isHidden!==n){var i,a;(((i=t.parentNode)===null||i===void 0?void 0:i.firstVisibleChild)===t||((a=t.parentNode)===null||a===void 0?void 0:a.lastVisibleChild)===t)&&t.ownerDocument.markDirty(t.parentNode);let o=t.previousVisibleSibling,s=t.nextVisibleSibling;o&&t.ownerDocument.markDirty(o),s&&t.ownerDocument.markDirty(s),t.isHidden=n,t.ownerDocument.markDirty(t)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(t,r){super(r),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new dL(t,`react-aria-${++r.nodeId}`)}}class qIe extends jce{get isConnected(){return this.isMounted}createElement(t){return new Eb(t,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(t){this.dirtyNodes.add(t)}addNode(t){if(t.isHidden)return;let r=this.getMutableCollection();if(!r.getItem(t.node.key))for(let n of t)this.addNode(n);r.addNode(t.node)}removeNode(t){for(let n of t)this.removeNode(n);this.getMutableCollection().removeNode(t.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let a of this.dirtyNodes)a instanceof Eb&&(!a.isConnected||a.isHidden)?this.removeNode(a):a.updateChildIndices();for(let a of this.dirtyNodes)a instanceof Eb&&(a.isConnected&&!a.isHidden&&(a.updateNode(),this.addNode(a)),a.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var t,r,n,i;this.nextCollection.commit((n=(t=this.firstVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&n!==void 0?n:null,(i=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let t of this.subscriptions)t();this.inSubscription=!1}}subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=t,this.nextCollection=t}}function Wce(e){let{children:t,items:r,idScope:n,addIdAndValue:i,dependencies:a=[]}=e,o=F.useMemo(()=>new WeakMap,a);return F.useMemo(()=>{if(r&&typeof t=="function"){let l=[];for(let c of r){let f=o.get(c);if(!f){f=t(c);var s,u;let d=(u=(s=f.props.id)!==null&&s!==void 0?s:c.key)!==null&&u!==void 0?u:c.id;if(d==null)throw new Error("Could not determine key for item");n&&(d=n+":"+d),f=F.cloneElement(f,i?{key:d,id:d,value:c}:{key:d}),o.set(c,f)}l.push(f)}return l}else if(typeof t!="function")return t},[t,r,o,n,i])}if(typeof HTMLTemplateElement<"u"){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const Z2=F.createContext(!1);function UIe(e){if(F.useContext(Z2))return Ce.createElement(Ce.Fragment,null,e.children);let r=Ce.createElement(Z2.Provider,{value:!0},e.children);return Ce.createElement("template",{"data-react-aria-hidden":!0},r)}function yO(e){let t=(r,n)=>F.useContext(Z2)?null:e(r,n);return t.displayName=e.displayName||e.name,F.forwardRef(t)}function VIe(){return F.useContext(Z2)}var zT={exports:{}},QT={};/**
|
|
573
|
+
]`;continue}a+=i[c],i[c]==="\\"?o=!0:s&&i[c]==="]"?s=!1:!s&&i[c]==="["&&(s=!0)}try{const c=new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),r.source}return a};function Lce(e,t){var n,i,a,o;if(t.target==="openApi3"&&((n=e.keyType)==null?void 0:n._def.typeName)===Nt.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((s,u)=>({...s,[u]:li(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",u]})??{}}),{}),additionalProperties:!1};const r={type:"object",additionalProperties:li(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??{}};if(t.target==="openApi3")return r;if(((i=e.keyType)==null?void 0:i._def.typeName)===Nt.ZodString&&((a=e.keyType._def.checks)!=null&&a.length)){const s=Object.entries(Nce(e.keyType._def,t)).reduce((u,[l,c])=>l==="type"?u:{...u,[l]:c},{});return{...r,propertyNames:s}}else if(((o=e.keyType)==null?void 0:o._def.typeName)===Nt.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};return r}function sIe(e,t){if(t.mapStrategy==="record")return Lce(e,t);const r=li(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},n=li(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function uIe(e){const t=e.values,n=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),i=Array.from(new Set(n.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}function lIe(){return{not:{}}}function cIe(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const W2={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function fIe(e,t){if(t.target==="openApi3")return OK(e,t);const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in W2&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((i,a)=>{const o=W2[a._def.typeName];return o&&!i.includes(o)?[...i,o]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((i,a)=>{const o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];case"symbol":case"undefined":case"function":default:return i}},[]);if(n.length===r.length){const i=n.filter((a,o,s)=>s.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:r.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(a=>!n.includes(a))],[])};return OK(e,t)}const OK=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,i)=>li(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function dIe(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:W2[e.innerType._def.typeName],nullable:!0}:{type:[W2[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const n=li(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}const r=li(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function hIe(e,t){const r={type:"number"};if(!e.checks)return r;for(const n of e.checks)switch(n.kind){case"int":r.type="integer",Ice(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?Ci(r,"minimum",n.value,n.message,t):Ci(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),Ci(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?Ci(r,"maximum",n.value,n.message,t):Ci(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),Ci(r,"maximum",n.value,n.message,t));break;case"multipleOf":Ci(r,"multipleOf",n.value,n.message,t);break}return r}function pIe(e,t){return t.removeAdditionalStrategy==="strict"?e.catchall._def.typeName==="ZodNever"?e.unknownKeys!=="strict":li(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??!0:e.catchall._def.typeName==="ZodNever"?e.unknownKeys==="passthrough":li(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??!0}function mIe(e,t){const r={type:"object",...Object.entries(e.shape()).reduce((n,[i,a])=>{if(a===void 0||a._def===void 0)return n;const o=li(a._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});return o===void 0?n:{properties:{...n.properties,[i]:o},required:a.isOptional()?n.required:[...n.required,i]}},{properties:{},required:[]}),additionalProperties:pIe(e,t)};return r.required.length||delete r.required,r}const gIe=(e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return li(e.innerType._def,t);const r=li(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}},vIe=(e,t)=>{if(t.pipeStrategy==="input")return li(e.in._def,t);if(t.pipeStrategy==="output")return li(e.out._def,t);const r=li(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=li(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}};function yIe(e,t){return li(e.type._def,t)}function bIe(e,t){const n={type:"array",uniqueItems:!0,items:li(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&Ci(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&Ci(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}function OIe(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>li(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:li(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>li(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function xIe(){return{not:{}}}function _Ie(){return{}}const SIe=(e,t)=>li(e.innerType._def,t);function li(e,t,r=!1){var o;const n=t.seen.get(e);if(t.override){const s=(o=t.override)==null?void 0:o.call(t,e,t,n,r);if(s!==VFe)return s}if(n&&!r){const s=wIe(n,t);if(s!==void 0)return s}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const a=$Ie(e,e.typeName,t);return a&&CIe(e,t,a),i.jsonSchema=a,a}const wIe=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:EIe(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):t.$refStrategy==="seen"?{}:void 0}},EIe=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")},$Ie=(e,t,r)=>{switch(t){case Nt.ZodString:return Nce(e,r);case Nt.ZodNumber:return hIe(e,r);case Nt.ZodObject:return mIe(e,r);case Nt.ZodBigInt:return HFe(e,r);case Nt.ZodBoolean:return GFe();case Nt.ZodDate:return Mce(e,r);case Nt.ZodUndefined:return xIe();case Nt.ZodNull:return cIe(r);case Nt.ZodArray:return KFe(e,r);case Nt.ZodUnion:case Nt.ZodDiscriminatedUnion:return fIe(e,r);case Nt.ZodIntersection:return iIe(e,r);case Nt.ZodTuple:return OIe(e,r);case Nt.ZodRecord:return Lce(e,r);case Nt.ZodLiteral:return aIe(e,r);case Nt.ZodEnum:return rIe(e);case Nt.ZodNativeEnum:return uIe(e);case Nt.ZodNullable:return dIe(e,r);case Nt.ZodOptional:return gIe(e,r);case Nt.ZodMap:return sIe(e,r);case Nt.ZodSet:return bIe(e,r);case Nt.ZodLazy:return li(e.getter()._def,r);case Nt.ZodPromise:return yIe(e,r);case Nt.ZodNaN:case Nt.ZodNever:return lIe();case Nt.ZodEffects:return tIe(e,r);case Nt.ZodAny:return ZFe();case Nt.ZodUnknown:return _Ie();case Nt.ZodDefault:return eIe(e,r);case Nt.ZodBranded:return YFe(e,r);case Nt.ZodReadonly:return SIe(e,r);case Nt.ZodCatch:return XFe(e,r);case Nt.ZodPipeline:return vIe(e,r);case Nt.ZodFunction:case Nt.ZodVoid:case Nt.ZodSymbol:return;default:return(n=>{})()}},CIe=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),mht=(e,t)=>{const r=WFe(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((u,[l,c])=>({...u,[l]:li(c._def,{...r,currentPath:[...r.basePath,r.definitionPath,l]},!0)??{}}),{}):void 0,i=typeof t=="string"?t:(t==null?void 0:t.nameStrategy)==="title"||t==null?void 0:t.name,a=li(e._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??{},o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(a.title=o);const s=i===void 0?n?{...a,[r.definitionPath]:n}:a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:a}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":r.target==="jsonSchema2019-09"&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),s},ght={output:"output",llm:"llm",retrieval:"retrieval",reranker:"reranker",message:"message",document:"document",embedding:"embedding",tool:"tool",tool_call:"tool_call",user:"user"},vht={provider:"provider",model_name:"model_name",input_messages:"input_messages",output_messages:"output_messages",invocation_parameters:"invocation_parameters",prompts:"prompts",prompt_template:"prompt_template",tools:"tools"},yht={documents:"documents"},bht={input_documents:"input_documents",output_documents:"output_documents",query:"query"},Oht={embeddings:"embeddings",text:"text",model_name:"model_name"},xht={name:"name",description:"description",parameters:"parameters",json_schema:"json_schema"},_ht={role:"role",content:"content",contents:"contents",name:"name",function_call_name:"function_call_name",function_call_arguments_json:"function_call_arguments_json",tool_calls:"tool_calls",tool_call_id:"tool_call_id"},Sht={id:"id",content:"content",score:"score",metadata:"metadata"},wht={id:"id"};var xK;(function(e){e.LLM="LLM",e.CHAIN="CHAIN",e.TOOL="TOOL",e.RETRIEVER="RETRIEVER",e.RERANKER="RERANKER",e.EMBEDDING="EMBEDDING",e.AGENT="AGENT",e.GUARDRAIL="GUARDRAIL",e.EVALUATOR="EVALUATOR"})(xK||(xK={}));var _K;(function(e){e.TEXT="text/plain",e.JSON="application/json",e.AUDIO_WAV="audio/wav"})(_K||(_K={}));var SK;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.MISTRALAI="mistralai",e.COHERE="cohere",e.VERTEXAI="vertexai"})(SK||(SK={}));var wK;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.MISTRALAI="mistralai",e.COHERE="cohere",e.GOOGLE="google",e.AWS="aws",e.AZURE="azure"})(wK||(wK={}));function O9(){return O9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O9.apply(this,arguments)}var zce=["shift","alt","meta","mod","ctrl"],DIe={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function rg(e){return(DIe[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function PIe(e){return zce.includes(e)}function NT(e,t){return t===void 0&&(t=","),e.split(t)}function LT(e,t,r){t===void 0&&(t="+");var n=e.toLocaleLowerCase().split(t).map(function(o){return rg(o)}),i={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},a=n.filter(function(o){return!zce.includes(o)});return O9({},i,{keys:a,description:r})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Qce([rg(e.key),rg(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Bce([rg(e.key),rg(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){ng.clear()})})();var ng=new Set;function fL(e){return Array.isArray(e)}function RIe(e,t){t===void 0&&(t=",");var r=fL(e)?e:e.split(t);return r.every(function(n){return ng.has(n.trim().toLowerCase())})}function Qce(e){var t=Array.isArray(e)?e:[e];ng.has("meta")&&ng.forEach(function(r){return!PIe(r)&&ng.delete(r.toLowerCase())}),t.forEach(function(r){return ng.add(r.toLowerCase())})}function Bce(e){var t=Array.isArray(e)?e:[e];e==="meta"?ng.clear():t.forEach(function(r){return ng.delete(r.toLowerCase())})}function kIe(e,t,r){(typeof r=="function"&&r(e,t)||r===!0)&&e.preventDefault()}function TIe(e,t,r){return typeof r=="function"?r(e,t):r===!0||r===void 0}function AIe(e){return qce(e,["input","textarea","select"])}function qce(e,t){var r=e.target;t===void 0&&(t=!1);var n=r&&r.tagName;return fL(t)?!!(n&&t&&t.some(function(i){return i.toLowerCase()===n.toLowerCase()})):!!(n&&t&&t===!0)}function FIe(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(r){return t.includes(r)})||e.includes("*"):!0}var IIe=function(t,r,n){n===void 0&&(n=!1);var i=r.alt,a=r.meta,o=r.mod,s=r.shift,u=r.ctrl,l=r.keys,c=t.key,f=t.code,d=t.ctrlKey,h=t.metaKey,g=t.shiftKey,m=t.altKey,v=rg(f),y=c.toLowerCase();if(!(l!=null&&l.includes(v))&&!(l!=null&&l.includes(y))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!n){if(i===!m&&y!=="alt"||s===!g&&y!=="shift")return!1;if(o){if(!h&&!d)return!1}else if(a===!h&&y!=="meta"&&y!=="os"||u===!d&&y!=="ctrl"&&y!=="control")return!1}return l&&l.length===1&&(l.includes(y)||l.includes(v))?!0:l?RIe(l):!l},MIe=F.createContext(void 0),NIe=function(){return F.useContext(MIe)};function Uce(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(r,n){return r&&Uce(e[n],t[n])},!0):e===t}var LIe=F.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),zIe=function(){return F.useContext(LIe)};function QIe(e){var t=F.useRef(void 0);return Uce(t.current,e)||(t.current=e),t.current}var EK=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},BIe=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Eht(e,t,r,n){var i=F.useRef(null),a=F.useRef(!1),o=r instanceof Array?n instanceof Array?void 0:n:r,s=fL(e)?e.join(o==null?void 0:o.splitKey):e,u=r instanceof Array?r:n instanceof Array?n:void 0,l=F.useCallback(t,u??[]),c=F.useRef(l);u?c.current=l:c.current=t;var f=QIe(o),d=zIe(),h=d.enabledScopes,g=NIe();return BIe(function(){if(!((f==null?void 0:f.enabled)===!1||!FIe(h,f==null?void 0:f.scopes))){var m=function(C,$){var w;if($===void 0&&($=!1),!(AIe(C)&&!qce(C,f==null?void 0:f.enableOnFormTags))){if(i.current!==null){var P=i.current.getRootNode();if((P instanceof Document||P instanceof ShadowRoot)&&P.activeElement!==i.current&&!i.current.contains(P.activeElement)){EK(C);return}}(w=C.target)!=null&&w.isContentEditable&&!(f!=null&&f.enableOnContentEditable)||NT(s,f==null?void 0:f.splitKey).forEach(function(k){var N,L=LT(k,f==null?void 0:f.combinationKey);if(IIe(C,L,f==null?void 0:f.ignoreModifiers)||(N=L.keys)!=null&&N.includes("*")){if(f!=null&&f.ignoreEventWhen!=null&&f.ignoreEventWhen(C)||$&&a.current)return;if(kIe(C,L,f==null?void 0:f.preventDefault),!TIe(C,L,f==null?void 0:f.enabled)){EK(C);return}c.current(C,L),$||(a.current=!0)}})}},v=function(C){C.key!==void 0&&(Qce(rg(C.code)),((f==null?void 0:f.keydown)===void 0&&(f==null?void 0:f.keyup)!==!0||f!=null&&f.keydown)&&m(C))},y=function(C){C.key!==void 0&&(Bce(rg(C.code)),a.current=!1,f!=null&&f.keyup&&m(C,!0))},O=i.current||(o==null?void 0:o.document)||document;return O.addEventListener("keyup",y),O.addEventListener("keydown",v),g&&NT(s,f==null?void 0:f.splitKey).forEach(function(_){return g.addHotkey(LT(_,f==null?void 0:f.combinationKey,f==null?void 0:f.description))}),function(){O.removeEventListener("keyup",y),O.removeEventListener("keydown",v),g&&NT(s,f==null?void 0:f.splitKey).forEach(function(_){return g.removeHotkey(LT(_,f==null?void 0:f.combinationKey,f==null?void 0:f.description))})}}},[s,f,h]),i}F.createContext(null);F.createContext(null);F.createContext(null);F.createContext(null);F.createContext(null);const Vce=F.createContext({}),SS=Symbol("default");function Ma({values:e,children:t}){for(let[r,n]of e)t=Ce.createElement(r.Provider,{value:n},t);return t}function hn(e){let{className:t,style:r,children:n,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s}=e;return F.useMemo(()=>{let u,l,c;return typeof t=="function"?u=t({...s,defaultClassName:i}):u=t,typeof r=="function"?l=r({...s,defaultStyle:o||{}}):l=r,typeof n=="function"?c=n({...s,defaultChildren:a}):n==null?c=a:c=n,{className:u??i,style:l||o?{...o,...l}:void 0,children:c??a,"data-rac":""}},[t,r,n,i,a,o,s])}function Xf(e,t){let r=F.useContext(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=t||SS;if(!r.slots[n]){let i=new Intl.ListFormat().format(Object.keys(r.slots).map(o=>`"${o}"`)),a=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${a} Valid slot names are ${i}.`)}return r.slots[n]}return r}function Un(e,t,r){let n=Xf(r,e.slot)||{},{ref:i,...a}=n,o=ml(F.useMemo(()=>cO(t,i),[t,i])),s=Qt(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&(typeof a.style=="function"||typeof e.style=="function"?s.style=u=>{let l=typeof a.style=="function"?a.style(u):a.style,c={...u.defaultStyle,...l},f=typeof e.style=="function"?e.style({...u,defaultStyle:c}):e.style;return{...c,...f}}:s.style={...a.style,...e.style}),[s,o]}function Jf(e=!0){let[t,r]=F.useState(e),n=F.useRef(!1),i=F.useCallback(a=>{n.current=!0,r(!!a)},[]);return An(()=>{n.current||r(!1)},[]),[i,t]}function q0(e){const t=/^(data-.*)$/;let r={};for(const n in e)t.test(n)||(r[n]=e[n]);return r}class dL{get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new dL(this.type,this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t.colSpan=this.colSpan,t.colIndex=this.colIndex,t}constructor(t,r){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=t,this.key=r}}class hL{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(t),i=(n==null?void 0:n.firstChildKey)!=null?r.get(n.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?r.get(i.nextKey):void 0}}}getKeyBefore(t){let r=this.keyMap.get(t);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);var n;return(n=r==null?void 0:r.key)!==null&&n!==void 0?n:null}return r.parentKey}getKeyAfter(t){let r=this.keyMap.get(t);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(t==null?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);var r;return(r=t==null?void 0:t.key)!==null&&r!==void 0?r:null}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,r=new t;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(t.key,t)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(t)}commit(t,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=r,this.frozen=!n}UNSTABLE_filter(t){let r=new hL,n=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let a=i.clone(),o=null;for(let s of this.getChildren(i.key))if($K(s,t,this,r)){let u=s.clone();o==null&&(a.firstChildKey=u.key),r.firstKey==null&&(r.firstKey=a.key),o&&o.parentKey===u.parentKey?(o.nextKey=u.key,u.prevKey=o.key):u.prevKey=null,u.nextKey=null,r.addNode(u),o=u}o&&(o.type!=="header"?(a.lastChildKey=o.key,n==null?a.prevKey=null:(n.type==="section"||n.type==="separator")&&(n.nextKey=a.key,a.prevKey=n.key),a.nextKey=null,n=a,r.addNode(a)):(r.firstKey===a.key&&(r.firstKey=null),r.removeNode(o.key)))}else if(i.type==="separator"){let a=i.clone();a.nextKey=null,(n==null?void 0:n.type)==="section"&&(n.nextKey=a.key,a.prevKey=n.key,n=a,r.addNode(a))}else{let a=i.clone();$K(a,t,this,r)&&(r.firstKey==null&&(r.firstKey=a.key),n!=null&&n.type!=="section"&&n.type!=="separator"&&n.parentKey===a.parentKey?(n.nextKey=a.key,a.prevKey=n.key):a.prevKey=null,a.nextKey=null,r.addNode(a),n=a)}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let i;n.prevKey!=null&&(i=r.getItem(n.prevKey),i.nextKey=null),r.removeNode(n.key),n=i}return r.lastKey=(n==null?void 0:n.key)||null,r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function $K(e,t,r,n){if(e.type==="subdialogtrigger"||e.type==="submenutrigger"){let i=[...r.getChildren(e.key)][0];if(i&&t(i.textValue)){let a=i.clone();return n.addNode(a),!0}else return!1}else return e.type==="header"?!0:t(e.textValue)}class jce{*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)===null||t===void 0?void 0:t.isConnected)||!1}invalidateChildIndices(t){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||t.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=t,this.ownerDocument.markDirty(this))}updateChildIndices(){let t=this._minInvalidChildIndex;for(;t;)t.index=t.previousSibling?t.previousSibling.index+1:0,t=t.nextSibling;this._minInvalidChildIndex=null}appendChild(t){t.parentNode&&t.parentNode.removeChild(t),this.firstChild==null&&(this.firstChild=t),this.lastChild?(this.lastChild.nextSibling=t,t.index=this.lastChild.index+1,t.previousSibling=this.lastChild):(t.previousSibling=null,t.index=0),t.parentNode=this,t.nextSibling=null,this.lastChild=t,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(t,r){if(r==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t),t.nextSibling=r,t.previousSibling=r.previousSibling,t.index=r.index-1,this.firstChild===r?this.firstChild=t:r.previousSibling&&(r.previousSibling.nextSibling=t),r.previousSibling=t,t.parentNode=r.parentNode,this.invalidateChildIndices(t),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(t){t.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===t&&(this._minInvalidChildIndex=null),t.nextSibling&&(this.invalidateChildIndices(t.nextSibling),t.nextSibling.previousSibling=t.previousSibling),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),this.firstChild===t&&(this.firstChild=t.nextSibling),this.lastChild===t&&(this.lastChild=t.previousSibling),t.parentNode=null,t.nextSibling=null,t.previousSibling=null,t.index=0,this.ownerDocument.markDirty(t),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let t=this.previousSibling;for(;t&&t.isHidden;)t=t.previousSibling;return t}get nextVisibleSibling(){let t=this.nextSibling;for(;t&&t.isHidden;)t=t.nextSibling;return t}get firstVisibleChild(){let t=this.firstChild;for(;t&&t.isHidden;)t=t.nextSibling;return t}get lastVisibleChild(){let t=this.lastChild;for(;t&&t.isHidden;)t=t.previousSibling;return t}constructor(t){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=t}}class Eb extends jce{get index(){return this._index}set index(t){this._index=t,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof Eb?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var t,r,n;let i=this.nextVisibleSibling,a=this.getMutableNode();a.index=this.index,a.level=this.level,a.parentKey=this.parentNode instanceof Eb?this.parentNode.node.key:null;var o;a.prevKey=(o=(t=this.previousVisibleSibling)===null||t===void 0?void 0:t.node.key)!==null&&o!==void 0?o:null;var s;a.nextKey=(s=i==null?void 0:i.node.key)!==null&&s!==void 0?s:null,a.hasChildNodes=!!this.firstChild;var u;a.firstChildKey=(u=(r=this.firstVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&u!==void 0?u:null;var l;if(a.lastChildKey=(l=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&l!==void 0?l:null,(a.colSpan!=null||a.colIndex!=null)&&i){var c,f;let d=((c=a.colIndex)!==null&&c!==void 0?c:a.index)+((f=a.colSpan)!==null&&f!==void 0?f:1);if(d!==i.node.colIndex){let h=i.getMutableNode();h.colIndex=d}}}setProps(t,r,n,i){let a=this.getMutableNode(),{value:o,textValue:s,id:u,...l}=t;if(l.ref=r,a.props=l,a.rendered=n,a.render=i,a.value=o,a.textValue=s||(typeof l.children=="string"?l.children:"")||t["aria-label"]||"",u!=null&&u!==a.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");a.key=u}l.colSpan!=null&&(a.colSpan=l.colSpan),this.hasSetProps=!0,this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let t=this;return{get display(){return t.isHidden?"none":""},set display(r){let n=r==="none";if(t.isHidden!==n){var i,a;(((i=t.parentNode)===null||i===void 0?void 0:i.firstVisibleChild)===t||((a=t.parentNode)===null||a===void 0?void 0:a.lastVisibleChild)===t)&&t.ownerDocument.markDirty(t.parentNode);let o=t.previousVisibleSibling,s=t.nextVisibleSibling;o&&t.ownerDocument.markDirty(o),s&&t.ownerDocument.markDirty(s),t.isHidden=n,t.ownerDocument.markDirty(t)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(t,r){super(r),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new dL(t,`react-aria-${++r.nodeId}`)}}class qIe extends jce{get isConnected(){return this.isMounted}createElement(t){return new Eb(t,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(t){this.dirtyNodes.add(t)}addNode(t){if(t.isHidden)return;let r=this.getMutableCollection();if(!r.getItem(t.node.key))for(let n of t)this.addNode(n);r.addNode(t.node)}removeNode(t){for(let n of t)this.removeNode(n);this.getMutableCollection().removeNode(t.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let a of this.dirtyNodes)a instanceof Eb&&(!a.isConnected||a.isHidden)?this.removeNode(a):a.updateChildIndices();for(let a of this.dirtyNodes)a instanceof Eb&&(a.isConnected&&!a.isHidden&&(a.updateNode(),this.addNode(a)),a.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var t,r,n,i;this.nextCollection.commit((n=(t=this.firstVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&n!==void 0?n:null,(i=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let t of this.subscriptions)t();this.inSubscription=!1}}subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=t,this.nextCollection=t}}function Wce(e){let{children:t,items:r,idScope:n,addIdAndValue:i,dependencies:a=[]}=e,o=F.useMemo(()=>new WeakMap,a);return F.useMemo(()=>{if(r&&typeof t=="function"){let l=[];for(let c of r){let f=o.get(c);if(!f){f=t(c);var s,u;let d=(u=(s=f.props.id)!==null&&s!==void 0?s:c.key)!==null&&u!==void 0?u:c.id;if(d==null)throw new Error("Could not determine key for item");n&&(d=n+":"+d),f=F.cloneElement(f,i?{key:d,id:d,value:c}:{key:d}),o.set(c,f)}l.push(f)}return l}else if(typeof t!="function")return t},[t,r,o,n,i])}if(typeof HTMLTemplateElement<"u"){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const Z2=F.createContext(!1);function UIe(e){if(F.useContext(Z2))return Ce.createElement(Ce.Fragment,null,e.children);let r=Ce.createElement(Z2.Provider,{value:!0},e.children);return Ce.createElement("template",{"data-react-aria-hidden":!0},r)}function yO(e){let t=(r,n)=>F.useContext(Z2)?null:e(r,n);return t.displayName=e.displayName||e.name,F.forwardRef(t)}function VIe(){return F.useContext(Z2)}var zT={exports:{}},QT={};/**
|
|
574
574
|
* @license React
|
|
575
575
|
* use-sync-external-store-shim.production.js
|
|
576
576
|
*
|
|
@@ -908,4 +908,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
908
908
|
To pick up a draggable item, press the space bar.
|
|
909
909
|
While dragging, use the arrow keys to move the item.
|
|
910
910
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
911
|
-
`},Klt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Hlt(e){let{announcements:t=Klt,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=Zlt}=e;const{announce:a,announcement:o}=Vlt(),s=Mw("DndLiveRegion"),[u,l]=F.useState(!1);if(F.useEffect(()=>{l(!0)},[]),jlt(F.useMemo(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:h}=f;t.onDragMove&&a(t.onDragMove({active:d,over:h}))},onDragOver(f){let{active:d,over:h}=f;a(t.onDragOver({active:d,over:h}))},onDragEnd(f){let{active:d,over:h}=f;a(t.onDragEnd({active:d,over:h}))},onDragCancel(f){let{active:d,over:h}=f;a(t.onDragCancel({active:d,over:h}))}}),[a,t])),!u)return null;const c=Ce.createElement(Ce.Fragment,null,Ce.createElement(qlt,{id:n,value:i.draggable}),Ce.createElement(Ult,{id:s,announcement:o}));return r?sc.createPortal(c,r):c}var os;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(os||(os={}));function W$(){}function gmt(e,t){return F.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function vmt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return F.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const uh=Object.freeze({x:0,y:0});function Glt(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ylt(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function Xlt(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function dne(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function b_e(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}const Jlt=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=dne(t),a=[];for(const o of n){const{id:s}=o,u=r.get(s);if(u){const l=dne(u),c=i.reduce((d,h,g)=>d+Glt(l[g],h),0),f=Number((c/4).toFixed(4));a.push({id:s,data:{droppableContainer:o,value:f}})}}return a.sort(Ylt)};function ect(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-n,s=a-r;if(n<i&&r<a){const u=t.width*t.height,l=e.width*e.height,c=o*s,f=c/(u+l-c);return Number(f.toFixed(4))}return 0}const tct=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const a of n){const{id:o}=a,s=r.get(o);if(s){const u=ect(s,t);u>0&&i.push({id:o,data:{droppableContainer:a,value:u}})}}return i.sort(Xlt)};function rct(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function O_e(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:uh}function nct(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((o,s)=>({...o,top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),{...r})}}const ict=nct(1);function act(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function oct(e,t,r){const n=act(t);if(!n)return e;const{scaleX:i,scaleY:a,x:o,y:s}=n,u=e.left-o-(1-i)*parseFloat(r),l=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:c,height:f,top:l,right:u+c,bottom:l+f,left:u}}const sct={ignoreTransform:!1};function zO(e,t){t===void 0&&(t=sct);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:c}=yc(e).getComputedStyle(e);l&&(r=oct(r,l,c))}const{top:n,left:i,width:a,height:o,bottom:s,right:u}=r;return{top:n,left:i,width:a,height:o,bottom:s,right:u}}function hne(e){return zO(e,{ignoreTransform:!0})}function uct(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function lct(e,t){return t===void 0&&(t=yc(e).getComputedStyle(e)),t.position==="fixed"}function cct(e,t){t===void 0&&(t=yc(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?r.test(a):!1})}function iD(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(NQ(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Fw(i)||g_e(i)||r.includes(i))return r;const a=yc(e).getComputedStyle(i);return i!==e&&cct(i,a)&&r.push(i),lct(i,a)?r:n(i.parentNode)}return e?n(e):r}function x_e(e){const[t]=iD(e,1);return t??null}function JI(e){return!nD||!e?null:NO(e)?e:MQ(e)?NQ(e)||e===LO(e).scrollingElement?window:Fw(e)?e:null:null}function __e(e){return NO(e)?e.scrollX:e.scrollLeft}function S_e(e){return NO(e)?e.scrollY:e.scrollTop}function QM(e){return{x:__e(e),y:S_e(e)}}var ws;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ws||(ws={}));function w_e(e){return!nD||!e?!1:e===document.scrollingElement}function E_e(e){const t={x:0,y:0},r=w_e(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:a,isBottom:o,isRight:s,maxScroll:n,minScroll:t}}const fct={x:.2,y:.2};function dct(e,t,r,n,i){let{top:a,left:o,right:s,bottom:u}=r;n===void 0&&(n=10),i===void 0&&(i=fct);const{isTop:l,isBottom:c,isLeft:f,isRight:d}=E_e(e),h={x:0,y:0},g={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+m.height?(h.y=ws.Backward,g.y=n*Math.abs((t.top+m.height-a)/m.height)):!c&&u>=t.bottom-m.height&&(h.y=ws.Forward,g.y=n*Math.abs((t.bottom-m.height-u)/m.height)),!d&&s>=t.right-m.width?(h.x=ws.Forward,g.x=n*Math.abs((t.right-m.width-s)/m.width)):!f&&o<=t.left+m.width&&(h.x=ws.Backward,g.x=n*Math.abs((t.left+m.width-o)/m.width)),{direction:h,speed:g}}function hct(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function $_e(e){return e.reduce((t,r)=>Mb(t,QM(r)),uh)}function pct(e){return e.reduce((t,r)=>t+__e(r),0)}function mct(e){return e.reduce((t,r)=>t+S_e(r),0)}function gct(e,t){if(t===void 0&&(t=zO),!e)return;const{top:r,left:n,bottom:i,right:a}=t(e);x_e(e)&&(i<=0||a<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const vct=[["x",["left","right"],pct],["y",["top","bottom"],mct]];class QQ{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=iD(r),i=$_e(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,o,s]of vct)for(const u of o)Object.defineProperty(this,u,{get:()=>{const l=s(n),c=i[a]-l;return this.rect[u]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class z_{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function yct(e){const{EventTarget:t}=yc(e);return e instanceof t?e:LO(e)}function e7(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Ff;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ff||(Ff={}));function pne(e){e.preventDefault()}function bct(e){e.stopPropagation()}var Jn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Jn||(Jn={}));const C_e={start:[Jn.Space,Jn.Enter],cancel:[Jn.Esc],end:[Jn.Space,Jn.Enter]},Oct=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Jn.Right:return{...r,x:r.x+25};case Jn.Left:return{...r,x:r.x-25};case Jn.Down:return{...r,y:r.y+25};case Jn.Up:return{...r,y:r.y-25}}};class D_e{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new z_(LO(r)),this.windowListeners=new z_(yc(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ff.Resize,this.handleCancel),this.windowListeners.add(Ff.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ff.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&gct(n),r(uh)}handleKeyDown(t){if(zQ(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:a=C_e,coordinateGetter:o=Oct,scrollBehavior:s="smooth"}=i,{code:u}=t;if(a.end.includes(u)){this.handleEnd(t);return}if(a.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:uh;this.referenceCoordinates||(this.referenceCoordinates=c);const f=o(t,{active:r,context:n.current,currentCoordinates:c});if(f){const d=ZS(f,c),h={x:0,y:0},{scrollableAncestors:g}=n.current;for(const m of g){const v=t.code,{isTop:y,isRight:O,isLeft:_,isBottom:C,maxScroll:$,minScroll:w}=E_e(m),P=hct(m),k={x:Math.min(v===Jn.Right?P.right-P.width/2:P.right,Math.max(v===Jn.Right?P.left:P.left+P.width/2,f.x)),y:Math.min(v===Jn.Down?P.bottom-P.height/2:P.bottom,Math.max(v===Jn.Down?P.top:P.top+P.height/2,f.y))},N=v===Jn.Right&&!O||v===Jn.Left&&!_,L=v===Jn.Down&&!C||v===Jn.Up&&!y;if(N&&k.x!==f.x){const Q=m.scrollLeft+d.x,B=v===Jn.Right&&Q<=$.x||v===Jn.Left&&Q>=w.x;if(B&&!d.y){m.scrollTo({left:Q,behavior:s});return}B?h.x=m.scrollLeft-Q:h.x=v===Jn.Right?m.scrollLeft-$.x:m.scrollLeft-w.x,h.x&&m.scrollBy({left:-h.x,behavior:s});break}else if(L&&k.y!==f.y){const Q=m.scrollTop+d.y,B=v===Jn.Down&&Q<=$.y||v===Jn.Up&&Q>=w.y;if(B&&!d.x){m.scrollTo({top:Q,behavior:s});return}B?h.y=m.scrollTop-Q:h.y=v===Jn.Down?m.scrollTop-$.y:m.scrollTop-w.y,h.y&&m.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Mb(ZS(f,this.referenceCoordinates),h))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}D_e.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=C_e,onActivation:i}=t,{active:a}=r;const{code:o}=e.nativeEvent;if(n.start.includes(o)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function mne(e){return!!(e&&"distance"in e)}function gne(e){return!!(e&&"delay"in e)}class BQ{constructor(t,r,n){var i;n===void 0&&(n=yct(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:o}=a;this.props=t,this.events=r,this.document=LO(o),this.documentListeners=new z_(this.document),this.listeners=new z_(n),this.windowListeners=new z_(yc(o)),this.initialCoordinates=(i=zM(a))!=null?i:uh,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Ff.Resize,this.handleCancel),this.windowListeners.add(Ff.DragStart,pne),this.windowListeners.add(Ff.VisibilityChange,this.handleCancel),this.windowListeners.add(Ff.ContextMenu,pne),this.documentListeners.add(Ff.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gne(r)){this.timeoutId=setTimeout(this.handleStart,r.delay);return}if(mne(r))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ff.Click,bct,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ff.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:a}=this,{onMove:o,options:{activationConstraint:s}}=a;if(!i)return;const u=(r=zM(t))!=null?r:uh,l=ZS(i,u);if(!n&&s){if(mne(s)){if(s.tolerance!=null&&e7(l,s.tolerance))return this.handleCancel();if(e7(l,s.distance))return this.handleStart()}return gne(s)&&e7(l,s.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),o(u)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Jn.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const xct={move:{name:"pointermove"},end:{name:"pointerup"}};class P_e extends BQ{constructor(t){const{event:r}=t,n=LO(r.target);super(t,xct,n)}}P_e.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const _ct={move:{name:"mousemove"},end:{name:"mouseup"}};var BM;(function(e){e[e.RightClick=2]="RightClick"})(BM||(BM={}));class Sct extends BQ{constructor(t){super(t,_ct,LO(t.event.target))}}Sct.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===BM.RightClick?!1:(n==null||n({event:r}),!0)}}];const t7={move:{name:"touchmove"},end:{name:"touchend"}};class wct extends BQ{constructor(t){super(t,t7)}static setup(){return window.addEventListener(t7.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(t7.move.name,t)};function t(){}}}wct.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n==null||n({event:r}),!0)}}];var Q_;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Q_||(Q_={}));var Z$;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Z$||(Z$={}));function Ect(e){let{acceleration:t,activator:r=Q_.Pointer,canScroll:n,draggingRect:i,enabled:a,interval:o=5,order:s=Z$.TreeOrder,pointerCoordinates:u,scrollableAncestors:l,scrollableAncestorRects:c,delta:f,threshold:d}=e;const h=Cct({delta:f,disabled:!a}),[g,m]=Nlt(),v=F.useRef({x:0,y:0}),y=F.useRef({x:0,y:0}),O=F.useMemo(()=>{switch(r){case Q_.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Q_.DraggableRect:return i}},[r,i,u]),_=F.useRef(null),C=F.useCallback(()=>{const w=_.current;if(!w)return;const P=v.current.x*y.current.x,k=v.current.y*y.current.y;w.scrollBy(P,k)},[]),$=F.useMemo(()=>s===Z$.TreeOrder?[...l].reverse():l,[s,l]);F.useEffect(()=>{if(!a||!l.length||!O){m();return}for(const w of $){if((n==null?void 0:n(w))===!1)continue;const P=l.indexOf(w),k=c[P];if(!k)continue;const{direction:N,speed:L}=dct(w,k,O,t,d);for(const Q of["x","y"])h[Q][N[Q]]||(L[Q]=0,N[Q]=0);if(L.x>0||L.y>0){m(),_.current=w,g(C,o),v.current=L,y.current=N;return}}v.current={x:0,y:0},y.current={x:0,y:0},m()},[t,C,n,m,a,o,JSON.stringify(O),JSON.stringify(h),g,l,$,c,JSON.stringify(d)])}const $ct={x:{[ws.Backward]:!1,[ws.Forward]:!1},y:{[ws.Backward]:!1,[ws.Forward]:!1}};function Cct(e){let{delta:t,disabled:r}=e;const n=LM(t);return Iw(i=>{if(r||!n||!i)return $ct;const a={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[ws.Backward]:i.x[ws.Backward]||a.x===-1,[ws.Forward]:i.x[ws.Forward]||a.x===1},y:{[ws.Backward]:i.y[ws.Backward]||a.y===-1,[ws.Forward]:i.y[ws.Forward]||a.y===1}}},[r,t,n])}function Dct(e,t){const r=t!==null?e.get(t):void 0,n=r?r.node.current:null;return Iw(i=>{var a;return t===null?null:(a=n??i)!=null?a:null},[n,t])}function Pct(e,t){return F.useMemo(()=>e.reduce((r,n)=>{const{sensor:i}=n,a=i.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,n)}));return[...r,...a]},[]),[e,t])}var KS;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(KS||(KS={}));var qM;(function(e){e.Optimized="optimized"})(qM||(qM={}));const vne=new Map;function Rct(e,t){let{dragging:r,dependencies:n,config:i}=t;const[a,o]=F.useState(null),{frequency:s,measure:u,strategy:l}=i,c=F.useRef(e),f=v(),d=WS(f),h=F.useCallback(function(y){y===void 0&&(y=[]),!d.current&&o(O=>O===null?y:O.concat(y.filter(_=>!O.includes(_))))},[d]),g=F.useRef(null),m=Iw(y=>{if(f&&!r)return vne;if(!y||y===vne||c.current!==e||a!=null){const O=new Map;for(let _ of e){if(!_)continue;if(a&&a.length>0&&!a.includes(_.id)&&_.rect.current){O.set(_.id,_.rect.current);continue}const C=_.node.current,$=C?new QQ(u(C),C):null;_.rect.current=$,$&&O.set(_.id,$)}return O}return y},[e,a,r,f,u]);return F.useEffect(()=>{c.current=e},[e]),F.useEffect(()=>{f||h()},[r,f]),F.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),F.useEffect(()=>{f||typeof s!="number"||g.current!==null||(g.current=setTimeout(()=>{h(),g.current=null},s))},[s,f,h,...n]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:a!=null};function v(){switch(l){case KS.Always:return!1;case KS.BeforeDragging:return r;default:return!r}}}function R_e(e,t){return Iw(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function kct(e,t){return R_e(e,t)}function Tct(e){let{callback:t,disabled:r}=e;const n=LQ(t),i=F.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(n)},[n,r]);return F.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function aD(e){let{callback:t,disabled:r}=e;const n=LQ(t),i=F.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(n)},[r]);return F.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Act(e){return new QQ(zO(e),e)}function yne(e,t,r){t===void 0&&(t=Act);const[n,i]=F.useReducer(s,null),a=Tct({callback(u){if(e)for(const l of u){const{type:c,target:f}=l;if(c==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),o=aD({callback:i});return sh(()=>{i(),e?(o==null||o.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(o==null||o.disconnect(),a==null||a.disconnect())},[e]),n;function s(u){if(!e)return null;if(e.isConnected===!1){var l;return(l=u??r)!=null?l:null}const c=t(e);return JSON.stringify(u)===JSON.stringify(c)?u:c}}function Fct(e){const t=R_e(e);return O_e(e,t)}const bne=[];function Ict(e){const t=F.useRef(e),r=Iw(n=>e?n&&n!==bne&&e&&t.current&&e.parentNode===t.current.parentNode?n:iD(e):bne,[e]);return F.useEffect(()=>{t.current=e},[e]),r}function Mct(e){const[t,r]=F.useState(null),n=F.useRef(e),i=F.useCallback(a=>{const o=JI(a.target);o&&r(s=>s?(s.set(o,QM(o)),new Map(s)):null)},[]);return F.useEffect(()=>{const a=n.current;if(e!==a){o(a);const s=e.map(u=>{const l=JI(u);return l?(l.addEventListener("scroll",i,{passive:!0}),[l,QM(l)]):null}).filter(u=>u!=null);r(s.length?new Map(s):null),n.current=e}return()=>{o(e),o(a)};function o(s){s.forEach(u=>{const l=JI(u);l==null||l.removeEventListener("scroll",i)})}},[i,e]),F.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>Mb(a,o),uh):$_e(e):uh,[e,t])}function One(e,t){t===void 0&&(t=[]);const r=F.useRef(null);return F.useEffect(()=>{r.current=null},t),F.useEffect(()=>{const n=e!==uh;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?ZS(e,r.current):uh}function Nct(e){F.useEffect(()=>{if(!nD)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function Lct(e,t){return F.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:a}=n;return r[i]=o=>{a(o,t)},r},{}),[e,t])}function k_e(e){return F.useMemo(()=>e?uct(e):null,[e])}const r7=[];function zct(e,t){t===void 0&&(t=zO);const[r]=e,n=k_e(r?yc(r):null),[i,a]=F.useReducer(s,r7),o=aD({callback:a});return e.length>0&&i===r7&&a(),sh(()=>{e.length?e.forEach(u=>o==null?void 0:o.observe(u)):(o==null||o.disconnect(),a())},[e]),i;function s(){return e.length?e.map(u=>w_e(u)?n:new QQ(t(u),u)):r7}}function Qct(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Fw(t)?t:e}function Bct(e){let{measure:t}=e;const[r,n]=F.useState(null),i=F.useCallback(l=>{for(const{target:c}of l)if(Fw(c)){n(f=>{const d=t(c);return f?{...f,width:d.width,height:d.height}:d});break}},[t]),a=aD({callback:i}),o=F.useCallback(l=>{const c=Qct(l);a==null||a.disconnect(),c&&(a==null||a.observe(c)),n(c?t(c):null)},[t,a]),[s,u]=V$(o);return F.useMemo(()=>({nodeRef:s,rect:r,setRef:u}),[r,s,u])}const qct=[{sensor:P_e,options:{}},{sensor:D_e,options:{}}],Uct={current:{}},J3={draggable:{measure:hne},droppable:{measure:hne,strategy:KS.WhileDragging,frequency:qM.Optimized},dragOverlay:{measure:zO}};class B_ extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const Vct={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new B_,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:W$},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:J3,measureDroppableContainers:W$,windowRect:null,measuringScheduled:!1},jct={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:W$,draggableNodes:new Map,over:null,measureDroppableContainers:W$},oD=F.createContext(jct),T_e=F.createContext(Vct);function Wct(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new B_}}}function Zct(e,t){switch(t.type){case os.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case os.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case os.DragEnd:case os.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case os.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new B_(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case os.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;const o=new B_(e.droppable.containers);return o.set(r,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case os.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const a=new B_(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Kct(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=F.useContext(oD),a=LM(n),o=LM(r==null?void 0:r.id);return F.useEffect(()=>{if(!t&&!n&&a&&o!=null){if(!zQ(a)||document.activeElement===a.target)return;const s=i.get(o);if(!s)return;const{activatorNode:u,node:l}=s;if(!u.current&&!l.current)return;requestAnimationFrame(()=>{for(const c of[u.current,l.current]){if(!c)continue;const f=Qlt(c);if(f){f.focus();break}}})}},[n,t,i,o,a]),null}function Hct(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...n}),r):r}function Gct(e){return F.useMemo(()=>({draggable:{...J3.draggable,...e==null?void 0:e.draggable},droppable:{...J3.droppable,...e==null?void 0:e.droppable},dragOverlay:{...J3.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Yct(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const a=F.useRef(!1),{x:o,y:s}=typeof i=="boolean"?{x:i,y:i}:i;sh(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!n)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const c=r(l),f=O_e(c,n);if(o||(f.x=0),s||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const d=x_e(l);d&&d.scrollBy({top:f.y,left:f.x})}},[t,o,s,n,r])}const A_e=F.createContext({...uh,scaleX:1,scaleY:1});var jm;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(jm||(jm={}));const ymt=F.memo(function(t){var r,n,i,a;let{id:o,accessibility:s,autoScroll:u=!0,children:l,sensors:c=qct,collisionDetection:f=tct,measuring:d,modifiers:h,...g}=t;const m=F.useReducer(Zct,void 0,Wct),[v,y]=m,[O,_]=Wlt(),[C,$]=F.useState(jm.Uninitialized),w=C===jm.Initialized,{draggable:{active:P,nodes:k,translate:N},droppable:{containers:L}}=v,Q=P?k.get(P):null,B=F.useRef({initial:null,translated:null}),I=F.useMemo(()=>{var Pt;return P!=null?{id:P,data:(Pt=Q==null?void 0:Q.data)!=null?Pt:Uct,rect:B}:null},[P,Q]),K=F.useRef(null),[T,z]=F.useState(null),[q,U]=F.useState(null),V=WS(g,Object.values(g)),A=Mw("DndDescribedBy",o),M=F.useMemo(()=>L.getEnabled(),[L]),G=Gct(d),{droppableRects:W,measureDroppableContainers:re,measuringScheduled:ie}=Rct(M,{dragging:w,dependencies:[N.x,N.y],config:G.droppable}),oe=Dct(k,P),be=F.useMemo(()=>q?zM(q):null,[q]),me=kt(),Oe=kct(oe,G.draggable.measure);Yct({activeNode:P?k.get(P):null,config:me.layoutShiftCompensation,initialRect:Oe,measure:G.draggable.measure});const xe=yne(oe,G.draggable.measure,Oe),he=yne(oe?oe.parentElement:null),ne=F.useRef({activatorEvent:null,active:null,activeNode:oe,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ae=L.getNodeFor((r=ne.current.over)==null?void 0:r.id),X=Bct({measure:G.dragOverlay.measure}),te=(n=X.nodeRef.current)!=null?n:oe,de=w?(i=X.rect)!=null?i:xe:null,pe=!!(X.nodeRef.current&&X.rect),Se=Fct(pe?null:xe),$e=k_e(te?yc(te):null),ge=Ict(w?ae??oe:null),Ee=zct(ge),Re=Hct(h,{transform:{x:N.x-Se.x,y:N.y-Se.y,scaleX:1,scaleY:1},activatorEvent:q,active:I,activeNodeRect:xe,containerNodeRect:he,draggingNodeRect:de,over:ne.current.over,overlayNodeRect:X.rect,scrollableAncestors:ge,scrollableAncestorRects:Ee,windowRect:$e}),Fe=be?Mb(be,N):null,Ue=Mct(ge),ze=One(Ue),Te=One(Ue,[xe]),Be=Mb(Re,ze),et=de?ict(de,Re):null,pt=I&&et?f({active:I,collisionRect:et,droppableRects:W,droppableContainers:M,pointerCoordinates:Fe}):null,St=b_e(pt,"id"),[ft,Ft]=F.useState(null),Bt=pe?Re:Mb(Re,Te),Vt=rct(Bt,(a=ft==null?void 0:ft.rect)!=null?a:null,xe),Le=F.useCallback((Pt,zt)=>{let{sensor:ar,options:vr}=zt;if(K.current==null)return;const Tr=k.get(K.current);if(!Tr)return;const Rn=Pt.nativeEvent,kn=new ar({active:K.current,activeNode:Tr,event:Rn,options:vr,context:ne,onStart(Ze){const tt=K.current;if(tt==null)return;const lt=k.get(tt);if(!lt)return;const{onDragStart:_t}=V.current,jt={active:{id:tt,data:lt.data,rect:B}};sc.unstable_batchedUpdates(()=>{_t==null||_t(jt),$(jm.Initializing),y({type:os.DragStart,initialCoordinates:Ze,active:tt}),O({type:"onDragStart",event:jt})})},onMove(Ze){y({type:os.DragMove,coordinates:Ze})},onEnd:Qe(os.DragEnd),onCancel:Qe(os.DragCancel)});sc.unstable_batchedUpdates(()=>{z(kn),U(Pt.nativeEvent)});function Qe(Ze){return async function(){const{active:lt,collisions:_t,over:jt,scrollAdjustedTranslate:Jt}=ne.current;let Tt=null;if(lt&&Jt){const{cancelDrop:Ht}=V.current;Tt={activatorEvent:Rn,active:lt,collisions:_t,delta:Jt,over:jt},Ze===os.DragEnd&&typeof Ht=="function"&&await Promise.resolve(Ht(Tt))&&(Ze=os.DragCancel)}K.current=null,sc.unstable_batchedUpdates(()=>{y({type:Ze}),$(jm.Uninitialized),Ft(null),z(null),U(null);const Ht=Ze===os.DragEnd?"onDragEnd":"onDragCancel";if(Tt){const or=V.current[Ht];or==null||or(Tt),O({type:Ht,event:Tt})}})}}},[k]),Ye=F.useCallback((Pt,zt)=>(ar,vr)=>{const Tr=ar.nativeEvent,Rn=k.get(vr);if(K.current!==null||!Rn||Tr.dndKit||Tr.defaultPrevented)return;const kn={active:Rn};Pt(ar,zt.options,kn)===!0&&(Tr.dndKit={capturedBy:zt.sensor},K.current=vr,Le(ar,zt))},[k,Le]),mt=Pct(c,Ye);Nct(c),sh(()=>{xe&&C===jm.Initializing&&$(jm.Initialized)},[xe,C]),F.useEffect(()=>{const{onDragMove:Pt}=V.current,{active:zt,activatorEvent:ar,collisions:vr,over:Tr}=ne.current;if(!zt||!ar)return;const Rn={active:zt,activatorEvent:ar,collisions:vr,delta:{x:Be.x,y:Be.y},over:Tr};sc.unstable_batchedUpdates(()=>{Pt==null||Pt(Rn),O({type:"onDragMove",event:Rn})})},[Be.x,Be.y]),F.useEffect(()=>{const{active:Pt,activatorEvent:zt,collisions:ar,droppableContainers:vr,scrollAdjustedTranslate:Tr}=ne.current;if(!Pt||K.current==null||!zt||!Tr)return;const{onDragOver:Rn}=V.current,kn=vr.get(St),Qe=kn&&kn.rect.current?{id:kn.id,rect:kn.rect.current,data:kn.data,disabled:kn.disabled}:null,Ze={active:Pt,activatorEvent:zt,collisions:ar,delta:{x:Tr.x,y:Tr.y},over:Qe};sc.unstable_batchedUpdates(()=>{Ft(Qe),Rn==null||Rn(Ze),O({type:"onDragOver",event:Ze})})},[St]),sh(()=>{ne.current={activatorEvent:q,active:I,activeNode:oe,collisionRect:et,collisions:pt,droppableRects:W,draggableNodes:k,draggingNode:te,draggingNodeRect:de,droppableContainers:L,over:ft,scrollableAncestors:ge,scrollAdjustedTranslate:Be},B.current={initial:de,translated:et}},[I,oe,pt,et,k,te,de,W,L,ft,ge,Be]),Ect({...me,delta:N,draggingRect:et,pointerCoordinates:Fe,scrollableAncestors:ge,scrollableAncestorRects:Ee});const xt=F.useMemo(()=>({active:I,activeNode:oe,activeNodeRect:xe,activatorEvent:q,collisions:pt,containerNodeRect:he,dragOverlay:X,draggableNodes:k,droppableContainers:L,droppableRects:W,over:ft,measureDroppableContainers:re,scrollableAncestors:ge,scrollableAncestorRects:Ee,measuringConfiguration:G,measuringScheduled:ie,windowRect:$e}),[I,oe,xe,q,pt,he,X,k,L,W,ft,re,ge,Ee,G,ie,$e]),Ct=F.useMemo(()=>({activatorEvent:q,activators:mt,active:I,activeNodeRect:xe,ariaDescribedById:{draggable:A},dispatch:y,draggableNodes:k,over:ft,measureDroppableContainers:re}),[q,mt,I,xe,y,A,k,ft,re]);return Ce.createElement(y_e.Provider,{value:_},Ce.createElement(oD.Provider,{value:Ct},Ce.createElement(T_e.Provider,{value:xt},Ce.createElement(A_e.Provider,{value:Vt},l)),Ce.createElement(Kct,{disabled:(s==null?void 0:s.restoreFocus)===!1})),Ce.createElement(Hlt,{...s,hiddenTextDescribedById:A}));function kt(){const Pt=(T==null?void 0:T.autoScrollEnabled)===!1,zt=typeof u=="object"?u.enabled===!1:u===!1,ar=w&&!Pt&&!zt;return typeof u=="object"?{...u,enabled:ar}:{enabled:ar}}}),Xct=F.createContext(null),xne="button",Jct="Droppable";function eft(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const a=Mw(Jct),{activators:o,activatorEvent:s,active:u,activeNodeRect:l,ariaDescribedById:c,draggableNodes:f,over:d}=F.useContext(oD),{role:h=xne,roleDescription:g="draggable",tabIndex:m=0}=i??{},v=(u==null?void 0:u.id)===t,y=F.useContext(v?A_e:Xct),[O,_]=V$(),[C,$]=V$(),w=Lct(o,t),P=WS(r);sh(()=>(f.set(t,{id:t,key:a,node:O,activatorNode:C,data:P}),()=>{const N=f.get(t);N&&N.key===a&&f.delete(t)}),[f,t]);const k=F.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&h===xne?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[n,h,m,v,g,c.draggable]);return{active:u,activatorEvent:s,activeNodeRect:l,attributes:k,isDragging:v,listeners:n?void 0:w,node:O,over:d,setNodeRef:_,setActivatorNodeRef:$,transform:y}}function tft(){return F.useContext(T_e)}const rft="Droppable",nft={timeout:25};function ift(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const a=Mw(rft),{active:o,dispatch:s,over:u,measureDroppableContainers:l}=F.useContext(oD),c=F.useRef({disabled:r}),f=F.useRef(!1),d=F.useRef(null),h=F.useRef(null),{disabled:g,updateMeasurementsFor:m,timeout:v}={...nft,...i},y=WS(m??n),O=F.useCallback(()=>{if(!f.current){f.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{l(Array.isArray(y.current)?y.current:[y.current]),h.current=null},v)},[v]),_=aD({callback:O,disabled:g||!o}),C=F.useCallback((k,N)=>{_&&(N&&(_.unobserve(N),f.current=!1),k&&_.observe(k))},[_]),[$,w]=V$(C),P=WS(t);return F.useEffect(()=>{!_||!$.current||(_.disconnect(),f.current=!1,_.observe($.current))},[$,_]),sh(()=>(s({type:os.RegisterDroppable,element:{id:n,key:a,disabled:r,node:$,rect:d,data:P}}),()=>s({type:os.UnregisterDroppable,key:a,id:n})),[n]),F.useEffect(()=>{r!==c.current.disabled&&(s({type:os.SetDroppableDisabled,id:n,key:a,disabled:r}),c.current.disabled=r)},[n,a,r,s]),{active:o,rect:d,isOver:(u==null?void 0:u.id)===n,node:$,over:u,setNodeRef:w}}function F_e(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function aft(e,t){return e.reduce((r,n,i)=>{const a=t.get(n);return a&&(r[i]=a),r},Array(e.length))}function _3(e){return e!==null&&e>=0}function oft(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function sft(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const I_e=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const a=F_e(t,n,r),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},M_e="Sortable",N_e=Ce.createContext({activeIndex:-1,containerId:M_e,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:I_e,disabled:{draggable:!1,droppable:!1}});function bmt(e){let{children:t,id:r,items:n,strategy:i=I_e,disabled:a=!1}=e;const{active:o,dragOverlay:s,droppableRects:u,over:l,measureDroppableContainers:c}=tft(),f=Mw(M_e,r),d=s.rect!==null,h=F.useMemo(()=>n.map(w=>typeof w=="object"&&"id"in w?w.id:w),[n]),g=o!=null,m=o?h.indexOf(o.id):-1,v=l?h.indexOf(l.id):-1,y=F.useRef(h),O=!oft(h,y.current),_=v!==-1&&m===-1||O,C=sft(a);sh(()=>{O&&g&&c(h)},[O,h,g,c]),F.useEffect(()=>{y.current=h},[h]);const $=F.useMemo(()=>({activeIndex:m,containerId:f,disabled:C,disableTransforms:_,items:h,overIndex:v,useDragOverlay:d,sortedRects:aft(h,u),strategy:i}),[m,f,C.draggable,C.droppable,_,h,v,u,d,i]);return Ce.createElement(N_e.Provider,{value:$},t)}const uft=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return F_e(r,n,i).indexOf(t)},lft=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:u,transition:l}=e;return!l||!n||s!==a&&i===o?!1:r?!0:o!==i&&t===u},cft={duration:200,easing:"ease"},L_e="transform",fft=j$.Transition.toString({property:L_e,duration:0,easing:"linear"}),dft={roleDescription:"sortable"};function hft(e){let{disabled:t,index:r,node:n,rect:i}=e;const[a,o]=F.useState(null),s=F.useRef(r);return sh(()=>{if(!t&&r!==s.current&&n.current){const u=i.current;if(u){const l=zO(n.current,{ignoreTransform:!0}),c={x:u.left-l.left,y:u.top-l.top,scaleX:u.width/l.width,scaleY:u.height/l.height};(c.x||c.y)&&o(c)}}r!==s.current&&(s.current=r)},[t,r,n,i]),F.useEffect(()=>{a&&o(null)},[a]),a}function Omt(e){let{animateLayoutChanges:t=lft,attributes:r,disabled:n,data:i,getNewIndex:a=uft,id:o,strategy:s,resizeObserverConfig:u,transition:l=cft}=e;const{items:c,containerId:f,activeIndex:d,disabled:h,disableTransforms:g,sortedRects:m,overIndex:v,useDragOverlay:y,strategy:O}=F.useContext(N_e),_=pft(n,h),C=c.indexOf(o),$=F.useMemo(()=>({sortable:{containerId:f,index:C,items:c},...i}),[f,i,C,c]),w=F.useMemo(()=>c.slice(c.indexOf(o)),[c,o]),{rect:P,node:k,isOver:N,setNodeRef:L}=ift({id:o,data:$,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...u}}),{active:Q,activatorEvent:B,activeNodeRect:I,attributes:K,setNodeRef:T,listeners:z,isDragging:q,over:U,setActivatorNodeRef:V,transform:A}=eft({id:o,data:$,attributes:{...dft,...r},disabled:_.draggable}),M=Mlt(L,T),G=!!Q,W=G&&!g&&_3(d)&&_3(v),re=!y&&q,ie=re&&W?A:null,be=W?ie??(s??O)({rects:m,activeNodeRect:I,activeIndex:d,overIndex:v,index:C}):null,me=_3(d)&&_3(v)?a({id:o,items:c,activeIndex:d,overIndex:v}):C,Oe=Q==null?void 0:Q.id,xe=F.useRef({activeId:Oe,items:c,newIndex:me,containerId:f}),he=c!==xe.current.items,ne=t({active:Q,containerId:f,isDragging:q,isSorting:G,id:o,index:C,items:c,newIndex:xe.current.newIndex,previousItems:xe.current.items,previousContainerId:xe.current.containerId,transition:l,wasDragging:xe.current.activeId!=null}),ae=hft({disabled:!ne,index:C,node:k,rect:P});return F.useEffect(()=>{G&&xe.current.newIndex!==me&&(xe.current.newIndex=me),f!==xe.current.containerId&&(xe.current.containerId=f),c!==xe.current.items&&(xe.current.items=c)},[G,me,f,c]),F.useEffect(()=>{if(Oe===xe.current.activeId)return;if(Oe&&!xe.current.activeId){xe.current.activeId=Oe;return}const te=setTimeout(()=>{xe.current.activeId=Oe},50);return()=>clearTimeout(te)},[Oe]),{active:Q,activeIndex:d,attributes:K,data:$,rect:P,index:C,newIndex:me,items:c,isOver:N,isSorting:G,isDragging:q,listeners:z,node:k,overIndex:v,over:U,setNodeRef:M,setActivatorNodeRef:V,setDroppableNodeRef:L,setDraggableNodeRef:T,transform:ae??be,transition:X()};function X(){if(ae||he&&xe.current.newIndex===C)return fft;if(!(re&&!zQ(B)||!l)&&(G||ne))return j$.Transition.toString({...l,property:L_e})}}function pft(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function K$(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const mft=[Jn.Down,Jn.Right,Jn.Up,Jn.Left],xmt=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(mft.includes(e.code)){if(e.preventDefault(),!r||!n)return;const u=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const d=i.get(f.id);if(d)switch(e.code){case Jn.Down:n.top<d.top&&u.push(f);break;case Jn.Up:n.top>d.top&&u.push(f);break;case Jn.Left:n.left>d.left&&u.push(f);break;case Jn.Right:n.left<d.left&&u.push(f);break}});const l=Jlt({collisionRect:n,droppableRects:i,droppableContainers:u});let c=b_e(l,"id");if(c===(o==null?void 0:o.id)&&l.length>1&&(c=l[1].id),c!=null){const f=a.get(r.id),d=a.get(c),h=d?i.get(d.id):null,g=d==null?void 0:d.node.current;if(g&&h&&f&&d){const v=iD(g).some((w,P)=>s[P]!==w),y=z_e(f,d),O=gft(f,d),_=v||!y?{x:0,y:0}:{x:O?n.width-h.width:0,y:O?n.height-h.height:0},C={x:h.left,y:h.top};return _.x&&_.y?C:ZS(C,_)}}}};function z_e(e,t){return!K$(e)||!K$(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function gft(e,t){return!K$(e)||!K$(t)||!z_e(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var _ne=Object.prototype.hasOwnProperty;function Sne(e,t,r){for(r of e.keys())if(q_(r,t))return r}function q_(e,t){var r,n,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&q_(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(i=n,i&&typeof i=="object"&&(i=Sne(t,i),!i)||!t.has(i))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(i=n[0],i&&typeof i=="object"&&(i=Sne(t,i),!i)||!q_(n[1],t.get(i)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(_ne.call(e,r)&&++n&&!_ne.call(t,r)||!(r in t)||!q_(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function vft(e){var t=F.useRef(e),r=F.useRef(0);return q_(e,t.current)||(t.current=e,r.current+=1),F.useMemo(function(){return t.current},[r.current])}function _mt(e,t){return F.useEffect(e,vft(t))}export{Za as $,st as A,uht as B,Hdt as C,mht as D,Qge as E,eDe as F,Cpt as G,m9e as H,Kj as I,Yht as J,qft as K,_S as L,Kht as M,Hht as N,Cht as O,Ght as P,Oft as Q,Ce as R,Fht as S,$ht as T,f9e as U,Dht as V,Aht as W,Qht as X,Uht as Y,xp as Z,V9e as _,nht as a,vQe as a$,Tht as a0,Rht as a1,Jht as a2,cpt as a3,upt as a4,lpt as a5,zht as a6,Xht as a7,vMe as a8,aht as a9,spt as aA,rpt as aB,npt as aC,Rdt as aD,tz as aE,RLe as aF,kht as aG,Lpt as aH,Mpt as aI,Ipt as aJ,Apt as aK,Npt as aL,PLe as aM,AL as aN,ypt as aO,Jft as aP,Ddt as aQ,Zft as aR,hmt as aS,pmt as aT,fdt as aU,Xse as aV,ddt as aW,Eht as aX,Dnt as aY,rnt as aZ,dmt as a_,Yge as aa,qht as ab,Bht as ac,Vht as ad,jht as ae,kpt as af,iw as ag,Wht as ah,Zht as ai,Ppt as aj,Pht as ak,$ft as al,ept as am,tpt as an,dpt as ao,fpt as ap,Mht as aq,Lht as ar,Nht as as,Iht as at,K4 as au,Xf as av,ed as aw,ipt as ax,apt as ay,opt as az,_6e as b,k6e as b$,Dpt as b0,oC as b1,X0 as b2,ppt as b3,hpt as b4,Zdt as b5,Qdt as b6,z4 as b7,Ndt as b8,mmt as b9,c0t as bA,eht as bB,Opt as bC,$nt as bD,$pt as bE,yht as bF,bht as bG,Oht as bH,Sht as bI,Uj as bJ,vmt as bK,gmt as bL,bmt as bM,F_e as bN,ymt as bO,xmt as bP,D_e as bQ,P_e as bR,Omt as bS,j$ as bT,xpt as bU,mpt as bV,wht as bW,_mt as bX,_pt as bY,Fpt as bZ,WNe as b_,Wft as ba,jft as bb,Wdt as bc,Idt as bd,Bdt as be,zdt as bf,Udt as bg,Vdt as bh,Kdt as bi,jdt as bj,qdt as bk,Bne as bl,ght as bm,_ht as bn,vht as bo,xht as bp,bpt as bq,Rpt as br,vpt as bs,i0t as bt,a0t as bu,pYe as bv,Cdt as bw,fmt as bx,Spt as by,gpt as bz,tht as c,fht as c$,Jdt as c0,fg as c1,_dt as c2,Z0 as c3,Yft as c4,Gft as c5,Dft as c6,Fft as c7,Ti as c8,Hft as c9,Bft as cA,Noe as cB,Moe as cC,wdt as cD,Sdt as cE,f7 as cF,d$e as cG,ydt as cH,na as cI,Nft as cJ,vdt as cK,gdt as cL,hdt as cM,gN as cN,i5e as cO,Wue as cP,Qft as cQ,mdt as cR,v2 as cS,pdt as cT,dy as cU,xdt as cV,GCe as cW,oCe as cX,bdt as cY,Odt as cZ,Vft as c_,rb as ca,Kft as cb,$N as cc,H0 as cd,zie as ce,tDe as cf,Mft as cg,rdt as ch,Rft as ci,sCe as cj,udt as ck,Ift as cl,zft as cm,Uft as cn,kft as co,adt as cp,ldt as cq,RPe as cr,odt as cs,K_ as ct,Aft as cu,sdt as cv,cdt as cw,DPe as cx,kPe as cy,Lft as cz,Gdt as d,cOe as d$,dht as d0,hht as d1,Sy as d2,B2 as d3,aa as d4,fc as d5,iu as d6,m9 as d7,SFe as d8,ah as d9,s0t as dA,f0t as dB,hN as dC,w0t as dD,p0t as dE,S0t as dF,_0t as dG,x0t as dH,O0t as dI,b0t as dJ,y0t as dK,fXe as dL,z0t as dM,Q0t as dN,B0t as dO,Z0t as dP,I0t as dQ,KX as dR,L0t as dS,N0t as dT,zS as dU,M0t as dV,j0t as dW,V0t as dX,U0t as dY,W0t as dZ,Jz as d_,TFe as da,pht as db,Qpt as dc,Bpt as dd,Eve as de,ABe as df,zpt as dg,qpt as dh,Ia as di,DN as dj,og as dk,oh as dl,jpt as dm,nf as dn,Kpt as dp,Hpt as dq,Vpt as dr,Gpt as ds,lht as dt,Ypt as du,h0t as dv,d0t as dw,o0t as dx,u0t as dy,l0t as dz,F6e as e,NJe as e0,q0t as e1,K0t as e2,m0t as e3,cXe as e4,A0t as e5,F0t as e6,T0t as e7,k0t as e8,R0t as e9,Sft as eA,P0t as ea,Pbe as eb,D0t as ec,v0t as ed,g0t as ee,E0t as ef,C0t as eg,$0t as eh,cQ as ei,H0t as ej,G0t as ek,Y0t as el,X0t as em,J0t as en,rmt as eo,tmt as ep,imt as eq,nmt as er,emt as es,amt as et,Ldt as eu,Zpt as ev,Ept as ew,wpt as ex,Tpt as ey,tLe as ez,$6e as f,rht as g,Ydt as h,Xdt as i,xft as j,iht as k,_ft as l,kdt as m,Tdt as n,wft as o,Adt as p,sht as q,F as r,UZ as s,LAe as t,Edt as u,oht as v,$dt as w,Pdt as x,b9 as y,kce as z};
|
|
911
|
+
`},Klt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Hlt(e){let{announcements:t=Klt,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=Zlt}=e;const{announce:a,announcement:o}=Vlt(),s=Mw("DndLiveRegion"),[u,l]=F.useState(!1);if(F.useEffect(()=>{l(!0)},[]),jlt(F.useMemo(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:h}=f;t.onDragMove&&a(t.onDragMove({active:d,over:h}))},onDragOver(f){let{active:d,over:h}=f;a(t.onDragOver({active:d,over:h}))},onDragEnd(f){let{active:d,over:h}=f;a(t.onDragEnd({active:d,over:h}))},onDragCancel(f){let{active:d,over:h}=f;a(t.onDragCancel({active:d,over:h}))}}),[a,t])),!u)return null;const c=Ce.createElement(Ce.Fragment,null,Ce.createElement(qlt,{id:n,value:i.draggable}),Ce.createElement(Ult,{id:s,announcement:o}));return r?sc.createPortal(c,r):c}var os;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(os||(os={}));function W$(){}function gmt(e,t){return F.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function vmt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return F.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const uh=Object.freeze({x:0,y:0});function Glt(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ylt(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function Xlt(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function dne(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function b_e(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}const Jlt=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=dne(t),a=[];for(const o of n){const{id:s}=o,u=r.get(s);if(u){const l=dne(u),c=i.reduce((d,h,g)=>d+Glt(l[g],h),0),f=Number((c/4).toFixed(4));a.push({id:s,data:{droppableContainer:o,value:f}})}}return a.sort(Ylt)};function ect(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-n,s=a-r;if(n<i&&r<a){const u=t.width*t.height,l=e.width*e.height,c=o*s,f=c/(u+l-c);return Number(f.toFixed(4))}return 0}const tct=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const a of n){const{id:o}=a,s=r.get(o);if(s){const u=ect(s,t);u>0&&i.push({id:o,data:{droppableContainer:a,value:u}})}}return i.sort(Xlt)};function rct(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function O_e(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:uh}function nct(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((o,s)=>({...o,top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),{...r})}}const ict=nct(1);function act(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function oct(e,t,r){const n=act(t);if(!n)return e;const{scaleX:i,scaleY:a,x:o,y:s}=n,u=e.left-o-(1-i)*parseFloat(r),l=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:c,height:f,top:l,right:u+c,bottom:l+f,left:u}}const sct={ignoreTransform:!1};function zO(e,t){t===void 0&&(t=sct);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:c}=yc(e).getComputedStyle(e);l&&(r=oct(r,l,c))}const{top:n,left:i,width:a,height:o,bottom:s,right:u}=r;return{top:n,left:i,width:a,height:o,bottom:s,right:u}}function hne(e){return zO(e,{ignoreTransform:!0})}function uct(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function lct(e,t){return t===void 0&&(t=yc(e).getComputedStyle(e)),t.position==="fixed"}function cct(e,t){t===void 0&&(t=yc(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?r.test(a):!1})}function iD(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(NQ(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Fw(i)||g_e(i)||r.includes(i))return r;const a=yc(e).getComputedStyle(i);return i!==e&&cct(i,a)&&r.push(i),lct(i,a)?r:n(i.parentNode)}return e?n(e):r}function x_e(e){const[t]=iD(e,1);return t??null}function JI(e){return!nD||!e?null:NO(e)?e:MQ(e)?NQ(e)||e===LO(e).scrollingElement?window:Fw(e)?e:null:null}function __e(e){return NO(e)?e.scrollX:e.scrollLeft}function S_e(e){return NO(e)?e.scrollY:e.scrollTop}function QM(e){return{x:__e(e),y:S_e(e)}}var ws;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ws||(ws={}));function w_e(e){return!nD||!e?!1:e===document.scrollingElement}function E_e(e){const t={x:0,y:0},r=w_e(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:a,isBottom:o,isRight:s,maxScroll:n,minScroll:t}}const fct={x:.2,y:.2};function dct(e,t,r,n,i){let{top:a,left:o,right:s,bottom:u}=r;n===void 0&&(n=10),i===void 0&&(i=fct);const{isTop:l,isBottom:c,isLeft:f,isRight:d}=E_e(e),h={x:0,y:0},g={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+m.height?(h.y=ws.Backward,g.y=n*Math.abs((t.top+m.height-a)/m.height)):!c&&u>=t.bottom-m.height&&(h.y=ws.Forward,g.y=n*Math.abs((t.bottom-m.height-u)/m.height)),!d&&s>=t.right-m.width?(h.x=ws.Forward,g.x=n*Math.abs((t.right-m.width-s)/m.width)):!f&&o<=t.left+m.width&&(h.x=ws.Backward,g.x=n*Math.abs((t.left+m.width-o)/m.width)),{direction:h,speed:g}}function hct(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function $_e(e){return e.reduce((t,r)=>Mb(t,QM(r)),uh)}function pct(e){return e.reduce((t,r)=>t+__e(r),0)}function mct(e){return e.reduce((t,r)=>t+S_e(r),0)}function gct(e,t){if(t===void 0&&(t=zO),!e)return;const{top:r,left:n,bottom:i,right:a}=t(e);x_e(e)&&(i<=0||a<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const vct=[["x",["left","right"],pct],["y",["top","bottom"],mct]];class QQ{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=iD(r),i=$_e(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,o,s]of vct)for(const u of o)Object.defineProperty(this,u,{get:()=>{const l=s(n),c=i[a]-l;return this.rect[u]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class z_{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function yct(e){const{EventTarget:t}=yc(e);return e instanceof t?e:LO(e)}function e7(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Ff;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ff||(Ff={}));function pne(e){e.preventDefault()}function bct(e){e.stopPropagation()}var Jn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Jn||(Jn={}));const C_e={start:[Jn.Space,Jn.Enter],cancel:[Jn.Esc],end:[Jn.Space,Jn.Enter]},Oct=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Jn.Right:return{...r,x:r.x+25};case Jn.Left:return{...r,x:r.x-25};case Jn.Down:return{...r,y:r.y+25};case Jn.Up:return{...r,y:r.y-25}}};class D_e{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new z_(LO(r)),this.windowListeners=new z_(yc(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ff.Resize,this.handleCancel),this.windowListeners.add(Ff.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ff.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&gct(n),r(uh)}handleKeyDown(t){if(zQ(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:a=C_e,coordinateGetter:o=Oct,scrollBehavior:s="smooth"}=i,{code:u}=t;if(a.end.includes(u)){this.handleEnd(t);return}if(a.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:uh;this.referenceCoordinates||(this.referenceCoordinates=c);const f=o(t,{active:r,context:n.current,currentCoordinates:c});if(f){const d=ZS(f,c),h={x:0,y:0},{scrollableAncestors:g}=n.current;for(const m of g){const v=t.code,{isTop:y,isRight:O,isLeft:_,isBottom:C,maxScroll:$,minScroll:w}=E_e(m),P=hct(m),k={x:Math.min(v===Jn.Right?P.right-P.width/2:P.right,Math.max(v===Jn.Right?P.left:P.left+P.width/2,f.x)),y:Math.min(v===Jn.Down?P.bottom-P.height/2:P.bottom,Math.max(v===Jn.Down?P.top:P.top+P.height/2,f.y))},N=v===Jn.Right&&!O||v===Jn.Left&&!_,L=v===Jn.Down&&!C||v===Jn.Up&&!y;if(N&&k.x!==f.x){const Q=m.scrollLeft+d.x,B=v===Jn.Right&&Q<=$.x||v===Jn.Left&&Q>=w.x;if(B&&!d.y){m.scrollTo({left:Q,behavior:s});return}B?h.x=m.scrollLeft-Q:h.x=v===Jn.Right?m.scrollLeft-$.x:m.scrollLeft-w.x,h.x&&m.scrollBy({left:-h.x,behavior:s});break}else if(L&&k.y!==f.y){const Q=m.scrollTop+d.y,B=v===Jn.Down&&Q<=$.y||v===Jn.Up&&Q>=w.y;if(B&&!d.x){m.scrollTo({top:Q,behavior:s});return}B?h.y=m.scrollTop-Q:h.y=v===Jn.Down?m.scrollTop-$.y:m.scrollTop-w.y,h.y&&m.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Mb(ZS(f,this.referenceCoordinates),h))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}D_e.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=C_e,onActivation:i}=t,{active:a}=r;const{code:o}=e.nativeEvent;if(n.start.includes(o)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function mne(e){return!!(e&&"distance"in e)}function gne(e){return!!(e&&"delay"in e)}class BQ{constructor(t,r,n){var i;n===void 0&&(n=yct(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:o}=a;this.props=t,this.events=r,this.document=LO(o),this.documentListeners=new z_(this.document),this.listeners=new z_(n),this.windowListeners=new z_(yc(o)),this.initialCoordinates=(i=zM(a))!=null?i:uh,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Ff.Resize,this.handleCancel),this.windowListeners.add(Ff.DragStart,pne),this.windowListeners.add(Ff.VisibilityChange,this.handleCancel),this.windowListeners.add(Ff.ContextMenu,pne),this.documentListeners.add(Ff.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gne(r)){this.timeoutId=setTimeout(this.handleStart,r.delay);return}if(mne(r))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ff.Click,bct,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ff.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:a}=this,{onMove:o,options:{activationConstraint:s}}=a;if(!i)return;const u=(r=zM(t))!=null?r:uh,l=ZS(i,u);if(!n&&s){if(mne(s)){if(s.tolerance!=null&&e7(l,s.tolerance))return this.handleCancel();if(e7(l,s.distance))return this.handleStart()}return gne(s)&&e7(l,s.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),o(u)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Jn.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const xct={move:{name:"pointermove"},end:{name:"pointerup"}};class P_e extends BQ{constructor(t){const{event:r}=t,n=LO(r.target);super(t,xct,n)}}P_e.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const _ct={move:{name:"mousemove"},end:{name:"mouseup"}};var BM;(function(e){e[e.RightClick=2]="RightClick"})(BM||(BM={}));class Sct extends BQ{constructor(t){super(t,_ct,LO(t.event.target))}}Sct.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===BM.RightClick?!1:(n==null||n({event:r}),!0)}}];const t7={move:{name:"touchmove"},end:{name:"touchend"}};class wct extends BQ{constructor(t){super(t,t7)}static setup(){return window.addEventListener(t7.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(t7.move.name,t)};function t(){}}}wct.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n==null||n({event:r}),!0)}}];var Q_;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Q_||(Q_={}));var Z$;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Z$||(Z$={}));function Ect(e){let{acceleration:t,activator:r=Q_.Pointer,canScroll:n,draggingRect:i,enabled:a,interval:o=5,order:s=Z$.TreeOrder,pointerCoordinates:u,scrollableAncestors:l,scrollableAncestorRects:c,delta:f,threshold:d}=e;const h=Cct({delta:f,disabled:!a}),[g,m]=Nlt(),v=F.useRef({x:0,y:0}),y=F.useRef({x:0,y:0}),O=F.useMemo(()=>{switch(r){case Q_.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Q_.DraggableRect:return i}},[r,i,u]),_=F.useRef(null),C=F.useCallback(()=>{const w=_.current;if(!w)return;const P=v.current.x*y.current.x,k=v.current.y*y.current.y;w.scrollBy(P,k)},[]),$=F.useMemo(()=>s===Z$.TreeOrder?[...l].reverse():l,[s,l]);F.useEffect(()=>{if(!a||!l.length||!O){m();return}for(const w of $){if((n==null?void 0:n(w))===!1)continue;const P=l.indexOf(w),k=c[P];if(!k)continue;const{direction:N,speed:L}=dct(w,k,O,t,d);for(const Q of["x","y"])h[Q][N[Q]]||(L[Q]=0,N[Q]=0);if(L.x>0||L.y>0){m(),_.current=w,g(C,o),v.current=L,y.current=N;return}}v.current={x:0,y:0},y.current={x:0,y:0},m()},[t,C,n,m,a,o,JSON.stringify(O),JSON.stringify(h),g,l,$,c,JSON.stringify(d)])}const $ct={x:{[ws.Backward]:!1,[ws.Forward]:!1},y:{[ws.Backward]:!1,[ws.Forward]:!1}};function Cct(e){let{delta:t,disabled:r}=e;const n=LM(t);return Iw(i=>{if(r||!n||!i)return $ct;const a={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[ws.Backward]:i.x[ws.Backward]||a.x===-1,[ws.Forward]:i.x[ws.Forward]||a.x===1},y:{[ws.Backward]:i.y[ws.Backward]||a.y===-1,[ws.Forward]:i.y[ws.Forward]||a.y===1}}},[r,t,n])}function Dct(e,t){const r=t!==null?e.get(t):void 0,n=r?r.node.current:null;return Iw(i=>{var a;return t===null?null:(a=n??i)!=null?a:null},[n,t])}function Pct(e,t){return F.useMemo(()=>e.reduce((r,n)=>{const{sensor:i}=n,a=i.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,n)}));return[...r,...a]},[]),[e,t])}var KS;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(KS||(KS={}));var qM;(function(e){e.Optimized="optimized"})(qM||(qM={}));const vne=new Map;function Rct(e,t){let{dragging:r,dependencies:n,config:i}=t;const[a,o]=F.useState(null),{frequency:s,measure:u,strategy:l}=i,c=F.useRef(e),f=v(),d=WS(f),h=F.useCallback(function(y){y===void 0&&(y=[]),!d.current&&o(O=>O===null?y:O.concat(y.filter(_=>!O.includes(_))))},[d]),g=F.useRef(null),m=Iw(y=>{if(f&&!r)return vne;if(!y||y===vne||c.current!==e||a!=null){const O=new Map;for(let _ of e){if(!_)continue;if(a&&a.length>0&&!a.includes(_.id)&&_.rect.current){O.set(_.id,_.rect.current);continue}const C=_.node.current,$=C?new QQ(u(C),C):null;_.rect.current=$,$&&O.set(_.id,$)}return O}return y},[e,a,r,f,u]);return F.useEffect(()=>{c.current=e},[e]),F.useEffect(()=>{f||h()},[r,f]),F.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),F.useEffect(()=>{f||typeof s!="number"||g.current!==null||(g.current=setTimeout(()=>{h(),g.current=null},s))},[s,f,h,...n]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:a!=null};function v(){switch(l){case KS.Always:return!1;case KS.BeforeDragging:return r;default:return!r}}}function R_e(e,t){return Iw(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function kct(e,t){return R_e(e,t)}function Tct(e){let{callback:t,disabled:r}=e;const n=LQ(t),i=F.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(n)},[n,r]);return F.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function aD(e){let{callback:t,disabled:r}=e;const n=LQ(t),i=F.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(n)},[r]);return F.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Act(e){return new QQ(zO(e),e)}function yne(e,t,r){t===void 0&&(t=Act);const[n,i]=F.useReducer(s,null),a=Tct({callback(u){if(e)for(const l of u){const{type:c,target:f}=l;if(c==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),o=aD({callback:i});return sh(()=>{i(),e?(o==null||o.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(o==null||o.disconnect(),a==null||a.disconnect())},[e]),n;function s(u){if(!e)return null;if(e.isConnected===!1){var l;return(l=u??r)!=null?l:null}const c=t(e);return JSON.stringify(u)===JSON.stringify(c)?u:c}}function Fct(e){const t=R_e(e);return O_e(e,t)}const bne=[];function Ict(e){const t=F.useRef(e),r=Iw(n=>e?n&&n!==bne&&e&&t.current&&e.parentNode===t.current.parentNode?n:iD(e):bne,[e]);return F.useEffect(()=>{t.current=e},[e]),r}function Mct(e){const[t,r]=F.useState(null),n=F.useRef(e),i=F.useCallback(a=>{const o=JI(a.target);o&&r(s=>s?(s.set(o,QM(o)),new Map(s)):null)},[]);return F.useEffect(()=>{const a=n.current;if(e!==a){o(a);const s=e.map(u=>{const l=JI(u);return l?(l.addEventListener("scroll",i,{passive:!0}),[l,QM(l)]):null}).filter(u=>u!=null);r(s.length?new Map(s):null),n.current=e}return()=>{o(e),o(a)};function o(s){s.forEach(u=>{const l=JI(u);l==null||l.removeEventListener("scroll",i)})}},[i,e]),F.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>Mb(a,o),uh):$_e(e):uh,[e,t])}function One(e,t){t===void 0&&(t=[]);const r=F.useRef(null);return F.useEffect(()=>{r.current=null},t),F.useEffect(()=>{const n=e!==uh;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?ZS(e,r.current):uh}function Nct(e){F.useEffect(()=>{if(!nD)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function Lct(e,t){return F.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:a}=n;return r[i]=o=>{a(o,t)},r},{}),[e,t])}function k_e(e){return F.useMemo(()=>e?uct(e):null,[e])}const r7=[];function zct(e,t){t===void 0&&(t=zO);const[r]=e,n=k_e(r?yc(r):null),[i,a]=F.useReducer(s,r7),o=aD({callback:a});return e.length>0&&i===r7&&a(),sh(()=>{e.length?e.forEach(u=>o==null?void 0:o.observe(u)):(o==null||o.disconnect(),a())},[e]),i;function s(){return e.length?e.map(u=>w_e(u)?n:new QQ(t(u),u)):r7}}function Qct(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Fw(t)?t:e}function Bct(e){let{measure:t}=e;const[r,n]=F.useState(null),i=F.useCallback(l=>{for(const{target:c}of l)if(Fw(c)){n(f=>{const d=t(c);return f?{...f,width:d.width,height:d.height}:d});break}},[t]),a=aD({callback:i}),o=F.useCallback(l=>{const c=Qct(l);a==null||a.disconnect(),c&&(a==null||a.observe(c)),n(c?t(c):null)},[t,a]),[s,u]=V$(o);return F.useMemo(()=>({nodeRef:s,rect:r,setRef:u}),[r,s,u])}const qct=[{sensor:P_e,options:{}},{sensor:D_e,options:{}}],Uct={current:{}},J3={draggable:{measure:hne},droppable:{measure:hne,strategy:KS.WhileDragging,frequency:qM.Optimized},dragOverlay:{measure:zO}};class B_ extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const Vct={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new B_,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:W$},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:J3,measureDroppableContainers:W$,windowRect:null,measuringScheduled:!1},jct={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:W$,draggableNodes:new Map,over:null,measureDroppableContainers:W$},oD=F.createContext(jct),T_e=F.createContext(Vct);function Wct(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new B_}}}function Zct(e,t){switch(t.type){case os.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case os.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case os.DragEnd:case os.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case os.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new B_(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case os.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;const o=new B_(e.droppable.containers);return o.set(r,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case os.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const a=new B_(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Kct(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=F.useContext(oD),a=LM(n),o=LM(r==null?void 0:r.id);return F.useEffect(()=>{if(!t&&!n&&a&&o!=null){if(!zQ(a)||document.activeElement===a.target)return;const s=i.get(o);if(!s)return;const{activatorNode:u,node:l}=s;if(!u.current&&!l.current)return;requestAnimationFrame(()=>{for(const c of[u.current,l.current]){if(!c)continue;const f=Qlt(c);if(f){f.focus();break}}})}},[n,t,i,o,a]),null}function Hct(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...n}),r):r}function Gct(e){return F.useMemo(()=>({draggable:{...J3.draggable,...e==null?void 0:e.draggable},droppable:{...J3.droppable,...e==null?void 0:e.droppable},dragOverlay:{...J3.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Yct(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const a=F.useRef(!1),{x:o,y:s}=typeof i=="boolean"?{x:i,y:i}:i;sh(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!n)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const c=r(l),f=O_e(c,n);if(o||(f.x=0),s||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const d=x_e(l);d&&d.scrollBy({top:f.y,left:f.x})}},[t,o,s,n,r])}const A_e=F.createContext({...uh,scaleX:1,scaleY:1});var jm;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(jm||(jm={}));const ymt=F.memo(function(t){var r,n,i,a;let{id:o,accessibility:s,autoScroll:u=!0,children:l,sensors:c=qct,collisionDetection:f=tct,measuring:d,modifiers:h,...g}=t;const m=F.useReducer(Zct,void 0,Wct),[v,y]=m,[O,_]=Wlt(),[C,$]=F.useState(jm.Uninitialized),w=C===jm.Initialized,{draggable:{active:P,nodes:k,translate:N},droppable:{containers:L}}=v,Q=P?k.get(P):null,B=F.useRef({initial:null,translated:null}),I=F.useMemo(()=>{var Pt;return P!=null?{id:P,data:(Pt=Q==null?void 0:Q.data)!=null?Pt:Uct,rect:B}:null},[P,Q]),K=F.useRef(null),[T,z]=F.useState(null),[q,U]=F.useState(null),V=WS(g,Object.values(g)),A=Mw("DndDescribedBy",o),M=F.useMemo(()=>L.getEnabled(),[L]),G=Gct(d),{droppableRects:W,measureDroppableContainers:re,measuringScheduled:ie}=Rct(M,{dragging:w,dependencies:[N.x,N.y],config:G.droppable}),oe=Dct(k,P),be=F.useMemo(()=>q?zM(q):null,[q]),me=kt(),Oe=kct(oe,G.draggable.measure);Yct({activeNode:P?k.get(P):null,config:me.layoutShiftCompensation,initialRect:Oe,measure:G.draggable.measure});const xe=yne(oe,G.draggable.measure,Oe),he=yne(oe?oe.parentElement:null),ne=F.useRef({activatorEvent:null,active:null,activeNode:oe,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ae=L.getNodeFor((r=ne.current.over)==null?void 0:r.id),X=Bct({measure:G.dragOverlay.measure}),te=(n=X.nodeRef.current)!=null?n:oe,de=w?(i=X.rect)!=null?i:xe:null,pe=!!(X.nodeRef.current&&X.rect),Se=Fct(pe?null:xe),$e=k_e(te?yc(te):null),ge=Ict(w?ae??oe:null),Ee=zct(ge),Re=Hct(h,{transform:{x:N.x-Se.x,y:N.y-Se.y,scaleX:1,scaleY:1},activatorEvent:q,active:I,activeNodeRect:xe,containerNodeRect:he,draggingNodeRect:de,over:ne.current.over,overlayNodeRect:X.rect,scrollableAncestors:ge,scrollableAncestorRects:Ee,windowRect:$e}),Fe=be?Mb(be,N):null,Ue=Mct(ge),ze=One(Ue),Te=One(Ue,[xe]),Be=Mb(Re,ze),et=de?ict(de,Re):null,pt=I&&et?f({active:I,collisionRect:et,droppableRects:W,droppableContainers:M,pointerCoordinates:Fe}):null,St=b_e(pt,"id"),[ft,Ft]=F.useState(null),Bt=pe?Re:Mb(Re,Te),Vt=rct(Bt,(a=ft==null?void 0:ft.rect)!=null?a:null,xe),Le=F.useCallback((Pt,zt)=>{let{sensor:ar,options:vr}=zt;if(K.current==null)return;const Tr=k.get(K.current);if(!Tr)return;const Rn=Pt.nativeEvent,kn=new ar({active:K.current,activeNode:Tr,event:Rn,options:vr,context:ne,onStart(Ze){const tt=K.current;if(tt==null)return;const lt=k.get(tt);if(!lt)return;const{onDragStart:_t}=V.current,jt={active:{id:tt,data:lt.data,rect:B}};sc.unstable_batchedUpdates(()=>{_t==null||_t(jt),$(jm.Initializing),y({type:os.DragStart,initialCoordinates:Ze,active:tt}),O({type:"onDragStart",event:jt})})},onMove(Ze){y({type:os.DragMove,coordinates:Ze})},onEnd:Qe(os.DragEnd),onCancel:Qe(os.DragCancel)});sc.unstable_batchedUpdates(()=>{z(kn),U(Pt.nativeEvent)});function Qe(Ze){return async function(){const{active:lt,collisions:_t,over:jt,scrollAdjustedTranslate:Jt}=ne.current;let Tt=null;if(lt&&Jt){const{cancelDrop:Ht}=V.current;Tt={activatorEvent:Rn,active:lt,collisions:_t,delta:Jt,over:jt},Ze===os.DragEnd&&typeof Ht=="function"&&await Promise.resolve(Ht(Tt))&&(Ze=os.DragCancel)}K.current=null,sc.unstable_batchedUpdates(()=>{y({type:Ze}),$(jm.Uninitialized),Ft(null),z(null),U(null);const Ht=Ze===os.DragEnd?"onDragEnd":"onDragCancel";if(Tt){const or=V.current[Ht];or==null||or(Tt),O({type:Ht,event:Tt})}})}}},[k]),Ye=F.useCallback((Pt,zt)=>(ar,vr)=>{const Tr=ar.nativeEvent,Rn=k.get(vr);if(K.current!==null||!Rn||Tr.dndKit||Tr.defaultPrevented)return;const kn={active:Rn};Pt(ar,zt.options,kn)===!0&&(Tr.dndKit={capturedBy:zt.sensor},K.current=vr,Le(ar,zt))},[k,Le]),mt=Pct(c,Ye);Nct(c),sh(()=>{xe&&C===jm.Initializing&&$(jm.Initialized)},[xe,C]),F.useEffect(()=>{const{onDragMove:Pt}=V.current,{active:zt,activatorEvent:ar,collisions:vr,over:Tr}=ne.current;if(!zt||!ar)return;const Rn={active:zt,activatorEvent:ar,collisions:vr,delta:{x:Be.x,y:Be.y},over:Tr};sc.unstable_batchedUpdates(()=>{Pt==null||Pt(Rn),O({type:"onDragMove",event:Rn})})},[Be.x,Be.y]),F.useEffect(()=>{const{active:Pt,activatorEvent:zt,collisions:ar,droppableContainers:vr,scrollAdjustedTranslate:Tr}=ne.current;if(!Pt||K.current==null||!zt||!Tr)return;const{onDragOver:Rn}=V.current,kn=vr.get(St),Qe=kn&&kn.rect.current?{id:kn.id,rect:kn.rect.current,data:kn.data,disabled:kn.disabled}:null,Ze={active:Pt,activatorEvent:zt,collisions:ar,delta:{x:Tr.x,y:Tr.y},over:Qe};sc.unstable_batchedUpdates(()=>{Ft(Qe),Rn==null||Rn(Ze),O({type:"onDragOver",event:Ze})})},[St]),sh(()=>{ne.current={activatorEvent:q,active:I,activeNode:oe,collisionRect:et,collisions:pt,droppableRects:W,draggableNodes:k,draggingNode:te,draggingNodeRect:de,droppableContainers:L,over:ft,scrollableAncestors:ge,scrollAdjustedTranslate:Be},B.current={initial:de,translated:et}},[I,oe,pt,et,k,te,de,W,L,ft,ge,Be]),Ect({...me,delta:N,draggingRect:et,pointerCoordinates:Fe,scrollableAncestors:ge,scrollableAncestorRects:Ee});const xt=F.useMemo(()=>({active:I,activeNode:oe,activeNodeRect:xe,activatorEvent:q,collisions:pt,containerNodeRect:he,dragOverlay:X,draggableNodes:k,droppableContainers:L,droppableRects:W,over:ft,measureDroppableContainers:re,scrollableAncestors:ge,scrollableAncestorRects:Ee,measuringConfiguration:G,measuringScheduled:ie,windowRect:$e}),[I,oe,xe,q,pt,he,X,k,L,W,ft,re,ge,Ee,G,ie,$e]),Ct=F.useMemo(()=>({activatorEvent:q,activators:mt,active:I,activeNodeRect:xe,ariaDescribedById:{draggable:A},dispatch:y,draggableNodes:k,over:ft,measureDroppableContainers:re}),[q,mt,I,xe,y,A,k,ft,re]);return Ce.createElement(y_e.Provider,{value:_},Ce.createElement(oD.Provider,{value:Ct},Ce.createElement(T_e.Provider,{value:xt},Ce.createElement(A_e.Provider,{value:Vt},l)),Ce.createElement(Kct,{disabled:(s==null?void 0:s.restoreFocus)===!1})),Ce.createElement(Hlt,{...s,hiddenTextDescribedById:A}));function kt(){const Pt=(T==null?void 0:T.autoScrollEnabled)===!1,zt=typeof u=="object"?u.enabled===!1:u===!1,ar=w&&!Pt&&!zt;return typeof u=="object"?{...u,enabled:ar}:{enabled:ar}}}),Xct=F.createContext(null),xne="button",Jct="Droppable";function eft(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const a=Mw(Jct),{activators:o,activatorEvent:s,active:u,activeNodeRect:l,ariaDescribedById:c,draggableNodes:f,over:d}=F.useContext(oD),{role:h=xne,roleDescription:g="draggable",tabIndex:m=0}=i??{},v=(u==null?void 0:u.id)===t,y=F.useContext(v?A_e:Xct),[O,_]=V$(),[C,$]=V$(),w=Lct(o,t),P=WS(r);sh(()=>(f.set(t,{id:t,key:a,node:O,activatorNode:C,data:P}),()=>{const N=f.get(t);N&&N.key===a&&f.delete(t)}),[f,t]);const k=F.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&h===xne?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[n,h,m,v,g,c.draggable]);return{active:u,activatorEvent:s,activeNodeRect:l,attributes:k,isDragging:v,listeners:n?void 0:w,node:O,over:d,setNodeRef:_,setActivatorNodeRef:$,transform:y}}function tft(){return F.useContext(T_e)}const rft="Droppable",nft={timeout:25};function ift(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const a=Mw(rft),{active:o,dispatch:s,over:u,measureDroppableContainers:l}=F.useContext(oD),c=F.useRef({disabled:r}),f=F.useRef(!1),d=F.useRef(null),h=F.useRef(null),{disabled:g,updateMeasurementsFor:m,timeout:v}={...nft,...i},y=WS(m??n),O=F.useCallback(()=>{if(!f.current){f.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{l(Array.isArray(y.current)?y.current:[y.current]),h.current=null},v)},[v]),_=aD({callback:O,disabled:g||!o}),C=F.useCallback((k,N)=>{_&&(N&&(_.unobserve(N),f.current=!1),k&&_.observe(k))},[_]),[$,w]=V$(C),P=WS(t);return F.useEffect(()=>{!_||!$.current||(_.disconnect(),f.current=!1,_.observe($.current))},[$,_]),sh(()=>(s({type:os.RegisterDroppable,element:{id:n,key:a,disabled:r,node:$,rect:d,data:P}}),()=>s({type:os.UnregisterDroppable,key:a,id:n})),[n]),F.useEffect(()=>{r!==c.current.disabled&&(s({type:os.SetDroppableDisabled,id:n,key:a,disabled:r}),c.current.disabled=r)},[n,a,r,s]),{active:o,rect:d,isOver:(u==null?void 0:u.id)===n,node:$,over:u,setNodeRef:w}}function F_e(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function aft(e,t){return e.reduce((r,n,i)=>{const a=t.get(n);return a&&(r[i]=a),r},Array(e.length))}function _3(e){return e!==null&&e>=0}function oft(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function sft(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const I_e=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const a=F_e(t,n,r),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},M_e="Sortable",N_e=Ce.createContext({activeIndex:-1,containerId:M_e,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:I_e,disabled:{draggable:!1,droppable:!1}});function bmt(e){let{children:t,id:r,items:n,strategy:i=I_e,disabled:a=!1}=e;const{active:o,dragOverlay:s,droppableRects:u,over:l,measureDroppableContainers:c}=tft(),f=Mw(M_e,r),d=s.rect!==null,h=F.useMemo(()=>n.map(w=>typeof w=="object"&&"id"in w?w.id:w),[n]),g=o!=null,m=o?h.indexOf(o.id):-1,v=l?h.indexOf(l.id):-1,y=F.useRef(h),O=!oft(h,y.current),_=v!==-1&&m===-1||O,C=sft(a);sh(()=>{O&&g&&c(h)},[O,h,g,c]),F.useEffect(()=>{y.current=h},[h]);const $=F.useMemo(()=>({activeIndex:m,containerId:f,disabled:C,disableTransforms:_,items:h,overIndex:v,useDragOverlay:d,sortedRects:aft(h,u),strategy:i}),[m,f,C.draggable,C.droppable,_,h,v,u,d,i]);return Ce.createElement(N_e.Provider,{value:$},t)}const uft=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return F_e(r,n,i).indexOf(t)},lft=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:u,transition:l}=e;return!l||!n||s!==a&&i===o?!1:r?!0:o!==i&&t===u},cft={duration:200,easing:"ease"},L_e="transform",fft=j$.Transition.toString({property:L_e,duration:0,easing:"linear"}),dft={roleDescription:"sortable"};function hft(e){let{disabled:t,index:r,node:n,rect:i}=e;const[a,o]=F.useState(null),s=F.useRef(r);return sh(()=>{if(!t&&r!==s.current&&n.current){const u=i.current;if(u){const l=zO(n.current,{ignoreTransform:!0}),c={x:u.left-l.left,y:u.top-l.top,scaleX:u.width/l.width,scaleY:u.height/l.height};(c.x||c.y)&&o(c)}}r!==s.current&&(s.current=r)},[t,r,n,i]),F.useEffect(()=>{a&&o(null)},[a]),a}function Omt(e){let{animateLayoutChanges:t=lft,attributes:r,disabled:n,data:i,getNewIndex:a=uft,id:o,strategy:s,resizeObserverConfig:u,transition:l=cft}=e;const{items:c,containerId:f,activeIndex:d,disabled:h,disableTransforms:g,sortedRects:m,overIndex:v,useDragOverlay:y,strategy:O}=F.useContext(N_e),_=pft(n,h),C=c.indexOf(o),$=F.useMemo(()=>({sortable:{containerId:f,index:C,items:c},...i}),[f,i,C,c]),w=F.useMemo(()=>c.slice(c.indexOf(o)),[c,o]),{rect:P,node:k,isOver:N,setNodeRef:L}=ift({id:o,data:$,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...u}}),{active:Q,activatorEvent:B,activeNodeRect:I,attributes:K,setNodeRef:T,listeners:z,isDragging:q,over:U,setActivatorNodeRef:V,transform:A}=eft({id:o,data:$,attributes:{...dft,...r},disabled:_.draggable}),M=Mlt(L,T),G=!!Q,W=G&&!g&&_3(d)&&_3(v),re=!y&&q,ie=re&&W?A:null,be=W?ie??(s??O)({rects:m,activeNodeRect:I,activeIndex:d,overIndex:v,index:C}):null,me=_3(d)&&_3(v)?a({id:o,items:c,activeIndex:d,overIndex:v}):C,Oe=Q==null?void 0:Q.id,xe=F.useRef({activeId:Oe,items:c,newIndex:me,containerId:f}),he=c!==xe.current.items,ne=t({active:Q,containerId:f,isDragging:q,isSorting:G,id:o,index:C,items:c,newIndex:xe.current.newIndex,previousItems:xe.current.items,previousContainerId:xe.current.containerId,transition:l,wasDragging:xe.current.activeId!=null}),ae=hft({disabled:!ne,index:C,node:k,rect:P});return F.useEffect(()=>{G&&xe.current.newIndex!==me&&(xe.current.newIndex=me),f!==xe.current.containerId&&(xe.current.containerId=f),c!==xe.current.items&&(xe.current.items=c)},[G,me,f,c]),F.useEffect(()=>{if(Oe===xe.current.activeId)return;if(Oe&&!xe.current.activeId){xe.current.activeId=Oe;return}const te=setTimeout(()=>{xe.current.activeId=Oe},50);return()=>clearTimeout(te)},[Oe]),{active:Q,activeIndex:d,attributes:K,data:$,rect:P,index:C,newIndex:me,items:c,isOver:N,isSorting:G,isDragging:q,listeners:z,node:k,overIndex:v,over:U,setNodeRef:M,setActivatorNodeRef:V,setDroppableNodeRef:L,setDraggableNodeRef:T,transform:ae??be,transition:X()};function X(){if(ae||he&&xe.current.newIndex===C)return fft;if(!(re&&!zQ(B)||!l)&&(G||ne))return j$.Transition.toString({...l,property:L_e})}}function pft(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function K$(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const mft=[Jn.Down,Jn.Right,Jn.Up,Jn.Left],xmt=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(mft.includes(e.code)){if(e.preventDefault(),!r||!n)return;const u=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const d=i.get(f.id);if(d)switch(e.code){case Jn.Down:n.top<d.top&&u.push(f);break;case Jn.Up:n.top>d.top&&u.push(f);break;case Jn.Left:n.left>d.left&&u.push(f);break;case Jn.Right:n.left<d.left&&u.push(f);break}});const l=Jlt({collisionRect:n,droppableRects:i,droppableContainers:u});let c=b_e(l,"id");if(c===(o==null?void 0:o.id)&&l.length>1&&(c=l[1].id),c!=null){const f=a.get(r.id),d=a.get(c),h=d?i.get(d.id):null,g=d==null?void 0:d.node.current;if(g&&h&&f&&d){const v=iD(g).some((w,P)=>s[P]!==w),y=z_e(f,d),O=gft(f,d),_=v||!y?{x:0,y:0}:{x:O?n.width-h.width:0,y:O?n.height-h.height:0},C={x:h.left,y:h.top};return _.x&&_.y?C:ZS(C,_)}}}};function z_e(e,t){return!K$(e)||!K$(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function gft(e,t){return!K$(e)||!K$(t)||!z_e(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var _ne=Object.prototype.hasOwnProperty;function Sne(e,t,r){for(r of e.keys())if(q_(r,t))return r}function q_(e,t){var r,n,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&q_(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(i=n,i&&typeof i=="object"&&(i=Sne(t,i),!i)||!t.has(i))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(i=n[0],i&&typeof i=="object"&&(i=Sne(t,i),!i)||!q_(n[1],t.get(i)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(_ne.call(e,r)&&++n&&!_ne.call(t,r)||!(r in t)||!q_(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function vft(e){var t=F.useRef(e),r=F.useRef(0);return q_(e,t.current)||(t.current=e,r.current+=1),F.useMemo(function(){return t.current},[r.current])}function _mt(e,t){return F.useEffect(e,vft(t))}export{Za as $,st as A,uht as B,Hdt as C,mht as D,Qge as E,eDe as F,Cpt as G,m9e as H,Kj as I,Yht as J,qft as K,_S as L,Kht as M,Hht as N,Cht as O,Ght as P,Oft as Q,Ce as R,Fht as S,$ht as T,f9e as U,Dht as V,Aht as W,Qht as X,Uht as Y,xp as Z,V9e as _,nht as a,vQe as a$,Tht as a0,Rht as a1,Jht as a2,cpt as a3,upt as a4,lpt as a5,zht as a6,Xht as a7,vMe as a8,aht as a9,spt as aA,rpt as aB,npt as aC,Rdt as aD,tz as aE,RLe as aF,kht as aG,Lpt as aH,Mpt as aI,Ipt as aJ,Apt as aK,Npt as aL,PLe as aM,AL as aN,ypt as aO,Jft as aP,Ddt as aQ,Zft as aR,hmt as aS,pmt as aT,fdt as aU,Xse as aV,ddt as aW,Eht as aX,Dnt as aY,rnt as aZ,dmt as a_,Yge as aa,qht as ab,Bht as ac,Vht as ad,jht as ae,kpt as af,iw as ag,Wht as ah,Zht as ai,Ppt as aj,Pht as ak,$ft as al,ept as am,tpt as an,dpt as ao,fpt as ap,Mht as aq,Lht as ar,Nht as as,Iht as at,K4 as au,Xf as av,ed as aw,ipt as ax,apt as ay,opt as az,_6e as b,k6e as b$,Dpt as b0,oC as b1,X0 as b2,ppt as b3,hpt as b4,Zdt as b5,Qdt as b6,z4 as b7,Ndt as b8,mmt as b9,c0t as bA,eht as bB,Opt as bC,$nt as bD,$pt as bE,yht as bF,bht as bG,Oht as bH,Sht as bI,Uj as bJ,vmt as bK,gmt as bL,bmt as bM,F_e as bN,ymt as bO,xmt as bP,D_e as bQ,P_e as bR,Omt as bS,j$ as bT,xpt as bU,mpt as bV,wht as bW,_mt as bX,_pt as bY,Fpt as bZ,WNe as b_,Wft as ba,jft as bb,Wdt as bc,Idt as bd,Bdt as be,zdt as bf,Udt as bg,Vdt as bh,Kdt as bi,jdt as bj,qdt as bk,Bne as bl,ght as bm,_ht as bn,vht as bo,xht as bp,bpt as bq,Rpt as br,vpt as bs,i0t as bt,a0t as bu,pYe as bv,Cdt as bw,fmt as bx,Spt as by,gpt as bz,tht as c,fht as c$,Jdt as c0,fg as c1,_dt as c2,Z0 as c3,Yft as c4,Gft as c5,Dft as c6,Fft as c7,Ti as c8,Hft as c9,Bft as cA,Noe as cB,Moe as cC,wdt as cD,Sdt as cE,d$e as cF,ydt as cG,f7 as cH,na as cI,Nft as cJ,vdt as cK,gdt as cL,hdt as cM,gN as cN,i5e as cO,Wue as cP,Qft as cQ,mdt as cR,v2 as cS,pdt as cT,dy as cU,xdt as cV,GCe as cW,oCe as cX,bdt as cY,Odt as cZ,Vft as c_,rb as ca,Kft as cb,$N as cc,H0 as cd,zie as ce,tDe as cf,Mft as cg,rdt as ch,Rft as ci,sCe as cj,udt as ck,Ift as cl,zft as cm,Uft as cn,kft as co,adt as cp,ldt as cq,RPe as cr,odt as cs,K_ as ct,Aft as cu,sdt as cv,cdt as cw,DPe as cx,kPe as cy,Lft as cz,Gdt as d,cOe as d$,dht as d0,hht as d1,Sy as d2,B2 as d3,aa as d4,fc as d5,iu as d6,m9 as d7,SFe as d8,ah as d9,s0t as dA,f0t as dB,hN as dC,w0t as dD,p0t as dE,S0t as dF,_0t as dG,x0t as dH,O0t as dI,b0t as dJ,y0t as dK,fXe as dL,z0t as dM,Q0t as dN,B0t as dO,Z0t as dP,I0t as dQ,KX as dR,L0t as dS,N0t as dT,zS as dU,M0t as dV,j0t as dW,V0t as dX,U0t as dY,W0t as dZ,Jz as d_,TFe as da,pht as db,Qpt as dc,Bpt as dd,Eve as de,ABe as df,zpt as dg,qpt as dh,Ia as di,DN as dj,og as dk,oh as dl,jpt as dm,nf as dn,Kpt as dp,Hpt as dq,Vpt as dr,Gpt as ds,lht as dt,Ypt as du,h0t as dv,d0t as dw,o0t as dx,u0t as dy,l0t as dz,F6e as e,NJe as e0,q0t as e1,K0t as e2,m0t as e3,cXe as e4,A0t as e5,F0t as e6,T0t as e7,k0t as e8,R0t as e9,Sft as eA,P0t as ea,Pbe as eb,D0t as ec,v0t as ed,g0t as ee,E0t as ef,C0t as eg,$0t as eh,cQ as ei,H0t as ej,G0t as ek,Y0t as el,X0t as em,J0t as en,rmt as eo,tmt as ep,imt as eq,nmt as er,emt as es,amt as et,Ldt as eu,Zpt as ev,Ept as ew,wpt as ex,Tpt as ey,tLe as ez,$6e as f,rht as g,Ydt as h,Xdt as i,xft as j,iht as k,_ft as l,kdt as m,Tdt as n,wft as o,Adt as p,sht as q,F as r,UZ as s,LAe as t,Edt as u,oht as v,$dt as w,Pdt as x,b9 as y,kce as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as A,R as N,r as x,c1 as Uo,bJ as o,I as L,c2 as bo,c3 as uo,c4 as Ko,c5 as Xo,c6 as Ea,c7 as jo,K as da,c8 as G,c9 as Fa,ca as qo,cb as xa,cc as ga,Z as ba,cd as Jo,ce as Zo,cf as ar,cg as or,ch as rr,ci as vo,cj as er,ck as lr,cl as fo,cm as mo,cn as po,co as Oa,cp as tr,cq as ir,cr,cs as nr,ct as sr,cu as fa,cv as gr,cw as ho,cx as dr,cy as Ga,cz as br,cA as ur,cB as vr,cC as fr,cD as mr,cE as pr,cF as
|
|
1
|
+
import{F as A,R as N,r as x,c1 as Uo,bJ as o,I as L,c2 as bo,c3 as uo,c4 as Ko,c5 as Xo,c6 as Ea,c7 as jo,K as da,c8 as G,c9 as Fa,ca as qo,cb as xa,cc as ga,Z as ba,cd as Jo,ce as Zo,cf as ar,cg as or,ch as rr,ci as vo,cj as er,ck as lr,cl as fo,cm as mo,cn as po,co as Oa,cp as tr,cq as ir,cr,cs as nr,ct as sr,cu as fa,cv as gr,cw as ho,cx as dr,cy as Ga,cz as br,cA as ur,cB as vr,cC as fr,cD as mr,cE as pr,cF as hr,cG as yr,cH as yo,cI as xr,cJ as wr,cK as Ar,cL as Cr,cM as zr,cN as Sr,cO as kr,cP as Br,cQ as $a,cR as Pr,cS as Rr,cT as Ir,cU as Da,cV as Nr,cW as Lr,cX as Er,cY as Fr,cZ as Or,c_ as Ya,bb as Ua}from"./vendor-DCZoBorz.js";function Ka(a,r){(r==null||r>a.length)&&(r=a.length);for(var e=0,l=Array(r);e<r;e++)l[e]=a[e];return l}function xo(a,r){var e=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(e)return(e=e.call(a)).next.bind(e);if(Array.isArray(a)||(e=Mr(a))||r){e&&(a=e);var l=0;return function(){return l>=a.length?{done:!0}:{done:!1,value:a[l++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(){return m=Object.assign?Object.assign.bind():function(a){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var l in e)({}).hasOwnProperty.call(e,l)&&(a[l]=e[l])}return a},m.apply(null,arguments)}function Dr(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,Na(a,r)}function Tr(a){if(a==null)throw new TypeError("Cannot destructure "+a)}function D(a,r){if(a==null)return{};var e={};for(var l in a)if({}.hasOwnProperty.call(a,l)){if(r.includes(l))continue;e[l]=a[l]}return e}function Ia(){Ia=function(){return r};var a,r={},e=Object.prototype,l=e.hasOwnProperty,t=Object.defineProperty||function(v,u,h){v[u]=h.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",n=i.asyncIterator||"@@asyncIterator",g=i.toStringTag||"@@toStringTag";function c(v,u,h){return Object.defineProperty(v,u,{value:h,enumerable:!0,configurable:!0,writable:!0}),v[u]}try{c({},"")}catch{c=function(u,h,k){return u[h]=k}}function d(v,u,h,k){var z=u&&u.prototype instanceof P?u:P,E=Object.create(z.prototype),T=new oa(k||[]);return t(E,"_invoke",{value:Y(v,h,T)}),E}function b(v,u,h){try{return{type:"normal",arg:v.call(u,h)}}catch(k){return{type:"throw",arg:k}}}r.wrap=d;var f="suspendedStart",y="suspendedYield",p="executing",S="completed",w={};function P(){}function B(){}function C(){}var R={};c(R,s,function(){return this});var F=Object.getPrototypeOf,H=F&&F(F(V([])));H&&H!==e&&l.call(H,s)&&(R=H);var M=C.prototype=P.prototype=Object.create(R);function W(v){["next","throw","return"].forEach(function(u){c(v,u,function(h){return this._invoke(u,h)})})}function Q(v,u){function h(z,E,T,_){var K=b(v[z],v,E);if(K.type!=="throw"){var ta=K.arg,va=ta.value;return va&&typeof va=="object"&&l.call(va,"__await")?u.resolve(va.__await).then(function(ia){h("next",ia,T,_)},function(ia){h("throw",ia,T,_)}):u.resolve(va).then(function(ia){ta.value=ia,T(ta)},function(ia){return h("throw",ia,T,_)})}_(K.arg)}var k;t(this,"_invoke",{value:function(z,E){function T(){return new u(function(_,K){h(z,E,_,K)})}return k=k?k.then(T,T):T()}})}function Y(v,u,h){var k=f;return function(z,E){if(k===p)throw Error("Generator is already running");if(k===S){if(z==="throw")throw E;return{value:a,done:!0}}for(h.method=z,h.arg=E;;){var T=h.delegate;if(T){var _=U(T,h);if(_){if(_===w)continue;return _}}if(h.method==="next")h.sent=h._sent=h.arg;else if(h.method==="throw"){if(k===f)throw k=S,h.arg;h.dispatchException(h.arg)}else h.method==="return"&&h.abrupt("return",h.arg);k=p;var K=b(v,u,h);if(K.type==="normal"){if(k=h.done?S:y,K.arg===w)continue;return{value:K.arg,done:h.done}}K.type==="throw"&&(k=S,h.method="throw",h.arg=K.arg)}}}function U(v,u){var h=u.method,k=v.iterator[h];if(k===a)return u.delegate=null,h==="throw"&&v.iterator.return&&(u.method="return",u.arg=a,U(v,u),u.method==="throw")||h!=="return"&&(u.method="throw",u.arg=new TypeError("The iterator does not provide a '"+h+"' method")),w;var z=b(k,v.iterator,u.arg);if(z.type==="throw")return u.method="throw",u.arg=z.arg,u.delegate=null,w;var E=z.arg;return E?E.done?(u[v.resultName]=E.value,u.next=v.nextLoc,u.method!=="return"&&(u.method="next",u.arg=a),u.delegate=null,w):E:(u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,w)}function Z(v){var u={tryLoc:v[0]};1 in v&&(u.catchLoc=v[1]),2 in v&&(u.finallyLoc=v[2],u.afterLoc=v[3]),this.tryEntries.push(u)}function j(v){var u=v.completion||{};u.type="normal",delete u.arg,v.completion=u}function oa(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(Z,this),this.reset(!0)}function V(v){if(v||v===""){var u=v[s];if(u)return u.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var h=-1,k=function z(){for(;++h<v.length;)if(l.call(v,h))return z.value=v[h],z.done=!1,z;return z.value=a,z.done=!0,z};return k.next=k}}throw new TypeError(typeof v+" is not iterable")}return B.prototype=C,t(M,"constructor",{value:C,configurable:!0}),t(C,"constructor",{value:B,configurable:!0}),B.displayName=c(C,g,"GeneratorFunction"),r.isGeneratorFunction=function(v){var u=typeof v=="function"&&v.constructor;return!!u&&(u===B||(u.displayName||u.name)==="GeneratorFunction")},r.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,C):(v.__proto__=C,c(v,g,"GeneratorFunction")),v.prototype=Object.create(M),v},r.awrap=function(v){return{__await:v}},W(Q.prototype),c(Q.prototype,n,function(){return this}),r.AsyncIterator=Q,r.async=function(v,u,h,k,z){z===void 0&&(z=Promise);var E=new Q(d(v,u,h,k),z);return r.isGeneratorFunction(u)?E:E.next().then(function(T){return T.done?T.value:E.next()})},W(M),c(M,g,"Generator"),c(M,s,function(){return this}),c(M,"toString",function(){return"[object Generator]"}),r.keys=function(v){var u=Object(v),h=[];for(var k in u)h.push(k);return h.reverse(),function z(){for(;h.length;){var E=h.pop();if(E in u)return z.value=E,z.done=!1,z}return z.done=!0,z}},r.values=V,oa.prototype={constructor:oa,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(j),!v)for(var u in this)u.charAt(0)==="t"&&l.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=a)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var u=this;function h(K,ta){return E.type="throw",E.arg=v,u.next=K,ta&&(u.method="next",u.arg=a),!!ta}for(var k=this.tryEntries.length-1;k>=0;--k){var z=this.tryEntries[k],E=z.completion;if(z.tryLoc==="root")return h("end");if(z.tryLoc<=this.prev){var T=l.call(z,"catchLoc"),_=l.call(z,"finallyLoc");if(T&&_){if(this.prev<z.catchLoc)return h(z.catchLoc,!0);if(this.prev<z.finallyLoc)return h(z.finallyLoc)}else if(T){if(this.prev<z.catchLoc)return h(z.catchLoc,!0)}else{if(!_)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return h(z.finallyLoc)}}}},abrupt:function(v,u){for(var h=this.tryEntries.length-1;h>=0;--h){var k=this.tryEntries[h];if(k.tryLoc<=this.prev&&l.call(k,"finallyLoc")&&this.prev<k.finallyLoc){var z=k;break}}z&&(v==="break"||v==="continue")&&z.tryLoc<=u&&u<=z.finallyLoc&&(z=null);var E=z?z.completion:{};return E.type=v,E.arg=u,z?(this.method="next",this.next=z.finallyLoc,w):this.complete(E)},complete:function(v,u){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&u&&(this.next=u),w},finish:function(v){for(var u=this.tryEntries.length-1;u>=0;--u){var h=this.tryEntries[u];if(h.finallyLoc===v)return this.complete(h.completion,h.afterLoc),j(h),w}},catch:function(v){for(var u=this.tryEntries.length-1;u>=0;--u){var h=this.tryEntries[u];if(h.tryLoc===v){var k=h.completion;if(k.type==="throw"){var z=k.arg;j(h)}return z}}throw Error("illegal catch attempt")},delegateYield:function(v,u,h){return this.delegate={iterator:V(v),resultName:u,nextLoc:h},this.method==="next"&&(this.arg=a),w}},r}function Na(a,r){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,l){return e.__proto__=l,e},Na(a,r)}function ua(a,r){return r||(r=a.slice(0)),a.raw=r,a}function Mr(a,r){if(a){if(typeof a=="string")return Ka(a,r);var e={}.toString.call(a).slice(8,-1);return e==="Object"&&a.constructor&&(e=a.constructor.name),e==="Map"||e==="Set"?Array.from(a):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ka(a,r):void 0}}var Hr={name:"9rndb8",styles:":root{--ac-global-dimension-scale-factor:1;--ac-global-dimension-size-0:0px;--ac-global-dimension-size-10:1px;--ac-global-dimension-size-25:2px;--ac-global-dimension-size-30:2px;--ac-global-dimension-size-40:3px;--ac-global-dimension-size-50:4px;--ac-global-dimension-size-65:5px;--ac-global-dimension-size-75:6px;--ac-global-dimension-size-85:7px;--ac-global-dimension-size-100:8px;--ac-global-dimension-size-115:9px;--ac-global-dimension-size-125:10px;--ac-global-dimension-size-130:11px;--ac-global-dimension-size-150:12px;--ac-global-dimension-size-160:13px;--ac-global-dimension-size-175:14px;--ac-global-dimension-size-185:15px;--ac-global-dimension-size-200:16px;--ac-global-dimension-size-225:18px;--ac-global-dimension-size-250:20px;--ac-global-dimension-size-275:22px;--ac-global-dimension-size-300:24px;--ac-global-dimension-size-325:26px;--ac-global-dimension-size-350:28px;--ac-global-dimension-size-400:32px;--ac-global-dimension-size-450:36px;--ac-global-dimension-size-500:40px;--ac-global-dimension-size-550:44px;--ac-global-dimension-size-600:48px;--ac-global-dimension-size-650:52px;--ac-global-dimension-size-675:54px;--ac-global-dimension-size-700:56px;--ac-global-dimension-size-750:60px;--ac-global-dimension-size-800:64px;--ac-global-dimension-size-900:72px;--ac-global-dimension-size-1000:80px;--ac-global-dimension-size-1125:90px;--ac-global-dimension-size-1200:96px;--ac-global-dimension-size-1250:100px;--ac-global-dimension-size-1600:128px;--ac-global-dimension-size-1700:136px;--ac-global-dimension-size-1800:144px;--ac-global-dimension-size-2000:160px;--ac-global-dimension-size-2400:192px;--ac-global-dimension-size-2500:200px;--ac-global-dimension-size-3000:240px;--ac-global-dimension-size-3400:272px;--ac-global-dimension-size-3600:288px;--ac-global-dimension-size-4600:368px;--ac-global-dimension-size-5000:400px;--ac-global-dimension-size-6000:480px;}"},_r={name:"1vqwjre",styles:":root{--ac-global-static-color-white-900:rgba(255, 255, 255, 0.9);--ac-global-static-color-white-700:rgba(255, 255, 255, 0.7);--ac-global-static-color-white-300:rgba(255, 255, 255, 0.3);--ac-global-static-color-black-900:rgba(0, 0, 0, 0.9);--ac-global-static-color-black-700:rgba(0, 0, 0, 0.7);--ac-global-static-color-black-300:rgba(0, 0, 0, 0.3);}"},Qr={name:"15o57dn",styles:":root{--ac-global-dimension-static-size-0:0px;--ac-global-dimension-static-size-10:1px;--ac-global-dimension-static-size-25:2px;--ac-global-dimension-static-size-50:4px;--ac-global-dimension-static-size-40:3px;--ac-global-dimension-static-size-65:5px;--ac-global-dimension-static-size-100:8px;--ac-global-dimension-static-size-115:9px;--ac-global-dimension-static-size-125:10px;--ac-global-dimension-static-size-130:11px;--ac-global-dimension-static-size-150:12px;--ac-global-dimension-static-size-160:13px;--ac-global-dimension-static-size-175:14px;--ac-global-dimension-static-size-200:16px;--ac-global-dimension-static-size-225:18px;--ac-global-dimension-static-size-250:20px;--ac-global-dimension-static-size-300:24px;--ac-global-dimension-static-size-400:32px;--ac-global-dimension-static-size-450:36px;--ac-global-dimension-static-size-500:40px;--ac-global-dimension-static-size-550:44px;--ac-global-dimension-static-size-600:48px;--ac-global-dimension-static-size-700:56px;--ac-global-dimension-static-size-800:64px;--ac-global-dimension-static-size-900:72px;--ac-global-dimension-static-size-1000:80px;--ac-global-dimension-static-size-1200:96px;--ac-global-dimension-static-size-1700:136px;--ac-global-dimension-static-size-2400:192px;--ac-global-dimension-static-size-2600:208px;--ac-global-dimension-static-size-3400:272px;--ac-global-dimension-static-size-3600:288px;--ac-global-dimension-static-size-4600:368px;--ac-global-dimension-static-size-5000:400px;--ac-global-dimension-static-size-6000:480px;--ac-global-dimension-static-font-size-50:11px;--ac-global-dimension-static-font-size-75:12px;--ac-global-dimension-static-font-size-100:14px;--ac-global-dimension-static-font-size-150:15px;--ac-global-dimension-static-font-size-200:16px;--ac-global-dimension-static-font-size-300:18px;--ac-global-dimension-static-font-size-400:20px;--ac-global-dimension-static-font-size-500:22px;--ac-global-dimension-static-font-size-600:25px;--ac-global-dimension-static-font-size-700:28px;--ac-global-dimension-static-font-size-800:32px;--ac-global-dimension-static-font-size-900:36px;--ac-global-dimension-static-font-size-1000:40px;--ac-global-dimension-static-percent-50:50%;--ac-global-dimension-static-percent-100:100%;--ac-global-dimension-static-breakpoint-xsmall:304px;--ac-global-dimension-static-breakpoint-small:768px;--ac-global-dimension-static-breakpoint-medium:1280px;--ac-global-dimension-static-breakpoint-large:1768px;--ac-global-dimension-static-breakpoint-xlarge:2160px;--ac-global-dimension-static-grid-columns:12;--ac-global-dimension-static-grid-fluid-width:100%;--ac-global-dimension-static-grid-fixed-max-width:1280px;--ac-global-dimension-font-size-25:10px;--ac-global-dimension-font-size-50:11px;--ac-global-dimension-font-size-75:12px;--ac-global-dimension-font-size-100:14px;--ac-global-dimension-font-size-150:15px;--ac-global-dimension-font-size-200:16px;--ac-global-dimension-font-size-300:18px;--ac-global-dimension-font-size-400:20px;--ac-global-dimension-font-size-500:22px;--ac-global-dimension-font-size-600:25px;--ac-global-dimension-font-size-700:28px;--ac-global-dimension-font-size-800:32px;--ac-global-dimension-font-size-900:36px;--ac-global-dimension-font-size-1000:40px;--ac-global-dimension-font-size-1100:45px;--ac-global-dimension-font-size-1200:50px;--ac-global-dimension-font-size-1300:60px;}"},Vr={name:"xwbvnd",styles:`:root,.ac-theme--dark{--ac-global-color-primary:rgb(114, 217, 255);--ac-global-color-primary-900:rgba(114, 217, 255, 0.9);--ac-global-color-primary-700:rgba(114, 217, 255, 0.7);--ac-global-color-primary-500:rgba(114, 217, 255, 0.5);--ac-global-color-primary-300:rgba(114, 217, 255, 0.3);--ac-global-color-gray-900:#181b1f;--ac-global-color-gray-800:#1d2126;--ac-global-color-gray-700:#23282e;--ac-global-color-gray-600:#282e35;--ac-global-color-gray-500:#2f353d;--ac-global-color-gray-400:#3d434a;--ac-global-color-gray-300:#4a5057;--ac-global-color-gray-200:#585d64;--ac-global-color-gray-100:#666b71;--ac-global-color-grey-50-rgb:0,0,0;--ac-global-color-grey-50:rgb(var(--ac-global-color-grey-50-rgb));--ac-global-color-grey-75-rgb:14,14,14;--ac-global-color-grey-75:rgb(var(--ac-global-color-grey-75-rgb));--ac-global-color-grey-100-rgb:29,29,29;--ac-global-color-grey-100:rgb(var(--ac-global-color-grey-100-rgb));--ac-global-color-grey-200-rgb:48,48,48;--ac-global-color-grey-200:rgb(var(--ac-global-color-grey-200-rgb));--ac-global-color-grey-300-rgb:75,75,75;--ac-global-color-grey-300:rgb(var(--ac-global-color-grey-300-rgb));--ac-global-color-grey-400-rgb:106,106,106;--ac-global-color-grey-400:rgb(var(--ac-global-color-grey-400-rgb));--ac-global-color-grey-500-rgb:141,141,141;--ac-global-color-grey-500:rgb(var(--ac-global-color-grey-500-rgb));--ac-global-color-grey-600-rgb:176,176,176;--ac-global-color-grey-600:rgb(var(--ac-global-color-grey-600-rgb));--ac-global-color-grey-700-rgb:208,208,208;--ac-global-color-grey-700:rgb(var(--ac-global-color-grey-700-rgb));--ac-global-color-grey-800-rgb:235,235,235;--ac-global-color-grey-800:rgb(var(--ac-global-color-grey-800-rgb));--ac-global-color-grey-900-rgb:255,255,255;--ac-global-color-grey-900:rgb(var(--ac-global-color-grey-900-rgb));--ac-global-color-red-100-rgb:87,0,0;--ac-global-color-red-100:rgb(var(--ac-global-color-red-100-rgb));--ac-global-color-red-200-rgb:110,0,0;--ac-global-color-red-200:rgb(var(--ac-global-color-red-200-rgb));--ac-global-color-red-300-rgb:138,0,0;--ac-global-color-red-300:rgb(var(--ac-global-color-red-300-rgb));--ac-global-color-red-400-rgb:167,0,0;--ac-global-color-red-400:rgb(var(--ac-global-color-red-400-rgb));--ac-global-color-red-500-rgb:196,7,6;--ac-global-color-red-500:rgb(var(--ac-global-color-red-500-rgb));--ac-global-color-red-600-rgb:221,33,24;--ac-global-color-red-600:rgb(var(--ac-global-color-red-600-rgb));--ac-global-color-red-700-rgb:238,67,49;--ac-global-color-red-700:rgb(var(--ac-global-color-red-700-rgb));--ac-global-color-red-800-rgb:249,99,76;--ac-global-color-red-800:rgb(var(--ac-global-color-red-800-rgb));--ac-global-color-red-900-rgb:255,129,107;--ac-global-color-red-900:rgb(var(--ac-global-color-red-900-rgb));--ac-global-color-red-1000-rgb:255,158,140;--ac-global-color-red-1000:rgb(var(--ac-global-color-red-1000-rgb));--ac-global-color-red-1100-rgb:255,183,169;--ac-global-color-red-1100:rgb(var(--ac-global-color-red-1100-rgb));--ac-global-color-red-1200-rgb:255,205,195;--ac-global-color-red-1200:rgb(var(--ac-global-color-red-1200-rgb));--ac-global-color-red-1300-rgb:255,223,217;--ac-global-color-red-1300:rgb(var(--ac-global-color-red-1300-rgb));--ac-global-color-red-1400-rgb:255,237,234;--ac-global-color-red-1400:rgb(var(--ac-global-color-red-1400-rgb));--ac-global-color-orange-100-rgb:72,24,1;--ac-global-color-orange-100:rgb(var(--ac-global-color-orange-100-rgb));--ac-global-color-orange-200-rgb:92,32,0;--ac-global-color-orange-200:rgb(var(--ac-global-color-orange-200-rgb));--ac-global-color-orange-300-rgb:115,43,0;--ac-global-color-orange-300:rgb(var(--ac-global-color-orange-300-rgb));--ac-global-color-orange-400-rgb:138,55,0;--ac-global-color-orange-400:rgb(var(--ac-global-color-orange-400-rgb));--ac-global-color-orange-500-rgb:162,68,0;--ac-global-color-orange-500:rgb(var(--ac-global-color-orange-500-rgb));--ac-global-color-orange-600-rgb:186,82,0;--ac-global-color-orange-600:rgb(var(--ac-global-color-orange-600-rgb));--ac-global-color-orange-700-rgb:210,98,0;--ac-global-color-orange-700:rgb(var(--ac-global-color-orange-700-rgb));--ac-global-color-orange-800-rgb:232,116,0;--ac-global-color-orange-800:rgb(var(--ac-global-color-orange-800-rgb));--ac-global-color-orange-900-rgb:249,137,23;--ac-global-color-orange-900:rgb(var(--ac-global-color-orange-900-rgb));--ac-global-color-orange-1000-rgb:255,162,59;--ac-global-color-orange-1000:rgb(var(--ac-global-color-orange-1000-rgb));--ac-global-color-orange-1100-rgb:255,188,102;--ac-global-color-orange-1100:rgb(var(--ac-global-color-orange-1100-rgb));--ac-global-color-orange-1200-rgb:253,210,145;--ac-global-color-orange-1200:rgb(var(--ac-global-color-orange-1200-rgb));--ac-global-color-orange-1300-rgb:255,226,181;--ac-global-color-orange-1300:rgb(var(--ac-global-color-orange-1300-rgb));--ac-global-color-orange-1400-rgb:255,239,213;--ac-global-color-orange-1400:rgb(var(--ac-global-color-orange-1400-rgb));--ac-global-color-yellow-100-rgb:53,36,0;--ac-global-color-yellow-100:rgb(var(--ac-global-color-yellow-100-rgb));--ac-global-color-yellow-200-rgb:68,47,0;--ac-global-color-yellow-200:rgb(var(--ac-global-color-yellow-200-rgb));--ac-global-color-yellow-300-rgb:86,62,0;--ac-global-color-yellow-300:rgb(var(--ac-global-color-yellow-300-rgb));--ac-global-color-yellow-400-rgb:103,77,0;--ac-global-color-yellow-400:rgb(var(--ac-global-color-yellow-400-rgb));--ac-global-color-yellow-500-rgb:122,92,0;--ac-global-color-yellow-500:rgb(var(--ac-global-color-yellow-500-rgb));--ac-global-color-yellow-600-rgb:141,108,0;--ac-global-color-yellow-600:rgb(var(--ac-global-color-yellow-600-rgb));--ac-global-color-yellow-700-rgb:161,126,0;--ac-global-color-yellow-700:rgb(var(--ac-global-color-yellow-700-rgb));--ac-global-color-yellow-800-rgb:180,144,0;--ac-global-color-yellow-800:rgb(var(--ac-global-color-yellow-800-rgb));--ac-global-color-yellow-900-rgb:199,162,0;--ac-global-color-yellow-900:rgb(var(--ac-global-color-yellow-900-rgb));--ac-global-color-yellow-1000-rgb:216,181,0;--ac-global-color-yellow-1000:rgb(var(--ac-global-color-yellow-1000-rgb));--ac-global-color-yellow-1100-rgb:233,199,0;--ac-global-color-yellow-1100:rgb(var(--ac-global-color-yellow-1100-rgb));--ac-global-color-yellow-1200-rgb:247,216,4;--ac-global-color-yellow-1200:rgb(var(--ac-global-color-yellow-1200-rgb));--ac-global-color-yellow-1300-rgb:249,233,97;--ac-global-color-yellow-1300:rgb(var(--ac-global-color-yellow-1300-rgb));--ac-global-color-yellow-1400-rgb:252,243,170;--ac-global-color-yellow-1400:rgb(var(--ac-global-color-yellow-1400-rgb));--ac-global-color-chartreuse-100-rgb:32,43,0;--ac-global-color-chartreuse-100:rgb(
|
|
3
3
|
var(--ac-global-color-chartreuse-100-rgb)
|
|
4
4
|
);--ac-global-color-chartreuse-200-rgb:42,56,0;--ac-global-color-chartreuse-200:rgb(
|
phoenix/server/static/assets/{vendor-codemirror-BlmFw5CA.js → vendor-codemirror-BODM513D.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c$ as NS,d0 as Le,d1 as pg,d2 as gg,d3 as mg,d4 as qe,d5 as bi,d6 as Jl,d7 as Nn,d8 as bg,d9 as Us,da as yg,db as Sg,A as J,z as wg,dc as xg,dd as FS,de as IS,df as HS,dg as VS,dh as Ut,di as Hc,r as mi,dj as $S,dk as WS,dl as zS,dm as qS,dn as vg,dp as KS,dq as jS,dr as kg,ds as _S,dt as Cg,du as GS}from"./vendor-
|
|
1
|
+
import{c$ as NS,d0 as Le,d1 as pg,d2 as gg,d3 as mg,d4 as qe,d5 as bi,d6 as Jl,d7 as Nn,d8 as bg,d9 as Us,da as yg,db as Sg,A as J,z as wg,dc as xg,dd as FS,de as IS,df as HS,dg as VS,dh as Ut,di as Hc,r as mi,dj as $S,dk as WS,dl as zS,dm as qS,dn as vg,dp as KS,dq as jS,dr as kg,ds as _S,dt as Cg,du as GS}from"./vendor-DCZoBorz.js";import{m as YS}from"./vendor-shiki-Dq54rRC7.js";var $a={},Id;function Vc(){return Id||(Id=1,function(n){var t=NS();class e{lineAt(b){if(b<0||b>this.length)throw new RangeError(`Invalid position ${b} in document of length ${this.length}`);return this.lineInner(b,!1,1,0)}line(b){if(b<1||b>this.lines)throw new RangeError(`Invalid line number ${b} in ${this.lines}-line document`);return this.lineInner(b,!0,1,0)}replace(b,w,C){[b,w]=x(this,b,w);let O=[];return this.decompose(0,b,O,2),C.length&&C.decompose(0,C.length,O,3),this.decompose(w,this.length,O,1),s.from(O,this.length-(w-b)+C.length)}append(b){return this.replace(this.length,this.length,b)}slice(b,w=this.length){[b,w]=x(this,b,w);let C=[];return this.decompose(b,w,C,0),s.from(C,w-b)}eq(b){if(b==this)return!0;if(b.length!=this.length||b.lines!=this.lines)return!1;let w=this.scanIdentical(b,1),C=this.length-this.scanIdentical(b,-1),O=new c(this),L=new c(b);for(let N=w,q=w;;){if(O.next(N),L.next(N),N=0,O.lineBreak!=L.lineBreak||O.done!=L.done||O.value!=L.value)return!1;if(q+=O.value.length,O.done||q>=C)return!0}}iter(b=1){return new c(this,b)}iterRange(b,w=this.length){return new g(this,b,w)}iterLines(b,w){let C;if(b==null)C=this.iter();else{w==null&&(w=this.lines+1);let O=this.line(b).from;C=this.iterRange(O,Math.max(O,w==this.lines+1?this.length:w<=1?0:this.line(w-1).to))}return new p(C)}toString(){return this.sliceString(0)}toJSON(){let b=[];return this.flatten(b),b}constructor(){}static of(b){if(b.length==0)throw new RangeError("A document must have at least one line");return b.length==1&&!b[0]?e.empty:b.length<=32?new i(b):s.from(i.split(b,[]))}}class i extends e{constructor(b,w=r(b)){super(),this.text=b,this.length=w}get lines(){return this.text.length}get children(){return null}lineInner(b,w,C,O){for(let L=0;;L++){let N=this.text[L],q=O+N.length;if((w?C:q)>=b)return new y(O,q,C,N);O=q+1,C++}}decompose(b,w,C,O){let L=b<=0&&w>=this.length?this:new i(h(this.text,b,w),Math.min(w,this.length)-Math.max(0,b));if(O&1){let N=C.pop(),q=l(L.text,N.text.slice(),0,L.length);if(q.length<=32)C.push(new i(q,N.length+L.length));else{let _=q.length>>1;C.push(new i(q.slice(0,_)),new i(q.slice(_)))}}else C.push(L)}replace(b,w,C){if(!(C instanceof i))return super.replace(b,w,C);[b,w]=x(this,b,w);let O=l(this.text,l(C.text,h(this.text,0,b)),w),L=this.length+C.length-(w-b);return O.length<=32?new i(O,L):s.from(i.split(O,[]),L)}sliceString(b,w=this.length,C=`
|
|
2
2
|
`){[b,w]=x(this,b,w);let O="";for(let L=0,N=0;L<=w&&N<this.text.length;N++){let q=this.text[N],_=L+q.length;L>b&&N&&(O+=C),b<_&&w>L&&(O+=q.slice(Math.max(0,b-L),w-L)),L=_+1}return O}flatten(b){for(let w of this.text)b.push(w)}scanIdentical(){return 0}static split(b,w){let C=[],O=-1;for(let L of b)C.push(L),O+=L.length+1,C.length==32&&(w.push(new i(C,O)),C=[],O=-1);return O>-1&&w.push(new i(C,O)),w}}class s extends e{constructor(b,w){super(),this.children=b,this.length=w,this.lines=0;for(let C of b)this.lines+=C.lines}lineInner(b,w,C,O){for(let L=0;;L++){let N=this.children[L],q=O+N.length,_=C+N.lines-1;if((w?_:q)>=b)return N.lineInner(b,w,C,O);O=q+1,C=_+1}}decompose(b,w,C,O){for(let L=0,N=0;N<=w&&L<this.children.length;L++){let q=this.children[L],_=N+q.length;if(b<=_&&w>=N){let Z=O&((N<=b?1:0)|(_>=w?2:0));N>=b&&_<=w&&!Z?C.push(q):q.decompose(b-N,w-N,C,Z)}N=_+1}}replace(b,w,C){if([b,w]=x(this,b,w),C.lines<this.lines)for(let O=0,L=0;O<this.children.length;O++){let N=this.children[O],q=L+N.length;if(b>=L&&w<=q){let _=N.replace(b-L,w-L,C),Z=this.lines-N.lines+_.lines;if(_.lines<Z>>4&&_.lines>Z>>6){let lt=this.children.slice();return lt[O]=_,new s(lt,this.length-(w-b)+C.length)}return super.replace(L,q,_)}L=q+1}return super.replace(b,w,C)}sliceString(b,w=this.length,C=`
|
|
3
3
|
`){[b,w]=x(this,b,w);let O="";for(let L=0,N=0;L<this.children.length&&N<=w;L++){let q=this.children[L],_=N+q.length;N>b&&L&&(O+=C),b<_&&w>N&&(O+=q.sliceString(b-N,w-N,C)),N=_+1}return O}flatten(b){for(let w of this.children)w.flatten(b)}scanIdentical(b,w){if(!(b instanceof s))return 0;let C=0,[O,L,N,q]=w>0?[0,0,this.children.length,b.children.length]:[this.children.length-1,b.children.length-1,-1,-1];for(;;O+=w,L+=w){if(O==N||L==q)return C;let _=this.children[O],Z=b.children[L];if(_!=Z)return C+_.scanIdentical(Z,w);C+=_.length+1}}static from(b,w=b.reduce((C,O)=>C+O.length+1,-1)){let C=0;for(let pt of b)C+=pt.lines;if(C<32){let pt=[];for(let It of b)It.flatten(pt);return new i(pt,w)}let O=Math.max(32,C>>5),L=O<<1,N=O>>1,q=[],_=0,Z=-1,lt=[];function ht(pt){let It;if(pt.lines>L&&pt instanceof s)for(let be of pt.children)ht(be);else pt.lines>N&&(_>N||!_)?(gt(),q.push(pt)):pt instanceof i&&_&&(It=lt[lt.length-1])instanceof i&&pt.lines+It.lines<=32?(_+=pt.lines,Z+=pt.length+1,lt[lt.length-1]=new i(It.text.concat(pt.text),It.length+1+pt.length)):(_+pt.lines>O&>(),_+=pt.lines,Z+=pt.length+1,lt.push(pt))}function gt(){_!=0&&(q.push(lt.length==1?lt[0]:s.from(lt,Z)),Z=-1,_=lt.length=0)}for(let pt of b)ht(pt);return gt(),q.length==1?q[0]:new s(q,w)}}e.empty=new i([""],0);function r(V){let b=-1;for(let w of V)b+=w.length+1;return b}function l(V,b,w=0,C=1e9){for(let O=0,L=0,N=!0;L<V.length&&O<=C;L++){let q=V[L],_=O+q.length;_>=w&&(_>C&&(q=q.slice(0,C-O)),O<w&&(q=q.slice(w-O)),N?(b[b.length-1]+=q,N=!1):b.push(q)),O=_+1}return b}function h(V,b,w){return l(V,[""],b,w)}class c{constructor(b,w=1){this.dir=w,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[b],this.offsets=[w>0?1:(b instanceof i?b.text.length:b.children.length)<<1]}nextInner(b,w){for(this.done=this.lineBreak=!1;;){let C=this.nodes.length-1,O=this.nodes[C],L=this.offsets[C],N=L>>1,q=O instanceof i?O.text.length:O.children.length;if(N==(w>0?q:0)){if(C==0)return this.done=!0,this.value="",this;w>0&&this.offsets[C-1]++,this.nodes.pop(),this.offsets.pop()}else if((L&1)==(w>0?0:1)){if(this.offsets[C]+=w,b==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;b--}else if(O instanceof i){let _=O.text[N+(w<0?-1:0)];if(this.offsets[C]+=w,_.length>Math.max(0,b))return this.value=b==0?_:w>0?_.slice(b):_.slice(0,_.length-b),this;b-=_.length}else{let _=O.children[N+(w<0?-1:0)];b>_.length?(b-=_.length,this.offsets[C]+=w):(w<0&&this.offsets[C]--,this.nodes.push(_),this.offsets.push(w>0?1:(_ instanceof i?_.text.length:_.children.length)<<1))}}}next(b=0){return b<0&&(this.nextInner(-b,-this.dir),b=this.value.length),this.nextInner(b,this.dir)}}class g{constructor(b,w,C){this.value="",this.done=!1,this.cursor=new c(b,w>C?-1:1),this.pos=w>C?b.length:0,this.from=Math.min(w,C),this.to=Math.max(w,C)}nextInner(b,w){if(w<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;b+=Math.max(0,w<0?this.pos-this.to:this.from-this.pos);let C=w<0?this.pos-this.from:this.to-this.pos;b>C&&(b=C),C-=b;let{value:O}=this.cursor.next(b);return this.pos+=(O.length+b)*w,this.value=O.length<=C?O:w<0?O.slice(O.length-C):O.slice(0,C),this.done=!this.value,this}next(b=0){return b<0?b=Math.max(b,this.from-this.pos):b>0&&(b=Math.min(b,this.to-this.pos)),this.nextInner(b,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class p{constructor(b){this.inner=b,this.afterBreak=!0,this.value="",this.done=!1}next(b=0){let{done:w,lineBreak:C,value:O}=this.inner.next(b);return w&&this.afterBreak?(this.value="",this.afterBreak=!1):w?(this.done=!0,this.value=""):C?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=O,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=function(){return this.iter()},c.prototype[Symbol.iterator]=g.prototype[Symbol.iterator]=p.prototype[Symbol.iterator]=function(){return this});class y{constructor(b,w,C,O){this.from=b,this.to=w,this.number=C,this.text=O}get length(){return this.to-this.from}}function x(V,b,w){return b=Math.max(0,Math.min(V.length,b)),[b,Math.max(b,Math.min(V.length,w))]}function T(V,b,w=!0,C=!0){return t.findClusterBreak(V,b,w,C)}function P(V){return V>=56320&&V<57344}function I(V){return V>=55296&&V<56320}function z(V,b){let w=V.charCodeAt(b);if(!I(w)||b+1==V.length)return w;let C=V.charCodeAt(b+1);return P(C)?(w-55296<<10)+(C-56320)+65536:w}function W(V){return V<=65535?String.fromCharCode(V):(V-=65536,String.fromCharCode((V>>10)+55296,(V&1023)+56320))}function U(V){return V<65536?1:2}const ot=/\r\n?|\n/;n.MapMode=void 0,function(V){V[V.Simple=0]="Simple",V[V.TrackDel=1]="TrackDel",V[V.TrackBefore=2]="TrackBefore",V[V.TrackAfter=3]="TrackAfter"}(n.MapMode||(n.MapMode={}));class Q{constructor(b){this.sections=b}get length(){let b=0;for(let w=0;w<this.sections.length;w+=2)b+=this.sections[w];return b}get newLength(){let b=0;for(let w=0;w<this.sections.length;w+=2){let C=this.sections[w+1];b+=C<0?this.sections[w]:C}return b}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(b){for(let w=0,C=0,O=0;w<this.sections.length;){let L=this.sections[w++],N=this.sections[w++];N<0?(b(C,O,L),O+=L):O+=N,C+=L}}iterChangedRanges(b,w=!1){Pt(this,b,w)}get invertedDesc(){let b=[];for(let w=0;w<this.sections.length;){let C=this.sections[w++],O=this.sections[w++];O<0?b.push(C,O):b.push(O,C)}return new Q(b)}composeDesc(b){return this.empty?b:b.empty?this:le(this,b)}mapDesc(b,w=!1){return b.empty?this:Tt(this,b,w)}mapPos(b,w=-1,C=n.MapMode.Simple){let O=0,L=0;for(let N=0;N<this.sections.length;){let q=this.sections[N++],_=this.sections[N++],Z=O+q;if(_<0){if(Z>b)return L+(b-O);L+=q}else{if(C!=n.MapMode.Simple&&Z>=b&&(C==n.MapMode.TrackDel&&O<b&&Z>b||C==n.MapMode.TrackBefore&&O<b||C==n.MapMode.TrackAfter&&Z>b))return null;if(Z>b||Z==b&&w<0&&!q)return b==O||w<0?L:L+_;L+=_}O=Z}if(b>O)throw new RangeError(`Position ${b} is out of range for changeset of length ${O}`);return L}touchesRange(b,w=b){for(let C=0,O=0;C<this.sections.length&&O<=w;){let L=this.sections[C++],N=this.sections[C++],q=O+L;if(N>=0&&O<=w&&q>=b)return O<b&&q>w?"cover":!0;O=q}return!1}toString(){let b="";for(let w=0;w<this.sections.length;){let C=this.sections[w++],O=this.sections[w++];b+=(b?" ":"")+C+(O>=0?":"+O:"")}return b}toJSON(){return this.sections}static fromJSON(b){if(!Array.isArray(b)||b.length%2||b.some(w=>typeof w!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Q(b)}static create(b){return new Q(b)}}class st extends Q{constructor(b,w){super(b),this.inserted=w}apply(b){if(this.length!=b.length)throw new RangeError("Applying change set to a document with the wrong length");return Pt(this,(w,C,O,L,N)=>b=b.replace(O,O+(C-w),N),!1),b}mapDesc(b,w=!1){return Tt(this,b,w,!0)}invert(b){let w=this.sections.slice(),C=[];for(let O=0,L=0;O<w.length;O+=2){let N=w[O],q=w[O+1];if(q>=0){w[O]=q,w[O+1]=N;let _=O>>1;for(;C.length<_;)C.push(e.empty);C.push(N?b.slice(L,L+N):e.empty)}L+=N}return new st(w,C)}compose(b){return this.empty?b:b.empty?this:le(this,b,!0)}map(b,w=!1){return b.empty?this:Tt(this,b,w,!0)}iterChanges(b,w=!1){Pt(this,b,w)}get desc(){return Q.create(this.sections)}filter(b){let w=[],C=[],O=[],L=new ae(this);t:for(let N=0,q=0;;){let _=N==b.length?1e9:b[N++];for(;q<_||q==_&&L.len==0;){if(L.done)break t;let lt=Math.min(L.len,_-q);at(O,lt,-1);let ht=L.ins==-1?-1:L.off==0?L.ins:0;at(w,lt,ht),ht>0&&wt(C,w,L.text),L.forward(lt),q+=lt}let Z=b[N++];for(;q<Z;){if(L.done)break t;let lt=Math.min(L.len,Z-q);at(w,lt,-1),at(O,lt,L.ins==-1?-1:L.off==0?L.ins:0),L.forward(lt),q+=lt}}return{changes:new st(w,C),filtered:Q.create(O)}}toJSON(){let b=[];for(let w=0;w<this.sections.length;w+=2){let C=this.sections[w],O=this.sections[w+1];O<0?b.push(C):O==0?b.push([C]):b.push([C].concat(this.inserted[w>>1].toJSON()))}return b}static of(b,w,C){let O=[],L=[],N=0,q=null;function _(lt=!1){if(!lt&&!O.length)return;N<w&&at(O,w-N,-1);let ht=new st(O,L);q=q?q.compose(ht.map(q)):ht,O=[],L=[],N=0}function Z(lt){if(Array.isArray(lt))for(let ht of lt)Z(ht);else if(lt instanceof st){if(lt.length!=w)throw new RangeError(`Mismatched change set length (got ${lt.length}, expected ${w})`);_(),q=q?q.compose(lt.map(q)):lt}else{let{from:ht,to:gt=ht,insert:pt}=lt;if(ht>gt||ht<0||gt>w)throw new RangeError(`Invalid change range ${ht} to ${gt} (in doc of length ${w})`);let It=pt?typeof pt=="string"?e.of(pt.split(C||ot)):pt:e.empty,be=It.length;if(ht==gt&&be==0)return;ht<N&&_(),ht>N&&at(O,ht-N,-1),at(O,gt-ht,be),wt(L,O,It),N=gt}}return Z(b),_(!q),q}static empty(b){return new st(b?[b,-1]:[],[])}static fromJSON(b){if(!Array.isArray(b))throw new RangeError("Invalid JSON representation of ChangeSet");let w=[],C=[];for(let O=0;O<b.length;O++){let L=b[O];if(typeof L=="number")w.push(L,-1);else{if(!Array.isArray(L)||typeof L[0]!="number"||L.some((N,q)=>q&&typeof N!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(L.length==1)w.push(L[0],0);else{for(;C.length<O;)C.push(e.empty);C[O]=e.of(L.slice(1)),w.push(L[0],C[O].length)}}}return new st(w,C)}static createSet(b,w){return new st(b,w)}}function at(V,b,w,C=!1){if(b==0&&w<=0)return;let O=V.length-2;O>=0&&w<=0&&w==V[O+1]?V[O]+=b:O>=0&&b==0&&V[O]==0?V[O+1]+=w:C?(V[O]+=b,V[O+1]+=w):V.push(b,w)}function wt(V,b,w){if(w.length==0)return;let C=b.length-2>>1;if(C<V.length)V[V.length-1]=V[V.length-1].append(w);else{for(;V.length<C;)V.push(e.empty);V.push(w)}}function Pt(V,b,w){let C=V.inserted;for(let O=0,L=0,N=0;N<V.sections.length;){let q=V.sections[N++],_=V.sections[N++];if(_<0)O+=q,L+=q;else{let Z=O,lt=L,ht=e.empty;for(;Z+=q,lt+=_,_&&C&&(ht=ht.append(C[N-2>>1])),!(w||N==V.sections.length||V.sections[N+1]<0);)q=V.sections[N++],_=V.sections[N++];b(O,Z,L,lt,ht),O=Z,L=lt}}}function Tt(V,b,w,C=!1){let O=[],L=C?[]:null,N=new ae(V),q=new ae(b);for(let _=-1;;){if(N.done&&q.len||q.done&&N.len)throw new Error("Mismatched change set lengths");if(N.ins==-1&&q.ins==-1){let Z=Math.min(N.len,q.len);at(O,Z,-1),N.forward(Z),q.forward(Z)}else if(q.ins>=0&&(N.ins<0||_==N.i||N.off==0&&(q.len<N.len||q.len==N.len&&!w))){let Z=q.len;for(at(O,q.ins,-1);Z;){let lt=Math.min(N.len,Z);N.ins>=0&&_<N.i&&N.len<=lt&&(at(O,0,N.ins),L&&wt(L,O,N.text),_=N.i),N.forward(lt),Z-=lt}q.next()}else if(N.ins>=0){let Z=0,lt=N.len;for(;lt;)if(q.ins==-1){let ht=Math.min(lt,q.len);Z+=ht,lt-=ht,q.forward(ht)}else if(q.ins==0&&q.len<lt)lt-=q.len,q.next();else break;at(O,Z,_<N.i?N.ins:0),L&&_<N.i&&wt(L,O,N.text),_=N.i,N.forward(N.len-lt)}else{if(N.done&&q.done)return L?st.createSet(O,L):Q.create(O);throw new Error("Mismatched change set lengths")}}}function le(V,b,w=!1){let C=[],O=w?[]:null,L=new ae(V),N=new ae(b);for(let q=!1;;){if(L.done&&N.done)return O?st.createSet(C,O):Q.create(C);if(L.ins==0)at(C,L.len,0,q),L.next();else if(N.len==0&&!N.done)at(C,0,N.ins,q),O&&wt(O,C,N.text),N.next();else{if(L.done||N.done)throw new Error("Mismatched change set lengths");{let _=Math.min(L.len2,N.len),Z=C.length;if(L.ins==-1){let lt=N.ins==-1?-1:N.off?0:N.ins;at(C,_,lt,q),O&<&&wt(O,C,N.text)}else N.ins==-1?(at(C,L.off?0:L.len,_,q),O&&wt(O,C,L.textBit(_))):(at(C,L.off?0:L.len,N.off?0:N.ins,q),O&&!N.off&&wt(O,C,N.text));q=(L.ins>_||N.ins>=0&&N.len>_)&&(q||C.length>Z),L.forward2(_),N.forward(_)}}}}class ae{constructor(b){this.set=b,this.i=0,this.next()}next(){let{sections:b}=this.set;this.i<b.length?(this.len=b[this.i++],this.ins=b[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:b}=this.set,w=this.i-2>>1;return w>=b.length?e.empty:b[w]}textBit(b){let{inserted:w}=this.set,C=this.i-2>>1;return C>=w.length&&!b?e.empty:w[C].slice(this.off,b==null?void 0:this.off+b)}forward(b){b==this.len?this.next():(this.len-=b,this.off+=b)}forward2(b){this.ins==-1?this.forward(b):b==this.ins?this.next():(this.ins-=b,this.off+=b)}}class zt{constructor(b,w,C){this.from=b,this.to=w,this.flags=C}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let b=this.flags&7;return b==7?null:b}get goalColumn(){let b=this.flags>>6;return b==16777215?void 0:b}map(b,w=-1){let C,O;return this.empty?C=O=b.mapPos(this.from,w):(C=b.mapPos(this.from,1),O=b.mapPos(this.to,-1)),C==this.from&&O==this.to?this:new zt(C,O,this.flags)}extend(b,w=b){if(b<=this.anchor&&w>=this.anchor)return Ot.range(b,w);let C=Math.abs(b-this.anchor)>Math.abs(w-this.anchor)?b:w;return Ot.range(this.anchor,C)}eq(b,w=!1){return this.anchor==b.anchor&&this.head==b.head&&(!w||!this.empty||this.assoc==b.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(b){if(!b||typeof b.anchor!="number"||typeof b.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ot.range(b.anchor,b.head)}static create(b,w,C){return new zt(b,w,C)}}class Ot{constructor(b,w){this.ranges=b,this.mainIndex=w}map(b,w=-1){return b.empty?this:Ot.create(this.ranges.map(C=>C.map(b,w)),this.mainIndex)}eq(b,w=!1){if(this.ranges.length!=b.ranges.length||this.mainIndex!=b.mainIndex)return!1;for(let C=0;C<this.ranges.length;C++)if(!this.ranges[C].eq(b.ranges[C],w))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Ot([this.main],0)}addRange(b,w=!0){return Ot.create([b].concat(this.ranges),w?0:this.mainIndex+1)}replaceRange(b,w=this.mainIndex){let C=this.ranges.slice();return C[w]=b,Ot.create(C,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(b=>b.toJSON()),main:this.mainIndex}}static fromJSON(b){if(!b||!Array.isArray(b.ranges)||typeof b.main!="number"||b.main>=b.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ot(b.ranges.map(w=>zt.fromJSON(w)),b.main)}static single(b,w=b){return new Ot([Ot.range(b,w)],0)}static create(b,w=0){if(b.length==0)throw new RangeError("A selection needs at least one range");for(let C=0,O=0;O<b.length;O++){let L=b[O];if(L.empty?L.from<=C:L.from<C)return Ot.normalized(b.slice(),w);C=L.to}return new Ot(b,w)}static cursor(b,w=0,C,O){return zt.create(b,b,(w==0?0:w<0?8:16)|(C==null?7:Math.min(6,C))|(O??16777215)<<6)}static range(b,w,C,O){let L=(C??16777215)<<6|(O==null?7:Math.min(6,O));return w<b?zt.create(w,b,48|L):zt.create(b,w,(w>b?8:0)|L)}static normalized(b,w=0){let C=b[w];b.sort((O,L)=>O.from-L.from),w=b.indexOf(C);for(let O=1;O<b.length;O++){let L=b[O],N=b[O-1];if(L.empty?L.from<=N.to:L.from<N.to){let q=N.from,_=Math.max(L.to,N.to);O<=w&&w--,b.splice(--O,2,L.anchor>L.head?Ot.range(_,q):Ot.range(q,_))}}return new Ot(b,w)}}function ne(V,b){for(let w of V.ranges)if(w.to>b)throw new RangeError("Selection points outside of document")}let Rt=0;class Bt{constructor(b,w,C,O,L){this.combine=b,this.compareInput=w,this.compare=C,this.isStatic=O,this.id=Rt++,this.default=b([]),this.extensions=typeof L=="function"?L(this):L}get reader(){return this}static define(b={}){return new Bt(b.combine||(w=>w),b.compareInput||((w,C)=>w===C),b.compare||(b.combine?(w,C)=>w===C:vt),!!b.static,b.enables)}of(b){return new Zt([],this,0,b)}compute(b,w){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zt(b,this,1,w)}computeN(b,w){if(this.isStatic)throw new Error("Can't compute a static facet");return new Zt(b,this,2,w)}from(b,w){return w||(w=C=>C),this.compute([b],C=>w(C.field(b)))}}function vt(V,b){return V==b||V.length==b.length&&V.every((w,C)=>w===b[C])}class Zt{constructor(b,w,C,O){this.dependencies=b,this.facet=w,this.type=C,this.value=O,this.id=Rt++}dynamicSlot(b){var w;let C=this.value,O=this.facet.compareInput,L=this.id,N=b[L]>>1,q=this.type==2,_=!1,Z=!1,lt=[];for(let ht of this.dependencies)ht=="doc"?_=!0:ht=="selection"?Z=!0:(((w=b[ht.id])!==null&&w!==void 0?w:1)&1)==0&<.push(b[ht.id]);return{create(ht){return ht.values[N]=C(ht),1},update(ht,gt){if(_&>.docChanged||Z&&(gt.docChanged||gt.selection)||ue(ht,lt)){let pt=C(ht);if(q?!se(pt,ht.values[N],O):!O(pt,ht.values[N]))return ht.values[N]=pt,1}return 0},reconfigure:(ht,gt)=>{let pt,It=gt.config.address[L];if(It!=null){let be=ft(gt,It);if(this.dependencies.every(Gt=>Gt instanceof Bt?gt.facet(Gt)===ht.facet(Gt):Gt instanceof Qe?gt.field(Gt,!1)==ht.field(Gt,!1):!0)||(q?se(pt=C(ht),be,O):O(pt=C(ht),be)))return ht.values[N]=be,0}else pt=C(ht);return ht.values[N]=pt,1}}}}function se(V,b,w){if(V.length!=b.length)return!1;for(let C=0;C<V.length;C++)if(!w(V[C],b[C]))return!1;return!0}function ue(V,b){let w=!1;for(let C of b)Ii(V,C)&1&&(w=!0);return w}function qn(V,b,w){let C=w.map(_=>V[_.id]),O=w.map(_=>_.type),L=C.filter(_=>!(_&1)),N=V[b.id]>>1;function q(_){let Z=[];for(let lt=0;lt<C.length;lt++){let ht=ft(_,C[lt]);if(O[lt]==2)for(let gt of ht)Z.push(gt);else Z.push(ht)}return b.combine(Z)}return{create(_){for(let Z of C)Ii(_,Z);return _.values[N]=q(_),1},update(_,Z){if(!ue(_,L))return 0;let lt=q(_);return b.compare(lt,_.values[N])?0:(_.values[N]=lt,1)},reconfigure(_,Z){let lt=ue(_,C),ht=Z.config.facets[b.id],gt=Z.facet(b);if(ht&&!lt&&vt(w,ht))return _.values[N]=gt,0;let pt=q(_);return b.compare(pt,gt)?(_.values[N]=gt,0):(_.values[N]=pt,1)}}}const he=Bt.define({static:!0});class Qe{constructor(b,w,C,O,L){this.id=b,this.createF=w,this.updateF=C,this.compareF=O,this.spec=L,this.provides=void 0}static define(b){let w=new Qe(Rt++,b.create,b.update,b.compare||((C,O)=>C===O),b);return b.provide&&(w.provides=b.provide(w)),w}create(b){let w=b.facet(he).find(C=>C.field==this);return((w==null?void 0:w.create)||this.createF)(b)}slot(b){let w=b[this.id]>>1;return{create:C=>(C.values[w]=this.create(C),1),update:(C,O)=>{let L=C.values[w],N=this.updateF(L,O);return this.compareF(L,N)?0:(C.values[w]=N,1)},reconfigure:(C,O)=>{let L=C.facet(he),N=O.facet(he),q;return(q=L.find(_=>_.field==this))&&q!=N.find(_=>_.field==this)?(C.values[w]=q.create(C),1):O.config.address[this.id]!=null?(C.values[w]=O.field(this),0):(C.values[w]=this.create(C),1)}}}init(b){return[this,he.of({field:this,create:b})]}get extension(){return this}}const Ze={lowest:4,low:3,default:2,high:1,highest:0};function ti(V){return b=>new Zi(b,V)}const Kn={highest:ti(Ze.highest),high:ti(Ze.high),default:ti(Ze.default),low:ti(Ze.low),lowest:ti(Ze.lowest)};class Zi{constructor(b,w){this.inner=b,this.prec=w}}class Ni{of(b){return new Fi(this,b)}reconfigure(b){return Ni.reconfigure.of({compartment:this,extension:b})}get(b){return b.config.compartments.get(this)}}class Fi{constructor(b,w){this.compartment=b,this.inner=w}}class gn{constructor(b,w,C,O,L,N){for(this.base=b,this.compartments=w,this.dynamicSlots=C,this.address=O,this.staticValues=L,this.facets=N,this.statusTemplate=[];this.statusTemplate.length<C.length;)this.statusTemplate.push(0)}staticFacet(b){let w=this.address[b.id];return w==null?b.default:this.staticValues[w>>1]}static resolve(b,w,C){let O=[],L=Object.create(null),N=new Map;for(let gt of as(b,w,N))gt instanceof Qe?O.push(gt):(L[gt.facet.id]||(L[gt.facet.id]=[])).push(gt);let q=Object.create(null),_=[],Z=[];for(let gt of O)q[gt.id]=Z.length<<1,Z.push(pt=>gt.slot(pt));let lt=C==null?void 0:C.config.facets;for(let gt in L){let pt=L[gt],It=pt[0].facet,be=lt&<[gt]||[];if(pt.every(Gt=>Gt.type==0))if(q[It.id]=_.length<<1|1,vt(be,pt))_.push(C.facet(It));else{let Gt=It.combine(pt.map(rn=>rn.value));_.push(C&&It.compare(Gt,C.facet(It))?C.facet(It):Gt)}else{for(let Gt of pt)Gt.type==0?(q[Gt.id]=_.length<<1|1,_.push(Gt.value)):(q[Gt.id]=Z.length<<1,Z.push(rn=>Gt.dynamicSlot(rn)));q[It.id]=Z.length<<1,Z.push(Gt=>qn(Gt,It,pt))}}let ht=Z.map(gt=>gt(q));return new gn(b,N,ht,q,_,L)}}function as(V,b,w){let C=[[],[],[],[],[]],O=new Map;function L(N,q){let _=O.get(N);if(_!=null){if(_<=q)return;let Z=C[_].indexOf(N);Z>-1&&C[_].splice(Z,1),N instanceof Fi&&w.delete(N.compartment)}if(O.set(N,q),Array.isArray(N))for(let Z of N)L(Z,q);else if(N instanceof Fi){if(w.has(N.compartment))throw new RangeError("Duplicate use of compartment in extensions");let Z=b.get(N.compartment)||N.inner;w.set(N.compartment,Z),L(Z,q)}else if(N instanceof Zi)L(N.inner,N.prec);else if(N instanceof Qe)C[q].push(N),N.provides&&L(N.provides,q);else if(N instanceof Zt)C[q].push(N),N.facet.extensions&&L(N.facet.extensions,Ze.default);else{let Z=N.extension;if(!Z)throw new Error(`Unrecognized extension value in extension set (${N}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);L(Z,q)}}return L(V,Ze.default),C.reduce((N,q)=>N.concat(q))}function Ii(V,b){if(b&1)return 2;let w=b>>1,C=V.status[w];if(C==4)throw new Error("Cyclic dependency between fields and/or facets");if(C&2)return C;V.status[w]=4;let O=V.computeSlot(V,V.config.dynamicSlots[w]);return V.status[w]=2|O}function ft(V,b){return b&1?V.config.staticValues[b>>1]:V.values[b>>1]}const jn=Bt.define(),ye=Bt.define({combine:V=>V.some(b=>b),static:!0}),Ke=Bt.define({combine:V=>V.length?V[0]:void 0,static:!0}),hs=Bt.define(),ei=Bt.define(),De=Bt.define(),mn=Bt.define({combine:V=>V.length?V[0]:!1});class Oe{constructor(b,w){this.type=b,this.value=w}static define(){return new ii}}class ii{of(b){return new Oe(this,b)}}class bn{constructor(b){this.map=b}of(b){return new Ht(this,b)}}class Ht{constructor(b,w){this.type=b,this.value=w}map(b){let w=this.type.map(this.value,b);return w===void 0?void 0:w==this.value?this:new Ht(this.type,w)}is(b){return this.type==b}static define(b={}){return new bn(b.map||(w=>w))}static mapEffects(b,w){if(!b.length)return b;let C=[];for(let O of b){let L=O.map(w);L&&C.push(L)}return C}}Ht.reconfigure=Ht.define(),Ht.appendConfig=Ht.define();class ce{constructor(b,w,C,O,L,N){this.startState=b,this.changes=w,this.selection=C,this.effects=O,this.annotations=L,this.scrollIntoView=N,this._doc=null,this._state=null,C&&ne(C,w.newLength),L.some(q=>q.type==ce.time)||(this.annotations=L.concat(ce.time.of(Date.now())))}static create(b,w,C,O,L,N){return new ce(b,w,C,O,L,N)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(b){for(let w of this.annotations)if(w.type==b)return w.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(b){let w=this.annotation(ce.userEvent);return!!(w&&(w==b||w.length>b.length&&w.slice(0,b.length)==b&&w[b.length]=="."))}}ce.time=Oe.define(),ce.userEvent=Oe.define(),ce.addToHistory=Oe.define(),ce.remote=Oe.define();function di(V,b){let w=[];for(let C=0,O=0;;){let L,N;if(C<V.length&&(O==b.length||b[O]>=V[C]))L=V[C++],N=V[C++];else if(O<b.length)L=b[O++],N=b[O++];else return w;!w.length||w[w.length-1]<L?w.push(L,N):w[w.length-1]<N&&(w[w.length-1]=N)}}function yn(V,b,w){var C;let O,L,N;return w?(O=b.changes,L=st.empty(b.changes.length),N=V.changes.compose(b.changes)):(O=b.changes.map(V.changes),L=V.changes.mapDesc(b.changes,!0),N=V.changes.compose(O)),{changes:N,selection:b.selection?b.selection.map(L):(C=V.selection)===null||C===void 0?void 0:C.map(O),effects:Ht.mapEffects(V.effects,O).concat(Ht.mapEffects(b.effects,L)),annotations:V.annotations.length?V.annotations.concat(b.annotations):b.annotations,scrollIntoView:V.scrollIntoView||b.scrollIntoView}}function tn(V,b,w){let C=b.selection,O=Fe(b.annotations);return b.userEvent&&(O=O.concat(ce.userEvent.of(b.userEvent))),{changes:b.changes instanceof st?b.changes:st.of(b.changes||[],w,V.facet(Ke)),selection:C&&(C instanceof Ot?C:Ot.single(C.anchor,C.head)),effects:Fe(b.effects),annotations:O,scrollIntoView:!!b.scrollIntoView}}function _t(V,b,w){let C=tn(V,b.length?b[0]:{},V.doc.length);b.length&&b[0].filter===!1&&(w=!1);for(let L=1;L<b.length;L++){b[L].filter===!1&&(w=!1);let N=!!b[L].sequential;C=yn(C,tn(V,b[L],N?C.changes.newLength:V.doc.length),N)}let O=ce.create(V,C.changes,C.selection,C.effects,C.annotations,C.scrollIntoView);return _e(w?je(O):O)}function je(V){let b=V.startState,w=!0;for(let O of b.facet(hs)){let L=O(V);if(L===!1){w=!1;break}Array.isArray(L)&&(w=w===!0?L:di(w,L))}if(w!==!0){let O,L;if(w===!1)L=V.changes.invertedDesc,O=st.empty(b.doc.length);else{let N=V.changes.filter(w);O=N.changes,L=N.filtered.mapDesc(N.changes).invertedDesc}V=ce.create(b,O,V.selection&&V.selection.map(L),Ht.mapEffects(V.effects,L),V.annotations,V.scrollIntoView)}let C=b.facet(ei);for(let O=C.length-1;O>=0;O--){let L=C[O](V);L instanceof ce?V=L:Array.isArray(L)&&L.length==1&&L[0]instanceof ce?V=L[0]:V=_t(b,Fe(L),!1)}return V}function _e(V){let b=V.startState,w=b.facet(De),C=V;for(let O=w.length-1;O>=0;O--){let L=w[O](V);L&&Object.keys(L).length&&(C=yn(C,tn(b,L,V.changes.newLength),!0))}return C==V?V:ce.create(b,V.changes,V.selection,C.effects,C.annotations,C.scrollIntoView)}const Vt=[];function Fe(V){return V==null?Vt:Array.isArray(V)?V:[V]}n.CharCategory=void 0,function(V){V[V.Word=0]="Word",V[V.Space=1]="Space",V[V.Other=2]="Other"}(n.CharCategory||(n.CharCategory={}));const en=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ge;try{Ge=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function cs(V){if(Ge)return Ge.test(V);for(let b=0;b<V.length;b++){let w=V[b];if(/\w/.test(w)||w>""&&(w.toUpperCase()!=w.toLowerCase()||en.test(w)))return!0}return!1}function er(V){return b=>{if(!/\S/.test(b))return n.CharCategory.Space;if(cs(b))return n.CharCategory.Word;for(let w=0;w<V.length;w++)if(b.indexOf(V[w])>-1)return n.CharCategory.Word;return n.CharCategory.Other}}class Wt{constructor(b,w,C,O,L,N){this.config=b,this.doc=w,this.selection=C,this.values=O,this.status=b.statusTemplate.slice(),this.computeSlot=L,N&&(N._state=this);for(let q=0;q<this.config.dynamicSlots.length;q++)Ii(this,q<<1);this.computeSlot=null}field(b,w=!0){let C=this.config.address[b.id];if(C==null){if(w)throw new RangeError("Field is not present in this state");return}return Ii(this,C),ft(this,C)}update(...b){return _t(this,b,!0)}applyTransaction(b){let w=this.config,{base:C,compartments:O}=w;for(let q of b.effects)q.is(Ni.reconfigure)?(w&&(O=new Map,w.compartments.forEach((_,Z)=>O.set(Z,_)),w=null),O.set(q.value.compartment,q.value.extension)):q.is(Ht.reconfigure)?(w=null,C=q.value):q.is(Ht.appendConfig)&&(w=null,C=Fe(C).concat(q.value));let L;w?L=b.startState.values.slice():(w=gn.resolve(C,O,this),L=new Wt(w,this.doc,this.selection,w.dynamicSlots.map(()=>null),(_,Z)=>Z.reconfigure(_,this),null).values);let N=b.startState.facet(ye)?b.newSelection:b.newSelection.asSingle();new Wt(w,b.newDoc,N,L,(q,_)=>_.update(q,b),b)}replaceSelection(b){return typeof b=="string"&&(b=this.toText(b)),this.changeByRange(w=>({changes:{from:w.from,to:w.to,insert:b},range:Ot.cursor(w.from+b.length)}))}changeByRange(b){let w=this.selection,C=b(w.ranges[0]),O=this.changes(C.changes),L=[C.range],N=Fe(C.effects);for(let q=1;q<w.ranges.length;q++){let _=b(w.ranges[q]),Z=this.changes(_.changes),lt=Z.map(O);for(let gt=0;gt<q;gt++)L[gt]=L[gt].map(lt);let ht=O.mapDesc(Z,!0);L.push(_.range.map(ht)),O=O.compose(lt),N=Ht.mapEffects(N,lt).concat(Ht.mapEffects(Fe(_.effects),ht))}return{changes:O,selection:Ot.create(L,w.mainIndex),effects:N}}changes(b=[]){return b instanceof st?b:st.of(b,this.doc.length,this.facet(Wt.lineSeparator))}toText(b){return e.of(b.split(this.facet(Wt.lineSeparator)||ot))}sliceDoc(b=0,w=this.doc.length){return this.doc.sliceString(b,w,this.lineBreak)}facet(b){let w=this.config.address[b.id];return w==null?b.default:(Ii(this,w),ft(this,w))}toJSON(b){let w={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(b)for(let C in b){let O=b[C];O instanceof Qe&&this.config.address[O.id]!=null&&(w[C]=O.spec.toJSON(this.field(b[C]),this))}return w}static fromJSON(b,w={},C){if(!b||typeof b.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let O=[];if(C){for(let L in C)if(Object.prototype.hasOwnProperty.call(b,L)){let N=C[L],q=b[L];O.push(N.init(_=>N.spec.fromJSON(q,_)))}}return Wt.create({doc:b.doc,selection:Ot.fromJSON(b.selection),extensions:w.extensions?O.concat([w.extensions]):O})}static create(b={}){let w=gn.resolve(b.extensions||[],new Map),C=b.doc instanceof e?b.doc:e.of((b.doc||"").split(w.staticFacet(Wt.lineSeparator)||ot)),O=b.selection?b.selection instanceof Ot?b.selection:Ot.single(b.selection.anchor,b.selection.head):Ot.single(0);return ne(O,C.length),w.staticFacet(ye)||(O=O.asSingle()),new Wt(w,C,O,w.dynamicSlots.map(()=>null),(L,N)=>N.create(L),null)}get tabSize(){return this.facet(Wt.tabSize)}get lineBreak(){return this.facet(Wt.lineSeparator)||`
|