@cyberskill/cyber-editor 3.8.7 → 3.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -231
- package/dist/client/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/client/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/client/assets/manifest-e1ae6e39.js +1 -0
- package/dist/client/chunk-D4RADZKF-CqCYZIAv.js +6257 -0
- package/dist/client/chunk-D4RADZKF-sLhgGPy5.cjs +56 -0
- package/dist/client/cyber-editor.cjs.js +259 -0
- package/dist/client/cyber-editor.cjs2.js +1 -0
- package/dist/client/cyber-editor.cjs3.js +1 -0
- package/dist/client/cyber-editor.cjs4.js +604 -0
- package/dist/client/cyber-editor.cjs5.js +1 -0
- package/dist/client/cyber-editor.css +1 -0
- package/dist/client/cyber-editor.es.js +25364 -0
- package/dist/client/cyber-editor.es2.js +55 -0
- package/dist/client/cyber-editor.es3.js +11 -0
- package/dist/{cyber-editor.es.js → client/cyber-editor.es4.js} +13995 -15985
- package/dist/client/cyber-editor.es5.js +11 -0
- package/dist/client/index-HJNgKdvE.cjs +5 -0
- package/dist/client/index-rkLJDvut.js +156 -0
- package/dist/client/index.html +6 -0
- package/dist/client/with-props-Ba4118z_.js +27 -0
- package/dist/client/with-props-CuGIah2q.cjs +1 -0
- package/package.json +87 -71
- package/dist/cyber-editor.cjs.js +0 -638
- package/dist/cyber-editor.css +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/modules/accordion/accordion-extension.d.ts +0 -2
- package/dist/modules/accordion/accordion-extension.type.d.ts +0 -11
- package/dist/modules/accordion/accordion-view.component.d.ts +0 -2
- package/dist/modules/accordion/accordion-view.type.d.ts +0 -5
- package/dist/modules/accordion/index.d.ts +0 -4
- package/dist/modules/color-picker/color-picker.component.d.ts +0 -2
- package/dist/modules/color-picker/color-picker.type.d.ts +0 -4
- package/dist/modules/color-picker/index.d.ts +0 -2
- package/dist/modules/heading/heading.component.d.ts +0 -2
- package/dist/modules/heading/heading.type.d.ts +0 -4
- package/dist/modules/heading/index.d.ts +0 -2
- package/dist/modules/image/image-view.component.d.ts +0 -2
- package/dist/modules/image/image-view.type.d.ts +0 -4
- package/dist/modules/image/image.d.ts +0 -2
- package/dist/modules/image/image.type.d.ts +0 -12
- package/dist/modules/image/index.d.ts +0 -4
- package/dist/modules/index.d.ts +0 -6
- package/dist/modules/table/index.d.ts +0 -2
- package/dist/modules/table/table.component.d.ts +0 -2
- package/dist/modules/table/table.type.d.ts +0 -6
- package/dist/modules/toolbar/custom.d.ts +0 -1
- package/dist/modules/toolbar/index.d.ts +0 -1
- package/dist/root.d.ts +0 -1
- package/dist/shared/components/color-picker/color-picker.component.d.ts +0 -2
- package/dist/shared/components/color-picker/color-picker.type.d.ts +0 -5
- package/dist/shared/components/color-picker/index.d.ts +0 -2
- package/dist/shared/components/index.d.ts +0 -2
- package/dist/shared/components/modal-edit/index.d.ts +0 -2
- package/dist/shared/components/modal-edit/modal-edit.component.d.ts +0 -2
- package/dist/shared/components/modal-edit/modal-edit.type.d.ts +0 -6
- package/dist/shared/configs/env.d.ts +0 -2
- package/dist/shared/constants/alias.d.ts +0 -4
- package/dist/shared/constants/index.d.ts +0 -1
- package/dist/shared/providers/editor.d.ts +0 -3
- package/dist/shared/providers/index.d.ts +0 -1
- package/dist/shared/typescript/index.d.ts +0 -8
- package/dist/shared/utils/extensions.d.ts +0 -1
- package/dist/shared/utils/index.d.ts +0 -1
- /package/dist/{assets → client/assets}/icons/index.ts +0 -0
- /package/dist/{favicon.svg → client/favicon.svg} +0 -0
package/dist/cyber-editor.cjs.js
DELETED
|
@@ -1,638 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),_r=require("react-dom");function C0(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const h=C0($),S0=C0(_r),Uw={"cyber-editor":"_cyber-editor_1liko_1"};var Ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Js={exports:{}},Ta={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Zp;function Xw(){if(Zp)return Ta;Zp=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:t,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Ta.Fragment=e,Ta.jsx=n,Ta.jsxs=n,Ta}var Pa={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var em;function Yw(){return em||(em=1,process.env.NODE_ENV!=="production"&&function(){function t(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===_?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case w:return"Fragment";case S:return"Portal";case N:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case k:return"SuspenseList"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case M:return(z.displayName||"Context")+".Provider";case O:return(z._context.displayName||"Context")+".Consumer";case I:var ve=z.render;return z=z.displayName,z||(z=ve.displayName||ve.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case P:return ve=z.displayName||null,ve!==null?ve:t(z.type)||"Memo";case j:ve=z._payload,z=z._init;try{return t(z(ve))}catch{}}return null}function e(z){return""+z}function n(z){try{e(z);var ve=!1}catch{ve=!0}if(ve){ve=console;var ae=ve.error,he=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return ae.call(ve,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",he),e(z)}}function r(){}function o(){if(H===0){G=console.log,J=console.info,se=console.warn,X=console.error,de=console.group,ye=console.groupCollapsed,ce=console.groupEnd;var z={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}H++}function i(){if(H--,H===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},z,{value:G}),info:V({},z,{value:J}),warn:V({},z,{value:se}),error:V({},z,{value:X}),group:V({},z,{value:de}),groupCollapsed:V({},z,{value:ye}),groupEnd:V({},z,{value:ce})})}0>H&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a(z){if(oe===void 0)try{throw Error()}catch(ae){var ve=ae.stack.trim().match(/\n( *(at )?)/);oe=ve&&ve[1]||"",me=-1<ae.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<ae.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+oe+z+me}function s(z,ve){if(!z||te)return"";var ae=le.get(z);if(ae!==void 0)return ae;te=!0,ae=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var he=null;he=W.H,W.H=null,o();try{var $e={DetermineComponentFrameRoot:function(){try{if(ve){var Pe=function(){throw Error()};if(Object.defineProperty(Pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pe,[])}catch(_e){var je=_e}Reflect.construct(z,[],Pe)}else{try{Pe.call()}catch(_e){je=_e}z.call(Pe.prototype)}}else{try{throw Error()}catch(_e){je=_e}(Pe=z())&&typeof Pe.catch=="function"&&Pe.catch(function(){})}}catch(_e){if(_e&&je&&typeof _e.stack=="string")return[_e.stack,je.stack]}return[null,null]}};$e.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Me=Object.getOwnPropertyDescriptor($e.DetermineComponentFrameRoot,"name");Me&&Me.configurable&&Object.defineProperty($e.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var we=$e.DetermineComponentFrameRoot(),ze=we[0],Le=we[1];if(ze&&Le){var Ie=ze.split(`
|
|
20
|
-
`),We=Le.split(`
|
|
21
|
-
`);for(we=Me=0;Me<Ie.length&&!Ie[Me].includes("DetermineComponentFrameRoot");)Me++;for(;we<We.length&&!We[we].includes("DetermineComponentFrameRoot");)we++;if(Me===Ie.length||we===We.length)for(Me=Ie.length-1,we=We.length-1;1<=Me&&0<=we&&Ie[Me]!==We[we];)we--;for(;1<=Me&&0<=we;Me--,we--)if(Ie[Me]!==We[we]){if(Me!==1||we!==1)do if(Me--,we--,0>we||Ie[Me]!==We[we]){var Ke=`
|
|
22
|
-
`+Ie[Me].replace(" at new "," at ");return z.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",z.displayName)),typeof z=="function"&&le.set(z,Ke),Ke}while(1<=Me&&0<=we);break}}}finally{te=!1,W.H=he,i(),Error.prepareStackTrace=ae}return Ie=(Ie=z?z.displayName||z.name:"")?a(Ie):"",typeof z=="function"&&le.set(z,Ie),Ie}function l(z){if(z==null)return"";if(typeof z=="function"){var ve=z.prototype;return s(z,!(!ve||!ve.isReactComponent))}if(typeof z=="string")return a(z);switch(z){case D:return a("Suspense");case k:return a("SuspenseList")}if(typeof z=="object")switch(z.$$typeof){case I:return z=s(z.render,!1),z;case P:return l(z.type);case j:ve=z._payload,z=z._init;try{return l(z(ve))}catch{}}return""}function c(){var z=W.A;return z===null?null:z.getOwner()}function u(z){if(L.call(z,"key")){var ve=Object.getOwnPropertyDescriptor(z,"key").get;if(ve&&ve.isReactWarning)return!1}return z.key!==void 0}function d(z,ve){function ae(){Ee||(Ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ve))}ae.isReactWarning=!0,Object.defineProperty(z,"key",{get:ae,configurable:!0})}function f(){var z=t(this.type);return Oe[z]||(Oe[z]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),z=this.props.ref,z!==void 0?z:null}function p(z,ve,ae,he,$e,Me){return ae=Me.ref,z={$$typeof:x,type:z,key:ve,props:Me,_owner:$e},(ae!==void 0?ae:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:f}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function m(z,ve,ae,he,$e,Me){if(typeof z=="string"||typeof z=="function"||z===w||z===N||z===E||z===D||z===k||z===A||typeof z=="object"&&z!==null&&(z.$$typeof===j||z.$$typeof===P||z.$$typeof===M||z.$$typeof===O||z.$$typeof===I||z.$$typeof===U||z.getModuleId!==void 0)){var we=ve.children;if(we!==void 0)if(he)if(Y(we)){for(he=0;he<we.length;he++)v(we[he],z);Object.freeze&&Object.freeze(we)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(we,z)}else we="",(z===void 0||typeof z=="object"&&z!==null&&Object.keys(z).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),z===null?he="null":Y(z)?he="array":z!==void 0&&z.$$typeof===x?(he="<"+(t(z.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):he=typeof z,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",he,we);if(L.call(ve,"key")){we=t(z);var ze=Object.keys(ve).filter(function(Ie){return Ie!=="key"});he=0<ze.length?"{key: someKey, "+ze.join(": ..., ")+": ...}":"{key: someKey}",xe[we+he]||(ze=0<ze.length?"{"+ze.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
|
-
let props = %s;
|
|
24
|
-
<%s {...props} />
|
|
25
|
-
React keys must be passed directly to JSX without using spread:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,he,we,ze,we),xe[we+he]=!0)}if(we=null,ae!==void 0&&(n(ae),we=""+ae),u(ve)&&(n(ve.key),we=""+ve.key),"key"in ve){ae={};for(var Le in ve)Le!=="key"&&(ae[Le]=ve[Le])}else ae=ve;return we&&d(ae,typeof z=="function"?z.displayName||z.name||"Unknown":z),p(z,we,Me,$e,c(),ae)}function v(z,ve){if(typeof z=="object"&&z&&z.$$typeof!==fe){if(Y(z))for(var ae=0;ae<z.length;ae++){var he=z[ae];g(he)&&y(he,ve)}else if(g(z))z._store&&(z._store.validated=1);else if(z===null||typeof z!="object"?ae=null:(ae=T&&z[T]||z["@@iterator"],ae=typeof ae=="function"?ae:null),typeof ae=="function"&&ae!==z.entries&&(ae=ae.call(z),ae!==z))for(;!(z=ae.next()).done;)g(z.value)&&y(z.value,ve)}}function g(z){return typeof z=="object"&&z!==null&&z.$$typeof===x}function y(z,ve){if(z._store&&!z._store.validated&&z.key==null&&(z._store.validated=1,ve=b(ve),!Be[ve])){Be[ve]=!0;var ae="";z&&z._owner!=null&&z._owner!==c()&&(ae=null,typeof z._owner.tag=="number"?ae=t(z._owner.type):typeof z._owner.name=="string"&&(ae=z._owner.name),ae=" It was passed a child from "+ae+".");var he=W.getCurrentStack;W.getCurrentStack=function(){var $e=l(z.type);return he&&($e+=he()||""),$e},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',ve,ae),W.getCurrentStack=he}}function b(z){var ve="",ae=c();return ae&&(ae=t(ae.type))&&(ve=`
|
|
28
|
-
|
|
29
|
-
Check the render method of \``+ae+"`."),ve||(z=t(z))&&(ve=`
|
|
30
|
-
|
|
31
|
-
Check the top-level render call using <`+z+">."),ve}var C=$,x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),M=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),T=Symbol.iterator,_=Symbol.for("react.client.reference"),W=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,V=Object.assign,U=Symbol.for("react.client.reference"),Y=Array.isArray,H=0,G,J,se,X,de,ye,ce;r.__reactDisabledLog=!0;var oe,me,te=!1,le=new(typeof WeakMap=="function"?WeakMap:Map),fe=Symbol.for("react.client.reference"),Ee,Oe={},xe={},Be={};Pa.Fragment=w,Pa.jsx=function(z,ve,ae,he,$e){return m(z,ve,ae,!1,he,$e)},Pa.jsxs=function(z,ve,ae,he,$e){return m(z,ve,ae,!0,he,$e)}}()),Pa}var tm;function Jw(){return tm||(tm=1,process.env.NODE_ENV==="production"?Js.exports=Xw():Js.exports=Yw()),Js.exports}var pe=Jw(),Su={exports:{}};/*!
|
|
32
|
-
Copyright (c) 2018 Jed Watson.
|
|
33
|
-
Licensed under the MIT License (MIT), see
|
|
34
|
-
http://jedwatson.github.io/classnames
|
|
35
|
-
*/var nm;function Qw(){return nm||(nm=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)e.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(Su)),Su.exports}var Zw=Qw();const ee=Gw(Zw),eE="_fullscreen_giq1a_2",tE="_block_giq1a_3",nE="_container_giq1a_31",rE="_ring_giq1a_39",oE="_message_giq1a_70",Eo={fullscreen:eE,block:tE,container:nE,ring:rE,message:oE};function Qs(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xu={exports:{}};/*!
|
|
36
|
-
localForage -- Offline Storage, Improved
|
|
37
|
-
Version 1.10.0
|
|
38
|
-
https://localforage.github.io/localForage
|
|
39
|
-
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
40
|
-
*/var rm;function iE(){return rm||(rm=1,function(t,e){(function(n){t.exports=n()})(function(){return function n(r,o,i){function a(c,u){if(!o[c]){if(!r[c]){var d=typeof Qs=="function"&&Qs;if(!u&&d)return d(c,!0);if(s)return s(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var p=o[c]={exports:{}};r[c][0].call(p.exports,function(m){var v=r[c][1][m];return a(v||m)},p,p.exports,n,r,o,i)}return o[c].exports}for(var s=typeof Qs=="function"&&Qs,l=0;l<i.length;l++)a(i[l]);return a}({1:[function(n,r,o){(function(i){var a=i.MutationObserver||i.WebKitMutationObserver,s;if(a){var l=0,c=new a(m),u=i.document.createTextNode("");c.observe(u,{characterData:!0}),s=function(){u.data=l=++l%2}}else if(!i.setImmediate&&typeof i.MessageChannel<"u"){var d=new i.MessageChannel;d.port1.onmessage=m,s=function(){d.port2.postMessage(0)}}else"document"in i&&"onreadystatechange"in i.document.createElement("script")?s=function(){var g=i.document.createElement("script");g.onreadystatechange=function(){m(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},i.document.documentElement.appendChild(g)}:s=function(){setTimeout(m,0)};var f,p=[];function m(){f=!0;for(var g,y,b=p.length;b;){for(y=p,p=[],g=-1;++g<b;)y[g]();b=p.length}f=!1}r.exports=v;function v(g){p.push(g)===1&&!f&&s()}}).call(this,typeof Ys<"u"?Ys:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,r,o){var i=n(1);function a(){}var s={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];r.exports=d;function d(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,S!==a&&v(this,S)}d.prototype.catch=function(S){return this.then(null,S)},d.prototype.then=function(S,w){if(typeof S!="function"&&this.state===c||typeof w!="function"&&this.state===l)return this;var E=new this.constructor(a);if(this.state!==u){var N=this.state===c?S:w;p(E,N,this.outcome)}else this.queue.push(new f(E,S,w));return E};function f(S,w,E){this.promise=S,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}f.prototype.callFulfilled=function(S){s.resolve(this.promise,S)},f.prototype.otherCallFulfilled=function(S){p(this.promise,this.onFulfilled,S)},f.prototype.callRejected=function(S){s.reject(this.promise,S)},f.prototype.otherCallRejected=function(S){p(this.promise,this.onRejected,S)};function p(S,w,E){i(function(){var N;try{N=w(E)}catch(O){return s.reject(S,O)}N===S?s.reject(S,new TypeError("Cannot resolve promise with itself")):s.resolve(S,N)})}s.resolve=function(S,w){var E=g(m,w);if(E.status==="error")return s.reject(S,E.value);var N=E.value;if(N)v(S,N);else{S.state=c,S.outcome=w;for(var O=-1,M=S.queue.length;++O<M;)S.queue[O].callFulfilled(w)}return S},s.reject=function(S,w){S.state=l,S.outcome=w;for(var E=-1,N=S.queue.length;++E<N;)S.queue[E].callRejected(w);return S};function m(S){var w=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof w=="function")return function(){w.apply(S,arguments)}}function v(S,w){var E=!1;function N(D){E||(E=!0,s.reject(S,D))}function O(D){E||(E=!0,s.resolve(S,D))}function M(){w(O,N)}var I=g(M);I.status==="error"&&N(I.value)}function g(S,w){var E={};try{E.value=S(w),E.status="success"}catch(N){E.status="error",E.value=N}return E}d.resolve=y;function y(S){return S instanceof this?S:s.resolve(new this(a),S)}d.reject=b;function b(S){var w=new this(a);return s.reject(w,S)}d.all=C;function C(S){var w=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=S.length,N=!1;if(!E)return this.resolve([]);for(var O=new Array(E),M=0,I=-1,D=new this(a);++I<E;)k(S[I],I);return D;function k(P,j){w.resolve(P).then(A,function(T){N||(N=!0,s.reject(D,T))});function A(T){O[j]=T,++M===E&&!N&&(N=!0,s.resolve(D,O))}}}d.race=x;function x(S){var w=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=S.length,N=!1;if(!E)return this.resolve([]);for(var O=-1,M=new this(a);++O<E;)I(S[O]);return M;function I(D){w.resolve(D).then(function(k){N||(N=!0,s.resolve(M,k))},function(k){N||(N=!0,s.reject(M,k))})}}},{1:1}],3:[function(n,r,o){(function(i){typeof i.Promise!="function"&&(i.Promise=n(2))}).call(this,typeof Ys<"u"?Ys:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,r,o){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R};function a(R,K){if(!(R instanceof K))throw new TypeError("Cannot call a class as a function")}function s(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var l=s();function c(){try{if(!l||!l.open)return!1;var R=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),K=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!R||K)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function u(R,K){R=R||[],K=K||{};try{return new Blob(R,K)}catch(Q){if(Q.name!=="TypeError")throw Q;for(var B=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,Z=new B,ne=0;ne<R.length;ne+=1)Z.append(R[ne]);return Z.getBlob(K.type)}}typeof Promise>"u"&&n(3);var d=Promise;function f(R,K){K&&R.then(function(B){K(null,B)},function(B){K(B)})}function p(R,K,B){typeof K=="function"&&R.then(K),typeof B=="function"&&R.catch(B)}function m(R){return typeof R!="string"&&(console.warn(R+" used as a key, but it is not a string."),R=String(R)),R}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",y=void 0,b={},C=Object.prototype.toString,x="readonly",S="readwrite";function w(R){for(var K=R.length,B=new ArrayBuffer(K),Z=new Uint8Array(B),ne=0;ne<K;ne++)Z[ne]=R.charCodeAt(ne);return B}function E(R){return new d(function(K){var B=R.transaction(g,S),Z=u([""]);B.objectStore(g).put(Z,"key"),B.onabort=function(ne){ne.preventDefault(),ne.stopPropagation(),K(!1)},B.oncomplete=function(){var ne=navigator.userAgent.match(/Chrome\/(\d+)/),Q=navigator.userAgent.match(/Edge\//);K(Q||!ne||parseInt(ne[1],10)>=43)}}).catch(function(){return!1})}function N(R){return typeof y=="boolean"?d.resolve(y):E(R).then(function(K){return y=K,y})}function O(R){var K=b[R.name],B={};B.promise=new d(function(Z,ne){B.resolve=Z,B.reject=ne}),K.deferredOperations.push(B),K.dbReady?K.dbReady=K.dbReady.then(function(){return B.promise}):K.dbReady=B.promise}function M(R){var K=b[R.name],B=K.deferredOperations.pop();if(B)return B.resolve(),B.promise}function I(R,K){var B=b[R.name],Z=B.deferredOperations.pop();if(Z)return Z.reject(K),Z.promise}function D(R,K){return new d(function(B,Z){if(b[R.name]=b[R.name]||U(),R.db)if(K)O(R),R.db.close();else return B(R.db);var ne=[R.name];K&&ne.push(R.version);var Q=l.open.apply(l,ne);K&&(Q.onupgradeneeded=function(Ce){var ge=Q.result;try{ge.createObjectStore(R.storeName),Ce.oldVersion<=1&&ge.createObjectStore(g)}catch(ue){if(ue.name==="ConstraintError")console.warn('The database "'+R.name+'" has been upgraded from version '+Ce.oldVersion+" to version "+Ce.newVersion+', but the storage "'+R.storeName+'" already exists.');else throw ue}}),Q.onerror=function(Ce){Ce.preventDefault(),Z(Q.error)},Q.onsuccess=function(){var Ce=Q.result;Ce.onversionchange=function(ge){ge.target.close()},B(Ce),M(R)}})}function k(R){return D(R,!1)}function P(R){return D(R,!0)}function j(R,K){if(!R.db)return!0;var B=!R.db.objectStoreNames.contains(R.storeName),Z=R.version<R.db.version,ne=R.version>R.db.version;if(Z&&(R.version!==K&&console.warn('The database "'+R.name+`" can't be downgraded from version `+R.db.version+" to version "+R.version+"."),R.version=R.db.version),ne||B){if(B){var Q=R.db.version+1;Q>R.version&&(R.version=Q)}return!0}return!1}function A(R){return new d(function(K,B){var Z=new FileReader;Z.onerror=B,Z.onloadend=function(ne){var Q=btoa(ne.target.result||"");K({__local_forage_encoded_blob:!0,data:Q,type:R.type})},Z.readAsBinaryString(R)})}function T(R){var K=w(atob(R.data));return u([K],{type:R.type})}function _(R){return R&&R.__local_forage_encoded_blob}function W(R){var K=this,B=K._initReady().then(function(){var Z=b[K._dbInfo.name];if(Z&&Z.dbReady)return Z.dbReady});return p(B,R,R),B}function L(R){O(R);for(var K=b[R.name],B=K.forages,Z=0;Z<B.length;Z++){var ne=B[Z];ne._dbInfo.db&&(ne._dbInfo.db.close(),ne._dbInfo.db=null)}return R.db=null,k(R).then(function(Q){return R.db=Q,j(R)?P(R):Q}).then(function(Q){R.db=K.db=Q;for(var Ce=0;Ce<B.length;Ce++)B[Ce]._dbInfo.db=Q}).catch(function(Q){throw I(R,Q),Q})}function V(R,K,B,Z){Z===void 0&&(Z=1);try{var ne=R.db.transaction(R.storeName,K);B(null,ne)}catch(Q){if(Z>0&&(!R.db||Q.name==="InvalidStateError"||Q.name==="NotFoundError"))return d.resolve().then(function(){if(!R.db||Q.name==="NotFoundError"&&!R.db.objectStoreNames.contains(R.storeName)&&R.version<=R.db.version)return R.db&&(R.version=R.db.version+1),P(R)}).then(function(){return L(R).then(function(){V(R,K,B,Z-1)})}).catch(B);B(Q)}}function U(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Y(R){var K=this,B={db:null};if(R)for(var Z in R)B[Z]=R[Z];var ne=b[B.name];ne||(ne=U(),b[B.name]=ne),ne.forages.push(K),K._initReady||(K._initReady=K.ready,K.ready=W);var Q=[];function Ce(){return d.resolve()}for(var ge=0;ge<ne.forages.length;ge++){var ue=ne.forages[ge];ue!==K&&Q.push(ue._initReady().catch(Ce))}var be=ne.forages.slice(0);return d.all(Q).then(function(){return B.db=ne.db,k(B)}).then(function(Se){return B.db=Se,j(B,K._defaultConfig.version)?P(B):Se}).then(function(Se){B.db=ne.db=Se,K._dbInfo=B;for(var Te=0;Te<be.length;Te++){var tt=be[Te];tt!==K&&(tt._dbInfo.db=B.db,tt._dbInfo.version=B.version)}})}function H(R,K){var B=this;R=m(R);var Z=new d(function(ne,Q){B.ready().then(function(){V(B._dbInfo,x,function(Ce,ge){if(Ce)return Q(Ce);try{var ue=ge.objectStore(B._dbInfo.storeName),be=ue.get(R);be.onsuccess=function(){var Se=be.result;Se===void 0&&(Se=null),_(Se)&&(Se=T(Se)),ne(Se)},be.onerror=function(){Q(be.error)}}catch(Se){Q(Se)}})}).catch(Q)});return f(Z,K),Z}function G(R,K){var B=this,Z=new d(function(ne,Q){B.ready().then(function(){V(B._dbInfo,x,function(Ce,ge){if(Ce)return Q(Ce);try{var ue=ge.objectStore(B._dbInfo.storeName),be=ue.openCursor(),Se=1;be.onsuccess=function(){var Te=be.result;if(Te){var tt=Te.value;_(tt)&&(tt=T(tt));var bt=R(tt,Te.key,Se++);bt!==void 0?ne(bt):Te.continue()}else ne()},be.onerror=function(){Q(be.error)}}catch(Te){Q(Te)}})}).catch(Q)});return f(Z,K),Z}function J(R,K,B){var Z=this;R=m(R);var ne=new d(function(Q,Ce){var ge;Z.ready().then(function(){return ge=Z._dbInfo,C.call(K)==="[object Blob]"?N(ge.db).then(function(ue){return ue?K:A(K)}):K}).then(function(ue){V(Z._dbInfo,S,function(be,Se){if(be)return Ce(be);try{var Te=Se.objectStore(Z._dbInfo.storeName);ue===null&&(ue=void 0);var tt=Te.put(ue,R);Se.oncomplete=function(){ue===void 0&&(ue=null),Q(ue)},Se.onabort=Se.onerror=function(){var bt=tt.error?tt.error:tt.transaction.error;Ce(bt)}}catch(bt){Ce(bt)}})}).catch(Ce)});return f(ne,B),ne}function se(R,K){var B=this;R=m(R);var Z=new d(function(ne,Q){B.ready().then(function(){V(B._dbInfo,S,function(Ce,ge){if(Ce)return Q(Ce);try{var ue=ge.objectStore(B._dbInfo.storeName),be=ue.delete(R);ge.oncomplete=function(){ne()},ge.onerror=function(){Q(be.error)},ge.onabort=function(){var Se=be.error?be.error:be.transaction.error;Q(Se)}}catch(Se){Q(Se)}})}).catch(Q)});return f(Z,K),Z}function X(R){var K=this,B=new d(function(Z,ne){K.ready().then(function(){V(K._dbInfo,S,function(Q,Ce){if(Q)return ne(Q);try{var ge=Ce.objectStore(K._dbInfo.storeName),ue=ge.clear();Ce.oncomplete=function(){Z()},Ce.onabort=Ce.onerror=function(){var be=ue.error?ue.error:ue.transaction.error;ne(be)}}catch(be){ne(be)}})}).catch(ne)});return f(B,R),B}function de(R){var K=this,B=new d(function(Z,ne){K.ready().then(function(){V(K._dbInfo,x,function(Q,Ce){if(Q)return ne(Q);try{var ge=Ce.objectStore(K._dbInfo.storeName),ue=ge.count();ue.onsuccess=function(){Z(ue.result)},ue.onerror=function(){ne(ue.error)}}catch(be){ne(be)}})}).catch(ne)});return f(B,R),B}function ye(R,K){var B=this,Z=new d(function(ne,Q){if(R<0){ne(null);return}B.ready().then(function(){V(B._dbInfo,x,function(Ce,ge){if(Ce)return Q(Ce);try{var ue=ge.objectStore(B._dbInfo.storeName),be=!1,Se=ue.openKeyCursor();Se.onsuccess=function(){var Te=Se.result;if(!Te){ne(null);return}R===0||be?ne(Te.key):(be=!0,Te.advance(R))},Se.onerror=function(){Q(Se.error)}}catch(Te){Q(Te)}})}).catch(Q)});return f(Z,K),Z}function ce(R){var K=this,B=new d(function(Z,ne){K.ready().then(function(){V(K._dbInfo,x,function(Q,Ce){if(Q)return ne(Q);try{var ge=Ce.objectStore(K._dbInfo.storeName),ue=ge.openKeyCursor(),be=[];ue.onsuccess=function(){var Se=ue.result;if(!Se){Z(be);return}be.push(Se.key),Se.continue()},ue.onerror=function(){ne(ue.error)}}catch(Se){ne(Se)}})}).catch(ne)});return f(B,R),B}function oe(R,K){K=v.apply(this,arguments);var B=this.config();R=typeof R!="function"&&R||{},R.name||(R.name=R.name||B.name,R.storeName=R.storeName||B.storeName);var Z=this,ne;if(!R.name)ne=d.reject("Invalid arguments");else{var Q=R.name===B.name&&Z._dbInfo.db,Ce=Q?d.resolve(Z._dbInfo.db):k(R).then(function(ge){var ue=b[R.name],be=ue.forages;ue.db=ge;for(var Se=0;Se<be.length;Se++)be[Se]._dbInfo.db=ge;return ge});R.storeName?ne=Ce.then(function(ge){if(ge.objectStoreNames.contains(R.storeName)){var ue=ge.version+1;O(R);var be=b[R.name],Se=be.forages;ge.close();for(var Te=0;Te<Se.length;Te++){var tt=Se[Te];tt._dbInfo.db=null,tt._dbInfo.version=ue}var bt=new d(function(Ct,zt){var jt=l.open(R.name,ue);jt.onerror=function(nn){var gn=jt.result;gn.close(),zt(nn)},jt.onupgradeneeded=function(){var nn=jt.result;nn.deleteObjectStore(R.storeName)},jt.onsuccess=function(){var nn=jt.result;nn.close(),Ct(nn)}});return bt.then(function(Ct){be.db=Ct;for(var zt=0;zt<Se.length;zt++){var jt=Se[zt];jt._dbInfo.db=Ct,M(jt._dbInfo)}}).catch(function(Ct){throw(I(R,Ct)||d.resolve()).catch(function(){}),Ct})}}):ne=Ce.then(function(ge){O(R);var ue=b[R.name],be=ue.forages;ge.close();for(var Se=0;Se<be.length;Se++){var Te=be[Se];Te._dbInfo.db=null}var tt=new d(function(bt,Ct){var zt=l.deleteDatabase(R.name);zt.onerror=function(){var jt=zt.result;jt&&jt.close(),Ct(zt.error)},zt.onblocked=function(){console.warn('dropInstance blocked for database "'+R.name+'" until all open connections are closed')},zt.onsuccess=function(){var jt=zt.result;jt&&jt.close(),bt(jt)}});return tt.then(function(bt){ue.db=bt;for(var Ct=0;Ct<be.length;Ct++){var zt=be[Ct];M(zt._dbInfo)}}).catch(function(bt){throw(I(R,bt)||d.resolve()).catch(function(){}),bt})})}return f(ne,K),ne}var me={_driver:"asyncStorage",_initStorage:Y,_support:c(),iterate:G,getItem:H,setItem:J,removeItem:se,clear:X,length:de,key:ye,keys:ce,dropInstance:oe};function te(){return typeof openDatabase=="function"}var le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fe="~~local_forage_type~",Ee=/^~~local_forage_type~([^~]+)~/,Oe="__lfsc__:",xe=Oe.length,Be="arbf",z="blob",ve="si08",ae="ui08",he="uic8",$e="si16",Me="si32",we="ur16",ze="ui32",Le="fl32",Ie="fl64",We=xe+Be.length,Ke=Object.prototype.toString;function Pe(R){var K=R.length*.75,B=R.length,Z,ne=0,Q,Ce,ge,ue;R[R.length-1]==="="&&(K--,R[R.length-2]==="="&&K--);var be=new ArrayBuffer(K),Se=new Uint8Array(be);for(Z=0;Z<B;Z+=4)Q=le.indexOf(R[Z]),Ce=le.indexOf(R[Z+1]),ge=le.indexOf(R[Z+2]),ue=le.indexOf(R[Z+3]),Se[ne++]=Q<<2|Ce>>4,Se[ne++]=(Ce&15)<<4|ge>>2,Se[ne++]=(ge&3)<<6|ue&63;return be}function je(R){var K=new Uint8Array(R),B="",Z;for(Z=0;Z<K.length;Z+=3)B+=le[K[Z]>>2],B+=le[(K[Z]&3)<<4|K[Z+1]>>4],B+=le[(K[Z+1]&15)<<2|K[Z+2]>>6],B+=le[K[Z+2]&63];return K.length%3===2?B=B.substring(0,B.length-1)+"=":K.length%3===1&&(B=B.substring(0,B.length-2)+"=="),B}function _e(R,K){var B="";if(R&&(B=Ke.call(R)),R&&(B==="[object ArrayBuffer]"||R.buffer&&Ke.call(R.buffer)==="[object ArrayBuffer]")){var Z,ne=Oe;R instanceof ArrayBuffer?(Z=R,ne+=Be):(Z=R.buffer,B==="[object Int8Array]"?ne+=ve:B==="[object Uint8Array]"?ne+=ae:B==="[object Uint8ClampedArray]"?ne+=he:B==="[object Int16Array]"?ne+=$e:B==="[object Uint16Array]"?ne+=we:B==="[object Int32Array]"?ne+=Me:B==="[object Uint32Array]"?ne+=ze:B==="[object Float32Array]"?ne+=Le:B==="[object Float64Array]"?ne+=Ie:K(new Error("Failed to get type for BinaryArray"))),K(ne+je(Z))}else if(B==="[object Blob]"){var Q=new FileReader;Q.onload=function(){var Ce=fe+R.type+"~"+je(this.result);K(Oe+z+Ce)},Q.readAsArrayBuffer(R)}else try{K(JSON.stringify(R))}catch(Ce){console.error("Couldn't convert value into a JSON string: ",R),K(null,Ce)}}function Fe(R){if(R.substring(0,xe)!==Oe)return JSON.parse(R);var K=R.substring(We),B=R.substring(xe,We),Z;if(B===z&&Ee.test(K)){var ne=K.match(Ee);Z=ne[1],K=K.substring(ne[0].length)}var Q=Pe(K);switch(B){case Be:return Q;case z:return u([Q],{type:Z});case ve:return new Int8Array(Q);case ae:return new Uint8Array(Q);case he:return new Uint8ClampedArray(Q);case $e:return new Int16Array(Q);case we:return new Uint16Array(Q);case Me:return new Int32Array(Q);case ze:return new Uint32Array(Q);case Le:return new Float32Array(Q);case Ie:return new Float64Array(Q);default:throw new Error("Unkown type: "+B)}}var Ze={serialize:_e,deserialize:Fe,stringToBuffer:Pe,bufferToString:je};function ht(R,K,B,Z){R.executeSql("CREATE TABLE IF NOT EXISTS "+K.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],B,Z)}function Tt(R){var K=this,B={db:null};if(R)for(var Z in R)B[Z]=typeof R[Z]!="string"?R[Z].toString():R[Z];var ne=new d(function(Q,Ce){try{B.db=openDatabase(B.name,String(B.version),B.description,B.size)}catch(ge){return Ce(ge)}B.db.transaction(function(ge){ht(ge,B,function(){K._dbInfo=B,Q()},function(ue,be){Ce(be)})},Ce)});return B.serializer=Ze,ne}function Pt(R,K,B,Z,ne,Q){R.executeSql(B,Z,ne,function(Ce,ge){ge.code===ge.SYNTAX_ERR?Ce.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[K.storeName],function(ue,be){be.rows.length?Q(ue,ge):ht(ue,K,function(){ue.executeSql(B,Z,ne,Q)},Q)},Q):Q(Ce,ge)},Q)}function an(R,K){var B=this;R=m(R);var Z=new d(function(ne,Q){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Pt(ge,Ce,"SELECT * FROM "+Ce.storeName+" WHERE key = ? LIMIT 1",[R],function(ue,be){var Se=be.rows.length?be.rows.item(0).value:null;Se&&(Se=Ce.serializer.deserialize(Se)),ne(Se)},function(ue,be){Q(be)})})}).catch(Q)});return f(Z,K),Z}function Ye(R,K){var B=this,Z=new d(function(ne,Q){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Pt(ge,Ce,"SELECT * FROM "+Ce.storeName,[],function(ue,be){for(var Se=be.rows,Te=Se.length,tt=0;tt<Te;tt++){var bt=Se.item(tt),Ct=bt.value;if(Ct&&(Ct=Ce.serializer.deserialize(Ct)),Ct=R(Ct,bt.key,tt+1),Ct!==void 0){ne(Ct);return}}ne()},function(ue,be){Q(be)})})}).catch(Q)});return f(Z,K),Z}function He(R,K,B,Z){var ne=this;R=m(R);var Q=new d(function(Ce,ge){ne.ready().then(function(){K===void 0&&(K=null);var ue=K,be=ne._dbInfo;be.serializer.serialize(K,function(Se,Te){Te?ge(Te):be.db.transaction(function(tt){Pt(tt,be,"INSERT OR REPLACE INTO "+be.storeName+" (key, value) VALUES (?, ?)",[R,Se],function(){Ce(ue)},function(bt,Ct){ge(Ct)})},function(tt){if(tt.code===tt.QUOTA_ERR){if(Z>0){Ce(He.apply(ne,[R,ue,B,Z-1]));return}ge(tt)}})})}).catch(ge)});return f(Q,B),Q}function lt(R,K,B){return He.apply(this,[R,K,B,1])}function it(R,K){var B=this;R=m(R);var Z=new d(function(ne,Q){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Pt(ge,Ce,"DELETE FROM "+Ce.storeName+" WHERE key = ?",[R],function(){ne()},function(ue,be){Q(be)})})}).catch(Q)});return f(Z,K),Z}function pt(R){var K=this,B=new d(function(Z,ne){K.ready().then(function(){var Q=K._dbInfo;Q.db.transaction(function(Ce){Pt(Ce,Q,"DELETE FROM "+Q.storeName,[],function(){Z()},function(ge,ue){ne(ue)})})}).catch(ne)});return f(B,R),B}function Qe(R){var K=this,B=new d(function(Z,ne){K.ready().then(function(){var Q=K._dbInfo;Q.db.transaction(function(Ce){Pt(Ce,Q,"SELECT COUNT(key) as c FROM "+Q.storeName,[],function(ge,ue){var be=ue.rows.item(0).c;Z(be)},function(ge,ue){ne(ue)})})}).catch(ne)});return f(B,R),B}function qe(R,K){var B=this,Z=new d(function(ne,Q){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Pt(ge,Ce,"SELECT key FROM "+Ce.storeName+" WHERE id = ? LIMIT 1",[R+1],function(ue,be){var Se=be.rows.length?be.rows.item(0).key:null;ne(Se)},function(ue,be){Q(be)})})}).catch(Q)});return f(Z,K),Z}function Ue(R){var K=this,B=new d(function(Z,ne){K.ready().then(function(){var Q=K._dbInfo;Q.db.transaction(function(Ce){Pt(Ce,Q,"SELECT key FROM "+Q.storeName,[],function(ge,ue){for(var be=[],Se=0;Se<ue.rows.length;Se++)be.push(ue.rows.item(Se).key);Z(be)},function(ge,ue){ne(ue)})})}).catch(ne)});return f(B,R),B}function wt(R){return new d(function(K,B){R.transaction(function(Z){Z.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(ne,Q){for(var Ce=[],ge=0;ge<Q.rows.length;ge++)Ce.push(Q.rows.item(ge).name);K({db:R,storeNames:Ce})},function(ne,Q){B(Q)})},function(Z){B(Z)})})}function Nt(R,K){K=v.apply(this,arguments);var B=this.config();R=typeof R!="function"&&R||{},R.name||(R.name=R.name||B.name,R.storeName=R.storeName||B.storeName);var Z=this,ne;return R.name?ne=new d(function(Q){var Ce;R.name===B.name?Ce=Z._dbInfo.db:Ce=openDatabase(R.name,"","",0),R.storeName?Q({db:Ce,storeNames:[R.storeName]}):Q(wt(Ce))}).then(function(Q){return new d(function(Ce,ge){Q.db.transaction(function(ue){function be(bt){return new d(function(Ct,zt){ue.executeSql("DROP TABLE IF EXISTS "+bt,[],function(){Ct()},function(jt,nn){zt(nn)})})}for(var Se=[],Te=0,tt=Q.storeNames.length;Te<tt;Te++)Se.push(be(Q.storeNames[Te]));d.all(Se).then(function(){Ce()}).catch(function(bt){ge(bt)})},function(ue){ge(ue)})})}):ne=d.reject("Invalid arguments"),f(ne,K),ne}var et={_driver:"webSQLStorage",_initStorage:Tt,_support:te(),iterate:Ye,getItem:an,setItem:lt,removeItem:it,clear:pt,length:Qe,key:qe,keys:Ue,dropInstance:Nt};function Ve(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ot(R,K){var B=R.name+"/";return R.storeName!==K.storeName&&(B+=R.storeName+"/"),B}function at(){var R="_localforage_support_test";try{return localStorage.setItem(R,!0),localStorage.removeItem(R),!1}catch{return!0}}function nt(){return!at()||localStorage.length>0}function dt(R){var K=this,B={};if(R)for(var Z in R)B[Z]=R[Z];return B.keyPrefix=ot(R,K._defaultConfig),nt()?(K._dbInfo=B,B.serializer=Ze,d.resolve()):d.reject()}function kt(R){var K=this,B=K.ready().then(function(){for(var Z=K._dbInfo.keyPrefix,ne=localStorage.length-1;ne>=0;ne--){var Q=localStorage.key(ne);Q.indexOf(Z)===0&&localStorage.removeItem(Q)}});return f(B,R),B}function $t(R,K){var B=this;R=m(R);var Z=B.ready().then(function(){var ne=B._dbInfo,Q=localStorage.getItem(ne.keyPrefix+R);return Q&&(Q=ne.serializer.deserialize(Q)),Q});return f(Z,K),Z}function Gt(R,K){var B=this,Z=B.ready().then(function(){for(var ne=B._dbInfo,Q=ne.keyPrefix,Ce=Q.length,ge=localStorage.length,ue=1,be=0;be<ge;be++){var Se=localStorage.key(be);if(Se.indexOf(Q)===0){var Te=localStorage.getItem(Se);if(Te&&(Te=ne.serializer.deserialize(Te)),Te=R(Te,Se.substring(Ce),ue++),Te!==void 0)return Te}}});return f(Z,K),Z}function It(R,K){var B=this,Z=B.ready().then(function(){var ne=B._dbInfo,Q;try{Q=localStorage.key(R)}catch{Q=null}return Q&&(Q=Q.substring(ne.keyPrefix.length)),Q});return f(Z,K),Z}function Bt(R){var K=this,B=K.ready().then(function(){for(var Z=K._dbInfo,ne=localStorage.length,Q=[],Ce=0;Ce<ne;Ce++){var ge=localStorage.key(Ce);ge.indexOf(Z.keyPrefix)===0&&Q.push(ge.substring(Z.keyPrefix.length))}return Q});return f(B,R),B}function Ht(R){var K=this,B=K.keys().then(function(Z){return Z.length});return f(B,R),B}function Xt(R,K){var B=this;R=m(R);var Z=B.ready().then(function(){var ne=B._dbInfo;localStorage.removeItem(ne.keyPrefix+R)});return f(Z,K),Z}function Mn(R,K,B){var Z=this;R=m(R);var ne=Z.ready().then(function(){K===void 0&&(K=null);var Q=K;return new d(function(Ce,ge){var ue=Z._dbInfo;ue.serializer.serialize(K,function(be,Se){if(Se)ge(Se);else try{localStorage.setItem(ue.keyPrefix+R,be),Ce(Q)}catch(Te){(Te.name==="QuotaExceededError"||Te.name==="NS_ERROR_DOM_QUOTA_REACHED")&&ge(Te),ge(Te)}})})});return f(ne,B),ne}function Yt(R,K){if(K=v.apply(this,arguments),R=typeof R!="function"&&R||{},!R.name){var B=this.config();R.name=R.name||B.name,R.storeName=R.storeName||B.storeName}var Z=this,ne;return R.name?ne=new d(function(Q){R.storeName?Q(ot(R,Z._defaultConfig)):Q(R.name+"/")}).then(function(Q){for(var Ce=localStorage.length-1;Ce>=0;Ce--){var ge=localStorage.key(Ce);ge.indexOf(Q)===0&&localStorage.removeItem(ge)}}):ne=d.reject("Invalid arguments"),f(ne,K),ne}var sn={_driver:"localStorageWrapper",_initStorage:dt,_support:Ve(),iterate:Gt,getItem:$t,setItem:Mn,removeItem:Xt,clear:kt,length:Ht,key:It,keys:Bt,dropInstance:Yt},ke=function(K,B){return K===B||typeof K=="number"&&typeof B=="number"&&isNaN(K)&&isNaN(B)},rt=function(K,B){for(var Z=K.length,ne=0;ne<Z;){if(ke(K[ne],B))return!0;ne++}return!1},Xe=Array.isArray||function(R){return Object.prototype.toString.call(R)==="[object Array]"},Ae={},ft={},Et={INDEXEDDB:me,WEBSQL:et,LOCALSTORAGE:sn},Ot=[Et.INDEXEDDB._driver,Et.WEBSQL._driver,Et.LOCALSTORAGE._driver],ln=["dropInstance"],en=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ln),dn={description:"",driver:Ot.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function cn(R,K){R[K]=function(){var B=arguments;return R.ready().then(function(){return R[K].apply(R,B)})}}function tn(){for(var R=1;R<arguments.length;R++){var K=arguments[R];if(K)for(var B in K)K.hasOwnProperty(B)&&(Xe(K[B])?arguments[0][B]=K[B].slice():arguments[0][B]=K[B])}return arguments[0]}var En=function(){function R(K){a(this,R);for(var B in Et)if(Et.hasOwnProperty(B)){var Z=Et[B],ne=Z._driver;this[B]=ne,Ae[ne]||this.defineDriver(Z)}this._defaultConfig=tn({},dn),this._config=tn({},this._defaultConfig,K),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return R.prototype.config=function(B){if((typeof B>"u"?"undefined":i(B))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Z in B){if(Z==="storeName"&&(B[Z]=B[Z].replace(/\W/g,"_")),Z==="version"&&typeof B[Z]!="number")return new Error("Database version must be a number.");this._config[Z]=B[Z]}return"driver"in B&&B.driver?this.setDriver(this._config.driver):!0}else return typeof B=="string"?this._config[B]:this._config},R.prototype.defineDriver=function(B,Z,ne){var Q=new d(function(Ce,ge){try{var ue=B._driver,be=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!B._driver){ge(be);return}for(var Se=en.concat("_initStorage"),Te=0,tt=Se.length;Te<tt;Te++){var bt=Se[Te],Ct=!rt(ln,bt);if((Ct||B[bt])&&typeof B[bt]!="function"){ge(be);return}}var zt=function(){for(var gn=function(wo){return function(){var Vr=new Error("Method "+wo+" is not implemented by the current driver"),Ir=d.reject(Vr);return f(Ir,arguments[arguments.length-1]),Ir}},pn=0,ei=ln.length;pn<ei;pn++){var Wn=ln[pn];B[Wn]||(B[Wn]=gn(Wn))}};zt();var jt=function(gn){Ae[ue]&&console.info("Redefining LocalForage driver: "+ue),Ae[ue]=B,ft[ue]=gn,Ce()};"_support"in B?B._support&&typeof B._support=="function"?B._support().then(jt,ge):jt(!!B._support):jt(!0)}catch(nn){ge(nn)}});return p(Q,Z,ne),Q},R.prototype.driver=function(){return this._driver||null},R.prototype.getDriver=function(B,Z,ne){var Q=Ae[B]?d.resolve(Ae[B]):d.reject(new Error("Driver not found."));return p(Q,Z,ne),Q},R.prototype.getSerializer=function(B){var Z=d.resolve(Ze);return p(Z,B),Z},R.prototype.ready=function(B){var Z=this,ne=Z._driverSet.then(function(){return Z._ready===null&&(Z._ready=Z._initDriver()),Z._ready});return p(ne,B,B),ne},R.prototype.setDriver=function(B,Z,ne){var Q=this;Xe(B)||(B=[B]);var Ce=this._getSupportedDrivers(B);function ge(){Q._config.driver=Q.driver()}function ue(Te){return Q._extend(Te),ge(),Q._ready=Q._initStorage(Q._config),Q._ready}function be(Te){return function(){var tt=0;function bt(){for(;tt<Te.length;){var Ct=Te[tt];return tt++,Q._dbInfo=null,Q._ready=null,Q.getDriver(Ct).then(ue).catch(bt)}ge();var zt=new Error("No available storage method found.");return Q._driverSet=d.reject(zt),Q._driverSet}return bt()}}var Se=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=Se.then(function(){var Te=Ce[0];return Q._dbInfo=null,Q._ready=null,Q.getDriver(Te).then(function(tt){Q._driver=tt._driver,ge(),Q._wrapLibraryMethodsWithReady(),Q._initDriver=be(Ce)})}).catch(function(){ge();var Te=new Error("No available storage method found.");return Q._driverSet=d.reject(Te),Q._driverSet}),p(this._driverSet,Z,ne),this._driverSet},R.prototype.supports=function(B){return!!ft[B]},R.prototype._extend=function(B){tn(this,B)},R.prototype._getSupportedDrivers=function(B){for(var Z=[],ne=0,Q=B.length;ne<Q;ne++){var Ce=B[ne];this.supports(Ce)&&Z.push(Ce)}return Z},R.prototype._wrapLibraryMethodsWithReady=function(){for(var B=0,Z=en.length;B<Z;B++)cn(this,en[B])},R.prototype.createInstance=function(B){return new R(B)},R}(),In=new En;r.exports=In},{3:3}]},{},[4])(4)})}(xu)),xu.exports}iE();function aE(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sE(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){aE(t,o,n[o])})}return t}function lE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}function cE(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):lE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function uE(t,e){if(t==null)return{};var n=dE(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function dE(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}$.createContext(void 0);function fE(t){var e=t.full,n=e===void 0?!1:e,r=t.block,o=r===void 0?!1:r,i=t.className,a=i===void 0?"":i,s=t.message,l=s===void 0?"Loading":s,c=uE(t,["full","block","className","message"]);function u(){return pe.jsxs("div",cE(sE({className:Eo.container},c),{children:[pe.jsx("div",{className:Eo.ring}),pe.jsx("div",{className:Eo.ring}),pe.jsx("div",{className:Eo.ring}),pe.jsx("div",{className:Eo.ring}),l&&pe.jsx("div",{className:Eo.message,children:l})]}))}return n?pe.jsx("div",{className:ee(Eo.fullscreen,a),children:u()}):o?pe.jsx("div",{className:ee(Eo.block,a),children:u()}):u()}$.createContext(void 0);function jn(t){this.content=t}jn.prototype={constructor:jn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new jn(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new jn(n)},addToStart:function(t,e){return new jn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new jn(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new jn(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=jn.from(t),t.size?new jn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=jn.from(t),t.size?new jn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=jn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};jn.from=function(t){if(t instanceof jn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new jn(e)};function x0(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){let a=x0(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function w0(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let a=t.child(--o),s=e.child(--i),l=a.nodeSize;if(a==s){n-=l,r-=l;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,u=Math.min(a.text.length,s.text.length);for(;c<u&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=w0(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class Ne{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let a=0,s=0;s<n;a++){let l=this.content[a],c=s+l.nodeSize;if(c>e&&r(l,o+s,i||null,a)!==!1&&l.content.size){let u=s+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,o+u)}s=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",a=!0;return this.nodesBetween(e,n,(s,l)=>{let c=s.isText?s.text.slice(Math.max(e,l)-l,n-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&r&&(a?a=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new Ne(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,a=0;a<n;i++){let s=this.content[i],l=a+s.nodeSize;l>e&&((a<e||l>n)&&(s.isText?s=s.cut(Math.max(0,e-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,e-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=l}return new Ne(r,o)}cutByIndex(e,n){return e==n?Ne.empty:e==0&&n==this.content.length?this:new Ne(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new Ne(o,i)}addToStart(e){return new Ne([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Ne(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return x0(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return w0(this,e,n,r)}findIndex(e,n=-1){if(e==0)return Zs(0,e);if(e==this.size)return Zs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=e)return a==e||n>0?Zs(r+1,a):Zs(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Ne.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ne(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Ne.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Ne(n||e,r)}static from(e){if(!e)return Ne.empty;if(e instanceof Ne)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Ne([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ne.empty=new Ne([],0);const wu={index:0,offset:0};function Zs(t,e){return wu.index=t,wu.offset=e,wu}function Wl(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Wl(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Wl(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let rn=class Pd{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Wl(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Pd.none;if(e instanceof Pd)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};rn.none=[];class ql extends Error{}class Ge{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=$0(this.content,e+this.openStart,n);return r&&new Ge(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ge(E0(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Ge.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ge(Ne.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Ge(e,r,o)}}Ge.empty=new Ge(Ne.empty,0,0);function E0(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:a,offset:s}=t.findIndex(n);if(o==e||i.isText){if(s!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(E0(i.content,e-o-1,n-o-1)))}function $0(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),a=t.maybeChild(o);if(i==e||a.isText)return t.cut(0,e).append(n).append(t.cut(e));let s=$0(a.content,e-i-1,n);return s&&t.replaceChild(o,a.copy(s))}function hE(t,e,n){if(n.openStart>t.depth)throw new ql("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ql("Inconsistent open depths");return O0(t,e,n,0)}function O0(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let a=O0(t,e,n,r+1);return i.copy(i.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,s=a.content;return hi(a,s.cut(0,t.parentOffset).append(n.content).append(s.cut(e.parentOffset)))}else{let{start:a,end:s}=pE(n,t);return hi(i,M0(t,a,s,e,r))}else return hi(i,Kl(t,e,r))}function N0(t,e){if(!e.type.compatibleContent(t.type))throw new ql("Cannot join "+e.type.name+" onto "+t.type.name)}function Ad(t,e,n){let r=t.node(n);return N0(r,e.node(n)),r}function fi(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ga(t,e,n,r){let o=(e||t).node(n),i=0,a=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(fi(t.nodeAfter,r),i++));for(let s=i;s<a;s++)fi(o.child(s),r);e&&e.depth==n&&e.textOffset&&fi(e.nodeBefore,r)}function hi(t,e){return t.type.checkContent(e),t.copy(e)}function M0(t,e,n,r,o){let i=t.depth>o&&Ad(t,e,o+1),a=r.depth>o&&Ad(n,r,o+1),s=[];return Ga(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(N0(i,a),fi(hi(i,M0(t,e,n,r,o+1)),s)):(i&&fi(hi(i,Kl(t,e,o+1)),s),Ga(e,n,o,s),a&&fi(hi(a,Kl(n,r,o+1)),s)),Ga(r,null,o,s),new Ne(s)}function Kl(t,e,n){let r=[];if(Ga(null,t,n,r),t.depth>n){let o=Ad(t,e,n+1);fi(hi(o,Kl(t,e,n+1)),r)}return Ga(e,null,n,r),new Ne(r)}function pE(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(Ne.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class ns{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return rn.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let s=r;r=o,o=s}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!o||!i[a].isInSet(o.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ul(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let a=e;;){let{index:s,offset:l}=a.content.findIndex(i),c=i-l;if(r.push(a,s,o+l),!c||(a=a.child(s),a.isText))break;i=c-1,o+=l+1}return new ns(n,r,i)}static resolveCached(e,n){let r=om.get(e);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==n)return a}else om.set(e,r=new mE);let o=r.elts[r.i]=ns.resolve(e,n);return r.i=(r.i+1)%gE,o}}class mE{constructor(){this.elts=[],this.i=0}}const gE=12,om=new WeakMap;class Ul{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const vE=Object.create(null);let zo=class Dd{constructor(e,n,r,o=rn.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||Ne.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Wl(this.attrs,n||e.defaultAttrs||vE)&&rn.sameSet(this.marks,r||rn.none)}copy(e=null){return e==this.content?this:new Dd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Dd(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Ge.empty;let o=this.resolve(e),i=this.resolve(n),a=r?0:o.sharedDepth(n),s=o.start(a),c=o.node(a).content.cut(o.pos-s,i.pos-s);return new Ge(c,o.depth-a,i.depth-a)}replace(e,n,r){return hE(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return ns.resolveCached(this,e)}resolveNoCache(e){return ns.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),I0(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=Ne.empty,o=0,i=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,o,i),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=rn.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!rn.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=Ne.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};zo.prototype.text=void 0;class Gl extends zo{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):I0(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Gl(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Gl(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function I0(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ci{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new bE(e,n);if(r.next==null)return Ci.empty;let o=R0(r);r.next&&r.err("Unexpected trailing text");let i=$E(EE(o));return OE(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(a,s){let l=a.matchFragment(e,r);if(l&&(!n||l.validEnd))return Ne.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:u,next:d}=a.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,s.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let a=[];for(let s=o;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:s,next:l}=i.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!o.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return i}).join(`
|
|
41
|
-
`)}}Ci.empty=new Ci(!0);class bE{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function R0(t){let e=[];do e.push(yE(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function yE(t){let e=[];do e.push(CE(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function CE(t){let e=wE(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=SE(t,e);else break;return e}function im(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function SE(t,e){let n=im(t),r=n;return t.eat(",")&&(t.next!="}"?r=im(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function xE(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let a=n[i];a.isInGroup(e)&&o.push(a)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function wE(t){if(t.eat("(")){let e=R0(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=xE(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function EE(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(a,s,l){let c={term:l,to:s};return e[a].push(c),c}function o(a,s){a.forEach(l=>l.to=s)}function i(a,s){if(a.type=="choice")return a.exprs.reduce((l,c)=>l.concat(i(c,s)),[]);if(a.type=="seq")for(let l=0;;l++){let c=i(a.exprs[l],s);if(l==a.exprs.length-1)return c;o(c,s=n())}else if(a.type=="star"){let l=n();return r(s,l),o(i(a.expr,l),l),[r(l)]}else if(a.type=="plus"){let l=n();return o(i(a.expr,s),l),o(i(a.expr,l),l),[r(l)]}else{if(a.type=="opt")return[r(s)].concat(i(a.expr,s));if(a.type=="range"){let l=s;for(let c=0;c<a.min;c++){let u=n();o(i(a.expr,l),u),l=u}if(a.max==-1)o(i(a.expr,l),l);else for(let c=a.min;c<a.max;c++){let u=n();r(l,u),o(i(a.expr,l),u),l=u}return[r(l)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function T0(t,e){return e-t}function am(t,e){let n=[];return r(e),n.sort(T0);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let a=0;a<i.length;a++){let{term:s,to:l}=i[a];!s&&n.indexOf(l)==-1&&r(l)}}}function $E(t){let e=Object.create(null);return n(am(t,0));function n(r){let o=[];r.forEach(a=>{t[a].forEach(({term:s,to:l})=>{if(!s)return;let c;for(let u=0;u<o.length;u++)o[u][0]==s&&(c=o[u][1]);am(t,l).forEach(u=>{c||o.push([s,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Ci(r.indexOf(t.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(T0);i.next.push({type:o[a][0],next:e[s.join(",")]||n(s)})}return i}}function OE(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,a=[];for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];a.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function P0(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function A0(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function D0(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function k0(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new ME(t,r,e[r]);return n}let sm=class _0{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=k0(e,r.attrs),this.defaultAttrs=P0(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ci.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:A0(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new zo(this,this.computeAttrs(e),Ne.from(n),rn.setFrom(r))}createChecked(e=null,n,r){return n=Ne.from(n),this.checkContent(n),new zo(this,this.computeAttrs(e),n,rn.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Ne.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(Ne.empty,!0);return i?new zo(this,e,n.append(i),rn.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){D0(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:rn.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,a)=>r[i]=new _0(i,n,a));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function NE(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class ME{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?NE(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ec{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=k0(e,o.attrs),this.excluded=null;let i=P0(this.attrs);this.instance=i?new rn(this,i):null}create(e=null){return!e&&this.instance?this.instance:new rn(this,A0(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,a)=>r[i]=new Ec(i,o++,n,a)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){D0(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let B0=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=jn.from(e.nodes),n.marks=jn.from(e.marks||{}),this.nodes=sm.compile(this.spec.nodes,this),this.marks=Ec.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],a=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=r[a]||(r[a]=Ci.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?lm(this,s.split(" ")):s==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:lm(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof sm){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Gl(r,r.defaultAttrs,e,rn.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return zo.fromJSON(this,e)}markFromJSON(e){return rn.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function lm(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],a=i;if(i)n.push(i);else for(let s in t.marks){let l=t.marks[s];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function IE(t){return t.tag!=null}function RE(t){return t.style!=null}class jo{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(IE(o))this.tags.push(o);else if(RE(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new um(this,n,!1);return r.addAll(e,rn.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new um(this,n,!0);return r.addAll(e,rn.none,n.from,n.to),Ge.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(AE(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(e);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let a=this.styles[i],s=a.style;if(!(s.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=n))){if(a.getAttrs){let l=a.getAttrs(n);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<i)break}n.splice(a,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(a=>{r(a=dm(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(a=>{r(a=dm(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new jo(e,jo.schemaRules(e)))}}const z0={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},TE={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},j0={ol:!0,ul:!0},rs=1,kd=2,xl=4;function cm(t,e,n){return e!=null?(e?rs:0)|(e==="full"?kd:0):t&&t.whitespace=="pre"?rs|kd:n&-5}class el{constructor(e,n,r,o,i,a){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=rn.none,this.match=i||(a&xl?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ne.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&rs)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Ne.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Ne.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!z0.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class um{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,a=cm(null,n.preserveWhitespace,0)|(r?xl:0);o?i=new el(o.type,o.attrs,rn.none,!0,n.topMatch||o.type.contentMatch,a):r?i=new el(null,null,rn.none,!0,null,a):i=new el(e.schema.topNodeType,null,rn.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&kd?"full":this.localPreserveWS||(o.options&rs)>0;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
|
|
42
|
-
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],s=e.previousSibling;(!a||s&&s.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),s;j0.hasOwnProperty(a)&&this.parser.normalizeLists&&PE(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:TE.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(z0.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
43
|
-
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],a=r.getPropertyValue(i);if(a)for(let s=void 0;;){let l=this.parser.matchStyle(i,a,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return n}addElementByRule(e,n,r,o){let i,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r)||this.leafFallback(e,r);else{let l=this.enter(a,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let s=this.top;if(a&&a.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(s)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let a=r?e.childNodes[r]:e.firstChild,s=o==null?null:e.childNodes[o];a!=s;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,n);this.findAtPoint(e,i)}findPlace(e,n){let r,o;for(let i=this.open;i>=0;i--){let a=this.nodes[i],s=a.findWrapping(e);if(s&&(!r||r.length>s.length)&&(r=s,o=a,!s.length)||a.solid)break}if(!r)return null;this.sync(o);for(let i=0;i<r.length;i++)n=this.enterInner(r[i],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(e,n);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let i=rn.none;for(let a of r.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):fm(a.type,e.type))&&(i=a.addToSet(i));return o.content.push(e.mark(i)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let s=cm(e,i,a.options);a.options&xl&&a.content.length==0&&(s|=xl);let l=rn.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):fm(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new el(e,n,l,o,null,s)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=rs)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=(s,l)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;l>=i;l--)if(a(s-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function PE(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&j0.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function AE(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function dm(t){let e={};for(let n in t)e[n]=t[n];return e}function fm(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],a=s=>{i.push(s);for(let l=0;l<s.edgeCount;l++){let{type:c,next:u}=s.edge(l);if(c==e||i.indexOf(u)<0&&a(u))return!0}};if(a(o.contentMatch))return!0}}class Ii{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Eu(n).createDocumentFragment());let o=r,i=[];return e.forEach(a=>{if(i.length||a.marks.length){let s=0,l=0;for(;s<i.length&&l<a.marks.length;){let c=a.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[s][0])||c.type.spec.spanning===!1)break;s++,l++}for(;s<i.length;)o=i.pop()[1];for(;l<a.marks.length;){let c=a.marks[l++],u=this.serializeMark(c,a.isInline,n);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=wl(Eu(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&wl(Eu(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return wl(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ii(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=hm(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return hm(e.marks)}}function hm(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Eu(t){return t.document||window.document}const pm=new WeakMap;function DE(t){let e=pm.get(t);return e===void 0&&pm.set(t,e=kE(t)),e}function kE(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function wl(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=DE(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let s,l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:m}=wl(t,f,n,r);if(l.appendChild(p),m){if(s)throw new RangeError("Multiple content holes");s=m}}}return{dom:l,contentDOM:s}}const L0=65535,F0=Math.pow(2,16);function _E(t,e){return t+e*F0}function mm(t){return t&L0}function BE(t){return(t-(t&L0))/F0}const H0=1,V0=2,El=4,W0=8;class _d{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&W0)>0}get deletedBefore(){return(this.delInfo&(H0|El))>0}get deletedAfter(){return(this.delInfo&(V0|El))>0}get deletedAcross(){return(this.delInfo&El)>0}}class dr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&dr.empty)return dr.empty}recover(e){let n=0,r=mm(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+BE(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[s+i],u=this.ranges[s+a],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:n:n,p=l+o+(f<0?0:u);if(r)return p;let m=e==(n<0?l:d)?null:_E(s/3,e-l),v=e==l?V0:e==d?H0:El;return(n<0?e!=l:e!=d)&&(v|=W0),new _d(p,v,m)}o+=u-c}return r?e+o:new _d(e+o,0,null)}touches(e,n){let r=0,o=mm(n),i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[s+i],u=l+c;if(e<=u&&s==o*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let a=this.ranges[o],s=a-(this.inverted?i:0),l=a+(this.inverted?0:i),c=this.ranges[o+n],u=this.ranges[o+r];e(s,s+c,l,l+u),i+=u-c}}invert(){return new dr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?dr.empty:new dr(e<0?[0,-e,0]:[0,0,e])}}dr.empty=new dr([]);class is{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new is(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new is;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],s=a.mapResult(e,n);if(s.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(s.recover);continue}}o|=s.delInfo,e=s.pos}return r?e:new _d(e,o,null)}}const $u=Object.create(null);class Jn{getMap(){return dr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=$u[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in $u)throw new RangeError("Duplicate use of step JSON ID "+e);return $u[e]=n,n.prototype.jsonID=e,n}}class Nn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Nn(e,null)}static fail(e){return new Nn(null,e)}static fromReplace(e,n,r,o){try{return Nn.ok(e.replace(n,r,o))}catch(i){if(i instanceof ql)return Nn.fail(i.message);throw i}}}function Ch(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Ch(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return Ne.fromArray(r)}class Ao extends Jn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Ge(Ch(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),n.openStart,n.openEnd);return Nn.fromReplace(e,this.from,this.to,i)}invert(){return new Ur(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ao(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ao&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ao(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ao(n.from,n.to,e.markFromJSON(n.mark))}}Jn.jsonID("addMark",Ao);class Ur extends Jn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Ge(Ch(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Nn.fromReplace(e,this.from,this.to,r)}invert(){return new Ao(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ur(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ur&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ur(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ur(n.from,n.to,e.markFromJSON(n.mark))}}Jn.jsonID("removeMark",Ur);class Do extends Jn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Nn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Nn.fromReplace(e,this.pos,this.pos+1,new Ge(Ne.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new Do(this.pos,n.marks[o]);return new Do(this.pos,this.mark)}}return new aa(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Do(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Do(n.pos,e.markFromJSON(n.mark))}}Jn.jsonID("addNodeMark",Do);class aa extends Jn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Nn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Nn.fromReplace(e,this.pos,this.pos+1,new Ge(Ne.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Do(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new aa(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new aa(n.pos,e.markFromJSON(n.mark))}}Jn.jsonID("removeNodeMark",aa);class kn extends Jn{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Bd(e,this.from,this.to)?Nn.fail("Structure replace would overwrite content"):Nn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new dr([this.from,this.to-this.from,this.slice.size])}invert(e){return new kn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new kn(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof kn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Ge.empty:new Ge(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new kn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Ge.empty:new Ge(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new kn(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new kn(n.from,n.to,Ge.fromJSON(e,n.slice),!!n.structure)}}Jn.jsonID("replace",kn);class _n extends Jn{constructor(e,n,r,o,i,a,s=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=s}apply(e){if(this.structure&&(Bd(e,this.from,this.gapFrom)||Bd(e,this.gapTo,this.to)))return Nn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Nn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Nn.fromReplace(e,this.from,this.to,r):Nn.fail("Content does not fit in gap")}getMap(){return new dr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new _n(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new _n(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new _n(n.from,n.to,n.gapFrom,n.gapTo,Ge.fromJSON(e,n.slice),n.insert,!!n.structure)}}Jn.jsonID("replaceAround",_n);function Bd(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function zE(t,e,n,r){let o=[],i=[],a,s;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),p=Math.min(c+l.nodeSize,n),m=r.addToSet(d);for(let v=0;v<d.length;v++)d[v].isInSet(m)||(a&&a.to==f&&a.mark.eq(d[v])?a.to=p:o.push(a=new Ur(f,p,d[v])));s&&s.to==f?s.to=p:i.push(s=new Ao(f,p,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function jE(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(a,s)=>{if(!a.isInline)return;i++;let l=null;if(r instanceof Ec){let c=a.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(a.marks)&&(l=[r]):l=a.marks;if(l&&l.length){let c=Math.min(s+a.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let p=0;p<o.length;p++){let m=o[p];m.step==i-1&&d.eq(o[p].style)&&(f=m)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(s,e),to:c,step:i})}}}),o.forEach(a=>t.step(new Ur(a.from,a.to,a.style)))}function Sh(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),a=[],s=e+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),u=s+c.nodeSize,d=r.matchType(c.type);if(!d)a.push(new kn(s,u,Ge.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new Ur(s,u,c.marks[f]));if(o&&c.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,m;for(;f=p.exec(c.text);)m||(m=new Ge(Ne.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new kn(s+f.index,s+f.index+f[0].length,m))}}s=u}if(!r.validEnd){let l=r.fillBefore(Ne.empty,!0);t.replace(s,s,new Ge(l,0,0))}for(let l=a.length-1;l>=0;l--)t.step(a[l])}function LE(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function xa(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),a=t.$to.indexAfter(r);if(r<t.depth&&o.canReplace(i,a,n))return r;if(r==0||o.type.spec.isolating||!LE(o,i,a))break}return null}function FE(t,e,n){let{$from:r,$to:o,depth:i}=e,a=r.before(i+1),s=o.after(i+1),l=a,c=s,u=Ne.empty,d=0;for(let m=i,v=!1;m>n;m--)v||r.index(m)>0?(v=!0,u=Ne.from(r.node(m).copy(u)),d++):l--;let f=Ne.empty,p=0;for(let m=i,v=!1;m>n;m--)v||o.after(m+1)<o.end(m)?(v=!0,f=Ne.from(o.node(m).copy(f)),p++):c++;t.step(new _n(l,c,a,s,new Ge(u.append(f),d,p),u.size-d,!0))}function xh(t,e,n=null,r=t){let o=HE(t,e),i=o&&VE(r,e);return i?o.map(gm).concat({type:e,attrs:n}).concat(i.map(gm)):null}function gm(t){return{type:t,attrs:null}}function HE(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let a=i.length?i[0]:e;return n.canReplaceWith(r,o,a)?i:null}function VE(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),a=e.contentMatch.findWrapping(i.type);if(!a)return null;let l=(a.length?a[a.length-1]:e).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:a}function WE(t,e,n){let r=Ne.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let s=n[a].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ne.from(n[a].type.create(n[a].attrs,r))}let o=e.start,i=e.end;t.step(new _n(o,i,o,i,new Ge(r,0,0),n.length,!0))}function qE(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(a,s)=>{let l=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(r,l)&&KE(t.doc,t.mapping.slice(i).map(s),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?c=!1:!p&&m&&(c=!0)}c===!1&&K0(t,a,s,i),Sh(t,t.mapping.slice(i).map(s,1),r,void 0,c===null);let u=t.mapping.slice(i),d=u.map(s,1),f=u.map(s+a.nodeSize,1);return t.step(new _n(d,f,d+1,f-1,new Ge(Ne.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&q0(t,a,s,i),!1}})}function q0(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let a,s=/\r?\n|\r/g;for(;a=s.exec(o.text);){let l=t.mapping.slice(r).map(n+1+i+a.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function K0(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+i);t.replaceWith(a,a+1,e.type.schema.text(`
|
|
44
|
-
`))}})}function KE(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function UE(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new _n(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Ge(Ne.from(a),0,0),1,!0))}function po(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let v=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!v.type.validContent(p))return!1}let s=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(s,s,l?l.type:o.node(i+1).type)}function GE(t,e,n=1,r){let o=t.doc.resolve(e),i=Ne.empty,a=Ne.empty;for(let s=o.depth,l=o.depth-n,c=n-1;s>l;s--,c--){i=Ne.from(o.node(s).copy(i));let u=r&&r[c];a=Ne.from(u?u.type.create(u.attrs,a):o.node(s).copy(a))}t.step(new kn(e,e,new Ge(i.append(a),n,n),!0))}function Go(t,e){let n=t.resolve(e),r=n.index();return U0(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function XE(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),a=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(a),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function U0(t,e){return!!(t&&e&&!t.isLeaf&&XE(t,e))}function $c(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,a,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&U0(i,a)&&r.node(o).canReplace(s,s+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function YE(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),a=i.node().type;if(o&&a.inlineContent){let u=a.whitespace=="pre",d=!!a.contentMatch.matchType(o);u&&!d?r=!1:!u&&d&&(r=!0)}let s=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);K0(t,u.node(),u.before(),s)}a.inlineContent&&Sh(t,e+n-1,a,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(s),c=l.map(e-n);if(t.step(new kn(c,l.map(e+n,-1),Ge.empty,!0)),r===!0){let u=t.doc.resolve(c);q0(t,u.node(),u.before(),t.steps.length)}return t}function JE(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function G0(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(s>0?1:0),c=r.node(a),u=!1;if(i==1)u=c.canReplace(l,l,o);else{let d=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function Oc(t,e,n=e,r=Ge.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return X0(o,i,r)?new kn(e,n,r):new QE(o,i,r).fit()}function X0(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class QE{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Ne.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Ne.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,a=r.depth,s=o.depth;for(;a&&s&&i.childCount==1;)i=i.firstChild.content,a--,s--;let l=new Ge(i,a,s);return e>-1?new _n(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new kn(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Ou(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let a=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:c}=this.frontier[s],u,d=null;if(n==1&&(a?c.matchType(a.type)||(d=c.fillBefore(Ne.from(a),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:s,parent:i,inject:d};if(n==2&&a&&(u=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Ou(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ge(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Ou(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new Ge(Fa(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Ge(Fa(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let v=0;v<i.length;v++)this.openFrontierNode(i[v]);let a=this.unplaced,s=r?r.content:a.content,l=a.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[n];if(o){for(let v=0;v<o.childCount;v++)u.push(o.child(v));d=d.matchFragment(o)}let p=s.size+e-(a.content.size-a.openEnd);for(;c<s.childCount;){let v=s.child(c),g=d.matchType(v.type);if(!g)break;c++,(c>1||l==0||v.content.size)&&(d=g,u.push(Y0(v.mark(f.allowedMarks(v.marks)),c==1?l:0,c==s.childCount?p:-1)))}let m=c==s.childCount;m||(p=-1),this.placed=Ha(this.placed,n,Ne.from(u)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,g=s;v<p;v++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=m?e==0?Ge.empty:new Ge(Fa(a.content,e-1,1),e-1,p<0?a.openEnd:e-1):new Ge(Fa(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Nu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),a=Nu(e,n,o,r,i);if(a){for(let s=n-1;s>=0;s--){let{match:l,type:c}=this.frontier[s],u=Nu(e,s,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:a,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ha(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Ha(this.placed,this.depth,Ne.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Ne.empty,!0);n.childCount&&(this.placed=Ha(this.placed,this.frontier.length,n))}}function Fa(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Fa(t.firstChild.content,e-1,n)))}function Ha(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Ha(t.lastChild.content,e-1,n)))}function Ou(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function Y0(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,Y0(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Ne.empty,!0)))),t.copy(r)}function Nu(t,e,n,r,o){let i=t.node(e),a=o?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!ZE(n,i.content,a)?s:null}function ZE(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function e$(t){return t.spec.defining||t.spec.definingForContent}function t$(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(X0(o,i,r))return t.step(new kn(e,n,r));let a=Q0(o,t.doc.resolve(n));a[a.length-1]==0&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let f=o.depth,p=o.pos-1;f>0;f--,p--){let m=o.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;a.indexOf(f)>-1?s=f:o.before(f)==p&&a.splice(1,0,-f)}let l=a.indexOf(s),c=[],u=r.openStart;for(let f=r.content,p=0;;p++){let m=f.firstChild;if(c.push(m),p==r.openStart)break;f=m.content}for(let f=u-1;f>=0;f--){let p=c[f],m=e$(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(s)-1)))u=f;else if(m||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+u+1)%(r.openStart+1),m=c[p];if(m)for(let v=0;v<a.length;v++){let g=a[(v+l)%a.length],y=!0;g<0&&(y=!1,g=-g);let b=o.node(g-1),C=o.index(g-1);if(b.canReplaceWith(C,C,m.type,m.marks))return t.replace(o.before(g),y?i.after(g):n,new Ge(J0(r.content,0,r.openStart,p),p,r.openEnd))}}let d=t.steps.length;for(let f=a.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let p=a[f];p<0||(e=o.before(p),n=i.after(p))}}function J0(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(J0(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),a=i.fillBefore(t).append(t);t=a.append(i.matchFragment(a).fillBefore(Ne.empty,!0))}return t}function n$(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=JE(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Ge(Ne.from(r),0,0))}function r$(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=Q0(r,o);for(let a=0;a<i.length;a++){let s=i[a],l=a==i.length-1;if(l&&s==0||r.node(s).type.contentMatch.validEnd)return t.delete(r.start(s),o.end(s));if(s>0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return t.delete(r.before(s),o.after(s))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(e-r.start(a)==r.depth-a&&n>r.end(a)&&o.end(a)-n!=o.depth-a&&r.start(a-1)==o.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),o.index(a-1)))return t.delete(r.before(a),n);t.delete(e,n)}function Q0(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class ea extends Jn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Nn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Nn.fromReplace(e,this.pos,this.pos+1,new Ge(Ne.from(o),0,n.isLeaf?0:1))}getMap(){return dr.empty}invert(e){return new ea(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ea(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ea(n.pos,n.attr,n.value)}}Jn.jsonID("attr",ea);class as extends Jn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Nn.ok(r)}getMap(){return dr.empty}invert(e){return new as(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new as(n.attr,n.value)}}Jn.jsonID("docAttr",as);let sa=class extends Error{};sa=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};sa.prototype=Object.create(Error.prototype);sa.prototype.constructor=sa;sa.prototype.name="TransformError";let Z0=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new is}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new sa(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Ge.empty){let o=Oc(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Ge(Ne.from(r),0,0))}delete(e,n){return this.replace(e,n,Ge.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return t$(this,e,n,r),this}replaceRangeWith(e,n,r){return n$(this,e,n,r),this}deleteRange(e,n){return r$(this,e,n),this}lift(e,n){return FE(this,e,n),this}join(e,n=1){return YE(this,e,n),this}wrap(e,n){return WE(this,e,n),this}setBlockType(e,n=e,r,o=null){return qE(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return UE(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new ea(e,n,r)),this}setDocAttribute(e,n){return this.step(new as(e,n)),this}addNodeMark(e,n){return this.step(new Do(e,n)),this}removeNodeMark(e,n){if(!(n instanceof rn)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new aa(e,n)),this}split(e,n=1,r){return GE(this,e,n,r),this}addMark(e,n,r){return zE(this,e,n,r),this}removeMark(e,n,r){return jE(this,e,n,r),this}clearIncompatible(e,n,r){return Sh(this,e,n,r),this}};const Mu=Object.create(null);class vt{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new ey(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Ge.empty){let r=n.content.lastChild,o=null;for(let s=0;s<n.openEnd;s++)o=r,r=r.lastChild;let i=e.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:l,$to:c}=a[s],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),s?Ge.empty:n),s==0&&ym(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:a,$to:s}=o[i],l=e.mapping.slice(r),c=l.map(a.pos),u=l.map(s.pos);i?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),ym(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new gt(e):Ui(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let a=n<0?Ui(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Ui(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(a)return a}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new mr(e.node(0))}static atStart(e){return Ui(e,e,0,0,1)||new mr(e)}static atEnd(e){return Ui(e,e,e.content.size,e.childCount,-1)||new mr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Mu[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Mu)throw new RangeError("Duplicate use of selection JSON ID "+e);return Mu[e]=n,n.prototype.jsonID=e,n}getBookmark(){return gt.between(this.$anchor,this.$head).getBookmark()}}vt.prototype.visible=!0;class ey{constructor(e,n){this.$from=e,this.$to=n}}let vm=!1;function bm(t){!vm&&!t.parent.inlineContent&&(vm=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class gt extends vt{constructor(e,n=e){bm(e),bm(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return vt.near(r);let o=e.resolve(n.map(this.anchor));return new gt(o.parent.inlineContent?o:r,r)}replace(e,n=Ge.empty){if(super.replace(e,n),n==Ge.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof gt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Nc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new gt(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=vt.findFrom(n,r,!0)||vt.findFrom(n,-r,!0);if(i)n=i.$head;else return vt.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(vt.findFrom(e,-r,!0)||vt.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new gt(e,n)}}vt.jsonID("text",gt);class Nc{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Nc(e.map(this.anchor),e.map(this.head))}resolve(e){return gt.between(e.resolve(this.anchor),e.resolve(this.head))}}class mt extends vt{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?vt.near(i):new mt(i)}content(){return new Ge(Ne.from(this.node),0,0)}eq(e){return e instanceof mt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new wh(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new mt(e.resolve(n.anchor))}static create(e,n){return new mt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}mt.prototype.visible=!1;vt.jsonID("node",mt);class wh{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Nc(r,r):new wh(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&mt.isSelectable(r)?new mt(n):vt.near(n)}}class mr extends vt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Ge.empty){if(n==Ge.empty){e.delete(0,e.doc.content.size);let r=vt.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new mr(e)}map(e){return new mr(e)}eq(e){return e instanceof mr}getBookmark(){return o$}}vt.jsonID("all",mr);const o$={map(){return this},resolve(t){return new mr(t)}};function Ui(t,e,n,r,o,i=!1){if(e.inlineContent)return gt.create(t,n);for(let a=r-(o>0?0:1);o>0?a<e.childCount:a>=0;a+=o){let s=e.child(a);if(s.isAtom){if(!i&&mt.isSelectable(s))return mt.create(t,n-(o<0?s.nodeSize:0))}else{let l=Ui(t,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}return null}function ym(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof kn||o instanceof _n))return;let i=t.mapping.maps[r],a;i.forEach((s,l,c,u)=>{a==null&&(a=u)}),t.setSelection(vt.near(t.doc.resolve(a),n))}const Cm=1,Sm=2,xm=4;class i$ extends Z0{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Cm)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&Cm)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Sm,this}ensureMarks(e){return rn.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Sm)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||rn.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(n);i=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(vt.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=xm,this}get scrolledIntoView(){return(this.updated&xm)>0}}function wm(t,e){return!e||!t?t:t.bind(e)}class Va{constructor(e,n,r){this.name=e,this.init=wm(n.init,r),this.apply=wm(n.apply,r)}}const a$=[new Va("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Va("selection",{init(t,e){return t.selection||vt.atStart(e.doc)},apply(t){return t.selection}}),new Va("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Va("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Iu{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=a$.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Va(r.key,r.spec.state,r))})}}class Xi{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let s=this.config.plugins[a];if(s.spec.appendTransaction){let l=o?o[a].n:0,c=o?o[a].state:this,u=l<n.length&&s.spec.appendTransaction.call(s,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,a)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<a?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}o&&(o[a]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Xi(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new i$(this)}static create(e){let n=new Iu(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Xi(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Iu(this.schema,e.plugins),r=n.fields,o=new Xi(n);for(let i=0;i<r.length;i++){let a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Iu(e.schema,e.plugins),i=new Xi(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=zo.fromJSON(e.schema,n.doc);else if(a.name=="selection")i.selection=vt.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let s in r){let l=r[s],c=l.spec.state;if(l.key==a.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){i[a.name]=c.fromJSON.call(l,e,n[s],i);return}}i[a.name]=a.init(e,i)}}),i}}function ty(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=ty(o,e,{})),n[r]=o}return n}class Qn{constructor(e){this.spec=e,this.props={},e.props&&ty(e.props,this,this.props),this.key=e.key?e.key.key:ny("plugin")}getState(e){return e[this.key]}}const Ru=Object.create(null);function ny(t){return t in Ru?t+"$"+ ++Ru[t]:(Ru[t]=0,t+"$")}class vr{constructor(e="key"){this.key=ny(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ln=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},la=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let zd=null;const lo=function(t,e,n){let r=zd||(zd=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},s$=function(){zd=null},Si=function(t,e,n,r){return n&&(Em(t,e,n,r,-1)||Em(t,e,n,r,1))},l$=/^(img|br|input|textarea|hr)$/i;function Em(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:wr(t))){let i=t.parentNode;if(!i||i.nodeType!=1||$s(t)||l$.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ln(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?wr(t):0}else return!1}}function wr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function c$(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=wr(t)}else if(t.parentNode&&!$s(t))e=Ln(t),t=t.parentNode;else return null}}function u$(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!$s(t))e=Ln(t)+1,t=t.parentNode;else return null}}function d$(t,e,n){for(let r=e==0,o=e==wr(t);r||o;){if(t==n)return!0;let i=Ln(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==wr(t)}}function $s(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Mc=function(t){return t.focusNode&&Si(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ni(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function f$(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function h$(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(wr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(wr(r.startContainer),r.startOffset)}}}const Yr=typeof navigator<"u"?navigator:null,$m=typeof document<"u"?document:null,Xo=Yr&&Yr.userAgent||"",jd=/Edge\/(\d+)/.exec(Xo),ry=/MSIE \d/.exec(Xo),Ld=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xo),or=!!(ry||Ld||jd),Lo=ry?document.documentMode:Ld?+Ld[1]:jd?+jd[1]:0,Br=!or&&/gecko\/(\d+)/i.test(Xo);Br&&+(/Firefox\/(\d+)/.exec(Xo)||[0,0])[1];const Fd=!or&&/Chrome\/(\d+)/.exec(Xo),Un=!!Fd,oy=Fd?+Fd[1]:0,er=!or&&!!Yr&&/Apple Computer/.test(Yr.vendor),ca=er&&(/Mobile\/\w+/.test(Xo)||!!Yr&&Yr.maxTouchPoints>2),xr=ca||(Yr?/Mac/.test(Yr.platform):!1),p$=Yr?/Win/.test(Yr.platform):!1,uo=/Android \d/.test(Xo),Os=!!$m&&"webkitFontSmoothing"in $m.documentElement.style,m$=Os?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function g$(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function io(t,e){return typeof t=="number"?t:t[e]}function v$(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Om(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let a=n||t.dom;a;){if(a.nodeType!=1){a=la(a);continue}let s=a,l=s==i.body,c=l?g$(i):v$(s),u=0,d=0;if(e.top<c.top+io(r,"top")?d=-(c.top-e.top+io(o,"top")):e.bottom>c.bottom-io(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+io(o,"top")-c.top:e.bottom-c.bottom+io(o,"bottom")),e.left<c.left+io(r,"left")?u=-(c.left-e.left+io(o,"left")):e.right>c.right-io(r,"right")&&(u=e.right-c.right+io(o,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let p=s.scrollLeft,m=s.scrollTop;d&&(s.scrollTop+=d),u&&(s.scrollLeft+=u);let v=s.scrollLeft-p,g=s.scrollTop-m;e={left:e.left-v,top:e.top-g,right:e.right-v,bottom:e.bottom-g}}let f=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(f))break;a=f=="absolute"?a.offsetParent:la(a)}}function b$(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,a=n+1;a<Math.min(innerHeight,e.bottom);a+=5){let s=t.root.elementFromPoint(i,a);if(!s||s==t.dom||!t.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=n-20){r=s,o=l.top;break}}return{refDOM:r,refTop:o,stack:iy(t.dom)}}function iy(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=la(r));return e}function y$({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;ay(n,r==0?0:r-e)}function ay(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let _i=null;function C$(t){if(t.setActive)return t.setActive();if(_i)return t.focus(_i);let e=iy(t);t.focus(_i==null?{get preventScroll(){return _i={preventScroll:!0},!0}}:void 0),_i||(_i=!1,ay(e,0))}function sy(t,e){let n,r=2e8,o,i=0,a=e.top,s=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=lo(u).getClientRects();else continue;for(let p=0;p<f.length;p++){let m=f[p];if(m.top<=a&&m.bottom>=s){a=Math.max(m.bottom,a),s=Math.min(m.top,s);let v=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(v<r){n=u,r=v,o=v&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&v&&(i=d+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!l&&m.left<=e.left&&m.right>=e.left&&(l=u,c={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=d+1)}}return!n&&l&&(n=l,o=c,r=0),n&&n.nodeType==3?S$(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:sy(n,o)}function S$(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let i=Oo(r,1);if(i.top!=i.bottom&&Eh(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Eh(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function x$(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function w$(t,e,n){let{node:r,offset:o}=sy(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function E$(t,e,n,r){let o=-1;for(let i=e,a=!1;i!=t.dom;){let s=t.docView.nearestDesc(i,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&(!a&&l.left>r.left||l.top>r.top?o=s.posBefore:(!a&&l.right<r.left||l.bottom<r.top)&&(o=s.posAfter),a=!0),!s.contentDOM&&o<0&&!s.node.isText))return(s.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;i=s.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function ly(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let a=t.childNodes[i];if(a.nodeType==1){let s=a.getClientRects();for(let l=0;l<s.length;l++){let c=s[l];if(Eh(e,c))return ly(a,e,c)}}if((i=(i+1)%r)==o)break}return t}function $$(t,e){let n=t.dom.ownerDocument,r,o=0,i=h$(n,e.left,e.top);i&&({node:r,offset:o}=i);let a=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),s;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=t.dom.getBoundingClientRect();if(!Eh(e,c)||(a=ly(t.dom,e,c),!a))return null}if(er)for(let c=a;r&&c;c=la(c))c.draggable&&(r=void 0);if(a=x$(a,e),r){if(Br&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&o++}let c;Os&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=E$(t,r,o,e))}s==null&&(s=w$(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function Nm(t){return t.top<t.bottom||t.left<t.right}function Oo(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Nm(r))return r}return Array.prototype.find.call(n,Nm)||t.getBoundingClientRect()}const O$=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function cy(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),a=Os||Br;if(r.nodeType==3)if(a&&(O$.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Oo(lo(r,o,o),n);if(Br&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=Oo(lo(r,o-1,o-1),-1);if(c.top==l.top){let u=Oo(lo(r,o,o+1),-1);if(u.top!=l.top)return Aa(u,u.left<c.left)}}return l}else{let l=o,c=o,u=n<0?1:-1;return n<0&&!o?(c++,u=-1):n>=0&&o==r.nodeValue.length?(l--,u=1):n<0?l--:c++,Aa(Oo(lo(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==wr(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Tu(l.getBoundingClientRect(),!1)}if(i==null&&o<wr(r)){let l=r.childNodes[o];if(l.nodeType==1)return Tu(l.getBoundingClientRect(),!0)}return Tu(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==wr(r))){let l=r.childNodes[o-1],c=l.nodeType==3?lo(l,wr(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Aa(Oo(c,1),!1)}if(i==null&&o<wr(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?lo(l,0,a?0:1):l.nodeType==1?l:null:null;if(c)return Aa(Oo(c,-1),!0)}return Aa(Oo(r.nodeType==3?lo(r):r,-n),n>=0)}function Aa(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Tu(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function uy(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function N$(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return uy(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=t.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let a=cy(t,o.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=lo(s,0,s.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?a.top-u.top>(u.bottom-a.top)*2:u.bottom-a.bottom>(a.bottom-u.top)*2))return!1}}return!0})}const M$=/[\u0590-\u08ac]/;function I$(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=t.domSelection();return s?!M$.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?i:a:uy(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),f=s.caretBidiLevel;s.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:m,focusOffset:v}=t.domSelectionRange(),g=m&&!p.contains(m.nodeType==1?m:m.parentNode)||l==m&&c==v;try{s.collapse(u,d),l&&(l!=u||c!=d)&&s.extend&&s.extend(l,c)}catch{}return f!=null&&(s.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let Mm=null,Im=null,Rm=!1;function R$(t,e,n){return Mm==e&&Im==n?Rm:(Mm=e,Im=n,Rm=n=="up"||n=="down"?N$(t,e,n):I$(t,e,n))}const Er=0,Tm=1,ai=2,Jr=3;class Ns{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Er,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,a;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>Ln(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),a;if(i&&(!n||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let a=0;a<o.children.length;a++){let s=o.children[a];if(s.size){o=s;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],s=i+a.size;if(s>e||a instanceof fy){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof dy&&i.side>=0;r--);if(n<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&n&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Ln(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Ln(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let a=r,s=0;;s++){let l=this.children[s],c=a+l.size;if(o==-1&&e<=c){let u=a+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=a;for(let d=s;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=Ln(f.dom)+1;break}e-=f.size}o==-1&&(o=0)}if(o>-1&&(c>n||s==this.children.length-1)){n=c;for(let u=s+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=Ln(d.dom);break}n+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),a=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let v=this.children[p],g=m+v.size;if(i>m&&a<g)return v.setSelection(e-m-v.border,n-m-v.border,r,o);m=g}let s=this.domFromPos(e,e?-1:1),l=n==e?s:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),d=!1;if((Br||er)&&e==n){let{node:p,offset:m}=s;if(p.nodeType==3){if(d=!!(m&&p.nodeValue[m-1]==`
|
|
45
|
-
`),d&&m==p.nodeValue.length)for(let v=p,g;v;v=v.parentNode){if(g=v.nextSibling){g.nodeName=="BR"&&(s=l={node:g.parentNode,offset:Ln(g)+1});break}let y=v.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let v=p.childNodes[m-1];d=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(Br&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||d&&er)&&Si(s.node,s.offset,u.anchorNode,u.anchorOffset)&&Si(l.node,l.offset,u.focusNode,u.focusOffset))return;let f=!1;if((c.extend||e==n)&&!d){c.collapse(s.node,s.offset);try{e!=n&&c.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(e>n){let m=s;s=l,l=m}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(s.node,s.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],a=r+i.size;if(r==a?e<=a&&n>=r:e<a&&n>r){let s=r+i.border,l=a-i.border;if(e>=s&&n<=l){this.dirty=e==r||n==a?ai:Tm,e==s&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Jr:i.markDirty(e-s,n-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?ai:Jr}r=a}this.dirty=ai}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?ai:Tm;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class dy extends Ns{constructor(e,n,r,o){let i,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Er&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class T$ extends Ns{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class xi extends Ns{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return(!a||!a.dom)&&(a=Ii.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new xi(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&Jr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Jr&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Er){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Er}}slice(e,n,r){let o=xi.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=Vd(i,n,a,r)),e>0&&(i=Vd(i,0,e,r));for(let s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Fo extends Ns{constructor(e,n,r,o,i,a,s,l,c){super(e,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(e,n,r,o,i,a){let s=i.nodeViews[n.type.name],l,c=s&&s(n,i,()=>{if(!l)return a;if(l.parent)return l.parent.posBeforeChild(l)},r,o),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Ii.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=my(u,r,n),c?l=new P$(e,n,r,o,u,d||null,f,c,i,a+1):n.isText?new Ic(e,n,r,o,u,f,i):new Fo(e,n,r,o,u,d||null,f,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Ne.empty)}return e}matchesNode(e,n,r){return this.dirty==Er&&e.eq(this.node)&&Xl(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new D$(this,a&&a.node,e);B$(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?rn.none:this.node.child(u).marks,r,e),l.placeWidget(c,e,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,r,e);let p;l.findNodeMatch(c,u,d,f)||s&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(p=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,u,d,p,e)||l.updateNextNode(c,u,d,e,f,o)||l.addNode(c,u,d,e,o),o+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==ai)&&(a&&this.protectLocalComposition(e,a),hy(this.contentDOM,this.children,e),ca&&z$(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof gt)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,s=j$(this.node.content,a,r-n,o-n);return s<0?null:{node:i,pos:s,text:a}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new T$(this,i,n,o);e.input.compositionNodes.push(a),this.children=Vd(this.children,r,r+o.length,e,a)}update(e,n,r,o){return this.dirty==Jr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Er}updateOuterDeco(e){if(Xl(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=py(this.dom,this.nodeDOM,Hd(this.outerDeco,this.node,n),Hd(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Pm(t,e,n,r,o){my(r,e,t);let i=new Fo(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Ic extends Fo{constructor(e,n,r,o,i,a,s){super(e,n,r,o,i,null,a,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Jr||this.dirty!=Er&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Er||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=Er,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new Ic(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Jr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class fy extends Ns{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Er&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class P$ extends Fo{constructor(e,n,r,o,i,a,s,l,c,u){super(e,n,r,o,i,a,s,c,u),this.spec=l}update(e,n,r,o){if(this.dirty==Jr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function hy(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let a=e[i],s=a.dom;if(s.parentNode==t){for(;s!=r;)r=Am(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(s,r);if(a instanceof xi){let l=r?r.previousSibling:t.lastChild;hy(a.contentDOM,a.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Am(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const Xa=function(t){t&&(this.nodeName=t)};Xa.prototype=Object.create(null);const si=[new Xa];function Hd(t,e,n){if(t.length==0)return si;let r=n?si[0]:new Xa,o=[r];for(let i=0;i<t.length;i++){let a=t[i].type.attrs;if(a){a.nodeName&&o.push(r=new Xa(a.nodeName));for(let s in a){let l=a[s];l!=null&&(n&&o.length==1&&o.push(r=new Xa(e.isInline?"span":"div")),s=="class"?r.class=(r.class?r.class+" ":"")+l:s=="style"?r.style=(r.style?r.style+";":"")+l:s!="nodeName"&&(r[s]=l))}}}return o}function py(t,e,n,r){if(n==si&&r==si)return e;let o=e;for(let i=0;i<r.length;i++){let a=r[i],s=n[i];if(i){let l;s&&s.nodeName==a.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(o),s=si[0]),o=l}A$(o,s||si[0],a)}return o}function A$(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function my(t,e,n){return py(t,t,si,Hd(e,n,t.nodeType!=1))}function Xl(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Am(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class D${constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=k$(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let o=0,i=this.stack.length>>1,a=Math.min(i,e.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Er,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){s=l;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=xi.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(e,n,r))i=this.top.children.indexOf(a,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let c=this.top.children[s];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let a=this.top.children[o];return a.dirty==Jr&&a.dom==a.contentDOM&&(a.dirty=ai),a.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,a){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof Fo){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let u=l.dom,d,f=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Jr&&Xl(n,l.outerDeco));if(!f&&l.update(e,n,r,o))return this.destroyBetween(this.index,s),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,e,n,r,o,a)))return this.destroyBetween(this.index,s),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=ai,d.updateChildren(o,a+1),d.dirty=Er),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,a){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Xl(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let s=Fo.create(this.top,n,r,o,i,a);if(s.contentDOM){s.children=e.children,e.children=[];for(let l of s.children)l.parent=s}return e.destroy(),s}addNode(e,n,r,o,i){let a=Fo.create(this.top,e,n,r,o,i);a.contentDOM&&a.updateChildren(o,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new dy(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof xi;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ic)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((er||Un)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new fy(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function k$(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let c=n.children[r-1];if(c instanceof xi)n=c,r=c.children.length;else{s=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=t.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}function _$(t,e){return t.type.side-e.type.side}function B$(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,o,e.forChild(i,u),c),i+=u.nodeSize}return}let a=0,s=[],l=null;for(let c=0;;){let u,d;for(;a<o.length&&o[a].to==i;){let g=o[a++];g.widget&&(u?(d||(d=[u])).push(g):u=g)}if(u)if(d){d.sort(_$);for(let g=0;g<d.length;g++)n(d[g],c,!!l)}else n(u,c,!!l);let f,p;if(l)p=-1,f=l,l=null;else if(c<t.childCount)p=c,f=t.child(c++);else break;for(let g=0;g<s.length;g++)s[g].to<=i&&s.splice(g--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let m=i+f.nodeSize;if(f.isText){let g=m;a<o.length&&o[a].from<g&&(g=o[a].from);for(let y=0;y<s.length;y++)s[y].to<g&&(g=s[y].to);g<m&&(l=f.cut(g-i),f=f.cut(0,g-i),m=g,p=-1)}else for(;a<o.length&&o[a].to<m;)a++;let v=f.isInline&&!f.isLeaf?s.filter(g=>!g.inline):s.slice();r(f,v,e.forChild(i,f),p),i=m}}function z$(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function j$(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let a=t.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<t.childCount;){let c=t.child(o++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){if(i>=r&&l.slice(r-e.length-s,r-s)==e)return r-e.length;let c=s<r?l.lastIndexOf(e,r-s-1):-1;if(c>=0&&c+e.length+s>=n)return s+c;if(n==r&&l.length>=r+e.length-s&&l.slice(r-s,r-s+e.length)==e)return r}}return-1}function Vd(t,e,n,r,o){let i=[];for(let a=0,s=0;a<t.length;a++){let l=t[a],c=s,u=s+=l.size;c>=n||u<=e?i.push(l):(c<e&&i.push(l.slice(0,e-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function $h(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,a=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),l,c;if(Mc(n)){for(l=a;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&mt.isSelectable(d)&&o.parent&&!(d.isInline&&d$(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;c=new mt(a==f?s:r.resolve(f))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=a,f=a;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);d=Math.min(d,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[l,a]=f==t.state.selection.anchor?[f,d]:[d,f],s=r.resolve(a)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let d=e=="pointer"||t.state.selection.head<s.pos&&!i?1:-1;c=Oh(t,u,s,d)}return c}function gy(t){return t.editable?t.hasFocus():by(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function mo(t,e=!1){let n=t.state.selection;if(vy(t,n),!!gy(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Un){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Si(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)F$(t);else{let{anchor:r,head:o}=n,i,a;Dm&&!(n instanceof gt)&&(n.$from.parent.inlineContent||(i=km(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=km(t,n.to))),t.docView.setSelection(r,o,t,e),Dm&&(i&&_m(i),a&&_m(a)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&L$(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Dm=er||Un&&oy<63;function km(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(er&&o&&o.contentEditable=="false")return Pu(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Pu(o);if(i)return Pu(i)}}function Pu(t){return t.contentEditable="true",er&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function _m(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function L$(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!gy(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function F$(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setStart(r.parentNode,Ln(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&or&&Lo<=11&&(r.disabled=!0,r.disabled=!1)}function vy(t,e){if(e instanceof mt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Bm(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Bm(t)}function Bm(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Oh(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||gt.between(e,n,r)}function zm(t){return t.editable&&!t.hasFocus()?!1:by(t)}function by(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function H$(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Si(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Wd(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&vt.findFrom(i,e)}function Mo(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function jm(t,e,n){let r=t.state.selection;if(r instanceof gt)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return Mo(t,new gt(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=Wd(t.state,e);return o&&o instanceof mt?Mo(t,o):!1}else if(!(xr&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,a;if(!i||i.isText)return!1;let s=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(a=t.docView.descAt(s))&&!a.contentDOM?mt.isSelectable(i)?Mo(t,new mt(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):Os?Mo(t,new gt(t.state.doc.resolve(e<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof mt&&r.node.isInline)return Mo(t,new gt(e>0?r.$to:r.$from));{let o=Wd(t.state,e);return o?Mo(t,o):!1}}}function Yl(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ya(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Bi(t,e){return e<0?V$(t):W$(t)}function V$(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,a=!1;for(Br&&n.nodeType==1&&r<Yl(n)&&Ya(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(Ya(s,-1))o=n,i=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(yy(n))break;{let s=n.previousSibling;for(;s&&Ya(s,-1);)o=n.parentNode,i=Ln(s),s=s.previousSibling;if(s)n=s,r=Yl(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?qd(t,n,r):o&&qd(t,o,i)}function W$(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Yl(n),i,a;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(Ya(s,1))i=n,a=++r;else break}else{if(yy(n))break;{let s=n.nextSibling;for(;s&&Ya(s,1);)i=s.parentNode,a=Ln(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=Yl(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&qd(t,i,a)}function yy(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function q$(t,e){for(;t&&e==t.childNodes.length&&!$s(t);)e=Ln(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function K$(t,e){for(;t&&!e&&!$s(t);)e=Ln(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function qd(t,e,n){if(e.nodeType!=3){let i,a;(a=q$(e,n))?(e=a,n=0):(i=K$(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Mc(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&mo(t)},50)}function Lm(t,e){let n=t.state.doc.resolve(e);if(!(Un||p$)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Fm(t,e,n){let r=t.state.selection;if(r instanceof gt&&!r.empty||n.indexOf("s")>-1||xr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=Wd(t.state,e);if(a&&a instanceof mt)return Mo(t,a)}if(!o.parent.inlineContent){let a=e<0?o:i,s=r instanceof mr?vt.near(a,e):vt.findFrom(a,e);return s?Mo(t,s):!1}return!1}function Hm(t,e){if(!(t.state.selection instanceof gt))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=t.state.tr;return e<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),t.dispatch(a),!0}return!1}function Vm(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function U$(t){if(!er||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Vm(t,r,"true"),setTimeout(()=>Vm(t,r,"false"),20)}return!1}function G$(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function X$(t,e){let n=e.keyCode,r=G$(e);if(n==8||xr&&n==72&&r=="c")return Hm(t,-1)||Bi(t,-1);if(n==46&&!e.shiftKey||xr&&n==68&&r=="c")return Hm(t,1)||Bi(t,1);if(n==13||n==27)return!0;if(n==37||xr&&n==66&&r=="c"){let o=n==37?Lm(t,t.state.selection.from)=="ltr"?-1:1:-1;return jm(t,o,r)||Bi(t,o)}else if(n==39||xr&&n==70&&r=="c"){let o=n==39?Lm(t,t.state.selection.from)=="ltr"?1:-1:1;return jm(t,o,r)||Bi(t,o)}else{if(n==38||xr&&n==80&&r=="c")return Fm(t,-1,r)||Bi(t,-1);if(n==40||xr&&n==78&&r=="c")return U$(t)||Fm(t,1,r)||Bi(t,1);if(r==(xr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Nh(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let a=t.someProp("clipboardSerializer")||Ii.fromSchema(t.state.schema),s=$y(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=Ey[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=s.createElement(u[p]);for(;l.firstChild;)m.appendChild(l.firstChild);l.appendChild(m),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
|
|
46
|
-
|
|
47
|
-
`);return{dom:l,text:f,slice:e}}function Cy(t,e,n,r,o){let i=o.parent.type.spec.code,a,s;if(!n&&!e)return null;let l=e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",f=>{e=f(e,i||r,t)}),i)return e?new Ge(Ne.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
48
|
-
`))),0,0):Ge.empty;let d=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(d)s=d;else{let f=o.marks(),{schema:p}=t.state,m=Ii.fromSchema(p);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(v=>{let g=a.appendChild(document.createElement("p"));v&&g.appendChild(m.serializeNode(p.text(v,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),a=Z$(n),Os&&eO(a);let c=a&&a.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=a.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;a=f}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||jo.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Y$.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)s=tO(Wm(s,+u[1],+u[2]),u[4]);else if(s=Ge.maxOpen(J$(s.content,o),!0),s.openStart||s.openEnd){let d=0,f=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;f<s.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);s=Wm(s,d,f)}return t.someProp("transformPasted",d=>{s=d(s,t)}),s}const Y$=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function J$(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,a=[];if(t.forEach(s=>{if(!a)return;let l=o.findWrapping(s.type),c;if(!l)return a=null;if(c=a.length&&i.length&&xy(l,i,s,a[a.length-1],0))a[a.length-1]=c;else{a.length&&(a[a.length-1]=wy(a[a.length-1],i.length));let u=Sy(s,l);a.push(u),o=o.matchType(u.type),i=l}}),a)return Ne.from(a)}return t}function Sy(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Ne.from(t));return t}function xy(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=xy(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(Ne.from(Sy(n,t,o+1))))}}function wy(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,wy(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Ne.empty,!0);return t.copy(n.append(r))}function Kd(t,e,n,r,o,i){let a=e<0?t.firstChild:t.lastChild,s=a.content;return t.childCount>1&&(i=0),o<r-1&&(s=Kd(s,e,n,r,o+1,i)),o>=n&&(s=e<0?a.contentMatchAt(0).fillBefore(s,i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(Ne.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}function Wm(t,e,n){return e<t.openStart&&(t=new Ge(Kd(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Ge(Kd(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Ey={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let qm=null;function $y(){return qm||(qm=document.implementation.createHTMLDocument("title"))}let Au=null;function Q$(t){let e=window.trustedTypes;return e?(Au||(Au=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Au.createHTML(t)):t}function Z$(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=$y().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Ey[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=Q$(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function eO(t){let e=t.querySelectorAll(Un?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function tO(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:a}=t;for(let s=r.length-2;s>=0;s-=2){let l=n.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=Ne.from(l.create(r[s+1],o)),i++,a++}return new Ge(o,i,a)}const tr={},nr={},nO={touchstart:!0,touchmove:!0};class rO{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function oO(t){for(let e in tr){let n=tr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{aO(t,r)&&!Mh(t,r)&&(t.editable||!(r.type in nr))&&n(t,r)},nO[e]?{passive:!0}:void 0)}er&&t.dom.addEventListener("input",()=>null),Ud(t)}function ko(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function iO(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Ud(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Mh(t,r))})}function Mh(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function aO(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function sO(t,e){!Mh(t,e)&&tr[e.type]&&(t.editable||!(e.type in nr))&&tr[e.type](t,e)}nr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Ny(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(uo&&Un&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),ca&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,ni(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||X$(t,n)?n.preventDefault():ko(t,"key")};nr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};nr.keypress=(t,e)=>{let n=e;if(Ny(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||xr&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof gt)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function Rc(t){return{left:t.clientX,top:t.clientY}}function lO(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Ih(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(t.someProp(e,s=>a>i.depth?s(t,n,i.nodeAfter,i.before(a),o,!0):s(t,n,i.node(a),i.before(a),o,!1)))return!0;return!1}function ta(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function cO(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&mt.isSelectable(r)?(ta(t,new mt(n)),!0):!1}function uO(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof mt&&(r=n.node);let i=t.state.doc.resolve(e);for(let a=i.depth+1;a>0;a--){let s=a>i.depth?i.nodeAfter:i.node(a);if(mt.isSelectable(s)){r&&n.$from.depth>0&&a>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(a);break}}return o!=null?(ta(t,mt.create(t.state.doc,o)),!0):!1}function dO(t,e,n,r,o){return Ih(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?uO(t,n):cO(t,n))}function fO(t,e,n,r){return Ih(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function hO(t,e,n,r){return Ih(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||pO(t,n,r)}function pO(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(ta(t,gt.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ta(t,gt.create(r,s+1,s+1+a.content.size));else if(mt.isSelectable(a))ta(t,mt.create(r,s));else continue;return!0}}function Rh(t){return Jl(t)}const Oy=xr?"metaKey":"ctrlKey";tr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Rh(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&lO(n,t.input.lastClick)&&!n[Oy]&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let a=t.posAtCoords(Rc(n));a&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new mO(t,a,n,!!r)):(i=="doubleClick"?fO:hO)(t,a.pos,a.inside,n)?n.preventDefault():ko(t,"pointer"))};class mO{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Oy],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),a=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}const s=o?null:r.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof mt&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Br&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ko(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>mo(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Rc(e))),this.updateAllowDefault(e),this.allowDefault||!n?ko(this.view,"pointer"):dO(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||er&&this.mightDrag&&!this.mightDrag.node.isAtom||Un&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ta(this.view,vt.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):ko(this.view,"pointer")}move(e){this.updateAllowDefault(e),ko(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}tr.touchstart=t=>{t.input.lastTouch=Date.now(),Rh(t),ko(t,"pointer")};tr.touchmove=t=>{t.input.lastTouch=Date.now(),ko(t,"pointer")};tr.contextmenu=t=>Rh(t);function Ny(t,e){return t.composing?!0:er&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const gO=uo?5e3:-1;nr.compositionstart=nr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof gt&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Jl(t,!0),t.markCursor=null;else if(Jl(t,!e.selection.empty),Br&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(a.nodeType==3){let s=t.domSelection();s&&s.collapse(a,a.nodeValue.length);break}else o=a,i=-1}}t.input.composing=!0}My(t,gO)};nr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,My(t,20))};function My(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Jl(t),e))}function Iy(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=bO());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function vO(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=c$(e.focusNode,e.focusOffset),r=u$(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function bO(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Jl(t,e=!1){if(!(uo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Iy(t),e||t.docView&&t.docView.dirty){let n=$h(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function yO(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const ss=or&&Lo<15||ca&&m$<604;tr.copy=nr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=ss?null:n.clipboardData,a=r.content(),{dom:s,text:l}=Nh(t,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):yO(t,s),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function CO(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function SO(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ls(t,r.value,null,o,e):ls(t,r.textContent,r.innerHTML,o,e)},50)}function ls(t,e,n,r,o){let i=Cy(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,i||Ge.empty)))return!0;if(!i)return!1;let a=CO(i),s=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(i);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ry(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}nr.paste=(t,e)=>{let n=e;if(t.composing&&!uo)return;let r=ss?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&ls(t,Ry(r),r.getData("text/html"),o,n)?n.preventDefault():SO(t,n)};class Ty{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Py=xr?"altKey":"ctrlKey";tr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(Rc(n)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof mt?o.to-1:o.to))){if(r&&r.mightDrag)a=mt.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(a=mt.create(t.state.doc,d.posBefore))}}let s=(a||t.state.selection).content(),{dom:l,text:c,slice:u}=Nh(t,s);(!n.dataTransfer.files.length||!Un||oy>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ss?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ss||n.dataTransfer.setData("text/plain",c),t.dragging=new Ty(u,!n[Py],a)};tr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};nr.dragover=nr.dragenter=(t,e)=>e.preventDefault();nr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(Rc(n));if(!o)return;let i=t.state.doc.resolve(o.pos),a=r&&r.slice;a?t.someProp("transformPasted",m=>{a=m(a,t)}):a=Cy(t,Ry(n.dataTransfer),ss?null:n.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&!n[Py]);if(t.someProp("handleDrop",m=>m(t,n,a||Ge.empty,s))){n.preventDefault();return}if(!a)return;n.preventDefault();let l=a?G0(t.state.doc,i.pos,a):i.pos;l==null&&(l=i.pos);let c=t.state.tr;if(s){let{node:m}=r;m?m.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,a.content.firstChild):c.replaceRange(u,u,a),c.doc.eq(f))return;let p=c.doc.resolve(u);if(d&&mt.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new mt(p));else{let m=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((v,g,y,b)=>m=b),c.setSelection(Oh(t,p,c.doc.resolve(m)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};tr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&mo(t)},20))};tr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};tr.beforeinput=(t,e)=>{if(Un&&uo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,ni(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in nr)tr[t]=nr[t];function cs(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Ql{constructor(e,n){this.toDOM=e,this.spec=n||pi,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:a}=e.mapResult(n.from+o,this.side<0?-1:1);return a?null:new Zn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Ql&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&cs(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ho{constructor(e,n){this.attrs=e,this.spec=n||pi}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,a=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new Zn(i,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Ho&&cs(this.attrs,e.attrs)&&cs(this.spec,e.spec)}static is(e){return e.type instanceof Ho}destroy(){}}class Th{constructor(e,n){this.attrs=e,this.spec=n||pi}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let a=e.mapResult(n.to+o,-1);return a.deleted||a.pos<=i.pos?null:new Zn(i.pos-r,a.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof Th&&cs(this.attrs,e.attrs)&&cs(this.spec,e.spec)}destroy(){}}class Zn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Zn(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Zn(e,e,new Ql(n,r))}static inline(e,n,r,o){return new Zn(e,n,new Ho(r,o))}static node(e,n,r,o){return new Zn(e,n,new Th(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ho}get widget(){return this.type instanceof Ql}}const Gi=[],pi={};class bn{constructor(e,n){this.local=e.length?e:Gi,this.children=n.length?n:Gi}static create(e,n){return n.length?Zl(n,e,0,pi):qn}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=n&&s.to>=e&&(!i||i(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>e){let s=this.children[a]+1;this.children[a+2].findInner(e-s,n-s,r,o+s,i)}}map(e,n,r){return this==qn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||pi)}mapInner(e,n,r,o,i){let a;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?xO(this.children,a||[],e,n,r,o,i):a?new bn(a.sort(mi),Gi):qn}add(e,n){return n.length?this==qn?bn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((s,l)=>{let c=l+r,u;if(u=Dy(n,s,c)){for(o||(o=this.children.slice());i<o.length&&o[i]<l;)i+=3;o[i]==l?o[i+2]=o[i+2].addInner(s,u,c+1):o.splice(i,0,l,l+s.nodeSize,Zl(u,s,c+1,pi)),i+=3}});let a=Ay(i?ky(n):n,-r);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new bn(a.length?this.local.concat(a).sort(mi):this.local,o||this.children)}remove(e){return e.length==0||this==qn?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let a,s=r[i]+n,l=r[i+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>s&&d.to<l&&(e[u]=null,(a||(a=[])).push(d));if(!a)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(a,s+1);c!=qn?r[i+2]=c:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,a;i<e.length;i++)if(a=e[i])for(let s=0;s<o.length;s++)o[s].eq(a,n)&&(o==this.local&&(o=this.local.slice()),o.splice(s--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new bn(o,r):qn}forChild(e,n){if(this==qn)return this;if(n.isLeaf)return bn.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(r=this.children[s+2]);break}let i=e+1,a=i+n.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof Ho){let c=Math.max(i,l.from)-i,u=Math.min(a,l.to)-i;c<u&&(o||(o=[])).push(l.copy(c,u))}}if(o){let s=new bn(o.sort(mi),Gi);return r?new Ro([s,r]):s}return r||qn}eq(e){if(this==e)return!0;if(!(e instanceof bn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Ph(this.localsInner(e))}localsInner(e){if(this==qn)return Gi;if(e.inlineContent||!this.local.some(Ho.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Ho||n.push(this.local[r]);return n}forEachSet(e){e(this)}}bn.empty=new bn([],[]);bn.removeOverlap=Ph;const qn=bn.empty;class Ro{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,pi));return Ro.from(r)}forChild(e,n){if(n.isLeaf)return bn.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=qn&&(i instanceof Ro?r=r.concat(i.members):r.push(i))}return Ro.from(r)}eq(e){if(!(e instanceof Ro)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let a=0;a<i.length;a++)n.push(i[a])}}return n?Ph(r?n:n.sort(mi)):Gi}static from(e){switch(e.length){case 0:return qn;case 1:return e[0];default:return new Ro(e.every(n=>n instanceof bn)?e:e.reduce((n,r)=>n.concat(r instanceof bn?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function xO(t,e,n,r,o,i,a){let s=t.slice();for(let c=0,u=i;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,p,m,v)=>{let g=v-m-(p-f);for(let y=0;y<s.length;y+=3){let b=s[y+1];if(b<0||f>b+u-d)continue;let C=s[y]+u-d;p>=C?s[y+1]=f<=C?-2:-1:f>=u&&g&&(s[y]+=g,s[y+1]+=g)}d+=g}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<s.length;c+=3)if(s[c+1]<0){if(s[c+1]==-2){l=!0,s[c+1]=-1;continue}let u=n.map(t[c]+i),d=u-o;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(t[c+1]+i,-1),p=f-o,{index:m,offset:v}=r.content.findIndex(d),g=r.maybeChild(m);if(g&&v==d&&v+g.nodeSize==p){let y=s[c+2].mapInner(n,g,u+1,t[c]+i+1,a);y!=qn?(s[c]=d,s[c+1]=p,s[c+2]=y):(s[c+1]=-2,l=!0)}else l=!0}if(l){let c=wO(s,t,e,n,o,i,a),u=Zl(c,r,0,a);e=u.local;for(let d=0;d<s.length;d+=3)s[d+1]<0&&(s.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let p=u.children[d];for(;f<s.length&&s[f]<p;)f+=3;s.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new bn(e.sort(mi),s)}function Ay(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new Zn(o.from+e,o.to+e,o.type))}return n}function wO(t,e,n,r,o,i,a){function s(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(r,o,c);d?n.push(d):a.onRemove&&a.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)s(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&s(t[l+2],e[l]+i+1);return n}function Dy(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,a;i<t.length;i++)(a=t[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),t[i]=null);return o}function ky(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Zl(t,e,n,r){let o=[],i=!1;e.forEach((s,l)=>{let c=Dy(t,s,l+n);if(c){i=!0;let u=Zl(c,s,n+l+1,r);u!=qn&&o.push(l,l+s.nodeSize,u)}});let a=Ay(i?ky(t):t,-n).sort(mi);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new bn(a,o):qn}function mi(t,e){return t.from-e.from||t.to-e.to}function Ph(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),Km(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Km(e,o,r.copy(i.from,r.to)));break}}}return e}function Km(t,e,n){for(;e<t.length&&mi(n,t[e])>0;)e++;t.splice(e,0,n)}function Du(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=qn&&e.push(r)}),t.cursorWrapper&&e.push(bn.create(t.state.doc,[t.cursorWrapper.deco])),Ro.from(e)}const EO={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},$O=or&&Lo<=11;class OO{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class NO{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new OO,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);or&&Lo<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),$O&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,EO)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(zm(this.view)){if(this.suppressingSelectionUpdates)return mo(this.view);if(or&&Lo<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Si(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=la(i))n.add(i);for(let i=e.anchorNode;i;i=la(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&zm(e)&&!this.ignoreSelectionChange(r),i=-1,a=-1,s=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(i=i<0?d.from:Math.min(d.from,i),a=a<0?d.to:Math.max(d.to,a),d.typeOver&&(s=!0))}if(Br&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||RO(e,d)!=p)&&f.remove()}}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Mc(r)&&(c=$h(e))&&c.eq(vt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,mo(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,a),MO(e)),this.handleDOMChange(i,a,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||mo(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let d=e.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(or&&Lo<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f)}let a=o&&o.parentNode==e.target?Ln(o)+1:0,s=r.localPosFromDOM(e.target,a,-1),l=i&&i.parentNode==e.target?Ln(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:s,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Um=new WeakMap,Gm=!1;function MO(t){if(!Um.has(t)&&(Um.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Br,Gm)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Gm=!0}}function Xm(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return Si(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function IO(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return Xm(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Xm(t,n):null}function RO(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function TO(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:a,to:s}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Mc(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Un&&t.input.lastKeyCode===8)for(let g=i;g>o;g--){let y=r.childNodes[g-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){i=g;break}if(!b||b.size)break}let d=t.state.doc,f=t.someProp("domParser")||jo.fromSchema(t.state.schema),p=d.resolve(a),m=null,v=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:PO,context:p});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),m={anchor:g+a,head:y+a}}return{doc:v,sel:m,from:a,to:s}}function PO(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(er&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||er&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const AO=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function DO(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let O=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,M=$h(t,O);if(M&&!t.state.selection.eq(M)){if(Un&&uo&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",D=>D(t,ni(13,"Enter"))))return;let I=t.state.tr.setSelection(M);O=="pointer"?I.setMeta("pointer",!0):O=="key"&&I.scrollIntoView(),i&&I.setMeta("composition",i),t.dispatch(I)}return}let a=t.state.doc.resolve(e),s=a.sharedDepth(n);e=a.before(s+1),n=t.state.doc.resolve(n).after(s+1);let l=t.state.selection,c=TO(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),f,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,p="end"):(f=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=BO(d.content,c.doc.content,c.from,f,p);if(m&&t.input.domChangeCount++,(ca&&t.input.lastIOSEnter>Date.now()-225||uo)&&o.some(O=>O.nodeType==1&&!AO.test(O.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",O=>O(t,ni(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&l instanceof gt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))m={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let O=Ym(t,t.state.doc,c.sel);if(O&&!O.eq(t.state.selection)){let M=t.state.tr.setSelection(O);i&&M.setMeta("composition",i),t.dispatch(M)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof gt&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),or&&Lo<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>c.from&&c.doc.textBetween(m.start-c.from-1,m.start-c.from+1)==" "&&(m.start--,m.endA--,m.endB--);let v=c.doc.resolveNoCache(m.start-c.from),g=c.doc.resolveNoCache(m.endB-c.from),y=u.resolve(m.start),b=v.sameParent(g)&&v.parent.inlineContent&&y.end()>=m.endA,C;if((ca&&t.input.lastIOSEnter>Date.now()-225&&(!b||o.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!b&&v.pos<c.doc.content.size&&!v.sameParent(g)&&(C=vt.findFrom(c.doc.resolve(v.pos+1),1,!0))&&C.head==g.pos)&&t.someProp("handleKeyDown",O=>O(t,ni(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&_O(u,m.start,m.endA,v,g)&&t.someProp("handleKeyDown",O=>O(t,ni(8,"Backspace")))){uo&&Un&&t.domObserver.suppressSelectionUpdates();return}Un&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),uo&&!b&&v.start()!=g.start()&&g.parentOffset==0&&v.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==m.endA&&(m.endB-=2,g=c.doc.resolveNoCache(m.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(O){return O(t,ni(13,"Enter"))})},20));let x=m.start,S=m.endA,w,E,N;if(b){if(v.pos==g.pos)or&&Lo<=11&&v.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>mo(t),20)),w=t.state.tr.delete(x,S),E=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(N=kO(v.parent.content.cut(v.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start()))))w=t.state.tr,N.type=="add"?w.addMark(x,S,N.mark):w.removeMark(x,S,N.mark);else if(v.parent.child(v.index()).isText&&v.index()==g.index()-(g.textOffset?0:1)){let O=v.parent.textBetween(v.parentOffset,g.parentOffset);if(t.someProp("handleTextInput",M=>M(t,x,S,O)))return;w=t.state.tr.insertText(O,x,S)}}if(w||(w=t.state.tr.replace(x,S,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let O=Ym(t,w.doc,c.sel);O&&!(Un&&t.composing&&O.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(O.head==x||O.head==w.mapping.map(S)-1)||or&&O.empty&&O.head==x)&&w.setSelection(O)}E&&w.ensureMarks(E),i&&w.setMeta("composition",i),t.dispatch(w.scrollIntoView())}function Ym(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Oh(t,e.resolve(n.anchor),e.resolve(n.head))}function kO(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,a,s,l;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(o.length==1&&i.length==0)s=o[0],a="add",l=u=>u.mark(s.addToSet(u.marks));else if(o.length==0&&i.length==1)s=i[0],a="remove",l=u=>u.mark(s.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(Ne.from(c).eq(t))return{mark:s,type:a}}function _O(t,e,n,r,o){if(n-e<=o.pos-r.pos||ku(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let s=i.nodeAfter;return s!=null&&n==e+s.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=t.resolve(ku(i,!0,!0));return!a.parent.isTextblock||a.pos>n||ku(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function ku(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function BO(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a,b:s}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let l=Math.max(0,i-Math.min(a,s));r-=a+l-i}if(a<i&&t.size<e.size){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<e.size&&Jm(e.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}else if(s<i){let l=r<=i&&r>=s?i-r:0;i-=l,i&&i<t.size&&Jm(t.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function Jm(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class zO{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new rO,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(ng),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=eg(this),Zm(this),this.nodeViews=tg(this),this.docView=Pm(this.state.doc,Qm(this),Du(this),this.dom,this),this.domObserver=new NO(this,(r,o,i,a)=>DO(this,r,o,i,a)),this.domObserver.start(),oO(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ud(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(ng),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,a=!1;e.storedMarks&&this.composing&&(Iy(this),a=!0),this.state=e;let s=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=tg(this);LO(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ud(this),this.editable=eg(this),Zm(this);let l=Du(this),c=Qm(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(o.selection))&&(a=!0);let f=u=="preserve"&&a&&this.dom.style.overflowAnchor==null&&b$(this);if(a){this.domObserver.stop();let p=d&&(or||Un)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&jO(o.selection,e.selection);if(d){let m=Un?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=vO(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Pm(e.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&H$(this))?mo(this,p):(vy(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&y$(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof mt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Om(this,n.getBoundingClientRect(),e)}else Om(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new Ty(e.slice,e.move,o<0?void 0:mt.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let a=0;a<this.directPlugins.length;a++){let s=this.directPlugins[a].props[e];if(s!=null&&(o=n?n(s):s))return o}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let s=i[a].props[e];if(s!=null&&(o=n?n(s):s))return o}}hasFocus(){if(or){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&C$(this.dom),mo(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return $$(this,e)}coordsAtPos(e,n=1){return cy(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return R$(this,n||this.state,e)}pasteHTML(e,n){return ls(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return ls(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Nh(this,e)}destroy(){this.docView&&(iO(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Du(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,s$())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return sO(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?er&&this.root.nodeType===11&&f$(this.dom.ownerDocument)==this.dom&&IO(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Qm(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Zn.node(0,t.state.doc.content.size,e)]}function Zm(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Zn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function eg(t){return!t.someProp("editable",e=>e(t.state)===!1)}function jO(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function tg(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function LO(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function ng(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Vo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ec={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},FO=typeof navigator<"u"&&/Mac/.test(navigator.platform),HO=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Fn=0;Fn<10;Fn++)Vo[48+Fn]=Vo[96+Fn]=String(Fn);for(var Fn=1;Fn<=24;Fn++)Vo[Fn+111]="F"+Fn;for(var Fn=65;Fn<=90;Fn++)Vo[Fn]=String.fromCharCode(Fn+32),ec[Fn]=String.fromCharCode(Fn);for(var _u in Vo)ec.hasOwnProperty(_u)||(ec[_u]=Vo[_u]);function VO(t){var e=FO&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||HO&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?ec:Vo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const WO=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function qO(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<e.length-1;s++){let l=e[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))WO?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),a&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function KO(t){let e=Object.create(null);for(let n in t)e[qO(n)]=t[n];return e}function Bu(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function UO(t){return new Qn({props:{handleKeyDown:Ah(t)}})}function Ah(t){let e=KO(t);return function(n,r){let o=VO(r),i,a=e[Bu(o,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=e[Bu(o,r,!1)];if(s&&s(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=Vo[r.keyCode])&&i!=o){let s=e[Bu(i,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}const Dh=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function _y(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const By=(t,e,n)=>{let r=_y(t,n);if(!r)return!1;let o=kh(r);if(!o){let a=r.blockRange(),s=a&&xa(a);return s==null?!1:(e&&e(t.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(Ky(t,o,e,-1))return!0;if(r.parent.content.size==0&&(ua(i,"end")||mt.isSelectable(i)))for(let a=r.depth;;a--){let s=Oc(t.doc,r.before(a),r.after(a),Ge.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(ua(i,"end")?vt.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):mt.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},GO=(t,e,n)=>{let r=_y(t,n);if(!r)return!1;let o=kh(r);return o?zy(t,o,e):!1},XO=(t,e,n)=>{let r=Ly(t,n);if(!r)return!1;let o=_h(r);return o?zy(t,o,e):!1};function zy(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let a=e.nodeAfter,s=a,l=e.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let u=s.firstChild;if(!u)return!1;s=u}let c=Oc(t.doc,i,l,Ge.empty);if(!c||c.from!=i||c instanceof kn&&c.slice.size>=l-i)return!1;if(n){let u=t.tr.step(c);u.setSelection(gt.create(u.doc,i)),n(u.scrollIntoView())}return!0}function ua(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const jy=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=kh(r)}let a=i&&i.nodeBefore;return!a||!mt.isSelectable(a)?!1:(e&&e(t.tr.setSelection(mt.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function kh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Ly(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Fy=(t,e,n)=>{let r=Ly(t,n);if(!r)return!1;let o=_h(r);if(!o)return!1;let i=o.nodeAfter;if(Ky(t,o,e,1))return!0;if(r.parent.content.size==0&&(ua(i,"start")||mt.isSelectable(i))){let a=Oc(t.doc,r.before(),r.after(),Ge.empty);if(a&&a.slice.size<a.to-a.from){if(e){let s=t.tr.step(a);s.setSelection(ua(i,"start")?vt.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):mt.create(s.doc,s.mapping.map(o.pos))),e(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},Hy=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=_h(r)}let a=i&&i.nodeAfter;return!a||!mt.isSelectable(a)?!1:(e&&e(t.tr.setSelection(mt.create(t.doc,i.pos)).scrollIntoView()),!0)};function _h(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const YO=(t,e)=>{let n=t.selection,r=n instanceof mt,o;if(r){if(n.node.isTextblock||!Go(t.doc,n.from))return!1;o=n.from}else if(o=$c(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(mt.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},JO=(t,e)=>{let n=t.selection,r;if(n instanceof mt){if(n.node.isTextblock||!Go(t.doc,n.to))return!1;r=n.to}else if(r=$c(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},QO=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&xa(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},Vy=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
49
|
-
`).scrollIntoView()),!0)};function Bh(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const ZO=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=Bh(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(e){let s=n.after(),l=t.tr.replaceWith(s,s,a.createAndFill());l.setSelection(vt.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},Wy=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof mr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Bh(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=t.tr.insert(a,i.createAndFill());s.setSelection(gt.create(s.doc,a+1)),e(s.scrollIntoView())}return!0},qy=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(po(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&xa(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function eN(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof mt&&e.selection.node.isBlock)return!r.parentOffset||!po(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],a,s,l=!1,c=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),c=r.start(p)==r.pos-(r.depth-p),s=Bh(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),i.unshift(l&&s?{type:s}:null),a=p;break}else{if(p==1)return!1;i.unshift(null)}let u=e.tr;(e.selection instanceof gt||e.selection instanceof mr)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=po(u.doc,d,i.length,i);if(f||(i[0]=s?{type:s}:null,f=po(u.doc,d,i.length,i)),u.split(d,i.length,i),!l&&c&&r.node(a).type!=s){let p=u.mapping.map(r.before(a)),m=u.doc.resolve(p);s&&r.node(a-1).canReplaceWith(m.index(),m.index()+1,s)&&u.setNodeMarkup(u.mapping.map(r.before(a)),s)}return n&&n(u.scrollIntoView()),!0}}const tN=eN(),nN=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(mt.create(t.doc,o))),!0)};function rN(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Go(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Ky(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,a,s,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&rN(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(a=(s=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&s.matchType(a[0]||i.type).validEnd){if(n){let p=e.pos+i.nodeSize,m=Ne.empty;for(let y=a.length-1;y>=0;y--)m=Ne.from(a[y].create(null,m));m=Ne.from(o.copy(m));let v=t.tr.step(new _n(e.pos-1,p,e.pos,p,new Ge(m,1,0),a.length,!0)),g=v.doc.resolve(p+2*a.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Go(v.doc,g.pos)&&v.join(g.pos),n(v.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:vt.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&xa(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(c&&ua(i,"start",!0)&&ua(o,"end")){let p=o,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let v=i,g=1;for(;!v.isTextblock;v=v.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(n){let y=Ne.empty;for(let C=m.length-1;C>=0;C--)y=Ne.from(m[C].copy(y));let b=t.tr.step(new _n(e.pos-m.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new Ge(y,m.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function Uy(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(gt.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const oN=Uy(-1),iN=Uy(1);function aN(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=a&&xh(a,t,e);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function rg(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:a},$to:{pos:s}}=n.selection.ranges[i];n.doc.nodesBetween(a,s,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let u=n.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[a];i.setBlockType(s,l,t,e)}r(i.scrollIntoView())}return!0}}function zh(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}zh(Dh,By,jy);zh(Dh,Fy,Hy);zh(Vy,Wy,qy,tN);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function sN(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i);if(!a)return!1;let s=r?n.tr:null;return lN(s,a,t,e)?(r&&r(s.scrollIntoView()),!0):!1}}function lN(t,e,n,r=null){let o=!1,i=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=a.resolve(e.start-2);i=new Ul(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Ul(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let s=xh(i,n,r,e);return s?(t&&cN(t,e,s,o,n),!0):!1}function cN(t,e,n,r,o){let i=Ne.empty;for(let u=n.length-1;u>=0;u--)i=Ne.from(n[u].type.create(n[u].attrs,i));t.step(new _n(e.start-(r?2:0),e.end,e.start,e.end,new Ge(i,0,0),n.length,!0));let a=0;for(let u=0;u<n.length;u++)n[u].type==o&&(a=u+1);let s=n.length-a,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&po(t.doc,l,s)&&(t.split(l,s),l+=2*s),l+=c.child(u).nodeSize;return t}function uN(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?dN(e,n,t,i):fN(e,n,i):!0:!1}}function dN(t,e,n,r){let o=t.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new _n(i-1,a,i,a,new Ge(Ne.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Ul(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=xa(r);if(s==null)return!1;o.lift(r,s);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return Go(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function fN(t,e,n){let r=t.tr,o=n.parent;for(let p=n.end,m=n.endIndex-1,v=n.startIndex;m>v;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(s?0:1),u+1,a.content.append(l?Ne.empty:Ne.from(o))))return!1;let d=i.pos,f=d+a.nodeSize;return r.step(new _n(d-(s?1:0),f+(l?1:0),d+1,f-1,new Ge((s?Ne.empty:Ne.from(o.copy(Ne.empty))).append(l?Ne.empty:Ne.from(o.copy(Ne.empty))),s?0:1,l?0:1),s?0:1)),e(r.scrollIntoView()),!0}function hN(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==t);if(!i)return!1;let a=i.startIndex;if(a==0)return!1;let s=i.parent,l=s.child(a-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==s.type,u=Ne.from(c?t.create():null),d=new Ge(Ne.from(t.create(null,Ne.from(s.type.create(null,u)))),c?3:1,0),f=i.start,p=i.end;n(e.tr.step(new _n(f-(c?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function Tc(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class Pc{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...u)=>{const d=l(...u)(a);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s=[],l=!!e,c=e||i.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(c),s.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,p])=>[f,(...v)=>{const g=this.buildProps(c,n),y=p(...v)(g);return s.push(y),d}])),run:u};return d}createCan(e){const{rawCommands:n,state:r}=this,o=!1,i=e||r.tr,a=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)({...a,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s={tr:e,editor:o,view:a,state:Tc({state:i,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(s)]))}};return s}}class pN{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(o=>o!==n):delete this.callbacks[e]),this}once(e,n){const r=(...o)=>{this.off(e,r),n.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function ut(t,e,n){return t.config[e]===void 0&&t.parent?ut(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ut(t.parent,e,n):null}):t.config[e]}function Ac(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Gy(t){const e=[],{nodeExtensions:n,markExtensions:r}=Ac(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage,extensions:o},l=ut(a,"addGlobalAttributes",s);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,p])=>{e.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage},l=ut(a,"addAttributes",s);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const f={...i,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:a.name,name:u,attribute:f})})}),e}function zn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Zt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const s=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],c=s.filter(u=>!l.includes(u));r[o]=[...l,...c].join(" ")}else if(o==="style"){const s=i?i.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());c.set(d,f)}),s.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());c.set(d,f)}),r[o]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[o]=i}),r},{})}function tc(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Zt(n,r),{})}function Xy(t){return typeof t=="function"}function Mt(t,e=void 0,...n){return Xy(t)?e?t.bind(e)(...n):t(...n):t}function mN(t={}){return Object.keys(t).length===0&&t.constructor===Object}function gN(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function og(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,a)=>{const s=a.attribute.parseHTML?a.attribute.parseHTML(n):gN(n.getAttribute(a.name));return s==null?i:{...i,[a.name]:s}},{});return{...r,...o}}}}function ig(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&mN(n)?!1:n!=null))}function vN(t,e){var n;const r=Gy(t),{nodeExtensions:o,markExtensions:i}=Ac(t),a=(n=o.find(c=>ut(c,"topNode")))===null||n===void 0?void 0:n.name,s=Object.fromEntries(o.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((y,b)=>{const C=ut(b,"extendNodeSchema",d);return{...y,...C?C(c):{}}},{}),p=ig({...f,content:Mt(ut(c,"content",d)),marks:Mt(ut(c,"marks",d)),group:Mt(ut(c,"group",d)),inline:Mt(ut(c,"inline",d)),atom:Mt(ut(c,"atom",d)),selectable:Mt(ut(c,"selectable",d)),draggable:Mt(ut(c,"draggable",d)),code:Mt(ut(c,"code",d)),whitespace:Mt(ut(c,"whitespace",d)),linebreakReplacement:Mt(ut(c,"linebreakReplacement",d)),defining:Mt(ut(c,"defining",d)),isolating:Mt(ut(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),m=Mt(ut(c,"parseHTML",d));m&&(p.parseDOM=m.map(y=>og(y,u)));const v=ut(c,"renderHTML",d);v&&(p.toDOM=y=>v({node:y,HTMLAttributes:tc(y,u)}));const g=ut(c,"renderText",d);return g&&(p.toText=g),[c.name,p]})),l=Object.fromEntries(i.map(c=>{const u=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((g,y)=>{const b=ut(y,"extendMarkSchema",d);return{...g,...b?b(c):{}}},{}),p=ig({...f,inclusive:Mt(ut(c,"inclusive",d)),excludes:Mt(ut(c,"excludes",d)),group:Mt(ut(c,"group",d)),spanning:Mt(ut(c,"spanning",d)),code:Mt(ut(c,"code",d)),attrs:Object.fromEntries(u.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))}),m=Mt(ut(c,"parseHTML",d));m&&(p.parseDOM=m.map(g=>og(g,u)));const v=ut(c,"renderHTML",d);return v&&(p.toDOM=g=>v({mark:g,HTMLAttributes:tc(g,u)})),[c.name,p]}));return new B0({topNode:a,nodes:s,marks:l})}function zu(t,e){return e.nodes[t]||e.marks[t]||null}function ag(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function jh(t,e){const n=Ii.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const bN=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,a,s)=>{var l,c;const u=((c=(l=o.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:o,pos:i,parent:a,index:s}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-i))}),n};function Lh(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class Dc{constructor(e){this.find=e.find,this.handler=e.handler}}const yN=(t,e)=>{if(Lh(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function tl(t){var e;const{editor:n,from:r,to:o,text:i,rules:a,plugin:s}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=bN(c)+i;return a.forEach(f=>{if(u)return;const p=yN(d,f.find);if(!p)return;const m=l.state.tr,v=Tc({state:l.state,transaction:m}),g={from:r-(p[0].length-i.length),to:o},{commands:y,chain:b,can:C}=new Pc({editor:n,state:v});f.handler({state:v,range:g,match:p,commands:y,chain:b,can:C})===null||!m.steps.length||(m.setMeta(s,{transform:m,from:r,to:o,text:i}),l.dispatch(m),u=!0)}),u}function CN(t){const{editor:e,rules:n}=t,r=new Qn({state:{init(){return null},apply(o,i,a){const s=o.getMeta(r);if(s)return s;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=jh(Ne.from(u),a.schema);const{from:d}=l,f=d+u.length;tl({editor:e,from:d,to:f,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,a,s){return tl({editor:e,from:i,to:a,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&tl({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:a}=o.state.selection;return a?tl({editor:e,from:a.pos,to:a.pos,text:`
|
|
50
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function SN(t){return Object.prototype.toString.call(t).slice(8,-1)}function nl(t){return SN(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function kc(t,e){const n={...t};return nl(t)&&nl(e)&&Object.keys(e).forEach(r=>{nl(e[r])&&nl(t[r])?n[r]=kc(t[r],e[r]):n[r]=e[r]}),n}let to=class Gd{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Mt(ut(this,"addOptions",{name:this.name}))),this.storage=Mt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Gd(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>kc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Gd(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Mt(ut(n,"addOptions",{name:n.name})),n.storage=Mt(ut(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const a=o.marks();if(!!!a.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=a.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}};function xN(t){return typeof t=="number"}class wN{constructor(e){this.find=e.find,this.handler=e.handler}}const EN=(t,e,n)=>{if(Lh(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function $N(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:a,dropEvent:s}=t,{commands:l,chain:c,can:u}=new Pc({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const v=Math.max(r,m),g=Math.min(o,m+p.content.size),y=p.textBetween(v-m,g-m,void 0,"");EN(y,i.find,a).forEach(C=>{if(C.index===void 0)return;const x=v+C.index+1,S=x+C[0].length,w={from:n.tr.mapping.map(x),to:n.tr.mapping.map(S)},E=i.handler({state:n,range:w,match:C,commands:l,chain:c,can:u,pasteEvent:a,dropEvent:s});d.push(E)})}),d.every(p=>p!==null)}let rl=null;const ON=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function NN(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s;try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}const l=({state:u,from:d,to:f,rule:p,pasteEvt:m})=>{const v=u.tr,g=Tc({state:u,transaction:v});if(!(!$N({editor:e,state:g,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:m,dropEvent:s})||!v.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,v}};return n.map(u=>new Qn({view(d){const f=m=>{var v;r=!((v=d.dom.parentElement)===null||v===void 0)&&v.contains(m.target)?d.dom.parentElement:null,r&&(rl=e)},p=()=>{rl&&(rl=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,s=f,!i){const p=rl;p&&setTimeout(()=>{const m=p.state.selection;m&&p.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(d,f)=>{var p;const m=(p=f.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return a=f,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,p)=>{const m=d[0],v=m.getMeta("uiEvent")==="paste"&&!o,g=m.getMeta("uiEvent")==="drop"&&!i,y=m.getMeta("applyPasteRules"),b=!!y;if(!v&&!g&&!b)return;if(b){let{text:S}=y;typeof S=="string"?S=S:S=jh(Ne.from(S),p.schema);const{from:w}=y,E=w+S.length,N=ON(S);return l({rule:u,state:p,from:w,to:{b:E},pasteEvt:N})}const C=f.doc.content.findDiffStart(p.doc.content),x=f.doc.content.findDiffEnd(p.doc.content);if(!(!xN(C)||!x||C===x.b))return l({rule:u,state:p,from:C,to:x,pasteEvt:a})}}))}function MN(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class Yi{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=Yi.resolve(e),this.schema=vN(this.extensions,n),this.setupExtensions()}static resolve(e){const n=Yi.sort(Yi.flatten(e)),r=MN(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=ut(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=ut(r,"priority")||100,a=ut(o,"priority")||100;return i>a?-1:i<a?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:zu(n.name,this.schema)},o=ut(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=Yi.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:e,type:zu(a.name,this.schema)},l=[],c=ut(a,"addKeyboardShortcuts",s);let u={};if(a.type==="mark"&&ut(a,"exitable",s)&&(u.ArrowRight=()=>to.handleExit({editor:e,mark:a})),c){const v=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));u={...u,...v}}const d=UO(u);l.push(d);const f=ut(a,"addInputRules",s);ag(a,e.options.enableInputRules)&&f&&r.push(...f());const p=ut(a,"addPasteRules",s);ag(a,e.options.enablePasteRules)&&p&&o.push(...p());const m=ut(a,"addProseMirrorPlugins",s);if(m){const v=m();l.push(...v)}return l}).flat();return[CN({editor:e,rules:r}),...NN({editor:e,rules:o}),...i]}get attributes(){return Gy(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=Ac(this.extensions);return Object.fromEntries(n.filter(r=>!!ut(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:zn(r.name,this.schema)},a=ut(r,"addNodeView",i);if(!a)return[];const s=(l,c,u,d,f)=>{const p=tc(l,o);return a()({node:l,view:c,getPos:u,decorations:d,innerDecorations:f,editor:e,extension:r,HTMLAttributes:p})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:zu(e.name,this.schema)};e.type==="mark"&&(!((n=Mt(ut(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=ut(e,"onBeforeCreate",r),i=ut(e,"onCreate",r),a=ut(e,"onUpdate",r),s=ut(e,"onSelectionUpdate",r),l=ut(e,"onTransaction",r),c=ut(e,"onFocus",r),u=ut(e,"onBlur",r),d=ut(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),a&&this.editor.on("update",a),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}class Vn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Mt(ut(this,"addOptions",{name:this.name}))),this.storage=Mt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Vn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>kc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Vn({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Mt(ut(n,"addOptions",{name:n.name})),n.storage=Mt(ut(n,"addStorage",{name:n.name,options:n.options})),n}}function Yy(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
51
|
-
|
|
52
|
-
`,textSerializers:a={}}=n||{};let s="";return t.nodesBetween(r,o,(l,c,u,d)=>{var f;l.isBlock&&c>r&&(s+=i);const p=a==null?void 0:a[l.type.name];if(p)return u&&(s+=p({node:l,pos:c,parent:u,index:d,range:e})),!1;l.isText&&(s+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,o-c))}),s}function Jy(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const IN=Vn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Qn({key:new vr("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,a=Math.min(...i.map(u=>u.$from.pos)),s=Math.max(...i.map(u=>u.$to.pos)),l=Jy(n);return Yy(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),RN=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),TN=(t=!1)=>({commands:e})=>e.setContent("",t),PN=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:a})=>{t.doc.nodesBetween(i.pos,a.pos,(s,l)=>{if(s.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+s.nodeSize)),p=d.blockRange(f);if(!p)return;const m=xa(p);if(s.type.isTextblock){const{defaultType:v}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(p.start,v)}(m||m===0)&&e.lift(p,m)})}),!0},AN=t=>e=>t(e),DN=()=>({state:t,dispatch:e})=>Wy(t,e),kN=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,i.content),r.setSelection(new gt(r.doc.resolve(a-1))),!0},_N=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const s=o.before(i),l=o.after(i);t.delete(s,l).scrollIntoView()}return!0}return!1},BN=t=>({tr:e,state:n,dispatch:r})=>{const o=zn(t,n.schema),i=e.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===o){if(r){const l=i.before(a),c=i.after(a);e.delete(l,c).scrollIntoView()}return!0}return!1},zN=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},jN=()=>({state:t,dispatch:e})=>Dh(t,e),LN=()=>({commands:t})=>t.keyboardShortcut("Enter"),FN=()=>({state:t,dispatch:e})=>ZO(t,e);function nc(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Lh(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function Qy(t,e,n={}){return t.find(r=>r.type===e&&nc(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function sg(t,e,n={}){return!!Qy(t,e,n)}function Fh(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===e)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!Qy([...o.node.marks],e,n)))return;let a=o.index,s=t.start()+o.offset,l=a+1,c=s+o.node.nodeSize;for(;a>0&&sg([...t.parent.child(a-1).marks],e,n);)a-=1,s-=t.parent.child(a).nodeSize;for(;l<t.parent.childCount&&sg([...t.parent.child(l).marks],e,n);)c+=t.parent.child(l).nodeSize,l+=1;return{from:s,to:c}}function Yo(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const HN=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=Yo(t,r.schema),{doc:a,selection:s}=n,{$from:l,from:c,to:u}=s;if(o){const d=Fh(l,i,e);if(d&&d.from<=c&&d.to>=u){const f=gt.create(a,d.from,d.to);n.setSelection(f)}}return!0},VN=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function Zy(t){return t instanceof gt}function li(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function eC(t,e=null){if(!e)return null;const n=vt.atStart(t),r=vt.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?gt.create(t,li(0,o,i),li(t.content.size,o,i)):gt.create(t,li(e,o,i),li(e,o,i))}function tC(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function _c(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const WN=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const a=()=>{(_c()||tC())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!Zy(n.state.selection))return a(),!0;const s=eC(o.doc,t)||n.state.selection,l=n.state.selection.eq(s);return i&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},qN=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),KN=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),nC=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&nC(r)}return t};function ol(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return nC(n)}function rc(t,e,n){if(t instanceof zo||t instanceof Ne)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return Ne.fromArray(t.map(s=>e.nodeFromJSON(s)));const a=e.nodeFromJSON(t);return n.errorOnInvalidContent&&a.check(),a}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),rc("",e,n)}if(o){if(n.errorOnInvalidContent){let a=!1,s="";const l=new B0({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,s=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?jo.fromSchema(l).parseSlice(ol(t),n.parseOptions):jo.fromSchema(l).parse(ol(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const i=jo.fromSchema(e);return n.slice?i.parseSlice(ol(t),n.parseOptions).content:i.parse(ol(t),n.parseOptions)}return rc("",e,n)}function UN(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof kn||o instanceof _n))return;const i=t.mapping.maps[r];let a=0;i.forEach((s,l,c,u)=>{a===0&&(a=u)}),t.setSelection(vt.near(t.doc.resolve(a),n))}const GN=t=>!("type"in t),XN=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var a;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s;try{s=rc(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(a=n.errorOnInvalidContent)!==null&&a!==void 0?a:i.options.enableContentCheck})}catch(m){return i.emit("contentError",{editor:i,error:m,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:c}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},u=!0,d=!0;if((GN(s)?s:[s]).forEach(m=>{m.check(),u=u?m.isText&&m.marks.length===0:!1,d=d?m.isBlock:!1}),l===c&&d){const{parent:m}=r.doc.resolve(l);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(l-=1,c+=1)}let p;if(u){if(Array.isArray(e))p=e.map(m=>m.text||"").join("");else if(e instanceof Ne){let m="";e.forEach(v=>{v.text&&(m+=v.text)}),p=m}else typeof e=="object"&&e&&e.text?p=e.text:p=e;r.insertText(p,l,c)}else p=s,r.replaceWith(l,c,p);n.updateSelection&&UN(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:p}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:p})}return!0},YN=()=>({state:t,dispatch:e})=>YO(t,e),JN=()=>({state:t,dispatch:e})=>JO(t,e),QN=()=>({state:t,dispatch:e})=>By(t,e),ZN=()=>({state:t,dispatch:e})=>Fy(t,e),eM=()=>({state:t,dispatch:e,tr:n})=>{try{const r=$c(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},tM=()=>({state:t,dispatch:e,tr:n})=>{try{const r=$c(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},nM=()=>({state:t,dispatch:e})=>GO(t,e),rM=()=>({state:t,dispatch:e})=>XO(t,e);function rC(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function oM(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<e.length-1;s+=1){const l=e[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))_c()||rC()?a=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}const iM=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=oM(t).split(/-(?!$)/),a=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),s=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,s))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function us(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,a=e?zn(e,t.schema):null,s=[];t.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const p=Math.max(r,f),m=Math.min(o,f+d.nodeSize);s.push({node:d,from:p,to:m})});const l=o-r,c=s.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>nc(d.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}const aM=(t,e={})=>({state:n,dispatch:r})=>{const o=zn(t,n.schema);return us(n,o,e)?QO(n,r):!1},sM=()=>({state:t,dispatch:e})=>qy(t,e),lM=t=>({state:e,dispatch:n})=>{const r=zn(t,e.schema);return uN(r)(e,n)},cM=()=>({state:t,dispatch:e})=>Vy(t,e);function Bc(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function lg(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const uM=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Bc(typeof t=="string"?t:t.name,r.schema);return s?(s==="node"&&(i=zn(t,r.schema)),s==="mark"&&(a=Yo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{i&&i===c.type&&n.setNodeMarkup(u,void 0,lg(c.attrs,e)),a&&c.marks.length&&c.marks.forEach(d=>{a===d.type&&n.addMark(u,u+c.nodeSize,a.create(lg(d.attrs,e)))})})}),!0):!1},dM=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),fM=()=>({tr:t,dispatch:e})=>{if(e){const n=new mr(t.doc);t.setSelection(n)}return!0},hM=()=>({state:t,dispatch:e})=>jy(t,e),pM=()=>({state:t,dispatch:e})=>Hy(t,e),mM=()=>({state:t,dispatch:e})=>nN(t,e),gM=()=>({state:t,dispatch:e})=>iN(t,e),vM=()=>({state:t,dispatch:e})=>oN(t,e);function Xd(t,e,n={},r={}){return rc(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const bM=(t,e=!1,n={},r={})=>({editor:o,tr:i,dispatch:a,commands:s})=>{var l,c;const{doc:u}=i;if(n.preserveWhitespace!=="full"){const d=Xd(t,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return a&&i.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!e),!0}return a&&i.setMeta("preventUpdate",!e),s.insertContentAt({from:0,to:u.content.size},t,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function oC(t,e){const n=Yo(e,t.schema),{from:r,to:o,empty:i}=t.selection,a=[];i?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,l=>{a.push(...l.marks)});const s=a.find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function yM(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function iC(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Hh(t){return e=>iC(e.$from,t)}function CM(t,e){const n={from:0,to:t.content.size};return Yy(t,n,e)}function SM(t,e){const n=zn(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,s=>{i.push(s)});const a=i.reverse().find(s=>s.type.name===n.name);return a?{...a.attrs}:{}}function xM(t,e){const n=Bc(typeof e=="string"?e:e.name,t.schema);return n==="node"?SM(t,e):n==="mark"?oC(t,e):{}}function aC(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),a=Fh(i,o.type);a&&r.push({mark:o,...a})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(a=>({from:i,to:i+o.nodeSize,mark:a})))}),r}function $l(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function Yd(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?Yo(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>nc(d.attrs,n,{strict:!1}));let a=0;const s=[];if(o.forEach(({$from:d,$to:f})=>{const p=d.pos,m=f.pos;t.doc.nodesBetween(p,m,(v,g)=>{if(!v.isText&&!v.marks.length)return;const y=Math.max(p,g),b=Math.min(m,g+v.nodeSize),C=b-y;a+=C,s.push(...v.marks.map(x=>({mark:x,from:y,to:b})))})}),a===0)return!1;const l=s.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>nc(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=s.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=a}function wM(t,e,n={}){if(!e)return us(t,null,n)||Yd(t,null,n);const r=Bc(e,t.schema);return r==="node"?us(t,e,n):r==="mark"?Yd(t,e,n):!1}function cg(t,e){const{nodeExtensions:n}=Ac(e),r=n.find(a=>a.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Mt(ut(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Vh(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!==null&&r!==void 0?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(Vh(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function EM(t){return t instanceof mt}function $M(t,e,n){var r;const{selection:o}=e;let i=null;if(Zy(o)&&(i=o.$cursor),i){const s=(r=t.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(s)||!s.some(l=>l.type.excludes(n))}const{ranges:a}=o;return a.some(({$from:s,$to:l})=>{let c=s.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(s.pos,l.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const p=!f||f.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(v=>v.type.excludes(n));c=p&&m}return!c}),c})}const OM=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:a,ranges:s}=i,l=Yo(t,r.schema);if(o)if(a){const c=oC(r,l);n.addStoredMark(l.create({...c,...e}))}else s.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,p)=>{const m=Math.max(p,u),v=Math.min(p+f.nodeSize,d);f.marks.find(y=>y.type===l)?f.marks.forEach(y=>{l===y.type&&n.addMark(m,v,l.create({...y.attrs,...e}))}):n.addMark(m,v,l.create(e))})});return $M(r,n,l)},NM=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),MM=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=zn(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:s})=>rg(i,{...a,...e})(n)?!0:s.clearNodes()).command(({state:s})=>rg(i,{...a,...e})(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},IM=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=li(t,0,r.content.size),i=mt.create(r,o);e.setSelection(i)}return!0},RM=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,a=gt.atStart(r).from,s=gt.atEnd(r).to,l=li(o,a,s),c=li(i,a,s),u=gt.create(r,l,c);e.setSelection(u)}return!0},TM=t=>({state:e,dispatch:n})=>{const r=zn(t,e.schema);return hN(r)(e,n)};function ug(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const PM=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:a}=e,{$from:s,$to:l}=i,c=o.extensionManager.attributes,u=$l(c,s.node().type.name,s.node().attrs);if(i instanceof mt&&i.node.isBlock)return!s.parentOffset||!po(a,s.pos)?!1:(r&&(t&&ug(n,o.extensionManager.splittableMarks),e.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=s.depth===0?void 0:yM(s.node(-1).contentMatchAt(s.indexAfter(-1)));let p=d&&f?[{type:f,attrs:u}]:void 0,m=po(e.doc,e.mapping.map(s.pos),1,p);if(!p&&!m&&po(e.doc,e.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(i instanceof gt&&e.deleteSelection(),e.split(e.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){const v=e.mapping.map(s.before()),g=e.doc.resolve(v);s.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(s.before()),f)}t&&ug(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},AM=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var a;const s=zn(t,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const d=l.node(-1);if(d.type!==s)return!1;const f=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let y=Ne.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let N=l.depth-b;N>=l.depth-3;N-=1)y=Ne.from(l.node(N).copy(y));const C=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,x={...$l(f,l.node().type.name,l.node().attrs),...e},S=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(x))||void 0;y=y.append(Ne.from(s.createAndFill(null,S)||void 0));const w=l.before(l.depth-(b-1));n.replace(w,l.after(-C),new Ge(y,4-b,0));let E=-1;n.doc.nodesBetween(w,n.doc.content.size,(N,O)=>{if(E>-1)return!1;N.isTextblock&&N.content.size===0&&(E=O+1)}),E>-1&&n.setSelection(gt.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}const p=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,m={...$l(f,d.type.name,d.attrs),...e},v={...$l(f,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const g=p?[{type:s,attrs:m},{type:p,attrs:v}]:[{type:s,attrs:m}];if(!po(n.doc,l.pos,2))return!1;if(o){const{selection:y,storedMarks:b}=r,{splittableMarks:C}=i.extensionManager,x=b||y.$to.parentOffset&&y.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!x||!o)return!0;const S=x.filter(w=>C.includes(w.type.name));n.ensureMarks(S)}return!0},ju=(t,e)=>{const n=Hh(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Go(t.doc,n.pos)&&t.join(n.pos),!0},Lu=(t,e)=>{const n=Hh(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Go(t.doc,r)&&t.join(r),!0},DM=(t,e,n,r={})=>({editor:o,tr:i,state:a,dispatch:s,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,p=zn(t,a.schema),m=zn(e,a.schema),{selection:v,storedMarks:g}=a,{$from:y,$to:b}=v,C=y.blockRange(b),x=g||v.$to.parentOffset&&v.$from.marks();if(!C)return!1;const S=Hh(w=>cg(w.type.name,d))(v);if(C.depth>=1&&S&&C.depth-S.depth<=1){if(S.node.type===p)return c.liftListItem(m);if(cg(S.node.type.name,d)&&p.validContent(S.node.content)&&s)return l().command(()=>(i.setNodeMarkup(S.pos,p),!0)).command(()=>ju(i,p)).command(()=>Lu(i,p)).run()}return!n||!x||!s?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>ju(i,p)).command(()=>Lu(i,p)).run():l().command(()=>{const w=u().wrapInList(p,r),E=x.filter(N=>f.includes(N.type.name));return i.ensureMarks(E),w?!0:c.clearNodes()}).wrapInList(p,r).command(()=>ju(i,p)).command(()=>Lu(i,p)).run()},kM=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,a=Yo(t,r.schema);return Yd(r,a,e)?o.unsetMark(a,{extendEmptyMarkRange:i}):o.setMark(a,e)},_M=(t,e,n={})=>({state:r,commands:o})=>{const i=zn(t,r.schema),a=zn(e,r.schema),s=us(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s?o.setNode(a,l):o.setNode(i,{...l,...n})},BM=(t,e={})=>({state:n,commands:r})=>{const o=zn(t,n.schema);return us(n,o,e)?r.lift(o):r.wrapIn(o,e)},zM=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const a=t.tr,s=i.transform;for(let l=s.steps.length-1;l>=0;l-=1)a.step(s.steps[l].invert(s.docs[l]));if(i.text){const l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else a.delete(i.from,i.to)}return!0}}return!1},jM=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},LM=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:a=!1}=e,{selection:s}=n,l=Yo(t,r.schema),{$from:c,empty:u,ranges:d}=s;if(!o)return!0;if(u&&a){let{from:f,to:p}=s;const m=(i=c.marks().find(g=>g.type===l))===null||i===void 0?void 0:i.attrs,v=Fh(c,l,m);v&&(f=v.from,p=v.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},FM=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Bc(typeof t=="string"?t:t.name,r.schema);return s?(s==="node"&&(i=zn(t,r.schema)),s==="mark"&&(a=Yo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;let d,f,p,m;n.selection.empty?r.doc.nodesBetween(c,u,(v,g)=>{i&&i===v.type&&(p=Math.max(g,c),m=Math.min(g+v.nodeSize,u),d=g,f=v)}):r.doc.nodesBetween(c,u,(v,g)=>{g<c&&i&&i===v.type&&(p=Math.max(g,c),m=Math.min(g+v.nodeSize,u),d=g,f=v),g>=c&&g<=u&&(i&&i===v.type&&n.setNodeMarkup(g,void 0,{...v.attrs,...e}),a&&v.marks.length&&v.marks.forEach(y=>{if(a===y.type){const b=Math.max(g,c),C=Math.min(g+v.nodeSize,u);n.addMark(b,C,a.create({...y.attrs,...e}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...e}),a&&f.marks.length&&f.marks.forEach(v=>{a===v.type&&n.addMark(p,m,a.create({...v.attrs,...e}))}))}),!0):!1},HM=(t,e={})=>({state:n,dispatch:r})=>{const o=zn(t,n.schema);return aN(o,e)(n,r)},VM=(t,e={})=>({state:n,dispatch:r})=>{const o=zn(t,n.schema);return sN(o,e)(n,r)};var WM=Object.freeze({__proto__:null,blur:RN,clearContent:TN,clearNodes:PN,command:AN,createParagraphNear:DN,cut:kN,deleteCurrentNode:_N,deleteNode:BN,deleteRange:zN,deleteSelection:jN,enter:LN,exitCode:FN,extendMarkRange:HN,first:VN,focus:WN,forEach:qN,insertContent:KN,insertContentAt:XN,joinBackward:QN,joinDown:JN,joinForward:ZN,joinItemBackward:eM,joinItemForward:tM,joinTextblockBackward:nM,joinTextblockForward:rM,joinUp:YN,keyboardShortcut:iM,lift:aM,liftEmptyBlock:sM,liftListItem:lM,newlineInCode:cM,resetAttributes:uM,scrollIntoView:dM,selectAll:fM,selectNodeBackward:hM,selectNodeForward:pM,selectParentNode:mM,selectTextblockEnd:gM,selectTextblockStart:vM,setContent:bM,setMark:OM,setMeta:NM,setNode:MM,setNodeSelection:IM,setTextSelection:RM,sinkListItem:TM,splitBlock:PM,splitListItem:AM,toggleList:DM,toggleMark:kM,toggleNode:_M,toggleWrap:BM,undoInputRule:zM,unsetAllMarks:jM,unsetMark:LM,updateAttributes:FM,wrapIn:HM,wrapInList:VM});const qM=Vn.create({name:"commands",addCommands(){return{...WM}}}),KM=Vn.create({name:"drop",addProseMirrorPlugins(){return[new Qn({key:new vr("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),UM=Vn.create({name:"editable",addProseMirrorPlugins(){return[new Qn({key:new vr("editable"),props:{editable:()=>this.editor.options.editable}})]}}),GM=Vn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Qn({key:new vr("focusEvents"),props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),XM=Vn.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:s})=>{const{selection:l,doc:c}=s,{empty:u,$anchor:d}=l,{pos:f,parent:p}=d,m=d.parent.isTextblock&&f>0?s.doc.resolve(f-1):d,v=m.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=v&&m.parent.childCount===1?g===d.pos:vt.atStart(c).from===f;return!u||!p.type.isTextblock||p.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return _c()||rC()?i:o},addProseMirrorPlugins(){return[new Qn({key:new vr("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(v=>v.getMeta("composition")))return;const r=t.some(v=>v.docChanged)&&!e.doc.eq(n.doc),o=t.some(v=>v.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:a,to:s}=e.selection,l=vt.atStart(e.doc).from,c=vt.atEnd(e.doc).to;if(i||!(a===l&&s===c)||!Vh(n.doc))return;const f=n.tr,p=Tc({state:n,transaction:f}),{commands:m}=new Pc({editor:this.editor,state:p});if(m.clearNodes(),!!f.steps.length)return f}})]}}),YM=Vn.create({name:"paste",addProseMirrorPlugins(){return[new Qn({key:new vr("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),JM=Vn.create({name:"tabindex",addProseMirrorPlugins(){return[new Qn({key:new vr("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class ri{get name(){return this.node.type.name}constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ri(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ri(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ri(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,a=this.pos+r+(i?0:1),s=this.resolvedPos.doc.resolve(a);if(!o&&s.depth<=this.depth)return;const l=new ri(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),e.push(new ri(s,this.editor,o,o?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,a=Object.keys(n);for(let s=0;s<a.length;s+=1){const l=a[s];if(i[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(a=>{r&&o.length>0||(a.node.type.name===e&&i.every(l=>n[l]===a.node.attrs[l])&&o.push(a),!(r&&o.length>0)&&(o=o.concat(a.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}}const QM=`.ProseMirror {
|
|
53
|
-
position: relative;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.ProseMirror {
|
|
57
|
-
word-wrap: break-word;
|
|
58
|
-
white-space: pre-wrap;
|
|
59
|
-
white-space: break-spaces;
|
|
60
|
-
-webkit-font-variant-ligatures: none;
|
|
61
|
-
font-variant-ligatures: none;
|
|
62
|
-
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.ProseMirror [contenteditable="false"] {
|
|
66
|
-
white-space: normal;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
70
|
-
white-space: pre-wrap;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.ProseMirror pre {
|
|
74
|
-
white-space: pre-wrap;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
img.ProseMirror-separator {
|
|
78
|
-
display: inline !important;
|
|
79
|
-
border: none !important;
|
|
80
|
-
margin: 0 !important;
|
|
81
|
-
width: 0 !important;
|
|
82
|
-
height: 0 !important;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.ProseMirror-gapcursor {
|
|
86
|
-
display: none;
|
|
87
|
-
pointer-events: none;
|
|
88
|
-
position: absolute;
|
|
89
|
-
margin: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.ProseMirror-gapcursor:after {
|
|
93
|
-
content: "";
|
|
94
|
-
display: block;
|
|
95
|
-
position: absolute;
|
|
96
|
-
top: -2px;
|
|
97
|
-
width: 20px;
|
|
98
|
-
border-top: 1px solid black;
|
|
99
|
-
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@keyframes ProseMirror-cursor-blink {
|
|
103
|
-
to {
|
|
104
|
-
visibility: hidden;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.ProseMirror-hideselection *::selection {
|
|
109
|
-
background: transparent;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.ProseMirror-hideselection *::-moz-selection {
|
|
113
|
-
background: transparent;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.ProseMirror-hideselection * {
|
|
117
|
-
caret-color: transparent;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
121
|
-
display: block;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
125
|
-
opacity: 0
|
|
126
|
-
}`;function ZM(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class eI extends pN{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=ZM(QM,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const r=Xy(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const a=typeof i=="string"?`${i}$`:i.key;r=n.filter(s=>!s.key.startsWith(a))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,n;const o=[...this.options.enableCoreExtensions?[UM,IN.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),qM,GM,XM,JM,KM,YM].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new Yi(o,this)}createCommandManager(){this.commandManager=new Pc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=Xd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(a){if(!(a instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(a.message))throw a;this.emit("contentError",{editor:this,error:a,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),n=Xd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=eC(n,this.options.autofocus);this.view=new zO(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Xi.create({doc:n,selection:r||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(a=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(a)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return xM(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return wM(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return jh(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
127
|
-
|
|
128
|
-
`,textSerializers:r={}}=e||{};return CM(this.state.doc,{blockSeparator:n,textSerializers:{...Jy(this.schema),...r}})}get isEmpty(){return Vh(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new ri(n,this)}get $doc(){return this.$pos(0)}}function wi(t){return new Dc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Mt(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,a=r[r.length-1],s=r[0];if(a){const l=s.search(/\S/),c=n.from+s.indexOf(a),u=c+a.length;if(aC(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(v=>v===t.type&&v!==p.mark.type)).filter(p=>p.to>c).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+l,c);const f=n.from+l+a.length;i.addMark(n.from+l,f,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function tI(t){return new Dc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Mt(t.getAttributes,void 0,r)||{},{tr:i}=e,a=n.from;let s=n.to;const l=t.type.create(o);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=a+c;u>s?u=s:s=u+r[1].length;const d=r[0][r[0].length-1];i.insertText(d,a+r[0].length-1),i.replaceWith(u,s,l)}else if(r[0]){const c=t.type.isInline?a:a-1;i.insert(c,t.type.create(o)).delete(i.mapping.map(a),i.mapping.map(s))}i.scrollIntoView()}})}function Jd(t){return new Dc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=Mt(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function da(t){return new Dc({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=Mt(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),c=l&&xh(l,t.type,i);if(!c)return null;if(a.wrap(l,c),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:p}=t.editor.extensionManager,m=f||d.$to.parentOffset&&d.$from.marks();if(m){const v=m.filter(g=>p.includes(g.type.name));a.ensureMarks(v)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}const u=a.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Go(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&a.join(n.from-1)}})}class Sn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Mt(ut(this,"addOptions",{name:this.name}))),this.storage=Mt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Sn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>kc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Sn(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Mt(ut(n,"addOptions",{name:n.name})),n.storage=Mt(ut(n,"addStorage",{name:n.name,options:n.options})),n}}class nI{constructor(e,n,r){this.isDragging=!1,this.component=e,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var n,r,o,i,a,s,l;const{view:c}=this.editor,u=e.target,d=u.nodeType===3?(n=u.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(u)||!d)return;let f=0,p=0;if(this.dom!==d){const y=this.dom.getBoundingClientRect(),b=d.getBoundingClientRect(),C=(o=e.offsetX)!==null&&o!==void 0?o:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,x=(a=e.offsetY)!==null&&a!==void 0?a:(s=e.nativeEvent)===null||s===void 0?void 0:s.offsetY;f=b.x-y.x+C,p=b.y-y.y+x}(l=e.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,f,p);const m=this.getPos();if(typeof m!="number")return;const v=mt.create(c.state.doc,m),g=c.state.tr.setSelection(v);c.dispatch(g)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=e.type.startsWith("drag"),a=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!a&&!i)return!0;const{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=mt.isSelectable(this.node),f=e.type==="copy",p=e.type==="paste",m=e.type==="cut",v=e.type==="mousedown";if(!u&&d&&i&&e.target===this.dom&&e.preventDefault(),u&&i&&!c&&e.target===this.dom)return e.preventDefault(),!1;if(u&&l&&!c&&v){const g=r.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||a||f||p||m||v&&d)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(_c()||tC())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const n=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:n})}}function Ei(t){return new wN({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=Mt(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:a}=e,s=r[r.length-1],l=r[0];let c=n.to;if(s){const u=l.search(/\S/),d=n.from+l.indexOf(s),f=d+s.length;if(aC(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(g=>g===t.type&&g!==m.mark.type)).filter(m=>m.to>d).length)return null;f<n.to&&a.delete(f,n.to),d>n.from&&a.delete(n.from+u,d),c=n.from+u+s.length,a.addMark(n.from+u,c,t.type.create(i||{})),a.removeStoredMark(t.type)}}})}function rI(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qd={exports:{}},Fu={};/**
|
|
129
|
-
* @license React
|
|
130
|
-
* use-sync-external-store-shim.production.min.js
|
|
131
|
-
*
|
|
132
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the MIT license found in the
|
|
135
|
-
* LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/var dg;function oI(){if(dg)return Fu;dg=1;var t=$;function e(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function s(d,f){var p=f(),m=r({inst:{value:p,getSnapshot:f}}),v=m[0].inst,g=m[1];return i(function(){v.value=p,v.getSnapshot=f,l(v)&&g({inst:v})},[d,p,f]),o(function(){return l(v)&&g({inst:v}),d(function(){l(v)&&g({inst:v})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Fu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,Fu}var Hu={};/**
|
|
137
|
-
* @license React
|
|
138
|
-
* use-sync-external-store-shim.development.js
|
|
139
|
-
*
|
|
140
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
141
|
-
*
|
|
142
|
-
* This source code is licensed under the MIT license found in the
|
|
143
|
-
* LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/var fg;function iI(){return fg||(fg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=$,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(C){{for(var x=arguments.length,S=new Array(x>1?x-1:0),w=1;w<x;w++)S[w-1]=arguments[w];r("error",C,S)}}function r(C,x,S){{var w=e.ReactDebugCurrentFrame,E=w.getStackAddendum();E!==""&&(x+="%s",S=S.concat([E]));var N=S.map(function(O){return String(O)});N.unshift("Warning: "+x),Function.prototype.apply.call(console[C],console,N)}}function o(C,x){return C===x&&(C!==0||1/C===1/x)||C!==C&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=t.useState,s=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,u=!1,d=!1;function f(C,x,S){u||t.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=x();if(!d){var E=x();i(w,E)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var N=a({inst:{value:w,getSnapshot:x}}),O=N[0].inst,M=N[1];return l(function(){O.value=w,O.getSnapshot=x,p(O)&&M({inst:O})},[C,w,x]),s(function(){p(O)&&M({inst:O});var I=function(){p(O)&&M({inst:O})};return C(I)},[C]),c(w),w}function p(C){var x=C.getSnapshot,S=C.value;try{var w=x();return!i(S,w)}catch{return!0}}function m(C,x,S){return x()}var v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!v,y=g?m:f,b=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y;Hu.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Hu}process.env.NODE_ENV==="production"?Qd.exports=oI():Qd.exports=iI();var zc=Qd.exports;const aI=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},sI=({contentComponent:t})=>{const e=zc.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return $.createElement($.Fragment,null,Object.values(e))};function lI(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:_r.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(o=>o())}}}class cI extends $.Component{constructor(e){var n;super(e),this.editorContentRef=$.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=e.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.options.element.childNodes),e.setOptions({element:n}),e.contentComponent=lI(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})}render(){const{editor:e,innerRef:n,...r}=this.props;return $.createElement($.Fragment,null,$.createElement("div",{ref:aI(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&$.createElement(sI,{contentComponent:e.contentComponent}))}}const uI=$.forwardRef((t,e)=>{const n=$.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return $.createElement(cI,{key:n,innerRef:e,...t})}),dI=$.memo(uI);var fI=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!t(o[1],n.get(o[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!(a==="_owner"&&e.$$typeof)&&!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n},hI=rI(fI),Zd={exports:{}},Vu={};/**
|
|
145
|
-
* @license React
|
|
146
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
147
|
-
*
|
|
148
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the MIT license found in the
|
|
151
|
-
* LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/var hg;function pI(){if(hg)return Vu;hg=1;var t=$,e=zc;function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;return Vu.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var m=i(null);if(m.current===null){var v={hasValue:!1,value:null};m.current=v}else v=m.current;m=s(function(){function y(w){if(!b){if(b=!0,C=w,w=f(w),p!==void 0&&v.hasValue){var E=v.value;if(p(E,w))return x=E}return x=w}if(E=x,r(C,w))return E;var N=f(w);return p!==void 0&&p(E,N)?E:(C=w,x=N)}var b=!1,C,x,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,p]);var g=o(c,m[0],m[1]);return a(function(){v.hasValue=!0,v.value=g},[g]),l(g),g},Vu}var Wu={};/**
|
|
153
|
-
* @license React
|
|
154
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
155
|
-
*
|
|
156
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the MIT license found in the
|
|
159
|
-
* LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/var pg;function mI(){return pg||(pg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=$,e=zc;function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;function c(u,d,f,p,m){var v=i(null),g;v.current===null?(g={hasValue:!1,value:null},v.current=g):g=v.current;var y=s(function(){var S=!1,w,E,N=function(D){if(!S){S=!0,w=D;var k=p(D);if(m!==void 0&&g.hasValue){var P=g.value;if(m(P,k))return E=P,P}return E=k,k}var j=w,A=E;if(r(j,D))return A;var T=p(D);return m!==void 0&&m(A,T)?A:(w=D,E=T,T)},O=f===void 0?null:f,M=function(){return N(d())},I=O===null?void 0:function(){return N(O())};return[M,I]},[d,f,p,m]),b=y[0],C=y[1],x=o(u,b,C);return a(function(){g.hasValue=!0,g.value=x},[x]),l(x),x}Wu.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Wu}process.env.NODE_ENV==="production"?Zd.exports=pI():Zd.exports=mI();var gI=Zd.exports;const vI=typeof window<"u"?$.useLayoutEffect:$.useEffect;class bI{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(o=>o())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function yI(t){var e;const[n]=$.useState(()=>new bI(t.editor)),r=gI.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:hI);return vI(()=>n.watch(t.editor),[t.editor,n]),$.useDebugValue(r),r}const mg=process.env.NODE_ENV!=="production",ef=typeof window>"u",CI=ef||!!(typeof window<"u"&&window.next);class Wh{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return ef||CI?(mg&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&ef&&mg)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)===null||i===void 0?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)===null||i===void 0?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)===null||i===void 0?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)===null||i===void 0?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)===null||i===void 0?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)===null||i===void 0?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)===null||i===void 0?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)===null||i===void 0?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)===null||i===void 0?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)===null||i===void 0?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)===null||i===void 0?void 0:i.call(o,...r)}};return new eI(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var a;return o===((a=n.extensions)===null||a===void 0?void 0:a[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?Wh.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function SI(t={},e=[]){const n=$.useRef(t);n.current=t;const[r]=$.useState(()=>new Wh(n)),o=zc.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return $.useDebugValue(o),$.useEffect(r.onRender(e)),yI({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}const xI=$.createContext({editor:null});xI.Consumer;const sC=$.createContext({onDragStart:void 0}),lC=()=>$.useContext(sC),wI=t=>{const e=t.as||"div",{nodeViewContentRef:n}=lC();return $.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},cC=$.forwardRef((t,e)=>{const{onDragStart:n}=lC(),r=t.as||"div";return $.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function EI(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function $I(t){var e;return typeof t=="object"&&((e=t.$$typeof)===null||e===void 0?void 0:e.toString())==="Symbol(react.forward_ref)"}class OI{constructor(e,{editor:n,props:r={},as:o="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=n,this.props=r,this.element=document.createElement(o),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?_r.flushSync(()=>{this.render()}):this.render()}render(){var e;const n=this.component,r=this.props,o=this.editor;(EI(n)||$I(n))&&(r.ref=i=>{this.ref=i}),this.reactElement=$.createElement(n,{...r}),(e=o==null?void 0:o.contentComponent)===null||e===void 0||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;const n=this.editor;(e=n==null?void 0:n.contentComponent)===null||e===void 0||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(n=>{this.element.setAttribute(n,e[n])})}}class NI extends nI{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const c=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=c(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&c.appendChild(this.contentDOMElement)}},i=this.component,a=$.memo(c=>$.createElement(sC.Provider,{value:o},$.createElement(i,c)));a.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new OI(a,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!((e=this.renderer.element.firstElementChild)===null||e===void 0)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,r){const o=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,a=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:n,oldInnerDecorations:s,innerDecorations:r,updateProps:()=>o({node:e,decorations:n,innerDecorations:r})})}return e===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=e,this.decorations=n,this.innerDecorations=r,o({node:e,decorations:n,innerDecorations:r})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=tc(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function uC(t,e){return n=>n.editor.contentComponent?new NI(t,n,e):{}}function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},De.apply(null,arguments)}function st(t){"@babel/helpers - typeof";return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(t)}var MI=Symbol.for("react.element"),II=Symbol.for("react.transitional.element"),RI=Symbol.for("react.fragment");function dC(t){return t&&st(t)==="object"&&(t.$$typeof===MI||t.$$typeof===II)&&t.type===RI}function gr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return $.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(gr(r)):dC(r)&&r.props?n=n.concat(gr(r.props.children,e)):n.push(r))}),n}var tf={},qh=[],TI=function(e){qh.push(e)};function Qr(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=qh.reduce(function(r,o){return o(r??"","warning")},e);n&&console.error("Warning: ".concat(n))}}function PI(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=qh.reduce(function(r,o){return o(r??"","note")},e);n&&console.warn("Note: ".concat(n))}}function fC(){tf={}}function hC(t,e,n){!e&&!tf[n]&&(t(!1,n),tf[n]=!0)}function yt(t,e){hC(Qr,t,e)}function nf(t,e){hC(PI,t,e)}yt.preMessage=TI;yt.resetWarned=fC;yt.noteOnce=nf;function AI(t,e){if(st(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(st(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pC(t){var e=AI(t,"string");return st(e)=="symbol"?e:e+""}function F(t,e,n){return(e=pC(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gg(Object(n),!0).forEach(function(r){F(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ds(t){return t instanceof HTMLElement||t instanceof SVGElement}function DI(t){return t&&st(t)==="object"&&ds(t.nativeElement)?t.nativeElement:ds(t)?t:null}function Ol(t){var e=DI(t);if(e)return e;if(t instanceof $.Component){var n;return(n=_r.findDOMNode)===null||n===void 0?void 0:n.call(_r,t)}return null}var il={exports:{}},Kt={};/**
|
|
161
|
-
* @license React
|
|
162
|
-
* react-is.production.min.js
|
|
163
|
-
*
|
|
164
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the MIT license found in the
|
|
167
|
-
* LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/var vg;function kI(){if(vg)return Kt;vg=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function v(g){if(typeof g=="object"&&g!==null){var y=g.$$typeof;switch(y){case t:switch(g=g.type,g){case n:case o:case r:case c:case u:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case l:case f:case d:case i:return g;default:return y}}case e:return y}}}return Kt.ContextConsumer=a,Kt.ContextProvider=i,Kt.Element=t,Kt.ForwardRef=l,Kt.Fragment=n,Kt.Lazy=f,Kt.Memo=d,Kt.Portal=e,Kt.Profiler=o,Kt.StrictMode=r,Kt.Suspense=c,Kt.SuspenseList=u,Kt.isAsyncMode=function(){return!1},Kt.isConcurrentMode=function(){return!1},Kt.isContextConsumer=function(g){return v(g)===a},Kt.isContextProvider=function(g){return v(g)===i},Kt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},Kt.isForwardRef=function(g){return v(g)===l},Kt.isFragment=function(g){return v(g)===n},Kt.isLazy=function(g){return v(g)===f},Kt.isMemo=function(g){return v(g)===d},Kt.isPortal=function(g){return v(g)===e},Kt.isProfiler=function(g){return v(g)===o},Kt.isStrictMode=function(g){return v(g)===r},Kt.isSuspense=function(g){return v(g)===c},Kt.isSuspenseList=function(g){return v(g)===u},Kt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===o||g===r||g===c||g===u||g===p||typeof g=="object"&&g!==null&&(g.$$typeof===f||g.$$typeof===d||g.$$typeof===i||g.$$typeof===a||g.$$typeof===l||g.$$typeof===m||g.getModuleId!==void 0)},Kt.typeOf=v,Kt}var Ut={};/**
|
|
169
|
-
* @license React
|
|
170
|
-
* react-is.development.js
|
|
171
|
-
*
|
|
172
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the MIT license found in the
|
|
175
|
-
* LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/var bg;function _I(){return bg||(bg=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=!1,v=!1,g=!1,y=!1,b=!1,C;C=Symbol.for("react.module.reference");function x(te){return!!(typeof te=="string"||typeof te=="function"||te===n||te===o||b||te===r||te===c||te===u||y||te===p||m||v||g||typeof te=="object"&&te!==null&&(te.$$typeof===f||te.$$typeof===d||te.$$typeof===i||te.$$typeof===a||te.$$typeof===l||te.$$typeof===C||te.getModuleId!==void 0))}function S(te){if(typeof te=="object"&&te!==null){var le=te.$$typeof;switch(le){case t:var fe=te.type;switch(fe){case n:case o:case r:case c:case u:return fe;default:var Ee=fe&&fe.$$typeof;switch(Ee){case s:case a:case l:case f:case d:case i:return Ee;default:return le}}case e:return le}}}var w=a,E=i,N=t,O=l,M=n,I=f,D=d,k=e,P=o,j=r,A=c,T=u,_=!1,W=!1;function L(te){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(te){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(te){return S(te)===a}function Y(te){return S(te)===i}function H(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function G(te){return S(te)===l}function J(te){return S(te)===n}function se(te){return S(te)===f}function X(te){return S(te)===d}function de(te){return S(te)===e}function ye(te){return S(te)===o}function ce(te){return S(te)===r}function oe(te){return S(te)===c}function me(te){return S(te)===u}Ut.ContextConsumer=w,Ut.ContextProvider=E,Ut.Element=N,Ut.ForwardRef=O,Ut.Fragment=M,Ut.Lazy=I,Ut.Memo=D,Ut.Portal=k,Ut.Profiler=P,Ut.StrictMode=j,Ut.Suspense=A,Ut.SuspenseList=T,Ut.isAsyncMode=L,Ut.isConcurrentMode=V,Ut.isContextConsumer=U,Ut.isContextProvider=Y,Ut.isElement=H,Ut.isForwardRef=G,Ut.isFragment=J,Ut.isLazy=se,Ut.isMemo=X,Ut.isPortal=de,Ut.isProfiler=ye,Ut.isStrictMode=ce,Ut.isSuspense=oe,Ut.isSuspenseList=me,Ut.isValidElementType=x,Ut.typeOf=S}()),Ut}var yg;function BI(){return yg||(yg=1,process.env.NODE_ENV==="production"?il.exports=kI():il.exports=_I()),il.exports}var qu=BI();function Ms(t,e,n){var r=h.useRef({});return(!("value"in r.current)||n(r.current.condition,e))&&(r.current.value=t(),r.current.condition=e),r.current.value}var zI=Number($.version.split(".")[0]),Kh=function(e,n){typeof e=="function"?e(n):st(e)==="object"&&e&&"current"in e&&(e.current=n)},ir=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n.filter(Boolean);return o.length<=1?o[0]:function(i){n.forEach(function(a){Kh(a,i)})}},Jo=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Ms(function(){return ir.apply(void 0,n)},n,function(o,i){return o.length!==i.length||o.every(function(a,s){return a!==i[s]})})},Qo=function(e){var n,r;if(!e)return!1;if(Uh(e)&&zI>=19)return!0;var o=qu.isMemo(e)?e.type.type:e.type;return!(typeof o=="function"&&!((n=o.prototype)!==null&&n!==void 0&&n.render)&&o.$$typeof!==qu.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==qu.ForwardRef)};function Uh(t){return $.isValidElement(t)&&!dC(t)}var jI=function(e){return Uh(e)&&Qo(e)},Ri=function(e){if(e&&Uh(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},rf=h.createContext(null);function LI(t){var e=t.children,n=t.onBatchResize,r=h.useRef(0),o=h.useRef([]),i=h.useContext(rf),a=h.useCallback(function(s,l,c){r.current+=1;var u=r.current;o.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(o.current),o.current=[])}),i==null||i(s,l,c)},[n,i]);return h.createElement(rf.Provider,{value:a},e)}var mC=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(o,i){return o[0]===n?(r=i,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},e.prototype.set=function(n,r){var o=t(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,o=t(r,n);~o&&r.splice(o,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,i=this.__entries__;o<i.length;o++){var a=i[o];n.call(r,a[1],a[0])}},e}()}(),of=typeof window<"u"&&typeof document<"u"&&window.document===document,oc=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),FI=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(oc):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),HI=2;function VI(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&s()}function a(){FI(i)}function s(){var l=Date.now();if(n){if(l-o<HI)return;r=!0}else n=!0,r=!1,setTimeout(a,e);o=l}return s}var WI=20,qI=["top","right","bottom","left","width","height","size","weight"],KI=typeof MutationObserver<"u",UI=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=VI(this.refresh.bind(this),WI)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!of||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),KI?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!of||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,o=qI.some(function(i){return!!~r.indexOf(i)});o&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),gC=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},fa=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||oc},vC=jc(0,0,0,0);function ic(t){return parseFloat(t)||0}function Cg(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,o){var i=t["border-"+o+"-width"];return r+ic(i)},0)}function GI(t){for(var e=["top","right","bottom","left"],n={},r=0,o=e;r<o.length;r++){var i=o[r],a=t["padding-"+i];n[i]=ic(a)}return n}function XI(t){var e=t.getBBox();return jc(0,0,e.width,e.height)}function YI(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return vC;var r=fa(t).getComputedStyle(t),o=GI(r),i=o.left+o.right,a=o.top+o.bottom,s=ic(r.width),l=ic(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+i)!==e&&(s-=Cg(r,"left","right")+i),Math.round(l+a)!==n&&(l-=Cg(r,"top","bottom")+a)),!QI(t)){var c=Math.round(s+i)-e,u=Math.round(l+a)-n;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return jc(o.left,o.top,s,l)}var JI=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof fa(t).SVGGraphicsElement}:function(t){return t instanceof fa(t).SVGElement&&typeof t.getBBox=="function"}}();function QI(t){return t===fa(t).document.documentElement}function ZI(t){return of?JI(t)?XI(t):YI(t):vC}function eR(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(i.prototype);return gC(a,{x:e,y:n,width:r,height:o,top:n,right:e+r,bottom:o+n,left:e}),a}function jc(t,e,n,r){return{x:t,y:e,width:n,height:r}}var tR=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=jc(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=ZI(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),nR=function(){function t(e,n){var r=eR(n);gC(this,{target:e,contentRect:r})}return t}(),rR=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new mC,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof fa(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new tR(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof fa(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new nR(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),bC=typeof WeakMap<"u"?new WeakMap:new mC,yC=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=UI.getInstance(),r=new rR(e,n,this);bC.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){yC.prototype[t]=function(){var e;return(e=bC.get(this))[t].apply(e,arguments)}});var oR=function(){return typeof oc.ResizeObserver<"u"?oc.ResizeObserver:yC}(),fo=new Map;function CC(t){t.forEach(function(e){var n,r=e.target;(n=fo.get(r))===null||n===void 0||n.forEach(function(o){return o(r)})})}var SC=new oR(CC);process.env.NODE_ENV;process.env.NODE_ENV;function iR(t,e){fo.has(t)||(fo.set(t,new Set),SC.observe(t)),fo.get(t).add(e)}function aR(t,e){fo.has(t)&&(fo.get(t).delete(e),fo.get(t).size||(SC.unobserve(t),fo.delete(t)))}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pC(r.key),r)}}function wn(t,e,n){return e&&Sg(t.prototype,e),n&&Sg(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function fs(t,e){return fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},fs(t,e)}function bo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fs(t,e)}function hs(t){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hs(t)}function Gh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gh=function(){return!!t})()}function Rt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sR(t,e){if(e&&(st(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rt(t)}function yo(t){var e=Gh();return function(){var n,r=hs(t);if(e){var o=hs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sR(this,n)}}var lR=function(t){bo(n,t);var e=yo(n);function n(){return xn(this,n),e.apply(this,arguments)}return wn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function cR(t,e){var n=t.children,r=t.disabled,o=h.useRef(null),i=h.useRef(null),a=h.useContext(rf),s=typeof n=="function",l=s?n(o):n,c=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&h.isValidElement(l)&&Qo(l),d=u?Ri(l):null,f=Jo(d,o),p=function(){var y;return Ol(o.current)||(o.current&&st(o.current)==="object"?Ol((y=o.current)===null||y===void 0?void 0:y.nativeElement):null)||Ol(i.current)};h.useImperativeHandle(e,function(){return p()});var m=h.useRef(t);m.current=t;var v=h.useCallback(function(g){var y=m.current,b=y.onResize,C=y.data,x=g.getBoundingClientRect(),S=x.width,w=x.height,E=g.offsetWidth,N=g.offsetHeight,O=Math.floor(S),M=Math.floor(w);if(c.current.width!==O||c.current.height!==M||c.current.offsetWidth!==E||c.current.offsetHeight!==N){var I={width:O,height:M,offsetWidth:E,offsetHeight:N};c.current=I;var D=E===Math.round(S)?S:E,k=N===Math.round(w)?w:N,P=q(q({},I),{},{offsetWidth:D,offsetHeight:k});a==null||a(P,g,C),b&&Promise.resolve().then(function(){b(P,g)})}},[]);return h.useEffect(function(){var g=p();return g&&!r&&iR(g,v),function(){return aR(g,v)}},[o.current,r]),h.createElement(lR,{ref:i},u?h.cloneElement(l,{ref:f}):l)}var xC=h.forwardRef(cR);process.env.NODE_ENV!=="production"&&(xC.displayName="SingleObserver");var uR="rc-observer-key";function dR(t,e){var n=t.children,r=typeof n=="function"?[n]:gr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?Qr(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&Qr(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(o,i){var a=(o==null?void 0:o.key)||"".concat(uR,"-").concat(i);return h.createElement(xC,De({},t,{key:a,ref:i===0?e:void 0}),o)})}var Co=h.forwardRef(dR);process.env.NODE_ENV!=="production"&&(Co.displayName="ResizeObserver");Co.Collection=LI;function af(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function fR(t){if(Array.isArray(t))return af(t)}function wC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Xh(t,e){if(t){if(typeof t=="string")return af(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(t,e):void 0}}function hR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
177
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Re(t){return fR(t)||wC(t)||Xh(t)||hR()}var EC=function(e){return+setTimeout(e,16)},$C=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(EC=function(e){return window.requestAnimationFrame(e)},$C=function(e){return window.cancelAnimationFrame(e)});var xg=0,Lc=new Map;function OC(t){Lc.delete(t)}var Dt=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;xg+=1;var r=xg;function o(i){if(i===0)OC(r),e();else{var a=EC(function(){o(i-1)});Lc.set(r,a)}}return o(n),r};Dt.cancel=function(t){var e=Lc.get(t);return OC(t),$C(e)};process.env.NODE_ENV!=="production"&&(Dt.ids=function(){return Lc});function NC(t){if(Array.isArray(t))return t}function pR(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function MC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
178
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ie(t,e){return NC(t)||pR(t,e)||Xh(t,e)||MC()}function ps(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function Gn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function sf(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var wg="data-rc-order",Eg="data-rc-priority",mR="rc-util-key",lf=new Map;function IC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):mR}function Fc(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function gR(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Yh(t){return Array.from((lf.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function RC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Gn())return null;var n=e.csp,r=e.prepend,o=e.priority,i=o===void 0?0:o,a=gR(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(wg,a),s&&i&&l.setAttribute(Eg,"".concat(i)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Fc(e),u=c.firstChild;if(r){if(s){var d=(e.styles||Yh(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(wg)))return!1;var p=Number(f.getAttribute(Eg)||0);return i>=p});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function TC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Fc(e);return(e.styles||Yh(n)).find(function(r){return r.getAttribute(IC(e))===t})}function ms(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=TC(t,e);if(n){var r=Fc(e);r.removeChild(n)}}function vR(t,e){var n=lf.get(t);if(!n||!sf(document,n)){var r=RC("",e),o=r.parentNode;lf.set(t,o),t.removeChild(r)}}function go(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Fc(n),o=Yh(r),i=q(q({},n),{},{styles:o});vR(r,i);var a=TC(e,i);if(a){var s,l;if((s=i.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=i.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=i.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==t&&(a.innerHTML=t),a}var u=RC(t,i);return u.setAttribute(IC(i),e),u}function bR(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function xt(t,e){if(t==null)return{};var n,r,o=bR(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function ha(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(i,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(i);if(yt(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(n&&s>1)return!1;r.add(i);var c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(var u=0;u<i.length;u++)if(!o(i[u],a[u],c))return!1;return!0}if(i&&a&&st(i)==="object"&&st(a)==="object"){var d=Object.keys(i);return d.length!==Object.keys(a).length?!1:d.every(function(f){return o(i[f],a[f],c)})}return!1}return o(t,e)}var yR="%";function cf(t){return t.join(yR)}var CR=function(){function t(e){xn(this,t),F(this,"instanceId",void 0),F(this,"cache",new Map),this.instanceId=e}return wn(t,[{key:"get",value:function(n){return this.opGet(cf(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,r){return this.opUpdate(cf(n),r)}},{key:"opUpdate",value:function(n,r){var o=this.cache.get(n),i=r(o);i===null?this.cache.delete(n):this.cache.set(n,i)}}]),t}(),pa="data-token-hash",Dr="data-css-hash",SR="data-cache-path",_o="__cssinjs_instance__";function xR(){var t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var e=document.body.querySelectorAll("style[".concat(Dr,"]"))||[],n=document.head.firstChild;Array.from(e).forEach(function(o){o[_o]=o[_o]||t,o[_o]===t&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Dr,"]"))).forEach(function(o){var i=o.getAttribute(Dr);if(r[i]){if(o[_o]===t){var a;(a=o.parentNode)===null||a===void 0||a.removeChild(o)}}else r[i]=!0})}return new CR(t)}var Is=h.createContext({hashPriority:"low",cache:xR(),defaultCache:!0});function wR(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var Jh=function(){function t(){xn(this,t),F(this,"cache",void 0),F(this,"keys",void 0),F(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return wn(t,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(r=a)!==null&&r!==void 0&&r.value&&i&&(a.value[1]=this.cacheCallTimes++),(o=a)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(c,u){var d=ie(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),a=ie(i,1),s=a[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var i;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(i=o.value)===null||i===void 0?void 0:i[0]}var a=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),a}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!wR(r,n)}),this.deleteByPath(this.cache,n)}}]),t}();F(Jh,"MAX_CACHE_SIZE",20);F(Jh,"MAX_CACHE_OFFSET",5);var $g=0,PC=function(){function t(e){xn(this,t),F(this,"derivatives",void 0),F(this,"id",void 0),this.derivatives=Array.isArray(e)?e:[e],this.id=$g,e.length===0&&Qr(e.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),$g+=1}return wn(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),t}(),Ku=new Jh;function uf(t){var e=Array.isArray(t)?t:[t];return Ku.has(e)||Ku.set(e,new PC(e)),Ku.get(e)}var ER=new WeakMap,Uu={};function $R(t,e){for(var n=ER,r=0;r<e.length;r+=1){var o=e[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(Uu)||n.set(Uu,t()),n.get(Uu)}var Og=new WeakMap;function Ja(t){var e=Og.get(t)||"";return e||(Object.keys(t).forEach(function(n){var r=t[n];e+=n,r instanceof PC?e+=r.id:r&&st(r)==="object"?e+=Ja(r):e+=r}),e=ps(e),Og.set(t,e)),e}function Ng(t,e){return ps("".concat(e,"_").concat(Ja(t)))}var df=Gn();function re(t){return typeof t=="number"?"".concat(t,"px"):t}function ac(t,e,n){var r,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return t;var a=q(q({},o),{},(r={},F(r,pa,e),F(r,Dr,n),r)),s=Object.keys(a).map(function(l){var c=a[l];return c?"".concat(l,'="').concat(c,'"'):null}).filter(function(l){return l}).join(" ");return"<style ".concat(s,">").concat(t,"</style>")}var Nl=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},OR=function(e,n,r){return Object.keys(e).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(o){var i=ie(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},AC=function(e,n,r){var o={},i={};return Object.entries(e).forEach(function(a){var s,l,c=ie(a,2),u=c[0],d=c[1];if(r!=null&&(s=r.preserve)!==null&&s!==void 0&&s[u])i[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,p=Nl(u,r==null?void 0:r.prefix);o[p]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),i[u]="var(".concat(p,")")}}),[i,OR(o,n,{scope:r==null?void 0:r.scope})]},Mg=process.env.NODE_ENV!=="test"&&Gn()?h.useLayoutEffect:h.useEffect,Jt=function(e,n){var r=h.useRef(!0);Mg(function(){return e(r.current)},n),Mg(function(){return r.current=!1,function(){r.current=!0}},[])},Qa=function(e,n){Jt(function(r){if(!r)return e()},n)},NR=q({},h),Ig=NR.useInsertionEffect,MR=function(e,n,r){h.useMemo(e,r),Jt(function(){return n(!0)},r)},IR=Ig?function(t,e,n){return Ig(function(){return t(),e()},n)}:MR,RR=q({},h),TR=RR.useInsertionEffect,PR=function(e){var n=[],r=!1;function o(i){if(r){process.env.NODE_ENV!=="production"&&Qr(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}n.push(i)}return h.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(i){return i()})}},e),o},AR=function(){return function(e){e()}},DR=typeof TR<"u"?PR:AR;function kR(){return!1}var ff=!1;function _R(){return ff}const BR=process.env.NODE_ENV==="production"?kR:_R;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(al&&typeof al.webpackHotUpdate=="function"){var zR=al.webpackHotUpdate;al.webpackHotUpdate=function(){return ff=!0,setTimeout(function(){ff=!1},0),zR.apply(void 0,arguments)}}}function Qh(t,e,n,r,o){var i=h.useContext(Is),a=i.cache,s=[t].concat(Re(e)),l=cf(s),c=DR([l]),u=BR(),d=function(v){a.opUpdate(l,function(g){var y=g||[void 0,void 0],b=ie(y,2),C=b[0],x=C===void 0?0:C,S=b[1],w=S;process.env.NODE_ENV!=="production"&&S&&u&&(r==null||r(w,u),w=null);var E=w||n(),N=[x,E];return v?v(N):N})};h.useMemo(function(){d()},[l]);var f=a.opGet(l);process.env.NODE_ENV!=="production"&&!f&&(d(),f=a.opGet(l));var p=f[1];return IR(function(){o==null||o(p)},function(m){return d(function(v){var g=ie(v,2),y=g[0],b=g[1];return m&&y===0&&(o==null||o(p)),[y+1,b]}),function(){a.opUpdate(l,function(v){var g=v||[],y=ie(g,2),b=y[0],C=b===void 0?0:b,x=y[1],S=C-1;return S===0?(c(function(){(m||!a.opGet(l))&&(r==null||r(x,!1))}),null):[C-1,x]})}},[l]),p}var jR={},LR=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",oi=new Map;function FR(t){oi.set(t,(oi.get(t)||0)+1)}function HR(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(pa,'="').concat(t,'"]'));n.forEach(function(r){if(r[_o]===e){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var VR=0;function WR(t,e){oi.set(t,(oi.get(t)||0)-1);var n=Array.from(oi.keys()),r=n.filter(function(o){var i=oi.get(o)||0;return i<=0});n.length-r.length>VR&&r.forEach(function(o){HR(o,e),oi.delete(o)})}var qR=function(e,n,r,o){var i=r.getDerivativeToken(e),a=q(q({},i),n);return o&&(a=o(a)),a},DC="token";function KR(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=$.useContext(Is),o=r.cache.instanceId,i=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?jR:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,p=$R(function(){return Object.assign.apply(Object,[{}].concat(Re(e)))},e),m=Ja(p),v=Ja(c),g=f?Ja(f):"",y=Qh(DC,[s,t.id,m,v,g],function(){var b,C=d?d(p,c,t):qR(p,c,t,u),x=q({},C),S="";if(f){var w=AC(C,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),E=ie(w,2);C=E[0],S=E[1]}var N=Ng(C,s);C._tokenKey=N,x._tokenKey=Ng(x,s);var O=(b=f==null?void 0:f.key)!==null&&b!==void 0?b:N;C._themeKey=O,FR(O);var M="".concat(LR,"-").concat(ps(N));return C._hashId=M,[C,M,x,S,(f==null?void 0:f.key)||""]},function(b){WR(b[0]._themeKey,o)},function(b){var C=ie(b,4),x=C[0],S=C[3];if(f&&S){var w=go(S,ps("css-variables-".concat(x._themeKey)),{mark:Dr,prepend:"queue",attachTo:i,priority:-999});w[_o]=o,w.setAttribute(pa,x._themeKey)}});return y}var UR=function(e,n,r){var o=ie(e,5),i=o[2],a=o[3],s=o[4],l=r||{},c=l.plain;if(!a)return null;var u=i._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},p=ac(a,s,u,f,c);return[d,u,p]},GR={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},kC="comm",_C="rule",BC="decl",XR="@import",YR="@namespace",JR="@keyframes",QR="@layer",zC=Math.abs,Zh=String.fromCharCode;function jC(t){return t.trim()}function Ml(t,e,n){return t.replace(e,n)}function ZR(t,e,n){return t.indexOf(e,n)}function na(t,e){return t.charCodeAt(e)|0}function ma(t,e,n){return t.slice(e,n)}function Kr(t){return t.length}function eT(t){return t.length}function sl(t,e){return e.push(t),t}var Hc=1,ga=1,LC=0,$r=0,On=0,wa="";function ep(t,e,n,r,o,i,a,s){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:Hc,column:ga,length:a,return:"",siblings:s}}function tT(){return On}function nT(){return On=$r>0?na(wa,--$r):0,ga--,On===10&&(ga=1,Hc--),On}function kr(){return On=$r<LC?na(wa,$r++):0,ga++,On===10&&(ga=1,Hc++),On}function Bo(){return na(wa,$r)}function Il(){return $r}function Vc(t,e){return ma(wa,t,e)}function gs(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function rT(t){return Hc=ga=1,LC=Kr(wa=t),$r=0,[]}function oT(t){return wa="",t}function Gu(t){return jC(Vc($r-1,hf(t===91?t+2:t===40?t+1:t)))}function iT(t){for(;(On=Bo())&&On<33;)kr();return gs(t)>2||gs(On)>3?"":" "}function aT(t,e){for(;--e&&kr()&&!(On<48||On>102||On>57&&On<65||On>70&&On<97););return Vc(t,Il()+(e<6&&Bo()==32&&kr()==32))}function hf(t){for(;kr();)switch(On){case t:return $r;case 34:case 39:t!==34&&t!==39&&hf(On);break;case 40:t===41&&hf(t);break;case 92:kr();break}return $r}function sT(t,e){for(;kr()&&t+On!==57;)if(t+On===84&&Bo()===47)break;return"/*"+Vc(e,$r-1)+"*"+Zh(t===47?t:kr())}function lT(t){for(;!gs(Bo());)kr();return Vc(t,$r)}function cT(t){return oT(Rl("",null,null,null,[""],t=rT(t),0,[0],t))}function Rl(t,e,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,v=1,g=1,y=1,b=0,C="",x=o,S=i,w=r,E=C;g;)switch(m=b,b=kr()){case 40:if(m!=108&&na(E,d-1)==58){ZR(E+=Ml(Gu(b),"&","&\f"),"&\f",zC(c?s[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:E+=Gu(b);break;case 9:case 10:case 13:case 32:E+=iT(m);break;case 92:E+=aT(Il()-1,7);continue;case 47:switch(Bo()){case 42:case 47:sl(uT(sT(kr(),Il()),e,n,l),l),(gs(m||1)==5||gs(Bo()||1)==5)&&Kr(E)&&ma(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*v:s[c++]=Kr(E)*y;case 125*v:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:y==-1&&(E=Ml(E,/\f/g,"")),p>0&&(Kr(E)-d||v===0&&m===47)&&sl(p>32?Tg(E+";",r,n,d-1,l):Tg(Ml(E," ","")+";",r,n,d-2,l),l);break;case 59:E+=";";default:if(sl(w=Rg(E,e,n,c,u,o,s,C,x=[],S=[],d,i),i),b===123)if(u===0)Rl(E,e,w,w,x,i,d,s,S);else{switch(f){case 99:if(na(E,3)===110)break;case 108:if(na(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Rl(t,w,w,r&&sl(Rg(t,w,w,0,0,o,s,C,o,x=[],d,S),S),o,S,d,s,r?x:S):Rl(E,w,w,w,[""],S,0,s,S)}}c=u=p=0,v=y=1,C=E="",d=a;break;case 58:d=1+Kr(E),p=m;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&nT()==125)continue}switch(E+=Zh(b),b*v){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(Kr(E)-1)*y,y=1;break;case 64:Bo()===45&&(E+=Gu(kr())),f=Bo(),u=d=Kr(C=E+=lT(Il())),b++;break;case 45:m===45&&Kr(E)==2&&(v=0)}}return i}function Rg(t,e,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],m=eT(p),v=0,g=0,y=0;v<r;++v)for(var b=0,C=ma(t,f+1,f=zC(g=a[v])),x=t;b<m;++b)(x=jC(g>0?p[b]+" "+C:Ml(C,/&\f/g,p[b])))&&(l[y++]=x);return ep(t,e,n,o===0?_C:s,l,c,u,d)}function uT(t,e,n,r){return ep(t,e,n,kC,Zh(tT()),ma(t,2,-2),0,r)}function Tg(t,e,n,r,o){return ep(t,e,n,BC,ma(t,0,r),ma(t,r+1,-1),r,o)}function pf(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function dT(t,e,n,r){switch(t.type){case QR:if(t.children.length)break;case XR:case YR:case BC:return t.return=t.return||t.value;case kC:return"";case JR:return t.return=t.value+"{"+pf(t.children,r)+"}";case _C:if(!Kr(t.value=t.props.join(",")))return""}return Kr(n=pf(t.children,r))?t.return=t.value+"{"+n+"}":""}function FC(t,e){var n=e.path,r=e.parentSelectors;yt(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(t).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var fT=function(e,n,r){if(e==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,i=["normal","none","initial","inherit","unset"];(typeof n!="string"||i.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&FC("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},hT=function(e,n,r){e==="animation"&&r.hashId&&n!=="none"&&FC("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},Pg="data-ant-cssinjs-cache-path",HC="_FILE_STYLE__",gi,VC=!0;function pT(){if(!gi&&(gi={},Gn())){var t=document.createElement("div");t.className=Pg,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);var e=getComputedStyle(t).content||"";e=e.replace(/^"/,"").replace(/"$/,""),e.split(";").forEach(function(o){var i=o.split(":"),a=ie(i,2),s=a[0],l=a[1];gi[s]=l});var n=document.querySelector("style[".concat(Pg,"]"));if(n){var r;VC=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(t)}}function mT(t){return pT(),!!gi[t]}function gT(t){var e=gi[t],n=null;if(e&&Gn())if(VC)n=HC;else{var r=document.querySelector("style[".concat(Dr,'="').concat(gi[t],'"]'));r?n=r.innerHTML:delete gi[t]}return[n,e]}var WC="_skip_check_",qC="_multi_value_";function Tl(t){var e=pf(cT(t),dT);return e.replace(/\{%%%\:[^;];}/g,";")}function vT(t){return st(t)==="object"&&t&&(WC in t||qC in t)}function Ag(t,e,n){if(!e)return t;var r=".".concat(e),o=n==="low"?":where(".concat(r,")"):r,i=t.split(",").map(function(a){var s,l=a.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(Re(l.slice(1))).join(" ")});return i.join(",")}var bT=function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,i=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,p=n.linters,m=p===void 0?[]:p,v="",g={};function y(x){var S=x.getName(s);if(!g[S]){var w=t(x.style,n,{root:!1,parentSelectors:a}),E=ie(w,1),N=E[0];g[S]="@keyframes ".concat(x.getName(s)).concat(N)}}function b(x){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return x.forEach(function(w){Array.isArray(w)?b(w,S):w&&S.push(w)}),S}var C=b(Array.isArray(e)?e:[e]);return C.forEach(function(x){var S=typeof x=="string"&&!o?{}:x;if(typeof S=="string")v+="".concat(S,`
|
|
179
|
-
`);else if(S._keyframe)y(S);else{var w=f.reduce(function(E,N){var O;return(N==null||(O=N.visit)===null||O===void 0?void 0:O.call(N,E))||E},S);Object.keys(w).forEach(function(E){var N=w[E];if(st(N)==="object"&&N&&(E!=="animationName"||!N._keyframe)&&!vT(N)){var O=!1,M=E.trim(),I=!1;(o||i)&&s?M.startsWith("@")?O=!0:M==="&"?M=Ag("",s,u):M=Ag(E,s,u):o&&!s&&(M==="&"||M==="")&&(M="",I=!0);var D=t(N,n,{root:I,injectHash:O,parentSelectors:[].concat(Re(a),[M])}),k=ie(D,2),P=k[0],j=k[1];g=q(q({},g),j),v+="".concat(M).concat(P)}else{let _=function(W,L){process.env.NODE_ENV!=="production"&&(st(N)!=="object"||!(N!=null&&N[WC]))&&[fT,hT].concat(Re(m)).forEach(function(Y){return Y(W,L,{path:c,hashId:s,parentSelectors:a})});var V=W.replace(/[A-Z]/g,function(Y){return"-".concat(Y.toLowerCase())}),U=L;!GR[W]&&typeof U=="number"&&U!==0&&(U="".concat(U,"px")),W==="animationName"&&L!==null&&L!==void 0&&L._keyframe&&(y(L),U=L.getName(s)),v+="".concat(V,":").concat(U,";")};var A,T=(A=N==null?void 0:N.value)!==null&&A!==void 0?A:N;st(N)==="object"&&N!==null&&N!==void 0&&N[qC]&&Array.isArray(T)?T.forEach(function(W){_(E,W)}):_(E,T)}})}}),o?l&&(v&&(v="@layer ".concat(l.name," {").concat(v,"}")),l.dependencies&&(g["@layer ".concat(l.name)]=l.dependencies.map(function(x){return"@layer ".concat(x,", ").concat(l.name,";")}).join(`
|
|
180
|
-
`))):v="{".concat(v,"}"),[v,g]};function KC(t,e){return ps("".concat(t.join("%")).concat(e))}function yT(){return null}var UC="style";function mf(t,e){var n=t.token,r=t.path,o=t.hashId,i=t.layer,a=t.nonce,s=t.clientOnly,l=t.order,c=l===void 0?0:l,u=h.useContext(Is),d=u.autoClear,f=u.mock,p=u.defaultCache,m=u.hashPriority,v=u.container,g=u.ssrInline,y=u.transformers,b=u.linters,C=u.cache,x=u.layer,S=n._tokenKey,w=[S];x&&w.push("layer"),w.push.apply(w,Re(r));var E=df;process.env.NODE_ENV!=="production"&&f!==void 0&&(E=f==="client");var N=Qh(UC,w,function(){var k=w.join("|");if(mT(k)){var P=gT(k),j=ie(P,2),A=j[0],T=j[1];if(A)return[A,S,T,{},s,c]}var _=e(),W=bT(_,{hashId:o,hashPriority:m,layer:x?i:void 0,path:r.join("-"),transformers:y,linters:b}),L=ie(W,2),V=L[0],U=L[1],Y=Tl(V),H=KC(w,Y);return[Y,S,H,U,s,c]},function(k,P){var j=ie(k,3),A=j[2];(P||d)&&df&&ms(A,{mark:Dr})},function(k){var P=ie(k,4),j=P[0];P[1];var A=P[2],T=P[3];if(E&&j!==HC){var _={mark:Dr,prepend:x?!1:"queue",attachTo:v,priority:c},W=typeof a=="function"?a():a;W&&(_.csp={nonce:W});var L=[],V=[];Object.keys(T).forEach(function(Y){Y.startsWith("@layer")?L.push(Y):V.push(Y)}),L.forEach(function(Y){go(Tl(T[Y]),"_layer-".concat(Y),q(q({},_),{},{prepend:!0}))});var U=go(j,A,_);U[_o]=C.instanceId,U.setAttribute(pa,S),process.env.NODE_ENV!=="production"&&U.setAttribute(SR,w.join("|")),V.forEach(function(Y){go(Tl(T[Y]),"_effect-".concat(Y),_)})}}),O=ie(N,3),M=O[0],I=O[1],D=O[2];return function(k){var P;if(!g||E||!p)P=h.createElement(yT,null);else{var j;P=h.createElement("style",De({},(j={},F(j,pa,I),F(j,Dr,D),j),{dangerouslySetInnerHTML:{__html:M}}))}return h.createElement(h.Fragment,null,P,k)}}var CT=function(e,n,r){var o=ie(e,6),i=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],d=r||{},f=d.plain;if(c)return null;var p=i,m={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return p=ac(i,a,s,m,f),l&&Object.keys(l).forEach(function(v){if(!n[v]){n[v]=!0;var g=Tl(l[v]),y=ac(g,a,"_effect-".concat(v),m,f);v.startsWith("@layer")?p=y+p:p+=y}}),[u,s,p]},GC="cssVar",ST=function(e,n){var r=e.key,o=e.prefix,i=e.unitless,a=e.ignore,s=e.token,l=e.scope,c=l===void 0?"":l,u=$.useContext(Is),d=u.cache.instanceId,f=u.container,p=s._tokenKey,m=[].concat(Re(e.path),[r,c,p]),v=Qh(GC,m,function(){var g=n(),y=AC(g,r,{prefix:o,unitless:i,ignore:a,scope:c}),b=ie(y,2),C=b[0],x=b[1],S=KC(m,x);return[C,x,S,r]},function(g){var y=ie(g,3),b=y[2];df&&ms(b,{mark:Dr})},function(g){var y=ie(g,3),b=y[1],C=y[2];if(b){var x=go(b,C,{mark:Dr,prepend:"queue",attachTo:f,priority:-999});x[_o]=d,x.setAttribute(pa,r)}});return v},xT=function(e,n,r){var o=ie(e,4),i=o[1],a=o[2],s=o[3],l=r||{},c=l.plain;if(!i)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=ac(i,s,a,d,c);return[u,a,f]},Da;Da={},F(Da,UC,CT),F(Da,DC,UR),F(Da,GC,xT);var qt=function(){function t(e,n){xn(this,t),F(this,"name",void 0),F(this,"style",void 0),F(this,"_keyframe",!0),this.name=e,this.style=n}return wn(t,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),t}();function zi(t){return t.notSplit=!0,t}zi(["borderTop","borderBottom"]),zi(["borderTop"]),zi(["borderBottom"]),zi(["borderLeft","borderRight"]),zi(["borderLeft"]),zi(["borderRight"]);var tp=$.createContext({});function XC(t){return NC(t)||wC(t)||Xh(t)||MC()}function Gr(t,e){for(var n=t,r=0;r<e.length;r+=1){if(n==null)return;n=n[e[r]]}return n}function YC(t,e,n,r){if(!e.length)return n;var o=XC(e),i=o[0],a=o.slice(1),s;return!t&&typeof i=="number"?s=[]:Array.isArray(t)?s=Re(t):s=q({},t),r&&n===void 0&&a.length===1?delete s[i][a[0]]:s[i]=YC(s[i],a,n,r),s}function Tr(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!Gr(t,e.slice(0,-1))?t:YC(t,e,n,r)}function wT(t){return st(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function Dg(t){return Array.isArray(t)?[]:{}}var ET=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ji(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Dg(e[0]);return e.forEach(function(o){function i(a,s){var l=new Set(s),c=Gr(o,a),u=Array.isArray(c);if(u||wT(c)){if(!l.has(c)){l.add(c);var d=Gr(r,a);u?r=Tr(r,a,[]):(!d||st(d)!=="object")&&(r=Tr(r,a,Dg(c))),ET(c).forEach(function(f){i([].concat(Re(a),[f]),l)})}}else r=Tr(r,a,c)}i([])}),r}function JC(){}let ao=null;function $T(){ao=null,fC()}let np=JC;process.env.NODE_ENV!=="production"&&(np=(t,e,n)=>{yt(t,`[antd: ${e}] ${n}`),process.env.NODE_ENV==="test"&&$T()});const QC=h.createContext({}),on=process.env.NODE_ENV!=="production"?t=>{const{strict:e}=h.useContext(QC),n=(r,o,i)=>{if(!r)if(e===!1&&o==="deprecated"){const a=ao;ao||(ao={}),ao[t]=ao[t]||[],ao[t].includes(i||"")||ao[t].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",ao)}else process.env.NODE_ENV!=="production"&&np(r,t,i)};return n.deprecated=(r,o,i,a)=>{n(r,"deprecated",`\`${o}\` is deprecated. Please use \`${i}\` instead.${a?` ${a}`:""}`)},n}:()=>{const t=()=>{};return t.deprecated=JC,t},Ti=np,OT=$.createContext(void 0);var NT={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},MT={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},IT=q(q({},MT),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const ZC={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},kg={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},IT),timePickerLocale:Object.assign({},ZC)},sr="${label} is not a valid ${type}",$i={locale:"en",Pagination:NT,DatePicker:kg,TimePicker:ZC,Calendar:kg,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:sr,method:sr,array:sr,object:sr,number:sr,date:sr,boolean:sr,integer:sr,float:sr,regexp:sr,email:sr,url:sr,hex:sr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Pl=Object.assign({},$i.Modal),Al=[];const _g=()=>Al.reduce((t,e)=>Object.assign(Object.assign({},t),e),$i.Modal);function RT(t){if(t){const e=Object.assign({},t);return Al.push(e),Pl=_g(),()=>{Al=Al.filter(n=>n!==e),Pl=_g()}}Pl=Object.assign({},$i.Modal)}function eS(){return Pl}const rp=$.createContext(void 0),So=(t,e)=>{const n=h.useContext(rp),r=h.useMemo(()=>{var i;const a=e||$i[t],s=(i=n==null?void 0:n[t])!==null&&i!==void 0?i:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[t,e,n]),o=h.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?$i.locale:i},[n]);return[r,o]},tS="internalMark",nS=t=>{const{locale:e={},children:n,_ANT_MARK__:r}=t;if(process.env.NODE_ENV!=="production"){const i=on("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===tS,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}h.useEffect(()=>RT(e==null?void 0:e.Modal),[e]);const o=h.useMemo(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return h.createElement(rp.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(nS.displayName="LocaleProvider");const rS={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},vs=Object.assign(Object.assign({},rS),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
181
|
-
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
182
|
-
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Dn=Math.round;function Xu(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=e(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Bg=(t,e,n)=>n===0?t:t/100;function ka(t,e){const n=e||255;return t>n?n:t<0?0:t}class Vt{constructor(e){F(this,"isValid",!0),F(this,"r",0),F(this,"g",0),F(this,"b",0),F(this,"a",1),F(this,"_h",void 0),F(this,"_s",void 0),F(this,"_l",void 0),F(this,"_v",void 0),F(this,"_max",void 0),F(this,"_min",void 0),F(this,"_brightness",void 0);function n(r){return r[0]in e&&r[1]in e&&r[2]in e}if(e)if(typeof e=="string"){let o=function(i){return r.startsWith(i)};const r=e.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):o("rgb")?this.fromRgbString(r):o("hsl")?this.fromHslString(r):(o("hsv")||o("hsb"))&&this.fromHsvString(r)}else if(e instanceof Vt)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=ka(e.r),this.g=ka(e.g),this.b=ka(e.b),this.a=typeof e.a=="number"?ka(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),o=e(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Dn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-e/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+e/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(e,n=50){const r=this._c(e),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:Dn(i("r")),g:Dn(i("g")),b:Dn(i("b")),a:Dn(i("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),o=i=>Dn((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(e+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Dn(this.a*255).toString(16);e+=i.length===2?i:"0"+i}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=Dn(this.getSaturation()*100),r=Dn(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const o=this.clone();return o[e]=ka(n,r),o}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:o}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const f=Dn(r*255);this.r=f,this.g=f,this.b=f}let i=0,a=0,s=0;const l=e/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,a=u):l>=1&&l<2?(i=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(i=u,s=c):l>=5&&l<6&&(i=c,s=u);const d=r-c/2;this.r=Dn((i+d)*255),this.g=Dn((a+d)*255),this.b=Dn((s+d)*255)}fromHsv({h:e,s:n,v:r,a:o}){this._h=e%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=Dn(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const a=e/60,s=Math.floor(a),l=a-s,c=Dn(r*(1-n)*255),u=Dn(r*(1-n*l)*255),d=Dn(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const n=Xu(e,Bg);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Xu(e,Bg);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Xu(e,(r,o)=>o.includes("%")?Dn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var ll=2,zg=.16,TT=.05,PT=.05,AT=.15,oS=5,iS=4,DT=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function jg(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-ll*e:Math.round(t.h)+ll*e:r=n?Math.round(t.h)+ll*e:Math.round(t.h)-ll*e,r<0?r+=360:r>=360&&(r-=360),r}function Lg(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-zg*e:e===iS?r=t.s+zg:r=t.s+TT*e,r>1&&(r=1),n&&e===oS&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Fg(t,e,n){var r;return n?r=t.v+PT*e:r=t.v-AT*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function bs(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Vt(t),o=r.toHsv(),i=oS;i>0;i-=1){var a=new Vt({h:jg(o,i,!0),s:Lg(o,i,!0),v:Fg(o,i,!0)});n.push(a)}n.push(r);for(var s=1;s<=iS;s+=1){var l=new Vt({h:jg(o,s),s:Lg(o,s),v:Fg(o,s)});n.push(l)}return e.theme==="dark"?DT.map(function(c){var u=c.index,d=c.amount;return new Vt(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var Yu={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},gf=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];gf.primary=gf[5];var vf=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];vf.primary=vf[5];var bf=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];bf.primary=bf[5];var yf=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];yf.primary=yf[5];var Cf=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Cf.primary=Cf[5];var Sf=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Sf.primary=Sf[5];var xf=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];xf.primary=xf[5];var wf=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];wf.primary=wf[5];var sc=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];sc.primary=sc[5];var Ef=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Ef.primary=Ef[5];var $f=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];$f.primary=$f[5];var Of=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Of.primary=Of[5];var Nf=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Nf.primary=Nf[5];var Ju={red:gf,volcano:vf,orange:bf,gold:yf,yellow:Cf,lime:Sf,green:xf,cyan:wf,blue:sc,geekblue:Ef,purple:$f,magenta:Of,grey:Nf};function kT(t,e){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=e;const{colorSuccess:o,colorWarning:i,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=t,d=n(l),f=n(o),p=n(i),m=n(a),v=n(s),g=r(c,u),y=t.colorLink||t.colorInfo,b=n(y),C=new Vt(m[1]).mix(new Vt(m[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:C,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Vt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const _T=t=>{let e=t,n=t,r=t,o=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?o=4:t>=8&&(o=6),{borderRadius:t,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:o}};function BT(t){const{motionUnit:e,motionBase:n,borderRadius:r,lineWidth:o}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:o+1},_T(r))}const zT=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function Dl(t){return(t+8)/t}function jT(t){const e=Array.from({length:10}).map((n,r)=>{const o=r-1,i=t*Math.pow(Math.E,o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:Dl(n)}))}const LT=t=>{const e=jT(t),n=e.map(u=>u.size),r=e.map(u=>u.lineHeight),o=n[1],i=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function FT(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const yr=(t,e)=>new Vt(t).setA(e).toRgbString(),_a=(t,e)=>new Vt(t).darken(e).toHexString(),HT=t=>{const e=bs(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},VT=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:yr(r,.88),colorTextSecondary:yr(r,.65),colorTextTertiary:yr(r,.45),colorTextQuaternary:yr(r,.25),colorFill:yr(r,.15),colorFillSecondary:yr(r,.06),colorFillTertiary:yr(r,.04),colorFillQuaternary:yr(r,.02),colorBgSolid:yr(r,1),colorBgSolidHover:yr(r,.75),colorBgSolidActive:yr(r,.95),colorBgLayout:_a(n,4),colorBgContainer:_a(n,0),colorBgElevated:_a(n,0),colorBgSpotlight:yr(r,.85),colorBgBlur:"transparent",colorBorder:_a(n,15),colorBorderSecondary:_a(n,6)}};function WT(t){Yu.pink=Yu.magenta,Ju.pink=Ju.magenta;const e=Object.keys(rS).map(n=>{const r=t[n]===Yu[n]?Ju[n]:bs(t[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),kT(t,{generateColorPalettes:HT,generateNeutralColorPalettes:VT})),LT(t.fontSize)),FT(t)),zT(t)),BT(t))}const aS=uf(WT),Mf={token:vs,override:{override:vs},hashed:!0},sS=$.createContext(Mf),ys="ant",Wc="anticon",qT=["outlined","borderless","filled","underlined"],KT=(t,e)=>e||(t?`${ys}-${t}`:ys),At=h.createContext({getPrefixCls:KT,iconPrefixCls:Wc}),{Consumer:t3}=At,Hg={};function br(t){const e=h.useContext(At),{getPrefixCls:n,direction:r,getPopupContainer:o}=e,i=e[t];return Object.assign(Object.assign({classNames:Hg,styles:Hg},i),{getPrefixCls:n,direction:r,getPopupContainer:o})}const UT=`-ant-${Date.now()}-${Math.random()}`;function GT(t,e){const n={},r=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(a,s)=>{const l=new Vt(a),c=bs(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){o(e.primaryColor,"primary");const a=new Vt(e.primaryColor),s=bs(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(a,c=>c.setA(c.a*.12));const l=new Vt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setA(c.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return e.successColor&&o(e.successColor,"success"),e.warningColor&&o(e.warningColor,"warning"),e.errorColor&&o(e.errorColor,"error"),e.infoColor&&o(e.infoColor,"info"),`
|
|
183
|
-
:root {
|
|
184
|
-
${Object.keys(n).map(a=>`--${t}-${a}: ${n[a]};`).join(`
|
|
185
|
-
`)}
|
|
186
|
-
}
|
|
187
|
-
`.trim()}function XT(t,e){const n=GT(t,e);Gn()?go(n,`${UT}-dynamic-theme`):process.env.NODE_ENV!=="production"&&Ti(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const zr=h.createContext(!1),lS=t=>{let{children:e,disabled:n}=t;const r=h.useContext(zr);return h.createElement(zr.Provider,{value:n??r},e)},va=h.createContext(void 0),YT=t=>{let{children:e,size:n}=t;const r=h.useContext(va);return h.createElement(va.Provider,{value:n||r},e)};function JT(){const t=$.useContext(zr),e=$.useContext(va);return{componentDisabled:t,componentSize:e}}var cS=wn(function t(){xn(this,t)}),uS="CALC_UNIT",QT=new RegExp(uS,"g");function Qu(t){return typeof t=="number"?"".concat(t).concat(uS):t}var ZT=function(t){bo(n,t);var e=yo(n);function n(r,o){var i;xn(this,n),i=e.call(this),F(Rt(i),"result",""),F(Rt(i),"unitlessCssVar",void 0),F(Rt(i),"lowPriority",void 0);var a=st(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=Qu(r):a==="string"&&(i.result=r),i}return wn(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(Qu(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(Qu(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(QT,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(cS),eP=function(t){bo(n,t);var e=yo(n);function n(r){var o;return xn(this,n),o=e.call(this),F(Rt(o),"result",0),r instanceof n?o.result=r.result:typeof r=="number"&&(o.result=r),o}return wn(n,[{key:"add",value:function(o){return o instanceof n?this.result+=o.result:typeof o=="number"&&(this.result+=o),this}},{key:"sub",value:function(o){return o instanceof n?this.result-=o.result:typeof o=="number"&&(this.result-=o),this}},{key:"mul",value:function(o){return o instanceof n?this.result*=o.result:typeof o=="number"&&(this.result*=o),this}},{key:"div",value:function(o){return o instanceof n?this.result/=o.result:typeof o=="number"&&(this.result/=o),this}},{key:"equal",value:function(){return this.result}}]),n}(cS),tP=function(e,n){var r=e==="css"?ZT:eP;return function(o){return new r(o,n)}},Vg=function(e,n){return"".concat([n,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Wt(t){var e=h.useRef();e.current=t;var n=h.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(i))},[]);return n}function ba(t){var e=h.useRef(!1),n=h.useState(t),r=ie(n,2),o=r[0],i=r[1];h.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]);function a(s,l){l&&e.current||i(s)}return[o,a]}function Zu(t){return t!==void 0}function mn(t,e){var n=e||{},r=n.defaultValue,o=n.value,i=n.onChange,a=n.postState,s=ba(function(){return Zu(o)?o:Zu(r)?typeof r=="function"?r():r:typeof t=="function"?t():t}),l=ie(s,2),c=l[0],u=l[1],d=o!==void 0?o:c,f=a?a(d):d,p=Wt(i),m=ba([d]),v=ie(m,2),g=v[0],y=v[1];Qa(function(){var C=g[0];c!==C&&p(c,C)},[g]),Qa(function(){Zu(o)||u(o)},[o]);var b=Wt(function(C,x){u(C,x),y([d],x)});return[f,b]}function Wg(t,e,n,r){var o=q({},e[t]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=ie(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&yt(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(t)," is deprecated. Please use `").concat(String(u),"` instead.")),o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o==null?void 0:o[c])}})}var a=q(q({},n),o);return Object.keys(a).forEach(function(s){a[s]===e[s]&&delete a[s]}),a}var dS=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",If=!0;function Lt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!dS)return Object.assign.apply(Object,[{}].concat(e));If=!1;var r={};return e.forEach(function(o){if(st(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),If=!0,r}var qg={};function nP(){}var rP=function(e){var n,r=e,o=nP;return dS&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(e,{get:function(a,s){if(If){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;qg[a]={global:Array.from(n),component:q(q({},(l=qg[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function Kg(t,e,n){if(typeof n=="function"){var r;return n(Lt(e,(r=e[t])!==null&&r!==void 0?r:{}))}return n??{}}function oP(t){return t==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"max(".concat(r.map(function(i){return re(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"min(".concat(r.map(function(i){return re(i)}).join(","),")")}}}var iP=1e3*60*10,aP=function(){function t(){xn(this,t),F(this,"map",new Map),F(this,"objectIDMap",new WeakMap),F(this,"nextID",0),F(this,"lastAccessBeat",new Map),F(this,"accessBeat",0)}return wn(t,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&st(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(st(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>iP&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),t}(),Ug=new aP;function sP(t,e){return $.useMemo(function(){var n=Ug.get(e);if(n)return n;var r=t();return Ug.set(e,r),r},e)}var lP=function(){return{}};function cP(t){var e=t.useCSP,n=e===void 0?lP:e,r=t.useToken,o=t.usePrefix,i=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(f,p,m,v){var g=Array.isArray(f)?f[0]:f;function y(N){return"".concat(String(g)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var b=(v==null?void 0:v.unitless)||{},C=typeof s=="function"?s(f):{},x=q(q({},C),{},F({},y("zIndexPopup"),!0));Object.keys(b).forEach(function(N){x[y(N)]=b[N]});var S=q(q({},v),{},{unitless:x,prefixToken:y}),w=u(f,p,m,S),E=c(g,m,S);return function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,M=w(N,O),I=ie(M,2),D=I[1],k=E(O),P=ie(k,2),j=P[0],A=P[1];return[j,D,A]}}function c(f,p,m){var v=m.unitless,g=m.injectStyle,y=g===void 0?!0:g,b=m.prefixToken,C=m.ignore,x=function(E){var N=E.rootCls,O=E.cssVar,M=O===void 0?{}:O,I=r(),D=I.realToken;return ST({path:[f],prefix:M.prefix,key:M.key,unitless:v,ignore:C,token:D,scope:N},function(){var k=Kg(f,D,p),P=Wg(f,D,k,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(k).forEach(function(j){P[b(j)]=P[j],delete P[j]}),P}),null},S=function(E){var N=r(),O=N.cssVar;return[function(M){return y&&O?$.createElement($.Fragment,null,$.createElement(x,{rootCls:E,cssVar:O,component:f}),M):M},O==null?void 0:O.key]};return S}function u(f,p,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],y=ie(g,1),b=y[0],C=g.join("-"),x=t.layer||{name:"antd"};return function(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S,E=r(),N=E.theme,O=E.realToken,M=E.hashId,I=E.token,D=E.cssVar,k=o(),P=k.rootPrefixCls,j=k.iconPrefixCls,A=n(),T=D?"css":"js",_=sP(function(){var H=new Set;return D&&Object.keys(v.unitless||{}).forEach(function(G){H.add(Nl(G,D.prefix)),H.add(Nl(G,Vg(b,D.prefix)))}),tP(T,H)},[T,b,D==null?void 0:D.prefix]),W=oP(T),L=W.max,V=W.min,U={theme:N,token:I,hashId:M,nonce:function(){return A.nonce},clientOnly:v.clientOnly,layer:x,order:v.order||-999};typeof i=="function"&&mf(q(q({},U),{},{clientOnly:!1,path:["Shared",P]}),function(){return i(I,{prefix:{rootPrefixCls:P,iconPrefixCls:j},csp:A})});var Y=mf(q(q({},U),{},{path:[C,S,j]}),function(){if(v.injectStyle===!1)return[];var H=rP(I),G=H.token,J=H.flush,se=Kg(b,O,m),X=".".concat(S),de=Wg(b,O,se,{deprecatedTokens:v.deprecatedTokens});D&&se&&st(se)==="object"&&Object.keys(se).forEach(function(me){se[me]="var(".concat(Nl(me,Vg(b,D.prefix)),")")});var ye=Lt(G,{componentCls:X,prefixCls:S,iconCls:".".concat(j),antCls:".".concat(P),calc:_,max:L,min:V},D?se:de),ce=p(ye,{hashId:M,prefixCls:S,rootPrefixCls:P,iconPrefixCls:j});J(b,de);var oe=typeof a=="function"?a(ye,S,w,v.resetFont):null;return[v.resetStyle===!1?null:oe,ce]});return[Y,M]}}function d(f,p,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,p,m,q({resetStyle:!1,order:-998},v)),y=function(C){var x=C.prefixCls,S=C.rootCls,w=S===void 0?x:S;return g(x,w),null};return process.env.NODE_ENV!=="production"&&(y.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const Wo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],uP="5.24.5";function ed(t){return t>=0&&t<=255}function Wa(t,e){const{r:n,g:r,b:o,a:i}=new Vt(t).toRgb();if(i<1)return t;const{r:a,g:s,b:l}=new Vt(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(ed(u)&&ed(d)&&ed(f))return new Vt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Vt({r:n,g:r,b:o,a:1}).toRgbString()}var dP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function fS(t){const{override:e}=t,n=dP(t,["override"]),r=Object.assign({},e);Object.keys(vs).forEach(f=>{delete r[f]});const o=Object.assign(Object.assign({},n),r),i=480,a=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Wa(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Wa(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Wa(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Wa(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
|
|
188
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
189
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
190
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
191
|
-
`,boxShadowSecondary:`
|
|
192
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
193
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
194
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
195
|
-
`,boxShadowTertiary:`
|
|
196
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
197
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
198
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
199
|
-
`,screenXS:i,screenXSMin:i,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
|
|
200
|
-
0 1px 2px -2px ${new Vt("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
201
|
-
0 3px 6px 0 ${new Vt("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
202
|
-
0 5px 12px 4px ${new Vt("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
203
|
-
`,boxShadowDrawerRight:`
|
|
204
|
-
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
205
|
-
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
206
|
-
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
207
|
-
`,boxShadowDrawerLeft:`
|
|
208
|
-
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
209
|
-
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
210
|
-
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
211
|
-
`,boxShadowDrawerUp:`
|
|
212
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
213
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
214
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
215
|
-
`,boxShadowDrawerDown:`
|
|
216
|
-
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
217
|
-
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
218
|
-
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
219
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var Gg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const hS={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},fP={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},hP={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},pS=(t,e,n)=>{const r=n.getDerivativeToken(t),{override:o}=e,i=Gg(e,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=fS(a),i&&Object.entries(i).forEach(s=>{let[l,c]=s;const{theme:u}=c,d=Gg(c,["theme"]);let f=d;u&&(f=pS(Object.assign(Object.assign({},a),d),{override:d},u)),a[l]=f}),a};function ar(){const{token:t,hashed:e,theme:n,override:r,cssVar:o}=$.useContext(sS),i=`${uP}-${e||""}`,a=n||aS,[s,l,c]=KR(a,[vs,t],{salt:i,override:r,getComputedToken:pS,formatToken:fS,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:hS,ignore:fP,preserve:hP}});return[a,c,e?l:"",s,o]}const Cs={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Hn=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}},Pi=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),lc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),pP=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),mP=(t,e,n,r)=>{const o=`[class^="${e}"], [class*=" ${e}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},s),a),{[o]:a})}},op=(t,e)=>({outline:`${re(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),ya=(t,e)=>({"&:focus-visible":Object.assign({},op(t,e))}),mS=t=>({[`.${t}`]:Object.assign(Object.assign({},Pi()),{[`.${t} .${t}-icon`]:{display:"block"}})}),{genStyleHooks:hn,genComponentStyleHook:gP,genSubStyleComponent:gS}=cP({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=$.useContext(At);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,o]=ar();return{theme:t,realToken:e,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:t}=$.useContext(At);return t??{}},getResetStyles:(t,e)=>{var n;const r=pP(t);return[r,{"&":r},mS((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:Wc)]},getCommonStyle:mP,getCompUnitless:()=>hS});function vP(t,e){return Wo.reduce((n,r)=>{const o=t[`${r}1`],i=t[`${r}3`],a=t[`${r}6`],s=t[`${r}7`];return Object.assign(Object.assign({},n),e(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s}))},{})}const bP=(t,e)=>{const[n,r]=ar();return mf({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>[mS(t)])},yP=Object.assign({},h),{useId:Xg}=yP,CP=()=>"",SP=typeof Xg>"u"?CP:Xg;function xP(t,e,n){var r,o;const i=on("ConfigProvider"),a=t||{},s=a.inherit===!1||!e?Object.assign(Object.assign({},Mf),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:Mf.hashed,cssVar:e==null?void 0:e.cssVar}):e,l=SP();if(process.env.NODE_ENV!=="production"){const c=a.cssVar||s.cssVar,u=!!(typeof a.cssVar=="object"&&(!((o=a.cssVar)===null||o===void 0)&&o.key)||l);process.env.NODE_ENV!=="production"&&i(!c||u,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Ms(()=>{var c,u;if(!t)return e;const d=Object.assign({},s.components);Object.keys(t.components||{}).forEach(m=>{d[m]=Object.assign(Object.assign({},d[m]),t.components[m])});const f=`css-var-${l.replace(/:/g,"")}`,p=((c=a.cssVar)!==null&&c!==void 0?c:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((u=a.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:d,cssVar:p})},[a,s],(c,u)=>c.some((d,f)=>{const p=u[f];return!ha(d,p,!0)}))}var wP=["children"],vS=h.createContext({});function EP(t){var e=t.children,n=xt(t,wP);return h.createElement(vS.Provider,{value:n},e)}var $P=function(t){bo(n,t);var e=yo(n);function n(){return xn(this,n),e.apply(this,arguments)}return wn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function OP(t){var e=h.useReducer(function(s){return s+1},0),n=ie(e,2),r=n[1],o=h.useRef(t),i=Wt(function(){return o.current}),a=Wt(function(s){o.current=typeof s=="function"?s(o.current):s,r()});return[i,a]}var No="none",cl="appear",ul="enter",dl="leave",Yg="none",Pr="prepare",Qi="start",Zi="active",ip="end",bS="prepared";function Jg(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function NP(t,e){var n={animationend:Jg("Animation","AnimationEnd"),transitionend:Jg("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var MP=NP(Gn(),typeof window<"u"?window:{}),yS={};if(Gn()){var IP=document.createElement("div");yS=IP.style}var fl={};function CS(t){if(fl[t])return fl[t];var e=MP[t];if(e)for(var n=Object.keys(e),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(e,i)&&i in yS)return fl[t]=e[i],fl[t]}return""}var SS=CS("animationend"),xS=CS("transitionend"),wS=!!(SS&&xS),Qg=SS||"animationend",Zg=xS||"transitionend";function ev(t,e){if(!t)return null;if(st(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const RP=function(t){var e=$.useRef();function n(o){o&&(o.removeEventListener(Zg,t),o.removeEventListener(Qg,t))}function r(o){e.current&&e.current!==o&&n(e.current),o&&o!==e.current&&(o.addEventListener(Zg,t),o.addEventListener(Qg,t),e.current=o)}return h.useEffect(function(){return function(){n(e.current)}},[]),[r,n]};var ES=Gn()?$.useLayoutEffect:$.useEffect;const TP=function(){var t=h.useRef(null);function e(){Dt.cancel(t.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var i=Dt(function(){o<=1?r({isCanceled:function(){return i!==t.current}}):n(r,o-1)});t.current=i}return h.useEffect(function(){return function(){e()}},[]),[n,e]};var PP=[Pr,Qi,Zi,ip],AP=[Pr,bS],$S=!1,DP=!0;function OS(t){return t===Zi||t===ip}const kP=function(t,e,n){var r=ba(Yg),o=ie(r,2),i=o[0],a=o[1],s=TP(),l=ie(s,2),c=l[0],u=l[1];function d(){a(Pr,!0)}var f=e?AP:PP;return ES(function(){if(i!==Yg&&i!==ip){var p=f.indexOf(i),m=f[p+1],v=n(i);v===$S?a(m,!0):m&&c(function(g){function y(){g.isCanceled()||a(m,!0)}v===!0?y():Promise.resolve(v).then(y)})}},[t,i]),h.useEffect(function(){return function(){u()}},[]),[d,i]};function _P(t,e,n,r){var o=r.motionEnter,i=o===void 0?!0:o,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,m=r.onLeavePrepare,v=r.onAppearStart,g=r.onEnterStart,y=r.onLeaveStart,b=r.onAppearActive,C=r.onEnterActive,x=r.onLeaveActive,S=r.onAppearEnd,w=r.onEnterEnd,E=r.onLeaveEnd,N=r.onVisibleChanged,O=ba(),M=ie(O,2),I=M[0],D=M[1],k=OP(No),P=ie(k,2),j=P[0],A=P[1],T=ba(null),_=ie(T,2),W=_[0],L=_[1],V=j(),U=$.useRef(!1),Y=$.useRef(null);function H(){return n()}var G=$.useRef(!1);function J(){A(No),L(null,!0)}var se=Wt(function(z){var ve=j();if(ve!==No){var ae=H();if(!(z&&!z.deadline&&z.target!==ae)){var he=G.current,$e;ve===cl&&he?$e=S==null?void 0:S(ae,z):ve===ul&&he?$e=w==null?void 0:w(ae,z):ve===dl&&he&&($e=E==null?void 0:E(ae,z)),he&&$e!==!1&&J()}}}),X=RP(se),de=ie(X,1),ye=de[0],ce=function(ve){switch(ve){case cl:return F(F(F({},Pr,f),Qi,v),Zi,b);case ul:return F(F(F({},Pr,p),Qi,g),Zi,C);case dl:return F(F(F({},Pr,m),Qi,y),Zi,x);default:return{}}},oe=h.useMemo(function(){return ce(V)},[V]),me=kP(V,!t,function(z){if(z===Pr){var ve=oe[Pr];return ve?ve(H()):$S}if(fe in oe){var ae;L(((ae=oe[fe])===null||ae===void 0?void 0:ae.call(oe,H(),null))||null)}return fe===Zi&&V!==No&&(ye(H()),u>0&&(clearTimeout(Y.current),Y.current=setTimeout(function(){se({deadline:!0})},u))),fe===bS&&J(),DP}),te=ie(me,2),le=te[0],fe=te[1],Ee=OS(fe);G.current=Ee;var Oe=$.useRef(null);ES(function(){if(!(U.current&&Oe.current===e)){D(e);var z=U.current;U.current=!0;var ve;!z&&e&&s&&(ve=cl),z&&e&&i&&(ve=ul),(z&&!e&&c||!z&&d&&!e&&c)&&(ve=dl);var ae=ce(ve);ve&&(t||ae[Pr])?(A(ve),le()):A(No),Oe.current=e}},[e]),$.useEffect(function(){(V===cl&&!s||V===ul&&!i||V===dl&&!c)&&A(No)},[s,i,c]),$.useEffect(function(){return function(){U.current=!1,clearTimeout(Y.current)}},[]);var xe=h.useRef(!1);$.useEffect(function(){I&&(xe.current=!0),I!==void 0&&V===No&&((xe.current||I)&&(N==null||N(I)),xe.current=!0)},[I,V]);var Be=W;return oe[Pr]&&fe===Qi&&(Be=q({transition:"none"},Be)),[V,fe,Be,I??e]}function BP(t){var e=t;st(t)==="object"&&(e=t.transitionSupport);function n(o,i){return!!(o.motionName&&e&&i!==!1)}var r=h.forwardRef(function(o,i){var a=o.visible,s=a===void 0?!0:a,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,m=o.eventProps,v=h.useContext(vS),g=v.motion,y=n(o,g),b=$.useRef(),C=$.useRef();function x(){try{return b.current instanceof HTMLElement?b.current:Ol(C.current)}catch{return null}}var S=_P(y,s,x,o),w=ie(S,4),E=w[0],N=w[1],O=w[2],M=w[3],I=h.useRef(M);M&&(I.current=!0);var D=h.useCallback(function(_){b.current=_,Kh(i,_)},[i]),k,P=q(q({},m),{},{visible:s});if(!d)k=null;else if(E===No)M?k=d(q({},P),D):!c&&I.current&&p?k=d(q(q({},P),{},{className:p}),D):u||!c&&!p?k=d(q(q({},P),{},{style:{display:"none"}}),D):k=null;else{var j;N===Pr?j="prepare":OS(N)?j="active":N===Qi&&(j="start");var A=ev(f,"".concat(E,"-").concat(j));k=d(q(q({},P),{},{className:ee(ev(f,E),F(F({},A,A&&j),f,typeof f=="string")),style:O}),D)}if(h.isValidElement(k)&&Qo(k)){var T=Ri(k);T||(k=h.cloneElement(k,{ref:D}))}return h.createElement($P,{ref:C},k)});return r.displayName="CSSMotion",r}const no=BP(wS);var Rf="add",Tf="keep",Pf="remove",td="removed";function zP(t){var e;return t&&st(t)==="object"&&"key"in t?e=t:e={key:t},q(q({},e),{},{key:String(e.key)})}function Af(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(zP)}function jP(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=e.length,i=Af(t),a=Af(e);i.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=a[d];if(f.key===c.key){r<d&&(n=n.concat(a.slice(r,d).map(function(p){return q(q({},p),{},{status:Rf})})),r=d),n.push(q(q({},f),{},{status:Tf})),r+=1,u=!0;break}}u||n.push(q(q({},c),{},{status:Pf}))}),r<o&&(n=n.concat(a.slice(r).map(function(c){return q(q({},c),{},{status:Rf})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Pf}),n.forEach(function(u){u.key===c&&(u.status=Tf)})}),n}var LP=["component","children","onVisibleChanged","onAllRemoved"],FP=["status"],HP=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function VP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:no,n=function(r){bo(i,r);var o=yo(i);function i(){var a;xn(this,i);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return a=o.call.apply(o,[this].concat(l)),F(Rt(a),"state",{keyEntities:[]}),F(Rt(a),"removeKey",function(u){a.setState(function(d){var f=d.keyEntities.map(function(p){return p.key!==u?p:q(q({},p),{},{status:td})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(p){var m=p.status;return m!==td}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return wn(i,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged;c.onAllRemoved;var p=xt(c,LP),m=u||h.Fragment,v={};return HP.forEach(function(g){v[g]=p[g],delete p[g]}),delete p.keys,h.createElement(m,p,l.map(function(g,y){var b=g.status,C=xt(g,FP),x=b===Rf||b===Tf;return h.createElement(e,De({},v,{key:C.key,visible:x,eventProps:C,onVisibleChanged:function(w){f==null||f(w,{key:C.key}),w||s.removeKey(C.key)}}),function(S,w){return d(q(q({},S),{},{index:y}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Af(c),f=jP(u,d);return{keyEntities:f.filter(function(p){var m=u.find(function(v){var g=v.key;return p.key===g});return!(m&&m.status===td&&p.status===Pf)})}}}]),i}(h.Component);return F(n,"defaultProps",{component:"div"}),n}VP(wS);function WP(t){const{children:e}=t,[,n]=ar(),{motion:r}=n,o=h.useRef(!1);return o.current=o.current||r===!1,o.current?h.createElement(EP,{motion:r},e):e}const NS=h.memo(t=>{let{dropdownMatchSelectWidth:e}=t;return on("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(NS.displayName="PropWarning");const qP=process.env.NODE_ENV!=="production"?NS:()=>null;var KP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let Df=!1;const UP=process.env.NODE_ENV!=="production"?t=>{process.env.NODE_ENV!=="production"&&Ti(!Df,t,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,GP=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let cc,MS,IS,RS;function kl(){return cc||ys}function XP(){return MS||Wc}function YP(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const JP=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:o}=t;e!==void 0&&(cc=e),n!==void 0&&(MS=n),"holderRender"in t&&(RS=o),r&&(YP(r)?(process.env.NODE_ENV!=="production"&&Ti(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),XT(kl(),r)):IS=r)},QP=()=>({getPrefixCls:(t,e)=>e||(t?`${kl()}-${t}`:kl()),getIconPrefixCls:XP,getRootPrefixCls:()=>cc||kl(),getTheme:()=>IS,holderRender:RS}),ZP=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:i,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:p,popupMatchSelectWidth:m,popupOverflow:v,legacyLocale:g,parentContext:y,iconPrefixCls:b,theme:C,componentDisabled:x,segmented:S,statistic:w,spin:E,calendar:N,carousel:O,cascader:M,collapse:I,typography:D,checkbox:k,descriptions:P,divider:j,drawer:A,skeleton:T,steps:_,image:W,layout:L,list:V,mentions:U,modal:Y,progress:H,result:G,slider:J,breadcrumb:se,menu:X,pagination:de,input:ye,textArea:ce,empty:oe,badge:me,radio:te,rate:le,switch:fe,transfer:Ee,avatar:Oe,message:xe,tag:Be,table:z,card:ve,tabs:ae,timeline:he,timePicker:$e,upload:Me,notification:we,tree:ze,colorPicker:Le,datePicker:Ie,rangePicker:We,flex:Ke,wave:Pe,dropdown:je,warning:_e,tour:Fe,tooltip:Ze,popover:ht,popconfirm:Tt,floatButtonGroup:Pt,variant:an,inputNumber:Ye,treeSelect:He}=t,lt=h.useCallback((nt,dt)=>{const{prefixCls:kt}=t;if(dt)return dt;const $t=kt||y.getPrefixCls("");return nt?`${$t}-${nt}`:$t},[y.getPrefixCls,t.prefixCls]),it=b||y.iconPrefixCls||Wc,pt=n||y.csp;bP(it,pt);const Qe=xP(C,y.theme,{prefixCls:lt("")});process.env.NODE_ENV!=="production"&&(Df=Df||!!Qe);const qe={csp:pt,autoInsertSpaceInButton:r,alert:o,anchor:i,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:m??p,popupOverflow:v,getPrefixCls:lt,iconPrefixCls:it,theme:Qe,segmented:S,statistic:w,spin:E,calendar:N,carousel:O,cascader:M,collapse:I,typography:D,checkbox:k,descriptions:P,divider:j,drawer:A,skeleton:T,steps:_,image:W,input:ye,textArea:ce,layout:L,list:V,mentions:U,modal:Y,progress:H,result:G,slider:J,breadcrumb:se,menu:X,pagination:de,empty:oe,badge:me,radio:te,rate:le,switch:fe,transfer:Ee,avatar:Oe,message:xe,tag:Be,table:z,card:ve,tabs:ae,timeline:he,timePicker:$e,upload:Me,notification:we,tree:ze,colorPicker:Le,datePicker:Ie,rangePicker:We,flex:Ke,wave:Pe,dropdown:je,warning:_e,tour:Fe,tooltip:Ze,popover:ht,popconfirm:Tt,floatButtonGroup:Pt,variant:an,inputNumber:Ye,treeSelect:He};process.env.NODE_ENV!=="production"&&on("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Ue=Object.assign({},y);Object.keys(qe).forEach(nt=>{qe[nt]!==void 0&&(Ue[nt]=qe[nt])}),GP.forEach(nt=>{const dt=t[nt];dt&&(Ue[nt]=dt)}),typeof r<"u"&&(Ue.button=Object.assign({autoInsertSpace:r},Ue.button));const wt=Ms(()=>Ue,Ue,(nt,dt)=>{const kt=Object.keys(nt),$t=Object.keys(dt);return kt.length!==$t.length||kt.some(Gt=>nt[Gt]!==dt[Gt])}),{layer:Nt}=h.useContext(Is),et=h.useMemo(()=>({prefixCls:it,csp:pt,layer:Nt?"antd":void 0}),[it,pt,Nt]);let Ve=h.createElement(h.Fragment,null,h.createElement(qP,{dropdownMatchSelectWidth:p}),e);const ot=h.useMemo(()=>{var nt,dt,kt,$t;return Ji(((nt=$i.Form)===null||nt===void 0?void 0:nt.defaultValidateMessages)||{},((kt=(dt=wt.locale)===null||dt===void 0?void 0:dt.Form)===null||kt===void 0?void 0:kt.defaultValidateMessages)||{},(($t=wt.form)===null||$t===void 0?void 0:$t.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[wt,a==null?void 0:a.validateMessages]);Object.keys(ot).length>0&&(Ve=h.createElement(OT.Provider,{value:ot},Ve)),s&&(Ve=h.createElement(nS,{locale:s,_ANT_MARK__:tS},Ve)),Ve=h.createElement(tp.Provider,{value:et},Ve),l&&(Ve=h.createElement(YT,{size:l},Ve)),Ve=h.createElement(WP,null,Ve);const at=h.useMemo(()=>{const nt=Qe||{},{algorithm:dt,token:kt,components:$t,cssVar:Gt}=nt,It=KP(nt,["algorithm","token","components","cssVar"]),Bt=dt&&(!Array.isArray(dt)||dt.length>0)?uf(dt):aS,Ht={};Object.entries($t||{}).forEach(Mn=>{let[Yt,sn]=Mn;const ke=Object.assign({},sn);"algorithm"in ke&&(ke.algorithm===!0?ke.theme=Bt:(Array.isArray(ke.algorithm)||typeof ke.algorithm=="function")&&(ke.theme=uf(ke.algorithm)),delete ke.algorithm),Ht[Yt]=ke});const Xt=Object.assign(Object.assign({},vs),kt);return Object.assign(Object.assign({},It),{theme:Bt,token:Xt,components:Ht,override:Object.assign({override:Xt},Ht),cssVar:Gt})},[Qe]);return C&&(Ve=h.createElement(sS.Provider,{value:at},Ve)),wt.warning&&(Ve=h.createElement(QC.Provider,{value:wt.warning},Ve)),x!==void 0&&(Ve=h.createElement(lS,{disabled:x},Ve)),h.createElement(At.Provider,{value:wt},Ve)},ro=t=>{const e=h.useContext(At),n=h.useContext(rp);return h.createElement(ZP,Object.assign({parentContext:e,legacyLocale:n},t))};ro.ConfigContext=At;ro.SizeContext=va;ro.config=JP;ro.useConfig=JT;Object.defineProperty(ro,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Ti(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),va)});process.env.NODE_ENV!=="production"&&(ro.displayName="ConfigProvider");var eA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function TS(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function tA(t){return TS(t)instanceof ShadowRoot}function uc(t){return tA(t)?TS(t):null}function nA(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function rA(t,e){yt(t,"[@ant-design/icons] ".concat(e))}function tv(t){return st(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(st(t.icon)==="object"||typeof t.icon=="function")}function nv(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[nA(n)]=r}return e},{})}function kf(t,e,n){return n?$.createElement(t.tag,q(q({key:e},nv(t.attrs)),n),(t.children||[]).map(function(r,o){return kf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))})):$.createElement(t.tag,q({key:e},nv(t.attrs)),(t.children||[]).map(function(r,o){return kf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))}))}function PS(t){return bs(t)[0]}function AS(t){return t?Array.isArray(t)?t:[t]:[]}var oA=`
|
|
220
|
-
.anticon {
|
|
221
|
-
display: inline-flex;
|
|
222
|
-
align-items: center;
|
|
223
|
-
color: inherit;
|
|
224
|
-
font-style: normal;
|
|
225
|
-
line-height: 0;
|
|
226
|
-
text-align: center;
|
|
227
|
-
text-transform: none;
|
|
228
|
-
vertical-align: -0.125em;
|
|
229
|
-
text-rendering: optimizeLegibility;
|
|
230
|
-
-webkit-font-smoothing: antialiased;
|
|
231
|
-
-moz-osx-font-smoothing: grayscale;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.anticon > * {
|
|
235
|
-
line-height: 1;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.anticon svg {
|
|
239
|
-
display: inline-block;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.anticon::before {
|
|
243
|
-
display: none;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.anticon .anticon-icon {
|
|
247
|
-
display: block;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.anticon[tabindex] {
|
|
251
|
-
cursor: pointer;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.anticon-spin::before,
|
|
255
|
-
.anticon-spin {
|
|
256
|
-
display: inline-block;
|
|
257
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
258
|
-
animation: loadingCircle 1s infinite linear;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
@-webkit-keyframes loadingCircle {
|
|
262
|
-
100% {
|
|
263
|
-
-webkit-transform: rotate(360deg);
|
|
264
|
-
transform: rotate(360deg);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
@keyframes loadingCircle {
|
|
269
|
-
100% {
|
|
270
|
-
-webkit-transform: rotate(360deg);
|
|
271
|
-
transform: rotate(360deg);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
`,iA=function(e){var n=$.useContext(tp),r=n.csp,o=n.prefixCls,i=n.layer,a=oA;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` {
|
|
275
|
-
`).concat(a,`
|
|
276
|
-
}`)),$.useEffect(function(){var s=e.current,l=uc(s);go(a,"@ant-design-icons",{prepend:!i,csp:r,attachTo:l})},[])},aA=["icon","className","onClick","style","primaryColor","secondaryColor"],Za={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function sA(t){var e=t.primaryColor,n=t.secondaryColor;Za.primaryColor=e,Za.secondaryColor=n||PS(e),Za.calculated=!!n}function lA(){return q({},Za)}var Ea=function(e){var n=e.icon,r=e.className,o=e.onClick,i=e.style,a=e.primaryColor,s=e.secondaryColor,l=xt(e,aA),c=h.useRef(),u=Za;if(a&&(u={primaryColor:a,secondaryColor:s||PS(a)}),iA(c),rA(tv(n),"icon should be icon definiton, but got ".concat(n)),!tv(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=q(q({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),kf(d.icon,"svg-".concat(d.name),q(q({className:r,onClick:o,style:i,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};Ea.displayName="IconReact";Ea.getTwoToneColors=lA;Ea.setTwoToneColors=sA;function DS(t){var e=AS(t),n=ie(e,2),r=n[0],o=n[1];return Ea.setTwoToneColors({primaryColor:r,secondaryColor:o})}function cA(){var t=Ea.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var uA=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];DS(sc.primary);var An=h.forwardRef(function(t,e){var n=t.className,r=t.icon,o=t.spin,i=t.rotate,a=t.tabIndex,s=t.onClick,l=t.twoToneColor,c=xt(t,uA),u=h.useContext(tp),d=u.prefixCls,f=d===void 0?"anticon":d,p=u.rootClassName,m=ee(p,f,F(F({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!o||r.name==="loading"),n),v=a;v===void 0&&s&&(v=-1);var g=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,y=AS(l),b=ie(y,2),C=b[0],x=b[1];return h.createElement("span",De({role:"img","aria-label":r.name},c,{ref:e,tabIndex:v,onClick:s,className:m}),h.createElement(Ea,{icon:r,primaryColor:C,secondaryColor:x,style:g}))});An.displayName="AntdIcon";An.getTwoToneColor=cA;An.setTwoToneColor=DS;var dA=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:eA}))},kS=h.forwardRef(dA);process.env.NODE_ENV!=="production"&&(kS.displayName="CheckCircleFilled");var fA={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},hA=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:fA}))},qc=h.forwardRef(hA);process.env.NODE_ENV!=="production"&&(qc.displayName="CloseCircleFilled");var pA={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},mA=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:pA}))},Rs=h.forwardRef(mA);process.env.NODE_ENV!=="production"&&(Rs.displayName="CloseOutlined");var gA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},vA=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:gA}))},_S=h.forwardRef(vA);process.env.NODE_ENV!=="production"&&(_S.displayName="ExclamationCircleFilled");var bA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},yA=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:bA}))},BS=h.forwardRef(yA);process.env.NODE_ENV!=="production"&&(BS.displayName="InfoCircleFilled");var CA=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
277
|
-
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
278
|
-
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
279
|
-
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
280
|
-
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
281
|
-
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
282
|
-
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
283
|
-
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
284
|
-
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
285
|
-
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
286
|
-
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
287
|
-
summary tabIndex target title type useMap value width wmode wrap`,SA=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
288
|
-
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
289
|
-
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
290
|
-
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
291
|
-
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
292
|
-
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
293
|
-
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,xA="".concat(CA," ").concat(SA).split(/[\s\n]+/),wA="aria-",EA="data-";function rv(t,e){return t.indexOf(e)===0}function Zr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=q({},e);var r={};return Object.keys(t).forEach(function(o){(n.aria&&(o==="role"||rv(o,wA))||n.data&&rv(o,EA)||n.attr&&xA.includes(o))&&(r[o]=t[o])}),r}function zS(t){return t&&$.isValidElement(t)&&t.type===$.Fragment}const $A=(t,e,n)=>$.isValidElement(t)?$.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function Or(t,e){return $A(t,t,e)}const xo=t=>{const[,,,,e]=ar();return e?`${t}-css-var`:""};var Je={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},OA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},NA=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:OA}))},ap=h.forwardRef(NA);process.env.NODE_ENV!=="production"&&(ap.displayName="LoadingOutlined");const Ts=$.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ts.displayName="zIndexContext");const co=100,MA=10,jS=co*MA,IA=jS+co,LS={Modal:co,Drawer:co,Popover:co,Popconfirm:co,Tooltip:co,Tour:co,FloatButton:co},RA={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function TA(t){return t in LS}const Ps=(t,e)=>{const[,n]=ar(),r=$.useContext(Ts),o=TA(t);let i;if(e!==void 0)i=[e,e];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+LS[t]:a+=RA[t],i=[r===void 0?e:a,a]}if(process.env.NODE_ENV!=="production"){const a=on(t),s=n.zIndexPopupBase+IA,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(e!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i};function PA(){const[t,e]=h.useState([]),n=h.useCallback(r=>(e(o=>[].concat(Re(o),[r])),()=>{e(o=>o.filter(i=>i!==r))}),[]);return[t,n]}function rr(){rr=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(A,T,_){A[T]=_.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(A,T,_){return Object.defineProperty(A,T,{value:_,enumerable:!0,configurable:!0,writable:!0}),A[T]}try{c({},"")}catch{c=function(_,W,L){return _[W]=L}}function u(A,T,_,W){var L=T&&T.prototype instanceof y?T:y,V=Object.create(L.prototype),U=new P(W||[]);return o(V,"_invoke",{value:M(A,_,U)}),V}function d(A,T,_){try{return{type:"normal",arg:A.call(T,_)}}catch(W){return{type:"throw",arg:W}}}e.wrap=u;var f="suspendedStart",p="suspendedYield",m="executing",v="completed",g={};function y(){}function b(){}function C(){}var x={};c(x,a,function(){return this});var S=Object.getPrototypeOf,w=S&&S(S(j([])));w&&w!==n&&r.call(w,a)&&(x=w);var E=C.prototype=y.prototype=Object.create(x);function N(A){["next","throw","return"].forEach(function(T){c(A,T,function(_){return this._invoke(T,_)})})}function O(A,T){function _(L,V,U,Y){var H=d(A[L],A,V);if(H.type!=="throw"){var G=H.arg,J=G.value;return J&&st(J)=="object"&&r.call(J,"__await")?T.resolve(J.__await).then(function(se){_("next",se,U,Y)},function(se){_("throw",se,U,Y)}):T.resolve(J).then(function(se){G.value=se,U(G)},function(se){return _("throw",se,U,Y)})}Y(H.arg)}var W;o(this,"_invoke",{value:function(V,U){function Y(){return new T(function(H,G){_(V,U,H,G)})}return W=W?W.then(Y,Y):Y()}})}function M(A,T,_){var W=f;return function(L,V){if(W===m)throw Error("Generator is already running");if(W===v){if(L==="throw")throw V;return{value:t,done:!0}}for(_.method=L,_.arg=V;;){var U=_.delegate;if(U){var Y=I(U,_);if(Y){if(Y===g)continue;return Y}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(W===f)throw W=v,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);W=m;var H=d(A,T,_);if(H.type==="normal"){if(W=_.done?v:p,H.arg===g)continue;return{value:H.arg,done:_.done}}H.type==="throw"&&(W=v,_.method="throw",_.arg=H.arg)}}}function I(A,T){var _=T.method,W=A.iterator[_];if(W===t)return T.delegate=null,_==="throw"&&A.iterator.return&&(T.method="return",T.arg=t,I(A,T),T.method==="throw")||_!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+_+"' method")),g;var L=d(W,A.iterator,T.arg);if(L.type==="throw")return T.method="throw",T.arg=L.arg,T.delegate=null,g;var V=L.arg;return V?V.done?(T[A.resultName]=V.value,T.next=A.nextLoc,T.method!=="return"&&(T.method="next",T.arg=t),T.delegate=null,g):V:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,g)}function D(A){var T={tryLoc:A[0]};1 in A&&(T.catchLoc=A[1]),2 in A&&(T.finallyLoc=A[2],T.afterLoc=A[3]),this.tryEntries.push(T)}function k(A){var T=A.completion||{};T.type="normal",delete T.arg,A.completion=T}function P(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(D,this),this.reset(!0)}function j(A){if(A||A===""){var T=A[a];if(T)return T.call(A);if(typeof A.next=="function")return A;if(!isNaN(A.length)){var _=-1,W=function L(){for(;++_<A.length;)if(r.call(A,_))return L.value=A[_],L.done=!1,L;return L.value=t,L.done=!0,L};return W.next=W}}throw new TypeError(st(A)+" is not iterable")}return b.prototype=C,o(E,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:b,configurable:!0}),b.displayName=c(C,l,"GeneratorFunction"),e.isGeneratorFunction=function(A){var T=typeof A=="function"&&A.constructor;return!!T&&(T===b||(T.displayName||T.name)==="GeneratorFunction")},e.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,C):(A.__proto__=C,c(A,l,"GeneratorFunction")),A.prototype=Object.create(E),A},e.awrap=function(A){return{__await:A}},N(O.prototype),c(O.prototype,s,function(){return this}),e.AsyncIterator=O,e.async=function(A,T,_,W,L){L===void 0&&(L=Promise);var V=new O(u(A,T,_,W),L);return e.isGeneratorFunction(T)?V:V.next().then(function(U){return U.done?U.value:V.next()})},N(E),c(E,l,"Generator"),c(E,a,function(){return this}),c(E,"toString",function(){return"[object Generator]"}),e.keys=function(A){var T=Object(A),_=[];for(var W in T)_.push(W);return _.reverse(),function L(){for(;_.length;){var V=_.pop();if(V in T)return L.value=V,L.done=!1,L}return L.done=!0,L}},e.values=j,P.prototype={constructor:P,reset:function(T){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!T)for(var _ in this)_.charAt(0)==="t"&&r.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var T=this.tryEntries[0].completion;if(T.type==="throw")throw T.arg;return this.rval},dispatchException:function(T){if(this.done)throw T;var _=this;function W(G,J){return U.type="throw",U.arg=T,_.next=G,J&&(_.method="next",_.arg=t),!!J}for(var L=this.tryEntries.length-1;L>=0;--L){var V=this.tryEntries[L],U=V.completion;if(V.tryLoc==="root")return W("end");if(V.tryLoc<=this.prev){var Y=r.call(V,"catchLoc"),H=r.call(V,"finallyLoc");if(Y&&H){if(this.prev<V.catchLoc)return W(V.catchLoc,!0);if(this.prev<V.finallyLoc)return W(V.finallyLoc)}else if(Y){if(this.prev<V.catchLoc)return W(V.catchLoc,!0)}else{if(!H)throw Error("try statement without catch or finally");if(this.prev<V.finallyLoc)return W(V.finallyLoc)}}}},abrupt:function(T,_){for(var W=this.tryEntries.length-1;W>=0;--W){var L=this.tryEntries[W];if(L.tryLoc<=this.prev&&r.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var V=L;break}}V&&(T==="break"||T==="continue")&&V.tryLoc<=_&&_<=V.finallyLoc&&(V=null);var U=V?V.completion:{};return U.type=T,U.arg=_,V?(this.method="next",this.next=V.finallyLoc,g):this.complete(U)},complete:function(T,_){if(T.type==="throw")throw T.arg;return T.type==="break"||T.type==="continue"?this.next=T.arg:T.type==="return"?(this.rval=this.arg=T.arg,this.method="return",this.next="end"):T.type==="normal"&&_&&(this.next=_),g},finish:function(T){for(var _=this.tryEntries.length-1;_>=0;--_){var W=this.tryEntries[_];if(W.finallyLoc===T)return this.complete(W.completion,W.afterLoc),k(W),g}},catch:function(T){for(var _=this.tryEntries.length-1;_>=0;--_){var W=this.tryEntries[_];if(W.tryLoc===T){var L=W.completion;if(L.type==="throw"){var V=L.arg;k(W)}return V}}throw Error("illegal catch attempt")},delegateYield:function(T,_,W){return this.delegate={iterator:j(T),resultName:_,nextLoc:W},this.method==="next"&&(this.arg=t),g}},e}function ov(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,o)}function Ai(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(l){ov(i,r,o,a,s,"next",l)}function s(l){ov(i,r,o,a,s,"throw",l)}a(void 0)})}}var As=q({},S0),AA=As.version,nd=As.render,DA=As.unmountComponentAtNode,Kc;try{var kA=Number((AA||"").split(".")[0]);kA>=18&&(Kc=As.createRoot)}catch{}function iv(t){var e=As.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&st(e)==="object"&&(e.usingClientEntryPoint=t)}var dc="__rc_react_root__";function _A(t,e){iv(!0);var n=e[dc]||Kc(e);iv(!1),n.render(t),e[dc]=n}function BA(t,e){nd==null||nd(t,e)}function zA(t,e){if(Kc){_A(t,e);return}BA(t,e)}function jA(t){return _f.apply(this,arguments)}function _f(){return _f=Ai(rr().mark(function t(e){return rr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var o;(o=e[dc])===null||o===void 0||o.unmount(),delete e[dc]}));case 1:case"end":return r.stop()}},t)})),_f.apply(this,arguments)}function LA(t){DA(t)}function FA(t){return Bf.apply(this,arguments)}function Bf(){return Bf=Ai(rr().mark(function t(e){return rr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Kc===void 0){r.next=2;break}return r.abrupt("return",jA(e));case 2:LA(e);case 3:case"end":return r.stop()}},t)})),Bf.apply(this,arguments)}const HA=(t,e)=>{if(process.env.NODE_ENV!=="production"){const n=parseInt(h.version.split(".")[0],10),r=Object.keys(S0);process.env.NODE_ENV!=="production"&&Ti(n<19||r.includes("createRoot"),"compatible","antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.")}return zA(t,e),()=>FA(e)};let VA=HA;function FS(){return VA}const rd=()=>({height:0,opacity:0}),av=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},WA=t=>({height:t?t.offsetHeight:0}),od=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",HS=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:ys}-motion-collapse`,onAppearStart:rd,onEnterStart:rd,onAppearActive:av,onEnterActive:av,onLeaveStart:WA,onLeaveActive:rd,onAppearEnd:od,onEnterEnd:od,onLeaveEnd:od,motionDeadline:500}},Oi=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function Tn(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const sp=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var o=t.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1},qA=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},KA=gP("Wave",t=>[qA(t)]),VS=`${ys}-wave-target`;function id(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function UA(t){const{borderTopColor:e,borderColor:n,backgroundColor:r}=getComputedStyle(t);return id(e)?e:id(n)?n:id(r)?r:null}function ad(t){return Number.isNaN(t)?0:t}const GA=t=>{const{className:e,target:n,component:r,registerUnmount:o}=t,i=h.useRef(null),a=h.useRef(null);h.useEffect(()=>{a.current=o()},[]);const[s,l]=h.useState(null),[c,u]=h.useState([]),[d,f]=h.useState(0),[p,m]=h.useState(0),[v,g]=h.useState(0),[y,b]=h.useState(0),[C,x]=h.useState(!1),S={left:d,top:p,width:v,height:y,borderRadius:c.map(N=>`${N}px`).join(" ")};s&&(S["--wave-color"]=s);function w(){const N=getComputedStyle(n);l(UA(n));const O=N.position==="static",{borderLeftWidth:M,borderTopWidth:I}=N;f(O?n.offsetLeft:ad(-parseFloat(M))),m(O?n.offsetTop:ad(-parseFloat(I))),g(n.offsetWidth),b(n.offsetHeight);const{borderTopLeftRadius:D,borderTopRightRadius:k,borderBottomLeftRadius:P,borderBottomRightRadius:j}=N;u([D,k,j,P].map(A=>ad(parseFloat(A))))}if(h.useEffect(()=>{if(n){const N=Dt(()=>{w(),x(!0)});let O;return typeof ResizeObserver<"u"&&(O=new ResizeObserver(w),O.observe(n)),()=>{Dt.cancel(N),O==null||O.disconnect()}}},[]),!C)return null;const E=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(VS));return h.createElement(no,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,O)=>{var M,I;if(O.deadline||O.propertyName==="opacity"){const D=(M=i.current)===null||M===void 0?void 0:M.parentElement;(I=a.current)===null||I===void 0||I.call(a).then(()=>{D==null||D.remove()})}return!1}},(N,O)=>{let{className:M}=N;return h.createElement("div",{ref:ir(i,O),className:ee(e,M,{"wave-quick":E}),style:S})})},XA=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",t==null||t.insertBefore(o,t==null?void 0:t.firstChild);const i=FS();let a=null;function s(){return a}a=i(h.createElement(GA,Object.assign({},e,{target:t,registerUnmount:s})),o)},YA=(t,e,n)=>{const{wave:r}=h.useContext(At),[,o,i]=ar(),a=Wt(c=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${VS}`)||u,{showEffect:f}=r||{};(f||XA)(d,{className:e,token:o,component:n,event:c,hashId:i})}),s=h.useRef(null);return c=>{Dt.cancel(s.current),s.current=Dt(()=>{a(c)})}},WS=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:o}=$.useContext(At),i=$.useRef(null),a=o("wave"),[,s]=KA(a),l=YA(i,ee(a,s),r);if($.useEffect(()=>{const u=i.current;if(!u||u.nodeType!==1||n)return;const d=f=>{!sp(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!$.isValidElement(e))return e??null;const c=Qo(e)?ir(Ri(e),i):i;return Or(e,{ref:c})};process.env.NODE_ENV!=="production"&&(WS.displayName="Wave");const Fr=t=>{const e=$.useContext(va);return $.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},JA=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},QA=t=>{const{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},ZA=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},qS=hn("Space",t=>{const e=Lt(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[QA(e),ZA(e),JA(e)]},()=>({}),{resetStyle:!1});var KS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Uc=h.createContext(null),Zo=(t,e)=>{const n=h.useContext(Uc),r=h.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return ee(`${t}-compact${s}item`,{[`${t}-compact${s}first-item`]:i,[`${t}-compact${s}last-item`]:a,[`${t}-compact${s}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},eD=t=>{const{children:e}=t;return h.createElement(Uc.Provider,{value:null},e)},tD=t=>{const{children:e}=t,n=KS(t,["children"]);return h.createElement(Uc.Provider,{value:h.useMemo(()=>n,[n])},e)},nD=t=>{const{getPrefixCls:e,direction:n}=h.useContext(At),{size:r,direction:o,block:i,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=KS(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Fr(C=>r??C),f=e("space-compact",a),[p,m]=qS(f),v=ee(f,m,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:i,[`${f}-vertical`]:o==="vertical"},s,l),g=h.useContext(Uc),y=gr(c),b=h.useMemo(()=>y.map((C,x)=>{const S=(C==null?void 0:C.key)||`${f}-item-${x}`;return h.createElement(tD,{key:S,compactSize:d,compactDirection:o,isFirstItem:x===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:x===y.length-1&&(!g||(g==null?void 0:g.isLastItem))},C)}),[r,y,g]);return y.length===0?null:p(h.createElement("div",Object.assign({className:v},u),b))};var rD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const US=h.createContext(void 0),oD=t=>{const{getPrefixCls:e,direction:n}=h.useContext(At),{prefixCls:r,size:o,className:i}=t,a=rD(t,["prefixCls","size","className"]),s=e("btn-group",r),[,,l]=ar(),c=h.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=on("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!o||["large","small","middle"].includes(o),"usage","Invalid prop `size`.")}const u=ee(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return h.createElement(US.Provider,{value:o},h.createElement("div",Object.assign({},a,{className:u})))},sv=/^[\u4E00-\u9FA5]{2}$/,zf=sv.test.bind(sv);function GS(t){return t==="danger"?{danger:!0}:{type:t}}function lv(t){return typeof t=="string"}function hl(t){return t==="text"||t==="link"}function iD(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&lv(t.type)&&zf(t.props.children)?Or(t,{children:t.props.children.split("").join(n)}):lv(t)?zf(t)?$.createElement("span",null,t.split("").join(n)):$.createElement("span",null,t):zS(t)?$.createElement("span",null,t):t}function aD(t,e){let n=!1;const r=[];return $.Children.forEach(t,o=>{const i=typeof o,a=i==="string"||i==="number";if(n&&a){const s=r.length-1,l=r[s];r[s]=`${l}${o}`}else r.push(o);n=a}),$.Children.map(r,o=>iD(o,e))}["default","primary","danger"].concat(Re(Wo));const jf=$.forwardRef((t,e)=>{const{className:n,style:r,children:o,prefixCls:i}=t,a=ee(`${i}-icon`,n);return $.createElement("span",{ref:e,className:a,style:r},o)}),cv=$.forwardRef((t,e)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=t,a=ee(`${n}-loading-icon`,r);return $.createElement(jf,{prefixCls:n,className:a,style:o,ref:e},$.createElement(ap,{className:i}))}),sd=()=>({width:0,opacity:0,transform:"scale(0)"}),ld=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),sD=t=>{const{prefixCls:e,loading:n,existIcon:r,className:o,style:i,mount:a}=t,s=!!n;return r?$.createElement(cv,{prefixCls:e,className:o,style:i}):$.createElement(no,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:sd,onAppearActive:ld,onEnterStart:sd,onEnterActive:ld,onLeaveStart:ld,onLeaveActive:sd},(l,c)=>{let{className:u,style:d}=l;const f=Object.assign(Object.assign({},i),d);return $.createElement(cv,{prefixCls:e,className:ee(o,u),style:f,ref:c})})},uv=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),lD=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},uv(`${e}-primary`,o),uv(`${e}-danger`,i)]}};var cD=["b"],uD=["v"],cd=function(e){return Math.round(Number(e||0))},dD=function(e){if(e instanceof Vt)return e;if(e&&st(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,o=xt(n,cD);return q(q({},o),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},jr=function(t){bo(n,t);var e=yo(n);function n(r){return xn(this,n),e.call(this,dD(r))}return wn(n,[{key:"toHsbString",value:function(){var o=this.toHsb(),i=cd(o.s*100),a=cd(o.b*100),s=cd(o.h),l=o.a,c="hsb(".concat(s,", ").concat(i,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(i,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var o=this.toHsv(),i=o.v,a=xt(o,uD);return q(q({},a),{},{b:i,a:this.a})}}]),n}(Vt),fD="rc-color-picker",ra=function(e){return e instanceof jr?e:new jr(e)},hD=ra("#1677ff"),XS=function(e){var n=e.offset,r=e.targetRef,o=e.containerRef,i=e.color,a=e.type,s=o.current.getBoundingClientRect(),l=s.width,c=s.height,u=r.current.getBoundingClientRect(),d=u.width,f=u.height,p=d/2,m=f/2,v=(n.x+p)/l,g=1-(n.y+m)/c,y=i.toHsb(),b=v,C=(n.x+p)/l*360;if(a)switch(a){case"hue":return ra(q(q({},y),{},{h:C<=0?0:C}));case"alpha":return ra(q(q({},y),{},{a:b<=0?0:b}))}return ra({h:y.h,s:v<=0?0:v,b:g>=1?1:g,a:y.a})},YS=function(e,n){var r=e.toHsb();switch(n){case"hue":return{x:r.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:r.s*100,y:(1-r.b)*100}}},lp=function(e){var n=e.color,r=e.prefixCls,o=e.className,i=e.style,a=e.onClick,s="".concat(r,"-color-block");return $.createElement("div",{className:ee(s,o),style:i,onClick:a},$.createElement("div",{className:"".concat(s,"-inner"),style:{background:n}}))};function pD(t){var e="touches"in t?t.touches[0]:t,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-n,pageY:e.pageY-r}}function JS(t){var e=t.targetRef,n=t.containerRef,r=t.direction,o=t.onDragChange,i=t.onDragChangeComplete,a=t.calculate,s=t.color,l=t.disabledDrag,c=$.useState({x:0,y:0}),u=ie(c,2),d=u[0],f=u[1],p=$.useRef(null),m=$.useRef(null);$.useEffect(function(){f(a())},[s]),$.useEffect(function(){return function(){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",m.current),p.current=null,m.current=null}},[]);var v=function(x){var S=pD(x),w=S.pageX,E=S.pageY,N=n.current.getBoundingClientRect(),O=N.x,M=N.y,I=N.width,D=N.height,k=e.current.getBoundingClientRect(),P=k.width,j=k.height,A=P/2,T=j/2,_=Math.max(0,Math.min(w-O,I))-A,W=Math.max(0,Math.min(E-M,D))-T,L={x:_,y:r==="x"?d.y:W};if(P===0&&j===0||P!==j)return!1;o==null||o(L)},g=function(x){x.preventDefault(),v(x)},y=function(x){x.preventDefault(),document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",m.current),p.current=null,m.current=null,i==null||i()},b=function(x){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",m.current),!l&&(v(x),document.addEventListener("mousemove",g),document.addEventListener("mouseup",y),document.addEventListener("touchmove",g),document.addEventListener("touchend",y),p.current=g,m.current=y)};return[d,b]}var QS=function(e){var n=e.size,r=n===void 0?"default":n,o=e.color,i=e.prefixCls;return $.createElement("div",{className:ee("".concat(i,"-handler"),F({},"".concat(i,"-handler-sm"),r==="small")),style:{backgroundColor:o}})},ZS=function(e){var n=e.children,r=e.style,o=e.prefixCls;return $.createElement("div",{className:"".concat(o,"-palette"),style:q({position:"relative"},r)},n)},ex=$.forwardRef(function(t,e){var n=t.children,r=t.x,o=t.y;return $.createElement("div",{ref:e,style:{position:"absolute",left:"".concat(r,"%"),top:"".concat(o,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),mD=function(e){var n=e.color,r=e.onChange,o=e.prefixCls,i=e.onChangeComplete,a=e.disabled,s=$.useRef(),l=$.useRef(),c=$.useRef(n),u=Wt(function(v){var g=XS({offset:v,targetRef:l,containerRef:s,color:n});c.current=g,r(g)}),d=JS({color:n,containerRef:s,targetRef:l,calculate:function(){return YS(n)},onDragChange:u,onDragChangeComplete:function(){return i==null?void 0:i(c.current)},disabledDrag:a}),f=ie(d,2),p=f[0],m=f[1];return $.createElement("div",{ref:s,className:"".concat(o,"-select"),onMouseDown:m,onTouchStart:m},$.createElement(ZS,{prefixCls:o},$.createElement(ex,{x:p.x,y:p.y,ref:l},$.createElement(QS,{color:n.toRgbString(),prefixCls:o})),$.createElement("div",{className:"".concat(o,"-saturation"),style:{backgroundColor:"hsl(".concat(n.toHsb().h,",100%, 50%)"),backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},gD=function(e,n){var r=mn(e,{value:n}),o=ie(r,2),i=o[0],a=o[1],s=$.useMemo(function(){return ra(i)},[i]);return[s,a]},vD=function(e){var n=e.colors,r=e.children,o=e.direction,i=o===void 0?"to right":o,a=e.type,s=e.prefixCls,l=$.useMemo(function(){return n.map(function(c,u){var d=ra(c);return a==="alpha"&&u===n.length-1&&(d=new jr(d.setA(1))),d.toRgbString()}).join(",")},[n,a]);return $.createElement("div",{className:"".concat(s,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(i,", ").concat(l,")")}},r)},bD=function(e){var n=e.prefixCls,r=e.colors,o=e.disabled,i=e.onChange,a=e.onChangeComplete,s=e.color,l=e.type,c=$.useRef(),u=$.useRef(),d=$.useRef(s),f=function(S){return l==="hue"?S.getHue():S.a*100},p=Wt(function(x){var S=XS({offset:x,targetRef:u,containerRef:c,color:s,type:l});d.current=S,i(f(S))}),m=JS({color:s,targetRef:u,containerRef:c,calculate:function(){return YS(s,l)},onDragChange:p,onDragChangeComplete:function(){a(f(d.current))},direction:"x",disabledDrag:o}),v=ie(m,2),g=v[0],y=v[1],b=$.useMemo(function(){if(l==="hue"){var x=s.toHsb();x.s=1,x.b=1,x.a=1;var S=new jr(x);return S}return s},[s,l]),C=$.useMemo(function(){return r.map(function(x){return"".concat(x.color," ").concat(x.percent,"%")})},[r]);return $.createElement("div",{ref:c,className:ee("".concat(n,"-slider"),"".concat(n,"-slider-").concat(l)),onMouseDown:y,onTouchStart:y},$.createElement(ZS,{prefixCls:n},$.createElement(ex,{x:g.x,y:g.y,ref:u},$.createElement(QS,{size:"small",color:b.toHexString(),prefixCls:n})),$.createElement(vD,{colors:C,type:l,prefixCls:n})))};function yD(t){return h.useMemo(function(){var e=t||{},n=e.slider;return[n||bD]},[t])}var CD=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],tx=$.forwardRef(function(t,e){var n=t.value,r=t.defaultValue,o=t.prefixCls,i=o===void 0?fD:o,a=t.onChange,s=t.onChangeComplete,l=t.className,c=t.style,u=t.panelRender,d=t.disabledAlpha,f=d===void 0?!1:d,p=t.disabled,m=p===void 0?!1:p,v=t.components,g=yD(v),y=ie(g,1),b=y[0],C=gD(r||hD,n),x=ie(C,2),S=x[0],w=x[1],E=$.useMemo(function(){return S.setA(1).toRgbString()},[S]),N=function(W,L){n||w(W),a==null||a(W,L)},O=function(W){return new jr(S.setHue(W))},M=function(W){return new jr(S.setA(W/100))},I=function(W){N(O(W),{type:"hue",value:W})},D=function(W){N(M(W),{type:"alpha",value:W})},k=function(W){s&&s(O(W))},P=function(W){s&&s(M(W))},j=ee("".concat(i,"-panel"),l,F({},"".concat(i,"-panel-disabled"),m)),A={prefixCls:i,disabled:m,color:S},T=$.createElement($.Fragment,null,$.createElement(mD,De({onChange:N},A,{onChangeComplete:s})),$.createElement("div",{className:"".concat(i,"-slider-container")},$.createElement("div",{className:ee("".concat(i,"-slider-group"),F({},"".concat(i,"-slider-group-disabled-alpha"),f))},$.createElement(b,De({},A,{type:"hue",colors:CD,min:0,max:359,value:S.getHue(),onChange:I,onChangeComplete:k})),!f&&$.createElement(b,De({},A,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:E}],min:0,max:100,value:S.a*100,onChange:D,onChangeComplete:P}))),$.createElement(lp,{color:S.toRgbString(),prefixCls:i})));return $.createElement("div",{className:j,style:c,ref:e},typeof u=="function"?u(T):T)});process.env.NODE_ENV!=="production"&&(tx.displayName="ColorPicker");const qa=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",SD=(t,e)=>t?qa(t,e):"";let hr=function(){function t(e){xn(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(o=>({color:new t(o.color),percent:o.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(o=>{let{color:i,percent:a}=o;return{color:new t(i),percent:a}}),this.metaColor=new jr(this.colors[0].color.metaColor)):this.metaColor=new jr(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return wn(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return SD(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])}();var xD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},wD=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:xD}))},Ss=h.forwardRef(wD);process.env.NODE_ENV!=="production"&&(Ss.displayName="RightOutlined");var nx=$.forwardRef(function(t,e){var n=t.prefixCls,r=t.forceRender,o=t.className,i=t.style,a=t.children,s=t.isActive,l=t.role,c=t.classNames,u=t.styles,d=$.useState(s||r),f=ie(d,2),p=f[0],m=f[1];return $.useEffect(function(){(r||s)&&m(!0)},[r,s]),p?$.createElement("div",{ref:e,className:ee("".concat(n,"-content"),F(F({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),o),style:i,role:l},$.createElement("div",{className:ee("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});nx.displayName="PanelContent";var ED=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],rx=$.forwardRef(function(t,e){var n=t.showArrow,r=n===void 0?!0:n,o=t.headerClass,i=t.isActive,a=t.onItemClick,s=t.forceRender,l=t.className,c=t.classNames,u=c===void 0?{}:c,d=t.styles,f=d===void 0?{}:d,p=t.prefixCls,m=t.collapsible,v=t.accordion,g=t.panelKey,y=t.extra,b=t.header,C=t.expandIcon,x=t.openMotion,S=t.destroyInactivePanel,w=t.children,E=xt(t,ED),N=m==="disabled",O=y!=null&&typeof y!="boolean",M=F(F(F({onClick:function(){a==null||a(g)},onKeyDown:function(T){(T.key==="Enter"||T.keyCode===Je.ENTER||T.which===Je.ENTER)&&(a==null||a(g))},role:v?"tab":"button"},"aria-expanded",i),"aria-disabled",N),"tabIndex",N?-1:0),I=typeof C=="function"?C(t):$.createElement("i",{className:"arrow"}),D=I&&$.createElement("div",De({className:"".concat(p,"-expand-icon")},["header","icon"].includes(m)?M:{}),I),k=ee("".concat(p,"-item"),F(F({},"".concat(p,"-item-active"),i),"".concat(p,"-item-disabled"),N),l),P=ee(o,"".concat(p,"-header"),F({},"".concat(p,"-collapsible-").concat(m),!!m),u.header),j=q({className:P,style:f.header},["header","icon"].includes(m)?{}:M);return $.createElement("div",De({},E,{ref:e,className:k}),$.createElement("div",j,r&&D,$.createElement("span",De({className:"".concat(p,"-header-text")},m==="header"?M:{}),b),O&&$.createElement("div",{className:"".concat(p,"-extra")},y)),$.createElement(no,De({visible:i,leavedClassName:"".concat(p,"-content-hidden")},x,{forceRender:s,removeOnLeave:S}),function(A,T){var _=A.className,W=A.style;return $.createElement(nx,{ref:T,prefixCls:p,className:_,classNames:u,style:W,styles:f,isActive:i,forceRender:s,role:v?"tabpanel":void 0},w)}))}),$D=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],OD=function(e,n){var r=n.prefixCls,o=n.accordion,i=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return e.map(function(d,f){var p=d.children,m=d.label,v=d.key,g=d.collapsible,y=d.onItemClick,b=d.destroyInactivePanel,C=xt(d,$D),x=String(v??f),S=g??i,w=b??a,E=function(M){S!=="disabled"&&(s(M),y==null||y(M))},N=!1;return o?N=l[0]===x:N=l.indexOf(x)>-1,$.createElement(rx,De({},C,{prefixCls:r,key:x,panelKey:x,isActive:N,accordion:o,openMotion:c,expandIcon:u,header:m,collapsible:S,onItemClick:E,destroyInactivePanel:w}),p)})},ND=function(e,n,r){if(!e)return null;var o=r.prefixCls,i=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,l=r.onItemClick,c=r.activeKey,u=r.openMotion,d=r.expandIcon,f=e.key||String(n),p=e.props,m=p.header,v=p.headerClass,g=p.destroyInactivePanel,y=p.collapsible,b=p.onItemClick,C=!1;i?C=c[0]===f:C=c.indexOf(f)>-1;var x=y??a,S=function(N){x!=="disabled"&&(l(N),b==null||b(N))},w={key:f,panelKey:f,header:m,headerClass:v,isActive:C,prefixCls:o,destroyInactivePanel:g??s,openMotion:u,accordion:i,children:e.props.children,onItemClick:S,expandIcon:d,collapsible:x};return typeof e.type=="string"?e:(Object.keys(w).forEach(function(E){typeof w[E]>"u"&&delete w[E]}),$.cloneElement(e,w))};function MD(t,e,n){return Array.isArray(t)?OD(t,n):gr(e).map(function(r,o){return ND(r,o,n)})}function ID(t){var e=t;if(!Array.isArray(e)){var n=st(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(r){return String(r)})}var RD=$.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-collapse":n,o=t.destroyInactivePanel,i=o===void 0?!1:o,a=t.style,s=t.accordion,l=t.className,c=t.children,u=t.collapsible,d=t.openMotion,f=t.expandIcon,p=t.activeKey,m=t.defaultActiveKey,v=t.onChange,g=t.items,y=ee(r,l),b=mn([],{value:p,onChange:function(O){return v==null?void 0:v(O)},defaultValue:m,postState:ID}),C=ie(b,2),x=C[0],S=C[1],w=function(O){return S(function(){if(s)return x[0]===O?[]:[O];var M=x.indexOf(O),I=M>-1;return I?x.filter(function(D){return D!==O}):[].concat(Re(x),[O])})};yt(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var E=MD(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:i,onItemClick:w,activeKey:x});return $.createElement("div",De({ref:e,className:y,style:a,role:s?"tablist":void 0},Zr(t,{aria:!0,data:!0})),E)});const cp=Object.assign(RD,{Panel:rx});cp.Panel;const TD=h.forwardRef((t,e)=>{process.env.NODE_ENV!=="production"&&on("Collapse.Panel").deprecated(!("disabled"in t),"disabled",'collapsible="disabled"');const{getPrefixCls:n}=h.useContext(At),{prefixCls:r,className:o,showArrow:i=!0}=t,a=n("collapse",r),s=ee({[`${a}-no-arrow`]:!i},o);return h.createElement(cp.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))}),ox=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
|
|
294
|
-
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
|
|
295
|
-
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),PD=t=>({animationDuration:t,animationFillMode:"both"}),AD=t=>({animationDuration:t,animationFillMode:"both"}),Gc=function(t,e,n,r){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
|
|
296
|
-
${i}${t}-enter,
|
|
297
|
-
${i}${t}-appear
|
|
298
|
-
`]:Object.assign(Object.assign({},PD(r)),{animationPlayState:"paused"}),[`${i}${t}-leave`]:Object.assign(Object.assign({},AD(r)),{animationPlayState:"paused"}),[`
|
|
299
|
-
${i}${t}-enter${t}-enter-active,
|
|
300
|
-
${i}${t}-appear${t}-appear-active
|
|
301
|
-
`]:{animationName:e,animationPlayState:"running"},[`${i}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},DD=new qt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),kD=new qt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),_D=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=t,r=`${n}-fade`,o=e?"&":"";return[Gc(r,DD,kD,t.motionDurationMid,e),{[`
|
|
302
|
-
${o}${r}-enter,
|
|
303
|
-
${o}${r}-appear
|
|
304
|
-
`]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},BD=new qt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),zD=new qt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),jD=new qt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),LD=new qt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),FD=new qt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),HD=new qt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),VD=new qt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),WD=new qt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),qD={"move-up":{inKeyframes:VD,outKeyframes:WD},"move-down":{inKeyframes:BD,outKeyframes:zD},"move-left":{inKeyframes:jD,outKeyframes:LD},"move-right":{inKeyframes:FD,outKeyframes:HD}},fc=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=qD[e];return[Gc(r,o,i,t.motionDurationMid),{[`
|
|
305
|
-
${r}-enter,
|
|
306
|
-
${r}-appear
|
|
307
|
-
`]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},up=new qt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),dp=new qt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),fp=new qt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),hp=new qt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),KD=new qt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),UD=new qt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),GD=new qt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),XD=new qt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),YD={"slide-up":{inKeyframes:up,outKeyframes:dp},"slide-down":{inKeyframes:fp,outKeyframes:hp},"slide-left":{inKeyframes:KD,outKeyframes:UD},"slide-right":{inKeyframes:GD,outKeyframes:XD}},Ca=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=YD[e];return[Gc(r,o,i,t.motionDurationMid),{[`
|
|
308
|
-
${r}-enter,
|
|
309
|
-
${r}-appear
|
|
310
|
-
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},JD=new qt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),QD=new qt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),dv=new qt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),fv=new qt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),ZD=new qt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),ek=new qt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),tk=new qt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),nk=new qt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),rk=new qt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),ok=new qt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),ik=new qt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),ak=new qt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),sk={zoom:{inKeyframes:JD,outKeyframes:QD},"zoom-big":{inKeyframes:dv,outKeyframes:fv},"zoom-big-fast":{inKeyframes:dv,outKeyframes:fv},"zoom-left":{inKeyframes:tk,outKeyframes:nk},"zoom-right":{inKeyframes:rk,outKeyframes:ok},"zoom-up":{inKeyframes:ZD,outKeyframes:ek},"zoom-down":{inKeyframes:ik,outKeyframes:ak}},Ds=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=sk[e];return[Gc(r,o,i,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[`
|
|
311
|
-
${r}-enter,
|
|
312
|
-
${r}-appear
|
|
313
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},lk=t=>{const{componentCls:e,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:p,colorTextDisabled:m,fontSizeLG:v,lineHeight:g,lineHeightLG:y,marginSM:b,paddingSM:C,paddingLG:x,paddingXS:S,motionDurationSlow:w,fontSizeIcon:E,contentPadding:N,fontHeight:O,fontHeightLG:M}=t,I=`${re(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},Hn(t)),{backgroundColor:o,border:I,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:I,"&:first-child":{[`
|
|
314
|
-
&,
|
|
315
|
-
& > ${e}-header`]:{borderRadius:`${re(l)} ${re(l)} 0 0`}},"&:last-child":{[`
|
|
316
|
-
&,
|
|
317
|
-
& > ${e}-header`]:{borderRadius:`0 0 ${re(l)} ${re(l)}`}},[`> ${e}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:p,lineHeight:g,cursor:"pointer",transition:`all ${w}, visibility 0s`},ya(t)),{[`> ${e}-header-text`]:{flex:"auto"},[`${e}-expand-icon`]:{height:O,display:"flex",alignItems:"center",paddingInlineEnd:b},[`${e}-arrow`]:Object.assign(Object.assign({},Pi()),{fontSize:E,transition:`transform ${w}`,svg:{transition:`transform ${w}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}}),[`${e}-collapsible-header`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"}},[`${e}-collapsible-icon`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:f,backgroundColor:n,borderTop:I,[`& > ${e}-content-box`]:{padding:N},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:S,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(C).sub(S).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:C}}},"&-large":{[`> ${e}-item`]:{fontSize:v,lineHeight:y,[`> ${e}-header`]:{padding:s,paddingInlineStart:r,[`> ${e}-expand-icon`]:{height:M,marginInlineStart:t.calc(x).sub(r).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:x}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${re(l)} ${re(l)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:b}}}}})}},ck=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},uk=t=>{const{componentCls:e,headerBg:n,paddingXXS:r,colorBorder:o}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${o}`},[`
|
|
318
|
-
> ${e}-item:last-child,
|
|
319
|
-
> ${e}-item:last-child ${e}-header
|
|
320
|
-
`]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:r}}}},dk=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},fk=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer}),hk=hn("Collapse",t=>{const e=Lt(t,{collapseHeaderPaddingSM:`${re(t.paddingXS)} ${re(t.paddingSM)}`,collapseHeaderPaddingLG:`${re(t.padding)} ${re(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[lk(e),uk(e),dk(e),ck(e),ox(e)]},fk),ix=h.forwardRef((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a}=br("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:p,expandIconPosition:m="start",children:v,expandIcon:g}=t,y=Fr(k=>{var P;return(P=p??k)!==null&&P!==void 0?P:"middle"}),b=n("collapse",s),C=n(),[x,S,w]=hk(b);if(process.env.NODE_ENV!=="production"){const k=on("Collapse");process.env.NODE_ENV!=="production"&&k(m!=="left"&&m!=="right","deprecated","`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.")}const E=h.useMemo(()=>m==="left"?"start":m==="right"?"end":m,[m]),N=g??o,O=h.useCallback(function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const P=typeof N=="function"?N(k):h.createElement(Ss,{rotate:k.isActive?r==="rtl"?-90:90:void 0,"aria-label":k.isActive?"expanded":"collapsed"});return Or(P,()=>{var j;return{className:ee((j=P==null?void 0:P.props)===null||j===void 0?void 0:j.className,`${b}-arrow`)}})},[N,b]),M=ee(`${b}-icon-position-${E}`,{[`${b}-borderless`]:!d,[`${b}-rtl`]:r==="rtl",[`${b}-ghost`]:!!f,[`${b}-${y}`]:y!=="middle"},i,l,c,S,w),I=Object.assign(Object.assign({},HS(C)),{motionAppear:!1,leavedClassName:`${b}-content-hidden`}),D=h.useMemo(()=>v?gr(v).map((k,P)=>{var j,A;const T=k.props;if(T!=null&&T.disabled){const _=(j=k.key)!==null&&j!==void 0?j:String(P),W=Object.assign(Object.assign({},Tn(k.props,["disabled"])),{key:_,collapsible:(A=T.collapsible)!==null&&A!==void 0?A:"disabled"});return Or(k,W)}return k}):null,[v]);return x(h.createElement(cp,Object.assign({ref:e,openMotion:I},Tn(t,["rootClassName"]),{expandIcon:O,prefixCls:b,className:M,style:Object.assign(Object.assign({},a),u)}),D))});process.env.NODE_ENV!=="production"&&(ix.displayName="Collapse");const pk=Object.assign(ix,{Panel:TD}),Xn=t=>t instanceof hr?t:new hr(t),_l=t=>Math.round(Number(t||0)),pp=t=>_l(t.toHsb().a*100),Bl=(t,e)=>{const n=t.toRgb();if(!n.r&&!n.g&&!n.b){const r=t.toHsb();return r.a=1,Xn(r)}return n.a=1,Xn(n)},ax=(t,e)=>{const n=[{percent:0,color:t[0].color}].concat(Re(t),[{percent:100,color:t[t.length-1].color}]);for(let r=0;r<n.length-1;r+=1){const o=n[r].percent,i=n[r+1].percent,a=n[r].color,s=n[r+1].color;if(o<=e&&e<=i){const l=i-o;if(l===0)return a;const c=(e-o)/l*100,u=new jr(a),d=new jr(s);return u.mix(d,c).toRgbString()}}return""},ud=t=>t.map(e=>(e.colors=e.colors.map(Xn),e)),sx=(t,e)=>{const{r:n,g:r,b:o,a:i}=t.toRgb(),a=new jr(t.toRgbString()).onBackground(e).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},hv=(t,e)=>{var n;return`panel-${(n=t.key)!==null&&n!==void 0?n:e}`},mk=t=>{let{prefixCls:e,presets:n,value:r,onChange:o}=t;const[i]=So("ColorPicker"),[,a]=ar(),[s]=mn(ud(n),{value:ud(n),postState:ud}),l=`${e}-presets`,c=$.useMemo(()=>s.reduce((f,p,m)=>{const{defaultOpen:v=!0}=p;return v&&f.push(hv(p,m)),f},[]),[s]),u=f=>{o==null||o(f)},d=s.map((f,p)=>{var m;return{key:hv(f,p),label:$.createElement("div",{className:`${l}-label`},f==null?void 0:f.label),children:$.createElement("div",{className:`${l}-items`},Array.isArray(f==null?void 0:f.colors)&&((m=f.colors)===null||m===void 0?void 0:m.length)>0?f.colors.map((v,g)=>$.createElement(lp,{key:`preset-${g}-${v.toHexString()}`,color:Xn(v).toRgbString(),prefixCls:e,className:ee(`${l}-color`,{[`${l}-color-checked`]:v.toHexString()===(r==null?void 0:r.toHexString()),[`${l}-color-bright`]:sx(v,a.colorBgElevated)}),onClick:()=>u(v)})):$.createElement("span",{className:`${l}-empty`},i.presetEmpty))}});return $.createElement("div",{className:l},$.createElement(pk,{defaultActiveKey:c,ghost:!0,items:d}))},lx=t=>{const{paddingInline:e,onlyIconSize:n}=t;return Lt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},cx=t=>{var e,n,r,o,i,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(o=t.contentLineHeight)!==null&&o!==void 0?o:Dl(s),d=(i=t.contentLineHeightSM)!==null&&i!==void 0?i:Dl(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:Dl(c),p=sx(new hr(t.colorBgSolid),"#fff")?"#000":"#fff",m=Wo.reduce((v,g)=>Object.assign(Object.assign({},v),{[`${g}ShadowColor`]:`0 ${re(t.controlOutlineWidth)} 0 ${Wa(t[`${g}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},m),{fontWeight:400,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:p,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*f)/2-t.lineWidth,0)})},gk=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,marginXS:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:t.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${re(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:Pi(),"> a":{color:"currentColor"},"&:not(:disabled)":ya(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"},[`&${e}-round`]:{width:"auto"}},[`&${e}-loading`]:{opacity:o,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},ux=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),vk=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),bk=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),yk=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Xc=(t,e,n,r,o,i,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},ux(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),Ck=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},yk(t))}),Sk=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Yc=(t,e,n,r)=>{const i=r&&["link","text"].includes(r)?Sk:Ck;return Object.assign(Object.assign({},i(t)),ux(t.componentCls,e,n))},Jc=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},Yc(t,r,o))}),Qc=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},Yc(t,r,o))}),Zc=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),eu=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Yc(t,n,r))}),eo=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},Yc(t,r,o,n))}),xk=t=>{const{componentCls:e}=t;return Wo.reduce((n,r)=>{const o=t[`${r}6`],i=t[`${r}1`],a=t[`${r}5`],s=t[`${r}2`],l=t[`${r}3`],c=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:t[`${r}ShadowColor`]},Jc(t,t.colorTextLightSolid,o,{background:a},{background:c})),Qc(t,o,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Zc(t)),eu(t,i,{background:s},{background:l})),eo(t,o,"link",{color:a},{color:c})),eo(t,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},wk=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},Jc(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Zc(t)),eu(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Xc(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),eo(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),Ek=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Qc(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Zc(t)),eu(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),eo(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),eo(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Xc(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),$k=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},Jc(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Qc(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Zc(t)),eu(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),eo(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),eo(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Xc(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Ok=t=>Object.assign(Object.assign({},eo(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Xc(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),Nk=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:wk(t),[`${e}-color-primary`]:Ek(t),[`${e}-color-dangerous`]:$k(t),[`${e}-color-link`]:Ok(t)},xk(t))},Mk=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Qc(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),eo(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),Jc(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),eo(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),mp=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:o,height:r,padding:`${re(l)} ${re(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:vk(t)},{[`${n}${n}-round${e}`]:bk(t)}]},Ik=t=>{const e=Lt(t,{fontSize:t.contentFontSize});return mp(e,t.componentCls)},Rk=t=>{const e=Lt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return mp(e,`${t.componentCls}-sm`)},Tk=t=>{const e=Lt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return mp(e,`${t.componentCls}-lg`)},Pk=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},Ak=hn("Button",t=>{const e=lx(t);return[gk(e),Ik(e),Rk(e),Tk(e),Pk(e),Nk(e),Mk(e),lD(e)]},cx,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Dk(t,e,n){const{focusElCls:r,focus:o,borderElCls:i}=n,a=i?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function kk(t,e,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function ks(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},Dk(t,r,e)),kk(n,r,e))}}function _k(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Bk(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function zk(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},_k(t,e)),Bk(t.componentCls,e))}}const jk=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:o}=t,i=o(r).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?i:0,insetInlineStart:s?0:i,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},Lk=gS(["Button","compact"],t=>{const e=lx(t);return[ks(e),zk(e),jk(e)]},cx);var Fk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function Hk(t){if(typeof t=="object"&&t){let e=t==null?void 0:t.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}const Vk={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},Wk=$.forwardRef((t,e)=>{var n,r;const{loading:o=!1,prefixCls:i,color:a,variant:s,type:l,danger:c=!1,shape:u="default",size:d,styles:f,disabled:p,className:m,rootClassName:v,children:g,icon:y,iconPosition:b="start",ghost:C=!1,block:x=!1,htmlType:S="button",classNames:w,style:E={},autoInsertSpace:N,autoFocus:O}=t,M=Fk(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),I=l||"default",[D,k]=$.useMemo(()=>{if(a&&s)return[a,s];const _e=Vk[I]||[];return c?["danger",_e[1]]:_e},[l,a,s,c]),j=D==="danger"?"dangerous":D,{getPrefixCls:A,direction:T,autoInsertSpace:_,className:W,style:L,classNames:V,styles:U}=br("button"),Y=(n=N??_)!==null&&n!==void 0?n:!0,H=A("btn",i),[G,J,se]=Ak(H),X=$.useContext(zr),de=p??X,ye=$.useContext(US),ce=$.useMemo(()=>Hk(o),[o]),[oe,me]=$.useState(ce.loading),[te,le]=$.useState(!1),fe=$.useRef(null),Ee=Jo(e,fe),Oe=$.Children.count(g)===1&&!y&&!hl(k),xe=$.useRef(!0);$.useEffect(()=>(xe.current=!1,()=>{xe.current=!0}),[]),$.useEffect(()=>{let _e=null;ce.delay>0?_e=setTimeout(()=>{_e=null,me(!0)},ce.delay):me(ce.loading);function Fe(){_e&&(clearTimeout(_e),_e=null)}return Fe},[ce]),$.useEffect(()=>{if(!fe.current||!Y)return;const _e=fe.current.textContent||"";Oe&&zf(_e)?te||le(!0):te&&le(!1)}),$.useEffect(()=>{O&&fe.current&&fe.current.focus()},[]);const Be=$.useCallback(_e=>{var Fe;if(oe||de){_e.preventDefault();return}(Fe=t.onClick)===null||Fe===void 0||Fe.call(t,("href"in t,_e))},[t.onClick,oe,de]);if(process.env.NODE_ENV!=="production"){const _e=on("Button");process.env.NODE_ENV!=="production"&&_e(!(typeof y=="string"&&y.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${y}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&_e(!(C&&hl(k)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:z,compactItemClassnames:ve}=Zo(H,T),ae={large:"lg",small:"sm",middle:void 0},he=Fr(_e=>{var Fe,Ze;return(Ze=(Fe=d??z)!==null&&Fe!==void 0?Fe:ye)!==null&&Ze!==void 0?Ze:_e}),$e=he&&(r=ae[he])!==null&&r!==void 0?r:"",Me=oe?"loading":y,we=Tn(M,["navigate"]),ze=ee(H,J,se,{[`${H}-${u}`]:u!=="default"&&u,[`${H}-${I}`]:I,[`${H}-dangerous`]:c,[`${H}-color-${j}`]:j,[`${H}-variant-${k}`]:k,[`${H}-${$e}`]:$e,[`${H}-icon-only`]:!g&&g!==0&&!!Me,[`${H}-background-ghost`]:C&&!hl(k),[`${H}-loading`]:oe,[`${H}-two-chinese-chars`]:te&&Y&&!oe,[`${H}-block`]:x,[`${H}-rtl`]:T==="rtl",[`${H}-icon-end`]:b==="end"},ve,m,v,W),Le=Object.assign(Object.assign({},L),E),Ie=ee(w==null?void 0:w.icon,V.icon),We=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),U.icon||{}),Ke=y&&!oe?$.createElement(jf,{prefixCls:H,className:Ie,style:We},y):o&&typeof o=="object"&&o.icon?$.createElement(jf,{prefixCls:H,className:Ie,style:We},o.icon):$.createElement(sD,{existIcon:!!y,prefixCls:H,loading:oe,mount:xe.current}),Pe=g||g===0?aD(g,Oe&&Y):null;if(we.href!==void 0)return G($.createElement("a",Object.assign({},we,{className:ee(ze,{[`${H}-disabled`]:de}),href:de?void 0:we.href,style:Le,onClick:Be,ref:Ee,tabIndex:de?-1:0}),Ke,Pe));let je=$.createElement("button",Object.assign({},M,{type:S,className:ze,style:Le,onClick:Be,disabled:de,ref:Ee}),Ke,Pe,ve&&$.createElement(Lk,{prefixCls:H}));return hl(k)||(je=$.createElement(WS,{component:"Button",disabled:oe},je)),G(je)}),vo=Wk;vo.Group=oD;vo.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(vo.displayName="Button");function dd(t){return!!(t!=null&&t.then)}const dx=t=>{const{type:e,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=h.useRef(!1),f=h.useRef(null),[p,m]=ba(!1),v=function(){i==null||i.apply(void 0,arguments)};h.useEffect(()=>{let b=null;return a&&(b=setTimeout(()=>{var C;(C=f.current)===null||C===void 0||C.focus({preventScroll:!0})})),()=>{b&&clearTimeout(b)}},[]);const g=b=>{dd(b)&&(m(!0),b.then(function(){m(!1,!0),v.apply(void 0,arguments),d.current=!1},C=>{if(m(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(C)}))},y=b=>{if(d.current)return;if(d.current=!0,!u){v();return}let C;if(s){if(C=u(b),c&&!dd(C)){d.current=!1,v(b);return}}else if(u.length)C=u(i),d.current=!1;else if(C=u(),!dd(C)){v();return}g(C)};return h.createElement(vo,Object.assign({},GS(e),{onClick:y,loading:p,prefixCls:r},o,{ref:f}),n)},_s=$.createContext({}),{Provider:fx}=_s,pv=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:s,onConfirm:l}=$.useContext(_s);return o?$.createElement(dx,{isSilent:r,actionFn:s,close:function(){a==null||a.apply(void 0,arguments),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${i}-btn`},n):null},mv=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:s,onOk:l}=$.useContext(_s);return $.createElement(dx,{isSilent:n,type:a||"primary",actionFn:l,close:function(){e==null||e.apply(void 0,arguments),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)};var hx=h.createContext(null),gv=[];function qk(t,e){var n=h.useState(function(){if(!Gn())return null;var m=document.createElement("div");return process.env.NODE_ENV!=="production"&&e&&m.setAttribute("data-debug",e),m}),r=ie(n,1),o=r[0],i=h.useRef(!1),a=h.useContext(hx),s=h.useState(gv),l=ie(s,2),c=l[0],u=l[1],d=a||(i.current?void 0:function(m){u(function(v){var g=[m].concat(Re(v));return g})});function f(){o.parentElement||document.body.appendChild(o),i.current=!0}function p(){var m;(m=o.parentElement)===null||m===void 0||m.removeChild(o),i.current=!1}return Jt(function(){return t?a?a(f):f():p(),p},[t]),Jt(function(){c.length&&(c.forEach(function(m){return m()}),u(gv))},[c]),[o,d]}function Kk(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var o,i;if(t){var a=getComputedStyle(t);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";go(`
|
|
321
|
-
#`.concat(e,`::-webkit-scrollbar {
|
|
322
|
-
`).concat(u,`
|
|
323
|
-
`).concat(d,`
|
|
324
|
-
}`),e)}catch(m){console.error(m),o=l,i=c}}document.body.appendChild(n);var f=t&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,p=t&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),ms(e),{width:f,height:p}}function Uk(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:Kk(t)}function Gk(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Xk="rc-util-locker-".concat(Date.now()),vv=0;function Yk(t){var e=!!t,n=h.useState(function(){return vv+=1,"".concat(Xk,"_").concat(vv)}),r=ie(n,1),o=r[0];Jt(function(){if(e){var i=Uk(document.body).width,a=Gk();go(`
|
|
325
|
-
html body {
|
|
326
|
-
overflow-y: hidden;
|
|
327
|
-
`.concat(a?"width: calc(100% - ".concat(i,"px);"):"",`
|
|
328
|
-
}`),o)}else ms(o);return function(){ms(o)}},[e,o])}var Jk=!1;function Qk(t){return Jk}var bv=function(e){return e===!1?!1:!Gn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},tu=h.forwardRef(function(t,e){var n=t.open,r=t.autoLock,o=t.getContainer,i=t.debug,a=t.autoDestroy,s=a===void 0?!0:a,l=t.children,c=h.useState(n),u=ie(c,2),d=u[0],f=u[1],p=d||n;process.env.NODE_ENV!=="production"&&yt(Gn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),h.useEffect(function(){(s||n)&&f(n)},[n,s]);var m=h.useState(function(){return bv(o)}),v=ie(m,2),g=v[0],y=v[1];h.useEffect(function(){var D=bv(o);y(D??null)});var b=qk(p&&!g,i),C=ie(b,2),x=C[0],S=C[1],w=g??x;Yk(r&&n&&Gn()&&(w===x||w===document.body));var E=null;if(l&&Qo(l)&&e){var N=l;E=N.ref}var O=Jo(E,e);if(!p||!Gn()||g===void 0)return null;var M=w===!1||Qk(),I=l;return e&&(I=h.cloneElement(l,{ref:O})),h.createElement(hx.Provider,{value:S},M?I:_r.createPortal(I,w))});process.env.NODE_ENV!=="production"&&(tu.displayName="Portal");var px=h.createContext({});function Zk(){var t=q({},h);return t.useId}var yv=0,Cv=Zk();const nu=Cv?function(e){var n=Cv();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=h.useState("ssr-id"),r=ie(n,2),o=r[0],i=r[1];return h.useEffect(function(){var a=yv;yv+=1,i("rc_unique_".concat(a))},[]),e||(process.env.NODE_ENV==="test"?"test-id":o)};function Sv(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function xv(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var o=t.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r])}return n}function e2(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=xv(o),n.top+=xv(o,!0),n}const t2=h.memo(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var n2={width:0,height:0,overflow:"hidden",outline:"none"},r2={outline:"none"},gp=$.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,o=t.style,i=t.title,a=t.ariaId,s=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,f=t.bodyStyle,p=t.bodyProps,m=t.modalRender,v=t.onMouseDown,g=t.onMouseUp,y=t.holderRef,b=t.visible,C=t.forceRender,x=t.width,S=t.height,w=t.classNames,E=t.styles,N=$.useContext(px),O=N.panel,M=Jo(y,O),I=$.useRef(),D=$.useRef();$.useImperativeHandle(e,function(){return{focus:function(){var U;(U=I.current)===null||U===void 0||U.focus({preventScroll:!0})},changeActive:function(U){var Y=document,H=Y.activeElement;U&&H===D.current?I.current.focus({preventScroll:!0}):!U&&H===I.current&&D.current.focus({preventScroll:!0})}}});var k={};x!==void 0&&(k.width=x),S!==void 0&&(k.height=S);var P=s?$.createElement("div",{className:ee("".concat(n,"-footer"),w==null?void 0:w.footer),style:q({},E==null?void 0:E.footer)},s):null,j=i?$.createElement("div",{className:ee("".concat(n,"-header"),w==null?void 0:w.header),style:q({},E==null?void 0:E.header)},$.createElement("div",{className:"".concat(n,"-title"),id:a},i)):null,A=$.useMemo(function(){return st(l)==="object"&&l!==null?l:l?{closeIcon:c??$.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),T=Zr(A,!0),_=st(l)==="object"&&l.disabled,W=l?$.createElement("button",De({type:"button",onClick:u,"aria-label":"Close"},T,{className:"".concat(n,"-close"),disabled:_}),A.closeIcon):null,L=$.createElement("div",{className:ee("".concat(n,"-content"),w==null?void 0:w.content),style:E==null?void 0:E.content},W,j,$.createElement("div",De({className:ee("".concat(n,"-body"),w==null?void 0:w.body),style:q(q({},f),E==null?void 0:E.body)},p),d),P);return $.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:M,style:q(q({},o),k),className:ee(n,r),onMouseDown:v,onMouseUp:g},$.createElement("div",{ref:I,tabIndex:0,style:r2},$.createElement(t2,{shouldUpdate:b||C},m?m(L):L)),$.createElement("div",{tabIndex:0,ref:D,style:n2}))});process.env.NODE_ENV!=="production"&&(gp.displayName="Panel");var mx=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.title,o=t.style,i=t.className,a=t.visible,s=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,f=t.mousePosition,p=$.useRef(),m=h.useState(),v=ie(m,2),g=v[0],y=v[1],b={};g&&(b.transformOrigin=g);function C(){var x=e2(p.current);y(f&&(f.x||f.y)?"".concat(f.x-x.left,"px ").concat(f.y-x.top,"px"):"")}return h.createElement(no,{visible:a,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:s,motionName:c,removeOnLeave:l,ref:p},function(x,S){var w=x.className,E=x.style;return h.createElement(gp,De({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:S,style:q(q(q({},E),o),b),className:ee(i,w)}))})});mx.displayName="Content";var o2=function(e){var n=e.prefixCls,r=e.style,o=e.visible,i=e.maskProps,a=e.motionName,s=e.className;return h.createElement(no,{key:"mask",visible:o,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return h.createElement("div",De({ref:c,style:q(q({},d),r),className:ee("".concat(n,"-mask"),u,s)},i))})},i2=function(e){var n=e.prefixCls,r=n===void 0?"rc-dialog":n,o=e.zIndex,i=e.visible,a=i===void 0?!1:i,s=e.keyboard,l=s===void 0?!0:s,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,f=e.wrapClassName,p=e.wrapProps,m=e.onClose,v=e.afterOpenChange,g=e.afterClose,y=e.transitionName,b=e.animation,C=e.closable,x=C===void 0?!0:C,S=e.mask,w=S===void 0?!0:S,E=e.maskTransitionName,N=e.maskAnimation,O=e.maskClosable,M=O===void 0?!0:O,I=e.maskStyle,D=e.maskProps,k=e.rootClassName,P=e.classNames,j=e.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(le){Qr(!(le in e),"".concat(le," is deprecated, please use styles instead."))}),"wrapClassName"in e&&Qr(!1,"wrapClassName is deprecated, please use classNames instead."));var A=$.useRef(),T=$.useRef(),_=$.useRef(),W=h.useState(a),L=ie(W,2),V=L[0],U=L[1],Y=nu();function H(){sf(T.current,document.activeElement)||(A.current=document.activeElement)}function G(){if(!sf(T.current,document.activeElement)){var le;(le=_.current)===null||le===void 0||le.focus()}}function J(le){if(le)G();else{if(U(!1),w&&A.current&&u){try{A.current.focus({preventScroll:!0})}catch{}A.current=null}V&&(g==null||g())}v==null||v(le)}function se(le){m==null||m(le)}var X=$.useRef(!1),de=$.useRef(),ye=function(){clearTimeout(de.current),X.current=!0},ce=function(){de.current=setTimeout(function(){X.current=!1})},oe=null;M&&(oe=function(fe){X.current?X.current=!1:T.current===fe.target&&se(fe)});function me(le){if(l&&le.keyCode===Je.ESC){le.stopPropagation(),se(le);return}a&&le.keyCode===Je.TAB&&_.current.changeActive(!le.shiftKey)}$.useEffect(function(){a&&(U(!0),H())},[a]),$.useEffect(function(){return function(){clearTimeout(de.current)}},[]);var te=q(q(q({zIndex:o},d),j==null?void 0:j.wrapper),{},{display:V?null:"none"});return h.createElement("div",De({className:ee("".concat(r,"-root"),k)},Zr(e,{data:!0})),h.createElement(o2,{prefixCls:r,visible:w&&a,motionName:Sv(r,E,N),style:q(q({zIndex:o},I),j==null?void 0:j.mask),maskProps:D,className:P==null?void 0:P.mask}),h.createElement("div",De({tabIndex:-1,onKeyDown:me,className:ee("".concat(r,"-wrap"),f,P==null?void 0:P.wrapper),ref:T,onClick:oe,style:te},p),h.createElement(mx,De({},e,{onMouseDown:ye,onMouseUp:ce,ref:_,closable:x,ariaId:Y,prefixCls:r,visible:a&&V,onClose:se,onVisibleChanged:J,motionName:Sv(r,y,b)}))))},gx=function(e){var n=e.visible,r=e.getContainer,o=e.forceRender,i=e.destroyOnClose,a=i===void 0?!1:i,s=e.afterClose,l=e.panelRef,c=h.useState(n),u=ie(c,2),d=u[0],f=u[1],p=h.useMemo(function(){return{panel:l}},[l]);return h.useEffect(function(){n&&f(!0)},[n]),!o&&a&&!d?null:h.createElement(px.Provider,{value:p},h.createElement(tu,{open:n||o||d,autoDestroy:!1,getContainer:r,autoLock:n||d},h.createElement(i2,De({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};gx.displayName="Dialog";var ci="RC_FORM_INTERNAL_HOOKS",Qt=function(){yt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Sa=h.createContext({getFieldValue:Qt,getFieldsValue:Qt,getFieldError:Qt,getFieldWarning:Qt,getFieldsError:Qt,isFieldsTouched:Qt,isFieldTouched:Qt,isFieldValidating:Qt,isFieldsValidating:Qt,resetFields:Qt,setFields:Qt,setFieldValue:Qt,setFieldsValue:Qt,validateFields:Qt,submit:Qt,getInternalHooks:function(){return Qt(),{dispatch:Qt,initEntityValue:Qt,registerField:Qt,useSubscribe:Qt,setInitialValues:Qt,destroyForm:Qt,setCallbacks:Qt,registerWatch:Qt,getFields:Qt,setValidateMessages:Qt,setPreserve:Qt,getInitialValue:Qt}}}),hc=h.createContext(null);function Lf(t){return t==null?[]:Array.isArray(t)?t:[t]}function a2(t){return t&&!!t._init}function Ff(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Hf=Ff();function s2(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function l2(t,e,n){if(Gh())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&fs(o,n.prototype),o}function Vf(t){var e=typeof Map=="function"?new Map:void 0;return Vf=function(r){if(r===null||!s2(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,o)}function o(){return l2(r,arguments,hs(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),fs(o,r)},Vf(t)}var c2=/%[sdj%]/g,vx=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(vx=function(e,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(e,n)});function Wf(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function pr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=0,i=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var a=t.replace(c2,function(s){if(s==="%%")return"%";if(o>=i)return s;switch(s){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function u2(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Pn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||u2(e)&&typeof t=="string"&&!t)}function d2(t,e,n){var r=[],o=0,i=t.length;function a(s){r.push.apply(r,Re(s||[])),o++,o===i&&n(r)}t.forEach(function(s){e(s,a)})}function wv(t,e,n){var r=0,o=t.length;function i(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<o?e(t[s],i):n([])}i([])}function f2(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,Re(t[n]||[]))}),e}var Ev=function(t){bo(n,t);var e=yo(n);function n(r,o){var i;return xn(this,n),i=e.call(this,"Async Validation Error"),F(Rt(i),"errors",void 0),F(Rt(i),"fields",void 0),i.errors=r,i.fields=o,i}return wn(n)}(Vf(Error));function h2(t,e,n,r,o){if(e.first){var i=new Promise(function(f,p){var m=function(y){return r(y),y.length?p(new Ev(y,Wf(y))):f(o)},v=f2(t);wv(v,n,m)});return i.catch(function(f){return f}),i}var a=e.firstFields===!0?Object.keys(t):e.firstFields||[],s=Object.keys(t),l=s.length,c=0,u=[],d=new Promise(function(f,p){var m=function(g){if(u.push.apply(u,g),c++,c===l)return r(u),u.length?p(new Ev(u,Wf(u))):f(o)};s.length||(r(u),f(o)),s.forEach(function(v){var g=t[v];a.indexOf(v)!==-1?wv(g,n,m):d2(g,n,m)})});return d.catch(function(f){return f}),d}function p2(t){return!!(t&&t.message!==void 0)}function m2(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function $v(t,e){return function(n){var r;return t.fullFields?r=m2(e,t.fullFields):r=e[n.field||t.fullField],p2(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function Ov(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];st(r)==="object"&&st(t[n])==="object"?t[n]=q(q({},t[n]),r):t[n]=r}}return t}var ji="enum",g2=function(e,n,r,o,i){e[ji]=Array.isArray(e[ji])?e[ji]:[],e[ji].indexOf(n)===-1&&o.push(pr(i.messages[ji],e.fullField,e[ji].join(", ")))},v2=function(e,n,r,o,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||o.push(pr(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||o.push(pr(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},b2=function(e,n,r,o,i){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(f?d="number":p?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),p&&(u=n.replace(c,"_").length),a?u!==e.len&&o.push(pr(i.messages[d].len,e.fullField,e.len)):s&&!l&&u<e.min?o.push(pr(i.messages[d].min,e.fullField,e.min)):l&&!s&&u>e.max?o.push(pr(i.messages[d].max,e.fullField,e.max)):s&&l&&(u<e.min||u>e.max)&&o.push(pr(i.messages[d].range,e.fullField,e.min,e.max))},bx=function(e,n,r,o,i,a){e.required&&(!r.hasOwnProperty(e.field)||Pn(n,a||e.type))&&o.push(pr(i.messages.required,e.fullField))},pl;const y2=function(){if(pl)return pl;var t="[a-fA-F\\d:]",e=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(o.join("|"),")").concat(i),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function(w){return w&&w.exact?s:new RegExp("(?:".concat(e(w)).concat(n).concat(e(w),")|(?:").concat(e(w)).concat(a).concat(e(w),")"),"g")};u.v4=function(S){return S&&S.exact?l:new RegExp("".concat(e(S)).concat(n).concat(e(S)),"g")},u.v6=function(S){return S&&S.exact?c:new RegExp("".concat(e(S)).concat(a).concat(e(S)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,m=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",y="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',x="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(p,"|").concat(m,"|").concat(v).concat(g).concat(y,")").concat(b).concat(C);return pl=new RegExp("(?:^".concat(x,"$)"),"i"),pl};var Nv={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Ka={integer:function(e){return Ka.number(e)&&parseInt(e,10)===e},float:function(e){return Ka.number(e)&&!Ka.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return st(e)==="object"&&!Ka.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Nv.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(y2())},hex:function(e){return typeof e=="string"&&!!e.match(Nv.hex)}},C2=function(e,n,r,o,i){if(e.required&&n===void 0){bx(e,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?Ka[s](n)||o.push(pr(i.messages.types[s],e.fullField,e.type)):s&&st(n)!==e.type&&o.push(pr(i.messages.types[s],e.fullField,e.type))},S2=function(e,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(pr(i.messages.whitespace,e.fullField))};const _t={required:bx,whitespace:S2,type:C2,range:b2,enum:g2,pattern:v2};var x2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i)}r(a)},w2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();_t.required(e,n,o,a,i,"array"),n!=null&&(_t.type(e,n,o,a,i),_t.range(e,n,o,a,i))}r(a)},E2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t.type(e,n,o,a,i)}r(a)},$2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n,"date")&&!e.required)return r();if(_t.required(e,n,o,a,i),!Pn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),_t.type(e,l,o,a,i),l&&_t.range(e,l.getTime(),o,a,i)}}r(a)},O2="enum",N2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t[O2](e,n,o,a,i)}r(a)},M2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&(_t.type(e,n,o,a,i),_t.range(e,n,o,a,i))}r(a)},I2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&(_t.type(e,n,o,a,i),_t.range(e,n,o,a,i))}r(a)},R2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t.type(e,n,o,a,i)}r(a)},T2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&(_t.type(e,n,o,a,i),_t.range(e,n,o,a,i))}r(a)},P2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t.type(e,n,o,a,i)}r(a)},A2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n,"string")&&!e.required)return r();_t.required(e,n,o,a,i),Pn(n,"string")||_t.pattern(e,n,o,a,i)}r(a)},D2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),Pn(n)||_t.type(e,n,o,a,i)}r(a)},k2=function(e,n,r,o,i){var a=[],s=Array.isArray(n)?"array":st(n);_t.required(e,n,o,a,i,s),r(a)},_2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n,"string")&&!e.required)return r();_t.required(e,n,o,a,i,"string"),Pn(n,"string")||(_t.type(e,n,o,a,i),_t.range(e,n,o,a,i),_t.pattern(e,n,o,a,i),e.whitespace===!0&&_t.whitespace(e,n,o,a,i))}r(a)},fd=function(e,n,r,o,i){var a=e.type,s=[],l=e.required||!e.required&&o.hasOwnProperty(e.field);if(l){if(Pn(n,a)&&!e.required)return r();_t.required(e,n,o,s,i,a),Pn(n,a)||_t.type(e,n,o,s,i)}r(s)};const es={string:_2,method:R2,number:T2,boolean:E2,regexp:D2,integer:I2,float:M2,array:w2,object:P2,enum:N2,pattern:A2,date:$2,url:fd,hex:fd,email:fd,required:k2,any:x2};var Bs=function(){function t(e){xn(this,t),F(this,"rules",null),F(this,"_messages",Hf),this.define(e)}return wn(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(st(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(n){return n&&(this._messages=Ov(Ff(),n)),this._messages}},{key:"validate",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=o,l=i;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(m){var v=[],g={};function y(C){if(Array.isArray(C)){var x;v=(x=v).concat.apply(x,Re(C))}else v.push(C)}for(var b=0;b<m.length;b++)y(m[b]);v.length?(g=Wf(v),l(v,g)):l(null,a)}if(s.messages){var u=this.messages();u===Hf&&(u=Ff()),Ov(u,s.messages),s.messages=u}else s.messages=this.messages();var d={},f=s.keys||Object.keys(this.rules);f.forEach(function(m){var v=r.rules[m],g=a[m];v.forEach(function(y){var b=y;typeof b.transform=="function"&&(a===n&&(a=q({},a)),g=a[m]=b.transform(g),g!=null&&(b.type=b.type||(Array.isArray(g)?"array":st(g)))),typeof b=="function"?b={validator:b}:b=q({},b),b.validator=r.getValidationMethod(b),b.validator&&(b.field=m,b.fullField=b.fullField||m,b.type=r.getType(b),d[m]=d[m]||[],d[m].push({rule:b,value:g,source:a,field:m}))})});var p={};return h2(d,s,function(m,v){var g=m.rule,y=(g.type==="object"||g.type==="array")&&(st(g.fields)==="object"||st(g.defaultField)==="object");y=y&&(g.required||!g.required&&m.value),g.field=m.field;function b(E,N){return q(q({},N),{},{fullField:"".concat(g.fullField,".").concat(E),fullFields:g.fullFields?[].concat(Re(g.fullFields),[E]):[E]})}function C(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=Array.isArray(E)?E:[E];!s.suppressWarning&&N.length&&t.warning("async-validator:",N),N.length&&g.message!==void 0&&(N=[].concat(g.message));var O=N.map($v(g,a));if(s.first&&O.length)return p[g.field]=1,v(O);if(!y)v(O);else{if(g.required&&!m.value)return g.message!==void 0?O=[].concat(g.message).map($v(g,a)):s.error&&(O=[s.error(g,pr(s.messages.required,g.field))]),v(O);var M={};g.defaultField&&Object.keys(m.value).map(function(k){M[k]=g.defaultField}),M=q(q({},M),m.rule.fields);var I={};Object.keys(M).forEach(function(k){var P=M[k],j=Array.isArray(P)?P:[P];I[k]=j.map(b.bind(null,k))});var D=new t(I);D.messages(s.messages),m.rule.options&&(m.rule.options.messages=s.messages,m.rule.options.error=s.error),D.validate(m.value,m.rule.options||s,function(k){var P=[];O&&O.length&&P.push.apply(P,Re(O)),k&&k.length&&P.push.apply(P,Re(k)),v(P.length?P:null)})}}var x;if(g.asyncValidator)x=g.asyncValidator(g,m.value,C,m.source,s);else if(g.validator){try{x=g.validator(g,m.value,C,m.source,s)}catch(E){var S,w;(S=(w=console).error)===null||S===void 0||S.call(w,E),s.suppressValidatorError||setTimeout(function(){throw E},0),C(E.message)}x===!0?C():x===!1?C(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):x instanceof Array?C(x):x instanceof Error&&C(x.message)}x&&x.then&&x.then(function(){return C()},function(E){return C(E)})},function(m){c(m)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!es.hasOwnProperty(n.type))throw new Error(pr("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?es.required:es[this.getType(n)]||void 0}}]),t}();F(Bs,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");es[e]=n});F(Bs,"warning",vx);F(Bs,"messages",Hf);F(Bs,"validators",es);var lr="'${name}' is not a valid ${type}",yx={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:lr,method:lr,array:lr,object:lr,number:lr,date:lr,boolean:lr,integer:lr,float:lr,regexp:lr,email:lr,url:lr,hex:lr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Mv=Bs;function B2(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var Iv="CODE_LOGIC_ERROR";function qf(t,e,n,r,o){return Kf.apply(this,arguments)}function Kf(){return Kf=Ai(rr().mark(function t(e,n,r,o,i){var a,s,l,c,u,d,f,p,m;return rr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=q({},r),delete a.ruleIndex,Mv.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(y){return console.error(y),Promise.reject(Iv)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new Mv(F({},e,[a])),u=Ji(yx,o.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(F({},e,n),q({},o)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(y,b){var C=y.message,x=C===Iv?u.default:C;return h.isValidElement(x)?h.cloneElement(x,{key:"error_".concat(b)}):x}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(y,b){return qf("".concat(e,".").concat(b),y,l,o,i)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(y,b){return[].concat(Re(y),Re(b))},[]));case 23:return p=q(q({},r),{},{name:e,enum:(r.enum||[]).join(", ")},i),m=d.map(function(y){return typeof y=="string"?B2(y,p):y}),g.abrupt("return",m);case 26:case"end":return g.stop()}},t,null,[[10,15]])})),Kf.apply(this,arguments)}function z2(t,e,n,r,o,i){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,p=q(q({},u),{},{ruleIndex:d});return f&&(p.validator=function(m,v,g){var y=!1,b=function(){for(var S=arguments.length,w=new Array(S),E=0;E<S;E++)w[E]=arguments[E];Promise.resolve().then(function(){yt(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||g.apply(void 0,w)})},C=f(m,v,b);y=C&&typeof C.then=="function"&&typeof C.catch=="function",yt(y,"`callback` is deprecated. Please return a promise instead."),y&&C.then(function(){g()}).catch(function(x){g(x||" ")})}),p}).sort(function(u,d){var f=u.warningOnly,p=u.ruleIndex,m=d.warningOnly,v=d.ruleIndex;return!!f==!!m?p-v:f?1:-1}),l;if(o===!0)l=new Promise(function(){var u=Ai(rr().mark(function d(f,p){var m,v,g;return rr().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:m=0;case 1:if(!(m<s.length)){b.next=12;break}return v=s[m],b.next=5,qf(a,e,v,r,i);case 5:if(g=b.sent,!g.length){b.next=9;break}return p([{errors:g,rule:v}]),b.abrupt("return");case 9:m+=1,b.next=1;break;case 12:f([]);case 13:case"end":return b.stop()}},d)}));return function(d,f){return u.apply(this,arguments)}}());else{var c=s.map(function(u){return qf(a,e,u,r,i).then(function(d){return{errors:d,rule:u}})});l=(o?L2(c):j2(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function j2(t){return Uf.apply(this,arguments)}function Uf(){return Uf=Ai(rr().mark(function t(e){return rr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(e).then(function(o){var i,a=(i=[]).concat.apply(i,Re(o));return a}));case 1:case"end":return r.stop()}},t)})),Uf.apply(this,arguments)}function L2(t){return Gf.apply(this,arguments)}function Gf(){return Gf=Ai(rr().mark(function t(e){var n;return rr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=0,o.abrupt("return",new Promise(function(i){e.forEach(function(a){a.then(function(s){s.errors.length&&i([s]),n+=1,n===e.length&&i([])})})}));case 2:case"end":return o.stop()}},t)})),Gf.apply(this,arguments)}function $n(t){return Lf(t)}function Rv(t,e){var n={};return e.forEach(function(r){var o=Gr(t,r);n=Tr(n,r,o)}),n}function oa(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return Cx(e,r,n)})}function Cx(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,o){return t[o]===r})}function F2(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||st(t)!=="object"||st(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),o=new Set([].concat(n,r));return Re(o).every(function(i){var a=t[i],s=e[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function H2(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&st(e.target)==="object"&&t in e.target?e.target[t]:e}function Tv(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var o=t[e],i=e-n;return i>0?[].concat(Re(t.slice(0,n)),[o],Re(t.slice(n,e)),Re(t.slice(e+1,r))):i<0?[].concat(Re(t.slice(0,e)),Re(t.slice(e+1,n+1)),[o],Re(t.slice(n+1,r))):t}var V2=["name"],Cr=[];function hd(t,e,n,r,o,i){return typeof t=="function"?t(e,n,"source"in i?{source:i.source}:{}):r!==o}var vp=function(t){bo(n,t);var e=yo(n);function n(r){var o;if(xn(this,n),o=e.call(this,r),F(Rt(o),"state",{resetCount:0}),F(Rt(o),"cancelRegisterFunc",null),F(Rt(o),"mounted",!1),F(Rt(o),"touched",!1),F(Rt(o),"dirty",!1),F(Rt(o),"validatePromise",void 0),F(Rt(o),"prevValidating",void 0),F(Rt(o),"errors",Cr),F(Rt(o),"warnings",Cr),F(Rt(o),"cancelRegister",function(){var l=o.props,c=l.preserve,u=l.isListField,d=l.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(u,c,$n(d)),o.cancelRegisterFunc=null}),F(Rt(o),"getNamePath",function(){var l=o.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat(Re(f),Re(c)):[]}),F(Rt(o),"getRules",function(){var l=o.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),F(Rt(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),F(Rt(o),"metaCache",null),F(Rt(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=q(q({},o.getMeta()),{},{destroy:l});ha(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),F(Rt(o),"onStoreChange",function(l,c,u){var d=o.props,f=d.shouldUpdate,p=d.dependencies,m=p===void 0?[]:p,v=d.onReset,g=u.store,y=o.getNamePath(),b=o.getValue(l),C=o.getValue(g),x=c&&oa(c,y);switch(u.type==="valueUpdate"&&u.source==="external"&&!ha(b,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Cr,o.warnings=Cr,o.triggerMetaEvent()),u.type){case"reset":if(!c||x){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Cr,o.warnings=Cr,o.triggerMetaEvent(),v==null||v(),o.refresh();return}break;case"remove":{if(f&&hd(f,l,g,b,C,u)){o.reRender();return}break}case"setField":{var S=u.data;if(x){"touched"in S&&(o.touched=S.touched),"validating"in S&&!("originRCField"in S)&&(o.validatePromise=S.validating?Promise.resolve([]):null),"errors"in S&&(o.errors=S.errors||Cr),"warnings"in S&&(o.warnings=S.warnings||Cr),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in S&&oa(c,y,!0)){o.reRender();return}if(f&&!y.length&&hd(f,l,g,b,C,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=m.map($n);if(w.some(function(E){return oa(u.relatedFields,E)})){o.reRender();return}break}default:if(x||(!m.length||y.length||f)&&hd(f,l,g,b,C,u)){o.reRender();return}break}f===!0&&o.reRender()}),F(Rt(o),"validateRules",function(l){var c=o.getNamePath(),u=o.getValue(),d=l||{},f=d.triggerName,p=d.validateOnly,m=p===void 0?!1:p,v=Promise.resolve().then(Ai(rr().mark(function g(){var y,b,C,x,S,w,E;return rr().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(o.mounted){O.next=2;break}return O.abrupt("return",[]);case 2:if(y=o.props,b=y.validateFirst,C=b===void 0?!1:b,x=y.messageVariables,S=y.validateDebounce,w=o.getRules(),f&&(w=w.filter(function(M){return M}).filter(function(M){var I=M.validateTrigger;if(!I)return!0;var D=Lf(I);return D.includes(f)})),!(S&&f)){O.next=10;break}return O.next=8,new Promise(function(M){setTimeout(M,S)});case 8:if(o.validatePromise===v){O.next=10;break}return O.abrupt("return",[]);case 10:return E=z2(c,u,w,l,C,x),E.catch(function(M){return M}).then(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Cr;if(o.validatePromise===v){var I;o.validatePromise=null;var D=[],k=[];(I=M.forEach)===null||I===void 0||I.call(M,function(P){var j=P.rule.warningOnly,A=P.errors,T=A===void 0?Cr:A;j?k.push.apply(k,Re(T)):D.push.apply(D,Re(T))}),o.errors=D,o.warnings=k,o.triggerMetaEvent(),o.reRender()}}),O.abrupt("return",E);case 13:case"end":return O.stop()}},g)})));return m||(o.validatePromise=v,o.dirty=!0,o.errors=Cr,o.warnings=Cr,o.triggerMetaEvent(),o.reRender()),v}),F(Rt(o),"isFieldValidating",function(){return!!o.validatePromise}),F(Rt(o),"isFieldTouched",function(){return o.touched}),F(Rt(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(ci),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),F(Rt(o),"getErrors",function(){return o.errors}),F(Rt(o),"getWarnings",function(){return o.warnings}),F(Rt(o),"isListField",function(){return o.props.isListField}),F(Rt(o),"isList",function(){return o.props.isList}),F(Rt(o),"isPreserve",function(){return o.props.preserve}),F(Rt(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var l={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return l}),F(Rt(o),"getOnlyChild",function(l){if(typeof l=="function"){var c=o.getMeta();return q(q({},o.getOnlyChild(l(o.getControlled(),c,o.props.fieldContext))),{},{isFunction:!0})}var u=gr(l);return u.length!==1||!h.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),F(Rt(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return Gr(l||c(!0),u)}),F(Rt(o),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=o.props,u=c.name,d=c.trigger,f=c.validateTrigger,p=c.getValueFromEvent,m=c.normalize,v=c.valuePropName,g=c.getValueProps,y=c.fieldContext,b=f!==void 0?f:y.validateTrigger,C=o.getNamePath(),x=y.getInternalHooks,S=y.getFieldsValue,w=x(ci),E=w.dispatch,N=o.getValue(),O=g||function(P){return F({},v,P)},M=l[d],I=u!==void 0?O(N):{};process.env.NODE_ENV!=="production"&&I&&Object.keys(I).forEach(function(P){yt(typeof I[P]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(P,")"))});var D=q(q({},l),I);D[d]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var P,j=arguments.length,A=new Array(j),T=0;T<j;T++)A[T]=arguments[T];p?P=p.apply(void 0,A):P=H2.apply(void 0,[v].concat(A)),m&&(P=m(P,N,S(!0))),P!==N&&E({type:"updateValue",namePath:C,value:P}),M&&M.apply(void 0,A)};var k=Lf(b||[]);return k.forEach(function(P){var j=D[P];D[P]=function(){j&&j.apply(void 0,arguments);var A=o.props.rules;A&&A.length&&E({type:"validateField",namePath:C,triggerName:P})}}),D}),r.fieldContext){var i=r.fieldContext.getInternalHooks,a=i(ci),s=a.initEntityValue;s(Rt(o))}return o}return wn(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.shouldUpdate,a=o.fieldContext;if(this.mounted=!0,a){var s=a.getInternalHooks,l=s(ci),c=l.registerField;this.cancelRegisterFunc=c(this)}i===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var o=this.state.resetCount,i=this.props.children,a=this.getOnlyChild(i),s=a.child,l=a.isFunction,c;return l?c=s:h.isValidElement(s)?c=h.cloneElement(s,this.getControlled(s.props)):(yt(!s,"`children` of Field is not validate ReactElement."),c=s),h.createElement(h.Fragment,{key:o},c)}}]),n}(h.Component);F(vp,"contextType",Sa);F(vp,"defaultProps",{trigger:"onChange",valuePropName:"value"});function Sx(t){var e,n=t.name,r=xt(t,V2),o=h.useContext(Sa),i=h.useContext(hc),a=n!==void 0?$n(n):void 0,s=(e=r.isListField)!==null&&e!==void 0?e:!!i,l="keep";return s||(l="_".concat((a||[]).join("_"))),process.env.NODE_ENV!=="production"&&r.preserve===!1&&s&&a.length<=1&&yt(!1,"`preserve` should not apply on Form.List fields."),h.createElement(vp,De({key:l,name:a,isListField:s},r,{fieldContext:o}))}function W2(t){var e=t.name,n=t.initialValue,r=t.children,o=t.rules,i=t.validateTrigger,a=t.isListField,s=h.useContext(Sa),l=h.useContext(hc),c=h.useRef({keys:[],id:0}),u=c.current,d=h.useMemo(function(){var v=$n(s.prefixName)||[];return[].concat(Re(v),Re($n(e)))},[s.prefixName,e]),f=h.useMemo(function(){return q(q({},s),{},{prefixName:d})},[s,d]),p=h.useMemo(function(){return{getKey:function(g){var y=d.length,b=g[y];return[u.keys[b],g.slice(y+1)]}}},[d]);if(typeof r!="function")return yt(!1,"Form.List only accepts function as children."),null;var m=function(g,y,b){var C=b.source;return C==="internal"?!1:g!==y};return h.createElement(hc.Provider,{value:p},h.createElement(Sa.Provider,{value:f},h.createElement(Sx,{name:[],shouldUpdate:m,rules:o,validateTrigger:i,initialValue:n,isList:!0,isListField:a??!!l},function(v,g){var y=v.value,b=y===void 0?[]:y,C=v.onChange,x=s.getFieldValue,S=function(){var O=x(d||[]);return O||[]},w={add:function(O,M){var I=S();M>=0&&M<=I.length?(u.keys=[].concat(Re(u.keys.slice(0,M)),[u.id],Re(u.keys.slice(M))),C([].concat(Re(I.slice(0,M)),[O],Re(I.slice(M))))):(process.env.NODE_ENV!=="production"&&(M<0||M>I.length)&&yt(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(Re(u.keys),[u.id]),C([].concat(Re(I),[O]))),u.id+=1},remove:function(O){var M=S(),I=new Set(Array.isArray(O)?O:[O]);I.size<=0||(u.keys=u.keys.filter(function(D,k){return!I.has(k)}),C(M.filter(function(D,k){return!I.has(k)})))},move:function(O,M){if(O!==M){var I=S();O<0||O>=I.length||M<0||M>=I.length||(u.keys=Tv(u.keys,O,M),C(Tv(I,O,M)))}}},E=b||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&yt(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r(E.map(function(N,O){var M=u.keys[O];return M===void 0&&(u.keys[O]=u.id,M=u.keys[O],u.id+=1),{name:O,key:M,isListField:!0}}),w,g)})))}function q2(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(o,i){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(e&&i(r),o(r))})})}):Promise.resolve([])}var xx="__@field_split__";function pd(t){return t.map(function(e){return"".concat(st(e),":").concat(e)}).join(xx)}var Li=function(){function t(){xn(this,t),F(this,"kvs",new Map)}return wn(t,[{key:"set",value:function(n,r){this.kvs.set(pd(n),r)}},{key:"get",value:function(n){return this.kvs.get(pd(n))}},{key:"update",value:function(n,r){var o=this.get(n),i=r(o);i?this.set(n,i):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(pd(n))}},{key:"map",value:function(n){return Re(this.kvs.entries()).map(function(r){var o=ie(r,2),i=o[0],a=o[1],s=i.split(xx);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=ie(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var o=r.key,i=r.value;return n[o.join(".")]=i,null}),n}}]),t}(),K2=["name"],U2=wn(function t(e){var n=this;xn(this,t),F(this,"formHooked",!1),F(this,"forceRootUpdate",void 0),F(this,"subscribable",!0),F(this,"store",{}),F(this,"fieldEntities",[]),F(this,"initialValues",{}),F(this,"callbacks",{}),F(this,"validateMessages",null),F(this,"preserve",null),F(this,"lastValidatePromise",null),F(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),F(this,"getInternalHooks",function(r){return r===ci?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(yt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),F(this,"useSubscribe",function(r){n.subscribable=r}),F(this,"prevWithoutPreserves",null),F(this,"setInitialValues",function(r,o){if(n.initialValues=r||{},o){var i,a=Ji(r,n.store);(i=n.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Tr(a,l,Gr(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),F(this,"destroyForm",function(r){if(r)n.updateStore({});else{var o=new Li;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=o}}),F(this,"getInitialValue",function(r){var o=Gr(n.initialValues,r);return r.length?Ji(o):o}),F(this,"setCallbacks",function(r){n.callbacks=r}),F(this,"setValidateMessages",function(r){n.validateMessages=r}),F(this,"setPreserve",function(r){n.preserve=r}),F(this,"watchList",[]),F(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(o){return o!==r})}}),F(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var o=n.getFieldsValue(),i=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(o,i,r)})}}),F(this,"timeoutId",null),F(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||yt(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),F(this,"updateStore",function(r){n.store=r}),F(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(o){return o.getNamePath().length}):n.fieldEntities}),F(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new Li;return n.getFieldEntities(r).forEach(function(i){var a=i.getNamePath();o.set(a,i)}),o}),F(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var o=n.getFieldsMap(!0);return r.map(function(i){var a=$n(i);return o.get(a)||{INVALIDATE_NAME_PATH:$n(i)}})}),F(this,"getFieldsValue",function(r,o){n.warningUnhooked();var i,a,s;if(r===!0||Array.isArray(r)?(i=r,a=o):r&&st(r)==="object"&&(s=r.strict,a=r.filter),i===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(i)?i:null),c=[];return l.forEach(function(u){var d,f,p="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var m,v;if((m=(v=u).isList)!==null&&m!==void 0&&m.call(v))return}else if(!i&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(p);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(p)}}),Rv(n.store,c.map($n))}),F(this,"getFieldValue",function(r){n.warningUnhooked();var o=$n(r);return Gr(n.store,o)}),F(this,"getFieldsError",function(r){n.warningUnhooked();var o=n.getFieldEntitiesForNamePathList(r);return o.map(function(i,a){return i&&!("INVALIDATE_NAME_PATH"in i)?{name:i.getNamePath(),errors:i.getErrors(),warnings:i.getWarnings()}:{name:$n(r[a]),errors:[],warnings:[]}})}),F(this,"getFieldError",function(r){n.warningUnhooked();var o=$n(r),i=n.getFieldsError([o])[0];return i.errors}),F(this,"getFieldWarning",function(r){n.warningUnhooked();var o=$n(r),i=n.getFieldsError([o])[0];return i.warnings}),F(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o[0],s=o[1],l,c=!1;o.length===0?l=null:o.length===1?Array.isArray(a)?(l=a.map($n),c=!1):(l=null,c=a):(l=a.map($n),c=s);var u=n.getFieldEntities(!0),d=function(g){return g.isFieldTouched()};if(!l)return c?u.every(function(v){return d(v)||v.isList()}):u.some(d);var f=new Li;l.forEach(function(v){f.set(v,[])}),u.forEach(function(v){var g=v.getNamePath();l.forEach(function(y){y.every(function(b,C){return g[C]===b})&&f.update(y,function(b){return[].concat(Re(b),[v])})})});var p=function(g){return g.some(d)},m=f.map(function(v){var g=v.value;return g});return c?m.every(p):m.some(p)}),F(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),F(this,"isFieldsValidating",function(r){n.warningUnhooked();var o=n.getFieldEntities();if(!r)return o.some(function(a){return a.isFieldValidating()});var i=r.map($n);return o.some(function(a){var s=a.getNamePath();return oa(i,s)&&a.isFieldValidating()})}),F(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),F(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new Li,i=n.getFieldEntities(!0);i.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=o.get(u)||new Set;d.add({entity:l,value:c}),o.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),p=n.getInitialValue(f);if(p!==void 0)yt(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var m=o.get(f);if(m&&m.size>1)yt(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(m){var v=n.getFieldValue(f),g=u.isListField();!g&&(!r.skipExist||v===void 0)&&n.updateStore(Tr(n.store,f,Re(m)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=o.get(l);if(c){var u;(u=s).push.apply(u,Re(Re(c).map(function(d){return d.entity})))}})):s=i,a(s)}),F(this,"resetFields",function(r){n.warningUnhooked();var o=n.store;if(!r){n.updateStore(Ji(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(o,null,{type:"reset"}),n.notifyWatch();return}var i=r.map($n);i.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(Tr(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:i}),n.notifyObservers(o,i,{type:"reset"}),n.notifyWatch(i)}),F(this,"setFields",function(r){n.warningUnhooked();var o=n.store,i=[];r.forEach(function(a){var s=a.name,l=xt(a,K2),c=$n(s);i.push(c),"value"in l&&n.updateStore(Tr(n.store,c,l.value)),n.notifyObservers(o,[c],{type:"setField",data:a})}),n.notifyWatch(i)}),F(this,"getFields",function(){var r=n.getFieldEntities(!0),o=r.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=q(q({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return o}),F(this,"initEntityValue",function(r){var o=r.props.initialValue;if(o!==void 0){var i=r.getNamePath(),a=Gr(n.store,i);a===void 0&&n.updateStore(Tr(n.store,i,o))}}),F(this,"isMergedPreserve",function(r){var o=r!==void 0?r:n.preserve;return o??!0}),F(this,"registerField",function(r){n.fieldEntities.push(r);var o=r.getNamePath();if(n.notifyWatch([o]),r.props.initialValue!==void 0){var i=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(i,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(o);if(o.length&&n.getFieldValue(o)!==c&&n.fieldEntities.every(function(d){return!Cx(d.getNamePath(),o)})){var u=n.store;n.updateStore(Tr(u,o,c,!0)),n.notifyObservers(u,[o],{type:"remove"}),n.triggerDependenciesUpdate(u,o)}}n.notifyWatch([o])}}),F(this,"dispatch",function(r){switch(r.type){case"updateValue":{var o=r.namePath,i=r.value;n.updateValue(o,i);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),F(this,"notifyObservers",function(r,o,i){if(n.subscribable){var a=q(q({},i),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,o,a)})}else n.forceRootUpdate()}),F(this,"triggerDependenciesUpdate",function(r,o){var i=n.getDependencyChildrenFields(o);return i.length&&n.validateFields(i),n.notifyObservers(r,i,{type:"dependenciesUpdate",relatedFields:[o].concat(Re(i))}),i}),F(this,"updateValue",function(r,o){var i=$n(r),a=n.store;n.updateStore(Tr(n.store,i,o)),n.notifyObservers(a,[i],{type:"valueUpdate",source:"internal"}),n.notifyWatch([i]);var s=n.triggerDependenciesUpdate(a,i),l=n.callbacks.onValuesChange;if(l){var c=Rv(n.store,[i]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([i].concat(Re(s)))}),F(this,"setFieldsValue",function(r){n.warningUnhooked();var o=n.store;if(r){var i=Ji(n.store,r);n.updateStore(i)}n.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),F(this,"setFieldValue",function(r,o){n.setFields([{name:r,value:o,errors:[],warnings:[]}])}),F(this,"getDependencyChildrenFields",function(r){var o=new Set,i=[],a=new Li;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=$n(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!o.has(d)){o.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(i.push(f),l(f))}})};return s(r),i}),F(this,"triggerOnFieldsChange",function(r,o){var i=n.callbacks.onFieldsChange;if(i){var a=n.getFields();if(o){var s=new Li;o.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return oa(r,u)});l.length&&i(l,a)}}),F(this,"validateFields",function(r,o){n.warningUnhooked();var i,a;Array.isArray(r)||typeof r=="string"||typeof o=="string"?(i=r,a=o):a=r;var s=!!i,l=s?i.map($n):[],c=[],u=String(Date.now()),d=new Set,f=a||{},p=f.recursive,m=f.dirty;n.getFieldEntities(!0).forEach(function(b){if(s||l.push(b.getNamePath()),!(!b.props.rules||!b.props.rules.length)&&!(m&&!b.isFieldDirty())){var C=b.getNamePath();if(d.add(C.join(u)),!s||oa(l,C,p)){var x=b.validateRules(q({validateMessages:q(q({},yx),n.validateMessages)},a));c.push(x.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(S){var w,E=[],N=[];return(w=S.forEach)===null||w===void 0||w.call(S,function(O){var M=O.rule.warningOnly,I=O.errors;M?N.push.apply(N,Re(I)):E.push.apply(E,Re(I))}),E.length?Promise.reject({name:C,errors:E,warnings:N}):{name:C,errors:E,warnings:N}}))}}});var v=q2(c);n.lastValidatePromise=v,v.catch(function(b){return b}).then(function(b){var C=b.map(function(x){var S=x.name;return S});n.notifyObservers(n.store,C,{type:"validateFinish"}),n.triggerOnFieldsChange(C,b)});var g=v.then(function(){return n.lastValidatePromise===v?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(b){var C=b.filter(function(x){return x&&x.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:C,outOfDate:n.lastValidatePromise!==v})});g.catch(function(b){return b});var y=l.filter(function(b){return d.has(b.join(u))});return n.triggerOnFieldsChange(y),g}),F(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var o=n.callbacks.onFinish;if(o)try{o(r)}catch(i){console.error(i)}}).catch(function(r){var o=n.callbacks.onFinishFailed;o&&o(r)})}),this.forceRootUpdate=e});function wx(t){var e=h.useRef(),n=h.useState({}),r=ie(n,2),o=r[1];if(!e.current)if(t)e.current=t;else{var i=function(){o({})},a=new U2(i);e.current=a.getForm()}return[e.current]}var Xf=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),G2=function(e){var n=e.validateMessages,r=e.onFormChange,o=e.onFormFinish,i=e.children,a=h.useContext(Xf),s=h.useRef({});return h.createElement(Xf.Provider,{value:q(q({},a),{},{validateMessages:q(q({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){o&&o(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=q(q({},s.current),{},F({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=q({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)},X2=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],Y2=function(e,n){var r=e.name,o=e.initialValues,i=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,f=e.validateTrigger,p=f===void 0?"onChange":f,m=e.onValuesChange,v=e.onFieldsChange,g=e.onFinish,y=e.onFinishFailed,b=e.clearOnDestroy,C=xt(e,X2),x=h.useRef(null),S=h.useContext(Xf),w=wx(a),E=ie(w,1),N=E[0],O=N.getInternalHooks(ci),M=O.useSubscribe,I=O.setInitialValues,D=O.setCallbacks,k=O.setValidateMessages,P=O.setPreserve,j=O.destroyForm;h.useImperativeHandle(n,function(){return q(q({},N),{},{nativeElement:x.current})}),h.useEffect(function(){return S.registerForm(r,N),function(){S.unregisterForm(r)}},[S,N,r]),k(q(q({},S.validateMessages),d)),D({onValuesChange:m,onFieldsChange:function(H){if(S.triggerFormChange(r,H),v){for(var G=arguments.length,J=new Array(G>1?G-1:0),se=1;se<G;se++)J[se-1]=arguments[se];v.apply(void 0,[H].concat(J))}},onFinish:function(H){S.triggerFormFinish(r,H),g&&g(H)},onFinishFailed:y}),P(s);var A=h.useRef(null);I(o,!A.current),A.current||(A.current=!0),h.useEffect(function(){return function(){return j(b)}},[]);var T,_=typeof l=="function";if(_){var W=N.getFieldsValue(!0);T=l(W,N)}else T=l;M(!_);var L=h.useRef();h.useEffect(function(){F2(L.current||[],i||[])||N.setFields(i||[]),L.current=i},[i,N]);var V=h.useMemo(function(){return q(q({},N),{},{validateTrigger:p})},[N,p]),U=h.createElement(hc.Provider,{value:null},h.createElement(Sa.Provider,{value:V},T));return u===!1?U:h.createElement(u,De({},C,{ref:x,onSubmit:function(H){H.preventDefault(),H.stopPropagation(),N.submit()},onReset:function(H){var G;H.preventDefault(),N.resetFields(),(G=C.onReset)===null||G===void 0||G.call(C,H)}}),U)};function Pv(t){try{return JSON.stringify(t)}catch{return Math.random()}}var J2=process.env.NODE_ENV!=="production"?function(t){var e=t.join("__RC_FIELD_FORM_SPLIT__"),n=$.useRef(e);yt(n.current===e,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function Q2(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],o=e[1],i=o===void 0?{}:o,a=a2(i)?{form:i}:i,s=a.form,l=$.useState(),c=ie(l,2),u=c[0],d=c[1],f=$.useMemo(function(){return Pv(u)},[u]),p=$.useRef(f);p.current=f;var m=$.useContext(Sa),v=s||m,g=v&&v._init;process.env.NODE_ENV!=="production"&&yt(e.length===2?s?g:!0:g,"useWatch requires a form instance since it can not auto detect from context.");var y=$n(r),b=$.useRef(y);return b.current=y,J2(y),$.useEffect(function(){if(g){var C=v.getFieldsValue,x=v.getInternalHooks,S=x(ci),w=S.registerWatch,E=function(I,D){var k=a.preserve?D:I;return typeof r=="function"?r(k):Gr(k,b.current)},N=w(function(M,I){var D=E(M,I),k=Pv(D);p.current!==k&&(p.current=k,d(D))}),O=E(C(),C(!0));return u!==O&&d(O),N}},[g]),u}var Z2=h.forwardRef(Y2),zs=Z2;zs.FormProvider=G2;zs.Field=Sx;zs.List=W2;zs.useForm=wx;zs.useWatch=Q2;const Nr=h.createContext({});process.env.NODE_ENV!=="production"&&(Nr.displayName="FormItemInputContext");const e_=t=>{let{children:e,status:n,override:r}=t;const o=h.useContext(Nr),i=h.useMemo(()=>{const a=Object.assign({},o);return r&&delete a.isFormItemInput,n&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[n,r,o]);return h.createElement(Nr.Provider,{value:i},e)},t_=h.createContext(void 0),qo=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let o=r;return n&&(o=$.createElement(e_,{override:!0,status:!0},o)),e&&(o=$.createElement(eD,null,o)),o};function Av(t){if(t)return{closable:t.closable,closeIcon:t.closeIcon}}function Dv(t){const{closable:e,closeIcon:n}=t||{};return $.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(r=Object.assign(Object.assign({},r),e)),r},[e,n])}function kv(){const t={};for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(o=>{o&&Object.keys(o).forEach(i=>{o[i]!==void 0&&(t[i]=o[i])})}),t}const n_={};function r_(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n_;const r=Dv(t),o=Dv(e),i=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,a=$.useMemo(()=>Object.assign({closeIcon:$.createElement(Rs,null)},n),[n]),s=$.useMemo(()=>r===!1?!1:r?kv(a,o,r):o===!1?!1:o?kv(a,o):a.closable?a:!1,[r,o,a]);return $.useMemo(()=>{if(s===!1)return[!1,null,i];const{closeIconRender:l}=a,{closeIcon:c}=s;let u=c;if(u!=null){l&&(u=l(c));const d=Zr(s,!0);Object.keys(d).length&&(u=$.isValidElement(u)?$.cloneElement(u,d):$.createElement("span",Object.assign({},d),u))}return[!0,u,i]},[s,a])}const o_=()=>Gn()&&window.document.documentElement,ru=t=>{const{prefixCls:e,className:n,style:r,size:o,shape:i}=t,a=ee({[`${e}-lg`]:o==="large",[`${e}-sm`]:o==="small"}),s=ee({[`${e}-circle`]:i==="circle",[`${e}-square`]:i==="square",[`${e}-round`]:i==="round"}),l=h.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return h.createElement("span",{className:ee(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},i_=new qt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ou=t=>({height:t,lineHeight:re(t)}),ia=t=>Object.assign({width:t},ou(t)),a_=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:i_,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),md=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},ou(t)),s_=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},ia(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},ia(o)),[`${e}${e}-sm`]:Object.assign({},ia(i))}},l_=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=t;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},md(e,s)),[`${r}-lg`]:Object.assign({},md(o,s)),[`${r}-sm`]:Object.assign({},md(i,s))}},_v=t=>Object.assign({width:t},ou(t)),c_=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:i}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:o},_v(i(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},_v(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},gd=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},vd=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},ou(t)),u_=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},vd(r,s))},gd(t,r,n)),{[`${n}-lg`]:Object.assign({},vd(o,s))}),gd(t,o,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},vd(i,s))}),gd(t,i,`${n}-sm`))},d_=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:p,borderRadius:m,titleHeight:v,blockRadius:g,paragraphLiHeight:y,controlHeightXS:b,paragraphMarginTop:C}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},ia(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},ia(c)),[`${n}-sm`]:Object.assign({},ia(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:v,background:d,borderRadius:g,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:b}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${r}, ${o} > li`]:{borderRadius:m}}},[`${e}-with-avatar ${e}-content`]:{[r]:{marginBlockStart:p,[`+ ${o}`]:{marginBlockStart:C}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},u_(t)),s_(t)),l_(t)),c_(t)),[`${e}${e}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[`
|
|
329
|
-
${r},
|
|
330
|
-
${o} > li,
|
|
331
|
-
${n},
|
|
332
|
-
${i},
|
|
333
|
-
${a},
|
|
334
|
-
${s}
|
|
335
|
-
`]:Object.assign({},a_(t))}}},f_=t=>{const{colorFillContent:e,colorFill:n}=t,r=e,o=n;return{color:r,colorGradientEnd:o,gradientFromColor:r,gradientToColor:o,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},$a=hn("Skeleton",t=>{const{componentCls:e,calc:n}=t,r=Lt(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[d_(r)]},f_,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),h_=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,shape:i="circle",size:a="default"}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=$a(l),f=Tn(t,["prefixCls","className"]),p=ee(l,`${l}-element`,{[`${l}-active`]:o},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(ru,Object.assign({prefixCls:`${l}-avatar`,shape:i,size:a},f))))},p_=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,block:i=!1,size:a="default"}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=$a(l),f=Tn(t,["prefixCls"]),p=ee(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(ru,Object.assign({prefixCls:`${l}-button`,size:a},f))))},m_="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",g_=t=>{const{prefixCls:e,className:n,rootClassName:r,style:o,active:i}=t,{getPrefixCls:a}=h.useContext(At),s=a("skeleton",e),[l,c,u]=$a(s),d=ee(s,`${s}-element`,{[`${s}-active`]:i},n,r,c,u);return l(h.createElement("div",{className:d},h.createElement("div",{className:ee(`${s}-image`,n),style:o},h.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},h.createElement("title",null,"Image placeholder"),h.createElement("path",{d:m_,className:`${s}-image-path`})))))},v_=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,block:i,size:a="default"}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=$a(l),f=Tn(t,["prefixCls"]),p=ee(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(ru,Object.assign({prefixCls:`${l}-input`,size:a},f))))},b_=t=>{const{prefixCls:e,className:n,rootClassName:r,style:o,active:i,children:a}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=$a(l),f=ee(l,`${l}-element`,{[`${l}-active`]:i},u,n,r,d);return c(h.createElement("div",{className:f},h.createElement("div",{className:ee(`${l}-image`,n),style:o},a)))},y_=(t,e)=>{const{width:n,rows:r=2}=e;if(Array.isArray(n))return n[t];if(r-1===t)return n},C_=t=>{const{prefixCls:e,className:n,style:r,rows:o=0}=t,i=Array.from({length:o}).map((a,s)=>h.createElement("li",{key:s,style:{width:y_(s,t)}}));return h.createElement("ul",{className:ee(e,n),style:r},i)},S_=t=>{let{prefixCls:e,className:n,width:r,style:o}=t;return h.createElement("h3",{className:ee(e,n),style:Object.assign({width:r},o)})};function bd(t){return t&&typeof t=="object"?t:{}}function x_(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function w_(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function E_(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Di=t=>{const{prefixCls:e,loading:n,className:r,rootClassName:o,style:i,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=t,{getPrefixCls:f,direction:p,className:m,style:v}=br("skeleton"),g=f("skeleton",e),[y,b,C]=$a(g);if(n||!("loading"in t)){const x=!!s,S=!!l,w=!!c;let E;if(x){const M=Object.assign(Object.assign({prefixCls:`${g}-avatar`},x_(S,w)),bd(s));E=h.createElement("div",{className:`${g}-header`},h.createElement(ru,Object.assign({},M)))}let N;if(S||w){let M;if(S){const D=Object.assign(Object.assign({prefixCls:`${g}-title`},w_(x,w)),bd(l));M=h.createElement(S_,Object.assign({},D))}let I;if(w){const D=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},E_(x,S)),bd(c));I=h.createElement(C_,Object.assign({},D))}N=h.createElement("div",{className:`${g}-content`},M,I)}const O=ee(g,{[`${g}-with-avatar`]:x,[`${g}-active`]:u,[`${g}-rtl`]:p==="rtl",[`${g}-round`]:d},m,r,o,b,C);return y(h.createElement("div",{className:O,style:Object.assign(Object.assign({},v),i)},E,N))}return a??null};Di.Button=p_;Di.Avatar=h_;Di.Input=v_;Di.Image=g_;Di.Node=b_;process.env.NODE_ENV!=="production"&&(Di.displayName="Skeleton");function Bv(){}const $_=h.createContext({add:Bv,remove:Bv});function O_(t){const e=h.useContext($_),n=h.useRef(null);return Wt(o=>{if(o){const i=t?o.querySelector(t):o;e.add(i),n.current=i}else e.remove(n.current)})}const zv=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=$.useContext(_s);return $.createElement(vo,Object.assign({onClick:n},t),e)},jv=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:r,onOk:o}=$.useContext(_s);return $.createElement(vo,Object.assign({},GS(n),{loading:t,onClick:o},e),r)};function Ex(t,e){return $.createElement("span",{className:`${t}-close-x`},e||$.createElement(Rs,{className:`${t}-close-icon`}))}const $x=t=>{const{okText:e,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=t,[u]=So("Modal",eS()),d=e||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),p={confirmLoading:o,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:i,onCancel:a},m=$.useMemo(()=>p,Re(Object.values(p)));let v;return typeof c=="function"||typeof c>"u"?(v=$.createElement($.Fragment,null,$.createElement(zv,null),$.createElement(jv,null)),typeof c=="function"&&(v=c(v,{OkBtn:jv,CancelBtn:zv})),v=$.createElement(fx,{value:m},v)):v=c,$.createElement(lS,{disabled:!1},v)},N_=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},M_=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},I_=(t,e)=>{const{prefixCls:n,componentCls:r,gridColumns:o}=t,i={};for(let a=o;a>=0;a--)a===0?(i[`${r}${e}-${a}`]={display:"none"},i[`${r}-push-${a}`]={insetInlineStart:"auto"},i[`${r}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${e}-push-${a}`]={insetInlineStart:"auto"},i[`${r}${e}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${e}-offset-${a}`]={marginInlineStart:0},i[`${r}${e}-order-${a}`]={order:0}):(i[`${r}${e}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/o*100}%`,maxWidth:`${a/o*100}%`}],i[`${r}${e}-push-${a}`]={insetInlineStart:`${a/o*100}%`},i[`${r}${e}-pull-${a}`]={insetInlineEnd:`${a/o*100}%`},i[`${r}${e}-offset-${a}`]={marginInlineStart:`${a/o*100}%`},i[`${r}${e}-order-${a}`]={order:a});return i[`${r}${e}-flex`]={flex:`var(--${n}${e}-flex)`},i},Yf=(t,e)=>I_(t,e),R_=(t,e,n)=>({[`@media (min-width: ${re(e)})`]:Object.assign({},Yf(t,n))}),T_=()=>({}),P_=()=>({});hn("Grid",N_,T_);const Ox=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin});hn("Grid",t=>{const e=Lt(t,{gridColumns:24}),n=Ox(e);return delete n.xs,[M_(e),Yf(e,""),Yf(e,"-xs"),Object.keys(n).map(r=>R_(e,n[r],`-${r}`)).reduce((r,o)=>Object.assign(Object.assign({},r),o),{})]},P_);function Lv(t){return{position:t,inset:0}}const A_=t=>{const{componentCls:e,antCls:n}=t;return[{[`${e}-root`]:{[`${e}${n}-zoom-enter, ${e}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${n}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:Object.assign(Object.assign({},Lv("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},Lv("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:_D(t)}]},D_=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${re(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},Hn(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${re(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:Object.assign({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:re(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},ya(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${re(t.borderRadiusLG)} ${re(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${re(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content,
|
|
336
|
-
${e}-body,
|
|
337
|
-
${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},k_=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},__=t=>{const{componentCls:e}=t,n=Ox(t);delete n.xs;const r=Object.keys(n).map(o=>({[`@media (min-width: ${re(n[o])})`]:{width:`var(--${e.replace(".","")}-${o}-width)`}}));return{[`${e}-root`]:{[e]:[{width:`var(--${e.replace(".","")}-xs-width)`}].concat(Re(r))}}},Nx=t=>{const e=t.padding,n=t.fontSizeHeading5,r=t.lineHeightHeading5;return Lt(t,{modalHeaderHeight:t.calc(t.calc(r).mul(n).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},Mx=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${re(t.paddingMD)} ${re(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${re(t.padding)} ${re(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${re(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${re(t.paddingXS)} ${re(t.padding)}`:0,footerBorderTop:t.wireframe?`${re(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${re(t.borderRadiusLG)} ${re(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${re(t.padding*2)} ${re(t.padding*2)} ${re(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),Ix=hn("Modal",t=>{const e=Nx(t);return[D_(e),k_(e),A_(e),Ds(e,"zoom"),__(e)]},Mx,{unitless:{titleLineHeight:!0}});var B_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let Jf;const z_=t=>{Jf={x:t.pageX,y:t.pageY},setTimeout(()=>{Jf=null},100)};o_()&&document.documentElement.addEventListener("click",z_,!0);const Rx=t=>{var e;const{getPopupContainer:n,getPrefixCls:r,direction:o,modal:i}=h.useContext(At),a=J=>{const{onCancel:se}=t;se==null||se(J)},s=J=>{const{onOk:se}=t;se==null||se(J)};if(process.env.NODE_ENV!=="production"){const J=on("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(se=>{let[X,de]=se;J.deprecated(!(X in t),X,de)})}const{prefixCls:l,className:c,rootClassName:u,open:d,wrapClassName:f,centered:p,getContainer:m,focusTriggerAfterClose:v=!0,style:g,visible:y,width:b=520,footer:C,classNames:x,styles:S,children:w,loading:E}=t,N=B_(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading"]),O=r("modal",l),M=r(),I=xo(O),[D,k,P]=Ix(O,I),j=ee(f,{[`${O}-centered`]:p??(i==null?void 0:i.centered),[`${O}-wrap-rtl`]:o==="rtl"}),A=C!==null&&!E?h.createElement($x,Object.assign({},t,{onOk:s,onCancel:a})):null,[T,_,W]=r_(Av(t),Av(i),{closable:!0,closeIcon:h.createElement(Rs,{className:`${O}-close-icon`}),closeIconRender:J=>Ex(O,J)}),L=O_(`.${O}-content`),[V,U]=Ps("Modal",N.zIndex),[Y,H]=h.useMemo(()=>b&&typeof b=="object"?[void 0,b]:[b,void 0],[b]),G=h.useMemo(()=>{const J={};return H&&Object.keys(H).forEach(se=>{const X=H[se];X!==void 0&&(J[`--${O}-${se}-width`]=typeof X=="number"?`${X}px`:X)}),J},[H]);return D(h.createElement(qo,{form:!0,space:!0},h.createElement(Ts.Provider,{value:U},h.createElement(gx,Object.assign({width:Y},N,{zIndex:V,getContainer:m===void 0?n:m,prefixCls:O,rootClassName:ee(k,u,P,I),footer:A,visible:d??y,mousePosition:(e=N.mousePosition)!==null&&e!==void 0?e:Jf,onClose:a,closable:T&&{disabled:W,closeIcon:_},closeIcon:_,focusTriggerAfterClose:v,transitionName:Oi(M,"zoom",t.transitionName),maskTransitionName:Oi(M,"fade",t.maskTransitionName),className:ee(k,c,i==null?void 0:i.className),style:Object.assign(Object.assign(Object.assign({},i==null?void 0:i.style),g),G),classNames:Object.assign(Object.assign(Object.assign({},i==null?void 0:i.classNames),x),{wrapper:ee(j,x==null?void 0:x.wrapper)}),styles:Object.assign(Object.assign({},i==null?void 0:i.styles),S),panelRef:L}),E?h.createElement(Di,{active:!0,title:!1,paragraph:{rows:4},className:`${O}-body-skeleton`}):w))))},j_=t=>{const{componentCls:e,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=t,u=`${e}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},lc()),[`&${e} ${e}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(l).sub(o).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(s).sub(o).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS,maxWidth:`calc(100% - ${re(t.marginSM)})`},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${re(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${u}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:t.colorText,fontSize:i,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${u}-error ${u}-body > ${t.iconCls}`]:{color:t.colorError},[`${u}-warning ${u}-body > ${t.iconCls},
|
|
338
|
-
${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},L_=gS(["Modal","confirm"],t=>{const e=Nx(t);return[j_(e)]},Mx,{order:-1e3});var F_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function Tx(t){const{prefixCls:e,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:s,footer:l,locale:c}=t,u=F_(t,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const E=on("Modal");process.env.NODE_ENV!=="production"&&E(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`)}let d=n;if(!n&&n!==null)switch(a){case"info":d=h.createElement(BS,null);break;case"success":d=h.createElement(kS,null);break;case"error":d=h.createElement(qc,null);break;default:d=h.createElement(_S,null)}const f=s??a==="confirm",p=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",[m]=So("Modal"),v=c||m,g=r||(f?v==null?void 0:v.okText:v==null?void 0:v.justOkText),y=o||(v==null?void 0:v.cancelText),b=Object.assign({autoFocusButton:p,cancelTextLocale:y,okTextLocale:g,mergedOkCancel:f},u),C=h.useMemo(()=>b,Re(Object.values(b))),x=h.createElement(h.Fragment,null,h.createElement(pv,null),h.createElement(mv,null)),S=t.title!==void 0&&t.title!==null,w=`${i}-body`;return h.createElement("div",{className:`${i}-body-wrapper`},h.createElement("div",{className:ee(w,{[`${w}-has-title`]:S})},d,h.createElement("div",{className:`${i}-paragraph`},S&&h.createElement("span",{className:`${i}-title`},t.title),h.createElement("div",{className:`${i}-content`},t.content))),l===void 0||typeof l=="function"?h.createElement(fx,{value:C},h.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(x,{OkBtn:mv,CancelBtn:pv}):x)):l,h.createElement(L_,{prefixCls:e}))}const Px=t=>{const{close:e,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=t;if(process.env.NODE_ENV!=="production"){const x=on("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(S=>{let[w,E]=S;x.deprecated(!(w in t),w,E)})}const f=`${i}-confirm`,p=t.width||416,m=t.style||{},v=t.mask===void 0?!0:t.mask,g=t.maskClosable===void 0?!1:t.maskClosable,y=ee(f,`${f}-${t.type}`,{[`${f}-rtl`]:o==="rtl"},t.className),[,b]=ar(),C=h.useMemo(()=>n!==void 0?n:b.zIndexPopupBase+jS,[n,b]);return h.createElement(Rx,Object.assign({},t,{className:y,wrapClassName:ee({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:Oi(s||"","zoom",t.transitionName),maskTransitionName:Oi(s||"","fade",t.maskTransitionName),mask:v,maskClosable:g,style:m,styles:Object.assign({body:l,mask:r},d),width:p,zIndex:C,closable:c}),h.createElement(Tx,Object.assign({},t,{confirmPrefixCls:f})))},bp=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:o}=t;return h.createElement(ro,{prefixCls:e,iconPrefixCls:n,direction:r,theme:o},h.createElement(Px,Object.assign({},t)))};process.env.NODE_ENV!=="production"&&(Px.displayName="ConfirmDialog",bp.displayName="ConfirmDialogWrapper");const ui=[];let Ax="";function Dx(){return Ax}const H_=t=>{var e,n;const{prefixCls:r,getContainer:o,direction:i}=t,a=eS(),s=$.useContext(At),l=Dx()||s.getPrefixCls(),c=r||`${l}-modal`;let u=o;return u===!1&&(u=void 0,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&Ti(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),$.createElement(bp,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:i??s.direction,locale:(n=(e=s.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function js(t){const e=QP();process.env.NODE_ENV!=="production"&&!e.holderRender&&UP("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),o,i;function a(){for(var u,d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];if(f.some(g=>g==null?void 0:g.triggerCancel)){var v;(u=t.onCancel)===null||u===void 0||(v=u).call.apply(v,[t,()=>{}].concat(Re(f.slice(1))))}for(let g=0;g<ui.length;g++)if(ui[g]===l){ui.splice(g,1);break}i()}function s(u){clearTimeout(o),o=setTimeout(()=>{const d=e.getPrefixCls(void 0,Dx()),f=e.getIconPrefixCls(),p=e.getTheme(),m=$.createElement(H_,Object.assign({},u));i=FS()($.createElement(ro,{prefixCls:d,iconPrefixCls:f,theme:p},e.holderRender?e.holderRender(m):m),n)})}function l(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,d)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),ui.push(l),{destroy:l,update:c}}function kx(t){return Object.assign(Object.assign({},t),{type:"warning"})}function _x(t){return Object.assign(Object.assign({},t),{type:"info"})}function Bx(t){return Object.assign(Object.assign({},t),{type:"success"})}function zx(t){return Object.assign(Object.assign({},t),{type:"error"})}function jx(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function V_(t){let{rootPrefixCls:e}=t;process.env.NODE_ENV!=="production"&&Ti(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),Ax=e}var W_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const q_=(t,e)=>{var n,{afterClose:r,config:o}=t,i=W_(t,["afterClose","config"]);const[a,s]=h.useState(!0),[l,c]=h.useState(o),{direction:u,getPrefixCls:d}=h.useContext(At),f=d("modal"),p=d(),m=()=>{var b;r(),(b=l.afterClose)===null||b===void 0||b.call(l)},v=function(){var b;s(!1);for(var C=arguments.length,x=new Array(C),S=0;S<C;S++)x[S]=arguments[S];if(x.some(N=>N==null?void 0:N.triggerCancel)){var E;(b=l.onCancel)===null||b===void 0||(E=b).call.apply(E,[l,()=>{}].concat(Re(x.slice(1))))}};h.useImperativeHandle(e,()=>({destroy:v,update:b=>{c(C=>Object.assign(Object.assign({},C),b))}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[y]=So("Modal",$i.Modal);return h.createElement(bp,Object.assign({prefixCls:f,rootPrefixCls:p},l,{close:v,open:a,afterClose:m,okText:l.okText||(g?y==null?void 0:y.okText:y==null?void 0:y.justOkText),direction:l.direction||u,cancelText:l.cancelText||(y==null?void 0:y.cancelText)},i))},K_=h.forwardRef(q_);let Fv=0;const U_=h.memo(h.forwardRef((t,e)=>{const[n,r]=PA();return h.useImperativeHandle(e,()=>({patchElement:r}),[]),h.createElement(h.Fragment,null,n)}));function G_(){const t=h.useRef(null),[e,n]=h.useState([]);h.useEffect(()=>{e.length&&(Re(e).forEach(a=>{a()}),n([]))},[e]);const r=h.useCallback(i=>function(s){var l;Fv+=1;const c=h.createRef();let u;const d=new Promise(g=>{u=g});let f=!1,p;const m=h.createElement(K_,{key:`modal-${Fv}`,config:i(s),ref:c,afterClose:()=>{p==null||p()},isSilent:()=>f,onConfirm:g=>{u(g)}});return p=(l=t.current)===null||l===void 0?void 0:l.patchElement(m),p&&ui.push(p),{destroy:()=>{function g(){var y;(y=c.current)===null||y===void 0||y.destroy()}c.current?g():n(y=>[].concat(Re(y),[g]))},update:g=>{function y(){var b;(b=c.current)===null||b===void 0||b.update(g)}c.current?y():n(b=>[].concat(Re(b),[y]))},then:g=>(f=!0,d.then(g))}},[]);return[h.useMemo(()=>({info:r(_x),success:r(Bx),error:r(zx),warning:r(kx),confirm:r(jx)}),[]),h.createElement(U_,{key:"modal-holder",ref:t})]}function Lx(t){return e=>h.createElement(ro,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(t,Object.assign({},e)))}const yp=(t,e,n,r,o)=>Lx(a=>{const{prefixCls:s,style:l}=a,c=h.useRef(null),[u,d]=h.useState(0),[f,p]=h.useState(0),[m,v]=mn(!1,{value:a.open}),{getPrefixCls:g}=h.useContext(At),y=g(r||"select",s);h.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(w=>{const E=w[0].target;d(E.offsetHeight+8),p(E.offsetWidth)}),S=setInterval(()=>{var w;const E=o?`.${o(y)}`:`.${y}-dropdown`,N=(w=c.current)===null||w===void 0?void 0:w.querySelector(E);N&&(clearInterval(S),x.observe(N))},10);return()=>{clearInterval(S),x.disconnect()}}},[]);let b=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:m,visible:m,getPopupContainer:()=>c.current});n&&(b=n(b)),e&&Object.assign(b,{[e]:{overflow:{adjustX:!1,adjustY:!1}}});const C={paddingBottom:u,position:"relative",minWidth:f};return h.createElement("div",{ref:c,style:C},h.createElement(t,Object.assign({},b)))}),Cp=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var iu=function(e){var n=e.className,r=e.customizeIcon,o=e.customizeIconProps,i=e.children,a=e.onMouseDown,s=e.onClick,l=typeof r=="function"?r(o):r;return h.createElement("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:h.createElement("span",{className:ee(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},X_=function(e,n,r,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=$.useMemo(function(){if(st(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=$.useMemo(function(){return!!(!a&&o&&(r.length||s)&&!(l==="combobox"&&s===""))},[o,a,r.length,s,l]);return{allowClear:u,clearIcon:$.createElement(iu,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},Fx=h.createContext(null);function Y_(){return h.useContext(Fx)}function J_(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=h.useState(!1),n=ie(e,2),r=n[0],o=n[1],i=h.useRef(null),a=function(){window.clearTimeout(i.current)};h.useEffect(function(){return a},[]);var s=function(c,u){a(),i.current=window.setTimeout(function(){o(c),u&&u()},t)};return[r,s,a]}function Hx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=h.useRef(null),n=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(o){(o||e.current===null)&&(e.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function Q_(t,e,n,r){var o=h.useRef(null);o.current={open:e,triggerOpen:n,customizedTrigger:r},h.useEffect(function(){function i(a){var s;if(!((s=o.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),o.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",i),function(){return window.removeEventListener("mousedown",i)}},[])}function Z_(t){return t&&![Je.ESC,Je.SHIFT,Je.BACKSPACE,Je.TAB,Je.WIN_KEY,Je.ALT,Je.META,Je.WIN_KEY_RIGHT,Je.CTRL,Je.SEMICOLON,Je.EQUALS,Je.CAPS_LOCK,Je.CONTEXT_MENU,Je.F1,Je.F2,Je.F3,Je.F4,Je.F5,Je.F6,Je.F7,Je.F8,Je.F9,Je.F10,Je.F11,Je.F12].includes(t)}var eB=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Fi=void 0;function tB(t,e){var n=t.prefixCls,r=t.invalidate,o=t.item,i=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,f=t.children,p=t.display,m=t.order,v=t.component,g=v===void 0?"div":v,y=xt(t,eB),b=a&&!p;function C(N){l(c,N)}h.useEffect(function(){return function(){C(null)}},[]);var x=i&&o!==Fi?i(o,{index:m}):f,S;r||(S={opacity:b?0:1,height:b?0:Fi,overflowY:b?"hidden":Fi,order:a?m:Fi,pointerEvents:b?"none":Fi,position:b?"absolute":Fi});var w={};b&&(w["aria-hidden"]=!0);var E=h.createElement(g,De({className:ee(!r&&n,u),style:q(q({},S),d)},w,y,{ref:e}),x);return a&&(E=h.createElement(Co,{onResize:function(O){var M=O.offsetWidth;C(M)},disabled:s},E)),E}var ts=h.forwardRef(tB);ts.displayName="Item";function nB(t){if(typeof MessageChannel>"u")Dt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function rB(){var t=h.useRef(null),e=function(r){t.current||(t.current=[],nB(function(){_r.unstable_batchedUpdates(function(){t.current.forEach(function(o){o()}),t.current=null})})),t.current.push(r)};return e}function Ba(t,e){var n=h.useState(e),r=ie(n,2),o=r[0],i=r[1],a=Wt(function(s){t(function(){i(s)})});return[o,a]}var pc=$.createContext(null),oB=["component"],iB=["className"],aB=["className"],sB=function(e,n){var r=h.useContext(pc);if(!r){var o=e.component,i=o===void 0?"div":o,a=xt(e,oB);return h.createElement(i,De({},a,{ref:n}))}var s=r.className,l=xt(r,iB),c=e.className,u=xt(e,aB);return h.createElement(pc.Provider,{value:null},h.createElement(ts,De({ref:n,className:ee(s,c)},l,u)))},Vx=h.forwardRef(sB);Vx.displayName="RawItem";var lB=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Wx="responsive",qx="invalidate";function cB(t){return"+ ".concat(t.length," ...")}function uB(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,o=t.data,i=o===void 0?[]:o,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,f=t.style,p=t.className,m=t.maxCount,v=t.renderRest,g=t.renderRawRest,y=t.suffix,b=t.component,C=b===void 0?"div":b,x=t.itemComponent,S=t.onVisibleChange,w=xt(t,lB),E=d==="full",N=rB(),O=Ba(N,null),M=ie(O,2),I=M[0],D=M[1],k=I||0,P=Ba(N,new Map),j=ie(P,2),A=j[0],T=j[1],_=Ba(N,0),W=ie(_,2),L=W[0],V=W[1],U=Ba(N,0),Y=ie(U,2),H=Y[0],G=Y[1],J=Ba(N,0),se=ie(J,2),X=se[0],de=se[1],ye=$.useState(null),ce=ie(ye,2),oe=ce[0],me=ce[1],te=$.useState(null),le=ie(te,2),fe=le[0],Ee=le[1],Oe=h.useMemo(function(){return fe===null&&E?Number.MAX_SAFE_INTEGER:fe||0},[fe,I]),xe=$.useState(!1),Be=ie(xe,2),z=Be[0],ve=Be[1],ae="".concat(r,"-item"),he=Math.max(L,H),$e=m===Wx,Me=i.length&&$e,we=m===qx,ze=Me||typeof m=="number"&&i.length>m,Le=$.useMemo(function(){var Qe=i;return Me?I===null&&E?Qe=i:Qe=i.slice(0,Math.min(i.length,k/u)):typeof m=="number"&&(Qe=i.slice(0,m)),Qe},[i,u,I,m,Me]),Ie=$.useMemo(function(){return Me?i.slice(Oe+1):i.slice(Le.length)},[i,Le,Me,Oe]),We=$.useCallback(function(Qe,qe){var Ue;return typeof l=="function"?l(Qe):(Ue=l&&(Qe==null?void 0:Qe[l]))!==null&&Ue!==void 0?Ue:qe},[l]),Ke=$.useCallback(a||function(Qe){return Qe},[a]);function Pe(Qe,qe,Ue){fe===Qe&&(qe===void 0||qe===oe)||(Ee(Qe),Ue||(ve(Qe<i.length-1),S==null||S(Qe)),qe!==void 0&&me(qe))}function je(Qe,qe){D(qe.clientWidth)}function _e(Qe,qe){T(function(Ue){var wt=new Map(Ue);return qe===null?wt.delete(Qe):wt.set(Qe,qe),wt})}function Fe(Qe,qe){G(qe),V(H)}function Ze(Qe,qe){de(qe)}function ht(Qe){return A.get(We(Le[Qe],Qe))}Jt(function(){if(k&&typeof he=="number"&&Le){var Qe=X,qe=Le.length,Ue=qe-1;if(!qe){Pe(0,null);return}for(var wt=0;wt<qe;wt+=1){var Nt=ht(wt);if(E&&(Nt=Nt||0),Nt===void 0){Pe(wt-1,void 0,!0);break}if(Qe+=Nt,Ue===0&&Qe<=k||wt===Ue-1&&Qe+ht(Ue)<=k){Pe(Ue,null);break}else if(Qe+he>k){Pe(wt-1,Qe-Nt-X+H);break}}y&&ht(0)+X>k&&me(null)}},[k,A,H,X,We,Le]);var Tt=z&&!!Ie.length,Pt={};oe!==null&&Me&&(Pt={position:"absolute",left:oe,top:0});var an={prefixCls:ae,responsive:Me,component:x,invalidate:we},Ye=s?function(Qe,qe){var Ue=We(Qe,qe);return h.createElement(pc.Provider,{key:Ue,value:q(q({},an),{},{order:qe,item:Qe,itemKey:Ue,registerSize:_e,display:qe<=Oe})},s(Qe,qe))}:function(Qe,qe){var Ue=We(Qe,qe);return h.createElement(ts,De({},an,{order:qe,key:Ue,item:Qe,renderItem:Ke,itemKey:Ue,registerSize:_e,display:qe<=Oe}))},He={order:Tt?Oe:Number.MAX_SAFE_INTEGER,className:"".concat(ae,"-rest"),registerSize:Fe,display:Tt},lt=v||cB,it=g?h.createElement(pc.Provider,{value:q(q({},an),He)},g(Ie)):h.createElement(ts,De({},an,He),typeof lt=="function"?lt(Ie):lt),pt=h.createElement(C,De({className:ee(!we&&r,p),style:f,ref:e},w),Le.map(Ye),ze?it:null,y&&h.createElement(ts,De({},an,{responsive:$e,responsiveDisabled:!Me,order:Oe,className:"".concat(ae,"-suffix"),registerSize:Ze,display:!0,style:Pt}),y));return $e?h.createElement(Co,{onResize:je,disabled:!Me},pt):pt}var Xr=h.forwardRef(uB);Xr.displayName="Overflow";Xr.Item=Vx;Xr.RESPONSIVE=Wx;Xr.INVALIDATE=qx;var dB=function(e,n){var r,o=e.prefixCls,i=e.id,a=e.inputElement,s=e.disabled,l=e.tabIndex,c=e.autoFocus,u=e.autoComplete,d=e.editable,f=e.activeDescendantId,p=e.value,m=e.maxLength,v=e.onKeyDown,g=e.onMouseDown,y=e.onChange,b=e.onPaste,C=e.onCompositionStart,x=e.onCompositionEnd,S=e.onBlur,w=e.open,E=e.attrs,N=a||h.createElement("input",null),O=N,M=O.ref,I=O.props,D=I.onKeyDown,k=I.onChange,P=I.onMouseDown,j=I.onCompositionStart,A=I.onCompositionEnd,T=I.onBlur,_=I.style;return Qr(!("maxLength"in N.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),N=h.cloneElement(N,q(q(q({type:"search"},I),{},{id:i,ref:ir(n,M),disabled:s,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:ee("".concat(o,"-selection-search-input"),(r=N)===null||r===void 0||(r=r.props)===null||r===void 0?void 0:r.className),role:"combobox","aria-expanded":w||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":w?f:void 0},E),{},{value:d?p:"",maxLength:m,readOnly:!d,unselectable:d?null:"on",style:q(q({},_),{},{opacity:d?null:0}),onKeyDown:function(L){v(L),D&&D(L)},onMouseDown:function(L){g(L),P&&P(L)},onChange:function(L){y(L),k&&k(L)},onCompositionStart:function(L){C(L),j&&j(L)},onCompositionEnd:function(L){x(L),A&&A(L)},onPaste:b,onBlur:function(L){S(L),T&&T(L)}})),N},Sp=h.forwardRef(dB);process.env.NODE_ENV!=="production"&&(Sp.displayName="Input");function xp(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var fB=typeof window<"u"&&window.document&&window.document.documentElement,hB=process.env.NODE_ENV!=="test"&&fB;function pB(t){return t!=null}function mB(t){return!t&&t!==0}function Hv(t){return["string","number"].includes(st(t))}function Kx(t){var e=void 0;return t&&(Hv(t.title)?e=t.title.toString():Hv(t.label)&&(e=t.label.toString())),e}function gB(t,e){hB?h.useLayoutEffect(t,e):h.useEffect(t,e)}function vB(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Vv=function(e){e.preventDefault(),e.stopPropagation()},bB=function(e){var n=e.id,r=e.prefixCls,o=e.values,i=e.open,a=e.searchValue,s=e.autoClearSearchValue,l=e.inputRef,c=e.placeholder,u=e.disabled,d=e.mode,f=e.showSearch,p=e.autoFocus,m=e.autoComplete,v=e.activeDescendantId,g=e.tabIndex,y=e.removeIcon,b=e.maxTagCount,C=e.maxTagTextLength,x=e.maxTagPlaceholder,S=x===void 0?function(te){return"+ ".concat(te.length," ...")}:x,w=e.tagRender,E=e.onToggleOpen,N=e.onRemove,O=e.onInputChange,M=e.onInputPaste,I=e.onInputKeyDown,D=e.onInputMouseDown,k=e.onInputCompositionStart,P=e.onInputCompositionEnd,j=e.onInputBlur,A=h.useRef(null),T=$.useState(0),_=ie(T,2),W=_[0],L=_[1],V=$.useState(!1),U=ie(V,2),Y=U[0],H=U[1],G="".concat(r,"-selection"),J=i||d==="multiple"&&s===!1||d==="tags"?a:"",se=d==="tags"||d==="multiple"&&s===!1||f&&(i||Y);gB(function(){L(A.current.scrollWidth)},[J]);var X=function(le,fe,Ee,Oe,xe){return h.createElement("span",{title:Kx(le),className:ee("".concat(G,"-item"),F({},"".concat(G,"-item-disabled"),Ee))},h.createElement("span",{className:"".concat(G,"-item-content")},fe),Oe&&h.createElement(iu,{className:"".concat(G,"-item-remove"),onMouseDown:Vv,onClick:xe,customizeIcon:y},"×"))},de=function(le,fe,Ee,Oe,xe,Be){var z=function(ae){Vv(ae),E(!i)};return h.createElement("span",{onMouseDown:z},w({label:fe,value:le,disabled:Ee,closable:Oe,onClose:xe,isMaxTag:!!Be}))},ye=function(le){var fe=le.disabled,Ee=le.label,Oe=le.value,xe=!u&&!fe,Be=Ee;if(typeof C=="number"&&(typeof Ee=="string"||typeof Ee=="number")){var z=String(Be);z.length>C&&(Be="".concat(z.slice(0,C),"..."))}var ve=function(he){he&&he.stopPropagation(),N(le)};return typeof w=="function"?de(Oe,Be,fe,xe,ve):X(le,Be,fe,xe,ve)},ce=function(le){if(!o.length)return null;var fe=typeof S=="function"?S(le):S;return typeof w=="function"?de(void 0,fe,!1,!1,void 0,!0):X({title:fe},fe,!1)},oe=h.createElement("div",{className:"".concat(G,"-search"),style:{width:W},onFocus:function(){H(!0)},onBlur:function(){H(!1)}},h.createElement(Sp,{ref:l,open:i,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:p,autoComplete:m,editable:se,activeDescendantId:v,value:J,onKeyDown:I,onMouseDown:D,onChange:O,onPaste:M,onCompositionStart:k,onCompositionEnd:P,onBlur:j,tabIndex:g,attrs:Zr(e,!0)}),h.createElement("span",{ref:A,className:"".concat(G,"-search-mirror"),"aria-hidden":!0},J," ")),me=h.createElement(Xr,{prefixCls:"".concat(G,"-overflow"),data:o,renderItem:ye,renderRest:ce,suffix:oe,itemKey:vB,maxCount:b});return h.createElement("span",{className:"".concat(G,"-wrap")},me,!o.length&&!J&&h.createElement("span",{className:"".concat(G,"-placeholder")},c))},yB=function(e){var n=e.inputElement,r=e.prefixCls,o=e.id,i=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,p=e.placeholder,m=e.tabIndex,v=e.showSearch,g=e.searchValue,y=e.activeValue,b=e.maxLength,C=e.onInputKeyDown,x=e.onInputMouseDown,S=e.onInputChange,w=e.onInputPaste,E=e.onInputCompositionStart,N=e.onInputCompositionEnd,O=e.onInputBlur,M=e.title,I=h.useState(!1),D=ie(I,2),k=D[0],P=D[1],j=u==="combobox",A=j||v,T=f[0],_=g||"";j&&y&&!k&&(_=y),h.useEffect(function(){j&&P(!1)},[j,y]);var W=u!=="combobox"&&!d&&!v?!1:!!_,L=M===void 0?Kx(T):M,V=h.useMemo(function(){return T?null:h.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:W?{visibility:"hidden"}:void 0},p)},[T,W,p,r]);return h.createElement("span",{className:"".concat(r,"-selection-wrap")},h.createElement("span",{className:"".concat(r,"-selection-search")},h.createElement(Sp,{ref:i,prefixCls:r,id:o,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:A,activeDescendantId:c,value:_,onKeyDown:C,onMouseDown:x,onChange:function(Y){P(!0),S(Y)},onPaste:w,onCompositionStart:E,onCompositionEnd:N,onBlur:O,tabIndex:m,attrs:Zr(e,!0),maxLength:j?b:void 0})),!j&&T?h.createElement("span",{className:"".concat(r,"-selection-item"),title:L,style:W?{visibility:"hidden"}:void 0},T.label):null,V)},CB=function(e,n){var r=$.useRef(null),o=$.useRef(!1),i=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.prefix,f=e.autoClearSearchValue,p=e.onSearch,m=e.onSearchSubmit,v=e.onToggleOpen,g=e.onInputKeyDown,y=e.onInputBlur,b=e.domRef;h.useImperativeHandle(n,function(){return{focus:function(L){r.current.focus(L)},blur:function(){r.current.blur()}}});var C=Hx(0),x=ie(C,2),S=x[0],w=x[1],E=function(L){var V=L.which,U=r.current instanceof HTMLTextAreaElement;!U&&a&&(V===Je.UP||V===Je.DOWN)&&L.preventDefault(),g&&g(L),V===Je.ENTER&&s==="tags"&&!o.current&&!a&&(m==null||m(L.target.value)),!(U&&!a&&~[Je.UP,Je.DOWN,Je.LEFT,Je.RIGHT].indexOf(V))&&Z_(V)&&v(!0)},N=function(){w(!0)},O=$.useRef(null),M=function(L){p(L,!0,o.current)!==!1&&v(!0)},I=function(){o.current=!0},D=function(L){o.current=!1,s!=="combobox"&&M(L.target.value)},k=function(L){var V=L.target.value;if(c&&O.current&&/[\r\n]/.test(O.current)){var U=O.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");V=V.replace(U,O.current)}O.current=null,M(V)},P=function(L){var V=L.clipboardData,U=V==null?void 0:V.getData("text");O.current=U||""},j=function(L){var V=L.target;if(V!==r.current){var U=document.body.style.msTouchAction!==void 0;U?setTimeout(function(){r.current.focus()}):r.current.focus()}},A=function(L){var V=S();L.target!==r.current&&!V&&!(s==="combobox"&&u)&&L.preventDefault(),(s!=="combobox"&&(!l||!V)||!a)&&(a&&f!==!1&&p("",!0,!1),v())},T={inputRef:r,onInputKeyDown:E,onInputMouseDown:N,onInputChange:k,onInputPaste:P,onInputCompositionStart:I,onInputCompositionEnd:D,onInputBlur:y},_=s==="multiple"||s==="tags"?h.createElement(bB,De({},e,T)):h.createElement(yB,De({},e,T));return h.createElement("div",{ref:b,className:"".concat(i,"-selector"),onClick:j,onMouseDown:A},d&&h.createElement("div",{className:"".concat(i,"-prefix")},d),_)},Ux=h.forwardRef(CB);process.env.NODE_ENV!=="production"&&(Ux.displayName="Selector");function SB(t){var e=t.prefixCls,n=t.align,r=t.arrow,o=t.arrowPos,i=r||{},a=i.className,s=i.content,l=o.x,c=l===void 0?0:l,u=o.y,d=u===void 0?0:u,f=h.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(n.autoArrow!==!1){var m=n.points[0],v=n.points[1],g=m[0],y=m[1],b=v[0],C=v[1];g===b||!["t","b"].includes(g)?p.top=d:g==="t"?p.top=0:p.bottom=0,y===C||!["l","r"].includes(y)?p.left=c:y==="l"?p.left=0:p.right=0}return h.createElement("div",{ref:f,className:ee("".concat(e,"-arrow"),a),style:p},s)}function xB(t){var e=t.prefixCls,n=t.open,r=t.zIndex,o=t.mask,i=t.motion;return o?h.createElement(no,De({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return h.createElement("div",{style:{zIndex:r},className:ee("".concat(e,"-mask"),s)})}):null}var Gx=h.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(Gx.displayName="PopupContent");var Xx=h.forwardRef(function(t,e){var n=t.popup,r=t.className,o=t.prefixCls,i=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,f=t.mask,p=t.arrow,m=t.arrowPos,v=t.align,g=t.motion,y=t.maskMotion,b=t.forceRender,C=t.getPopupContainer,x=t.autoDestroy,S=t.portal,w=t.zIndex,E=t.onMouseEnter,N=t.onMouseLeave,O=t.onPointerEnter,M=t.onPointerDownCapture,I=t.ready,D=t.offsetX,k=t.offsetY,P=t.offsetR,j=t.offsetB,A=t.onAlign,T=t.onPrepare,_=t.stretch,W=t.targetWidth,L=t.targetHeight,V=typeof n=="function"?n():n,U=l||c,Y=(C==null?void 0:C.length)>0,H=h.useState(!C||!Y),G=ie(H,2),J=G[0],se=G[1];if(Jt(function(){!J&&Y&&a&&se(!0)},[J,Y,a]),!J)return null;var X="auto",de={left:"-1000vw",top:"-1000vh",right:X,bottom:X};if(I||!l){var ye,ce=v.points,oe=v.dynamicInset||((ye=v._experimental)===null||ye===void 0?void 0:ye.dynamicInset),me=oe&&ce[0][1]==="r",te=oe&&ce[0][0]==="b";me?(de.right=P,de.left=X):(de.left=D,de.right=X),te?(de.bottom=j,de.top=X):(de.top=k,de.bottom=X)}var le={};return _&&(_.includes("height")&&L?le.height=L:_.includes("minHeight")&&L&&(le.minHeight=L),_.includes("width")&&W?le.width=W:_.includes("minWidth")&&W&&(le.minWidth=W)),l||(le.pointerEvents="none"),h.createElement(S,{open:b||U,getContainer:C&&function(){return C(a)},autoDestroy:x},h.createElement(xB,{prefixCls:o,open:l,zIndex:w,mask:f,motion:y}),h.createElement(Co,{onResize:A,disabled:!l},function(fe){return h.createElement(no,De({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(o,"-hidden")},g,{onAppearPrepare:T,onEnterPrepare:T,visible:l,onVisibleChanged:function(Oe){var xe;g==null||(xe=g.onVisibleChanged)===null||xe===void 0||xe.call(g,Oe),s(Oe)}}),function(Ee,Oe){var xe=Ee.className,Be=Ee.style,z=ee(o,xe,r);return h.createElement("div",{ref:ir(fe,e,Oe),className:z,style:q(q(q(q({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},de),le),Be),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:E,onMouseLeave:N,onPointerEnter:O,onClick:d,onPointerDownCapture:M},p&&h.createElement(SB,{prefixCls:o,arrow:p,arrowPos:m,align:v}),h.createElement(Gx,{cache:!l&&!u},V))})}))});process.env.NODE_ENV!=="production"&&(Xx.displayName="Popup");var Yx=h.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,o=Qo(n),i=h.useCallback(function(s){Kh(e,r?r(s):s)},[r]),a=Jo(i,Ri(n));return o?h.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(Yx.displayName="TriggerWrapper");var Wv=h.createContext(null);function qv(t){return t?Array.isArray(t)?t:[t]:[]}function wB(t,e,n,r){return h.useMemo(function(){var o=qv(n??e),i=qv(r??e),a=new Set(o),s=new Set(i);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,n,r])}function EB(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function $B(t,e,n,r){for(var o=n.points,i=Object.keys(t),a=0;a<i.length;a+=1){var s,l=i[a];if(EB((s=t[l])===null||s===void 0?void 0:s.points,o,r))return"".concat(e,"-placement-").concat(l)}return""}function Kv(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function Ls(t){return t.ownerDocument.defaultView}function Qf(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=Ls(n).getComputedStyle(n),i=o.overflowX,a=o.overflowY,s=o.overflow;[i,a,s].some(function(l){return r.includes(l)})&&e.push(n),n=n.parentElement}return e}function xs(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function za(t){return xs(parseFloat(t),0)}function Uv(t,e){var n=q({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var o=Ls(r).getComputedStyle(r),i=o.overflow,a=o.overflowClipMargin,s=o.borderTopWidth,l=o.borderBottomWidth,c=o.borderLeftWidth,u=o.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,p=r.clientHeight,m=r.offsetWidth,v=r.clientWidth,g=za(s),y=za(l),b=za(c),C=za(u),x=xs(Math.round(d.width/m*1e3)/1e3),S=xs(Math.round(d.height/f*1e3)/1e3),w=(m-v-b-C)*x,E=(f-p-g-y)*S,N=g*S,O=y*S,M=b*x,I=C*x,D=0,k=0;if(i==="clip"){var P=za(a);D=P*x,k=P*S}var j=d.x+M-D,A=d.y+N-k,T=j+d.width+2*D-M-I-w,_=A+d.height+2*k-N-O-E;n.left=Math.max(n.left,j),n.top=Math.max(n.top,A),n.right=Math.min(n.right,T),n.bottom=Math.min(n.bottom,_)}}),n}function Gv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function Xv(t,e){var n=e||[],r=ie(n,2),o=r[0],i=r[1];return[Gv(t.width,o),Gv(t.height,i)]}function Yv(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function Hi(t,e){var n=e[0],r=e[1],o,i;return n==="t"?i=t.y:n==="b"?i=t.y+t.height:i=t.y+t.height/2,r==="l"?o=t.x:r==="r"?o=t.x+t.width:o=t.x+t.width/2,{x:o,y:i}}function $o(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,o){return o===e?n[r]||"c":r}).join("")}function OB(t,e,n,r,o,i,a){var s=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),l=ie(s,2),c=l[0],u=l[1],d=h.useRef(0),f=h.useMemo(function(){return e?Qf(e):[]},[e]),p=h.useRef({}),m=function(){p.current={}};t||m();var v=Wt(function(){if(e&&n&&t){let Wn=function(wo,Vr){var Ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he,Ra=H.x+wo,Us=H.y+Vr,vu=Ra+me,bu=Us+oe,yu=Math.max(Ra,Ir.left),ct=Math.max(Us,Ir.top),St=Math.min(vu,Ir.right),fn=Math.min(bu,Ir.bottom);return Math.max(0,(St-yu)*(fn-ct))},Ia=function(){Bt=H.y+Ue,Ht=Bt+oe,Xt=H.x+qe,Mn=Xt+me};var b,C,x,S,w=e,E=w.ownerDocument,N=Ls(w),O=N.getComputedStyle(w),M=O.width,I=O.height,D=O.position,k=w.style.left,P=w.style.top,j=w.style.right,A=w.style.bottom,T=w.style.overflow,_=q(q({},o[r]),i),W=E.createElement("div");(b=w.parentElement)===null||b===void 0||b.appendChild(W),W.style.left="".concat(w.offsetLeft,"px"),W.style.top="".concat(w.offsetTop,"px"),W.style.position=D,W.style.height="".concat(w.offsetHeight,"px"),W.style.width="".concat(w.offsetWidth,"px"),w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";var L;if(Array.isArray(n))L={x:n[0],y:n[1],width:0,height:0};else{var V,U,Y=n.getBoundingClientRect();Y.x=(V=Y.x)!==null&&V!==void 0?V:Y.left,Y.y=(U=Y.y)!==null&&U!==void 0?U:Y.top,L={x:Y.x,y:Y.y,width:Y.width,height:Y.height}}var H=w.getBoundingClientRect();H.x=(C=H.x)!==null&&C!==void 0?C:H.left,H.y=(x=H.y)!==null&&x!==void 0?x:H.top;var G=E.documentElement,J=G.clientWidth,se=G.clientHeight,X=G.scrollWidth,de=G.scrollHeight,ye=G.scrollTop,ce=G.scrollLeft,oe=H.height,me=H.width,te=L.height,le=L.width,fe={left:0,top:0,right:J,bottom:se},Ee={left:-ce,top:-ye,right:X-ce,bottom:de-ye},Oe=_.htmlRegion,xe="visible",Be="visibleFirst";Oe!=="scroll"&&Oe!==Be&&(Oe=xe);var z=Oe===Be,ve=Uv(Ee,f),ae=Uv(fe,f),he=Oe===xe?ae:ve,$e=z?ae:he;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Me=w.getBoundingClientRect();w.style.left=k,w.style.top=P,w.style.right=j,w.style.bottom=A,w.style.overflow=T,(S=w.parentElement)===null||S===void 0||S.removeChild(W);var we=xs(Math.round(me/parseFloat(M)*1e3)/1e3),ze=xs(Math.round(oe/parseFloat(I)*1e3)/1e3);if(we===0||ze===0||ds(n)&&!sp(n))return;var Le=_.offset,Ie=_.targetOffset,We=Xv(H,Le),Ke=ie(We,2),Pe=Ke[0],je=Ke[1],_e=Xv(L,Ie),Fe=ie(_e,2),Ze=Fe[0],ht=Fe[1];L.x-=Ze,L.y-=ht;var Tt=_.points||[],Pt=ie(Tt,2),an=Pt[0],Ye=Pt[1],He=Yv(Ye),lt=Yv(an),it=Hi(L,He),pt=Hi(H,lt),Qe=q({},_),qe=it.x-pt.x+Pe,Ue=it.y-pt.y+je,wt=Wn(qe,Ue),Nt=Wn(qe,Ue,ae),et=Hi(L,["t","l"]),Ve=Hi(H,["t","l"]),ot=Hi(L,["b","r"]),at=Hi(H,["b","r"]),nt=_.overflow||{},dt=nt.adjustX,kt=nt.adjustY,$t=nt.shiftX,Gt=nt.shiftY,It=function(Vr){return typeof Vr=="boolean"?Vr:Vr>=0},Bt,Ht,Xt,Mn;Ia();var Yt=It(kt),sn=lt[0]===He[0];if(Yt&<[0]==="t"&&(Ht>$e.bottom||p.current.bt)){var ke=Ue;sn?ke-=oe-te:ke=et.y-at.y-je;var rt=Wn(qe,ke),Xe=Wn(qe,ke,ae);rt>wt||rt===wt&&(!z||Xe>=Nt)?(p.current.bt=!0,Ue=ke,je=-je,Qe.points=[$o(lt,0),$o(He,0)]):p.current.bt=!1}if(Yt&<[0]==="b"&&(Bt<$e.top||p.current.tb)){var Ae=Ue;sn?Ae+=oe-te:Ae=ot.y-Ve.y-je;var ft=Wn(qe,Ae),Et=Wn(qe,Ae,ae);ft>wt||ft===wt&&(!z||Et>=Nt)?(p.current.tb=!0,Ue=Ae,je=-je,Qe.points=[$o(lt,0),$o(He,0)]):p.current.tb=!1}var Ot=It(dt),ln=lt[1]===He[1];if(Ot&<[1]==="l"&&(Mn>$e.right||p.current.rl)){var en=qe;ln?en-=me-le:en=et.x-at.x-Pe;var dn=Wn(en,Ue),cn=Wn(en,Ue,ae);dn>wt||dn===wt&&(!z||cn>=Nt)?(p.current.rl=!0,qe=en,Pe=-Pe,Qe.points=[$o(lt,1),$o(He,1)]):p.current.rl=!1}if(Ot&<[1]==="r"&&(Xt<$e.left||p.current.lr)){var tn=qe;ln?tn+=me-le:tn=ot.x-Ve.x-Pe;var En=Wn(tn,Ue),In=Wn(tn,Ue,ae);En>wt||En===wt&&(!z||In>=Nt)?(p.current.lr=!0,qe=tn,Pe=-Pe,Qe.points=[$o(lt,1),$o(He,1)]):p.current.lr=!1}Ia();var R=$t===!0?0:$t;typeof R=="number"&&(Xt<ae.left&&(qe-=Xt-ae.left-Pe,L.x+le<ae.left+R&&(qe+=L.x-ae.left+le-R)),Mn>ae.right&&(qe-=Mn-ae.right-Pe,L.x>ae.right-R&&(qe+=L.x-ae.right+R)));var K=Gt===!0?0:Gt;typeof K=="number"&&(Bt<ae.top&&(Ue-=Bt-ae.top-je,L.y+te<ae.top+K&&(Ue+=L.y-ae.top+te-K)),Ht>ae.bottom&&(Ue-=Ht-ae.bottom-je,L.y>ae.bottom-K&&(Ue+=L.y-ae.bottom+K)));var B=H.x+qe,Z=B+me,ne=H.y+Ue,Q=ne+oe,Ce=L.x,ge=Ce+le,ue=L.y,be=ue+te,Se=Math.max(B,Ce),Te=Math.min(Z,ge),tt=(Se+Te)/2,bt=tt-B,Ct=Math.max(ne,ue),zt=Math.min(Q,be),jt=(Ct+zt)/2,nn=jt-ne;a==null||a(e,Qe);var gn=Me.right-H.x-(qe+H.width),pn=Me.bottom-H.y-(Ue+H.height);we===1&&(qe=Math.round(qe),gn=Math.round(gn)),ze===1&&(Ue=Math.round(Ue),pn=Math.round(pn));var ei={ready:!0,offsetX:qe/we,offsetY:Ue/ze,offsetR:gn/we,offsetB:pn/ze,arrowX:bt/we,arrowY:nn/ze,scaleX:we,scaleY:ze,align:Qe};u(ei)}}),g=function(){d.current+=1;var C=d.current;Promise.resolve().then(function(){d.current===C&&v()})},y=function(){u(function(C){return q(q({},C),{},{ready:!1})})};return Jt(y,[r]),Jt(function(){t||y()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function NB(t,e,n,r,o){Jt(function(){if(t&&e&&n){let d=function(){r(),o()};var i=e,a=n,s=Qf(i),l=Qf(a),c=Ls(a),u=new Set([c].concat(Re(s),Re(l)));return u.forEach(function(f){f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),function(){u.forEach(function(f){f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[t,e,n])}function MB(t,e,n,r,o,i,a,s){var l=h.useRef(t);l.current=t;var c=h.useRef(!1);h.useEffect(function(){if(e&&r&&(!o||i)){var d=function(){c.current=!1},f=function(x){var S;l.current&&!a(((S=x.composedPath)===null||S===void 0||(S=S.call(x))===null||S===void 0?void 0:S[0])||x.target)&&!c.current&&s(!1)},p=Ls(r);p.addEventListener("pointerdown",d,!0),p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0);var m=uc(n);if(m&&(m.addEventListener("mousedown",f,!0),m.addEventListener("contextmenu",f,!0)),process.env.NODE_ENV!=="production"){var v,g,y=n==null||(v=n.getRootNode)===null||v===void 0?void 0:v.call(n),b=(g=r.getRootNode)===null||g===void 0?void 0:g.call(r);Qr(y===b,"trigger element and popup element should in same shadow root.")}return function(){p.removeEventListener("pointerdown",d,!0),p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0),m&&(m.removeEventListener("mousedown",f,!0),m.removeEventListener("contextmenu",f,!0))}}},[e,n,r,o,i]);function u(){c.current=!0}return u}var IB=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function RB(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tu,e=h.forwardRef(function(n,r){var o=n.prefixCls,i=o===void 0?"rc-trigger-popup":o,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,p=n.onPopupVisibleChange,m=n.afterPopupVisibleChange,v=n.mouseEnterDelay,g=n.mouseLeaveDelay,y=g===void 0?.1:g,b=n.focusDelay,C=n.blurDelay,x=n.mask,S=n.maskClosable,w=S===void 0?!0:S,E=n.getPopupContainer,N=n.forceRender,O=n.autoDestroy,M=n.destroyPopupOnHide,I=n.popup,D=n.popupClassName,k=n.popupStyle,P=n.popupPlacement,j=n.builtinPlacements,A=j===void 0?{}:j,T=n.popupAlign,_=n.zIndex,W=n.stretch,L=n.getPopupClassNameFromAlign,V=n.fresh,U=n.alignPoint,Y=n.onPopupClick,H=n.onPopupAlign,G=n.arrow,J=n.popupMotion,se=n.maskMotion,X=n.popupTransitionName,de=n.popupAnimation,ye=n.maskTransitionName,ce=n.maskAnimation,oe=n.className,me=n.getTriggerDOMNode,te=xt(n,IB),le=O||M||!1,fe=h.useState(!1),Ee=ie(fe,2),Oe=Ee[0],xe=Ee[1];Jt(function(){xe(Cp())},[]);var Be=h.useRef({}),z=h.useContext(Wv),ve=h.useMemo(function(){return{registerSubPopup:function(St,fn){Be.current[St]=fn,z==null||z.registerSubPopup(St,fn)}}},[z]),ae=nu(),he=h.useState(null),$e=ie(he,2),Me=$e[0],we=$e[1],ze=h.useRef(null),Le=Wt(function(ct){ze.current=ct,ds(ct)&&Me!==ct&&we(ct),z==null||z.registerSubPopup(ae,ct)}),Ie=h.useState(null),We=ie(Ie,2),Ke=We[0],Pe=We[1],je=h.useRef(null),_e=Wt(function(ct){ds(ct)&&Ke!==ct&&(Pe(ct),je.current=ct)}),Fe=h.Children.only(a),Ze=(Fe==null?void 0:Fe.props)||{},ht={},Tt=Wt(function(ct){var St,fn,Rn=Ke;return(Rn==null?void 0:Rn.contains(ct))||((St=uc(Rn))===null||St===void 0?void 0:St.host)===ct||ct===Rn||(Me==null?void 0:Me.contains(ct))||((fn=uc(Me))===null||fn===void 0?void 0:fn.host)===ct||ct===Me||Object.values(Be.current).some(function(vn){return(vn==null?void 0:vn.contains(ct))||ct===vn})}),Pt=Kv(i,J,de,X),an=Kv(i,se,ce,ye),Ye=h.useState(f||!1),He=ie(Ye,2),lt=He[0],it=He[1],pt=d??lt,Qe=Wt(function(ct){d===void 0&&it(ct)});Jt(function(){it(d||!1)},[d]);var qe=h.useRef(pt);qe.current=pt;var Ue=h.useRef([]);Ue.current=[];var wt=Wt(function(ct){var St;Qe(ct),((St=Ue.current[Ue.current.length-1])!==null&&St!==void 0?St:pt)!==ct&&(Ue.current.push(ct),p==null||p(ct))}),Nt=h.useRef(),et=function(){clearTimeout(Nt.current)},Ve=function(St){var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;et(),fn===0?wt(St):Nt.current=setTimeout(function(){wt(St)},fn*1e3)};h.useEffect(function(){return et},[]);var ot=h.useState(!1),at=ie(ot,2),nt=at[0],dt=at[1];Jt(function(ct){(!ct||pt)&&dt(!0)},[pt]);var kt=h.useState(null),$t=ie(kt,2),Gt=$t[0],It=$t[1],Bt=h.useState(null),Ht=ie(Bt,2),Xt=Ht[0],Mn=Ht[1],Yt=function(St){Mn([St.clientX,St.clientY])},sn=OB(pt,Me,U&&Xt!==null?Xt:Ke,P,A,T,H),ke=ie(sn,11),rt=ke[0],Xe=ke[1],Ae=ke[2],ft=ke[3],Et=ke[4],Ot=ke[5],ln=ke[6],en=ke[7],dn=ke[8],cn=ke[9],tn=ke[10],En=wB(Oe,l,c,u),In=ie(En,2),R=In[0],K=In[1],B=R.has("click"),Z=K.has("click")||K.has("contextMenu"),ne=Wt(function(){nt||tn()}),Q=function(){qe.current&&U&&Z&&Ve(!1)};NB(pt,Ke,Me,ne,Q),Jt(function(){ne()},[Xt,P]),Jt(function(){pt&&!(A!=null&&A[P])&&ne()},[JSON.stringify(T)]);var Ce=h.useMemo(function(){var ct=$B(A,i,cn,U);return ee(ct,L==null?void 0:L(cn))},[cn,L,A,i,U]);h.useImperativeHandle(r,function(){return{nativeElement:je.current,popupElement:ze.current,forceAlign:ne}});var ge=h.useState(0),ue=ie(ge,2),be=ue[0],Se=ue[1],Te=h.useState(0),tt=ie(Te,2),bt=tt[0],Ct=tt[1],zt=function(){if(W&&Ke){var St=Ke.getBoundingClientRect();Se(St.width),Ct(St.height)}},jt=function(){zt(),ne()},nn=function(St){dt(!1),tn(),m==null||m(St)},gn=function(){return new Promise(function(St){zt(),It(function(){return St})})};Jt(function(){Gt&&(tn(),Gt(),It(null))},[Gt]);function pn(ct,St,fn,Rn){ht[ct]=function(vn){var Gs;Rn==null||Rn(vn),Ve(St,fn);for(var Cu=arguments.length,Qp=new Array(Cu>1?Cu-1:0),Xs=1;Xs<Cu;Xs++)Qp[Xs-1]=arguments[Xs];(Gs=Ze[ct])===null||Gs===void 0||Gs.call.apply(Gs,[Ze,vn].concat(Qp))}}(B||Z)&&(ht.onClick=function(ct){var St;qe.current&&Z?Ve(!1):!qe.current&&B&&(Yt(ct),Ve(!0));for(var fn=arguments.length,Rn=new Array(fn>1?fn-1:0),vn=1;vn<fn;vn++)Rn[vn-1]=arguments[vn];(St=Ze.onClick)===null||St===void 0||St.call.apply(St,[Ze,ct].concat(Rn))});var ei=MB(pt,Z,Ke,Me,x,w,Tt,Ve),Wn=R.has("hover"),Ia=K.has("hover"),wo,Vr;Wn&&(pn("onMouseEnter",!0,v,function(ct){Yt(ct)}),pn("onPointerEnter",!0,v,function(ct){Yt(ct)}),wo=function(St){(pt||nt)&&Me!==null&&Me!==void 0&&Me.contains(St.target)&&Ve(!0,v)},U&&(ht.onMouseMove=function(ct){var St;(St=Ze.onMouseMove)===null||St===void 0||St.call(Ze,ct)})),Ia&&(pn("onMouseLeave",!1,y),pn("onPointerLeave",!1,y),Vr=function(){Ve(!1,y)}),R.has("focus")&&pn("onFocus",!0,b),K.has("focus")&&pn("onBlur",!1,C),R.has("contextMenu")&&(ht.onContextMenu=function(ct){var St;qe.current&&K.has("contextMenu")?Ve(!1):(Yt(ct),Ve(!0)),ct.preventDefault();for(var fn=arguments.length,Rn=new Array(fn>1?fn-1:0),vn=1;vn<fn;vn++)Rn[vn-1]=arguments[vn];(St=Ze.onContextMenu)===null||St===void 0||St.call.apply(St,[Ze,ct].concat(Rn))}),oe&&(ht.className=ee(Ze.className,oe));var Ir=q(q({},Ze),ht),Ra={},Us=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Us.forEach(function(ct){te[ct]&&(Ra[ct]=function(){for(var St,fn=arguments.length,Rn=new Array(fn),vn=0;vn<fn;vn++)Rn[vn]=arguments[vn];(St=Ir[ct])===null||St===void 0||St.call.apply(St,[Ir].concat(Rn)),te[ct].apply(te,Rn)})});var vu=h.cloneElement(Fe,q(q({},Ir),Ra)),bu={x:Ot,y:ln},yu=G?q({},G!==!0?G:{}):null;return h.createElement(h.Fragment,null,h.createElement(Co,{disabled:!pt,ref:_e,onResize:jt},h.createElement(Yx,{getTriggerDOMNode:me},vu)),h.createElement(Wv.Provider,{value:ve},h.createElement(Xx,{portal:t,ref:Le,prefixCls:i,popup:I,className:ee(D,Ce),style:k,target:Ke,onMouseEnter:wo,onMouseLeave:Vr,onPointerEnter:wo,zIndex:_,open:pt,keepDom:nt,fresh:V,onClick:Y,onPointerDownCapture:ei,mask:x,motion:Pt,maskMotion:an,onVisibleChanged:nn,onPrepare:gn,forceRender:N,autoDestroy:le,getPopupContainer:E,align:cn,arrow:yu,arrowPos:bu,ready:rt,offsetX:Xe,offsetY:Ae,offsetR:ft,offsetB:Et,onAlign:ne,stretch:W,targetWidth:be/en,targetHeight:bt/dn})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const au=RB(tu);var TB=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],PB=function(e){var n=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},AB=function(e,n){var r=e.prefixCls;e.disabled;var o=e.visible,i=e.children,a=e.popupElement,s=e.animation,l=e.transitionName,c=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,f=d===void 0?"ltr":d,p=e.placement,m=e.builtinPlacements,v=e.dropdownMatchSelectWidth,g=e.dropdownRender,y=e.dropdownAlign,b=e.getPopupContainer,C=e.empty,x=e.getTriggerDOMNode,S=e.onPopupVisibleChange,w=e.onPopupMouseEnter,E=xt(e,TB),N="".concat(r,"-dropdown"),O=a;g&&(O=g(a));var M=h.useMemo(function(){return m||PB(v)},[m,v]),I=s?"".concat(N,"-").concat(s):l,D=typeof v=="number",k=h.useMemo(function(){return D?null:v===!1?"minWidth":"width"},[v,D]),P=c;D&&(P=q(q({},P),{},{width:v}));var j=h.useRef(null);return h.useImperativeHandle(n,function(){return{getPopupElement:function(){var T;return(T=j.current)===null||T===void 0?void 0:T.popupElement}}}),h.createElement(au,De({},E,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:p||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:M,prefixCls:N,popupTransitionName:I,popup:h.createElement("div",{onMouseEnter:w},O),ref:j,stretch:k,popupAlign:y,popupVisible:o,getPopupContainer:b,popupClassName:ee(u,F({},"".concat(N,"-empty"),C)),popupStyle:P,getTriggerDOMNode:x,onPopupVisibleChange:S}),i)},Jx=h.forwardRef(AB);process.env.NODE_ENV!=="production"&&(Jx.displayName="SelectTrigger");function Jv(t,e){var n=t.key,r;return"value"in t&&(r=t.value),n??(r!==void 0?r:"rc-index-key-".concat(e))}function Zf(t){return typeof t<"u"&&!Number.isNaN(t)}function Qx(t,e){var n=t||{},r=n.label,o=n.value,i=n.options,a=n.groupLabel,s=r||(e?"children":"label");return{label:s,value:o||"value",options:i||"options",groupLabel:a||s}}function DB(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,o=[],i=Qx(n,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(p){if(f||!(l in p)){var m=p[s];o.push({key:Jv(p,o.length),groupOption:f,data:p,label:p[a],value:m})}else{var v=p[c];v===void 0&&r&&(v=p.label),o.push({key:Jv(p,o.length),group:!0,data:p,label:v}),u(p[l],!0)}})}return u(t,!1),o}function eh(t){var e=q({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return yt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var kB=function(e,n,r){if(!n||!n.length)return null;var o=!1,i=function s(l,c){var u=XC(c),d=u[0],f=u.slice(1);if(!d)return[l];var p=l.split(d);return o=o||p.length>1,p.reduce(function(m,v){return[].concat(Re(m),Re(s(v,f)))},[]).filter(Boolean)},a=i(e,n);return o?typeof r<"u"?a.slice(0,r):a:null},wp=h.createContext(null);function _B(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(o){var i=o.label,a=o.value;return["number","string"].includes(st(i))?i:a}).join(", ")),n.length>r?", ...":null)}var BB=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],zB=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],mc=function(e){return e==="tags"||e==="multiple"},Zx=h.forwardRef(function(t,e){var n,r=t.id,o=t.prefixCls,i=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,f=t.emptyOptions,p=t.notFoundContent,m=p===void 0?"Not Found":p,v=t.onClear,g=t.mode,y=t.disabled,b=t.loading,C=t.getInputElement,x=t.getRawInputElement,S=t.open,w=t.defaultOpen,E=t.onDropdownVisibleChange,N=t.activeValue,O=t.onActiveValueChange,M=t.activeDescendantId,I=t.searchValue,D=t.autoClearSearchValue,k=t.onSearch,P=t.onSearchSplit,j=t.tokenSeparators,A=t.allowClear,T=t.prefix,_=t.suffixIcon,W=t.clearIcon,L=t.OptionList,V=t.animation,U=t.transitionName,Y=t.dropdownStyle,H=t.dropdownClassName,G=t.dropdownMatchSelectWidth,J=t.dropdownRender,se=t.dropdownAlign,X=t.placement,de=t.builtinPlacements,ye=t.getPopupContainer,ce=t.showAction,oe=ce===void 0?[]:ce,me=t.onFocus,te=t.onBlur,le=t.onKeyUp,fe=t.onKeyDown,Ee=t.onMouseDown,Oe=xt(t,BB),xe=mc(g),Be=(a!==void 0?a:xe)||g==="combobox",z=q({},Oe);zB.forEach(function(ge){delete z[ge]}),c==null||c.forEach(function(ge){delete z[ge]});var ve=h.useState(!1),ae=ie(ve,2),he=ae[0],$e=ae[1];h.useEffect(function(){$e(Cp())},[]);var Me=h.useRef(null),we=h.useRef(null),ze=h.useRef(null),Le=h.useRef(null),Ie=h.useRef(null),We=h.useRef(!1),Ke=J_(),Pe=ie(Ke,3),je=Pe[0],_e=Pe[1],Fe=Pe[2];h.useImperativeHandle(e,function(){var ge,ue;return{focus:(ge=Le.current)===null||ge===void 0?void 0:ge.focus,blur:(ue=Le.current)===null||ue===void 0?void 0:ue.blur,scrollTo:function(Se){var Te;return(Te=Ie.current)===null||Te===void 0?void 0:Te.scrollTo(Se)},nativeElement:Me.current||we.current}});var Ze=h.useMemo(function(){var ge;if(g!=="combobox")return I;var ue=(ge=u[0])===null||ge===void 0?void 0:ge.value;return typeof ue=="string"||typeof ue=="number"?String(ue):""},[I,g,u]),ht=g==="combobox"&&typeof C=="function"&&C()||null,Tt=typeof x=="function"&&x(),Pt=Jo(we,Tt==null||(n=Tt.props)===null||n===void 0?void 0:n.ref),an=h.useState(!1),Ye=ie(an,2),He=Ye[0],lt=Ye[1];Jt(function(){lt(!0)},[]);var it=mn(!1,{defaultValue:w,value:S}),pt=ie(it,2),Qe=pt[0],qe=pt[1],Ue=He?Qe:!1,wt=!m&&f;(y||wt&&Ue&&g==="combobox")&&(Ue=!1);var Nt=wt?!1:Ue,et=h.useCallback(function(ge){var ue=ge!==void 0?ge:!Ue;y||(qe(ue),Ue!==ue&&(E==null||E(ue)))},[y,Ue,qe,E]),Ve=h.useMemo(function(){return(j||[]).some(function(ge){return[`
|
|
339
|
-
`,`\r
|
|
340
|
-
`].includes(ge)})},[j]),ot=h.useContext(wp)||{},at=ot.maxCount,nt=ot.rawValues,dt=function(ue,be,Se){if(!(xe&&Zf(at)&&(nt==null?void 0:nt.size)>=at)){var Te=!0,tt=ue;O==null||O(null);var bt=kB(ue,j,Zf(at)?at-nt.size:void 0),Ct=Se?null:bt;return g!=="combobox"&&Ct&&(tt="",P==null||P(Ct),et(!1),Te=!1),k&&Ze!==tt&&k(tt,{source:be?"typing":"effect"}),Te}},kt=function(ue){!ue||!ue.trim()||k(ue,{source:"submit"})};h.useEffect(function(){!Ue&&!xe&&g!=="combobox"&&dt("",!1,!1)},[Ue]),h.useEffect(function(){Qe&&y&&qe(!1),y&&!We.current&&_e(!1)},[y]);var $t=Hx(),Gt=ie($t,2),It=Gt[0],Bt=Gt[1],Ht=h.useRef(!1),Xt=function(ue){var be=It(),Se=ue.key,Te=Se==="Enter";if(Te&&(g!=="combobox"&&ue.preventDefault(),Ue||et(!0)),Bt(!!Ze),Se==="Backspace"&&!be&&xe&&!Ze&&u.length){for(var tt=Re(u),bt=null,Ct=tt.length-1;Ct>=0;Ct-=1){var zt=tt[Ct];if(!zt.disabled){tt.splice(Ct,1),bt=zt;break}}bt&&d(tt,{type:"remove",values:[bt]})}for(var jt=arguments.length,nn=new Array(jt>1?jt-1:0),gn=1;gn<jt;gn++)nn[gn-1]=arguments[gn];if(Ue&&(!Te||!Ht.current)){var pn;Te&&(Ht.current=!0),(pn=Ie.current)===null||pn===void 0||pn.onKeyDown.apply(pn,[ue].concat(nn))}fe==null||fe.apply(void 0,[ue].concat(nn))},Mn=function(ue){for(var be=arguments.length,Se=new Array(be>1?be-1:0),Te=1;Te<be;Te++)Se[Te-1]=arguments[Te];if(Ue){var tt;(tt=Ie.current)===null||tt===void 0||tt.onKeyUp.apply(tt,[ue].concat(Se))}ue.key==="Enter"&&(Ht.current=!1),le==null||le.apply(void 0,[ue].concat(Se))},Yt=function(ue){var be=u.filter(function(Se){return Se!==ue});d(be,{type:"remove",values:[ue]})},sn=function(){Ht.current=!1},ke=h.useRef(!1),rt=function(){_e(!0),y||(me&&!ke.current&&me.apply(void 0,arguments),oe.includes("focus")&&et(!0)),ke.current=!0},Xe=function(){We.current=!0,_e(!1,function(){ke.current=!1,We.current=!1,et(!1)}),!y&&(Ze&&(g==="tags"?k(Ze,{source:"submit"}):g==="multiple"&&k("",{source:"blur"})),te&&te.apply(void 0,arguments))},Ae=[];h.useEffect(function(){return function(){Ae.forEach(function(ge){return clearTimeout(ge)}),Ae.splice(0,Ae.length)}},[]);var ft=function(ue){var be,Se=ue.target,Te=(be=ze.current)===null||be===void 0?void 0:be.getPopupElement();if(Te&&Te.contains(Se)){var tt=setTimeout(function(){var jt=Ae.indexOf(tt);if(jt!==-1&&Ae.splice(jt,1),Fe(),!he&&!Te.contains(document.activeElement)){var nn;(nn=Le.current)===null||nn===void 0||nn.focus()}});Ae.push(tt)}for(var bt=arguments.length,Ct=new Array(bt>1?bt-1:0),zt=1;zt<bt;zt++)Ct[zt-1]=arguments[zt];Ee==null||Ee.apply(void 0,[ue].concat(Ct))},Et=h.useState({}),Ot=ie(Et,2),ln=Ot[1];function en(){ln({})}var dn;Tt&&(dn=function(ue){et(ue)}),Q_(function(){var ge;return[Me.current,(ge=ze.current)===null||ge===void 0?void 0:ge.getPopupElement()]},Nt,et,!!Tt);var cn=h.useMemo(function(){return q(q({},t),{},{notFoundContent:m,open:Ue,triggerOpen:Nt,id:r,showSearch:Be,multiple:xe,toggleOpen:et})},[t,m,Nt,Ue,r,Be,xe,et]),tn=!!_||b,En;tn&&(En=h.createElement(iu,{className:ee("".concat(o,"-arrow"),F({},"".concat(o,"-arrow-loading"),b)),customizeIcon:_,customizeIconProps:{loading:b,searchValue:Ze,open:Ue,focused:je,showSearch:Be}}));var In=function(){var ue;v==null||v(),(ue=Le.current)===null||ue===void 0||ue.focus(),d([],{type:"clear",values:u}),dt("",!1,!1)},R=X_(o,In,u,A,W,y,Ze,g),K=R.allowClear,B=R.clearIcon,Z=h.createElement(L,{ref:Ie}),ne=ee(o,i,F(F(F(F(F(F(F(F(F(F({},"".concat(o,"-focused"),je),"".concat(o,"-multiple"),xe),"".concat(o,"-single"),!xe),"".concat(o,"-allow-clear"),A),"".concat(o,"-show-arrow"),tn),"".concat(o,"-disabled"),y),"".concat(o,"-loading"),b),"".concat(o,"-open"),Ue),"".concat(o,"-customize-input"),ht),"".concat(o,"-show-search"),Be)),Q=h.createElement(Jx,{ref:ze,disabled:y,prefixCls:o,visible:Nt,popupElement:Z,animation:V,transitionName:U,dropdownStyle:Y,dropdownClassName:H,direction:l,dropdownMatchSelectWidth:G,dropdownRender:J,dropdownAlign:se,placement:X,builtinPlacements:de,getPopupContainer:ye,empty:f,getTriggerDOMNode:function(ue){return we.current||ue},onPopupVisibleChange:dn,onPopupMouseEnter:en},Tt?h.cloneElement(Tt,{ref:Pt}):h.createElement(Ux,De({},t,{domRef:we,prefixCls:o,inputElement:ht,ref:Le,id:r,prefix:T,showSearch:Be,autoClearSearchValue:D,mode:g,activeDescendantId:M,tagRender:s,values:u,open:Ue,onToggleOpen:et,activeValue:N,searchValue:Ze,onSearch:dt,onSearchSubmit:kt,onRemove:Yt,tokenWithEnter:Ve,onInputBlur:sn}))),Ce;return Tt?Ce=Q:Ce=h.createElement("div",De({className:ne},z,{ref:Me,onMouseDown:ft,onKeyDown:Xt,onKeyUp:Mn,onFocus:rt,onBlur:Xe}),h.createElement(_B,{visible:je&&!Ue,values:u}),Q,En,K&&B),h.createElement(Fx.Provider,{value:cn},Ce)});process.env.NODE_ENV!=="production"&&(Zx.displayName="BaseSelect");var Ep=function(){return null};Ep.isSelectOptGroup=!0;var $p=function(){return null};$p.isSelectOption=!0;var e1=h.forwardRef(function(t,e){var n=t.height,r=t.offsetY,o=t.offsetX,i=t.children,a=t.prefixCls,s=t.onInnerResize,l=t.innerProps,c=t.rtl,u=t.extra,d={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},f=q(q({},f),{},F(F(F(F(F({transform:"translateY(".concat(r,"px)")},c?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:d},h.createElement(Co,{onResize:function(m){var v=m.offsetHeight;v&&s&&s()}},h.createElement("div",De({style:f,className:ee(F({},"".concat(a,"-holder-inner"),a)),ref:e},l),i,u)))});e1.displayName="Filler";function jB(t){var e=t.children,n=t.setRef,r=h.useCallback(function(o){n(o)},[]);return h.cloneElement(e,{ref:r})}function LB(t,e,n,r,o,i,a,s){var l=s.getKey;return t.slice(e,n+1).map(function(c,u){var d=e+u,f=a(c,d,{style:{width:r},offsetX:o}),p=l(c);return h.createElement(jB,{key:p,setRef:function(v){return i(c,v)}},f)})}function FB(t,e,n){var r=t.length,o=e.length,i,a;if(r===0&&o===0)return null;r<o?(i=t,a=e):(i=e,a=t);var s={__EMPTY_ITEM__:!0};function l(m){return m!==void 0?n(m):s}for(var c=null,u=Math.abs(r-o)!==1,d=0;d<a.length;d+=1){var f=l(i[d]),p=l(a[d]);if(f!==p){c=d,u=u||f!==l(a[d+1]);break}}return c===null?null:{index:c,multiple:u}}function HB(t,e,n){var r=h.useState(t),o=ie(r,2),i=o[0],a=o[1],s=h.useState(null),l=ie(s,2),c=l[0],u=l[1];return h.useEffect(function(){var d=FB(i||[],t||[],e);(d==null?void 0:d.index)!==void 0&&u(t[d.index]),a(t)},[t]),[c]}var Qv=(typeof navigator>"u"?"undefined":st(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const t1=function(t,e,n,r){var o=$.useRef(!1),i=$.useRef(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=$.useRef({top:t,bottom:e,left:n,right:r});return s.current.top=t,s.current.bottom=e,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(i.current),o.current=!1):(!d||o.current)&&a(),!o.current&&d}};function VB(t,e,n,r,o,i,a){var s=$.useRef(0),l=$.useRef(null),c=$.useRef(null),u=$.useRef(!1),d=t1(e,n,r,o);function f(b,C){if(Dt.cancel(l.current),!d(!1,C)){var x=b;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=C,c.current=C,Qv||x.preventDefault(),l.current=Dt(function(){var S=u.current?10:1;a(s.current*S,!1),s.current=0})}}function p(b,C){a(C,!0),Qv||b.preventDefault()}var m=$.useRef(null),v=$.useRef(null);function g(b){if(t){Dt.cancel(v.current),v.current=Dt(function(){m.current=null},2);var C=b.deltaX,x=b.deltaY,S=b.shiftKey,w=C,E=x;(m.current==="sx"||!m.current&&S&&x&&!C)&&(w=x,E=0,m.current="sx");var N=Math.abs(w),O=Math.abs(E);m.current===null&&(m.current=i&&N>O?"x":"y"),m.current==="y"?f(b,E):p(b,w)}}function y(b){t&&(u.current=b.detail===c.current)}return[g,y]}function WB(t,e,n,r){var o=h.useMemo(function(){return[new Map,[]]},[t,n.id,r]),i=ie(o,2),a=i[0],s=i[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),p=a.get(d);if(f===void 0||p===void 0)for(var m=t.length,v=s.length;v<m;v+=1){var g,y=t[v],b=e(y);a.set(b,v);var C=(g=n.get(b))!==null&&g!==void 0?g:r;if(s[v]=(s[v-1]||0)+C,b===u&&(f=v),b===d&&(p=v),f!==void 0&&p!==void 0)break}return{top:s[f-1]||0,bottom:s[p]}};return l}var qB=function(){function t(){xn(this,t),F(this,"maps",void 0),F(this,"id",0),F(this,"diffKeys",new Set),this.maps=Object.create(null)}return wn(t,[{key:"set",value:function(n,r){this.maps[n]=r,this.id+=1,this.diffKeys.add(n)}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),t}();function Zv(t){var e=parseFloat(t);return isNaN(e)?0:e}function KB(t,e,n){var r=h.useState(0),o=ie(r,2),i=o[0],a=o[1],s=$.useRef(new Map),l=$.useRef(new qB),c=$.useRef(0);function u(){c.current+=1}function d(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var m=function(){var y=!1;s.current.forEach(function(b,C){if(b&&b.offsetParent){var x=b.offsetHeight,S=getComputedStyle(b),w=S.marginTop,E=S.marginBottom,N=Zv(w),O=Zv(E),M=x+N+O;l.current.get(C)!==M&&(l.current.set(C,M),y=!0)}}),y&&a(function(b){return b+1})};if(p)m();else{c.current+=1;var v=c.current;Promise.resolve().then(function(){v===c.current&&m()})}}function f(p,m){var v=t(p);s.current.get(v),m?(s.current.set(v,m),d()):s.current.delete(v)}return $.useEffect(function(){return u},[]),[f,d,l.current,i]}var eb=14/15;function UB(t,e,n){var r=$.useRef(!1),o=$.useRef(0),i=$.useRef(0),a=$.useRef(null),s=$.useRef(null),l,c=function(p){if(r.current){var m=Math.ceil(p.touches[0].pageX),v=Math.ceil(p.touches[0].pageY),g=o.current-m,y=i.current-v,b=Math.abs(g)>Math.abs(y);b?o.current=m:i.current=v;var C=n(b,b?g:y,!1,p);C&&p.preventDefault(),clearInterval(s.current),C&&(s.current=setInterval(function(){b?g*=eb:y*=eb;var x=Math.floor(b?g:y);(!n(b,x,!0)||Math.abs(x)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(p){l(),p.touches.length===1&&!r.current&&(r.current=!0,o.current=Math.ceil(p.touches[0].pageX),i.current=Math.ceil(p.touches[0].pageY),a.current=p.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},Jt(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=e.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[t])}function tb(t){return Math.floor(Math.pow(t,.5))}function th(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function GB(t,e,n){h.useEffect(function(){var r=e.current;if(t&&r){var o=!1,i,a,s=function(){Dt.cancel(i)},l=function f(){s(),i=Dt(function(){n(a),f()})},c=function(p){if(!(p.target.draggable||p.button!==0)){var m=p;m._virtualHandled||(m._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},d=function(p){if(o){var m=th(p,!1),v=r.getBoundingClientRect(),g=v.top,y=v.bottom;if(m<=g){var b=g-m;a=-tb(b),l()}else if(m>=y){var C=m-y;a=tb(C),l()}else s()}};return r.addEventListener("mousedown",c),r.ownerDocument.addEventListener("mouseup",u),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",c),r.ownerDocument.removeEventListener("mouseup",u),r.ownerDocument.removeEventListener("mousemove",d),s()}}},[t])}var nb=10;function XB(t,e,n,r,o,i,a,s){var l=h.useRef(),c=h.useState(null),u=ie(c,2),d=u[0],f=u[1];return Jt(function(){if(d&&d.times<nb){if(!t.current){f(function(W){return q({},W)});return}i();var p=d.targetAlign,m=d.originAlign,v=d.index,g=d.offset,y=t.current.clientHeight,b=!1,C=p,x=null;if(y){for(var S=p||m,w=0,E=0,N=0,O=Math.min(e.length-1,v),M=0;M<=O;M+=1){var I=o(e[M]);E=w;var D=n.get(I);N=E+(D===void 0?r:D),w=N}for(var k=S==="top"?g:y-g,P=O;P>=0;P-=1){var j=o(e[P]),A=n.get(j);if(A===void 0){b=!0;break}if(k-=A,k<=0)break}switch(S){case"top":x=E-g;break;case"bottom":x=N-y+g;break;default:{var T=t.current.scrollTop,_=T+y;E<T?C="top":N>_&&(C="bottom")}}x!==null&&a(x),x!==d.lastTop&&(b=!0)}b&&f(q(q({},d),{},{times:d.times+1,targetAlign:C,lastTop:x}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===nb&&yt(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,t.current]),function(p){if(p==null){s();return}if(Dt.cancel(l.current),typeof p=="number")a(p);else if(p&&st(p)==="object"){var m,v=p.align;"index"in p?m=p.index:m=e.findIndex(function(b){return o(b)===p.key});var g=p.offset,y=g===void 0?0:g;f({times:0,index:m,offset:y,originAlign:v})}}}var nh=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.rtl,o=t.scrollOffset,i=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,f=t.style,p=t.thumbStyle,m=t.showScrollBar,v=h.useState(!1),g=ie(v,2),y=g[0],b=g[1],C=h.useState(null),x=ie(C,2),S=x[0],w=x[1],E=h.useState(null),N=ie(E,2),O=N[0],M=N[1],I=!r,D=h.useRef(),k=h.useRef(),P=h.useState(m),j=ie(P,2),A=j[0],T=j[1],_=h.useRef(),W=function(){m===!0||m===!1||(clearTimeout(_.current),T(!0),_.current=setTimeout(function(){T(!1)},3e3))},L=i-d||0,V=d-u||0,U=h.useMemo(function(){if(o===0||L===0)return 0;var ce=o/L;return ce*V},[o,L,V]),Y=function(oe){oe.stopPropagation(),oe.preventDefault()},H=h.useRef({top:U,dragging:y,pageY:S,startTop:O});H.current={top:U,dragging:y,pageY:S,startTop:O};var G=function(oe){b(!0),w(th(oe,c)),M(H.current.top),a(),oe.stopPropagation(),oe.preventDefault()};h.useEffect(function(){var ce=function(le){le.preventDefault()},oe=D.current,me=k.current;return oe.addEventListener("touchstart",ce,{passive:!1}),me.addEventListener("touchstart",G,{passive:!1}),function(){oe.removeEventListener("touchstart",ce),me.removeEventListener("touchstart",G)}},[]);var J=h.useRef();J.current=L;var se=h.useRef();se.current=V,h.useEffect(function(){if(y){var ce,oe=function(le){var fe=H.current,Ee=fe.dragging,Oe=fe.pageY,xe=fe.startTop;Dt.cancel(ce);var Be=D.current.getBoundingClientRect(),z=d/(c?Be.width:Be.height);if(Ee){var ve=(th(le,c)-Oe)*z,ae=xe;!I&&c?ae-=ve:ae+=ve;var he=J.current,$e=se.current,Me=$e?ae/$e:0,we=Math.ceil(Me*he);we=Math.max(we,0),we=Math.min(we,he),ce=Dt(function(){l(we,c)})}},me=function(){b(!1),s()};return window.addEventListener("mousemove",oe,{passive:!0}),window.addEventListener("touchmove",oe,{passive:!0}),window.addEventListener("mouseup",me,{passive:!0}),window.addEventListener("touchend",me,{passive:!0}),function(){window.removeEventListener("mousemove",oe),window.removeEventListener("touchmove",oe),window.removeEventListener("mouseup",me),window.removeEventListener("touchend",me),Dt.cancel(ce)}}},[y]),h.useEffect(function(){return W(),function(){clearTimeout(_.current)}},[o]),h.useImperativeHandle(e,function(){return{delayHidden:W}});var X="".concat(n,"-scrollbar"),de={position:"absolute",visibility:A?null:"hidden"},ye={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(de.height=8,de.left=0,de.right=0,de.bottom=0,ye.height="100%",ye.width=u,I?ye.left=U:ye.right=U):(de.width=8,de.top=0,de.bottom=0,I?de.right=0:de.left=0,ye.width="100%",ye.height=u,ye.top=U),h.createElement("div",{ref:D,className:ee(X,F(F(F({},"".concat(X,"-horizontal"),c),"".concat(X,"-vertical"),!c),"".concat(X,"-visible"),A)),style:q(q({},de),f),onMouseDown:Y,onMouseMove:W},h.createElement("div",{ref:k,className:ee("".concat(X,"-thumb"),F({},"".concat(X,"-thumb-moving"),y)),style:q(q({},ye),p),onMouseDown:G}))});process.env.NODE_ENV!=="production"&&(nh.displayName="ScrollBar");var YB=20;function rb(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,YB),Math.floor(n)}var JB=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],QB=[],ZB={overflowY:"auto",overflowAnchor:"none"};function ez(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,o=t.className,i=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,d=t.children,f=t.itemKey,p=t.virtual,m=t.direction,v=t.scrollWidth,g=t.component,y=g===void 0?"div":g,b=t.onScroll,C=t.onVirtualScroll,x=t.onVisibleChange,S=t.innerProps,w=t.extraRender,E=t.styles,N=t.showScrollBar,O=N===void 0?"optional":N,M=xt(t,JB),I=h.useCallback(function(ke){return typeof f=="function"?f(ke):ke==null?void 0:ke[f]},[f]),D=KB(I),k=ie(D,4),P=k[0],j=k[1],A=k[2],T=k[3],_=!!(p!==!1&&i&&a),W=h.useMemo(function(){return Object.values(A.maps).reduce(function(ke,rt){return ke+rt},0)},[A.id,A.maps]),L=_&&u&&(Math.max(a*u.length,W)>i||!!v),V=m==="rtl",U=ee(r,F({},"".concat(r,"-rtl"),V),o),Y=u||QB,H=$.useRef(),G=$.useRef(),J=$.useRef(),se=$.useState(0),X=ie(se,2),de=X[0],ye=X[1],ce=$.useState(0),oe=ie(ce,2),me=oe[0],te=oe[1],le=$.useState(!1),fe=ie(le,2),Ee=fe[0],Oe=fe[1],xe=function(){Oe(!0)},Be=function(){Oe(!1)},z={getKey:I};function ve(ke){ye(function(rt){var Xe;typeof ke=="function"?Xe=ke(rt):Xe=ke;var Ae=lt(Xe);return H.current.scrollTop=Ae,Ae})}var ae=$.useRef({start:0,end:Y.length}),he=$.useRef(),$e=HB(Y,I),Me=ie($e,1),we=Me[0];he.current=we;var ze=h.useMemo(function(){if(!_)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!L){var ke;return{scrollHeight:((ke=G.current)===null||ke===void 0?void 0:ke.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0}}for(var rt=0,Xe,Ae,ft,Et=Y.length,Ot=0;Ot<Et;Ot+=1){var ln=Y[Ot],en=I(ln),dn=A.get(en),cn=rt+(dn===void 0?a:dn);cn>=de&&Xe===void 0&&(Xe=Ot,Ae=rt),cn>de+i&&ft===void 0&&(ft=Ot),rt=cn}return Xe===void 0&&(Xe=0,Ae=0,ft=Math.ceil(i/a)),ft===void 0&&(ft=Y.length-1),ft=Math.min(ft+1,Y.length-1),{scrollHeight:rt,start:Xe,end:ft,offset:Ae}},[L,_,de,Y,T,i]),Le=ze.scrollHeight,Ie=ze.start,We=ze.end,Ke=ze.offset;ae.current.start=Ie,ae.current.end=We,h.useLayoutEffect(function(){var ke=A.getRecord();if(ke.size===1){var rt=Array.from(ke)[0],Xe=Y[Ie];if(Xe){var Ae=I(Xe);if(Ae===rt){var ft=A.get(rt),Et=ft-a;ve(function(Ot){return Ot+Et})}}}A.resetRecord()},[Le]);var Pe=h.useState({width:0,height:i}),je=ie(Pe,2),_e=je[0],Fe=je[1],Ze=function(rt){Fe({width:rt.offsetWidth,height:rt.offsetHeight})},ht=$.useRef(),Tt=$.useRef(),Pt=h.useMemo(function(){return rb(_e.width,v)},[_e.width,v]),an=h.useMemo(function(){return rb(_e.height,Le)},[_e.height,Le]),Ye=Le-i,He=$.useRef(Ye);He.current=Ye;function lt(ke){var rt=ke;return Number.isNaN(He.current)||(rt=Math.min(rt,He.current)),rt=Math.max(rt,0),rt}var it=de<=0,pt=de>=Ye,Qe=me<=0,qe=me>=v,Ue=t1(it,pt,Qe,qe),wt=function(){return{x:V?-me:me,y:de}},Nt=$.useRef(wt()),et=Wt(function(ke){if(C){var rt=q(q({},wt()),ke);(Nt.current.x!==rt.x||Nt.current.y!==rt.y)&&(C(rt),Nt.current=rt)}});function Ve(ke,rt){var Xe=ke;rt?(_r.flushSync(function(){te(Xe)}),et()):ve(Xe)}function ot(ke){var rt=ke.currentTarget.scrollTop;rt!==de&&ve(rt),b==null||b(ke),et()}var at=function(rt){var Xe=rt,Ae=v?v-_e.width:0;return Xe=Math.max(Xe,0),Xe=Math.min(Xe,Ae),Xe},nt=Wt(function(ke,rt){rt?(_r.flushSync(function(){te(function(Xe){var Ae=Xe+(V?-ke:ke);return at(Ae)})}),et()):ve(function(Xe){var Ae=Xe+ke;return Ae})}),dt=VB(_,it,pt,Qe,qe,!!v,nt),kt=ie(dt,2),$t=kt[0],Gt=kt[1];UB(_,H,function(ke,rt,Xe,Ae){var ft=Ae;return Ue(ke,rt,Xe)?!1:!ft||!ft._virtualHandled?(ft&&(ft._virtualHandled=!0),$t({preventDefault:function(){},deltaX:ke?rt:0,deltaY:ke?0:rt}),!0):!1}),GB(L,H,function(ke){ve(function(rt){return rt+ke})}),Jt(function(){function ke(Xe){var Ae=it&&Xe.detail<0,ft=pt&&Xe.detail>0;_&&!Ae&&!ft&&Xe.preventDefault()}var rt=H.current;return rt.addEventListener("wheel",$t,{passive:!1}),rt.addEventListener("DOMMouseScroll",Gt,{passive:!0}),rt.addEventListener("MozMousePixelScroll",ke,{passive:!1}),function(){rt.removeEventListener("wheel",$t),rt.removeEventListener("DOMMouseScroll",Gt),rt.removeEventListener("MozMousePixelScroll",ke)}},[_,it,pt]),Jt(function(){if(v){var ke=at(me);te(ke),et({x:ke})}},[_e.width,v]);var It=function(){var rt,Xe;(rt=ht.current)===null||rt===void 0||rt.delayHidden(),(Xe=Tt.current)===null||Xe===void 0||Xe.delayHidden()},Bt=XB(H,Y,A,a,I,function(){return j(!0)},ve,It);h.useImperativeHandle(e,function(){return{nativeElement:J.current,getScrollInfo:wt,scrollTo:function(rt){function Xe(Ae){return Ae&&st(Ae)==="object"&&("left"in Ae||"top"in Ae)}Xe(rt)?(rt.left!==void 0&&te(at(rt.left)),Bt(rt.top)):Bt(rt)}}}),Jt(function(){if(x){var ke=Y.slice(Ie,We+1);x(ke,Y)}},[Ie,We,Y]);var Ht=WB(Y,I,A,a),Xt=w==null?void 0:w({start:Ie,end:We,virtual:L,offsetX:me,offsetY:Ke,rtl:V,getSize:Ht}),Mn=LB(Y,Ie,We,v,me,P,d,z),Yt=null;i&&(Yt=q(F({},l?"height":"maxHeight",i),ZB),_&&(Yt.overflowY="hidden",v&&(Yt.overflowX="hidden"),Ee&&(Yt.pointerEvents="none")));var sn={};return V&&(sn.dir="rtl"),h.createElement("div",De({ref:J,style:q(q({},c),{},{position:"relative"}),className:U},sn,M),h.createElement(Co,{onResize:Ze},h.createElement(y,{className:"".concat(r,"-holder"),style:Yt,ref:H,onScroll:ot,onMouseEnter:It},h.createElement(e1,{prefixCls:r,height:Le,offsetX:me,offsetY:Ke,scrollWidth:v,onInnerResize:j,ref:G,innerProps:S,rtl:V,extra:Xt},Mn))),L&&Le>i&&h.createElement(nh,{ref:ht,prefixCls:r,scrollOffset:de,scrollRange:Le,rtl:V,onScroll:Ve,onStartMove:xe,onStopMove:Be,spinSize:an,containerSize:_e.height,style:E==null?void 0:E.verticalScrollBar,thumbStyle:E==null?void 0:E.verticalScrollBarThumb,showScrollBar:O}),L&&v>_e.width&&h.createElement(nh,{ref:Tt,prefixCls:r,scrollOffset:me,scrollRange:v,rtl:V,onScroll:Ve,onStartMove:xe,onStopMove:Be,spinSize:Pt,containerSize:_e.width,horizontal:!0,style:E==null?void 0:E.horizontalScrollBar,thumbStyle:E==null?void 0:E.horizontalScrollBarThumb,showScrollBar:O}))}var n1=h.forwardRef(ez);n1.displayName="List";function tz(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var nz=["disabled","title","children","style","className"];function ob(t){return typeof t=="string"||typeof t=="number"}var rz=function(e,n){var r=Y_(),o=r.prefixCls,i=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,p=h.useContext(wp),m=p.maxCount,v=p.flattenOptions,g=p.onActiveValue,y=p.defaultActiveFirstOption,b=p.onSelect,C=p.menuItemSelectedIcon,x=p.rawValues,S=p.fieldNames,w=p.virtual,E=p.direction,N=p.listHeight,O=p.listItemHeight,M=p.optionRender,I="".concat(o,"-item"),D=Ms(function(){return v},[a,v],function(ce,oe){return oe[0]&&ce[1]!==oe[1]}),k=h.useRef(null),P=h.useMemo(function(){return s&&Zf(m)&&(x==null?void 0:x.size)>=m},[s,m,x==null?void 0:x.size]),j=function(oe){oe.preventDefault()},A=function(oe){var me;(me=k.current)===null||me===void 0||me.scrollTo(typeof oe=="number"?{index:oe}:oe)},T=h.useCallback(function(ce){return l==="combobox"?!1:x.has(ce)},[l,Re(x).toString(),x.size]),_=function(oe){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=D.length,le=0;le<te;le+=1){var fe=(oe+le*me+te)%te,Ee=D[fe]||{},Oe=Ee.group,xe=Ee.data;if(!Oe&&!(xe!=null&&xe.disabled)&&(T(xe.value)||!P))return fe}return-1},W=h.useState(function(){return _(0)}),L=ie(W,2),V=L[0],U=L[1],Y=function(oe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;U(oe);var te={source:me?"keyboard":"mouse"},le=D[oe];if(!le){g(null,-1,te);return}g(le.value,oe,te)};$.useEffect(function(){Y(y!==!1?_(0):-1)},[D.length,c]);var H=h.useCallback(function(ce){return l==="combobox"?String(ce).toLowerCase()===c.toLowerCase():x.has(ce)},[l,c,Re(x).toString(),x.size]);$.useEffect(function(){var ce=setTimeout(function(){if(!s&&a&&x.size===1){var me=Array.from(x)[0],te=D.findIndex(function(le){var fe=le.data;return fe.value===me});te!==-1&&(Y(te),A(te))}});if(a){var oe;(oe=k.current)===null||oe===void 0||oe.scrollTo(void 0)}return function(){return clearTimeout(ce)}},[a,c]);var G=function(oe){oe!==void 0&&b(oe,{selected:!x.has(oe)}),s||u(!1)};if(h.useImperativeHandle(n,function(){return{onKeyDown:function(oe){var me=oe.which,te=oe.ctrlKey;switch(me){case Je.N:case Je.P:case Je.UP:case Je.DOWN:{var le=0;if(me===Je.UP?le=-1:me===Je.DOWN?le=1:tz()&&te&&(me===Je.N?le=1:me===Je.P&&(le=-1)),le!==0){var fe=_(V+le,le);A(fe),Y(fe,!0)}break}case Je.TAB:case Je.ENTER:{var Ee,Oe=D[V];Oe&&!(Oe!=null&&(Ee=Oe.data)!==null&&Ee!==void 0&&Ee.disabled)&&!P?G(Oe.value):G(void 0),a&&oe.preventDefault();break}case Je.ESC:u(!1),a&&oe.stopPropagation()}},onKeyUp:function(){},scrollTo:function(oe){A(oe)}}}),D.length===0)return h.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(I,"-empty"),onMouseDown:j},d);var J=Object.keys(S).map(function(ce){return S[ce]}),se=function(oe){return oe.label};function X(ce,oe){var me=ce.group;return{role:me?"presentation":"option",id:"".concat(i,"_list_").concat(oe)}}var de=function(oe){var me=D[oe];if(!me)return null;var te=me.data||{},le=te.value,fe=me.group,Ee=Zr(te,!0),Oe=se(me);return me?h.createElement("div",De({"aria-label":typeof Oe=="string"&&!fe?Oe:null},Ee,{key:oe},X(me,oe),{"aria-selected":H(le)}),le):null},ye={role:"listbox",id:"".concat(i,"_list")};return h.createElement(h.Fragment,null,w&&h.createElement("div",De({},ye,{style:{height:0,width:0,overflow:"hidden"}}),de(V-1),de(V),de(V+1)),h.createElement(n1,{itemKey:"key",ref:k,data:D,height:N,itemHeight:O,fullHeight:!1,onMouseDown:j,onScroll:f,virtual:w,direction:E,innerProps:w?null:ye},function(ce,oe){var me=ce.group,te=ce.groupOption,le=ce.data,fe=ce.label,Ee=ce.value,Oe=le.key;if(me){var xe,Be=(xe=le.title)!==null&&xe!==void 0?xe:ob(fe)?fe.toString():void 0;return h.createElement("div",{className:ee(I,"".concat(I,"-group"),le.className),title:Be},fe!==void 0?fe:Oe)}var z=le.disabled,ve=le.title;le.children;var ae=le.style,he=le.className,$e=xt(le,nz),Me=Tn($e,J),we=T(Ee),ze=z||!we&&P,Le="".concat(I,"-option"),Ie=ee(I,Le,he,F(F(F(F({},"".concat(Le,"-grouped"),te),"".concat(Le,"-active"),V===oe&&!ze),"".concat(Le,"-disabled"),ze),"".concat(Le,"-selected"),we)),We=se(ce),Ke=!C||typeof C=="function"||we,Pe=typeof We=="number"?We:We||Ee,je=ob(Pe)?Pe.toString():void 0;return ve!==void 0&&(je=ve),h.createElement("div",De({},Zr(Me),w?{}:X(ce,oe),{"aria-selected":H(Ee),className:Ie,title:je,onMouseMove:function(){V===oe||ze||Y(oe)},onClick:function(){ze||G(Ee)},style:ae}),h.createElement("div",{className:"".concat(Le,"-content")},typeof M=="function"?M(ce,{index:oe}):Pe),h.isValidElement(C)||we,Ke&&h.createElement(iu,{className:"".concat(I,"-option-state"),customizeIcon:C,customizeIconProps:{value:Ee,disabled:ze,isSelected:we}},we?"✓":null))}))},r1=h.forwardRef(rz);process.env.NODE_ENV!=="production"&&(r1.displayName="OptionList");const oz=function(t,e){var n=h.useRef({values:new Map,options:new Map}),r=h.useMemo(function(){var i=n.current,a=i.values,s=i.options,l=t.map(function(d){if(d.label===void 0){var f;return q(q({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),o=h.useCallback(function(i){return e.get(i)||n.current.options.get(i)},[e]);return[r,o]};function yd(t,e){return xp(t).join("").toUpperCase().includes(e)}const iz=function(t,e,n,r,o){return h.useMemo(function(){if(!n||r===!1)return t;var i=e.options,a=e.label,s=e.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(p,m){return o?yd(m[o],u):m[i]?yd(m[a!=="children"?a:"label"],u):yd(m[s],u)},f=c?function(p){return eh(p)}:function(p){return p};return t.forEach(function(p){if(p[i]){var m=d(n,f(p));if(m)l.push(p);else{var v=p[i].filter(function(g){return d(n,f(g))});v.length&&l.push(q(q({},p),{},F({},i,v)))}return}d(n,f(p))&&l.push(p)}),l},[t,r,o,n,e])};var ib=0,az=process.env.NODE_ENV!=="test"&&Gn();function sz(){var t;return az?(t=ib,ib+=1):t="TEST_OR_SSR",t}function lz(t){var e=h.useState(),n=ie(e,2),r=n[0],o=n[1];return h.useEffect(function(){o("rc_select_".concat(sz()))},[]),t||r}var cz=["children","value"],uz=["children"];function dz(t){var e=t,n=e.key,r=e.props,o=r.children,i=r.value,a=xt(r,cz);return q({key:n,value:i!==void 0?i:n,children:o},a)}function Op(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return gr(t).map(function(n,r){if(!h.isValidElement(n)||!n.type)return null;var o=n,i=o.type.isSelectOptGroup,a=o.key,s=o.props,l=s.children,c=xt(s,uz);return e||!i?dz(n):q(q({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:Op(l)})}).filter(function(n){return n})}var fz=function(e,n,r,o,i){return h.useMemo(function(){var a=e,s=!e;s&&(a=Op(n));var l=new Map,c=new Map,u=function(p,m,v){v&&typeof v=="string"&&p.set(m[v],m)},d=function f(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<p.length;v+=1){var g=p[v];!g[r.options]||m?(l.set(g[r.value],g),u(c,g,r.label),u(c,g,o),u(c,g,i)):f(g[r.options],!0)}};return d(a),{options:a,valueOptions:l,labelOptions:c}},[e,n,r,o,i])};function ab(t){var e=h.useRef();e.current=t;var n=h.useCallback(function(){return e.current.apply(e,arguments)},[]);return n}function hz(t){var e=t.mode,n=t.options,r=t.children,o=t.backfill,i=t.allowClear,a=t.placeholder,s=t.getInputElement,l=t.showSearch,c=t.onSearch,u=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,m=t.inputValue,v=t.optionLabelProp,g=mc(e),y=l!==void 0?l:g||e==="combobox",b=n||Op(r);if(yt(e!=="tags"||b.every(function(w){return!w.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),e==="tags"||e==="combobox"){var C=b.some(function(w){return w.options?w.options.some(function(E){return typeof("value"in E?E.value:E.key)=="number"}):typeof("value"in w?w.value:w.key)=="number"});yt(!C,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(yt(e!=="combobox"||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),yt(e==="combobox"||!o,"`backfill` only works with `combobox` mode."),yt(e==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),nf(e!=="combobox"||!s||!i||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),c&&!y&&e!=="combobox"&&e!=="tags"&&yt(!1,"`onSearch` should work with `showSearch` instead of use alone."),nf(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),p!=null){var x=xp(p);yt(!f||x.every(function(w){return st(w)==="object"&&("key"in w||"value"in w)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),yt(!g||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var S=null;gr(r).some(function(w){if(!h.isValidElement(w)||!w.type)return!1;var E=w,N=E.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var O=gr(w.props.children).every(function(M){return!h.isValidElement(M)||!w.type||M.type.isSelectOption?!0:(S=M.type,!1)});return!O}return S=N,!0}),S&&yt(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(S.displayName||S.name||S,"`.")),yt(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function pz(t,e){if(t){var n=function r(o){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=0;a<o.length;a++){var s=o[a];if(s[e==null?void 0:e.value]===null)return yt(!1,"`value` in Select options should not be `null`."),!0;if(!i&&Array.isArray(s[e==null?void 0:e.options])&&r(s[e==null?void 0:e.options],!0))break}};n(t)}}var mz=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],gz=["inputValue"];function vz(t){return!t||st(t)!=="object"}var o1=h.forwardRef(function(t,e){var n=t.id,r=t.mode,o=t.prefixCls,i=o===void 0?"rc-select":o,a=t.backfill,s=t.fieldNames,l=t.inputValue,c=t.searchValue,u=t.onSearch,d=t.autoClearSearchValue,f=d===void 0?!0:d,p=t.onSelect,m=t.onDeselect,v=t.dropdownMatchSelectWidth,g=v===void 0?!0:v,y=t.filterOption,b=t.filterSort,C=t.optionFilterProp,x=t.optionLabelProp,S=t.options,w=t.optionRender,E=t.children,N=t.defaultActiveFirstOption,O=t.menuItemSelectedIcon,M=t.virtual,I=t.direction,D=t.listHeight,k=D===void 0?200:D,P=t.listItemHeight,j=P===void 0?20:P,A=t.labelRender,T=t.value,_=t.defaultValue,W=t.labelInValue,L=t.onChange,V=t.maxCount,U=xt(t,mz),Y=lz(n),H=mc(r),G=!!(!S&&E),J=h.useMemo(function(){return y===void 0&&r==="combobox"?!1:y},[y,r]),se=h.useMemo(function(){return Qx(s,G)},[JSON.stringify(s),G]),X=mn("",{value:c!==void 0?c:l,postState:function(Ve){return Ve||""}}),de=ie(X,2),ye=de[0],ce=de[1],oe=fz(S,E,se,C,x),me=oe.valueOptions,te=oe.labelOptions,le=oe.options,fe=h.useCallback(function(et){var Ve=xp(et);return Ve.map(function(ot){var at,nt,dt,kt,$t;if(vz(ot))at=ot;else{var Gt;dt=ot.key,nt=ot.label,at=(Gt=ot.value)!==null&&Gt!==void 0?Gt:dt}var It=me.get(at);if(It){var Bt;if(nt===void 0&&(nt=It==null?void 0:It[x||se.label]),dt===void 0&&(dt=(Bt=It==null?void 0:It.key)!==null&&Bt!==void 0?Bt:at),kt=It==null?void 0:It.disabled,$t=It==null?void 0:It.title,process.env.NODE_ENV!=="production"&&!x){var Ht=It==null?void 0:It[se.label];Ht!==void 0&&!h.isValidElement(Ht)&&!h.isValidElement(nt)&&Ht!==nt&&yt(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:nt,value:at,key:dt,disabled:kt,title:$t}})},[se,x,me]),Ee=mn(_,{value:T}),Oe=ie(Ee,2),xe=Oe[0],Be=Oe[1],z=h.useMemo(function(){var et,Ve=H&&xe===null?[]:xe,ot=fe(Ve);return r==="combobox"&&mB((et=ot[0])===null||et===void 0?void 0:et.value)?[]:ot},[xe,fe,r,H]),ve=oz(z,me),ae=ie(ve,2),he=ae[0],$e=ae[1],Me=h.useMemo(function(){if(!r&&he.length===1){var et=he[0];if(et.value===null&&(et.label===null||et.label===void 0))return[]}return he.map(function(Ve){var ot;return q(q({},Ve),{},{label:(ot=typeof A=="function"?A(Ve):Ve.label)!==null&&ot!==void 0?ot:Ve.value})})},[r,he,A]),we=h.useMemo(function(){return new Set(he.map(function(et){return et.value}))},[he]);h.useEffect(function(){if(r==="combobox"){var et,Ve=(et=he[0])===null||et===void 0?void 0:et.value;ce(pB(Ve)?String(Ve):"")}},[he]);var ze=ab(function(et,Ve){var ot=Ve??et;return F(F({},se.value,et),se.label,ot)}),Le=h.useMemo(function(){if(r!=="tags")return le;var et=Re(le),Ve=function(at){return me.has(at)};return Re(he).sort(function(ot,at){return ot.value<at.value?-1:1}).forEach(function(ot){var at=ot.value;Ve(at)||et.push(ze(at,ot.label))}),et},[ze,le,me,he,r]),Ie=iz(Le,se,ye,J,C),We=h.useMemo(function(){return r!=="tags"||!ye||Ie.some(function(et){return et[C||"value"]===ye})||Ie.some(function(et){return et[se.value]===ye})?Ie:[ze(ye)].concat(Re(Ie))},[ze,C,r,Ie,ye,se]),Ke=function et(Ve){var ot=Re(Ve).sort(function(at,nt){return b(at,nt,{searchValue:ye})});return ot.map(function(at){return Array.isArray(at.options)?q(q({},at),{},{options:at.options.length>0?et(at.options):at.options}):at})},Pe=h.useMemo(function(){return b?Ke(We):We},[We,b,ye]),je=h.useMemo(function(){return DB(Pe,{fieldNames:se,childrenAsData:G})},[Pe,se,G]),_e=function(Ve){var ot=fe(Ve);if(Be(ot),L&&(ot.length!==he.length||ot.some(function(dt,kt){var $t;return(($t=he[kt])===null||$t===void 0?void 0:$t.value)!==(dt==null?void 0:dt.value)}))){var at=W?ot:ot.map(function(dt){return dt.value}),nt=ot.map(function(dt){return eh($e(dt.value))});L(H?at:at[0],H?nt:nt[0])}},Fe=h.useState(null),Ze=ie(Fe,2),ht=Ze[0],Tt=Ze[1],Pt=h.useState(0),an=ie(Pt,2),Ye=an[0],He=an[1],lt=N!==void 0?N:r!=="combobox",it=h.useCallback(function(et,Ve){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},at=ot.source,nt=at===void 0?"keyboard":at;He(Ve),a&&r==="combobox"&&et!==null&&nt==="keyboard"&&Tt(String(et))},[a,r]),pt=function(Ve,ot,at){var nt=function(){var Yt,sn=$e(Ve);return[W?{label:sn==null?void 0:sn[se.label],value:Ve,key:(Yt=sn==null?void 0:sn.key)!==null&&Yt!==void 0?Yt:Ve}:Ve,eh(sn)]};if(ot&&p){var dt=nt(),kt=ie(dt,2),$t=kt[0],Gt=kt[1];p($t,Gt)}else if(!ot&&m&&at!=="clear"){var It=nt(),Bt=ie(It,2),Ht=Bt[0],Xt=Bt[1];m(Ht,Xt)}},Qe=ab(function(et,Ve){var ot,at=H?Ve.selected:!0;at?ot=H?[].concat(Re(he),[et]):[et]:ot=he.filter(function(nt){return nt.value!==et}),_e(ot),pt(et,at),r==="combobox"?Tt(""):(!mc||f)&&(ce(""),Tt(""))}),qe=function(Ve,ot){_e(Ve);var at=ot.type,nt=ot.values;(at==="remove"||at==="clear")&&nt.forEach(function(dt){pt(dt.value,!1,at)})},Ue=function(Ve,ot){if(ce(Ve),Tt(null),ot.source==="submit"){var at=(Ve||"").trim();if(at){var nt=Array.from(new Set([].concat(Re(we),[at])));_e(nt),pt(at,!0),ce("")}return}ot.source!=="blur"&&(r==="combobox"&&_e(Ve),u==null||u(Ve))},wt=function(Ve){var ot=Ve;r!=="tags"&&(ot=Ve.map(function(nt){var dt=te.get(nt);return dt==null?void 0:dt.value}).filter(function(nt){return nt!==void 0}));var at=Array.from(new Set([].concat(Re(we),Re(ot))));_e(at),at.forEach(function(nt){pt(nt,!0)})},Nt=h.useMemo(function(){var et=M!==!1&&g!==!1;return q(q({},oe),{},{flattenOptions:je,onActiveValue:it,defaultActiveFirstOption:lt,onSelect:Qe,menuItemSelectedIcon:O,rawValues:we,fieldNames:se,virtual:et,direction:I,listHeight:k,listItemHeight:j,childrenAsData:G,maxCount:V,optionRender:w})},[V,oe,je,it,lt,Qe,O,we,se,M,g,I,k,j,G,w]);return process.env.NODE_ENV!=="production"&&(hz(t),pz(le,se)),h.createElement(wp.Provider,{value:Nt},h.createElement(Zx,De({},U,{id:Y,prefixCls:i,ref:e,omitDomProps:gz,mode:r,displayValues:Me,onDisplayValuesChange:qe,direction:I,searchValue:ye,onSearch:Ue,autoClearSearchValue:f,onSearchSplit:wt,dropdownMatchSelectWidth:g,OptionList:r1,emptyOptions:!je.length,activeValue:ht,activeDescendantId:"".concat(Y,"_list_").concat(Ye)})))});process.env.NODE_ENV!=="production"&&(o1.displayName="Select");var Np=o1;Np.Option=$p;Np.OptGroup=Ep;function Ni(t,e,n){return ee({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const Fs=(t,e)=>e||t,i1=()=>{const[,t]=ar(),[e]=So("Empty"),r=new Vt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return h.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(e==null?void 0:e.description)||"Empty"),h.createElement("g",{fill:"none",fillRule:"evenodd"},h.createElement("g",{transform:"translate(24 31.67)"},h.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),h.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),h.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),h.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),h.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),h.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),h.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},h.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),h.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(i1.displayName="EmptyImage");const a1=()=>{const[,t]=ar(),[e]=So("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=t,{borderColor:a,shadowColor:s,contentColor:l}=$.useMemo(()=>({borderColor:new Vt(n).onBackground(i).toHexString(),shadowColor:new Vt(r).onBackground(i).toHexString(),contentColor:new Vt(o).onBackground(i).toHexString()}),[n,r,o,i]);return h.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(e==null?void 0:e.description)||"Empty"),h.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},h.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),h.createElement("g",{fillRule:"nonzero",stroke:a},h.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),h.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))};process.env.NODE_ENV!=="production"&&(a1.displayName="SimpleImage");const bz=t=>{const{componentCls:e,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=t;return{[e]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:r,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:r,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},yz=hn("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,o=Lt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[bz(o)]});var Cz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const s1=h.createElement(i1,null),l1=h.createElement(a1,null),To=t=>{const{className:e,rootClassName:n,prefixCls:r,image:o=s1,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=t,d=Cz(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:p,className:m,style:v,classNames:g,styles:y}=br("empty"),b=f("empty",r),[C,x,S]=yz(b),[w]=So("Empty"),E=typeof i<"u"?i:w==null?void 0:w.description,N=typeof E=="string"?E:"empty";let O=null;if(typeof o=="string"?O=h.createElement("img",{alt:N,src:o}):O=o,process.env.NODE_ENV!=="production"){const M=on("Empty");[["imageStyle","styles: { image: {} }"]].forEach(I=>{let[D,k]=I;M.deprecated(!(D in t),D,k)})}return C(h.createElement("div",Object.assign({className:ee(x,S,b,m,{[`${b}-normal`]:o===l1,[`${b}-rtl`]:p==="rtl"},e,n,g.root,c==null?void 0:c.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},y.root),v),u==null?void 0:u.root),l)},d),h.createElement("div",{className:ee(`${b}-image`,g.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},s),y.image),u==null?void 0:u.image)},O),E&&h.createElement("div",{className:ee(`${b}-description`,g.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},y.description),u==null?void 0:u.description)},E),a&&h.createElement("div",{className:ee(`${b}-footer`,g.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},y.footer),u==null?void 0:u.footer)},a)))};To.PRESENTED_IMAGE_DEFAULT=s1;To.PRESENTED_IMAGE_SIMPLE=l1;process.env.NODE_ENV!=="production"&&(To.displayName="Empty");const Sz=t=>{const{componentName:e}=t,{getPrefixCls:n}=$.useContext(At),r=n("empty");switch(e){case"Table":case"List":return $.createElement(To,{image:To.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return $.createElement(To,{image:To.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return $.createElement(To,null)}},su=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,o;const{variant:i,[t]:a}=h.useContext(At),s=h.useContext(t_),l=a==null?void 0:a.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(o=(r=s??l)!==null&&r!==void 0?r:i)!==null&&o!==void 0?o:"outlined";const u=qT.includes(c);return[c,u]},xz=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function wz(t,e){return t||xz(e)}const sb=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:r,optionPadding:o}=t;return{position:"relative",display:"block",minHeight:e,padding:o,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Ez=t=>{const{antCls:e,componentCls:n}=t,r=`${n}-item`,o=`&${e}-slide-up-enter${e}-slide-up-enter-active`,i=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},Hn(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[`
|
|
341
|
-
${o}${s}bottomLeft,
|
|
342
|
-
${i}${s}bottomLeft
|
|
343
|
-
`]:{animationName:up},[`
|
|
344
|
-
${o}${s}topLeft,
|
|
345
|
-
${i}${s}topLeft,
|
|
346
|
-
${o}${s}topRight,
|
|
347
|
-
${i}${s}topRight
|
|
348
|
-
`]:{animationName:fp},[`${a}${s}bottomLeft`]:{animationName:dp},[`
|
|
349
|
-
${a}${s}topLeft,
|
|
350
|
-
${a}${s}topRight
|
|
351
|
-
`]:{animationName:hp},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},sb(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Cs),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${r}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},sb(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Ca(t,"slide-up"),Ca(t,"slide-down"),fc(t,"move-up"),fc(t,"move-down")]},$z=t=>{const{multipleSelectItemHeight:e,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:o}=t,i=t.max(t.calc(n).sub(r).equal(),0),a=t.max(t.calc(i).sub(o).equal(),0);return{basePadding:i,containerPadding:a,itemHeight:re(e),itemLineHeight:re(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},Oz=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:r}=t;return t.calc(n).sub(e).div(2).sub(r).equal()},Nz=t=>{const{componentCls:e,iconCls:n,borderRadiusSM:r,motionDurationSlow:o,paddingXS:i,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${o}, line-height ${o}, height ${o}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:t.calc(i).div(2).equal(),[`${e}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Pi()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},Mz=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=t,o=`${n}-selection-overflow`,i=t.multipleSelectItemHeight,a=Oz(t),s=e?`${n}-${e}`:"",l=$z(t);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},Nz(t)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${n}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${re(r)} 0`,lineHeight:re(i),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:re(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:re(i),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${o}-item + ${o}-item,
|
|
352
|
-
${n}-prefix + ${n}-selection-wrap
|
|
353
|
-
`]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${o}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:t.fontFamily,lineHeight:re(i),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function Cd(t,e){const{componentCls:n}=t,r=e?`${n}-${e}`:"",o={[`${n}-multiple${r}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
|
|
354
|
-
&${n}-show-arrow ${n}-selector,
|
|
355
|
-
&${n}-allow-clear ${n}-selector
|
|
356
|
-
`]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[Mz(t,e),o]}const Iz=t=>{const{componentCls:e}=t,n=Lt(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),r=Lt(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[Cd(t),Cd(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},Cd(r,"lg")]};function Sd(t,e){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=t,i=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=e?`${n}-${e}`:"";return{[`${n}-single${a}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},Hn(t,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:re(i)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
357
|
-
${n}-selection-item,
|
|
358
|
-
${n}-selection-placeholder
|
|
359
|
-
`]:{display:"block",padding:0,lineHeight:re(i),transition:`all ${t.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
360
|
-
&${n}-show-arrow ${n}-selection-item,
|
|
361
|
-
&${n}-show-arrow ${n}-selection-search,
|
|
362
|
-
&${n}-show-arrow ${n}-selection-placeholder
|
|
363
|
-
`]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${re(r)}`,[`${n}-selection-search-input`]:{height:i,fontSize:t.fontSize},"&:after":{lineHeight:re(i)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${re(r)}`,"&:after":{display:"none"}}}}}}}function Rz(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[Sd(t),Sd(Lt(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${re(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[`
|
|
364
|
-
&${e}-show-arrow ${e}-selection-item,
|
|
365
|
-
&${e}-show-arrow ${e}-selection-placeholder
|
|
366
|
-
`]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},Sd(Lt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const Tz=t=>{const{fontSize:e,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:v,colorBgContainerDisabled:g,colorTextDisabled:y,colorPrimaryHover:b,colorPrimary:C,controlOutline:x}=t,S=s*2,w=r*2,E=Math.min(o-S,o-w),N=Math.min(i-S,i-w),O=Math.min(a-S,a-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(o-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:a,multipleItemBg:v,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:N,multipleItemHeightLG:O,multipleSelectorBgDisabled:g,multipleItemColorDisabled:y,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:b,activeBorderColor:C,activeOutlineColor:x,selectAffixPadding:s}},c1=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${re(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${re(o)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},lb=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},c1(t,e))}),Pz=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},c1(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),lb(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),lb(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${re(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),u1=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${re(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},cb=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},u1(t,e))}),Az=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},u1(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),cb(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),cb(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${re(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),Dz=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${re(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${re(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),d1=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${re(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${n}-prefix`]:{color:e.color}}}},ub=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},d1(t,e))}),kz=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},d1(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),ub(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),ub(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${re(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),_z=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Pz(t)),Az(t)),Dz(t)),kz(t))}),Bz=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},zz=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},jz=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=t;return{[n]:Object.assign(Object.assign({},Hn(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Bz(t)),zz(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Cs),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Cs),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Pi()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:t.colorTextTertiary}},[`&:hover ${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},Lz=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},jz(t),Rz(t),Iz(t),Ez(t),{[`${e}-rtl`]:{direction:"rtl"}},ks(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},Fz=hn("Select",(t,e)=>{let{rootPrefixCls:n}=e;const r=Lt(t,{rootPrefixCls:n,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[Lz(r),_z(r)]},Tz,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Hz={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Vz=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:Hz}))},f1=h.forwardRef(Vz);process.env.NODE_ENV!=="production"&&(f1.displayName="CheckOutlined");var Wz={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},qz=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:Wz}))},Mp=h.forwardRef(qz);process.env.NODE_ENV!=="production"&&(Mp.displayName="DownOutlined");var Kz={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Uz=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:Kz}))},Ip=h.forwardRef(Uz);process.env.NODE_ENV!=="production"&&(Ip.displayName="SearchOutlined");function Gz(t){let{suffixIcon:e,clearIcon:n,menuItemSelectedIcon:r,removeIcon:o,loading:i,multiple:a,hasFeedback:s,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:f}=t;process.env.NODE_ENV!=="production"&&on(f).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const p=n??h.createElement(qc,null),m=b=>e===null&&!s&&!d?null:h.createElement(h.Fragment,null,c!==!1&&b,s&&u);let v=null;if(e!==void 0)v=m(e);else if(i)v=m(h.createElement(ap,{spin:!0}));else{const b=`${l}-suffix`;v=C=>{let{open:x,showSearch:S}=C;return m(x&&S?h.createElement(Ip,{className:b}):h.createElement(Mp,{className:b}))}}let g=null;r!==void 0?g=r:a?g=h.createElement(f1,null):g=null;let y=null;return o!==void 0?y=o:y=h.createElement(Rs,null),{clearIcon:p,suffixIcon:v,itemIcon:g,removeIcon:y}}function Xz(t,e){return e!==void 0?e:t!==null}var Yz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const h1="SECRET_COMBOBOX_MODE_DO_NOT_USE",p1=(t,e)=>{var n;const{prefixCls:r,bordered:o,className:i,rootClassName:a,getPopupContainer:s,popupClassName:l,dropdownClassName:c,listHeight:u=256,placement:d,listItemHeight:f,size:p,disabled:m,notFoundContent:v,status:g,builtinPlacements:y,dropdownMatchSelectWidth:b,popupMatchSelectWidth:C,direction:x,style:S,allowClear:w,variant:E,dropdownStyle:N,transitionName:O,tagRender:M,maxCount:I,prefix:D}=t,k=Yz(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:P,getPrefixCls:j,renderEmpty:A,direction:T,virtual:_,popupMatchSelectWidth:W,popupOverflow:L}=h.useContext(At),V=br("select"),[,U]=ar(),Y=f??(U==null?void 0:U.controlHeight),H=j("select",r),G=j(),J=x??T,{compactSize:se,compactItemClassnames:X}=Zo(H,J),[de,ye]=su("select",E,o),ce=xo(H),[oe,me,te]=Fz(H,ce),le=h.useMemo(()=>{const{mode:ht}=t;if(ht!=="combobox")return ht===h1?"combobox":ht},[t.mode]),fe=le==="multiple"||le==="tags",Ee=Xz(t.suffixIcon,t.showArrow),Oe=(n=C??b)!==null&&n!==void 0?n:W,{status:xe,hasFeedback:Be,isFormItemInput:z,feedbackIcon:ve}=h.useContext(Nr),ae=Fs(xe,g);let he;v!==void 0?he=v:le==="combobox"?he=null:he=(A==null?void 0:A("Select"))||h.createElement(Sz,{componentName:"Select"});const{suffixIcon:$e,itemIcon:Me,removeIcon:we,clearIcon:ze}=Gz(Object.assign(Object.assign({},k),{multiple:fe,hasFeedback:Be,feedbackIcon:ve,showSuffixIcon:Ee,prefixCls:H,componentName:"Select"})),Le=w===!0?{clearIcon:ze}:w,Ie=Tn(k,["suffixIcon","itemIcon"]),We=ee(l||c,{[`${H}-dropdown-${J}`]:J==="rtl"},a,te,ce,me),Ke=Fr(ht=>{var Tt;return(Tt=p??se)!==null&&Tt!==void 0?Tt:ht}),Pe=h.useContext(zr),je=m??Pe,_e=ee({[`${H}-lg`]:Ke==="large",[`${H}-sm`]:Ke==="small",[`${H}-rtl`]:J==="rtl",[`${H}-${de}`]:ye,[`${H}-in-form-item`]:z},Ni(H,ae,Be),X,V.className,i,a,te,ce,me),Fe=h.useMemo(()=>d!==void 0?d:J==="rtl"?"bottomRight":"bottomLeft",[d,J]);if(process.env.NODE_ENV!=="production"){const ht=on("Select");ht.deprecated(!c,"dropdownClassName","popupClassName"),ht.deprecated(b===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&ht(!("showArrow"in t),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),ht.deprecated(!("bordered"in t),"bordered","variant"),process.env.NODE_ENV!=="production"&&ht(!(typeof I<"u"&&!fe),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[Ze]=Ps("SelectLike",N==null?void 0:N.zIndex);return oe(h.createElement(Np,Object.assign({ref:e,virtual:_,showSearch:V.showSearch},Ie,{style:Object.assign(Object.assign({},V.style),S),dropdownMatchSelectWidth:Oe,transitionName:Oi(G,"slide-up",O),builtinPlacements:wz(y,L),listHeight:u,listItemHeight:Y,mode:le,prefixCls:H,placement:Fe,direction:J,prefix:D,suffixIcon:$e,menuItemSelectedIcon:Me,removeIcon:we,allowClear:Le,notFoundContent:he,className:_e,getPopupContainer:s||P,dropdownClassName:We,disabled:je,dropdownStyle:Object.assign(Object.assign({},N),{zIndex:Ze}),maxCount:fe?I:void 0,tagRender:fe?M:void 0})))};process.env.NODE_ENV!=="production"&&(p1.displayName="Select");const ur=h.forwardRef(p1),Jz=yp(ur,"dropdownAlign");ur.SECRET_COMBOBOX_MODE_DO_NOT_USE=h1;ur.Option=$p;ur.OptGroup=Ep;ur._InternalPanelDoNotUseOrYouWillBeFired=Jz;process.env.NODE_ENV!=="production"&&(ur.displayName="Select");const gc=t=>t?typeof t=="function"?t():t:null;function Rp(t){var e=t.children,n=t.prefixCls,r=t.id,o=t.overlayInnerStyle,i=t.bodyClassName,a=t.className,s=t.style;return h.createElement("div",{className:ee("".concat(n,"-content"),a),style:s},h.createElement("div",{className:ee("".concat(n,"-inner"),i),id:r,role:"tooltip",style:o},typeof e=="function"?e():e))}var Vi={shiftX:64,adjustY:1},Wi={adjustX:1,shiftY:!0},Sr=[0,0],Qz={left:{points:["cr","cl"],overflow:Wi,offset:[-4,0],targetOffset:Sr},right:{points:["cl","cr"],overflow:Wi,offset:[4,0],targetOffset:Sr},top:{points:["bc","tc"],overflow:Vi,offset:[0,-4],targetOffset:Sr},bottom:{points:["tc","bc"],overflow:Vi,offset:[0,4],targetOffset:Sr},topLeft:{points:["bl","tl"],overflow:Vi,offset:[0,-4],targetOffset:Sr},leftTop:{points:["tr","tl"],overflow:Wi,offset:[-4,0],targetOffset:Sr},topRight:{points:["br","tr"],overflow:Vi,offset:[0,-4],targetOffset:Sr},rightTop:{points:["tl","tr"],overflow:Wi,offset:[4,0],targetOffset:Sr},bottomRight:{points:["tr","br"],overflow:Vi,offset:[0,4],targetOffset:Sr},rightBottom:{points:["bl","br"],overflow:Wi,offset:[4,0],targetOffset:Sr},bottomLeft:{points:["tl","bl"],overflow:Vi,offset:[0,4],targetOffset:Sr},leftBottom:{points:["br","bl"],overflow:Wi,offset:[-4,0],targetOffset:Sr}},Zz=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],ej=function(e,n){var r=e.overlayClassName,o=e.trigger,i=o===void 0?["hover"]:o,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?"rc-tooltip":d,p=e.children,m=e.onVisibleChange,v=e.afterVisibleChange,g=e.transitionName,y=e.animation,b=e.motion,C=e.placement,x=C===void 0?"right":C,S=e.align,w=S===void 0?{}:S,E=e.destroyTooltipOnHide,N=E===void 0?!1:E,O=e.defaultVisible,M=e.getTooltipContainer,I=e.overlayInnerStyle;e.arrowContent;var D=e.overlay,k=e.id,P=e.showArrow,j=P===void 0?!0:P,A=e.classNames,T=e.styles,_=xt(e,Zz),W=nu(k),L=$.useRef(null);$.useImperativeHandle(n,function(){return L.current});var V=q({},_);"visible"in e&&(V.popupVisible=e.visible);var U=function(){return h.createElement(Rp,{key:"content",prefixCls:f,id:W,bodyClassName:A==null?void 0:A.body,overlayInnerStyle:q(q({},I),T==null?void 0:T.body)},D)},Y=function(){var G=h.Children.only(p),J=(G==null?void 0:G.props)||{},se=q(q({},J),{},{"aria-describedby":D?W:null});return h.cloneElement(p,se)};return h.createElement(au,De({popupClassName:ee(r,A==null?void 0:A.root),prefixCls:f,popup:U,action:i,builtinPlacements:Qz,popupPlacement:x,ref:L,popupAlign:w,getPopupContainer:M,onPopupVisibleChange:m,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:y,popupMotion:b,defaultPopupVisible:O,autoDestroy:N,mouseLeaveDelay:c,popupStyle:q(q({},u),T==null?void 0:T.root),mouseEnterDelay:s,arrow:j},V),Y())};const tj=$.forwardRef(ej);function Tp(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:r}=t,o=e/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,p=2*o-s,m=l,v=2*o-i,g=a,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),b=r*(Math.sqrt(2)-1),C=`polygon(${b}px 100%, 50% ${b}px, ${2*o-b}px 100%, ${b}px 100%)`,x=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${p} ${m} A ${r} ${r} 0 0 0 ${v} ${g} Z')`;return{arrowShadowWidth:y,arrowPath:x,arrowPolygon:C}}const nj=(t,e,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${re(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},m1=8;function lu(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?m1:r}}function ml(t,e){return t?e:{}}function Pp(t,e,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},nj(t,e,o)),{"&:before":{background:e}})]},ml(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${re(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),ml(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${re(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),ml(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}})),ml(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}))}}function rj(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=r&&typeof r=="object"?r:{},i={};switch(t){case"top":case"bottom":i.shiftX=e.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=e.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a=Object.assign(Object.assign({},i),o);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const db={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},oj={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},ij=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function g1(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=t,s=e/2,l={};return Object.keys(db).forEach(c=>{const u=r&&oj[c]||db[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,ij.has(c)&&(d.autoArrow=!1),c){case"top":case"topLeft":case"topRight":d.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=s+o;break}const f=lu({contentRadius:i,limitVerticalRadius:!0});if(r)switch(c){case"topLeft":case"bottomLeft":d.offset[0]=-f.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":d.offset[0]=f.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":d.offset[1]=-f.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":d.offset[1]=f.arrowOffsetHorizontal*2-s;break}d.overflow=rj(c,f,e,n),a&&(d.htmlRegion="visibleFirst")}),l}const aj=t=>{const{calc:e,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p}=t,m=e(a).add(p).add(f).equal(),v=e(a).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Hn(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${n}-inner`]:{minWidth:v,minHeight:l,padding:`${re(t.calc(u).div(2).equal())} ${re(d)}`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:m},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:t.min(a,m1)}},[`${n}-content`]:{position:"relative"}}),vP(t,(g,y)=>{let{darkColor:b}=y;return{[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}})),{"&-rtl":{direction:"rtl"}})},Pp(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},sj=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},lu({contentRadius:t.borderRadius,limitVerticalRadius:!0})),Tp(Lt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),v1=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return hn("Tooltip",r=>{const{borderRadius:o,colorTextLightSolid:i,colorBgSpotlight:a}=r,s=Lt(r,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:o,tooltipBg:a});return[aj(s),Ds(r,"zoom-big-fast")]},sj,{resetStyle:!1,injectStyle:e})(t)},lj=Wo.map(t=>`${t}-inverse`);function cj(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(Re(lj),Re(Wo)).includes(t):Wo.includes(t)}function b1(t,e){const n=cj(e),r=ee({[`${t}-${e}`]:e&&n}),o={},i={};return e&&!n&&(o.background=e,i["--antd-arrow-background-color"]=e),{className:r,overlayStyle:o,arrowStyle:i}}const uj=t=>{const{prefixCls:e,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a}=t,{getPrefixCls:s}=h.useContext(At),l=s("tooltip",e),[c,u,d]=v1(l),f=b1(l,i),p=f.arrowStyle,m=Object.assign(Object.assign({},a),f.overlayStyle),v=ee(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(h.createElement("div",{className:v,style:p},h.createElement("div",{className:`${l}-arrow`}),h.createElement(Rp,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:m}),o)))};var dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const fj=h.forwardRef((t,e)=>{var n,r;const{prefixCls:o,openClassName:i,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,arrow:p=!0,title:m,overlay:v,builtinPlacements:g,arrowPointAtCenter:y=!1,autoAdjustOverflow:b=!0,motion:C,getPopupContainer:x,placement:S="top",mouseEnterDelay:w=.1,mouseLeaveDelay:E=.1,overlayStyle:N,rootClassName:O,overlayClassName:M,styles:I,classNames:D}=t,k=dj(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),P=!!p,[,j]=ar(),{getPopupContainer:A,getPrefixCls:T,direction:_,className:W,style:L,classNames:V,styles:U}=br("tooltip"),Y=on("Tooltip"),H=h.useRef(null),G=()=>{var Ie;(Ie=H.current)===null||Ie===void 0||Ie.forceAlign()};h.useImperativeHandle(e,()=>{var Ie,We;return{forceAlign:G,forcePopupAlign:()=>{Y.deprecated(!1,"forcePopupAlign","forceAlign"),G()},nativeElement:(Ie=H.current)===null||Ie===void 0?void 0:Ie.nativeElement,popupElement:(We=H.current)===null||We===void 0?void 0:We.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach(Ie=>{let[We,Ke]=Ie;Y.deprecated(!(We in t),We,Ke)}),process.env.NODE_ENV!=="production"&&Y(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&Y(!p||typeof p=="boolean"||!("arrowPointAtCenter"in p),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[J,se]=mn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),X=!m&&!v&&m!==0,de=Ie=>{var We,Ke;se(X?!1:Ie),X||((We=t.onOpenChange)===null||We===void 0||We.call(t,Ie),(Ke=t.onVisibleChange)===null||Ke===void 0||Ke.call(t,Ie))},ye=h.useMemo(()=>{var Ie,We;let Ke=y;return typeof p=="object"&&(Ke=(We=(Ie=p.pointAtCenter)!==null&&Ie!==void 0?Ie:p.arrowPointAtCenter)!==null&&We!==void 0?We:y),g||g1({arrowPointAtCenter:Ke,autoAdjustOverflow:b,arrowWidth:P?j.sizePopupArrow:0,borderRadius:j.borderRadius,offset:j.marginXXS,visibleFirst:!0})},[y,p,g,j]),ce=h.useMemo(()=>m===0?m:v||m||"",[v,m]),oe=h.createElement(qo,{space:!0},typeof ce=="function"?ce():ce),me=T("tooltip",o),te=T(),le=t["data-popover-inject"];let fe=J;!("open"in t)&&!("visible"in t)&&X&&(fe=!1);const Ee=h.isValidElement(c)&&!zS(c)?c:h.createElement("span",null,c),Oe=Ee.props,xe=!Oe.className||typeof Oe.className=="string"?ee(Oe.className,i||`${me}-open`):Oe.className,[Be,z,ve]=v1(me,!le),ae=b1(me,s),he=ae.arrowStyle,$e=ee(M,{[`${me}-rtl`]:_==="rtl"},ae.className,O,z,ve,W,V.root,D==null?void 0:D.root),Me=ee(V.body,D==null?void 0:D.body),[we,ze]=Ps("Tooltip",k.zIndex),Le=h.createElement(tj,Object.assign({},k,{zIndex:we,showArrow:P,placement:S,mouseEnterDelay:w,mouseLeaveDelay:E,prefixCls:me,classNames:{root:$e,body:Me},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},he),U.root),L),N),I==null?void 0:I.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},U.body),l),I==null?void 0:I.body),ae.overlayStyle)},getTooltipContainer:x||a||A,ref:H,builtinPlacements:ye,overlay:oe,visible:fe,onVisibleChange:de,afterVisibleChange:u??d,arrowContent:h.createElement("span",{className:`${me}-arrow-content`}),motion:{motionName:Oi(te,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!f}),fe?Or(Ee,{className:xe}):Ee);return Be(h.createElement(Ts.Provider,{value:ze},Le))}),Ko=fj;process.env.NODE_ENV!=="production"&&(Ko.displayName="Tooltip");Ko._InternalPanelDoNotUseOrYouWillBeFired=uj;const hj=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:v}=t;return[{[e]:Object.assign(Object.assign({},Hn(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:i},[`${e}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:o,borderBottom:p,padding:v},[`${e}-inner-content`]:{color:n,padding:m}})},Pp(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},pj=t=>{const{componentCls:e}=t;return{[e]:Wo.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},mj=t=>{const{lineWidth:e,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,f=n-r,p=f/2,m=f/2-e,v=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},Tp(t)),lu({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:l,titlePadding:i?`${p}px ${v}px ${m}px`:0,titleBorderBottom:i?`${e}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${v}px`:0})},y1=hn("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=Lt(t,{popoverBg:e,popoverColor:n});return[hj(r),pj(r),Ds(r,"zoom-big")]},mj,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var gj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const C1=t=>{let{title:e,content:n,prefixCls:r}=t;return!e&&!n?null:h.createElement(h.Fragment,null,e&&h.createElement("div",{className:`${r}-title`},e),n&&h.createElement("div",{className:`${r}-inner-content`},n))},vj=t=>{const{hashId:e,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:s,children:l}=t,c=gc(a),u=gc(s),d=ee(e,n,`${n}-pure`,`${n}-placement-${i}`,r);return h.createElement("div",{className:d,style:o},h.createElement("div",{className:`${n}-arrow`}),h.createElement(Rp,Object.assign({},t,{className:e,prefixCls:n}),l||h.createElement(C1,{prefixCls:n,title:c,content:u})))},bj=t=>{const{prefixCls:e,className:n}=t,r=gj(t,["prefixCls","className"]),{getPrefixCls:o}=h.useContext(At),i=o("popover",e),[a,s,l]=y1(i);return a(h.createElement(vj,Object.assign({},r,{prefixCls:i,hashId:s,className:ee(n,l)})))};var yj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Cj=h.forwardRef((t,e)=>{var n,r;const{prefixCls:o,title:i,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:p,overlayStyle:m={},styles:v,classNames:g}=t,y=yj(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:b,className:C,style:x,classNames:S,styles:w}=br("popover"),E=b("popover",o),[N,O,M]=y1(E),I=b(),D=ee(s,O,M,C,S.root,g==null?void 0:g.root),k=ee(S.body,g==null?void 0:g.body),[P,j]=mn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),A=(V,U)=>{j(V,!0),p==null||p(V,U)},T=V=>{V.keyCode===Je.ESC&&A(!1,V)},_=V=>{A(V)},W=gc(i),L=gc(a);return N(h.createElement(Ko,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},y,{prefixCls:E,classNames:{root:D,body:k},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},w.root),x),m),v==null?void 0:v.root),body:Object.assign(Object.assign({},w.body),v==null?void 0:v.body)},ref:e,open:P,onOpenChange:_,overlay:W||L?h.createElement(C1,{prefixCls:E,title:W,content:L}):null,transitionName:Oi(I,"zoom-big",y.transitionName),"data-popover-inject":!0}),Or(u,{onKeyDown:V=>{var U,Y;h.isValidElement(u)&&((Y=u==null?void 0:(U=u.props).onKeyDown)===null||Y===void 0||Y.call(U,V)),T(V)}})))}),Ap=Cj;Ap._InternalPanelDoNotUseOrYouWillBeFired=bj;process.env.NODE_ENV!=="production"&&(Ap.displayName="Popover");var Sj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},xj=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:Sj}))},vc=h.forwardRef(xj);process.env.NODE_ENV!=="production"&&(vc.displayName="LeftOutlined");var wj=Je.ESC,Ej=Je.TAB;function $j(t){var e=t.visible,n=t.triggerRef,r=t.onVisibleChange,o=t.autoFocus,i=t.overlayRef,a=h.useRef(!1),s=function(){if(e){var d,f;(d=n.current)===null||d===void 0||(f=d.focus)===null||f===void 0||f.call(d),r==null||r(!1)}},l=function(){var d;return(d=i.current)!==null&&d!==void 0&&d.focus?(i.current.focus(),a.current=!0,!0):!1},c=function(d){switch(d.keyCode){case wj:s();break;case Ej:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};h.useEffect(function(){return e?(window.addEventListener("keydown",c),o&&Dt(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}},[e])}var Oj=$.forwardRef(function(t,e){var n=t.overlay,r=t.arrow,o=t.prefixCls,i=$.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=ir(e,Ri(i));return $.createElement($.Fragment,null,r&&$.createElement("div",{className:"".concat(o,"-arrow")}),$.cloneElement(i,{ref:Qo(i)?a:void 0}))}),qi={adjustX:1,adjustY:1},Ki=[0,0],Nj={topLeft:{points:["bl","tl"],overflow:qi,offset:[0,-4],targetOffset:Ki},top:{points:["bc","tc"],overflow:qi,offset:[0,-4],targetOffset:Ki},topRight:{points:["br","tr"],overflow:qi,offset:[0,-4],targetOffset:Ki},bottomLeft:{points:["tl","bl"],overflow:qi,offset:[0,4],targetOffset:Ki},bottom:{points:["tc","bc"],overflow:qi,offset:[0,4],targetOffset:Ki},bottomRight:{points:["tr","br"],overflow:qi,offset:[0,4],targetOffset:Ki}},Mj=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Ij(t,e){var n,r=t.arrow,o=r===void 0?!1:r,i=t.prefixCls,a=i===void 0?"rc-dropdown":i,s=t.transitionName,l=t.animation,c=t.align,u=t.placement,d=u===void 0?"bottomLeft":u,f=t.placements,p=f===void 0?Nj:f,m=t.getPopupContainer,v=t.showAction,g=t.hideAction,y=t.overlayClassName,b=t.overlayStyle,C=t.visible,x=t.trigger,S=x===void 0?["hover"]:x,w=t.autoFocus,E=t.overlay,N=t.children,O=t.onVisibleChange,M=xt(t,Mj),I=$.useState(),D=ie(I,2),k=D[0],P=D[1],j="visible"in t?C:k,A=$.useRef(null),T=$.useRef(null),_=$.useRef(null);$.useImperativeHandle(e,function(){return A.current});var W=function(X){P(X),O==null||O(X)};$j({visible:j,triggerRef:_,onVisibleChange:W,autoFocus:w,overlayRef:T});var L=function(X){var de=t.onOverlayClick;P(!1),de&&de(X)},V=function(){return $.createElement(Oj,{ref:T,overlay:E,prefixCls:a,arrow:o})},U=function(){return typeof E=="function"?V:V()},Y=function(){var X=t.minOverlayWidthMatchTrigger,de=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?X:!de},H=function(){var X=t.openClassName;return X!==void 0?X:"".concat(a,"-open")},G=$.cloneElement(N,{className:ee((n=N.props)===null||n===void 0?void 0:n.className,j&&H()),ref:Qo(N)?ir(_,Ri(N)):void 0}),J=g;return!J&&S.indexOf("contextMenu")!==-1&&(J=["click"]),$.createElement(au,De({builtinPlacements:p},M,{prefixCls:a,ref:A,popupClassName:ee(y,F({},"".concat(a,"-show-arrow"),o)),popupStyle:b,action:S,showAction:v,hideAction:J,popupPlacement:d,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:j,stretch:Y()?"minWidth":"",popup:U(),onPopupVisibleChange:W,onPopupClick:L,getPopupContainer:m}),G)}const Rj=$.forwardRef(Ij),Tj=t=>typeof t!="object"&&typeof t!="function"||t===null;var S1=h.createContext(null);function x1(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function w1(t){var e=h.useContext(S1);return x1(e,t)}var Pj=["children","locked"],Lr=h.createContext(null);function Aj(t,e){var n=q({},t);return Object.keys(e).forEach(function(r){var o=e[r];o!==void 0&&(n[r]=o)}),n}function ws(t){var e=t.children,n=t.locked,r=xt(t,Pj),o=h.useContext(Lr),i=Ms(function(){return Aj(o,r)},[o,r],function(a,s){return!n&&(a[0]!==s[0]||!ha(a[1],s[1],!0))});return h.createElement(Lr.Provider,{value:i},e)}var Dj=[],E1=h.createContext(null);function cu(){return h.useContext(E1)}var $1=h.createContext(Dj);function Oa(t){var e=h.useContext($1);return h.useMemo(function(){return t!==void 0?[].concat(Re(e),[t]):e},[e,t])}var O1=h.createContext(null),Dp=h.createContext({});function fb(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(sp(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),o=t.getAttribute("tabindex"),i=Number(o),a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function kj(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Re(t.querySelectorAll("*")).filter(function(r){return fb(r,e)});return fb(t,e)&&n.unshift(t),n}var rh=Je.LEFT,oh=Je.RIGHT,ih=Je.UP,zl=Je.DOWN,jl=Je.ENTER,N1=Je.ESC,ja=Je.HOME,La=Je.END,hb=[ih,zl,rh,oh];function _j(t,e,n,r){var o,i="prev",a="next",s="children",l="parent";if(t==="inline"&&r===jl)return{inlineTrigger:!0};var c=F(F({},ih,i),zl,a),u=F(F(F(F({},rh,n?a:i),oh,n?i:a),zl,s),jl,s),d=F(F(F(F(F(F({},ih,i),zl,a),jl,s),N1,l),rh,n?s:l),oh,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},p=(o=f["".concat(t).concat(e?"":"Sub")])===null||o===void 0?void 0:o[r];switch(p){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function Bj(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function zj(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function kp(t,e){var n=kj(t,!0);return n.filter(function(r){return e.has(r)})}function pb(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var o=kp(t,e),i=o.length,a=o.findIndex(function(s){return n===s});return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}var ah=function(e,n){var r=new Set,o=new Map,i=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(x1(n,a),"']"));s&&(r.add(s),i.set(s,a),o.set(a,s))}),{elements:r,key2element:o,element2key:i}};function jj(t,e,n,r,o,i,a,s,l,c){var u=h.useRef(),d=h.useRef();d.current=e;var f=function(){Dt.cancel(u.current)};return h.useEffect(function(){return function(){f()}},[]),function(p){var m=p.which;if([].concat(hb,[jl,N1,ja,La]).includes(m)){var v=i(),g=ah(v,r),y=g,b=y.elements,C=y.key2element,x=y.element2key,S=C.get(e),w=zj(S,b),E=x.get(w),N=_j(t,a(E,!0).length===1,n,m);if(!N&&m!==ja&&m!==La)return;(hb.includes(m)||[ja,La].includes(m))&&p.preventDefault();var O=function(T){if(T){var _=T,W=T.querySelector("a");W!=null&&W.getAttribute("href")&&(_=W);var L=x.get(T);s(L),f(),u.current=Dt(function(){d.current===L&&_.focus()})}};if([ja,La].includes(m)||N.sibling||!w){var M;!w||t==="inline"?M=o.current:M=Bj(w);var I,D=kp(M,b);m===ja?I=D[0]:m===La?I=D[D.length-1]:I=pb(M,b,w,N.offset),O(I)}else if(N.inlineTrigger)l(E);else if(N.offset>0)l(E,!0),f(),u.current=Dt(function(){g=ah(v,r);var A=w.getAttribute("aria-controls"),T=document.getElementById(A),_=pb(T,g.elements);O(_)},5);else if(N.offset<0){var k=a(E,!0),P=k[k.length-2],j=C.get(P);l(P,!1),O(j)}}c==null||c(p)}}function Lj(t){Promise.resolve().then(t)}var _p="__RC_UTIL_PATH_SPLIT__",mb=function(e){return e.join(_p)},Fj=function(e){return e.split(_p)},sh="rc-menu-more";function Hj(){var t=h.useState({}),e=ie(t,2),n=e[1],r=$.useRef(new Map),o=$.useRef(new Map),i=h.useState([]),a=ie(i,2),s=a[0],l=a[1],c=$.useRef(0),u=$.useRef(!1),d=function(){u.current||n({})},f=$.useCallback(function(C,x){process.env.NODE_ENV!=="production"&&yt(!r.current.has(C),"Duplicated key '".concat(C,"' used in Menu by path [").concat(x.join(" > "),"]"));var S=mb(x);o.current.set(S,C),r.current.set(C,S),c.current+=1;var w=c.current;Lj(function(){w===c.current&&d()})},[]),p=$.useCallback(function(C,x){var S=mb(x);o.current.delete(S),r.current.delete(C)},[]),m=$.useCallback(function(C){l(C)},[]),v=$.useCallback(function(C,x){var S=r.current.get(C)||"",w=Fj(S);return x&&s.includes(w[0])&&w.unshift(sh),w},[s]),g=$.useCallback(function(C,x){return C.filter(function(S){return S!==void 0}).some(function(S){var w=v(S,!0);return w.includes(x)})},[v]),y=function(){var x=Re(r.current.keys());return s.length&&x.push(sh),x},b=$.useCallback(function(C){var x="".concat(r.current.get(C)).concat(_p),S=new Set;return Re(o.current.keys()).forEach(function(w){w.startsWith(x)&&S.add(o.current.get(w))}),S},[]);return h.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:p,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:v,getKeys:y,getSubPathKeys:b}}function Ua(t){var e=h.useRef(t);e.current=t;var n=h.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(i))},[]);return t?n:void 0}var Vj=Math.random().toFixed(5).toString().slice(2),gb=0;function Wj(t){var e=mn(t,{value:t}),n=ie(e,2),r=n[0],o=n[1];return h.useEffect(function(){gb+=1;var i=process.env.NODE_ENV==="test"?"test":"".concat(Vj,"-").concat(gb);o("rc-menu-uuid-".concat(i))},[]),r}function M1(t,e,n,r){var o=h.useContext(Lr),i=o.activeKey,a=o.onActive,s=o.onInactive,l={active:i===t};return e||(l.onMouseEnter=function(c){n==null||n({key:t,domEvent:c}),a(t)},l.onMouseLeave=function(c){r==null||r({key:t,domEvent:c}),s(t)}),l}function I1(t){var e=h.useContext(Lr),n=e.mode,r=e.rtl,o=e.inlineIndent;if(n!=="inline")return null;var i=t;return r?{paddingRight:i*o}:{paddingLeft:i*o}}function R1(t){var e=t.icon,n=t.props,r=t.children,o;return e===null||e===!1?null:(typeof e=="function"?o=h.createElement(e,q({},n)):typeof e!="boolean"&&(o=e),o||r||null)}var qj=["item"];function bc(t){var e=t.item,n=xt(t,qj);return Object.defineProperty(n,"item",{get:function(){return yt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),n}var Kj=["title","attribute","elementRef"],Uj=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Gj=["active"],Xj=function(t){bo(n,t);var e=yo(n);function n(){return xn(this,n),e.apply(this,arguments)}return wn(n,[{key:"render",value:function(){var o=this.props,i=o.title,a=o.attribute,s=o.elementRef,l=xt(o,Kj),c=Tn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return yt(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(Xr.Item,De({},a,{title:typeof i=="string"?i:void 0},c,{ref:s}))}}]),n}(h.Component),Yj=h.forwardRef(function(t,e){var n=t.style,r=t.className,o=t.eventKey,i=t.warnKey,a=t.disabled,s=t.itemIcon,l=t.children,c=t.role,u=t.onMouseEnter,d=t.onMouseLeave,f=t.onClick,p=t.onKeyDown,m=t.onFocus,v=xt(t,Uj),g=w1(o),y=h.useContext(Lr),b=y.prefixCls,C=y.onItemClick,x=y.disabled,S=y.overflowDisabled,w=y.itemIcon,E=y.selectedKeys,N=y.onActive,O=h.useContext(Dp),M=O._internalRenderMenuItem,I="".concat(b,"-item"),D=h.useRef(),k=h.useRef(),P=x||a,j=Jo(e,k),A=Oa(o);process.env.NODE_ENV!=="production"&&i&&yt(!1,"MenuItem should not leave undefined `key`.");var T=function(ye){return{key:o,keyPath:Re(A).reverse(),item:D.current,domEvent:ye}},_=s||w,W=M1(o,P,u,d),L=W.active,V=xt(W,Gj),U=E.includes(o),Y=I1(A.length),H=function(ye){if(!P){var ce=T(ye);f==null||f(bc(ce)),C(ce)}},G=function(ye){if(p==null||p(ye),ye.which===Je.ENTER){var ce=T(ye);f==null||f(bc(ce)),C(ce)}},J=function(ye){N(o),m==null||m(ye)},se={};t.role==="option"&&(se["aria-selected"]=U);var X=h.createElement(Xj,De({ref:D,elementRef:j,role:c===null?"none":c||"menuitem",tabIndex:a?null:-1,"data-menu-id":S&&g?null:g},Tn(v,["extra"]),V,se,{component:"li","aria-disabled":a,style:q(q({},Y),n),className:ee(I,F(F(F({},"".concat(I,"-active"),L),"".concat(I,"-selected"),U),"".concat(I,"-disabled"),P),r),onClick:H,onKeyDown:G,onFocus:J}),l,h.createElement(R1,{props:q(q({},t),{},{isSelected:U}),icon:_}));return M&&(X=M(X,t,{selected:U})),X});function Jj(t,e){var n=t.eventKey,r=cu(),o=Oa(n);return h.useEffect(function(){if(r)return r.registerPath(n,o),function(){r.unregisterPath(n,o)}},[o]),r?null:h.createElement(Yj,De({},t,{ref:e}))}const uu=h.forwardRef(Jj);var Qj=["className","children"],Zj=function(e,n){var r=e.className,o=e.children,i=xt(e,Qj),a=h.useContext(Lr),s=a.prefixCls,l=a.mode,c=a.rtl;return h.createElement("ul",De({className:ee(s,c&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},i,{"data-menu-list":!0,ref:n}),o)},Bp=h.forwardRef(Zj);Bp.displayName="SubMenuList";function zp(t,e){return gr(t).map(function(n,r){if(h.isValidElement(n)){var o,i,a=n.key,s=(o=(i=n.props)===null||i===void 0?void 0:i.eventKey)!==null&&o!==void 0?o:a,l=s==null;l&&(s="tmp_key-".concat([].concat(Re(e),[r]).join("-")));var c={key:s,eventKey:s};return process.env.NODE_ENV!=="production"&&l&&(c.warnKey=!0),h.cloneElement(n,c)}return n})}var Kn={adjustX:1,adjustY:1},eL={topLeft:{points:["bl","tl"],overflow:Kn},topRight:{points:["br","tr"],overflow:Kn},bottomLeft:{points:["tl","bl"],overflow:Kn},bottomRight:{points:["tr","br"],overflow:Kn},leftTop:{points:["tr","tl"],overflow:Kn},leftBottom:{points:["br","bl"],overflow:Kn},rightTop:{points:["tl","tr"],overflow:Kn},rightBottom:{points:["bl","br"],overflow:Kn}},tL={topLeft:{points:["bl","tl"],overflow:Kn},topRight:{points:["br","tr"],overflow:Kn},bottomLeft:{points:["tl","bl"],overflow:Kn},bottomRight:{points:["tr","br"],overflow:Kn},rightTop:{points:["tr","tl"],overflow:Kn},rightBottom:{points:["br","bl"],overflow:Kn},leftTop:{points:["tl","tr"],overflow:Kn},leftBottom:{points:["bl","br"],overflow:Kn}};function T1(t,e,n){if(e)return e;if(n)return n[t]||n.other}var nL={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function rL(t){var e=t.prefixCls,n=t.visible,r=t.children,o=t.popup,i=t.popupStyle,a=t.popupClassName,s=t.popupOffset,l=t.disabled,c=t.mode,u=t.onVisibleChange,d=h.useContext(Lr),f=d.getPopupContainer,p=d.rtl,m=d.subMenuOpenDelay,v=d.subMenuCloseDelay,g=d.builtinPlacements,y=d.triggerSubMenuAction,b=d.forceSubMenuRender,C=d.rootClassName,x=d.motion,S=d.defaultMotions,w=h.useState(!1),E=ie(w,2),N=E[0],O=E[1],M=q(p?q({},tL):q({},eL),g),I=nL[c],D=T1(c,x,S),k=h.useRef(D);c!=="inline"&&(k.current=D);var P=q(q({},k.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),j=h.useRef();return h.useEffect(function(){return j.current=Dt(function(){O(n)}),function(){Dt.cancel(j.current)}},[n]),h.createElement(au,{prefixCls:e,popupClassName:ee("".concat(e,"-popup"),F({},"".concat(e,"-rtl"),p),a,C),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:M,popupPlacement:I,popupVisible:N,popup:o,popupStyle:i,popupAlign:s&&{offset:s},action:l?[]:[y],mouseEnterDelay:m,mouseLeaveDelay:v,onPopupVisibleChange:u,forceRender:b,popupMotion:P,fresh:!0},r)}function oL(t){var e=t.id,n=t.open,r=t.keyPath,o=t.children,i="inline",a=h.useContext(Lr),s=a.prefixCls,l=a.forceSubMenuRender,c=a.motion,u=a.defaultMotions,d=a.mode,f=h.useRef(!1);f.current=d===i;var p=h.useState(!f.current),m=ie(p,2),v=m[0],g=m[1],y=f.current?n:!1;h.useEffect(function(){f.current&&g(!1)},[d]);var b=q({},T1(i,c,u));r.length>1&&(b.motionAppear=!1);var C=b.onVisibleChanged;return b.onVisibleChanged=function(x){return!f.current&&!x&&g(!0),C==null?void 0:C(x)},v?null:h.createElement(ws,{mode:i,locked:!f.current},h.createElement(no,De({visible:y},b,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var S=x.className,w=x.style;return h.createElement(Bp,{id:e,className:S,style:w},o)}))}var iL=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],aL=["active"],sL=h.forwardRef(function(t,e){var n=t.style,r=t.className,o=t.title,i=t.eventKey,a=t.warnKey,s=t.disabled,l=t.internalPopupClose,c=t.children,u=t.itemIcon,d=t.expandIcon,f=t.popupClassName,p=t.popupOffset,m=t.popupStyle,v=t.onClick,g=t.onMouseEnter,y=t.onMouseLeave,b=t.onTitleClick,C=t.onTitleMouseEnter,x=t.onTitleMouseLeave,S=xt(t,iL),w=w1(i),E=h.useContext(Lr),N=E.prefixCls,O=E.mode,M=E.openKeys,I=E.disabled,D=E.overflowDisabled,k=E.activeKey,P=E.selectedKeys,j=E.itemIcon,A=E.expandIcon,T=E.onItemClick,_=E.onOpenChange,W=E.onActive,L=h.useContext(Dp),V=L._internalRenderSubMenuItem,U=h.useContext(O1),Y=U.isSubPathKey,H=Oa(),G="".concat(N,"-submenu"),J=I||s,se=h.useRef(),X=h.useRef();process.env.NODE_ENV!=="production"&&a&&yt(!1,"SubMenu should not leave undefined `key`.");var de=u??j,ye=d??A,ce=M.includes(i),oe=!D&&ce,me=Y(P,i),te=M1(i,J,C,x),le=te.active,fe=xt(te,aL),Ee=h.useState(!1),Oe=ie(Ee,2),xe=Oe[0],Be=Oe[1],z=function(Ze){J||Be(Ze)},ve=function(Ze){z(!0),g==null||g({key:i,domEvent:Ze})},ae=function(Ze){z(!1),y==null||y({key:i,domEvent:Ze})},he=h.useMemo(function(){return le||(O!=="inline"?xe||Y([k],i):!1)},[O,le,k,xe,i,Y]),$e=I1(H.length),Me=function(Ze){J||(b==null||b({key:i,domEvent:Ze}),O==="inline"&&_(i,!ce))},we=Ua(function(Fe){v==null||v(bc(Fe)),T(Fe)}),ze=function(Ze){O!=="inline"&&_(i,Ze)},Le=function(){W(i)},Ie=w&&"".concat(w,"-popup"),We=h.useMemo(function(){return h.createElement(R1,{icon:O!=="horizontal"?ye:void 0,props:q(q({},t),{},{isOpen:oe,isSubMenu:!0})},h.createElement("i",{className:"".concat(G,"-arrow")}))},[O,ye,t,oe,G]),Ke=h.createElement("div",De({role:"menuitem",style:$e,className:"".concat(G,"-title"),tabIndex:J?null:-1,ref:se,title:typeof o=="string"?o:null,"data-menu-id":D&&w?null:w,"aria-expanded":oe,"aria-haspopup":!0,"aria-controls":Ie,"aria-disabled":J,onClick:Me,onFocus:Le},fe),o,We),Pe=h.useRef(O);if(O!=="inline"&&H.length>1?Pe.current="vertical":Pe.current=O,!D){var je=Pe.current;Ke=h.createElement(rL,{mode:je,prefixCls:G,visible:!l&&oe&&O!=="inline",popupClassName:f,popupOffset:p,popupStyle:m,popup:h.createElement(ws,{mode:je==="horizontal"?"vertical":je},h.createElement(Bp,{id:Ie,ref:X},c)),disabled:J,onVisibleChange:ze},Ke)}var _e=h.createElement(Xr.Item,De({ref:e,role:"none"},S,{component:"li",style:n,className:ee(G,"".concat(G,"-").concat(O),r,F(F(F(F({},"".concat(G,"-open"),oe),"".concat(G,"-active"),he),"".concat(G,"-selected"),me),"".concat(G,"-disabled"),J)),onMouseEnter:ve,onMouseLeave:ae}),Ke,!D&&h.createElement(oL,{id:Ie,open:oe,keyPath:H},c));return V&&(_e=V(_e,t,{selected:me,active:he,open:oe,disabled:J})),h.createElement(ws,{onItemClick:we,mode:O==="horizontal"?"vertical":O,itemIcon:de,expandIcon:ye},_e)}),Hs=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=Oa(n),i=zp(r,o),a=cu();h.useEffect(function(){if(a)return a.registerPath(n,o),function(){a.unregisterPath(n,o)}},[o]);var s;return a?s=i:s=h.createElement(sL,De({ref:e},t),i),h.createElement($1.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Hs.displayName="SubMenu");function jp(t){var e=t.className,n=t.style,r=h.useContext(Lr),o=r.prefixCls,i=cu();return i?null:h.createElement("li",{role:"separator",className:ee("".concat(o,"-item-divider"),e),style:n})}var lL=["className","title","eventKey","children"],cL=h.forwardRef(function(t,e){var n=t.className,r=t.title;t.eventKey;var o=t.children,i=xt(t,lL),a=h.useContext(Lr),s=a.prefixCls,l="".concat(s,"-item-group");return h.createElement("li",De({ref:e,role:"presentation"},i,{onClick:function(u){return u.stopPropagation()},className:ee(l,n)}),h.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),h.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))}),du=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=Oa(n),i=zp(r,o),a=cu();return a?i:h.createElement(cL,De({ref:e},Tn(t,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(du.displayName="MenuItemGroup");var uL=["label","children","key","type","extra"];function lh(t,e,n){var r=e.item,o=e.group,i=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&st(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,p=c.type,m=c.extra,v=xt(c,uL),g=f??"tmp-".concat(l);return d||p==="group"?p==="group"?h.createElement(o,De({key:g},v,{title:u}),lh(d,e,n)):h.createElement(i,De({key:g},v,{title:u}),lh(d,e,n)):p==="divider"?h.createElement(a,De({key:g},v)):h.createElement(r,De({key:g},v,{extra:m}),u,(!!m||m===0)&&h.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(s){return s})}function vb(t,e,n,r,o){var i=t,a=q({divider:jp,item:uu,group:du,submenu:Hs},r);return e&&(i=lh(e,a,o)),zp(i,n)}var dL=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],ti=[],fL=h.forwardRef(function(t,e){var n,r=t,o=r.prefixCls,i=o===void 0?"rc-menu":o,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,p=r.direction,m=r.id,v=r.mode,g=v===void 0?"vertical":v,y=r.inlineCollapsed,b=r.disabled,C=r.disabledOverflow,x=r.subMenuOpenDelay,S=x===void 0?.1:x,w=r.subMenuCloseDelay,E=w===void 0?.1:w,N=r.forceSubMenuRender,O=r.defaultOpenKeys,M=r.openKeys,I=r.activeKey,D=r.defaultActiveFirst,k=r.selectable,P=k===void 0?!0:k,j=r.multiple,A=j===void 0?!1:j,T=r.defaultSelectedKeys,_=r.selectedKeys,W=r.onSelect,L=r.onDeselect,V=r.inlineIndent,U=V===void 0?24:V,Y=r.motion,H=r.defaultMotions,G=r.triggerSubMenuAction,J=G===void 0?"hover":G,se=r.builtinPlacements,X=r.itemIcon,de=r.expandIcon,ye=r.overflowedIndicator,ce=ye===void 0?"...":ye,oe=r.overflowedIndicatorPopupClassName,me=r.getPopupContainer,te=r.onClick,le=r.onOpenChange,fe=r.onKeyDown,Ee=r.openAnimation,Oe=r.openTransitionName,xe=r._internalRenderMenuItem,Be=r._internalRenderSubMenuItem,z=r._internalComponents,ve=xt(r,dL),ae=h.useMemo(function(){return[vb(f,d,ti,z,i),vb(f,d,ti,{},i)]},[f,d,z]),he=ie(ae,2),$e=he[0],Me=he[1],we=h.useState(!1),ze=ie(we,2),Le=ze[0],Ie=ze[1],We=h.useRef(),Ke=Wj(m),Pe=p==="rtl";process.env.NODE_ENV!=="production"&&yt(!Ee&&!Oe,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var je=mn(O,{value:M,postState:function(be){return be||ti}}),_e=ie(je,2),Fe=_e[0],Ze=_e[1],ht=function(be){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Te(){Ze(be),le==null||le(be)}Se?_r.flushSync(Te):Te()},Tt=h.useState(Fe),Pt=ie(Tt,2),an=Pt[0],Ye=Pt[1],He=h.useRef(!1),lt=h.useMemo(function(){return(g==="inline"||g==="vertical")&&y?["vertical",y]:[g,!1]},[g,y]),it=ie(lt,2),pt=it[0],Qe=it[1],qe=pt==="inline",Ue=h.useState(pt),wt=ie(Ue,2),Nt=wt[0],et=wt[1],Ve=h.useState(Qe),ot=ie(Ve,2),at=ot[0],nt=ot[1];h.useEffect(function(){et(pt),nt(Qe),He.current&&(qe?Ze(an):ht(ti))},[pt,Qe]);var dt=h.useState(0),kt=ie(dt,2),$t=kt[0],Gt=kt[1],It=$t>=$e.length-1||Nt!=="horizontal"||C;h.useEffect(function(){qe&&Ye(Fe)},[Fe]),h.useEffect(function(){return He.current=!0,function(){He.current=!1}},[]);var Bt=Hj(),Ht=Bt.registerPath,Xt=Bt.unregisterPath,Mn=Bt.refreshOverflowKeys,Yt=Bt.isSubPathKey,sn=Bt.getKeyPath,ke=Bt.getKeys,rt=Bt.getSubPathKeys,Xe=h.useMemo(function(){return{registerPath:Ht,unregisterPath:Xt}},[Ht,Xt]),Ae=h.useMemo(function(){return{isSubPathKey:Yt}},[Yt]);h.useEffect(function(){Mn(It?ti:$e.slice($t+1).map(function(ue){return ue.key}))},[$t,It]);var ft=mn(I||D&&((n=$e[0])===null||n===void 0?void 0:n.key),{value:I}),Et=ie(ft,2),Ot=Et[0],ln=Et[1],en=Ua(function(ue){ln(ue)}),dn=Ua(function(){ln(void 0)});$.useImperativeHandle(e,function(){return{list:We.current,focus:function(be){var Se,Te=ke(),tt=ah(Te,Ke),bt=tt.elements,Ct=tt.key2element,zt=tt.element2key,jt=kp(We.current,bt),nn=Ot??(jt[0]?zt.get(jt[0]):(Se=$e.find(function(ei){return!ei.props.disabled}))===null||Se===void 0?void 0:Se.key),gn=Ct.get(nn);if(nn&&gn){var pn;gn==null||(pn=gn.focus)===null||pn===void 0||pn.call(gn,be)}}}});var cn=mn(T||[],{value:_,postState:function(be){return Array.isArray(be)?be:be==null?ti:[be]}}),tn=ie(cn,2),En=tn[0],In=tn[1],R=function(be){if(P){var Se=be.key,Te=En.includes(Se),tt;A?Te?tt=En.filter(function(Ct){return Ct!==Se}):tt=[].concat(Re(En),[Se]):tt=[Se],In(tt);var bt=q(q({},be),{},{selectedKeys:tt});Te?L==null||L(bt):W==null||W(bt)}!A&&Fe.length&&Nt!=="inline"&&ht(ti)},K=Ua(function(ue){te==null||te(bc(ue)),R(ue)}),B=Ua(function(ue,be){var Se=Fe.filter(function(tt){return tt!==ue});if(be)Se.push(ue);else if(Nt!=="inline"){var Te=rt(ue);Se=Se.filter(function(tt){return!Te.has(tt)})}ha(Fe,Se,!0)||ht(Se,!0)}),Z=function(be,Se){var Te=Se??!Fe.includes(be);B(be,Te)},ne=jj(Nt,Ot,Pe,Ke,We,ke,sn,ln,Z,fe);h.useEffect(function(){Ie(!0)},[]);var Q=h.useMemo(function(){return{_internalRenderMenuItem:xe,_internalRenderSubMenuItem:Be}},[xe,Be]),Ce=Nt!=="horizontal"||C?$e:$e.map(function(ue,be){return h.createElement(ws,{key:ue.key,overflowDisabled:be>$t},ue)}),ge=h.createElement(Xr,De({id:m,ref:We,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:uu,className:ee(i,"".concat(i,"-root"),"".concat(i,"-").concat(Nt),l,F(F({},"".concat(i,"-inline-collapsed"),at),"".concat(i,"-rtl"),Pe),a),dir:p,style:s,role:"menu",tabIndex:u,data:Ce,renderRawItem:function(be){return be},renderRawRest:function(be){var Se=be.length,Te=Se?$e.slice(-Se):null;return h.createElement(Hs,{eventKey:sh,title:ce,disabled:It,internalPopupClose:Se===0,popupClassName:oe},Te)},maxCount:Nt!=="horizontal"||C?Xr.INVALIDATE:Xr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(be){Gt(be)},onKeyDown:ne},ve));return h.createElement(Dp.Provider,{value:Q},h.createElement(S1.Provider,{value:Ke},h.createElement(ws,{prefixCls:i,rootClassName:a,mode:Nt,openKeys:Fe,rtl:Pe,disabled:b,motion:Le?Y:null,defaultMotions:Le?H:null,activeKey:Ot,onActive:en,onInactive:dn,selectedKeys:En,inlineIndent:U,subMenuOpenDelay:S,subMenuCloseDelay:E,forceSubMenuRender:N,builtinPlacements:se,triggerSubMenuAction:J,getPopupContainer:me,itemIcon:X,expandIcon:de,onItemClick:K,onOpenChange:B},h.createElement(O1.Provider,{value:Ae},ge),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(E1.Provider,{value:Xe},Me)))))}),Vs=fL;Vs.Item=uu;Vs.SubMenu=Hs;Vs.ItemGroup=du;Vs.Divider=jp;var hL={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},pL=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:hL}))},P1=h.forwardRef(pL);process.env.NODE_ENV!=="production"&&(P1.displayName="BarsOutlined");const mL=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),gL=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:i,padding:a,color:s,lineHeight:re(i),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},A1=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=t,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},D1=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];hn("Layout",t=>[gL(t)],A1,{deprecatedTokens:D1});const vL=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:v,bodyBg:g}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${e}-children`]:{overflow:"hidden"},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:re(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${re(f)} ${re(f)} 0`,cursor:"pointer",transition:`background ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderRadius:`${re(f)} 0 0 ${re(f)}`}},"&-light":{background:p,[`${e}-trigger`]:{color:m,background:v},[`${e}-zero-width-trigger`]:{color:m,background:v,border:`1px solid ${g}`,borderInlineStart:0}}}}},bL=hn(["Layout","Sider"],t=>[vL(t)],A1,{deprecatedTokens:D1});var yL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const bb={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},CL=t=>!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Lp=h.createContext({}),SL=(()=>{let t=0;return function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,`${e}${t}`}})(),xL=h.forwardRef((t,e)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:v,onBreakpoint:g}=t,y=yL(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:b}=$.useContext(mL),[C,x]=$.useState("collapsed"in t?t.collapsed:a),[S,w]=$.useState(!1);$.useEffect(()=>{"collapsed"in t&&x(t.collapsed)},[t.collapsed]);const E=(X,de)=>{"collapsed"in t||x(X),v==null||v(X,de)},{getPrefixCls:N,direction:O}=$.useContext(At),M=N("layout-sider",n),[I,D,k]=bL(M),P=$.useRef(null);P.current=X=>{w(X.matches),g==null||g(X.matches),C!==X.matches&&E(X.matches,"responsive")},$.useEffect(()=>{function X(ye){return P.current(ye)}let de;if(typeof window<"u"){const{matchMedia:ye}=window;if(ye&&m&&m in bb){de=ye(`screen and (max-width: ${bb[m]})`);try{de.addEventListener("change",X)}catch{de.addListener(X)}X(de)}}return()=>{try{de==null||de.removeEventListener("change",X)}catch{de==null||de.removeListener(X)}}},[m]),$.useEffect(()=>{const X=SL("ant-sider-");return b.addSider(X),()=>b.removeSider(X)},[]);const j=()=>{E(!C,"clickTrigger")},A=Tn(y,["collapsed"]),T=C?f:d,_=CL(T)?`${T}px`:String(T),W=parseFloat(String(f||0))===0?h.createElement("span",{onClick:j,className:ee(`${M}-zero-width-trigger`,`${M}-zero-width-trigger-${u?"right":"left"}`),style:p},o||h.createElement(P1,null)):null,L=O==="rtl"==!u,Y={expanded:L?h.createElement(Ss,null):h.createElement(vc,null),collapsed:L?h.createElement(vc,null):h.createElement(Ss,null)}[C?"collapsed":"expanded"],H=o!==null?W||h.createElement("div",{className:`${M}-trigger`,onClick:j,style:{width:_}},o||Y):null,G=Object.assign(Object.assign({},l),{flex:`0 0 ${_}`,maxWidth:_,minWidth:_,width:_}),J=ee(M,`${M}-${s}`,{[`${M}-collapsed`]:!!C,[`${M}-has-trigger`]:c&&o!==null&&!W,[`${M}-below`]:!!S,[`${M}-zero-width`]:parseFloat(_)===0},r,D,k),se=h.useMemo(()=>({siderCollapsed:C}),[C]);return I(h.createElement(Lp.Provider,{value:se},h.createElement("aside",Object.assign({className:J},A,{style:G,ref:e}),h.createElement("div",{className:`${M}-children`},i),c||S&&W?H:null)))});process.env.NODE_ENV!=="production"&&(xL.displayName="Sider");var wL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},EL=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:wL}))},Fp=h.forwardRef(EL);process.env.NODE_ENV!=="production"&&(Fp.displayName="EllipsisOutlined");const yc=$.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var $L=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const k1=t=>{const{prefixCls:e,className:n,dashed:r}=t,o=$L(t,["prefixCls","className","dashed"]),{getPrefixCls:i}=h.useContext(At),a=i("menu",e),s=ee({[`${a}-item-divider-dashed`]:!!r},n);return h.createElement(jp,Object.assign({className:s},o))},_1=t=>{var e;const{className:n,children:r,icon:o,title:i,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=h.useContext(yc),p=C=>{const x=r==null?void 0:r[0],S=h.createElement("span",{className:ee(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!o||h.isValidElement(r)&&r.type==="span")&&r&&C&&c&&typeof x=="string"?h.createElement("div",{className:`${l}-inline-collapsed-noicon`},x.charAt(0)):S},{siderCollapsed:m}=h.useContext(Lp);let v=i;typeof i>"u"?v=c?r:"":i===!1&&(v="");const g={title:v};!m&&!f&&(g.title=null,g.open=!1);const y=gr(r).length;let b=h.createElement(uu,Object.assign({},Tn(t,["title","icon","danger"]),{className:ee({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(o?y+1:y)===1},n),title:typeof i=="string"?i:void 0}),Or(o,{className:ee(h.isValidElement(o)?(e=o.props)===null||e===void 0?void 0:e.className:"",`${l}-item-icon`)}),p(f));return d||(b=h.createElement(Ko,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),b)),b};var OL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Cc=h.createContext(null),NL=h.forwardRef((t,e)=>{const{children:n}=t,r=OL(t,["children"]),o=h.useContext(Cc),i=h.useMemo(()=>Object.assign(Object.assign({},o),r),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=jI(n),s=Jo(e,a?Ri(n):null);return h.createElement(Cc.Provider,{value:i},h.createElement(qo,{space:!0},a?h.cloneElement(n,{ref:s}):n))}),ML=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${re(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover,
|
|
367
|
-
> ${e}-item-active,
|
|
368
|
-
> ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},IL=t=>{let{componentCls:e,menuArrowOffset:n,calc:r}=t;return{[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
369
|
-
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${re(r(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${re(n)})`}}}}},yb=t=>Object.assign({},op(t)),Cb=(t,e)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:v,itemPaddingInline:g,motionDurationMid:y,itemHoverColor:b,lineType:C,colorSplit:x,itemDisabledColor:S,dangerItemColor:w,dangerItemHoverColor:E,dangerItemSelectedColor:N,dangerItemActiveBg:O,dangerItemSelectedBg:M,popupBg:I,itemHoverBg:D,itemActiveBg:k,menuSubMenuBg:P,horizontalItemSelectedColor:j,horizontalItemSelectedBg:A,horizontalItemBorderRadius:T,horizontalItemHoverBg:_}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},yb(t)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},yb(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${S} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:b}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:D},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:D},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:w,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:O}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:M}},[`&${n}-submenu > ${n}`]:{backgroundColor:P},[`&${n}-popup > ${n}`]:{backgroundColor:I},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:I},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:t.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:T,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${re(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:'""'},"&:hover, &-active, &-open":{background:_,"&::after":{borderBottomWidth:u,borderBottomColor:j}},"&-selected":{color:j,backgroundColor:A,"&:hover":{backgroundColor:A},"&::after":{borderBottomWidth:u,borderBottomColor:j}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${re(f)} ${C} ${x}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${re(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${v}`,`opacity ${y} ${v}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${m}`,`opacity ${y} ${m}`].join(",")}}}}}},Sb=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(i).add(o).add(a).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:re(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${e}-item,
|
|
370
|
-
> ${e}-submenu > ${e}-submenu-title`]:{height:n,lineHeight:re(n)},[`${e}-item-group-list ${e}-submenu-title,
|
|
371
|
-
${e}-submenu-title`]:{paddingInlineEnd:u}}},RL=t=>{const{componentCls:e,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:v,collapsedIconSize:g}=t,y={height:r,lineHeight:re(r),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},Sb(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},Sb(t)),{boxShadow:m})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${re(t.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:y,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:y}},{[`${e}-inline-collapsed`]:{width:v,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item,
|
|
372
|
-
> ${e}-item-group > ${e}-item-group-list > ${e}-item,
|
|
373
|
-
> ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
|
|
374
|
-
> ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${re(t.calc(g).div(2).equal())} - ${re(c)})`,textOverflow:"clip",[`
|
|
375
|
-
${e}-submenu-arrow,
|
|
376
|
-
${e}-submenu-expand-icon
|
|
377
|
-
`]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:re(r),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${e}-item-group-title`]:Object.assign(Object.assign({},Cs),{paddingInline:p})}}]},xb=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${e}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},Pi()),[`&${e}-item-only-child`]:{[`> ${a}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},wb=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(i).mul(.6).equal(),height:t.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${re(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${re(a)})`}}}}},TL=t=>{const{antCls:e,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:v,lineType:g,groupTitleLineHeight:y,groupTitleFontSize:b}=t;return[{"":{[n]:Object.assign(Object.assign({},lc()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Hn(t)),lc()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${re(s)} ${re(l)}`,fontSize:b,lineHeight:y,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${o} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),xb(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${re(t.calc(r).mul(2).equal())} ${re(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},xb(t)),wb(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS}}}),wb(t)),{[`&-inline-collapsed ${n}-submenu-arrow,
|
|
378
|
-
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${re(v)})`},"&::after":{transform:`rotate(45deg) translateX(${re(t.calc(v).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${re(t.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${re(t.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${re(v)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},PL=t=>{var e,n,r;const{colorPrimary:o,colorError:i,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:p,lineWidthBold:m,controlItemBgActive:v,colorBgTextHover:g,controlHeightLG:y,lineHeight:b,colorBgElevated:C,marginXXS:x,padding:S,fontSize:w,controlHeightSM:E,fontSizeLG:N,colorTextLightSolid:O,colorErrorHover:M}=t,I=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,D=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:p,k=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,P=new Vt(O).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:v,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:I,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:p,activeBarBorderWidth:D,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:i,dangerItemColor:i,colorDangerItemTextHover:i,dangerItemHoverColor:i,colorDangerItemTextSelected:i,dangerItemSelectedColor:i,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:k,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:b,collapsedWidth:y*2,popupBg:C,itemMarginBlock:x,itemPaddingInline:S,horizontalLineHeight:`${y*1.15}px`,iconSize:w,iconMarginInlineEnd:E-w,collapsedIconSize:N,groupTitleFontSize:w,darkItemDisabledColor:new Vt(O).setA(.25).toRgbString(),darkItemColor:P,darkDangerItemColor:i,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:O,darkItemSelectedBg:o,darkDangerItemSelectedBg:i,darkItemHoverBg:"transparent",darkGroupTitleColor:P,darkItemHoverColor:O,darkDangerItemHoverColor:M,darkDangerItemSelectedColor:O,darkDangerItemActiveBg:i,itemWidth:I?`calc(100% + ${D}px)`:`calc(100% - ${k*2}px)`}},AL=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return hn("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:m,darkItemHoverBg:v,darkGroupTitleColor:g,darkItemHoverColor:y,darkItemDisabledColor:b,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:S,popupBg:w,darkPopupBg:E}=o,N=o.calc(s).div(7).mul(5).equal(),O=Lt(o,{menuArrowSize:N,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(N).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:w}),M=Lt(O,{itemColor:l,itemHoverColor:y,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:E,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:b,dangerItemColor:c,dangerItemHoverColor:C,dangerItemSelectedColor:x,dangerItemActiveBg:S,dangerItemSelectedBg:m,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[TL(O),ML(O),RL(O),Cb(O,"light"),Cb(M,"dark"),IL(O),ox(O),Ca(O,"slide-up"),Ca(O,"slide-down"),Ds(O,"zoom-big")]},PL,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e)},B1=t=>{var e;const{popupClassName:n,icon:r,title:o,theme:i}=t,a=h.useContext(yc),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=Oa();let d;if(!r)d=l&&!u.length&&o&&typeof o=="string"?h.createElement("div",{className:`${s}-inline-collapsed-noicon`},o.charAt(0)):h.createElement("span",{className:`${s}-title-content`},o);else{const m=h.isValidElement(o)&&o.type==="span";d=h.createElement(h.Fragment,null,Or(r,{className:ee(h.isValidElement(r)?(e=r.props)===null||e===void 0?void 0:e.className:"",`${s}-item-icon`)}),m?o:h.createElement("span",{className:`${s}-title-content`},o))}const f=h.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[p]=Ps("Menu");return h.createElement(yc.Provider,{value:f},h.createElement(Hs,Object.assign({},Tn(t,["icon"]),{title:d,popupClassName:ee(s,n,`${s}-${i||c}`),popupStyle:Object.assign({zIndex:p},t.popupStyle)})))};var DL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function xd(t){return t===null||t===!1}const kL={item:_1,submenu:B1,divider:k1},_L=$.forwardRef((t,e)=>{var n;const r=h.useContext(Cc),o=r||{},{getPrefixCls:i,getPopupContainer:a,direction:s,menu:l}=h.useContext(At),c=i(),{prefixCls:u,className:d,style:f,theme:p="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:g,siderCollapsed:y,rootClassName:b,mode:C,selectable:x,onClick:S,overflowedIndicatorPopupClassName:w}=t,E=DL(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),N=Tn(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const U=on("Menu");process.env.NODE_ENV!=="production"&&U(!("inlineCollapsed"in t&&C!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),U.deprecated("items"in t&&!t.children,"children","items")}(n=o.validator)===null||n===void 0||n.call(o,{mode:C});const O=Wt(function(){var U;S==null||S.apply(void 0,arguments),(U=o.onClick)===null||U===void 0||U.call(o)}),M=o.mode||C,I=x??o.selectable,D=g??y,k={horizontal:{motionName:`${c}-slide-up`},inline:HS(c),other:{motionName:`${c}-zoom-big`}},P=i("menu",u||o.prefixCls),j=xo(P),[A,T,_]=AL(P,j,!r),W=ee(`${P}-${p}`,l==null?void 0:l.className,d),L=h.useMemo(()=>{var U,Y;if(typeof m=="function"||xd(m))return m||null;if(typeof o.expandIcon=="function"||xd(o.expandIcon))return o.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||xd(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const H=(U=m??(o==null?void 0:o.expandIcon))!==null&&U!==void 0?U:l==null?void 0:l.expandIcon;return Or(H,{className:ee(`${P}-submenu-expand-icon`,h.isValidElement(H)?(Y=H.props)===null||Y===void 0?void 0:Y.className:void 0)})},[m,o==null?void 0:o.expandIcon,l==null?void 0:l.expandIcon,P]),V=h.useMemo(()=>({prefixCls:P,inlineCollapsed:D||!1,direction:s,firstLevel:!0,theme:p,mode:M,disableMenuItemTitleTooltip:v}),[P,D,s,v,p]);return A(h.createElement(Cc.Provider,{value:null},h.createElement(yc.Provider,{value:V},h.createElement(Vs,Object.assign({getPopupContainer:a,overflowedIndicator:h.createElement(Fp,null),overflowedIndicatorPopupClassName:ee(P,`${P}-${p}`,w),mode:M,selectable:I,onClick:O},N,{inlineCollapsed:D,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:W,prefixCls:P,direction:s,defaultMotions:k,expandIcon:L,ref:e,rootClassName:ee(b,T,o.rootClassName,_,j),_internalComponents:kL})))))}),Uo=$.forwardRef((t,e)=>{const n=$.useRef(null),r=h.useContext(Lp);return $.useImperativeHandle(e,()=>({menu:n.current,focus:o=>{var i;(i=n.current)===null||i===void 0||i.focus(o)}})),h.createElement(_L,Object.assign({ref:n},t,r))});Uo.Item=_1;Uo.SubMenu=B1;Uo.Divider=k1;Uo.ItemGroup=du;process.env.NODE_ENV!=="production"&&(Uo.displayName="Menu");const BL=t=>{const{componentCls:e,menuCls:n,colorError:r,colorTextLightSolid:o}=t,i=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},zL=t=>{const{componentCls:e,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:v}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:t.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:p}},[`${e}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomLeft,
|
|
379
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomLeft,
|
|
380
|
-
&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottom,
|
|
381
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottom,
|
|
382
|
-
&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomRight,
|
|
383
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:up},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft,
|
|
384
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topLeft,
|
|
385
|
-
&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-top,
|
|
386
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-top,
|
|
387
|
-
&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topRight,
|
|
388
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:fp},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft,
|
|
389
|
-
&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottom,
|
|
390
|
-
&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:dp},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft,
|
|
391
|
-
&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-top,
|
|
392
|
-
&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:hp}}},Pp(t,v,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},Hn(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},ya(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${re(c)} ${re(m)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${re(c)} ${re(m)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},ya(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${re(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorTextDescription,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${re(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(m).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:v,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[Ca(t,"slide-up"),Ca(t,"slide-down"),fc(t,"move-up"),fc(t,"move-down"),Ds(t,"zoom-big")]]},jL=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},lu({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),Tp(t)),LL=hn("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:o}=t,i=Lt(t,{menuCls:`${o}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[zL(i),BL(i)]},jL,{resetStyle:!1}),Ws=t=>{var e;const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,visible:v,onVisibleChange:g,mouseEnterDelay:y=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:C=!0,placement:x="",overlay:S,transitionName:w}=t,{getPopupContainer:E,getPrefixCls:N,direction:O,dropdown:M}=h.useContext(At),I=on("Dropdown");process.env.NODE_ENV!=="production"&&([["visible","open"],["onVisibleChange","onOpenChange"]].forEach(te=>{let[le,fe]=te;I.deprecated(!(le in t),le,fe)}),I.deprecated(!("overlay"in t),"overlay","menu"));const D=h.useMemo(()=>{const te=N();return w!==void 0?w:x.includes("top")?`${te}-slide-down`:`${te}-slide-up`},[N,x,w]),k=h.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:O==="rtl"?"bottomRight":"bottomLeft",[x,O]);if(process.env.NODE_ENV!=="production"){if(x.includes("Center")){const te=x.slice(0,x.indexOf("Center"));process.env.NODE_ENV!=="production"&&I(!x.includes("Center"),"deprecated",`You are using '${x}' placement in Dropdown, which is deprecated. Try to use '${te}' instead.`)}[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(te=>{let[le,fe]=te;I.deprecated(!(le in t),le,fe)})}const P=N("dropdown",o),j=xo(P),[A,T,_]=LL(P,j),[,W]=ar(),L=h.Children.only(Tj(i)?h.createElement("span",null,i):i),V=Or(L,{className:ee(`${P}-trigger`,{[`${P}-rtl`]:O==="rtl"},L.props.className),disabled:(e=L.props.disabled)!==null&&e!==void 0?e:s}),U=s?[]:a,Y=!!(U!=null&&U.includes("contextMenu")),[H,G]=mn(!1,{value:p??v}),J=Wt(te=>{m==null||m(te,{source:"trigger"}),g==null||g(te),G(te)}),se=ee(u,d,T,_,j,M==null?void 0:M.className,{[`${P}-rtl`]:O==="rtl"}),X=g1({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:C,offset:W.marginXXS,arrowWidth:r?W.sizePopupArrow:0,borderRadius:W.borderRadius}),de=h.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),G(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),ye=()=>{let te;return n!=null&&n.items?te=h.createElement(Uo,Object.assign({},n)):typeof S=="function"?te=S():te=S,l&&(te=l(te)),te=h.Children.only(typeof te=="string"?h.createElement("span",null,te):te),h.createElement(NL,{prefixCls:`${P}-menu`,rootClassName:ee(_,j),expandIcon:h.createElement("span",{className:`${P}-menu-submenu-arrow`},O==="rtl"?h.createElement(vc,{className:`${P}-menu-submenu-arrow-icon`}):h.createElement(Ss,{className:`${P}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:de,validator:le=>{let{mode:fe}=le;process.env.NODE_ENV!=="production"&&I(!fe||fe==="vertical","usage",`mode="${fe}" is not supported for Dropdown's Menu.`)}},te)},[ce,oe]=Ps("Dropdown",f==null?void 0:f.zIndex);let me=h.createElement(Rj,Object.assign({alignPoint:Y},Tn(t,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:b,visible:H,builtinPlacements:X,arrow:!!r,overlayClassName:se,prefixCls:P,getPopupContainer:c||E,transitionName:D,trigger:U,overlay:ye,placement:k,onVisibleChange:J,overlayStyle:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.style),f),{zIndex:ce})}),V);return ce&&(me=h.createElement(Ts.Provider,{value:oe},me)),A(me)},FL=yp(Ws,"align",void 0,"dropdown",t=>t),HL=t=>h.createElement(FL,Object.assign({},t),h.createElement("span",null));Ws._InternalPanelDoNotUseOrYouWillBeFired=HL;process.env.NODE_ENV!=="production"&&(Ws.displayName="Dropdown");function qs(t){return Lt(t,{inputAffixPadding:t.paddingXXS})}const Ks=t=>{const{controlHeight:e,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:v,controlOutline:g,colorErrorOutline:y,colorWarningOutline:b,colorBgContainer:C,inputFontSize:x,inputFontSizeLG:S,inputFontSizeSM:w}=t,E=x||n,N=w||E,O=S||s,M=Math.round((e-E*r)/2*10)/10-o,I=Math.round((i-N*r)/2*10)/10-o,D=Math.ceil((a-O*l)/2*10)/10-o;return{paddingBlock:Math.max(M,0),paddingBlockSM:Math.max(I,0),paddingBlockLG:Math.max(D,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${v}px ${g}`,errorActiveShadow:`0 0 0 ${v}px ${y}`,warningActiveShadow:`0 0 0 ${v}px ${b}`,hoverBg:C,activeBg:C,inputFontSize:E,inputFontSizeLG:O,inputFontSizeSM:N}},VL=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),Hp=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},VL(Lt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),z1=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),Eb=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},z1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),j1=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z1(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Hp(t))}),Eb(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),Eb(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),$b=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),L1=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${re(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},$b(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),$b(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},Hp(t))}})}),F1=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},H1=(t,e)=>{var n;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=e==null?void 0:e.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},Ob=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},H1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),V1=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H1(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Hp(t))}),Ob(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),Ob(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),Nb=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),W1=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary},[`${t.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${re(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${re(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}}}},Nb(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),Nb(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${re(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${re(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${re(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${re(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${re(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${re(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),q1=(t,e)=>({background:t.colorBgContainer,borderWidth:`${re(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.borderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),Mb=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},q1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),K1=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q1(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),Mb(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),Mb(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),U1=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),G1=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=t;return{padding:`${re(e)} ${re(o)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},X1=t=>({padding:`${re(t.paddingBlockSM)} ${re(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),fu=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${re(t.paddingBlock)} ${re(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},U1(t.colorTextPlaceholder)),{"&-lg":Object.assign({},G1(t)),"&-sm":Object.assign({},X1(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Y1=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},G1(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},X1(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${re(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${re(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${re(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${re(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${re(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},lc()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
393
|
-
& > ${e}-affix-wrapper,
|
|
394
|
-
& > ${e}-number-affix-wrapper,
|
|
395
|
-
& > ${n}-picker-range
|
|
396
|
-
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderInlineEndWidth:t.lineWidth},[e]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
|
|
397
|
-
& > ${n}-select-auto-complete ${e},
|
|
398
|
-
& > ${n}-cascader-picker ${e},
|
|
399
|
-
& > ${e}-group-wrapper ${e}`]:{borderInlineEndWidth:t.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
400
|
-
& > ${n}-select:first-child > ${n}-select-selector,
|
|
401
|
-
& > ${n}-select-auto-complete:first-child ${e},
|
|
402
|
-
& > ${n}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child,
|
|
403
|
-
& > ${n}-select:last-child > ${n}-select-selector,
|
|
404
|
-
& > ${n}-cascader-picker:last-child ${e},
|
|
405
|
-
& > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}})}},WL=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:r,calc:o}=t,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Hn(t)),fu(t)),j1(t)),V1(t)),F1(t)),K1(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},qL=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:t.colorTextTertiary},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${re(t.inputAffixPadding)}`}}}},KL=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:s}=t,l=`${e}-affix-wrapper`,c=`${e}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},fu(t)),{display:"inline-flex",[`&:not(${e}-disabled):hover`]:{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),qL(t)),{[`${s}${e}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}}),[`${e}-underlined`]:{borderRadius:0},[c]:{[`${s}${e}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},UL=t=>{const{componentCls:e,borderRadiusLG:n,borderRadiusSM:r}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},Hn(t)),Y1(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:n,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:r}}},L1(t)),W1(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},GL=t=>{const{componentCls:e,antCls:n}=t,r=`${e}-search`;return{[r]:{[e]:{"&:hover, &:focus":{[`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{height:t.controlHeight,borderRadius:0},[`${e}-lg`]:{lineHeight:t.calc(t.lineHeightLG).sub(2e-4).equal()},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-primary)`]:{color:t.colorTextDescription,"&:hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${r}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightLG}},"&-small":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button,
|
|
406
|
-
> ${e},
|
|
407
|
-
${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},XL=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},J1=hn(["Input","Shared"],t=>{const e=Lt(t,qs(t));return[WL(e),KL(e)]},Ks,{resetFont:!1}),Q1=hn(["Input","Component"],t=>{const e=Lt(t,qs(t));return[UL(e),GL(e),XL(e),ks(e)]},Ks,{resetFont:!1}),YL=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},Hn(t)),{borderBlockStart:`${re(o)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${re(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${re(t.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${re(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${re(o)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${re(o)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${re(o)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},JL=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),QL=hn("Divider",t=>{const e=Lt(t,{dividerHorizontalWithTextGutterMargin:t.margin,dividerHorizontalGutterMargin:t.marginLG,sizePaddingEdgeHorizontal:0});return[YL(e)]},JL,{unitless:{orientationMargin:!0}});var ZL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Z1=t=>{const{getPrefixCls:e,direction:n,className:r,style:o}=br("divider"),{prefixCls:i,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:p="solid",plain:m,style:v}=t,g=ZL(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),y=e("divider",i),[b,C,x]=QL(y),S=!!d,w=h.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),E=w==="start"&&l!=null,N=w==="end"&&l!=null,O=ee(y,r,C,x,`${y}-${a}`,{[`${y}-with-text`]:S,[`${y}-with-text-${w}`]:S,[`${y}-dashed`]:!!f,[`${y}-${p}`]:p!=="solid",[`${y}-plain`]:!!m,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:E,[`${y}-no-default-orientation-margin-end`]:N},c,u),M=h.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),I={marginInlineStart:E?M:void 0,marginInlineEnd:N?M:void 0};if(process.env.NODE_ENV!=="production"){const D=on("Divider");process.env.NODE_ENV!=="production"&&D(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return b(h.createElement("div",Object.assign({className:O,style:Object.assign(Object.assign({},o),v)},g,{role:"separator"}),d&&a!=="vertical"&&h.createElement("span",{className:`${y}-inner-text`,style:I},d)))};process.env.NODE_ENV!=="production"&&(Z1.displayName="Divider");var Ib=function(e,n){if(!e)return null;var r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return n?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},Wr=function(e){return e!==void 0?"".concat(e,"px"):void 0};function eF(t){var e=t.prefixCls,n=t.containerRef,r=t.value,o=t.getValueIndex,i=t.motionName,a=t.onMotionStart,s=t.onMotionEnd,l=t.direction,c=t.vertical,u=c===void 0?!1:c,d=h.useRef(null),f=h.useState(r),p=ie(f,2),m=p[0],v=p[1],g=function(j){var A,T=o(j),_=(A=n.current)===null||A===void 0?void 0:A.querySelectorAll(".".concat(e,"-item"))[T];return(_==null?void 0:_.offsetParent)&&_},y=h.useState(null),b=ie(y,2),C=b[0],x=b[1],S=h.useState(null),w=ie(S,2),E=w[0],N=w[1];Jt(function(){if(m!==r){var P=g(m),j=g(r),A=Ib(P,u),T=Ib(j,u);v(r),x(A),N(T),P&&j?a():s()}},[r]);var O=h.useMemo(function(){if(u){var P;return Wr((P=C==null?void 0:C.top)!==null&&P!==void 0?P:0)}return Wr(l==="rtl"?-(C==null?void 0:C.right):C==null?void 0:C.left)},[u,l,C]),M=h.useMemo(function(){if(u){var P;return Wr((P=E==null?void 0:E.top)!==null&&P!==void 0?P:0)}return Wr(l==="rtl"?-(E==null?void 0:E.right):E==null?void 0:E.left)},[u,l,E]),I=function(){return u?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},D=function(){return u?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},k=function(){x(null),N(null),s()};return!C||!E?null:h.createElement(no,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:I,onAppearActive:D,onVisibleChanged:k},function(P,j){var A=P.className,T=P.style,_=q(q({},T),{},{"--thumb-start-left":O,"--thumb-start-width":Wr(C==null?void 0:C.width),"--thumb-active-left":M,"--thumb-active-width":Wr(E==null?void 0:E.width),"--thumb-start-top":O,"--thumb-start-height":Wr(C==null?void 0:C.height),"--thumb-active-top":M,"--thumb-active-height":Wr(E==null?void 0:E.height)}),W={ref:ir(d,j),style:_,className:ee("".concat(e,"-thumb"),A)};return process.env.NODE_ENV==="test"&&(W["data-test-style"]=JSON.stringify(_)),h.createElement("div",W)})}var tF=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function nF(t){if(typeof t.title<"u")return t.title;if(st(t.label)!=="object"){var e;return(e=t.label)===null||e===void 0?void 0:e.toString()}}function rF(t){return t.map(function(e){if(st(e)==="object"&&e!==null){var n=nF(e);return q(q({},e),{},{title:n})}return{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e}})}var oF=function(e){var n=e.prefixCls,r=e.className,o=e.disabled,i=e.checked,a=e.label,s=e.title,l=e.value,c=e.name,u=e.onChange,d=e.onFocus,f=e.onBlur,p=e.onKeyDown,m=e.onKeyUp,v=e.onMouseDown,g=function(b){o||u(b,l)};return h.createElement("label",{className:ee(r,F({},"".concat(n,"-item-disabled"),o)),onMouseDown:v},h.createElement("input",{name:c,className:"".concat(n,"-item-input"),type:"radio",disabled:o,checked:i,onChange:g,onFocus:d,onBlur:f,onKeyDown:p,onKeyUp:m}),h.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":i},a))},ew=h.forwardRef(function(t,e){var n,r,o=t.prefixCls,i=o===void 0?"rc-segmented":o,a=t.direction,s=t.vertical,l=t.options,c=l===void 0?[]:l,u=t.disabled,d=t.defaultValue,f=t.value,p=t.name,m=t.onChange,v=t.className,g=v===void 0?"":v,y=t.motionName,b=y===void 0?"thumb-motion":y,C=xt(t,tF),x=h.useRef(null),S=h.useMemo(function(){return ir(x,e)},[x,e]),w=h.useMemo(function(){return rF(c)},[c]),E=mn((n=w[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),N=ie(E,2),O=N[0],M=N[1],I=h.useState(!1),D=ie(I,2),k=D[0],P=D[1],j=function(oe,me){M(me),m==null||m(me)},A=Tn(C,["children"]),T=h.useState(!1),_=ie(T,2),W=_[0],L=_[1],V=h.useState(!1),U=ie(V,2),Y=U[0],H=U[1],G=function(){H(!0)},J=function(){H(!1)},se=function(){L(!1)},X=function(oe){oe.key==="Tab"&&L(!0)},de=function(oe){var me=w.findIndex(function(Ee){return Ee.value===O}),te=w.length,le=(me+oe+te)%te,fe=w[le];fe&&(M(fe.value),m==null||m(fe.value))},ye=function(oe){switch(oe.key){case"ArrowLeft":case"ArrowUp":de(-1);break;case"ArrowRight":case"ArrowDown":de(1);break}};return h.createElement("div",De({role:"radiogroup","aria-label":"segmented control",tabIndex:u?void 0:0},A,{className:ee(i,(r={},F(r,"".concat(i,"-rtl"),a==="rtl"),F(r,"".concat(i,"-disabled"),u),F(r,"".concat(i,"-vertical"),s),r),g),ref:S}),h.createElement("div",{className:"".concat(i,"-group")},h.createElement(eF,{vertical:s,prefixCls:i,value:O,containerRef:x,motionName:"".concat(i,"-").concat(b),direction:a,getValueIndex:function(oe){return w.findIndex(function(me){return me.value===oe})},onMotionStart:function(){P(!0)},onMotionEnd:function(){P(!1)}}),w.map(function(ce){var oe;return h.createElement(oF,De({},ce,{name:p,key:ce.value,prefixCls:i,className:ee(ce.className,"".concat(i,"-item"),(oe={},F(oe,"".concat(i,"-item-selected"),ce.value===O&&!k),F(oe,"".concat(i,"-item-focused"),Y&&W&&ce.value===O),oe)),checked:ce.value===O,onChange:j,onFocus:G,onBlur:J,onKeyDown:ye,onKeyUp:X,onMouseDown:se,disabled:!!u||!!ce.disabled}))})))});process.env.NODE_ENV!=="production"&&(ew.displayName="Segmented");var iF=ew;function Rb(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function Tb(t){return{backgroundColor:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}const aF=Object.assign({overflow:"hidden"},Cs),sF=t=>{const{componentCls:e}=t,n=t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(),r=t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(),o=t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Hn(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`}),ya(t)),{[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-vertical`]:{[`${e}-group`]:{flexDirection:"column"},[`${e}-thumb`]:{width:"100%",height:0,padding:`0 ${re(t.paddingXXS)}`}},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},Tb(t)),{color:t.itemSelectedColor}),"&-focused":Object.assign({},op(t)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemHoverBg}},[`&:active:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:re(n),padding:`0 ${re(t.segmentedPaddingHorizontal)}`},aF),"&-icon + *":{marginInlineStart:t.calc(t.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:Object.assign(Object.assign({},Tb(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${re(t.paddingXXS)} 0`,borderRadius:t.borderRadiusSM,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, height ${t.motionDurationSlow} ${t.motionEaseInOut}`,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:r,lineHeight:re(r),padding:`0 ${re(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:o,lineHeight:re(o),padding:`0 ${re(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),Rb(`&-disabled ${e}-item`,t)),Rb(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"},[`&${e}-shape-round`]:{borderRadius:9999,[`${e}-item, ${e}-thumb`]:{borderRadius:9999}}})}},lF=t=>{const{colorTextLabel:e,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:s}=t;return{trackPadding:a,trackBg:s,itemColor:e,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},cF=hn("Segmented",t=>{const{lineWidth:e,calc:n}=t,r=Lt(t,{segmentedPaddingHorizontal:n(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:n(t.controlPaddingHorizontalSM).sub(e).equal()});return[sF(r)]},lF);var Pb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function uF(t){return typeof t=="object"&&!!(t!=null&&t.icon)}const dF=h.forwardRef((t,e)=>{const n=nu(),{prefixCls:r,className:o,rootClassName:i,block:a,options:s=[],size:l="middle",style:c,vertical:u,shape:d="default",name:f=n}=t,p=Pb(t,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:m,direction:v,className:g,style:y}=br("segmented"),b=m("segmented",r),[C,x,S]=cF(b),w=Fr(l),E=h.useMemo(()=>s.map(M=>{if(uF(M)){const{icon:I,label:D}=M,k=Pb(M,["icon","label"]);return Object.assign(Object.assign({},k),{label:h.createElement(h.Fragment,null,h.createElement("span",{className:`${b}-item-icon`},I),D&&h.createElement("span",null,D))})}return M}),[s,b]),N=ee(o,i,g,{[`${b}-block`]:a,[`${b}-sm`]:w==="small",[`${b}-lg`]:w==="large",[`${b}-vertical`]:u,[`${b}-shape-${d}`]:d==="round"},x,S),O=Object.assign(Object.assign({},y),c);return C(h.createElement(iF,Object.assign({},p,{name:f,className:N,style:O,options:E,ref:e,prefixCls:b,direction:v,vertical:u})))}),tw=dF;process.env.NODE_ENV!=="production"&&(tw.displayName="Segmented");const nw=$.createContext({}),rw=$.createContext({}),ow=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=()=>{if(r&&n&&!n.cleared){const i=n.toHsb();i.a=0;const a=Xn(i);a.cleared=!0,r(a)}};return $.createElement("div",{className:`${e}-clear`,onClick:o})},iw="hex",aw="rgb",sw="hsb";var fF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},hF=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:fF}))},lw=h.forwardRef(hF);process.env.NODE_ENV!=="production"&&(lw.displayName="UpOutlined");function ch(){return typeof BigInt=="function"}function cw(t){return!t&&t!==0&&!Number.isNaN(t)||!String(t).trim()}function vi(t){var e=t.trim(),n=e.startsWith("-");n&&(e=e.slice(1)),e=e.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),e.startsWith(".")&&(e="0".concat(e));var r=e||"0",o=r.split("."),i=o[0]||"0",a=o[1]||"0";i==="0"&&a==="0"&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(s).concat(r)}}function Vp(t){var e=String(t);return!Number.isNaN(Number(e))&&e.includes("e")}function di(t){var e=String(t);if(Vp(t)){var n=Number(e.slice(e.indexOf("e-")+2)),r=e.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return e.includes(".")&&Wp(e)?e.length-e.indexOf(".")-1:0}function hu(t){var e=String(t);if(Vp(t)){if(t>Number.MAX_SAFE_INTEGER)return String(ch()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(t<Number.MIN_SAFE_INTEGER)return String(ch()?BigInt(t).toString():Number.MIN_SAFE_INTEGER);e=t.toFixed(di(e))}return vi(e).fullStr}function Wp(t){return typeof t=="number"?!Number.isNaN(t):t?/^\s*-?\d+(\.\d+)?\s*$/.test(t)||/^\s*-?\d+\.\s*$/.test(t)||/^\s*-?\.\d+\s*$/.test(t):!1}var pF=function(){function t(e){if(xn(this,t),F(this,"origin",""),F(this,"negative",void 0),F(this,"integer",void 0),F(this,"decimal",void 0),F(this,"decimalLen",void 0),F(this,"empty",void 0),F(this,"nan",void 0),cw(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var n=e;if(Vp(n)&&(n=Number(n)),n=typeof n=="string"?n:hu(n),Wp(n)){var r=vi(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}return wn(t,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new t(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,r,o){var i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),a=this.alignDecimal(i),s=n.alignDecimal(i),l=r(a,s).toString(),c=o(i),u=vi(l),d=u.negativeStr,f=u.trimStr,p="".concat(d).concat(f.padStart(c+1,"0"));return new t("".concat(p.slice(0,-c),".").concat(p.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var r=new t(n);return r.isInvalidate()?this:this.cal(r,function(o,i){return o+i},function(o){return o})}},{key:"multi",value:function(n){var r=new t(n);return this.isInvalidate()||r.isInvalidate()?new t(NaN):this.cal(r,function(o,i){return o*i},function(o){return o*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":vi("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),t}(),mF=function(){function t(e){if(xn(this,t),F(this,"origin",""),F(this,"number",void 0),F(this,"empty",void 0),cw(e)){this.empty=!0;return}this.origin=String(e),this.number=Number(e)}return wn(t,[{key:"negate",value:function(){return new t(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var r=Number(n);if(Number.isNaN(r))return this;var o=this.number+r;if(o>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(di(this.number),di(r));return new t(o.toFixed(i))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new t(NaN);var o=this.number*r;if(o>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(di(this.number),di(r));return new t(o.toFixed(i))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":hu(this.number):this.origin}}]),t}();function Rr(t){return ch()?new pF(t):new mF(t)}function Ll(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";var o=vi(t),i=o.negativeStr,a=o.integerStr,s=o.decimalStr,l="".concat(e).concat(s),c="".concat(i).concat(a);if(n>=0){var u=Number(s[n]);if(u>=5&&!r){var d=Rr(t).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u));return Ll(d.toString(),e,n,r)}return n===0?c:"".concat(c).concat(e).concat(s.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function gF(t){return!!(t.addonBefore||t.addonAfter)}function vF(t){return!!(t.prefix||t.suffix||t.allowClear)}function Ab(t,e,n){var r=e.cloneNode(!0),o=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},o}function Sc(t,e,n,r){if(n){var o=e;if(e.type==="click"){o=Ab(e,t,""),n(o);return}if(t.type!=="file"&&r!==void 0){o=Ab(e,t,r),n(o);return}n(o)}}function qp(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var o=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(o,o);break;default:t.setSelectionRange(0,o)}}}}var Kp=$.forwardRef(function(t,e){var n,r,o,i=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,f=t.className,p=t.style,m=t.disabled,v=t.readOnly,g=t.focused,y=t.triggerFocus,b=t.allowClear,C=t.value,x=t.handleReset,S=t.hidden,w=t.classes,E=t.classNames,N=t.dataAttrs,O=t.styles,M=t.components,I=t.onClear,D=a??i,k=(M==null?void 0:M.affixWrapper)||"span",P=(M==null?void 0:M.groupWrapper)||"span",j=(M==null?void 0:M.wrapper)||"span",A=(M==null?void 0:M.groupAddon)||"span",T=$.useRef(null),_=function(le){var fe;(fe=T.current)!==null&&fe!==void 0&&fe.contains(le.target)&&(y==null||y())},W=vF(t),L=$.cloneElement(D,{value:C,className:ee((n=D.props)===null||n===void 0?void 0:n.className,!W&&(E==null?void 0:E.variant))||null}),V=$.useRef(null);if($.useImperativeHandle(e,function(){return{nativeElement:V.current||T.current}}),W){var U=null;if(b){var Y=!m&&!v&&C,H="".concat(s,"-clear-icon"),G=st(b)==="object"&&b!==null&&b!==void 0&&b.clearIcon?b.clearIcon:"✖";U=$.createElement("button",{type:"button",tabIndex:-1,onClick:function(le){x==null||x(le),I==null||I()},onMouseDown:function(le){return le.preventDefault()},className:ee(H,F(F({},"".concat(H,"-hidden"),!Y),"".concat(H,"-has-suffix"),!!c))},G)}var J="".concat(s,"-affix-wrapper"),se=ee(J,F(F(F(F(F({},"".concat(s,"-disabled"),m),"".concat(J,"-disabled"),m),"".concat(J,"-focused"),g),"".concat(J,"-readonly"),v),"".concat(J,"-input-with-clear-btn"),c&&b&&C),w==null?void 0:w.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),X=(c||b)&&$.createElement("span",{className:ee("".concat(s,"-suffix"),E==null?void 0:E.suffix),style:O==null?void 0:O.suffix},U,c);L=$.createElement(k,De({className:se,style:O==null?void 0:O.affixWrapper,onClick:_},N==null?void 0:N.affixWrapper,{ref:T}),l&&$.createElement("span",{className:ee("".concat(s,"-prefix"),E==null?void 0:E.prefix),style:O==null?void 0:O.prefix},l),L,X)}if(gF(t)){var de="".concat(s,"-group"),ye="".concat(de,"-addon"),ce="".concat(de,"-wrapper"),oe=ee("".concat(s,"-wrapper"),de,w==null?void 0:w.wrapper,E==null?void 0:E.wrapper),me=ee(ce,F({},"".concat(ce,"-disabled"),m),w==null?void 0:w.group,E==null?void 0:E.groupWrapper);L=$.createElement(P,{className:me,ref:V},$.createElement(j,{className:oe},u&&$.createElement(A,{className:ye},u),L,d&&$.createElement(A,{className:ye},d)))}return $.cloneElement(L,{className:ee((r=L.props)===null||r===void 0?void 0:r.className,f)||null,style:q(q({},(o=L.props)===null||o===void 0?void 0:o.style),p),hidden:S})}),bF=["show"];function uw(t,e){return h.useMemo(function(){var n={};e&&(n.show=st(e)==="object"&&e.formatter?e.formatter:!!e),n=q(q({},n),t);var r=n,o=r.show,i=xt(r,bF);return q(q({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[t,e])}var yF=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],CF=$.forwardRef(function(t,e){var n=t.autoComplete,r=t.onChange,o=t.onFocus,i=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,f=t.htmlSize,p=t.className,m=t.maxLength,v=t.suffix,g=t.showCount,y=t.count,b=t.type,C=b===void 0?"text":b,x=t.classes,S=t.classNames,w=t.styles,E=t.onCompositionStart,N=t.onCompositionEnd,O=xt(t,yF),M=$.useState(!1),I=ie(M,2),D=I[0],k=I[1],P=$.useRef(!1),j=$.useRef(!1),A=$.useRef(null),T=$.useRef(null),_=function(he){A.current&&qp(A.current,he)},W=mn(t.defaultValue,{value:t.value}),L=ie(W,2),V=L[0],U=L[1],Y=V==null?"":String(V),H=$.useState(null),G=ie(H,2),J=G[0],se=G[1],X=uw(y,g),de=X.max||m,ye=X.strategy(Y),ce=!!de&&ye>de;$.useImperativeHandle(e,function(){var ae;return{focus:_,blur:function(){var $e;($e=A.current)===null||$e===void 0||$e.blur()},setSelectionRange:function($e,Me,we){var ze;(ze=A.current)===null||ze===void 0||ze.setSelectionRange($e,Me,we)},select:function(){var $e;($e=A.current)===null||$e===void 0||$e.select()},input:A.current,nativeElement:((ae=T.current)===null||ae===void 0?void 0:ae.nativeElement)||A.current}}),$.useEffect(function(){j.current&&(j.current=!1),k(function(ae){return ae&&d?!1:ae})},[d]);var oe=function(he,$e,Me){var we=$e;if(!P.current&&X.exceedFormatter&&X.max&&X.strategy($e)>X.max){if(we=X.exceedFormatter($e,{max:X.max}),$e!==we){var ze,Le;se([((ze=A.current)===null||ze===void 0?void 0:ze.selectionStart)||0,((Le=A.current)===null||Le===void 0?void 0:Le.selectionEnd)||0])}}else if(Me.source==="compositionEnd")return;U(we),A.current&&Sc(A.current,he,r,we)};$.useEffect(function(){if(J){var ae;(ae=A.current)===null||ae===void 0||ae.setSelectionRange.apply(ae,Re(J))}},[J]);var me=function(he){oe(he,he.target.value,{source:"change"})},te=function(he){P.current=!1,oe(he,he.currentTarget.value,{source:"compositionEnd"}),N==null||N(he)},le=function(he){a&&he.key==="Enter"&&!j.current&&(j.current=!0,a(he)),s==null||s(he)},fe=function(he){he.key==="Enter"&&(j.current=!1),l==null||l(he)},Ee=function(he){k(!0),o==null||o(he)},Oe=function(he){j.current&&(j.current=!1),k(!1),i==null||i(he)},xe=function(he){U(""),_(),A.current&&Sc(A.current,he,r)},Be=ce&&"".concat(u,"-out-of-range"),z=function(){var he=Tn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return $.createElement("input",De({autoComplete:n},he,{onChange:me,onFocus:Ee,onBlur:Oe,onKeyDown:le,onKeyUp:fe,className:ee(u,F({},"".concat(u,"-disabled"),d),S==null?void 0:S.input),style:w==null?void 0:w.input,ref:A,size:f,type:C,onCompositionStart:function(Me){P.current=!0,E==null||E(Me)},onCompositionEnd:te}))},ve=function(){var he=Number(de)>0;if(v||X.show){var $e=X.showFormatter?X.showFormatter({value:Y,count:ye,maxLength:de}):"".concat(ye).concat(he?" / ".concat(de):"");return $.createElement($.Fragment,null,X.show&&$.createElement("span",{className:ee("".concat(u,"-show-count-suffix"),F({},"".concat(u,"-show-count-has-suffix"),!!v),S==null?void 0:S.count),style:q({},w==null?void 0:w.count)},$e),v)}return null};return $.createElement(Kp,De({},O,{prefixCls:u,className:ee(p,Be),handleReset:xe,value:Y,focused:D,triggerFocus:_,suffix:ve(),disabled:d,classes:x,classNames:S,styles:w}),z())});function SF(t,e){return typeof Proxy<"u"&&t?new Proxy(t,{get:function(r,o){if(e[o])return e[o];var i=r[o];return typeof i=="function"?i.bind(r):i}}):t}function xF(t,e){var n=$.useRef(null);function r(){try{var i=t.selectionStart,a=t.selectionEnd,s=t.value,l=s.substring(0,i),c=s.substring(a);n.current={start:i,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function o(){if(t&&n.current&&e)try{var i=t.value,a=n.current,s=a.beforeTxt,l=a.afterTxt,c=a.start,u=i.length;if(i.startsWith(s))u=s.length;else if(i.endsWith(l))u=i.length-n.current.afterTxt.length;else{var d=s[c-1],f=i.indexOf(d,c-1);f!==-1&&(u=f+1)}t.setSelectionRange(u,u)}catch(p){yt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(p.message))}}return[r,o]}var wF=function(){var e=$.useState(!1),n=ie(e,2),r=n[0],o=n[1];return Jt(function(){o(Cp())},[]),r},EF=200,$F=600;function OF(t){var e=t.prefixCls,n=t.upNode,r=t.downNode,o=t.upDisabled,i=t.downDisabled,a=t.onStep,s=h.useRef(),l=h.useRef([]),c=h.useRef();c.current=a;var u=function(){clearTimeout(s.current)},d=function(C,x){C.preventDefault(),u(),c.current(x);function S(){c.current(x),s.current=setTimeout(S,EF)}s.current=setTimeout(S,$F)};h.useEffect(function(){return function(){u(),l.current.forEach(function(b){return Dt.cancel(b)})}},[]);var f=wF();if(f)return null;var p="".concat(e,"-handler"),m=ee(p,"".concat(p,"-up"),F({},"".concat(p,"-up-disabled"),o)),v=ee(p,"".concat(p,"-down"),F({},"".concat(p,"-down-disabled"),i)),g=function(){return l.current.push(Dt(u))},y={unselectable:"on",role:"button",onMouseUp:g,onMouseLeave:g};return h.createElement("div",{className:"".concat(p,"-wrap")},h.createElement("span",De({},y,{onMouseDown:function(C){d(C,!0)},"aria-label":"Increase Value","aria-disabled":o,className:m}),n||h.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-up-inner")})),h.createElement("span",De({},y,{onMouseDown:function(C){d(C,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:v}),r||h.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-down-inner")})))}function Db(t){var e=typeof t=="number"?hu(t):vi(t).fullStr,n=e.includes(".");return n?vi(e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:t+"0"}const NF=function(){var t=$.useRef(0),e=function(){Dt.cancel(t.current)};return $.useEffect(function(){return e},[]),function(n){e(),t.current=Dt(function(){n()})}};var MF=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],IF=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],kb=function(e,n){return e||n.isEmpty()?n.toString():n.toNumber()},_b=function(e){var n=Rr(e);return n.isInvalidate()?null:n},RF=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,o=t.style,i=t.min,a=t.max,s=t.step,l=s===void 0?1:s,c=t.defaultValue,u=t.value,d=t.disabled,f=t.readOnly,p=t.upHandler,m=t.downHandler,v=t.keyboard,g=t.changeOnWheel,y=g===void 0?!1:g,b=t.controls,C=b===void 0?!0:b;t.classNames;var x=t.stringMode,S=t.parser,w=t.formatter,E=t.precision,N=t.decimalSeparator,O=t.onChange,M=t.onInput,I=t.onPressEnter,D=t.onStep,k=t.changeOnBlur,P=k===void 0?!0:k,j=t.domRef,A=xt(t,MF),T="".concat(n,"-input"),_=h.useRef(null),W=h.useState(!1),L=ie(W,2),V=L[0],U=L[1],Y=h.useRef(!1),H=h.useRef(!1),G=h.useRef(!1),J=h.useState(function(){return Rr(u??c)}),se=ie(J,2),X=se[0],de=se[1];function ye(Ye){u===void 0&&de(Ye)}var ce=h.useCallback(function(Ye,He){if(!He)return E>=0?E:Math.max(di(Ye),di(l))},[E,l]),oe=h.useCallback(function(Ye){var He=String(Ye);if(S)return S(He);var lt=He;return N&&(lt=lt.replace(N,".")),lt.replace(/[^\w.-]+/g,"")},[S,N]),me=h.useRef(""),te=h.useCallback(function(Ye,He){if(w)return w(Ye,{userTyping:He,input:String(me.current)});var lt=typeof Ye=="number"?hu(Ye):Ye;if(!He){var it=ce(lt,He);if(Wp(lt)&&(N||it>=0)){var pt=N||".";lt=Ll(lt,pt,it)}}return lt},[w,ce,N]),le=h.useState(function(){var Ye=c??u;return X.isInvalidate()&&["string","number"].includes(st(Ye))?Number.isNaN(Ye)?"":Ye:te(X.toString(),!1)}),fe=ie(le,2),Ee=fe[0],Oe=fe[1];me.current=Ee;function xe(Ye,He){Oe(te(Ye.isInvalidate()?Ye.toString(!1):Ye.toString(!He),He))}var Be=h.useMemo(function(){return _b(a)},[a,E]),z=h.useMemo(function(){return _b(i)},[i,E]),ve=h.useMemo(function(){return!Be||!X||X.isInvalidate()?!1:Be.lessEquals(X)},[Be,X]),ae=h.useMemo(function(){return!z||!X||X.isInvalidate()?!1:X.lessEquals(z)},[z,X]),he=xF(_.current,V),$e=ie(he,2),Me=$e[0],we=$e[1],ze=function(He){return Be&&!He.lessEquals(Be)?Be:z&&!z.lessEquals(He)?z:null},Le=function(He){return!ze(He)},Ie=function(He,lt){var it=He,pt=Le(it)||it.isEmpty();if(!it.isEmpty()&&!lt&&(it=ze(it)||it,pt=!0),!f&&!d&&pt){var Qe=it.toString(),qe=ce(Qe,lt);return qe>=0&&(it=Rr(Ll(Qe,".",qe)),Le(it)||(it=Rr(Ll(Qe,".",qe,!0)))),it.equals(X)||(ye(it),O==null||O(it.isEmpty()?null:kb(x,it)),u===void 0&&xe(it,lt)),it}return X},We=NF(),Ke=function Ye(He){if(Me(),me.current=He,Oe(He),!H.current){var lt=oe(He),it=Rr(lt);it.isNaN()||Ie(it,!0)}M==null||M(He),We(function(){var pt=He;S||(pt=He.replace(/。/g,".")),pt!==He&&Ye(pt)})},Pe=function(){H.current=!0},je=function(){H.current=!1,Ke(_.current.value)},_e=function(He){Ke(He.target.value)},Fe=function(He){var lt;if(!(He&&ve||!He&&ae)){Y.current=!1;var it=Rr(G.current?Db(l):l);He||(it=it.negate());var pt=(X||Rr(0)).add(it.toString()),Qe=Ie(pt,!1);D==null||D(kb(x,Qe),{offset:G.current?Db(l):l,type:He?"up":"down"}),(lt=_.current)===null||lt===void 0||lt.focus()}},Ze=function(He){var lt=Rr(oe(Ee)),it;lt.isNaN()?it=Ie(X,He):it=Ie(lt,He),u!==void 0?xe(X,!1):it.isNaN()||xe(it,!1)},ht=function(){Y.current=!0},Tt=function(He){var lt=He.key,it=He.shiftKey;Y.current=!0,G.current=it,lt==="Enter"&&(H.current||(Y.current=!1),Ze(!1),I==null||I(He)),v!==!1&&!H.current&&["Up","ArrowUp","Down","ArrowDown"].includes(lt)&&(Fe(lt==="Up"||lt==="ArrowUp"),He.preventDefault())},Pt=function(){Y.current=!1,G.current=!1};h.useEffect(function(){if(y&&V){var Ye=function(it){Fe(it.deltaY<0),it.preventDefault()},He=_.current;if(He)return He.addEventListener("wheel",Ye,{passive:!1}),function(){return He.removeEventListener("wheel",Ye)}}});var an=function(){P&&Ze(!1),U(!1),Y.current=!1};return Qa(function(){X.isInvalidate()||xe(X,!1)},[E,w]),Qa(function(){var Ye=Rr(u);de(Ye);var He=Rr(oe(Ee));(!Ye.equals(He)||!Y.current||w)&&xe(Ye,Y.current)},[u]),Qa(function(){w&&we()},[Ee]),h.createElement("div",{ref:j,className:ee(n,r,F(F(F(F(F({},"".concat(n,"-focused"),V),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),f),"".concat(n,"-not-a-number"),X.isNaN()),"".concat(n,"-out-of-range"),!X.isInvalidate()&&!Le(X))),style:o,onFocus:function(){U(!0)},onBlur:an,onKeyDown:Tt,onKeyUp:Pt,onCompositionStart:Pe,onCompositionEnd:je,onBeforeInput:ht},C&&h.createElement(OF,{prefixCls:n,upNode:p,downNode:m,upDisabled:ve,downDisabled:ae,onStep:Fe}),h.createElement("div",{className:"".concat(T,"-wrap")},h.createElement("input",De({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":X.isInvalidate()?null:X.toString(),step:l},A,{ref:ir(_,e),className:T,value:Ee,onChange:_e,disabled:d,readOnly:f}))))}),dw=h.forwardRef(function(t,e){var n=t.disabled,r=t.style,o=t.prefixCls,i=o===void 0?"rc-input-number":o,a=t.value,s=t.prefix,l=t.suffix,c=t.addonBefore,u=t.addonAfter,d=t.className,f=t.classNames,p=xt(t,IF),m=h.useRef(null),v=h.useRef(null),g=h.useRef(null),y=function(C){g.current&&qp(g.current,C)};return h.useImperativeHandle(e,function(){return SF(g.current,{focus:y,nativeElement:m.current.nativeElement||v.current})}),h.createElement(Kp,{className:d,triggerFocus:y,prefixCls:i,value:a,disabled:n,style:r,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:f,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:m},h.createElement(RF,De({prefixCls:i,disabled:n,ref:g,domRef:v,className:f==null?void 0:f.input},p)))});process.env.NODE_ENV!=="production"&&(dw.displayName="InputNumber");const TF=t=>{var e;const n=(e=t.handleVisible)!==null&&e!==void 0?e:"auto",r=t.controlHeightSM-t.lineWidth*2;return Object.assign(Object.assign({},Ks(t)),{controlWidth:90,handleWidth:r,handleFontSize:t.fontSize/2,handleVisible:n,handleActiveBg:t.colorFillAlter,handleBg:t.colorBgContainer,filledHandleBg:new Vt(t.colorFillSecondary).onBackground(t.colorBgContainer).toHexString(),handleHoverColor:t.colorPrimary,handleBorderColor:t.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},Bb=(t,e)=>{let{componentCls:n,borderRadiusSM:r,borderRadiusLG:o}=t;const i=e==="lg"?o:r;return{[`&-${e}`]:{[`${n}-handler-wrap`]:{borderStartEndRadius:i,borderEndEndRadius:i},[`${n}-handler-up`]:{borderStartEndRadius:i},[`${n}-handler-down`]:{borderEndEndRadius:i}}}},PF=t=>{const{componentCls:e,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:f,paddingInlineLG:p,colorTextDescription:m,motionDurationMid:v,handleHoverColor:g,handleOpacity:y,paddingInline:b,paddingBlock:C,handleBg:x,handleActiveBg:S,colorTextDisabled:w,borderRadiusSM:E,borderRadiusLG:N,controlWidth:O,handleBorderColor:M,filledHandleBg:I,lineHeightLG:D,calc:k}=t;return[{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Hn(t)),fu(t)),{display:"inline-block",width:O,margin:0,padding:0,borderRadius:o}),j1(t,{[`${e}-handler-wrap`]:{background:x,[`${e}-handler-down`]:{borderBlockStart:`${re(n)} ${r} ${M}`}}})),V1(t,{[`${e}-handler-wrap`]:{background:I,[`${e}-handler-down`]:{borderBlockStart:`${re(n)} ${r} ${M}`}},"&:focus-within":{[`${e}-handler-wrap`]:{background:x}}})),K1(t,{[`${e}-handler-wrap`]:{background:x,[`${e}-handler-down`]:{borderBlockStart:`${re(n)} ${r} ${M}`}}})),F1(t)),{"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:D,borderRadius:N,[`input${e}-input`]:{height:k(s).sub(k(n).mul(2)).equal(),padding:`${re(f)} ${re(p)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:E,[`input${e}-input`]:{height:k(l).sub(k(n).mul(2)).equal(),padding:`${re(d)} ${re(u)}`}},"&-out-of-range":{[`${e}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},Hn(t)),Y1(t)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${e}-group-addon`]:{borderRadius:N,fontSize:t.fontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:E}}},L1(t)),W1(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${e}-input`]:{cursor:"not-allowed"},[e]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},Hn(t)),{width:"100%",padding:`${re(C)} ${re(b)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${v} linear`,appearance:"textfield",fontSize:"inherit"}),U1(t.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1}})},{[e]:Object.assign(Object.assign(Object.assign({[`${e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:t.handleVisibleWidth,opacity:y,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${v}`,overflow:"hidden",[`${e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
408
|
-
${e}-handler-up-inner,
|
|
409
|
-
${e}-handler-down-inner
|
|
410
|
-
`]:{marginInlineEnd:0,fontSize:t.handleFontSize}}},[`${e}-handler`]:{height:"50%",overflow:"hidden",color:m,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${re(n)} ${r} ${M}`,transition:`all ${v} linear`,"&:active":{background:S},"&:hover":{height:"60%",[`
|
|
411
|
-
${e}-handler-up-inner,
|
|
412
|
-
${e}-handler-down-inner
|
|
413
|
-
`]:{color:g}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},Pi()),{color:m,transition:`all ${v} linear`,userSelect:"none"})},[`${e}-handler-up`]:{borderStartEndRadius:o},[`${e}-handler-down`]:{borderEndEndRadius:o}},Bb(t,"lg")),Bb(t,"sm")),{"&-disabled, &-readonly":{[`${e}-handler-wrap`]:{display:"none"},[`${e}-input`]:{color:"inherit"}},[`
|
|
414
|
-
${e}-handler-up-disabled,
|
|
415
|
-
${e}-handler-down-disabled
|
|
416
|
-
`]:{cursor:"not-allowed"},[`
|
|
417
|
-
${e}-handler-up-disabled:hover &-handler-up-inner,
|
|
418
|
-
${e}-handler-down-disabled:hover &-handler-down-inner
|
|
419
|
-
`]:{color:w}})}]},AF=t=>{const{componentCls:e,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:i,borderRadiusLG:a,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:f}=t;return{[`${e}-affix-wrapper`]:Object.assign(Object.assign({[`input${e}-input`]:{padding:`${re(n)} 0`}},fu(t)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${e}-input`]:{padding:`${re(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${e}-input`]:{padding:`${re(d)} 0`}},[`&:not(${e}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${e}-disabled`]:{background:"transparent"},[`> div${e}`]:{width:"100%",border:"none",outline:"none",[`&${e}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${e}-handler-wrap`]:{zIndex:2},[e]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:o,transition:`margin ${f}`}},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1},[`&:not(${e}-affix-wrapper-without-controls):hover ${e}-suffix`]:{marginInlineEnd:t.calc(t.handleWidth).add(r).equal()}})}},DF=hn("InputNumber",t=>{const e=Lt(t,qs(t));return[PF(e),AF(e),ks(e)]},TF,{unitless:{handleOpacity:!0}});var kF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const fw=h.forwardRef((t,e)=>{if(process.env.NODE_ENV!=="production"){const X=on("InputNumber");X.deprecated(!("bordered"in t),"bordered","variant"),X(!(t.type==="number"&&t.changeOnWheel),"usage","When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.")}const{getPrefixCls:n,direction:r}=h.useContext(At),o=h.useRef(null);h.useImperativeHandle(e,()=>o.current);const{className:i,rootClassName:a,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:f,suffix:p,bordered:m,readOnly:v,status:g,controls:y,variant:b}=t,C=kF(t,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),x=n("input-number",c),S=xo(x),[w,E,N]=DF(x,S),{compactSize:O,compactItemClassnames:M}=Zo(x,r);let I=h.createElement(lw,{className:`${x}-handler-up-inner`}),D=h.createElement(Mp,{className:`${x}-handler-down-inner`});const k=typeof y=="boolean"?y:void 0;typeof y=="object"&&(I=typeof y.upIcon>"u"?I:h.createElement("span",{className:`${x}-handler-up-inner`},y.upIcon),D=typeof y.downIcon>"u"?D:h.createElement("span",{className:`${x}-handler-down-inner`},y.downIcon));const{hasFeedback:P,status:j,isFormItemInput:A,feedbackIcon:T}=h.useContext(Nr),_=Fs(j,g),W=Fr(X=>{var de;return(de=s??O)!==null&&de!==void 0?de:X}),L=h.useContext(zr),V=l??L,[U,Y]=su("inputNumber",b,m),H=P&&h.createElement(h.Fragment,null,T),G=ee({[`${x}-lg`]:W==="large",[`${x}-sm`]:W==="small",[`${x}-rtl`]:r==="rtl",[`${x}-in-form-item`]:A},E),J=`${x}-group`,se=h.createElement(dw,Object.assign({ref:o,disabled:V,className:ee(N,S,i,a,M),upHandler:I,downHandler:D,prefixCls:x,readOnly:v,controls:k,prefix:f,suffix:H||p,addonBefore:u&&h.createElement(qo,{form:!0,space:!0},u),addonAfter:d&&h.createElement(qo,{form:!0,space:!0},d),classNames:{input:G,variant:ee({[`${x}-${U}`]:Y},Ni(x,_,P)),affixWrapper:ee({[`${x}-affix-wrapper-sm`]:W==="small",[`${x}-affix-wrapper-lg`]:W==="large",[`${x}-affix-wrapper-rtl`]:r==="rtl",[`${x}-affix-wrapper-without-controls`]:y===!1||V},E),wrapper:ee({[`${J}-rtl`]:r==="rtl"},E),groupWrapper:ee({[`${x}-group-wrapper-sm`]:W==="small",[`${x}-group-wrapper-lg`]:W==="large",[`${x}-group-wrapper-rtl`]:r==="rtl",[`${x}-group-wrapper-${U}`]:Y},Ni(`${x}-group-wrapper`,_,P),E)}},C));return w(se)}),Up=fw,_F=t=>h.createElement(ro,{theme:{components:{InputNumber:{handleVisible:!0}}}},h.createElement(fw,Object.assign({},t)));process.env.NODE_ENV!=="production"&&(Up.displayName="InputNumber");Up._InternalPanelDoNotUseOrYouWillBeFired=_F;const bi=t=>{let{prefixCls:e,min:n=0,max:r=100,value:o,onChange:i,className:a,formatter:s}=t;const l=`${e}-steppers`,[c,u]=$.useState(o);return $.useEffect(()=>{Number.isNaN(o)||u(o)},[o]),$.createElement(Up,{className:ee(l,a),min:n,max:r,value:c,formatter:s,size:"small",onChange:d=>{o||u(d||0),i==null||i(d)}})},BF=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-alpha-input`,[i,a]=$.useState(Xn(n||"#000"));$.useEffect(()=>{n&&a(n)},[n]);const s=l=>{const c=i.toHsb();c.a=(l||0)/100;const u=Xn(c);n||a(u),r==null||r(u)};return $.createElement(bi,{value:pp(i),prefixCls:e,formatter:l=>`${l}%`,className:o,onChange:s})},hw=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:$.createElement(qc,null)}),e};function pw(t,e){const n=$.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;!((o=t.current)===null||o===void 0)&&o.input&&((i=t.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return $.useEffect(()=>(e&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function zF(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var jF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Na=$.forwardRef((t,e)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:v,rootClassName:g,onChange:y,classNames:b,variant:C}=t,x=jF(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:xe}=on("Input");xe(!("bordered"in t),"bordered","variant")}const{getPrefixCls:S,direction:w,allowClear:E,autoComplete:N,className:O,style:M,classNames:I,styles:D}=br("input"),k=S("input",n),P=$.useRef(null),j=xo(k),[A,T,_]=J1(k,g),[W]=Q1(k,j),{compactSize:L,compactItemClassnames:V}=Zo(k,w),U=Fr(xe=>{var Be;return(Be=i??L)!==null&&Be!==void 0?Be:xe}),Y=$.useContext(zr),H=a??Y,{status:G,hasFeedback:J,feedbackIcon:se}=$.useContext(Nr),X=Fs(G,o),de=zF(t)||!!J,ye=$.useRef(de);if(process.env.NODE_ENV!=="production"){const xe=on("Input");$.useEffect(()=>{var Be;de&&!ye.current&&process.env.NODE_ENV!=="production"&&xe(document.activeElement===((Be=P.current)===null||Be===void 0?void 0:Be.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ye.current=de},[de])}const ce=pw(P,!0),oe=xe=>{ce(),s==null||s(xe)},me=xe=>{ce(),l==null||l(xe)},te=xe=>{ce(),y==null||y(xe)},le=(J||c)&&$.createElement($.Fragment,null,c,J&&se),fe=hw(u??E),[Ee,Oe]=su("input",C,r);return A(W($.createElement(CF,Object.assign({ref:ir(e,P),prefixCls:k,autoComplete:N},x,{disabled:H,onBlur:oe,onFocus:me,style:Object.assign(Object.assign({},M),m),styles:Object.assign(Object.assign({},D),v),suffix:le,allowClear:fe,className:ee(p,g,_,j,V,O),onChange:te,addonBefore:f&&$.createElement(qo,{form:!0,space:!0},f),addonAfter:d&&$.createElement(qo,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},b),I),{input:ee({[`${k}-sm`]:U==="small",[`${k}-lg`]:U==="large",[`${k}-rtl`]:w==="rtl"},b==null?void 0:b.input,I.input,T),variant:ee({[`${k}-${Ee}`]:Oe},Ni(k,X)),affixWrapper:ee({[`${k}-affix-wrapper-sm`]:U==="small",[`${k}-affix-wrapper-lg`]:U==="large",[`${k}-affix-wrapper-rtl`]:w==="rtl"},T),wrapper:ee({[`${k}-group-rtl`]:w==="rtl"},T),groupWrapper:ee({[`${k}-group-wrapper-sm`]:U==="small",[`${k}-group-wrapper-lg`]:U==="large",[`${k}-group-wrapper-rtl`]:w==="rtl",[`${k}-group-wrapper-${Ee}`]:Oe},Ni(`${k}-group-wrapper`,X,J),T)})}))))});process.env.NODE_ENV!=="production"&&(Na.displayName="Input");const LF=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,FF=t=>LF.test(`#${t}`),HF=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-hex-input`,[i,a]=$.useState(()=>n?qa(n.toHexString()):void 0);$.useEffect(()=>{n&&a(qa(n.toHexString()))},[n]);const s=l=>{const c=l.target.value;a(qa(c)),FF(qa(c,!0))&&(r==null||r(Xn(c)))};return $.createElement(Na,{className:o,value:i,prefix:"#",onChange:s,size:"small"})},VF=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-hsb-input`,[i,a]=$.useState(Xn(n||"#000"));$.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=Xn(u);n||a(d),r==null||r(d)};return $.createElement("div",{className:o},$.createElement(bi,{max:360,min:0,value:Number(i.toHsb().h),prefixCls:e,className:o,formatter:l=>_l(l||0).toString(),onChange:l=>s(Number(l),"h")}),$.createElement(bi,{max:100,min:0,value:Number(i.toHsb().s)*100,prefixCls:e,className:o,formatter:l=>`${_l(l||0)}%`,onChange:l=>s(Number(l),"s")}),$.createElement(bi,{max:100,min:0,value:Number(i.toHsb().b)*100,prefixCls:e,className:o,formatter:l=>`${_l(l||0)}%`,onChange:l=>s(Number(l),"b")}))},WF=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-rgb-input`,[i,a]=$.useState(Xn(n||"#000"));$.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toRgb();u[c]=l||0;const d=Xn(u);n||a(d),r==null||r(d)};return $.createElement("div",{className:o},$.createElement(bi,{max:255,min:0,value:Number(i.toRgb().r),prefixCls:e,className:o,onChange:l=>s(Number(l),"r")}),$.createElement(bi,{max:255,min:0,value:Number(i.toRgb().g),prefixCls:e,className:o,onChange:l=>s(Number(l),"g")}),$.createElement(bi,{max:255,min:0,value:Number(i.toRgb().b),prefixCls:e,className:o,onChange:l=>s(Number(l),"b")}))},qF=[iw,sw,aw].map(t=>({value:t,label:t.toUpperCase()})),KF=t=>{const{prefixCls:e,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:s}=t,[l,c]=mn(iw,{value:n,onChange:i}),u=`${e}-input`,d=p=>{c(p)},f=$.useMemo(()=>{const p={value:r,prefixCls:e,onChange:a};switch(l){case sw:return $.createElement(VF,Object.assign({},p));case aw:return $.createElement(WF,Object.assign({},p));default:return $.createElement(HF,Object.assign({},p))}},[l,e,r,a]);return $.createElement("div",{className:`${u}-container`},!s&&$.createElement(ur,{value:l,variant:"borderless",getPopupContainer:p=>p,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${e}-format-select`,size:"small",options:qF}),$.createElement("div",{className:u},f),!o&&$.createElement(BF,{prefixCls:e,value:r,onChange:a}))};function uh(t,e,n){return(t-e)/(n-e)}function Gp(t,e,n,r){var o=uh(e,n,r),i={};switch(t){case"rtl":i.right="".concat(o*100,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(o*100,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(o*100,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(o*100,"%"),i.transform="translateX(-50%)";break}return i}function ii(t,e){return Array.isArray(t)?t[e]:t}var ki=h.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),mw=h.createContext({}),UF=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],dh=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.value,o=t.valueIndex,i=t.onStartMove,a=t.onDelete,s=t.style,l=t.render,c=t.dragging,u=t.draggingDelete,d=t.onOffsetChange,f=t.onChangeComplete,p=t.onFocus,m=t.onMouseEnter,v=xt(t,UF),g=h.useContext(ki),y=g.min,b=g.max,C=g.direction,x=g.disabled,S=g.keyboard,w=g.range,E=g.tabIndex,N=g.ariaLabelForHandle,O=g.ariaLabelledByForHandle,M=g.ariaRequired,I=g.ariaValueTextFormatterForHandle,D=g.styles,k=g.classNames,P="".concat(n,"-handle"),j=function(G){x||i(G,o)},A=function(G){p==null||p(G,o)},T=function(G){m(G,o)},_=function(G){if(!x&&S){var J=null;switch(G.which||G.keyCode){case Je.LEFT:J=C==="ltr"||C==="btt"?-1:1;break;case Je.RIGHT:J=C==="ltr"||C==="btt"?1:-1;break;case Je.UP:J=C!=="ttb"?1:-1;break;case Je.DOWN:J=C!=="ttb"?-1:1;break;case Je.HOME:J="min";break;case Je.END:J="max";break;case Je.PAGE_UP:J=2;break;case Je.PAGE_DOWN:J=-2;break;case Je.BACKSPACE:case Je.DELETE:a(o);break}J!==null&&(G.preventDefault(),d(J,o))}},W=function(G){switch(G.which||G.keyCode){case Je.LEFT:case Je.RIGHT:case Je.UP:case Je.DOWN:case Je.HOME:case Je.END:case Je.PAGE_UP:case Je.PAGE_DOWN:f==null||f();break}},L=Gp(C,r,y,b),V={};if(o!==null){var U;V={tabIndex:x?null:ii(E,o),role:"slider","aria-valuemin":y,"aria-valuemax":b,"aria-valuenow":r,"aria-disabled":x,"aria-label":ii(N,o),"aria-labelledby":ii(O,o),"aria-required":ii(M,o),"aria-valuetext":(U=ii(I,o))===null||U===void 0?void 0:U(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:j,onTouchStart:j,onFocus:A,onMouseEnter:T,onKeyDown:_,onKeyUp:W}}var Y=h.createElement("div",De({ref:e,className:ee(P,F(F(F({},"".concat(P,"-").concat(o+1),o!==null&&w),"".concat(P,"-dragging"),c),"".concat(P,"-dragging-delete"),u),k.handle),style:q(q(q({},L),s),D.handle)},V,v));return l&&(Y=l(Y,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),Y});process.env.NODE_ENV!=="production"&&(dh.displayName="Handle");var GF=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],gw=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.style,o=t.onStartMove,i=t.onOffsetChange,a=t.values,s=t.handleRender,l=t.activeHandleRender,c=t.draggingIndex,u=t.draggingDelete,d=t.onFocus,f=xt(t,GF),p=h.useRef({}),m=h.useState(!1),v=ie(m,2),g=v[0],y=v[1],b=h.useState(-1),C=ie(b,2),x=C[0],S=C[1],w=function(I){S(I),y(!0)},E=function(I,D){w(D),d==null||d(I)},N=function(I,D){w(D)};h.useImperativeHandle(e,function(){return{focus:function(I){var D;(D=p.current[I])===null||D===void 0||D.focus()},hideHelp:function(){_r.flushSync(function(){y(!1)})}}});var O=q({prefixCls:n,onStartMove:o,onOffsetChange:i,render:s,onFocus:E,onMouseEnter:N},f);return h.createElement(h.Fragment,null,a.map(function(M,I){var D=c===I;return h.createElement(dh,De({ref:function(P){P?p.current[I]=P:delete p.current[I]},dragging:D,draggingDelete:D&&u,style:ii(r,I),key:I,value:M,valueIndex:I},O))}),l&&g&&h.createElement(dh,De({key:"a11y"},O,{value:a[x],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});process.env.NODE_ENV!=="production"&&(gw.displayName="Handles");var XF=function(e){var n=e.prefixCls,r=e.style,o=e.children,i=e.value,a=e.onClick,s=h.useContext(ki),l=s.min,c=s.max,u=s.direction,d=s.includedStart,f=s.includedEnd,p=s.included,m="".concat(n,"-text"),v=Gp(u,i,l,c);return h.createElement("span",{className:ee(m,F({},"".concat(m,"-active"),p&&d<=i&&i<=f)),style:q(q({},v),r),onMouseDown:function(y){y.stopPropagation()},onClick:function(){a(i)}},o)},YF=function(e){var n=e.prefixCls,r=e.marks,o=e.onClick,i="".concat(n,"-mark");return r.length?h.createElement("div",{className:i},r.map(function(a){var s=a.value,l=a.style,c=a.label;return h.createElement(XF,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},JF=function(e){var n=e.prefixCls,r=e.value,o=e.style,i=e.activeStyle,a=h.useContext(ki),s=a.min,l=a.max,c=a.direction,u=a.included,d=a.includedStart,f=a.includedEnd,p="".concat(n,"-dot"),m=u&&d<=r&&r<=f,v=q(q({},Gp(c,r,s,l)),typeof o=="function"?o(r):o);return m&&(v=q(q({},v),typeof i=="function"?i(r):i)),h.createElement("span",{className:ee(p,F({},"".concat(p,"-active"),m)),style:v})},QF=function(e){var n=e.prefixCls,r=e.marks,o=e.dots,i=e.style,a=e.activeStyle,s=h.useContext(ki),l=s.min,c=s.max,u=s.step,d=h.useMemo(function(){var f=new Set;if(r.forEach(function(m){f.add(m.value)}),o&&u!==null)for(var p=l;p<=c;)f.add(p),p+=u;return Array.from(f)},[l,c,u,o,r]);return h.createElement("div",{className:"".concat(n,"-step")},d.map(function(f){return h.createElement(JF,{prefixCls:n,key:f,value:f,style:i,activeStyle:a})}))},zb=function(e){var n=e.prefixCls,r=e.style,o=e.start,i=e.end,a=e.index,s=e.onStartMove,l=e.replaceCls,c=h.useContext(ki),u=c.direction,d=c.min,f=c.max,p=c.disabled,m=c.range,v=c.classNames,g="".concat(n,"-track"),y=uh(o,d,f),b=uh(i,d,f),C=function(E){!p&&s&&s(E,-1)},x={};switch(u){case"rtl":x.right="".concat(y*100,"%"),x.width="".concat(b*100-y*100,"%");break;case"btt":x.bottom="".concat(y*100,"%"),x.height="".concat(b*100-y*100,"%");break;case"ttb":x.top="".concat(y*100,"%"),x.height="".concat(b*100-y*100,"%");break;default:x.left="".concat(y*100,"%"),x.width="".concat(b*100-y*100,"%")}var S=l||ee(g,F(F({},"".concat(g,"-").concat(a+1),a!==null&&m),"".concat(n,"-track-draggable"),s),v.track);return h.createElement("div",{className:S,style:q(q({},x),r),onMouseDown:C,onTouchStart:C})},ZF=function(e){var n=e.prefixCls,r=e.style,o=e.values,i=e.startPoint,a=e.onStartMove,s=h.useContext(ki),l=s.included,c=s.range,u=s.min,d=s.styles,f=s.classNames,p=h.useMemo(function(){if(!c){if(o.length===0)return[];var v=i??u,g=o[0];return[{start:Math.min(v,g),end:Math.max(v,g)}]}for(var y=[],b=0;b<o.length-1;b+=1)y.push({start:o[b],end:o[b+1]});return y},[o,c,i,u]);if(!l)return null;var m=p!=null&&p.length&&(f.tracks||d.tracks)?h.createElement(zb,{index:null,prefixCls:n,start:p[0].start,end:p[p.length-1].end,replaceCls:ee(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return h.createElement(h.Fragment,null,m,p.map(function(v,g){var y=v.start,b=v.end;return h.createElement(zb,{index:g,prefixCls:n,style:q(q({},ii(r,g)),d.track),start:y,end:b,key:g,onStartMove:a})}))},eH=130;function jb(t){var e="targetTouches"in t?t.targetTouches[0]:t;return{pageX:e.pageX,pageY:e.pageY}}function tH(t,e,n,r,o,i,a,s,l,c,u){var d=h.useState(null),f=ie(d,2),p=f[0],m=f[1],v=h.useState(-1),g=ie(v,2),y=g[0],b=g[1],C=h.useState(!1),x=ie(C,2),S=x[0],w=x[1],E=h.useState(n),N=ie(E,2),O=N[0],M=N[1],I=h.useState(n),D=ie(I,2),k=D[0],P=D[1],j=h.useRef(null),A=h.useRef(null),T=h.useRef(null),_=h.useContext(mw),W=_.onDragStart,L=_.onDragChange;Jt(function(){y===-1&&M(n)},[n,y]),h.useEffect(function(){return function(){document.removeEventListener("mousemove",j.current),document.removeEventListener("mouseup",A.current),T.current&&(T.current.removeEventListener("touchmove",j.current),T.current.removeEventListener("touchend",A.current))}},[]);var V=function(J,se,X){se!==void 0&&m(se),M(J);var de=J;X&&(de=J.filter(function(ye,ce){return ce!==y})),a(de),L&&L({rawValues:J,deleteIndex:X?y:-1,draggingIndex:y,draggingValue:se})},U=Wt(function(G,J,se){if(G===-1){var X=k[0],de=k[k.length-1],ye=r-X,ce=o-de,oe=J*(o-r);oe=Math.max(oe,ye),oe=Math.min(oe,ce);var me=i(X+oe);oe=me-X;var te=k.map(function(Oe){return Oe+oe});V(te)}else{var le=(o-r)*J,fe=Re(O);fe[G]=k[G];var Ee=l(fe,le,G,"dist");V(Ee.values,Ee.value,se)}}),Y=function(J,se,X){J.stopPropagation();var de=X||n,ye=de[se];b(se),m(ye),P(de),M(de),w(!1);var ce=jb(J),oe=ce.pageX,me=ce.pageY,te=!1;W&&W({rawValues:de,draggingIndex:se,draggingValue:ye});var le=function(Oe){Oe.preventDefault();var xe=jb(Oe),Be=xe.pageX,z=xe.pageY,ve=Be-oe,ae=z-me,he=t.current.getBoundingClientRect(),$e=he.width,Me=he.height,we,ze;switch(e){case"btt":we=-ae/Me,ze=ve;break;case"ttb":we=ae/Me,ze=ve;break;case"rtl":we=-ve/$e,ze=ae;break;default:we=ve/$e,ze=ae}te=c?Math.abs(ze)>eH&&u<O.length:!1,w(te),U(se,we,te)},fe=function Ee(Oe){Oe.preventDefault(),document.removeEventListener("mouseup",Ee),document.removeEventListener("mousemove",le),T.current&&(T.current.removeEventListener("touchmove",j.current),T.current.removeEventListener("touchend",A.current)),j.current=null,A.current=null,T.current=null,s(te),b(-1),w(!1)};document.addEventListener("mouseup",fe),document.addEventListener("mousemove",le),J.currentTarget.addEventListener("touchend",fe),J.currentTarget.addEventListener("touchmove",le),j.current=le,A.current=fe,T.current=J.currentTarget},H=h.useMemo(function(){var G=Re(n).sort(function(ye,ce){return ye-ce}),J=Re(O).sort(function(ye,ce){return ye-ce}),se={};J.forEach(function(ye){se[ye]=(se[ye]||0)+1}),G.forEach(function(ye){se[ye]=(se[ye]||0)-1});var X=c?1:0,de=Object.values(se).reduce(function(ye,ce){return ye+Math.abs(ce)},0);return de<=X?O:n},[n,O,c]);return[y,p,S,H,Y]}function nH(t,e,n,r,o,i){var a=h.useCallback(function(p){return Math.max(t,Math.min(e,p))},[t,e]),s=h.useCallback(function(p){if(n!==null){var m=t+Math.round((a(p)-t)/n)*n,v=function(C){return(String(C).split(".")[1]||"").length},g=Math.max(v(n),v(e),v(t)),y=Number(m.toFixed(g));return t<=y&&y<=e?y:null}return null},[n,t,e,a]),l=h.useCallback(function(p){var m=a(p),v=r.map(function(b){return b.value});n!==null&&v.push(s(p)),v.push(t,e);var g=v[0],y=e-t;return v.forEach(function(b){var C=Math.abs(m-b);C<=y&&(g=b,y=C)}),g},[t,e,r,n,a,s]),c=function p(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var b,C=m[g],x=C+v,S=[];r.forEach(function(M){S.push(M.value)}),S.push(t,e),S.push(s(C));var w=v>0?1:-1;y==="unit"?S.push(s(C+w*n)):S.push(s(x)),S=S.filter(function(M){return M!==null}).filter(function(M){return v<0?M<=C:M>=C}),y==="unit"&&(S=S.filter(function(M){return M!==C}));var E=y==="unit"?C:x;b=S[0];var N=Math.abs(b-E);if(S.forEach(function(M){var I=Math.abs(M-E);I<N&&(b=M,N=I)}),b===void 0)return v<0?t:e;if(y==="dist")return b;if(Math.abs(v)>1){var O=Re(m);return O[g]=b,p(O,v-w,g,y)}return b}else{if(v==="min")return t;if(v==="max")return e}},u=function(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",b=m[g],C=c(m,v,g,y);return{value:C,changed:C!==b}},d=function(m){return i===null&&m===0||typeof i=="number"&&m<i},f=function(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",b=m.map(l),C=b[g],x=c(b,v,g,y);if(b[g]=x,o===!1){var S=i||0;g>0&&b[g-1]!==C&&(b[g]=Math.max(b[g],b[g-1]+S)),g<b.length-1&&b[g+1]!==C&&(b[g]=Math.min(b[g],b[g+1]-S))}else if(typeof i=="number"||i===null){for(var w=g+1;w<b.length;w+=1)for(var E=!0;d(b[w]-b[w-1])&&E;){var N=u(b,1,w);b[w]=N.value,E=N.changed}for(var O=g;O>0;O-=1)for(var M=!0;d(b[O]-b[O-1])&&M;){var I=u(b,-1,O-1);b[O-1]=I.value,M=I.changed}for(var D=b.length-1;D>0;D-=1)for(var k=!0;d(b[D]-b[D-1])&&k;){var P=u(b,-1,D-1);b[D-1]=P.value,k=P.changed}for(var j=0;j<b.length-1;j+=1)for(var A=!0;d(b[j+1]-b[j])&&A;){var T=u(b,1,j+1);b[j+1]=T.value,A=T.changed}}return{value:b[g],values:b}};return[l,f]}function rH(t){return $.useMemo(function(){if(t===!0||!t)return[!!t,!1,!1,0];var e=t.editable,n=t.draggableTrack,r=t.minCount,o=t.maxCount;return process.env.NODE_ENV!=="production"&&Qr(!e||!n,"`editable` can not work with `draggableTrack`."),[!0,e,!e&&n,r||0,o]},[t])}var vw=h.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-slider":n,o=t.className,i=t.style,a=t.classNames,s=t.styles,l=t.id,c=t.disabled,u=c===void 0?!1:c,d=t.keyboard,f=d===void 0?!0:d,p=t.autoFocus,m=t.onFocus,v=t.onBlur,g=t.min,y=g===void 0?0:g,b=t.max,C=b===void 0?100:b,x=t.step,S=x===void 0?1:x,w=t.value,E=t.defaultValue,N=t.range,O=t.count,M=t.onChange,I=t.onBeforeChange,D=t.onAfterChange,k=t.onChangeComplete,P=t.allowCross,j=P===void 0?!0:P,A=t.pushable,T=A===void 0?!1:A,_=t.reverse,W=t.vertical,L=t.included,V=L===void 0?!0:L,U=t.startPoint,Y=t.trackStyle,H=t.handleStyle,G=t.railStyle,J=t.dotStyle,se=t.activeDotStyle,X=t.marks,de=t.dots,ye=t.handleRender,ce=t.activeHandleRender,oe=t.track,me=t.tabIndex,te=me===void 0?0:me,le=t.ariaLabelForHandle,fe=t.ariaLabelledByForHandle,Ee=t.ariaRequired,Oe=t.ariaValueTextFormatterForHandle,xe=h.useRef(null),Be=h.useRef(null),z=h.useMemo(function(){return W?_?"ttb":"btt":_?"rtl":"ltr"},[_,W]),ve=rH(N),ae=ie(ve,5),he=ae[0],$e=ae[1],Me=ae[2],we=ae[3],ze=ae[4],Le=h.useMemo(function(){return isFinite(y)?y:0},[y]),Ie=h.useMemo(function(){return isFinite(C)?C:100},[C]),We=h.useMemo(function(){return S!==null&&S<=0?1:S},[S]),Ke=h.useMemo(function(){return typeof T=="boolean"?T?We:!1:T>=0?T:!1},[T,We]),Pe=h.useMemo(function(){return Object.keys(X||{}).map(function(Xe){var Ae=X[Xe],ft={value:Number(Xe)};return Ae&&st(Ae)==="object"&&!h.isValidElement(Ae)&&("label"in Ae||"style"in Ae)?(ft.style=Ae.style,ft.label=Ae.label):ft.label=Ae,ft}).filter(function(Xe){var Ae=Xe.label;return Ae||typeof Ae=="number"}).sort(function(Xe,Ae){return Xe.value-Ae.value})},[X]),je=nH(Le,Ie,We,Pe,j,Ke),_e=ie(je,2),Fe=_e[0],Ze=_e[1],ht=mn(E,{value:w}),Tt=ie(ht,2),Pt=Tt[0],an=Tt[1],Ye=h.useMemo(function(){var Xe=Pt==null?[]:Array.isArray(Pt)?Pt:[Pt],Ae=ie(Xe,1),ft=Ae[0],Et=ft===void 0?Le:ft,Ot=Pt===null?[]:[Et];if(he){if(Ot=Re(Xe),O||Pt===void 0){var ln=O>=0?O+1:2;for(Ot=Ot.slice(0,ln);Ot.length<ln;){var en;Ot.push((en=Ot[Ot.length-1])!==null&&en!==void 0?en:Le)}}Ot.sort(function(dn,cn){return dn-cn})}return Ot.forEach(function(dn,cn){Ot[cn]=Fe(dn)}),Ot},[Pt,he,Le,O,Fe]),He=function(Ae){return he?Ae:Ae[0]},lt=Wt(function(Xe){var Ae=Re(Xe).sort(function(ft,Et){return ft-Et});M&&!ha(Ae,Ye,!0)&&M(He(Ae)),an(Ae)}),it=Wt(function(Xe){Xe&&xe.current.hideHelp();var Ae=He(Ye);D==null||D(Ae),yt(!D,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),k==null||k(Ae)}),pt=function(Ae){if(!(u||!$e||Ye.length<=we)){var ft=Re(Ye);ft.splice(Ae,1),I==null||I(He(ft)),lt(ft);var Et=Math.max(0,Ae-1);xe.current.hideHelp(),xe.current.focus(Et)}},Qe=tH(Be,z,Ye,Le,Ie,Fe,lt,it,Ze,$e,we),qe=ie(Qe,5),Ue=qe[0],wt=qe[1],Nt=qe[2],et=qe[3],Ve=qe[4],ot=function(Ae,ft){if(!u){var Et=Re(Ye),Ot=0,ln=0,en=Ie-Le;Ye.forEach(function(In,R){var K=Math.abs(Ae-In);K<=en&&(en=K,Ot=R),In<Ae&&(ln=R)});var dn=Ot;$e&&en!==0&&(!ze||Ye.length<ze)?(Et.splice(ln+1,0,Ae),dn=ln+1):Et[Ot]=Ae,he&&!Ye.length&&O===void 0&&Et.push(Ae);var cn=He(Et);if(I==null||I(cn),lt(Et),ft){var tn,En;(tn=document.activeElement)===null||tn===void 0||(En=tn.blur)===null||En===void 0||En.call(tn),xe.current.focus(dn),Ve(ft,dn,Et)}else D==null||D(cn),yt(!D,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),k==null||k(cn)}},at=function(Ae){Ae.preventDefault();var ft=Be.current.getBoundingClientRect(),Et=ft.width,Ot=ft.height,ln=ft.left,en=ft.top,dn=ft.bottom,cn=ft.right,tn=Ae.clientX,En=Ae.clientY,In;switch(z){case"btt":In=(dn-En)/Ot;break;case"ttb":In=(En-en)/Ot;break;case"rtl":In=(cn-tn)/Et;break;default:In=(tn-ln)/Et}var R=Le+In*(Ie-Le);ot(Fe(R),Ae)},nt=h.useState(null),dt=ie(nt,2),kt=dt[0],$t=dt[1],Gt=function(Ae,ft){if(!u){var Et=Ze(Ye,Ae,ft);I==null||I(He(Ye)),lt(Et.values),$t(Et.value)}};h.useEffect(function(){if(kt!==null){var Xe=Ye.indexOf(kt);Xe>=0&&xe.current.focus(Xe)}$t(null)},[kt]);var It=h.useMemo(function(){return Me&&We===null?(process.env.NODE_ENV!=="production"&&yt(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Me},[Me,We]),Bt=Wt(function(Xe,Ae){Ve(Xe,Ae),I==null||I(He(Ye))}),Ht=Ue!==-1;h.useEffect(function(){if(!Ht){var Xe=Ye.lastIndexOf(wt);xe.current.focus(Xe)}},[Ht]);var Xt=h.useMemo(function(){return Re(et).sort(function(Xe,Ae){return Xe-Ae})},[et]),Mn=h.useMemo(function(){return he?[Xt[0],Xt[Xt.length-1]]:[Le,Xt[0]]},[Xt,he,Le]),Yt=ie(Mn,2),sn=Yt[0],ke=Yt[1];h.useImperativeHandle(e,function(){return{focus:function(){xe.current.focus(0)},blur:function(){var Ae,ft=document,Et=ft.activeElement;(Ae=Be.current)!==null&&Ae!==void 0&&Ae.contains(Et)&&(Et==null||Et.blur())}}}),h.useEffect(function(){p&&xe.current.focus(0)},[]);var rt=h.useMemo(function(){return{min:Le,max:Ie,direction:z,disabled:u,keyboard:f,step:We,included:V,includedStart:sn,includedEnd:ke,range:he,tabIndex:te,ariaLabelForHandle:le,ariaLabelledByForHandle:fe,ariaRequired:Ee,ariaValueTextFormatterForHandle:Oe,styles:s||{},classNames:a||{}}},[Le,Ie,z,u,f,We,V,sn,ke,he,te,le,fe,Ee,Oe,s,a]);return h.createElement(ki.Provider,{value:rt},h.createElement("div",{ref:Be,className:ee(r,o,F(F(F(F({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),W),"".concat(r,"-horizontal"),!W),"".concat(r,"-with-marks"),Pe.length)),style:i,onMouseDown:at,id:l},h.createElement("div",{className:ee("".concat(r,"-rail"),a==null?void 0:a.rail),style:q(q({},G),s==null?void 0:s.rail)}),oe!==!1&&h.createElement(ZF,{prefixCls:r,style:Y,values:Ye,startPoint:U,onStartMove:It?Bt:void 0}),h.createElement(QF,{prefixCls:r,marks:Pe,dots:de,style:J,activeStyle:se}),h.createElement(gw,{ref:xe,prefixCls:r,style:H,values:et,draggingIndex:Ue,draggingDelete:Nt,onStartMove:Bt,onOffsetChange:Gt,onFocus:m,onBlur:v,handleRender:ye,activeHandleRender:ce,onChangeComplete:it,onDelete:$e?pt:void 0}),h.createElement(YF,{prefixCls:r,marks:Pe,onClick:ot})))});process.env.NODE_ENV!=="production"&&(vw.displayName="Slider");const bw=$.createContext({}),fh=h.forwardRef((t,e)=>{const{open:n,draggingDelete:r}=t,o=$.useRef(null),i=n&&!r,a=$.useRef(null);function s(){Dt.cancel(a.current),a.current=null}function l(){a.current=Dt(()=>{var c;(c=o.current)===null||c===void 0||c.forceAlign(),a.current=null})}return h.useEffect(()=>(i?l():s(),s),[i,t.title]),h.createElement(Ko,Object.assign({ref:ir(o,e)},t,{open:i}))});process.env.NODE_ENV!=="production"&&(fh.displayName="SliderTooltip");const oH=t=>{const{componentCls:e,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:p,handleLineWidth:m,handleLineWidthHover:v,motionDurationMid:g}=t;return{[e]:Object.assign(Object.assign({},Hn(t)),{position:"relative",height:r,margin:`${re(a)} ${re(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${re(i)} ${re(a)}`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.railBg,borderRadius:t.borderRadiusXS,transition:`background-color ${g}`},[`${e}-track,${e}-tracks`]:{position:"absolute",transition:`background-color ${g}`},[`${e}-track`]:{backgroundColor:t.trackBg,borderRadius:t.borderRadiusXS},[`${e}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${e}-rail`]:{backgroundColor:t.railHoverBg},[`${e}-track`]:{backgroundColor:t.trackHoverBg},[`${e}-dot`]:{borderColor:s},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${re(m)} ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.dotActiveBorderColor}},[`${e}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(m).mul(-1).equal(),insetBlockStart:c(m).mul(-1).equal(),width:c(u).add(c(m).mul(2)).equal(),height:c(u).add(c(m).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${re(m)} ${t.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
|
|
420
|
-
inset-inline-start ${g},
|
|
421
|
-
inset-block-start ${g},
|
|
422
|
-
width ${g},
|
|
423
|
-
height ${g},
|
|
424
|
-
box-shadow ${g},
|
|
425
|
-
outline ${g}
|
|
426
|
-
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),width:c(d).add(c(v).mul(2)).equal(),height:c(d).add(c(v).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${re(v)} ${f}`,outline:`6px solid ${p}`,width:d,height:d,insetInlineStart:t.calc(u).sub(d).div(2).equal(),insetBlockStart:t.calc(u).sub(d).div(2).equal()}}},[`&-lock ${e}-handle`]:{"&::before, &::after":{transition:"none"}},[`${e}-mark`]:{position:"absolute",fontSize:t.fontSize},[`${e}-mark-text`]:{position:"absolute",display:"inline-block",color:t.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:t.colorText}},[`${e}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${e}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:t.colorBgElevated,border:`${re(m)} solid ${t.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:t.dotActiveBorderColor}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-rail`]:{backgroundColor:`${t.railBg} !important`},[`${e}-track`]:{backgroundColor:`${t.trackBgDisabled} !important`},[`
|
|
427
|
-
${e}-dot
|
|
428
|
-
`]:{backgroundColor:t.colorBgElevated,borderColor:t.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${e}-handle::after`]:{backgroundColor:t.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${re(m)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`
|
|
429
|
-
${e}-mark-text,
|
|
430
|
-
${e}-dot
|
|
431
|
-
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},yw=(t,e)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:s}=t,l=e?"paddingBlock":"paddingInline",c=e?"width":"height",u=e?"height":"width",d=e?"insetBlockStart":"insetInlineStart",f=e?"top":"insetInlineStart",p=s(r).mul(3).sub(o).div(2).equal(),m=s(o).sub(r).div(2).equal(),v=e?{borderWidth:`${re(m)} 0`,transform:`translateY(${re(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${re(m)}`,transform:`translateX(${re(t.calc(m).mul(-1).equal())})`};return{[l]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},v),[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(e?0:a).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[d]:s(r).sub(i).div(2).equal()}}},iH=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:Object.assign(Object.assign({},yw(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},aH=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:Object.assign(Object.assign({},yw(t,!1)),{height:"100%"})}},sH=t=>{const n=t.controlHeightLG/4,r=t.controlHeightSM/2,o=t.lineWidth+1,i=t.lineWidth+1*1.5,a=t.colorPrimary,s=new Vt(a).setA(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:t.colorFillTertiary,railHoverBg:t.colorFillSecondary,trackBg:t.colorPrimaryBorder,trackHoverBg:t.colorPrimaryBorderHover,handleColor:t.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:s,handleColorDisabled:new Vt(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString(),dotBorderColor:t.colorBorderSecondary,dotActiveBorderColor:t.colorPrimaryBorder,trackBgDisabled:t.colorBgContainerDisabled}},lH=hn("Slider",t=>{const e=Lt(t,{marginPart:t.calc(t.controlHeight).sub(t.controlSize).div(2).equal(),marginFull:t.calc(t.controlSize).div(2).equal(),marginPartWithMark:t.calc(t.controlHeightLG).sub(t.controlSize).equal()});return[oH(e),iH(e),aH(e)]},sH);function wd(){const[t,e]=h.useState(!1),n=h.useRef(null),r=()=>{Dt.cancel(n.current)},o=i=>{r(),i?e(i):n.current=Dt(()=>{e(i)})};return h.useEffect(()=>r,[]),[t,o]}var cH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function uH(t,e){return t||t===null?t:e||e===null?e:n=>typeof n=="number"?n.toString():""}const Cw=$.forwardRef((t,e)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:a,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:f,tooltip:p={},onChangeComplete:m,classNames:v,styles:g}=t,y=cH(t,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:b}=t,{getPrefixCls:C,direction:x,className:S,style:w,classNames:E,styles:N,getPopupContainer:O}=br("slider"),M=$.useContext(zr),I=s??M,{handleRender:D,direction:k}=$.useContext(bw),j=(k||x)==="rtl",[A,T]=wd(),[_,W]=wd(),L=Object.assign({},p),{open:V,placement:U,getPopupContainer:Y,prefixCls:H,formatter:G}=L,J=V??u,se=(A||_)&&J!==!1,X=uH(G,c),[de,ye]=wd(),ce=he=>{m==null||m(he),ye(!1)},oe=(he,$e)=>he||($e?j?"left":"right":"top"),me=C("slider",n),[te,le,fe]=lH(me),Ee=ee(o,S,E.root,v==null?void 0:v.root,i,{[`${me}-rtl`]:j,[`${me}-lock`]:de},le,fe);if(j&&!y.vertical&&(y.reverse=!y.reverse),process.env.NODE_ENV!=="production"){const he=on("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach($e=>{let[Me,we]=$e;he.deprecated(!(Me in t),Me,`tooltip.${we}`)})}$.useEffect(()=>{const he=()=>{Dt(()=>{W(!1)},1)};return document.addEventListener("mouseup",he),()=>{document.removeEventListener("mouseup",he)}},[]);const Oe=r&&!J,xe=D||((he,$e)=>{const{index:Me}=$e,we=he.props;function ze(Ke,Pe,je){var _e,Fe,Ze,ht;je&&((Fe=(_e=y)[Ke])===null||Fe===void 0||Fe.call(_e,Pe)),(ht=(Ze=we)[Ke])===null||ht===void 0||ht.call(Ze,Pe)}const Le=Object.assign(Object.assign({},we),{onMouseEnter:Ke=>{T(!0),ze("onMouseEnter",Ke)},onMouseLeave:Ke=>{T(!1),ze("onMouseLeave",Ke)},onMouseDown:Ke=>{W(!0),ye(!0),ze("onMouseDown",Ke)},onFocus:Ke=>{var Pe;W(!0),(Pe=y.onFocus)===null||Pe===void 0||Pe.call(y,Ke),ze("onFocus",Ke,!0)},onBlur:Ke=>{var Pe;W(!1),(Pe=y.onBlur)===null||Pe===void 0||Pe.call(y,Ke),ze("onBlur",Ke,!0)}}),Ie=$.cloneElement(he,Le),We=(!!J||se)&&X!==null;return Oe?Ie:$.createElement(fh,Object.assign({},L,{prefixCls:C("tooltip",H??l),title:X?X($e.value):"",open:We,placement:oe(U??f,b),key:Me,classNames:{root:`${me}-tooltip`},getPopupContainer:Y||d||O}),Ie)}),Be=Oe?(he,$e)=>{const Me=$.cloneElement(he,{style:Object.assign(Object.assign({},he.props.style),{visibility:"hidden"})});return $.createElement(fh,Object.assign({},L,{prefixCls:C("tooltip",H??l),title:X?X($e.value):"",open:X!==null&&se,placement:oe(U??f,b),key:"tooltip",classNames:{root:`${me}-tooltip`},getPopupContainer:Y||d||O,draggingDelete:$e.draggingDelete}),Me)}:void 0,z=Object.assign(Object.assign(Object.assign(Object.assign({},N.root),w),g==null?void 0:g.root),a),ve=Object.assign(Object.assign({},N.tracks),g==null?void 0:g.tracks),ae=ee(E.tracks,v==null?void 0:v.tracks);return te($.createElement(vw,Object.assign({},y,{classNames:Object.assign({handle:ee(E.handle,v==null?void 0:v.handle),rail:ee(E.rail,v==null?void 0:v.rail),track:ee(E.track,v==null?void 0:v.track)},ae?{tracks:ae}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},N.handle),g==null?void 0:g.handle),rail:Object.assign(Object.assign({},N.rail),g==null?void 0:g.rail),track:Object.assign(Object.assign({},N.track),g==null?void 0:g.track)},Object.keys(ve).length?{tracks:ve}:{}),step:y.step,range:r,className:Ee,style:z,disabled:I,ref:e,prefixCls:me,handleRender:xe,activeHandleRender:Be,onChangeComplete:ce})))});process.env.NODE_ENV!=="production"&&(Cw.displayName="Slider");var dH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Sw=t=>{const{prefixCls:e,colors:n,type:r,color:o,range:i=!1,className:a,activeIndex:s,onActive:l,onDragStart:c,onDragChange:u,onKeyDelete:d}=t,f=dH(t,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),p=Object.assign(Object.assign({},f),{track:!1}),m=h.useMemo(()=>`linear-gradient(90deg, ${n.map(w=>`${w.color} ${w.percent}%`).join(", ")})`,[n]),v=h.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),g=Wt(c),y=Wt(u),b=h.useMemo(()=>({onDragStart:g,onDragChange:y}),[]),C=Wt((S,w)=>{const{onFocus:E,style:N,className:O,onKeyDown:M}=S.props,I=Object.assign({},N);return r==="gradient"&&(I.background=ax(n,w.value)),h.cloneElement(S,{onFocus:D=>{l==null||l(w.index),E==null||E(D)},style:I,className:ee(O,{[`${e}-slider-handle-active`]:s===w.index}),onKeyDown:D=>{(D.key==="Delete"||D.key==="Backspace")&&d&&d(w.index),M==null||M(D)}})}),x=h.useMemo(()=>({direction:"ltr",handleRender:C}),[]);return h.createElement(bw.Provider,{value:x},h.createElement(mw.Provider,{value:b},h.createElement(Cw,Object.assign({},p,{className:ee(a,`${e}-slider`),tooltip:{open:!1},range:{editable:i,minCount:2},styles:{rail:{background:m},handle:v?{background:v}:{}},classNames:{rail:`${e}-slider-rail`,handle:`${e}-slider-handle`}}))))},fH=t=>{const{value:e,onChange:n,onChangeComplete:r}=t,o=a=>n(a[0]),i=a=>r(a[0]);return h.createElement(Sw,Object.assign({},t,{value:[e],onChange:o,onChangeComplete:i}))};function Lb(t){return Re(t).sort((e,n)=>e.percent-n.percent)}const hH=t=>{const{prefixCls:e,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:a,onGradientDragging:s,colors:l}=t,c=n==="gradient",u=h.useMemo(()=>l.map(y=>({percent:y.percent,color:y.color.toRgbString()})),[l]),d=h.useMemo(()=>u.map(y=>y.percent),[u]),f=h.useRef(u),p=y=>{let{rawValues:b,draggingIndex:C,draggingValue:x}=y;if(b.length>u.length){const S=ax(u,x),w=Re(u);w.splice(C,0,{percent:x,color:S}),f.current=w}else f.current=u;s(!0),r(new hr(Lb(f.current)),!0)},m=y=>{let{deleteIndex:b,draggingIndex:C,draggingValue:x}=y,S=Re(f.current);b!==-1?S.splice(b,1):(S[C]=Object.assign(Object.assign({},S[C]),{percent:x}),S=Lb(S)),r(new hr(S),!0)},v=y=>{const b=Re(u);b.splice(y,1);const C=new hr(b);r(C),o(C)},g=y=>{o(new hr(u)),a>=y.length&&i(y.length-1),s(!1)};return c?h.createElement(Sw,{min:0,max:100,prefixCls:e,className:`${e}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:g,disabled:!1,type:"gradient",activeIndex:a,onActive:i,onDragStart:p,onDragChange:m,onKeyDelete:v}):null},pH=h.memo(hH);var mH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const gH={slider:fH},Fb=()=>{const t=$.useContext(nw),{mode:e,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:a,disabledAlpha:s,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:f}=t,p=mH(t,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=$.useMemo(()=>a.cleared?[{percent:0,color:new hr("")},{percent:100,color:new hr("")}]:a.getColors(),[a]),v=!a.isGradient(),[g,y]=$.useState(a);Jt(()=>{var P;v||y((P=m[d])===null||P===void 0?void 0:P.color)},[f,d]);const b=$.useMemo(()=>{var P;return v?a:f?g:(P=m[d])===null||P===void 0?void 0:P.color},[a,d,v,g,f]),[C,x]=$.useState(b),[S,w]=$.useState(0),E=C!=null&&C.equals(b)?b:C;Jt(()=>{x(b)},[S,b==null?void 0:b.toHexString()]);const N=(P,j)=>{let A=Xn(P);if(a.cleared){const _=A.toRgb();if(!_.r&&!_.g&&!_.b&&j){const{type:W,value:L=0}=j;A=new hr({h:W==="hue"?L:0,s:1,b:1,a:W==="alpha"?L/100:1})}else A=Bl(A)}if(e==="single")return A;const T=Re(m);return T[d]=Object.assign(Object.assign({},T[d]),{color:A}),new hr(T)},O=(P,j,A)=>{const T=N(P,A);x(T.isGradient()?T.getColors()[d].color:T),l(T,j)},M=(P,j)=>{u(N(P,j)),w(A=>A+1)},I=P=>{l(N(P))};let D=null;const k=r.length>1;return(i||k)&&(D=$.createElement("div",{className:`${o}-operation`},k&&$.createElement(tw,{size:"small",options:r,value:e,onChange:n}),$.createElement(ow,Object.assign({prefixCls:o,value:a,onChange:P=>{l(P),c==null||c()}},p)))),$.createElement($.Fragment,null,D,$.createElement(pH,Object.assign({},t,{colors:m})),$.createElement(tx,{prefixCls:o,value:E==null?void 0:E.toHsb(),disabledAlpha:s,onChange:(P,j)=>{O(P,!0,j)},onChangeComplete:(P,j)=>{M(P,j)},components:gH}),$.createElement(KF,Object.assign({value:b,onChange:I,prefixCls:o,disabledAlpha:s},p)))},Hb=()=>{const{prefixCls:t,value:e,presets:n,onChange:r}=$.useContext(rw);return Array.isArray(n)?$.createElement(mk,{value:e,presets:n,prefixCls:t,onChange:r}):null},xw=t=>{const{prefixCls:e,presets:n,panelRender:r,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:p,onActive:m,format:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}=t,x=`${e}-inner`,S=$.useMemo(()=>({prefixCls:e,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:p,onActive:m,format:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}),[e,o,i,a,s,l,c,u,d,f,p,m,v,g,y,b,C]),w=$.useMemo(()=>({prefixCls:e,value:o,presets:n,onChange:i}),[e,o,n,i]),E=$.createElement("div",{className:`${x}-content`},$.createElement(Fb,null),Array.isArray(n)&&$.createElement(Z1,null),$.createElement(Hb,null));return $.createElement(nw.Provider,{value:S},$.createElement(rw.Provider,{value:w},$.createElement("div",{className:x},typeof r=="function"?r(E,{components:{Picker:Fb,Presets:Hb}}):E)))};process.env.NODE_ENV!=="production"&&(xw.displayName="ColorPickerPanel");var vH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const bH=$.forwardRef((t,e)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:s,showText:l,activeIndex:c}=t,u=vH(t,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),d=`${r}-trigger`,f=`${d}-text`,p=`${f}-cell`,[m]=So("ColorPicker"),v=$.useMemo(()=>{if(!l)return"";if(typeof l=="function")return l(n);if(n.cleared)return m.transparent;if(n.isGradient())return n.getColors().map((C,x)=>{const S=c!==-1&&c!==x;return $.createElement("span",{key:x,className:ee(p,S&&`${p}-inactive`)},C.color.toRgbString()," ",C.percent,"%")});const y=n.toHexString().toUpperCase(),b=pp(n);switch(a){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return b<100?`${y.slice(0,7)},${b}%`:y}},[n,a,l,c]),g=$.useMemo(()=>n.cleared?$.createElement(ow,{prefixCls:r}):$.createElement(lp,{prefixCls:r,color:n.toCssString()}),[n,r]);return $.createElement("div",Object.assign({ref:e,className:ee(d,s,{[`${d}-active`]:o,[`${d}-disabled`]:i})},Zr(u)),g,l&&$.createElement("div",{className:f},v))});function yH(t,e,n){const[r]=So("ColorPicker"),[o,i]=mn(t,{value:e}),[a,s]=h.useState("single"),[l,c]=h.useMemo(()=>{const v=(Array.isArray(n)?n:[n]).filter(C=>C);v.length||v.push("single");const g=new Set(v),y=[],b=(C,x)=>{g.has(C)&&y.push({label:x,value:C})};return b("single",r.singleColor),b("gradient",r.gradientColor),[y,g]},[n]),[u,d]=h.useState(null),f=Wt(v=>{d(v),i(v)}),p=h.useMemo(()=>{const v=Xn(o||"");return v.equals(u)?u:v},[o,u]),m=h.useMemo(()=>{var v;return c.has(a)?a:(v=l[0])===null||v===void 0?void 0:v.value},[c,a,l]);return h.useEffect(()=>{s(p.isGradient()?"gradient":"single")},[p]),[p,f,m,s,l]}const ww=(t,e)=>({backgroundImage:`conic-gradient(${e} 25%, transparent 25% 50%, ${e} 50% 75%, transparent 75% 100%)`,backgroundSize:`${t} ${t}`}),Vb=(t,e)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=t;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:r,width:e,height:e,boxShadow:o,flex:"none"},ww("50%",t.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${re(i)} ${a}`,borderRadius:"inherit"}})}},CH=t=>{const{componentCls:e,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:s,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:d,colorTextPlaceholder:f,colorPickerInputNumberHandleWidth:p,lineWidth:m}=t;return{[`${e}-input-container`]:{display:"flex",[`${e}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,[`${n}-input-number-input`]:{paddingInlineStart:s,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:p}},[`${e}-steppers${e}-alpha-input`]:{flex:`0 0 ${re(i)}`,marginInlineStart:a},[`${e}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:t.calc(u).add(a).equal(),fontSize:r,lineHeight:re(l)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${e}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${e}-hsb-input,${e}-rgb-input`]:{display:"flex",gap:a,alignItems:"center"},[`${e}-steppers`]:{flex:1},[`${e}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${re(d)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:re(t.calc(l).sub(t.calc(m).mul(2)).equal())},[`${n}-input-prefix`]:{color:f}}}}}},SH=t=>{const{componentCls:e,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:s,lineWidthBold:l,colorPickerHandlerSize:c}=t;return{userSelect:"none",[`${e}-select`]:{[`${e}-palette`]:{minHeight:t.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${e}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${e}-handler`]:{width:c,height:c,border:`${re(l)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${s}`}}},xH=t=>{const{componentCls:e,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:s,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:d,colorWhite:f,marginXXS:p,paddingXS:m,fontHeightSM:v}=t;return{[`${e}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:v,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:p},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${re(m)} 0`},"&-label":{fontSize:a,color:s,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:t.calc(p).mul(1.5).equal(),[`${e}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:t.calc(i).add(t.calc(c).mul(4)).equal(),height:t.calc(i).add(t.calc(c).mul(4)).equal(),position:"absolute",top:t.calc(c).mul(-2).equal(),insetInlineStart:t.calc(c).mul(-2).equal(),borderRadius:u,border:`${re(c)} solid transparent`,transition:`border-color ${t.motionDurationMid} ${t.motionEaseInBack}`},"&:hover::before":{borderColor:d},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.calc(i).div(13).mul(5).equal(),height:t.calc(i).div(13).mul(8).equal(),border:`${re(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`},[`&${e}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:f,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`},[`&${e}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:r}}}},wH=t=>{const{componentCls:e,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:s,marginSM:l,marginXS:c}=t,u=t.calc(a).sub(t.calc(i).mul(2).equal()).equal(),d=t.calc(a).add(t.calc(i).mul(2).equal()).equal(),f={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${t.colorPrimaryActive}`}};return{[`${e}-slider`]:[ww(re(s),t.colorFillSecondary),{margin:0,padding:0,height:s,borderRadius:t.calc(s).div(2).equal(),"&-rail":{height:s,borderRadius:t.calc(s).div(2).equal(),boxShadow:n},[`& ${e}-slider-handle`]:{width:u,height:u,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:d,height:d,borderRadius:"100%"},"&:after":{width:a,height:a,border:`${re(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":f}}],[`${e}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${e}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${e}-gradient-slider`]:{marginBottom:c,[`& ${e}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":f}}}},hh=(t,e,n)=>({borderInlineEndWidth:t.lineWidth,borderColor:e,boxShadow:`0 0 0 ${re(t.controlOutlineWidth)} ${n}`,outline:0}),EH=t=>{const{componentCls:e}=t;return{"&-rtl":{[`${e}-presets-color`]:{"&::after":{direction:"ltr"}},[`${e}-clear`]:{"&::after":{direction:"ltr"}}}}},Wb=(t,e,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:s,red6:l}=t;return{[`${r}-clear`]:Object.assign(Object.assign({width:e,height:e,borderRadius:o,border:`${re(i)} solid ${a}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${t.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:s}})}},$H=t=>{const{componentCls:e,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:s}=t;return{[`&${e}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${e}-trigger-active`]:Object.assign({},hh(t,n,a))},[`&${e}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${e}-trigger-active`]:Object.assign({},hh(t,r,s))}}},OH=t=>{const{componentCls:e,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:a,borderRadiusSM:s,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=t;return{[`&${e}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${e}-color-block, ${e}-clear`]:{width:o,height:o,borderRadius:a},[`${e}-trigger-text`]:{fontSize:u}},[`&${e}-sm`]:{minWidth:r,minHeight:r,borderRadius:s,[`${e}-color-block, ${e}-clear`]:{width:i,height:i,borderRadius:l},[`${e}-trigger-text`]:{lineHeight:re(i)}}}},NH=t=>{const{antCls:e,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:s,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:d,marginSM:f,controlHeight:p,controlHeightSM:m,colorBgTextActive:v,colorPickerPresetColorSize:g,colorPickerPreviewSize:y,lineWidth:b,colorBorder:C,paddingXXS:x,fontSize:S,colorPrimaryHover:w,controlOutline:E}=t;return[{[n]:Object.assign({[`${n}-inner`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${e}-divider`]:{margin:`${re(f)} 0 ${re(d)}`}},[`${n}-panel`]:Object.assign({},SH(t))},wH(t)),Vb(t,y)),CH(t)),xH(t)),Wb(t,g,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:d}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:p,minHeight:p,borderRadius:u,border:`${re(b)} solid ${C}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:t.calc(x).sub(b).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:t.calc(d).sub(t.calc(x).sub(b)).equal(),fontSize:S,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:s}}},"&:hover":{borderColor:w},[`&${n}-trigger-active`]:Object.assign({},hh(t,o,E)),"&-disabled":{color:s,background:c,cursor:"not-allowed","&:hover":{borderColor:v},[`${n}-trigger-text`]:{color:s}}},Wb(t,m)),Vb(t,m)),$H(t)),OH(t))},EH(t))},ks(t,{focusElCls:`${n}-trigger-active`})]},MH=hn("ColorPicker",t=>{const{colorTextQuaternary:e,marginSM:n}=t,r=8,o=Lt(t,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${e}`,colorPickerSliderHeight:r,colorPickerPreviewSize:t.calc(r).mul(2).add(n).equal()});return[NH(o)]});var IH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const pu=t=>{const{mode:e,value:n,defaultValue:r,format:o,defaultFormat:i,allowClear:a=!1,presets:s,children:l,trigger:c="click",open:u,disabled:d,placement:f="bottomLeft",arrow:p=!0,panelRender:m,showText:v,style:g,className:y,size:b,rootClassName:C,prefixCls:x,styles:S,disabledAlpha:w=!1,onFormatChange:E,onChange:N,onClear:O,onOpenChange:M,onChangeComplete:I,getPopupContainer:D,autoAdjustOverflow:k=!0,destroyTooltipOnHide:P,disabledFormat:j}=t,A=IH(t,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide","disabledFormat"]),{getPrefixCls:T,direction:_,colorPicker:W}=$.useContext(At),L=$.useContext(zr),V=d??L,[U,Y]=mn(!1,{value:u,postState:Fe=>!V&&Fe,onChange:M}),[H,G]=mn(o,{value:o,defaultValue:i,onChange:E}),J=T("color-picker",x),[se,X,de,ye,ce]=yH(r,n,e),oe=$.useMemo(()=>pp(se)<100,[se]),[me,te]=$.useState(null),le=Fe=>{if(I){let Ze=Xn(Fe);w&&oe&&(Ze=Bl(Fe)),I(Ze)}},fe=(Fe,Ze)=>{let ht=Xn(Fe);w&&oe&&(ht=Bl(ht)),X(ht),te(null),N&&N(ht,ht.toCssString()),Ze||le(ht)},[Ee,Oe]=$.useState(0),[xe,Be]=$.useState(!1),z=Fe=>{if(ye(Fe),Fe==="single"&&se.isGradient())Oe(0),fe(new hr(se.getColors()[0].color)),te(se);else if(Fe==="gradient"&&!se.isGradient()){const Ze=oe?Bl(se):se;fe(new hr(me||[{percent:0,color:Ze},{percent:100,color:Ze}]))}},{status:ve}=$.useContext(Nr),{compactSize:ae,compactItemClassnames:he}=Zo(J,_),$e=Fr(Fe=>{var Ze;return(Ze=b??ae)!==null&&Ze!==void 0?Ze:Fe}),Me=xo(J),[we,ze,Le]=MH(J,Me),Ie={[`${J}-rtl`]:_},We=ee(C,Le,Me,Ie),Ke=ee(Ni(J,ve),{[`${J}-sm`]:$e==="small",[`${J}-lg`]:$e==="large"},he,W==null?void 0:W.className,We,y,ze),Pe=ee(J,We);if(process.env.NODE_ENV!=="production"){const Fe=on("ColorPicker");process.env.NODE_ENV!=="production"&&Fe(!(w&&oe),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.")}const je={open:U,trigger:c,placement:f,arrow:p,rootClassName:C,getPopupContainer:D,autoAdjustOverflow:k,destroyTooltipOnHide:P},_e=Object.assign(Object.assign({},W==null?void 0:W.style),g);return we($.createElement(Ap,Object.assign({style:S==null?void 0:S.popup,styles:{body:S==null?void 0:S.popupOverlayInner},onOpenChange:Fe=>{(!Fe||!V)&&Y(Fe)},content:$.createElement(qo,{form:!0},$.createElement(xw,{mode:de,onModeChange:z,modeOptions:ce,prefixCls:J,value:se,allowClear:a,disabled:V,disabledAlpha:w,presets:s,panelRender:m,format:H,onFormatChange:G,onChange:fe,onChangeComplete:le,onClear:O,activeIndex:Ee,onActive:Oe,gradientDragging:xe,onGradientDragging:Be,disabledFormat:j})),classNames:{root:Pe}},je),l||$.createElement(bH,Object.assign({activeIndex:U?Ee:-1,open:U,className:Ke,style:_e,prefixCls:J,disabled:V,showText:v,format:H},A,{color:se}))))};process.env.NODE_ENV!=="production"&&(pu.displayName="ColorPicker");const RH=yp(pu,void 0,t=>Object.assign(Object.assign({},t),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",t=>t);pu._InternalPanelDoNotUseOrYouWillBeFired=RH;function qb(t){return["small","middle","large"].includes(t)}function Kb(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const Ew=$.createContext({latestIndex:0}),TH=Ew.Provider,PH=t=>{let{className:e,index:n,children:r,split:o,style:i}=t;const{latestIndex:a}=h.useContext(Ew);return r==null?null:h.createElement(h.Fragment,null,h.createElement("div",{className:e,style:i},r),n<a&&o&&h.createElement("span",{className:`${e}-split`},o))};var AH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const DH=h.forwardRef((t,e)=>{var n;const{getPrefixCls:r,direction:o,size:i,className:a,style:s,classNames:l,styles:c}=br("space"),{size:u=i??"small",align:d,className:f,rootClassName:p,children:m,direction:v="horizontal",prefixCls:g,split:y,style:b,wrap:C=!1,classNames:x,styles:S}=t,w=AH(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,N]=Array.isArray(u)?u:[u,u],O=qb(N),M=qb(E),I=Kb(N),D=Kb(E),k=gr(m,{keepEmpty:!0}),P=d===void 0&&v==="horizontal"?"center":d,j=r("space",g),[A,T,_]=qS(j),W=ee(j,a,T,`${j}-${v}`,{[`${j}-rtl`]:o==="rtl",[`${j}-align-${P}`]:P,[`${j}-gap-row-${N}`]:O,[`${j}-gap-col-${E}`]:M},f,p,_),L=ee(`${j}-item`,(n=x==null?void 0:x.item)!==null&&n!==void 0?n:l.item);let V=0;const U=k.map((G,J)=>{var se;G!=null&&(V=J);const X=(G==null?void 0:G.key)||`${L}-${J}`;return h.createElement(PH,{className:L,key:X,index:J,split:y,style:(se=S==null?void 0:S.item)!==null&&se!==void 0?se:c.item},G)}),Y=h.useMemo(()=>({latestIndex:V}),[V]);if(k.length===0)return null;const H={};return C&&(H.flexWrap="wrap"),!M&&D&&(H.columnGap=E),!O&&I&&(H.rowGap=N),A(h.createElement("div",Object.assign({ref:e,className:W,style:Object.assign(Object.assign(Object.assign({},H),s),b)},w),h.createElement(TH,{value:Y},U)))}),Xp=DH;Xp.Compact=nD;process.env.NODE_ENV!=="production"&&(Xp.displayName="Space");var kH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const $w=t=>{const{getPopupContainer:e,getPrefixCls:n,direction:r}=h.useContext(At),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:v,overlay:g,trigger:y,align:b,open:C,onOpenChange:x,placement:S,getPopupContainer:w,href:E,icon:N=h.createElement(Fp,null),title:O,buttonsRender:M=X=>X,mouseEnterDelay:I,mouseLeaveDelay:D,overlayClassName:k,overlayStyle:P,destroyPopupOnHide:j,dropdownRender:A}=t,T=kH(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),_=n("dropdown",o),W=`${_}-button`,L={menu:p,arrow:m,autoFocus:v,align:b,disabled:s,trigger:s?[]:y,onOpenChange:x,getPopupContainer:w||e,mouseEnterDelay:I,mouseLeaveDelay:D,overlayClassName:k,overlayStyle:P,destroyPopupOnHide:j,dropdownRender:A},{compactSize:V,compactItemClassnames:U}=Zo(_,r),Y=ee(W,U,f);"overlay"in t&&(L.overlay=g),"open"in t&&(L.open=C),"placement"in t?L.placement=S:L.placement=r==="rtl"?"bottomLeft":"bottomRight";const H=h.createElement(vo,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:E,title:O},d),G=h.createElement(vo,{type:i,danger:a,icon:N}),[J,se]=M([H,G]);return h.createElement(Xp.Compact,Object.assign({className:Y,size:V,block:!0},T),J,h.createElement(Ws,Object.assign({},L),se))};$w.__ANT_BUTTON=!0;const mu=Ws;mu.Button=$w;var _H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},BH=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:_H}))},Ow=h.forwardRef(BH);process.env.NODE_ENV!=="production"&&(Ow.displayName="EyeOutlined");const zH=t=>{const{getPrefixCls:e,direction:n}=$.useContext(At),{prefixCls:r,className:o}=t,i=e("input-group",r),a=e("input"),[s,l,c]=Q1(a),u=ee(i,c,{[`${i}-lg`]:t.size==="large",[`${i}-sm`]:t.size==="small",[`${i}-compact`]:t.compact,[`${i}-rtl`]:n==="rtl"},l,o),d=$.useContext(Nr),f=$.useMemo(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return process.env.NODE_ENV!=="production"&&on("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),s(h.createElement("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},h.createElement(Nr.Provider,{value:f},t.children)))},jH=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},LH=hn(["Input","OTP"],t=>{const e=Lt(t,qs(t));return[jH(e)]},Ks);var FH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const HH=h.forwardRef((t,e)=>{const{value:n,onChange:r,onActiveChange:o,index:i,mask:a}=t,s=FH(t,["value","onChange","onActiveChange","index","mask"]),l=n&&typeof a=="string"?a:n,c=m=>{r(i,m.target.value)},u=h.useRef(null);h.useImperativeHandle(e,()=>u.current);const d=()=>{Dt(()=>{var m;const v=(m=u.current)===null||m===void 0?void 0:m.input;document.activeElement===v&&v&&v.select()})},f=m=>{const{key:v,ctrlKey:g,metaKey:y}=m;v==="ArrowLeft"?o(i-1):v==="ArrowRight"?o(i+1):v==="z"&&(g||y)&&m.preventDefault(),d()},p=m=>{m.key==="Backspace"&&!n&&o(i-1),d()};return h.createElement(Na,Object.assign({type:a===!0?"password":"text"},s,{ref:u,value:l,onInput:c,onFocus:d,onKeyDown:f,onKeyUp:p,onMouseDown:d,onMouseUp:d}))});var VH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function gl(t){return(t||"").split("")}const WH=t=>{const{index:e,prefixCls:n,separator:r}=t,o=typeof r=="function"?r(e):r;return o?h.createElement("span",{className:`${n}-separator`},o):null},qH=h.forwardRef((t,e)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:v,onInput:g,inputMode:y}=t,b=VH(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const H=on("Input.OTP");process.env.NODE_ENV!=="production"&&H(!(typeof m=="string"&&m.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:C,direction:x}=h.useContext(At),S=C("otp",n),w=Zr(b,{aria:!0,data:!0,attr:!0}),[E,N,O]=LH(S),M=Fr(H=>o??H),I=h.useContext(Nr),D=Fs(I.status,f),k=h.useMemo(()=>Object.assign(Object.assign({},I),{status:D,hasFeedback:!1,feedbackIcon:null}),[I,D]),P=h.useRef(null),j=h.useRef({});h.useImperativeHandle(e,()=>({focus:()=>{var H;(H=j.current[0])===null||H===void 0||H.focus()},blur:()=>{var H;for(let G=0;G<r;G+=1)(H=j.current[G])===null||H===void 0||H.blur()},nativeElement:P.current}));const A=H=>l?l(H):H,[T,_]=h.useState(()=>gl(A(i||"")));h.useEffect(()=>{a!==void 0&&_(gl(a))},[a]);const W=Wt(H=>{_(H),g&&g(H),s&&H.length===r&&H.every(G=>G)&&H.some((G,J)=>T[J]!==G)&&s(H.join(""))}),L=Wt((H,G)=>{let J=Re(T);for(let X=0;X<H;X+=1)J[X]||(J[X]="");G.length<=1?J[H]=G:J=J.slice(0,H).concat(gl(G)),J=J.slice(0,r);for(let X=J.length-1;X>=0&&!J[X];X-=1)J.pop();const se=A(J.map(X=>X||" ").join(""));return J=gl(se).map((X,de)=>X===" "&&!J[de]?J[de]:X),J}),V=(H,G)=>{var J;const se=L(H,G),X=Math.min(H+G.length,r-1);X!==H&&se[H]!==void 0&&((J=j.current[X])===null||J===void 0||J.focus()),W(se)},U=H=>{var G;(G=j.current[H])===null||G===void 0||G.focus()},Y={variant:u,disabled:d,status:D,mask:m,type:v,inputMode:y};return E(h.createElement("div",Object.assign({},w,{ref:P,className:ee(S,{[`${S}-sm`]:M==="small",[`${S}-lg`]:M==="large",[`${S}-rtl`]:x==="rtl"},O,N)}),h.createElement(Nr.Provider,{value:k},Array.from({length:r}).map((H,G)=>{const J=`otp-${G}`,se=T[G]||"";return h.createElement(h.Fragment,{key:J},h.createElement(HH,Object.assign({ref:X=>{j.current[G]=X},index:G,size:M,htmlSize:1,className:`${S}-input`,onChange:V,value:se,onActiveChange:U,autoFocus:G===0&&p},Y)),G<r-1&&h.createElement(WH,{separator:c,index:G,prefixCls:S}))}))))});var KH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},UH=function(e,n){return h.createElement(An,De({},e,{ref:n,icon:KH}))},Nw=h.forwardRef(UH);process.env.NODE_ENV!=="production"&&(Nw.displayName="EyeInvisibleOutlined");var GH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const XH=t=>t?h.createElement(Ow,null):h.createElement(Nw,null),YH={click:"onClick",hover:"onMouseOver"},Mw=h.forwardRef((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i=XH}=t,a=h.useContext(zr),s=n??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=$.useState(()=>l?o.visible:!1),d=$.useRef(null);h.useEffect(()=>{l&&u(o.visible)},[l,o]);const f=pw(d),p=()=>{var M;if(s)return;c&&f();const I=!c;u(I),typeof o=="object"&&((M=o.onVisibleChange)===null||M===void 0||M.call(o,I))},m=M=>{const I=YH[r]||"",D=i(c),k={[I]:p,className:`${M}-icon`,key:"passwordIcon",onMouseDown:P=>{P.preventDefault()},onMouseUp:P=>{P.preventDefault()}};return h.cloneElement(h.isValidElement(D)?D:h.createElement("span",null,D),k)},{className:v,prefixCls:g,inputPrefixCls:y,size:b}=t,C=GH(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:x}=h.useContext(At),S=x("input",y),w=x("input-password",g),E=o&&m(w),N=ee(w,v,{[`${w}-${b}`]:!!b}),O=Object.assign(Object.assign({},Tn(C,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:N,prefixCls:S,suffix:E});return b&&(O.size=b),h.createElement(Na,Object.assign({ref:ir(e,d)},O))});process.env.NODE_ENV!=="production"&&(Mw.displayName="Input.Password");var JH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Iw=h.forwardRef((t,e)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m}=t,v=JH(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:g,direction:y}=h.useContext(At),b=h.useRef(!1),C=g("input-search",n),x=g("input",r),{compactSize:S}=Zo(C,y),w=Fr(V=>{var U;return(U=i??S)!==null&&U!==void 0?U:V}),E=h.useRef(null),N=V=>{V!=null&&V.target&&V.type==="click"&&d&&d(V.target.value,V,{source:"clear"}),f==null||f(V)},O=V=>{var U;document.activeElement===((U=E.current)===null||U===void 0?void 0:U.input)&&V.preventDefault()},M=V=>{var U,Y;d&&d((Y=(U=E.current)===null||U===void 0?void 0:U.input)===null||Y===void 0?void 0:Y.value,V,{source:"input"})},I=V=>{b.current||c||M(V)},D=typeof s=="boolean"?h.createElement(Ip,null):null,k=`${C}-button`;let P;const j=s||{},A=j.type&&j.type.__ANT_BUTTON===!0;A||j.type==="button"?P=Or(j,Object.assign({onMouseDown:O,onClick:V=>{var U,Y;(Y=(U=j==null?void 0:j.props)===null||U===void 0?void 0:U.onClick)===null||Y===void 0||Y.call(U,V),M(V)},key:"enterButton"},A?{className:k,size:w}:{})):P=h.createElement(vo,{className:k,type:s?"primary":void 0,size:w,disabled:u,key:"enterButton",onMouseDown:O,onClick:M,loading:c,icon:D},s),l&&(P=[P,Or(l,{key:"addonAfter"})]);const T=ee(C,{[`${C}-rtl`]:y==="rtl",[`${C}-${w}`]:!!w,[`${C}-with-button`]:!!s},o),_=Object.assign(Object.assign({},v),{className:T,prefixCls:x,type:"search"}),W=V=>{b.current=!0,p==null||p(V)},L=V=>{b.current=!1,m==null||m(V)};return h.createElement(Na,Object.assign({ref:ir(E,e),onPressEnter:I},_,{size:w,onCompositionStart:W,onCompositionEnd:L,addonAfter:P,suffix:a,onChange:N,disabled:u}))});process.env.NODE_ENV!=="production"&&(Iw.displayName="Search");var QH=`
|
|
432
|
-
min-height:0 !important;
|
|
433
|
-
max-height:none !important;
|
|
434
|
-
height:0 !important;
|
|
435
|
-
visibility:hidden !important;
|
|
436
|
-
overflow:hidden !important;
|
|
437
|
-
position:absolute !important;
|
|
438
|
-
z-index:-1000 !important;
|
|
439
|
-
top:0 !important;
|
|
440
|
-
right:0 !important;
|
|
441
|
-
pointer-events: none !important;
|
|
442
|
-
`,ZH=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Ed={},cr;function eV(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Ed[n])return Ed[n];var r=window.getComputedStyle(t),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=ZH.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return e&&n&&(Ed[n]=l),l}function tV(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;cr||(cr=document.createElement("textarea"),cr.setAttribute("tab-index","-1"),cr.setAttribute("aria-hidden","true"),cr.setAttribute("name","hiddenTextarea"),document.body.appendChild(cr)),t.getAttribute("wrap")?cr.setAttribute("wrap",t.getAttribute("wrap")):cr.removeAttribute("wrap");var o=eV(t,e),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;cr.setAttribute("style","".concat(l,";").concat(QH)),cr.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=cr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=i),n!==null||r!==null){cr.value=" ";var p=cr.scrollHeight-i;n!==null&&(c=p*n,s==="border-box"&&(c=c+i+a),f=Math.max(c,f)),r!==null&&(u=p*r,s==="border-box"&&(u=u+i+a),d=f>u?"":"hidden",f=Math.min(u,f))}var m={height:f,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var nV=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],$d=0,Od=1,Nd=2,rV=h.forwardRef(function(t,e){var n=t,r=n.prefixCls,o=n.defaultValue,i=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange,f=n.onInternalAutoSize,p=xt(n,nV),m=mn(o,{value:i,postState:function(G){return G??""}}),v=ie(m,2),g=v[0],y=v[1],b=function(G){y(G.target.value),d==null||d(G)},C=h.useRef();h.useImperativeHandle(e,function(){return{textArea:C.current}});var x=h.useMemo(function(){return a&&st(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=ie(x,2),w=S[0],E=S[1],N=!!a,O=function(){try{if(document.activeElement===C.current){var G=C.current,J=G.selectionStart,se=G.selectionEnd,X=G.scrollTop;C.current.setSelectionRange(J,se),C.current.scrollTop=X}}catch{}},M=h.useState(Nd),I=ie(M,2),D=I[0],k=I[1],P=h.useState(),j=ie(P,2),A=j[0],T=j[1],_=function(){k($d),process.env.NODE_ENV==="test"&&(f==null||f())};Jt(function(){N&&_()},[i,w,E,N]),Jt(function(){if(D===$d)k(Od);else if(D===Od){var H=tV(C.current,!1,w,E);k(Nd),T(H)}else O()},[D]);var W=h.useRef(),L=function(){Dt.cancel(W.current)},V=function(G){D===Nd&&(s==null||s(G),a&&(L(),W.current=Dt(function(){_()})))};h.useEffect(function(){return L},[]);var U=N?A:null,Y=q(q({},c),U);return(D===$d||D===Od)&&(Y.overflowY="hidden",Y.overflowX="hidden"),h.createElement(Co,{onResize:V,disabled:!(a||s)},h.createElement("textarea",De({},p,{ref:C,style:Y,className:ee(r,l,F({},"".concat(r,"-disabled"),u)),disabled:u,value:g,onChange:b})))}),oV=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],iV=$.forwardRef(function(t,e){var n,r=t.defaultValue,o=t.value,i=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,f=t.suffix,p=t.prefixCls,m=p===void 0?"rc-textarea":p,v=t.showCount,g=t.count,y=t.className,b=t.style,C=t.disabled,x=t.hidden,S=t.classNames,w=t.styles,E=t.onResize,N=t.onClear,O=t.onPressEnter,M=t.readOnly,I=t.autoSize,D=t.onKeyDown,k=xt(t,oV),P=mn(r,{value:o,defaultValue:r}),j=ie(P,2),A=j[0],T=j[1],_=A==null?"":String(A),W=$.useState(!1),L=ie(W,2),V=L[0],U=L[1],Y=$.useRef(!1),H=$.useState(null),G=ie(H,2),J=G[0],se=G[1],X=$.useRef(null),de=$.useRef(null),ye=function(){var je;return(je=de.current)===null||je===void 0?void 0:je.textArea},ce=function(){ye().focus()};$.useImperativeHandle(e,function(){var Pe;return{resizableTextArea:de.current,focus:ce,blur:function(){ye().blur()},nativeElement:((Pe=X.current)===null||Pe===void 0?void 0:Pe.nativeElement)||ye()}}),$.useEffect(function(){U(function(Pe){return!C&&Pe})},[C]);var oe=$.useState(null),me=ie(oe,2),te=me[0],le=me[1];$.useEffect(function(){if(te){var Pe;(Pe=ye()).setSelectionRange.apply(Pe,Re(te))}},[te]);var fe=uw(g,v),Ee=(n=fe.max)!==null&&n!==void 0?n:c,Oe=Number(Ee)>0,xe=fe.strategy(_),Be=!!Ee&&xe>Ee,z=function(je,_e){var Fe=_e;!Y.current&&fe.exceedFormatter&&fe.max&&fe.strategy(_e)>fe.max&&(Fe=fe.exceedFormatter(_e,{max:fe.max}),_e!==Fe&&le([ye().selectionStart||0,ye().selectionEnd||0])),T(Fe),Sc(je.currentTarget,je,s,Fe)},ve=function(je){Y.current=!0,u==null||u(je)},ae=function(je){Y.current=!1,z(je,je.currentTarget.value),d==null||d(je)},he=function(je){z(je,je.target.value)},$e=function(je){je.key==="Enter"&&O&&O(je),D==null||D(je)},Me=function(je){U(!0),i==null||i(je)},we=function(je){U(!1),a==null||a(je)},ze=function(je){T(""),ce(),Sc(ye(),je,s)},Le=f,Ie;fe.show&&(fe.showFormatter?Ie=fe.showFormatter({value:_,count:xe,maxLength:Ee}):Ie="".concat(xe).concat(Oe?" / ".concat(Ee):""),Le=$.createElement($.Fragment,null,Le,$.createElement("span",{className:ee("".concat(m,"-data-count"),S==null?void 0:S.count),style:w==null?void 0:w.count},Ie)));var We=function(je){var _e;E==null||E(je),(_e=ye())!==null&&_e!==void 0&&_e.style.height&&se(!0)},Ke=!I&&!v&&!l;return $.createElement(Kp,{ref:X,value:_,allowClear:l,handleReset:ze,suffix:Le,prefixCls:m,classNames:q(q({},S),{},{affixWrapper:ee(S==null?void 0:S.affixWrapper,F(F({},"".concat(m,"-show-count"),v),"".concat(m,"-textarea-allow-clear"),l))}),disabled:C,focused:V,className:ee(y,Be&&"".concat(m,"-out-of-range")),style:q(q({},b),J&&!Ke?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ie=="string"?Ie:void 0}},hidden:x,readOnly:M,onClear:N},$.createElement(rV,De({},k,{autoSize:I,maxLength:c,onKeyDown:$e,onChange:he,onFocus:Me,onBlur:we,onCompositionStart:ve,onCompositionEnd:ae,className:ee(S==null?void 0:S.textarea),style:q(q({},w==null?void 0:w.textarea),{},{resize:b==null?void 0:b.resize}),disabled:C,prefixCls:m,onResize:We,ref:de,readOnly:M})))});const aV=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`> ${e}`]:{height:"100%"},[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
443
|
-
&-allow-clear > ${e},
|
|
444
|
-
&-affix-wrapper${r}-has-feedback ${e}
|
|
445
|
-
`]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},sV=hn(["Input","TextArea"],t=>{const e=Lt(t,qs(t));return[aV(e)]},Ks,{resetFont:!1});var lV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const cV=$.forwardRef((t,e)=>{var n;const{prefixCls:r,bordered:o=!0,size:i,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:v,onMouseDown:g,onResize:y}=t,b=lV(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:fe}=on("TextArea");fe(!("bordered"in t),"bordered","variant")}const{getPrefixCls:C,direction:x,allowClear:S,autoComplete:w,className:E,style:N,classNames:O,styles:M}=br("textArea"),I=h.useContext(zr),D=a??I,{status:k,hasFeedback:P,feedbackIcon:j}=h.useContext(Nr),A=Fs(k,s),T=h.useRef(null);h.useImperativeHandle(e,()=>{var fe;return{resizableTextArea:(fe=T.current)===null||fe===void 0?void 0:fe.resizableTextArea,focus:Ee=>{var Oe,xe;qp((xe=(Oe=T.current)===null||Oe===void 0?void 0:Oe.resizableTextArea)===null||xe===void 0?void 0:xe.textArea,Ee)},blur:()=>{var Ee;return(Ee=T.current)===null||Ee===void 0?void 0:Ee.blur()}}});const _=C("input",r),W=xo(_),[L,V,U]=J1(_,u),[Y]=sV(_,W),{compactSize:H,compactItemClassnames:G}=Zo(_,x),J=Fr(fe=>{var Ee;return(Ee=i??H)!==null&&Ee!==void 0?Ee:fe}),[se,X]=su("textArea",m,o),de=hw(l??S),[ye,ce]=h.useState(!1),[oe,me]=h.useState(!1),te=fe=>{ce(!0),g==null||g(fe);const Ee=()=>{ce(!1),document.removeEventListener("mouseup",Ee)};document.addEventListener("mouseup",Ee)},le=fe=>{var Ee,Oe;if(y==null||y(fe),ye&&typeof getComputedStyle=="function"){const xe=(Oe=(Ee=T.current)===null||Ee===void 0?void 0:Ee.nativeElement)===null||Oe===void 0?void 0:Oe.querySelector("textarea");xe&&getComputedStyle(xe).resize==="both"&&me(!0)}};return L(Y(h.createElement(iV,Object.assign({autoComplete:w},b,{style:Object.assign(Object.assign({},N),f),styles:Object.assign(Object.assign({},M),p),disabled:D,allowClear:de,className:ee(U,W,d,u,G,E,oe&&`${_}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),O),{textarea:ee({[`${_}-sm`]:J==="small",[`${_}-lg`]:J==="large"},V,c==null?void 0:c.textarea,O.textarea,ye&&`${_}-mouse-active`),variant:ee({[`${_}-${se}`]:X},Ni(_,A)),affixWrapper:ee(`${_}-textarea-affix-wrapper`,{[`${_}-affix-wrapper-rtl`]:x==="rtl",[`${_}-affix-wrapper-sm`]:J==="small",[`${_}-affix-wrapper-lg`]:J==="large",[`${_}-textarea-show-count`]:v||((n=t.count)===null||n===void 0?void 0:n.show)},V)}),prefixCls:_,suffix:P&&h.createElement("span",{className:`${_}-textarea-suffix`},j),showCount:v,ref:T,onResize:le,onMouseDown:te}))))}),ho=Na;ho.Group=zH;ho.Search=Iw;ho.TextArea=cV;ho.Password=Mw;ho.OTP=qH;var uV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const dV=t=>{const{prefixCls:e,className:n,closeIcon:r,closable:o,type:i,title:a,children:s,footer:l}=t,c=uV(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=h.useContext(At),d=u(),f=e||u("modal"),p=xo(d),[m,v,g]=Ix(f,p),y=`${f}-confirm`;let b={};return i?b={closable:o??!1,title:"",footer:"",children:h.createElement(Tx,Object.assign({},t,{prefixCls:f,confirmPrefixCls:y,rootPrefixCls:d,content:s}))}:b={closable:o??!0,title:a,footer:l!==null&&h.createElement($x,Object.assign({},t)),children:s},m(h.createElement(gp,Object.assign({prefixCls:f,className:ee(v,`${f}-pure-panel`,i&&y,i&&`${y}-${i}`,n,g,p)},c,{closeIcon:Ex(f,r),closable:o},b)))},fV=Lx(dV);function Rw(t){return js(kx(t))}const Mr=Rx;Mr.useModal=G_;Mr.info=function(e){return js(_x(e))};Mr.success=function(e){return js(Bx(e))};Mr.error=function(e){return js(zx(e))};Mr.warning=Rw;Mr.warn=Rw;Mr.confirm=function(e){return js(jx(e))};Mr.destroyAll=function(){for(;ui.length;){const e=ui.pop();e&&e()}};Mr.config=V_;Mr._InternalPanelDoNotUseOrYouWillBeFired=fV;process.env.NODE_ENV!=="production"&&(Mr.displayName="Modal");/**
|
|
446
|
-
* @license lucide-react v0.484.0 - ISC
|
|
447
|
-
*
|
|
448
|
-
* This source code is licensed under the ISC license.
|
|
449
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
-
*/const hV=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pV=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ub=t=>{const e=pV(t);return e.charAt(0).toUpperCase()+e.slice(1)},Tw=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
|
|
451
|
-
* @license lucide-react v0.484.0 - ISC
|
|
452
|
-
*
|
|
453
|
-
* This source code is licensed under the ISC license.
|
|
454
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
455
|
-
*/var mV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
456
|
-
* @license lucide-react v0.484.0 - ISC
|
|
457
|
-
*
|
|
458
|
-
* This source code is licensed under the ISC license.
|
|
459
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
460
|
-
*/const gV=$.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>$.createElement("svg",{ref:l,...mV,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Tw("lucide",o),...s},[...a.map(([c,u])=>$.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
461
|
-
* @license lucide-react v0.484.0 - ISC
|
|
462
|
-
*
|
|
463
|
-
* This source code is licensed under the ISC license.
|
|
464
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
-
*/const Ft=(t,e)=>{const n=$.forwardRef(({className:r,...o},i)=>$.createElement(gV,{ref:i,iconNode:e,className:Tw(`lucide-${hV(Ub(t))}`,`lucide-${t}`,r),...o}));return n.displayName=Ub(t),n};/**
|
|
466
|
-
* @license lucide-react v0.484.0 - ISC
|
|
467
|
-
*
|
|
468
|
-
* This source code is licensed under the ISC license.
|
|
469
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
470
|
-
*/const vV=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],bV=Ft("align-center",vV);/**
|
|
471
|
-
* @license lucide-react v0.484.0 - ISC
|
|
472
|
-
*
|
|
473
|
-
* This source code is licensed under the ISC license.
|
|
474
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
475
|
-
*/const yV=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],CV=Ft("align-justify",yV);/**
|
|
476
|
-
* @license lucide-react v0.484.0 - ISC
|
|
477
|
-
*
|
|
478
|
-
* This source code is licensed under the ISC license.
|
|
479
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
480
|
-
*/const SV=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],xV=Ft("align-left",SV);/**
|
|
481
|
-
* @license lucide-react v0.484.0 - ISC
|
|
482
|
-
*
|
|
483
|
-
* This source code is licensed under the ISC license.
|
|
484
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
485
|
-
*/const wV=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],EV=Ft("align-right",wV);/**
|
|
486
|
-
* @license lucide-react v0.484.0 - ISC
|
|
487
|
-
*
|
|
488
|
-
* This source code is licensed under the ISC license.
|
|
489
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
490
|
-
*/const $V=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],OV=Ft("bold",$V);/**
|
|
491
|
-
* @license lucide-react v0.484.0 - ISC
|
|
492
|
-
*
|
|
493
|
-
* This source code is licensed under the ISC license.
|
|
494
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
495
|
-
*/const NV=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],MV=Ft("chevron-down",NV);/**
|
|
496
|
-
* @license lucide-react v0.484.0 - ISC
|
|
497
|
-
*
|
|
498
|
-
* This source code is licensed under the ISC license.
|
|
499
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
500
|
-
*/const IV=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],RV=Ft("code",IV);/**
|
|
501
|
-
* @license lucide-react v0.484.0 - ISC
|
|
502
|
-
*
|
|
503
|
-
* This source code is licensed under the ISC license.
|
|
504
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
505
|
-
*/const TV=[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],PV=Ft("corner-down-right",TV);/**
|
|
506
|
-
* @license lucide-react v0.484.0 - ISC
|
|
507
|
-
*
|
|
508
|
-
* This source code is licensed under the ISC license.
|
|
509
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
510
|
-
*/const AV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],Md=Ft("heading-1",AV);/**
|
|
511
|
-
* @license lucide-react v0.484.0 - ISC
|
|
512
|
-
*
|
|
513
|
-
* This source code is licensed under the ISC license.
|
|
514
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
515
|
-
*/const DV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],Gb=Ft("heading-2",DV);/**
|
|
516
|
-
* @license lucide-react v0.484.0 - ISC
|
|
517
|
-
*
|
|
518
|
-
* This source code is licensed under the ISC license.
|
|
519
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
520
|
-
*/const kV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],Xb=Ft("heading-3",kV);/**
|
|
521
|
-
* @license lucide-react v0.484.0 - ISC
|
|
522
|
-
*
|
|
523
|
-
* This source code is licensed under the ISC license.
|
|
524
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
525
|
-
*/const _V=[["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 10v3a1 1 0 0 0 1 1h3",key:"tj5zdr"}],["path",{d:"M21 10v8",key:"1kdml4"}],["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}]],Yb=Ft("heading-4",_V);/**
|
|
526
|
-
* @license lucide-react v0.484.0 - ISC
|
|
527
|
-
*
|
|
528
|
-
* This source code is licensed under the ISC license.
|
|
529
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
530
|
-
*/const BV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 13v-3h4",key:"1nvgqp"}],["path",{d:"M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17",key:"2nebdn"}]],Jb=Ft("heading-5",BV);/**
|
|
531
|
-
* @license lucide-react v0.484.0 - ISC
|
|
532
|
-
*
|
|
533
|
-
* This source code is licensed under the ISC license.
|
|
534
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
535
|
-
*/const zV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["circle",{cx:"19",cy:"16",r:"2",key:"15mx69"}],["path",{d:"M20 10c-2 2-3 3.5-3 6",key:"f35dl0"}]],Qb=Ft("heading-6",zV);/**
|
|
536
|
-
* @license lucide-react v0.484.0 - ISC
|
|
537
|
-
*
|
|
538
|
-
* This source code is licensed under the ISC license.
|
|
539
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
540
|
-
*/const jV=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],LV=Ft("image",jV);/**
|
|
541
|
-
* @license lucide-react v0.484.0 - ISC
|
|
542
|
-
*
|
|
543
|
-
* This source code is licensed under the ISC license.
|
|
544
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
545
|
-
*/const FV=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],HV=Ft("italic",FV);/**
|
|
546
|
-
* @license lucide-react v0.484.0 - ISC
|
|
547
|
-
*
|
|
548
|
-
* This source code is licensed under the ISC license.
|
|
549
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
550
|
-
*/const VV=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],WV=Ft("layers",VV);/**
|
|
551
|
-
* @license lucide-react v0.484.0 - ISC
|
|
552
|
-
*
|
|
553
|
-
* This source code is licensed under the ISC license.
|
|
554
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
555
|
-
*/const qV=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],KV=Ft("list-ordered",qV);/**
|
|
556
|
-
* @license lucide-react v0.484.0 - ISC
|
|
557
|
-
*
|
|
558
|
-
* This source code is licensed under the ISC license.
|
|
559
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
560
|
-
*/const UV=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],GV=Ft("list",UV);/**
|
|
561
|
-
* @license lucide-react v0.484.0 - ISC
|
|
562
|
-
*
|
|
563
|
-
* This source code is licensed under the ISC license.
|
|
564
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
565
|
-
*/const XV=[["path",{d:"M5 12h14",key:"1ays0h"}]],YV=Ft("minus",XV);/**
|
|
566
|
-
* @license lucide-react v0.484.0 - ISC
|
|
567
|
-
*
|
|
568
|
-
* This source code is licensed under the ISC license.
|
|
569
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
570
|
-
*/const JV=[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]],QV=Ft("paint-bucket",JV);/**
|
|
571
|
-
* @license lucide-react v0.484.0 - ISC
|
|
572
|
-
*
|
|
573
|
-
* This source code is licensed under the ISC license.
|
|
574
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
575
|
-
*/const ZV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],e5=Ft("plus",ZV);/**
|
|
576
|
-
* @license lucide-react v0.484.0 - ISC
|
|
577
|
-
*
|
|
578
|
-
* This source code is licensed under the ISC license.
|
|
579
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
580
|
-
*/const t5=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],n5=Ft("quote",t5);/**
|
|
581
|
-
* @license lucide-react v0.484.0 - ISC
|
|
582
|
-
*
|
|
583
|
-
* This source code is licensed under the ISC license.
|
|
584
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
585
|
-
*/const r5=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],o5=Ft("redo",r5);/**
|
|
586
|
-
* @license lucide-react v0.484.0 - ISC
|
|
587
|
-
*
|
|
588
|
-
* This source code is licensed under the ISC license.
|
|
589
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
590
|
-
*/const i5=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],a5=Ft("square-check-big",i5);/**
|
|
591
|
-
* @license lucide-react v0.484.0 - ISC
|
|
592
|
-
*
|
|
593
|
-
* This source code is licensed under the ISC license.
|
|
594
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
595
|
-
*/const s5=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],l5=Ft("strikethrough",s5);/**
|
|
596
|
-
* @license lucide-react v0.484.0 - ISC
|
|
597
|
-
*
|
|
598
|
-
* This source code is licensed under the ISC license.
|
|
599
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
600
|
-
*/const c5=[["path",{d:"m4 5 8 8",key:"1eunvl"}],["path",{d:"m12 5-8 8",key:"1ah0jp"}],["path",{d:"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",key:"e8ta8j"}]],u5=Ft("subscript",c5);/**
|
|
601
|
-
* @license lucide-react v0.484.0 - ISC
|
|
602
|
-
*
|
|
603
|
-
* This source code is licensed under the ISC license.
|
|
604
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
605
|
-
*/const d5=[["path",{d:"m4 19 8-8",key:"hr47gm"}],["path",{d:"m12 19-8-8",key:"1dhhmo"}],["path",{d:"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",key:"1dfcux"}]],f5=Ft("superscript",d5);/**
|
|
606
|
-
* @license lucide-react v0.484.0 - ISC
|
|
607
|
-
*
|
|
608
|
-
* This source code is licensed under the ISC license.
|
|
609
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
610
|
-
*/const h5=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],p5=Ft("table",h5);/**
|
|
611
|
-
* @license lucide-react v0.484.0 - ISC
|
|
612
|
-
*
|
|
613
|
-
* This source code is licensed under the ISC license.
|
|
614
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
615
|
-
*/const m5=[["path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1",key:"uvaxm9"}],["path",{d:"M7 22h1a4 4 0 0 0 4-4v-1",key:"11xy8d"}],["path",{d:"M7 2h1a4 4 0 0 1 4 4v1",key:"1uw06m"}]],g5=Ft("text-cursor",m5);/**
|
|
616
|
-
* @license lucide-react v0.484.0 - ISC
|
|
617
|
-
*
|
|
618
|
-
* This source code is licensed under the ISC license.
|
|
619
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
620
|
-
*/const v5=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],b5=Ft("underline",v5);/**
|
|
621
|
-
* @license lucide-react v0.484.0 - ISC
|
|
622
|
-
*
|
|
623
|
-
* This source code is licensed under the ISC license.
|
|
624
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
625
|
-
*/const y5=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],C5=Ft("undo",y5);/**
|
|
626
|
-
* @license lucide-react v0.484.0 - ISC
|
|
627
|
-
*
|
|
628
|
-
* This source code is licensed under the ISC license.
|
|
629
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
630
|
-
*/const S5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],x5=Ft("x",S5);function xc({value:t,onChange:e}){return pe.jsx(pu,{value:t,onChange:e,presets:[{label:"Recommended",colors:["#1677ff","#52c41a","#faad14","#ff4d4f","#722ed1","#13c2c2","#ffffff","#000000"]}]})}function w5({editor:t}){const[e,n]=$.useState("#1677ff"),[r,o]=$.useState("#ffffff"),i=l=>{const c=l.toHexString();n(c),t.chain().focus().setColor(c).run()},a=l=>{const c=l.toHexString();o(c),t.chain().focus().setHighlight({color:c}).run()},s=l=>{l.preventDefault()};return pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-4",children:[pe.jsx(Ko,{title:"Text Color",children:pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[pe.jsx(g5,{size:20,color:"black"}),pe.jsx(xc,{value:e,onChange:i})]})}),pe.jsx(Ko,{title:"Highlight Color",children:pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[pe.jsx(QV,{size:20,color:"black"}),pe.jsx(xc,{value:r,onChange:a})]})})]})}function E5({editor:t}){if(!t)return null;const e=()=>{for(let r=1;r<=6;r++)if(t.isActive("heading",{level:r}))switch(r){case 1:return pe.jsx(Md,{size:16});case 2:return pe.jsx(Gb,{size:16});case 3:return pe.jsx(Xb,{size:16});case 4:return pe.jsx(Yb,{size:16});case 5:return pe.jsx(Jb,{size:16});case 6:return pe.jsx(Qb,{size:16})}return pe.jsx(Md,{size:16})},n=[...Array.from({length:6},(r,o)=>({key:`${o+1}`,label:pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onClick:()=>t.chain().focus().toggleHeading({level:o+1}).run(),children:[$.createElement([Md,Gb,Xb,Yb,Jb,Qb][o],{size:16}),pe.jsxs("span",{children:["Heading",o+1]})]}),className:t.isActive("heading",{level:o+1})?"ant-dropdown-menu-item-active":""}))];return pe.jsx(mu,{menu:{items:n},trigger:["hover"],placement:"bottomLeft",children:pe.jsx("button",{className:"ce:flex ce:items-center ce:gap-1 ce:p-2 ce:rounded-md ce:hover:bg-blue-100 ce:hover:text-blue-600",type:"button",children:e()})})}const $5=8,O5=8;function N5({editor:t,buttonClass:e,activeClass:n}){const[r,o]=$.useState({rows:0,cols:0}),[i,a]=$.useState(!1),s=$.useCallback((l,c)=>{t&&(t.chain().focus().insertTable({rows:l,cols:c,withHeaderRow:!0}).run(),a(!1))},[t]);return pe.jsx(mu,{open:i,onOpenChange:l=>a(l),trigger:["hover"],dropdownRender:()=>pe.jsxs("div",{className:"ce:w-56 ce:p-4 ce:bg-white ce:border ce:border-gray-300 ce:rounded-lg ce:shadow-xl",children:[pe.jsx("div",{className:"ce:grid ce:grid-cols-8 ce:gap-1",children:Array.from({length:$5}).map((l,c)=>Array.from({length:O5}).map((u,d)=>{const f=c<r.rows&&d<r.cols;return pe.jsx("div",{className:`ce:w-5 ce:h-5 ce:border ce:rounded-sm ce:cursor-pointer ce:transition-all ce:duration-200 ${f?"ce:bg-blue-400 ce:border-white ce:scale-110":"ce:bg-gray-200 ce:hover:bg-gray-300"}`,onMouseEnter:()=>o({rows:c+1,cols:d+1}),onClick:p=>{p.stopPropagation(),s(c+1,d+1)}},`${c}-${d}`)}))}),pe.jsx("div",{className:"ce:mt-3 ce:text-sm ce:font-medium ce:text-center ce:text-gray-700",children:r.rows>0&&r.cols>0?`${r.rows} × ${r.cols} Table`:"Insert Table"})]}),children:pe.jsx("button",{type:"button",className:`${e} ${i?n:""} ce:transition-all`,onClick:l=>{l.preventDefault(),a(!i)},children:pe.jsx(p5,{className:"ce:w-5 ce:h-5"})})})}function M5({editor:t}){const[e,n]=$.useState(!1);return pe.jsxs("div",{className:"ce:relative",children:[pe.jsx("button",{type:"button",className:`ce:p-1 ce:text-black ce:transition-all ce:duration-300 ce:rounded-md ce:shadow-lg ce:hover:bg-blue-100 ce:hover:text-blue-600 ${e?"ce:bg-blue-100 ce:text-blue-600":""}`,onClick:r=>{r.preventDefault(),r.stopPropagation(),n(!e)},children:e?pe.jsx(x5,{size:24}):pe.jsx(WV,{size:24})}),e&&pe.jsx("div",{className:"ce:fixed ce:z-40 ce:w-64 ce:p-4 ce:bg-white ce:border ce:border-gray-200 ce:rounded-lg ce:shadow-xl ce:bottom-20 ce:right-4 ce:animate-slide-up",children:pe.jsxs("div",{className:"ce:space-y-2",children:[pe.jsx("h3",{className:"ce:mb-3 ce:font-bold ce:text-center ce:text-gray-700",children:"Custom Extensions"}),pe.jsxs("button",{type:"button",onClick:()=>{t.chain().focus().insertContent({type:"accordion",content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()},className:"ce:flex ce:items-center ce:justify-center ce:w-full ce:gap-2 ce:px-3 ce:py-1 ce:text-blue-600 ce:duration-300 ce:rounded-md ce:bg-blue-50 ce:hover:bg-blue-100 ce:hover:text-blue-700",children:[pe.jsx(e5,{size:16})," Accordion"]})]})})]})}function I5({editor:t}){if(!t)return null;const e="ce:p-2 ce:rounded-md ce:transition-all ce:duration-200 ce:hover:bg-blue-100 ce:hover:text-blue-600",n="ce:bg-blue-100 ce:text-blue-600",r=(o,i,a,s,l)=>pe.jsx(Ko,{title:l,children:pe.jsx("button",{type:"button",onClick:i,disabled:s,className:`
|
|
631
|
-
${e}
|
|
632
|
-
${a?n:""}
|
|
633
|
-
${s?"ce:opacity-50 ce:cursor-not-allowed":""}
|
|
634
|
-
`,children:o})});return pe.jsxs("div",{className:"ce:flex ce:flex-wrap ce:items-center ce:gap-2 ce:p-2 ce:border-b ce:border-gray-200 ce:rounded-t-lg ce:bg-gray-50",children:[pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(pe.jsx(OV,{size:16}),()=>t.chain().focus().toggleBold().run(),t.isActive("bold"),!1,"Bold"),r(pe.jsx(HV,{size:16}),()=>t.chain().focus().toggleItalic().run(),t.isActive("italic"),!1,"Italic"),r(pe.jsx(b5,{size:16}),()=>t.chain().focus().toggleUnderline().run(),t.isActive("underline"),!1,"Underline"),r(pe.jsx(l5,{size:16}),()=>t.chain().focus().toggleStrike().run(),t.isActive("strike"),!1,"Strikethrough"),r(pe.jsx(RV,{size:16}),()=>t.chain().focus().toggleCode().run(),t.isActive("code"),!1,"Code"),r(pe.jsx(u5,{size:16}),()=>t.chain().focus().toggleSubscript().run(),t.isActive("subscript"),!1,"Subscript"),r(pe.jsx(f5,{size:16}),()=>t.chain().focus().toggleSuperscript().run(),t.isActive("superscript"),!1,"Superscript")]}),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),pe.jsx(E5,{editor:t}),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(pe.jsx(xV,{size:16}),()=>t.chain().focus().setTextAlign("left").run(),t.isActive({textAlign:"left"}),!1,"Align Left"),r(pe.jsx(bV,{size:16}),()=>t.chain().focus().setTextAlign("center").run(),t.isActive({textAlign:"center"}),!1,"Align Center"),r(pe.jsx(EV,{size:16}),()=>t.chain().focus().setTextAlign("right").run(),t.isActive({textAlign:"right"}),!1,"Align Right"),r(pe.jsx(CV,{size:16}),()=>t.chain().focus().setTextAlign("justify").run(),t.isActive({textAlign:"justify"}),!1,"Align Justify")]}),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(pe.jsx(GV,{size:16}),()=>t.chain().focus().toggleBulletList().run(),t.isActive("bulletList"),!1,"Bullet List"),r(pe.jsx(KV,{size:16}),()=>t.chain().focus().toggleOrderedList().run(),t.isActive("orderedList"),!1,"Ordered List"),r(pe.jsx(a5,{size:16}),()=>t.chain().focus().toggleTaskList().run(),t.isActive("taskList"),!1,"Task List")]}),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(pe.jsx(n5,{size:16}),()=>t.chain().focus().toggleBlockquote().run(),t.isActive("blockquote"),!1,"Blockquote"),pe.jsx(N5,{editor:t,buttonClass:e,activeClass:n}),r(pe.jsx(YV,{size:16}),()=>t.chain().focus().setHorizontalRule().run(),!1,!1,"Horizontal Rule"),r(pe.jsx(PV,{size:16}),()=>t.chain().focus().setHardBreak().run(),!1,!1,"Line Break")]}),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),pe.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(pe.jsx(C5,{size:16}),()=>t.chain().focus().undo().run(),!1,!t.can().chain().focus().undo().run()),r(pe.jsx(o5,{size:16}),()=>t.chain().focus().redo().run(),!1,!t.can().chain().focus().redo().run())]}),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),r(pe.jsx(LV,{size:16}),()=>{const o=prompt("Enter the image URL");o&&t.chain().focus().insertContent({type:"image",attrs:{src:o,width:50,height:50,marginLeft:0,marginRight:0}}).run()},!1,!1,"Insert Image"),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),pe.jsx(w5,{editor:t}),pe.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),pe.jsx(M5,{editor:t})]})}const R5=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,o;const i=n.getAttribute("style"),a=(o=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");n.setAttribute("style",`${a};${i}`)})},Zb=to.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&R5(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(i=>!!i))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),T5=Vn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),P5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,A5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,D5=to.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[wi({find:P5,type:this.type})]},addPasteRules(){return[Ei({find:A5,type:this.type})]}}),Pw=Sn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Zt(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),k5=to.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),_5=to.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});var ph,mh;if(typeof WeakMap<"u"){let t=new WeakMap;ph=e=>t.get(e),mh=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;ph=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},mh=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var Cn=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,a=o+1;for(let s=1;i<this.width&&this.map[e+s]==n;s++)i++;for(let s=1;a<this.height&&this.map[e+this.width*s]==n;s++)a++;return{left:r,top:o,right:i,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:a==this.height)?null:this.map[r+this.width*(n<0?i-1:a)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:a,right:s,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(o,l),right:Math.max(r,s),bottom:Math.max(i,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,!(o==t.left&&o&&this.map[i-1]==a||r==t.top&&r&&this.map[i-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const s=(t+1)*this.width;for(;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}}static get(t){return ph(t)||mh(t,B5(t))}};function B5(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=z5(t),n=t.childCount,r=[];let o=0,i=null;const a=[];for(let c=0,u=e*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const d=t.child(c);u++;for(let m=0;;m++){for(;o<r.length&&r[o]!=0;)o++;if(m==d.childCount)break;const v=d.child(m),{colspan:g,rowspan:y,colwidth:b}=v.attrs;for(let C=0;C<y;C++){if(C+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:y-C});break}const x=o+C*e;for(let S=0;S<g;S++){r[x+S]==0?r[x+S]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:g-S});const w=b&&b[S];if(w){const E=(x+S)%e*2,N=a[E];N==null||N!=w&&a[E+1]==1?(a[E]=w,a[E+1]=1):N==w&&a[E+1]++}}}o+=g,u+=v.nodeSize}const f=(c+1)*e;let p=0;for(;o<f;)r[o++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:c,n:p}),u++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const s=new Cn(e,n,r,i);let l=!1;for(let c=0;!l&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(l=!0);return l&&j5(s,a,t),s}function z5(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let a=0;a<r;a++){const s=t.child(a);for(let l=0;l<s.childCount;l++){const c=s.child(l);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}}for(let a=0;a<o.childCount;a++){const s=o.child(a);i+=s.attrs.colspan,s.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function j5(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const a=n.nodeAt(i);if(!a)throw new RangeError(`No cell with offset ${i} found`);let s=null;const l=a.attrs;for(let c=0;c<l.colspan;c++){const u=(o+c)%t.width,d=e[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((s||(s=L5(l)))[c]=d)}s&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}function L5(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Yn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var Po=new vr("selectingCells");function Ma(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function F5(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Hr(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function gu(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Ma(e.$head)||H5(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function H5(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function gh(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function V5(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Yp(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Aw(t,e,n){const r=t.node(-1),o=Cn.get(r),i=t.start(-1),a=o.nextCell(t.pos-i,e,n);return a==null?null:t.node(0).resolve(i+a)}function Mi(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function Dw(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function W5(t,e,n){const r=Yn(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var un=class so extends vt{constructor(e,n=e){const r=e.node(-1),o=Cn.get(r),i=e.start(-1),a=o.rectBetween(e.pos-i,n.pos-i),s=e.node(0),l=o.cellsInRect(a).filter(u=>u!=n.pos-i);l.unshift(n.pos-i);const c=l.map(u=>{const d=r.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const f=i+u+1;return new ey(s.resolve(f),s.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(gh(r)&&gh(o)&&Yp(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?so.rowSelection(r,o):i&&this.isColSelection()?so.colSelection(r,o):new so(r,o)}return gt.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=Cn.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},a=[];for(let l=o.top;l<o.bottom;l++){const c=[];for(let u=l*n.width+o.left,d=o.left;d<o.right;d++,u++){const f=n.map[u];if(i[f])continue;i[f]=!0;const p=n.findCell(f);let m=e.nodeAt(f);if(!m)throw RangeError(`No cell with offset ${f} found`);const v=o.left-p.left,g=p.right-o.right;if(v>0||g>0){let y=m.attrs;if(v>0&&(y=Mi(y,0,v)),g>0&&(y=Mi(y,y.colspan-g,g)),p.left<o.left){if(m=m.type.createAndFill(y),!m)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else m=m.type.create(y,m.content)}if(p.top<o.top||p.bottom>o.bottom){const y={...m.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top<o.top?m=m.type.createAndFill(y):m=m.type.create(y,m.content)}c.push(m)}a.push(e.child(l).copy(Ne.from(c)))}const s=this.isColSelection()&&this.isRowSelection()?e:a;return new Ge(Ne.from(s),1,1)}replace(e,n=Ge.empty){const r=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:s,$to:l}=o[a],c=e.mapping.slice(r);e.replace(c.map(s.pos),c.map(l.pos),a?Ge.empty:n)}const i=vt.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Ge(Ne.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=Cn.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let a=0;a<i.length;a++)e(n.nodeAt(i[a]),o+i[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=Cn.get(r),i=e.start(-1),a=o.findCell(e.pos-i),s=o.findCell(n.pos-i),l=e.node(0);return a.top<=s.top?(a.top>0&&(e=l.resolve(i+o.map[a.left])),s.bottom<o.height&&(n=l.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(n=l.resolve(i+o.map[s.left])),a.bottom<o.height&&(e=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))),new so(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Cn.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const a=o+this.$anchorCell.nodeAfter.attrs.colspan,s=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,s)==n.width}eq(e){return e instanceof so&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=Cn.get(r),i=e.start(-1),a=o.findCell(e.pos-i),s=o.findCell(n.pos-i),l=e.node(0);return a.left<=s.left?(a.left>0&&(e=l.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(n=l.resolve(i+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(n=l.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(e=l.resolve(i+o.map[o.width*(a.top+1)-1]))),new so(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new so(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new so(e.resolve(n),e.resolve(r))}getBookmark(){return new q5(this.$anchorCell.pos,this.$headCell.pos)}};un.prototype.visible=!1;vt.jsonID("cell",un);var q5=class kw{constructor(e,n){this.anchor=e,this.head=n}map(e){return new kw(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Yp(n,r)?new un(n,r):vt.near(r,1)}};function K5(t){if(!(t.selection instanceof un))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Zn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),bn.create(t.doc,e)}function U5({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function G5({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&e.parentOffset===0}function X5(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,a;if(r instanceof mt&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=un.create(o,r.from);else if(a=="row"){const s=o.resolve(r.from+1);i=un.rowSelection(s,s)}else if(!n){const s=Cn.get(r.node),l=r.from+1,c=l+s.map[s.width*s.height-1];i=un.create(o,l+1,c)}}else r instanceof gt&&U5(r)?i=gt.create(o,r.from):r instanceof gt&&G5(r)&&(i=gt.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var Y5=new vr("fix-tables");function _w(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let a=0,s=0;a<i;a++){const l=e.child(a);for(let c=s,u=Math.min(o,a+3);c<u;c++)if(t.child(c)==l){s=c+1,n+=l.nodeSize;continue e}r(l,n),s<o&&t.child(s).sameMarkup(l)?_w(t.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function Bw(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=J5(t,o,i,n))};return e?e.doc!=t.doc&&_w(e.doc,t.doc,0,r):t.doc.descendants(r),n}function J5(t,e,n,r){const o=Cn.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const c=o.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let f=0;f<d.rowspan;f++)i[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Mi(d,d.colspan-c.n,c.n))}else if(c.type=="missing")i[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+e.nodeSize)}}let a,s;for(let l=0;l<i.length;l++)i[l]&&(a==null&&(a=l),s=l);for(let l=0,c=n+1;l<o.height;l++){const u=e.child(l),d=c+u.nodeSize,f=i[l];if(f>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const m=[];for(let g=0;g<f;g++){const y=Yn(t.schema)[p].createAndFill();y&&m.push(y)}const v=(l==0||a==l-1)&&s==l?c+1:d-1;r.insert(r.mapping.map(v),m)}c=d}return r.setMeta(Y5,{fixTables:!0})}function oo(t){const e=t.selection,n=gu(t),r=n.node(-1),o=n.start(-1),i=Cn.get(r);return{...e instanceof un?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function zw(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;W5(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let a=0;a<e.height;a++){const s=a*e.width+o;if(o>0&&o<e.width&&e.map[s-1]==e.map[s]){const l=e.map[s],c=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,Dw(c.attrs,o-e.colCount(l))),a+=c.attrs.rowspan-1}else{const l=i==null?Yn(r.type.schema).cell:r.nodeAt(e.map[s+i]).type,c=e.positionAt(a,o,r);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function Q5(t,e){if(!Hr(t))return!1;if(e){const n=oo(t);e(zw(t.tr,n,n.left))}return!0}function Z5(t,e){if(!Hr(t))return!1;if(e){const n=oo(t);e(zw(t.tr,n,n.right))}return!0}function e4(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let a=0;a<e.height;){const s=a*e.width+o,l=e.map[s],c=n.nodeAt(l),u=c.attrs;if(o>0&&e.map[s-1]==l||o<e.width-1&&e.map[s+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(r+l),null,Mi(u,o-e.colCount(l)));else{const d=t.mapping.slice(i).map(r+l);t.delete(d,d+c.nodeSize)}a+=u.rowspan}}function t4(t,e){if(!Hr(t))return!1;if(e){const n=oo(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;e4(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=Cn.get(i)}e(r)}return!0}function n4(t,e,n){var r;const o=Yn(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))==null?void 0:r.type)!=o)return!1;return!0}function jw(t,{map:e,tableStart:n,table:r},o){var i;let a=n;for(let c=0;c<o;c++)a+=r.child(c).nodeSize;const s=[];let l=o>0?-1:0;n4(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let c=0,u=e.width*o;c<e.width;c++,u++)if(o>0&&o<e.height&&e.map[u]==e.map[u-e.width]){const d=e.map[u],f=r.nodeAt(d).attrs;t.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),c+=f.colspan-1}else{const d=l==null?Yn(r.type.schema).cell:(i=r.nodeAt(e.map[u+l*e.width]))==null?void 0:i.type,f=d==null?void 0:d.createAndFill();f&&s.push(f)}return t.insert(a,Yn(r.type.schema).row.create(null,s)),t}function r4(t,e){if(!Hr(t))return!1;if(e){const n=oo(t);e(jw(t.tr,n,n.top))}return!0}function o4(t,e){if(!Hr(t))return!1;if(e){const n=oo(t);e(jw(t.tr,n,n.bottom))}return!0}function i4(t,{map:e,table:n,tableStart:r},o){let i=0;for(let c=0;c<o;c++)i+=n.child(c).nodeSize;const a=i+n.child(o).nodeSize,s=t.mapping.maps.length;t.delete(i+r,a+r);const l=new Set;for(let c=0,u=o*e.width;c<e.width;c++,u++){const d=e.map[u];if(!l.has(d)){if(l.add(d),o>0&&d==e.map[u-e.width]){const f=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(o<e.height&&d==e.map[u+e.width]){const f=n.nodeAt(d),p=f.attrs,m=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),v=e.positionAt(o+1,c,n);t.insert(t.mapping.slice(s).map(r+v),m),c+=p.colspan-1}}}}function a4(t,e){if(!Hr(t))return!1;if(e){const n=oo(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;i4(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=Cn.get(n.table)}e(r)}return!0}function e0(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function s4({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,a=(r.bottom-1)*t+r.left,s=o+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[s]==n[s+1])return!0;i+=t,s+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[a]==n[a+t])return!0;o++,a++}return!1}function t0(t,e){const n=t.selection;if(!(n instanceof un)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=oo(t),{map:o}=r;if(s4(o,r))return!1;if(e){const i=t.tr,a={};let s=Ne.empty,l,c;for(let u=r.top;u<r.bottom;u++)for(let d=r.left;d<r.right;d++){const f=o.map[u*o.width+d],p=r.table.nodeAt(f);if(!(a[f]||!p))if(a[f]=!0,l==null)l=f,c=p;else{e0(p)||(s=s.append(p.content));const m=i.mapping.map(f+r.tableStart);i.delete(m,m+p.nodeSize)}}if(l==null||c==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...Dw(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),s.size){const u=l+1+c.content.size,d=e0(c)?l+1:u;i.replaceWith(d+r.tableStart,u+r.tableStart,s)}i.setSelection(new un(i.doc.resolve(l+r.tableStart))),e(i)}return!0}function n0(t,e){const n=Yn(t.schema);return l4(({node:r})=>n[r.type.spec.tableRole])(t,e)}function l4(t){return(e,n)=>{var r;const o=e.selection;let i,a;if(o instanceof un){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(i=F5(o.$from),!i)return!1;a=(r=Ma(o.$from))==null?void 0:r.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let s=i.attrs;const l=[],c=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const u=oo(e),d=e.tr;for(let p=0;p<u.right-u.left;p++)l.push(c?{...s,colwidth:c&&c[p]?[c[p]]:null}:s);let f;for(let p=u.top;p<u.bottom;p++){let m=u.map.positionAt(p,u.left,u.table);p==u.top&&(m+=i.nodeSize);for(let v=u.left,g=0;v<u.right;v++,g++)v==u.left&&p==u.top||d.insert(f=d.mapping.map(m+u.tableStart,1),t({node:i,row:p,col:v}).createAndFill(l[g]))}d.setNodeMarkup(a,t({node:i,row:u.top,col:u.left}),l[0]),o instanceof un&&d.setSelection(new un(d.doc.resolve(o.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function c4(t,e){return function(n,r){if(!Hr(n))return!1;const o=gu(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof un?n.selection.forEachCell((a,s)=>{a.attrs[t]!==e&&i.setNodeMarkup(s,null,{...a.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function u4(t){return function(e,n){if(!Hr(e))return!1;if(n){const r=Yn(e.schema),o=oo(e),i=e.tr,a=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=a.map(l=>o.table.nodeAt(l));for(let l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(i.steps.length==0)for(let l=0;l<a.length;l++)i.setNodeMarkup(o.tableStart+a[l],r.header_cell,s[l].attrs);n(i)}return!0}}function r0(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function Es(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?u4(t):function(n,r){if(!Hr(n))return!1;if(r){const o=Yn(n.schema),i=oo(n),a=n.tr,s=r0("row",i,o),l=r0("column",i,o),u=(t==="column"?s:t==="row"?l:!1)?1:0,d=t=="column"?{left:0,top:u,right:1,bottom:i.map.height}:t=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,f=t=="column"?l?o.cell:o.header_cell:t=="row"?s?o.cell:o.header_cell:o.cell;i.map.cellsInRect(d).forEach(p=>{const m=p+i.tableStart,v=a.doc.nodeAt(m);v&&a.setNodeMarkup(m,f,v.attrs)}),r(a)}return!0}}Es("row",{useDeprecatedLogic:!0});Es("column",{useDeprecatedLogic:!0});var d4=Es("cell",{useDeprecatedLogic:!0});function f4(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),a=i.lastChild;if(a)return o-1-a.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function o0(t){return function(e,n){if(!Hr(e))return!1;const r=f4(gu(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(gt.between(o,V5(o))).scrollIntoView())}return!0}}function h4(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function vl(t,e){const n=t.selection;if(!(n instanceof un))return!1;if(e){const r=t.tr,o=Yn(t.schema).cell.createAndFill().content;n.forEachCell((i,a)=>{i.content.eq(o)||r.replace(r.mapping.map(a+1),r.mapping.map(a+i.nodeSize-1),new Ge(o,0,0))}),r.docChanged&&e(r)}return!0}function p4(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,a=o.type.schema,s=[];if(i=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),d=l<e.childCount-1?0:Math.max(0,r-1);(u||d)&&(c=vh(Yn(a).row,new Ge(c,u,d)).content),s.push(c)}else if(i=="cell"||i=="header_cell")s.push(n||r?vh(Yn(a).row,new Ge(e,n,r)).content:e);else return null;return m4(a,s)}function m4(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let a=i.childCount-1;a>=0;a--){const{rowspan:s,colspan:l}=i.child(a).attrs;for(let c=o;c<o+s;c++)n[c]=(n[c]||0)+l}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(Ne.empty),n[o]<r){const i=Yn(t).cell.createAndFill(),a=[];for(let s=n[o];s<r;s++)a.push(i);e[o]=e[o].append(Ne.from(a))}return{height:e.length,width:r,rows:e}}function vh(t,e){const n=t.createAndFill();return new Z0(n).replace(0,n.content.size,e).doc}function g4({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],a=[];for(let s=0;s<n.length;s++){const l=n[s],c=[];for(let u=i[s]||0,d=0;u<r;d++){let f=l.child(d%l.childCount);u+f.attrs.colspan>r&&(f=f.type.createChecked(Mi(f.attrs,f.attrs.colspan,u+f.attrs.colspan-r),f.content)),c.push(f),u+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)i[s+p]=(i[s+p]||0)+f.attrs.colspan}a.push(Ne.from(c))}n=a,t=r}if(e!=o){const i=[];for(let a=0,s=0;a<o;a++,s++){const l=[],c=n[s%e];for(let u=0;u<c.childCount;u++){let d=c.child(u);a+d.attrs.rowspan>o&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}i.push(Ne.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function v4(t,e,n,r,o,i,a){const s=t.doc.type.schema,l=Yn(s);let c,u;if(o>e.width)for(let d=0,f=0;d<e.height;d++){const p=n.child(d);f+=p.nodeSize;const m=[];let v;p.lastChild==null||p.lastChild.type==l.cell?v=c||(c=l.cell.createAndFill()):v=u||(u=l.header_cell.createAndFill());for(let g=e.width;g<o;g++)m.push(v);t.insert(t.mapping.slice(a).map(f-1+r),m)}if(i>e.height){const d=[];for(let m=0,v=(e.height-1)*e.width;m<Math.max(e.width,o);m++){const g=m>=e.width?!1:n.nodeAt(e.map[v+m]).type==l.header_cell;d.push(g?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const f=l.row.create(null,Ne.from(d)),p=[];for(let m=e.height;m<i;m++)p.push(f);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),p)}return!!(c||u)}function i0(t,e,n,r,o,i,a,s){if(a==0||a==e.height)return!1;let l=!1;for(let c=o;c<i;c++){const u=a*e.width+c,d=e.map[u];if(e.map[u-e.width]==d){l=!0;const f=n.nodeAt(d),{top:p,left:m}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(s).map(d+r),null,{...f.attrs,rowspan:a-p}),t.insert(t.mapping.slice(s).map(e.positionAt(a,m,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-a})),c+=f.attrs.colspan-1}}return l}function a0(t,e,n,r,o,i,a,s){if(a==0||a==e.width)return!1;let l=!1;for(let c=o;c<i;c++){const u=c*e.width+a,d=e.map[u];if(e.map[u-1]==d){l=!0;const f=n.nodeAt(d),p=e.colCount(d),m=t.mapping.slice(s).map(d+r);t.setNodeMarkup(m,null,Mi(f.attrs,a-p,f.attrs.colspan-(a-p))),t.insert(m+f.nodeSize,f.type.createAndFill(Mi(f.attrs,0,a-p))),c+=f.attrs.rowspan-1}}return l}function s0(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let a=Cn.get(i);const{top:s,left:l}=r,c=l+o.width,u=s+o.height,d=t.tr;let f=0;function p(){if(i=n?d.doc.nodeAt(n-1):d.doc,!i)throw new Error("No table found");a=Cn.get(i),f=d.mapping.maps.length}v4(d,a,i,n,c,u,f)&&p(),i0(d,a,i,n,l,c,s,f)&&p(),i0(d,a,i,n,l,c,u,f)&&p(),a0(d,a,i,n,s,u,l,f)&&p(),a0(d,a,i,n,s,u,c,f)&&p();for(let m=s;m<u;m++){const v=a.positionAt(m,l,i),g=a.positionAt(m,c,i);d.replace(d.mapping.slice(f).map(v+n),d.mapping.slice(f).map(g+n),new Ge(o.rows[m-s],0,0))}p(),d.setSelection(new un(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(u-1,c-1,i)))),e(d)}var b4=Ah({ArrowLeft:bl("horiz",-1),ArrowRight:bl("horiz",1),ArrowUp:bl("vert",-1),ArrowDown:bl("vert",1),"Shift-ArrowLeft":yl("horiz",-1),"Shift-ArrowRight":yl("horiz",1),"Shift-ArrowUp":yl("vert",-1),"Shift-ArrowDown":yl("vert",1),Backspace:vl,"Mod-Backspace":vl,Delete:vl,"Mod-Delete":vl});function Fl(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function bl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof un)return Fl(n,r,vt.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const a=Lw(o,t,e);if(a==null)return!1;if(t=="horiz")return Fl(n,r,vt.near(n.doc.resolve(i.head+e),e));{const s=n.doc.resolve(a),l=Aw(s,t,e);let c;return l?c=vt.near(l,1):e<0?c=vt.near(n.doc.resolve(s.before(-1)),-1):c=vt.near(n.doc.resolve(s.after(-1)),1),Fl(n,r,c)}}}function yl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let a;if(i instanceof un)a=i;else{const l=Lw(o,t,e);if(l==null)return!1;a=new un(n.doc.resolve(l))}const s=Aw(a.$headCell,t,e);return s?Fl(n,r,new un(a.$anchorCell,s)):!1}}function y4(t,e){const n=t.state.doc,r=Ma(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new un(r))),!0):!1}function C4(t,e,n){if(!Hr(t.state))return!1;let r=p4(n);const o=t.state.selection;if(o instanceof un){r||(r={width:1,height:1,rows:[Ne.from(vh(Yn(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=Cn.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=g4(r,s.right-s.left,s.bottom-s.top),s0(t.state,t.dispatch,a,s,r),!0}else if(r){const i=gu(t.state),a=i.start(-1);return s0(t.state,t.dispatch,a,Cn.get(i.node(-1)).findCell(i.pos-a),r),!0}else return!1}function S4(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=l0(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof un)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Ma(t.state.selection.$anchor))!=null&&((n=Id(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,c){let u=Id(t,c);const d=Po.getState(t.state)==null;if(!u||!Yp(l,u))if(d)u=l;else return;const f=new un(l,u);if(d||!t.state.selection.eq(f)){const p=t.state.tr.setSelection(f);d&&p.setMeta(Po,l.pos),t.dispatch(p)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",s),Po.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Po,-1))}function s(l){const c=l,u=Po.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(l0(t,c.target)!=r&&(d=Id(t,e),!d))return a();d&&i(d,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",s)}function Lw(t,e,n){if(!(t.state.selection instanceof gt))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const s=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?s:null}}return null}function l0(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Id(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Ma(t.state.doc.resolve(n.pos)):null}var x4=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),bh(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,bh(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function bh(t,e,n,r,o,i){var a;let s=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){const{colspan:p,colwidth:m}=u.child(d).attrs;for(let v=0;v<p;v++,f++){const g=o==f?i:m&&m[v],y=g?g+"px":"";if(s+=g||r,g||(l=!1),c)c.style.width!=y&&(c.style.width=y),c=c.nextSibling;else{const b=document.createElement("col");b.style.width=y,e.appendChild(b)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=d}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var fr=new vr("tableColumnResizing");function w4({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=x4,lastColumnResizable:o=!0}={}){const i=new Qn({key:fr,state:{init(a,s){var l,c;const u=(c=(l=i.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,d=Yn(s.schema).table.name;return r&&u&&(u[d]=(f,p)=>new r(f,n,p)),new E4(-1,!1)},apply(a,s){return s.apply(a)}},props:{attributes:a=>{const s=fr.getState(a);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,s)=>{$4(a,s,t,o)},mouseleave:a=>{O4(a)},mousedown:(a,s)=>{N4(a,s,e,n)}},decorations:a=>{const s=fr.getState(a);if(s&&s.activeHandle>-1)return P4(a,s.activeHandle)},nodeViews:{}}});return i}var E4=class Hl{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(fr);if(r&&r.setHandle!=null)return new Hl(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Hl(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return gh(e.doc.resolve(o))||(o=-1),new Hl(o,n.dragging)}return n}};function $4(t,e,n,r){if(!t.editable)return;const o=fr.getState(t.state);if(o&&!o.dragging){const i=I4(e.target);let a=-1;if(i){const{left:s,right:l}=i.getBoundingClientRect();e.clientX-s<=n?a=c0(t,e,"left",n):l-e.clientX<=n&&(a=c0(t,e,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const s=t.state.doc.resolve(a),l=s.node(-1),c=Cn.get(l),u=s.start(-1);if(c.colCount(s.pos-u)+s.nodeAfter.attrs.colspan-1==c.width-1)return}Fw(t,a)}}}function O4(t){if(!t.editable)return;const e=fr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Fw(t,-1)}function N4(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,a=fr.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const s=t.state.doc.nodeAt(a.activeHandle),l=M4(t,a.activeHandle,s.attrs);t.dispatch(t.state.tr.setMeta(fr,{setDragging:{startX:e.clientX,startWidth:l}}));function c(d){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",u);const f=fr.getState(t.state);f!=null&&f.dragging&&(R4(t,f.activeHandle,u0(f.dragging,d,n)),t.dispatch(t.state.tr.setMeta(fr,{setDragging:null})))}function u(d){if(!d.which)return c(d);const f=fr.getState(t.state);if(f&&f.dragging){const p=u0(f.dragging,d,n);d0(t,f.activeHandle,p,r)}}return d0(t,a.activeHandle,l,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",u),e.preventDefault(),!0}function M4(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(s-=r[c],l--);return s/l}function I4(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function c0(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:a}=i,s=Ma(t.state.doc.resolve(a));if(!s)return-1;if(n=="right")return s.pos;const l=Cn.get(s.node(-1)),c=s.start(-1),u=l.map.indexOf(s.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function u0(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Fw(t,e){t.dispatch(t.state.tr.setMeta(fr,{setHandle:e}))}function R4(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=Cn.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<i.height;c++){const u=c*i.width+s;if(c&&i.map[u]==i.map[u-i.width])continue;const d=i.map[u],f=o.nodeAt(d).attrs,p=f.colspan==1?0:s-i.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const m=f.colwidth?f.colwidth.slice():T4(f.colspan);m[p]=n,l.setNodeMarkup(a+d,null,{...f,colwidth:m})}l.docChanged&&t.dispatch(l)}function d0(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),a=o.start(-1),s=Cn.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let l=t.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&bh(i,l.firstChild,l,r,s,n)}function T4(t){return Array(t).fill(0)}function P4(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return bn.empty;const a=Cn.get(i),s=o.start(-1),l=a.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const u=l+c*a.width;if((l==a.width-1||a.map[u]!=a.map[u+1])&&(c==0||a.map[u]!=a.map[u-a.width])){const d=a.map[u],f=s+d+i.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=fr.getState(t))!=null&&n.dragging&&r.push(Zn.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),r.push(Zn.widget(f,p))}}return bn.create(t.doc,r)}function A4({allowTableNodeSelection:t=!1}={}){return new Qn({key:Po,state:{init(){return null},apply(e,n){const r=e.getMeta(Po);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:K5,handleDOMEvents:{mousedown:S4},createSelectionBetween(e){return Po.getState(e.state)!=null?e.state.selection:null},handleTripleClick:y4,handleKeyDown:b4,handlePaste:C4},appendTransaction(e,n,r){return X5(r,Bw(r,n),t)}})}function yh(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function f0(t,e,n,r,o,i){var a;let s=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u!==null)for(let d=0,f=0;d<u.childCount;d+=1){const{colspan:p,colwidth:m}=u.child(d).attrs;for(let v=0;v<p;v+=1,f+=1){const g=o===f?i:m&&m[v],y=g?`${g}px`:"";if(s+=g||r,g||(l=!1),c){if(c.style.width!==y){const[b,C]=yh(r,g);c.style.setProperty(b,C)}c=c.nextSibling}else{const b=document.createElement("col"),[C,x]=yh(r,g);b.style.setProperty(C,x),e.appendChild(b)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=d}l?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}class D4{constructor(e,n){this.node=e,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),f0(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,f0(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function k4(t,e,n,r){let o=0,i=!0;const a=[],s=t.firstChild;if(!s)return{};for(let d=0,f=0;d<s.childCount;d+=1){const{colspan:p,colwidth:m}=s.child(d).attrs;for(let v=0;v<p;v+=1,f+=1){const g=n===f?r:m&&m[v];o+=g||e,g||(i=!1);const[y,b]=yh(e,g);a.push(["col",{style:`${y}: ${b}`}])}}const l=i?`${o}px`:"",c=i?"":`${o}px`;return{colgroup:["colgroup",{},...a],tableWidth:l,tableMinWidth:c}}function h0(t,e){return t.createAndFill()}function _4(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function B4(t,e,n,r,o){const i=_4(t),a=[],s=[];for(let c=0;c<n;c+=1){const u=h0(i.cell);if(u&&s.push(u),r){const d=h0(i.header_cell);d&&a.push(d)}}const l=[];for(let c=0;c<e;c+=1)l.push(i.row.createChecked(null,r&&c===0?a:s));return i.table.createChecked(null,l)}function z4(t){return t instanceof un}const Cl=({editor:t})=>{const{selection:e}=t.state;if(!z4(e))return!1;let n=0;const r=iC(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},j4=Sn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:D4,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=k4(t,this.options.cellMinWidth);return["table",Zt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=B4(i.schema,t,e,n);if(o){const s=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(gt.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Q5(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Z5(t,e),deleteColumn:()=>({state:t,dispatch:e})=>t4(t,e),addRowBefore:()=>({state:t,dispatch:e})=>r4(t,e),addRowAfter:()=>({state:t,dispatch:e})=>o4(t,e),deleteRow:()=>({state:t,dispatch:e})=>a4(t,e),deleteTable:()=>({state:t,dispatch:e})=>h4(t,e),mergeCells:()=>({state:t,dispatch:e})=>t0(t,e),splitCell:()=>({state:t,dispatch:e})=>n0(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Es("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Es("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>d4(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>t0(t,e)?!0:n0(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>c4(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>o0(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>o0(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Bw(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=un.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Cl,"Mod-Backspace":Cl,Delete:Cl,"Mod-Delete":Cl}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[w4({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],A4({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:Mt(ut(t,"tableRole",e))}}}),L4=Sn.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Zt(this.options.HTMLAttributes,t),0]}}),F4=Sn.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Zt(this.options.HTMLAttributes,t),0]}}),H4=Sn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Zt(this.options.HTMLAttributes,t),0]}}),V4=/^\s*(\[([( |x])?\])\s$/,W4=Sn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Zt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),a=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:u}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:d})=>{const f=n();if(typeof f!="number")return!1;const p=d.doc.nodeAt(f);return d.setNodeMarkup(f,void 0,{...p==null?void 0:p.attrs,checked:u}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,u)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,u])=>{o.setAttribute(c,u)}),o.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,i.append(s,a),o.append(i,l),Object.entries(e).forEach(([c,u])=>{o.setAttribute(c,u)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,!0)}}},addInputRules(){return[da({find:V4,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),q4=Sn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Zt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),K4=Vn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),U4=to.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),G4=/^\s*>\s$/,X4=Sn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[da({find:G4,type:this.type})]}}),Y4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,J4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Q4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Z4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,e6=to.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[wi({find:Y4,type:this.type}),wi({find:Q4,type:this.type})]},addPasteRules(){return[Ei({find:J4,type:this.type}),Ei({find:Z4,type:this.type})]}}),t6="listItem",p0="textStyle",m0=/^\s*([-+*])\s$/,n6=Sn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(t6,this.editor.getAttributes(p0)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=da({find:m0,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=da({find:m0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(p0),editor:this.editor})),[t]}}),r6=/(^|[^`])`([^`]+)`(?!`)/,o6=/(^|[^`])`([^`]+)`(?!`)/g,i6=to.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[wi({find:r6,type:this.type})]},addPasteRules(){return[Ei({find:o6,type:this.type})]}}),a6=/^```([a-z]+)?[\s\n]$/,s6=/^~~~([a-z]+)?[\s\n]$/,l6=Sn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,i=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Zt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
|
|
635
|
-
|
|
636
|
-
`);return!i||!a?!1:t.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();return s===void 0?!1:r.nodeAt(s)?t.commands.command(({tr:c})=>(c.setSelection(vt.near(r.resolve(s))),!0)):t.commands.exitCode()}}},addInputRules(){return[Jd({find:a6,type:this.type,getAttributes:t=>({language:t[1]})}),Jd({find:s6,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Qn({key:new vr("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:a,schema:s}=t.state,l=s.text(n.replace(/\r\n?/g,`
|
|
637
|
-
`));return a.replaceSelectionWith(this.type.create({language:i},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(gt.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),c6=Sn.create({name:"doc",topNode:!0,content:"block+"});function u6(t={}){return new Qn({view(e){return new d6(e,t)}})}class d6{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=a=>{this[o](a)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let s=e.nodeBefore,l=e.nodeAfter;if(s||l){let c=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=s?u.bottom:u.top;s&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!r){let s=this.editorView.coordsAtPos(this.cursorPos);r={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let i,a;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,a=-pageYOffset;else{let s=o.getBoundingClientRect();i=s.left-o.scrollLeft,a=s.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=G0(this.editorView.state.doc,a,this.editorView.dragging.slice);s!=null&&(a=s)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const f6=Vn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[u6(this.options)]}});class yn extends vt{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return yn.valid(r)?new yn(r):vt.near(r)}content(){return Ge.empty}eq(e){return e instanceof yn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new yn(e.resolve(n.pos))}getBookmark(){return new Jp(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!h6(e)||!p6(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&yn.valid(e))return e;let o=e.pos,i=null;for(let a=e.depth;;a--){let s=e.node(a);if(n>0?e.indexAfter(a)<s.childCount:e.index(a)>0){i=s.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;o+=n;let l=e.doc.resolve(o);if(yn.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!mt.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=a,o+=n;let s=e.doc.resolve(o);if(yn.valid(s))return s}return null}}}yn.prototype.visible=!1;yn.findFrom=yn.findGapCursorFrom;vt.jsonID("gapcursor",yn);class Jp{constructor(e){this.pos=e}map(e){return new Jp(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yn.valid(n)?new yn(n):vt.near(n)}}function h6(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function p6(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function m6(){return new Qn({props:{decorations:y6,createSelectionBetween(t,e,n){return e.pos==n.pos&&yn.valid(n)?new yn(n):null},handleClick:v6,handleKeyDown:g6,handleDOMEvents:{beforeinput:b6}}})}const g6=Ah({ArrowLeft:Sl("horiz",-1),ArrowRight:Sl("horiz",1),ArrowUp:Sl("vert",-1),ArrowDown:Sl("vert",1)});function Sl(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let a=r.selection,s=e>0?a.$to:a.$from,l=a.empty;if(a instanceof gt){if(!i.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(e>0?s.after():s.before())}let c=yn.findGapCursorFrom(s,e,l);return c?(o&&o(r.tr.setSelection(new yn(c))),!0):!1}}function v6(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!yn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&mt.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yn(r))),!0)}function b6(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof yn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=Ne.empty;for(let a=r.length-1;a>=0;a--)o=Ne.from(r[a].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Ge(o,0,0));return i.setSelection(gt.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function y6(t){if(!(t.selection instanceof yn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",bn.create(t.doc,[Zn.widget(t.selection.head,e,{key:"gapcursor"})])}const C6=Vn.create({name:"gapCursor",addProseMirrorPlugins(){return[m6()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Mt(ut(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),S6=Sn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Zt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
638
|
-
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&a){const d=l.filter(f=>s.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),x6=Sn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Zt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Jd({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var wc=200,Bn=function(){};Bn.prototype.append=function(e){return e.length?(e=Bn.from(e),!this.length&&e||e.length<wc&&this.leafAppend(e)||this.length<wc&&e.leafPrepend(this)||this.appendInner(e)):this};Bn.prototype.prepend=function(e){return e.length?Bn.from(e).append(this):this};Bn.prototype.appendInner=function(e){return new w6(this,e)};Bn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Bn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Bn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Bn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Bn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(e(i,a))},n,r),o};Bn.from=function(e){return e instanceof Bn?e:e&&e.length?new Hw(e):Bn.empty};var Hw=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,a,s){for(var l=i;l<a;l++)if(o(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,a,s){for(var l=i-1;l>=a;l--)if(o(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=wc)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=wc)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Bn);Bn.empty=new Hw([]);var w6=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Bn);const E6=500;class Ar{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=e.tr,s,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new qr(d.map));let p=d.step.map(o.slice(i)),m;p&&a.maybeStep(p).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new qr(m,void 0,void 0,c.length+u.length))),i--,m&&o.appendMap(m,i)}else a.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(i)):d.selection,l=new Ar(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:s}}addTransform(e,n,r,o){let i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new qr(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}let c=a-r.depth;return c>O6&&(s=$6(s,c),a-=c),new Ar(s.append(i),a)}remapping(e,n){let r=new is;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Ar(this.items.append(e.map(n=>new qr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;a=Math.min(a,p);let m=i.maps[p];if(f.step){let v=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&s++,r.push(new qr(m,v,g))}else r.push(new qr(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new qr(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Ar(u,s);return d.emptyItemCount()>E6&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=e)o.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=a.selection&&a.selection.map(n.slice(r));u&&i++;let d=new qr(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else a.map&&r--},this.items.length,0),new Ar(Bn.from(o.reverse()),i)}}Ar.empty=new Ar(Bn.empty,0);function $6(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qr{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new qr(n.getMap().invert(),n,this.selection)}}}class Io{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const O6=20;function N6(t,e,n,r){let o=n.getMeta(yi),i;if(o)return o.historyState;n.getMeta(R6)&&(t=new Io(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(yi))return a.getMeta(yi).redo?new Io(t.done.addTransform(n,void 0,r,Vl(e)),t.undone,g0(n.mapping.maps),t.prevTime,t.prevComposition):new Io(t.done,t.undone.addTransform(n,void 0,r,Vl(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!M6(n,t.prevRanges)),c=a?Rd(t.prevRanges,n.mapping):g0(n.mapping.maps);return new Io(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Vl(e)),Ar.empty,c,n.time,s??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Io(t.done.rebased(n,i),t.undone.rebased(n,i),Rd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Io(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Rd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function M6(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function g0(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,a)=>e.push(i,a));return e}function Rd(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function I6(t,e,n){let r=Vl(e),o=yi.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),s=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new Io(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(yi,{redo:n,historyState:l})}let Td=!1,v0=null;function Vl(t){let e=t.plugins;if(v0!=e){Td=!1,v0=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Td=!0;break}}return Td}const yi=new vr("history"),R6=new vr("closeHistory");function T6(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Qn({key:yi,state:{init(){return new Io(Ar.empty,Ar.empty,null,0,-1)},apply(e,n,r){return N6(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Ww:r=="historyRedo"?qw:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function Vw(t,e){return(n,r)=>{let o=yi.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=I6(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Ww=Vw(!1,!0),qw=Vw(!0,!0),P6=Vn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Ww(t,e),redo:()=>({state:t,dispatch:e})=>qw(t,e)}},addProseMirrorPlugins(){return[T6(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),A6=Sn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Zt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):EM(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:a,dispatch:s})=>{var l;if(s){const{$to:c}=a.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(gt.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(mt.create(a.doc,c.pos)):a.setSelection(gt.create(a.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(a.insert(u,d),a.setSelection(gt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[tI({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),D6=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,k6=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,_6=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,B6=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,z6=to.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[wi({find:D6,type:this.type}),wi({find:_6,type:this.type})]},addPasteRules(){return[Ei({find:k6,type:this.type}),Ei({find:B6,type:this.type})]}}),j6="listItem",b0="textStyle",y0=/^(\d+)\.\s$/,L6=Sn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Zt(this.options.HTMLAttributes,n),0]:["ol",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(j6,this.editor.getAttributes(b0)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=da({find:y0,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=da({find:y0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(b0)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),F6=Sn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),H6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,V6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,W6=to.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[wi({find:H6,type:this.type})]},addPasteRules(){return[Ei({find:V6,type:this.type})]}}),q6=Sn.create({name:"text",group:"inline"}),K6=Vn.create({name:"starterKit",addExtensions(){var t,e,n,r,o,i,a,s,l,c,u,d,f,p,m,v,g,y;const b=[];return this.options.bold!==!1&&b.push(e6.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&b.push(X4.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&b.push(n6.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(i6.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(l6.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(c6.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&b.push(f6.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&b.push(C6.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&b.push(S6.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(x6.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(P6.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(A6.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(z6.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&b.push(Pw.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&b.push(L6.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&b.push(F6.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&b.push(W6.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(q6.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}});function Kw({title:t,childrenContent:e,editable:n,childrenEdit:r}){const[o,i]=$.useState(!1),a=n?pe.jsx(Uo,{children:pe.jsx(Uo.Item,{onClick:()=>i(!0),children:"Edit"},"edit")}):null;return pe.jsxs("div",{children:[n&&a?pe.jsx(mu,{dropdownRender:()=>a,trigger:["contextMenu"],children:e}):e,pe.jsx(Mr,{title:`Edit ${t}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r})]})}function U6({node:t,editor:e}){const[n,r]=$.useState(!1),[o,i]=$.useState(t.attrs.bgColor||"#f3f4f6"),[a,s]=$.useState(t.attrs.titleColor||"#000000"),l=d=>{d.preventDefault()},c=d=>{i(d.toHexString())},u=d=>{s(d.toHexString())};return pe.jsx(cC,{className:"accordion-wrapper",children:pe.jsx(Kw,{title:"Accordion",childrenContent:pe.jsxs("div",{className:"ce:my-4 ce:transition-all ce:duration-300 ce:border ce:rounded-lg ce:shadow-sm",onContextMenu:l,children:[pe.jsxs("div",{className:"ce:flex ce:items-center ce:justify-between ce:p-4 ce:transition-colors ce:accordion-header",style:{backgroundColor:o},onClick:()=>r(!n),children:[pe.jsx("input",{className:"ce:w-full ce:text-lg ce:font-medium ce:bg-transparent ce:border-none ce:outline-none",style:{color:a},defaultValue:t.attrs.title||"Accordion Title",disabled:!e.isEditable,suppressContentEditableWarning:!0,contentEditable:!0,placeholder:"Accordion title"}),pe.jsx(MV,{className:`ce:transition-transform ce:duration-300 ${n?"ce:rotate-180":""}`,size:20})]}),pe.jsx("div",{className:`ce:overflow-hidden ce:duration-300 ce:ease-in-out ${n?"ce:max-h-96 ce:opacity-100":"ce:max-h-0 ce:opacity-0"} `,children:pe.jsx("div",{className:"ce:p-4 ce:border-t",children:pe.jsx(wI,{contentEditable:e.isEditable})})})]}),editable:e.isEditable,childrenEdit:pe.jsxs("div",{className:"ce:px-6 ce:py-4 ce:space-y-6 ce:rounded-lg ce:bg-gray-50",children:[pe.jsxs("div",{className:"ce:grid ce:grid-cols-1 ce:gap-6",children:[pe.jsxs("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[pe.jsx("label",{className:"ce:font-medium ce:text-gray-700",children:"Background Color"}),pe.jsxs("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[pe.jsx("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:o}}),pe.jsx(xc,{value:o,onChange:c})]})]}),pe.jsxs("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[pe.jsx("label",{className:"ce:font-medium ce:text-gray-700",children:"Title Color"}),pe.jsxs("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[pe.jsx("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:a}}),pe.jsx(xc,{value:a,onChange:u})]})]})]}),pe.jsx("div",{className:"ce:pt-4 ce:border-t ce:border-gray-200",children:pe.jsxs("div",{className:"ce:p-3 ce:bg-white ce:border ce:rounded-md",children:[pe.jsx("div",{className:"ce:text-sm ce:text-gray-600",children:"Preview"}),pe.jsx("div",{className:"ce:p-2 ce:mt-2 ce:rounded",style:{backgroundColor:o},children:pe.jsx("span",{style:{color:a,fontWeight:500},children:"Accordion Title"})})]})})]})})})}const G6=Sn.create({name:"accordion",group:"block",content:"block+",atom:!1,draggable:!0,selectable:!0,inline:!1,defining:!0,addAttributes(){return{title:{default:"Accordion Title"},bgColor:{default:"#f3f4f6"},titleColor:{default:"#000000"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:t}){return["accordion",Zt(t)]},addNodeView(){return uC(U6)},addCommands(){return{setAccordion:t=>({chain:e})=>e().insertContent({type:"accordion",attrs:t,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function X6({node:t,updateAttributes:e,editor:n}){const[r,o]=$.useState({width:t.attrs.width??50,height:t.attrs.height??"auto"}),[i,a]=$.useState({left:t.attrs.marginLeft??"0%",right:t.attrs.marginRight??"0%"}),[s,l]=$.useState(t.attrs.src||""),c=$.useRef(null);$.useEffect(()=>{if(t.attrs.src&&c.current){const f=new Image;f.onload=()=>{t.attrs.width===void 0&&o({width:100,height:"auto"})},f.src=t.attrs.src}},[t.attrs.src,t.attrs.width,t.attrs.height]);const u=()=>{e({src:s,width:r.width,height:r.height,marginLeft:i.left,marginRight:i.right})},d=f=>{f.preventDefault()};return pe.jsx(cC,{className:"image-wrapper ce:w-full",children:pe.jsx(Kw,{title:"Image",childrenContent:pe.jsx("div",{className:"ce:relative ce:w-full ce:max-w-full ce:overflow-hidden",style:{marginLeft:i.left+"%",marginRight:i.right+"%"},onContextMenu:d,children:pe.jsx("img",{ref:c,src:t.attrs.src,alt:"Uploaded",className:"ce:w-full ce:h-auto ce:object-contain ce:inline-block",style:{width:r.width+"%",height:r.height==="auto"?"auto":r.height+"%",maxWidth:"100%"},draggable:!1})}),editable:n.isEditable,childrenEdit:pe.jsxs("div",{className:"ce:space-y-4",children:[pe.jsxs("div",{children:[pe.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Image URL"}),pe.jsx(ho,{type:"text",value:s,onChange:f=>l(f.target.value),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable})]}),pe.jsxs("div",{className:"ce:flex ce:gap-4",children:[pe.jsxs("div",{className:"ce:flex-1",children:[pe.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Width (%)"}),pe.jsx(ho,{type:"number",value:r.width,onChange:f=>o({...r,width:Number(f.target.value)}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]}),pe.jsxs("div",{className:"ce:flex-1",children:[pe.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Height"}),pe.jsxs(ur,{value:r.height,onChange:f=>o({...r,height:f}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable,children:[pe.jsx(ur.Option,{value:"auto",children:"Auto"}),pe.jsx(ur.Option,{value:"25",children:"25%"}),pe.jsx(ur.Option,{value:"50",children:"50%"}),pe.jsx(ur.Option,{value:"75",children:"75%"}),pe.jsx(ur.Option,{value:"100",children:"100%"})]})]})]}),pe.jsxs("div",{className:"ce:flex ce:gap-4",children:[pe.jsxs("div",{className:"ce:flex-1",children:[pe.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Left (%)"}),pe.jsx(ho,{type:"number",value:i.left,onChange:f=>a({...i,left:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]}),pe.jsxs("div",{className:"ce:flex-1",children:[pe.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Right (%)"}),pe.jsx(ho,{type:"number",value:i.right,onChange:f=>a({...i,right:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]})]}),pe.jsx("button",{type:"button",onClick:u,className:"ce:w-full ce:py-2 ce:px-4 ce:bg-indigo-600 ce:text-white ce:rounded-md ce:hover:bg-indigo-700 ce:focus:outline-none ce:focus:ring-2 ce:focus:ring-indigo-500 ce:focus:ring-offset-2",disabled:!n.isEditable,children:"Update Image"})]})})})}const Y6=Sn.create({name:"image",group:"block",content:"inline*",atom:!0,draggable:!0,selectable:!0,addAttributes(){return{src:{default:null},width:{default:50},height:{default:"auto"},marginLeft:{default:0},marginRight:{default:0}}},parseHTML(){return[{tag:"img",getAttrs:t=>t instanceof HTMLElement?{src:t.getAttribute("src"),width:t.getAttribute("width")?Number(t.getAttribute("width")):50,height:t.getAttribute("height")||"auto",marginLeft:t.getAttribute("marginleft")?Number(t.getAttribute("marginleft")):0,marginRight:t.getAttribute("marginright")?Number(t.getAttribute("marginright")):0}:null}]},renderHTML({HTMLAttributes:t}){return["img",Zt(t)]},addNodeView(){return uC(X6)},addCommands(){return{setImage:t=>({chain:e})=>e().insertContent({type:"image",attrs:{...t,width:(t==null?void 0:t.width)??50,height:(t==null?void 0:t.height)??"auto"}}).run()}}}),J6=[T5.configure({types:[Zb.name,Pw.name]}),Zb,D5.configure({multicolor:!0}),K6.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),U4,k5,_5,K4.configure({types:["heading","paragraph"]}),q4,W4,j4.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),H4,F4,L4.configure({HTMLAttributes:{class:"table-cell"}}),Y6,G6];function Q6({content:t="",slotBefore:e=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const a=SI({extensions:J6,content:t,editable:o,onUpdate:({editor:s})=>{i==null||i(s.getHTML())}});return $.useEffect(()=>{a&&t!==a.getHTML()&&a.commands.setContent(t,!1)},[a,t]),a?pe.jsxs("div",{className:ee(Uw["cyber-editor"],n),children:[e&&pe.jsx(I5,{editor:a}),pe.jsx(dI,{editor:a,className:r})]}):pe.jsx(fE,{full:!0})}exports.EditorProvider=Q6;
|