operp-print-designer 1.0.9 → 1.1.2

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.
@@ -1,4 +1,4 @@
1
- (function(Ne,oe){typeof exports=="object"&&typeof module<"u"?oe(exports,require("react"),require("antd"),require("@ant-design/icons"),require("react-to-print"),require("zustand"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons","react-to-print","zustand","react-dom"],oe):(Ne=typeof globalThis<"u"?globalThis:Ne||self,oe(Ne.PrintDesigner={},Ne.React,Ne.antd,Ne.icons,Ne.ReactToPrint,Ne.zustand,Ne.ReactDOM))})(this,(function(Ne,oe,k,Te,tr,ln,Mt){"use strict";function cn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function un(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var n=r.default;if(typeof n=="function"){var a=function o(){return this instanceof o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(r).forEach(function(o){var h=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(a,o,h.get?h:{enumerable:!0,get:function(){return r[o]}})}),a}var vt={exports:{}},ot={};/**
1
+ (function(Ae,se){typeof exports=="object"&&typeof module<"u"?se(exports,require("react"),require("antd"),require("@ant-design/icons"),require("react-to-print"),require("zustand"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons","react-to-print","zustand","react-dom"],se):(Ae=typeof globalThis<"u"?globalThis:Ae||self,se(Ae.PrintDesigner={},Ae.React,Ae.antd,Ae.icons,Ae.ReactToPrint,Ae.zustand,Ae.ReactDOM))})(this,(function(Ae,se,E,Oe,nr,un,It){"use strict";function dn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function fn(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var i=n.default;if(typeof i=="function"){var o=function a(){return this instanceof a?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};o.prototype=i.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(n).forEach(function(a){var c=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(o,a,c.get?c:{enumerable:!0,get:function(){return n[a]}})}),o}var vt={exports:{}},it={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var rr;function dn(){if(rr)return ot;rr=1;var r=oe,n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,h=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function x(O,y,R){var C,E={},_=null,A=null;R!==void 0&&(_=""+R),y.key!==void 0&&(_=""+y.key),y.ref!==void 0&&(A=y.ref);for(C in y)o.call(y,C)&&!u.hasOwnProperty(C)&&(E[C]=y[C]);if(O&&O.defaultProps)for(C in y=O.defaultProps,y)E[C]===void 0&&(E[C]=y[C]);return{$$typeof:n,type:O,key:_,ref:A,props:E,_owner:h.current}}return ot.Fragment=a,ot.jsx=x,ot.jsxs=x,ot}var it={},nr;function fn(){if(nr)return it;nr=1;var r={};/**
9
+ */var or;function pn(){if(or)return it;or=1;var n=se,i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function x(_,b,v){var R,P={},C=null,L=null;v!==void 0&&(C=""+v),b.key!==void 0&&(C=""+b.key),b.ref!==void 0&&(L=b.ref);for(R in b)a.call(b,R)&&!u.hasOwnProperty(R)&&(P[R]=b[R]);if(_&&_.defaultProps)for(R in b=_.defaultProps,b)P[R]===void 0&&(P[R]=b[R]);return{$$typeof:i,type:_,key:C,ref:L,props:P,_owner:c.current}}return it.Fragment=o,it.jsx=x,it.jsxs=x,it}var st={},ir;function hn(){if(ir)return st;ir=1;var n={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,54 +14,54 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */return r.NODE_ENV!=="production"&&(function(){var n=oe,a=Symbol.for("react.element"),o=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),y=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),p=Symbol.iterator,l="@@iterator";function e(g){if(g===null||typeof g!="object")return null;var B=p&&g[p]||g[l];return typeof B=="function"?B:null}var t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(g){{for(var B=arguments.length,te=new Array(B>1?B-1:0),de=1;de<B;de++)te[de-1]=arguments[de];f("error",g,te)}}function f(g,B,te){{var de=t.ReactDebugCurrentFrame,_e=de.getStackAddendum();_e!==""&&(B+="%s",te=te.concat([_e]));var De=te.map(function(we){return String(we)});De.unshift("Warning: "+B),Function.prototype.apply.call(console[g],console,De)}}var i=!1,b=!1,j=!1,P=!1,z=!1,N;N=Symbol.for("react.module.reference");function F(g){return!!(typeof g=="string"||typeof g=="function"||g===h||g===x||z||g===u||g===C||g===E||P||g===T||i||b||j||typeof g=="object"&&g!==null&&(g.$$typeof===A||g.$$typeof===_||g.$$typeof===O||g.$$typeof===y||g.$$typeof===R||g.$$typeof===N||g.getModuleId!==void 0))}function Z(g,B,te){var de=g.displayName;if(de)return de;var _e=B.displayName||B.name||"";return _e!==""?te+"("+_e+")":te}function K(g){return g.displayName||"Context"}function Q(g){if(g==null)return null;if(typeof g.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case h:return"Fragment";case o:return"Portal";case x:return"Profiler";case u:return"StrictMode";case C:return"Suspense";case E:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case y:var B=g;return K(B)+".Consumer";case O:var te=g;return K(te._context)+".Provider";case R:return Z(g,g.render,"ForwardRef");case _:var de=g.displayName||null;return de!==null?de:Q(g.type)||"Memo";case A:{var _e=g,De=_e._payload,we=_e._init;try{return Q(we(De))}catch{return null}}}return null}var V=Object.assign,X=0,J,ne,Se,ve,M,L,le;function ie(){}ie.__reactDisabledLog=!0;function ce(){{if(X===0){J=console.log,ne=console.info,Se=console.warn,ve=console.error,M=console.group,L=console.groupCollapsed,le=console.groupEnd;var g={configurable:!0,enumerable:!0,value:ie,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}X++}}function pe(){{if(X--,X===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},g,{value:J}),info:V({},g,{value:ne}),warn:V({},g,{value:Se}),error:V({},g,{value:ve}),group:V({},g,{value:M}),groupCollapsed:V({},g,{value:L}),groupEnd:V({},g,{value:le})})}X<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=t.ReactCurrentDispatcher,I;function G(g,B,te){{if(I===void 0)try{throw Error()}catch(_e){var de=_e.stack.trim().match(/\n( *(at )?)/);I=de&&de[1]||""}return`
18
- `+I+g}}var ee=!1,$;{var ae=typeof WeakMap=="function"?WeakMap:Map;$=new ae}function W(g,B){if(!g||ee)return"";{var te=$.get(g);if(te!==void 0)return te}var de;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var De;De=ue.current,ue.current=null,ce();try{if(B){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(He){de=He}Reflect.construct(g,[],we)}else{try{we.call()}catch(He){de=He}g.call(we.prototype)}}else{try{throw Error()}catch(He){de=He}g()}}catch(He){if(He&&de&&typeof He.stack=="string"){for(var ye=He.stack.split(`
17
+ */return n.NODE_ENV!=="production"&&(function(){var i=se,o=Symbol.for("react.element"),a=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),b=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),y=Symbol.iterator,d="@@iterator";function r(h){if(h===null||typeof h!="object")return null;var F=y&&h[y]||h[d];return typeof F=="function"?F:null}var t=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function s(h){{for(var F=arguments.length,te=new Array(F>1?F-1:0),de=1;de<F;de++)te[de-1]=arguments[de];f("error",h,te)}}function f(h,F,te){{var de=t.ReactDebugCurrentFrame,Pe=de.getStackAddendum();Pe!==""&&(F+="%s",te=te.concat([Pe]));var ze=te.map(function(Se){return String(Se)});ze.unshift("Warning: "+F),Function.prototype.apply.call(console[h],console,ze)}}var l=!1,w=!1,O=!1,D=!1,M=!1,H;H=Symbol.for("react.module.reference");function T(h){return!!(typeof h=="string"||typeof h=="function"||h===c||h===x||M||h===u||h===R||h===P||D||h===k||l||w||O||typeof h=="object"&&h!==null&&(h.$$typeof===L||h.$$typeof===C||h.$$typeof===_||h.$$typeof===b||h.$$typeof===v||h.$$typeof===H||h.getModuleId!==void 0))}function N(h,F,te){var de=h.displayName;if(de)return de;var Pe=F.displayName||F.name||"";return Pe!==""?te+"("+Pe+")":te}function G(h){return h.displayName||"Context"}function X(h){if(h==null)return null;if(typeof h.tag=="number"&&s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case c:return"Fragment";case a:return"Portal";case x:return"Profiler";case u:return"StrictMode";case R:return"Suspense";case P:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case b:var F=h;return G(F)+".Consumer";case _:var te=h;return G(te._context)+".Provider";case v:return N(h,h.render,"ForwardRef");case C:var de=h.displayName||null;return de!==null?de:X(h.type)||"Memo";case L:{var Pe=h,ze=Pe._payload,Se=Pe._init;try{return X(Se(ze))}catch{return null}}}return null}var V=Object.assign,J=0,K,re,be,ge,I,W,ie;function oe(){}oe.__reactDisabledLog=!0;function ae(){{if(J===0){K=console.log,re=console.info,be=console.warn,ge=console.error,I=console.group,W=console.groupCollapsed,ie=console.groupEnd;var h={configurable:!0,enumerable:!0,value:oe,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}J++}}function fe(){{if(J--,J===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},h,{value:K}),info:V({},h,{value:re}),warn:V({},h,{value:be}),error:V({},h,{value:ge}),group:V({},h,{value:I}),groupCollapsed:V({},h,{value:W}),groupEnd:V({},h,{value:ie})})}J<0&&s("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=t.ReactCurrentDispatcher,A;function U(h,F,te){{if(A===void 0)try{throw Error()}catch(Pe){var de=Pe.stack.trim().match(/\n( *(at )?)/);A=de&&de[1]||""}return`
18
+ `+A+h}}var ee=!1,Z;{var ce=typeof WeakMap=="function"?WeakMap:Map;Z=new ce}function B(h,F){if(!h||ee)return"";{var te=Z.get(h);if(te!==void 0)return te}var de;ee=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ze;ze=ue.current,ue.current=null,ae();try{if(F){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(He){de=He}Reflect.construct(h,[],Se)}else{try{Se.call()}catch(He){de=He}h.call(Se.prototype)}}else{try{throw Error()}catch(He){de=He}h()}}catch(He){if(He&&de&&typeof He.stack=="string"){for(var ve=He.stack.split(`
19
19
  `),We=de.stack.split(`
20
- `),Me=ye.length-1,Le=We.length-1;Me>=1&&Le>=0&&ye[Me]!==We[Le];)Le--;for(;Me>=1&&Le>=0;Me--,Le--)if(ye[Me]!==We[Le]){if(Me!==1||Le!==1)do if(Me--,Le--,Le<0||ye[Me]!==We[Le]){var Be=`
21
- `+ye[Me].replace(" at new "," at ");return g.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",g.displayName)),typeof g=="function"&&$.set(g,Be),Be}while(Me>=1&&Le>=0);break}}}finally{ee=!1,ue.current=De,pe(),Error.prepareStackTrace=_e}var nt=g?g.displayName||g.name:"",Je=nt?G(nt):"";return typeof g=="function"&&$.set(g,Je),Je}function he(g,B,te){return W(g,!1)}function ze(g){var B=g.prototype;return!!(B&&B.isReactComponent)}function xe(g,B,te){if(g==null)return"";if(typeof g=="function")return W(g,ze(g));if(typeof g=="string")return G(g);switch(g){case C:return G("Suspense");case E:return G("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case R:return he(g.render);case _:return xe(g.type,B,te);case A:{var de=g,_e=de._payload,De=de._init;try{return xe(De(_e),B,te)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,m={},v=t.ReactDebugCurrentFrame;function S(g){if(g){var B=g._owner,te=xe(g.type,g._source,B?B.type:null);v.setExtraStackFrame(te)}else v.setExtraStackFrame(null)}function H(g,B,te,de,_e){{var De=Function.call.bind(Ae);for(var we in g)if(De(g,we)){var ye=void 0;try{if(typeof g[we]!="function"){var We=Error((de||"React class")+": "+te+" type `"+we+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[we]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw We.name="Invariant Violation",We}ye=g[we](B,we,de,te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ye=Me}ye&&!(ye instanceof Error)&&(S(_e),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",de||"React class",te,we,typeof ye),S(null)),ye instanceof Error&&!(ye.message in m)&&(m[ye.message]=!0,S(_e),c("Failed %s type: %s",te,ye.message),S(null))}}}var re=Array.isArray;function U(g){return re(g)}function se(g){{var B=typeof Symbol=="function"&&Symbol.toStringTag,te=B&&g[Symbol.toStringTag]||g.constructor.name||"Object";return te}}function ge(g){try{return je(g),!1}catch{return!0}}function je(g){return""+g}function d(g){if(ge(g))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",se(g)),je(g)}var w=t.ReactCurrentOwner,D={key:!0,ref:!0,__self:!0,__source:!0},q,Y;function Ce(g){if(Ae.call(g,"ref")){var B=Object.getOwnPropertyDescriptor(g,"ref").get;if(B&&B.isReactWarning)return!1}return g.ref!==void 0}function me(g){if(Ae.call(g,"key")){var B=Object.getOwnPropertyDescriptor(g,"key").get;if(B&&B.isReactWarning)return!1}return g.key!==void 0}function Pe(g,B){typeof g.ref=="string"&&w.current}function ke(g,B){{var te=function(){q||(q=!0,c("%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://reactjs.org/link/special-props)",B))};te.isReactWarning=!0,Object.defineProperty(g,"key",{get:te,configurable:!0})}}function Ye(g,B){{var te=function(){Y||(Y=!0,c("%s: `ref` 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://reactjs.org/link/special-props)",B))};te.isReactWarning=!0,Object.defineProperty(g,"ref",{get:te,configurable:!0})}}var $e=function(g,B,te,de,_e,De,we){var ye={$$typeof:a,type:g,key:B,ref:te,props:we,_owner:De};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_e}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function yt(g,B,te,de,_e){{var De,we={},ye=null,We=null;te!==void 0&&(d(te),ye=""+te),me(B)&&(d(B.key),ye=""+B.key),Ce(B)&&(We=B.ref,Pe(B,_e));for(De in B)Ae.call(B,De)&&!D.hasOwnProperty(De)&&(we[De]=B[De]);if(g&&g.defaultProps){var Me=g.defaultProps;for(De in Me)we[De]===void 0&&(we[De]=Me[De])}if(ye||We){var Le=typeof g=="function"?g.displayName||g.name||"Unknown":g;ye&&ke(we,Le),We&&Ye(we,Le)}return $e(g,ye,We,_e,de,w.current,we)}}var Qe=t.ReactCurrentOwner,Zt=t.ReactDebugCurrentFrame;function Ve(g){if(g){var B=g._owner,te=xe(g.type,g._source,B?B.type:null);Zt.setExtraStackFrame(te)}else Zt.setExtraStackFrame(null)}var et;et=!1;function tt(g){return typeof g=="object"&&g!==null&&g.$$typeof===a}function rt(){{if(Qe.current){var g=Q(Qe.current.type);if(g)return`
20
+ `),Ie=ve.length-1,Ne=We.length-1;Ie>=1&&Ne>=0&&ve[Ie]!==We[Ne];)Ne--;for(;Ie>=1&&Ne>=0;Ie--,Ne--)if(ve[Ie]!==We[Ne]){if(Ie!==1||Ne!==1)do if(Ie--,Ne--,Ne<0||ve[Ie]!==We[Ne]){var Be=`
21
+ `+ve[Ie].replace(" at new "," at ");return h.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",h.displayName)),typeof h=="function"&&Z.set(h,Be),Be}while(Ie>=1&&Ne>=0);break}}}finally{ee=!1,ue.current=ze,fe(),Error.prepareStackTrace=Pe}var ot=h?h.displayName||h.name:"",Je=ot?U(ot):"";return typeof h=="function"&&Z.set(h,Je),Je}function he(h,F,te){return B(h,!1)}function ke(h){var F=h.prototype;return!!(F&&F.isReactComponent)}function we(h,F,te){if(h==null)return"";if(typeof h=="function")return B(h,ke(h));if(typeof h=="string")return U(h);switch(h){case R:return U("Suspense");case P:return U("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case v:return he(h.render);case C:return we(h.type,F,te);case L:{var de=h,Pe=de._payload,ze=de._init;try{return we(ze(Pe),F,te)}catch{}}}return""}var Le=Object.prototype.hasOwnProperty,g={},m=t.ReactDebugCurrentFrame;function j(h){if(h){var F=h._owner,te=we(h.type,h._source,F?F.type:null);m.setExtraStackFrame(te)}else m.setExtraStackFrame(null)}function q(h,F,te,de,Pe){{var ze=Function.call.bind(Le);for(var Se in h)if(ze(h,Se)){var ve=void 0;try{if(typeof h[Se]!="function"){var We=Error((de||"React class")+": "+te+" type `"+Se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[Se]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw We.name="Invariant Violation",We}ve=h[Se](F,Se,de,te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ie){ve=Ie}ve&&!(ve instanceof Error)&&(j(Pe),s("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",de||"React class",te,Se,typeof ve),j(null)),ve instanceof Error&&!(ve.message in g)&&(g[ve.message]=!0,j(Pe),s("Failed %s type: %s",te,ve.message),j(null))}}}var ne=Array.isArray;function Q(h){return ne(h)}function le(h){{var F=typeof Symbol=="function"&&Symbol.toStringTag,te=F&&h[Symbol.toStringTag]||h.constructor.name||"Object";return te}}function ye(h){try{return Ce(h),!1}catch{return!0}}function Ce(h){return""+h}function p(h){if(ye(h))return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",le(h)),Ce(h)}var S=t.ReactCurrentOwner,z={key:!0,ref:!0,__self:!0,__source:!0},Y,$;function Ee(h){if(Le.call(h,"ref")){var F=Object.getOwnPropertyDescriptor(h,"ref").get;if(F&&F.isReactWarning)return!1}return h.ref!==void 0}function me(h){if(Le.call(h,"key")){var F=Object.getOwnPropertyDescriptor(h,"key").get;if(F&&F.isReactWarning)return!1}return h.key!==void 0}function Te(h,F){typeof h.ref=="string"&&S.current}function Me(h,F){{var te=function(){Y||(Y=!0,s("%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://reactjs.org/link/special-props)",F))};te.isReactWarning=!0,Object.defineProperty(h,"key",{get:te,configurable:!0})}}function Ge(h,F){{var te=function(){$||($=!0,s("%s: `ref` 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://reactjs.org/link/special-props)",F))};te.isReactWarning=!0,Object.defineProperty(h,"ref",{get:te,configurable:!0})}}var $e=function(h,F,te,de,Pe,ze,Se){var ve={$$typeof:o,type:h,key:F,ref:te,props:Se,_owner:ze};return ve._store={},Object.defineProperty(ve._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ve,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ve,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(ve.props),Object.freeze(ve)),ve};function mt(h,F,te,de,Pe){{var ze,Se={},ve=null,We=null;te!==void 0&&(p(te),ve=""+te),me(F)&&(p(F.key),ve=""+F.key),Ee(F)&&(We=F.ref,Te(F,Pe));for(ze in F)Le.call(F,ze)&&!z.hasOwnProperty(ze)&&(Se[ze]=F[ze]);if(h&&h.defaultProps){var Ie=h.defaultProps;for(ze in Ie)Se[ze]===void 0&&(Se[ze]=Ie[ze])}if(ve||We){var Ne=typeof h=="function"?h.displayName||h.name||"Unknown":h;ve&&Me(Se,Ne),We&&Ge(Se,Ne)}return $e(h,ve,We,Pe,de,S.current,Se)}}var et=t.ReactCurrentOwner,er=t.ReactDebugCurrentFrame;function Ve(h){if(h){var F=h._owner,te=we(h.type,h._source,F?F.type:null);er.setExtraStackFrame(te)}else er.setExtraStackFrame(null)}var tt;tt=!1;function rt(h){return typeof h=="object"&&h!==null&&h.$$typeof===o}function nt(){{if(et.current){var h=X(et.current.type);if(h)return`
22
22
 
23
- Check the render method of \``+g+"`."}return""}}function Qt(g){return""}var rn={};function ho(g){{var B=rt();if(!B){var te=typeof g=="string"?g:g.displayName||g.name;te&&(B=`
23
+ Check the render method of \``+h+"`."}return""}}function tr(h){return""}var on={};function vo(h){{var F=nt();if(!F){var te=typeof h=="string"?h:h.displayName||h.name;te&&(F=`
24
24
 
25
- Check the top-level render call using <`+te+">.")}return B}}function nn(g,B){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var te=ho(B);if(rn[te])return;rn[te]=!0;var de="";g&&g._owner&&g._owner!==Qe.current&&(de=" It was passed a child from "+Q(g._owner.type)+"."),Ve(g),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',te,de),Ve(null)}}function on(g,B){{if(typeof g!="object")return;if(U(g))for(var te=0;te<g.length;te++){var de=g[te];tt(de)&&nn(de,B)}else if(tt(g))g._store&&(g._store.validated=!0);else if(g){var _e=e(g);if(typeof _e=="function"&&_e!==g.entries)for(var De=_e.call(g),we;!(we=De.next()).done;)tt(we.value)&&nn(we.value,B)}}}function go(g){{var B=g.type;if(B==null||typeof B=="string")return;var te;if(typeof B=="function")te=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===R||B.$$typeof===_))te=B.propTypes;else return;if(te){var de=Q(B);H(te,g.props,"prop",de,g)}else if(B.PropTypes!==void 0&&!et){et=!0;var _e=Q(B);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mo(g){{for(var B=Object.keys(g.props),te=0;te<B.length;te++){var de=B[te];if(de!=="children"&&de!=="key"){Ve(g),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),Ve(null);break}}g.ref!==null&&(Ve(g),c("Invalid attribute `ref` supplied to `React.Fragment`."),Ve(null))}}var sn={};function an(g,B,te,de,_e,De){{var we=F(g);if(!we){var ye="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var We=Qt();We?ye+=We:ye+=rt();var Me;g===null?Me="null":U(g)?Me="array":g!==void 0&&g.$$typeof===a?(Me="<"+(Q(g.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof g,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ye)}var Le=yt(g,B,te,_e,De);if(Le==null)return Le;if(we){var Be=B.children;if(Be!==void 0)if(de)if(U(Be)){for(var nt=0;nt<Be.length;nt++)on(Be[nt],g);Object.freeze&&Object.freeze(Be)}else c("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 on(Be,g)}if(Ae.call(B,"key")){var Je=Q(g),He=Object.keys(B).filter(function(So){return So!=="key"}),er=He.length>0?"{key: someKey, "+He.join(": ..., ")+": ...}":"{key: someKey}";if(!sn[Je+er]){var wo=He.length>0?"{"+He.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+te+">.")}return F}}function sn(h,F){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var te=vo(F);if(on[te])return;on[te]=!0;var de="";h&&h._owner&&h._owner!==et.current&&(de=" It was passed a child from "+X(h._owner.type)+"."),Ve(h),s('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',te,de),Ve(null)}}function an(h,F){{if(typeof h!="object")return;if(Q(h))for(var te=0;te<h.length;te++){var de=h[te];rt(de)&&sn(de,F)}else if(rt(h))h._store&&(h._store.validated=!0);else if(h){var Pe=r(h);if(typeof Pe=="function"&&Pe!==h.entries)for(var ze=Pe.call(h),Se;!(Se=ze.next()).done;)rt(Se.value)&&sn(Se.value,F)}}}function bo(h){{var F=h.type;if(F==null||typeof F=="string")return;var te;if(typeof F=="function")te=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===v||F.$$typeof===C))te=F.propTypes;else return;if(te){var de=X(F);q(te,h.props,"prop",de,h)}else if(F.PropTypes!==void 0&&!tt){tt=!0;var Pe=X(F);s("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&s("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xo(h){{for(var F=Object.keys(h.props),te=0;te<F.length;te++){var de=F[te];if(de!=="children"&&de!=="key"){Ve(h),s("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),Ve(null);break}}h.ref!==null&&(Ve(h),s("Invalid attribute `ref` supplied to `React.Fragment`."),Ve(null))}}var ln={};function cn(h,F,te,de,Pe,ze){{var Se=T(h);if(!Se){var ve="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(ve+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var We=tr();We?ve+=We:ve+=nt();var Ie;h===null?Ie="null":Q(h)?Ie="array":h!==void 0&&h.$$typeof===o?(Ie="<"+(X(h.type)||"Unknown")+" />",ve=" Did you accidentally export a JSX literal instead of a component?"):Ie=typeof h,s("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ie,ve)}var Ne=mt(h,F,te,Pe,ze);if(Ne==null)return Ne;if(Se){var Be=F.children;if(Be!==void 0)if(de)if(Q(Be)){for(var ot=0;ot<Be.length;ot++)an(Be[ot],h);Object.freeze&&Object.freeze(Be)}else s("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 an(Be,h)}if(Le.call(F,"key")){var Je=X(h),He=Object.keys(F).filter(function(Ro){return Ro!=="key"}),rr=He.length>0?"{key: someKey, "+He.join(": ..., ")+": ...}":"{key: someKey}";if(!ln[Je+rr]){var Oo=He.length>0?"{"+He.join(": ..., ")+": ...}":"{}";s(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,er,Je,wo,Je),sn[Je+er]=!0}}return g===h?mo(Le):go(Le),Le}}function yo(g,B,te){return an(g,B,te,!0)}function vo(g,B,te){return an(g,B,te,!1)}var bo=vo,xo=yo;it.Fragment=h,it.jsx=bo,it.jsxs=xo})(),it}var or;function pn(){if(or)return vt.exports;or=1;var r={};return r.NODE_ENV==="production"?vt.exports=dn():vt.exports=fn(),vt.exports}var s=pn();const bt={A4:{width:210,height:297},A3:{width:297,height:420},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6}},ir={paperSize:"A4",customWidth:210,customHeight:297,orientation:"portrait",marginTop:10,marginRight:10,marginBottom:10,marginLeft:10,showHeader:!1,headerContent:"页眉文字",showFooter:!1,footerContent:"页脚文字",showPageNumber:!0,pageNumberFormat:"第 {page} 页"},Ee=3,xt={cellSize:1,cols:100},sr={text:"文本",image:"图片",table:"表格",barcode:"条形码",line:"分割线"},hn={text:{content:"双击编辑文字",fontSize:14,fontWeight:"normal",fontStyle:"normal",textAlign:"left",color:"#000000",backgroundColor:"transparent"},image:{src:"",fit:"contain",content:""},table:{rows:3,cols:3,borderWidth:1,borderColor:"#000000",content:""},barcode:{value:"1234567890",format:"CODE128",content:""},line:{color:"#000000",thickness:1,style:"solid",content:""}};let It=0,At=0;function ar(){return`comp_${++It}`}function lr(){return`ds_${++At}`}const fe=ln.create((r,n)=>({components:[],selectedId:null,pageSettings:{...ir},gridSettings:{...xt},previewVisible:!1,templateName:"未命名模板",headerFooterVisible:!1,dataSources:[],activeDataSourceId:null,addComponent:(a,o,h)=>{const u=ar(),x=sr[a]||a,O={...hn[a]||{}};a==="text"&&(O.content=x);const y={id:u,type:a,x:o??0,y:h??0,w:a==="line"?20:15,h:a==="line"?1:8,props:O,...a==="table"?{tableColumns:[{title:"列1"},{title:"列2"},{title:"列3"}]}:{}};r(R=>({components:[...R.components,y],selectedId:u}))},updateComponent:(a,o)=>{r(h=>({components:h.components.map(u=>u.id===a?{...u,...o}:u)}))},selectComponent:a=>{r({selectedId:a})},removeComponent:a=>{r(o=>({components:o.components.filter(h=>h.id!==a),selectedId:o.selectedId===a?null:o.selectedId}))},setComponents:a=>{r({components:a})},setPageSettings:a=>{r(o=>({pageSettings:{...o.pageSettings,...a}}))},setPreviewVisible:a=>{r({previewVisible:a})},setTemplateName:a=>{r({templateName:a})},setHeaderFooterVisible:a=>{r({headerFooterVisible:a})},addDataSource:(a,o,h)=>{const x={id:lr(),name:a,type:o,data:h,createdAt:Date.now()};r(O=>({dataSources:[...O.dataSources,x]}))},updateDataSource:(a,o)=>{r(h=>({dataSources:h.dataSources.map(u=>u.id===a?{...u,...o}:u)}))},removeDataSource:a=>{r(o=>({dataSources:o.dataSources.filter(h=>h.id!==a),activeDataSourceId:o.activeDataSourceId===a?null:o.activeDataSourceId}))},setActiveDataSourceId:a=>{r({activeDataSourceId:a})},updateComponentTableColumns:(a,o)=>{r(h=>({components:h.components.map(u=>u.id===a?{...u,tableColumns:o}:u)}))},exportJSON:()=>{const a=n(),o={version:"1.0",templateName:a.templateName,pageSettings:a.pageSettings,components:a.components.map(({id:h,...u})=>u),dataSources:a.dataSources.map(({id:h,...u})=>u)};return JSON.stringify(o,null,2)},importJSON:a=>{try{const o=JSON.parse(a);if(!o.version||!o.pageSettings||!Array.isArray(o.components))return"JSON 格式不正确,缺少必要字段";It=0,At=0;const h=o.components.map(x=>({...x,id:ar()})),u=(o.dataSources||[]).map(x=>({...x,id:lr()}));return r({components:h,dataSources:u,pageSettings:o.pageSettings,templateName:o.templateName||"导入的模板",selectedId:null,activeDataSourceId:null}),null}catch{return"JSON 解析失败,请检查文件内容"}},reset:()=>{It=0,At=0,r({components:[],selectedId:null,pageSettings:{...ir},gridSettings:{...xt},templateName:"未命名模板",headerFooterVisible:!1,previewVisible:!1,dataSources:[],activeDataSourceId:null})}})),{Text:jo}=k.Typography,gn=({onCustomSave:r,onCustomPrint:n})=>{const a=fe(t=>t.templateName),o=fe(t=>t.setTemplateName),h=fe(t=>t.setPreviewVisible),u=fe(t=>t.setHeaderFooterVisible),x=fe(t=>t.selectedId),O=fe(t=>t.removeComponent),y=fe(t=>t.exportJSON),R=fe(t=>t.importJSON),C=fe(t=>t.reset),E=oe.useRef(null),{message:_}=k.App.useApp(),A=oe.useCallback(()=>{x&&O(x)},[x,O]),T=oe.useCallback(()=>{const t=y(),c=new Blob([t],{type:"application/json"}),f=URL.createObjectURL(c),i=document.createElement("a");i.href=f,i.download=`${a||"模板"}.json`,i.click(),URL.revokeObjectURL(f),_.success("模板已导出")},[y,a,_]),p=oe.useCallback(()=>{var t;(t=E.current)==null||t.click()},[]),l=oe.useCallback(t=>{var i;const c=(i=t.target.files)==null?void 0:i[0];if(!c)return;const f=new FileReader;f.onload=()=>{const b=R(f.result);b?_.error(b):_.success("模板已导入")},f.readAsText(c),t.target.value=""},[R,_]),e=oe.useCallback(()=>{C(),_.info("已新建空白模板")},[C,_]);return s.jsxs("div",{style:{height:48,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:[s.jsx(k.Space,{children:s.jsx(k.Input,{value:a,onChange:t=>o(t.target.value),variant:"borderless",style:{width:200,fontSize:16,fontWeight:600},placeholder:"模板名称"})}),s.jsxs(k.Space,{children:[s.jsx(k.Button,{icon:s.jsx(Te.PlusOutlined,{}),onClick:e,children:"新建"}),s.jsx("input",{ref:E,type:"file",accept:".json",style:{display:"none"},onChange:l}),r?s.jsx(k.Button,{icon:s.jsx(Te.SaveOutlined,{}),onClick:r,type:"primary",children:"保存"}):s.jsx(k.Button,{icon:s.jsx(Te.DownloadOutlined,{}),onClick:T,children:"导出"}),s.jsx(k.Button,{icon:s.jsx(Te.UploadOutlined,{}),onClick:p,children:"导入"}),s.jsx(k.Button,{icon:s.jsx(Te.SettingOutlined,{}),onClick:()=>u(!0),children:"页眉页脚"}),s.jsx(k.Button,{danger:!0,icon:s.jsx(Te.DeleteOutlined,{}),disabled:!x,onClick:A,children:"删除"}),n?s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.PrinterOutlined,{}),onClick:n,children:"打印"}):s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.EyeOutlined,{}),onClick:()=>h(!0),children:"预览"})]})]})},{Text:qe}=k.Typography,mn=()=>{const r=fe(u=>u.pageSettings),n=fe(u=>u.setPageSettings),a=r.paperSize==="custom",o=oe.useCallback(u=>{n({paperSize:u})},[n]),h=oe.useCallback(u=>{n({orientation:u})},[n]);return s.jsx(k.Card,{title:"页面设置",size:"small",children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:12},children:"纸张大小"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:r.paperSize,onChange:o,options:[...Object.keys(bt).map(u=>({value:u,label:u})),{value:"custom",label:"自定义"}]})]}),a&&s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(qe,{style:{fontSize:12},children:"宽度 (mm)"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.customWidth,min:10,max:2e3,onChange:u=>n({customWidth:u??210})})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(qe,{style:{fontSize:12},children:"高度 (mm)"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.customHeight,min:10,max:2e3,onChange:u=>n({customHeight:u??297})})]})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:12},children:"方向"}),s.jsxs(k.Radio.Group,{value:r.orientation,onChange:u=>h(u.target.value),size:"small",style:{width:"100%",display:"flex"},children:[s.jsx(k.Radio.Button,{value:"portrait",style:{flex:1,textAlign:"center"},children:"纵向"}),s.jsx(k.Radio.Button,{value:"landscape",style:{flex:1,textAlign:"center"},children:"横向"})]})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:12},children:"页边距 (mm)"}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"上"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginTop,min:0,max:100,onChange:u=>n({marginTop:u??10})})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"右"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginRight,min:0,max:100,onChange:u=>n({marginRight:u??10})})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"下"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginBottom,min:0,max:100,onChange:u=>n({marginBottom:u??10})})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"左"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginLeft,min:0,max:100,onChange:u=>n({marginLeft:u??10})})]})]})]})]})})},{Text:yn}=k.Typography,vn=[{type:"text",icon:s.jsx(Te.FontSizeOutlined,{}),label:"文本"},{type:"image",icon:s.jsx(Te.PictureOutlined,{}),label:"图片"},{type:"table",icon:s.jsx(Te.TableOutlined,{}),label:"表格"},{type:"barcode",icon:s.jsx(Te.BarcodeOutlined,{}),label:"条形码"},{type:"line",icon:s.jsx(Te.MinusOutlined,{}),label:"分割线"}],bn=()=>{const r=fe(o=>o.addComponent),n=oe.useCallback((o,h)=>{o.dataTransfer.setData("componentType",h),o.dataTransfer.effectAllowed="copy"},[]),a=oe.useCallback(o=>{r(o)},[r]);return s.jsx(k.Card,{title:"组件面板",size:"small",children:s.jsx(k.Space,{direction:"vertical",style:{width:"100%"},size:4,children:vn.map(o=>s.jsxs("div",{draggable:!0,onDragStart:h=>n(h,o.type),onClick:()=>a(o.type),style:{cursor:"grab",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:6,display:"flex",alignItems:"center",gap:8,background:"#fafafa",userSelect:"none",transition:"all 0.2s"},onMouseEnter:h=>{h.currentTarget.style.background="#e6f4ff",h.currentTarget.style.borderColor="#1677ff"},onMouseLeave:h=>{h.currentTarget.style.background="#fafafa",h.currentTarget.style.borderColor="#d9d9d9"},children:[o.icon,s.jsx(yn,{children:o.label})]},o.type))})})};function st(r){try{return JSON.parse(r)}catch{return null}}function at(r,n,a){const o=`${n}Binding`,h=r.props[o];if(h&&h.dataSourceId&&h.fieldPath){const x=a.find(O=>O.id===h.dataSourceId);if(x){const O=St(x);if(O){const y=wt(O,h.fieldPath);if(y)return y}}}return r.props[n]||(h==null?void 0:h.staticValue)||""}function wt(r,n){if(!r||!n)return"";try{const a=n.split(".");let o=r;for(const h of a){if(typeof o!="object"||o===null)return"";o=o[h]}return o!=null?String(o):""}catch{return""}}function St(r){const n=st(r.data);return r.type==="object"&&n&&typeof n=="object"&&!Array.isArray(n)?n:null}function jt(r){const n=st(r.data);return r.type==="array"&&Array.isArray(n)?n:null}const{TextArea:xn}=k.Input,{Text:Rt,Title:Ro}=k.Typography,cr=JSON.stringify({name:"张三",age:28,department:"技术部",email:"zhangsan@example.com"},null,2),wn=JSON.stringify([{id:1,product:"商品A",quantity:2,price:100},{id:2,product:"商品B",quantity:5,price:80},{id:3,product:"商品C",quantity:1,price:200}],null,2),Sn=()=>{const r=fe(_=>_.dataSources),n=fe(_=>_.addDataSource),a=fe(_=>_.updateDataSource),o=fe(_=>_.removeDataSource),[h,u]=oe.useState(!1),[x,O]=oe.useState(null),[y,R]=oe.useState({name:"",type:"object",data:""}),C=_=>{_?(O(_.id),R({name:_.name,type:_.type,data:_.data})):(O(null),R({name:"新数据源",type:"object",data:cr})),u(!0)},E=()=>{const _=st(y.data);if(_===null){k.message.error("JSON 格式不正确");return}if(y.type==="object"&&(Array.isArray(_)||typeof _!="object")){k.message.error("对象类型数据源必须为对象格式");return}if(y.type==="array"&&!Array.isArray(_)){k.message.error("数组类型数据源必须为数组格式");return}x?(a(x,y),k.message.success("数据源已更新")):(n(y.name,y.type,y.data),k.message.success("数据源已添加")),u(!1)};return s.jsxs(k.Card,{title:"数据源",size:"small",extra:s.jsx(k.Button,{type:"link",size:"small",icon:s.jsx(Te.PlusOutlined,{}),onClick:()=>C(),children:"添加"}),children:[s.jsx(k.List,{size:"small",dataSource:r,locale:{emptyText:"暂无数据源"},renderItem:_=>s.jsx(k.List.Item,{actions:[s.jsx(k.Dropdown,{menu:{items:[{key:"edit",label:"编辑",icon:s.jsx(Te.EditOutlined,{}),onClick:()=>C(_)},{type:"divider"},{key:"delete",label:s.jsx(k.Popconfirm,{title:"确定要删除这个数据源吗?",onConfirm:A=>{A==null||A.stopPropagation(),o(_.id),k.message.success("已删除")},okText:"确定",cancelText:"取消",onCancel:A=>A==null?void 0:A.stopPropagation(),children:s.jsx("span",{style:{color:"#ff4d4f",cursor:"pointer"},children:"删除"})}),icon:s.jsx(Te.DeleteOutlined,{style:{color:"#ff4d4f"}})}]},placement:"bottomRight",children:s.jsx(k.Button,{type:"text",size:"small",icon:s.jsx(Te.MoreOutlined,{})})})],children:s.jsx(k.List.Item.Meta,{avatar:s.jsx(Te.DatabaseOutlined,{}),title:s.jsx(Rt,{strong:!0,children:_.name}),description:s.jsx(k.Space,{size:4,children:s.jsx(k.Tag,{color:_.type==="object"?"blue":"green",children:_.type==="object"?"对象":"数组"})})})})}),s.jsx(k.Modal,{title:x?"编辑数据源":"添加数据源",open:h,onOk:E,onCancel:()=>u(!1),okText:"保存",cancelText:"取消",children:s.jsxs(k.Space,{direction:"vertical",style:{width:"100%"},size:"middle",children:[s.jsxs("div",{children:[s.jsx(Rt,{strong:!0,style:{display:"block",marginBottom:4},children:"名称"}),s.jsx(k.Input,{placeholder:"请输入数据源名称",value:y.name,onChange:_=>R({...y,name:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(Rt,{strong:!0,style:{display:"block",marginBottom:4},children:"类型"}),s.jsx(k.Select,{options:[{label:"对象",value:"object"},{label:"数组",value:"array"}],style:{width:"100%"},value:y.type,onChange:_=>{R({...y,type:_,data:_==="object"?cr:wn})}})]}),s.jsx(k.Divider,{style:{margin:"8px 0"}}),s.jsxs("div",{children:[s.jsx(Rt,{strong:!0,style:{display:"block",marginBottom:4},children:"JSON 数据"}),s.jsx(xn,{rows:12,placeholder:"请输入 JSON 数据",value:y.data,onChange:_=>R({...y,data:_.target.value})})]})]})})]})},jn=()=>s.jsx(k.Collapse,{bordered:!1,defaultActiveKey:["1","2"],expandIcon:({isActive:r})=>s.jsx(Te.CaretRightOutlined,{rotate:r?90:0}),style:{height:"100%",overflowY:"auto"},items:[{key:"1",label:"页面设置",children:s.jsx(mn,{})},{key:"2",label:"组件",children:s.jsx(bn,{})},{key:"3",label:"数据源",children:s.jsx(Sn,{})}]});var Lt={exports:{}},lt={},ct={exports:{}},Rn=ct.exports,ur;function Nt(){return ur||(ur=1,(function(r,n){(function(a,o){o(n)})(Rn,(function(a){function o(I){return function(ee,$,ae,W,he,ze,xe){return I(ee,$,xe)}}function h(I){return function(ee,$,ae,W){if(!ee||!$||typeof ee!="object"||typeof $!="object")return I(ee,$,ae,W);var he=W.get(ee),ze=W.get($);if(he&&ze)return he===$&&ze===ee;W.set(ee,$),W.set($,ee);var xe=I(ee,$,ae,W);return W.delete(ee),W.delete($),xe}}function u(I,G){var ee={};for(var $ in I)ee[$]=I[$];for(var $ in G)ee[$]=G[$];return ee}function x(I){return I.constructor===Object||I.constructor==null}function O(I){return typeof I.then=="function"}function y(I,G){return I===G||I!==I&&G!==G}var R="[object Arguments]",C="[object Boolean]",E="[object Date]",_="[object RegExp]",A="[object Map]",T="[object Number]",p="[object Object]",l="[object Set]",e="[object String]",t=Object.prototype.toString;function c(I){var G=I.areArraysEqual,ee=I.areDatesEqual,$=I.areMapsEqual,ae=I.areObjectsEqual,W=I.areRegExpsEqual,he=I.areSetsEqual,ze=I.createIsNestedEqual,xe=ze(Ae);function Ae(m,v,S){if(m===v)return!0;if(!m||!v||typeof m!="object"||typeof v!="object")return m!==m&&v!==v;if(x(m)&&x(v))return ae(m,v,xe,S);var H=Array.isArray(m),re=Array.isArray(v);if(H||re)return H===re&&G(m,v,xe,S);var U=t.call(m);return U!==t.call(v)?!1:U===E?ee(m,v,xe,S):U===_?W(m,v,xe,S):U===A?$(m,v,xe,S):U===l?he(m,v,xe,S):U===p||U===R?O(m)||O(v)?!1:ae(m,v,xe,S):U===C||U===T||U===e?y(m.valueOf(),v.valueOf()):!1}return Ae}function f(I,G,ee,$){var ae=I.length;if(G.length!==ae)return!1;for(;ae-- >0;)if(!ee(I[ae],G[ae],ae,ae,I,G,$))return!1;return!0}var i=h(f);function b(I,G){return y(I.valueOf(),G.valueOf())}function j(I,G,ee,$){var ae=I.size===G.size;if(!ae)return!1;if(!I.size)return!0;var W={},he=0;return I.forEach(function(ze,xe){if(ae){var Ae=!1,m=0;G.forEach(function(v,S){!Ae&&!W[m]&&(Ae=ee(xe,S,he,m,I,G,$)&&ee(ze,v,xe,S,I,G,$))&&(W[m]=!0),m++}),he++,ae=Ae}}),ae}var P=h(j),z="_owner",N=Object.prototype.hasOwnProperty;function F(I,G,ee,$){var ae=Object.keys(I),W=ae.length;if(Object.keys(G).length!==W)return!1;for(var he;W-- >0;){if(he=ae[W],he===z){var ze=!!I.$$typeof,xe=!!G.$$typeof;if((ze||xe)&&ze!==xe)return!1}if(!N.call(G,he)||!ee(I[he],G[he],he,he,I,G,$))return!1}return!0}var Z=h(F);function K(I,G){return I.source===G.source&&I.flags===G.flags}function Q(I,G,ee,$){var ae=I.size===G.size;if(!ae)return!1;if(!I.size)return!0;var W={};return I.forEach(function(he,ze){if(ae){var xe=!1,Ae=0;G.forEach(function(m,v){!xe&&!W[Ae]&&(xe=ee(he,m,ze,v,I,G,$))&&(W[Ae]=!0),Ae++}),ae=xe}}),ae}var V=h(Q),X=Object.freeze({areArraysEqual:f,areDatesEqual:b,areMapsEqual:j,areObjectsEqual:F,areRegExpsEqual:K,areSetsEqual:Q,createIsNestedEqual:o}),J=Object.freeze({areArraysEqual:i,areDatesEqual:b,areMapsEqual:P,areObjectsEqual:Z,areRegExpsEqual:K,areSetsEqual:V,createIsNestedEqual:o}),ne=c(X);function Se(I,G){return ne(I,G,void 0)}var ve=c(u(X,{createIsNestedEqual:function(){return y}}));function M(I,G){return ve(I,G,void 0)}var L=c(J);function le(I,G){return L(I,G,new WeakMap)}var ie=c(u(J,{createIsNestedEqual:function(){return y}}));function ce(I,G){return ie(I,G,new WeakMap)}function pe(I){return c(u(X,I(X)))}function ue(I){var G=c(u(J,I(J)));return(function(ee,$,ae){return ae===void 0&&(ae=new WeakMap),G(ee,$,ae)})}a.circularDeepEqual=le,a.circularShallowEqual=ce,a.createCustomCircularEqual=ue,a.createCustomEqual=pe,a.deepEqual=Se,a.sameValueZeroEqual=y,a.shallowEqual=M,Object.defineProperty(a,"__esModule",{value:!0})}))})(ct,ct.exports)),ct.exports}var Ot={exports:{}},dr;function Ct(){if(dr)return Ot.exports;dr=1;function r(a){var o,h,u="";if(typeof a=="string"||typeof a=="number")u+=a;else if(typeof a=="object")if(Array.isArray(a)){var x=a.length;for(o=0;o<x;o++)a[o]&&(h=r(a[o]))&&(u&&(u+=" "),u+=h)}else for(h in a)a[h]&&(u&&(u+=" "),u+=h);return u}function n(){for(var a,o,h=0,u="",x=arguments.length;h<x;h++)(a=arguments[h])&&(o=r(a))&&(u&&(u+=" "),u+=o);return u}return Ot.exports=n,Ot.exports.clsx=n,Ot.exports}var be={},Wt,fr;function On(){return fr||(fr=1,Wt=function(n,a,o){return n===a?!0:n.className===a.className&&o(n.style,a.style)&&n.width===a.width&&n.autoSize===a.autoSize&&n.cols===a.cols&&n.draggableCancel===a.draggableCancel&&n.draggableHandle===a.draggableHandle&&o(n.verticalCompact,a.verticalCompact)&&o(n.compactType,a.compactType)&&o(n.layout,a.layout)&&o(n.margin,a.margin)&&o(n.containerPadding,a.containerPadding)&&n.rowHeight===a.rowHeight&&n.maxRows===a.maxRows&&n.isBounded===a.isBounded&&n.isDraggable===a.isDraggable&&n.isResizable===a.isResizable&&n.allowOverlap===a.allowOverlap&&n.preventCollision===a.preventCollision&&n.useCSSTransforms===a.useCSSTransforms&&n.transformScale===a.transformScale&&n.isDroppable===a.isDroppable&&o(n.resizeHandles,a.resizeHandles)&&o(n.resizeHandle,a.resizeHandle)&&n.onLayoutChange===a.onLayoutChange&&n.onDragStart===a.onDragStart&&n.onDrag===a.onDrag&&n.onDragStop===a.onDragStop&&n.onResizeStart===a.onResizeStart&&n.onResize===a.onResize&&n.onResizeStop===a.onResizeStop&&n.onDrop===a.onDrop&&o(n.droppingItem,a.droppingItem)&&o(n.innerRef,a.innerRef)}),Wt}var pr;function Ke(){if(pr)return be;pr=1;var r={};Object.defineProperty(be,"__esModule",{value:!0}),be.bottom=C,be.childrenEqual=p,be.cloneLayout=E,be.cloneLayoutItem=T,be.collides=e,be.compact=t,be.compactItem=i,be.compactType=ze,be.correctBounds=b,be.fastPositionEqual=l,be.fastRGLPropsEqual=void 0,be.getAllCollisions=z,be.getFirstCollision=P,be.getLayoutItem=j,be.getStatics=N,be.modifyLayout=_,be.moveElement=F,be.moveElementAwayFromCollision=Z,be.noop=void 0,be.perc=K,be.resizeItemInDirection=ue,be.setTopLeft=G,be.setTransform=I,be.sortLayoutItems=ee,be.sortLayoutItemsByColRow=ae,be.sortLayoutItemsByRowCol=$,be.synchronizeLayoutWithChildren=W,be.validateLayout=he,be.withLayoutItem=A;var n=Nt(),a=o(oe);function o(m){return m&&m.__esModule?m:{default:m}}function h(m,v){var S=Object.keys(m);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(m);v&&(H=H.filter(function(re){return Object.getOwnPropertyDescriptor(m,re).enumerable})),S.push.apply(S,H)}return S}function u(m){for(var v=1;v<arguments.length;v++){var S=arguments[v]!=null?arguments[v]:{};v%2?h(Object(S),!0).forEach(function(H){x(m,H,S[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(S)):h(Object(S)).forEach(function(H){Object.defineProperty(m,H,Object.getOwnPropertyDescriptor(S,H))})}return m}function x(m,v,S){return(v=O(v))in m?Object.defineProperty(m,v,{value:S,enumerable:!0,configurable:!0,writable:!0}):m[v]=S,m}function O(m){var v=y(m,"string");return typeof v=="symbol"?v:v+""}function y(m,v){if(typeof m!="object"||!m)return m;var S=m[Symbol.toPrimitive];if(S!==void 0){var H=S.call(m,v);if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(m)}const R=r.NODE_ENV==="production";function C(m){let v=0,S;for(let H=0,re=m.length;H<re;H++)S=m[H].y+m[H].h,S>v&&(v=S);return v}function E(m){const v=Array(m.length);for(let S=0,H=m.length;S<H;S++)v[S]=T(m[S]);return v}function _(m,v){const S=Array(m.length);for(let H=0,re=m.length;H<re;H++)v.i===m[H].i?S[H]=v:S[H]=m[H];return S}function A(m,v,S){let H=j(m,v);return H?(H=S(T(H)),m=_(m,H),[m,H]):[m,null]}function T(m){return{w:m.w,h:m.h,x:m.x,y:m.y,i:m.i,minW:m.minW,maxW:m.maxW,minH:m.minH,maxH:m.maxH,moved:!!m.moved,static:!!m.static,isDraggable:m.isDraggable,isResizable:m.isResizable,resizeHandles:m.resizeHandles,isBounded:m.isBounded}}function p(m,v){return(0,n.deepEqual)(a.default.Children.map(m,S=>S==null?void 0:S.key),a.default.Children.map(v,S=>S==null?void 0:S.key))&&(0,n.deepEqual)(a.default.Children.map(m,S=>S==null?void 0:S.props["data-grid"]),a.default.Children.map(v,S=>S==null?void 0:S.props["data-grid"]))}be.fastRGLPropsEqual=On();function l(m,v){return m.left===v.left&&m.top===v.top&&m.width===v.width&&m.height===v.height}function e(m,v){return!(m.i===v.i||m.x+m.w<=v.x||m.x>=v.x+v.w||m.y+m.h<=v.y||m.y>=v.y+v.h)}function t(m,v,S,H){const re=N(m);let U=C(re);const se=ee(m,v),ge=Array(m.length);for(let je=0,d=se.length;je<d;je++){let w=T(se[je]);w.static||(w=i(re,w,v,S,se,H,U),U=Math.max(U,w.y+w.h),re.push(w)),ge[m.indexOf(se[je])]=w,w.moved=!1}return ge}const c={x:"w",y:"h"};function f(m,v,S,H){const re=c[H];v[H]+=1;const U=m.map(se=>se.i).indexOf(v.i);for(let se=U+1;se<m.length;se++){const ge=m[se];if(!ge.static){if(ge.y>v.y+v.h)break;e(v,ge)&&f(m,ge,S+v[re],H)}}v[H]=S}function i(m,v,S,H,re,U,se){const ge=S==="vertical",je=S==="horizontal";if(ge)for(typeof se=="number"?v.y=Math.min(se,v.y):v.y=Math.min(C(m),v.y);v.y>0&&!P(m,v);)v.y--;else if(je)for(;v.x>0&&!P(m,v);)v.x--;let d;for(;(d=P(m,v))&&!(S===null&&U);)if(je?f(re,v,d.x+d.w,"x"):f(re,v,d.y+d.h,"y"),je&&v.x+v.w>H)for(v.x=H-v.w,v.y++;v.x>0&&!P(m,v);)v.x--;return v.y=Math.max(v.y,0),v.x=Math.max(v.x,0),v}function b(m,v){const S=N(m);for(let H=0,re=m.length;H<re;H++){const U=m[H];if(U.x+U.w>v.cols&&(U.x=v.cols-U.w),U.x<0&&(U.x=0,U.w=v.cols),!U.static)S.push(U);else for(;P(S,U);)U.y++}return m}function j(m,v){for(let S=0,H=m.length;S<H;S++)if(m[S].i===v)return m[S]}function P(m,v){for(let S=0,H=m.length;S<H;S++)if(e(m[S],v))return m[S]}function z(m,v){return m.filter(S=>e(S,v))}function N(m){return m.filter(v=>v.static)}function F(m,v,S,H,re,U,se,ge,je){if(v.static&&v.isDraggable!==!0||v.y===H&&v.x===S)return m;"Moving element ".concat(v.i," to [").concat(String(S),",").concat(String(H),"] from [").concat(v.x,",").concat(v.y,"]");const d=v.x,w=v.y;typeof S=="number"&&(v.x=S),typeof H=="number"&&(v.y=H),v.moved=!0;let D=ee(m,se);(se==="vertical"&&typeof H=="number"?w>=H:se==="horizontal"&&typeof S=="number"?d>=S:!1)&&(D=D.reverse());const Y=z(D,v),Ce=Y.length>0;if(Ce&&je)return E(m);if(Ce&&U)return"Collision prevented on ".concat(v.i,", reverting."),v.x=d,v.y=w,v.moved=!1,m;for(let me=0,Pe=Y.length;me<Pe;me++){const ke=Y[me];"Resolving collision between ".concat(v.i," at [").concat(v.x,",").concat(v.y,"] and ").concat(ke.i," at [").concat(ke.x,",").concat(ke.y,"]"),!ke.moved&&(ke.static?m=Z(m,ke,v,re,se):m=Z(m,v,ke,re,se))}return m}function Z(m,v,S,H,re,U){const se=re==="horizontal",ge=re==="vertical",je=v.static;if(H){H=!1;const D={x:se?Math.max(v.x-S.w,0):S.x,y:ge?Math.max(v.y-S.h,0):S.y,w:S.w,h:S.h,i:"-1"},q=P(m,D),Y=q&&q.y+q.h>v.y,Ce=q&&v.x+v.w>q.x;if(q){if(Y&&ge)return F(m,S,void 0,S.y+1,H,je,re);if(Y&&re==null)return v.y=S.y,S.y=S.y+S.h,m;if(Ce&&se)return F(m,v,S.x,void 0,H,je,re)}else return"Doing reverse collision on ".concat(S.i," up to [").concat(D.x,",").concat(D.y,"]."),F(m,S,se?D.x:void 0,ge?D.y:void 0,H,je,re)}const d=se?S.x+1:void 0,w=ge?S.y+1:void 0;return d==null&&w==null?m:F(m,S,se?S.x+1:void 0,ge?S.y+1:void 0,H,je,re)}function K(m){return m*100+"%"}const Q=(m,v,S,H)=>m+S>H?v:S,V=(m,v,S)=>m<0?v:S,X=m=>Math.max(0,m),J=m=>Math.max(0,m),ne=(m,v,S)=>{let{left:H,height:re,width:U}=v;const se=m.top-(re-m.height);return{left:H,width:U,height:V(se,m.height,re),top:J(se)}},Se=(m,v,S)=>{let{top:H,left:re,height:U,width:se}=v;return{top:H,height:U,width:Q(m.left,m.width,se,S),left:X(re)}},ve=(m,v,S)=>{let{top:H,height:re,width:U}=v;const se=m.left-(U-m.width);return{height:re,width:se<0?m.width:Q(m.left,m.width,U,S),top:J(H),left:X(se)}},M=(m,v,S)=>{let{top:H,left:re,height:U,width:se}=v;return{width:se,left:re,height:V(H,m.height,U),top:J(H)}},pe={n:ne,ne:function(){return ne(arguments.length<=0?void 0:arguments[0],Se(...arguments))},e:Se,se:function(){return M(arguments.length<=0?void 0:arguments[0],Se(...arguments))},s:M,sw:function(){return M(arguments.length<=0?void 0:arguments[0],ve(...arguments))},w:ve,nw:function(){return ne(arguments.length<=0?void 0:arguments[0],ve(...arguments))}};function ue(m,v,S,H){const re=pe[m];return re?re(v,u(u({},v),S),H):S}function I(m){let{top:v,left:S,width:H,height:re}=m;const U="translate(".concat(S,"px,").concat(v,"px)");return{transform:U,WebkitTransform:U,MozTransform:U,msTransform:U,OTransform:U,width:"".concat(H,"px"),height:"".concat(re,"px"),position:"absolute"}}function G(m){let{top:v,left:S,width:H,height:re}=m;return{top:"".concat(v,"px"),left:"".concat(S,"px"),width:"".concat(H,"px"),height:"".concat(re,"px"),position:"absolute"}}function ee(m,v){return v==="horizontal"?ae(m):v==="vertical"?$(m):m}function $(m){return m.slice(0).sort(function(v,S){return v.y>S.y||v.y===S.y&&v.x>S.x?1:v.y===S.y&&v.x===S.x?0:-1})}function ae(m){return m.slice(0).sort(function(v,S){return v.x>S.x||v.x===S.x&&v.y>S.y?1:-1})}function W(m,v,S,H,re){m=m||[];const U=[];a.default.Children.forEach(v,ge=>{if((ge==null?void 0:ge.key)==null)return;const je=j(m,String(ge.key)),d=ge.props["data-grid"];je&&d==null?U.push(T(je)):d?(R||he([d],"ReactGridLayout.children"),U.push(T(u(u({},d),{},{i:ge.key})))):U.push(T({w:1,h:1,x:0,y:C(U),i:String(ge.key)}))});const se=b(U,{cols:S});return re?se:t(se,H,S)}function he(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const S=["x","y","w","h"];if(!Array.isArray(m))throw new Error(v+" must be an array!");for(let H=0,re=m.length;H<re;H++){const U=m[H];for(let se=0;se<S.length;se++){const ge=S[se],je=U[ge];if(typeof je!="number"||Number.isNaN(je))throw new Error("ReactGridLayout: ".concat(v,"[").concat(H,"].").concat(ge," must be a number! Received: ").concat(je," (").concat(typeof je,")"))}if(typeof U.i<"u"&&typeof U.i!="string")throw new Error("ReactGridLayout: ".concat(v,"[").concat(H,"].i must be a string! Received: ").concat(U.i," (").concat(typeof U.i,")"))}}function ze(m){const{verticalCompact:v,compactType:S}=m||{};return v===!1?null:S}function xe(){}const Ae=()=>{};return be.noop=Ae,be}var Fe={},hr;function Ht(){if(hr)return Fe;hr=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.calcGridColWidth=r,Fe.calcGridItemPosition=a,Fe.calcGridItemWHPx=n,Fe.calcWH=h,Fe.calcXY=o,Fe.clamp=u;function r(x){const{margin:O,containerPadding:y,containerWidth:R,cols:C}=x;return(R-O[0]*(C-1)-y[0]*2)/C}function n(x,O,y){return Number.isFinite(x)?Math.round(O*x+Math.max(0,x-1)*y):x}function a(x,O,y,R,C,E){const{margin:_,containerPadding:A,rowHeight:T}=x,p=r(x),l={};return E&&E.resizing?(l.width=Math.round(E.resizing.width),l.height=Math.round(E.resizing.height)):(l.width=n(R,p,_[0]),l.height=n(C,T,_[1])),E&&E.dragging?(l.top=Math.round(E.dragging.top),l.left=Math.round(E.dragging.left)):E&&E.resizing&&typeof E.resizing.top=="number"&&typeof E.resizing.left=="number"?(l.top=Math.round(E.resizing.top),l.left=Math.round(E.resizing.left)):(l.top=Math.round((T+_[1])*y+A[1]),l.left=Math.round((p+_[0])*O+A[0])),l}function o(x,O,y,R,C){const{margin:E,containerPadding:_,cols:A,rowHeight:T,maxRows:p}=x,l=r(x);let e=Math.round((y-_[0])/(l+E[0])),t=Math.round((O-_[1])/(T+E[1]));return e=u(e,0,A-R),t=u(t,0,p-C),{x:e,y:t}}function h(x,O,y,R,C,E){const{margin:_,maxRows:A,cols:T,rowHeight:p}=x,l=r(x);let e=Math.round((O+_[0])/(l+_[0])),t=Math.round((y+_[1])/(p+_[1])),c=u(e,0,T-R),f=u(t,0,A-C);return["sw","w","nw"].indexOf(E)!==-1&&(c=u(e,0,T)),["nw","n","ne"].indexOf(E)!==-1&&(f=u(t,0,A)),{w:c,h:f}}function u(x,O,y){return Math.max(Math.min(x,y),O)}return Fe}var ut={},_t={exports:{}},Et={exports:{}},Re={};/** @license React v16.13.1
30
+ <%s key={someKey} {...props} />`,rr,Je,Oo,Je),ln[Je+rr]=!0}}return h===c?xo(Ne):bo(Ne),Ne}}function wo(h,F,te){return cn(h,F,te,!0)}function So(h,F,te){return cn(h,F,te,!1)}var jo=So,Co=wo;st.Fragment=c,st.jsx=jo,st.jsxs=Co})(),st}var sr;function gn(){if(sr)return vt.exports;sr=1;var n={};return n.NODE_ENV==="production"?vt.exports=pn():vt.exports=hn(),vt.exports}var e=gn();const bt={A4:{width:210,height:297},A3:{width:297,height:420},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6}},ar={paperSize:"A4",customWidth:210,customHeight:297,orientation:"portrait",marginTop:10,marginRight:10,marginBottom:10,marginLeft:10,showHeader:!1,headerContent:"页眉文字",showFooter:!1,footerContent:"页脚文字",showPageNumber:!0,pageNumberFormat:"第 {page} 页"},De=3,xt={cellSize:1,cols:100},lr={text:"文本",image:"图片",table:"表格",barcode:"条形码",qrcode:"二维码",line:"分割线"},yn={text:{content:"双击编辑文字",fontSize:14,fontWeight:"normal",fontStyle:"normal",textAlign:"left",color:"#000000",backgroundColor:"transparent",format:""},image:{src:"",fit:"contain",content:""},table:{rows:3,cols:3,borderWidth:1,borderColor:"#000000",headerBackgroundColor:"#f5f5f5",headerColor:"#000000",headerFontSize:12,content:""},barcode:{value:"1234567890",format:"CODE128",content:""},qrcode:{value:"https://example.com",errorLevel:"M",color:"#000000",backgroundColor:"#ffffff",content:""},line:{color:"#000000",thickness:1,style:"solid",content:""}};let At=0,Lt=0;function cr(){return`comp_${++At}`}function ur(){return`ds_${++Lt}`}const pe=un.create((n,i)=>({components:[],selectedId:null,pageSettings:{...ar},gridSettings:{...xt},previewVisible:!1,templateName:"未命名模板",headerFooterVisible:!1,dataSources:[],activeDataSourceId:null,addComponent:(o,a,c)=>{const u=cr(),x=lr[o]||o,_={...yn[o]||{}};o==="text"&&(_.content=x);const b={id:u,type:o,x:a??0,y:c??0,w:o==="line"?20:o==="qrcode"?12:15,h:o==="line"?1:o==="qrcode"?12:8,props:_,...o==="table"?{tableColumns:[{title:"列1"},{title:"列2"},{title:"列3"}]}:{}};n(v=>({components:[...v.components,b],selectedId:u}))},updateComponent:(o,a)=>{n(c=>({components:c.components.map(u=>u.id===o?{...u,...a}:u)}))},selectComponent:o=>{n({selectedId:o})},removeComponent:o=>{n(a=>({components:a.components.filter(c=>c.id!==o),selectedId:a.selectedId===o?null:a.selectedId}))},setComponents:o=>{n({components:o})},setPageSettings:o=>{n(a=>({pageSettings:{...a.pageSettings,...o}}))},setPreviewVisible:o=>{n({previewVisible:o})},setTemplateName:o=>{n({templateName:o})},setHeaderFooterVisible:o=>{n({headerFooterVisible:o})},addDataSource:(o,a,c)=>{const x={id:ur(),name:o,type:a,data:c,createdAt:Date.now()};n(_=>({dataSources:[..._.dataSources,x]}))},updateDataSource:(o,a)=>{n(c=>({dataSources:c.dataSources.map(u=>u.id===o?{...u,...a}:u)}))},removeDataSource:o=>{n(a=>({dataSources:a.dataSources.filter(c=>c.id!==o),activeDataSourceId:a.activeDataSourceId===o?null:a.activeDataSourceId}))},setActiveDataSourceId:o=>{n({activeDataSourceId:o})},updateComponentTableColumns:(o,a)=>{n(c=>({components:c.components.map(u=>u.id===o?{...u,tableColumns:a}:u)}))},exportJSON:()=>{const o=i(),a={version:"1.0",templateName:o.templateName,pageSettings:o.pageSettings,components:o.components.map(({id:c,...u})=>u),dataSources:o.dataSources.map(({id:c,...u})=>u)};return JSON.stringify(a,null,2)},importJSON:o=>{try{const a=JSON.parse(o);if(!a.version||!a.pageSettings||!Array.isArray(a.components))return"JSON 格式不正确,缺少必要字段";At=0,Lt=0;const c=a.components.map(x=>({...x,id:cr()})),u=(a.dataSources||[]).map(x=>({...x,id:ur()}));return n({components:c,dataSources:u,pageSettings:a.pageSettings,templateName:a.templateName||"导入的模板",selectedId:null,activeDataSourceId:null}),null}catch{return"JSON 解析失败,请检查文件内容"}},reset:()=>{At=0,Lt=0,n({components:[],selectedId:null,pageSettings:{...ar},gridSettings:{...xt},templateName:"未命名模板",headerFooterVisible:!1,previewVisible:!1,dataSources:[],activeDataSourceId:null})}})),{Text:_o}=E.Typography,mn=({onCustomSave:n,onCustomPrint:i})=>{const o=pe(t=>t.templateName),a=pe(t=>t.setTemplateName),c=pe(t=>t.setPreviewVisible),u=pe(t=>t.setHeaderFooterVisible),x=pe(t=>t.selectedId),_=pe(t=>t.removeComponent),b=pe(t=>t.exportJSON),v=pe(t=>t.importJSON),R=pe(t=>t.reset),P=se.useRef(null),{message:C}=E.App.useApp(),L=se.useCallback(()=>{x&&_(x)},[x,_]),k=se.useCallback(()=>{const t=b(),s=new Blob([t],{type:"application/json"}),f=URL.createObjectURL(s),l=document.createElement("a");l.href=f,l.download=`${o||"模板"}.json`,l.click(),URL.revokeObjectURL(f),C.success("模板已导出")},[b,o,C]),y=se.useCallback(()=>{var t;(t=P.current)==null||t.click()},[]),d=se.useCallback(t=>{var l;const s=(l=t.target.files)==null?void 0:l[0];if(!s)return;const f=new FileReader;f.onload=()=>{const w=v(f.result);w?C.error(w):C.success("模板已导入")},f.readAsText(s),t.target.value=""},[v,C]),r=se.useCallback(()=>{R(),C.info("已新建空白模板")},[R,C]);return e.jsxs("div",{style:{height:48,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:[e.jsx(E.Space,{children:e.jsx(E.Input,{value:o,onChange:t=>a(t.target.value),variant:"borderless",style:{width:200,fontSize:16,fontWeight:600},placeholder:"模板名称"})}),e.jsxs(E.Space,{children:[e.jsx(E.Button,{icon:e.jsx(Oe.PlusOutlined,{}),onClick:r,children:"新建"}),e.jsx("input",{ref:P,type:"file",accept:".json",style:{display:"none"},onChange:d}),n?e.jsx(E.Button,{icon:e.jsx(Oe.SaveOutlined,{}),onClick:n,type:"primary",children:"保存"}):e.jsx(E.Button,{icon:e.jsx(Oe.DownloadOutlined,{}),onClick:k,children:"导出"}),e.jsx(E.Button,{icon:e.jsx(Oe.UploadOutlined,{}),onClick:y,children:"导入"}),e.jsx(E.Button,{icon:e.jsx(Oe.SettingOutlined,{}),onClick:()=>u(!0),children:"页眉页脚"}),e.jsx(E.Button,{danger:!0,icon:e.jsx(Oe.DeleteOutlined,{}),disabled:!x,onClick:L,children:"删除"}),i?e.jsx(E.Button,{type:"primary",icon:e.jsx(Oe.PrinterOutlined,{}),onClick:i,children:"打印"}):e.jsx(E.Button,{type:"primary",icon:e.jsx(Oe.EyeOutlined,{}),onClick:()=>c(!0),children:"预览"})]})]})},{Text:qe}=E.Typography,vn=()=>{const n=pe(u=>u.pageSettings),i=pe(u=>u.setPageSettings),o=n.paperSize==="custom",a=se.useCallback(u=>{i({paperSize:u})},[i]),c=se.useCallback(u=>{i({orientation:u})},[i]);return e.jsx(E.Card,{title:"页面设置",size:"small",children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{children:[e.jsx(qe,{style:{fontSize:12},children:"纸张大小"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:n.paperSize,onChange:a,options:[...Object.keys(bt).map(u=>({value:u,label:u})),{value:"custom",label:"自定义"}]})]}),o&&e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(qe,{style:{fontSize:12},children:"宽度 (mm)"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:n.customWidth,min:10,max:2e3,onChange:u=>i({customWidth:u??210})})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(qe,{style:{fontSize:12},children:"高度 (mm)"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:n.customHeight,min:10,max:2e3,onChange:u=>i({customHeight:u??297})})]})]}),e.jsxs("div",{children:[e.jsx(qe,{style:{fontSize:12},children:"方向"}),e.jsxs(E.Radio.Group,{value:n.orientation,onChange:u=>c(u.target.value),size:"small",style:{width:"100%",display:"flex"},children:[e.jsx(E.Radio.Button,{value:"portrait",style:{flex:1,textAlign:"center"},children:"纵向"}),e.jsx(E.Radio.Button,{value:"landscape",style:{flex:1,textAlign:"center"},children:"横向"})]})]}),e.jsxs("div",{children:[e.jsx(qe,{style:{fontSize:12},children:"页边距 (mm)"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[e.jsxs("div",{children:[e.jsx(qe,{style:{fontSize:11},children:"上"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:n.marginTop,min:0,max:100,onChange:u=>i({marginTop:u??10})})]}),e.jsxs("div",{children:[e.jsx(qe,{style:{fontSize:11},children:"右"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:n.marginRight,min:0,max:100,onChange:u=>i({marginRight:u??10})})]}),e.jsxs("div",{children:[e.jsx(qe,{style:{fontSize:11},children:"下"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:n.marginBottom,min:0,max:100,onChange:u=>i({marginBottom:u??10})})]}),e.jsxs("div",{children:[e.jsx(qe,{style:{fontSize:11},children:"左"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:n.marginLeft,min:0,max:100,onChange:u=>i({marginLeft:u??10})})]})]})]})]})})},{Text:bn}=E.Typography,xn=[{type:"text",icon:e.jsx(Oe.FontSizeOutlined,{}),label:"文本"},{type:"image",icon:e.jsx(Oe.PictureOutlined,{}),label:"图片"},{type:"table",icon:e.jsx(Oe.TableOutlined,{}),label:"表格"},{type:"barcode",icon:e.jsx(Oe.BarcodeOutlined,{}),label:"条形码"},{type:"qrcode",icon:e.jsx(Oe.QrcodeOutlined,{}),label:"二维码"},{type:"line",icon:e.jsx(Oe.MinusOutlined,{}),label:"分割线"}],wn=()=>{const n=pe(a=>a.addComponent),i=se.useCallback((a,c)=>{a.dataTransfer.setData("componentType",c),a.dataTransfer.effectAllowed="copy"},[]),o=se.useCallback(a=>{n(a)},[n]);return e.jsx(E.Card,{title:"组件面板",size:"small",children:e.jsx(E.Space,{direction:"vertical",style:{width:"100%"},size:4,children:xn.map(a=>e.jsxs("div",{draggable:!0,onDragStart:c=>i(c,a.type),onClick:()=>o(a.type),style:{cursor:"grab",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:6,display:"flex",alignItems:"center",gap:8,background:"#fafafa",userSelect:"none",transition:"all 0.2s"},onMouseEnter:c=>{c.currentTarget.style.background="#e6f4ff",c.currentTarget.style.borderColor="#1677ff"},onMouseLeave:c=>{c.currentTarget.style.background="#fafafa",c.currentTarget.style.borderColor="#d9d9d9"},children:[a.icon,e.jsx(bn,{children:a.label})]},a.type))})})};function at(n){try{return JSON.parse(n)}catch{return null}}function Ke(n,i,o){const a=`${i}Binding`,c=n.props[a];if(c&&c.dataSourceId&&c.fieldPath){const x=o.find(_=>_.id===c.dataSourceId);if(x){const _=jt(x);if(_){const b=St(_,c.fieldPath);if(b)return b}}}return n.props[i]||(c==null?void 0:c.staticValue)||""}function wt(n,i){if(!i||!n)return n;const o=Sn(n);if(!o)return n;const a=(u,x=2)=>String(u).padStart(x,"0"),c={yyyy:String(o.getFullYear()),yy:String(o.getFullYear()).slice(-2),MM:a(o.getMonth()+1),M:String(o.getMonth()+1),dd:a(o.getDate()),d:String(o.getDate()),HH:a(o.getHours()),H:String(o.getHours()),mm:a(o.getMinutes()),m:String(o.getMinutes()),ss:a(o.getSeconds()),s:String(o.getSeconds())};return i.replace(/yyyy|yy|MM|M|dd|d|HH|H|mm|m|ss|s/g,u=>c[u])}function Sn(n){const i=n.trim();if(!i)return null;if(/^\d{8}$/.test(i)){const a=Number(i.slice(0,4)),c=Number(i.slice(4,6)),u=Number(i.slice(6,8));return jn(a,c,u)}const o=new Date(i);return Number.isNaN(o.getTime())?null:o}function jn(n,i,o){const a=new Date(n,i-1,o);return a.getFullYear()!==n||a.getMonth()!==i-1||a.getDate()!==o?null:a}function St(n,i){if(!n||!i)return"";try{const o=i.split(".");let a=n;for(const c of o){if(typeof a!="object"||a===null)return"";a=a[c]}return a!=null?String(a):""}catch{return""}}function jt(n){const i=at(n.data);return n.type==="object"&&i&&typeof i=="object"&&!Array.isArray(i)?i:null}function Ct(n){const i=at(n.data);return n.type==="array"&&Array.isArray(i)?i:null}const{TextArea:Cn}=E.Input,{Text:Ot,Title:Eo}=E.Typography,dr=JSON.stringify({name:"张三",age:28,department:"技术部",email:"zhangsan@example.com"},null,2),On=JSON.stringify([{id:1,product:"商品A",quantity:2,price:100},{id:2,product:"商品B",quantity:5,price:80},{id:3,product:"商品C",quantity:1,price:200}],null,2),Rn=()=>{const n=pe(C=>C.dataSources),i=pe(C=>C.addDataSource),o=pe(C=>C.updateDataSource),a=pe(C=>C.removeDataSource),[c,u]=se.useState(!1),[x,_]=se.useState(null),[b,v]=se.useState({name:"",type:"object",data:""}),R=C=>{C?(_(C.id),v({name:C.name,type:C.type,data:C.data})):(_(null),v({name:"新数据源",type:"object",data:dr})),u(!0)},P=()=>{const C=at(b.data);if(C===null){E.message.error("JSON 格式不正确");return}if(b.type==="object"&&(Array.isArray(C)||typeof C!="object")){E.message.error("对象类型数据源必须为对象格式");return}if(b.type==="array"&&!Array.isArray(C)){E.message.error("数组类型数据源必须为数组格式");return}x?(o(x,b),E.message.success("数据源已更新")):(i(b.name,b.type,b.data),E.message.success("数据源已添加")),u(!1)};return e.jsxs(E.Card,{title:"数据源",size:"small",extra:e.jsx(E.Button,{type:"link",size:"small",icon:e.jsx(Oe.PlusOutlined,{}),onClick:()=>R(),children:"添加"}),children:[e.jsx(E.List,{size:"small",dataSource:n,locale:{emptyText:"暂无数据源"},renderItem:C=>e.jsx(E.List.Item,{actions:[e.jsx(E.Dropdown,{menu:{items:[{key:"edit",label:"编辑",icon:e.jsx(Oe.EditOutlined,{}),onClick:()=>R(C)},{type:"divider"},{key:"delete",label:e.jsx(E.Popconfirm,{title:"确定要删除这个数据源吗?",onConfirm:L=>{L==null||L.stopPropagation(),a(C.id),E.message.success("已删除")},okText:"确定",cancelText:"取消",onCancel:L=>L==null?void 0:L.stopPropagation(),children:e.jsx("span",{style:{color:"#ff4d4f",cursor:"pointer"},children:"删除"})}),icon:e.jsx(Oe.DeleteOutlined,{style:{color:"#ff4d4f"}})}]},placement:"bottomRight",children:e.jsx(E.Button,{type:"text",size:"small",icon:e.jsx(Oe.MoreOutlined,{})})})],children:e.jsx(E.List.Item.Meta,{avatar:e.jsx(Oe.DatabaseOutlined,{}),title:e.jsx(Ot,{ellipsis:!0,strong:!0,children:C.name}),description:e.jsx(E.Space,{size:4,children:e.jsx(E.Tag,{color:C.type==="object"?"blue":"green",children:C.type==="object"?"对象":"数组"})})})})}),e.jsx(E.Modal,{title:x?"编辑数据源":"添加数据源",open:c,onOk:P,onCancel:()=>u(!1),okText:"保存",cancelText:"取消",children:e.jsxs(E.Space,{direction:"vertical",style:{width:"100%"},size:"middle",children:[e.jsxs("div",{children:[e.jsx(Ot,{strong:!0,style:{display:"block",marginBottom:4},children:"名称"}),e.jsx(E.Input,{placeholder:"请输入数据源名称",value:b.name,onChange:C=>v({...b,name:C.target.value})})]}),e.jsxs("div",{children:[e.jsx(Ot,{strong:!0,style:{display:"block",marginBottom:4},children:"类型"}),e.jsx(E.Select,{options:[{label:"对象",value:"object"},{label:"数组",value:"array"}],style:{width:"100%"},value:b.type,onChange:C=>{v({...b,type:C,data:C==="object"?dr:On})}})]}),e.jsx(E.Divider,{style:{margin:"8px 0"}}),e.jsxs("div",{children:[e.jsx(Ot,{strong:!0,style:{display:"block",marginBottom:4},children:"JSON 数据"}),e.jsx(Cn,{rows:12,placeholder:"请输入 JSON 数据",value:b.data,onChange:C=>v({...b,data:C.target.value})})]})]})})]})},_n=()=>e.jsx(E.Collapse,{bordered:!1,accordion:!0,defaultActiveKey:["1"],expandIcon:({isActive:n})=>e.jsx(Oe.CaretRightOutlined,{rotate:n?90:0}),style:{height:"100%",overflowY:"auto"},items:[{key:"1",label:"页面设置",children:e.jsx(vn,{})},{key:"2",label:"组件",children:e.jsx(wn,{})},{key:"3",label:"数据源",children:e.jsx(Rn,{})}]});var Nt={exports:{}},lt={},ct={exports:{}},En=ct.exports,fr;function Wt(){return fr||(fr=1,(function(n,i){(function(o,a){a(i)})(En,(function(o){function a(A){return function(ee,Z,ce,B,he,ke,we){return A(ee,Z,we)}}function c(A){return function(ee,Z,ce,B){if(!ee||!Z||typeof ee!="object"||typeof Z!="object")return A(ee,Z,ce,B);var he=B.get(ee),ke=B.get(Z);if(he&&ke)return he===Z&&ke===ee;B.set(ee,Z),B.set(Z,ee);var we=A(ee,Z,ce,B);return B.delete(ee),B.delete(Z),we}}function u(A,U){var ee={};for(var Z in A)ee[Z]=A[Z];for(var Z in U)ee[Z]=U[Z];return ee}function x(A){return A.constructor===Object||A.constructor==null}function _(A){return typeof A.then=="function"}function b(A,U){return A===U||A!==A&&U!==U}var v="[object Arguments]",R="[object Boolean]",P="[object Date]",C="[object RegExp]",L="[object Map]",k="[object Number]",y="[object Object]",d="[object Set]",r="[object String]",t=Object.prototype.toString;function s(A){var U=A.areArraysEqual,ee=A.areDatesEqual,Z=A.areMapsEqual,ce=A.areObjectsEqual,B=A.areRegExpsEqual,he=A.areSetsEqual,ke=A.createIsNestedEqual,we=ke(Le);function Le(g,m,j){if(g===m)return!0;if(!g||!m||typeof g!="object"||typeof m!="object")return g!==g&&m!==m;if(x(g)&&x(m))return ce(g,m,we,j);var q=Array.isArray(g),ne=Array.isArray(m);if(q||ne)return q===ne&&U(g,m,we,j);var Q=t.call(g);return Q!==t.call(m)?!1:Q===P?ee(g,m,we,j):Q===C?B(g,m,we,j):Q===L?Z(g,m,we,j):Q===d?he(g,m,we,j):Q===y||Q===v?_(g)||_(m)?!1:ce(g,m,we,j):Q===R||Q===k||Q===r?b(g.valueOf(),m.valueOf()):!1}return Le}function f(A,U,ee,Z){var ce=A.length;if(U.length!==ce)return!1;for(;ce-- >0;)if(!ee(A[ce],U[ce],ce,ce,A,U,Z))return!1;return!0}var l=c(f);function w(A,U){return b(A.valueOf(),U.valueOf())}function O(A,U,ee,Z){var ce=A.size===U.size;if(!ce)return!1;if(!A.size)return!0;var B={},he=0;return A.forEach(function(ke,we){if(ce){var Le=!1,g=0;U.forEach(function(m,j){!Le&&!B[g]&&(Le=ee(we,j,he,g,A,U,Z)&&ee(ke,m,we,j,A,U,Z))&&(B[g]=!0),g++}),he++,ce=Le}}),ce}var D=c(O),M="_owner",H=Object.prototype.hasOwnProperty;function T(A,U,ee,Z){var ce=Object.keys(A),B=ce.length;if(Object.keys(U).length!==B)return!1;for(var he;B-- >0;){if(he=ce[B],he===M){var ke=!!A.$$typeof,we=!!U.$$typeof;if((ke||we)&&ke!==we)return!1}if(!H.call(U,he)||!ee(A[he],U[he],he,he,A,U,Z))return!1}return!0}var N=c(T);function G(A,U){return A.source===U.source&&A.flags===U.flags}function X(A,U,ee,Z){var ce=A.size===U.size;if(!ce)return!1;if(!A.size)return!0;var B={};return A.forEach(function(he,ke){if(ce){var we=!1,Le=0;U.forEach(function(g,m){!we&&!B[Le]&&(we=ee(he,g,ke,m,A,U,Z))&&(B[Le]=!0),Le++}),ce=we}}),ce}var V=c(X),J=Object.freeze({areArraysEqual:f,areDatesEqual:w,areMapsEqual:O,areObjectsEqual:T,areRegExpsEqual:G,areSetsEqual:X,createIsNestedEqual:a}),K=Object.freeze({areArraysEqual:l,areDatesEqual:w,areMapsEqual:D,areObjectsEqual:N,areRegExpsEqual:G,areSetsEqual:V,createIsNestedEqual:a}),re=s(J);function be(A,U){return re(A,U,void 0)}var ge=s(u(J,{createIsNestedEqual:function(){return b}}));function I(A,U){return ge(A,U,void 0)}var W=s(K);function ie(A,U){return W(A,U,new WeakMap)}var oe=s(u(K,{createIsNestedEqual:function(){return b}}));function ae(A,U){return oe(A,U,new WeakMap)}function fe(A){return s(u(J,A(J)))}function ue(A){var U=s(u(K,A(K)));return(function(ee,Z,ce){return ce===void 0&&(ce=new WeakMap),U(ee,Z,ce)})}o.circularDeepEqual=ie,o.circularShallowEqual=ae,o.createCustomCircularEqual=ue,o.createCustomEqual=fe,o.deepEqual=be,o.sameValueZeroEqual=b,o.shallowEqual=I,Object.defineProperty(o,"__esModule",{value:!0})}))})(ct,ct.exports)),ct.exports}var Rt={exports:{}},pr;function _t(){if(pr)return Rt.exports;pr=1;function n(o){var a,c,u="";if(typeof o=="string"||typeof o=="number")u+=o;else if(typeof o=="object")if(Array.isArray(o)){var x=o.length;for(a=0;a<x;a++)o[a]&&(c=n(o[a]))&&(u&&(u+=" "),u+=c)}else for(c in o)o[c]&&(u&&(u+=" "),u+=c);return u}function i(){for(var o,a,c=0,u="",x=arguments.length;c<x;c++)(o=arguments[c])&&(a=n(o))&&(u&&(u+=" "),u+=a);return u}return Rt.exports=i,Rt.exports.clsx=i,Rt.exports}var xe={},Ht,hr;function Pn(){return hr||(hr=1,Ht=function(i,o,a){return i===o?!0:i.className===o.className&&a(i.style,o.style)&&i.width===o.width&&i.autoSize===o.autoSize&&i.cols===o.cols&&i.draggableCancel===o.draggableCancel&&i.draggableHandle===o.draggableHandle&&a(i.verticalCompact,o.verticalCompact)&&a(i.compactType,o.compactType)&&a(i.layout,o.layout)&&a(i.margin,o.margin)&&a(i.containerPadding,o.containerPadding)&&i.rowHeight===o.rowHeight&&i.maxRows===o.maxRows&&i.isBounded===o.isBounded&&i.isDraggable===o.isDraggable&&i.isResizable===o.isResizable&&i.allowOverlap===o.allowOverlap&&i.preventCollision===o.preventCollision&&i.useCSSTransforms===o.useCSSTransforms&&i.transformScale===o.transformScale&&i.isDroppable===o.isDroppable&&a(i.resizeHandles,o.resizeHandles)&&a(i.resizeHandle,o.resizeHandle)&&i.onLayoutChange===o.onLayoutChange&&i.onDragStart===o.onDragStart&&i.onDrag===o.onDrag&&i.onDragStop===o.onDragStop&&i.onResizeStart===o.onResizeStart&&i.onResize===o.onResize&&i.onResizeStop===o.onResizeStop&&i.onDrop===o.onDrop&&a(i.droppingItem,o.droppingItem)&&a(i.innerRef,o.innerRef)}),Ht}var gr;function Qe(){if(gr)return xe;gr=1;var n={};Object.defineProperty(xe,"__esModule",{value:!0}),xe.bottom=R,xe.childrenEqual=y,xe.cloneLayout=P,xe.cloneLayoutItem=k,xe.collides=r,xe.compact=t,xe.compactItem=l,xe.compactType=ke,xe.correctBounds=w,xe.fastPositionEqual=d,xe.fastRGLPropsEqual=void 0,xe.getAllCollisions=M,xe.getFirstCollision=D,xe.getLayoutItem=O,xe.getStatics=H,xe.modifyLayout=C,xe.moveElement=T,xe.moveElementAwayFromCollision=N,xe.noop=void 0,xe.perc=G,xe.resizeItemInDirection=ue,xe.setTopLeft=U,xe.setTransform=A,xe.sortLayoutItems=ee,xe.sortLayoutItemsByColRow=ce,xe.sortLayoutItemsByRowCol=Z,xe.synchronizeLayoutWithChildren=B,xe.validateLayout=he,xe.withLayoutItem=L;var i=Wt(),o=a(se);function a(g){return g&&g.__esModule?g:{default:g}}function c(g,m){var j=Object.keys(g);if(Object.getOwnPropertySymbols){var q=Object.getOwnPropertySymbols(g);m&&(q=q.filter(function(ne){return Object.getOwnPropertyDescriptor(g,ne).enumerable})),j.push.apply(j,q)}return j}function u(g){for(var m=1;m<arguments.length;m++){var j=arguments[m]!=null?arguments[m]:{};m%2?c(Object(j),!0).forEach(function(q){x(g,q,j[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(j)):c(Object(j)).forEach(function(q){Object.defineProperty(g,q,Object.getOwnPropertyDescriptor(j,q))})}return g}function x(g,m,j){return(m=_(m))in g?Object.defineProperty(g,m,{value:j,enumerable:!0,configurable:!0,writable:!0}):g[m]=j,g}function _(g){var m=b(g,"string");return typeof m=="symbol"?m:m+""}function b(g,m){if(typeof g!="object"||!g)return g;var j=g[Symbol.toPrimitive];if(j!==void 0){var q=j.call(g,m);if(typeof q!="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(g)}const v=n.NODE_ENV==="production";function R(g){let m=0,j;for(let q=0,ne=g.length;q<ne;q++)j=g[q].y+g[q].h,j>m&&(m=j);return m}function P(g){const m=Array(g.length);for(let j=0,q=g.length;j<q;j++)m[j]=k(g[j]);return m}function C(g,m){const j=Array(g.length);for(let q=0,ne=g.length;q<ne;q++)m.i===g[q].i?j[q]=m:j[q]=g[q];return j}function L(g,m,j){let q=O(g,m);return q?(q=j(k(q)),g=C(g,q),[g,q]):[g,null]}function k(g){return{w:g.w,h:g.h,x:g.x,y:g.y,i:g.i,minW:g.minW,maxW:g.maxW,minH:g.minH,maxH:g.maxH,moved:!!g.moved,static:!!g.static,isDraggable:g.isDraggable,isResizable:g.isResizable,resizeHandles:g.resizeHandles,isBounded:g.isBounded}}function y(g,m){return(0,i.deepEqual)(o.default.Children.map(g,j=>j==null?void 0:j.key),o.default.Children.map(m,j=>j==null?void 0:j.key))&&(0,i.deepEqual)(o.default.Children.map(g,j=>j==null?void 0:j.props["data-grid"]),o.default.Children.map(m,j=>j==null?void 0:j.props["data-grid"]))}xe.fastRGLPropsEqual=Pn();function d(g,m){return g.left===m.left&&g.top===m.top&&g.width===m.width&&g.height===m.height}function r(g,m){return!(g.i===m.i||g.x+g.w<=m.x||g.x>=m.x+m.w||g.y+g.h<=m.y||g.y>=m.y+m.h)}function t(g,m,j,q){const ne=H(g);let Q=R(ne);const le=ee(g,m),ye=Array(g.length);for(let Ce=0,p=le.length;Ce<p;Ce++){let S=k(le[Ce]);S.static||(S=l(ne,S,m,j,le,q,Q),Q=Math.max(Q,S.y+S.h),ne.push(S)),ye[g.indexOf(le[Ce])]=S,S.moved=!1}return ye}const s={x:"w",y:"h"};function f(g,m,j,q){const ne=s[q];m[q]+=1;const Q=g.map(le=>le.i).indexOf(m.i);for(let le=Q+1;le<g.length;le++){const ye=g[le];if(!ye.static){if(ye.y>m.y+m.h)break;r(m,ye)&&f(g,ye,j+m[ne],q)}}m[q]=j}function l(g,m,j,q,ne,Q,le){const ye=j==="vertical",Ce=j==="horizontal";if(ye)for(typeof le=="number"?m.y=Math.min(le,m.y):m.y=Math.min(R(g),m.y);m.y>0&&!D(g,m);)m.y--;else if(Ce)for(;m.x>0&&!D(g,m);)m.x--;let p;for(;(p=D(g,m))&&!(j===null&&Q);)if(Ce?f(ne,m,p.x+p.w,"x"):f(ne,m,p.y+p.h,"y"),Ce&&m.x+m.w>q)for(m.x=q-m.w,m.y++;m.x>0&&!D(g,m);)m.x--;return m.y=Math.max(m.y,0),m.x=Math.max(m.x,0),m}function w(g,m){const j=H(g);for(let q=0,ne=g.length;q<ne;q++){const Q=g[q];if(Q.x+Q.w>m.cols&&(Q.x=m.cols-Q.w),Q.x<0&&(Q.x=0,Q.w=m.cols),!Q.static)j.push(Q);else for(;D(j,Q);)Q.y++}return g}function O(g,m){for(let j=0,q=g.length;j<q;j++)if(g[j].i===m)return g[j]}function D(g,m){for(let j=0,q=g.length;j<q;j++)if(r(g[j],m))return g[j]}function M(g,m){return g.filter(j=>r(j,m))}function H(g){return g.filter(m=>m.static)}function T(g,m,j,q,ne,Q,le,ye,Ce){if(m.static&&m.isDraggable!==!0||m.y===q&&m.x===j)return g;"Moving element ".concat(m.i," to [").concat(String(j),",").concat(String(q),"] from [").concat(m.x,",").concat(m.y,"]");const p=m.x,S=m.y;typeof j=="number"&&(m.x=j),typeof q=="number"&&(m.y=q),m.moved=!0;let z=ee(g,le);(le==="vertical"&&typeof q=="number"?S>=q:le==="horizontal"&&typeof j=="number"?p>=j:!1)&&(z=z.reverse());const $=M(z,m),Ee=$.length>0;if(Ee&&Ce)return P(g);if(Ee&&Q)return"Collision prevented on ".concat(m.i,", reverting."),m.x=p,m.y=S,m.moved=!1,g;for(let me=0,Te=$.length;me<Te;me++){const Me=$[me];"Resolving collision between ".concat(m.i," at [").concat(m.x,",").concat(m.y,"] and ").concat(Me.i," at [").concat(Me.x,",").concat(Me.y,"]"),!Me.moved&&(Me.static?g=N(g,Me,m,ne,le):g=N(g,m,Me,ne,le))}return g}function N(g,m,j,q,ne,Q){const le=ne==="horizontal",ye=ne==="vertical",Ce=m.static;if(q){q=!1;const z={x:le?Math.max(m.x-j.w,0):j.x,y:ye?Math.max(m.y-j.h,0):j.y,w:j.w,h:j.h,i:"-1"},Y=D(g,z),$=Y&&Y.y+Y.h>m.y,Ee=Y&&m.x+m.w>Y.x;if(Y){if($&&ye)return T(g,j,void 0,j.y+1,q,Ce,ne);if($&&ne==null)return m.y=j.y,j.y=j.y+j.h,g;if(Ee&&le)return T(g,m,j.x,void 0,q,Ce,ne)}else return"Doing reverse collision on ".concat(j.i," up to [").concat(z.x,",").concat(z.y,"]."),T(g,j,le?z.x:void 0,ye?z.y:void 0,q,Ce,ne)}const p=le?j.x+1:void 0,S=ye?j.y+1:void 0;return p==null&&S==null?g:T(g,j,le?j.x+1:void 0,ye?j.y+1:void 0,q,Ce,ne)}function G(g){return g*100+"%"}const X=(g,m,j,q)=>g+j>q?m:j,V=(g,m,j)=>g<0?m:j,J=g=>Math.max(0,g),K=g=>Math.max(0,g),re=(g,m,j)=>{let{left:q,height:ne,width:Q}=m;const le=g.top-(ne-g.height);return{left:q,width:Q,height:V(le,g.height,ne),top:K(le)}},be=(g,m,j)=>{let{top:q,left:ne,height:Q,width:le}=m;return{top:q,height:Q,width:X(g.left,g.width,le,j),left:J(ne)}},ge=(g,m,j)=>{let{top:q,height:ne,width:Q}=m;const le=g.left-(Q-g.width);return{height:ne,width:le<0?g.width:X(g.left,g.width,Q,j),top:K(q),left:J(le)}},I=(g,m,j)=>{let{top:q,left:ne,height:Q,width:le}=m;return{width:le,left:ne,height:V(q,g.height,Q),top:K(q)}},fe={n:re,ne:function(){return re(arguments.length<=0?void 0:arguments[0],be(...arguments))},e:be,se:function(){return I(arguments.length<=0?void 0:arguments[0],be(...arguments))},s:I,sw:function(){return I(arguments.length<=0?void 0:arguments[0],ge(...arguments))},w:ge,nw:function(){return re(arguments.length<=0?void 0:arguments[0],ge(...arguments))}};function ue(g,m,j,q){const ne=fe[g];return ne?ne(m,u(u({},m),j),q):j}function A(g){let{top:m,left:j,width:q,height:ne}=g;const Q="translate(".concat(j,"px,").concat(m,"px)");return{transform:Q,WebkitTransform:Q,MozTransform:Q,msTransform:Q,OTransform:Q,width:"".concat(q,"px"),height:"".concat(ne,"px"),position:"absolute"}}function U(g){let{top:m,left:j,width:q,height:ne}=g;return{top:"".concat(m,"px"),left:"".concat(j,"px"),width:"".concat(q,"px"),height:"".concat(ne,"px"),position:"absolute"}}function ee(g,m){return m==="horizontal"?ce(g):m==="vertical"?Z(g):g}function Z(g){return g.slice(0).sort(function(m,j){return m.y>j.y||m.y===j.y&&m.x>j.x?1:m.y===j.y&&m.x===j.x?0:-1})}function ce(g){return g.slice(0).sort(function(m,j){return m.x>j.x||m.x===j.x&&m.y>j.y?1:-1})}function B(g,m,j,q,ne){g=g||[];const Q=[];o.default.Children.forEach(m,ye=>{if((ye==null?void 0:ye.key)==null)return;const Ce=O(g,String(ye.key)),p=ye.props["data-grid"];Ce&&p==null?Q.push(k(Ce)):p?(v||he([p],"ReactGridLayout.children"),Q.push(k(u(u({},p),{},{i:ye.key})))):Q.push(k({w:1,h:1,x:0,y:R(Q),i:String(ye.key)}))});const le=w(Q,{cols:j});return ne?le:t(le,q,j)}function he(g){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const j=["x","y","w","h"];if(!Array.isArray(g))throw new Error(m+" must be an array!");for(let q=0,ne=g.length;q<ne;q++){const Q=g[q];for(let le=0;le<j.length;le++){const ye=j[le],Ce=Q[ye];if(typeof Ce!="number"||Number.isNaN(Ce))throw new Error("ReactGridLayout: ".concat(m,"[").concat(q,"].").concat(ye," must be a number! Received: ").concat(Ce," (").concat(typeof Ce,")"))}if(typeof Q.i<"u"&&typeof Q.i!="string")throw new Error("ReactGridLayout: ".concat(m,"[").concat(q,"].i must be a string! Received: ").concat(Q.i," (").concat(typeof Q.i,")"))}}function ke(g){const{verticalCompact:m,compactType:j}=g||{};return m===!1?null:j}function we(){}const Le=()=>{};return xe.noop=Le,xe}var Fe={},yr;function Bt(){if(yr)return Fe;yr=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.calcGridColWidth=n,Fe.calcGridItemPosition=o,Fe.calcGridItemWHPx=i,Fe.calcWH=c,Fe.calcXY=a,Fe.clamp=u;function n(x){const{margin:_,containerPadding:b,containerWidth:v,cols:R}=x;return(v-_[0]*(R-1)-b[0]*2)/R}function i(x,_,b){return Number.isFinite(x)?Math.round(_*x+Math.max(0,x-1)*b):x}function o(x,_,b,v,R,P){const{margin:C,containerPadding:L,rowHeight:k}=x,y=n(x),d={};return P&&P.resizing?(d.width=Math.round(P.resizing.width),d.height=Math.round(P.resizing.height)):(d.width=i(v,y,C[0]),d.height=i(R,k,C[1])),P&&P.dragging?(d.top=Math.round(P.dragging.top),d.left=Math.round(P.dragging.left)):P&&P.resizing&&typeof P.resizing.top=="number"&&typeof P.resizing.left=="number"?(d.top=Math.round(P.resizing.top),d.left=Math.round(P.resizing.left)):(d.top=Math.round((k+C[1])*b+L[1]),d.left=Math.round((y+C[0])*_+L[0])),d}function a(x,_,b,v,R){const{margin:P,containerPadding:C,cols:L,rowHeight:k,maxRows:y}=x,d=n(x);let r=Math.round((b-C[0])/(d+P[0])),t=Math.round((_-C[1])/(k+P[1]));return r=u(r,0,L-v),t=u(t,0,y-R),{x:r,y:t}}function c(x,_,b,v,R,P){const{margin:C,maxRows:L,cols:k,rowHeight:y}=x,d=n(x);let r=Math.round((_+C[0])/(d+C[0])),t=Math.round((b+C[1])/(y+C[1])),s=u(r,0,k-v),f=u(t,0,L-R);return["sw","w","nw"].indexOf(P)!==-1&&(s=u(r,0,k)),["nw","n","ne"].indexOf(P)!==-1&&(f=u(t,0,L)),{w:s,h:f}}function u(x,_,b){return Math.max(Math.min(x,b),_)}return Fe}var ut={},Et={exports:{}},Pt={exports:{}},Re={};/** @license React v16.13.1
31
31
  * react-is.production.min.js
32
32
  *
33
33
  * Copyright (c) Facebook, Inc. and its affiliates.
34
34
  *
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
- */var gr;function Cn(){if(gr)return Re;gr=1;var r=typeof Symbol=="function"&&Symbol.for,n=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,h=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,x=r?Symbol.for("react.provider"):60109,O=r?Symbol.for("react.context"):60110,y=r?Symbol.for("react.async_mode"):60111,R=r?Symbol.for("react.concurrent_mode"):60111,C=r?Symbol.for("react.forward_ref"):60112,E=r?Symbol.for("react.suspense"):60113,_=r?Symbol.for("react.suspense_list"):60120,A=r?Symbol.for("react.memo"):60115,T=r?Symbol.for("react.lazy"):60116,p=r?Symbol.for("react.block"):60121,l=r?Symbol.for("react.fundamental"):60117,e=r?Symbol.for("react.responder"):60118,t=r?Symbol.for("react.scope"):60119;function c(i){if(typeof i=="object"&&i!==null){var b=i.$$typeof;switch(b){case n:switch(i=i.type,i){case y:case R:case o:case u:case h:case E:return i;default:switch(i=i&&i.$$typeof,i){case O:case C:case T:case A:case x:return i;default:return b}}case a:return b}}}function f(i){return c(i)===R}return Re.AsyncMode=y,Re.ConcurrentMode=R,Re.ContextConsumer=O,Re.ContextProvider=x,Re.Element=n,Re.ForwardRef=C,Re.Fragment=o,Re.Lazy=T,Re.Memo=A,Re.Portal=a,Re.Profiler=u,Re.StrictMode=h,Re.Suspense=E,Re.isAsyncMode=function(i){return f(i)||c(i)===y},Re.isConcurrentMode=f,Re.isContextConsumer=function(i){return c(i)===O},Re.isContextProvider=function(i){return c(i)===x},Re.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===n},Re.isForwardRef=function(i){return c(i)===C},Re.isFragment=function(i){return c(i)===o},Re.isLazy=function(i){return c(i)===T},Re.isMemo=function(i){return c(i)===A},Re.isPortal=function(i){return c(i)===a},Re.isProfiler=function(i){return c(i)===u},Re.isStrictMode=function(i){return c(i)===h},Re.isSuspense=function(i){return c(i)===E},Re.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===o||i===R||i===u||i===h||i===E||i===_||typeof i=="object"&&i!==null&&(i.$$typeof===T||i.$$typeof===A||i.$$typeof===x||i.$$typeof===O||i.$$typeof===C||i.$$typeof===l||i.$$typeof===e||i.$$typeof===t||i.$$typeof===p)},Re.typeOf=c,Re}var Oe={},mr;function _n(){if(mr)return Oe;mr=1;var r={};/** @license React v16.13.1
37
+ */var mr;function Dn(){if(mr)return Re;mr=1;var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,c=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,x=n?Symbol.for("react.provider"):60109,_=n?Symbol.for("react.context"):60110,b=n?Symbol.for("react.async_mode"):60111,v=n?Symbol.for("react.concurrent_mode"):60111,R=n?Symbol.for("react.forward_ref"):60112,P=n?Symbol.for("react.suspense"):60113,C=n?Symbol.for("react.suspense_list"):60120,L=n?Symbol.for("react.memo"):60115,k=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,d=n?Symbol.for("react.fundamental"):60117,r=n?Symbol.for("react.responder"):60118,t=n?Symbol.for("react.scope"):60119;function s(l){if(typeof l=="object"&&l!==null){var w=l.$$typeof;switch(w){case i:switch(l=l.type,l){case b:case v:case a:case u:case c:case P:return l;default:switch(l=l&&l.$$typeof,l){case _:case R:case k:case L:case x:return l;default:return w}}case o:return w}}}function f(l){return s(l)===v}return Re.AsyncMode=b,Re.ConcurrentMode=v,Re.ContextConsumer=_,Re.ContextProvider=x,Re.Element=i,Re.ForwardRef=R,Re.Fragment=a,Re.Lazy=k,Re.Memo=L,Re.Portal=o,Re.Profiler=u,Re.StrictMode=c,Re.Suspense=P,Re.isAsyncMode=function(l){return f(l)||s(l)===b},Re.isConcurrentMode=f,Re.isContextConsumer=function(l){return s(l)===_},Re.isContextProvider=function(l){return s(l)===x},Re.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===i},Re.isForwardRef=function(l){return s(l)===R},Re.isFragment=function(l){return s(l)===a},Re.isLazy=function(l){return s(l)===k},Re.isMemo=function(l){return s(l)===L},Re.isPortal=function(l){return s(l)===o},Re.isProfiler=function(l){return s(l)===u},Re.isStrictMode=function(l){return s(l)===c},Re.isSuspense=function(l){return s(l)===P},Re.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===a||l===v||l===u||l===c||l===P||l===C||typeof l=="object"&&l!==null&&(l.$$typeof===k||l.$$typeof===L||l.$$typeof===x||l.$$typeof===_||l.$$typeof===R||l.$$typeof===d||l.$$typeof===r||l.$$typeof===t||l.$$typeof===y)},Re.typeOf=s,Re}var _e={},vr;function Tn(){if(vr)return _e;vr=1;var n={};/** @license React v16.13.1
38
38
  * react-is.development.js
39
39
  *
40
40
  * Copyright (c) Facebook, Inc. and its affiliates.
41
41
  *
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
- */return r.NODE_ENV!=="production"&&(function(){var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,h=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,x=n?Symbol.for("react.profiler"):60114,O=n?Symbol.for("react.provider"):60109,y=n?Symbol.for("react.context"):60110,R=n?Symbol.for("react.async_mode"):60111,C=n?Symbol.for("react.concurrent_mode"):60111,E=n?Symbol.for("react.forward_ref"):60112,_=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.suspense_list"):60120,T=n?Symbol.for("react.memo"):60115,p=n?Symbol.for("react.lazy"):60116,l=n?Symbol.for("react.block"):60121,e=n?Symbol.for("react.fundamental"):60117,t=n?Symbol.for("react.responder"):60118,c=n?Symbol.for("react.scope"):60119;function f(W){return typeof W=="string"||typeof W=="function"||W===h||W===C||W===x||W===u||W===_||W===A||typeof W=="object"&&W!==null&&(W.$$typeof===p||W.$$typeof===T||W.$$typeof===O||W.$$typeof===y||W.$$typeof===E||W.$$typeof===e||W.$$typeof===t||W.$$typeof===c||W.$$typeof===l)}function i(W){if(typeof W=="object"&&W!==null){var he=W.$$typeof;switch(he){case a:var ze=W.type;switch(ze){case R:case C:case h:case x:case u:case _:return ze;default:var xe=ze&&ze.$$typeof;switch(xe){case y:case E:case p:case T:case O:return xe;default:return he}}case o:return he}}}var b=R,j=C,P=y,z=O,N=a,F=E,Z=h,K=p,Q=T,V=o,X=x,J=u,ne=_,Se=!1;function ve(W){return Se||(Se=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(W)||i(W)===R}function M(W){return i(W)===C}function L(W){return i(W)===y}function le(W){return i(W)===O}function ie(W){return typeof W=="object"&&W!==null&&W.$$typeof===a}function ce(W){return i(W)===E}function pe(W){return i(W)===h}function ue(W){return i(W)===p}function I(W){return i(W)===T}function G(W){return i(W)===o}function ee(W){return i(W)===x}function $(W){return i(W)===u}function ae(W){return i(W)===_}Oe.AsyncMode=b,Oe.ConcurrentMode=j,Oe.ContextConsumer=P,Oe.ContextProvider=z,Oe.Element=N,Oe.ForwardRef=F,Oe.Fragment=Z,Oe.Lazy=K,Oe.Memo=Q,Oe.Portal=V,Oe.Profiler=X,Oe.StrictMode=J,Oe.Suspense=ne,Oe.isAsyncMode=ve,Oe.isConcurrentMode=M,Oe.isContextConsumer=L,Oe.isContextProvider=le,Oe.isElement=ie,Oe.isForwardRef=ce,Oe.isFragment=pe,Oe.isLazy=ue,Oe.isMemo=I,Oe.isPortal=G,Oe.isProfiler=ee,Oe.isStrictMode=$,Oe.isSuspense=ae,Oe.isValidElementType=f,Oe.typeOf=i})(),Oe}var yr;function vr(){if(yr)return Et.exports;yr=1;var r={};return r.NODE_ENV==="production"?Et.exports=Cn():Et.exports=_n(),Et.exports}/*
44
+ */return n.NODE_ENV!=="production"&&(function(){var i=typeof Symbol=="function"&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,c=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,x=i?Symbol.for("react.profiler"):60114,_=i?Symbol.for("react.provider"):60109,b=i?Symbol.for("react.context"):60110,v=i?Symbol.for("react.async_mode"):60111,R=i?Symbol.for("react.concurrent_mode"):60111,P=i?Symbol.for("react.forward_ref"):60112,C=i?Symbol.for("react.suspense"):60113,L=i?Symbol.for("react.suspense_list"):60120,k=i?Symbol.for("react.memo"):60115,y=i?Symbol.for("react.lazy"):60116,d=i?Symbol.for("react.block"):60121,r=i?Symbol.for("react.fundamental"):60117,t=i?Symbol.for("react.responder"):60118,s=i?Symbol.for("react.scope"):60119;function f(B){return typeof B=="string"||typeof B=="function"||B===c||B===R||B===x||B===u||B===C||B===L||typeof B=="object"&&B!==null&&(B.$$typeof===y||B.$$typeof===k||B.$$typeof===_||B.$$typeof===b||B.$$typeof===P||B.$$typeof===r||B.$$typeof===t||B.$$typeof===s||B.$$typeof===d)}function l(B){if(typeof B=="object"&&B!==null){var he=B.$$typeof;switch(he){case o:var ke=B.type;switch(ke){case v:case R:case c:case x:case u:case C:return ke;default:var we=ke&&ke.$$typeof;switch(we){case b:case P:case y:case k:case _:return we;default:return he}}case a:return he}}}var w=v,O=R,D=b,M=_,H=o,T=P,N=c,G=y,X=k,V=a,J=x,K=u,re=C,be=!1;function ge(B){return be||(be=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(B)||l(B)===v}function I(B){return l(B)===R}function W(B){return l(B)===b}function ie(B){return l(B)===_}function oe(B){return typeof B=="object"&&B!==null&&B.$$typeof===o}function ae(B){return l(B)===P}function fe(B){return l(B)===c}function ue(B){return l(B)===y}function A(B){return l(B)===k}function U(B){return l(B)===a}function ee(B){return l(B)===x}function Z(B){return l(B)===u}function ce(B){return l(B)===C}_e.AsyncMode=w,_e.ConcurrentMode=O,_e.ContextConsumer=D,_e.ContextProvider=M,_e.Element=H,_e.ForwardRef=T,_e.Fragment=N,_e.Lazy=G,_e.Memo=X,_e.Portal=V,_e.Profiler=J,_e.StrictMode=K,_e.Suspense=re,_e.isAsyncMode=ge,_e.isConcurrentMode=I,_e.isContextConsumer=W,_e.isContextProvider=ie,_e.isElement=oe,_e.isForwardRef=ae,_e.isFragment=fe,_e.isLazy=ue,_e.isMemo=A,_e.isPortal=U,_e.isProfiler=ee,_e.isStrictMode=Z,_e.isSuspense=ce,_e.isValidElementType=f,_e.typeOf=l})(),_e}var br;function xr(){if(br)return Pt.exports;br=1;var n={};return n.NODE_ENV==="production"?Pt.exports=Dn():Pt.exports=Tn(),Pt.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var Bt,br;function En(){if(br)return Bt;br=1;var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function h(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var x={},O=0;O<10;O++)x["_"+String.fromCharCode(O)]=O;var y=Object.getOwnPropertyNames(x).map(function(C){return x[C]});if(y.join("")!=="0123456789")return!1;var R={};return"abcdefghijklmnopqrst".split("").forEach(function(C){R[C]=C}),Object.keys(Object.assign({},R)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Bt=h()?Object.assign:function(u,x){for(var O,y=o(u),R,C=1;C<arguments.length;C++){O=Object(arguments[C]);for(var E in O)n.call(O,E)&&(y[E]=O[E]);if(r){R=r(O);for(var _=0;_<R.length;_++)a.call(O,R[_])&&(y[R[_]]=O[R[_]])}}return y},Bt}var qt,xr;function Ft(){if(xr)return qt;xr=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qt=r,qt}var Gt,wr;function Sr(){return wr||(wr=1,Gt=Function.call.bind(Object.prototype.hasOwnProperty)),Gt}var Yt,jr;function Pn(){if(jr)return Yt;jr=1;var r={},n=function(){};if(r.NODE_ENV!=="production"){var a=Ft(),o={},h=Sr();n=function(x){var O="Warning: "+x;typeof console<"u"&&console.error(O);try{throw new Error(O)}catch{}}}function u(x,O,y,R,C){if(r.NODE_ENV!=="production"){for(var E in x)if(h(x,E)){var _;try{if(typeof x[E]!="function"){var A=Error((R||"React class")+": "+y+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw A.name="Invariant Violation",A}_=x[E](O,E,R,y,null,a)}catch(p){_=p}if(_&&!(_ instanceof Error)&&n((R||"React class")+": type specification of "+y+" `"+E+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in o)){o[_.message]=!0;var T=C?C():"";n("Failed "+y+" type: "+_.message+(T??""))}}}}return u.resetWarningCache=function(){r.NODE_ENV!=="production"&&(o={})},Yt=u,Yt}var Vt,Rr;function Dn(){if(Rr)return Vt;Rr=1;var r={},n=vr(),a=En(),o=Ft(),h=Sr(),u=Pn(),x=function(){};r.NODE_ENV!=="production"&&(x=function(y){var R="Warning: "+y;typeof console<"u"&&console.error(R);try{throw new Error(R)}catch{}});function O(){return null}return Vt=function(y,R){var C=typeof Symbol=="function"&&Symbol.iterator,E="@@iterator";function _(M){var L=M&&(C&&M[C]||M[E]);if(typeof L=="function")return L}var A="<<anonymous>>",T={array:t("array"),bigint:t("bigint"),bool:t("boolean"),func:t("function"),number:t("number"),object:t("object"),string:t("string"),symbol:t("symbol"),any:c(),arrayOf:f,element:i(),elementType:b(),instanceOf:j,node:F(),objectOf:z,oneOf:P,oneOfType:N,shape:K,exact:Q};function p(M,L){return M===L?M!==0||1/M===1/L:M!==M&&L!==L}function l(M,L){this.message=M,this.data=L&&typeof L=="object"?L:{},this.stack=""}l.prototype=Error.prototype;function e(M){if(r.NODE_ENV!=="production")var L={},le=0;function ie(pe,ue,I,G,ee,$,ae){if(G=G||A,$=$||I,ae!==o){if(R){var W=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw W.name="Invariant Violation",W}else if(r.NODE_ENV!=="production"&&typeof console<"u"){var he=G+":"+I;!L[he]&&le<3&&(x("You are manually calling a React.PropTypes validation function for the `"+$+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[he]=!0,le++)}}return ue[I]==null?pe?ue[I]===null?new l("The "+ee+" `"+$+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new l("The "+ee+" `"+$+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:M(ue,I,G,ee,$)}var ce=ie.bind(null,!1);return ce.isRequired=ie.bind(null,!0),ce}function t(M){function L(le,ie,ce,pe,ue,I){var G=le[ie],ee=J(G);if(ee!==M){var $=ne(G);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+$+"` supplied to `"+ce+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return e(L)}function c(){return e(O)}function f(M){function L(le,ie,ce,pe,ue){if(typeof M!="function")return new l("Property `"+ue+"` of component `"+ce+"` has invalid PropType notation inside arrayOf.");var I=le[ie];if(!Array.isArray(I)){var G=J(I);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected an array."))}for(var ee=0;ee<I.length;ee++){var $=M(I,ee,ce,pe,ue+"["+ee+"]",o);if($ instanceof Error)return $}return null}return e(L)}function i(){function M(L,le,ie,ce,pe){var ue=L[le];if(!y(ue)){var I=J(ue);return new l("Invalid "+ce+" `"+pe+"` of type "+("`"+I+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return e(M)}function b(){function M(L,le,ie,ce,pe){var ue=L[le];if(!n.isValidElementType(ue)){var I=J(ue);return new l("Invalid "+ce+" `"+pe+"` of type "+("`"+I+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return e(M)}function j(M){function L(le,ie,ce,pe,ue){if(!(le[ie]instanceof M)){var I=M.name||A,G=ve(le[ie]);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected ")+("instance of `"+I+"`."))}return null}return e(L)}function P(M){if(!Array.isArray(M))return r.NODE_ENV!=="production"&&(arguments.length>1?x("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):x("Invalid argument supplied to oneOf, expected an array.")),O;function L(le,ie,ce,pe,ue){for(var I=le[ie],G=0;G<M.length;G++)if(p(I,M[G]))return null;var ee=JSON.stringify(M,function(ae,W){var he=ne(W);return he==="symbol"?String(W):W});return new l("Invalid "+pe+" `"+ue+"` of value `"+String(I)+"` "+("supplied to `"+ce+"`, expected one of "+ee+"."))}return e(L)}function z(M){function L(le,ie,ce,pe,ue){if(typeof M!="function")return new l("Property `"+ue+"` of component `"+ce+"` has invalid PropType notation inside objectOf.");var I=le[ie],G=J(I);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected an object."));for(var ee in I)if(h(I,ee)){var $=M(I,ee,ce,pe,ue+"."+ee,o);if($ instanceof Error)return $}return null}return e(L)}function N(M){if(!Array.isArray(M))return r.NODE_ENV!=="production"&&x("Invalid argument supplied to oneOfType, expected an instance of array."),O;for(var L=0;L<M.length;L++){var le=M[L];if(typeof le!="function")return x("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Se(le)+" at index "+L+"."),O}function ie(ce,pe,ue,I,G){for(var ee=[],$=0;$<M.length;$++){var ae=M[$],W=ae(ce,pe,ue,I,G,o);if(W==null)return null;W.data&&h(W.data,"expectedType")&&ee.push(W.data.expectedType)}var he=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new l("Invalid "+I+" `"+G+"` supplied to "+("`"+ue+"`"+he+"."))}return e(ie)}function F(){function M(L,le,ie,ce,pe){return V(L[le])?null:new l("Invalid "+ce+" `"+pe+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return e(M)}function Z(M,L,le,ie,ce){return new l((M||"React class")+": "+L+" type `"+le+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ce+"`.")}function K(M){function L(le,ie,ce,pe,ue){var I=le[ie],G=J(I);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type `"+G+"` "+("supplied to `"+ce+"`, expected `object`."));for(var ee in M){var $=M[ee];if(typeof $!="function")return Z(ce,pe,ue,ee,ne($));var ae=$(I,ee,ce,pe,ue+"."+ee,o);if(ae)return ae}return null}return e(L)}function Q(M){function L(le,ie,ce,pe,ue){var I=le[ie],G=J(I);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type `"+G+"` "+("supplied to `"+ce+"`, expected `object`."));var ee=a({},le[ie],M);for(var $ in ee){var ae=M[$];if(h(M,$)&&typeof ae!="function")return Z(ce,pe,ue,$,ne(ae));if(!ae)return new l("Invalid "+pe+" `"+ue+"` key `"+$+"` supplied to `"+ce+"`.\nBad object: "+JSON.stringify(le[ie],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var W=ae(I,$,ce,pe,ue+"."+$,o);if(W)return W}return null}return e(L)}function V(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(V);if(M===null||y(M))return!0;var L=_(M);if(L){var le=L.call(M),ie;if(L!==M.entries){for(;!(ie=le.next()).done;)if(!V(ie.value))return!1}else for(;!(ie=le.next()).done;){var ce=ie.value;if(ce&&!V(ce[1]))return!1}}else return!1;return!0;default:return!1}}function X(M,L){return M==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function J(M){var L=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":X(L,M)?"symbol":L}function ne(M){if(typeof M>"u"||M===null)return""+M;var L=J(M);if(L==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return L}function Se(M){var L=ne(M);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ve(M){return!M.constructor||!M.constructor.name?A:M.constructor.name}return T.checkPropTypes=u,T.resetWarningCache=u.resetWarningCache,T.PropTypes=T,T},Vt}var Ut,Or;function Tn(){if(Or)return Ut;Or=1;var r=Ft();function n(){}function a(){}return a.resetWarningCache=n,Ut=function(){function o(x,O,y,R,C,E){if(E!==r){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}o.isRequired=o;function h(){return o}var u={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:h,element:o,elementType:o,instanceOf:h,node:o,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:a,resetWarningCache:n};return u.PropTypes=u,u},Ut}var Cr;function Ue(){if(Cr)return _t.exports;Cr=1;var r={};if(r.NODE_ENV!=="production"){var n=vr(),a=!0;_t.exports=Dn()(n.isElement,a)}else _t.exports=Tn()();return _t.exports}var dt={exports:{}},$t,_r;function zn(){if(_r)return $t;_r=1;var r={},n=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,u=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,O=(d,w)=>{for(var D in w)a(d,D,{get:w[D],enumerable:!0})},y=(d,w,D,q)=>{if(w&&typeof w=="object"||typeof w=="function")for(let Y of h(w))!x.call(d,Y)&&Y!==D&&a(d,Y,{get:()=>w[Y],enumerable:!(q=o(w,Y))||q.enumerable});return d},R=(d,w,D)=>(D=d!=null?n(u(d)):{},y(!d||!d.__esModule?a(D,"default",{value:d,enumerable:!0}):D,d)),C=d=>y(a({},"__esModule",{value:!0}),d),E={};O(E,{DraggableCore:()=>ge,default:()=>je}),$t=C(E);var _=R(oe),A=R(Ue()),T=R(Mt),p=Ct();function l(d,w){for(let D=0,q=d.length;D<q;D++)if(w.apply(w,[d[D],D,d]))return d[D]}function e(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Function]"}function t(d){return typeof d=="number"&&!isNaN(d)}function c(d){return parseInt(d,10)}function f(d,w,D){if(d[w])return new Error(`Invalid prop ${w} passed to ${D} - do not set this, set it on the child.`)}var i=["Moz","Webkit","O","ms"];function b(d="transform"){var w,D;if(typeof window>"u")return"";const q=(D=(w=window.document)==null?void 0:w.documentElement)==null?void 0:D.style;if(!q||d in q)return"";for(let Y=0;Y<i.length;Y++)if(j(d,i[Y])in q)return i[Y];return""}function j(d,w){return w?`${w}${P(d)}`:d}function P(d){let w="",D=!0;for(let q=0;q<d.length;q++)D?(w+=d[q].toUpperCase(),D=!1):d[q]==="-"?D=!0:w+=d[q];return w}var z=b(),N="";function F(d,w){var D;N||(N=(D=l(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Y){return e(d[Y])}))!=null?D:"");const q=d[N];return e(q)?!!q.call(d,w):!1}function Z(d,w,D){let q=d;do{if(F(q,w))return!0;if(q===D)return!1;q=q.parentNode}while(q);return!1}function K(d,w,D,q){if(!d)return;const Y={capture:!0,...q},Ce=D;d.addEventListener?d.addEventListener(w,Ce,Y):d.attachEvent?d.attachEvent("on"+w,Ce):d["on"+w]=Ce}function Q(d,w,D,q){if(!d)return;const Y={capture:!0,...q},Ce=D;d.removeEventListener?d.removeEventListener(w,Ce,Y):d.detachEvent?d.detachEvent("on"+w,Ce):d["on"+w]=null}function V(d){let w=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w+=c(D.borderTopWidth),w+=c(D.borderBottomWidth),w}function X(d){let w=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w+=c(D.borderLeftWidth),w+=c(D.borderRightWidth),w}function J(d){let w=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w-=c(D.paddingTop),w-=c(D.paddingBottom),w}function ne(d){let w=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w-=c(D.paddingLeft),w-=c(D.paddingRight),w}function Se(d,w,D){const Y=w===w.ownerDocument.body?{left:0,top:0}:w.getBoundingClientRect(),Ce=(d.clientX+w.scrollLeft-Y.left)/D,me=(d.clientY+w.scrollTop-Y.top)/D;return{x:Ce,y:me}}function ve(d,w){const D=L(d,w,"px");return{[j("transform",z)]:D}}function M(d,w){return L(d,w,"")}function L({x:d,y:w},D,q){let Y=`translate(${d}${q},${w}${q})`;if(D){const Ce=`${typeof D.x=="string"?D.x:D.x+q}`,me=`${typeof D.y=="string"?D.y:D.y+q}`;Y=`translate(${Ce}, ${me})`+Y}return Y}function le(d,w){return d.targetTouches&&l(d.targetTouches,D=>w===D.identifier)||d.changedTouches&&l(d.changedTouches,D=>w===D.identifier)}function ie(d){if(d.targetTouches&&d.targetTouches[0])return d.targetTouches[0].identifier;if(d.changedTouches&&d.changedTouches[0])return d.changedTouches[0].identifier}function ce(d){if(!d)return;let w=d.getElementById("react-draggable-style-el");w||(w=d.createElement("style"),w.type="text/css",w.id="react-draggable-style-el",w.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
- `,w.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
- `,d.getElementsByTagName("head")[0].appendChild(w)),d.body&&I(d.body,"react-draggable-transparent-selection")}function pe(d){window.requestAnimationFrame?window.requestAnimationFrame(()=>{ue(d)}):ue(d)}function ue(d){if(d)try{d.body&&G(d.body,"react-draggable-transparent-selection");const w=d.selection;if(w)w.empty();else{const D=(d.defaultView||window).getSelection();D&&D.type!=="Caret"&&D.removeAllRanges()}}catch{}}function I(d,w){d.classList?d.classList.add(w):d.className.match(new RegExp(`(?:^|\\s)${w}(?!\\S)`))||(d.className+=` ${w}`)}function G(d,w){d.classList?d.classList.remove(w):d.className=d.className.replace(new RegExp(`(?:^|\\s)${w}(?!\\S)`,"g"),"")}function ee(d,w,D){if(!d.props.bounds)return[w,D];let{bounds:q}=d.props;q=typeof q=="string"?q:Ae(q);const Y=m(d);if(typeof q=="string"){const{ownerDocument:Ce}=Y,me=Ce.defaultView;if(!me)throw new Error("Cannot resolve the owner window of the draggable node.");let Pe;if(q==="parent"?Pe=Y.parentNode:Pe=Y.getRootNode().querySelector(q),!(Pe instanceof me.HTMLElement))throw new Error('Bounds selector "'+q+'" could not find an element.');const ke=Pe,Ye=me.getComputedStyle(Y),$e=me.getComputedStyle(ke);q={left:-Y.offsetLeft+c($e.paddingLeft)+c(Ye.marginLeft),top:-Y.offsetTop+c($e.paddingTop)+c(Ye.marginTop),right:ne(ke)-X(Y)-Y.offsetLeft+c($e.paddingRight)-c(Ye.marginRight),bottom:J(ke)-V(Y)-Y.offsetTop+c($e.paddingBottom)-c(Ye.marginBottom)}}return t(q.right)&&(w=Math.min(w,q.right)),t(q.bottom)&&(D=Math.min(D,q.bottom)),t(q.left)&&(w=Math.max(w,q.left)),t(q.top)&&(D=Math.max(D,q.top)),[w,D]}function $(d,w,D){const q=Math.round(w/d[0])*d[0],Y=Math.round(D/d[1])*d[1];return[q,Y]}function ae(d){return d.props.axis==="both"||d.props.axis==="x"}function W(d){return d.props.axis==="both"||d.props.axis==="y"}function he(d,w,D){const q=typeof w=="number"?le(d,w):null;if(typeof w=="number"&&!q)return null;const Y=m(D),Ce=D.props.offsetParent||Y.offsetParent||Y.ownerDocument.body;return Se(q||d,Ce,D.props.scale)}function ze(d,w,D){const q=!t(d.lastX),Y=m(d);return q?{node:Y,deltaX:0,deltaY:0,lastX:w,lastY:D,x:w,y:D}:{node:Y,deltaX:w-d.lastX,deltaY:D-d.lastY,lastX:d.lastX,lastY:d.lastY,x:w,y:D}}function xe(d,w){const D=d.props.scale;return{node:w.node,x:d.state.x+w.deltaX/D,y:d.state.y+w.deltaY/D,deltaX:w.deltaX/D,deltaY:w.deltaY/D,lastX:d.state.x,lastY:d.state.y}}function Ae(d){return{left:d.left,top:d.top,right:d.right,bottom:d.bottom}}function m(d){const w=d.findDOMNode();if(!w)throw new Error("<DraggableCore>: Unmounted during event!");return w}var v=R(oe),S=R(Ue()),H=R(Mt);function re(...d){r.DRAGGABLE_DEBUG&&console.log(...d)}var U={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},se=U.mouse,ge=class extends v.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=d=>{if(this.props.onMouseDown(d),!this.props.allowAnyClick&&(typeof d.button=="number"&&d.button!==0||d.ctrlKey))return!1;const w=this.findDOMNode();if(!w||!w.ownerDocument||!w.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:D}=w;if(this.props.disabled||!(d.target instanceof D.defaultView.Node)||this.props.handle&&!Z(d.target,this.props.handle,w)||this.props.cancel&&Z(d.target,this.props.cancel,w))return;d.type==="touchstart"&&!this.props.allowMobileScroll&&d.preventDefault();const q=ie(d);this.touchIdentifier=q;const Y=he(d,q,this);if(Y==null)return;const{x:Ce,y:me}=Y,Pe=ze(this,Ce,me);re("DraggableCore: handleDragStart: %j",Pe),re("calling",this.props.onStart),!(this.props.onStart(d,Pe)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&ce(D),this.dragging=!0,this.lastX=Ce,this.lastY=me,K(D,se.move,this.handleDrag),K(D,se.stop,this.handleDragStop))},this.handleDrag=d=>{const w=he(d,this.touchIdentifier,this);if(w==null)return;let{x:D,y:q}=w;if(Array.isArray(this.props.grid)){let me=D-this.lastX,Pe=q-this.lastY;if([me,Pe]=$(this.props.grid,me,Pe),!me&&!Pe)return;D=this.lastX+me,q=this.lastY+Pe}const Y=ze(this,D,q);if(re("DraggableCore: handleDrag: %j",Y),this.props.onDrag(d,Y)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const me=document.createEvent("MouseEvents");me.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(me)}return}this.lastX=D,this.lastY=q},this.handleDragStop=d=>{if(!this.dragging)return;const w=he(d,this.touchIdentifier,this);if(w==null)return;let{x:D,y:q}=w;if(Array.isArray(this.props.grid)){let Pe=D-this.lastX||0,ke=q-this.lastY||0;[Pe,ke]=$(this.props.grid,Pe,ke),D=this.lastX+Pe,q=this.lastY+ke}const Y=ze(this,D,q);if(this.props.onStop(d,Y)===!1||this.mounted===!1)return!1;const me=this.findDOMNode();me&&this.props.enableUserSelectHack&&pe(me.ownerDocument),re("DraggableCore: handleDragStop: %j",Y),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,me&&(re("DraggableCore: Removing handlers"),Q(me.ownerDocument,se.move,this.handleDrag),Q(me.ownerDocument,se.stop,this.handleDragStop))},this.onMouseDown=d=>(se=U.mouse,this.handleDragStart(d)),this.onMouseUp=d=>(se=U.mouse,this.handleDragStop(d)),this.onTouchStart=d=>(se=U.touch,this.handleDragStart(d)),this.onTouchEnd=d=>(se=U.touch,this.handleDragStop(d))}componentDidMount(){this.mounted=!0;const d=this.findDOMNode();d&&K(d,U.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const d=this.findDOMNode();if(d){const{ownerDocument:w}=d;Q(w,U.mouse.move,this.handleDrag),Q(w,U.touch.move,this.handleDrag),Q(w,U.mouse.stop,this.handleDragStop),Q(w,U.touch.stop,this.handleDragStop),Q(d,U.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&pe(w)}}findDOMNode(){var d;if((d=this.props)!=null&&d.nodeRef)return this.props.nodeRef.current;const w=H.default;return typeof w.findDOMNode=="function"?w.findDOMNode(this):(re("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return v.cloneElement(v.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};ge.displayName="DraggableCore",ge.propTypes={allowAnyClick:S.default.bool,allowMobileScroll:S.default.bool,children:S.default.node.isRequired,disabled:S.default.bool,enableUserSelectHack:S.default.bool,offsetParent:function(d,w){if(d[w]&&d[w].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:S.default.arrayOf(S.default.number),handle:S.default.string,cancel:S.default.string,nodeRef:S.default.object,onStart:S.default.func,onDrag:S.default.func,onStop:S.default.func,onMouseDown:S.default.func,scale:S.default.number,className:f,style:f,transform:f},ge.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var je=class extends _.Component{constructor(d){super(d),this.onDragStart=(w,D)=>{if(re("Draggable: onDragStart: %j",D),this.props.onStart(w,xe(this,D))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(w,D)=>{if(!this.state.dragging)return!1;re("Draggable: onDrag: %j",D);const q=xe(this,D),Y={x:q.x,y:q.y,slackX:0,slackY:0};if(this.props.bounds){const{x:me,y:Pe}=Y;Y.x+=this.state.slackX,Y.y+=this.state.slackY;const[ke,Ye]=ee(this,Y.x,Y.y);Y.x=ke,Y.y=Ye,Y.slackX=this.state.slackX+(me-Y.x),Y.slackY=this.state.slackY+(Pe-Y.y),q.x=Y.x,q.y=Y.y,q.deltaX=Y.x-this.state.x,q.deltaY=Y.y-this.state.y}if(this.props.onDrag(w,q)===!1)return!1;this.setState(Y)},this.onDragStop=(w,D)=>{if(!this.state.dragging||this.props.onStop(w,xe(this,D))===!1)return!1;re("Draggable: onDragStop: %j",D);const Y={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:me,y:Pe}=this.props.position;Y.x=me,Y.y=Pe}this.setState(Y)},this.state={dragging:!1,dragged:!1,x:d.position?d.position.x:d.defaultPosition.x,y:d.position?d.position.y:d.defaultPosition.y,prevPropsPosition:{...d.position},slackX:0,slackY:0,isElementSVG:!1},d.position&&!(d.onDrag||d.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:d},{prevPropsPosition:w}){return d&&(!w||d.x!==w.x||d.y!==w.y)?(re("Draggable: getDerivedStateFromProps %j",{position:d,prevPropsPosition:w}),{x:d.x,y:d.y,prevPropsPosition:{...d}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var d;if((d=this.props)!=null&&d.nodeRef)return this.props.nodeRef.current;const w=T.default;return typeof w.findDOMNode=="function"?w.findDOMNode(this):null}render(){const{axis:d,bounds:w,children:D,defaultPosition:q,defaultClassName:Y,defaultClassNameDragging:Ce,defaultClassNameDragged:me,position:Pe,positionOffset:ke,scale:Ye,...$e}=this.props;let yt={},Qe=null;const Ve=!!!Pe||this.state.dragging,et=Pe||q,tt={x:ae(this)&&Ve?this.state.x:et.x,y:W(this)&&Ve?this.state.y:et.y};this.state.isElementSVG?Qe=M(tt,ke):yt=ve(tt,ke);const rt=_.Children.only(D),Qt=(0,p.clsx)(rt.props.className||"",Y,{[Ce]:this.state.dragging,[me]:this.state.dragged});return _.createElement(ge,{...$e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},_.cloneElement(rt,{className:Qt,style:{...rt.props.style,...yt},transform:Qe}))}};return je.displayName="Draggable",je.propTypes={...ge.propTypes,axis:A.default.oneOf(["both","x","y","none"]),bounds:A.default.oneOfType([A.default.shape({left:A.default.number,right:A.default.number,top:A.default.number,bottom:A.default.number}),A.default.string,A.default.oneOf([!1])]),defaultClassName:A.default.string,defaultClassNameDragging:A.default.string,defaultClassNameDragged:A.default.string,defaultPosition:A.default.shape({x:A.default.number,y:A.default.number}),positionOffset:A.default.shape({x:A.default.oneOfType([A.default.number,A.default.string]),y:A.default.oneOfType([A.default.number,A.default.string])}),position:A.default.shape({x:A.default.number,y:A.default.number}),className:f,style:f,transform:f},je.defaultProps={...ge.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},$t}var Er;function Xt(){if(Er)return dt.exports;Er=1;const r=zn(),n=r.DraggableCore,a=r.default||r;return dt.exports=a,dt.exports.default=a,dt.exports.DraggableCore=n,dt.exports}var ft={exports:{}},pt={},Pt={},Pr;function kn(){if(Pr)return Pt;Pr=1,Pt.__esModule=!0,Pt.cloneElement=O;var r=n(oe);function n(y){return y&&y.__esModule?y:{default:y}}function a(y,R){var C=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);R&&(E=E.filter(function(_){return Object.getOwnPropertyDescriptor(y,_).enumerable})),C.push.apply(C,E)}return C}function o(y){for(var R=1;R<arguments.length;R++){var C=arguments[R]!=null?arguments[R]:{};R%2?a(Object(C),!0).forEach(function(E){h(y,E,C[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(C)):a(Object(C)).forEach(function(E){Object.defineProperty(y,E,Object.getOwnPropertyDescriptor(C,E))})}return y}function h(y,R,C){return(R=u(R))in y?Object.defineProperty(y,R,{value:C,enumerable:!0,configurable:!0,writable:!0}):y[R]=C,y}function u(y){var R=x(y,"string");return typeof R=="symbol"?R:R+""}function x(y,R){if(typeof y!="object"||!y)return y;var C=y[Symbol.toPrimitive];if(C!==void 0){var E=C.call(y,R);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(y)}function O(y,R){return R.style&&y.props.style&&(R.style=o(o({},y.props.style),R.style)),R.className&&y.props.className&&(R.className=y.props.className+" "+R.className),r.default.cloneElement(y,R)}return Pt}var ht={},Dr;function Tr(){if(Dr)return ht;Dr=1,ht.__esModule=!0,ht.resizableProps=void 0;var r=n(Ue());Xt();function n(a){return a&&a.__esModule?a:{default:a}}return ht.resizableProps={axis:r.default.oneOf(["both","x","y","none"]),className:r.default.string,children:r.default.element.isRequired,draggableOpts:r.default.shape({allowAnyClick:r.default.bool,cancel:r.default.string,children:r.default.node,disabled:r.default.bool,enableUserSelectHack:r.default.bool,offsetParent:typeof Element<"u"?r.default.instanceOf(Element):r.default.any,grid:r.default.arrayOf(r.default.number),handle:r.default.string,nodeRef:r.default.object,onStart:r.default.func,onDrag:r.default.func,onStop:r.default.func,onMouseDown:r.default.func,scale:r.default.number}),height:function(){for(var a=arguments.length,o=new Array(a),h=0;h<a;h++)o[h]=arguments[h];const u=o[0];return u.axis==="both"||u.axis==="y"?r.default.number.isRequired(...o):r.default.number(...o)},handle:r.default.oneOfType([r.default.node,r.default.func]),handleSize:r.default.arrayOf(r.default.number),lockAspectRatio:r.default.bool,maxConstraints:r.default.arrayOf(r.default.number),minConstraints:r.default.arrayOf(r.default.number),onResizeStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,resizeHandles:r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:r.default.number,width:function(){for(var a=arguments.length,o=new Array(a),h=0;h<a;h++)o[h]=arguments[h];const u=o[0];return u.axis==="both"||u.axis==="x"?r.default.number.isRequired(...o):r.default.number(...o)}},ht}var zr;function kr(){if(zr)return pt;zr=1,pt.__esModule=!0,pt.default=void 0;var r=u(oe),n=Xt(),a=kn(),o=Tr();const h=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function u(T,p){if(typeof WeakMap=="function")var l=new WeakMap,e=new WeakMap;return(u=function(t,c){if(!c&&t&&t.__esModule)return t;var f,i,b={__proto__:null,default:t};if(t===null||typeof t!="object"&&typeof t!="function")return b;if(f=c?e:l){if(f.has(t))return f.get(t);f.set(t,b)}for(const j in t)j!=="default"&&{}.hasOwnProperty.call(t,j)&&((i=(f=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,j))&&(i.get||i.set)?f(b,j,i):b[j]=t[j]);return b})(T,p)}function x(){return x=Object.assign?Object.assign.bind():function(T){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var e in l)({}).hasOwnProperty.call(l,e)&&(T[e]=l[e])}return T},x.apply(null,arguments)}function O(T,p){if(T==null)return{};var l={};for(var e in T)if({}.hasOwnProperty.call(T,e)){if(p.indexOf(e)!==-1)continue;l[e]=T[e]}return l}function y(T,p){var l=Object.keys(T);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(T);p&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(T,t).enumerable})),l.push.apply(l,e)}return l}function R(T){for(var p=1;p<arguments.length;p++){var l=arguments[p]!=null?arguments[p]:{};p%2?y(Object(l),!0).forEach(function(e){C(T,e,l[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(l)):y(Object(l)).forEach(function(e){Object.defineProperty(T,e,Object.getOwnPropertyDescriptor(l,e))})}return T}function C(T,p,l){return(p=E(p))in T?Object.defineProperty(T,p,{value:l,enumerable:!0,configurable:!0,writable:!0}):T[p]=l,T}function E(T){var p=_(T,"string");return typeof p=="symbol"?p:p+""}function _(T,p){if(typeof T!="object"||!T)return T;var l=T[Symbol.toPrimitive];if(l!==void 0){var e=l.call(T,p);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(T)}let A=class extends r.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(p,l){const e=this.props,t=e.minConstraints,c=e.maxConstraints,f=e.lockAspectRatio;if(!t&&!c&&!f)return[p,l];if(f){const N=this.props.width/this.props.height,F=p-this.props.width,Z=l-this.props.height;Math.abs(F)>Math.abs(Z*N)?l=p/N:p=l*N}const i=p,b=l;let j=this.slack||[0,0],P=j[0],z=j[1];return p+=P,l+=z,t&&(p=Math.max(t[0],p),l=Math.max(t[1],l)),c&&(p=Math.min(c[0],p),l=Math.min(c[1],l)),this.slack=[P+(i-p),z+(b-l)],[p,l]}resizeHandler(p,l){return(e,t)=>{var c,f,i,b;let j=t.node,P=t.deltaX,z=t.deltaY;p==="onResizeStart"&&this.resetData();const N=(this.props.axis==="both"||this.props.axis==="x")&&l!=="n"&&l!=="s",F=(this.props.axis==="both"||this.props.axis==="y")&&l!=="e"&&l!=="w";if(!N&&!F)return;const Z=l[0],K=l[l.length-1],Q=j.getBoundingClientRect();if(this.lastHandleRect!=null){if(K==="w"){const ie=Q.left-this.lastHandleRect.left;P+=ie}if(Z==="n"){const ie=Q.top-this.lastHandleRect.top;z+=ie}}this.lastHandleRect=Q,K==="w"&&(P=-P),Z==="n"&&(z=-z);const V=(c=(f=this.lastSize)==null?void 0:f.width)!=null?c:this.props.width,X=(i=(b=this.lastSize)==null?void 0:b.height)!=null?i:this.props.height;let J=V+(N?P/this.props.transformScale:0),ne=X+(F?z/this.props.transformScale:0);var Se=this.runConstraints(J,ne);if(J=Se[0],ne=Se[1],p==="onResizeStop"&&this.lastSize){var ve=this.lastSize;J=ve.width,ne=ve.height}const M=J!==V||ne!==X;p!=="onResizeStop"&&(this.lastSize={width:J,height:ne});const L=typeof this.props[p]=="function"?this.props[p]:null;L&&!(p==="onResize"&&!M)&&(e.persist==null||e.persist(),L(e,{node:j,size:{width:J,height:ne},handle:l})),p==="onResizeStop"&&this.resetData()}}renderResizeHandle(p,l){const e=this.props.handle;if(!e)return r.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+p,ref:l});if(typeof e=="function")return e(p,l);const t=typeof e.type=="string",c=R({ref:l},t?{}:{handleAxis:p});return r.cloneElement(e,c)}render(){const p=this.props,l=p.children,e=p.className,t=p.draggableOpts;p.width,p.height,p.handle,p.handleSize,p.lockAspectRatio,p.axis,p.minConstraints,p.maxConstraints,p.onResize,p.onResizeStop,p.onResizeStart;const c=p.resizeHandles;p.transformScale;const f=O(p,h);return(0,a.cloneElement)(l,R(R({},f),{},{className:(e?e+" ":"")+"react-resizable",children:[...r.Children.toArray(l.props.children),...c.map(i=>{var b;const j=(b=this.handleRefs[i])!=null?b:this.handleRefs[i]=r.createRef();return r.createElement(n.DraggableCore,x({},t,{nodeRef:j,key:"resizableHandle-"+i,onStop:this.resizeHandler("onResizeStop",i),onStart:this.resizeHandler("onResizeStart",i),onDrag:this.resizeHandler("onResize",i)}),this.renderResizeHandle(i,j))})]}))}};return pt.default=A,A.propTypes=o.resizableProps,A.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},pt}var gt={},Mr;function Mn(){if(Mr)return gt;Mr=1,gt.__esModule=!0,gt.default=void 0;var r=x(oe),n=u(Ue()),a=u(kr()),o=Tr();const h=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function u(p){return p&&p.__esModule?p:{default:p}}function x(p,l){if(typeof WeakMap=="function")var e=new WeakMap,t=new WeakMap;return(x=function(c,f){if(!f&&c&&c.__esModule)return c;var i,b,j={__proto__:null,default:c};if(c===null||typeof c!="object"&&typeof c!="function")return j;if(i=f?t:e){if(i.has(c))return i.get(c);i.set(c,j)}for(const P in c)P!=="default"&&{}.hasOwnProperty.call(c,P)&&((b=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(c,P))&&(b.get||b.set)?i(j,P,b):j[P]=c[P]);return j})(p,l)}function O(){return O=Object.assign?Object.assign.bind():function(p){for(var l=1;l<arguments.length;l++){var e=arguments[l];for(var t in e)({}).hasOwnProperty.call(e,t)&&(p[t]=e[t])}return p},O.apply(null,arguments)}function y(p,l){var e=Object.keys(p);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(p);l&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(p,c).enumerable})),e.push.apply(e,t)}return e}function R(p){for(var l=1;l<arguments.length;l++){var e=arguments[l]!=null?arguments[l]:{};l%2?y(Object(e),!0).forEach(function(t){C(p,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(e)):y(Object(e)).forEach(function(t){Object.defineProperty(p,t,Object.getOwnPropertyDescriptor(e,t))})}return p}function C(p,l,e){return(l=E(l))in p?Object.defineProperty(p,l,{value:e,enumerable:!0,configurable:!0,writable:!0}):p[l]=e,p}function E(p){var l=_(p,"string");return typeof l=="symbol"?l:l+""}function _(p,l){if(typeof p!="object"||!p)return p;var e=p[Symbol.toPrimitive];if(e!==void 0){var t=e.call(p,l);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(p)}function A(p,l){if(p==null)return{};var e={};for(var t in p)if({}.hasOwnProperty.call(p,t)){if(l.indexOf(t)!==-1)continue;e[t]=p[t]}return e}let T=class extends r.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(l,e)=>{const t=e.size;this.props.onResize?(l.persist==null||l.persist(),this.setState(t,()=>this.props.onResize&&this.props.onResize(l,e))):this.setState(t)}}static getDerivedStateFromProps(l,e){return e.propsWidth!==l.width||e.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null}render(){const l=this.props,e=l.handle,t=l.handleSize;l.onResize;const c=l.onResizeStart,f=l.onResizeStop,i=l.draggableOpts,b=l.minConstraints,j=l.maxConstraints,P=l.lockAspectRatio,z=l.axis;l.width,l.height;const N=l.resizeHandles,F=l.style,Z=l.transformScale,K=A(l,h);return r.createElement(a.default,{axis:z,draggableOpts:i,handle:e,handleSize:t,height:this.state.height,lockAspectRatio:P,maxConstraints:j,minConstraints:b,onResizeStart:c,onResize:this.onResize,onResizeStop:f,resizeHandles:N,transformScale:Z,width:this.state.width},r.createElement("div",O({},K,{style:R(R({},F),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return gt.default=T,T.propTypes=R(R({},o.resizableProps),{},{children:n.default.element}),gt}var Ir;function In(){return Ir||(Ir=1,ft.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ft.exports.Resizable=kr().default,ft.exports.ResizableBox=Mn().default),ft.exports}var Ge={},Ar;function Lr(){if(Ar)return Ge;Ar=1;var r={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.resizeHandleType=Ge.resizeHandleAxesType=Ge.default=void 0;var n=o(Ue()),a=o(oe);function o(x){return x&&x.__esModule?x:{default:x}}const h=Ge.resizeHandleAxesType=n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),u=Ge.resizeHandleType=n.default.oneOfType([n.default.node,n.default.func]);return Ge.default={className:n.default.string,style:n.default.object,width:n.default.number,autoSize:n.default.bool,cols:n.default.number,draggableCancel:n.default.string,draggableHandle:n.default.string,verticalCompact:function(x){x.verticalCompact===!1&&r.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:n.default.oneOf(["vertical","horizontal"]),layout:function(x){var O=x.layout;O!==void 0&&Ke().validateLayout(O,"layout")},margin:n.default.arrayOf(n.default.number),containerPadding:n.default.arrayOf(n.default.number),rowHeight:n.default.number,maxRows:n.default.number,isBounded:n.default.bool,isDraggable:n.default.bool,isResizable:n.default.bool,allowOverlap:n.default.bool,preventCollision:n.default.bool,useCSSTransforms:n.default.bool,transformScale:n.default.number,isDroppable:n.default.bool,resizeHandles:h,resizeHandle:u,onLayoutChange:n.default.func,onDragStart:n.default.func,onDrag:n.default.func,onDragStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,onResizeStop:n.default.func,onDrop:n.default.func,droppingItem:n.default.shape({i:n.default.string.isRequired,w:n.default.number.isRequired,h:n.default.number.isRequired}),children:function(x,O){const y=x[O],R={};a.default.Children.forEach(y,function(C){if((C==null?void 0:C.key)!=null){if(R[C.key])throw new Error('Duplicate child key "'+C.key+'" found! This will cause problems in ReactGridLayout.');R[C.key]=!0}})},innerRef:n.default.any},Ge}var Nr;function An(){if(Nr)return ut;Nr=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.default=void 0;var r=R(oe),n=Mt,a=R(Ue()),o=Xt(),h=In(),u=Ke(),x=Ht(),O=Lr(),y=R(Ct());function R(l){return l&&l.__esModule?l:{default:l}}function C(l,e){var t=Object.keys(l);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(l);e&&(c=c.filter(function(f){return Object.getOwnPropertyDescriptor(l,f).enumerable})),t.push.apply(t,c)}return t}function E(l){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?C(Object(t),!0).forEach(function(c){_(l,c,t[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach(function(c){Object.defineProperty(l,c,Object.getOwnPropertyDescriptor(t,c))})}return l}function _(l,e,t){return(e=A(e))in l?Object.defineProperty(l,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):l[e]=t,l}function A(l){var e=T(l,"string");return typeof e=="symbol"?e:e+""}function T(l,e){if(typeof l!="object"||!l)return l;var t=l[Symbol.toPrimitive];if(t!==void 0){var c=t.call(l,e);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(l)}let p=class extends r.default.Component{constructor(){super(...arguments),_(this,"state",{resizing:null,dragging:null,className:""}),_(this,"elementRef",r.default.createRef()),_(this,"onDragStart",(e,t)=>{let{node:c}=t;const{onDragStart:f,transformScale:i}=this.props;if(!f)return;const b={top:0,left:0},{offsetParent:j}=c;if(!j)return;const P=j.getBoundingClientRect(),z=c.getBoundingClientRect(),N=z.left/i,F=P.left/i,Z=z.top/i,K=P.top/i;b.left=N-F+j.scrollLeft,b.top=Z-K+j.scrollTop,this.setState({dragging:b});const{x:Q,y:V}=(0,x.calcXY)(this.getPositionParams(),b.top,b.left,this.props.w,this.props.h);return f.call(this,this.props.i,Q,V,{e,node:c,newPosition:b})}),_(this,"onDrag",(e,t,c)=>{let{node:f,deltaX:i,deltaY:b}=t;const{onDrag:j}=this.props;if(!j)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let P=this.state.dragging.top+b,z=this.state.dragging.left+i;const{isBounded:N,i:F,w:Z,h:K,containerWidth:Q}=this.props,V=this.getPositionParams();if(N){const{offsetParent:Se}=f;if(Se){const{margin:ve,rowHeight:M}=this.props,L=Se.clientHeight-(0,x.calcGridItemWHPx)(K,M,ve[1]);P=(0,x.clamp)(P,0,L);const le=(0,x.calcGridColWidth)(V),ie=Q-(0,x.calcGridItemWHPx)(Z,le,ve[0]);z=(0,x.clamp)(z,0,ie)}}const X={top:P,left:z};c?this.setState({dragging:X}):(0,n.flushSync)(()=>{this.setState({dragging:X})});const{x:J,y:ne}=(0,x.calcXY)(V,P,z,Z,K);return j.call(this,F,J,ne,{e,node:f,newPosition:X})}),_(this,"onDragStop",(e,t)=>{let{node:c}=t;const{onDragStop:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:i,h:b,i:j}=this.props,{left:P,top:z}=this.state.dragging,N={top:z,left:P};this.setState({dragging:null});const{x:F,y:Z}=(0,x.calcXY)(this.getPositionParams(),z,P,i,b);return f.call(this,j,F,Z,{e,node:c,newPosition:N})}),_(this,"onResizeStop",(e,t,c)=>this.onResizeHandler(e,t,c,"onResizeStop")),_(this,"onResizeStart",(e,t,c)=>this.onResizeHandler(e,t,c,"onResizeStart")),_(this,"onResize",(e,t,c)=>this.onResizeHandler(e,t,c,"onResize"))}shouldComponentUpdate(e,t){if(this.props.children!==e.children||this.props.droppingPosition!==e.droppingPosition)return!0;const c=(0,x.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),f=(0,x.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,u.fastPositionEqual)(c,f)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const c=this.elementRef.current;if(!c)return;const f=e.droppingPosition||{left:0,top:0},{dragging:i}=this.state,b=i&&t.left!==f.left||t.top!==f.top;if(!i)this.onDragStart(t.e,{node:c,deltaX:t.left,deltaY:t.top});else if(b){const j=t.left-i.left,P=t.top-i.top;this.onDrag(t.e,{node:c,deltaX:j,deltaY:P},!0)}}getPositionParams(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:c,useCSSTransforms:f}=this.props;let i;return f?i=(0,u.setTransform)(e):(i=(0,u.setTopLeft)(e),t&&(i.left=(0,u.perc)(e.left/c),i.width=(0,u.perc)(e.width/c))),i}mixinDraggable(e,t){return r.default.createElement(o.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(c,f)=>t(c,f,e)}mixinResizable(e,t,c){const{cols:f,minW:i,minH:b,maxW:j,maxH:P,transformScale:z,resizeHandles:N,resizeHandle:F}=this.props,Z=this.getPositionParams(),K=(0,x.calcGridItemPosition)(Z,0,0,f,0).width,Q=(0,x.calcGridItemPosition)(Z,0,0,i,b),V=(0,x.calcGridItemPosition)(Z,0,0,j,P),X=[Q.width,Q.height],J=[Math.min(V.width,K),Math.min(V.height,1/0)];return r.default.createElement(h.Resizable,{draggableOpts:{disabled:!c},className:c?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:X,maxConstraints:J,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:z,resizeHandles:N,handle:F},e)}onResizeHandler(e,t,c,f){let{node:i,size:b,handle:j}=t;const P=this.props[f];if(!P)return;const{x:z,y:N,i:F,maxH:Z,minH:K,containerWidth:Q}=this.props,{minW:V,maxW:X}=this.props;let J=b;i&&(J=(0,u.resizeItemInDirection)(j,c,b,Q),(0,n.flushSync)(()=>{this.setState({resizing:f==="onResizeStop"?null:J})}));let{w:ne,h:Se}=(0,x.calcWH)(this.getPositionParams(),J.width,J.height,z,N,j);ne=(0,x.clamp)(ne,Math.max(V,1),X),Se=(0,x.clamp)(Se,K,Z),P.call(this,F,ne,Se,{e,node:i,size:J,handle:j})}render(){const{x:e,y:t,w:c,h:f,isDraggable:i,isResizable:b,droppingPosition:j,useCSSTransforms:P}=this.props,z=(0,x.calcGridItemPosition)(this.getPositionParams(),e,t,c,f,this.state),N=r.default.Children.only(this.props.children);let F=r.default.cloneElement(N,{ref:this.elementRef,className:(0,y.default)("react-grid-item",N.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":i,"react-draggable-dragging":!!this.state.dragging,dropping:!!j,cssTransforms:P}),style:E(E(E({},this.props.style),N.props.style),this.createStyle(z))});return F=this.mixinResizable(F,z,b),F=this.mixinDraggable(F,i),F}};return ut.default=p,_(p,"propTypes",{children:a.default.element,cols:a.default.number.isRequired,containerWidth:a.default.number.isRequired,rowHeight:a.default.number.isRequired,margin:a.default.array.isRequired,maxRows:a.default.number.isRequired,containerPadding:a.default.array.isRequired,x:a.default.number.isRequired,y:a.default.number.isRequired,w:a.default.number.isRequired,h:a.default.number.isRequired,minW:function(l,e){const t=l[e];if(typeof t!="number")return new Error("minWidth not Number");if(t>l.w||t>l.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(l,e){const t=l[e];if(typeof t!="number")return new Error("maxWidth not Number");if(t<l.w||t<l.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(l,e){const t=l[e];if(typeof t!="number")return new Error("minHeight not Number");if(t>l.h||t>l.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(l,e){const t=l[e];if(typeof t!="number")return new Error("maxHeight not Number");if(t<l.h||t<l.minH)return new Error("maxHeight smaller than item height/minHeight")},i:a.default.string.isRequired,resizeHandles:O.resizeHandleAxesType,resizeHandle:O.resizeHandleType,onDragStop:a.default.func,onDragStart:a.default.func,onDrag:a.default.func,onResizeStop:a.default.func,onResizeStart:a.default.func,onResize:a.default.func,isDraggable:a.default.bool.isRequired,isResizable:a.default.bool.isRequired,isBounded:a.default.bool.isRequired,static:a.default.bool,useCSSTransforms:a.default.bool.isRequired,transformScale:a.default.number,className:a.default.string,handle:a.default.string,cancel:a.default.string,droppingPosition:a.default.shape({e:a.default.object.isRequired,left:a.default.number.isRequired,top:a.default.number.isRequired})}),_(p,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),ut}var Wr;function Hr(){if(Wr)return lt;Wr=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var r=y(oe),n=Nt(),a=O(Ct()),o=Ke(),h=Ht(),u=O(An()),x=O(Lr());function O(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(typeof WeakMap=="function")var c=new WeakMap,f=new WeakMap;return(y=function(i,b){if(!b&&i&&i.__esModule)return i;var j,P,z={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return z;if(j=b?f:c){if(j.has(i))return j.get(i);j.set(i,z)}for(const N in i)N!=="default"&&{}.hasOwnProperty.call(i,N)&&((P=(j=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,N))&&(P.get||P.set)?j(z,N,P):z[N]=i[N]);return z})(e,t)}function R(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);t&&(f=f.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),c.push.apply(c,f)}return c}function C(e){for(var t=1;t<arguments.length;t++){var c=arguments[t]!=null?arguments[t]:{};t%2?R(Object(c),!0).forEach(function(f){E(e,f,c[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):R(Object(c)).forEach(function(f){Object.defineProperty(e,f,Object.getOwnPropertyDescriptor(c,f))})}return e}function E(e,t,c){return(t=_(t))in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}function _(e){var t=A(e,"string");return typeof t=="symbol"?t:t+""}function A(e,t){if(typeof e!="object"||!e)return e;var c=e[Symbol.toPrimitive];if(c!==void 0){var f=c.call(e,t);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const T="react-grid-layout";let p=!1;try{p=/firefox/i.test(navigator.userAgent)}catch{}let l=class extends r.Component{constructor(){super(...arguments),E(this,"state",{activeDrag:null,layout:(0,o.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,o.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),E(this,"dragEnterCounter",0),E(this,"onDragStart",(t,c,f,i)=>{let{e:b,node:j}=i;const{layout:P}=this.state,z=(0,o.getLayoutItem)(P,t);if(!z)return;const N={w:z.w,h:z.h,x:z.x,y:z.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,o.cloneLayoutItem)(z),oldLayout:P,activeDrag:N}),this.props.onDragStart(P,z,z,null,b,j)}),E(this,"onDrag",(t,c,f,i)=>{let{e:b,node:j}=i;const{oldDragItem:P}=this.state;let{layout:z}=this.state;const{cols:N,allowOverlap:F,preventCollision:Z}=this.props,K=(0,o.getLayoutItem)(z,t);if(!K)return;const Q={w:K.w,h:K.h,x:K.x,y:K.y,placeholder:!0,i:t};z=(0,o.moveElement)(z,K,c,f,!0,Z,(0,o.compactType)(this.props),N,F),this.props.onDrag(z,P,K,Q,b,j),this.setState({layout:F?z:(0,o.compact)(z,(0,o.compactType)(this.props),N),activeDrag:Q})}),E(this,"onDragStop",(t,c,f,i)=>{let{e:b,node:j}=i;if(!this.state.activeDrag)return;const{oldDragItem:P}=this.state;let{layout:z}=this.state;const{cols:N,preventCollision:F,allowOverlap:Z}=this.props,K=(0,o.getLayoutItem)(z,t);if(!K)return;z=(0,o.moveElement)(z,K,c,f,!0,F,(0,o.compactType)(this.props),N,Z);const V=Z?z:(0,o.compact)(z,(0,o.compactType)(this.props),N);this.props.onDragStop(V,P,K,null,b,j);const{oldLayout:X}=this.state;this.setState({activeDrag:null,layout:V,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(V,X)}),E(this,"onResizeStart",(t,c,f,i)=>{let{e:b,node:j}=i;const{layout:P}=this.state,z=(0,o.getLayoutItem)(P,t);z&&(this.setState({oldResizeItem:(0,o.cloneLayoutItem)(z),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(P,z,z,null,b,j))}),E(this,"onResize",(t,c,f,i)=>{let{e:b,node:j,size:P,handle:z}=i;const{oldResizeItem:N}=this.state,{layout:F}=this.state,{cols:Z,preventCollision:K,allowOverlap:Q}=this.props;let V=!1,X,J,ne;const[Se,ve]=(0,o.withLayoutItem)(F,t,L=>{let le;return J=L.x,ne=L.y,["sw","w","nw","n","ne"].indexOf(z)!==-1&&(["sw","nw","w"].indexOf(z)!==-1&&(J=L.x+(L.w-c),c=L.x!==J&&J<0?L.w:c,J=J<0?0:J),["ne","n","nw"].indexOf(z)!==-1&&(ne=L.y+(L.h-f),f=L.y!==ne&&ne<0?L.h:f,ne=ne<0?0:ne),V=!0),K&&!Q&&(le=(0,o.getAllCollisions)(F,C(C({},L),{},{w:c,h:f,x:J,y:ne})).filter(ce=>ce.i!==L.i).length>0,le&&(ne=L.y,f=L.h,J=L.x,c=L.w,V=!1)),L.w=c,L.h=f,L});if(!ve)return;X=Se,V&&(X=(0,o.moveElement)(Se,ve,J,ne,!0,this.props.preventCollision,(0,o.compactType)(this.props),Z,Q));const M={w:ve.w,h:ve.h,x:ve.x,y:ve.y,static:!0,i:t};this.props.onResize(X,N,ve,M,b,j),this.setState({layout:Q?X:(0,o.compact)(X,(0,o.compactType)(this.props),Z),activeDrag:M})}),E(this,"onResizeStop",(t,c,f,i)=>{let{e:b,node:j}=i;const{layout:P,oldResizeItem:z}=this.state,{cols:N,allowOverlap:F}=this.props,Z=(0,o.getLayoutItem)(P,t),K=F?P:(0,o.compact)(P,(0,o.compactType)(this.props),N);this.props.onResizeStop(K,z,Z,null,b,j);const{oldLayout:Q}=this.state;this.setState({activeDrag:null,layout:K,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(K,Q)}),E(this,"onDragOver",t=>{var c;if(t.preventDefault(),t.stopPropagation(),p&&!((c=t.nativeEvent.target)!==null&&c!==void 0&&c.classList.contains(T)))return!1;const{droppingItem:f,onDropDragOver:i,margin:b,cols:j,rowHeight:P,maxRows:z,width:N,containerPadding:F,transformScale:Z}=this.props,K=i==null?void 0:i(t);if(K===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const Q=C(C({},f),K),{layout:V}=this.state,X=t.currentTarget.getBoundingClientRect(),J=t.clientX-X.left,ne=t.clientY-X.top,Se={left:J/Z,top:ne/Z,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ve,top:M}=this.state.droppingPosition;(ve!=J||M!=ne)&&this.setState({droppingPosition:Se})}}else{const ve={cols:j,margin:b,maxRows:z,rowHeight:P,containerWidth:N,containerPadding:F||b},M=(0,h.calcXY)(ve,ne,J,Q.w,Q.h);this.setState({droppingDOMNode:r.createElement("div",{key:Q.i}),droppingPosition:Se,layout:[...V,C(C({},Q),{},{x:M.x,y:M.y,static:!1,isDraggable:!0})]})}}),E(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:c}=this.props,{layout:f}=this.state,i=(0,o.compact)(f.filter(b=>b.i!==t.i),(0,o.compactType)(this.props),c,this.props.allowOverlap);this.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),E(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),E(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),E(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();const{droppingItem:c}=this.props,{layout:f}=this.state,i=f.find(b=>b.i===c.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,i,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,c){let f;return c.activeDrag?null:(!(0,n.deepEqual)(t.layout,c.propsLayout)||t.compactType!==c.compactType?f=t.layout:(0,o.childrenEqual)(t.children,c.children)||(f=c.layout),f?{layout:(0,o.synchronizeLayoutWithChildren)(f,t.children,t.cols,(0,o.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,c){return this.props.children!==t.children||!(0,o.fastRGLPropsEqual)(this.props,t,n.deepEqual)||this.state.activeDrag!==c.activeDrag||this.state.mounted!==c.mounted||this.state.droppingPosition!==c.droppingPosition}componentDidUpdate(t,c){if(!this.state.activeDrag){const f=this.state.layout,i=c.layout;this.onLayoutMaybeChanged(f,i)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,o.bottom)(this.state.layout),c=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+c*2+"px"}onLayoutMaybeChanged(t,c){c||(c=this.state.layout),(0,n.deepEqual)(c,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:c,cols:f,margin:i,containerPadding:b,rowHeight:j,maxRows:P,useCSSTransforms:z,transformScale:N}=this.props;return r.createElement(u.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder ".concat(this.state.resizing?"placeholder-resizing":""),containerWidth:c,cols:f,margin:i,containerPadding:b||i,maxRows:P,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:z,transformScale:N},r.createElement("div",null))}processGridItem(t,c){if(!t||!t.key)return;const f=(0,o.getLayoutItem)(this.state.layout,String(t.key));if(!f)return null;const{width:i,cols:b,margin:j,containerPadding:P,rowHeight:z,maxRows:N,isDraggable:F,isResizable:Z,isBounded:K,useCSSTransforms:Q,transformScale:V,draggableCancel:X,draggableHandle:J,resizeHandles:ne,resizeHandle:Se}=this.props,{mounted:ve,droppingPosition:M}=this.state,L=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&F,le=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&Z,ie=f.resizeHandles||ne,ce=L&&K&&f.isBounded!==!1;return r.createElement(u.default,{containerWidth:i,cols:b,margin:j,containerPadding:P||j,maxRows:N,rowHeight:z,cancel:X,handle:J,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:L,isResizable:le,isBounded:ce,useCSSTransforms:Q&&ve,usePercentages:!ve,transformScale:V,w:f.w,h:f.h,x:f.x,y:f.y,i:f.i,minH:f.minH,minW:f.minW,maxH:f.maxH,maxW:f.maxW,static:f.static,droppingPosition:c?M:void 0,resizeHandles:ie,resizeHandle:Se},t)}render(){const{className:t,style:c,isDroppable:f,innerRef:i}=this.props,b=(0,a.default)(T,t),j=C({height:this.containerHeight()},c);return r.createElement("div",{ref:i,className:b,style:j,onDrop:f?this.onDrop:o.noop,onDragLeave:f?this.onDragLeave:o.noop,onDragEnter:f?this.onDragEnter:o.noop,onDragOver:f?this.onDragOver:o.noop},r.Children.map(this.props.children,P=>this.processGridItem(P)),f&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return lt.default=l,E(l,"displayName","ReactGridLayout"),E(l,"propTypes",x.default),E(l,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:o.noop,onDragStart:o.noop,onDrag:o.noop,onDragStop:o.noop,onResizeStart:o.noop,onResize:o.noop,onResizeStop:o.noop,onDrop:o.noop,onDropDragOver:o.noop}),lt}var mt={},Xe={},Br;function qr(){if(Br)return Xe;Br=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.findOrGenerateResponsiveLayout=o,Xe.getBreakpointFromWidth=n,Xe.getColsFromBreakpoint=a,Xe.sortBreakpoints=h;var r=Ke();function n(u,x){const O=h(u);let y=O[0];for(let R=1,C=O.length;R<C;R++){const E=O[R];x>u[E]&&(y=E)}return y}function a(u,x){if(!x[u])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+u+" is missing!");return x[u]}function o(u,x,O,y,R,C){if(u[O])return(0,r.cloneLayout)(u[O]);let E=u[y];const _=h(x),A=_.slice(_.indexOf(O));for(let T=0,p=A.length;T<p;T++){const l=A[T];if(u[l]){E=u[l];break}}return E=(0,r.cloneLayout)(E||[]),(0,r.compact)((0,r.correctBounds)(E,{cols:R}),C,R)}function h(u){return Object.keys(u).sort(function(O,y){return u[O]-u[y]})}return Xe}var Fr;function Ln(){if(Fr)return mt;Fr=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=void 0;var r=y(oe),n=O(Ue()),a=Nt(),o=Ke(),h=qr(),u=O(Hr());const x=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function O(f){return f&&f.__esModule?f:{default:f}}function y(f,i){if(typeof WeakMap=="function")var b=new WeakMap,j=new WeakMap;return(y=function(P,z){if(!z&&P&&P.__esModule)return P;var N,F,Z={__proto__:null,default:P};if(P===null||typeof P!="object"&&typeof P!="function")return Z;if(N=z?j:b){if(N.has(P))return N.get(P);N.set(P,Z)}for(const K in P)K!=="default"&&{}.hasOwnProperty.call(P,K)&&((F=(N=Object.defineProperty)&&Object.getOwnPropertyDescriptor(P,K))&&(F.get||F.set)?N(Z,K,F):Z[K]=P[K]);return Z})(f,i)}function R(){return R=Object.assign?Object.assign.bind():function(f){for(var i=1;i<arguments.length;i++){var b=arguments[i];for(var j in b)({}).hasOwnProperty.call(b,j)&&(f[j]=b[j])}return f},R.apply(null,arguments)}function C(f,i){if(f==null)return{};var b,j,P=E(f,i);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(f);for(j=0;j<z.length;j++)b=z[j],i.indexOf(b)===-1&&{}.propertyIsEnumerable.call(f,b)&&(P[b]=f[b])}return P}function E(f,i){if(f==null)return{};var b={};for(var j in f)if({}.hasOwnProperty.call(f,j)){if(i.indexOf(j)!==-1)continue;b[j]=f[j]}return b}function _(f,i){var b=Object.keys(f);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(f);i&&(j=j.filter(function(P){return Object.getOwnPropertyDescriptor(f,P).enumerable})),b.push.apply(b,j)}return b}function A(f){for(var i=1;i<arguments.length;i++){var b=arguments[i]!=null?arguments[i]:{};i%2?_(Object(b),!0).forEach(function(j){T(f,j,b[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(b)):_(Object(b)).forEach(function(j){Object.defineProperty(f,j,Object.getOwnPropertyDescriptor(b,j))})}return f}function T(f,i,b){return(i=p(i))in f?Object.defineProperty(f,i,{value:b,enumerable:!0,configurable:!0,writable:!0}):f[i]=b,f}function p(f){var i=l(f,"string");return typeof i=="symbol"?i:i+""}function l(f,i){if(typeof f!="object"||!f)return f;var b=f[Symbol.toPrimitive];if(b!==void 0){var j=b.call(f,i);if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(f)}const e=f=>Object.prototype.toString.call(f);function t(f,i){return f==null?null:Array.isArray(f)?f:f[i]}let c=class extends r.Component{constructor(){super(...arguments),T(this,"state",this.generateInitialState()),T(this,"onLayoutChange",i=>{this.props.onLayoutChange(i,A(A({},this.props.layouts),{},{[this.state.breakpoint]:i}))})}generateInitialState(){const{width:i,breakpoints:b,layouts:j,cols:P}=this.props,z=(0,h.getBreakpointFromWidth)(b,i),N=(0,h.getColsFromBreakpoint)(z,P),F=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,h.findOrGenerateResponsiveLayout)(j,b,z,z,N,F),breakpoint:z,cols:N}}static getDerivedStateFromProps(i,b){if(!(0,a.deepEqual)(i.layouts,b.layouts)){const{breakpoint:j,cols:P}=b;return{layout:(0,h.findOrGenerateResponsiveLayout)(i.layouts,i.breakpoints,j,j,P,i.compactType),layouts:i.layouts}}return null}componentDidUpdate(i){(this.props.width!=i.width||this.props.breakpoint!==i.breakpoint||!(0,a.deepEqual)(this.props.breakpoints,i.breakpoints)||!(0,a.deepEqual)(this.props.cols,i.cols))&&this.onWidthChange(i)}onWidthChange(i){const{breakpoints:b,cols:j,layouts:P,compactType:z}=this.props,N=this.props.breakpoint||(0,h.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),F=this.state.breakpoint,Z=(0,h.getColsFromBreakpoint)(N,j),K=A({},P);if(F!==N||i.breakpoints!==b||i.cols!==j){F in K||(K[F]=(0,o.cloneLayout)(this.state.layout));let X=(0,h.findOrGenerateResponsiveLayout)(K,b,N,F,Z,z);X=(0,o.synchronizeLayoutWithChildren)(X,this.props.children,Z,z,this.props.allowOverlap),K[N]=X,this.props.onBreakpointChange(N,Z),this.props.onLayoutChange(X,K),this.setState({breakpoint:N,layout:X,cols:Z})}const Q=t(this.props.margin,N),V=t(this.props.containerPadding,N);this.props.onWidthChange(this.props.width,Q,Z,V)}render(){const i=this.props,{breakpoint:b,breakpoints:j,cols:P,layouts:z,margin:N,containerPadding:F,onBreakpointChange:Z,onLayoutChange:K,onWidthChange:Q}=i,V=C(i,x);return r.createElement(u.default,R({},V,{margin:t(N,this.state.breakpoint),containerPadding:t(F,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return mt.default=c,T(c,"propTypes",{breakpoint:n.default.string,breakpoints:n.default.object,allowOverlap:n.default.bool,cols:n.default.object,margin:n.default.oneOfType([n.default.array,n.default.object]),containerPadding:n.default.oneOfType([n.default.array,n.default.object]),layouts(f,i){if(e(f[i])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+e(f[i]));Object.keys(f[i]).forEach(b=>{if(!(b in f.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,o.validateLayout)(f.layouts[b],"layouts."+b)})},width:n.default.number.isRequired,onBreakpointChange:n.default.func,onLayoutChange:n.default.func,onWidthChange:n.default.func}),T(c,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:o.noop,onLayoutChange:o.noop,onWidthChange:o.noop}),mt}var Dt={},Gr=(function(){if(typeof Map<"u")return Map;function r(n,a){var o=-1;return n.some(function(h,u){return h[0]===a?(o=u,!0):!1}),o}return(function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(a){var o=r(this.__entries__,a),h=this.__entries__[o];return h&&h[1]},n.prototype.set=function(a,o){var h=r(this.__entries__,a);~h?this.__entries__[h][1]=o:this.__entries__.push([a,o])},n.prototype.delete=function(a){var o=this.__entries__,h=r(o,a);~h&&o.splice(h,1)},n.prototype.has=function(a){return!!~r(this.__entries__,a)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(a,o){o===void 0&&(o=null);for(var h=0,u=this.__entries__;h<u.length;h++){var x=u[h];a.call(o,x[1],x[0])}},n})()})(),Jt=typeof window<"u"&&typeof document<"u"&&window.document===document,Tt=(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")()})(),Nn=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Tt):function(r){return setTimeout(function(){return r(Date.now())},1e3/60)}})(),Wn=2;function Hn(r,n){var a=!1,o=!1,h=0;function u(){a&&(a=!1,r()),o&&O()}function x(){Nn(u)}function O(){var y=Date.now();if(a){if(y-h<Wn)return;o=!0}else a=!0,o=!1,setTimeout(x,n);h=y}return O}var Bn=20,qn=["top","right","bottom","left","width","height","size","weight"],Fn=typeof MutationObserver<"u",Gn=(function(){function r(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Hn(this.refresh.bind(this),Bn)}return r.prototype.addObserver=function(n){~this.observers_.indexOf(n)||this.observers_.push(n),this.connected_||this.connect_()},r.prototype.removeObserver=function(n){var a=this.observers_,o=a.indexOf(n);~o&&a.splice(o,1),!a.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){var n=this.updateObservers_();n&&this.refresh()},r.prototype.updateObservers_=function(){var n=this.observers_.filter(function(a){return a.gatherActive(),a.hasActive()});return n.forEach(function(a){return a.broadcastActive()}),n.length>0},r.prototype.connect_=function(){!Jt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Fn?(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)},r.prototype.disconnect_=function(){!Jt||!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)},r.prototype.onTransitionEnd_=function(n){var a=n.propertyName,o=a===void 0?"":a,h=qn.some(function(u){return!!~o.indexOf(u)});h&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r})(),Yr=(function(r,n){for(var a=0,o=Object.keys(n);a<o.length;a++){var h=o[a];Object.defineProperty(r,h,{value:n[h],enumerable:!1,writable:!1,configurable:!0})}return r}),Ze=(function(r){var n=r&&r.ownerDocument&&r.ownerDocument.defaultView;return n||Tt}),Vr=kt(0,0,0,0);function zt(r){return parseFloat(r)||0}function Ur(r){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];return n.reduce(function(o,h){var u=r["border-"+h+"-width"];return o+zt(u)},0)}function Yn(r){for(var n=["top","right","bottom","left"],a={},o=0,h=n;o<h.length;o++){var u=h[o],x=r["padding-"+u];a[u]=zt(x)}return a}function Vn(r){var n=r.getBBox();return kt(0,0,n.width,n.height)}function Un(r){var n=r.clientWidth,a=r.clientHeight;if(!n&&!a)return Vr;var o=Ze(r).getComputedStyle(r),h=Yn(o),u=h.left+h.right,x=h.top+h.bottom,O=zt(o.width),y=zt(o.height);if(o.boxSizing==="border-box"&&(Math.round(O+u)!==n&&(O-=Ur(o,"left","right")+u),Math.round(y+x)!==a&&(y-=Ur(o,"top","bottom")+x)),!Xn(r)){var R=Math.round(O+u)-n,C=Math.round(y+x)-a;Math.abs(R)!==1&&(O-=R),Math.abs(C)!==1&&(y-=C)}return kt(h.left,h.top,O,y)}var $n=(function(){return typeof SVGGraphicsElement<"u"?function(r){return r instanceof Ze(r).SVGGraphicsElement}:function(r){return r instanceof Ze(r).SVGElement&&typeof r.getBBox=="function"}})();function Xn(r){return r===Ze(r).document.documentElement}function Jn(r){return Jt?$n(r)?Vn(r):Un(r):Vr}function Kn(r){var n=r.x,a=r.y,o=r.width,h=r.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,x=Object.create(u.prototype);return Yr(x,{x:n,y:a,width:o,height:h,top:a,right:n+o,bottom:h+a,left:n}),x}function kt(r,n,a,o){return{x:r,y:n,width:a,height:o}}var Zn=(function(){function r(n){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=kt(0,0,0,0),this.target=n}return r.prototype.isActive=function(){var n=Jn(this.target);return this.contentRect_=n,n.width!==this.broadcastWidth||n.height!==this.broadcastHeight},r.prototype.broadcastRect=function(){var n=this.contentRect_;return this.broadcastWidth=n.width,this.broadcastHeight=n.height,n},r})(),Qn=(function(){function r(n,a){var o=Kn(a);Yr(this,{target:n,contentRect:o})}return r})(),eo=(function(){function r(n,a,o){if(this.activeObservations_=[],this.observations_=new Gr,typeof n!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=n,this.controller_=a,this.callbackCtx_=o}return r.prototype.observe=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(n instanceof Ze(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)||(a.set(n,new Zn(n)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(n instanceof Ze(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)&&(a.delete(n),a.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var n=this;this.clearActive(),this.observations_.forEach(function(a){a.isActive()&&n.activeObservations_.push(a)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var n=this.callbackCtx_,a=this.activeObservations_.map(function(o){return new Qn(o.target,o.broadcastRect())});this.callback_.call(n,a,n),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r})(),$r=typeof WeakMap<"u"?new WeakMap:new Gr,Xr=(function(){function r(n){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var a=Gn.getInstance(),o=new eo(n,a,this);$r.set(this,o)}return r})();["observe","unobserve","disconnect"].forEach(function(r){Xr.prototype[r]=function(){var n;return(n=$r.get(this))[r].apply(n,arguments)}});var to=(function(){return typeof Tt.ResizeObserver<"u"?Tt.ResizeObserver:Xr})();const ro=un(Object.freeze(Object.defineProperty({__proto__:null,default:to},Symbol.toStringTag,{value:"Module"})));var Jr;function no(){if(Jr)return Dt;Jr=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=T;var r=x(oe),n=u(Ue()),a=u(ro),o=u(Ct());const h=["measureBeforeMount"];function u(p){return p&&p.__esModule?p:{default:p}}function x(p,l){if(typeof WeakMap=="function")var e=new WeakMap,t=new WeakMap;return(x=function(c,f){if(!f&&c&&c.__esModule)return c;var i,b,j={__proto__:null,default:c};if(c===null||typeof c!="object"&&typeof c!="function")return j;if(i=f?t:e){if(i.has(c))return i.get(c);i.set(c,j)}for(const P in c)P!=="default"&&{}.hasOwnProperty.call(c,P)&&((b=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(c,P))&&(b.get||b.set)?i(j,P,b):j[P]=c[P]);return j})(p,l)}function O(){return O=Object.assign?Object.assign.bind():function(p){for(var l=1;l<arguments.length;l++){var e=arguments[l];for(var t in e)({}).hasOwnProperty.call(e,t)&&(p[t]=e[t])}return p},O.apply(null,arguments)}function y(p,l){if(p==null)return{};var e,t,c=R(p,l);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(p);for(t=0;t<f.length;t++)e=f[t],l.indexOf(e)===-1&&{}.propertyIsEnumerable.call(p,e)&&(c[e]=p[e])}return c}function R(p,l){if(p==null)return{};var e={};for(var t in p)if({}.hasOwnProperty.call(p,t)){if(l.indexOf(t)!==-1)continue;e[t]=p[t]}return e}function C(p,l,e){return(l=E(l))in p?Object.defineProperty(p,l,{value:e,enumerable:!0,configurable:!0,writable:!0}):p[l]=e,p}function E(p){var l=_(p,"string");return typeof l=="symbol"?l:l+""}function _(p,l){if(typeof p!="object"||!p)return p;var e=p[Symbol.toPrimitive];if(e!==void 0){var t=e.call(p,l);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(p)}const A="react-grid-layout";function T(p){var l;return l=class extends r.Component{constructor(){super(...arguments),C(this,"state",{width:1280}),C(this,"elementRef",r.createRef()),C(this,"mounted",!1),C(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new a.default(c=>{if(this.elementRef.current instanceof HTMLElement){const i=c[0].contentRect.width;this.setState({width:i})}});const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.observe(t)}componentWillUnmount(){this.mounted=!1;const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.unobserve(t),this.resizeObserver.disconnect()}render(){const t=this.props,{measureBeforeMount:c}=t,f=y(t,h);return c&&!this.mounted?r.createElement("div",{className:(0,o.default)(this.props.className,A),style:this.props.style,ref:this.elementRef}):r.createElement(p,O({innerRef:this.elementRef},f,this.state))}},C(l,"defaultProps",{measureBeforeMount:!1}),C(l,"propTypes",{measureBeforeMount:n.default.bool}),l}return Dt}var Kr;function oo(){return Kr||(Kr=1,(function(r){r.exports=Hr().default,r.exports.utils=Ke(),r.exports.calculateUtils=Ht(),r.exports.Responsive=Ln().default,r.exports.Responsive.utils=qr(),r.exports.WidthProvider=no().default})(Lt)),Lt.exports}var io=oo();const so=cn(io);function Zr(r){const n=[];n.push(1,1,0,1,1,0,1,1);for(let a=0;a<r.length;a++){const h=(r.charCodeAt(a)%103).toString(2).padStart(7,"0");for(const u of h)n.push(u==="1"?1:0)}return n.push(1,1,0,0,0,1,1,0,0,0,1,1),n}const Kt=({value:r,format:n})=>{const a=oe.useMemo(()=>Zr(r),[r,n]);if(!r)return s.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置条形码值"});const o=2,h=44,u=a.length*o;return s.jsxs("div",{style:{textAlign:"center",overflow:"hidden",maxWidth:"100%"},children:[s.jsx("canvas",{ref:x=>{if(!x)return;const O=x.getContext("2d");O&&(x.width=u,x.height=h,O.clearRect(0,0,u,h),a.forEach((y,R)=>{O.fillStyle=y===1?"#000":"#fff",O.fillRect(R*o,0,o,h)}))},style:{width:"100%",maxWidth:u,height:h}}),s.jsx("div",{style:{fontSize:10,marginTop:1,letterSpacing:1},children:r})]})},ao=so,Qr=oe.memo(({comp:r,selected:n,isPreview:a=!1,dataSources:o=[]})=>{const h={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",outline:a?"none":n?"2px solid #1677ff":"1px dashed #d9d9d9",outlineOffset:-1},u=x=>at(r,x,o);switch(r.type){case"text":return s.jsx("div",{style:{...h,fontSize:r.props.fontSize||14,fontWeight:r.props.fontWeight||"normal",fontStyle:r.props.fontStyle||"normal",textAlign:r.props.textAlign||"left",color:r.props.color||"#000",backgroundColor:r.props.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:u("content")||""});case"image":const x=u("src")||r.props.src;return s.jsx("div",{style:h,children:x?s.jsx("img",{src:x,style:{width:"100%",height:"100%",objectFit:r.props.fit||"contain"},alt:""}):s.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#bbb",fontSize:12},children:"请在属性中设置图片地址"})});case"table":return s.jsx(lo,{comp:r,style:h,dataSources:o});case"barcode":const O=u("value")||r.props.value||"123456";return s.jsx("div",{style:{...h,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:s.jsx(Kt,{value:O,format:r.props.format||"CODE128"})});case"line":return s.jsx("div",{style:{...h,display:"flex",alignItems:"center",border:"none",outline:n?"2px solid #1677ff":"1px dashed transparent"},children:s.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${r.props.thickness||1}px ${r.props.style||"solid"} ${r.props.color||"#000"}`,margin:0}})});default:return s.jsx("div",{style:h,children:r.type})}}),lo=({comp:r,style:n,dataSources:a=[]})=>{const o=r.props.borderWidth||1,h=r.props.borderColor||"#000",u=r.tableColumns||[],x=r.props.tableDataSourceId,O=x?a.find(E=>E.id===x):null,y=O?jt(O):null;if(y&&y.length>0)return s.jsxs("table",{style:{...n,borderCollapse:"collapse",width:"100%",height:"100%"},children:[u.length>0&&s.jsx("thead",{children:s.jsx("tr",{style:{backgroundColor:"#f5f5f5"},children:u.map((E,_)=>s.jsx("th",{style:{border:`${o}px solid ${h}`,padding:4,fontSize:12,fontWeight:"bold",textAlign:"center"},children:E.title},_))})}),s.jsx("tbody",{children:y.map((E,_)=>s.jsx("tr",{children:u.map((A,T)=>s.jsx("td",{style:{border:`${o}px solid ${h}`,padding:4,fontSize:12,textAlign:"center"},children:A.fieldPath?E[A.fieldPath]:""},T))},_))})]});const R=r.props.rows||3,C=Math.max(r.props.cols||3,u.length||3);return s.jsx("table",{style:{...n,borderCollapse:"collapse",width:"100%",height:"100%"},children:s.jsx("tbody",{children:Array.from({length:R}).map((E,_)=>s.jsx("tr",{children:Array.from({length:C}).map((A,T)=>s.jsx("td",{style:{border:`${o}px solid ${h}`,padding:2,fontSize:12,textAlign:"center"},children:" "},T))},_))})})},en=({isPreview:r=!1})=>{const n=fe(e=>e.components),a=fe(e=>e.selectedId),o=fe(e=>e.pageSettings),h=fe(e=>e.selectComponent);fe(e=>e.updateComponent);const u=fe(e=>e.setComponents),x=fe(e=>e.addComponent),O=fe(e=>e.gridSettings),y=fe(e=>e.dataSources),R=oe.useMemo(()=>{const e=bt[o.paperSize];if(!e)return{width:o.customWidth*Ee,height:o.customHeight*Ee};const t=e.width*Ee,c=e.height*Ee;return o.orientation==="landscape"?{width:c,height:t}:{width:t,height:c}},[o]),C=oe.useMemo(()=>({top:o.marginTop*Ee,right:o.marginRight*Ee,bottom:o.marginBottom*Ee,left:o.marginLeft*Ee}),[o]),E=R.width-C.left-C.right,_=R.height-C.top-C.bottom,A=oe.useMemo(()=>n.map(e=>({i:e.id,x:e.x,y:e.y,w:e.w,h:e.h})),[n]),T=oe.useCallback(e=>{const t=n.map((c,f)=>{const i=e[f];return i?{...c,x:i.x,y:i.y,w:i.w,h:i.h}:c});u(t)},[n,u]),p=oe.useCallback((e,t,c)=>{var j,P;const f=c,i=(j=f.dataTransfer)==null?void 0:j.getData("componentType");if(!i)return;const b=(P=c.target.closest(".react-grid-layout"))==null?void 0:P.getBoundingClientRect();if(b){const z=Math.floor((f.clientX-b.left)/(E/O.cols)),N=Math.floor((f.clientY-b.top)/(E/O.cols));x(i,Math.max(0,z),Math.max(0,N))}else x(i)},[x,E,O.cols]),l=oe.useCallback(e=>{h(e===a?null:e)},[h,a]);return s.jsx("div",{style:{flex:1,overflow:"auto",background:"#e8e8e8",display:"flex",justifyContent:"center",padding:"24px 0"},children:s.jsxs("div",{id:"print-paper",style:{width:R.width,height:R.height,background:"#fff",boxShadow:"0 2px 12px rgba(0,0,0,0.15)",position:"relative",flexShrink:0},children:[o.showHeader&&s.jsx("div",{style:{position:"absolute",top:0,left:C.left,right:C.right,height:C.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#999",borderBottom:"1px dashed #ddd",overflow:"hidden"},children:o.headerContent}),o.showFooter&&s.jsxs("div",{style:{position:"absolute",bottom:0,left:C.left,right:C.right,height:C.bottom,display:"flex",alignItems:"center",justifyContent:o.showPageNumber?"space-between":"center",fontSize:12,color:"#999",borderTop:"1px dashed #ddd",overflow:"hidden",padding:"0 8px"},children:[s.jsx("span",{children:o.footerContent}),o.showPageNumber&&s.jsx("span",{children:o.pageNumberFormat.replace("{page}","1")})]}),s.jsx("div",{style:{position:"absolute",top:C.top,left:C.left,width:E,height:_},children:r?s.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:n.map(e=>{const t=E/O.cols,c=E/O.cols,f={position:"absolute",left:e.x*t,top:e.y*c,width:e.w*t,height:e.h*c};return s.jsx("div",{style:f,children:s.jsx(Qr,{comp:e,selected:!1,isPreview:!0,dataSources:y})},e.id)})}):s.jsx(ao,{className:"canvas-grid",layout:A,cols:O.cols,rowHeight:E/O.cols,width:E,margin:[0,0],containerPadding:[0,0],onLayoutChange:T,onDrop:p,isDroppable:!0,isResizable:!0,isDraggable:!0,compactType:null,preventCollision:!0,draggableHandle:".grid-item-drag-handle",style:{minHeight:_},children:n.map(e=>s.jsx("div",{className:"grid-item-drag-handle",onClick:()=>l(e.id),style:{cursor:"move"},children:s.jsx(Qr,{comp:e,selected:e.id===a,dataSources:y})},e.id))})})]})})},{Text:Ie,Title:Co}=k.Typography,{TextArea:co}=k.Input,uo=()=>{const r=fe(e=>e.components),n=fe(e=>e.selectedId),a=fe(e=>e.dataSources),o=fe(e=>e.updateComponent),h=fe(e=>e.updateComponentTableColumns),u=oe.useMemo(()=>r.find(e=>e.id===n)||null,[r,n]),[x,O]=oe.useState([]),y=oe.useMemo(()=>[{label:"无(使用静态值)",value:""},...a.map(e=>({label:e.name,value:e.id,type:e.type}))],[a]),R=oe.useCallback((e,t)=>{n&&o(n,{props:{...u==null?void 0:u.props,[e]:t}})},[n,u,o]),C=oe.useCallback((e,t,c,f)=>{if(!n)return;let i=f;t&&c&&(i=f);const b=`${e}Binding`;o(n,{props:{...u==null?void 0:u.props,[e]:i,[b]:{dataSourceId:t,fieldPath:c,staticValue:f}}})},[n,u,o]),E=oe.useCallback(e=>{const t=u==null?void 0:u.props[`${e}Binding`],c=String((u==null?void 0:u.props[e])||"");return t?{field:e,dataSourceId:t.dataSourceId||null,fieldPath:t.fieldPath||"",staticValue:t.staticValue??c}:{field:e,dataSourceId:null,fieldPath:"",staticValue:c}},[u]);if(!u)return s.jsx(k.Card,{title:"属性面板",size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16}},children:s.jsx(k.Empty,{description:"请选择画布中的组件",image:k.Empty.PRESENTED_IMAGE_SIMPLE})});const _=sr[u.type]||u.type,A=s.jsxs(s.Fragment,{children:[s.jsx(Ie,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"位置和大小"}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"X"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.x,onChange:e=>o(n,{x:e??0})})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"Y"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.y,onChange:e=>o(n,{y:e??0})})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"宽度"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.w,min:1,onChange:e=>o(n,{w:e??1})})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"高度"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.h,min:1,onChange:e=>o(n,{h:e??1})})]})]})]}),T=({field:e,label:t,placeholder:c,isTextarea:f=!1})=>{const i=E(e),b=a.find(F=>F.id===i.dataSourceId),j=b?St(b):null,P=j?Object.keys(j):[],[z,N]=oe.useState(i.staticValue);return oe.useEffect(()=>{N(i.staticValue)},[i.staticValue,i.dataSourceId]),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12,display:"block",marginBottom:4},children:t}),s.jsx("div",{style:{marginBottom:4},children:s.jsx(k.Select,{size:"small",style:{width:"100%"},placeholder:"选择数据源",value:i.dataSourceId||"",onChange:F=>{C(e,F||null,F&&i.fieldPath||"",i.staticValue)},options:y})}),i.dataSourceId&&s.jsx("div",{style:{marginBottom:4},children:s.jsx(k.Select,{size:"small",style:{width:"100%"},placeholder:"选择字段",value:i.fieldPath,onChange:F=>{C(e,i.dataSourceId,F||"",i.staticValue)},options:[{label:"请选择字段",value:""},...P.map(F=>({label:F,value:F}))]})}),i.dataSourceId?s.jsxs("div",{style:{padding:6,background:"#f0f5ff",border:"1px solid #adc6ff",borderRadius:4,fontSize:12},children:[s.jsx(Te.DatabaseOutlined,{style:{marginRight:4,color:"#1890ff"}}),s.jsx("span",{style:{fontWeight:500},children:"数据绑定已启用"}),b&&i.fieldPath&&s.jsxs("span",{style:{marginLeft:8},children:[s.jsx(k.Tag,{color:"blue",children:b.name}),s.jsx(k.Tag,{color:"green",children:i.fieldPath})]})]}):f?s.jsx(co,{rows:3,placeholder:c,value:z,onChange:F=>N(F.target.value),onBlur:()=>{C(e,null,"",z)}}):s.jsx(k.Input,{placeholder:c,value:z,onChange:F=>N(F.target.value),onBlur:()=>{C(e,null,"",z)}})]})},p=()=>{const e=u.tableColumns||[],t=a.filter(V=>V.type==="array"),c=u.props.tableDataSourceId||"",f=t.find(V=>V.id===c),i=x.length>0?x:e,[b,j]=oe.useState({}),P=()=>{h(n,i)},z=()=>{const V=[...i,{title:`列${i.length+1}`}];O(V)},N=V=>{const X=i.filter((J,ne)=>ne!==V);O(X)},F=(V,X,J)=>{const ne=[...i];ne[V]={...ne[V],[X]:J},O(ne)};let Z=[];if(f){const V=st(f.data);Array.isArray(V)&&V.length>0&&typeof V[0]=="object"&&(Z=Object.keys(V[0]))}const K=[{title:"列标题",dataIndex:"title",width:100,render:(V,X)=>{const J=X.key in b?b[X.key]:X.title;return s.jsx(k.Input,{size:"small",value:J,placeholder:"列标题",onChange:ne=>{j({...b,[X.key]:ne.target.value})},onBlur:()=>{if(X.key in b){F(Number(X.key),"title",b[X.key]);const ne={...b};delete ne[X.key],j(ne),P()}}})}},{title:"绑定字段",dataIndex:"fieldPath",width:120,render:(V,X)=>s.jsx(k.Select,{size:"small",style:{width:"100%"},value:X.fieldPath||"",placeholder:f?"绑定字段":"选择数据源先",disabled:!f,onChange:J=>{F(Number(X.key),"fieldPath",J||""),P()},options:[{label:"无绑定",value:""},...Z.map(J=>({label:J,value:J}))]})},{title:"操作",width:60,render:(V,X)=>s.jsx(k.Popconfirm,{title:"确定要删除吗?",onConfirm:()=>{N(Number(X.key)),P()},okText:"确定",cancelText:"取消",children:s.jsx(k.Button,{type:"text",danger:!0,size:"small",icon:s.jsx(Te.DeleteOutlined,{})})})}],Q=i.map((V,X)=>({...V,key:String(X)}));return s.jsxs("div",{children:[s.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:s.jsx(Ie,{style:{fontSize:12},children:"表格数据源"})}),s.jsx(k.Select,{size:"small",style:{width:"100%",marginBottom:8},placeholder:"选择数组类型数据源",value:c,onChange:V=>R("tableDataSourceId",V||""),options:[{label:"无(仅静态展示)",value:""},...t.map(V=>({label:V.name,value:V.id}))]}),s.jsx(k.Divider,{}),s.jsxs(k.Space,{style:{marginBottom:8},children:[s.jsx(Ie,{style:{fontSize:12},children:"列配置"}),s.jsx(k.Button,{size:"small",type:"dashed",icon:s.jsx(Te.PlusOutlined,{}),onClick:z}),s.jsx(k.Button,{size:"small",type:"primary",onClick:P,icon:s.jsx(Te.SaveOutlined,{})})]}),s.jsx(k.Table,{dataSource:Q,columns:K,pagination:!1,size:"small",bordered:!0,rowKey:"key"})]})},l=()=>{switch(u.type){case"text":return s.jsxs(s.Fragment,{children:[s.jsx(T,{field:"content",label:"内容",placeholder:"请输入文本内容",isTextarea:!0}),s.jsx(k.Divider,{style:{margin:"4px 0"}}),s.jsx(Ie,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"文字样式"}),s.jsxs(k.Space,{style:{width:"100%"},direction:"vertical",size:4,children:[s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"字号"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.props.fontSize||14,min:6,max:200,onChange:e=>R("fontSize",e??14)})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"对齐"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.textAlign||"left",onChange:e=>R("textAlign",e),options:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}]})]})]}),s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"字重"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.fontWeight||"normal",onChange:e=>R("fontWeight",e),options:[{value:"normal",label:"常规"},{value:"bold",label:"加粗"}]})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"样式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.fontStyle||"normal",onChange:e=>R("fontStyle",e),options:[{value:"normal",label:"常规"},{value:"italic",label:"斜体"}]})]})]}),s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"字体颜色"}),s.jsx(k.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(e,t)=>R("color",t)})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"背景色"}),s.jsx(k.ColorPicker,{size:"small",value:u.props.backgroundColor||"transparent",onChange:(e,t)=>R("backgroundColor",t)})]})]})]})]});case"image":return s.jsxs(s.Fragment,{children:[s.jsx(T,{field:"src",label:"图片地址",placeholder:"输入图片 URL"}),s.jsx(k.Divider,{style:{margin:"4px 0"}}),s.jsx(Ie,{style:{fontSize:12,marginTop:8,display:"block"},children:"适应方式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.fit||"contain",onChange:e=>R("fit",e),options:[{value:"contain",label:"适应"},{value:"cover",label:"填充"},{value:"fill",label:"拉伸"}]})]});case"table":return s.jsx(p,{});case"barcode":return s.jsxs(s.Fragment,{children:[s.jsx(T,{field:"value",label:"条码值",placeholder:"输入条码内容"}),s.jsx(k.Divider,{style:{margin:"4px 0"}}),s.jsx(Ie,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.format||"CODE128",onChange:e=>R("format",e),options:[{value:"CODE128",label:"CODE128"}]})]});case"line":return s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"粗细"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.props.thickness||1,min:1,max:20,onChange:e=>R("thickness",e??1)})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"样式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.style||"solid",onChange:e=>R("style",e),options:[{value:"solid",label:"实线"},{value:"dashed",label:"虚线"},{value:"dotted",label:"点线"}]})]})]}),s.jsxs("div",{style:{marginTop:8},children:[s.jsx(Ie,{style:{fontSize:12},children:"颜色"}),s.jsx(k.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(e,t)=>R("color",t)})]})]});default:return null}};return s.jsx(k.Card,{title:`属性 - ${_}`,size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16,overflowY:"auto"}},children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[A,s.jsx(k.Divider,{style:{margin:"4px 0"}}),l()]})})},{Text:_o}=k.Typography,fo=()=>{const r=fe(p=>p.previewVisible),n=fe(p=>p.setPreviewVisible),a=fe(p=>p.components),o=fe(p=>p.pageSettings),h=fe(p=>p.gridSettings)||xt,u=fe(p=>p.dataSources),x=oe.useRef(null),O=oe.useMemo(()=>{const p=bt[o.paperSize];if(!p)return{width:o.customWidth*Ee,height:o.customHeight*Ee};const l=p.width*Ee,e=p.height*Ee;return o.orientation==="landscape"?{width:e,height:l}:{width:l,height:e}},[o]),y=oe.useMemo(()=>({top:o.marginTop*Ee,right:o.marginRight*Ee,bottom:o.marginBottom*Ee,left:o.marginLeft*Ee}),[o]),R=O.width-y.left-y.right,C=R/h.cols,E=tr.useReactToPrint({contentRef:x,documentTitle:"打印模板",pageStyle:`
48
+ */var qt,wr;function zn(){if(wr)return qt;wr=1;var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function c(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var x={},_=0;_<10;_++)x["_"+String.fromCharCode(_)]=_;var b=Object.getOwnPropertyNames(x).map(function(R){return x[R]});if(b.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(R){v[R]=R}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qt=c()?Object.assign:function(u,x){for(var _,b=a(u),v,R=1;R<arguments.length;R++){_=Object(arguments[R]);for(var P in _)i.call(_,P)&&(b[P]=_[P]);if(n){v=n(_);for(var C=0;C<v.length;C++)o.call(_,v[C])&&(b[v[C]]=_[v[C]])}}return b},qt}var Ft,Sr;function Yt(){if(Sr)return Ft;Sr=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ft=n,Ft}var Gt,jr;function Cr(){return jr||(jr=1,Gt=Function.call.bind(Object.prototype.hasOwnProperty)),Gt}var Vt,Or;function kn(){if(Or)return Vt;Or=1;var n={},i=function(){};if(n.NODE_ENV!=="production"){var o=Yt(),a={},c=Cr();i=function(x){var _="Warning: "+x;typeof console<"u"&&console.error(_);try{throw new Error(_)}catch{}}}function u(x,_,b,v,R){if(n.NODE_ENV!=="production"){for(var P in x)if(c(x,P)){var C;try{if(typeof x[P]!="function"){var L=Error((v||"React class")+": "+b+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}C=x[P](_,P,v,b,null,o)}catch(y){C=y}if(C&&!(C instanceof Error)&&i((v||"React class")+": type specification of "+b+" `"+P+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in a)){a[C.message]=!0;var k=R?R():"";i("Failed "+b+" type: "+C.message+(k??""))}}}}return u.resetWarningCache=function(){n.NODE_ENV!=="production"&&(a={})},Vt=u,Vt}var Ut,Rr;function Mn(){if(Rr)return Ut;Rr=1;var n={},i=xr(),o=zn(),a=Yt(),c=Cr(),u=kn(),x=function(){};n.NODE_ENV!=="production"&&(x=function(b){var v="Warning: "+b;typeof console<"u"&&console.error(v);try{throw new Error(v)}catch{}});function _(){return null}return Ut=function(b,v){var R=typeof Symbol=="function"&&Symbol.iterator,P="@@iterator";function C(I){var W=I&&(R&&I[R]||I[P]);if(typeof W=="function")return W}var L="<<anonymous>>",k={array:t("array"),bigint:t("bigint"),bool:t("boolean"),func:t("function"),number:t("number"),object:t("object"),string:t("string"),symbol:t("symbol"),any:s(),arrayOf:f,element:l(),elementType:w(),instanceOf:O,node:T(),objectOf:M,oneOf:D,oneOfType:H,shape:G,exact:X};function y(I,W){return I===W?I!==0||1/I===1/W:I!==I&&W!==W}function d(I,W){this.message=I,this.data=W&&typeof W=="object"?W:{},this.stack=""}d.prototype=Error.prototype;function r(I){if(n.NODE_ENV!=="production")var W={},ie=0;function oe(fe,ue,A,U,ee,Z,ce){if(U=U||L,Z=Z||A,ce!==a){if(v){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(n.NODE_ENV!=="production"&&typeof console<"u"){var he=U+":"+A;!W[he]&&ie<3&&(x("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[he]=!0,ie++)}}return ue[A]==null?fe?ue[A]===null?new d("The "+ee+" `"+Z+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new d("The "+ee+" `"+Z+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:I(ue,A,U,ee,Z)}var ae=oe.bind(null,!1);return ae.isRequired=oe.bind(null,!0),ae}function t(I){function W(ie,oe,ae,fe,ue,A){var U=ie[oe],ee=K(U);if(ee!==I){var Z=re(U);return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+Z+"` supplied to `"+ae+"`, expected ")+("`"+I+"`."),{expectedType:I})}return null}return r(W)}function s(){return r(_)}function f(I){function W(ie,oe,ae,fe,ue){if(typeof I!="function")return new d("Property `"+ue+"` of component `"+ae+"` has invalid PropType notation inside arrayOf.");var A=ie[oe];if(!Array.isArray(A)){var U=K(A);return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+U+"` supplied to `"+ae+"`, expected an array."))}for(var ee=0;ee<A.length;ee++){var Z=I(A,ee,ae,fe,ue+"["+ee+"]",a);if(Z instanceof Error)return Z}return null}return r(W)}function l(){function I(W,ie,oe,ae,fe){var ue=W[ie];if(!b(ue)){var A=K(ue);return new d("Invalid "+ae+" `"+fe+"` of type "+("`"+A+"` supplied to `"+oe+"`, expected a single ReactElement."))}return null}return r(I)}function w(){function I(W,ie,oe,ae,fe){var ue=W[ie];if(!i.isValidElementType(ue)){var A=K(ue);return new d("Invalid "+ae+" `"+fe+"` of type "+("`"+A+"` supplied to `"+oe+"`, expected a single ReactElement type."))}return null}return r(I)}function O(I){function W(ie,oe,ae,fe,ue){if(!(ie[oe]instanceof I)){var A=I.name||L,U=ge(ie[oe]);return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+U+"` supplied to `"+ae+"`, expected ")+("instance of `"+A+"`."))}return null}return r(W)}function D(I){if(!Array.isArray(I))return n.NODE_ENV!=="production"&&(arguments.length>1?x("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):x("Invalid argument supplied to oneOf, expected an array.")),_;function W(ie,oe,ae,fe,ue){for(var A=ie[oe],U=0;U<I.length;U++)if(y(A,I[U]))return null;var ee=JSON.stringify(I,function(ce,B){var he=re(B);return he==="symbol"?String(B):B});return new d("Invalid "+fe+" `"+ue+"` of value `"+String(A)+"` "+("supplied to `"+ae+"`, expected one of "+ee+"."))}return r(W)}function M(I){function W(ie,oe,ae,fe,ue){if(typeof I!="function")return new d("Property `"+ue+"` of component `"+ae+"` has invalid PropType notation inside objectOf.");var A=ie[oe],U=K(A);if(U!=="object")return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+U+"` supplied to `"+ae+"`, expected an object."));for(var ee in A)if(c(A,ee)){var Z=I(A,ee,ae,fe,ue+"."+ee,a);if(Z instanceof Error)return Z}return null}return r(W)}function H(I){if(!Array.isArray(I))return n.NODE_ENV!=="production"&&x("Invalid argument supplied to oneOfType, expected an instance of array."),_;for(var W=0;W<I.length;W++){var ie=I[W];if(typeof ie!="function")return x("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+be(ie)+" at index "+W+"."),_}function oe(ae,fe,ue,A,U){for(var ee=[],Z=0;Z<I.length;Z++){var ce=I[Z],B=ce(ae,fe,ue,A,U,a);if(B==null)return null;B.data&&c(B.data,"expectedType")&&ee.push(B.data.expectedType)}var he=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new d("Invalid "+A+" `"+U+"` supplied to "+("`"+ue+"`"+he+"."))}return r(oe)}function T(){function I(W,ie,oe,ae,fe){return V(W[ie])?null:new d("Invalid "+ae+" `"+fe+"` supplied to "+("`"+oe+"`, expected a ReactNode."))}return r(I)}function N(I,W,ie,oe,ae){return new d((I||"React class")+": "+W+" type `"+ie+"."+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ae+"`.")}function G(I){function W(ie,oe,ae,fe,ue){var A=ie[oe],U=K(A);if(U!=="object")return new d("Invalid "+fe+" `"+ue+"` of type `"+U+"` "+("supplied to `"+ae+"`, expected `object`."));for(var ee in I){var Z=I[ee];if(typeof Z!="function")return N(ae,fe,ue,ee,re(Z));var ce=Z(A,ee,ae,fe,ue+"."+ee,a);if(ce)return ce}return null}return r(W)}function X(I){function W(ie,oe,ae,fe,ue){var A=ie[oe],U=K(A);if(U!=="object")return new d("Invalid "+fe+" `"+ue+"` of type `"+U+"` "+("supplied to `"+ae+"`, expected `object`."));var ee=o({},ie[oe],I);for(var Z in ee){var ce=I[Z];if(c(I,Z)&&typeof ce!="function")return N(ae,fe,ue,Z,re(ce));if(!ce)return new d("Invalid "+fe+" `"+ue+"` key `"+Z+"` supplied to `"+ae+"`.\nBad object: "+JSON.stringify(ie[oe],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(I),null," "));var B=ce(A,Z,ae,fe,ue+"."+Z,a);if(B)return B}return null}return r(W)}function V(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(V);if(I===null||b(I))return!0;var W=C(I);if(W){var ie=W.call(I),oe;if(W!==I.entries){for(;!(oe=ie.next()).done;)if(!V(oe.value))return!1}else for(;!(oe=ie.next()).done;){var ae=oe.value;if(ae&&!V(ae[1]))return!1}}else return!1;return!0;default:return!1}}function J(I,W){return I==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function K(I){var W=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":J(W,I)?"symbol":W}function re(I){if(typeof I>"u"||I===null)return""+I;var W=K(I);if(W==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return W}function be(I){var W=re(I);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function ge(I){return!I.constructor||!I.constructor.name?L:I.constructor.name}return k.checkPropTypes=u,k.resetWarningCache=u.resetWarningCache,k.PropTypes=k,k},Ut}var $t,_r;function In(){if(_r)return $t;_r=1;var n=Yt();function i(){}function o(){}return o.resetWarningCache=i,$t=function(){function a(x,_,b,v,R,P){if(P!==n){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}a.isRequired=a;function c(){return a}var u={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:c,element:a,elementType:a,instanceOf:c,node:a,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:o,resetWarningCache:i};return u.PropTypes=u,u},$t}var Er;function Ue(){if(Er)return Et.exports;Er=1;var n={};if(n.NODE_ENV!=="production"){var i=xr(),o=!0;Et.exports=Mn()(i.isElement,o)}else Et.exports=In()();return Et.exports}var dt={exports:{}},Xt,Pr;function An(){if(Pr)return Xt;Pr=1;var n={},i=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,_=(p,S)=>{for(var z in S)o(p,z,{get:S[z],enumerable:!0})},b=(p,S,z,Y)=>{if(S&&typeof S=="object"||typeof S=="function")for(let $ of c(S))!x.call(p,$)&&$!==z&&o(p,$,{get:()=>S[$],enumerable:!(Y=a(S,$))||Y.enumerable});return p},v=(p,S,z)=>(z=p!=null?i(u(p)):{},b(!p||!p.__esModule?o(z,"default",{value:p,enumerable:!0}):z,p)),R=p=>b(o({},"__esModule",{value:!0}),p),P={};_(P,{DraggableCore:()=>ye,default:()=>Ce}),Xt=R(P);var C=v(se),L=v(Ue()),k=v(It),y=_t();function d(p,S){for(let z=0,Y=p.length;z<Y;z++)if(S.apply(S,[p[z],z,p]))return p[z]}function r(p){return typeof p=="function"||Object.prototype.toString.call(p)==="[object Function]"}function t(p){return typeof p=="number"&&!isNaN(p)}function s(p){return parseInt(p,10)}function f(p,S,z){if(p[S])return new Error(`Invalid prop ${S} passed to ${z} - do not set this, set it on the child.`)}var l=["Moz","Webkit","O","ms"];function w(p="transform"){var S,z;if(typeof window>"u")return"";const Y=(z=(S=window.document)==null?void 0:S.documentElement)==null?void 0:z.style;if(!Y||p in Y)return"";for(let $=0;$<l.length;$++)if(O(p,l[$])in Y)return l[$];return""}function O(p,S){return S?`${S}${D(p)}`:p}function D(p){let S="",z=!0;for(let Y=0;Y<p.length;Y++)z?(S+=p[Y].toUpperCase(),z=!1):p[Y]==="-"?z=!0:S+=p[Y];return S}var M=w(),H="";function T(p,S){var z;H||(H=(z=d(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function($){return r(p[$])}))!=null?z:"");const Y=p[H];return r(Y)?!!Y.call(p,S):!1}function N(p,S,z){let Y=p;do{if(T(Y,S))return!0;if(Y===z)return!1;Y=Y.parentNode}while(Y);return!1}function G(p,S,z,Y){if(!p)return;const $={capture:!0,...Y},Ee=z;p.addEventListener?p.addEventListener(S,Ee,$):p.attachEvent?p.attachEvent("on"+S,Ee):p["on"+S]=Ee}function X(p,S,z,Y){if(!p)return;const $={capture:!0,...Y},Ee=z;p.removeEventListener?p.removeEventListener(S,Ee,$):p.detachEvent?p.detachEvent("on"+S,Ee):p["on"+S]=null}function V(p){let S=p.clientHeight;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S+=s(z.borderTopWidth),S+=s(z.borderBottomWidth),S}function J(p){let S=p.clientWidth;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S+=s(z.borderLeftWidth),S+=s(z.borderRightWidth),S}function K(p){let S=p.clientHeight;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S-=s(z.paddingTop),S-=s(z.paddingBottom),S}function re(p){let S=p.clientWidth;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S-=s(z.paddingLeft),S-=s(z.paddingRight),S}function be(p,S,z){const $=S===S.ownerDocument.body?{left:0,top:0}:S.getBoundingClientRect(),Ee=(p.clientX+S.scrollLeft-$.left)/z,me=(p.clientY+S.scrollTop-$.top)/z;return{x:Ee,y:me}}function ge(p,S){const z=W(p,S,"px");return{[O("transform",M)]:z}}function I(p,S){return W(p,S,"")}function W({x:p,y:S},z,Y){let $=`translate(${p}${Y},${S}${Y})`;if(z){const Ee=`${typeof z.x=="string"?z.x:z.x+Y}`,me=`${typeof z.y=="string"?z.y:z.y+Y}`;$=`translate(${Ee}, ${me})`+$}return $}function ie(p,S){return p.targetTouches&&d(p.targetTouches,z=>S===z.identifier)||p.changedTouches&&d(p.changedTouches,z=>S===z.identifier)}function oe(p){if(p.targetTouches&&p.targetTouches[0])return p.targetTouches[0].identifier;if(p.changedTouches&&p.changedTouches[0])return p.changedTouches[0].identifier}function ae(p){if(!p)return;let S=p.getElementById("react-draggable-style-el");S||(S=p.createElement("style"),S.type="text/css",S.id="react-draggable-style-el",S.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
+ `,S.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
+ `,p.getElementsByTagName("head")[0].appendChild(S)),p.body&&A(p.body,"react-draggable-transparent-selection")}function fe(p){window.requestAnimationFrame?window.requestAnimationFrame(()=>{ue(p)}):ue(p)}function ue(p){if(p)try{p.body&&U(p.body,"react-draggable-transparent-selection");const S=p.selection;if(S)S.empty();else{const z=(p.defaultView||window).getSelection();z&&z.type!=="Caret"&&z.removeAllRanges()}}catch{}}function A(p,S){p.classList?p.classList.add(S):p.className.match(new RegExp(`(?:^|\\s)${S}(?!\\S)`))||(p.className+=` ${S}`)}function U(p,S){p.classList?p.classList.remove(S):p.className=p.className.replace(new RegExp(`(?:^|\\s)${S}(?!\\S)`,"g"),"")}function ee(p,S,z){if(!p.props.bounds)return[S,z];let{bounds:Y}=p.props;Y=typeof Y=="string"?Y:Le(Y);const $=g(p);if(typeof Y=="string"){const{ownerDocument:Ee}=$,me=Ee.defaultView;if(!me)throw new Error("Cannot resolve the owner window of the draggable node.");let Te;if(Y==="parent"?Te=$.parentNode:Te=$.getRootNode().querySelector(Y),!(Te instanceof me.HTMLElement))throw new Error('Bounds selector "'+Y+'" could not find an element.');const Me=Te,Ge=me.getComputedStyle($),$e=me.getComputedStyle(Me);Y={left:-$.offsetLeft+s($e.paddingLeft)+s(Ge.marginLeft),top:-$.offsetTop+s($e.paddingTop)+s(Ge.marginTop),right:re(Me)-J($)-$.offsetLeft+s($e.paddingRight)-s(Ge.marginRight),bottom:K(Me)-V($)-$.offsetTop+s($e.paddingBottom)-s(Ge.marginBottom)}}return t(Y.right)&&(S=Math.min(S,Y.right)),t(Y.bottom)&&(z=Math.min(z,Y.bottom)),t(Y.left)&&(S=Math.max(S,Y.left)),t(Y.top)&&(z=Math.max(z,Y.top)),[S,z]}function Z(p,S,z){const Y=Math.round(S/p[0])*p[0],$=Math.round(z/p[1])*p[1];return[Y,$]}function ce(p){return p.props.axis==="both"||p.props.axis==="x"}function B(p){return p.props.axis==="both"||p.props.axis==="y"}function he(p,S,z){const Y=typeof S=="number"?ie(p,S):null;if(typeof S=="number"&&!Y)return null;const $=g(z),Ee=z.props.offsetParent||$.offsetParent||$.ownerDocument.body;return be(Y||p,Ee,z.props.scale)}function ke(p,S,z){const Y=!t(p.lastX),$=g(p);return Y?{node:$,deltaX:0,deltaY:0,lastX:S,lastY:z,x:S,y:z}:{node:$,deltaX:S-p.lastX,deltaY:z-p.lastY,lastX:p.lastX,lastY:p.lastY,x:S,y:z}}function we(p,S){const z=p.props.scale;return{node:S.node,x:p.state.x+S.deltaX/z,y:p.state.y+S.deltaY/z,deltaX:S.deltaX/z,deltaY:S.deltaY/z,lastX:p.state.x,lastY:p.state.y}}function Le(p){return{left:p.left,top:p.top,right:p.right,bottom:p.bottom}}function g(p){const S=p.findDOMNode();if(!S)throw new Error("<DraggableCore>: Unmounted during event!");return S}var m=v(se),j=v(Ue()),q=v(It);function ne(...p){n.DRAGGABLE_DEBUG&&console.log(...p)}var Q={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},le=Q.mouse,ye=class extends m.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=p=>{if(this.props.onMouseDown(p),!this.props.allowAnyClick&&(typeof p.button=="number"&&p.button!==0||p.ctrlKey))return!1;const S=this.findDOMNode();if(!S||!S.ownerDocument||!S.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:z}=S;if(this.props.disabled||!(p.target instanceof z.defaultView.Node)||this.props.handle&&!N(p.target,this.props.handle,S)||this.props.cancel&&N(p.target,this.props.cancel,S))return;p.type==="touchstart"&&!this.props.allowMobileScroll&&p.preventDefault();const Y=oe(p);this.touchIdentifier=Y;const $=he(p,Y,this);if($==null)return;const{x:Ee,y:me}=$,Te=ke(this,Ee,me);ne("DraggableCore: handleDragStart: %j",Te),ne("calling",this.props.onStart),!(this.props.onStart(p,Te)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&ae(z),this.dragging=!0,this.lastX=Ee,this.lastY=me,G(z,le.move,this.handleDrag),G(z,le.stop,this.handleDragStop))},this.handleDrag=p=>{const S=he(p,this.touchIdentifier,this);if(S==null)return;let{x:z,y:Y}=S;if(Array.isArray(this.props.grid)){let me=z-this.lastX,Te=Y-this.lastY;if([me,Te]=Z(this.props.grid,me,Te),!me&&!Te)return;z=this.lastX+me,Y=this.lastY+Te}const $=ke(this,z,Y);if(ne("DraggableCore: handleDrag: %j",$),this.props.onDrag(p,$)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const me=document.createEvent("MouseEvents");me.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(me)}return}this.lastX=z,this.lastY=Y},this.handleDragStop=p=>{if(!this.dragging)return;const S=he(p,this.touchIdentifier,this);if(S==null)return;let{x:z,y:Y}=S;if(Array.isArray(this.props.grid)){let Te=z-this.lastX||0,Me=Y-this.lastY||0;[Te,Me]=Z(this.props.grid,Te,Me),z=this.lastX+Te,Y=this.lastY+Me}const $=ke(this,z,Y);if(this.props.onStop(p,$)===!1||this.mounted===!1)return!1;const me=this.findDOMNode();me&&this.props.enableUserSelectHack&&fe(me.ownerDocument),ne("DraggableCore: handleDragStop: %j",$),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,me&&(ne("DraggableCore: Removing handlers"),X(me.ownerDocument,le.move,this.handleDrag),X(me.ownerDocument,le.stop,this.handleDragStop))},this.onMouseDown=p=>(le=Q.mouse,this.handleDragStart(p)),this.onMouseUp=p=>(le=Q.mouse,this.handleDragStop(p)),this.onTouchStart=p=>(le=Q.touch,this.handleDragStart(p)),this.onTouchEnd=p=>(le=Q.touch,this.handleDragStop(p))}componentDidMount(){this.mounted=!0;const p=this.findDOMNode();p&&G(p,Q.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const p=this.findDOMNode();if(p){const{ownerDocument:S}=p;X(S,Q.mouse.move,this.handleDrag),X(S,Q.touch.move,this.handleDrag),X(S,Q.mouse.stop,this.handleDragStop),X(S,Q.touch.stop,this.handleDragStop),X(p,Q.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&fe(S)}}findDOMNode(){var p;if((p=this.props)!=null&&p.nodeRef)return this.props.nodeRef.current;const S=q.default;return typeof S.findDOMNode=="function"?S.findDOMNode(this):(ne("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return m.cloneElement(m.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};ye.displayName="DraggableCore",ye.propTypes={allowAnyClick:j.default.bool,allowMobileScroll:j.default.bool,children:j.default.node.isRequired,disabled:j.default.bool,enableUserSelectHack:j.default.bool,offsetParent:function(p,S){if(p[S]&&p[S].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:j.default.arrayOf(j.default.number),handle:j.default.string,cancel:j.default.string,nodeRef:j.default.object,onStart:j.default.func,onDrag:j.default.func,onStop:j.default.func,onMouseDown:j.default.func,scale:j.default.number,className:f,style:f,transform:f},ye.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Ce=class extends C.Component{constructor(p){super(p),this.onDragStart=(S,z)=>{if(ne("Draggable: onDragStart: %j",z),this.props.onStart(S,we(this,z))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(S,z)=>{if(!this.state.dragging)return!1;ne("Draggable: onDrag: %j",z);const Y=we(this,z),$={x:Y.x,y:Y.y,slackX:0,slackY:0};if(this.props.bounds){const{x:me,y:Te}=$;$.x+=this.state.slackX,$.y+=this.state.slackY;const[Me,Ge]=ee(this,$.x,$.y);$.x=Me,$.y=Ge,$.slackX=this.state.slackX+(me-$.x),$.slackY=this.state.slackY+(Te-$.y),Y.x=$.x,Y.y=$.y,Y.deltaX=$.x-this.state.x,Y.deltaY=$.y-this.state.y}if(this.props.onDrag(S,Y)===!1)return!1;this.setState($)},this.onDragStop=(S,z)=>{if(!this.state.dragging||this.props.onStop(S,we(this,z))===!1)return!1;ne("Draggable: onDragStop: %j",z);const $={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:me,y:Te}=this.props.position;$.x=me,$.y=Te}this.setState($)},this.state={dragging:!1,dragged:!1,x:p.position?p.position.x:p.defaultPosition.x,y:p.position?p.position.y:p.defaultPosition.y,prevPropsPosition:{...p.position},slackX:0,slackY:0,isElementSVG:!1},p.position&&!(p.onDrag||p.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:p},{prevPropsPosition:S}){return p&&(!S||p.x!==S.x||p.y!==S.y)?(ne("Draggable: getDerivedStateFromProps %j",{position:p,prevPropsPosition:S}),{x:p.x,y:p.y,prevPropsPosition:{...p}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var p;if((p=this.props)!=null&&p.nodeRef)return this.props.nodeRef.current;const S=k.default;return typeof S.findDOMNode=="function"?S.findDOMNode(this):null}render(){const{axis:p,bounds:S,children:z,defaultPosition:Y,defaultClassName:$,defaultClassNameDragging:Ee,defaultClassNameDragged:me,position:Te,positionOffset:Me,scale:Ge,...$e}=this.props;let mt={},et=null;const Ve=!!!Te||this.state.dragging,tt=Te||Y,rt={x:ce(this)&&Ve?this.state.x:tt.x,y:B(this)&&Ve?this.state.y:tt.y};this.state.isElementSVG?et=I(rt,Me):mt=ge(rt,Me);const nt=C.Children.only(z),tr=(0,y.clsx)(nt.props.className||"",$,{[Ee]:this.state.dragging,[me]:this.state.dragged});return C.createElement(ye,{...$e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},C.cloneElement(nt,{className:tr,style:{...nt.props.style,...mt},transform:et}))}};return Ce.displayName="Draggable",Ce.propTypes={...ye.propTypes,axis:L.default.oneOf(["both","x","y","none"]),bounds:L.default.oneOfType([L.default.shape({left:L.default.number,right:L.default.number,top:L.default.number,bottom:L.default.number}),L.default.string,L.default.oneOf([!1])]),defaultClassName:L.default.string,defaultClassNameDragging:L.default.string,defaultClassNameDragged:L.default.string,defaultPosition:L.default.shape({x:L.default.number,y:L.default.number}),positionOffset:L.default.shape({x:L.default.oneOfType([L.default.number,L.default.string]),y:L.default.oneOfType([L.default.number,L.default.string])}),position:L.default.shape({x:L.default.number,y:L.default.number}),className:f,style:f,transform:f},Ce.defaultProps={...ye.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},Xt}var Dr;function Jt(){if(Dr)return dt.exports;Dr=1;const n=An(),i=n.DraggableCore,o=n.default||n;return dt.exports=o,dt.exports.default=o,dt.exports.DraggableCore=i,dt.exports}var ft={exports:{}},pt={},Dt={},Tr;function Ln(){if(Tr)return Dt;Tr=1,Dt.__esModule=!0,Dt.cloneElement=_;var n=i(se);function i(b){return b&&b.__esModule?b:{default:b}}function o(b,v){var R=Object.keys(b);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(b);v&&(P=P.filter(function(C){return Object.getOwnPropertyDescriptor(b,C).enumerable})),R.push.apply(R,P)}return R}function a(b){for(var v=1;v<arguments.length;v++){var R=arguments[v]!=null?arguments[v]:{};v%2?o(Object(R),!0).forEach(function(P){c(b,P,R[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(R)):o(Object(R)).forEach(function(P){Object.defineProperty(b,P,Object.getOwnPropertyDescriptor(R,P))})}return b}function c(b,v,R){return(v=u(v))in b?Object.defineProperty(b,v,{value:R,enumerable:!0,configurable:!0,writable:!0}):b[v]=R,b}function u(b){var v=x(b,"string");return typeof v=="symbol"?v:v+""}function x(b,v){if(typeof b!="object"||!b)return b;var R=b[Symbol.toPrimitive];if(R!==void 0){var P=R.call(b,v);if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(b)}function _(b,v){return v.style&&b.props.style&&(v.style=a(a({},b.props.style),v.style)),v.className&&b.props.className&&(v.className=b.props.className+" "+v.className),n.default.cloneElement(b,v)}return Dt}var ht={},zr;function kr(){if(zr)return ht;zr=1,ht.__esModule=!0,ht.resizableProps=void 0;var n=i(Ue());Jt();function i(o){return o&&o.__esModule?o:{default:o}}return ht.resizableProps={axis:n.default.oneOf(["both","x","y","none"]),className:n.default.string,children:n.default.element.isRequired,draggableOpts:n.default.shape({allowAnyClick:n.default.bool,cancel:n.default.string,children:n.default.node,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:typeof Element<"u"?n.default.instanceOf(Element):n.default.any,grid:n.default.arrayOf(n.default.number),handle:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number}),height:function(){for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];const u=a[0];return u.axis==="both"||u.axis==="y"?n.default.number.isRequired(...a):n.default.number(...a)},handle:n.default.oneOfType([n.default.node,n.default.func]),handleSize:n.default.arrayOf(n.default.number),lockAspectRatio:n.default.bool,maxConstraints:n.default.arrayOf(n.default.number),minConstraints:n.default.arrayOf(n.default.number),onResizeStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,resizeHandles:n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:n.default.number,width:function(){for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];const u=a[0];return u.axis==="both"||u.axis==="x"?n.default.number.isRequired(...a):n.default.number(...a)}},ht}var Mr;function Ir(){if(Mr)return pt;Mr=1,pt.__esModule=!0,pt.default=void 0;var n=u(se),i=Jt(),o=Ln(),a=kr();const c=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function u(k,y){if(typeof WeakMap=="function")var d=new WeakMap,r=new WeakMap;return(u=function(t,s){if(!s&&t&&t.__esModule)return t;var f,l,w={__proto__:null,default:t};if(t===null||typeof t!="object"&&typeof t!="function")return w;if(f=s?r:d){if(f.has(t))return f.get(t);f.set(t,w)}for(const O in t)O!=="default"&&{}.hasOwnProperty.call(t,O)&&((l=(f=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,O))&&(l.get||l.set)?f(w,O,l):w[O]=t[O]);return w})(k,y)}function x(){return x=Object.assign?Object.assign.bind():function(k){for(var y=1;y<arguments.length;y++){var d=arguments[y];for(var r in d)({}).hasOwnProperty.call(d,r)&&(k[r]=d[r])}return k},x.apply(null,arguments)}function _(k,y){if(k==null)return{};var d={};for(var r in k)if({}.hasOwnProperty.call(k,r)){if(y.indexOf(r)!==-1)continue;d[r]=k[r]}return d}function b(k,y){var d=Object.keys(k);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(k);y&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(k,t).enumerable})),d.push.apply(d,r)}return d}function v(k){for(var y=1;y<arguments.length;y++){var d=arguments[y]!=null?arguments[y]:{};y%2?b(Object(d),!0).forEach(function(r){R(k,r,d[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(d)):b(Object(d)).forEach(function(r){Object.defineProperty(k,r,Object.getOwnPropertyDescriptor(d,r))})}return k}function R(k,y,d){return(y=P(y))in k?Object.defineProperty(k,y,{value:d,enumerable:!0,configurable:!0,writable:!0}):k[y]=d,k}function P(k){var y=C(k,"string");return typeof y=="symbol"?y:y+""}function C(k,y){if(typeof k!="object"||!k)return k;var d=k[Symbol.toPrimitive];if(d!==void 0){var r=d.call(k,y);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(k)}let L=class extends n.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(y,d){const r=this.props,t=r.minConstraints,s=r.maxConstraints,f=r.lockAspectRatio;if(!t&&!s&&!f)return[y,d];if(f){const H=this.props.width/this.props.height,T=y-this.props.width,N=d-this.props.height;Math.abs(T)>Math.abs(N*H)?d=y/H:y=d*H}const l=y,w=d;let O=this.slack||[0,0],D=O[0],M=O[1];return y+=D,d+=M,t&&(y=Math.max(t[0],y),d=Math.max(t[1],d)),s&&(y=Math.min(s[0],y),d=Math.min(s[1],d)),this.slack=[D+(l-y),M+(w-d)],[y,d]}resizeHandler(y,d){return(r,t)=>{var s,f,l,w;let O=t.node,D=t.deltaX,M=t.deltaY;y==="onResizeStart"&&this.resetData();const H=(this.props.axis==="both"||this.props.axis==="x")&&d!=="n"&&d!=="s",T=(this.props.axis==="both"||this.props.axis==="y")&&d!=="e"&&d!=="w";if(!H&&!T)return;const N=d[0],G=d[d.length-1],X=O.getBoundingClientRect();if(this.lastHandleRect!=null){if(G==="w"){const oe=X.left-this.lastHandleRect.left;D+=oe}if(N==="n"){const oe=X.top-this.lastHandleRect.top;M+=oe}}this.lastHandleRect=X,G==="w"&&(D=-D),N==="n"&&(M=-M);const V=(s=(f=this.lastSize)==null?void 0:f.width)!=null?s:this.props.width,J=(l=(w=this.lastSize)==null?void 0:w.height)!=null?l:this.props.height;let K=V+(H?D/this.props.transformScale:0),re=J+(T?M/this.props.transformScale:0);var be=this.runConstraints(K,re);if(K=be[0],re=be[1],y==="onResizeStop"&&this.lastSize){var ge=this.lastSize;K=ge.width,re=ge.height}const I=K!==V||re!==J;y!=="onResizeStop"&&(this.lastSize={width:K,height:re});const W=typeof this.props[y]=="function"?this.props[y]:null;W&&!(y==="onResize"&&!I)&&(r.persist==null||r.persist(),W(r,{node:O,size:{width:K,height:re},handle:d})),y==="onResizeStop"&&this.resetData()}}renderResizeHandle(y,d){const r=this.props.handle;if(!r)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+y,ref:d});if(typeof r=="function")return r(y,d);const t=typeof r.type=="string",s=v({ref:d},t?{}:{handleAxis:y});return n.cloneElement(r,s)}render(){const y=this.props,d=y.children,r=y.className,t=y.draggableOpts;y.width,y.height,y.handle,y.handleSize,y.lockAspectRatio,y.axis,y.minConstraints,y.maxConstraints,y.onResize,y.onResizeStop,y.onResizeStart;const s=y.resizeHandles;y.transformScale;const f=_(y,c);return(0,o.cloneElement)(d,v(v({},f),{},{className:(r?r+" ":"")+"react-resizable",children:[...n.Children.toArray(d.props.children),...s.map(l=>{var w;const O=(w=this.handleRefs[l])!=null?w:this.handleRefs[l]=n.createRef();return n.createElement(i.DraggableCore,x({},t,{nodeRef:O,key:"resizableHandle-"+l,onStop:this.resizeHandler("onResizeStop",l),onStart:this.resizeHandler("onResizeStart",l),onDrag:this.resizeHandler("onResize",l)}),this.renderResizeHandle(l,O))})]}))}};return pt.default=L,L.propTypes=a.resizableProps,L.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},pt}var gt={},Ar;function Nn(){if(Ar)return gt;Ar=1,gt.__esModule=!0,gt.default=void 0;var n=x(se),i=u(Ue()),o=u(Ir()),a=kr();const c=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function u(y){return y&&y.__esModule?y:{default:y}}function x(y,d){if(typeof WeakMap=="function")var r=new WeakMap,t=new WeakMap;return(x=function(s,f){if(!f&&s&&s.__esModule)return s;var l,w,O={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return O;if(l=f?t:r){if(l.has(s))return l.get(s);l.set(s,O)}for(const D in s)D!=="default"&&{}.hasOwnProperty.call(s,D)&&((w=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,D))&&(w.get||w.set)?l(O,D,w):O[D]=s[D]);return O})(y,d)}function _(){return _=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var r=arguments[d];for(var t in r)({}).hasOwnProperty.call(r,t)&&(y[t]=r[t])}return y},_.apply(null,arguments)}function b(y,d){var r=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(s){return Object.getOwnPropertyDescriptor(y,s).enumerable})),r.push.apply(r,t)}return r}function v(y){for(var d=1;d<arguments.length;d++){var r=arguments[d]!=null?arguments[d]:{};d%2?b(Object(r),!0).forEach(function(t){R(y,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(r,t))})}return y}function R(y,d,r){return(d=P(d))in y?Object.defineProperty(y,d,{value:r,enumerable:!0,configurable:!0,writable:!0}):y[d]=r,y}function P(y){var d=C(y,"string");return typeof d=="symbol"?d:d+""}function C(y,d){if(typeof y!="object"||!y)return y;var r=y[Symbol.toPrimitive];if(r!==void 0){var t=r.call(y,d);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}function L(y,d){if(y==null)return{};var r={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)!==-1)continue;r[t]=y[t]}return r}let k=class extends n.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(d,r)=>{const t=r.size;this.props.onResize?(d.persist==null||d.persist(),this.setState(t,()=>this.props.onResize&&this.props.onResize(d,r))):this.setState(t)}}static getDerivedStateFromProps(d,r){return r.propsWidth!==d.width||r.propsHeight!==d.height?{width:d.width,height:d.height,propsWidth:d.width,propsHeight:d.height}:null}render(){const d=this.props,r=d.handle,t=d.handleSize;d.onResize;const s=d.onResizeStart,f=d.onResizeStop,l=d.draggableOpts,w=d.minConstraints,O=d.maxConstraints,D=d.lockAspectRatio,M=d.axis;d.width,d.height;const H=d.resizeHandles,T=d.style,N=d.transformScale,G=L(d,c);return n.createElement(o.default,{axis:M,draggableOpts:l,handle:r,handleSize:t,height:this.state.height,lockAspectRatio:D,maxConstraints:O,minConstraints:w,onResizeStart:s,onResize:this.onResize,onResizeStop:f,resizeHandles:H,transformScale:N,width:this.state.width},n.createElement("div",_({},G,{style:v(v({},T),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return gt.default=k,k.propTypes=v(v({},a.resizableProps),{},{children:i.default.element}),gt}var Lr;function Wn(){return Lr||(Lr=1,ft.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ft.exports.Resizable=Ir().default,ft.exports.ResizableBox=Nn().default),ft.exports}var Ye={},Nr;function Wr(){if(Nr)return Ye;Nr=1;var n={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.resizeHandleType=Ye.resizeHandleAxesType=Ye.default=void 0;var i=a(Ue()),o=a(se);function a(x){return x&&x.__esModule?x:{default:x}}const c=Ye.resizeHandleAxesType=i.default.arrayOf(i.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),u=Ye.resizeHandleType=i.default.oneOfType([i.default.node,i.default.func]);return Ye.default={className:i.default.string,style:i.default.object,width:i.default.number,autoSize:i.default.bool,cols:i.default.number,draggableCancel:i.default.string,draggableHandle:i.default.string,verticalCompact:function(x){x.verticalCompact===!1&&n.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:i.default.oneOf(["vertical","horizontal"]),layout:function(x){var _=x.layout;_!==void 0&&Qe().validateLayout(_,"layout")},margin:i.default.arrayOf(i.default.number),containerPadding:i.default.arrayOf(i.default.number),rowHeight:i.default.number,maxRows:i.default.number,isBounded:i.default.bool,isDraggable:i.default.bool,isResizable:i.default.bool,allowOverlap:i.default.bool,preventCollision:i.default.bool,useCSSTransforms:i.default.bool,transformScale:i.default.number,isDroppable:i.default.bool,resizeHandles:c,resizeHandle:u,onLayoutChange:i.default.func,onDragStart:i.default.func,onDrag:i.default.func,onDragStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,onResizeStop:i.default.func,onDrop:i.default.func,droppingItem:i.default.shape({i:i.default.string.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired}),children:function(x,_){const b=x[_],v={};o.default.Children.forEach(b,function(R){if((R==null?void 0:R.key)!=null){if(v[R.key])throw new Error('Duplicate child key "'+R.key+'" found! This will cause problems in ReactGridLayout.');v[R.key]=!0}})},innerRef:i.default.any},Ye}var Hr;function Hn(){if(Hr)return ut;Hr=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.default=void 0;var n=v(se),i=It,o=v(Ue()),a=Jt(),c=Wn(),u=Qe(),x=Bt(),_=Wr(),b=v(_t());function v(d){return d&&d.__esModule?d:{default:d}}function R(d,r){var t=Object.keys(d);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(d);r&&(s=s.filter(function(f){return Object.getOwnPropertyDescriptor(d,f).enumerable})),t.push.apply(t,s)}return t}function P(d){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?R(Object(t),!0).forEach(function(s){C(d,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(s){Object.defineProperty(d,s,Object.getOwnPropertyDescriptor(t,s))})}return d}function C(d,r,t){return(r=L(r))in d?Object.defineProperty(d,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):d[r]=t,d}function L(d){var r=k(d,"string");return typeof r=="symbol"?r:r+""}function k(d,r){if(typeof d!="object"||!d)return d;var t=d[Symbol.toPrimitive];if(t!==void 0){var s=t.call(d,r);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(d)}let y=class extends n.default.Component{constructor(){super(...arguments),C(this,"state",{resizing:null,dragging:null,className:""}),C(this,"elementRef",n.default.createRef()),C(this,"onDragStart",(r,t)=>{let{node:s}=t;const{onDragStart:f,transformScale:l}=this.props;if(!f)return;const w={top:0,left:0},{offsetParent:O}=s;if(!O)return;const D=O.getBoundingClientRect(),M=s.getBoundingClientRect(),H=M.left/l,T=D.left/l,N=M.top/l,G=D.top/l;w.left=H-T+O.scrollLeft,w.top=N-G+O.scrollTop,this.setState({dragging:w});const{x:X,y:V}=(0,x.calcXY)(this.getPositionParams(),w.top,w.left,this.props.w,this.props.h);return f.call(this,this.props.i,X,V,{e:r,node:s,newPosition:w})}),C(this,"onDrag",(r,t,s)=>{let{node:f,deltaX:l,deltaY:w}=t;const{onDrag:O}=this.props;if(!O)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let D=this.state.dragging.top+w,M=this.state.dragging.left+l;const{isBounded:H,i:T,w:N,h:G,containerWidth:X}=this.props,V=this.getPositionParams();if(H){const{offsetParent:be}=f;if(be){const{margin:ge,rowHeight:I}=this.props,W=be.clientHeight-(0,x.calcGridItemWHPx)(G,I,ge[1]);D=(0,x.clamp)(D,0,W);const ie=(0,x.calcGridColWidth)(V),oe=X-(0,x.calcGridItemWHPx)(N,ie,ge[0]);M=(0,x.clamp)(M,0,oe)}}const J={top:D,left:M};s?this.setState({dragging:J}):(0,i.flushSync)(()=>{this.setState({dragging:J})});const{x:K,y:re}=(0,x.calcXY)(V,D,M,N,G);return O.call(this,T,K,re,{e:r,node:f,newPosition:J})}),C(this,"onDragStop",(r,t)=>{let{node:s}=t;const{onDragStop:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:l,h:w,i:O}=this.props,{left:D,top:M}=this.state.dragging,H={top:M,left:D};this.setState({dragging:null});const{x:T,y:N}=(0,x.calcXY)(this.getPositionParams(),M,D,l,w);return f.call(this,O,T,N,{e:r,node:s,newPosition:H})}),C(this,"onResizeStop",(r,t,s)=>this.onResizeHandler(r,t,s,"onResizeStop")),C(this,"onResizeStart",(r,t,s)=>this.onResizeHandler(r,t,s,"onResizeStart")),C(this,"onResize",(r,t,s)=>this.onResizeHandler(r,t,s,"onResize"))}shouldComponentUpdate(r,t){if(this.props.children!==r.children||this.props.droppingPosition!==r.droppingPosition)return!0;const s=(0,x.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),f=(0,x.calcGridItemPosition)(this.getPositionParams(r),r.x,r.y,r.w,r.h,t);return!(0,u.fastPositionEqual)(s,f)||this.props.useCSSTransforms!==r.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(r){this.moveDroppingItem(r)}moveDroppingItem(r){const{droppingPosition:t}=this.props;if(!t)return;const s=this.elementRef.current;if(!s)return;const f=r.droppingPosition||{left:0,top:0},{dragging:l}=this.state,w=l&&t.left!==f.left||t.top!==f.top;if(!l)this.onDragStart(t.e,{node:s,deltaX:t.left,deltaY:t.top});else if(w){const O=t.left-l.left,D=t.top-l.top;this.onDrag(t.e,{node:s,deltaX:O,deltaY:D},!0)}}getPositionParams(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:r.cols,containerPadding:r.containerPadding,containerWidth:r.containerWidth,margin:r.margin,maxRows:r.maxRows,rowHeight:r.rowHeight}}createStyle(r){const{usePercentages:t,containerWidth:s,useCSSTransforms:f}=this.props;let l;return f?l=(0,u.setTransform)(r):(l=(0,u.setTopLeft)(r),t&&(l.left=(0,u.perc)(r.left/s),l.width=(0,u.perc)(r.width/s))),l}mixinDraggable(r,t){return n.default.createElement(a.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},r)}curryResizeHandler(r,t){return(s,f)=>t(s,f,r)}mixinResizable(r,t,s){const{cols:f,minW:l,minH:w,maxW:O,maxH:D,transformScale:M,resizeHandles:H,resizeHandle:T}=this.props,N=this.getPositionParams(),G=(0,x.calcGridItemPosition)(N,0,0,f,0).width,X=(0,x.calcGridItemPosition)(N,0,0,l,w),V=(0,x.calcGridItemPosition)(N,0,0,O,D),J=[X.width,X.height],K=[Math.min(V.width,G),Math.min(V.height,1/0)];return n.default.createElement(c.Resizable,{draggableOpts:{disabled:!s},className:s?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:J,maxConstraints:K,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:M,resizeHandles:H,handle:T},r)}onResizeHandler(r,t,s,f){let{node:l,size:w,handle:O}=t;const D=this.props[f];if(!D)return;const{x:M,y:H,i:T,maxH:N,minH:G,containerWidth:X}=this.props,{minW:V,maxW:J}=this.props;let K=w;l&&(K=(0,u.resizeItemInDirection)(O,s,w,X),(0,i.flushSync)(()=>{this.setState({resizing:f==="onResizeStop"?null:K})}));let{w:re,h:be}=(0,x.calcWH)(this.getPositionParams(),K.width,K.height,M,H,O);re=(0,x.clamp)(re,Math.max(V,1),J),be=(0,x.clamp)(be,G,N),D.call(this,T,re,be,{e:r,node:l,size:K,handle:O})}render(){const{x:r,y:t,w:s,h:f,isDraggable:l,isResizable:w,droppingPosition:O,useCSSTransforms:D}=this.props,M=(0,x.calcGridItemPosition)(this.getPositionParams(),r,t,s,f,this.state),H=n.default.Children.only(this.props.children);let T=n.default.cloneElement(H,{ref:this.elementRef,className:(0,b.default)("react-grid-item",H.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":l,"react-draggable-dragging":!!this.state.dragging,dropping:!!O,cssTransforms:D}),style:P(P(P({},this.props.style),H.props.style),this.createStyle(M))});return T=this.mixinResizable(T,M,w),T=this.mixinDraggable(T,l),T}};return ut.default=y,C(y,"propTypes",{children:o.default.element,cols:o.default.number.isRequired,containerWidth:o.default.number.isRequired,rowHeight:o.default.number.isRequired,margin:o.default.array.isRequired,maxRows:o.default.number.isRequired,containerPadding:o.default.array.isRequired,x:o.default.number.isRequired,y:o.default.number.isRequired,w:o.default.number.isRequired,h:o.default.number.isRequired,minW:function(d,r){const t=d[r];if(typeof t!="number")return new Error("minWidth not Number");if(t>d.w||t>d.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(d,r){const t=d[r];if(typeof t!="number")return new Error("maxWidth not Number");if(t<d.w||t<d.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(d,r){const t=d[r];if(typeof t!="number")return new Error("minHeight not Number");if(t>d.h||t>d.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(d,r){const t=d[r];if(typeof t!="number")return new Error("maxHeight not Number");if(t<d.h||t<d.minH)return new Error("maxHeight smaller than item height/minHeight")},i:o.default.string.isRequired,resizeHandles:_.resizeHandleAxesType,resizeHandle:_.resizeHandleType,onDragStop:o.default.func,onDragStart:o.default.func,onDrag:o.default.func,onResizeStop:o.default.func,onResizeStart:o.default.func,onResize:o.default.func,isDraggable:o.default.bool.isRequired,isResizable:o.default.bool.isRequired,isBounded:o.default.bool.isRequired,static:o.default.bool,useCSSTransforms:o.default.bool.isRequired,transformScale:o.default.number,className:o.default.string,handle:o.default.string,cancel:o.default.string,droppingPosition:o.default.shape({e:o.default.object.isRequired,left:o.default.number.isRequired,top:o.default.number.isRequired})}),C(y,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),ut}var Br;function qr(){if(Br)return lt;Br=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var n=b(se),i=Wt(),o=_(_t()),a=Qe(),c=Bt(),u=_(Hn()),x=_(Wr());function _(r){return r&&r.__esModule?r:{default:r}}function b(r,t){if(typeof WeakMap=="function")var s=new WeakMap,f=new WeakMap;return(b=function(l,w){if(!w&&l&&l.__esModule)return l;var O,D,M={__proto__:null,default:l};if(l===null||typeof l!="object"&&typeof l!="function")return M;if(O=w?f:s){if(O.has(l))return O.get(l);O.set(l,M)}for(const H in l)H!=="default"&&{}.hasOwnProperty.call(l,H)&&((D=(O=Object.defineProperty)&&Object.getOwnPropertyDescriptor(l,H))&&(D.get||D.set)?O(M,H,D):M[H]=l[H]);return M})(r,t)}function v(r,t){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(r);t&&(f=f.filter(function(l){return Object.getOwnPropertyDescriptor(r,l).enumerable})),s.push.apply(s,f)}return s}function R(r){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?v(Object(s),!0).forEach(function(f){P(r,f,s[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):v(Object(s)).forEach(function(f){Object.defineProperty(r,f,Object.getOwnPropertyDescriptor(s,f))})}return r}function P(r,t,s){return(t=C(t))in r?Object.defineProperty(r,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[t]=s,r}function C(r){var t=L(r,"string");return typeof t=="symbol"?t:t+""}function L(r,t){if(typeof r!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var f=s.call(r,t);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}const k="react-grid-layout";let y=!1;try{y=/firefox/i.test(navigator.userAgent)}catch{}let d=class extends n.Component{constructor(){super(...arguments),P(this,"state",{activeDrag:null,layout:(0,a.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,a.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),P(this,"dragEnterCounter",0),P(this,"onDragStart",(t,s,f,l)=>{let{e:w,node:O}=l;const{layout:D}=this.state,M=(0,a.getLayoutItem)(D,t);if(!M)return;const H={w:M.w,h:M.h,x:M.x,y:M.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,a.cloneLayoutItem)(M),oldLayout:D,activeDrag:H}),this.props.onDragStart(D,M,M,null,w,O)}),P(this,"onDrag",(t,s,f,l)=>{let{e:w,node:O}=l;const{oldDragItem:D}=this.state;let{layout:M}=this.state;const{cols:H,allowOverlap:T,preventCollision:N}=this.props,G=(0,a.getLayoutItem)(M,t);if(!G)return;const X={w:G.w,h:G.h,x:G.x,y:G.y,placeholder:!0,i:t};M=(0,a.moveElement)(M,G,s,f,!0,N,(0,a.compactType)(this.props),H,T),this.props.onDrag(M,D,G,X,w,O),this.setState({layout:T?M:(0,a.compact)(M,(0,a.compactType)(this.props),H),activeDrag:X})}),P(this,"onDragStop",(t,s,f,l)=>{let{e:w,node:O}=l;if(!this.state.activeDrag)return;const{oldDragItem:D}=this.state;let{layout:M}=this.state;const{cols:H,preventCollision:T,allowOverlap:N}=this.props,G=(0,a.getLayoutItem)(M,t);if(!G)return;M=(0,a.moveElement)(M,G,s,f,!0,T,(0,a.compactType)(this.props),H,N);const V=N?M:(0,a.compact)(M,(0,a.compactType)(this.props),H);this.props.onDragStop(V,D,G,null,w,O);const{oldLayout:J}=this.state;this.setState({activeDrag:null,layout:V,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(V,J)}),P(this,"onResizeStart",(t,s,f,l)=>{let{e:w,node:O}=l;const{layout:D}=this.state,M=(0,a.getLayoutItem)(D,t);M&&(this.setState({oldResizeItem:(0,a.cloneLayoutItem)(M),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(D,M,M,null,w,O))}),P(this,"onResize",(t,s,f,l)=>{let{e:w,node:O,size:D,handle:M}=l;const{oldResizeItem:H}=this.state,{layout:T}=this.state,{cols:N,preventCollision:G,allowOverlap:X}=this.props;let V=!1,J,K,re;const[be,ge]=(0,a.withLayoutItem)(T,t,W=>{let ie;return K=W.x,re=W.y,["sw","w","nw","n","ne"].indexOf(M)!==-1&&(["sw","nw","w"].indexOf(M)!==-1&&(K=W.x+(W.w-s),s=W.x!==K&&K<0?W.w:s,K=K<0?0:K),["ne","n","nw"].indexOf(M)!==-1&&(re=W.y+(W.h-f),f=W.y!==re&&re<0?W.h:f,re=re<0?0:re),V=!0),G&&!X&&(ie=(0,a.getAllCollisions)(T,R(R({},W),{},{w:s,h:f,x:K,y:re})).filter(ae=>ae.i!==W.i).length>0,ie&&(re=W.y,f=W.h,K=W.x,s=W.w,V=!1)),W.w=s,W.h=f,W});if(!ge)return;J=be,V&&(J=(0,a.moveElement)(be,ge,K,re,!0,this.props.preventCollision,(0,a.compactType)(this.props),N,X));const I={w:ge.w,h:ge.h,x:ge.x,y:ge.y,static:!0,i:t};this.props.onResize(J,H,ge,I,w,O),this.setState({layout:X?J:(0,a.compact)(J,(0,a.compactType)(this.props),N),activeDrag:I})}),P(this,"onResizeStop",(t,s,f,l)=>{let{e:w,node:O}=l;const{layout:D,oldResizeItem:M}=this.state,{cols:H,allowOverlap:T}=this.props,N=(0,a.getLayoutItem)(D,t),G=T?D:(0,a.compact)(D,(0,a.compactType)(this.props),H);this.props.onResizeStop(G,M,N,null,w,O);const{oldLayout:X}=this.state;this.setState({activeDrag:null,layout:G,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(G,X)}),P(this,"onDragOver",t=>{var s;if(t.preventDefault(),t.stopPropagation(),y&&!((s=t.nativeEvent.target)!==null&&s!==void 0&&s.classList.contains(k)))return!1;const{droppingItem:f,onDropDragOver:l,margin:w,cols:O,rowHeight:D,maxRows:M,width:H,containerPadding:T,transformScale:N}=this.props,G=l==null?void 0:l(t);if(G===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const X=R(R({},f),G),{layout:V}=this.state,J=t.currentTarget.getBoundingClientRect(),K=t.clientX-J.left,re=t.clientY-J.top,be={left:K/N,top:re/N,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ge,top:I}=this.state.droppingPosition;(ge!=K||I!=re)&&this.setState({droppingPosition:be})}}else{const ge={cols:O,margin:w,maxRows:M,rowHeight:D,containerWidth:H,containerPadding:T||w},I=(0,c.calcXY)(ge,re,K,X.w,X.h);this.setState({droppingDOMNode:n.createElement("div",{key:X.i}),droppingPosition:be,layout:[...V,R(R({},X),{},{x:I.x,y:I.y,static:!1,isDraggable:!0})]})}}),P(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:s}=this.props,{layout:f}=this.state,l=(0,a.compact)(f.filter(w=>w.i!==t.i),(0,a.compactType)(this.props),s,this.props.allowOverlap);this.setState({layout:l,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),P(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),P(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),P(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();const{droppingItem:s}=this.props,{layout:f}=this.state,l=f.find(w=>w.i===s.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,l,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,s){let f;return s.activeDrag?null:(!(0,i.deepEqual)(t.layout,s.propsLayout)||t.compactType!==s.compactType?f=t.layout:(0,a.childrenEqual)(t.children,s.children)||(f=s.layout),f?{layout:(0,a.synchronizeLayoutWithChildren)(f,t.children,t.cols,(0,a.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,s){return this.props.children!==t.children||!(0,a.fastRGLPropsEqual)(this.props,t,i.deepEqual)||this.state.activeDrag!==s.activeDrag||this.state.mounted!==s.mounted||this.state.droppingPosition!==s.droppingPosition}componentDidUpdate(t,s){if(!this.state.activeDrag){const f=this.state.layout,l=s.layout;this.onLayoutMaybeChanged(f,l)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,a.bottom)(this.state.layout),s=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+s*2+"px"}onLayoutMaybeChanged(t,s){s||(s=this.state.layout),(0,i.deepEqual)(s,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:s,cols:f,margin:l,containerPadding:w,rowHeight:O,maxRows:D,useCSSTransforms:M,transformScale:H}=this.props;return n.createElement(u.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder ".concat(this.state.resizing?"placeholder-resizing":""),containerWidth:s,cols:f,margin:l,containerPadding:w||l,maxRows:D,rowHeight:O,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:M,transformScale:H},n.createElement("div",null))}processGridItem(t,s){if(!t||!t.key)return;const f=(0,a.getLayoutItem)(this.state.layout,String(t.key));if(!f)return null;const{width:l,cols:w,margin:O,containerPadding:D,rowHeight:M,maxRows:H,isDraggable:T,isResizable:N,isBounded:G,useCSSTransforms:X,transformScale:V,draggableCancel:J,draggableHandle:K,resizeHandles:re,resizeHandle:be}=this.props,{mounted:ge,droppingPosition:I}=this.state,W=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&T,ie=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&N,oe=f.resizeHandles||re,ae=W&&G&&f.isBounded!==!1;return n.createElement(u.default,{containerWidth:l,cols:w,margin:O,containerPadding:D||O,maxRows:H,rowHeight:M,cancel:J,handle:K,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:W,isResizable:ie,isBounded:ae,useCSSTransforms:X&&ge,usePercentages:!ge,transformScale:V,w:f.w,h:f.h,x:f.x,y:f.y,i:f.i,minH:f.minH,minW:f.minW,maxH:f.maxH,maxW:f.maxW,static:f.static,droppingPosition:s?I:void 0,resizeHandles:oe,resizeHandle:be},t)}render(){const{className:t,style:s,isDroppable:f,innerRef:l}=this.props,w=(0,o.default)(k,t),O=R({height:this.containerHeight()},s);return n.createElement("div",{ref:l,className:w,style:O,onDrop:f?this.onDrop:a.noop,onDragLeave:f?this.onDragLeave:a.noop,onDragEnter:f?this.onDragEnter:a.noop,onDragOver:f?this.onDragOver:a.noop},n.Children.map(this.props.children,D=>this.processGridItem(D)),f&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return lt.default=d,P(d,"displayName","ReactGridLayout"),P(d,"propTypes",x.default),P(d,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:a.noop,onDragStart:a.noop,onDrag:a.noop,onDragStop:a.noop,onResizeStart:a.noop,onResize:a.noop,onResizeStop:a.noop,onDrop:a.noop,onDropDragOver:a.noop}),lt}var yt={},Xe={},Fr;function Yr(){if(Fr)return Xe;Fr=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.findOrGenerateResponsiveLayout=a,Xe.getBreakpointFromWidth=i,Xe.getColsFromBreakpoint=o,Xe.sortBreakpoints=c;var n=Qe();function i(u,x){const _=c(u);let b=_[0];for(let v=1,R=_.length;v<R;v++){const P=_[v];x>u[P]&&(b=P)}return b}function o(u,x){if(!x[u])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+u+" is missing!");return x[u]}function a(u,x,_,b,v,R){if(u[_])return(0,n.cloneLayout)(u[_]);let P=u[b];const C=c(x),L=C.slice(C.indexOf(_));for(let k=0,y=L.length;k<y;k++){const d=L[k];if(u[d]){P=u[d];break}}return P=(0,n.cloneLayout)(P||[]),(0,n.compact)((0,n.correctBounds)(P,{cols:v}),R,v)}function c(u){return Object.keys(u).sort(function(_,b){return u[_]-u[b]})}return Xe}var Gr;function Bn(){if(Gr)return yt;Gr=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.default=void 0;var n=b(se),i=_(Ue()),o=Wt(),a=Qe(),c=Yr(),u=_(qr());const x=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function _(f){return f&&f.__esModule?f:{default:f}}function b(f,l){if(typeof WeakMap=="function")var w=new WeakMap,O=new WeakMap;return(b=function(D,M){if(!M&&D&&D.__esModule)return D;var H,T,N={__proto__:null,default:D};if(D===null||typeof D!="object"&&typeof D!="function")return N;if(H=M?O:w){if(H.has(D))return H.get(D);H.set(D,N)}for(const G in D)G!=="default"&&{}.hasOwnProperty.call(D,G)&&((T=(H=Object.defineProperty)&&Object.getOwnPropertyDescriptor(D,G))&&(T.get||T.set)?H(N,G,T):N[G]=D[G]);return N})(f,l)}function v(){return v=Object.assign?Object.assign.bind():function(f){for(var l=1;l<arguments.length;l++){var w=arguments[l];for(var O in w)({}).hasOwnProperty.call(w,O)&&(f[O]=w[O])}return f},v.apply(null,arguments)}function R(f,l){if(f==null)return{};var w,O,D=P(f,l);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(f);for(O=0;O<M.length;O++)w=M[O],l.indexOf(w)===-1&&{}.propertyIsEnumerable.call(f,w)&&(D[w]=f[w])}return D}function P(f,l){if(f==null)return{};var w={};for(var O in f)if({}.hasOwnProperty.call(f,O)){if(l.indexOf(O)!==-1)continue;w[O]=f[O]}return w}function C(f,l){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(f);l&&(O=O.filter(function(D){return Object.getOwnPropertyDescriptor(f,D).enumerable})),w.push.apply(w,O)}return w}function L(f){for(var l=1;l<arguments.length;l++){var w=arguments[l]!=null?arguments[l]:{};l%2?C(Object(w),!0).forEach(function(O){k(f,O,w[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):C(Object(w)).forEach(function(O){Object.defineProperty(f,O,Object.getOwnPropertyDescriptor(w,O))})}return f}function k(f,l,w){return(l=y(l))in f?Object.defineProperty(f,l,{value:w,enumerable:!0,configurable:!0,writable:!0}):f[l]=w,f}function y(f){var l=d(f,"string");return typeof l=="symbol"?l:l+""}function d(f,l){if(typeof f!="object"||!f)return f;var w=f[Symbol.toPrimitive];if(w!==void 0){var O=w.call(f,l);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(f)}const r=f=>Object.prototype.toString.call(f);function t(f,l){return f==null?null:Array.isArray(f)?f:f[l]}let s=class extends n.Component{constructor(){super(...arguments),k(this,"state",this.generateInitialState()),k(this,"onLayoutChange",l=>{this.props.onLayoutChange(l,L(L({},this.props.layouts),{},{[this.state.breakpoint]:l}))})}generateInitialState(){const{width:l,breakpoints:w,layouts:O,cols:D}=this.props,M=(0,c.getBreakpointFromWidth)(w,l),H=(0,c.getColsFromBreakpoint)(M,D),T=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,c.findOrGenerateResponsiveLayout)(O,w,M,M,H,T),breakpoint:M,cols:H}}static getDerivedStateFromProps(l,w){if(!(0,o.deepEqual)(l.layouts,w.layouts)){const{breakpoint:O,cols:D}=w;return{layout:(0,c.findOrGenerateResponsiveLayout)(l.layouts,l.breakpoints,O,O,D,l.compactType),layouts:l.layouts}}return null}componentDidUpdate(l){(this.props.width!=l.width||this.props.breakpoint!==l.breakpoint||!(0,o.deepEqual)(this.props.breakpoints,l.breakpoints)||!(0,o.deepEqual)(this.props.cols,l.cols))&&this.onWidthChange(l)}onWidthChange(l){const{breakpoints:w,cols:O,layouts:D,compactType:M}=this.props,H=this.props.breakpoint||(0,c.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),T=this.state.breakpoint,N=(0,c.getColsFromBreakpoint)(H,O),G=L({},D);if(T!==H||l.breakpoints!==w||l.cols!==O){T in G||(G[T]=(0,a.cloneLayout)(this.state.layout));let J=(0,c.findOrGenerateResponsiveLayout)(G,w,H,T,N,M);J=(0,a.synchronizeLayoutWithChildren)(J,this.props.children,N,M,this.props.allowOverlap),G[H]=J,this.props.onBreakpointChange(H,N),this.props.onLayoutChange(J,G),this.setState({breakpoint:H,layout:J,cols:N})}const X=t(this.props.margin,H),V=t(this.props.containerPadding,H);this.props.onWidthChange(this.props.width,X,N,V)}render(){const l=this.props,{breakpoint:w,breakpoints:O,cols:D,layouts:M,margin:H,containerPadding:T,onBreakpointChange:N,onLayoutChange:G,onWidthChange:X}=l,V=R(l,x);return n.createElement(u.default,v({},V,{margin:t(H,this.state.breakpoint),containerPadding:t(T,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return yt.default=s,k(s,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts(f,l){if(r(f[l])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+r(f[l]));Object.keys(f[l]).forEach(w=>{if(!(w in f.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,a.validateLayout)(f.layouts[w],"layouts."+w)})},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),k(s,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:a.noop,onLayoutChange:a.noop,onWidthChange:a.noop}),yt}var Tt={},Vr=(function(){if(typeof Map<"u")return Map;function n(i,o){var a=-1;return i.some(function(c,u){return c[0]===o?(a=u,!0):!1}),a}return(function(){function i(){this.__entries__=[]}return Object.defineProperty(i.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),i.prototype.get=function(o){var a=n(this.__entries__,o),c=this.__entries__[a];return c&&c[1]},i.prototype.set=function(o,a){var c=n(this.__entries__,o);~c?this.__entries__[c][1]=a:this.__entries__.push([o,a])},i.prototype.delete=function(o){var a=this.__entries__,c=n(a,o);~c&&a.splice(c,1)},i.prototype.has=function(o){return!!~n(this.__entries__,o)},i.prototype.clear=function(){this.__entries__.splice(0)},i.prototype.forEach=function(o,a){a===void 0&&(a=null);for(var c=0,u=this.__entries__;c<u.length;c++){var x=u[c];o.call(a,x[1],x[0])}},i})()})(),Kt=typeof window<"u"&&typeof document<"u"&&window.document===document,zt=(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")()})(),qn=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(zt):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}})(),Fn=2;function Yn(n,i){var o=!1,a=!1,c=0;function u(){o&&(o=!1,n()),a&&_()}function x(){qn(u)}function _(){var b=Date.now();if(o){if(b-c<Fn)return;a=!0}else o=!0,a=!1,setTimeout(x,i);c=b}return _}var Gn=20,Vn=["top","right","bottom","left","width","height","size","weight"],Un=typeof MutationObserver<"u",$n=(function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Yn(this.refresh.bind(this),Gn)}return n.prototype.addObserver=function(i){~this.observers_.indexOf(i)||this.observers_.push(i),this.connected_||this.connect_()},n.prototype.removeObserver=function(i){var o=this.observers_,a=o.indexOf(i);~a&&o.splice(a,1),!o.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var i=this.updateObservers_();i&&this.refresh()},n.prototype.updateObservers_=function(){var i=this.observers_.filter(function(o){return o.gatherActive(),o.hasActive()});return i.forEach(function(o){return o.broadcastActive()}),i.length>0},n.prototype.connect_=function(){!Kt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Un?(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)},n.prototype.disconnect_=function(){!Kt||!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)},n.prototype.onTransitionEnd_=function(i){var o=i.propertyName,a=o===void 0?"":o,c=Vn.some(function(u){return!!~a.indexOf(u)});c&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n})(),Ur=(function(n,i){for(var o=0,a=Object.keys(i);o<a.length;o++){var c=a[o];Object.defineProperty(n,c,{value:i[c],enumerable:!1,writable:!1,configurable:!0})}return n}),Ze=(function(n){var i=n&&n.ownerDocument&&n.ownerDocument.defaultView;return i||zt}),$r=Mt(0,0,0,0);function kt(n){return parseFloat(n)||0}function Xr(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return i.reduce(function(a,c){var u=n["border-"+c+"-width"];return a+kt(u)},0)}function Xn(n){for(var i=["top","right","bottom","left"],o={},a=0,c=i;a<c.length;a++){var u=c[a],x=n["padding-"+u];o[u]=kt(x)}return o}function Jn(n){var i=n.getBBox();return Mt(0,0,i.width,i.height)}function Kn(n){var i=n.clientWidth,o=n.clientHeight;if(!i&&!o)return $r;var a=Ze(n).getComputedStyle(n),c=Xn(a),u=c.left+c.right,x=c.top+c.bottom,_=kt(a.width),b=kt(a.height);if(a.boxSizing==="border-box"&&(Math.round(_+u)!==i&&(_-=Xr(a,"left","right")+u),Math.round(b+x)!==o&&(b-=Xr(a,"top","bottom")+x)),!Zn(n)){var v=Math.round(_+u)-i,R=Math.round(b+x)-o;Math.abs(v)!==1&&(_-=v),Math.abs(R)!==1&&(b-=R)}return Mt(c.left,c.top,_,b)}var Qn=(function(){return typeof SVGGraphicsElement<"u"?function(n){return n instanceof Ze(n).SVGGraphicsElement}:function(n){return n instanceof Ze(n).SVGElement&&typeof n.getBBox=="function"}})();function Zn(n){return n===Ze(n).document.documentElement}function eo(n){return Kt?Qn(n)?Jn(n):Kn(n):$r}function to(n){var i=n.x,o=n.y,a=n.width,c=n.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,x=Object.create(u.prototype);return Ur(x,{x:i,y:o,width:a,height:c,top:o,right:i+a,bottom:c+o,left:i}),x}function Mt(n,i,o,a){return{x:n,y:i,width:o,height:a}}var ro=(function(){function n(i){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Mt(0,0,0,0),this.target=i}return n.prototype.isActive=function(){var i=eo(this.target);return this.contentRect_=i,i.width!==this.broadcastWidth||i.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var i=this.contentRect_;return this.broadcastWidth=i.width,this.broadcastHeight=i.height,i},n})(),no=(function(){function n(i,o){var a=to(o);Ur(this,{target:i,contentRect:a})}return n})(),oo=(function(){function n(i,o,a){if(this.activeObservations_=[],this.observations_=new Vr,typeof i!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=i,this.controller_=o,this.callbackCtx_=a}return n.prototype.observe=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(i instanceof Ze(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var o=this.observations_;o.has(i)||(o.set(i,new ro(i)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(i instanceof Ze(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var o=this.observations_;o.has(i)&&(o.delete(i),o.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var i=this;this.clearActive(),this.observations_.forEach(function(o){o.isActive()&&i.activeObservations_.push(o)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var i=this.callbackCtx_,o=this.activeObservations_.map(function(a){return new no(a.target,a.broadcastRect())});this.callback_.call(i,o,i),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n})(),Jr=typeof WeakMap<"u"?new WeakMap:new Vr,Kr=(function(){function n(i){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var o=$n.getInstance(),a=new oo(i,o,this);Jr.set(this,a)}return n})();["observe","unobserve","disconnect"].forEach(function(n){Kr.prototype[n]=function(){var i;return(i=Jr.get(this))[n].apply(i,arguments)}});var io=(function(){return typeof zt.ResizeObserver<"u"?zt.ResizeObserver:Kr})();const so=fn(Object.freeze(Object.defineProperty({__proto__:null,default:io},Symbol.toStringTag,{value:"Module"})));var Qr;function ao(){if(Qr)return Tt;Qr=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.default=k;var n=x(se),i=u(Ue()),o=u(so),a=u(_t());const c=["measureBeforeMount"];function u(y){return y&&y.__esModule?y:{default:y}}function x(y,d){if(typeof WeakMap=="function")var r=new WeakMap,t=new WeakMap;return(x=function(s,f){if(!f&&s&&s.__esModule)return s;var l,w,O={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return O;if(l=f?t:r){if(l.has(s))return l.get(s);l.set(s,O)}for(const D in s)D!=="default"&&{}.hasOwnProperty.call(s,D)&&((w=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,D))&&(w.get||w.set)?l(O,D,w):O[D]=s[D]);return O})(y,d)}function _(){return _=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var r=arguments[d];for(var t in r)({}).hasOwnProperty.call(r,t)&&(y[t]=r[t])}return y},_.apply(null,arguments)}function b(y,d){if(y==null)return{};var r,t,s=v(y,d);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(y);for(t=0;t<f.length;t++)r=f[t],d.indexOf(r)===-1&&{}.propertyIsEnumerable.call(y,r)&&(s[r]=y[r])}return s}function v(y,d){if(y==null)return{};var r={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)!==-1)continue;r[t]=y[t]}return r}function R(y,d,r){return(d=P(d))in y?Object.defineProperty(y,d,{value:r,enumerable:!0,configurable:!0,writable:!0}):y[d]=r,y}function P(y){var d=C(y,"string");return typeof d=="symbol"?d:d+""}function C(y,d){if(typeof y!="object"||!y)return y;var r=y[Symbol.toPrimitive];if(r!==void 0){var t=r.call(y,d);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}const L="react-grid-layout";function k(y){var d;return d=class extends n.Component{constructor(){super(...arguments),R(this,"state",{width:1280}),R(this,"elementRef",n.createRef()),R(this,"mounted",!1),R(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new o.default(s=>{if(this.elementRef.current instanceof HTMLElement){const l=s[0].contentRect.width;this.setState({width:l})}});const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.observe(t)}componentWillUnmount(){this.mounted=!1;const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.unobserve(t),this.resizeObserver.disconnect()}render(){const t=this.props,{measureBeforeMount:s}=t,f=b(t,c);return s&&!this.mounted?n.createElement("div",{className:(0,a.default)(this.props.className,L),style:this.props.style,ref:this.elementRef}):n.createElement(y,_({innerRef:this.elementRef},f,this.state))}},R(d,"defaultProps",{measureBeforeMount:!1}),R(d,"propTypes",{measureBeforeMount:i.default.bool}),d}return Tt}var Zr;function lo(){return Zr||(Zr=1,(function(n){n.exports=qr().default,n.exports.utils=Qe(),n.exports.calculateUtils=Bt(),n.exports.Responsive=Bn().default,n.exports.Responsive.utils=Yr(),n.exports.WidthProvider=ao().default})(Nt)),Nt.exports}var co=lo();const uo=dn(co);function en(n){const i=[];i.push(1,1,0,1,1,0,1,1);for(let o=0;o<n.length;o++){const c=(n.charCodeAt(o)%103).toString(2).padStart(7,"0");for(const u of c)i.push(u==="1"?1:0)}return i.push(1,1,0,0,0,1,1,0,0,0,1,1),i}const Qt=({value:n,format:i})=>{const o=se.useMemo(()=>en(n),[n,i]);if(!n)return e.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置条形码值"});const a=2,c=44,u=o.length*a;return e.jsxs("div",{style:{textAlign:"center",overflow:"hidden",maxWidth:"100%"},children:[e.jsx("canvas",{ref:x=>{if(!x)return;const _=x.getContext("2d");_&&(x.width=u,x.height=c,_.clearRect(0,0,u,c),o.forEach((b,v)=>{_.fillStyle=b===1?"#000":"#fff",_.fillRect(v*a,0,a,c)}))},style:{width:"100%",maxWidth:u,height:c}}),e.jsx("div",{style:{fontSize:10,marginTop:1,letterSpacing:1},children:n})]})},Zt=({value:n,errorLevel:i="M",color:o="#000000",backgroundColor:a="#ffffff"})=>n?e.jsx(E.QRCode,{value:n,type:"svg",bordered:!1,errorLevel:i,color:o,bgColor:a,style:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%"}}):e.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置二维码内容"}),fo=uo,tn=se.memo(({comp:n,selected:i,isPreview:o=!1,dataSources:a=[]})=>{const c={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",outline:o?"none":i?"2px solid #1677ff":"1px dashed #d9d9d9",outlineOffset:-1},u=x=>Ke(n,x,a);switch(n.type){case"text":return e.jsx("div",{style:{...c,fontSize:n.props.fontSize||14,fontWeight:n.props.fontWeight||"normal",fontStyle:n.props.fontStyle||"normal",textAlign:n.props.textAlign||"left",color:n.props.color||"#000",backgroundColor:n.props.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:wt(u("content")||"",n.props.format)});case"image":const x=u("src")||n.props.src;return e.jsx("div",{style:c,children:x?e.jsx("img",{src:x,style:{width:"100%",height:"100%",objectFit:n.props.fit||"contain"},alt:""}):e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#bbb",fontSize:12},children:"请在属性中设置图片地址"})});case"table":return e.jsx(po,{comp:n,style:c,dataSources:a});case"barcode":const _=u("value")||n.props.value||"123456";return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Qt,{value:_,format:n.props.format||"CODE128"})});case"qrcode":const b=u("value")||n.props.value||"https://example.com";return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Zt,{value:b,errorLevel:n.props.errorLevel||"M",color:n.props.color||"#000000",backgroundColor:n.props.backgroundColor||"#ffffff"})});case"line":return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",border:"none",outline:i?"2px solid #1677ff":"1px dashed transparent"},children:e.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${n.props.thickness||1}px ${n.props.style||"solid"} ${n.props.color||"#000"}`,margin:0}})});default:return e.jsx("div",{style:c,children:n.type})}}),po=({comp:n,style:i,dataSources:o=[]})=>{const a=n.props.borderWidth||1,c=n.props.borderColor||"#000",u=n.props.headerBackgroundColor||"#f5f5f5",x=n.props.headerColor||"#000000",_=n.props.headerFontSize||12,b=n.tableColumns||[],v=n.props.tableDataSourceId,R=v?o.find(k=>k.id===v):null,P=R?Ct(R):null;if(P&&P.length>0)return e.jsxs("table",{style:{...i,borderCollapse:"collapse",width:"100%",height:"100%"},children:[b.length>0&&e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:u},children:b.map((k,y)=>e.jsx("th",{style:{border:`${a}px solid ${c}`,padding:4,fontSize:_,fontWeight:"bold",textAlign:"center",color:x},children:k.title},y))})}),e.jsx("tbody",{children:P.map((k,y)=>e.jsx("tr",{children:b.map((d,r)=>e.jsx("td",{style:{border:`${a}px solid ${c}`,padding:4,fontSize:12,textAlign:"center"},children:d.fieldPath?k[d.fieldPath]:""},r))},y))})]});const C=n.props.rows||3,L=Math.max(n.props.cols||3,b.length||3);return e.jsx("table",{style:{...i,borderCollapse:"collapse",width:"100%",height:"100%"},children:e.jsx("tbody",{children:Array.from({length:C}).map((k,y)=>e.jsx("tr",{children:Array.from({length:L}).map((d,r)=>e.jsx("td",{style:{border:`${a}px solid ${c}`,padding:2,fontSize:12,textAlign:"center"},children:" "},r))},y))})})},rn=({isPreview:n=!1,dataSources:i})=>{const o=pe(s=>s.components),a=pe(s=>s.selectedId),c=pe(s=>s.pageSettings),u=pe(s=>s.selectComponent);pe(s=>s.updateComponent);const x=pe(s=>s.setComponents),_=pe(s=>s.addComponent),b=pe(s=>s.gridSettings),v=pe(s=>s.dataSources),R=i||v,P=se.useMemo(()=>{const s=bt[c.paperSize];if(!s)return{width:c.customWidth*De,height:c.customHeight*De};const f=s.width*De,l=s.height*De;return c.orientation==="landscape"?{width:l,height:f}:{width:f,height:l}},[c]),C=se.useMemo(()=>({top:c.marginTop*De,right:c.marginRight*De,bottom:c.marginBottom*De,left:c.marginLeft*De}),[c]),L=P.width-C.left-C.right,k=P.height-C.top-C.bottom,y=se.useMemo(()=>o.map(s=>({i:s.id,x:s.x,y:s.y,w:s.w,h:s.h})),[o]),d=se.useCallback(s=>{const f=o.map((l,w)=>{const O=s[w];return O?{...l,x:O.x,y:O.y,w:O.w,h:O.h}:l});x(f)},[o,x]),r=se.useCallback((s,f,l)=>{var M,H;const w=l,O=(M=w.dataTransfer)==null?void 0:M.getData("componentType");if(!O)return;const D=(H=l.target.closest(".react-grid-layout"))==null?void 0:H.getBoundingClientRect();if(D){const T=Math.floor((w.clientX-D.left)/(L/b.cols)),N=Math.floor((w.clientY-D.top)/(L/b.cols));_(O,Math.max(0,T),Math.max(0,N))}else _(O)},[_,L,b.cols]),t=se.useCallback(s=>{u(s===a?null:s)},[u,a]);return e.jsx("div",{style:{flex:1,overflow:"auto",background:"#e8e8e8",display:"flex",justifyContent:"center",padding:"24px 0"},children:e.jsxs("div",{id:"print-paper",style:{width:P.width,height:P.height,background:"#fff",boxShadow:"0 2px 12px rgba(0,0,0,0.15)",position:"relative",flexShrink:0},children:[c.showHeader&&e.jsx("div",{style:{position:"absolute",top:0,left:C.left,right:C.right,height:C.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#999",borderBottom:"1px dashed #ddd",overflow:"hidden"},children:c.headerContent}),c.showFooter&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:C.left,right:C.right,height:C.bottom,display:"flex",alignItems:"center",justifyContent:c.showPageNumber?"space-between":"center",fontSize:12,color:"#999",borderTop:"1px dashed #ddd",overflow:"hidden",padding:"0 8px"},children:[e.jsx("span",{children:c.footerContent}),c.showPageNumber&&e.jsx("span",{children:c.pageNumberFormat.replace("{page}","1")})]}),e.jsx("div",{style:{position:"absolute",top:C.top,left:C.left,width:L,height:k},children:n?e.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:o.map(s=>{const f=L/b.cols,l=L/b.cols,w={position:"absolute",left:s.x*f,top:s.y*l,width:s.w*f,height:s.h*l};return e.jsx("div",{style:w,children:e.jsx(tn,{comp:s,selected:!1,isPreview:!0,dataSources:R})},s.id)})}):e.jsx(fo,{className:"canvas-grid",layout:y,cols:b.cols,rowHeight:L/b.cols,width:L,margin:[0,0],containerPadding:[0,0],onLayoutChange:d,onDrop:r,isDroppable:!0,isResizable:!0,isDraggable:!0,compactType:null,preventCollision:!0,draggableHandle:".grid-item-drag-handle",style:{minHeight:k},children:o.map(s=>e.jsx("div",{className:"grid-item-drag-handle",onClick:()=>t(s.id),style:{cursor:"move"},children:e.jsx(tn,{comp:s,selected:s.id===a,dataSources:R})},s.id))})})]})})},{Text:je,Title:Do}=E.Typography,{TextArea:ho}=E.Input,go=()=>{const n=pe(r=>r.components),i=pe(r=>r.selectedId),o=pe(r=>r.dataSources),a=pe(r=>r.updateComponent),c=pe(r=>r.updateComponentTableColumns),u=se.useMemo(()=>n.find(r=>r.id===i)||null,[n,i]),[x,_]=se.useState([]),b=se.useMemo(()=>[{label:"无(使用静态值)",value:""},...o.map(r=>({label:r.name,value:r.id,type:r.type}))],[o]),v=se.useCallback((r,t)=>{i&&a(i,{props:{...u==null?void 0:u.props,[r]:t}})},[i,u,a]),R=se.useCallback((r,t,s,f)=>{if(!i)return;let l=f;t&&s&&(l=f);const w=`${r}Binding`;a(i,{props:{...u==null?void 0:u.props,[r]:l,[w]:{dataSourceId:t,fieldPath:s,staticValue:f}}})},[i,u,a]),P=se.useCallback(r=>{const t=u==null?void 0:u.props[`${r}Binding`],s=String((u==null?void 0:u.props[r])||"");return t?{field:r,dataSourceId:t.dataSourceId||null,fieldPath:t.fieldPath||"",staticValue:t.staticValue??s}:{field:r,dataSourceId:null,fieldPath:"",staticValue:s}},[u]);if(!u)return e.jsx(E.Card,{title:"属性面板",size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16}},children:e.jsx(E.Empty,{description:"请选择画布中的组件",image:E.Empty.PRESENTED_IMAGE_SIMPLE})});const C=lr[u.type]||u.type,L=e.jsxs(e.Fragment,{children:[e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"位置和大小"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"X"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.x,onChange:r=>a(i,{x:r??0})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"Y"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.y,onChange:r=>a(i,{y:r??0})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"宽度"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.w,min:1,onChange:r=>a(i,{w:r??1})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"高度"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.h,min:1,onChange:r=>a(i,{h:r??1})})]})]})]}),k=({field:r,label:t,placeholder:s,isTextarea:f=!1})=>{const l=P(r),w=o.find(T=>T.id===l.dataSourceId),O=w?jt(w):null,D=O?Object.keys(O):[],[M,H]=se.useState(l.staticValue);return se.useEffect(()=>{H(l.staticValue)},[l.staticValue,l.dataSourceId]),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12,display:"block",marginBottom:4},children:t}),e.jsx("div",{style:{marginBottom:4},children:e.jsx(E.Select,{size:"small",style:{width:"100%"},placeholder:"选择数据源",value:l.dataSourceId||"",onChange:T=>{R(r,T||null,T&&l.fieldPath||"",l.staticValue)},options:b})}),l.dataSourceId&&e.jsx("div",{style:{marginBottom:4},children:e.jsx(E.Select,{size:"small",style:{width:"100%"},placeholder:"选择字段",value:l.fieldPath,onChange:T=>{R(r,l.dataSourceId,T||"",l.staticValue)},options:[{label:"请选择字段",value:""},...D.map(T=>({label:T,value:T}))]})}),l.dataSourceId?e.jsxs("div",{style:{padding:6,background:"#f0f5ff",border:"1px solid #adc6ff",borderRadius:4,fontSize:12},children:[e.jsx(Oe.DatabaseOutlined,{style:{marginRight:4,color:"#1890ff"}}),e.jsx("span",{style:{fontWeight:500},children:"数据绑定已启用"}),w&&l.fieldPath&&e.jsxs("span",{style:{marginLeft:8},children:[e.jsx(E.Tag,{color:"blue",children:w.name}),e.jsx(E.Tag,{color:"green",children:l.fieldPath})]})]}):f?e.jsx(ho,{rows:3,placeholder:s,value:M,onChange:T=>H(T.target.value),onBlur:()=>{R(r,null,"",M)}}):e.jsx(E.Input,{placeholder:s,value:M,onChange:T=>H(T.target.value),onBlur:()=>{R(r,null,"",M)}})]})},y=()=>{const r=u.tableColumns||[],t=o.filter(V=>V.type==="array"),s=u.props.tableDataSourceId||"",f=t.find(V=>V.id===s),l=x.length>0?x:r,[w,O]=se.useState({}),D=()=>{c(i,l)},M=()=>{const V=[...l,{title:`列${l.length+1}`}];_(V)},H=V=>{const J=l.filter((K,re)=>re!==V);_(J)},T=(V,J,K)=>{const re=[...l];re[V]={...re[V],[J]:K},_(re)};let N=[];if(f){const V=at(f.data);Array.isArray(V)&&V.length>0&&typeof V[0]=="object"&&(N=Object.keys(V[0]))}const G=[{title:"列标题",dataIndex:"title",width:100,render:(V,J)=>{const K=J.key in w?w[J.key]:J.title;return e.jsx(E.Input,{size:"small",value:K,placeholder:"列标题",onChange:re=>{O({...w,[J.key]:re.target.value})},onBlur:()=>{if(J.key in w){T(Number(J.key),"title",w[J.key]);const re={...w};delete re[J.key],O(re),D()}}})}},{title:"绑定字段",dataIndex:"fieldPath",width:120,render:(V,J)=>e.jsx(E.Select,{size:"small",style:{width:"100%"},value:J.fieldPath||"",placeholder:f?"绑定字段":"选择数据源先",disabled:!f,onChange:K=>{T(Number(J.key),"fieldPath",K||""),D()},options:[{label:"无绑定",value:""},...N.map(K=>({label:K,value:K}))]})},{title:"操作",width:60,render:(V,J)=>e.jsx(E.Popconfirm,{title:"确定要删除吗?",onConfirm:()=>{H(Number(J.key)),D()},okText:"确定",cancelText:"取消",children:e.jsx(E.Button,{type:"text",danger:!0,size:"small",icon:e.jsx(Oe.DeleteOutlined,{})})})}],X=l.map((V,J)=>({...V,key:String(J)}));return e.jsxs("div",{children:[e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:e.jsx(je,{style:{fontSize:12},children:"表格数据源"})}),e.jsx(E.Select,{size:"small",style:{width:"100%",marginBottom:8},placeholder:"选择数组类型数据源",value:s,onChange:V=>v("tableDataSourceId",V||""),options:[{label:"无(仅静态展示)",value:""},...t.map(V=>({label:V.name,value:V.id}))]}),e.jsx(E.Divider,{}),e.jsxs(E.Space,{style:{marginBottom:8},children:[e.jsx(je,{style:{fontSize:12},children:"列配置"}),e.jsx(E.Button,{size:"small",type:"dashed",icon:e.jsx(Oe.PlusOutlined,{}),onClick:M}),e.jsx(E.Button,{size:"small",type:"primary",onClick:D,icon:e.jsx(Oe.SaveOutlined,{})})]}),e.jsx(E.Table,{dataSource:X,columns:G,pagination:!1,size:"small",style:{width:"280px"},bordered:!0,rowKey:"key"})]})},d=()=>{switch(u.type){case"text":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"content",label:"内容",placeholder:"请输入文本内容",isTextarea:!0}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),e.jsx(E.Input,{size:"small",placeholder:"例如 yyyyMMdd 或 yyyy-MM-dd HH:mm:ss",value:u.props.format||"",onChange:r=>v("format",r.target.value)}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"文字样式"}),e.jsxs(E.Space,{style:{width:"100%"},direction:"vertical",size:4,children:[e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"字号"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.props.fontSize||14,min:6,max:200,onChange:r=>v("fontSize",r??14)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"对齐"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.textAlign||"left",onChange:r=>v("textAlign",r),options:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}]})]})]}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"字重"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fontWeight||"normal",onChange:r=>v("fontWeight",r),options:[{value:"normal",label:"常规"},{value:"bold",label:"加粗"}]})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"样式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fontStyle||"normal",onChange:r=>v("fontStyle",r),options:[{value:"normal",label:"常规"},{value:"italic",label:"斜体"}]})]})]}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"字体颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)}),e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.backgroundColor||"transparent",onChange:(r,t)=>v("backgroundColor",t)})]})]})]});case"image":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"src",label:"图片地址",placeholder:"输入图片 URL"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"适应方式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fit||"contain",onChange:r=>v("fit",r),options:[{value:"contain",label:"适应"},{value:"cover",label:"填充"},{value:"fill",label:"拉伸"}]})]});case"table":return e.jsxs(e.Fragment,{children:[e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"边框样式"}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"粗细"}),e.jsx(E.InputNumber,{size:"small",value:u.props.borderWidth||1,min:0,max:20,onChange:r=>v("borderWidth",r??1)}),e.jsx(je,{style:{fontSize:12},children:"颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.borderColor||"#000000",onChange:(r,t)=>v("borderColor",t)})]}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"列标题样式"}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"字号"}),e.jsx(E.InputNumber,{size:"small",value:u.props.headerFontSize||12,min:6,max:200,onChange:r=>v("headerFontSize",r??12)})]}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.headerBackgroundColor||"#f5f5f5",onChange:(r,t)=>v("headerBackgroundColor",t)}),e.jsx(je,{style:{fontSize:12},children:"字体颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.headerColor||"#000000",onChange:(r,t)=>v("headerColor",t)})]}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(y,{})]});case"barcode":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"value",label:"条码值",placeholder:"输入条码内容"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.format||"CODE128",onChange:r=>v("format",r),options:[{value:"CODE128",label:"CODE128"}]})]});case"qrcode":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"value",label:"二维码内容",placeholder:"输入二维码内容"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"纠错级别"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.errorLevel||"M",onChange:r=>v("errorLevel",r),options:[{value:"L",label:"L - 低"},{value:"M",label:"M - 中"},{value:"Q",label:"Q - 较高"},{value:"H",label:"H - 高"}]}),e.jsxs("div",{style:{display:"flex",gap:16,marginTop:8},children:[e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"前景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.backgroundColor||"#ffffff",onChange:(r,t)=>v("backgroundColor",t)})]})]})]});case"line":return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"粗细"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.props.thickness||1,min:1,max:20,onChange:r=>v("thickness",r??1)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"样式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.style||"solid",onChange:r=>v("style",r),options:[{value:"solid",label:"实线"},{value:"dashed",label:"虚线"},{value:"dotted",label:"点线"}]})]})]}),e.jsxs("div",{style:{marginTop:8},children:[e.jsx(je,{style:{fontSize:12},children:"颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)})]})]});default:return null}};return e.jsx(E.Card,{title:`属性 - ${C}`,size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16,overflowY:"auto"}},children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[L,e.jsx(E.Divider,{style:{margin:"4px 0"}}),d()]})})},{Text:To}=E.Typography,yo=({dataSources:n})=>{const i=pe(r=>r.previewVisible),o=pe(r=>r.setPreviewVisible),a=pe(r=>r.components),c=pe(r=>r.pageSettings),u=pe(r=>r.gridSettings)||xt,x=pe(r=>r.dataSources),_=n||x,b=se.useRef(null),v=se.useMemo(()=>{const r=bt[c.paperSize];if(!r)return{width:c.customWidth*De,height:c.customHeight*De};const t=r.width*De,s=r.height*De;return c.orientation==="landscape"?{width:s,height:t}:{width:t,height:s}},[c]),R=se.useMemo(()=>({top:c.marginTop*De,right:c.marginRight*De,bottom:c.marginBottom*De,left:c.marginLeft*De}),[c]),P=v.width-R.left-R.right,C=P/u.cols,L=nr.useReactToPrint({contentRef:b,documentTitle:"打印模板",pageStyle:`
52
52
  @page {
53
- size: ${O.width/Ee}mm ${O.height/Ee}mm;
54
- margin: ${o.marginTop}mm ${o.marginRight}mm ${o.marginBottom}mm ${o.marginLeft}mm;
53
+ size: ${v.width/De}mm ${v.height/De}mm;
54
+ margin: ${c.marginTop}mm ${c.marginRight}mm ${c.marginBottom}mm ${c.marginLeft}mm;
55
55
  }
56
56
  @media print {
57
57
  html, body { margin: 0; padding: 0; }
58
58
  }
59
- `}),_=(p,l)=>{const e=p.props[`${l}Binding`];if(e&&e.dataSourceId&&e.fieldPath){const t=u.find(c=>c.id===e.dataSourceId);if(t&&t.type==="object"){const c=St(t);if(c){const f=wt(c,e.fieldPath);if(f!=="")return f}}}return(e==null?void 0:e.staticValue)??String(p.props[l]||"")},A=p=>{const l=p.props.tableDataSourceId,e=l?u.find(j=>j.id===l):null,t=e?jt(e):null,c=p.tableColumns||[],f=p.props.borderWidth||1,i=p.props.borderColor||"#000000",b=t||Array.from({length:p.props.rows||3}).map(()=>({}));return s.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[s.jsx("thead",{children:s.jsx("tr",{children:c.map((j,P)=>s.jsx("th",{style:{border:`${f}px solid ${i}`,padding:4,textAlign:"center",fontSize:12,fontWeight:"bold",backgroundColor:"#f5f5f5"},children:j.title||`列${P+1}`},P))})}),s.jsx("tbody",{children:b.map((j,P)=>s.jsx("tr",{children:c.map((z,N)=>s.jsx("td",{style:{border:`${f}px solid ${i}`,padding:4,textAlign:"center",fontSize:12},children:z.fieldPath?wt(j,z.fieldPath):""},N))},P))})]})},T=p=>{const l=p.props,e={position:"absolute",left:p.x*C,top:p.y*C,width:p.w*C,height:p.h*C,overflow:"hidden"},t={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(p.type){case"text":return s.jsx("div",{style:e,children:s.jsx("div",{style:{...t,fontSize:l.fontSize||14,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",textAlign:l.textAlign||"left",color:l.color||"#000",backgroundColor:l.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:_(p,"content")})},p.id);case"image":return s.jsx("div",{style:e,children:s.jsx("div",{style:t,children:l.src?s.jsx("img",{src:_(p,"src"),style:{width:"100%",height:"100%",objectFit:l.fit||"contain"},alt:""}):null})},p.id);case"table":return s.jsx("div",{style:e,children:A(p)},p.id);case"barcode":return s.jsx("div",{style:e,children:s.jsx("div",{style:{...t,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:s.jsx(Kt,{value:_(p,"value"),format:l.format||"CODE128"})})},p.id);case"line":return s.jsx("div",{style:e,children:s.jsx("div",{style:{...t,display:"flex",alignItems:"center",border:"none"},children:s.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${l.thickness||1}px ${l.style||"solid"} ${l.color||"#000"}`,margin:0}})})},p.id);default:return null}};return s.jsxs(k.Modal,{title:"打印预览",open:r,onCancel:()=>n(!1),width:O.width+80,footer:s.jsxs(k.Space,{children:[s.jsx(k.Button,{onClick:()=>n(!1),children:"关闭"}),s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.PrinterOutlined,{}),onClick:()=>E(),children:"打印"})]}),styles:{body:{padding:16,display:"flex",flexDirection:"column",alignItems:"center"}},children:[s.jsx(k.Divider,{style:{margin:"4px 0 12px 0"}}),s.jsxs("div",{ref:x,style:{width:O.width,height:O.height,background:"#fff",border:"1px solid #d9d9d9",position:"relative",overflow:"hidden",flexShrink:0},children:[o.showHeader&&s.jsx("div",{style:{position:"absolute",top:0,left:y.left,right:y.right,height:y.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:o.headerContent}),o.showFooter&&s.jsxs("div",{style:{position:"absolute",bottom:0,left:y.left,right:y.right,height:y.bottom,display:"flex",alignItems:"center",justifyContent:o.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[s.jsx("span",{children:o.footerContent}),o.showPageNumber&&s.jsx("span",{children:o.pageNumberFormat.replace("{page}","1")})]}),s.jsx("div",{style:{position:"absolute",top:y.top,left:y.left,width:R,height:O.height-y.top-y.bottom},children:a.map(T)})]})]})},po=()=>{const r=fe(h=>h.headerFooterVisible),n=fe(h=>h.pageSettings),a=fe(h=>h.setPageSettings),o=fe(h=>h.setHeaderFooterVisible);return s.jsx(k.Modal,{title:"页眉页脚设置",open:r,onCancel:()=>o(!1),onOk:()=>o(!1),width:480,children:s.jsxs(k.Form,{layout:"vertical",style:{marginTop:8},children:[s.jsx(k.Form.Item,{label:"显示页眉",children:s.jsx(k.Switch,{checked:n.showHeader,onChange:h=>a({showHeader:h})})}),n.showHeader&&s.jsx(k.Form.Item,{label:"页眉内容",children:s.jsx(k.Input,{value:n.headerContent,onChange:h=>a({headerContent:h.target.value})})}),s.jsx(k.Form.Item,{label:"显示页脚",children:s.jsx(k.Switch,{checked:n.showFooter,onChange:h=>a({showFooter:h})})}),n.showFooter&&s.jsxs(s.Fragment,{children:[s.jsx(k.Form.Item,{label:"页脚内容",children:s.jsx(k.Input,{value:n.footerContent,onChange:h=>a({footerContent:h.target.value})})}),s.jsx(k.Form.Item,{label:"显示页码",children:s.jsx(k.Switch,{checked:n.showPageNumber,onChange:h=>a({showPageNumber:h})})}),n.showPageNumber&&s.jsx(k.Form.Item,{label:"页码格式",children:s.jsx(k.Input,{value:n.pageNumberFormat,onChange:h=>a({pageNumberFormat:h.target.value}),placeholder:"第 {page} 页"})})]})]})})},tn=({isPreview:r=!1,initialTemplateData:n,onSave:a,onPrint:o})=>{const{importJSON:h,exportJSON:u,reset:x,components:O,pageSettings:y,gridSettings:R,dataSources:C}=fe(),E=oe.useRef(null);oe.useEffect(()=>{if(n){const i=JSON.stringify(n),b=h(i);b&&(console.error("导入失败:",b),x())}},[n,h,x]);const _=()=>{if(a)try{const i=u();a(JSON.parse(i))}catch(i){console.error("导出失败:",i)}},A=oe.useMemo(()=>{const i=bt[y.paperSize];if(!i)return{width:y.customWidth*Ee,height:y.customHeight*Ee};const b=i.width*Ee,j=i.height*Ee;return y.orientation==="landscape"?{width:j,height:b}:{width:b,height:j}},[y]),T=oe.useMemo(()=>({top:y.marginTop*Ee,right:y.marginRight*Ee,bottom:y.marginBottom*Ee,left:y.marginLeft*Ee}),[y]),p=A.width-T.left-T.right,l=p/((R==null?void 0:R.cols)||xt.cols),e=tr.useReactToPrint({contentRef:E,documentTitle:"打印模板",pageStyle:`
59
+ `}),k=(r,t)=>{const s=r.props[`${t}Binding`];if(s&&s.dataSourceId&&s.fieldPath){const f=_.find(l=>l.id===s.dataSourceId);if(f&&f.type==="object"){const l=jt(f);if(l){const w=St(l,s.fieldPath);if(w!=="")return w}}}return(s==null?void 0:s.staticValue)??String(r.props[t]||"")},y=r=>{const t=r.props.tableDataSourceId,s=t?_.find(N=>N.id===t):null,f=s?Ct(s):null,l=r.tableColumns||[],w=r.props.borderWidth||1,O=r.props.borderColor||"#000000",D=r.props.headerBackgroundColor||"#f5f5f5",M=r.props.headerColor||"#000000",H=r.props.headerFontSize||12,T=f||Array.from({length:r.props.rows||3}).map(()=>({}));return e.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsx("tr",{children:l.map((N,G)=>e.jsx("th",{style:{border:`${w}px solid ${O}`,padding:4,textAlign:"center",fontSize:H,fontWeight:"bold",backgroundColor:D,color:M},children:N.title||`列${G+1}`},G))})}),e.jsx("tbody",{children:T.map((N,G)=>e.jsx("tr",{children:l.map((X,V)=>e.jsx("td",{style:{border:`${w}px solid ${O}`,padding:4,textAlign:"center",fontSize:12},children:X.fieldPath?St(N,X.fieldPath):""},V))},G))})]})},d=r=>{const t=r.props,s={position:"absolute",left:r.x*C,top:r.y*C,width:r.w*C,height:r.h*C,overflow:"hidden"},f={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(r.type){case"text":return e.jsx("div",{style:s,children:e.jsx("div",{style:{...f,fontSize:t.fontSize||14,fontWeight:t.fontWeight||"normal",fontStyle:t.fontStyle||"normal",textAlign:t.textAlign||"left",color:t.color||"#000",backgroundColor:t.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:wt(k(r,"content"),t.format)})},r.id);case"image":return e.jsx("div",{style:s,children:e.jsx("div",{style:f,children:t.src?e.jsx("img",{src:k(r,"src"),style:{width:"100%",height:"100%",objectFit:t.fit||"contain"},alt:""}):null})},r.id);case"table":return e.jsx("div",{style:s,children:y(r)},r.id);case"barcode":return e.jsx("div",{style:s,children:e.jsx("div",{style:{...f,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Qt,{value:k(r,"value"),format:t.format||"CODE128"})})},r.id);case"qrcode":return e.jsx("div",{style:s,children:e.jsx("div",{style:{...f,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Zt,{value:k(r,"value"),errorLevel:t.errorLevel||"M",color:t.color||"#000000",backgroundColor:t.backgroundColor||"#ffffff"})})},r.id);case"line":return e.jsx("div",{style:s,children:e.jsx("div",{style:{...f,display:"flex",alignItems:"center",border:"none"},children:e.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${t.thickness||1}px ${t.style||"solid"} ${t.color||"#000"}`,margin:0}})})},r.id);default:return null}};return e.jsxs(E.Modal,{title:"打印预览",open:i,onCancel:()=>o(!1),width:v.width+80,footer:e.jsxs(E.Space,{children:[e.jsx(E.Button,{onClick:()=>o(!1),children:"关闭"}),e.jsx(E.Button,{type:"primary",icon:e.jsx(Oe.PrinterOutlined,{}),onClick:()=>L(),children:"打印"})]}),styles:{body:{padding:16,display:"flex",flexDirection:"column",alignItems:"center"}},children:[e.jsx(E.Divider,{style:{margin:"4px 0 12px 0"}}),e.jsxs("div",{ref:b,style:{width:v.width,height:v.height,background:"#fff",border:"1px solid #d9d9d9",position:"relative",overflow:"hidden",flexShrink:0},children:[c.showHeader&&e.jsx("div",{style:{position:"absolute",top:0,left:R.left,right:R.right,height:R.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:c.headerContent}),c.showFooter&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:R.left,right:R.right,height:R.bottom,display:"flex",alignItems:"center",justifyContent:c.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[e.jsx("span",{children:c.footerContent}),c.showPageNumber&&e.jsx("span",{children:c.pageNumberFormat.replace("{page}","1")})]}),e.jsx("div",{style:{position:"absolute",top:R.top,left:R.left,width:P,height:v.height-R.top-R.bottom},children:a.map(d)})]})]})},mo=()=>{const n=pe(c=>c.headerFooterVisible),i=pe(c=>c.pageSettings),o=pe(c=>c.setPageSettings),a=pe(c=>c.setHeaderFooterVisible);return e.jsx(E.Modal,{title:"页眉页脚设置",open:n,onCancel:()=>a(!1),onOk:()=>a(!1),width:480,children:e.jsxs(E.Form,{layout:"vertical",style:{marginTop:8},children:[e.jsx(E.Form.Item,{label:"显示页眉",children:e.jsx(E.Switch,{checked:i.showHeader,onChange:c=>o({showHeader:c})})}),i.showHeader&&e.jsx(E.Form.Item,{label:"页眉内容",children:e.jsx(E.Input,{value:i.headerContent,onChange:c=>o({headerContent:c.target.value})})}),e.jsx(E.Form.Item,{label:"显示页脚",children:e.jsx(E.Switch,{checked:i.showFooter,onChange:c=>o({showFooter:c})})}),i.showFooter&&e.jsxs(e.Fragment,{children:[e.jsx(E.Form.Item,{label:"页脚内容",children:e.jsx(E.Input,{value:i.footerContent,onChange:c=>o({footerContent:c.target.value})})}),e.jsx(E.Form.Item,{label:"显示页码",children:e.jsx(E.Switch,{checked:i.showPageNumber,onChange:c=>o({showPageNumber:c})})}),i.showPageNumber&&e.jsx(E.Form.Item,{label:"页码格式",children:e.jsx(E.Input,{value:i.pageNumberFormat,onChange:c=>o({pageNumberFormat:c.target.value}),placeholder:"第 {page} 页"})})]})]})})},nn=({isPreview:n=!1,initialTemplateData:i,dataSource:o,onSave:a,onPrint:c})=>{const{importJSON:u,exportJSON:x,reset:_,components:b,pageSettings:v,gridSettings:R,dataSources:P}=pe(),C=se.useRef(null),[L,k]=se.useState(!1),[y,d]=se.useState(!1);se.useEffect(()=>{if(i){const T=JSON.stringify(i),N=u(T);N&&(console.error("导入失败:",N),_())}},[i,u,_]);const r=()=>{if(a)try{const T=x();a(JSON.parse(T))}catch(T){console.error("导出失败:",T)}},t=se.useMemo(()=>{const T=bt[v.paperSize];if(!T)return{width:v.customWidth*De,height:v.customHeight*De};const N=T.width*De,G=T.height*De;return v.orientation==="landscape"?{width:G,height:N}:{width:N,height:G}},[v]),s=se.useMemo(()=>({top:v.marginTop*De,right:v.marginRight*De,bottom:v.marginBottom*De,left:v.marginLeft*De}),[v]),f=t.width-s.left-s.right,l=f/((R==null?void 0:R.cols)||xt.cols),w=se.useMemo(()=>{if(!o)return P;const T=o.data&&typeof o.data=="object",N=Array.isArray(o.list),G=T?JSON.stringify(o.data):null,X=N?JSON.stringify(o.list):null;let V=!1,J=!1;const K=P.map(re=>re.type==="object"&&G!==null?(V=!0,{...re,data:G}):re.type==="array"&&X!==null?(J=!0,{...re,data:X}):re);return G!==null&&!V&&K.push({id:"external_data",name:"外部对象数据",type:"object",data:G,createdAt:0}),X!==null&&!J&&K.push({id:"external_list",name:"外部列表数据",type:"array",data:X,createdAt:0}),K},[o,P]),O=nr.useReactToPrint({contentRef:C,documentTitle:"打印模板",pageStyle:`
60
60
  @page {
61
- size: ${A.width/Ee}mm ${A.height/Ee}mm;
62
- margin: ${y.marginTop}mm ${y.marginRight}mm ${y.marginBottom}mm ${y.marginLeft}mm;
61
+ size: ${t.width/De}mm ${t.height/De}mm;
62
+ margin: ${v.marginTop}mm ${v.marginRight}mm ${v.marginBottom}mm ${v.marginLeft}mm;
63
63
  }
64
64
  @media print {
65
65
  html, body { margin: 0; padding: 0; }
66
66
  }
67
- `}),t=()=>{o?o():e()},c=i=>{const b=i.props,j={position:"absolute",left:i.x*l,top:i.y*l,width:i.w*l,height:i.h*l,overflow:"hidden"},P={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(i.type){case"text":return s.jsx("div",{style:j,children:s.jsx("div",{style:{...P,fontSize:b.fontSize||14,fontWeight:b.fontWeight||"normal",fontStyle:b.fontStyle||"normal",textAlign:b.textAlign||"left",color:b.color||"#000",backgroundColor:b.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:at(i,"content",C)})},i.id);case"image":return s.jsx("div",{style:j,children:s.jsx("div",{style:P,children:b.src?s.jsx("img",{src:at(i,"src",C),style:{width:"100%",height:"100%",objectFit:b.fit||"contain"},alt:""}):null})},i.id);case"table":return s.jsx("div",{style:j,children:f(i)},i.id);case"barcode":return s.jsx("div",{style:j,children:s.jsx("div",{style:{...P,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:s.jsx(Kt,{value:at(i,"value",C),format:b.format||"CODE128"})})},i.id);case"line":return s.jsx("div",{style:j,children:s.jsx("div",{style:{...P,display:"flex",alignItems:"center",border:"none"},children:s.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${b.thickness||1}px ${b.style||"solid"} ${b.color||"#000"}`,margin:0}})})},i.id);default:return null}},f=i=>{const b=i.props.tableDataSourceId,j=b?C.find(Q=>Q.id===b):null,P=j?jt(j):null,z=i.tableColumns||[],N=i.props.borderWidth||1,F=i.props.borderColor||"#000000";if(P&&P.length>0)return s.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[z.length>0&&s.jsx("thead",{children:s.jsx("tr",{style:{backgroundColor:"#f5f5f5"},children:z.map((Q,V)=>s.jsx("th",{style:{border:`${N}px solid ${F}`,padding:4,fontSize:12,fontWeight:"bold",textAlign:"center"},children:Q.title},V))})}),s.jsx("tbody",{children:P.map((Q,V)=>s.jsx("tr",{children:z.map((X,J)=>s.jsx("td",{style:{border:`${N}px solid ${F}`,padding:4,fontSize:12,textAlign:"center"},children:X.fieldPath?Q[X.fieldPath]:""},J))},V))})]});const Z=i.props.rows||3,K=Math.max(i.props.cols||3,z.length||3);return s.jsx("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:s.jsx("tbody",{children:Array.from({length:Z}).map((Q,V)=>s.jsx("tr",{children:Array.from({length:K}).map((X,J)=>s.jsx("td",{style:{border:`${N}px solid ${F}`,padding:2,fontSize:12,textAlign:"center"},children:" "},J))},V))})})};return r?s.jsx(k.App,{children:s.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[s.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:s.jsx(k.Space,{children:s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.PrinterOutlined,{}),onClick:t,children:"打印"})})}),s.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"flex-start",padding:"16px",boxSizing:"border-box",overflowY:"auto",background:"#e8e8e8"},children:s.jsx("div",{style:{flexShrink:0},children:s.jsx(en,{isPreview:!0})})}),s.jsx("div",{style:{position:"absolute",left:"-9999px",top:"-9999px"},children:s.jsxs("div",{ref:E,style:{width:A.width,height:A.height,background:"#fff",position:"relative",overflow:"hidden"},children:[y.showHeader&&s.jsx("div",{style:{position:"absolute",top:0,left:T.left,right:T.right,height:T.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:y.headerContent}),y.showFooter&&s.jsxs("div",{style:{position:"absolute",bottom:0,left:T.left,right:T.right,height:T.bottom,display:"flex",alignItems:"center",justifyContent:y.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[s.jsx("span",{children:y.footerContent}),y.showPageNumber&&s.jsx("span",{children:y.pageNumberFormat.replace("{page}","1")})]}),s.jsx("div",{style:{position:"absolute",top:T.top,left:T.left,width:p,height:A.height-T.top-T.bottom},children:O.map(c)})]})})]})}):s.jsx(k.App,{children:s.jsxs("div",{className:"app-container",children:[s.jsx(gn,{onCustomSave:a?_:void 0,onCustomPrint:o}),s.jsxs("div",{className:"app-body",children:[s.jsx("div",{className:"app-left-panel",children:s.jsx(jn,{})}),s.jsx(en,{}),s.jsx("div",{className:"app-right-panel",children:s.jsx(uo,{})})]}),s.jsx(fo,{}),s.jsx(po,{})]})})};Ne.PrintDesigner=tn,Ne.default=tn,Ne.getArrayFromDataSource=jt,Ne.getObjectFromDataSource=St,Ne.getRenderValue=at,Ne.getValueByPath=wt,Ne.safeParseJSON=st,Ne.useDesignerStore=fe,Object.defineProperties(Ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
67
+ `}),D=()=>{c?c():O()},M=T=>{const N=T.props,G={position:"absolute",left:T.x*l,top:T.y*l,width:T.w*l,height:T.h*l,overflow:"hidden"},X={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(T.type){case"text":return e.jsx("div",{style:G,children:e.jsx("div",{style:{...X,fontSize:N.fontSize||14,fontWeight:N.fontWeight||"normal",fontStyle:N.fontStyle||"normal",textAlign:N.textAlign||"left",color:N.color||"#000",backgroundColor:N.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:wt(Ke(T,"content",w),N.format)})},T.id);case"image":return e.jsx("div",{style:G,children:e.jsx("div",{style:X,children:N.src?e.jsx("img",{src:Ke(T,"src",w),style:{width:"100%",height:"100%",objectFit:N.fit||"contain"},alt:""}):null})},T.id);case"table":return e.jsx("div",{style:G,children:H(T)},T.id);case"barcode":return e.jsx("div",{style:G,children:e.jsx("div",{style:{...X,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Qt,{value:Ke(T,"value",w),format:N.format||"CODE128"})})},T.id);case"qrcode":return e.jsx("div",{style:G,children:e.jsx("div",{style:{...X,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Zt,{value:Ke(T,"value",w),errorLevel:N.errorLevel||"M",color:N.color||"#000000",backgroundColor:N.backgroundColor||"#ffffff"})})},T.id);case"line":return e.jsx("div",{style:G,children:e.jsx("div",{style:{...X,display:"flex",alignItems:"center",border:"none"},children:e.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${N.thickness||1}px ${N.style||"solid"} ${N.color||"#000"}`,margin:0}})})},T.id);default:return null}},H=T=>{const N=T.props.tableDataSourceId,G=N?w.find(ie=>ie.id===N):null,X=G?Ct(G):null,V=T.tableColumns||[],J=T.props.borderWidth||1,K=T.props.borderColor||"#000000",re=T.props.headerBackgroundColor||"#f5f5f5",be=T.props.headerColor||"#000000",ge=T.props.headerFontSize||12;if(X&&X.length>0)return e.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[V.length>0&&e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:re},children:V.map((ie,oe)=>e.jsx("th",{style:{border:`${J}px solid ${K}`,padding:4,fontSize:ge,fontWeight:"bold",textAlign:"center",color:be},children:ie.title},oe))})}),e.jsx("tbody",{children:X.map((ie,oe)=>e.jsx("tr",{children:V.map((ae,fe)=>e.jsx("td",{style:{border:`${J}px solid ${K}`,padding:4,fontSize:12,textAlign:"center"},children:ae.fieldPath?ie[ae.fieldPath]:""},fe))},oe))})]});const I=T.props.rows||3,W=Math.max(T.props.cols||3,V.length||3);return e.jsx("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:e.jsx("tbody",{children:Array.from({length:I}).map((ie,oe)=>e.jsx("tr",{children:Array.from({length:W}).map((ae,fe)=>e.jsx("td",{style:{border:`${J}px solid ${K}`,padding:2,fontSize:12,textAlign:"center"},children:" "},fe))},oe))})})};return n?e.jsx(E.App,{children:e.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[e.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:e.jsx(E.Space,{children:e.jsx(E.Button,{type:"primary",icon:e.jsx(Oe.PrinterOutlined,{}),onClick:D,children:"打印"})})}),e.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"flex-start",padding:"16px",boxSizing:"border-box",overflowY:"auto",background:"#e8e8e8"},children:e.jsx("div",{style:{flexShrink:0},children:e.jsx(rn,{isPreview:!0,dataSources:w})})}),e.jsx("div",{style:{position:"absolute",left:"-9999px",top:"-9999px"},children:e.jsxs("div",{ref:C,style:{width:t.width,height:t.height,background:"#fff",position:"relative",overflow:"hidden"},children:[v.showHeader&&e.jsx("div",{style:{position:"absolute",top:0,left:s.left,right:s.right,height:s.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:v.headerContent}),v.showFooter&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:s.left,right:s.right,height:s.bottom,display:"flex",alignItems:"center",justifyContent:v.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[e.jsx("span",{children:v.footerContent}),v.showPageNumber&&e.jsx("span",{children:v.pageNumberFormat.replace("{page}","1")})]}),e.jsx("div",{style:{position:"absolute",top:s.top,left:s.left,width:f,height:t.height-s.top-s.bottom},children:b.map(M)})]})})]})}):e.jsx(E.App,{children:e.jsxs("div",{className:"app-container",children:[e.jsx(mn,{onCustomSave:a?r:void 0,onCustomPrint:c}),e.jsxs("div",{className:"app-body",children:[e.jsx("div",{className:`app-left-panel ${L?"collapsed":""}`,children:L?e.jsx(E.Button,{type:"text",className:"panel-collapsed-trigger",icon:e.jsx(Oe.MenuUnfoldOutlined,{}),onClick:()=>k(!1),title:"展开左侧面板"}):e.jsxs(e.Fragment,{children:[e.jsx(E.Button,{type:"text",className:"panel-collapse-trigger panel-collapse-trigger-left",icon:e.jsx(Oe.MenuFoldOutlined,{}),onClick:()=>k(!0),title:"折叠左侧面板"}),e.jsx(_n,{})]})}),e.jsx(rn,{dataSources:w}),e.jsx("div",{className:`app-right-panel ${y?"collapsed":""}`,children:y?e.jsx(E.Button,{type:"text",className:"panel-collapsed-trigger",icon:e.jsx(Oe.MenuFoldOutlined,{}),onClick:()=>d(!1),title:"展开属性面板"}):e.jsxs(e.Fragment,{children:[e.jsx(E.Button,{type:"text",className:"panel-collapse-trigger panel-collapse-trigger-right",icon:e.jsx(Oe.MenuUnfoldOutlined,{}),onClick:()=>d(!0),title:"折叠属性面板"}),e.jsx(go,{})]})})]}),e.jsx(yo,{dataSources:w}),e.jsx(mo,{})]})})};Ae.PrintDesigner=nn,Ae.default=nn,Ae.formatRenderValue=wt,Ae.getArrayFromDataSource=Ct,Ae.getObjectFromDataSource=jt,Ae.getRenderValue=Ke,Ae.getValueByPath=St,Ae.safeParseJSON=at,Ae.useDesignerStore=pe,Object.defineProperties(Ae,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));