@univerjs/sheets-conditional-formatting-ui 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Pr=Object.defineProperty;var Nr=(t,e,r)=>e in t?Pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var xe=(t,e,r)=>Nr(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("@univerjs/core"),u=require("@univerjs/sheets-conditional-formatting"),X=require("@univerjs/sheets"),ee=require("@univerjs/ui"),_=require("react/jsx-runtime"),N=require("react"),oe=require("@univerjs/design"),rn=require("@univerjs/engine-formula"),de=require("@univerjs/sheets-ui"),lr=require("react-dom"),be=require("rxjs"),ft=require("@univerjs/sheets-formula-ui"),ur=require("@univerjs/engine-render"),it=require("rxjs/operators"),an={type:w.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(w.ICommandService),p=t.get(w.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,x=c.createCfId(v,R),T={ranges:r,cfId:x,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.average,operator:i,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},pt={type:w.CommandType.COMMAND,id:"sheet.command.add-conditional-rule",handler(t,e){if(!e)return!1;const{rule:r}=e,n=t.get(w.IUndoRedoService),o=t.get(w.ICommandService),i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.IUniverInstanceService),y=X.getSheetCommandTarget(c);if(!y)return!1;const{unitId:p,subUnitId:S}=y,v=i.createCfId(p,S),R={unitId:p,subUnitId:S,rule:{...r,cfId:r.cfId||v}},x=u.AddConditionalRuleMutationUndoFactory(t,R),T=o.syncExecuteCommand(u.AddConditionalRuleMutation.id,R);return T&&n.pushUndoRedo({unitID:p,redoMutations:[{id:u.AddConditionalRuleMutation.id,params:R}],undoMutations:[x]}),T}},sn={type:w.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,config:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.ICommandService),y=t.get(w.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),x={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.colorScale,config:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:x})}},ln={type:w.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y,stopIfTrue:p,isShowValue:S}=e,v=t.get(u.ConditionalFormattingRuleModel),R=t.get(w.IUniverInstanceService),x=X.getSheetCommandTarget(R);if(!x)return!1;const{unitId:T,subUnitId:b}=x,I=t.get(w.ICommandService),h=v.createCfId(T,b),a={ranges:r,cfId:h,stopIfTrue:!!p,rule:{type:u.CFRuleType.dataBar,isShowValue:S,config:{min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y}}};return I.executeCommand(u.AddConditionalRuleMutation.id,{unitId:T,subUnitId:b,rule:a})}},un={type:w.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.ICommandService),y=t.get(w.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),x={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.duplicateValues,style:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:x})}},cn={type:w.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(w.ICommandService),S=t.get(w.IUniverInstanceService),v=X.getSheetCommandTarget(S);if(!v)return!1;const{unitId:R,subUnitId:x}=v,T=y.createCfId(R,x);let b;if([u.CFNumberOperator.between,u.CFNumberOperator.notBetween].includes(i)){const I=c;if(I.length!==2||!Array.isArray(I))return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:I}}}else{const I=c;if(typeof I!="number")return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:I}}}return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:R,subUnitId:x,rule:b})}},dn={type:w.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,isPercent:i,isBottom:c,value:y}=e,p=t.get(u.ConditionalFormattingRuleModel),S=t.get(w.IUniverInstanceService),v=t.get(w.ICommandService),R=X.getSheetCommandTarget(S);if(!R)return!1;const{unitId:x,subUnitId:T}=R,b=p.createCfId(x,T),I={ranges:r,cfId:b,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.rank,isPercent:i,isBottom:c,style:n,value:y}};return v.executeCommand(u.AddConditionalRuleMutation.id,{unitId:x,subUnitId:T,rule:I})}},fn={type:w.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(w.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,x=t.get(w.ICommandService),T=y.createCfId(v,R),b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.text,operator:i,style:n,value:c}};return x.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:b})}},pn={type:w.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(w.IUniverInstanceService),p=t.get(w.ICommandService),S=X.getSheetCommandTarget(y);if(!S)return!1;const{unitId:v,subUnitId:R}=S,x=c.createCfId(v,R),T={ranges:r,cfId:x,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.timePeriod,operator:i,style:n}};return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},hn={type:w.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.IUniverInstanceService),y=t.get(w.ICommandService),p=X.getSheetCommandTarget(c);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),x={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.uniqueValues,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:x})}},Vt={type:w.CommandType.COMMAND,id:"sheet.command.clear-range-conditional-rule",handler(t,e){var I;if(!e)return!1;const r=t.get(u.ConditionalFormattingRuleModel),n=t.get(w.IUniverInstanceService),o=t.get(w.ICommandService),i=t.get(w.IUndoRedoService),c=t.get(X.SheetsSelectionsService),y=X.getSheetCommandTarget(n,e);if(!y)return!1;const{unitId:p,subUnitId:S}=y,v=((I=c.getCurrentSelections())==null?void 0:I.map(h=>h.range))||[],R=r.getSubunitRules(p,S);if(!(R!=null&&R.length)||!v.length)return!1;const x=[],T=[];R.forEach(h=>{const a=new w.ObjectMatrix;h.ranges.forEach(d=>{w.Range.foreach(d,(C,l)=>{a.setValue(C,l,1)})}),v.forEach(d=>{w.Range.foreach(d,(C,l)=>{a.realDeleteValue(C,l)})});const s=X.findAllRectangle(X.createTopMatrixFromMatrix(a));if(s.length){const d={...h,ranges:s},C={unitId:p,subUnitId:S,rule:d},l=u.setConditionalRuleMutationUndoFactory(t,C);x.push({id:u.SetConditionalRuleMutation.id,params:C}),T.push(...l)}else{const d={unitId:p,subUnitId:S,cfId:h.cfId},C=u.DeleteConditionalRuleMutationUndoFactory(t,d);x.push({id:u.DeleteConditionalRuleMutation.id,params:d}),T.push(...C)}});const b=w.sequenceExecute(x,o).result;return b&&i.pushUndoRedo({unitID:p,redoMutations:x,undoMutations:T}),b}},ht={type:w.CommandType.COMMAND,id:"sheet.command.clear-worksheet-conditional-rule",handler(t,e){const r=t.get(u.ConditionalFormattingRuleModel),n=t.get(w.IUniverInstanceService),o=t.get(w.ICommandService),i=t.get(w.IUndoRedoService),c=X.getSheetCommandTarget(n,e);if(!c)return!1;const{unitId:y,subUnitId:p}=c,S=r.getSubunitRules(y,p);if(!(S!=null&&S.length))return!1;const v=S.map(b=>({cfId:b.cfId,unitId:y,subUnitId:p})),R=v.map(b=>({id:u.DeleteConditionalRuleMutation.id,params:b})),x=v.map(b=>u.DeleteConditionalRuleMutationUndoFactory(t,b)[0]),T=w.sequenceExecute(R,o).result;return T&&i.pushUndoRedo({unitID:y,redoMutations:R,undoMutations:x}),T}},at={type:w.CommandType.COMMAND,id:"sheet.command.delete-conditional-rule",handler(t,e){if(!e)return!1;const r=t.get(w.IUndoRedoService),n=t.get(w.ICommandService),o=t.get(w.IUniverInstanceService),i=X.getSheetCommandTarget(o,e);if(!i)return!1;const{unitId:c,subUnitId:y}=i,p={unitId:c,subUnitId:y,cfId:e.cfId},S=u.DeleteConditionalRuleMutationUndoFactory(t,p),v=n.syncExecuteCommand(u.DeleteConditionalRuleMutation.id,p);return v&&r.pushUndoRedo({unitID:c,undoMutations:S,redoMutations:[{id:u.DeleteConditionalRuleMutation.id,params:p}]}),v}},zt={type:w.CommandType.COMMAND,id:"sheet.command.move-conditional-rule",handler(t,e){if(!e)return!1;const r=t.get(w.IUndoRedoService),n=t.get(w.ICommandService),o=t.get(w.IUniverInstanceService),i=t.get(u.ConditionalFormattingRuleModel),c=X.getSheetCommandTarget(o,e);if(!c)return!1;const{unitId:y,subUnitId:p}=c,S=u.transformSupportSymmetryAnchor(e.start,e.end,i.getSubunitRules(y,p)||[],I=>I.cfId);if(!S)return!1;const[v,R]=S,x={unitId:y,subUnitId:p,start:v,end:R},T=u.MoveConditionalRuleMutationUndoFactory(x),b=n.syncExecuteCommand(u.MoveConditionalRuleMutation.id,x);return b&&r.pushUndoRedo({unitID:y,redoMutations:[{id:u.MoveConditionalRuleMutation.id,params:x}],undoMutations:T}),b}},kt={type:w.CommandType.COMMAND,id:"sheet.command.set-conditional-rule",handler(t,e){if(!e)return!1;const r=t.get(w.IUndoRedoService),n=t.get(w.ICommandService),o=t.get(w.IUniverInstanceService),i=X.getSheetCommandTarget(o,e);if(!i)return!1;const{unitId:c,subUnitId:y}=i,p={unitId:c,subUnitId:y,rule:e.rule},S=u.setConditionalRuleMutationUndoFactory(t,p),v=n.syncExecuteCommand(u.SetConditionalRuleMutation.id,p);return v&&r.pushUndoRedo({unitID:c,undoMutations:S,redoMutations:[{id:u.SetConditionalRuleMutation.id,params:p}]}),v}},jr="univer-conditional-formatting-wrap",Lr="univer-title",Ur="univer-label",Vr="univer-label-container",zr="univer-m-t-base",kr="univer-m-t-sm",$r="univer-m-t-xl",Ar="univer-m-l-sm",qr="univer-m-l-xl",Wr="univer-m-l-xxs",Hr="univer-m-l-0",Br="univer-m-r-0",z={conditionalFormattingWrap:jr,title:Lr,label:Ur,labelContainer:Vr,mTBase:zr,mTSm:kr,mTXl:$r,mLSm:Ar,mLXl:qr,mLXxs:Wr,mL0:Hr,mR0:Br};var Ce=function(){return Ce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Ce.apply(this,arguments)},Gr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r},$e=N.forwardRef(function(t,e){var r=t.icon,n=t.id,o=t.className,i=t.extend,c=Gr(t,["icon","id","className","extend"]),y="univerjs-icon univerjs-icon-".concat(n," ").concat(o||"").trim(),p=N.useRef("_".concat(Kr()));return cr(r,"".concat(n),{defIds:r.defIds,idSuffix:p.current},Ce({ref:e,className:y},c),i)});function cr(t,e,r,n,o){return N.createElement(t.tag,Ce(Ce({key:e},Xr(t,r,o)),n),(Yr(t,r).children||[]).map(function(i,c){return cr(i,"".concat(e,"-").concat(t.tag,"-").concat(c),r,void 0,o)}))}function Xr(t,e,r){var n=Ce({},t.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1);var o=e.defIds;return!o||o.length===0||(t.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+e.idSuffix),Object.entries(n).forEach(function(i){var c=i[0],y=i[1];typeof y=="string"&&(n[c]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),n}function Yr(t,e){var r,n=e.defIds;return!n||n.length===0?t:t.tag==="defs"&&(!((r=t.children)===null||r===void 0)&&r.length)?Ce(Ce({},t),{children:t.children.map(function(o){return typeof o.attrs.id=="string"&&n&&n.indexOf(o.attrs.id)>-1?Ce(Ce({},o),{attrs:Ce(Ce({},o.attrs),{id:o.attrs.id+e.idSuffix})}):o})}):t}function Kr(){return Math.random().toString(36).substring(2,8)}$e.displayName="UniverIcon";var Zr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Ot=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"delete-single",ref:e,icon:Zr}))});Ot.displayName="DeleteSingle";var Jr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},dr=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"increase-single",ref:e,icon:Jr}))});dr.displayName="IncreaseSingle";var Qr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},$t=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"more-down-single",ref:e,icon:Qr}))});$t.displayName="MoreDownSingle";var eo={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",style:{maskType:"alpha"},width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0 0H16V16H0z"}}]},{tag:"g",attrs:{fill:"currentColor",mask:"url(#mask0_622_8)"},children:[{tag:"path",attrs:{d:"M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z"}}]}]},fr=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"sequence-single",ref:e,icon:eo}))});fr.displayName="SequenceSingle";var to={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",style:{maskType:"alpha"},width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0.35 0.48H16.35V16.48H0.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},mt=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"slash-single",ref:e,icon:to}))});mt.displayName="SlashSingle";function no(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pr(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var Ht={exports:{}},We={},ot={exports:{}},ro=ot.exports,bn;function mn(){return bn||(bn=1,function(t,e){(function(r,n){n(e)})(ro,function(r){function n(A){return function(se,O,M,P,V,Y,q){return A(se,O,q)}}function o(A){return function(se,O,M,P){if(!se||!O||typeof se!="object"||typeof O!="object")return A(se,O,M,P);var V=P.get(se),Y=P.get(O);if(V&&Y)return V===O&&Y===se;P.set(se,O),P.set(O,se);var q=A(se,O,M,P);return P.delete(se),P.delete(O),q}}function i(A,J){var se={};for(var O in A)se[O]=A[O];for(var O in J)se[O]=J[O];return se}function c(A){return A.constructor===Object||A.constructor==null}function y(A){return typeof A.then=="function"}function p(A,J){return A===J||A!==A&&J!==J}var S="[object Arguments]",v="[object Boolean]",R="[object Date]",x="[object RegExp]",T="[object Map]",b="[object Number]",I="[object Object]",h="[object Set]",a="[object String]",s=Object.prototype.toString;function d(A){var J=A.areArraysEqual,se=A.areDatesEqual,O=A.areMapsEqual,M=A.areObjectsEqual,P=A.areRegExpsEqual,V=A.areSetsEqual,Y=A.createIsNestedEqual,q=Y(Z);function Z(K,te,ce){if(K===te)return!0;if(!K||!te||typeof K!="object"||typeof te!="object")return K!==K&&te!==te;if(c(K)&&c(te))return M(K,te,q,ce);var Me=Array.isArray(K),ye=Array.isArray(te);if(Me||ye)return Me===ye&&J(K,te,q,ce);var me=s.call(K);return me!==s.call(te)?!1:me===R?se(K,te,q,ce):me===x?P(K,te,q,ce):me===T?O(K,te,q,ce):me===h?V(K,te,q,ce):me===I||me===S?y(K)||y(te)?!1:M(K,te,q,ce):me===v||me===b||me===a?p(K.valueOf(),te.valueOf()):!1}return Z}function C(A,J,se,O){var M=A.length;if(J.length!==M)return!1;for(;M-- >0;)if(!se(A[M],J[M],M,M,A,J,O))return!1;return!0}var l=o(C);function m(A,J){return p(A.valueOf(),J.valueOf())}function f(A,J,se,O){var M=A.size===J.size;if(!M)return!1;if(!A.size)return!0;var P={},V=0;return A.forEach(function(Y,q){if(M){var Z=!1,K=0;J.forEach(function(te,ce){!Z&&!P[K]&&(Z=se(q,ce,V,K,A,J,O)&&se(Y,te,q,ce,A,J,O))&&(P[K]=!0),K++}),V++,M=Z}}),M}var g=o(f),F="_owner",j=Object.prototype.hasOwnProperty;function U(A,J,se,O){var M=Object.keys(A),P=M.length;if(Object.keys(J).length!==P)return!1;for(var V;P-- >0;){if(V=M[P],V===F){var Y=!!A.$$typeof,q=!!J.$$typeof;if((Y||q)&&Y!==q)return!1}if(!j.call(J,V)||!se(A[V],J[V],V,V,A,J,O))return!1}return!0}var L=o(U);function E(A,J){return A.source===J.source&&A.flags===J.flags}function D(A,J,se,O){var M=A.size===J.size;if(!M)return!1;if(!A.size)return!0;var P={};return A.forEach(function(V,Y){if(M){var q=!1,Z=0;J.forEach(function(K,te){!q&&!P[Z]&&(q=se(V,K,Y,te,A,J,O))&&(P[Z]=!0),Z++}),M=q}}),M}var k=o(D),B=Object.freeze({areArraysEqual:C,areDatesEqual:m,areMapsEqual:f,areObjectsEqual:U,areRegExpsEqual:E,areSetsEqual:D,createIsNestedEqual:n}),G=Object.freeze({areArraysEqual:l,areDatesEqual:m,areMapsEqual:g,areObjectsEqual:L,areRegExpsEqual:E,areSetsEqual:k,createIsNestedEqual:n}),ne=d(B);function Q(A,J){return ne(A,J,void 0)}var W=d(i(B,{createIsNestedEqual:function(){return p}}));function $(A,J){return W(A,J,void 0)}var re=d(G);function ie(A,J){return re(A,J,new WeakMap)}var le=d(i(G,{createIsNestedEqual:function(){return p}}));function pe(A,J){return le(A,J,new WeakMap)}function ge(A){return d(i(B,A(B)))}function Se(A){var J=d(i(G,A(G)));return function(se,O,M){return M===void 0&&(M=new WeakMap),J(se,O,M)}}r.circularDeepEqual=ie,r.circularShallowEqual=pe,r.createCustomCircularEqual=Se,r.createCustomEqual=ge,r.deepEqual=Q,r.sameValueZeroEqual=p,r.shallowEqual=$,Object.defineProperty(r,"__esModule",{value:!0})})}(ot,ot.exports)),ot.exports}var yt={exports:{}},Rn;function gn(){if(Rn)return yt.exports;Rn=1;function t(r){var n,o,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(n=0;n<c;n++)r[n]&&(o=t(r[n]))&&(i&&(i+=" "),i+=o)}else for(o in r)r[o]&&(i&&(i+=" "),i+=o);return i}function e(){for(var r,n,o=0,i="",c=arguments.length;o<c;o++)(r=arguments[o])&&(n=t(r))&&(i&&(i+=" "),i+=n);return i}return yt.exports=e,yt.exports.clsx=e,yt.exports}var ae={},Bt,Tn;function oo(){return Tn||(Tn=1,Bt=function(e,r,n){return e===r?!0:e.className===r.className&&n(e.style,r.style)&&e.width===r.width&&e.autoSize===r.autoSize&&e.cols===r.cols&&e.draggableCancel===r.draggableCancel&&e.draggableHandle===r.draggableHandle&&n(e.verticalCompact,r.verticalCompact)&&n(e.compactType,r.compactType)&&n(e.layout,r.layout)&&n(e.margin,r.margin)&&n(e.containerPadding,r.containerPadding)&&e.rowHeight===r.rowHeight&&e.maxRows===r.maxRows&&e.isBounded===r.isBounded&&e.isDraggable===r.isDraggable&&e.isResizable===r.isResizable&&e.allowOverlap===r.allowOverlap&&e.preventCollision===r.preventCollision&&e.useCSSTransforms===r.useCSSTransforms&&e.transformScale===r.transformScale&&e.isDroppable===r.isDroppable&&n(e.resizeHandles,r.resizeHandles)&&n(e.resizeHandle,r.resizeHandle)&&e.onLayoutChange===r.onLayoutChange&&e.onDragStart===r.onDragStart&&e.onDrag===r.onDrag&&e.onDragStop===r.onDragStop&&e.onResizeStart===r.onResizeStart&&e.onResize===r.onResize&&e.onResizeStop===r.onResizeStop&&e.onDrop===r.onDrop&&n(e.droppingItem,r.droppingItem)&&n(e.innerRef,r.innerRef)}),Bt}var In;function Ae(){if(In)return ae;In=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.bottom=n,ae.childrenEqual=p,ae.cloneLayout=o,ae.cloneLayoutItem=y,ae.collides=v,ae.compact=R,ae.compactItem=b,ae.compactType=A,ae.correctBounds=I,ae.fastPositionEqual=S,ae.fastRGLPropsEqual=void 0,ae.getAllCollisions=s,ae.getFirstCollision=a,ae.getLayoutItem=h,ae.getStatics=d,ae.modifyLayout=i,ae.moveElement=C,ae.moveElementAwayFromCollision=l,ae.noop=void 0,ae.perc=m,ae.resizeItemInDirection=W,ae.setTopLeft=re,ae.setTransform=$,ae.sortLayoutItems=ie,ae.sortLayoutItemsByColRow=pe,ae.sortLayoutItemsByRowCol=le,ae.synchronizeLayoutWithChildren=ge,ae.validateLayout=Se,ae.withLayoutItem=c;var t=mn(),e=r(N);function r(O){return O&&O.__esModule?O:{default:O}}function n(O){let M=0,P;for(let V=0,Y=O.length;V<Y;V++)P=O[V].y+O[V].h,P>M&&(M=P);return M}function o(O){const M=Array(O.length);for(let P=0,V=O.length;P<V;P++)M[P]=y(O[P]);return M}function i(O,M){const P=Array(O.length);for(let V=0,Y=O.length;V<Y;V++)M.i===O[V].i?P[V]=M:P[V]=O[V];return P}function c(O,M,P){let V=h(O,M);return V?(V=P(y(V)),O=i(O,V),[O,V]):[O,null]}function y(O){return{w:O.w,h:O.h,x:O.x,y:O.y,i:O.i,minW:O.minW,maxW:O.maxW,minH:O.minH,maxH:O.maxH,moved:!!O.moved,static:!!O.static,isDraggable:O.isDraggable,isResizable:O.isResizable,resizeHandles:O.resizeHandles,isBounded:O.isBounded}}function p(O,M){return(0,t.deepEqual)(e.default.Children.map(O,P=>P==null?void 0:P.key),e.default.Children.map(M,P=>P==null?void 0:P.key))&&(0,t.deepEqual)(e.default.Children.map(O,P=>P==null?void 0:P.props["data-grid"]),e.default.Children.map(M,P=>P==null?void 0:P.props["data-grid"]))}ae.fastRGLPropsEqual=oo();function S(O,M){return O.left===M.left&&O.top===M.top&&O.width===M.width&&O.height===M.height}function v(O,M){return!(O.i===M.i||O.x+O.w<=M.x||O.x>=M.x+M.w||O.y+O.h<=M.y||O.y>=M.y+M.h)}function R(O,M,P,V){const Y=d(O),q=ie(O,M),Z=Array(O.length);for(let K=0,te=q.length;K<te;K++){let ce=y(q[K]);ce.static||(ce=b(Y,ce,M,P,q,V),Y.push(ce)),Z[O.indexOf(q[K])]=ce,ce.moved=!1}return Z}const x={x:"w",y:"h"};function T(O,M,P,V){const Y=x[V];M[V]+=1;const q=O.map(Z=>Z.i).indexOf(M.i);for(let Z=q+1;Z<O.length;Z++){const K=O[Z];if(!K.static){if(K.y>M.y+M.h)break;v(M,K)&&T(O,K,P+M[Y],V)}}M[V]=P}function b(O,M,P,V,Y,q){const Z=P==="vertical",K=P==="horizontal";if(Z)for(M.y=Math.min(n(O),M.y);M.y>0&&!a(O,M);)M.y--;else if(K)for(;M.x>0&&!a(O,M);)M.x--;let te;for(;(te=a(O,M))&&!(P===null&&q);)if(K?T(Y,M,te.x+te.w,"x"):T(Y,M,te.y+te.h,"y"),K&&M.x+M.w>V)for(M.x=V-M.w,M.y++;M.x>0&&!a(O,M);)M.x--;return M.y=Math.max(M.y,0),M.x=Math.max(M.x,0),M}function I(O,M){const P=d(O);for(let V=0,Y=O.length;V<Y;V++){const q=O[V];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)P.push(q);else for(;a(P,q);)q.y++}return O}function h(O,M){for(let P=0,V=O.length;P<V;P++)if(O[P].i===M)return O[P]}function a(O,M){for(let P=0,V=O.length;P<V;P++)if(v(O[P],M))return O[P]}function s(O,M){return O.filter(P=>v(P,M))}function d(O){return O.filter(M=>M.static)}function C(O,M,P,V,Y,q,Z,K,te){if(M.static&&M.isDraggable!==!0||M.y===V&&M.x===P)return O;`${M.i}${String(P)}${String(V)}${M.x}${M.y}`;const ce=M.x,Me=M.y;typeof P=="number"&&(M.x=P),typeof V=="number"&&(M.y=V),M.moved=!0;let ye=ie(O,Z);(Z==="vertical"&&typeof V=="number"?Me>=V:Z==="horizontal"&&typeof P=="number"?ce>=P:!1)&&(ye=ye.reverse());const je=s(ye,M),vt=je.length>0;if(vt&&te)return o(O);if(vt&&q)return`${M.i}`,M.x=ce,M.y=Me,M.moved=!1,O;for(let Wt=0,Dr=je.length;Wt<Dr;Wt++){const Fe=je[Wt];`${M.i}${M.x}${M.y}${Fe.i}${Fe.x}${Fe.y}`,!Fe.moved&&(Fe.static?O=l(O,Fe,M,Y,Z):O=l(O,M,Fe,Y,Z))}return O}function l(O,M,P,V,Y,q){const Z=Y==="horizontal",K=Y==="vertical",te=M.static;if(V){V=!1;const ye={x:Z?Math.max(M.x-P.w,0):P.x,y:K?Math.max(M.y-P.h,0):P.y,w:P.w,h:P.h,i:"-1"},me=a(O,ye),je=me&&me.y+me.h>M.y,vt=me&&M.x+M.w>me.x;if(me){if(je&&K)return C(O,P,void 0,M.y+1,V,te,Y);if(je&&Y==null)return M.y=P.y,P.y=P.y+P.h,O;if(vt&&Z)return C(O,M,P.x,void 0,V,te,Y)}else return`${P.i}${ye.x}${ye.y}`,C(O,P,Z?ye.x:void 0,K?ye.y:void 0,V,te,Y)}const ce=Z?P.x+1:void 0,Me=K?P.y+1:void 0;return ce==null&&Me==null?O:C(O,P,Z?P.x+1:void 0,K?P.y+1:void 0,V,te,Y)}function m(O){return O*100+"%"}const f=(O,M,P,V)=>O+P>V?M:P,g=(O,M,P)=>O<0?M:P,F=O=>Math.max(0,O),j=O=>Math.max(0,O),U=(O,M,P)=>{let{left:V,height:Y,width:q}=M;const Z=O.top-(Y-O.height);return{left:V,width:q,height:g(Z,O.height,Y),top:j(Z)}},L=(O,M,P)=>{let{top:V,left:Y,height:q,width:Z}=M;return{top:V,height:q,width:f(O.left,O.width,Z,P),left:F(Y)}},E=(O,M,P)=>{let{top:V,height:Y,width:q}=M;const Z=O.left-(q-O.width);return{height:Y,width:Z<0?O.width:f(O.left,O.width,q,P),top:j(V),left:F(Z)}},D=(O,M,P)=>{let{top:V,left:Y,height:q,width:Z}=M;return{width:Z,left:Y,height:g(V,O.height,q),top:j(V)}},Q={n:U,ne:function(){return U(arguments.length<=0?void 0:arguments[0],L(...arguments))},e:L,se:function(){return D(arguments.length<=0?void 0:arguments[0],L(...arguments))},s:D,sw:function(){return D(arguments.length<=0?void 0:arguments[0],E(...arguments))},w:E,nw:function(){return U(arguments.length<=0?void 0:arguments[0],E(...arguments))}};function W(O,M,P,V){const Y=Q[O];return Y?Y(M,{...M,...P},V):P}function $(O){let{top:M,left:P,width:V,height:Y}=O;const q=`translate(${P}px,${M}px)`;return{transform:q,WebkitTransform:q,MozTransform:q,msTransform:q,OTransform:q,width:`${V}px`,height:`${Y}px`,position:"absolute"}}function re(O){let{top:M,left:P,width:V,height:Y}=O;return{top:`${M}px`,left:`${P}px`,width:`${V}px`,height:`${Y}px`,position:"absolute"}}function ie(O,M){return M==="horizontal"?pe(O):M==="vertical"?le(O):O}function le(O){return O.slice(0).sort(function(M,P){return M.y>P.y||M.y===P.y&&M.x>P.x?1:M.y===P.y&&M.x===P.x?0:-1})}function pe(O){return O.slice(0).sort(function(M,P){return M.x>P.x||M.x===P.x&&M.y>P.y?1:-1})}function ge(O,M,P,V,Y){O=O||[];const q=[];e.default.Children.forEach(M,K=>{if((K==null?void 0:K.key)==null)return;const te=h(O,String(K.key)),ce=K.props["data-grid"];te&&ce==null?q.push(y(te)):ce?q.push(y({...ce,i:K.key})):q.push(y({w:1,h:1,x:0,y:n(q),i:String(K.key)}))});const Z=I(q,{cols:P});return Y?Z:R(Z,V,P)}function Se(O){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const P=["x","y","w","h"];if(!Array.isArray(O))throw new Error(M+" must be an array!");for(let V=0,Y=O.length;V<Y;V++){const q=O[V];for(let Z=0;Z<P.length;Z++)if(typeof q[P[Z]]!="number")throw new Error("ReactGridLayout: "+M+"["+V+"]."+P[Z]+" must be a number!")}}function A(O){const{verticalCompact:M,compactType:P}=O||{};return M===!1?null:P}function J(){}const se=()=>{};return ae.noop=se,ae}var Te={},wn;function vn(){if(wn)return Te;wn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.calcGridColWidth=t,Te.calcGridItemPosition=r,Te.calcGridItemWHPx=e,Te.calcWH=o,Te.calcXY=n,Te.clamp=i;function t(c){const{margin:y,containerPadding:p,containerWidth:S,cols:v}=c;return(S-y[0]*(v-1)-p[0]*2)/v}function e(c,y,p){return Number.isFinite(c)?Math.round(y*c+Math.max(0,c-1)*p):c}function r(c,y,p,S,v,R){const{margin:x,containerPadding:T,rowHeight:b}=c,I=t(c),h={};return R&&R.resizing?(h.width=Math.round(R.resizing.width),h.height=Math.round(R.resizing.height)):(h.width=e(S,I,x[0]),h.height=e(v,b,x[1])),R&&R.dragging?(h.top=Math.round(R.dragging.top),h.left=Math.round(R.dragging.left)):R&&R.resizing&&typeof R.resizing.top=="number"&&typeof R.resizing.left=="number"?(h.top=Math.round(R.resizing.top),h.left=Math.round(R.resizing.left)):(h.top=Math.round((b+x[1])*p+T[1]),h.left=Math.round((I+x[0])*y+T[0])),h}function n(c,y,p,S,v){const{margin:R,cols:x,rowHeight:T,maxRows:b}=c,I=t(c);let h=Math.round((p-R[0])/(I+R[0])),a=Math.round((y-R[1])/(T+R[1]));return h=i(h,0,x-S),a=i(a,0,b-v),{x:h,y:a}}function o(c,y,p,S,v,R){const{margin:x,maxRows:T,cols:b,rowHeight:I}=c,h=t(c);let a=Math.round((y+x[0])/(h+x[0])),s=Math.round((p+x[1])/(I+x[1])),d=i(a,0,b-S),C=i(s,0,T-v);return["sw","w","nw"].indexOf(R)!==-1&&(d=i(a,0,b)),["nw","n","ne"].indexOf(R)!==-1&&(C=i(s,0,T)),{w:d,h:C}}function i(c,y,p){return Math.max(Math.min(c,p),y)}return Te}var He={},Gt={exports:{}},Xt,xn;function io(){if(xn)return Xt;xn=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xt=t,Xt}var Yt,_n;function ao(){if(_n)return Yt;_n=1;var t=io();function e(){}function r(){}return r.resetWarningCache=e,Yt=function(){function n(c,y,p,S,v,R){if(R!==t){var x=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 x.name="Invariant Violation",x}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:e};return i.PropTypes=i,i},Yt}var En;function Oe(){return En||(En=1,Gt.exports=ao()()),Gt.exports}var Be={exports:{}},Kt={};function hr(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=hr(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function On(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=hr(t))&&(n&&(n+=" "),n+=e);return n}const so=Object.freeze(Object.defineProperty({__proto__:null,clsx:On,default:On},Symbol.toStringTag,{value:"Module"})),lo=pr(so);var fe={},_e={},Mn;function At(){if(Mn)return _e;Mn=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.dontSetMe=o,_e.findInArray=t,_e.int=n,_e.isFunction=e,_e.isNum=r;function t(i,c){for(let y=0,p=i.length;y<p;y++)if(c.apply(c,[i[y],y,i]))return i[y]}function e(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Function]"}function r(i){return typeof i=="number"&&!isNaN(i)}function n(i){return parseInt(i,10)}function o(i,c,y){if(i[c])return new Error("Invalid prop ".concat(c," passed to ").concat(y," - do not set this, set it on the child."))}return _e}var Ee={},Fn;function uo(){if(Fn)return Ee;Fn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.browserPrefixToKey=r,Ee.browserPrefixToStyle=n,Ee.default=void 0,Ee.getPrefix=e;const t=["Moz","Webkit","O","ms"];function e(){var i;let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const y=(i=window.document)===null||i===void 0||(i=i.documentElement)===null||i===void 0?void 0:i.style;if(!y||c in y)return"";for(let p=0;p<t.length;p++)if(r(c,t[p])in y)return t[p];return""}function r(i,c){return c?"".concat(c).concat(o(i)):i}function n(i,c){return c?"-".concat(c.toLowerCase(),"-").concat(i):i}function o(i){let c="",y=!0;for(let p=0;p<i.length;p++)y?(c+=i[p].toUpperCase(),y=!1):i[p]==="-"?y=!0:c+=i[p];return c}return Ee.default=e(),Ee}var Dn;function yn(){if(Dn)return fe;Dn=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=l,fe.addEvent=y,fe.addUserSelectStyles=d,fe.createCSSTransform=b,fe.createSVGTransform=I,fe.getTouch=a,fe.getTouchIdentifier=s,fe.getTranslation=h,fe.innerHeight=R,fe.innerWidth=x,fe.matchesSelector=i,fe.matchesSelectorAndParentsTo=c,fe.offsetXYFromParent=T,fe.outerHeight=S,fe.outerWidth=v,fe.removeClassName=m,fe.removeEvent=p,fe.removeUserSelectStyles=C;var t=At(),e=n(uo());function r(f){if(typeof WeakMap!="function")return null;var g=new WeakMap,F=new WeakMap;return(r=function(j){return j?F:g})(f)}function n(f,g){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var F=r(g);if(F&&F.has(f))return F.get(f);var j={},U=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var L in f)if(L!=="default"&&Object.prototype.hasOwnProperty.call(f,L)){var E=U?Object.getOwnPropertyDescriptor(f,L):null;E&&(E.get||E.set)?Object.defineProperty(j,L,E):j[L]=f[L]}return j.default=f,F&&F.set(f,j),j}let o="";function i(f,g){return o||(o=(0,t.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(F){return(0,t.isFunction)(f[F])})),(0,t.isFunction)(f[o])?f[o](g):!1}function c(f,g,F){let j=f;do{if(i(j,g))return!0;if(j===F)return!1;j=j.parentNode}while(j);return!1}function y(f,g,F,j){if(!f)return;const U={capture:!0,...j};f.addEventListener?f.addEventListener(g,F,U):f.attachEvent?f.attachEvent("on"+g,F):f["on"+g]=F}function p(f,g,F,j){if(!f)return;const U={capture:!0,...j};f.removeEventListener?f.removeEventListener(g,F,U):f.detachEvent?f.detachEvent("on"+g,F):f["on"+g]=null}function S(f){let g=f.clientHeight;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g+=(0,t.int)(F.borderTopWidth),g+=(0,t.int)(F.borderBottomWidth),g}function v(f){let g=f.clientWidth;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g+=(0,t.int)(F.borderLeftWidth),g+=(0,t.int)(F.borderRightWidth),g}function R(f){let g=f.clientHeight;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g-=(0,t.int)(F.paddingTop),g-=(0,t.int)(F.paddingBottom),g}function x(f){let g=f.clientWidth;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g-=(0,t.int)(F.paddingLeft),g-=(0,t.int)(F.paddingRight),g}function T(f,g,F){const U=g===g.ownerDocument.body?{left:0,top:0}:g.getBoundingClientRect(),L=(f.clientX+g.scrollLeft-U.left)/F,E=(f.clientY+g.scrollTop-U.top)/F;return{x:L,y:E}}function b(f,g){const F=h(f,g,"px");return{[(0,e.browserPrefixToKey)("transform",e.default)]:F}}function I(f,g){return h(f,g,"")}function h(f,g,F){let{x:j,y:U}=f,L="translate(".concat(j).concat(F,",").concat(U).concat(F,")");if(g){const E="".concat(typeof g.x=="string"?g.x:g.x+F),D="".concat(typeof g.y=="string"?g.y:g.y+F);L="translate(".concat(E,", ").concat(D,")")+L}return L}function a(f,g){return f.targetTouches&&(0,t.findInArray)(f.targetTouches,F=>g===F.identifier)||f.changedTouches&&(0,t.findInArray)(f.changedTouches,F=>g===F.identifier)}function s(f){if(f.targetTouches&&f.targetTouches[0])return f.targetTouches[0].identifier;if(f.changedTouches&&f.changedTouches[0])return f.changedTouches[0].identifier}function d(f){if(!f)return;let g=f.getElementById("react-draggable-style-el");g||(g=f.createElement("style"),g.type="text/css",g.id="react-draggable-style-el",g.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1
+ "use strict";var Pr=Object.defineProperty;var Nr=(t,e,r)=>e in t?Pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var xe=(t,e,r)=>Nr(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("@univerjs/core"),u=require("@univerjs/sheets-conditional-formatting"),X=require("@univerjs/sheets"),ee=require("@univerjs/ui"),_=require("react/jsx-runtime"),N=require("react"),oe=require("@univerjs/design"),rn=require("@univerjs/engine-formula"),de=require("@univerjs/sheets-ui"),lr=require("react-dom"),be=require("rxjs"),ft=require("@univerjs/sheets-formula-ui"),ur=require("@univerjs/engine-render"),it=require("rxjs/operators"),an={type:w.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(w.ICommandService),p=t.get(w.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,x=c.createCfId(v,R),T={ranges:r,cfId:x,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.average,operator:i,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},pt={type:w.CommandType.COMMAND,id:"sheet.command.add-conditional-rule",handler(t,e){if(!e)return!1;const{rule:r}=e,n=t.get(w.IUndoRedoService),o=t.get(w.ICommandService),i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.IUniverInstanceService),y=X.getSheetCommandTarget(c);if(!y)return!1;const{unitId:p,subUnitId:S}=y,v=i.createCfId(p,S),R={unitId:p,subUnitId:S,rule:{...r,cfId:r.cfId||v}},x=u.AddConditionalRuleMutationUndoFactory(t,R),T=o.syncExecuteCommand(u.AddConditionalRuleMutation.id,R);return T&&n.pushUndoRedo({unitID:p,redoMutations:[{id:u.AddConditionalRuleMutation.id,params:R}],undoMutations:[x]}),T}},sn={type:w.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,config:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.ICommandService),y=t.get(w.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),x={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.colorScale,config:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:x})}},ln={type:w.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y,stopIfTrue:p,isShowValue:S}=e,v=t.get(u.ConditionalFormattingRuleModel),R=t.get(w.IUniverInstanceService),x=X.getSheetCommandTarget(R);if(!x)return!1;const{unitId:T,subUnitId:b}=x,I=t.get(w.ICommandService),h=v.createCfId(T,b),a={ranges:r,cfId:h,stopIfTrue:!!p,rule:{type:u.CFRuleType.dataBar,isShowValue:S,config:{min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y}}};return I.executeCommand(u.AddConditionalRuleMutation.id,{unitId:T,subUnitId:b,rule:a})}},un={type:w.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.ICommandService),y=t.get(w.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),x={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.duplicateValues,style:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:x})}},cn={type:w.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(w.ICommandService),S=t.get(w.IUniverInstanceService),v=X.getSheetCommandTarget(S);if(!v)return!1;const{unitId:R,subUnitId:x}=v,T=y.createCfId(R,x);let b;if([u.CFNumberOperator.between,u.CFNumberOperator.notBetween].includes(i)){const I=c;if(I.length!==2||!Array.isArray(I))return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:I}}}else{const I=c;if(typeof I!="number")return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:I}}}return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:R,subUnitId:x,rule:b})}},dn={type:w.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,isPercent:i,isBottom:c,value:y}=e,p=t.get(u.ConditionalFormattingRuleModel),S=t.get(w.IUniverInstanceService),v=t.get(w.ICommandService),R=X.getSheetCommandTarget(S);if(!R)return!1;const{unitId:x,subUnitId:T}=R,b=p.createCfId(x,T),I={ranges:r,cfId:b,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.rank,isPercent:i,isBottom:c,style:n,value:y}};return v.executeCommand(u.AddConditionalRuleMutation.id,{unitId:x,subUnitId:T,rule:I})}},fn={type:w.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(w.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,x=t.get(w.ICommandService),T=y.createCfId(v,R),b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.text,operator:i,style:n,value:c}};return x.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:b})}},pn={type:w.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(w.IUniverInstanceService),p=t.get(w.ICommandService),S=X.getSheetCommandTarget(y);if(!S)return!1;const{unitId:v,subUnitId:R}=S,x=c.createCfId(v,R),T={ranges:r,cfId:x,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.timePeriod,operator:i,style:n}};return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},hn={type:w.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(w.IUniverInstanceService),y=t.get(w.ICommandService),p=X.getSheetCommandTarget(c);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),x={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.uniqueValues,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:x})}},Vt={type:w.CommandType.COMMAND,id:"sheet.command.clear-range-conditional-rule",handler(t,e){var I;if(!e)return!1;const r=t.get(u.ConditionalFormattingRuleModel),n=t.get(w.IUniverInstanceService),o=t.get(w.ICommandService),i=t.get(w.IUndoRedoService),c=t.get(X.SheetsSelectionsService),y=X.getSheetCommandTarget(n,e);if(!y)return!1;const{unitId:p,subUnitId:S}=y,v=((I=c.getCurrentSelections())==null?void 0:I.map(h=>h.range))||[],R=r.getSubunitRules(p,S);if(!(R!=null&&R.length)||!v.length)return!1;const x=[],T=[];R.forEach(h=>{const a=new w.ObjectMatrix;h.ranges.forEach(d=>{w.Range.foreach(d,(C,l)=>{a.setValue(C,l,1)})}),v.forEach(d=>{w.Range.foreach(d,(C,l)=>{a.realDeleteValue(C,l)})});const s=X.findAllRectangle(X.createTopMatrixFromMatrix(a));if(s.length){const d={...h,ranges:s},C={unitId:p,subUnitId:S,rule:d},l=u.setConditionalRuleMutationUndoFactory(t,C);x.push({id:u.SetConditionalRuleMutation.id,params:C}),T.push(...l)}else{const d={unitId:p,subUnitId:S,cfId:h.cfId},C=u.DeleteConditionalRuleMutationUndoFactory(t,d);x.push({id:u.DeleteConditionalRuleMutation.id,params:d}),T.push(...C)}});const b=w.sequenceExecute(x,o).result;return b&&i.pushUndoRedo({unitID:p,redoMutations:x,undoMutations:T}),b}},ht={type:w.CommandType.COMMAND,id:"sheet.command.clear-worksheet-conditional-rule",handler(t,e){const r=t.get(u.ConditionalFormattingRuleModel),n=t.get(w.IUniverInstanceService),o=t.get(w.ICommandService),i=t.get(w.IUndoRedoService),c=X.getSheetCommandTarget(n,e);if(!c)return!1;const{unitId:y,subUnitId:p}=c,S=r.getSubunitRules(y,p);if(!(S!=null&&S.length))return!1;const v=S.map(b=>({cfId:b.cfId,unitId:y,subUnitId:p})),R=v.map(b=>({id:u.DeleteConditionalRuleMutation.id,params:b})),x=v.map(b=>u.DeleteConditionalRuleMutationUndoFactory(t,b)[0]),T=w.sequenceExecute(R,o).result;return T&&i.pushUndoRedo({unitID:y,redoMutations:R,undoMutations:x}),T}},at={type:w.CommandType.COMMAND,id:"sheet.command.delete-conditional-rule",handler(t,e){if(!e)return!1;const r=t.get(w.IUndoRedoService),n=t.get(w.ICommandService),o=t.get(w.IUniverInstanceService),i=X.getSheetCommandTarget(o,e);if(!i)return!1;const{unitId:c,subUnitId:y}=i,p={unitId:c,subUnitId:y,cfId:e.cfId},S=u.DeleteConditionalRuleMutationUndoFactory(t,p),v=n.syncExecuteCommand(u.DeleteConditionalRuleMutation.id,p);return v&&r.pushUndoRedo({unitID:c,undoMutations:S,redoMutations:[{id:u.DeleteConditionalRuleMutation.id,params:p}]}),v}},zt={type:w.CommandType.COMMAND,id:"sheet.command.move-conditional-rule",handler(t,e){if(!e)return!1;const r=t.get(w.IUndoRedoService),n=t.get(w.ICommandService),o=t.get(w.IUniverInstanceService),i=t.get(u.ConditionalFormattingRuleModel),c=X.getSheetCommandTarget(o,e);if(!c)return!1;const{unitId:y,subUnitId:p}=c,S=u.transformSupportSymmetryAnchor(e.start,e.end,i.getSubunitRules(y,p)||[],I=>I.cfId);if(!S)return!1;const[v,R]=S,x={unitId:y,subUnitId:p,start:v,end:R},T=u.MoveConditionalRuleMutationUndoFactory(x),b=n.syncExecuteCommand(u.MoveConditionalRuleMutation.id,x);return b&&r.pushUndoRedo({unitID:y,redoMutations:[{id:u.MoveConditionalRuleMutation.id,params:x}],undoMutations:T}),b}},kt={type:w.CommandType.COMMAND,id:"sheet.command.set-conditional-rule",handler(t,e){if(!e)return!1;const r=t.get(w.IUndoRedoService),n=t.get(w.ICommandService),o=t.get(w.IUniverInstanceService),i=X.getSheetCommandTarget(o,e);if(!i)return!1;const{unitId:c,subUnitId:y}=i,p={unitId:c,subUnitId:y,rule:e.rule},S=u.setConditionalRuleMutationUndoFactory(t,p),v=n.syncExecuteCommand(u.SetConditionalRuleMutation.id,p);return v&&r.pushUndoRedo({unitID:c,undoMutations:S,redoMutations:[{id:u.SetConditionalRuleMutation.id,params:p}]}),v}},jr="univer-conditional-formatting-wrap",Lr="univer-title",Ur="univer-label",Vr="univer-label-container",zr="univer-m-t-base",kr="univer-m-t-sm",$r="univer-m-t-xl",Ar="univer-m-l-sm",qr="univer-m-l-xl",Wr="univer-m-l-xxs",Hr="univer-m-l-0",Br="univer-m-r-0",z={conditionalFormattingWrap:jr,title:Lr,label:Ur,labelContainer:Vr,mTBase:zr,mTSm:kr,mTXl:$r,mLSm:Ar,mLXl:qr,mLXxs:Wr,mL0:Hr,mR0:Br};var Ce=function(){return Ce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Ce.apply(this,arguments)},Gr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r},$e=N.forwardRef(function(t,e){var r=t.icon,n=t.id,o=t.className,i=t.extend,c=Gr(t,["icon","id","className","extend"]),y="univerjs-icon univerjs-icon-".concat(n," ").concat(o||"").trim(),p=N.useRef("_".concat(Kr()));return cr(r,"".concat(n),{defIds:r.defIds,idSuffix:p.current},Ce({ref:e,className:y},c),i)});function cr(t,e,r,n,o){return N.createElement(t.tag,Ce(Ce({key:e},Xr(t,r,o)),n),(Yr(t,r).children||[]).map(function(i,c){return cr(i,"".concat(e,"-").concat(t.tag,"-").concat(c),r,void 0,o)}))}function Xr(t,e,r){var n=Ce({},t.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1),t.tag==="mask"&&n.id&&(n.id=n.id+e.idSuffix),Object.entries(n).forEach(function(i){var c=i[0],y=i[1];c==="mask"&&typeof y=="string"&&(n[c]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))});var o=e.defIds;return!o||o.length===0||(t.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+e.idSuffix),Object.entries(n).forEach(function(i){var c=i[0],y=i[1];typeof y=="string"&&(n[c]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),n}function Yr(t,e){var r,n=e.defIds;return!n||n.length===0?t:t.tag==="defs"&&(!((r=t.children)===null||r===void 0)&&r.length)?Ce(Ce({},t),{children:t.children.map(function(o){return typeof o.attrs.id=="string"&&n&&n.indexOf(o.attrs.id)>-1?Ce(Ce({},o),{attrs:Ce(Ce({},o.attrs),{id:o.attrs.id+e.idSuffix})}):o})}):t}function Kr(){return Math.random().toString(36).substring(2,8)}$e.displayName="UniverIcon";var Zr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Ot=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"delete-single",ref:e,icon:Zr}))});Ot.displayName="DeleteSingle";var Jr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},dr=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"increase-single",ref:e,icon:Jr}))});dr.displayName="IncreaseSingle";var Qr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},$t=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"more-down-single",ref:e,icon:Qr}))});$t.displayName="MoreDownSingle";var eo={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",style:{maskType:"alpha"},width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0 0H16V16H0z"}}]},{tag:"g",attrs:{fill:"currentColor",mask:"url(#mask0_622_8)"},children:[{tag:"path",attrs:{d:"M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z"}}]}]},fr=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"sequence-single",ref:e,icon:eo}))});fr.displayName="SequenceSingle";var to={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",style:{maskType:"alpha"},width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0.35 0.48H16.35V16.48H0.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},mt=N.forwardRef(function(t,e){return N.createElement($e,Object.assign({},t,{id:"slash-single",ref:e,icon:to}))});mt.displayName="SlashSingle";function no(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pr(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var Ht={exports:{}},We={},ot={exports:{}},ro=ot.exports,bn;function mn(){return bn||(bn=1,function(t,e){(function(r,n){n(e)})(ro,function(r){function n(A){return function(se,O,M,P,V,Y,q){return A(se,O,q)}}function o(A){return function(se,O,M,P){if(!se||!O||typeof se!="object"||typeof O!="object")return A(se,O,M,P);var V=P.get(se),Y=P.get(O);if(V&&Y)return V===O&&Y===se;P.set(se,O),P.set(O,se);var q=A(se,O,M,P);return P.delete(se),P.delete(O),q}}function i(A,J){var se={};for(var O in A)se[O]=A[O];for(var O in J)se[O]=J[O];return se}function c(A){return A.constructor===Object||A.constructor==null}function y(A){return typeof A.then=="function"}function p(A,J){return A===J||A!==A&&J!==J}var S="[object Arguments]",v="[object Boolean]",R="[object Date]",x="[object RegExp]",T="[object Map]",b="[object Number]",I="[object Object]",h="[object Set]",a="[object String]",s=Object.prototype.toString;function d(A){var J=A.areArraysEqual,se=A.areDatesEqual,O=A.areMapsEqual,M=A.areObjectsEqual,P=A.areRegExpsEqual,V=A.areSetsEqual,Y=A.createIsNestedEqual,q=Y(Z);function Z(K,te,ce){if(K===te)return!0;if(!K||!te||typeof K!="object"||typeof te!="object")return K!==K&&te!==te;if(c(K)&&c(te))return M(K,te,q,ce);var Me=Array.isArray(K),ye=Array.isArray(te);if(Me||ye)return Me===ye&&J(K,te,q,ce);var me=s.call(K);return me!==s.call(te)?!1:me===R?se(K,te,q,ce):me===x?P(K,te,q,ce):me===T?O(K,te,q,ce):me===h?V(K,te,q,ce):me===I||me===S?y(K)||y(te)?!1:M(K,te,q,ce):me===v||me===b||me===a?p(K.valueOf(),te.valueOf()):!1}return Z}function C(A,J,se,O){var M=A.length;if(J.length!==M)return!1;for(;M-- >0;)if(!se(A[M],J[M],M,M,A,J,O))return!1;return!0}var l=o(C);function m(A,J){return p(A.valueOf(),J.valueOf())}function f(A,J,se,O){var M=A.size===J.size;if(!M)return!1;if(!A.size)return!0;var P={},V=0;return A.forEach(function(Y,q){if(M){var Z=!1,K=0;J.forEach(function(te,ce){!Z&&!P[K]&&(Z=se(q,ce,V,K,A,J,O)&&se(Y,te,q,ce,A,J,O))&&(P[K]=!0),K++}),V++,M=Z}}),M}var g=o(f),F="_owner",j=Object.prototype.hasOwnProperty;function U(A,J,se,O){var M=Object.keys(A),P=M.length;if(Object.keys(J).length!==P)return!1;for(var V;P-- >0;){if(V=M[P],V===F){var Y=!!A.$$typeof,q=!!J.$$typeof;if((Y||q)&&Y!==q)return!1}if(!j.call(J,V)||!se(A[V],J[V],V,V,A,J,O))return!1}return!0}var L=o(U);function E(A,J){return A.source===J.source&&A.flags===J.flags}function D(A,J,se,O){var M=A.size===J.size;if(!M)return!1;if(!A.size)return!0;var P={};return A.forEach(function(V,Y){if(M){var q=!1,Z=0;J.forEach(function(K,te){!q&&!P[Z]&&(q=se(V,K,Y,te,A,J,O))&&(P[Z]=!0),Z++}),M=q}}),M}var k=o(D),B=Object.freeze({areArraysEqual:C,areDatesEqual:m,areMapsEqual:f,areObjectsEqual:U,areRegExpsEqual:E,areSetsEqual:D,createIsNestedEqual:n}),G=Object.freeze({areArraysEqual:l,areDatesEqual:m,areMapsEqual:g,areObjectsEqual:L,areRegExpsEqual:E,areSetsEqual:k,createIsNestedEqual:n}),ne=d(B);function Q(A,J){return ne(A,J,void 0)}var W=d(i(B,{createIsNestedEqual:function(){return p}}));function $(A,J){return W(A,J,void 0)}var re=d(G);function ie(A,J){return re(A,J,new WeakMap)}var le=d(i(G,{createIsNestedEqual:function(){return p}}));function pe(A,J){return le(A,J,new WeakMap)}function ge(A){return d(i(B,A(B)))}function Se(A){var J=d(i(G,A(G)));return function(se,O,M){return M===void 0&&(M=new WeakMap),J(se,O,M)}}r.circularDeepEqual=ie,r.circularShallowEqual=pe,r.createCustomCircularEqual=Se,r.createCustomEqual=ge,r.deepEqual=Q,r.sameValueZeroEqual=p,r.shallowEqual=$,Object.defineProperty(r,"__esModule",{value:!0})})}(ot,ot.exports)),ot.exports}var yt={exports:{}},Rn;function gn(){if(Rn)return yt.exports;Rn=1;function t(r){var n,o,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(n=0;n<c;n++)r[n]&&(o=t(r[n]))&&(i&&(i+=" "),i+=o)}else for(o in r)r[o]&&(i&&(i+=" "),i+=o);return i}function e(){for(var r,n,o=0,i="",c=arguments.length;o<c;o++)(r=arguments[o])&&(n=t(r))&&(i&&(i+=" "),i+=n);return i}return yt.exports=e,yt.exports.clsx=e,yt.exports}var ae={},Bt,Tn;function oo(){return Tn||(Tn=1,Bt=function(e,r,n){return e===r?!0:e.className===r.className&&n(e.style,r.style)&&e.width===r.width&&e.autoSize===r.autoSize&&e.cols===r.cols&&e.draggableCancel===r.draggableCancel&&e.draggableHandle===r.draggableHandle&&n(e.verticalCompact,r.verticalCompact)&&n(e.compactType,r.compactType)&&n(e.layout,r.layout)&&n(e.margin,r.margin)&&n(e.containerPadding,r.containerPadding)&&e.rowHeight===r.rowHeight&&e.maxRows===r.maxRows&&e.isBounded===r.isBounded&&e.isDraggable===r.isDraggable&&e.isResizable===r.isResizable&&e.allowOverlap===r.allowOverlap&&e.preventCollision===r.preventCollision&&e.useCSSTransforms===r.useCSSTransforms&&e.transformScale===r.transformScale&&e.isDroppable===r.isDroppable&&n(e.resizeHandles,r.resizeHandles)&&n(e.resizeHandle,r.resizeHandle)&&e.onLayoutChange===r.onLayoutChange&&e.onDragStart===r.onDragStart&&e.onDrag===r.onDrag&&e.onDragStop===r.onDragStop&&e.onResizeStart===r.onResizeStart&&e.onResize===r.onResize&&e.onResizeStop===r.onResizeStop&&e.onDrop===r.onDrop&&n(e.droppingItem,r.droppingItem)&&n(e.innerRef,r.innerRef)}),Bt}var In;function Ae(){if(In)return ae;In=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.bottom=n,ae.childrenEqual=p,ae.cloneLayout=o,ae.cloneLayoutItem=y,ae.collides=v,ae.compact=R,ae.compactItem=b,ae.compactType=A,ae.correctBounds=I,ae.fastPositionEqual=S,ae.fastRGLPropsEqual=void 0,ae.getAllCollisions=s,ae.getFirstCollision=a,ae.getLayoutItem=h,ae.getStatics=d,ae.modifyLayout=i,ae.moveElement=C,ae.moveElementAwayFromCollision=l,ae.noop=void 0,ae.perc=m,ae.resizeItemInDirection=W,ae.setTopLeft=re,ae.setTransform=$,ae.sortLayoutItems=ie,ae.sortLayoutItemsByColRow=pe,ae.sortLayoutItemsByRowCol=le,ae.synchronizeLayoutWithChildren=ge,ae.validateLayout=Se,ae.withLayoutItem=c;var t=mn(),e=r(N);function r(O){return O&&O.__esModule?O:{default:O}}function n(O){let M=0,P;for(let V=0,Y=O.length;V<Y;V++)P=O[V].y+O[V].h,P>M&&(M=P);return M}function o(O){const M=Array(O.length);for(let P=0,V=O.length;P<V;P++)M[P]=y(O[P]);return M}function i(O,M){const P=Array(O.length);for(let V=0,Y=O.length;V<Y;V++)M.i===O[V].i?P[V]=M:P[V]=O[V];return P}function c(O,M,P){let V=h(O,M);return V?(V=P(y(V)),O=i(O,V),[O,V]):[O,null]}function y(O){return{w:O.w,h:O.h,x:O.x,y:O.y,i:O.i,minW:O.minW,maxW:O.maxW,minH:O.minH,maxH:O.maxH,moved:!!O.moved,static:!!O.static,isDraggable:O.isDraggable,isResizable:O.isResizable,resizeHandles:O.resizeHandles,isBounded:O.isBounded}}function p(O,M){return(0,t.deepEqual)(e.default.Children.map(O,P=>P==null?void 0:P.key),e.default.Children.map(M,P=>P==null?void 0:P.key))&&(0,t.deepEqual)(e.default.Children.map(O,P=>P==null?void 0:P.props["data-grid"]),e.default.Children.map(M,P=>P==null?void 0:P.props["data-grid"]))}ae.fastRGLPropsEqual=oo();function S(O,M){return O.left===M.left&&O.top===M.top&&O.width===M.width&&O.height===M.height}function v(O,M){return!(O.i===M.i||O.x+O.w<=M.x||O.x>=M.x+M.w||O.y+O.h<=M.y||O.y>=M.y+M.h)}function R(O,M,P,V){const Y=d(O),q=ie(O,M),Z=Array(O.length);for(let K=0,te=q.length;K<te;K++){let ce=y(q[K]);ce.static||(ce=b(Y,ce,M,P,q,V),Y.push(ce)),Z[O.indexOf(q[K])]=ce,ce.moved=!1}return Z}const x={x:"w",y:"h"};function T(O,M,P,V){const Y=x[V];M[V]+=1;const q=O.map(Z=>Z.i).indexOf(M.i);for(let Z=q+1;Z<O.length;Z++){const K=O[Z];if(!K.static){if(K.y>M.y+M.h)break;v(M,K)&&T(O,K,P+M[Y],V)}}M[V]=P}function b(O,M,P,V,Y,q){const Z=P==="vertical",K=P==="horizontal";if(Z)for(M.y=Math.min(n(O),M.y);M.y>0&&!a(O,M);)M.y--;else if(K)for(;M.x>0&&!a(O,M);)M.x--;let te;for(;(te=a(O,M))&&!(P===null&&q);)if(K?T(Y,M,te.x+te.w,"x"):T(Y,M,te.y+te.h,"y"),K&&M.x+M.w>V)for(M.x=V-M.w,M.y++;M.x>0&&!a(O,M);)M.x--;return M.y=Math.max(M.y,0),M.x=Math.max(M.x,0),M}function I(O,M){const P=d(O);for(let V=0,Y=O.length;V<Y;V++){const q=O[V];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)P.push(q);else for(;a(P,q);)q.y++}return O}function h(O,M){for(let P=0,V=O.length;P<V;P++)if(O[P].i===M)return O[P]}function a(O,M){for(let P=0,V=O.length;P<V;P++)if(v(O[P],M))return O[P]}function s(O,M){return O.filter(P=>v(P,M))}function d(O){return O.filter(M=>M.static)}function C(O,M,P,V,Y,q,Z,K,te){if(M.static&&M.isDraggable!==!0||M.y===V&&M.x===P)return O;`${M.i}${String(P)}${String(V)}${M.x}${M.y}`;const ce=M.x,Me=M.y;typeof P=="number"&&(M.x=P),typeof V=="number"&&(M.y=V),M.moved=!0;let ye=ie(O,Z);(Z==="vertical"&&typeof V=="number"?Me>=V:Z==="horizontal"&&typeof P=="number"?ce>=P:!1)&&(ye=ye.reverse());const je=s(ye,M),vt=je.length>0;if(vt&&te)return o(O);if(vt&&q)return`${M.i}`,M.x=ce,M.y=Me,M.moved=!1,O;for(let Wt=0,Dr=je.length;Wt<Dr;Wt++){const Fe=je[Wt];`${M.i}${M.x}${M.y}${Fe.i}${Fe.x}${Fe.y}`,!Fe.moved&&(Fe.static?O=l(O,Fe,M,Y,Z):O=l(O,M,Fe,Y,Z))}return O}function l(O,M,P,V,Y,q){const Z=Y==="horizontal",K=Y==="vertical",te=M.static;if(V){V=!1;const ye={x:Z?Math.max(M.x-P.w,0):P.x,y:K?Math.max(M.y-P.h,0):P.y,w:P.w,h:P.h,i:"-1"},me=a(O,ye),je=me&&me.y+me.h>M.y,vt=me&&M.x+M.w>me.x;if(me){if(je&&K)return C(O,P,void 0,M.y+1,V,te,Y);if(je&&Y==null)return M.y=P.y,P.y=P.y+P.h,O;if(vt&&Z)return C(O,M,P.x,void 0,V,te,Y)}else return`${P.i}${ye.x}${ye.y}`,C(O,P,Z?ye.x:void 0,K?ye.y:void 0,V,te,Y)}const ce=Z?P.x+1:void 0,Me=K?P.y+1:void 0;return ce==null&&Me==null?O:C(O,P,Z?P.x+1:void 0,K?P.y+1:void 0,V,te,Y)}function m(O){return O*100+"%"}const f=(O,M,P,V)=>O+P>V?M:P,g=(O,M,P)=>O<0?M:P,F=O=>Math.max(0,O),j=O=>Math.max(0,O),U=(O,M,P)=>{let{left:V,height:Y,width:q}=M;const Z=O.top-(Y-O.height);return{left:V,width:q,height:g(Z,O.height,Y),top:j(Z)}},L=(O,M,P)=>{let{top:V,left:Y,height:q,width:Z}=M;return{top:V,height:q,width:f(O.left,O.width,Z,P),left:F(Y)}},E=(O,M,P)=>{let{top:V,height:Y,width:q}=M;const Z=O.left-(q-O.width);return{height:Y,width:Z<0?O.width:f(O.left,O.width,q,P),top:j(V),left:F(Z)}},D=(O,M,P)=>{let{top:V,left:Y,height:q,width:Z}=M;return{width:Z,left:Y,height:g(V,O.height,q),top:j(V)}},Q={n:U,ne:function(){return U(arguments.length<=0?void 0:arguments[0],L(...arguments))},e:L,se:function(){return D(arguments.length<=0?void 0:arguments[0],L(...arguments))},s:D,sw:function(){return D(arguments.length<=0?void 0:arguments[0],E(...arguments))},w:E,nw:function(){return U(arguments.length<=0?void 0:arguments[0],E(...arguments))}};function W(O,M,P,V){const Y=Q[O];return Y?Y(M,{...M,...P},V):P}function $(O){let{top:M,left:P,width:V,height:Y}=O;const q=`translate(${P}px,${M}px)`;return{transform:q,WebkitTransform:q,MozTransform:q,msTransform:q,OTransform:q,width:`${V}px`,height:`${Y}px`,position:"absolute"}}function re(O){let{top:M,left:P,width:V,height:Y}=O;return{top:`${M}px`,left:`${P}px`,width:`${V}px`,height:`${Y}px`,position:"absolute"}}function ie(O,M){return M==="horizontal"?pe(O):M==="vertical"?le(O):O}function le(O){return O.slice(0).sort(function(M,P){return M.y>P.y||M.y===P.y&&M.x>P.x?1:M.y===P.y&&M.x===P.x?0:-1})}function pe(O){return O.slice(0).sort(function(M,P){return M.x>P.x||M.x===P.x&&M.y>P.y?1:-1})}function ge(O,M,P,V,Y){O=O||[];const q=[];e.default.Children.forEach(M,K=>{if((K==null?void 0:K.key)==null)return;const te=h(O,String(K.key)),ce=K.props["data-grid"];te&&ce==null?q.push(y(te)):ce?q.push(y({...ce,i:K.key})):q.push(y({w:1,h:1,x:0,y:n(q),i:String(K.key)}))});const Z=I(q,{cols:P});return Y?Z:R(Z,V,P)}function Se(O){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const P=["x","y","w","h"];if(!Array.isArray(O))throw new Error(M+" must be an array!");for(let V=0,Y=O.length;V<Y;V++){const q=O[V];for(let Z=0;Z<P.length;Z++)if(typeof q[P[Z]]!="number")throw new Error("ReactGridLayout: "+M+"["+V+"]."+P[Z]+" must be a number!")}}function A(O){const{verticalCompact:M,compactType:P}=O||{};return M===!1?null:P}function J(){}const se=()=>{};return ae.noop=se,ae}var Te={},wn;function vn(){if(wn)return Te;wn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.calcGridColWidth=t,Te.calcGridItemPosition=r,Te.calcGridItemWHPx=e,Te.calcWH=o,Te.calcXY=n,Te.clamp=i;function t(c){const{margin:y,containerPadding:p,containerWidth:S,cols:v}=c;return(S-y[0]*(v-1)-p[0]*2)/v}function e(c,y,p){return Number.isFinite(c)?Math.round(y*c+Math.max(0,c-1)*p):c}function r(c,y,p,S,v,R){const{margin:x,containerPadding:T,rowHeight:b}=c,I=t(c),h={};return R&&R.resizing?(h.width=Math.round(R.resizing.width),h.height=Math.round(R.resizing.height)):(h.width=e(S,I,x[0]),h.height=e(v,b,x[1])),R&&R.dragging?(h.top=Math.round(R.dragging.top),h.left=Math.round(R.dragging.left)):R&&R.resizing&&typeof R.resizing.top=="number"&&typeof R.resizing.left=="number"?(h.top=Math.round(R.resizing.top),h.left=Math.round(R.resizing.left)):(h.top=Math.round((b+x[1])*p+T[1]),h.left=Math.round((I+x[0])*y+T[0])),h}function n(c,y,p,S,v){const{margin:R,cols:x,rowHeight:T,maxRows:b}=c,I=t(c);let h=Math.round((p-R[0])/(I+R[0])),a=Math.round((y-R[1])/(T+R[1]));return h=i(h,0,x-S),a=i(a,0,b-v),{x:h,y:a}}function o(c,y,p,S,v,R){const{margin:x,maxRows:T,cols:b,rowHeight:I}=c,h=t(c);let a=Math.round((y+x[0])/(h+x[0])),s=Math.round((p+x[1])/(I+x[1])),d=i(a,0,b-S),C=i(s,0,T-v);return["sw","w","nw"].indexOf(R)!==-1&&(d=i(a,0,b)),["nw","n","ne"].indexOf(R)!==-1&&(C=i(s,0,T)),{w:d,h:C}}function i(c,y,p){return Math.max(Math.min(c,p),y)}return Te}var He={},Gt={exports:{}},Xt,xn;function io(){if(xn)return Xt;xn=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xt=t,Xt}var Yt,_n;function ao(){if(_n)return Yt;_n=1;var t=io();function e(){}function r(){}return r.resetWarningCache=e,Yt=function(){function n(c,y,p,S,v,R){if(R!==t){var x=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 x.name="Invariant Violation",x}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:e};return i.PropTypes=i,i},Yt}var En;function Oe(){return En||(En=1,Gt.exports=ao()()),Gt.exports}var Be={exports:{}},Kt={};function hr(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=hr(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function On(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=hr(t))&&(n&&(n+=" "),n+=e);return n}const so=Object.freeze(Object.defineProperty({__proto__:null,clsx:On,default:On},Symbol.toStringTag,{value:"Module"})),lo=pr(so);var fe={},_e={},Mn;function At(){if(Mn)return _e;Mn=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.dontSetMe=o,_e.findInArray=t,_e.int=n,_e.isFunction=e,_e.isNum=r;function t(i,c){for(let y=0,p=i.length;y<p;y++)if(c.apply(c,[i[y],y,i]))return i[y]}function e(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Function]"}function r(i){return typeof i=="number"&&!isNaN(i)}function n(i){return parseInt(i,10)}function o(i,c,y){if(i[c])return new Error("Invalid prop ".concat(c," passed to ").concat(y," - do not set this, set it on the child."))}return _e}var Ee={},Fn;function uo(){if(Fn)return Ee;Fn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.browserPrefixToKey=r,Ee.browserPrefixToStyle=n,Ee.default=void 0,Ee.getPrefix=e;const t=["Moz","Webkit","O","ms"];function e(){var i;let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const y=(i=window.document)===null||i===void 0||(i=i.documentElement)===null||i===void 0?void 0:i.style;if(!y||c in y)return"";for(let p=0;p<t.length;p++)if(r(c,t[p])in y)return t[p];return""}function r(i,c){return c?"".concat(c).concat(o(i)):i}function n(i,c){return c?"-".concat(c.toLowerCase(),"-").concat(i):i}function o(i){let c="",y=!0;for(let p=0;p<i.length;p++)y?(c+=i[p].toUpperCase(),y=!1):i[p]==="-"?y=!0:c+=i[p];return c}return Ee.default=e(),Ee}var Dn;function yn(){if(Dn)return fe;Dn=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=l,fe.addEvent=y,fe.addUserSelectStyles=d,fe.createCSSTransform=b,fe.createSVGTransform=I,fe.getTouch=a,fe.getTouchIdentifier=s,fe.getTranslation=h,fe.innerHeight=R,fe.innerWidth=x,fe.matchesSelector=i,fe.matchesSelectorAndParentsTo=c,fe.offsetXYFromParent=T,fe.outerHeight=S,fe.outerWidth=v,fe.removeClassName=m,fe.removeEvent=p,fe.removeUserSelectStyles=C;var t=At(),e=n(uo());function r(f){if(typeof WeakMap!="function")return null;var g=new WeakMap,F=new WeakMap;return(r=function(j){return j?F:g})(f)}function n(f,g){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var F=r(g);if(F&&F.has(f))return F.get(f);var j={},U=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var L in f)if(L!=="default"&&Object.prototype.hasOwnProperty.call(f,L)){var E=U?Object.getOwnPropertyDescriptor(f,L):null;E&&(E.get||E.set)?Object.defineProperty(j,L,E):j[L]=f[L]}return j.default=f,F&&F.set(f,j),j}let o="";function i(f,g){return o||(o=(0,t.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(F){return(0,t.isFunction)(f[F])})),(0,t.isFunction)(f[o])?f[o](g):!1}function c(f,g,F){let j=f;do{if(i(j,g))return!0;if(j===F)return!1;j=j.parentNode}while(j);return!1}function y(f,g,F,j){if(!f)return;const U={capture:!0,...j};f.addEventListener?f.addEventListener(g,F,U):f.attachEvent?f.attachEvent("on"+g,F):f["on"+g]=F}function p(f,g,F,j){if(!f)return;const U={capture:!0,...j};f.removeEventListener?f.removeEventListener(g,F,U):f.detachEvent?f.detachEvent("on"+g,F):f["on"+g]=null}function S(f){let g=f.clientHeight;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g+=(0,t.int)(F.borderTopWidth),g+=(0,t.int)(F.borderBottomWidth),g}function v(f){let g=f.clientWidth;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g+=(0,t.int)(F.borderLeftWidth),g+=(0,t.int)(F.borderRightWidth),g}function R(f){let g=f.clientHeight;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g-=(0,t.int)(F.paddingTop),g-=(0,t.int)(F.paddingBottom),g}function x(f){let g=f.clientWidth;const F=f.ownerDocument.defaultView.getComputedStyle(f);return g-=(0,t.int)(F.paddingLeft),g-=(0,t.int)(F.paddingRight),g}function T(f,g,F){const U=g===g.ownerDocument.body?{left:0,top:0}:g.getBoundingClientRect(),L=(f.clientX+g.scrollLeft-U.left)/F,E=(f.clientY+g.scrollTop-U.top)/F;return{x:L,y:E}}function b(f,g){const F=h(f,g,"px");return{[(0,e.browserPrefixToKey)("transform",e.default)]:F}}function I(f,g){return h(f,g,"")}function h(f,g,F){let{x:j,y:U}=f,L="translate(".concat(j).concat(F,",").concat(U).concat(F,")");if(g){const E="".concat(typeof g.x=="string"?g.x:g.x+F),D="".concat(typeof g.y=="string"?g.y:g.y+F);L="translate(".concat(E,", ").concat(D,")")+L}return L}function a(f,g){return f.targetTouches&&(0,t.findInArray)(f.targetTouches,F=>g===F.identifier)||f.changedTouches&&(0,t.findInArray)(f.changedTouches,F=>g===F.identifier)}function s(f){if(f.targetTouches&&f.targetTouches[0])return f.targetTouches[0].identifier;if(f.changedTouches&&f.changedTouches[0])return f.changedTouches[0].identifier}function d(f){if(!f)return;let g=f.getElementById("react-draggable-style-el");g||(g=f.createElement("style"),g.type="text/css",g.id="react-draggable-style-el",g.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
2
2
  `,g.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
3
3
  `,f.getElementsByTagName("head")[0].appendChild(g)),f.body&&l(f.body,"react-draggable-transparent-selection")}function C(f){if(f)try{if(f.body&&m(f.body,"react-draggable-transparent-selection"),f.selection)f.selection.empty();else{const g=(f.defaultView||window).getSelection();g&&g.type!=="Caret"&&g.removeAllRanges()}}catch{}}function l(f,g){f.classList?f.classList.add(g):f.className.match(new RegExp("(?:^|\\s)".concat(g,"(?!\\S)")))||(f.className+=" ".concat(g))}function m(f,g){f.classList?f.classList.remove(g):f.className=f.className.replace(new RegExp("(?:^|\\s)".concat(g,"(?!\\S)"),"g"),"")}return fe}var Re={},Pn;function mr(){if(Pn)return Re;Pn=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.canDragX=o,Re.canDragY=i,Re.createCoreData=y,Re.createDraggableData=p,Re.getBoundPosition=r,Re.getControlPosition=c,Re.snapToGrid=n;var t=At(),e=yn();function r(R,x,T){if(!R.props.bounds)return[x,T];let{bounds:b}=R.props;b=typeof b=="string"?b:S(b);const I=v(R);if(typeof b=="string"){const{ownerDocument:h}=I,a=h.defaultView;let s;if(b==="parent"?s=I.parentNode:s=h.querySelector(b),!(s instanceof a.HTMLElement))throw new Error('Bounds selector "'+b+'" could not find an element.');const d=s,C=a.getComputedStyle(I),l=a.getComputedStyle(d);b={left:-I.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(C.marginLeft),top:-I.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(C.marginTop),right:(0,e.innerWidth)(d)-(0,e.outerWidth)(I)-I.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(C.marginRight),bottom:(0,e.innerHeight)(d)-(0,e.outerHeight)(I)-I.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(C.marginBottom)}}return(0,t.isNum)(b.right)&&(x=Math.min(x,b.right)),(0,t.isNum)(b.bottom)&&(T=Math.min(T,b.bottom)),(0,t.isNum)(b.left)&&(x=Math.max(x,b.left)),(0,t.isNum)(b.top)&&(T=Math.max(T,b.top)),[x,T]}function n(R,x,T){const b=Math.round(x/R[0])*R[0],I=Math.round(T/R[1])*R[1];return[b,I]}function o(R){return R.props.axis==="both"||R.props.axis==="x"}function i(R){return R.props.axis==="both"||R.props.axis==="y"}function c(R,x,T){const b=typeof x=="number"?(0,e.getTouch)(R,x):null;if(typeof x=="number"&&!b)return null;const I=v(T),h=T.props.offsetParent||I.offsetParent||I.ownerDocument.body;return(0,e.offsetXYFromParent)(b||R,h,T.props.scale)}function y(R,x,T){const b=!(0,t.isNum)(R.lastX),I=v(R);return b?{node:I,deltaX:0,deltaY:0,lastX:x,lastY:T,x,y:T}:{node:I,deltaX:x-R.lastX,deltaY:T-R.lastY,lastX:R.lastX,lastY:R.lastY,x,y:T}}function p(R,x){const T=R.props.scale;return{node:x.node,x:R.state.x+x.deltaX/T,y:R.state.y+x.deltaY/T,deltaX:x.deltaX/T,deltaY:x.deltaY/T,lastX:R.state.x,lastY:R.state.y}}function S(R){return{left:R.left,top:R.top,right:R.right,bottom:R.bottom}}function v(R){const x=R.findDOMNode();if(!x)throw new Error("<DraggableCore>: Unmounted during event!");return x}return Re}var Ge={},Ct={},Nn;function gr(){if(Nn)return Ct;Nn=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.default=t;function t(){}return Ct}var jn;function co(){if(jn)return Ge;jn=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.default=void 0;var t=S(N),e=y(Oe()),r=y(lr),n=yn(),o=mr(),i=At(),c=y(gr());function y(h){return h&&h.__esModule?h:{default:h}}function p(h){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(p=function(d){return d?s:a})(h)}function S(h,a){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=p(a);if(s&&s.has(h))return s.get(h);var d={},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var m=C?Object.getOwnPropertyDescriptor(h,l):null;m&&(m.get||m.set)?Object.defineProperty(d,l,m):d[l]=h[l]}return d.default=h,s&&s.set(h,d),d}function v(h,a,s){return a=R(a),a in h?Object.defineProperty(h,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[a]=s,h}function R(h){var a=x(h,"string");return typeof a=="symbol"?a:String(a)}function x(h,a){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var d=s.call(h,a);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(h)}const T={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let b=T.mouse,I=class extends t.Component{constructor(){super(...arguments),v(this,"dragging",!1),v(this,"lastX",NaN),v(this,"lastY",NaN),v(this,"touchIdentifier",null),v(this,"mounted",!1),v(this,"handleDragStart",a=>{if(this.props.onMouseDown(a),!this.props.allowAnyClick&&typeof a.button=="number"&&a.button!==0)return!1;const s=this.findDOMNode();if(!s||!s.ownerDocument||!s.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:d}=s;if(this.props.disabled||!(a.target instanceof d.defaultView.Node)||this.props.handle&&!(0,n.matchesSelectorAndParentsTo)(a.target,this.props.handle,s)||this.props.cancel&&(0,n.matchesSelectorAndParentsTo)(a.target,this.props.cancel,s))return;a.type==="touchstart"&&a.preventDefault();const C=(0,n.getTouchIdentifier)(a);this.touchIdentifier=C;const l=(0,o.getControlPosition)(a,C,this);if(l==null)return;const{x:m,y:f}=l,g=(0,o.createCoreData)(this,m,f);(0,c.default)("DraggableCore: handleDragStart: %j",g),(0,c.default)("calling",this.props.onStart),!(this.props.onStart(a,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,n.addUserSelectStyles)(d),this.dragging=!0,this.lastX=m,this.lastY=f,(0,n.addEvent)(d,b.move,this.handleDrag),(0,n.addEvent)(d,b.stop,this.handleDragStop))}),v(this,"handleDrag",a=>{const s=(0,o.getControlPosition)(a,this.touchIdentifier,this);if(s==null)return;let{x:d,y:C}=s;if(Array.isArray(this.props.grid)){let f=d-this.lastX,g=C-this.lastY;if([f,g]=(0,o.snapToGrid)(this.props.grid,f,g),!f&&!g)return;d=this.lastX+f,C=this.lastY+g}const l=(0,o.createCoreData)(this,d,C);if((0,c.default)("DraggableCore: handleDrag: %j",l),this.props.onDrag(a,l)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=d,this.lastY=C}),v(this,"handleDragStop",a=>{if(!this.dragging)return;const s=(0,o.getControlPosition)(a,this.touchIdentifier,this);if(s==null)return;let{x:d,y:C}=s;if(Array.isArray(this.props.grid)){let g=d-this.lastX||0,F=C-this.lastY||0;[g,F]=(0,o.snapToGrid)(this.props.grid,g,F),d=this.lastX+g,C=this.lastY+F}const l=(0,o.createCoreData)(this,d,C);if(this.props.onStop(a,l)===!1||this.mounted===!1)return!1;const f=this.findDOMNode();f&&this.props.enableUserSelectHack&&(0,n.removeUserSelectStyles)(f.ownerDocument),(0,c.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,f&&((0,c.default)("DraggableCore: Removing handlers"),(0,n.removeEvent)(f.ownerDocument,b.move,this.handleDrag),(0,n.removeEvent)(f.ownerDocument,b.stop,this.handleDragStop))}),v(this,"onMouseDown",a=>(b=T.mouse,this.handleDragStart(a))),v(this,"onMouseUp",a=>(b=T.mouse,this.handleDragStop(a))),v(this,"onTouchStart",a=>(b=T.touch,this.handleDragStart(a))),v(this,"onTouchEnd",a=>(b=T.touch,this.handleDragStop(a)))}componentDidMount(){this.mounted=!0;const a=this.findDOMNode();a&&(0,n.addEvent)(a,T.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const a=this.findDOMNode();if(a){const{ownerDocument:s}=a;(0,n.removeEvent)(s,T.mouse.move,this.handleDrag),(0,n.removeEvent)(s,T.touch.move,this.handleDrag),(0,n.removeEvent)(s,T.mouse.stop,this.handleDragStop),(0,n.removeEvent)(s,T.touch.stop,this.handleDragStop),(0,n.removeEvent)(a,T.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,n.removeUserSelectStyles)(s)}}findDOMNode(){var a,s;return(a=this.props)!==null&&a!==void 0&&a.nodeRef?(s=this.props)===null||s===void 0||(s=s.nodeRef)===null||s===void 0?void 0:s.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ge.default=I,v(I,"displayName","DraggableCore"),v(I,"propTypes",{allowAnyClick:e.default.bool,children:e.default.node.isRequired,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:function(h,a){if(h[a]&&h[a].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:e.default.arrayOf(e.default.number),handle:e.default.string,cancel:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number,className:i.dontSetMe,style:i.dontSetMe,transform:i.dontSetMe}),v(I,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ge}var Ln;function fo(){return Ln||(Ln=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return p.default}}),t.default=void 0;var e=x(N),r=v(Oe()),n=v(lr),o=v(lo),i=yn(),c=mr(),y=At(),p=v(co()),S=v(gr());function v(s){return s&&s.__esModule?s:{default:s}}function R(s){if(typeof WeakMap!="function")return null;var d=new WeakMap,C=new WeakMap;return(R=function(l){return l?C:d})(s)}function x(s,d){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var C=R(d);if(C&&C.has(s))return C.get(s);var l={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in s)if(f!=="default"&&Object.prototype.hasOwnProperty.call(s,f)){var g=m?Object.getOwnPropertyDescriptor(s,f):null;g&&(g.get||g.set)?Object.defineProperty(l,f,g):l[f]=s[f]}return l.default=s,C&&C.set(s,l),l}function T(){return T=Object.assign?Object.assign.bind():function(s){for(var d=1;d<arguments.length;d++){var C=arguments[d];for(var l in C)Object.prototype.hasOwnProperty.call(C,l)&&(s[l]=C[l])}return s},T.apply(this,arguments)}function b(s,d,C){return d=I(d),d in s?Object.defineProperty(s,d,{value:C,enumerable:!0,configurable:!0,writable:!0}):s[d]=C,s}function I(s){var d=h(s,"string");return typeof d=="symbol"?d:String(d)}function h(s,d){if(typeof s!="object"||s===null)return s;var C=s[Symbol.toPrimitive];if(C!==void 0){var l=C.call(s,d);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(s)}class a extends e.Component{static getDerivedStateFromProps(d,C){let{position:l}=d,{prevPropsPosition:m}=C;return l&&(!m||l.x!==m.x||l.y!==m.y)?((0,S.default)("Draggable: getDerivedStateFromProps %j",{position:l,prevPropsPosition:m}),{x:l.x,y:l.y,prevPropsPosition:{...l}}):null}constructor(d){super(d),b(this,"onDragStart",(C,l)=>{if((0,S.default)("Draggable: onDragStart: %j",l),this.props.onStart(C,(0,c.createDraggableData)(this,l))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),b(this,"onDrag",(C,l)=>{if(!this.state.dragging)return!1;(0,S.default)("Draggable: onDrag: %j",l);const m=(0,c.createDraggableData)(this,l),f={x:m.x,y:m.y,slackX:0,slackY:0};if(this.props.bounds){const{x:F,y:j}=f;f.x+=this.state.slackX,f.y+=this.state.slackY;const[U,L]=(0,c.getBoundPosition)(this,f.x,f.y);f.x=U,f.y=L,f.slackX=this.state.slackX+(F-f.x),f.slackY=this.state.slackY+(j-f.y),m.x=f.x,m.y=f.y,m.deltaX=f.x-this.state.x,m.deltaY=f.y-this.state.y}if(this.props.onDrag(C,m)===!1)return!1;this.setState(f)}),b(this,"onDragStop",(C,l)=>{if(!this.state.dragging||this.props.onStop(C,(0,c.createDraggableData)(this,l))===!1)return!1;(0,S.default)("Draggable: onDragStop: %j",l);const f={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:F,y:j}=this.props.position;f.x=F,f.y=j}this.setState(f)}),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.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var d,C;return(d=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&d!==void 0?d:n.default.findDOMNode(this)}render(){const{axis:d,bounds:C,children:l,defaultPosition:m,defaultClassName:f,defaultClassNameDragging:g,defaultClassNameDragged:F,position:j,positionOffset:U,scale:L,...E}=this.props;let D={},k=null;const G=!!!j||this.state.dragging,ne=j||m,Q={x:(0,c.canDragX)(this)&&G?this.state.x:ne.x,y:(0,c.canDragY)(this)&&G?this.state.y:ne.y};this.state.isElementSVG?k=(0,i.createSVGTransform)(Q,U):D=(0,i.createCSSTransform)(Q,U);const W=(0,o.default)(l.props.className||"",f,{[g]:this.state.dragging,[F]:this.state.dragged});return e.createElement(p.default,T({},E,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),e.cloneElement(e.Children.only(l),{className:W,style:{...l.props.style,...D},transform:k}))}}t.default=a,b(a,"displayName","Draggable"),b(a,"propTypes",{...p.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:y.dontSetMe,style:y.dontSetMe,transform:y.dontSetMe}),b(a,"defaultProps",{...p.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(Kt)),Kt}var Un;function Cn(){if(Un)return Be.exports;Un=1;const{default:t,DraggableCore:e}=fo();return Be.exports=t,Be.exports.default=t,Be.exports.DraggableCore=e,Be.exports}var Xe={exports:{}},Ye={},St={},Vn;function po(){if(Vn)return St;Vn=1,St.__esModule=!0,St.cloneElement=y;var t=e(N);function e(p){return p&&p.__esModule?p:{default:p}}function r(p,S){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(p);S&&(R=R.filter(function(x){return Object.getOwnPropertyDescriptor(p,x).enumerable})),v.push.apply(v,R)}return v}function n(p){for(var S=1;S<arguments.length;S++){var v=arguments[S]!=null?arguments[S]:{};S%2?r(Object(v),!0).forEach(function(R){o(p,R,v[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):r(Object(v)).forEach(function(R){Object.defineProperty(p,R,Object.getOwnPropertyDescriptor(v,R))})}return p}function o(p,S,v){return S=i(S),S in p?Object.defineProperty(p,S,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[S]=v,p}function i(p){var S=c(p,"string");return typeof S=="symbol"?S:String(S)}function c(p,S){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var R=v.call(p,S);if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(p)}function y(p,S){return S.style&&p.props.style&&(S.style=n(n({},p.props.style),S.style)),S.className&&p.props.className&&(S.className=p.props.className+" "+S.className),t.default.cloneElement(p,S)}return St}var Ke={},zn;function vr(){if(zn)return Ke;zn=1,Ke.__esModule=!0,Ke.resizableProps=void 0;var t=e(Oe());Cn();function e(n){return n&&n.__esModule?n:{default:n}}var r={axis:t.default.oneOf(["both","x","y","none"]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];var y=i[0];if(y.axis==="both"||y.axis==="y"){var p;return(p=t.default.number).isRequired.apply(p,i)}return t.default.number.apply(t.default,i)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:t.default.number,width:function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];var y=i[0];if(y.axis==="both"||y.axis==="x"){var p;return(p=t.default.number).isRequired.apply(p,i)}return t.default.number.apply(t.default,i)}};return Ke.resizableProps=r,Ke}var kn;function yr(){if(kn)return Ye;kn=1,Ye.__esModule=!0,Ye.default=void 0;var t=c(N),e=Cn(),r=po(),n=vr(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function i(a){if(typeof WeakMap!="function")return null;var s=new WeakMap,d=new WeakMap;return(i=function(l){return l?d:s})(a)}function c(a,s){if(a&&a.__esModule)return a;if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var d=i(s);if(d&&d.has(a))return d.get(a);var C={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in a)if(m!=="default"&&Object.prototype.hasOwnProperty.call(a,m)){var f=l?Object.getOwnPropertyDescriptor(a,m):null;f&&(f.get||f.set)?Object.defineProperty(C,m,f):C[m]=a[m]}return C.default=a,d&&d.set(a,C),C}function y(){return y=Object.assign?Object.assign.bind():function(a){for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var C in d)Object.prototype.hasOwnProperty.call(d,C)&&(a[C]=d[C])}return a},y.apply(this,arguments)}function p(a,s){if(a==null)return{};var d={},C=Object.keys(a),l,m;for(m=0;m<C.length;m++)l=C[m],!(s.indexOf(l)>=0)&&(d[l]=a[l]);return d}function S(a,s){var d=Object.keys(a);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(a);s&&(C=C.filter(function(l){return Object.getOwnPropertyDescriptor(a,l).enumerable})),d.push.apply(d,C)}return d}function v(a){for(var s=1;s<arguments.length;s++){var d=arguments[s]!=null?arguments[s]:{};s%2?S(Object(d),!0).forEach(function(C){R(a,C,d[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(d)):S(Object(d)).forEach(function(C){Object.defineProperty(a,C,Object.getOwnPropertyDescriptor(d,C))})}return a}function R(a,s,d){return s=x(s),s in a?Object.defineProperty(a,s,{value:d,enumerable:!0,configurable:!0,writable:!0}):a[s]=d,a}function x(a){var s=T(a,"string");return typeof s=="symbol"?s:String(s)}function T(a,s){if(typeof a!="object"||a===null)return a;var d=a[Symbol.toPrimitive];if(d!==void 0){var C=d.call(a,s);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function b(a,s){a.prototype=Object.create(s.prototype),a.prototype.constructor=a,I(a,s)}function I(a,s){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,l){return C.__proto__=l,C},I(a,s)}var h=function(a){b(s,a);function s(){for(var C,l=arguments.length,m=new Array(l),f=0;f<l;f++)m[f]=arguments[f];return C=a.call.apply(a,[this].concat(m))||this,C.handleRefs={},C.lastHandleRect=null,C.slack=null,C}var d=s.prototype;return d.componentWillUnmount=function(){this.resetData()},d.resetData=function(){this.lastHandleRect=this.slack=null},d.runConstraints=function(l,m){var f=this.props,g=f.minConstraints,F=f.maxConstraints,j=f.lockAspectRatio;if(!g&&!F&&!j)return[l,m];if(j){var U=this.props.width/this.props.height,L=l-this.props.width,E=m-this.props.height;Math.abs(L)>Math.abs(E*U)?m=l/U:l=m*U}var D=l,k=m,B=this.slack||[0,0],G=B[0],ne=B[1];return l+=G,m+=ne,g&&(l=Math.max(g[0],l),m=Math.max(g[1],m)),F&&(l=Math.min(F[0],l),m=Math.min(F[1],m)),this.slack=[G+(D-l),ne+(k-m)],[l,m]},d.resizeHandler=function(l,m){var f=this;return function(g,F){var j=F.node,U=F.deltaX,L=F.deltaY;l==="onResizeStart"&&f.resetData();var E=(f.props.axis==="both"||f.props.axis==="x")&&m!=="n"&&m!=="s",D=(f.props.axis==="both"||f.props.axis==="y")&&m!=="e"&&m!=="w";if(!(!E&&!D)){var k=m[0],B=m[m.length-1],G=j.getBoundingClientRect();if(f.lastHandleRect!=null){if(B==="w"){var ne=G.left-f.lastHandleRect.left;U+=ne}if(k==="n"){var Q=G.top-f.lastHandleRect.top;L+=Q}}f.lastHandleRect=G,B==="w"&&(U=-U),k==="n"&&(L=-L);var W=f.props.width+(E?U/f.props.transformScale:0),$=f.props.height+(D?L/f.props.transformScale:0),re=f.runConstraints(W,$);W=re[0],$=re[1];var ie=W!==f.props.width||$!==f.props.height,le=typeof f.props[l]=="function"?f.props[l]:null,pe=l==="onResize"&&!ie;le&&!pe&&(g.persist==null||g.persist(),le(g,{node:j,size:{width:W,height:$},handle:m})),l==="onResizeStop"&&f.resetData()}}},d.renderResizeHandle=function(l,m){var f=this.props.handle;if(!f)return t.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:m});if(typeof f=="function")return f(l,m);var g=typeof f.type=="string",F=v({ref:m},g?{}:{handleAxis:l});return t.cloneElement(f,F)},d.render=function(){var l=this,m=this.props,f=m.children,g=m.className,F=m.draggableOpts;m.width,m.height,m.handle,m.handleSize,m.lockAspectRatio,m.axis,m.minConstraints,m.maxConstraints,m.onResize,m.onResizeStop,m.onResizeStart;var j=m.resizeHandles;m.transformScale;var U=p(m,o);return(0,r.cloneElement)(f,v(v({},U),{},{className:(g?g+" ":"")+"react-resizable",children:[].concat(f.props.children,j.map(function(L){var E,D=(E=l.handleRefs[L])!=null?E:l.handleRefs[L]=t.createRef();return t.createElement(e.DraggableCore,y({},F,{nodeRef:D,key:"resizableHandle-"+L,onStop:l.resizeHandler("onResizeStop",L),onStart:l.resizeHandler("onResizeStart",L),onDrag:l.resizeHandler("onResize",L)}),l.renderResizeHandle(L,D))}))}))},s}(t.Component);return Ye.default=h,h.propTypes=n.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},Ye}var Ze={},$n;function ho(){if($n)return Ze;$n=1,Ze.__esModule=!0,Ze.default=void 0;var t=y(N),e=i(Oe()),r=i(yr()),n=vr(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function i(s){return s&&s.__esModule?s:{default:s}}function c(s){if(typeof WeakMap!="function")return null;var d=new WeakMap,C=new WeakMap;return(c=function(m){return m?C:d})(s)}function y(s,d){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var C=c(d);if(C&&C.has(s))return C.get(s);var l={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in s)if(f!=="default"&&Object.prototype.hasOwnProperty.call(s,f)){var g=m?Object.getOwnPropertyDescriptor(s,f):null;g&&(g.get||g.set)?Object.defineProperty(l,f,g):l[f]=s[f]}return l.default=s,C&&C.set(s,l),l}function p(){return p=Object.assign?Object.assign.bind():function(s){for(var d=1;d<arguments.length;d++){var C=arguments[d];for(var l in C)Object.prototype.hasOwnProperty.call(C,l)&&(s[l]=C[l])}return s},p.apply(this,arguments)}function S(s,d){var C=Object.keys(s);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(s);d&&(l=l.filter(function(m){return Object.getOwnPropertyDescriptor(s,m).enumerable})),C.push.apply(C,l)}return C}function v(s){for(var d=1;d<arguments.length;d++){var C=arguments[d]!=null?arguments[d]:{};d%2?S(Object(C),!0).forEach(function(l){R(s,l,C[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(C)):S(Object(C)).forEach(function(l){Object.defineProperty(s,l,Object.getOwnPropertyDescriptor(C,l))})}return s}function R(s,d,C){return d=x(d),d in s?Object.defineProperty(s,d,{value:C,enumerable:!0,configurable:!0,writable:!0}):s[d]=C,s}function x(s){var d=T(s,"string");return typeof d=="symbol"?d:String(d)}function T(s,d){if(typeof s!="object"||s===null)return s;var C=s[Symbol.toPrimitive];if(C!==void 0){var l=C.call(s,d);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(s)}function b(s,d){if(s==null)return{};var C={},l=Object.keys(s),m,f;for(f=0;f<l.length;f++)m=l[f],!(d.indexOf(m)>=0)&&(C[m]=s[m]);return C}function I(s,d){s.prototype=Object.create(d.prototype),s.prototype.constructor=s,h(s,d)}function h(s,d){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,m){return l.__proto__=m,l},h(s,d)}var a=function(s){I(d,s);function d(){for(var l,m=arguments.length,f=new Array(m),g=0;g<m;g++)f[g]=arguments[g];return l=s.call.apply(s,[this].concat(f))||this,l.state={width:l.props.width,height:l.props.height,propsWidth:l.props.width,propsHeight:l.props.height},l.onResize=function(F,j){var U=j.size;l.props.onResize?(F.persist==null||F.persist(),l.setState(U,function(){return l.props.onResize&&l.props.onResize(F,j)})):l.setState(U)},l}d.getDerivedStateFromProps=function(m,f){return f.propsWidth!==m.width||f.propsHeight!==m.height?{width:m.width,height:m.height,propsWidth:m.width,propsHeight:m.height}:null};var C=d.prototype;return C.render=function(){var m=this.props,f=m.handle,g=m.handleSize;m.onResize;var F=m.onResizeStart,j=m.onResizeStop,U=m.draggableOpts,L=m.minConstraints,E=m.maxConstraints,D=m.lockAspectRatio,k=m.axis;m.width,m.height;var B=m.resizeHandles,G=m.style,ne=m.transformScale,Q=b(m,o);return t.createElement(r.default,{axis:k,draggableOpts:U,handle:f,handleSize:g,height:this.state.height,lockAspectRatio:D,maxConstraints:E,minConstraints:L,onResizeStart:F,onResize:this.onResize,onResizeStop:j,resizeHandles:B,transformScale:ne,width:this.state.width},t.createElement("div",p({},Q,{style:v(v({},G),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},d}(t.Component);return Ze.default=a,a.propTypes=v(v({},n.resizableProps),{},{children:e.default.element}),Ze}var An;function mo(){return An||(An=1,Xe.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},Xe.exports.Resizable=yr().default,Xe.exports.ResizableBox=ho().default),Xe.exports}var Ie={},qn;function Cr(){if(qn)return Ie;qn=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.resizeHandleType=Ie.resizeHandleAxesType=Ie.default=void 0;var t=r(Oe()),e=r(N);function r(i){return i&&i.__esModule?i:{default:i}}const n=Ie.resizeHandleAxesType=t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),o=Ie.resizeHandleType=t.default.oneOfType([t.default.node,t.default.func]);return Ie.default={className:t.default.string,style:t.default.object,width:t.default.number,autoSize:t.default.bool,cols:t.default.number,draggableCancel:t.default.string,draggableHandle:t.default.string,verticalCompact:function(i){i.verticalCompact},compactType:t.default.oneOf(["vertical","horizontal"]),layout:function(i){var c=i.layout;c!==void 0&&Ae().validateLayout(c,"layout")},margin:t.default.arrayOf(t.default.number),containerPadding:t.default.arrayOf(t.default.number),rowHeight:t.default.number,maxRows:t.default.number,isBounded:t.default.bool,isDraggable:t.default.bool,isResizable:t.default.bool,allowOverlap:t.default.bool,preventCollision:t.default.bool,useCSSTransforms:t.default.bool,transformScale:t.default.number,isDroppable:t.default.bool,resizeHandles:n,resizeHandle:o,onLayoutChange:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onDragStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,onResizeStop:t.default.func,onDrop:t.default.func,droppingItem:t.default.shape({i:t.default.string.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired}),children:function(i,c){const y=i[c],p={};e.default.Children.forEach(y,function(S){if((S==null?void 0:S.key)!=null){if(p[S.key])throw new Error('Duplicate child key "'+S.key+'" found! This will cause problems in ReactGridLayout.');p[S.key]=!0}})},innerRef:t.default.any},Ie}var Wn;function go(){if(Wn)return He;Wn=1,Object.defineProperty(He,"__esModule",{value:!0}),He.default=void 0;var t=p(N),e=p(Oe()),r=Cn(),n=mo(),o=Ae(),i=vn(),c=Cr(),y=p(gn());function p(T){return T&&T.__esModule?T:{default:T}}function S(T,b,I){return b=v(b),b in T?Object.defineProperty(T,b,{value:I,enumerable:!0,configurable:!0,writable:!0}):T[b]=I,T}function v(T){var b=R(T,"string");return typeof b=="symbol"?b:String(b)}function R(T,b){if(typeof T!="object"||T===null)return T;var I=T[Symbol.toPrimitive];if(I!==void 0){var h=I.call(T,b);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(T)}let x=class extends t.default.Component{constructor(){super(...arguments),S(this,"state",{resizing:null,dragging:null,className:""}),S(this,"elementRef",t.default.createRef()),S(this,"onDragStart",(b,I)=>{let{node:h}=I;const{onDragStart:a,transformScale:s}=this.props;if(!a)return;const d={top:0,left:0},{offsetParent:C}=h;if(!C)return;const l=C.getBoundingClientRect(),m=h.getBoundingClientRect(),f=m.left/s,g=l.left/s,F=m.top/s,j=l.top/s;d.left=f-g+C.scrollLeft,d.top=F-j+C.scrollTop,this.setState({dragging:d});const{x:U,y:L}=(0,i.calcXY)(this.getPositionParams(),d.top,d.left,this.props.w,this.props.h);return a.call(this,this.props.i,U,L,{e:b,node:h,newPosition:d})}),S(this,"onDrag",(b,I)=>{let{node:h,deltaX:a,deltaY:s}=I;const{onDrag:d}=this.props;if(!d)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let C=this.state.dragging.top+s,l=this.state.dragging.left+a;const{isBounded:m,i:f,w:g,h:F,containerWidth:j}=this.props,U=this.getPositionParams();if(m){const{offsetParent:B}=h;if(B){const{margin:G,rowHeight:ne,containerPadding:Q}=this.props,W=B.clientHeight-(0,i.calcGridItemWHPx)(F,ne,G[1]);C=(0,i.clamp)(C-Q[1],0,W);const $=(0,i.calcGridColWidth)(U),re=j-(0,i.calcGridItemWHPx)(g,$,G[0]);l=(0,i.clamp)(l-Q[0],0,re)}}const L={top:C,left:l};this.setState({dragging:L});const{containerPadding:E}=this.props,{x:D,y:k}=(0,i.calcXY)(U,C-E[1],l-E[0],g,F);return d.call(this,f,D,k,{e:b,node:h,newPosition:L})}),S(this,"onDragStop",(b,I)=>{let{node:h}=I;const{onDragStop:a}=this.props;if(!a)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:s,h:d,i:C,containerPadding:l}=this.props,{left:m,top:f}=this.state.dragging,g={top:f,left:m};this.setState({dragging:null});const{x:F,y:j}=(0,i.calcXY)(this.getPositionParams(),f-l[1],m-l[0],s,d);return a.call(this,C,F,j,{e:b,node:h,newPosition:g})}),S(this,"onResizeStop",(b,I,h)=>this.onResizeHandler(b,I,h,"onResizeStop")),S(this,"onResizeStart",(b,I,h)=>this.onResizeHandler(b,I,h,"onResizeStart")),S(this,"onResize",(b,I,h)=>this.onResizeHandler(b,I,h,"onResize"))}shouldComponentUpdate(b,I){if(this.props.children!==b.children||this.props.droppingPosition!==b.droppingPosition)return!0;const h=(0,i.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),a=(0,i.calcGridItemPosition)(this.getPositionParams(b),b.x,b.y,b.w,b.h,I);return!(0,o.fastPositionEqual)(h,a)||this.props.useCSSTransforms!==b.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(b){this.moveDroppingItem(b)}moveDroppingItem(b){const{droppingPosition:I}=this.props;if(!I)return;const h=this.elementRef.current;if(!h)return;const a=b.droppingPosition||{left:0,top:0},{dragging:s}=this.state,d=s&&I.left!==a.left||I.top!==a.top;if(!s)this.onDragStart(I.e,{node:h,deltaX:I.left,deltaY:I.top});else if(d){const C=I.left-s.left,l=I.top-s.top;this.onDrag(I.e,{node:h,deltaX:C,deltaY:l})}}getPositionParams(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:b.cols,containerPadding:b.containerPadding,containerWidth:b.containerWidth,margin:b.margin,maxRows:b.maxRows,rowHeight:b.rowHeight}}createStyle(b){const{usePercentages:I,containerWidth:h,useCSSTransforms:a}=this.props;let s;return a?s=(0,o.setTransform)(b):(s=(0,o.setTopLeft)(b),I&&(s.left=(0,o.perc)(b.left/h),s.width=(0,o.perc)(b.width/h))),s}mixinDraggable(b,I){return t.default.createElement(r.DraggableCore,{disabled:!I,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},b)}curryResizeHandler(b,I){return(h,a)=>I(h,a,b)}mixinResizable(b,I,h){const{cols:a,minW:s,minH:d,maxW:C,maxH:l,transformScale:m,resizeHandles:f,resizeHandle:g}=this.props,F=this.getPositionParams(),j=(0,i.calcGridItemPosition)(F,0,0,a,0).width,U=(0,i.calcGridItemPosition)(F,0,0,s,d),L=(0,i.calcGridItemPosition)(F,0,0,C,l),E=[U.width,U.height],D=[Math.min(L.width,j),Math.min(L.height,1/0)];return t.default.createElement(n.Resizable,{draggableOpts:{disabled:!h},className:h?void 0:"react-resizable-hide",width:I.width,height:I.height,minConstraints:E,maxConstraints:D,onResizeStop:this.curryResizeHandler(I,this.onResizeStop),onResizeStart:this.curryResizeHandler(I,this.onResizeStart),onResize:this.curryResizeHandler(I,this.onResize),transformScale:m,resizeHandles:f,handle:g},b)}onResizeHandler(b,I,h,a){let{node:s,size:d,handle:C}=I;const l=this.props[a];if(!l)return;const{x:m,y:f,i:g,maxH:F,minH:j,containerWidth:U}=this.props,{minW:L,maxW:E}=this.props;let D=d;s&&(D=(0,o.resizeItemInDirection)(C,h,d,U),this.setState({resizing:a==="onResizeStop"?null:D}));let{w:k,h:B}=(0,i.calcWH)(this.getPositionParams(),D.width,D.height,m,f,C);k=(0,i.clamp)(k,Math.max(L,1),E),B=(0,i.clamp)(B,j,F),l.call(this,g,k,B,{e:b,node:s,size:D,handle:C})}render(){const{x:b,y:I,w:h,h:a,isDraggable:s,isResizable:d,droppingPosition:C,useCSSTransforms:l}=this.props,m=(0,i.calcGridItemPosition)(this.getPositionParams(),b,I,h,a,this.state),f=t.default.Children.only(this.props.children);let g=t.default.cloneElement(f,{ref:this.elementRef,className:(0,y.default)("react-grid-item",f.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":s,"react-draggable-dragging":!!this.state.dragging,dropping:!!C,cssTransforms:l}),style:{...this.props.style,...f.props.style,...this.createStyle(m)}});return g=this.mixinResizable(g,m,d),g=this.mixinDraggable(g,s),g}};return He.default=x,S(x,"propTypes",{children:e.default.element,cols:e.default.number.isRequired,containerWidth:e.default.number.isRequired,rowHeight:e.default.number.isRequired,margin:e.default.array.isRequired,maxRows:e.default.number.isRequired,containerPadding:e.default.array.isRequired,x:e.default.number.isRequired,y:e.default.number.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired,minW:function(T,b){const I=T[b];if(typeof I!="number")return new Error("minWidth not Number");if(I>T.w||I>T.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(T,b){const I=T[b];if(typeof I!="number")return new Error("maxWidth not Number");if(I<T.w||I<T.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(T,b){const I=T[b];if(typeof I!="number")return new Error("minHeight not Number");if(I>T.h||I>T.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(T,b){const I=T[b];if(typeof I!="number")return new Error("maxHeight not Number");if(I<T.h||I<T.minH)return new Error("maxHeight smaller than item height/minHeight")},i:e.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,isDraggable:e.default.bool.isRequired,isResizable:e.default.bool.isRequired,isBounded:e.default.bool.isRequired,static:e.default.bool,useCSSTransforms:e.default.bool.isRequired,transformScale:e.default.number,className:e.default.string,handle:e.default.string,cancel:e.default.string,droppingPosition:e.default.shape({e:e.default.object.isRequired,left:e.default.number.isRequired,top:e.default.number.isRequired})}),S(x,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),He}var Hn;function Sr(){if(Hn)return We;Hn=1,Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var t=S(N),e=mn(),r=y(gn()),n=Ae(),o=vn(),i=y(go()),c=y(Cr());function y(h){return h&&h.__esModule?h:{default:h}}function p(h){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(p=function(d){return d?s:a})(h)}function S(h,a){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=p(a);if(s&&s.has(h))return s.get(h);var d={__proto__:null},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var m=C?Object.getOwnPropertyDescriptor(h,l):null;m&&(m.get||m.set)?Object.defineProperty(d,l,m):d[l]=h[l]}return d.default=h,s&&s.set(h,d),d}function v(h,a,s){return a=R(a),a in h?Object.defineProperty(h,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[a]=s,h}function R(h){var a=x(h,"string");return typeof a=="symbol"?a:String(a)}function x(h,a){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var d=s.call(h,a);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(h)}const T="react-grid-layout";let b=!1;try{b=/firefox/i.test(navigator.userAgent)}catch{}let I=class extends t.Component{constructor(){super(...arguments),v(this,"state",{activeDrag:null,layout:(0,n.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,n.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),v(this,"dragEnterCounter",0),v(this,"onDragStart",(a,s,d,C)=>{let{e:l,node:m}=C;const{layout:f}=this.state,g=(0,n.getLayoutItem)(f,a);if(!g)return;const F={w:g.w,h:g.h,x:g.x,y:g.y,placeholder:!0,i:a};return this.setState({oldDragItem:(0,n.cloneLayoutItem)(g),oldLayout:f,activeDrag:F}),this.props.onDragStart(f,g,g,null,l,m)}),v(this,"onDrag",(a,s,d,C)=>{let{e:l,node:m}=C;const{oldDragItem:f}=this.state;let{layout:g}=this.state;const{cols:F,allowOverlap:j,preventCollision:U}=this.props,L=(0,n.getLayoutItem)(g,a);if(!L)return;const E={w:L.w,h:L.h,x:L.x,y:L.y,placeholder:!0,i:a};g=(0,n.moveElement)(g,L,s,d,!0,U,(0,n.compactType)(this.props),F,j),this.props.onDrag(g,f,L,E,l,m),this.setState({layout:j?g:(0,n.compact)(g,(0,n.compactType)(this.props),F),activeDrag:E})}),v(this,"onDragStop",(a,s,d,C)=>{let{e:l,node:m}=C;if(!this.state.activeDrag)return;const{oldDragItem:f}=this.state;let{layout:g}=this.state;const{cols:F,preventCollision:j,allowOverlap:U}=this.props,L=(0,n.getLayoutItem)(g,a);if(!L)return;g=(0,n.moveElement)(g,L,s,d,!0,j,(0,n.compactType)(this.props),F,U);const D=U?g:(0,n.compact)(g,(0,n.compactType)(this.props),F);this.props.onDragStop(D,f,L,null,l,m);const{oldLayout:k}=this.state;this.setState({activeDrag:null,layout:D,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(D,k)}),v(this,"onResizeStart",(a,s,d,C)=>{let{e:l,node:m}=C;const{layout:f}=this.state,g=(0,n.getLayoutItem)(f,a);g&&(this.setState({oldResizeItem:(0,n.cloneLayoutItem)(g),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(f,g,g,null,l,m))}),v(this,"onResize",(a,s,d,C)=>{let{e:l,node:m,size:f,handle:g}=C;const{oldResizeItem:F}=this.state,{layout:j}=this.state,{cols:U,preventCollision:L,allowOverlap:E}=this.props;let D=!1,k,B,G;const[ne,Q]=(0,n.withLayoutItem)(j,a,$=>{let re;return B=$.x,G=$.y,["sw","w","nw","n","ne"].indexOf(g)!==-1&&(["sw","nw","w"].indexOf(g)!==-1&&(B=$.x+($.w-s),s=$.x!==B&&B<0?$.w:s,B=B<0?0:B),["ne","n","nw"].indexOf(g)!==-1&&(G=$.y+($.h-d),d=$.y!==G&&G<0?$.h:d,G=G<0?0:G),D=!0),L&&!E&&(re=(0,n.getAllCollisions)(j,{...$,w:s,h:d,x:B,y:G}).filter(le=>le.i!==$.i).length>0,re&&(G=$.y,d=$.h,B=$.x,s=$.w,D=!1)),$.w=s,$.h=d,$});if(!Q)return;k=ne,D&&(k=(0,n.moveElement)(ne,Q,B,G,!0,this.props.preventCollision,(0,n.compactType)(this.props),U,E));const W={w:Q.w,h:Q.h,x:Q.x,y:Q.y,static:!0,i:a};this.props.onResize(k,F,Q,W,l,m),this.setState({layout:E?k:(0,n.compact)(k,(0,n.compactType)(this.props),U),activeDrag:W})}),v(this,"onResizeStop",(a,s,d,C)=>{let{e:l,node:m}=C;const{layout:f,oldResizeItem:g}=this.state,{cols:F,allowOverlap:j}=this.props,U=(0,n.getLayoutItem)(f,a),L=j?f:(0,n.compact)(f,(0,n.compactType)(this.props),F);this.props.onResizeStop(L,g,U,null,l,m);const{oldLayout:E}=this.state;this.setState({activeDrag:null,layout:L,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(L,E)}),v(this,"onDragOver",a=>{var ne;if(a.preventDefault(),a.stopPropagation(),b&&!((ne=a.nativeEvent.target)!=null&&ne.classList.contains(T)))return!1;const{droppingItem:s,onDropDragOver:d,margin:C,cols:l,rowHeight:m,maxRows:f,width:g,containerPadding:F,transformScale:j}=this.props,U=d==null?void 0:d(a);if(U===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const L={...s,...U},{layout:E}=this.state,D=a.currentTarget.getBoundingClientRect(),k=a.clientX-D.left,B=a.clientY-D.top,G={left:k/j,top:B/j,e:a};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:Q,top:W}=this.state.droppingPosition;(Q!=k||W!=B)&&this.setState({droppingPosition:G})}}else{const Q={cols:l,margin:C,maxRows:f,rowHeight:m,containerWidth:g,containerPadding:F||C},W=(0,o.calcXY)(Q,B,k,L.w,L.h);this.setState({droppingDOMNode:t.createElement("div",{key:L.i}),droppingPosition:G,layout:[...E,{...L,x:W.x,y:W.y,static:!1,isDraggable:!0}]})}}),v(this,"removeDroppingPlaceholder",()=>{const{droppingItem:a,cols:s}=this.props,{layout:d}=this.state,C=(0,n.compact)(d.filter(l=>l.i!==a.i),(0,n.compactType)(this.props),s,this.props.allowOverlap);this.setState({layout:C,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),v(this,"onDragLeave",a=>{a.preventDefault(),a.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),v(this,"onDragEnter",a=>{a.preventDefault(),a.stopPropagation(),this.dragEnterCounter++}),v(this,"onDrop",a=>{a.preventDefault(),a.stopPropagation();const{droppingItem:s}=this.props,{layout:d}=this.state,C=d.find(l=>l.i===s.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(d,C,a)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(a,s){let d;return s.activeDrag?null:(!(0,e.deepEqual)(a.layout,s.propsLayout)||a.compactType!==s.compactType?d=a.layout:(0,n.childrenEqual)(a.children,s.children)||(d=s.layout),d?{layout:(0,n.synchronizeLayoutWithChildren)(d,a.children,a.cols,(0,n.compactType)(a),a.allowOverlap),compactType:a.compactType,children:a.children,propsLayout:a.layout}:null)}shouldComponentUpdate(a,s){return this.props.children!==a.children||!(0,n.fastRGLPropsEqual)(this.props,a,e.deepEqual)||this.state.activeDrag!==s.activeDrag||this.state.mounted!==s.mounted||this.state.droppingPosition!==s.droppingPosition}componentDidUpdate(a,s){if(!this.state.activeDrag){const d=this.state.layout,C=s.layout;this.onLayoutMaybeChanged(d,C)}}containerHeight(){if(!this.props.autoSize)return;const a=(0,n.bottom)(this.state.layout),s=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return a*this.props.rowHeight+(a-1)*this.props.margin[1]+s*2+"px"}onLayoutMaybeChanged(a,s){s||(s=this.state.layout),(0,e.deepEqual)(s,a)||this.props.onLayoutChange(a)}placeholder(){const{activeDrag:a}=this.state;if(!a)return null;const{width:s,cols:d,margin:C,containerPadding:l,rowHeight:m,maxRows:f,useCSSTransforms:g,transformScale:F}=this.props;return t.createElement(i.default,{w:a.w,h:a.h,x:a.x,y:a.y,i:a.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:s,cols:d,margin:C,containerPadding:l||C,maxRows:f,rowHeight:m,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:g,transformScale:F},t.createElement("div",null))}processGridItem(a,s){if(!a||!a.key)return;const d=(0,n.getLayoutItem)(this.state.layout,String(a.key));if(!d)return null;const{width:C,cols:l,margin:m,containerPadding:f,rowHeight:g,maxRows:F,isDraggable:j,isResizable:U,isBounded:L,useCSSTransforms:E,transformScale:D,draggableCancel:k,draggableHandle:B,resizeHandles:G,resizeHandle:ne}=this.props,{mounted:Q,droppingPosition:W}=this.state,$=typeof d.isDraggable=="boolean"?d.isDraggable:!d.static&&j,re=typeof d.isResizable=="boolean"?d.isResizable:!d.static&&U,ie=d.resizeHandles||G,le=$&&L&&d.isBounded!==!1;return t.createElement(i.default,{containerWidth:C,cols:l,margin:m,containerPadding:f||m,maxRows:F,rowHeight:g,cancel:k,handle:B,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:$,isResizable:re,isBounded:le,useCSSTransforms:E&&Q,usePercentages:!Q,transformScale:D,w:d.w,h:d.h,x:d.x,y:d.y,i:d.i,minH:d.minH,minW:d.minW,maxH:d.maxH,maxW:d.maxW,static:d.static,droppingPosition:s?W:void 0,resizeHandles:ie,resizeHandle:ne},a)}render(){const{className:a,style:s,isDroppable:d,innerRef:C}=this.props,l=(0,r.default)(T,a),m={height:this.containerHeight(),...s};return t.createElement("div",{ref:C,className:l,style:m,onDrop:d?this.onDrop:n.noop,onDragLeave:d?this.onDragLeave:n.noop,onDragEnter:d?this.onDragEnter:n.noop,onDragOver:d?this.onDragOver:n.noop},t.Children.map(this.props.children,f=>this.processGridItem(f)),d&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return We.default=I,v(I,"displayName","ReactGridLayout"),v(I,"propTypes",c.default),v(I,"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:n.noop,onDragStart:n.noop,onDrag:n.noop,onDragStop:n.noop,onResizeStart:n.noop,onResize:n.noop,onResizeStop:n.noop,onDrop:n.noop,onDropDragOver:n.noop}),We}var Je={},De={},Bn;function br(){if(Bn)return De;Bn=1,Object.defineProperty(De,"__esModule",{value:!0}),De.findOrGenerateResponsiveLayout=n,De.getBreakpointFromWidth=e,De.getColsFromBreakpoint=r,De.sortBreakpoints=o;var t=Ae();function e(i,c){const y=o(i);let p=y[0];for(let S=1,v=y.length;S<v;S++){const R=y[S];c>i[R]&&(p=R)}return p}function r(i,c){if(!c[i])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+i+" is missing!");return c[i]}function n(i,c,y,p,S,v){if(i[y])return(0,t.cloneLayout)(i[y]);let R=i[p];const x=o(c),T=x.slice(x.indexOf(y));for(let b=0,I=T.length;b<I;b++){const h=T[b];if(i[h]){R=i[h];break}}return R=(0,t.cloneLayout)(R||[]),(0,t.compact)((0,t.correctBounds)(R,{cols:S}),v,S)}function o(i){return Object.keys(i).sort(function(y,p){return i[y]-i[p]})}return De}var Gn;function vo(){if(Gn)return Je;Gn=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.default=void 0;var t=p(N),e=c(Oe()),r=mn(),n=Ae(),o=br(),i=c(Sr());function c(h){return h&&h.__esModule?h:{default:h}}function y(h){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(y=function(d){return d?s:a})(h)}function p(h,a){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=y(a);if(s&&s.has(h))return s.get(h);var d={__proto__:null},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var m=C?Object.getOwnPropertyDescriptor(h,l):null;m&&(m.get||m.set)?Object.defineProperty(d,l,m):d[l]=h[l]}return d.default=h,s&&s.set(h,d),d}function S(){return S=Object.assign?Object.assign.bind():function(h){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(h[d]=s[d])}return h},S.apply(this,arguments)}function v(h,a,s){return a=R(a),a in h?Object.defineProperty(h,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[a]=s,h}function R(h){var a=x(h,"string");return typeof a=="symbol"?a:String(a)}function x(h,a){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var d=s.call(h,a);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(h)}const T=h=>Object.prototype.toString.call(h);function b(h,a){return h==null?null:Array.isArray(h)?h:h[a]}let I=class extends t.Component{constructor(){super(...arguments),v(this,"state",this.generateInitialState()),v(this,"onLayoutChange",a=>{this.props.onLayoutChange(a,{...this.props.layouts,[this.state.breakpoint]:a})})}generateInitialState(){const{width:a,breakpoints:s,layouts:d,cols:C}=this.props,l=(0,o.getBreakpointFromWidth)(s,a),m=(0,o.getColsFromBreakpoint)(l,C),f=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,o.findOrGenerateResponsiveLayout)(d,s,l,l,m,f),breakpoint:l,cols:m}}static getDerivedStateFromProps(a,s){if(!(0,r.deepEqual)(a.layouts,s.layouts)){const{breakpoint:d,cols:C}=s;return{layout:(0,o.findOrGenerateResponsiveLayout)(a.layouts,a.breakpoints,d,d,C,a.compactType),layouts:a.layouts}}return null}componentDidUpdate(a){(this.props.width!=a.width||this.props.breakpoint!==a.breakpoint||!(0,r.deepEqual)(this.props.breakpoints,a.breakpoints)||!(0,r.deepEqual)(this.props.cols,a.cols))&&this.onWidthChange(a)}onWidthChange(a){const{breakpoints:s,cols:d,layouts:C,compactType:l}=this.props,m=this.props.breakpoint||(0,o.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),f=this.state.breakpoint,g=(0,o.getColsFromBreakpoint)(m,d),F={...C};if(f!==m||a.breakpoints!==s||a.cols!==d){f in F||(F[f]=(0,n.cloneLayout)(this.state.layout));let L=(0,o.findOrGenerateResponsiveLayout)(F,s,m,f,g,l);L=(0,n.synchronizeLayoutWithChildren)(L,this.props.children,g,l,this.props.allowOverlap),F[m]=L,this.props.onLayoutChange(L,F),this.props.onBreakpointChange(m,g),this.setState({breakpoint:m,layout:L,cols:g})}const j=b(this.props.margin,m),U=b(this.props.containerPadding,m);this.props.onWidthChange(this.props.width,j,g,U)}render(){const{breakpoint:a,breakpoints:s,cols:d,layouts:C,margin:l,containerPadding:m,onBreakpointChange:f,onLayoutChange:g,onWidthChange:F,...j}=this.props;return t.createElement(i.default,S({},j,{margin:b(l,this.state.breakpoint),containerPadding:b(m,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return Je.default=I,v(I,"propTypes",{breakpoint:e.default.string,breakpoints:e.default.object,allowOverlap:e.default.bool,cols:e.default.object,margin:e.default.oneOfType([e.default.array,e.default.object]),containerPadding:e.default.oneOfType([e.default.array,e.default.object]),layouts(h,a){if(T(h[a])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+T(h[a]));Object.keys(h[a]).forEach(s=>{if(!(s in h.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,n.validateLayout)(h.layouts[s],"layouts."+s)})},width:e.default.number.isRequired,onBreakpointChange:e.default.func,onLayoutChange:e.default.func,onWidthChange:e.default.func}),v(I,"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:n.noop,onLayoutChange:n.noop,onWidthChange:n.noop}),Je}var bt={},Rr=function(){if(typeof Map<"u")return Map;function t(e,r){var n=-1;return e.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},e.prototype.set=function(r,n){var o=t(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,o=t(n,r);~o&&n.splice(o,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o<i.length;o++){var c=i[o];r.call(n,c[1],c[0])}},e}()}(),on=typeof window<"u"&&typeof document<"u"&&window.document===document,Mt=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")()}(),yo=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Mt):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),Co=2;function So(t,e){var r=!1,n=!1,o=0;function i(){r&&(r=!1,t()),n&&y()}function c(){yo(i)}function y(){var p=Date.now();if(r){if(p-o<Co)return;n=!0}else r=!0,n=!1,setTimeout(c,e);o=p}return y}var bo=20,Ro=["top","right","bottom","left","width","height","size","weight"],To=typeof MutationObserver<"u",Io=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=So(this.refresh.bind(this),bo)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!on||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),To?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!on||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,o=Ro.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Tr=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},ze=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Mt},Ir=qt(0,0,0,0);function Ft(t){return parseFloat(t)||0}function Xn(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,o){var i=t["border-"+o+"-width"];return n+Ft(i)},0)}function wo(t){for(var e=["top","right","bottom","left"],r={},n=0,o=e;n<o.length;n++){var i=o[n],c=t["padding-"+i];r[i]=Ft(c)}return r}function xo(t){var e=t.getBBox();return qt(0,0,e.width,e.height)}function _o(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return Ir;var n=ze(t).getComputedStyle(t),o=wo(n),i=o.left+o.right,c=o.top+o.bottom,y=Ft(n.width),p=Ft(n.height);if(n.boxSizing==="border-box"&&(Math.round(y+i)!==e&&(y-=Xn(n,"left","right")+i),Math.round(p+c)!==r&&(p-=Xn(n,"top","bottom")+c)),!Oo(t)){var S=Math.round(y+i)-e,v=Math.round(p+c)-r;Math.abs(S)!==1&&(y-=S),Math.abs(v)!==1&&(p-=v)}return qt(o.left,o.top,y,p)}var Eo=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof ze(t).SVGGraphicsElement}:function(t){return t instanceof ze(t).SVGElement&&typeof t.getBBox=="function"}}();function Oo(t){return t===ze(t).document.documentElement}function Mo(t){return on?Eo(t)?xo(t):_o(t):Ir}function Fo(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(i.prototype);return Tr(c,{x:e,y:r,width:n,height:o,top:r,right:e+n,bottom:o+r,left:e}),c}function qt(t,e,r,n){return{x:t,y:e,width:r,height:n}}var Do=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=qt(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=Mo(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),Po=function(){function t(e,r){var n=Fo(r);Tr(this,{target:e,contentRect:n})}return t}(),No=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new Rr,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ze(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new Do(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ze(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new Po(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),wr=typeof WeakMap<"u"?new WeakMap:new Rr,xr=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Io.getInstance(),n=new No(e,r,this);wr.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){xr.prototype[t]=function(){var e;return(e=wr.get(this))[t].apply(e,arguments)}});var jo=function(){return typeof Mt.ResizeObserver<"u"?Mt.ResizeObserver:xr}();const Lo=Object.freeze(Object.defineProperty({__proto__:null,default:jo},Symbol.toStringTag,{value:"Module"})),Uo=pr(Lo);var Yn;function Vo(){if(Yn)return bt;Yn=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.default=x;var t=c(N),e=o(Oe()),r=o(Uo),n=o(gn());function o(T){return T&&T.__esModule?T:{default:T}}function i(T){if(typeof WeakMap!="function")return null;var b=new WeakMap,I=new WeakMap;return(i=function(h){return h?I:b})(T)}function c(T,b){if(T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var I=i(b);if(I&&I.has(T))return I.get(T);var h={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in T)if(s!=="default"&&Object.prototype.hasOwnProperty.call(T,s)){var d=a?Object.getOwnPropertyDescriptor(T,s):null;d&&(d.get||d.set)?Object.defineProperty(h,s,d):h[s]=T[s]}return h.default=T,I&&I.set(T,h),h}function y(){return y=Object.assign?Object.assign.bind():function(T){for(var b=1;b<arguments.length;b++){var I=arguments[b];for(var h in I)Object.prototype.hasOwnProperty.call(I,h)&&(T[h]=I[h])}return T},y.apply(this,arguments)}function p(T,b,I){return b=S(b),b in T?Object.defineProperty(T,b,{value:I,enumerable:!0,configurable:!0,writable:!0}):T[b]=I,T}function S(T){var b=v(T,"string");return typeof b=="symbol"?b:String(b)}function v(T,b){if(typeof T!="object"||T===null)return T;var I=T[Symbol.toPrimitive];if(I!==void 0){var h=I.call(T,b);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(T)}const R="react-grid-layout";function x(T){var b;return b=class extends t.Component{constructor(){super(...arguments),p(this,"state",{width:1280}),p(this,"elementRef",t.createRef()),p(this,"mounted",!1),p(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new r.default(a=>{if(this.elementRef.current instanceof HTMLElement){const d=a[0].contentRect.width;this.setState({width:d})}});const h=this.elementRef.current;h instanceof HTMLElement&&this.resizeObserver.observe(h)}componentWillUnmount(){this.mounted=!1;const h=this.elementRef.current;h instanceof HTMLElement&&this.resizeObserver.unobserve(h),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:h,...a}=this.props;return h&&!this.mounted?t.createElement("div",{className:(0,n.default)(this.props.className,R),style:this.props.style,ref:this.elementRef}):t.createElement(T,y({innerRef:this.elementRef},a,this.state))}},p(b,"defaultProps",{measureBeforeMount:!1}),p(b,"propTypes",{measureBeforeMount:e.default.bool}),b}return bt}var Kn;function zo(){return Kn||(Kn=1,function(t){t.exports=Sr().default,t.exports.utils=Ae(),t.exports.calculateUtils=vn(),t.exports.Responsive=vo().default,t.exports.Responsive.utils=br(),t.exports.WidthProvider=Vo().default}(Ht)),Ht.exports}var ko=zo();const $o=no(ko);var Ao=Object.getOwnPropertyDescriptor,qo=(t,e,r,n)=>{for(var o=n>1?void 0:n?Ao(e,r):e,i=t.length-1,c;i>=0;i--)(c=t[i])&&(o=c(o)||o);return o},Wo=(t,e)=>(r,n)=>e(r,n,t);let ke=class extends w.Disposable{constructor(e){super();xe(this,"_initLocal",()=>{});xe(this,"_findReplaceIndex",e=>{const r=/\{([^}]+)?\}/g,n=[];let o=r.exec(e);for(;o;)n.push({startIndex:o.index,key:Number(o[1]),endIndex:o.index+o[0].length-1}),o=r.exec(e);return n});this._localeService=e,this._initLocal()}tWithReactNode(e,...r){const n=this._localeService.getLocales(),o=e.split("."),i=n&&this._localeService.resolveKeyPath(n,o);if(typeof i=="string"){const c=[];return this._findReplaceIndex(i).forEach((y,p,S)=>{const v=S[p-1]||{endIndex:-1};if(v.endIndex+1<y.startIndex){const R=i.slice(v.endIndex+1,y.startIndex);R&&c.push(R)}if(r[y.key]&&c.push(r[y.key]),p===S.length-1){const R=i.slice(y.endIndex+1);R&&c.push(R)}}),c}return[]}};ke=qo([Wo(0,w.Inject(w.LocaleService))],ke);const Ho="univer-cf-preview",Rt={cfPreview:Ho},qe=t=>{var o,i;const e=t.rule;if(!e)return null;const r=N.useMemo(()=>{if(e.type===u.CFRuleType.colorScale){const c=e.config.map((S,v)=>({color:new w.ColorKit(S.color),value:v})),y=c.length-1;return new Array(5).fill("").map((S,v,R)=>v*y/(R.length-1)).map(S=>u.getColorScaleFromValue(c,S))}return null},[e]),n=N.useMemo(()=>{if(e.type===u.CFRuleType.iconSet)return e.config.map(c=>{const y=u.iconMap[c.iconType];return y&&y[Number(c.iconId)]})},[e]);switch(e.type){case u.CFRuleType.dataBar:{const{isGradient:c}=e.config,y={width:"50%",height:"100%"},p=c?`linear-gradient(to right, ${e.config.positiveColor||u.defaultDataBarPositiveColor}, rgb(255 255 255))`:e.config.positiveColor,S=c?`linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor||u.defaultDataBarNativeColor})`:e.config.nativeColor;return _.jsxs("div",{className:Rt.cfPreview,children:[_.jsx("div",{style:{...y,background:S,border:`1px solid ${e.config.nativeColor||u.defaultDataBarNativeColor}`}}),_.jsx("div",{style:{...y,background:p,border:`1px solid ${e.config.positiveColor||u.defaultDataBarPositiveColor}`}})]})}case u.CFRuleType.colorScale:return r&&_.jsx("div",{className:Rt.cfPreview,children:r.map((c,y)=>_.jsx("div",{style:{width:`${100/r.length}%`,height:"100%",background:c}},y))});case u.CFRuleType.iconSet:return n&&_.jsx("div",{className:Rt.cfPreview,children:n.map((c,y)=>c?_.jsx("img",{style:{height:"100%"},src:c},y):_.jsx(mt,{},y))});case u.CFRuleType.highlightCell:{const{ul:c,st:y,it:p,bl:S,bg:v,cl:R}=e.style,x=(c==null?void 0:c.s)===w.BooleanNumber.TRUE,T=(y==null?void 0:y.s)===w.BooleanNumber.TRUE,b=p===w.BooleanNumber.TRUE,I=S===w.BooleanNumber.TRUE,h=(o=v==null?void 0:v.rgb)!=null?o:u.DEFAULT_BG_COLOR,a=(i=R==null?void 0:R.rgb)!=null?i:u.DEFAULT_FONT_COLOR,s={fontWeight:I?"bold":void 0,fontStyle:b?"italic":void 0,textDecoration:`${x?"underline":""} ${T?"line-through":""}`.replace(/^ /,"")||void 0,backgroundColor:h,color:a};return _.jsx("div",{style:s,className:Rt.cfPreview,children:"123"})}}return null},Bo="univer-cf-rule-list",Go="univer-rule-selector",Xo="univer-select",Yo="univer-btn-list",Ko="univer-gap",Zo="univer-icon",Jo="univer-disabled",Qo="univer-rule-item",ei="univer-rule-describe",ti="univer-rule-type",ni="univer-rule-range",ri="univer-active",oi="univer-draggableHandle",ii="univer-delete-item",ai="univer-grid-layout-wrap",he={cfRuleList:Bo,ruleSelector:Go,select:Xo,btnList:Yo,gap:Ko,icon:Zo,disabled:Jo,ruleItem:Qo,ruleDescribe:ei,ruleType:ti,ruleRange:ni,active:ri,draggableHandle:oi,deleteItem:ii,gridLayoutWrap:ai},si=(t,e)=>{const r=t.rule;switch(r.type){case u.CFRuleType.colorScale:return e.t("sheet.cf.ruleType.colorScale");case u.CFRuleType.dataBar:return e.t("sheet.cf.ruleType.dataBar");case u.CFRuleType.iconSet:return e.t("sheet.cf.ruleType.iconSet");case u.CFRuleType.highlightCell:switch(r.subType){case u.CFSubRuleType.average:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`,e.t("sheet.cf.subRuleType.average"))}case u.CFSubRuleType.duplicateValues:return e.t("sheet.cf.subRuleType.duplicateValues");case u.CFSubRuleType.uniqueValues:return e.t("sheet.cf.subRuleType.uniqueValues");case u.CFSubRuleType.number:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`,...Array.isArray(r.value)?r.value.map(o=>String(o)):[String(r.value||"")])}case u.CFSubRuleType.text:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`,r.value||"")}case u.CFSubRuleType.timePeriod:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`)}case u.CFSubRuleType.rank:return r.isPercent?r.isBottom?e.t("sheet.cf.preview.describe.bottomNPercent",String(r.value)):e.t("sheet.cf.preview.describe.topNPercent",String(r.value)):r.isBottom?e.t("sheet.cf.preview.describe.bottomN",String(r.value)):e.t("sheet.cf.preview.describe.topN",String(r.value));case u.CFSubRuleType.formula:return e.t("sheet.cf.ruleType.formula")}}};let Zn=0;const li=t=>{const{onClick:e}=t,r=ee.useDependency(u.ConditionalFormattingRuleModel),n=ee.useDependency(w.IUniverInstanceService),o=ee.useDependency(X.SheetsSelectionsService),i=ee.useDependency(w.ICommandService),c=ee.useDependency(w.LocaleService),y=ee.useDependency(w.Injector),p=ee.useDependency(ke),S=ee.useObservable(()=>n.getCurrentTypeOfUnit$(w.UniverInstanceType.UNIVER_SHEET),void 0,void 0,[]),v=S.getUnitId(),R=S.getActiveSheet();if(!R)throw new Error("No active sheet found");const x=R.getSheetId(),[T,b]=N.useState([]),[I,h]=N.useState("2"),[a,s]=N.useState(0),[d,C]=N.useState(-1),[l,m]=N.useState(Zn),f=N.useRef(null),g=[{label:c.t("sheet.cf.panel.workSheet"),value:"2"},{label:c.t("sheet.cf.panel.selectedRange"),value:"1"}],F=()=>{const W=r.getSubunitRules(v,x);if(!W||!W.length)return[];if(I==="1"){const $=o.getCurrentLastSelection();if(!$)return[];const re=$.range;return W.filter(le=>le.ranges.some(pe=>w.Rectangle.intersects(pe,re)))}else if(I==="2")return[...W];return[]},[j,U]=N.useState(F);de.useHighlightRange(T),N.useEffect(()=>{const W=i.onCommandExecuted($=>{$.id===X.SetWorksheetActiveOperation.id&&s(Math.random())});return()=>W.dispose()}),N.useEffect(()=>{U(F)},[I,a,v,x]),N.useEffect(()=>{if(I==="2")return;const W=new be.Observable($=>{const re=[X.SetSelectionsOperation.id,u.AddConditionalRuleMutation.id,u.SetConditionalRuleMutation.id,u.DeleteConditionalRuleMutation.id,u.MoveConditionalRuleMutation.id],ie=i.onCommandExecuted(le=>{const{id:pe,params:ge}=le,Se=n.getCurrentUnitForType(w.UniverInstanceType.UNIVER_SHEET).getUnitId();re.includes(pe)&&ge.unitId===Se&&$.next(null)});return()=>ie.dispose()}).pipe(be.debounceTime(16)).subscribe(()=>{U(F)});return()=>{W.unsubscribe()}},[n,I,v,x]),N.useEffect(()=>{const W=r.$ruleChange.subscribe(()=>{s(Math.random())});return()=>W.unsubscribe()},[r]),N.useEffect(()=>{const W=()=>{var le;const ie=Math.max(0,(((le=f.current)==null?void 0:le.getBoundingClientRect().width)||0)-8);return Zn=ie,ie},re=new be.Observable(ie=>{const le=document.querySelector(".univer-sidebar");if(le){let pe=setTimeout(()=>{ie.next()},150);const ge=()=>{pe&&clearTimeout(pe),pe=null},Se=A=>{A.propertyName==="width"&&(ge(),ie.next())};return le.addEventListener("transitionend",Se),()=>{ge(),le.removeEventListener("transitionend",Se)}}}).pipe(be.debounceTime(16)).subscribe(()=>{m(W())});return()=>{re.unsubscribe()}},[]);const L=W=>{var ie;const $=n.getCurrentUnitForType(w.UniverInstanceType.UNIVER_SHEET).getUnitId(),re=(ie=n.getCurrentUnitForType(w.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:ie.getSheetId();if(!$||!re)throw new Error("No active sheet found");i.executeCommand(at.id,{unitId:$,subUnitId:re,cfId:W.cfId})},E=(W,$)=>{C($.y)},D=(W,$,re)=>{var A;C(-1);const ie=n.getCurrentUnitForType(w.UniverInstanceType.UNIVER_SHEET).getUnitId(),le=(A=n.getCurrentUnitForType(w.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:A.getSheetId();if(!ie||!le)throw new Error("No active sheet found");const pe=J=>{const se=j.length;return Math.min(se-1,Math.max(0,J))},ge=j[pe($.y)].cfId,Se=j[pe(re.y)].cfId;ge!==Se&&i.executeCommand(zt.id,{unitId:ie,subUnitId:le,start:{id:ge,type:"self"},end:{id:Se,type:re.y>$.y?"after":"before"}})},k=()=>{t.onCreate()},B=()=>{I==="2"?i.executeCommand(ht.id):I==="1"&&j.map($=>({unitId:v,subUnitId:x,cfId:$.cfId})).forEach($=>{i.executeCommand(at.id,$)})},G=N.useMemo(()=>{const W=n.getCurrentUnitForType(w.UniverInstanceType.UNIVER_SHEET),$=W.getActiveSheet();return j.filter(re=>{const ie=re.ranges;return X.checkRangesEditablePermission(y,W.getUnitId(),$.getSheetId(),ie)})},[j]),ne=G.map((W,$)=>({i:W.cfId,x:0,w:12,y:$,h:1,isResizable:!1})),Q=N.useMemo(()=>{const W=n.getCurrentUnitForType(w.UniverInstanceType.UNIVER_SHEET),$=W.getActiveSheet();return j.every(re=>{const ie=re.ranges;return X.checkRangesEditablePermission(y,W.getUnitId(),$.getSheetId(),ie)})},[j]);return _.jsxs("div",{className:he.cfRuleList,children:[_.jsxs("div",{className:he.ruleSelector,children:[_.jsx("div",{children:p.tWithReactNode("sheet.cf.panel.managerRuleSelect",_.jsx(oe.Select,{className:he.select,options:g,value:I,onChange:W=>{h(W)}})).map((W,$)=>_.jsx("span",{children:W},$))}),_.jsxs("div",{className:he.btnList,children:[_.jsx(oe.Tooltip,{title:c.t("sheet.cf.panel.createRule"),placement:"bottom",children:_.jsx("div",{className:`
4
4
  ${he.icon}