@sheetxl/react 0.8.0-beta.7 → 1.0.0
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/LICENSE.md +8 -7
- package/browser/esm/2YDUWXaXpl9cdsk7.mjs +8 -0
- package/browser/esm/64NfoZ1s7Oe3vdpX.mjs +60 -0
- package/browser/esm/BJDz5J4gFUEYi1Wz.mjs +36 -0
- package/browser/esm/B_CI6xMNropeWGgr.mjs +134 -0
- package/browser/esm/BgA4Cz8iMysciFOb.mjs +45 -0
- package/browser/esm/BkG6VuJDmu_hfIo6.mjs +31 -0
- package/browser/esm/BmO7yh4NjxeJylOD.mjs +14092 -0
- package/browser/esm/BwFFSeqtE3TIuvtc.mjs +341 -0
- package/browser/esm/CENTtj0PnF_tvpST.mjs +79 -0
- package/browser/esm/CVY0-_x6IgpdUVNp.mjs +264 -0
- package/browser/esm/CdyivRoMgPXvRiiE.mjs +197 -0
- package/browser/esm/CiylJlRA7mt8yjPD.mjs +128 -0
- package/browser/esm/D9CTIGFUbVGJkeVE.mjs +401 -0
- package/browser/esm/D9NgFucLwPgAQNgf.mjs +19 -0
- package/browser/esm/DdFOaG09eksHtKwT.mjs +145 -0
- package/browser/esm/DdHdNjRkzo1iShOo.mjs +78 -0
- package/browser/esm/DfIvpHB7HDdmIYNm.mjs +9560 -0
- package/browser/esm/DfNDtzixfTPjmoW_.mjs +32 -0
- package/browser/esm/Dtb9bOBjtPdUAr8x.mjs +20 -0
- package/browser/esm/Dz5pGpL4XWXVdntj.mjs +323 -0
- package/browser/esm/SJAlYSFKC-5yNZ-C.mjs +2706 -0
- package/browser/esm/chart.mjs +41 -0
- package/browser/esm/control.mjs +217 -0
- package/browser/esm/group.mjs +123 -0
- package/browser/esm/index.mjs +22289 -13986
- package/browser/esm/jHqSboF5oFvzSM7a.mjs +63 -0
- package/browser/esm/note.mjs +112 -0
- package/browser/esm/oljQE8EpIzoxUjUz.mjs +323 -0
- package/browser/esm/picture.mjs +7 -0
- package/browser/esm/shape.mjs +7 -0
- package/browser/esm/slicer.mjs +282 -0
- package/browser/esm/w8MsScJSe7QxP6jL.mjs +67 -0
- package/browser/esm/yRqWQRSVyiR1kYh8.mjs +42 -0
- package/licenses/dependencies.txt +284 -565
- package/node/esm/1XOgrNXKQF__O9SV.mjs +8 -0
- package/node/esm/Aw6aaKE_YOA1Vi_V.mjs +146 -0
- package/node/esm/B6Oqu2Gw1pwWPf_N.mjs +328 -0
- package/node/esm/BizlElAhqg_Bc624.mjs +198 -0
- package/node/esm/C06Y1xPsbxgn3YX7.mjs +128 -0
- package/node/esm/C2dHN_gvhBxlFFnJ.mjs +45 -0
- package/node/esm/C4_5UcCdys1hzt5E.mjs +68 -0
- package/node/esm/CIidiDtqyubz13ys.mjs +80 -0
- package/node/esm/CTFb8PjwC1q6yilw.mjs +80 -0
- package/node/esm/C_GJPG-BTFhta8GD.mjs +265 -0
- package/node/esm/CdTeYrDgGp-s-KNG.mjs +134 -0
- package/node/esm/CeMKhq6cSxfWzN5H.mjs +2706 -0
- package/node/esm/DJIBAu8bEDmlVjtD.mjs +20 -0
- package/node/esm/DUQ1PY9P63cTe_Es.mjs +37 -0
- package/node/esm/Db8NRp_kZ-FfkZaO.mjs +32 -0
- package/node/esm/Dl2kdvb4G_ddqeDN.mjs +19 -0
- package/node/esm/DlDr-o5nAZgPbn6R.mjs +1697 -0
- package/node/esm/DvRLP1lEBfwHBrEC.mjs +63 -0
- package/node/esm/JVlPlE1ys7DM3yCP.mjs +35 -0
- package/node/esm/NSddS40Vqf1xKdDd.mjs +406 -0
- package/node/esm/QqwCS9GFuDnQausz.mjs +66 -0
- package/node/esm/chart.mjs +41 -0
- package/node/esm/control.mjs +217 -0
- package/node/esm/group.mjs +123 -0
- package/node/esm/index.mjs +18027 -9614
- package/node/esm/note.mjs +113 -0
- package/node/esm/picture.mjs +326 -0
- package/node/esm/shape.mjs +342 -0
- package/node/esm/slicer.mjs +284 -0
- package/package.json +56 -15
- package/resources/contents.json +36 -0
- package/resources/locales/contents.json +84 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/movable.cmd.json +68 -0
- package/resources/locales/de/picture.cmd.json +188 -0
- package/resources/locales/de/pivot.cmd.json +79 -0
- package/resources/locales/de/shape.cmd.json +17 -0
- package/resources/locales/de/sheet.cmd.json +270 -16
- package/resources/locales/de/slicer.cmd.json +17 -0
- package/resources/locales/de/sparkline.cmd.json +301 -0
- package/resources/locales/de/table.cmd.json +13 -2
- package/resources/locales/de/ui.msg.json +358 -2
- package/resources/locales/de/workbook.cmd.json +8 -1
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/movable.cmd.json +68 -0
- package/resources/locales/en/picture.cmd.json +188 -0
- package/resources/locales/en/pivot.cmd.json +79 -0
- package/resources/locales/en/shape.cmd.json +17 -0
- package/resources/locales/en/sheet.cmd.json +283 -17
- package/resources/locales/en/slicer.cmd.json +17 -0
- package/resources/locales/en/sparkline.cmd.json +301 -0
- package/resources/locales/en/table.cmd.json +13 -2
- package/resources/locales/en/ui.msg.json +360 -2
- package/resources/locales/en/workbook.cmd.json +8 -1
- package/types/chart.d.ts +2 -0
- package/types/control.d.ts +2 -0
- package/types/group.d.ts +2 -0
- package/types/note.d.ts +2 -0
- package/types/picture.d.ts +2 -0
- package/types/shape.d.ts +2 -0
- package/types/slicer.d.ts +2 -0
- package/types/src/annotation/RangeAnnotationLayer.d.ts +110 -0
- package/types/src/annotation/RangeAnnotationTag.d.ts +23 -0
- package/types/src/annotation/RangeAnnotations.d.ts +180 -0
- package/types/src/annotation/index.d.ts +4 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +95 -3
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +11 -8
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/CornerTriangle.d.ts +2 -1
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/PivotButton.d.ts +55 -0
- package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
- package/types/src/cell/StaticCellRenderer.d.ts +3 -3
- package/types/src/cell/_DropdownFace.d.ts +29 -0
- package/types/src/cell/index.d.ts +10 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +12 -2
- package/types/src/chart/ChartElement.d.ts +122 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -1
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +38 -0
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +33 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +3 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
- package/types/src/checklist/ValueChecklist.d.ts +59 -18
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/commands/ContextualToolbar.d.ts +19 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
- package/types/src/commands/index.d.ts +1 -0
- package/types/src/comment/CommentCardRequest.d.ts +9 -9
- package/types/src/comment/index.d.ts +0 -1
- package/types/src/comment/useSheetComments.d.ts +2 -2
- package/types/src/conditionalFormat/ConditionalFormatPresets.d.ts +6 -6
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/control/FormControlRenderers.d.ts +22 -0
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -7
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
- package/types/src/editor/SheetCellInput.d.ts +14 -0
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +50 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/formulaPresentation.d.ts +4 -3
- package/types/src/editor/index.d.ts +2 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +3 -3
- package/types/src/editor/useFormulaInput.d.ts +6 -3
- package/types/src/editor/validationAlert.d.ts +24 -0
- package/types/src/form/FormulaInput.d.ts +5 -2
- package/types/src/form/useEditCommit.d.ts +23 -3
- package/types/src/form/useInputField.d.ts +2 -3
- package/types/src/frame/CommandContext.d.ts +101 -3
- package/types/src/group/GroupEditor.d.ts +25 -0
- package/types/src/index.d.ts +10 -1
- package/types/src/layer/BorderLayer.d.ts +5 -2
- package/types/src/layer/CellErrorLayer.d.ts +18 -7
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +3 -3
- package/types/src/layer/CommentCardLayer.d.ts +7 -9
- package/types/src/layer/CommentsLayer.d.ts +2 -2
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIcons.d.ts +4 -4
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/FreezeDragLines.d.ts +17 -0
- package/types/src/layer/GridFreezeLayer.d.ts +11 -0
- package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
- package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +116 -0
- package/types/src/layer/MovableKindScope.d.ts +17 -0
- package/types/src/layer/PivotLayer.d.ts +47 -0
- package/types/src/layer/PivotToolbar.d.ts +29 -0
- package/types/src/layer/ProtectionLayer.d.ts +4 -5
- package/types/src/layer/RangeToolbar.d.ts +75 -0
- package/types/src/layer/ResizeIndicator.d.ts +11 -10
- package/types/src/layer/ResizeTooltip.d.ts +13 -0
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +15 -8
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +25 -15
- package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
- package/types/src/layer/SheetLayers.d.ts +171 -0
- package/types/src/layer/SheetMovableLayer.d.ts +4 -3
- package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
- package/types/src/layer/SheetPivotCommandLayer.d.ts +13 -0
- package/types/src/layer/SheetSparklineCommandLayer.d.ts +14 -0
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SparklineLayer.d.ts +32 -0
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +6 -5
- package/types/src/layer/TableToolbar.d.ts +23 -0
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +47 -16
- package/types/src/layer/_sheetBorders.d.ts +6 -0
- package/types/src/layer/_tableColor.d.ts +6 -0
- package/types/src/layer/_visibleCellFeatures.d.ts +11 -0
- package/types/src/layer/cellTip.d.ts +13 -0
- package/types/src/layer/freezeDragState.d.ts +21 -0
- package/types/src/layer/index.d.ts +15 -0
- package/types/src/layer/resizeIndicatorState.d.ts +3 -1
- package/types/src/layer/useFreezeDrag.d.ts +22 -0
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +5 -6
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +3 -3
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/ConnectionSites.d.ts +18 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/IMovableArea.d.ts +38 -0
- package/types/src/movable/MovableAdornment.d.ts +26 -0
- package/types/src/movable/MovableCommandGroups.d.ts +22 -0
- package/types/src/movable/MovableCommands.d.ts +8 -3
- package/types/src/movable/MovableControl.d.ts +80 -0
- package/types/src/movable/MovableFrame.d.ts +18 -16
- package/types/src/movable/MovableLayer.d.ts +30 -5
- package/types/src/movable/MovableRenderers.d.ts +210 -0
- package/types/src/movable/PlaceholderFrames.d.ts +11 -0
- package/types/src/movable/RotateHandle.d.ts +37 -0
- package/types/src/movable/connect.d.ts +16 -0
- package/types/src/movable/framePlacement.d.ts +72 -0
- package/types/src/movable/geometry.d.ts +61 -0
- package/types/src/movable/index.d.ts +9 -0
- package/types/src/movable/pressTarget.d.ts +20 -0
- package/types/src/movable/useFramePreview.d.ts +17 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +7 -5
- package/types/src/picture/PictureCommands.d.ts +20 -0
- package/types/src/picture/PictureKind.d.ts +7 -0
- package/types/src/picture/_pictureHyperlink.d.ts +13 -0
- package/types/src/picture/index.d.ts +0 -1
- package/types/src/picture/pictureCrop.d.ts +32 -0
- package/types/src/pivot/PivotAreas.d.ts +16 -0
- package/types/src/pivot/PivotChip.d.ts +33 -0
- package/types/src/pivot/PivotChipMenu.d.ts +74 -0
- package/types/src/pivot/PivotCommands.d.ts +24 -0
- package/types/src/pivot/PivotFieldList.d.ts +14 -0
- package/types/src/pivot/PivotFields.d.ts +47 -0
- package/types/src/pivot/PivotFieldsModel.d.ts +143 -0
- package/types/src/pivot/PivotTablePane.d.ts +47 -0
- package/types/src/pivot/_PivotFieldsContext.d.ts +41 -0
- package/types/src/pivot/_pivotNew.d.ts +12 -0
- package/types/src/pivot/_pivotRegion.d.ts +14 -0
- package/types/src/pivot/index.d.ts +9 -0
- package/types/src/pivot/usePivotFields.d.ts +17 -0
- package/types/src/presence/PresenceCommands.d.ts +35 -0
- package/types/src/presence/PresenceHost.d.ts +58 -0
- package/types/src/presence/PresenceMessages.d.ts +42 -0
- package/types/src/presence/PresenceStore.d.ts +165 -0
- package/types/src/presence/PresenceTypes.d.ts +78 -0
- package/types/src/presence/index.d.ts +7 -0
- package/types/src/presence/usePresence.d.ts +20 -0
- package/types/src/richText/RichTextEditor.d.ts +2 -2
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +6 -12
- package/types/src/shape/ConnectorControl.d.ts +46 -0
- package/types/src/shape/ShapeCommands.d.ts +11 -0
- package/types/src/shape/ShapeControl.d.ts +8 -0
- package/types/src/shape/ShapeEditor.d.ts +15 -2
- package/types/src/shape/ShapeGallery.d.ts +31 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeKind.d.ts +7 -0
- package/types/src/shape/ShapeSVG.d.ts +22 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -1
- package/types/src/shape/shapeFrame.d.ts +50 -0
- package/types/src/shape/shapeStyle.d.ts +82 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
- package/types/src/sheet/IWorksheetElement.d.ts +289 -0
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +14 -6
- package/types/src/sheet/SheetCommands.d.ts +18 -3
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +4 -13
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +10 -0
- package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
- package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
- package/types/src/sheet/circularReferences.d.ts +4 -4
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/slicer/SlicerCommands.d.ts +10 -0
- package/types/src/slicer/SlicerEditor.d.ts +8 -2
- package/types/src/slicer/SlicerKind.d.ts +7 -0
- package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
- package/types/src/slicer/index.d.ts +2 -1
- package/types/src/slicer/slicerStyles.d.ts +32 -0
- package/types/src/sparkline/PictureCache.d.ts +37 -0
- package/types/src/sparkline/SparklineCommands.d.ts +23 -0
- package/types/src/sparkline/SparklinePictures.d.ts +7 -0
- package/types/src/sparkline/paint/_drawing.d.ts +24 -0
- package/types/src/sparkline/paint/echarts.d.ts +8 -0
- package/types/src/sparkline/paint/index.d.ts +8 -0
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +13 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/CellControlPane.d.ts +15 -0
- package/types/src/taskPane/MovablePane.d.ts +15 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/TaskPaneFrame.d.ts +4 -4
- package/types/src/taskPane/TaskPaneKeys.d.ts +38 -0
- package/types/src/taskPane/TaskPaneRegistry.d.ts +32 -12
- package/types/src/taskPane/_paneReasons.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +3 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/theme/ExplicitTokens.d.ts +18 -0
- package/types/src/theme/GridColorSchemeContext.d.ts +8 -0
- package/types/src/theme/ThemeRootStyles.d.ts +31 -0
- package/types/src/theme/ThemeState.d.ts +2 -2
- package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/buildTokensCSS.d.ts +15 -0
- package/types/src/theme/index.d.ts +2 -4
- package/types/src/theme/useAppColorScheme.d.ts +4 -1
- package/types/src/theme/useGridColorScheme.d.ts +9 -4
- package/types/src/theme/useSystemColors.d.ts +1 -15
- package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
- package/types/src/workbook/DefaultRenderers.d.ts +5 -4
- package/types/src/workbook/IWorkbookElement.d.ts +176 -30
- package/types/src/workbook/WorkbookCommands.d.ts +6 -1
- package/types/src/workbook/WorkbookStrip.d.ts +14 -5
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/cjs/index.cjs +0 -42
- package/browser/esm/CwXbsCWTrl3QB1t6.mjs +0 -6286
- package/node/esm/CZc8rKcLzArmqJz2.mjs +0 -9
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/movable/MoveableBundle.d.ts +0 -4
- package/types/src/sheet/ISheetElement.d.ts +0 -258
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
const e=require("./Bo9Kx3L_XQkGPBJ5.cjs");let t=require("react");function n(e,t){for(var n=e.length,r=0;r<n;++r)if(t(e[r],r))return!0;return!1}function r(e,t){for(var n=e.length,r=0;r<n;++r)if(t(e[r],r))return e[r];return null}function i(e){var t=e;if(t===void 0){if(typeof navigator>`u`||!navigator)return``;t=navigator.userAgent||``}return t.toLowerCase()}function a(e,t){try{return new RegExp(e,`g`).exec(t)}catch{return null}}function o(e){return e.replace(/_/g,`.`)}function s(e,t){var r=null,i=`-1`;return n(e,function(e){var n=a(`(`+e.test+`)((?:\\/|\\s|:)([0-9|\\.|_]+))?`,t);return!(!n||e.brand)&&(r=e,i=n[3]||`-1`,e.versionAlias?i=e.versionAlias:e.versionTest&&(i=function(e,t){var n=a(`(`+e+`)((?:\\/|\\s|:)([0-9|\\.|_]+))`,t);return n?n[3]:``}(e.versionTest.toLowerCase(),t)||i),i=o(i),!0)}),{preset:r,version:i}}function c(e,t){var r={brand:``,version:`-1`};return n(e,function(e){var n=l(t,e);return!!n&&(r.brand=e.id,r.version=e.versionAlias||n.version,r.version!==`-1`)}),r}function l(e,t){return r(e,function(e){var n=e.brand;return a(``+t.test,n.toLowerCase())})}t=e.n(t);var u=[{test:`phantomjs`,id:`phantomjs`},{test:`whale`,id:`whale`},{test:`edgios|edge|edg`,id:`edge`},{test:`msie|trident|windows phone`,id:`ie`,versionTest:`iemobile|msie|rv`},{test:`miuibrowser`,id:`miui browser`},{test:`samsungbrowser`,id:`samsung internet`},{test:`samsung`,id:`samsung internet`,versionTest:`version`},{test:`chrome|crios`,id:`chrome`},{test:`firefox|fxios`,id:`firefox`},{test:`android`,id:`android browser`,versionTest:`version`},{test:`safari|iphone|ipad|ipod`,id:`safari`,versionTest:`version`}],d=[{test:`(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)`,id:`chrome`,versionTest:`chrome`},{test:`chromium`,id:`chrome`},{test:`whale`,id:`chrome`,versionAlias:`-1`,brand:!0}],f=[{test:`applewebkit`,id:`webkit`,versionTest:`applewebkit|safari`}],p=[{test:`(?=(iphone|ipad))(?!(.*version))`,id:`webview`},{test:`(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))`,id:`webview`},{test:`webview`,id:`webview`}],m=[{test:`windows phone`,id:`windows phone`},{test:`windows 2000`,id:`window`,versionAlias:`5.0`},{test:`windows nt`,id:`window`},{test:`win32|windows`,id:`window`},{test:`iphone|ipad|ipod`,id:`ios`,versionTest:`iphone os|cpu os`},{test:`macos|macintel|mac os x`,id:`mac`},{test:`android|linux armv81`,id:`android`},{test:`tizen`,id:`tizen`},{test:`webos|web0s`,id:`webos`}];function h(e){return!!s(p,e).preset}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.map(function(t){return t.split(` `).map(function(t){return t?``+e+t:``}).join(` `)}).join(` `)}function _(e,t){return function(n){n&&(e[t]=n)}}function v(e,t,n){return function(r){r&&(e[t][n]=r)}}var y=`undefined`,b=typeof window!==y,x=typeof document<`u`&&document,S=[{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`\\"`,close:`\\"`},{open:`\\'`,close:`\\'`}],C=1e-7,w={cm:function(e){return 96*e/2.54},mm:function(e){return 96*e/254},in:function(e){return 96*e},pt:function(e){return 96*e/72},pc:function(e){return 96*e/6},"%":function(e,t){return e*t/100},vw:function(e,t){return t===void 0&&(t=window.innerWidth),e/100*t},vh:function(e,t){return t===void 0&&(t=window.innerHeight),e/100*t},vmax:function(e,t){return t===void 0&&(t=Math.max(window.innerWidth,window.innerHeight)),e/100*t},vmin:function(e,t){return t===void 0&&(t=Math.min(window.innerWidth,window.innerHeight)),e/100*t}};function T(e,t,n,r){return(e*r+t*n)/(n+r)}function E(e){return typeof e===y}function D(e){return e&&typeof e==`object`}function O(e){return Array.isArray(e)}function k(e){return typeof e==`string`}function A(e){return typeof e==`number`}function j(e){return typeof e==`function`}function M(e,t,n,r,i){return N(e,t,n)?n:function(e,t,n,r,i){for(var a,o=function(n){var o=t[n].trim();if(o===e.close&&!N(e,t,n))return{value:n};var s=n,c=I(i,function(e){return e.open===o});if(c&&(s=M(c,t,n,r,i)),s===-1)return a=n,`break`;a=n=s},s=n;s<r;++s){var c=o(s);if(s=a,typeof c==`object`)return c.value;if(c===`break`)break}return-1}(e,t,n+1,r,i)}function N(e,t,n){if(!e.ignore)return null;var r=t.slice(Math.max(n-3,0),n+3).join(``);return new RegExp(e.ignore).exec(r)}function ee(e,t){var n=k(t)?{separator:t}:t,r=n.separator,i=r===void 0?`,`:r,a=n.isSeparateFirst,o=n.isSeparateOnlyOpenClose,s=n.isSeparateOpenClose,c=s===void 0?o:s,l=n.openCloseCharacters,u=l===void 0?S:l,d=u.map(function(e){var t=e.open,n=e.close;return t===n?t:t+`|`+n}).join(`|`),f=RegExp(`(\\s*`+i+`\\s*|`+d+`|\\s+)`,`g`),p=e.split(f).filter(function(e){return e&&e!==`undefined`}),m=p.length,h=[],g=[];function _(){return!!g.length&&(h.push(g.join(``)),g=[],!0)}for(var v,y=function(t){var n=p[t].trim(),r=t,s=I(u,function(e){return e.open===n}),l=I(u,function(e){return e.close===n});if(s){if((r=M(s,p,t,m,u))!==-1&&c)return _()&&a?(v=t,`break`):(h.push(p.slice(t,r+1).join(``)),t=r,a?(v=t,`break`):(v=t,`continue`))}else{if(l&&!N(l,p,t)){var d=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}(u);return d.splice(u.indexOf(l),1),{value:ee(e,{separator:i,isSeparateFirst:a,isSeparateOnlyOpenClose:o,isSeparateOpenClose:c,openCloseCharacters:d})}}if(function(e,t){return(t===``||t==` `)&&(e===``||e==` `)||e===t}(n,i)&&!o)return _(),a?(v=t,`break`):(v=t,`continue`)}r===-1&&(r=m-1),g.push(p.slice(t,r+1).join(``)),v=t=r},b=0;b<m;++b){var x=y(b);if(b=v,typeof x==`object`)return x.value;if(x===`break`)break}return g.length&&h.push(g.join(``)),h}function P(e){return ee(e,``)}function te(e){return ee(e,`,`)}function ne(e){var t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);if(!t)return{prefix:``,unit:``,value:NaN};var n=t[1],r=t[2];return{prefix:n,unit:t[3],value:parseFloat(r)}}function F(){return Date.now?Date.now():new Date().getTime()}function re(e,t,n){n===void 0&&(n=-1);for(var r=e.length,i=0;i<r;++i)if(t(e[i],i,e))return i;return n}function I(e,t,n){var r=re(e,t);return r>-1?e[r]:n}var ie=function(){var e=F(),t=b&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return t?t.bind(window):function(t){var n=F();return setTimeout(function(){t(n-e)},1e3/60)}}(),ae=function(){var e=b&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return e?e.bind(window):function(e){clearTimeout(e)}}();function L(e){return Object.keys(e)}function oe(e,t){var n=ne(e),r=n.value,i=n.unit;if(D(t)){var a=t[i];if(a){if(j(a))return a(r);if(w[i])return w[i](r,a)}}else if(i===`%`)return r*t/100;return w[i]?w[i](r):r}function R(e,t,n){return Math.max(t,Math.min(e,n))}function z(e,t,n,r){return r===void 0&&(r=e[0]/e[1]),[[V(t[0],1e-7),V(t[0]/r,1e-7)],[V(t[1]*r,1e-7),V(t[1],1e-7)]].filter(function(e){return e.every(function(e,r){var i=t[r],a=V(i,1e-7);return n?e<=i||e<=a:e>=i||e>=a})})[0]||e}function se(e,t,n,r){if(!r)return e.map(function(e,r){return R(e,t[r],n[r])});var i=e[0],a=e[1],o=!0===r?i/a:r,s=z(e,t,!1,o),c=s[0],l=s[1],u=z(e,n,!0,o),d=u[0],f=u[1];return i<c||a<l?(i=c,a=l):(i>d||a>f)&&(i=d,a=f),[i,a]}function ce(e){for(var t=e.length,n=0,r=t-1;r>=0;--r)n+=e[r];return t?n/t:0}function B(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=Math.atan2(r,n);return i>=0?i:i+2*Math.PI}function le(e){var t=function(e){return[0,1].map(function(t){return ce(e.map(function(e){return e[t]}))})}(e),n=B(t,e[0]),r=B(t,e[1]);return n<r&&r-n<Math.PI||n>r&&r-n<-Math.PI?1:-1}function ue(e,t){return Math.sqrt(((t?t[0]:0)-e[0])**2+((t?t[1]:0)-e[1])**2)}function V(e,t){if(!t)return e;var n=1/t;return Math.round(e/t)/n}function de(e,t){return e.forEach(function(n,r){e[r]=V(e[r],t)}),e}function fe(e,t){return e.classList?e.classList.contains(t):!!e.className.match(RegExp(`(\\s|^)`+t+`(\\s|$)`))}function pe(e,t){e.classList?e.classList.add(t):e.className+=` `+t}function me(e,t){if(e.classList)e.classList.remove(t);else{var n=RegExp(`(\\s|^)`+t+`(\\s|$)`);e.className=e.className.replace(n,` `)}}function he(e,t,n,r){e.addEventListener(t,n,r)}function H(e,t,n,r){e.removeEventListener(t,n,r)}function ge(e){return e?.ownerDocument||x}function _e(e){return ge(e).documentElement}function ve(e){return ge(e).body}function ye(e){return e?.ownerDocument?.defaultView||window}function be(e){return e&&`postMessage`in e&&`blur`in e&&`self`in e}function xe(e){return D(e)&&e.nodeName&&e.nodeType&&`ownerDocument`in e}function Se(e,t,n,r,i,a){for(var o=0;o<i;++o){var s=n+o*i,c=r+o*i;e[s]+=e[c]*a,t[s]+=t[c]*a}}function Ce(e,t,n,r,i){for(var a=0;a<i;++a){var o=n+a*i,s=r+a*i,c=e[o],l=t[o];e[o]=e[s],e[s]=c,t[o]=t[s],t[s]=l}}function we(e,t,n,r,i){for(var a=0;a<r;++a){var o=n+a*r;e[o]/=i,t[o]/=i}}function Te(e,t,n){n===void 0&&(n=Math.sqrt(e.length));for(var r=e.slice(),i=0;i<n;++i)r[i*n+t-1]=0,r[(t-1)*n+i]=0;return r[(t-1)*(n+1)]=1,r}function Ee(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var n=e.slice(),r=K(t),i=0;i<t;++i){var a=t*i+i;if(!V(n[a],1e-7)){for(var o=i+1;o<t;++o)if(n[t*i+o]){Ce(n,r,i,o,t);break}}if(!V(n[a],1e-7))return[];for(we(n,r,i,t,n[a]),o=0;o<t;++o){var s=o,c=n[o+i*t];V(c,1e-7)&&i!==o&&Se(n,r,s,i,t,-c)}}return r}function De(e,t){for(var n=e.slice(),r=e.length;r<t-1;++r)n[r]=0;return n[t-1]=1,n}function Oe(e,t,n){if(t===void 0&&(t=Math.sqrt(e.length)),t===n)return e;for(var r=K(n),i=Math.min(t,n),a=0;a<i-1;++a){for(var o=0;o<i-1;++o)r[a*n+o]=e[a*t+o];r[(a+1)*n-1]=e[(a+1)*t-1],r[(n-1)*n+a]=e[(t-1)*t+a]}return r[n*n-1]=e[t*t-1],r}function ke(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=K(e);return t.forEach(function(t){r=U(r,t,e)}),r}function U(e,t,n){n===void 0&&(n=Math.sqrt(e.length));var r=[],i=e.length/n,a=t.length/i;if(!i)return t;if(!a)return e;for(var o=0;o<n;++o)for(var s=0;s<a;++s){r[s*n+o]=0;for(var c=0;c<i;++c)r[s*n+o]+=e[c*n+o]*t[s*i+c]}return r}function W(e,t){for(var n=Math.min(e.length,t.length),r=e.slice(),i=0;i<n;++i)r[i]=r[i]+t[i];return r}function G(e,t){for(var n=Math.min(e.length,t.length),r=e.slice(),i=0;i<n;++i)r[i]=r[i]-t[i];return r}function Ae(e,t){return t===void 0&&(t=e.length===6),t?[e[0],e[1],0,e[2],e[3],0,e[4],e[5],1]:e}function je(e,t){return t===void 0&&(t=e.length===9),t?[e[0],e[1],e[3],e[4],e[6],e[7]]:e}function Me(e,t,n){n===void 0&&(n=t.length);var r=U(e,t,n),i=r[n-1];return r.map(function(e){return e/i})}function Ne(e,t){return U(e,[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1],4)}function Pe(e,t){return U(e,[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1],4)}function Fe(e,t){return U(e,ze(t,4))}function Ie(e,t){var n=t[0],r=n===void 0?1:n,i=t[1],a=i===void 0?1:i,o=t[2];return U(e,[r,0,0,0,0,a,0,0,0,0,o===void 0?1:o,0,0,0,0,1],4)}function Le(e,t){var n=t[0],r=n===void 0?0:n,i=t[1],a=i===void 0?0:i,o=t[2];return U(e,[1,0,0,0,0,1,0,0,0,0,1,0,r,a,o===void 0?0:o,1],4)}function Re(e,t){return U(e,t,4)}function ze(e,t){var n=Math.cos(e),r=Math.sin(e),i=K(t);return i[0]=n,i[1]=r,i[t]=-r,i[t+1]=n,i}function K(e){for(var t=e*e,n=[],r=0;r<t;++r)n[r]=r%(e+1)?0:1;return n}function Be(e,t){for(var n=K(t),r=Math.min(e.length,t-1),i=0;i<r;++i)n[(t+1)*i]=e[i];return n}function Ve(e,t){for(var n=K(t),r=Math.min(e.length,t-1),i=0;i<r;++i)n[t*(t-1)+i]=e[i];return n}function He(e,t,n,r,i,a,o,s){var c=e[0],l=e[1],u=t[0],d=t[1],f=n[0],p=n[1],m=r[0],h=r[1],g=i[0],_=i[1],v=a[0],y=a[1],b=o[0],x=o[1],S=s[0],C=s[1],w=Ee([c,0,u,0,f,0,m,0,l,0,d,0,p,0,h,0,1,0,1,0,1,0,1,0,0,c,0,u,0,f,0,m,0,l,0,d,0,p,0,h,0,1,0,1,0,1,0,1,-g*c,-_*c,-v*u,-y*u,-b*f,-x*f,-S*m,-C*m,-g*l,-_*l,-v*d,-y*d,-b*p,-x*p,-S*h,-C*h],8);if(!w.length)return[];var T=U(w,[g,_,v,y,b,x,S,C],8);return T[8]=1,Oe(function(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var n=[],r=0;r<t;++r)for(var i=0;i<t;++i)n[i*t+r]=e[t*r+i];return n}(T),3,4)}var Ue=function(){return Ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ue.apply(this,arguments)};function We(e,t){return t===void 0&&(t=0),Ge(Ke(e,t))}function Ge(e){var t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(e){var n=e.matrixFunction,r=e.functionValue;n&&(t=n(t,r))}),t}function Ke(e,t){return t===void 0&&(t=0),(O(e)?e:P(e)).map(function(e){var n,r=!(n=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(e))||n.length<4?{}:{prefix:n[1],value:n[2],suffix:n[3]},i=r.prefix,a=r.value,o=null,s=i,c=``;if(i===`translate`||i===`translateX`||i===`translate3d`){var l=D(t)?Ue(Ue({},t),{"o%":t[`%`]}):{"%":t,"o%":t},u=te(a).map(function(e,n){return l[`%`]=n===0&&`x%`in l?t[`x%`]:n===1&&`y%`in l?t[`y%`]:t[`o%`],oe(e,l)}),d=u[0],f=u[1],p=f===void 0?0:f,m=u[2];o=Le,c=[d,p,m===void 0?0:m]}else if(i===`translateY`)o=Le,c=[0,p=oe(a,D(t)?Ue({"%":t[`y%`]},t):{"%":t}),0];else if(i===`translateZ`)o=Le,c=[0,0,parseFloat(a)];else if(i===`scale`||i===`scale3d`){var h=te(a).map(function(e){return parseFloat(e)}),g=h[0],_=h[1],v=_===void 0?g:_,y=h[2];o=Ie,c=[g,v,y===void 0?1:y]}else if(i===`scaleX`)o=Ie,c=[g=parseFloat(a),1,1];else if(i===`scaleY`)o=Ie,c=[1,v=parseFloat(a),1];else if(i===`scaleZ`)o=Ie,c=[1,1,parseFloat(a)];else if(i===`rotate`||i===`rotateZ`||i===`rotateX`||i===`rotateY`){var b=ne(a),x=b.unit,S=b.value;i===`rotate`||i===`rotateZ`?(s=`rotateZ`,o=Fe):i===`rotateX`?o=Ne:i===`rotateY`&&(o=Pe),c=x===`rad`?S:S*Math.PI/180}else if(i===`matrix3d`)o=Re,c=te(a).map(function(e){return parseFloat(e)});else if(i===`matrix`){var C=te(a).map(function(e){return parseFloat(e)});o=Re,c=[C[0],C[1],0,0,C[2],C[3],0,0,0,0,1,0,C[4],C[5],0,1]}else s=``;return{name:i,functionName:s,value:a,matrixFunction:o,functionValue:c}})}var qe=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(e){return this.values[this.keys.indexOf(e)]},t.set=function(e,t){var n=this.keys,r=this.values,i=n.indexOf(e),a=i===-1?n.length:i;n[a]=e,r[a]=t},e}(),Je=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(e){return this.object[e]},t.set=function(e,t){this.object[e]=t},e}(),Ye=typeof Map==`function`,Xe=function(){function e(){}var t=e.prototype;return t.connect=function(e,t){this.prev=e,this.next=t,e&&(e.next=this),t&&(t.prev=this)},t.disconnect=function(){var e=this.prev,t=this.next;e&&(e.next=t),t&&(t.prev=e)},t.getIndex=function(){for(var e=this,t=-1;e;)e=e.prev,++t;return t},e}(),Ze=function(){function e(e,t,n,r,i,a,o,s){this.prevList=e,this.list=t,this.added=n,this.removed=r,this.changed=i,this.maintained=a,this.changedBeforeAdded=o,this.fixed=s}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var e=function(e,t){var n=[],r=[];return e.forEach(function(e){var t=e[0],i=e[1],a=new Xe;n[t]=a,r[i]=a}),n.forEach(function(e,t){e.connect(n[t-1])}),e.filter(function(e,n){return!t[n]}).map(function(e,t){var i=e[0],a=e[1];if(i===a)return[0,0];var o=n[i],s=r[a-1],c=o.getIndex();return o.disconnect(),s?o.connect(s,s.next):o.connect(void 0,n[0]),[c,o.getIndex()]})}(this.changedBeforeAdded,this.fixed),t=this.changed,n=[];this.cacheOrdered=e.filter(function(e,r){var i=e[0],a=e[1],o=t[r],s=o[0],c=o[1];if(i!==a)return n.push([s,c]),!0}),this.cachePureChanged=n},e}();function Qe(e,t,n){var r=Ye?Map:n?Je:qe,i=n||function(e){return e},a=[],o=[],s=[],c=e.map(i),l=t.map(i),u=new r,d=new r,f=[],p=[],m={},h=[],g=0,_=0;return c.forEach(function(e,t){u.set(e,t)}),l.forEach(function(e,t){d.set(e,t)}),c.forEach(function(e,t){var n=d.get(e);n===void 0?(++_,o.push(t)):m[n]=_}),l.forEach(function(e,t){var n=u.get(e);n===void 0?(a.push(t),++g):(s.push([n,t]),_=m[t]||0,f.push([n-_,t-g]),p.push(t===n),n!==t&&h.push([n,t]))}),o.reverse(),new Ze(e,t,a,o,h,s,f,p)}var $e=function(){function e(e,t){e===void 0&&(e=[]),this.findKeyCallback=t,this.list=[].slice.call(e)}return e.prototype.update=function(e){var t=[].slice.call(e),n=Qe(this.list,t,this.findKeyCallback);return this.list=t,n},e}(),et=function(e,t){return et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},et(e,t)},tt,nt=typeof Map==`function`?void 0:(tt=0,function(e){return e.__DIFF_KEY__||=++tt}),rt=function(e){function t(t){return t===void 0&&(t=[]),e.call(this,t,nt)||this}return function(e,t){function n(){this.constructor=e}et(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}($e),it=function(){return it=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},it.apply(this,arguments)},at=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(e,t){if(D(e))for(var n in e)this.on(n,e[n]);else this._addEvent(e,t,{});return this},t.off=function(e,t){if(e)if(D(e))for(var n in e)this.off(n);else if(t){var r=this._events[e];if(r){var i=re(r,function(e){return e.listener===t});i>-1&&r.splice(i,1)}}else this._events[e]=[];else this._events={};return this},t.once=function(e,t){var n=this;return t&&this._addEvent(e,t,{once:!0}),new Promise(function(t){n._addEvent(e,t,{once:!0})})},t.emit=function(e,t){var n=this;t===void 0&&(t={});var r=this._events[e];if(!e||!r)return!0;var i=!1;return t.eventType=e,t.stop=function(){i=!0},t.currentTarget=this,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}(r).forEach(function(r){r.listener(t),r.once&&n.off(e,r.listener)}),!i},t.trigger=function(e,t){return t===void 0&&(t={}),this.emit(e,t)},t._addEvent=function(e,t,n){var r=this._events;r[e]=r[e]||[],r[e].push(it({listener:t},n))},e}();function ot(e){return V(e,C)}function st(e){return e.length<3?0:Math.abs(function(e){for(var t=0,n=e.length-1;n>=0;--n)t+=e[n];return t}(e.map(function(t,n){var r=e[n+1]||e[0];return t[0]*r[1]-r[0]*t[1]})))/2}function ct(e,t){var n=t.width,r=t.height,i=t.left,a=t.top,o=lt(e),s=o.minX,c=o.minY,l=o.maxX,u=o.maxY,d=n/(l-s),f=r/(u-c);return e.map(function(e){return[i+(e[0]-s)*d,a+(e[1]-c)*f]})}function lt(e){var t=e.map(function(e){return e[0]}),n=e.map(function(e){return e[1]});return{minX:Math.min.apply(Math,t),minY:Math.min.apply(Math,n),maxX:Math.max.apply(Math,t),maxY:Math.max.apply(Math,n)}}function ut(e,t,n){var r=e[0],i=e[1],a=lt(t),o=a.minX,s=a.maxX,c=[[o,i],[s,i]],l=dt(c[0],c[1]),u=mt(t),d=[];if(u.forEach(function(t){var n,r=dt(t[0],t[1]),a=t[0];n=r,l.every(function(e,t){return ot(e-n[t])===0})?d.push({pos:e,line:t,type:`line`}):pt(ft(l,r),[c,t]).forEach(function(e){t.some(function(t){return r=e,!ot((n=t)[0]-r[0])&&!ot(n[1]-r[1]);var n,r})?d.push({pos:e,line:t,type:`point`}):ot(a[1]-i)!==0&&d.push({pos:e,line:t,type:`intersection`})})}),!n&&I(d,function(e){return e[0]===r}))return!0;var f=0,p={};return d.forEach(function(e){var t=e.pos,n=e.type,a=e.line;if(!(t[0]>r))if(n===`intersection`)++f;else{if(n===`line`)return;if(n===`point`){var o=I(a,function(e){return e[1]!==i}),s=p[t[0]],c=o[1]>i?1:-1;s?s!==c&&++f:p[t[0]]=c}}}),f%2==1}function dt(e,t){var n=e[0],r=e[1],i=t[0]-n,a=t[1]-r;Math.abs(i)<1e-7&&(i=0),Math.abs(a)<1e-7&&(a=0);var o=0,s=0,c=0;return i?a?(s=1,c=-(o=-a/i)*n-r):(s=1,c=-r):a&&(o=-1,c=n),[o,s,c]}function ft(e,t){var n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],s=t[2],c=n===0&&a===0,l=r===0&&o===0,u=[];if(c&&l)return[];if(c){var d=-i/r;return d===-s/o?[[-1/0,d],[1/0,d]]:[]}if(l){var f=-i/n;return f===-s/a?[[f,-1/0],[f,1/0]]:[]}if(n===0)u=[[p=-(o*(m=-i/r)+s)/a,m]];else if(a===0)u=[[p=-(r*(m=-s/o)+i)/n,m]];else if(r===0)u=[[p=-i/n,m=-(a*p+s)/o]];else if(o===0)u=[[p=-s/a,m=-(n*p+i)/r]];else{var p,m;u=[[p=(r*s-o*i)/(o*n-r*a),m=-(n*p+i)/r]]}return u.map(function(e){return[e[0],e[1]]})}function pt(e,t){var n=t.map(function(e){return[0,1].map(function(t){return[Math.min(e[0][t],e[1][t]),Math.max(e[0][t],e[1][t])]})}),r=[];if(e.length===2){var i=e[0],a=i[0],o=i[1];if(ot(a-e[1][0])){if(!ot(o-e[1][1])){var s=Math.max.apply(Math,n.map(function(e){return e[0][0]})),c=Math.min.apply(Math,n.map(function(e){return e[0][1]}));if(ot(s-c)>0)return[];r=[[s,o],[c,o]]}}else{var l=Math.max.apply(Math,n.map(function(e){return e[1][0]})),u=Math.min.apply(Math,n.map(function(e){return e[1][1]}));if(ot(l-u)>0)return[];r=[[a,l],[a,u]]}}return r.length||(r=e.filter(function(e){var t=e[0],r=e[1];return n.every(function(e){return 0<=ot(t-e[0][0])&&0<=ot(e[0][1]-t)&&0<=ot(r-e[1][0])&&0<=ot(e[1][1]-r)})})),r.map(function(e){return[ot(e[0]),ot(e[1])]})}function mt(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}(e.slice(1),[e[0]]).map(function(t,n){return[e[n],t]})}function ht(e,t){return function(e,t){var n=e.slice(),r=t.slice();le(n)===-1&&n.reverse(),le(r)===-1&&r.reverse();var i=mt(n),a=mt(r),o=i.map(function(e){return dt(e[0],e[1])}),s=a.map(function(e){return dt(e[0],e[1])}),c=[];o.forEach(function(e,t){var n=i[t],o=[];s.forEach(function(r,i){var s=pt(ft(e,r),[n,a[i]]);o.push.apply(o,s.map(function(e){return{index1:t,index2:i,pos:e,type:`intersection`}}))}),o.sort(function(e,t){return ue(n[0],e.pos)-ue(n[0],t.pos)}),c.push.apply(c,o),ut(n[1],r)&&c.push({index1:t,index2:-1,pos:n[1],type:`inside`})}),a.forEach(function(e,t){if(ut(e[1],n)){var r=!1,i=re(c,function(e){return e.index2===t?(r=!0,!1):!!r});i===-1&&(r=!1,i=re(c,function(e){var n=e.index1,i=e.index2;return n===-1&&i+1===t?(r=!0,!1):!!r})),i===-1?c.push({index1:-1,index2:t,pos:e[1],type:`inside`}):c.splice(i,0,{index1:-1,index2:t,pos:e[1],type:`inside`})}});var l={};return c.filter(function(e){var t=e.pos,n=t[0]+`x`+t[1];return!l[n]&&(l[n]=!0,!0)})}(e,t).map(function(e){return e.pos})}var gt=function(e,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},gt(e,t)},_t=function(){return _t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_t.apply(this,arguments)};function vt(e){return 180*(t=[e[0].clientX,e[0].clientY],n=[e[1].clientX,e[1].clientY],r=n[0]-t[0],i=n[1]-t[1],((a=Math.atan2(i,r))>=0?a:a+2*Math.PI)/Math.PI);var t,n,r,i,a}function yt(e){return e?e.touches?function(e){for(var t=Math.min(e.length,2),n=[],r=0;r<t;++r)n.push(St(e[r]));return n}(e.touches):[St(e)]:[]}function bt(e,t,n){var r=n.length,i=Ct(e,r),a=i.clientX,o=i.clientY,s=i.originalClientX,c=i.originalClientY,l=Ct(t,r),u=l.clientX,d=l.clientY,f=Ct(n,r);return{clientX:s,clientY:c,deltaX:a-u,deltaY:o-d,distX:a-f.clientX,distY:o-f.clientY}}function xt(e){return Math.sqrt((e[0].clientX-e[1].clientX)**2+(e[0].clientY-e[1].clientY)**2)}function St(e){return{clientX:e.clientX,clientY:e.clientY}}function Ct(e,t){t===void 0&&(t=e.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},r=Math.min(e.length,t),i=0;i<r;++i){var a=e[i];n.originalClientX+=`originalClientX`in a?a.originalClientX:a.clientX,n.originalClientY+=`originalClientY`in a?a.originalClientY:a.clientY,n.clientX+=a.clientX,n.clientY+=a.clientY}return t?{clientX:n.clientX/t,clientY:n.clientY/t,originalClientX:n.originalClientX/t,originalClientY:n.originalClientY/t}:n}var wt=function(){function e(e){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=e,this.prevClients=e,this.length=e.length}return e.prototype.getAngle=function(e){return e===void 0&&(e=this.prevClients),vt(e)},e.prototype.getRotation=function(e){return e===void 0&&(e=this.prevClients),vt(e)-vt(this.startClients)},e.prototype.getPosition=function(e,t){e===void 0&&(e=this.prevClients);var n=bt(e||this.prevClients,this.prevClients,this.startClients),r=n.deltaX,i=n.deltaY;return this.movement+=Math.sqrt(r*r+i*i),this.prevClients=e,n},e.prototype.getPositions=function(e){e===void 0&&(e=this.prevClients);for(var t=this.prevClients,n=this.startClients,r=Math.min(this.length,t.length),i=[],a=0;a<r;++a)i[a]=bt([e[a]],[t[a]],[n[a]]);return i},e.prototype.getMovement=function(e){var t=this.movement;if(!e)return t;var n=Ct(e,this.length),r=Ct(this.prevClients,this.length),i=n.clientX-r.clientX,a=n.clientY-r.clientY;return Math.sqrt(i*i+a*a)+t},e.prototype.getDistance=function(e){return e===void 0&&(e=this.prevClients),xt(e)},e.prototype.getScale=function(e){return e===void 0&&(e=this.prevClients),xt(e)/xt(this.startClients)},e.prototype.move=function(e,t){this.startClients.forEach(function(n){n.clientX-=e,n.clientY-=t}),this.prevClients.forEach(function(n){n.clientX-=e,n.clientY-=t})},e}(),Tt=[`textarea`,`input`],Et=function(e){function t(t,n){n===void 0&&(n={});var r=e.call(this)||this;r.options={},r.flag=!1,r.pinchFlag=!1,r.data={},r.isDrag=!1,r.isPinch=!1,r.clientStores=[],r.targets=[],r.prevTime=0,r.doubleFlag=!1,r._useMouse=!1,r._useTouch=!1,r._useDrag=!1,r._dragFlag=!1,r._isTrusted=!1,r._isMouseEvent=!1,r._isSecondaryButton=!1,r._preventMouseEvent=!1,r._prevInputEvent=null,r._isDragAPI=!1,r._isIdle=!0,r._preventMouseEventId=0,r._window=window,r.onDragStart=function(e,t){if(t===void 0&&(t=!0),r.flag||!1!==e.cancelable){var n=e.type.indexOf(`drag`)>=-1;if(!r.flag||!n){r._isDragAPI=!0;var i=r.options,a=i.container,o=i.pinchOutside,s=i.preventWheelClick,c=i.preventRightClick,l=i.preventDefault,u=i.checkInput,d=i.dragFocusedInput,f=i.preventClickEventOnDragStart,p=i.preventClickEventOnDrag,m=i.preventClickEventByCondition,h=r._useTouch,g=!r.flag;if(r._isSecondaryButton=e.which===3||e.button===2,s&&(e.which===2||e.button===1)||c&&(e.which===3||e.button===2))return r.stop(),!1;if(g){var _=r._window.document.activeElement,v=e.target;if(v){var y=v.tagName.toLowerCase(),b=Tt.indexOf(y)>-1,x=v.isContentEditable;if(b||x){if(u||!d&&_===v)return!1;if(_&&(_===v||x&&_.isContentEditable&&_.contains(v))){if(!d)return!1;v.blur()}}else if((l||e.type===`touchstart`)&&_){var S=_.tagName.toLowerCase();(_.isContentEditable||Tt.indexOf(S)>-1)&&_.blur()}(f||p||m)&&he(r._window,`click`,r._onClick,!0)}r.clientStores=[new wt(yt(e))],r._isIdle=!1,r.flag=!0,r.isDrag=!1,r._isTrusted=t,r._dragFlag=!0,r._prevInputEvent=e,r.data={},r.doubleFlag=F()-r.prevTime<200,r._isMouseEvent=function(e){return e&&(e.type.indexOf(`mouse`)>-1||`button`in e)}(e),!r._isMouseEvent&&r._preventMouseEvent&&r._allowMouseEvent(),!1===(r._preventMouseEvent||r.emit(`dragStart`,_t(_t({data:r.data,datas:r.data,inputEvent:e,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,isTrusted:t,isDouble:r.doubleFlag},r.getCurrentStore().getPosition()),{preventDefault:function(){e.preventDefault()},preventDrag:function(){r._dragFlag=!1}})))&&r.stop(),r._isMouseEvent&&r.flag&&l&&e.preventDefault()}if(!r.flag)return!1;var C=0;if(g?(r._attchDragEvent(),h&&o&&(C=setTimeout(function(){he(a,`touchstart`,r.onDragStart,{passive:!1})}))):h&&o&&H(a,`touchstart`,r.onDragStart),r.flag&&function(e){return e.touches&&e.touches.length>=2}(e)){if(clearTimeout(C),g&&e.touches.length!==e.changedTouches.length)return;r.pinchFlag||r.onPinchStart(e)}}}},r.onDrag=function(e,t){if(r.flag){var n=r.options.preventDefault;!r._isMouseEvent&&n&&e.preventDefault(),r._prevInputEvent=e;var i=yt(e),a=r.moveClients(i,e,!1);if(r._dragFlag){if((r.pinchFlag||a.deltaX||a.deltaY)&&!1===(r._preventMouseEvent||r.emit(`drag`,_t(_t({},a),{isScroll:!!t,inputEvent:e}))))return void r.stop();r.pinchFlag&&r.onPinch(e,i)}r.getCurrentStore().getPosition(i,!0)}},r.onDragEnd=function(e){if(r.flag){var t=r.options,n=t.pinchOutside,i=t.container,a=t.preventClickEventOnDrag,o=t.preventClickEventOnDragStart,s=t.preventClickEventByCondition,c=r.isDrag;(a||o||s)&&requestAnimationFrame(function(){r._allowClickEvent()}),s||o||!a||c||r._allowClickEvent(),r._useTouch&&n&&H(i,`touchstart`,r.onDragStart),r.pinchFlag&&r.onPinchEnd(e);var l=e?.touches?yt(e):[];l.length!==0&&r.options.keepDragging?r._addStore(new wt(l)):r.flag=!1;var u=r._getPosition(),d=F(),f=!c&&r.doubleFlag;r._prevInputEvent=null,r.prevTime=c||f?0:d,r.flag||(r._dettachDragEvent(),r._preventMouseEvent||r.emit(`dragEnd`,_t({data:r.data,datas:r.data,isDouble:f,isDrag:c,isClick:!c,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,inputEvent:e,isTrusted:r._isTrusted},u)),r.clientStores=[],r._isMouseEvent||(r._preventMouseEvent=!0,clearTimeout(r._preventMouseEventId),r._preventMouseEventId=setTimeout(function(){r._preventMouseEvent=!1},200)),r._isIdle=!0)}},r.onBlur=function(){r.onDragEnd()},r._allowClickEvent=function(){H(r._window,`click`,r._onClick,!0)},r._onClick=function(e){r._allowClickEvent(),r._allowMouseEvent();var t=r.options.preventClickEventByCondition;t?.(e)||(e.stopPropagation(),e.preventDefault())},r._onContextMenu=function(e){r.options.preventRightClick?r.onDragEnd(e):e.preventDefault()},r._passCallback=function(){};var i=[].concat(t),a=i[0];r._window=be(a)?a:ye(a),r.options=_t({checkInput:!1,container:a&&!(`document`in a)?ye(a):a,preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:[`touch`,`mouse`]},n);var o=r.options,s=o.container,c=o.events,l=o.checkWindowBlur;if(r._useDrag=c.indexOf(`drag`)>-1,r._useTouch=c.indexOf(`touch`)>-1,r._useMouse=c.indexOf(`mouse`)>-1,r.targets=i,r._useDrag&&i.forEach(function(e){he(e,`dragstart`,r.onDragStart)}),r._useMouse&&(i.forEach(function(e){he(e,`mousedown`,r.onDragStart),he(e,`mousemove`,r._passCallback)}),he(s,`contextmenu`,r._onContextMenu)),l&&he(ye(),`blur`,r.onBlur),r._useTouch){var u={passive:!1};i.forEach(function(e){he(e,`touchstart`,r.onDragStart,u),he(e,`touchmove`,r._passCallback,u)})}return r}return function(e,t){function n(){this.constructor=e}gt(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._isIdle=!0,this._allowClickEvent(),this._dettachDragEvent(),this._isDragAPI=!1},t.prototype.getMovement=function(e){return this.getCurrentStore().getMovement(e)+this.clientStores.slice(1).reduce(function(e,t){return e+t.movement},0)},t.prototype.isDragging=function(){return this.isDrag},t.prototype.isIdle=function(){return this._isIdle},t.prototype.isFlag=function(){return this.flag},t.prototype.isPinchFlag=function(){return this.pinchFlag},t.prototype.isDoubleFlag=function(){return this.doubleFlag},t.prototype.isPinching=function(){return this.isPinch},t.prototype.scrollBy=function(e,t,n,r){r===void 0&&(r=!0),this.flag&&(this.clientStores[0].move(e,t),r&&this.onDrag(n,!0))},t.prototype.move=function(e,t){var n=e[0],r=e[1],i=this.getCurrentStore().prevClients;return this.moveClients(i.map(function(e){var t=e.clientX,i=e.clientY;return{clientX:t+n,clientY:i+r,originalClientX:t,originalClientY:i}}),t,!0)},t.prototype.triggerDragStart=function(e){this.onDragStart(e,!1)},t.prototype.setEventData=function(e){var t=this.data;for(var n in e)t[n]=e[n];return this},t.prototype.setEventDatas=function(e){return this.setEventData(e)},t.prototype.getCurrentEvent=function(e){return e===void 0&&(e=this._prevInputEvent),_t(_t({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:e})},t.prototype.getEventData=function(){return this.data},t.prototype.getEventDatas=function(){return this.data},t.prototype.unset=function(){var e=this,t=this.targets,n=this.options.container;this.off(),H(this._window,`blur`,this.onBlur),this._useDrag&&t.forEach(function(t){H(t,`dragstart`,e.onDragStart)}),this._useMouse&&(t.forEach(function(t){H(t,`mousedown`,e.onDragStart)}),H(n,`contextmenu`,this._onContextMenu)),this._useTouch&&(t.forEach(function(t){H(t,`touchstart`,e.onDragStart)}),H(n,`touchstart`,this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},t.prototype.onPinchStart=function(e){var t=this,n=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>n)){var r=new wt(yt(e));this.pinchFlag=!0,this._addStore(r),!1===this.emit(`pinchStart`,_t(_t({data:this.data,datas:this.data,angle:r.getAngle(),touches:this.getCurrentStore().getPositions()},r.getPosition()),{inputEvent:e,isTrusted:this._isTrusted,preventDefault:function(){e.preventDefault()},preventDrag:function(){t._dragFlag=!1}}))&&(this.pinchFlag=!1)}},t.prototype.onPinch=function(e,t){if(this.flag&&this.pinchFlag&&!(t.length<2)){var n=this.getCurrentStore();this.isPinch=!0,this.emit(`pinch`,_t(_t({data:this.data,datas:this.data,movement:this.getMovement(t),angle:n.getAngle(t),rotation:n.getRotation(t),touches:n.getPositions(t),scale:n.getScale(t),distance:n.getDistance(t)},n.getPosition(t)),{inputEvent:e,isTrusted:this._isTrusted}))}},t.prototype.onPinchEnd=function(e){if(this.pinchFlag){var t=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var n=this.getCurrentStore();this.emit(`pinchEnd`,_t(_t({data:this.data,datas:this.data,isPinch:t,touches:n.getPositions()},n.getPosition()),{inputEvent:e}))}},t.prototype.getCurrentStore=function(){return this.clientStores[0]},t.prototype.moveClients=function(e,t,n){var r=this._getPosition(e,n),i=this.isDrag;(r.deltaX||r.deltaY)&&(this.isDrag=!0);var a=!1;return!i&&this.isDrag&&(a=!0),_t(_t({data:this.data,datas:this.data},r),{movement:this.getMovement(e),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:t,isTrusted:this._isTrusted,isFirstDrag:a})},t.prototype._addStore=function(e){this.clientStores.splice(0,0,e)},t.prototype._getPosition=function(e,t){var n=this.getCurrentStore().getPosition(e,t),r=this.clientStores.slice(1).reduce(function(e,t){var n=t.getPosition();return e.distX+=n.distX,e.distY+=n.distY,e},n),i=r.distX,a=r.distY;return _t(_t({},n),{distX:i,distY:a})},t.prototype._attchDragEvent=function(){var e=this._window,t=this.options.container,n={passive:!1};this._isDragAPI&&(he(t,`dragover`,this.onDrag,n),he(e,`dragend`,this.onDragEnd)),this._useMouse&&(he(t,`mousemove`,this.onDrag),he(e,`mouseup`,this.onDragEnd)),this._useTouch&&(he(t,`touchmove`,this.onDrag,n),he(e,`touchend`,this.onDragEnd,n),he(e,`touchcancel`,this.onDragEnd,n))},t.prototype._dettachDragEvent=function(){var e=this._window,t=this.options.container;this._isDragAPI&&(H(t,`dragover`,this.onDrag),H(e,`dragend`,this.onDragEnd)),this._useMouse&&(H(t,`mousemove`,this.onDrag),H(e,`mouseup`,this.onDragEnd)),this._useTouch&&(H(t,`touchstart`,this.onDragStart),H(t,`touchmove`,this.onDrag),H(e,`touchend`,this.onDragEnd),H(e,`touchcancel`,this.onDragEnd))},t.prototype._allowMouseEvent=function(){this._preventMouseEvent=!1,clearTimeout(this._preventMouseEventId)},t}(at),Dt=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0};function Ot(e,t,n,r,i){var a=ge(r),o=a.createElement(`style`);return o.setAttribute(`type`,`text/css`),o.setAttribute(`data-styled-id`,e),o.setAttribute(`data-styled-count`,`1`),n.nonce&&o.setAttribute(`nonce`,n.nonce),o.innerHTML=function(e,t,n){return n.original?t:t.replace(/([^};{\s}][^};{]*|^\s*){/gm,function(t,n){var r=n.trim();return(r?te(r):[``]).map(function(t){var n=t.trim();return n.indexOf(`@`)===0?n:n.indexOf(`:global`)>-1?n.replace(/\:global/g,``):n.indexOf(`:host`)>-1?`${n.replace(/\:host/g,`.${e}`)}`:n?`.${e} ${n}`:`.${e}`}).join(`, `)+` {`})}(e,t,n),(i||a.head||a.body).appendChild(o),o}function kt(e){var t=`rCS`+Dt(e).toString(36);return{className:t,inject:function(n,r){r===void 0&&(r={});var i=function(e){if(e&&e.getRootNode){var t=e.getRootNode();if(t.nodeType===11)return t}}(n),a=(i||n.ownerDocument||document).querySelector(`style[data-styled-id="${t}"]`);if(a){var o=parseFloat(a.getAttribute(`data-styled-count`))||0;a.setAttribute(`data-styled-count`,`${o+1}`)}else a=Ot(t,e,r,n,i);return{destroy:function(){var e,t=parseFloat(a.getAttribute(`data-styled-count`))||0;t<=1?(a.remove?a.remove():(e=a.parentNode)==null||e.removeChild(a),a=null):a.setAttribute(`data-styled-count`,`${t-1}`)}}}}}var At=function(){return At=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},At.apply(this,arguments)};function jt(e,n){var r=kt(n),i=r.className;return(0,t.forwardRef)(function(n,a){var o=n.className,s=o===void 0?``:o;n.cspNonce;var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(n,[`className`,`cspNonce`]),l=(0,t.useRef)();return(0,t.useImperativeHandle)(a,function(){return l.current},[]),(0,t.useEffect)(function(){var e=r.inject(l.current,{nonce:n.cspNonce});return function(){e.destroy()}},[]),(0,t.createElement)(e,At({ref:l,"data-styled-id":i,className:`${s} ${i}`},c))})}var Mt=function(e,t){return Mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Mt(e,t)};function Nt(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);function n(){this.constructor=e}Mt(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var q=function(){return q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},q.apply(this,arguments)};function J(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-->0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function Y(e,t,n){if(n||arguments.length===2)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||=Array.prototype.slice.call(t,0,i),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function Pt(e,t){return q({events:[],props:[],name:e},t)}var Ft=[`n`,`w`,`s`,`e`],It=[`n`,`w`,`s`,`e`,`nw`,`ne`,`sw`,`se`],Lt,Rt,zt,Bt=Lt===void 0&&function(){if(typeof navigator>`u`||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(e){var t=navigator.userAgentData,a=(t.uaList||t.brands).slice(),s=e&&e.fullVersionList,g=t.mobile||!1,_=a[0],v=(e&&e.platform||t.platform||navigator.platform).toLowerCase(),y={name:_.brand,version:_.version,majorVersion:-1,webkit:!1,webkitVersion:`-1`,chromium:!1,chromiumVersion:`-1`,webview:!!c(p,a).brand||h(i())},b={name:`unknown`,version:`-1`,majorVersion:-1};y.webkit=!y.chromium&&n(f,function(e){return l(a,e)});var x=c(d,a);if(y.chromium=!!x.brand,y.chromiumVersion=x.version||`-1`,!y.chromium){var S=c(f,a);y.webkit=!!S.brand,y.webkitVersion=S.version||`-1`}var C=r(m,function(e){return RegExp(``+e.test,`g`).exec(v)});if(b.name=C?C.id:``,e&&(b.version=e.platformVersion||`-1`),s&&s.length){var w=c(u,s);y.name=w.brand||y.name,y.version=w.version||y.version}else{var T=c(u,a);y.name=T.brand||y.name,y.version=T.brand&&e?e.uaFullVersion:T.version}return y.webkit&&(b.name=g?`ios`:`mac`),b.name===`ios`&&y.webview&&(y.version=`-1`),b.version=o(b.version),y.version=o(y.version),b.majorVersion=parseInt(b.version,10),y.majorVersion=parseInt(y.version,10),{browser:y,os:b,isMobile:g,isHints:!0}}():function(e){var t=i(e),n=!!/mobi/g.exec(t),r={name:`unknown`,version:`-1`,majorVersion:-1,webview:h(t),chromium:!1,chromiumVersion:`-1`,webkit:!1,webkitVersion:`-1`},a={name:`unknown`,version:`-1`,majorVersion:-1},o=s(u,t),c=o.preset,l=o.version,p=s(m,t),g=p.preset,_=p.version,v=s(d,t);if(r.chromium=!!v.preset,r.chromiumVersion=v.version,!r.chromium){var y=s(f,t);r.webkit=!!y.preset,r.webkitVersion=y.version}return g&&(a.name=g.id,a.version=_,a.majorVersion=parseInt(_,10)),c&&(r.name=c.id,r.version=l,r.webview&&a.name===`ios`&&r.name!==`safari`&&(r.webview=!1)),r.majorVersion=parseInt(r.version,10),{browser:r,os:a,isMobile:n,isHints:!1}}(Lt),Vt=Bt.browser.webkit,Ht=Vt&&(Rt=typeof window>`u`?{userAgent:``}:window.navigator,!!(zt=/applewebkit\/([^\s]+)/g.exec(Rt.userAgent.toLowerCase()))&&parseFloat(zt[1])<605),Ut=Bt.browser.name,Wt=parseInt(Bt.browser.version,10),Gt=Ut===`chrome`,Kt=Bt.browser.chromium,qt=parseInt(Bt.browser.chromiumVersion,10)||0,Jt=Gt&&Wt>=109||Kt&&qt>=109,Yt=Ut===`firefox`,Xt=parseInt(Bt.browser.webkitVersion,10)>=612||Wt>=15,Zt=`moveable-`,Qt=`
|
|
2
|
-
{
|
|
3
|
-
position: absolute;
|
|
4
|
-
width: 1px;
|
|
5
|
-
height: 1px;
|
|
6
|
-
left: 0;
|
|
7
|
-
top: 0;
|
|
8
|
-
z-index: 3000;
|
|
9
|
-
--moveable-color: #4af;
|
|
10
|
-
--zoom: 1;
|
|
11
|
-
--zoompx: 1px;
|
|
12
|
-
--moveable-line-padding: 0;
|
|
13
|
-
--moveable-control-padding: 0;
|
|
14
|
-
will-change: transform;
|
|
15
|
-
outline: 1px solid transparent;
|
|
16
|
-
}
|
|
17
|
-
.control-box {
|
|
18
|
-
z-index: 0;
|
|
19
|
-
}
|
|
20
|
-
.line, .control {
|
|
21
|
-
position: absolute;
|
|
22
|
-
left: 0;
|
|
23
|
-
top: 0;
|
|
24
|
-
will-change: transform;
|
|
25
|
-
}
|
|
26
|
-
.control {
|
|
27
|
-
width: 14px;
|
|
28
|
-
height: 14px;
|
|
29
|
-
border-radius: 50%;
|
|
30
|
-
border: 2px solid #fff;
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
background: #4af;
|
|
33
|
-
background: var(--moveable-color);
|
|
34
|
-
margin-top: -7px;
|
|
35
|
-
margin-left: -7px;
|
|
36
|
-
border: 2px solid #fff;
|
|
37
|
-
z-index: 10;
|
|
38
|
-
}
|
|
39
|
-
.around-control {
|
|
40
|
-
position: absolute;
|
|
41
|
-
will-change: transform;
|
|
42
|
-
width: calc(var(--moveable-control-padding, 20) * 1px);
|
|
43
|
-
height: calc(var(--moveable-control-padding, 20) * 1px);
|
|
44
|
-
left: calc(var(--moveable-control-padding, 20) * -0.5px);
|
|
45
|
-
top: calc(var(--moveable-control-padding, 20) * -0.5px);
|
|
46
|
-
box-sizing: border-box;
|
|
47
|
-
background: transparent;
|
|
48
|
-
z-index: 8;
|
|
49
|
-
cursor: alias;
|
|
50
|
-
transform-origin: center center;
|
|
51
|
-
}
|
|
52
|
-
${It.map(function(e){var t=``,n=``,r=`center`,i=`center`,a=`calc(var(--moveable-control-padding, 20) * -1px)`;return e.indexOf(`n`)>-1&&(t=`top: ${a};`,i=`bottom`),e.indexOf(`s`)>-1&&(t=`top: 0px;`,i=`top`),e.indexOf(`w`)>-1&&(n=`left: ${a};`,r=`right`),e.indexOf(`e`)>-1&&(n=`left: 0px;`,r=`left`),`.around-control[data-direction*="${e}"] {
|
|
53
|
-
${n}${t}
|
|
54
|
-
transform-origin: ${r} ${i};
|
|
55
|
-
}`}).join(`
|
|
56
|
-
`)}
|
|
57
|
-
.padding {
|
|
58
|
-
position: absolute;
|
|
59
|
-
top: 0px;
|
|
60
|
-
left: 0px;
|
|
61
|
-
width: 100px;
|
|
62
|
-
height: 100px;
|
|
63
|
-
transform-origin: 0 0;
|
|
64
|
-
}
|
|
65
|
-
.line {
|
|
66
|
-
width: 1px;
|
|
67
|
-
height: 1px;
|
|
68
|
-
background: #4af;
|
|
69
|
-
background: var(--moveable-color);
|
|
70
|
-
transform-origin: 0px 50%;
|
|
71
|
-
}
|
|
72
|
-
.line.edge {
|
|
73
|
-
z-index: 1;
|
|
74
|
-
background: transparent;
|
|
75
|
-
}
|
|
76
|
-
.line.dashed {
|
|
77
|
-
box-sizing: border-box;
|
|
78
|
-
background: transparent;
|
|
79
|
-
}
|
|
80
|
-
.line.dashed.horizontal {
|
|
81
|
-
border-top: 1px dashed #4af;
|
|
82
|
-
border-top-color: #4af;
|
|
83
|
-
border-top-color: var(--moveable-color);
|
|
84
|
-
}
|
|
85
|
-
.line.dashed.vertical {
|
|
86
|
-
border-left: 1px dashed #4af;
|
|
87
|
-
border-left-color: #4af;
|
|
88
|
-
border-left-color: var(--moveable-color);
|
|
89
|
-
}
|
|
90
|
-
.line.vertical {
|
|
91
|
-
transform: translateX(-50%);
|
|
92
|
-
}
|
|
93
|
-
.line.horizontal {
|
|
94
|
-
transform: translateY(-50%);
|
|
95
|
-
}
|
|
96
|
-
.line.vertical.bold {
|
|
97
|
-
width: 2px;
|
|
98
|
-
}
|
|
99
|
-
.line.horizontal.bold {
|
|
100
|
-
height: 2px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.control.origin {
|
|
104
|
-
border-color: #f55;
|
|
105
|
-
background: #fff;
|
|
106
|
-
width: 12px;
|
|
107
|
-
height: 12px;
|
|
108
|
-
margin-top: -6px;
|
|
109
|
-
margin-left: -6px;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
}
|
|
112
|
-
${[0,15,30,45,60,75,90,105,120,135,150,165].map(function(e){return`
|
|
113
|
-
.direction[data-rotation="${e}"], :global .view-control-rotation${e} {
|
|
114
|
-
${function(e){var t=function(e,t){return`data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="${32*e}px" height="${32*e}px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(${t}deg);transform-origin: 16px 16px"></path></svg>`}(1,e),n=45*Math.round(e/45)%180,r=`ns-resize`;return n===135?r=`nwse-resize`:n===45?r=`nesw-resize`:n===90&&(r=`ew-resize`),`cursor:${r};cursor: url('${t}') 16 16, ${r};`}(e)}
|
|
115
|
-
}
|
|
116
|
-
`}).join(`
|
|
117
|
-
`)}
|
|
118
|
-
|
|
119
|
-
.line.direction:before {
|
|
120
|
-
content: "";
|
|
121
|
-
position: absolute;
|
|
122
|
-
width: 100%;
|
|
123
|
-
height: calc(var(--moveable-line-padding, 0) * 1px);
|
|
124
|
-
bottom: 0;
|
|
125
|
-
left: 0;
|
|
126
|
-
}
|
|
127
|
-
.group {
|
|
128
|
-
z-index: -1;
|
|
129
|
-
}
|
|
130
|
-
.area {
|
|
131
|
-
position: absolute;
|
|
132
|
-
}
|
|
133
|
-
.area-pieces {
|
|
134
|
-
position: absolute;
|
|
135
|
-
top: 0;
|
|
136
|
-
left: 0;
|
|
137
|
-
display: none;
|
|
138
|
-
}
|
|
139
|
-
.area.avoid, .area.pass {
|
|
140
|
-
pointer-events: none;
|
|
141
|
-
}
|
|
142
|
-
.area.avoid+.area-pieces {
|
|
143
|
-
display: block;
|
|
144
|
-
}
|
|
145
|
-
.area-piece {
|
|
146
|
-
position: absolute;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
${Ht?`:global svg *:before {
|
|
150
|
-
content:"";
|
|
151
|
-
transform-origin: inherit;
|
|
152
|
-
}`:``}
|
|
153
|
-
`,$t=1e-4,en=1e-7,tn=10**10,nn=-tn,rn={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},an={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},on=[`isMoveableElement`,`updateRect`,`updateTarget`,`destroy`,`dragStart`,`isInside`,`hitTest`,`setState`,`getRect`,`request`,`isDragging`,`getManager`,`forceUpdate`,`waitToChangeTarget`,`updateSelectors`,`getTargets`,`stopDrag`,`getControlBoxElement`,`getMoveables`,`getDragElement`];function sn(e,t,n,r,i,a){a===void 0&&(a=`draggable`);var o=t.gestos[a]?.move(n,e.inputEvent)??{},s=o.originalDatas||o.datas,c=s[a]||(s[a]={});return q(q({},i?fi(t,o):o),{isPinch:!!r,parentEvent:!0,datas:c,originalDatas:e.originalDatas})}var cn=function(){function e(e){var t;e===void 0&&(e=`draggable`),this.ableName=e,this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}},this.datas=((t={})[e]={},t)}return e.prototype.dragStart=function(e,t){this.isDrag=!1,this.isFlag=!1;var n=t.originalDatas;return this.datas=n,n[this.ableName]||(n[this.ableName]={}),q(q({},this.move(e,t.inputEvent)),{type:`dragstart`})},e.prototype.drag=function(e,t){return this.move([e[0]-this.prevX,e[1]-this.prevY],t)},e.prototype.move=function(e,t){var n,r,i=!1;if(this.isFlag){var a=this.isDrag;n=this.prevX+e[0],r=this.prevY+e[1],(e[0]||e[1])&&(this.isDrag=!0),!a&&this.isDrag&&(i=!0)}else this.prevX=e[0],this.prevY=e[1],this.startX=e[0],this.startY=e[1],n=e[0],r=e[1],this.isFlag=!0;return this.prevX=n,this.prevY=r,{type:`drag`,clientX:n,clientY:r,inputEvent:t,isFirstDrag:i,isDrag:this.isDrag,distX:n-this.startX,distY:r-this.startY,deltaX:e[0],deltaY:e[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},e}();function ln(e,t,n,r){var i=e.length===16?4:3,a=J(zr(e,n,r,i),4),o=J(a[0],2),s=o[0],c=o[1],l=J(a[1],2),u=l[0],d=l[1],f=J(a[2],2),p=f[0],m=f[1],h=J(a[3],2),g=h[0],_=h[1],v=J(Rr(e,t,i),2),y=v[0],b=v[1],x=Math.min(s,u,p,g),S=Math.min(c,d,m,_),C=Math.max(s,u,p,g);return s=s-x||0,{left:x,top:S,right:C,bottom:Math.max(c,d,m,_),origin:[y=y-x||0,b=b-S||0],pos1:[s,c=c-S||0],pos2:[u=u-x||0,d=d-S||0],pos3:[p=p-x||0,m=m-S||0],pos4:[g=g-x||0,_=_-S||0],direction:Ti(e[0]*e[i+1])}}function un(e,t){var n=t.datas,r=e.state,i=r.allMatrix,a=r.beforeMatrix,o=r.is3d,s=r.left,c=r.top,l=r.origin,u=r.offsetMatrix,d=r.targetMatrix,f=r.transformOrigin,p=o?4:3;n.is3d=o,n.matrix=i,n.targetMatrix=d,n.beforeMatrix=a,n.offsetMatrix=u,n.transformOrigin=f,n.inverseMatrix=Ee(i,p),n.inverseBeforeMatrix=Ee(a,p),n.absoluteOrigin=De(W([s,c],l),p),n.startDragBeforeDist=Me(n.inverseBeforeMatrix,n.absoluteOrigin,p),n.startDragDist=Me(n.inverseMatrix,n.absoluteOrigin,p)}function dn(e,t,n){var r=t.datas,i=t.originalDatas.beforeRenderable,a=r.transformIndex,o=i.nextTransforms,s=o.length,c=i.nextTransformAppendedIndexes,l=-1;a===-1?(n===`translate`?l=0:n===`rotate`&&(l=re(o,function(e){return e.match(/scale\(/g)})),l===-1&&(l=o.length),r.transformIndex=l):l=I(c,function(e){return e.index===a&&e.functionName===n})?a:a+c.filter(function(e){return e.index<a}).length;var u=function(e,t,n){var r=Ke(e,{"x%":function(e){return e/100*t.offsetWidth},"y%":function(e){return e/100*t.offsetHeight}}),i=e.slice(0,n<0?void 0:n),a=e.slice(0,n<0?void 0:n+1),o=e[n]||``,s=n<0?[]:e.slice(n),c=n<0?[]:e.slice(n+1),l=r.slice(0,n<0?void 0:n),u=r.slice(0,n<0?void 0:n+1),d=r[n]??Ke([``])[0],f=n<0?[]:r.slice(n),p=n<0?[]:r.slice(n+1),m=d?[d]:[],h=Ge(l),g=Ge(u),_=Ge(f),v=Ge(p),y=U(h,_,4);return{transforms:e,beforeFunctionMatrix:h,beforeFunctionMatrix2:g,targetFunctionMatrix:Ge(m),afterFunctionMatrix:_,afterFunctionMatrix2:v,allFunctionMatrix:y,beforeFunctions:l,beforeFunctions2:u,targetFunction:m[0],afterFunctions:f,afterFunctions2:p,beforeFunctionTexts:i,beforeFunctionTexts2:a,targetFunctionText:o,afterFunctionTexts:s,afterFunctionTexts2:c}}(o,e.state,l),d=u.targetFunction,f=n===`rotate`?`rotateZ`:n;r.beforeFunctionTexts=u.beforeFunctionTexts,r.afterFunctionTexts=u.afterFunctionTexts,r.beforeTransform=u.beforeFunctionMatrix,r.beforeTransform2=u.beforeFunctionMatrix2,r.targetTansform=u.targetFunctionMatrix,r.afterTransform=u.afterFunctionMatrix,r.afterTransform2=u.afterFunctionMatrix2,r.targetAllTransform=u.allFunctionMatrix,d.functionName===f?(r.afterFunctionTexts.splice(0,1),r.isAppendTransform=!1):s>l&&(r.isAppendTransform=!0,i.nextTransformAppendedIndexes=Y(Y([],J(c),!1),[{functionName:n,index:l,isAppend:!0}],!1))}function fn(e,t,n){return`${e.beforeFunctionTexts.join(` `)} ${e.isAppendTransform?n:t} ${e.afterFunctionTexts.join(` `)}`}function pn(e){var t=e.datas,n=J(hn({datas:t,distX:e.distX,distY:e.distY}),2);return Me(mn(t,function(e,t){for(var n=K(t),r=0;r<t-1;++r)n[t*(t-1)+r]=e[r]||0;return n}([n[0],n[1]],4)),De([0,0,0],4),4)}function mn(e,t,n){var r=e.beforeTransform,i=e.afterTransform,a=e.beforeTransform2,o=e.afterTransform2,s=e.targetAllTransform,c=n?U(s,t,4):U(t,s,4);return U(U(Ee(n?a:r,4),c,4),Ee(n?o:i,4),4)}function hn(e){var t=e.datas,n=e.distX,r=e.distY,i=t.inverseBeforeMatrix,a=t.is3d,o=t.startDragBeforeDist,s=a?4:3;return G(Me(i,W(t.absoluteOrigin,[n,r]),s),o)}function gn(e,t){var n=e.datas,r=e.distX,i=e.distY,a=n.inverseBeforeMatrix,o=n.inverseMatrix,s=n.is3d,c=n.startDragBeforeDist,l=n.startDragDist,u=s?4:3;return G(Me(t?a:o,W(n.absoluteOrigin,[r,i]),u),t?c:l)}function _n(e,t){var n=(t+1)/2;return[T(e[0][0],e[1][0],n,1-n),T(e[0][1],e[1][1],n,1-n)]}function vn(e,t){return _n([_n([e[0],e[1]],t[0]),_n([e[2],e[3]],t[0])],t[1])}function yn(e,t,n,r){return U(e,Er(t,r,n),r)}function bn(e,t){var n=wn(t);return{setTransform:function(r,i){i===void 0&&(i=-1),n.startTransforms=O(r)?r:P(r),Sn(e,t,i)},setTransformIndex:function(n){Sn(e,t,n)}}}function xn(e,t,n){Sn(e,t,re(wn(t).startTransforms,function(e){return e.indexOf(`${n}(`)===0}))}function Sn(e,t,n){var r=wn(t),i=t.datas;if(i.transformIndex=n,n!==-1){var a=r.startTransforms[n];if(a){var o=e.state;i.startValue=Ke([a],{"x%":function(e){return e/100*o.offsetWidth},"y%":function(e){return e/100*o.offsetHeight}})[0].functionValue}}}function Cn(e,t){wn(e).nextTransforms=P(t)}function wn(e){return e.originalDatas.beforeRenderable}function Tn(e){return e.originalDatas.beforeRenderable.nextTransforms}function En(e){return(Tn(e)||[]).join(` `)}function Dn(e){return wn(e).nextStyle}function On(e,t,n,r,i,a){var o=e.props.groupable,s=e.state,c=s.transformOrigin,l=s.offsetMatrix,u=s.is3d,d=s.width,f=s.height,p=s.left,m=s.top,h=a.fixedDirection,g=a.nextTargetMatrix||s.targetMatrix,_=u?4:3,v=function(e,t,n,r,i,a){return r===void 0&&(r=t),i===void 0&&(i=n),a===void 0&&(a=[0,0]),e?e.map(function(e,o){var s=ne(e),c=s.value,l=s.unit,u=o?i:r,d=o?n:t;return e===`%`||isNaN(c)?d*(u?a[o]/u:0):l===`%`?d*c/100:c}):a}(i,t,n,d,f,c),y=o?p:0,b=o?m:0;return G(function(e,t,n,r,i,a){var o=vn(zr(t,n,r,i),a);return[e[0]-o[0],e[1]-o[1]]}(r,yn(l,g,v,_),t,n,_,h),[y,b])}function kn(e){if(e&&e.getRootNode){var t=e.getRootNode();if(t.nodeType===11)return t}}function An(e){var t=e(`scale`),n=e(`rotate`),r=e(`translate`),i=[];return r&&r!==`0px`&&r!==`none`&&i.push(`translate(${r.split(/\s+/).join(`,`)})`),n&&n!==`1`&&n!==`none`&&i.push(`rotate(${n})`),t&&t!==`1`&&t!==`none`&&i.push(`scale(${t.split(/\s+/).join(`,`)})`),i}function jn(e,t,n){for(var r,i,a,o=e,s=[],c=_e(e)||ve(e),l=!n&&e===t||e===c,u=l,d=!1,f=3,p=!1,m=Ar(t,t,!0).offsetParent,h=1;o&&!u;){u=l;var g=In(o),_=g(`position`),v=kr(o),y=_===`fixed`,b=An(g),x=Ae(Tr(v)),S=void 0,C=!1,w=!1,T=0,E=0,D=0,O=0,k={hasTransform:!1,fixedContainer:null};y&&(p=!0,m=(k=Pr(o)).fixedContainer);var A=x.length;d||A!==16&&!b.length||(d=!0,f=4,Nr(s),a&&=Oe(a,3,4)),d&&A===9&&(x=Oe(x,3,4));var j=jr(o,e),M=j.tagName,N=j.hasOffset,ee=j.isSVG,P=j.origin,te=j.targetOrigin,ne=J(j.offset,2),F=ne[0],re=ne[1];M===`svg`&&!o.ownerSVGElement&&a&&(s.push({type:`target`,target:o,matrix:Lr(o,f)}),s.push({type:`offset`,target:o,matrix:K(f)}));var I=parseFloat(g(`zoom`))||1;if(y)S=k.fixedContainer,C=!0;else{var ie=Ar(o,t,!1,!0,g),ae=ie.offsetZoom;if(S=ie.offsetParent,C=ie.isEnd,w=ie.isStatic,h*=ae,(ie.isCustomElement||ae!==1)&&w)F-=S.offsetLeft,re-=S.offsetTop;else if((Yt||Jt)&&ie.parentSlotElement){for(var L=S,oe=0,R=0;L&&kn(L);)oe+=L.offsetLeft,R+=L.offsetTop,L=L.offsetParent;F-=oe,re-=R}}if(!Vt||Xt||!N||ee||!w||_!==`relative`&&_!==`static`||(F-=S.offsetLeft,re-=S.offsetTop,l||=C),y)N&&k.hasTransform&&(D=S.clientLeft,O=S.clientTop);else if(N&&m!==S&&(T=S.clientLeft,E=S.clientTop),N&&S===c){var z=Mr(o,!1);F+=z[0],re+=z[1]}if(s.push({type:`target`,target:o,matrix:Er(x,f,P)}),b.length&&(s.push({type:`offset`,target:o,matrix:K(f)}),s.push({type:`target`,target:o,matrix:Er(We(b),f,P)})),N){var se=o===e,ce=se?0:o.scrollLeft,B=se?0:o.scrollTop;s.push({type:`offset`,target:o,matrix:Ve([F-ce+T-D,re-B+E-O],f)})}else s.push({type:`offset`,target:o,origin:P});if(I!==1&&s.push({type:`zoom`,target:o,matrix:Er(Be([I,I],f),f,[0,0])}),a||=x,r||=P,i||=te,u||y)break;o=S,l=C,n&&o!==c||(u=l)}return a||=K(f),r||=[0,0],i||=[0,0],{zoom:h,offsetContainer:m,matrixes:s,targetMatrix:a,transformOrigin:r,targetOrigin:i,is3d:d,hasFixed:p}}var Mn=null,Nn=null,Pn=null;function Fn(e){e?(window.Map&&(Mn=new Map,Nn=new Map),Pn=[]):(Mn=null,Pn=null,Nn=null)}function In(e){var t=Mn?.get(e);if(!t){var n=ye(e).getComputedStyle(e);if(!Mn)return function(e){return n[e]};t={style:n,cached:{}},Mn.set(e,t)}var r=t.cached,i=t.style;return function(e){return e in r||(r[e]=i[e]),r[e]}}function Ln(e,t,n){var r=n.originalDatas;r.groupable=r.groupable||{};var i=r.groupable;i.childDatas=i.childDatas||[];var a=i.childDatas;return e.moveables.map(function(e,r){return a[r]=a[r]||{},a[r][t]=a[r][t]||{},q(q({},n),{isRequestChild:!0,datas:a[r][t],originalDatas:a[r]})})}function Rn(e,t,n,r,i,a,o){var s=!!n.match(/Start$/g),c=!!n.match(/End$/g),l=i.isPinch,u=i.datas,d=Ln(e,t.name,i),f=e.moveables,p=[],m=d.map(function(e,i){var d=f[i],m=d.state,h=m.gestos,g=e;if(s)g=new cn(o).dragStart(r,e),p.push(g);else{if(h[o]||(h[o]=u.childGestos[i]),!h[o])return;g=sn(e,m,r,l,a,o),p.push(g)}var _=t[n](d,q(q({},g),{parentFlag:!0}));return c&&(h[o]=null),_});return s&&(u.childGestos=f.map(function(e){return e.state.gestos[o]})),{eventParams:m,childEvents:p}}function zn(e,t,n,r,i,a){i===void 0&&(i=function(e,t){return t});var o=!!n.match(/End$/g),s=Ln(e,t.name,r),c=e.moveables;return s.map(function(e,r){var s,l=c[r];s=i(l,e);var u=t[n](l,q(q({},s),{parentFlag:!0}));return u&&a&&a(l,e,u,r),o&&(l.state.gestos={}),u})}function Bn(e,t,n,r){var i=n.fixedDirection,a=n.fixedPosition,o=vn(r.datas.startPositions||$r(t.state),i),s=J(Me(ze(-e.rotation/180*Math.PI,3),[o[0]-a[0],o[1]-a[1],1],3),2),c=s[0],l=s[1];return r.datas.originalX=c,r.datas.originalY=l,r}function Vn(e,t,n,r){var i=Gr(e.props,n),a=i.renderDirections,o=a===void 0?t:a,s=i.displayAroundControls;if(!o)return[];var c=!0===o?It:o;return Y(Y([],J(s?function(e,t,n,r){var i=e.renderState;i.renderDirectionMap||={};var a=e.getState(),o=a.renderPoses,s=a.rotation,c=a.direction,l=i.renderDirectionMap,u=e.props.zoom,d=Ti(c),f=s/Math.PI*180;return(r||L(l)).map(function(e){var r=rn[e];if(!r)return null;var i=(V(f,15)+d*an[e]+720)%180,a=[`around-control`];return n&&a.push(`direction`,n),t.createElement(`div`,{className:X.apply(void 0,Y([],J(a),!1)),"data-rotation":i,"data-direction":e,key:`direction-around-${e}`,style:Wr.apply(void 0,Y([s,u],J(r.map(function(e){return o[e]})),!1))})})}(e,r,n,c):[]),!1),J(function(e,t,n,r){var i=e.getState(),a=i.renderPoses,o=i.rotation,s=i.direction,c=Gr(e.props,t).zoom,l=(f=o/Math.PI*180,f<0&&(f=f%360+360),f%360),u={},d=e.renderState,f;d.renderDirectionMap||={};var p=d.renderDirectionMap;n.forEach(function(e){var t=e.dir;u[t]=!0});var m=Ti(s);return n.map(function(e){var n=e.data,i=e.classNames,s=e.dir,d=rn[s];if(!d||!u[s])return null;p[s]=!0;var f=(V(l,15)+m*an[s]+720)%180,h={};return L(n).forEach(function(e){h[`data-${e}`]=n[e]}),r.createElement(`div`,q({className:X.apply(void 0,Y([`control`,`direction`,s,t],J(i),!1)),"data-rotation":f,"data-direction":s},h,{key:`direction-${s}`,style:Wr.apply(void 0,Y([o,c],J(d.map(function(e){return a[e]})),!1))}))})}(e,n,c.map(function(e){return{data:{},classNames:[],dir:e}}),r)),!1)}function Hn(e,t,n,r,i,a){for(var o=[],s=6;s<arguments.length;s++)o[s-6]=arguments[s];var c=B(n,r),l=t?V(c/Math.PI*180,15)%180:-1;return e.createElement(`div`,{key:`line-${a}`,className:X.apply(void 0,Y([`line`,`direction`,t?`edge`:``,t],J(o),!1)),"data-rotation":l,"data-line-key":a,"data-direction":t,style:Ur(n,r,i,c)})}function Un(e,t,n,r,i){return(!0===n?Ft:n).map(function(n,a){var o=J(rn[n],2),s=o[0],c=o[1];if(c!=null)return Hn(e,n,r[s],r[c],i,`${t}Edge${a}`,t)}).filter(Boolean)}function Wn(e){return function(t,n){var r=Gr(t.props,e).edge;return r&&(!0===r||r.length)?Y(Y([],J(Un(n,e,r,t.getState().renderPoses,t.props.zoom)),!1),J(function(e,t,n){return Vn(e,[`nw`,`ne`,`sw`,`se`],t,n)}(t,e,n)),!1):Gn(t,e,n)}}function Gn(e,t,n){return Vn(e,It,t,n)}function Kn(e,t){var n=e.state,r=n.containerClientRect,i=r.clientHeight,a=r.clientWidth,o=r.clientLeft,s=r.clientTop,c=n.snapOffset,l=c.left,u=c.top,d=c.right,f=c.bottom,p=t||e.props.bounds||{},m=(p.position||`client`)===`css`,h=p.left,g=h===void 0?-1/0:h,_=p.top,v=_===void 0?-1/0:_,y=p.right,b=y===void 0?m?-1/0:1/0:y,x=p.bottom,S=x===void 0?m?-1/0:1/0:x;return m&&(b=a+d-l-b,S=i+f-u-S),{left:g+l-o,right:b+l-o,top:v+u-s,bottom:S+u-s}}function qn(e,t,n){var r=e[n?`left`:`top`],i=e[n?`right`:`bottom`],a=Math.min.apply(Math,Y([],J(t),!1)),o=Math.max.apply(Math,Y([],J(t),!1)),s=[];return r+1>a&&s.push({direction:`start`,isBound:!0,offset:a-r,pos:r}),i-1<o&&s.push({direction:`end`,isBound:!0,offset:o-i,pos:i}),s.length||s.push({isBound:!1,offset:0,pos:0}),s.sort(function(e,t){return $(t.offset)-$(e.offset)})}var Jn=[`left`,`right`,`center`],Yn=[`top`,`bottom`,`middle`];function Xn(e,t){var n=e.props,r=n.snappable,i=n.bounds,a=n.innerBounds,o=n.verticalGuidelines,s=n.horizontalGuidelines,c=n.snapGridWidth,l=n.snapGridHeight,u=e.state,d=u.guidelines,f=u.enableSnap;return!(!r||!f||t&&!0!==r&&r.indexOf(t)<0)&&!!(c||l||i||a||d&&d.length||o&&o.length||s&&s.length)}function Zn(e){return!1===e?{}:!0!==e&&e?e:{left:!0,right:!0,top:!0,bottom:!0}}function Qn(e,t){var n=function(e,t){var n=Zn(e),r={};for(var i in n)i in t&&n[i]&&(r[i]=t[i]);return r}(e,t),r=Yn.filter(function(e){return e in n}),i=Jn.filter(function(e){return e in n});return{horizontalNames:r,verticalNames:i,horizontal:r.map(function(e){return n[e]}),vertical:i.map(function(e){return n[e]})}}function $n(e,t,n,r,i,a,o){r===void 0&&(r=[]),i===void 0&&(i=[]);var s=e.props,c=e.state.snapThresholdInfo?.multiples||[1,1],l=ci(o,s.snapHorizontalThreshold,5),u=ci(a,s.snapVerticalThreshold,5);return function(e,t,n,r,i,a,o,s){return{vertical:tr(e,`vertical`,t,o*s[0],r),horizontal:tr(e,`horizontal`,n,a*s[1],i)}}(e.state.guidelines,t,n,r,i,l,u,c)}function er(e){var t=e.isSnap;if(!t)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var n=e.posInfos[0],r=n.guidelineInfos[0],i=r.offset,a=r.dist,o=r.guideline;return{isSnap:t,offset:i,dist:a,pos:n.pos,guideline:o}}function tr(e,t,n,r,i){if(i===void 0&&(i=[]),!e||!e.length)return{isSnap:!1,index:-1,direction:``,posInfos:[]};var a=t===`vertical`?0:1,o=n.map(function(n,o){var s=i[o]||``;return{pos:n,index:o,guidelineInfos:e.map(function(e){var t=n-e.pos[a];return{offset:t,dist:$(t),guideline:e,direction:s}}).filter(function(e){var n=e.guideline,i=e.dist;return!(n.type!==t||i>r)}).sort(function(e,t){return e.dist-t.dist}),direction:s}}).filter(function(e){return e.guidelineInfos.length>0}).sort(function(e,t){return e.guidelineInfos[0].dist-t.guidelineInfos[0].dist}),s=o.length>0;return{isSnap:s,index:s?o[0].index:-1,direction:o[0]?.direction??``,posInfos:o}}function nr(e,t){return e.slice().sort(function(e,n){var r=e.sign[t],i=n.sign[t],a=e.offset[t],o=n.offset[t];return r?i?function(e,t){var n=$(e.offset),r=$(t.offset);return e.isBound&&t.isBound?r-n:e.isBound?-1:t.isBound?1:e.isSnap&&t.isSnap?r-n:e.isSnap?-1:t.isSnap||n<en?1:r<en?-1:n-r}({isBound:e.isBound,isSnap:e.isSnap,offset:a},{isBound:n.isBound,isSnap:n.isSnap,offset:o}):-1:1})[0]}function rr(e,t){var n,r,i=J(t,2),a=i[0],o=i[1],s=o[0]-a[0],c=o[1]-a[1];return $(s)<en&&(s=0),$(c)<en&&(c=0),s?c?(n=c/s*(e[0]-a[0])+a[1],r=e[1]):(n=a[1],r=e[1]):(n=a[0],r=e[0]),n-r}function ir(e,t,n,r,i){return i===void 0&&(i=0),r&&t-i<=e||!r&&e<=n+i?{isBound:!0,offset:r?t-e:n-e}:{isBound:!1,offset:0}}function ar(e,t){var n=t.line,r=t.centerSign,i=t.verticalSign,a=t.horizontalSign,o=t.lineConstants,s=e.props.innerBounds;if(!s)return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var c=s.left,l=s.top,u=s.width,d=s.height,f=[[c,l],[c,l+d]],p=[[c,l],[c+u,l]],m=[[c+u,l],[c+u,l+d]],h=[[c,l+d],[c+u,l+d]];if(function(e,t,n,r){return r===void 0&&(r=en),e.every(function(e){var i=rr(e,t);return i<=0===n||$(i)<=r})}([[c,l],[c+u,l],[c,l+d],[c+u,l+d]],n,r))return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var g=or(n,o,p,i),_=or(n,o,h,i),v=or(n,o,f,a),y=or(n,o,m,a),b=g.isBound&&_.isBound,x=g.isBound||_.isBound,S=v.isBound&&y.isBound,C=v.isBound||y.isBound,w=ui(g.offset,_.offset),T=ui(v.offset,y.offset),E=[0,0],D=!1,O=!1;return $(T)<$(w)?(E=[w,0],D=x,O=b):(E=[0,T],D=C,O=S),{isAllBound:O,isVerticalBound:x,isHorizontalBound:C,isBound:D,offset:E}}function or(e,t,n,r,i,a){var o,s,c=J(t,2),l=c[0],u=c[1],d=e[0],f=n[0],p=n[1],m=mi(p[1]-f[1]),h=u,g=l,_=-l/u;return mi(p[0]-f[0])?m||a&&!h?{isBound:!1,offset:0}:g?ir((f[1]-d[1])/_+d[0],f[0],p[0],r,i):{isBound:s=$(o=f[1]-d[1])<=(i||0),offset:s?o:0}:a&&!g?{isBound:!1,offset:0}:h?ir(_*(f[0]-d[0])+d[1],f[1],p[1],r,i):{isBound:s=$(o=f[0]-d[0])<=(i||0),offset:s?o:0}}function sr(e,t,n){return t.map(function(t){var r=ar(e,t),i=r.isBound,a=r.offset,o=r.isVerticalBound,s=r.isHorizontalBound,c=t.multiple;return{sign:c,isBound:i,isVerticalBound:o,isHorizontalBound:s,isSnap:!1,offset:gn({datas:n,distX:a[0],distY:a[1]}).map(function(e,t){return e*(c[t]?2/c[t]:0)})}})}function cr(e,t,n){var r,i=sr(e,lr(e,t,[0,0],!1).map(function(e){return q(q({},e),{multiple:e.multiple.map(function(e){return 2*$(e)})})}),n),a=nr(i,0),o=nr(i,1),s=0,c=0,l=a.isVerticalBound||o.isVerticalBound,u=a.isHorizontalBound||o.isHorizontalBound;return(l||u)&&(r=J(function(e,t){var n=e.datas,r=e.distX,i=e.distY,a=n.beforeMatrix,o=n.matrix,s=n.is3d,c=n.startDragBeforeDist,l=n.startDragDist,u=n.absoluteOrigin,d=s?4:3;return G(Me(t?a:o,W(t?c:l,[r,i]),d),u)}({datas:n,distX:-a.offset[0],distY:-o.offset[1]}),2),s=r[0],c=r[1]),{vertical:{isBound:l,offset:s},horizontal:{isBound:u,offset:c}}}function lr(e,t,n,r){var i=e.state,a=zr(i.allMatrix,100,100,i.is3d?4:3),o=vn(a,[0,0]);return function(e,t){var n=[],r=e[0],i=e[1];return r&&i?n.push([[0,2*i],e,[-r,i]],[[2*r,0],e,[r,-i]]):r?(n.push([[2*r,0],[r,1],[r,-1]]),t&&n.push([[0,-1],[r,-1],[-r,-1]],[[0,1],[r,1],[-r,1]])):i?(n.push([[0,2*i],[1,i],[-1,i]]),t&&n.push([[-1,0],[-1,i],[-1,-i]],[[1,0],[1,i],[1,-i]])):n.push([[-1,0],[-1,-1],[-1,1]],[[1,0],[1,-1],[1,1]],[[0,-1],[-1,-1],[1,-1]],[[0,1],[-1,1],[1,1]]),n}(n,r).map(function(e){var n=J(e,3),r=n[0],i=n[1],s=n[2],c=[vn(a,i),vn(a,s)],l=function(e){var t=J(e,2),n=t[0],r=t[1],i=r[0]-n[0],a=r[1]-n[1];Math.abs(i)<1e-7&&(i=0),Math.abs(a)<1e-7&&(a=0);var o=0,s=0,c=0;return i?a?(s=1,c=(o=-a/i)*n[0]-n[1]):(s=1,c=-n[1]):(o=-1,c=n[0]),[o,s,c].map(function(e){return V(e,C)})}(c),u=function(e,t){var n=ce([t[0][0],t[1][0]]),r=ce([t[0][1],t[1][1]]);return{vertical:n<=e[0],horizontal:r<=e[1]}}(o,c),d=u.vertical,f=u.horizontal;return{multiple:r,centerSign:rr(o,c)<=0,verticalSign:d,horizontalSign:f,lineConstants:l,line:[vn(t,i),vn(t,s)]}})}function ur(e,t,n,r,i){var a=function(e,t,n,r){var i=t[0]-e[0],a=t[1]-e[1];if($(i)<1e-7&&(i=0),$(a)<1e-7&&(a=0),!i)return r?[0,0]:[0,n];if(!a)return r?[n,0]:[0,0];var o=a/i,s=e[1]-o*e[0];return r?[n,o*(t[0]+n)+s-t[1]]:[(t[1]+n-s)/o-t[0],n]}(e,t,n,r);if(!a)return{isOutside:!1,offset:[0,0]};var o=ue(e,t),s=ue(a,e),c=ue(a,t),l=s>o||c>o,u=J(gn({datas:i,distX:a[0],distY:a[1]}),2);return{offset:[u[0],u[1]],isOutside:l}}function dr(e,t){return e.isBound?e.offset:t.isSnap?er(t).offset:0}function fr(e,t,n,r,i,a){if(!Xn(e,`draggable`))return[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}];var o=Qr(a.absolutePoses,[t,n]),s=Br(o),c=s.left,l=s.right,u=s.top,d=s.bottom,f={horizontal:o.map(function(e){return e[1]}),vertical:o.map(function(e){return e[0]})},p=pr(e,i,Qn(Zn(e.props.snapDirections),{left:c,right:l,top:u,bottom:d,center:(c+l)/2,middle:(u+d)/2}),f),m=p.vertical,h=p.horizontal,g=cr(e,o,a),_=g.vertical,v=g.horizontal,y=m.isSnap,b=h.isSnap,x=m.isBound||_.isBound,S=h.isBound||v.isBound,C=J(function(e,t,n,r,i){var a=J(t,2),o=a[0],s=a[1],c=J(n,2),l=c[0],u=c[1],d=J(r,2),f=d[0],p=d[1],m=J(i,2),h=m[0],g=m[1],_=-h,v=-g;if(e&&o&&s){_=0,v=0;var y=[];if(l&&u?y.push([0,g],[h,0]):l?y.push([h,0]):u?y.push([0,g]):f&&p?y.push([0,g],[h,0]):f?y.push([h,0]):p&&y.push([0,g]),y.length){y.sort(function(e,t){return Hr(G([o,s],e))-Hr(G([o,s],t))});var b=y[0];if(b[0]&&$(o)>1e-7)_=-b[0],v=s*$(o+_)/$(o)-s;else if(b[1]&&$(s)>1e-7){var x=s;v=-b[1],_=o*$(s+v)/$(x)-o}if(e&&u&&l)if($(_)>1e-7&&$(_)<$(h))_*=S=$(h)/$(_),v*=S;else if($(v)>1e-7&&$(v)<$(g)){var S;_*=S=$(g)/$(v),v*=S}else _=ui(-h,_),v=ui(-g,v)}}else _=o||l?-h:0,v=s||u?-g:0;return[_,v]}(r,[t,n],[x,S],[y,b],[ui(m.offset,_.offset),ui(h.offset,v.offset)]),2);return[{isBound:x,isSnap:y,offset:C[0]},{isBound:S,isSnap:b,offset:C[1]}]}function pr(e,t,n,r){r===void 0&&(r=n);var i=function(e,t,n){var r=e||{},i=r.position,a=i===void 0?`client`:i,o=r.left,s=o===void 0?-1/0:o,c=r.top,l=c===void 0?-1/0:c,u=r.right,d=u===void 0?1/0:u,f=r.bottom,p={position:a,left:s,top:l,right:d,bottom:f===void 0?1/0:f};return{vertical:qn(p,t,!0),horizontal:qn(p,n,!1)}}(Kn(e),r.vertical,r.horizontal),a=i.horizontal,o=i.vertical,s=t?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:$n(e,n.vertical,n.horizontal,void 0,void 0,void 0,void 0),c=s.horizontal,l=s.vertical,u=dr(a[0],c),d=dr(o[0],l),f=$(u),p=$(d);return{horizontal:{isBound:a[0].isBound,isSnap:c.isSnap,snapIndex:c.index,offset:u,dist:f,bounds:a,snap:c},vertical:{isBound:o[0].isBound,isSnap:l.isSnap,snapIndex:l.index,offset:d,dist:p,bounds:o,snap:l}}}function mr(e,t,n,r,i,a){return n.map(function(n){var o=J(n,2),s=o[0],c=o[1],l=vn(t,s),u=vn(t,c),d=r?function(e,t,n,r){var i=function(e,t,n){var r=Kn(e),i=r.left,a=r.top,o=r.right,s=r.bottom,c=J(n,2),l=c[0],u=c[1],d=J(G(n,t),2),f=d[0],p=d[1];$(f)<en&&(f=0),$(p)<en&&(p=0);var m=p>0,h=f>0,g={isBound:!1,offset:0,pos:0},_={isBound:!1,offset:0,pos:0};if(f===0&&p===0)return{vertical:g,horizontal:_};if(f===0)m?s<u&&(_.pos=s,_.offset=u-s):a>u&&(_.pos=a,_.offset=u-a);else if(p===0)h?o<l&&(g.pos=o,g.offset=l-o):i>l&&(g.pos=i,g.offset=l-i);else{var v=p/f,y=n[1]-v*l,b=0,x=0,S=!1;h&&o<=l?(b=v*o+y,x=o,S=!0):!h&&l<=i&&(b=v*i+y,x=i,S=!0),S&&(b<a||b>s)&&(S=!1),S||(m&&s<=u?(x=((b=s)-y)/v,S=!0):!m&&u<=a&&(x=((b=a)-y)/v,S=!0)),S&&(g.isBound=!0,g.pos=x,g.offset=l-x,_.isBound=!0,_.pos=b,_.offset=u-b)}return{vertical:g,horizontal:_}}(e,t,n),a=i.horizontal,o=i.vertical,s=r?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:function(e,t,n){var r=J(n,2),i=r[0],a=r[1],o=J(t,2),s=o[0],c=o[1],l=J(G(n,t),2),u=l[0],d=l[1],f=d>0,p=u>0;u=mi(u),d=mi(d);var m={isSnap:!1,offset:0,pos:0},h={isSnap:!1,offset:0,pos:0};if(u===0&&d===0)return{vertical:m,horizontal:h};var g=$n(e,u?[i]:[],d?[a]:[],[],[],void 0,void 0),_=g.vertical,v=g.horizontal;_.posInfos.filter(function(e){var t=e.pos;return p?t>=s:t<=s}),v.posInfos.filter(function(e){var t=e.pos;return f?t>=c:t<=c}),_.isSnap=_.posInfos.length>0,v.isSnap=v.posInfos.length>0;var y=er(_),b=y.isSnap,x=y.guideline,S=er(v),C=S.isSnap,w=S.guideline,T=C?w.pos[1]:0,E=b?x.pos[0]:0;if(u===0)C&&(h.isSnap=!0,h.pos=w.pos[1],h.offset=a-h.pos);else if(d===0)b&&(m.isSnap=!0,m.pos=E,m.offset=i-E);else{var D=d/u,O=n[1]-D*i,k=0,A=0,j=!1;b?(k=D*(A=E)+O,j=!0):C&&(A=((k=T)-O)/D,j=!0),j&&(m.isSnap=!0,m.pos=A,m.offset=i-A,h.isSnap=!0,h.pos=k,h.offset=a-k)}return{vertical:m,horizontal:h}}(e,t,n),c=s.horizontal,l=s.vertical,u=hr(a,c),d=hr(o,l),f=$(u),p=$(d);return{horizontal:{isBound:a.isBound,isSnap:c.isSnap,offset:u,dist:f},vertical:{isBound:o.isBound,isSnap:l.isSnap,offset:d,dist:p}}}(e,l,u,i):pr(e,i,{vertical:[u[0]],horizontal:[u[1]]}),f=d.horizontal,p=f.offset,m=f.isBound,h=f.isSnap,g=d.vertical,_=g.offset,v=g.isBound,y=g.isSnap,b=G(c,s);if(!_&&!p)return{isBound:v||m,isSnap:y||h,sign:b,offset:[0,0]};var x=function(e,t,n,r){var i=B(e,t)/Math.PI*180,a=n.vertical,o=a.isBound,s=a.isSnap,c=a.dist,l=n.horizontal,u=l.isBound,d=l.isSnap,f=i%180,p=f<3||f>177,m=f>87&&f<93;return l.dist<c&&(o||s&&!m&&(!r||!p))?`vertical`:!u&&(!d||p||r&&m)?``:`horizontal`}(l,u,d,r);if(!x)return{sign:b,isBound:!1,isSnap:!1,offset:[0,0]};var S=x===`vertical`,C=[0,0];return C=(C=r||$(c[0])!==1||$(c[1])!==1||s[0]===c[0]||s[1]===c[1]?ur(l,u,-(S?_:p),S,a).offset:gn({datas:a,distX:-_,distY:-p})).map(function(e,t){return e*(b[t]?2/b[t]:0)}),{sign:b,isBound:S?v:m,isSnap:S?y:h,offset:C}})}function hr(e,t){return e.isBound?e.offset:t.isSnap?t.offset:0}var gr={name:`draggable`,props:[`draggable`,`throttleDrag`,`throttleDragRotate`,`hideThrottleDragRotateLine`,`startDragRotate`,`edgeDraggable`],events:[`dragStart`,`drag`,`dragEnd`,`dragGroupStart`,`dragGroup`,`dragGroupEnd`],requestStyle:function(){return[`left`,`top`,`right`,`bottom`]},requestChildStyle:function(){return[`left`,`top`,`right`,`bottom`]},render:function(e,t){var n=e.props,r=n.hideThrottleDragRotateLine,i=n.throttleDragRotate,a=n.zoom,o=e.getState(),s=o.dragInfo,c=o.beforeOrigin;if(r||!i||!s)return[];var l=s.dist;if(!l[0]&&!l[1])return[];var u=Hr(l),d=B(l,[0,0]);return[t.createElement(`div`,{className:X(`line`,`horizontal`,`dragline`,`dashed`),key:`dragRotateGuideline`,style:{width:`${u}px`,transform:`translate(${c[0]}px, ${c[1]}px) rotate(${d}rad) scaleY(${a})`}})]},dragStart:function(e,t){var n=t.datas,r=t.parentEvent,i=t.parentGesto,a=e.state,o=a.gestos,s=a.style;if(o.draggable)return!1;o.draggable=i||e.targetGesto,n.datas={},n.left=parseFloat(s.left||``)||0,n.top=parseFloat(s.top||``)||0,n.bottom=parseFloat(s.bottom||``)||0,n.right=parseFloat(s.right||``)||0,n.startValue=[0,0],un(e,t),xn(e,t,`translate`),function(e,t){t.absolutePoses=$r(e.state)}(e,n),n.prevDist=[0,0],n.prevBeforeDist=[0,0],n.isDrag=!1,n.deltaOffset=[0,0];var c=Z(e,t,q({set:function(e){n.startValue=e}},bn(e,t)));return!1===(r||Q(e,`onDragStart`,c))?(o.draggable=null,n.isPinch=!1):(n.isDrag=!0,e.state.dragInfo={startRect:e.getRect(),dist:[0,0]}),!!n.isDrag&&c},drag:function(e,t){if(t){dn(e,t,`translate`);var n=t.datas,r=t.parentEvent,i=t.parentFlag,a=t.isPinch,o=t.deltaOffset,s=t.useSnap,c=t.isRequest,l=t.isGroup,u=t.parentThrottleDrag,d=t.distX,f=t.distY,p=n.isDrag,m=n.prevDist,h=n.prevBeforeDist,g=n.startValue;if(p){o&&(d+=o[0],f+=o[1]);var _=e.props,v=_.parentMoveable,y=l?0:_.throttleDrag||u||0,b=r?0:_.throttleDragRotate||0,x=0,S=!1,C=!1,w=!1,T=!1;if(!r&&b>0&&(d||f)){var E=_.startDragRotate||0,D=V(E+180*B([0,0],[d,f])/Math.PI,b)-E,O=f*Math.abs(Math.cos((D-90)/180*Math.PI)),k=Hr([d*Math.abs(Math.cos(D/180*Math.PI)),O]);x=D*Math.PI/180,d=k*Math.cos(x),f=k*Math.sin(x)}if(!a&&!r&&!i){var A=J(fr(e,d,f,b,!s&&c||o,n),2),j=A[0],M=A[1];S=j.isSnap,C=j.isBound,w=M.isSnap,T=M.isBound,d+=j.offset,f+=M.offset}var N=W(hn({datas:n,distX:d,distY:f}),g),ee=W(pn({datas:n,distX:d,distY:f}),g);de(ee,en),de(N,en),b||(S||C||(ee[0]=V(ee[0],y),N[0]=V(N[0],y)),w||T||(ee[1]=V(ee[1],y),N[1]=V(N[1],y)));var P=G(N,g),te=G(ee,g),ne=G(te,m),F=G(P,h);n.prevDist=te,n.prevBeforeDist=P,n.passDelta=ne,n.passDist=te;var re=n.left+P[0],I=n.top+P[1],ie=n.right-P[0],ae=n.bottom-P[1],L=fn(n,`translate(${ee[0]}px, ${ee[1]}px)`,`translate(${te[0]}px, ${te[1]}px)`);if(Cn(t,L),e.state.dragInfo.dist=r?[0,0]:te,r||v||!ne.every(function(e){return!e})||!F.some(function(e){return!e})){var oe=e.state,R=oe.width,z=oe.height,se=Z(e,t,q({transform:L,dist:te,delta:ne,translate:ee,beforeDist:P,beforeDelta:F,beforeTranslate:N,left:re,top:I,right:ie,bottom:ae,width:R,height:z,isPinch:a},ni({transform:L},t)));return!r&&Q(e,`onDrag`,se),se}}}},dragAfter:function(e,t){var n=t.datas,r=n.deltaOffset;return!(!r[0]&&!r[1])&&(n.deltaOffset=[0,0],this.drag(e,q(q({},t),{deltaOffset:r})))},dragEnd:function(e,t){var n=t.parentEvent,r=t.datas;if(e.state.dragInfo=null,r.isDrag){r.isDrag=!1;var i=ri(e,t,{});return!n&&Q(e,`onDragEnd`,i),i}},dragGroupStart:function(e,t){var n=t.datas,r=t.clientX,i=t.clientY,a=this.dragStart(e,t);if(!a)return!1;var o=Rn(e,this,`dragStart`,[r||0,i||0],t,!1,`draggable`),s=o.childEvents,c=o.eventParams;n.isDrag=!1!==Q(e,`onDragGroupStart`,q(q({},a),{targets:e.props.targets,events:c}));var l=s[0]?.datas.startValue??[0,0];return n.throttleOffset=[l[0]%1,l[1]%1],!!n.isDrag&&a},dragGroup:function(e,t){if(t.datas.isDrag){var n=this.drag(e,q(q({},t),{parentThrottleDrag:e.props.throttleDrag})),r=Rn(e,this,`drag`,t.datas.passDelta,t,!1,`draggable`).eventParams;if(n){var i=q({targets:e.props.targets,events:r},n);return Q(e,`onDragGroup`,i),i}}},dragGroupEnd:function(e,t){var n=t.isDrag;if(t.datas.isDrag){this.dragEnd(e,t);var r=Rn(e,this,`dragEnd`,[0,0],t,!1,`draggable`).eventParams;return Q(e,`onDragGroupEnd`,ri(e,t,{targets:e.props.targets,events:r})),n}},request:function(e){var t={},n=e.getRect(),r=0,i=0,a=!1;return{isControl:!1,requestStart:function(e){return a=e.useSnap,{datas:t,useSnap:a}},request:function(e){return`x`in e?r=e.x-n.left:`deltaX`in e&&(r+=e.deltaX),`y`in e?i=e.y-n.top:`deltaY`in e&&(i+=e.deltaY),{datas:t,distX:r,distY:i,useSnap:a}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:a}}}},unset:function(e){e.state.gestos.draggable=null,e.state.dragInfo=null}};function _r(e,t){return{fixedPosition:vn(e,t),fixedDirection:t,fixedOffset:[0,0]}}var vr=gi(`resizable`),yr={name:`resizable`,ableGroup:`size`,canPinch:!0,props:[`resizable`,`throttleResize`,`renderDirections`,`displayAroundControls`,`keepRatio`,`resizeFormat`,`keepRatioFinally`,`edge`,`checkResizableError`],events:[`resizeStart`,`beforeResize`,`resize`,`resizeEnd`,`resizeGroupStart`,`beforeResizeGroup`,`resizeGroup`,`resizeGroupEnd`],render:Wn(`resizable`),dragControlCondition:vr,viewClassName:hi(`resizable`),dragControlStart:function(e,t){var n=t.inputEvent,r=t.isPinch,i=t.isGroup,a=t.parentDirection,o=t.parentGesto,s=t.datas,c=t.parentFixedDirection,l=t.parentEvent,u=Xr(a,r,n,s),d=e.state,f=d.target,p=d.width,m=d.height,h=d.gestos;if(!u||!f||h.resizable)return!1;h.resizable=o||e.controlGesto,!r&&un(e,t),s.datas={},s.direction=u,s.startOffsetWidth=p,s.startOffsetHeight=m,s.prevWidth=0,s.prevHeight=0,s.minSize=[0,0],s.startWidth=d.inlineCSSWidth||d.cssWidth,s.startHeight=d.inlineCSSHeight||d.cssHeight,s.maxSize=[1/0,1/0],i||(s.minSize=[d.minOffsetWidth,d.minOffsetHeight],s.maxSize=[d.maxOffsetWidth,d.maxOffsetHeight]);var g=e.props.transformOrigin||`% %`;function _(e){s.ratio=e&&isFinite(e)?e:0}function v(e){var t=_r(s.startPositions,e);s.fixedDirection=t.fixedDirection,s.fixedPosition=t.fixedPosition,s.fixedOffset=t.fixedOffset}function y(t){var n=function(e,t){var n=e.allMatrix,r=e.is3d,i=e.width,a=e.height,o=r?4:3,s=function(e,t,n){return[t?e[0]/(t/2)-1:0,n?e[1]/(n/2)-1:0]}(t,i,a);return{fixedPosition:Rr(n,t,o),fixedDirection:s,fixedOffset:[i?0:t[0],a?0:t[1]]}}(e.state,t);s.fixedDirection=n.fixedDirection,s.fixedPosition=n.fixedPosition,s.fixedOffset=n.fixedOffset}function b(e){s.minSize=[oe(`${e[0]}`,0)||0,oe(`${e[1]}`,0)||0]}function x(e){var t=[e[0]||1/0,e[1]||1/0];A(t[0])&&!isFinite(t[0])||(t[0]=oe(`${t[0]}`,0)||1/0),A(t[1])&&!isFinite(t[1])||(t[1]=oe(`${t[1]}`,0)||1/0),s.maxSize=t}s.transformOrigin=g&&k(g)?g.split(` `):g,s.startOffsetMatrix=d.offsetMatrix,s.startTransformOrigin=d.transformOrigin,s.isWidth=t?.parentIsWidth??(!u[0]&&!u[1]||u[0]||!u[1]),s.startPositions=$r(e.state),_(p/m),v(c||[-u[0],-u[1]]),s.setFixedDirection=v,s.setFixedPosition=y,s.setMin=b,s.setMax=x;var S=Z(e,t,{direction:u,startRatio:s.ratio,set:function(e){var t=J(e,2),n=t[0],r=t[1];s.startWidth=n,s.startHeight=r},setMin:b,setMax:x,setRatio:_,setFixedDirection:v,setFixedPosition:y,setOrigin:function(e){s.transformOrigin=e},dragStart:gr.dragStart(e,new cn().dragStart([0,0],t))}),C=l||Q(e,`onResizeStart`,S);return s.startFixedDirection=s.fixedDirection,s.startFixedPosition=s.fixedPosition,!1!==C&&(s.isResize=!0,e.state.snapRenderInfo={request:t.isRequest,direction:u}),!!s.isResize&&S},dragControl:function(e,t){var n,r=t.datas,i=t.parentFlag,a=t.isPinch,o=t.parentKeepRatio,s=t.dragClient,c=t.parentDist,l=t.useSnap,u=t.isRequest,d=t.isGroup,f=t.parentEvent,p=t.resolveMatrix,m=r.isResize,h=r.transformOrigin,g=r.startWidth,_=r.startHeight,v=r.prevWidth,y=r.prevHeight,b=r.minSize,x=r.maxSize,S=r.ratio,C=r.startOffsetWidth,w=r.startOffsetHeight,T=r.isWidth;if(m){if(p){var E=e.state.is3d,D=r.startOffsetMatrix,O=r.startTransformOrigin,k=E?4:3,A=We(Tn(t)),j=Math.sqrt(A.length);k!==j&&(A=Oe(A,j,k));var M=yn(D,A,O,k);r.startPositions=zr(M,C,w,k),r.nextTargetMatrix=A,r.nextAllMatrix=M}var N=Gr(e.props,`resizable`),ee=N.resizeFormat,P=N.throttleResize,te=P===void 0?+!i:P,ne=N.parentMoveable,F=N.keepRatioFinally,re=r.direction,I=re,ie=0,ae=0;re[0]||re[1]||(I=[1,1]);var L=S&&(o??N.keepRatio)||!1,oe=J(be(),2),R=oe[0],z=oe[1];f||(r.setFixedDirection(r.fixedDirection),Q(e,`onBeforeResize`,Z(e,t,{startFixedDirection:r.startFixedDirection,startFixedPosition:r.startFixedPosition,setFixedDirection:function(e){var t;return r.setFixedDirection(e),t=J(be(),2),R=t[0],z=t[1],[R,z]},setFixedPosition:function(e){var t;return r.setFixedPosition(e),t=J(be(),2),R=t[0],z=t[1],[R,z]},boundingWidth:R,boundingHeight:z,setSize:function(e){var t=J(e,2);R=t[0],z=t[1]}},!0)));var ce=s;s||(ce=!i&&a?function(e,t){return vn($r(e.state),t)}(e,[0,0]):r.fixedPosition);var B=[0,0];if(a||(B=function(e,t,n,r,i,a,o){if(!Xn(e,`resizable`))return[0,0];var s=o.fixedDirection,c=o.nextAllMatrix,l=e.state,u=l.allMatrix,d=l.is3d;return Cr(e,function(e,r){return br(c||u,t+e,n+r,s,i,d)},t,n,r,i,a,o)}(e,R,z,re,ce,!l&&u,r)),c&&(!c[0]&&(B[0]=0),!c[1]&&(B[1]=0)),L){I[0]&&I[1]&&B[0]&&B[1]&&($(B[0])>$(B[1])?B[1]=0:B[0]=0);var le=!B[0]&&!B[1];le&&xe(),I[0]&&!I[1]||B[0]&&!B[1]||le&&T?(R+=B[0],z=R/S):(!I[0]&&I[1]||!B[0]&&B[1]||le&&!T)&&(z+=B[1],R=z*S)}else R+=B[0],z+=B[1],R=Math.max(0,R),z=Math.max(0,z);n=J(se([R,z],b,x,!!L&&S),2),R=n[0],z=n[1],xe(),L&&(d||F)&&(T?z=R/S:R=z*S);var ue=[(ie=R-C)-v,(ae=z-w)-y];r.prevWidth=ie,r.prevHeight=ae;var de=On(e,R,z,ce,h,r);if(ne||!ue.every(function(e){return!e})||!de.every(function(e){return!e})){var fe,pe,me,he,H=gr.drag(e,sn(t,e.state,de,!!a,!1,`draggable`)),ge=H.transform,_e=g+ie,ve=_+ae,ye=Z(e,t,q({width:_e,height:ve,offsetWidth:Math.round(R),offsetHeight:Math.round(z),startRatio:S,boundingWidth:R,boundingHeight:z,direction:re,dist:[ie,ae],delta:ue,isPinch:!!a,drag:H},(fe={style:{width:`${_e}px`,height:`${ve}px`},transform:ge},me=t,he=(pe=H).afterTransform||pe.transform,q(q({},ni(q(q(q({},fe.style),pe.style),{transform:he}),me)),{afterTransform:he,transform:fe.transform}))));return!f&&Q(e,`onResize`,ye),ye}}function be(){var e=r.fixedDirection,n=yi(I,L,r,t);ie=n.distWidth,ae=n.distHeight;var i=I[0]-e[0]||L?Math.max(C+ie,en):C,a=I[1]-e[1]||L?Math.max(w+ae,en):w;return L&&C&&w&&(T?a=i/S:i=a*S),[i,a]}function xe(){var e;ee&&(e=J(ee([R,z]),2),R=e[0],z=e[1]),R=V(R,te),z=V(z,te)}},dragControlAfter:function(e,t){var n=t.datas,r=n.isResize,i=n.startOffsetWidth,a=n.startOffsetHeight,o=n.prevWidth,s=n.prevHeight;if(r&&!1!==e.props.checkResizableError){var c=e.state,l=c.width-(i+o),u=c.height-(a+s),d=$(l)>3,f=$(u)>3;return d&&(n.startWidth+=l,n.startOffsetWidth+=l,n.prevWidth+=l),f&&(n.startHeight+=u,n.startOffsetHeight+=u,n.prevHeight+=u),d||f?this.dragControl(e,t):void 0}},dragControlEnd:function(e,t){var n=t.datas,r=t.parentEvent;if(n.isResize){n.isResize=!1;var i=ri(e,t,{});return!r&&Q(e,`onResizeEnd`,i),i}},dragGroupControlCondition:vr,dragGroupControlStart:function(e,t){var n=t.datas,r=this.dragControlStart(e,q(q({},t),{isGroup:!0}));if(!r)return!1;var i=Ln(e,`resizable`,t),a=n.startOffsetWidth,o=n.startOffsetHeight;function s(){var e=n.minSize;i.forEach(function(t){var n=t.datas,r=n.minSize,i=n.startOffsetWidth,s=n.startOffsetHeight,c=a*(i?r[0]/i:0),l=o*(s?r[1]/s:0);e[0]=Math.max(e[0],c),e[1]=Math.max(e[1],l)})}function c(){var e=n.maxSize;i.forEach(function(t){var n=t.datas,r=n.maxSize,i=n.startOffsetWidth,s=n.startOffsetHeight,c=a*(i?r[0]/i:0),l=o*(s?r[1]/s:0);e[0]=Math.min(e[0],c),e[1]=Math.min(e[1],l)})}var l=zn(e,this,`dragControlStart`,t,function(t,r){return Bn(e,t,n,r)});s(),c();var u=function(t){r.setFixedDirection(t),l.forEach(function(r,a){r.setFixedDirection(t),Bn(e,r.moveable,n,i[a])})};return n.setFixedDirection=u,n.isResize=!1!==Q(e,`onResizeGroupStart`,q(q({},r),{targets:e.props.targets,events:l.map(function(e){return q(q({},e),{setMin:function(t){e.setMin(t),s()},setMax:function(t){e.setMax(t),c()}})}),setFixedDirection:u,setMin:function(e){r.setMin(e),s()},setMax:function(e){r.setMax(e),c()}})),!!n.isResize&&r},dragGroupControl:function(e,t){var n=t.datas;if(n.isResize){var r=Gr(e.props,`resizable`);ii(e,`onBeforeResize`,function(n){Q(e,`onBeforeResizeGroup`,Z(e,t,q(q({},n),{targets:r.targets}),!0))});var i=this.dragControl(e,q(q({},t),{isGroup:!0}));if(i){var a=i.boundingWidth,o=i.boundingHeight,s=i.dist,c=r.keepRatio,l=[a/(a-s[0]),o/(o-s[1])],u=n.fixedPosition,d=zn(e,this,`dragControl`,t,function(t,n){var r=J(Me(ze(e.rotation/180*Math.PI,3),[n.datas.originalX*l[0],n.datas.originalY*l[1],1],3),2),i=r[0],a=r[1];return q(q({},n),{parentDist:null,parentScale:l,dragClient:W(u,[i,a]),parentKeepRatio:c})}),f=q({targets:r.targets,events:d},i);return Q(e,`onResizeGroup`,f),f}}},dragGroupControlEnd:function(e,t){var n=t.isDrag;if(t.datas.isResize){this.dragControlEnd(e,t);var r=zn(e,this,`dragControlEnd`,t);return Q(e,`onResizeGroupEnd`,ri(e,t,{targets:e.props.targets,events:r})),n}},request:function(e){var t={},n=0,r=0,i=!1,a=e.getRect();return{isControl:!0,requestStart:function(e){var n;return i=e.useSnap,{datas:t,parentDirection:e.direction||[1,1],parentIsWidth:(n=e?.horizontal)==null||n,useSnap:i}},request:function(e){return`offsetWidth`in e?n=e.offsetWidth-a.offsetWidth:`deltaWidth`in e&&(n+=e.deltaWidth),`offsetHeight`in e?r=e.offsetHeight-a.offsetHeight:`deltaHeight`in e&&(r+=e.deltaHeight),{datas:t,parentDist:[n,r],parentKeepRatio:e.keepRatio,useSnap:i}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:i}}}},unset:function(e){e.state.gestos.resizable=null}};function br(e,t,n,r,i,a){var o=zr(e,t,n,a?4:3);return Qr(o,G(i,vn(o,r)))}function xr(e){return e?e/$(e):0}function Sr(e,t,n,r,i,a){var o=function(e,t,n){var r=[];if(n)$(t[0])!==1||$(t[1])!==1?r.push([t,[-1,-1]],[t,[-1,1]],[t,[1,-1]],[t,[1,1]]):r.push([t,[e[0],-e[1]]],[t,[-e[0],e[1]]]),r.push([t,e]);else if(e[0]&&e[1]||!e[0]&&!e[1]){var i=e[0]?e:[1,1];[1,-1].forEach(function(e){[1,-1].forEach(function(n){var a=[e*i[0],n*i[1]];t[0]===a[0]&&t[1]===a[1]||r.push([t,a])})})}else e[0]?($(t[0])===1?[1]:[1,-1]).forEach(function(n){r.push([[t[0],-1],[n*e[0],-1]],[[t[0],0],[n*e[0],0]],[[t[0],1],[n*e[0],1]])}):e[1]&&($(t[1])===1?[1]:[1,-1]).forEach(function(n){r.push([[-1,t[1]],[-1,n*e[1]]],[[0,t[1]],[0,n*e[1]]],[[1,t[1]],[1,n*e[1]]])});return r}(n,a.fixedDirection,r),s=lr(e,t,n,r),c=Y(Y([],J(mr(e,t,o,r,i,a)),!1),J(sr(e,s,a)),!1),l=nr(c,0),u=nr(c,1);return{width:{isBound:l.isBound,offset:l.offset[0]},height:{isBound:u.isBound,offset:u.offset[1]}}}function Cr(e,t,n,r,i,a,o,s){for(var c=$r(e.state),l=e.props.keepRatio,u=0,d=0,f=0;f<2;++f){var p=Sr(e,t(u,d),i,l,o,s),m=p.width,h=p.height,g=m.isBound,_=h.isBound,v=m.offset,y=h.offset;if(f===1&&(g||(v=0),_||(y=0)),f===0&&o&&!g&&!_)return[0,0];if(l){var b=$(v)*(n?1/n:1),x=$(y)*(r?1/r:1);(g&&_?b<x:_||!g&&b<x)?v=n*y/r:y=r*v/n}u+=v,d+=y}if(!l&&i[0]&&i[1]){var S=function(e,t,n,r,i){var a=[-n[0],-n[1]],o=e.state,s=o.width,c=o.height,l=e.props.bounds,u=1/0,d=1/0;if(l){var f=[[n[0],-n[1]],[-n[0],n[1]]],p=l.left,m=p===void 0?-1/0:p,h=l.top,g=h===void 0?-1/0:h,_=l.right,v=_===void 0?1/0:_,y=l.bottom,b=y===void 0?1/0:y;f.forEach(function(e){var n=e[0]!==a[0],o=e[1]!==a[1],l=vn(t,e),f=360*B(r,l)/Math.PI;if(o){var p=l.slice();($(f-360)<2||$(f-180)<2)&&(p[1]=r[1]);var h=ur(r,p,(r[1]<l[1]?b:g)-l[1],!1,i),_=J(h.offset,2)[1],y=h.isOutside;isNaN(_)||(d=c+(y?1:-1)*$(_))}if(n){p=l.slice(),($(f-90)<2||$(f-270)<2)&&(p[0]=r[0]);var x=ur(r,p,(r[0]<l[0]?v:m)-l[0],!0,i),S=J(x.offset,1)[0],C=x.isOutside;isNaN(S)||(u=s+(C?1:-1)*$(S))}})}return{maxWidth:u,maxHeight:d}}(e,c,i,a,s),C=S.maxWidth,w=S.maxHeight,T=J(function(e,t,n,r,i,a,o,s,c){var l=vn(t,o),u=pr(e,s,{vertical:[l[0]],horizontal:[l[1]]}),d=u.horizontal.offset,f=u.vertical.offset;if(V(f,$t)||V(d,$t)){var p=J(gn({datas:c,distX:-f,distY:-d}),2),m=p[0],h=p[1];return[Math.min(i||1/0,n+o[0]*m)-n,Math.min(a||1/0,r+o[1]*h)-r]}return[0,0]}(e,t(u,d).map(function(e){return e.map(function(e){return V(e,$t)})}),n+u,r+d,C,w,i,o,s),2);u+=v=T[0],d+=y=T[1]}return[u,d]}gi(``,[`resizable`,`scalable`]);function X(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return g.apply(void 0,Y([Zt],J(e),!1))}function wr(e){e()}function Tr(e){return e&&e!==`none`?D(e)?e:We(e):[1,0,0,1,0,0]}function Er(e,t,n){return ke(t,Ve(n,t),e,Ve(n.map(function(e){return-e}),t))}function Dr(e){return(t=ai(e,`:before`),Or(t.transformOrigin)).map(function(t,n){var r=ne(t);return r.value*function(e,t,n){return t===`%`?Ir(e.ownerSVGElement)[n?`width`:`height`]/100:1}(e,r.unit,n===0)});var t}function Or(e){return e?e.split(` `):[`0`,`0`]}function kr(e){var t=In(e)(`transform`);if(t&&t!==`none`)return t;if(`transform`in e){var n=e.transform.baseVal;if(!n)return``;var r=n.length;if(!r)return``;for(var i=[],a=function(e){var t=n[e].matrix;i.push(`matrix(${[`a`,`b`,`c`,`d`,`e`,`f`].map(function(e){return t[e]}).join(`, `)})`)},o=0;o<r;++o)a(o);return i.join(` `)}return``}function Ar(e,t,n,r,i){var a,o,s=_e(e)||ve(e),c=!1;if(!e||n)a=e;else{var l=e?.assignedSlot?.parentElement,u=e.parentElement;l?(c=!0,o=u,a=l):a=u}for(var d=!1,f=e===t||a===t,p=`relative`,m=1,h=parseFloat(i?.(`zoom`))||1,g=i?.(`position`);a&&a!==s;){t===a&&(f=!0);var _=In(a),v=a.tagName.toLowerCase(),y=kr(a),b=_(`willChange`),x=parseFloat(_(`zoom`))||1;if(p=_(`position`),r&&x!==1){m=x;break}if(!n&&r&&h!==1&&g&&g!==`absolute`||v===`svg`||v===`foreignobject`||p!==`static`||y&&y!==`none`||b===`transform`)break;var S=e?.assignedSlot?.parentNode,C=a.parentNode;S&&(c=!0,o=C);var w=C;if(w&&w.nodeType===11){d=!0,p=In(a=w.host)(`position`);break}a=w,p=`relative`}return{offsetZoom:m,hasSlot:c,parentSlotElement:o,isCustomElement:d,isStatic:p===`static`,isEnd:f||!a||a===s,offsetParent:a||s}}function jr(e,t){var n,r,i,a=e.tagName.toLowerCase(),o=e.offsetLeft,s=e.offsetTop,c=In(e),l=E(o),u=!l;return u||a===`svg`&&!e.ownerSVGElement?i=(r=Or(c(`transformOrigin`)).map(function(e){return parseFloat(e)})).slice():(i=(r=Ht?Dr(e):Or(c(`transformOrigin`)).map(function(e){return parseFloat(e)})).slice(),u=!0,a===`svg`?(o=0,s=0):(n=J(function(e,t,n){var r=e.tagName.toLowerCase();if(!e.getBBox||!n&&r===`g`)return[0,0,0,0];var i=In(e)(`transform-box`)===`fill-box`,a=e.getBBox(),o=Ir(e.ownerSVGElement),s=a.x,c=a.y;r!==`foreignobject`||s||c||(s=parseFloat(e.getAttribute(`x`))||0,c=parseFloat(e.getAttribute(`y`))||0);var l=s-o.x,u=c-o.y;return[l,u,i?t[0]:t[0]-l,i?t[1]:t[1]-u]}(e,r,e===t&&t.tagName.toLowerCase()===`g`),4),o=n[0],s=n[1],r[0]=n[2],r[1]=n[3])),{tagName:a,isSVG:l,hasOffset:u,offset:[o||0,s||0],origin:r,targetOrigin:i}}function Mr(e,t){var n=In(e),r=In(ve(e)),i=r(`position`);if(!(t||i&&i!==`static`))return[0,0];var a=parseInt(r(`marginLeft`),10),o=parseInt(r(`marginTop`),10);return n(`position`)===`absolute`&&(n(`top`)===`auto`&&n(`bottom`)===`auto`||(o=0),n(`left`)===`auto`&&n(`right`)===`auto`||(a=0)),[a,o]}function Nr(e){e.forEach(function(e){var t=e.matrix;t&&(e.matrix=Oe(t,3,4))})}function Pr(e){for(var t=e.parentElement,n=!1,r=ve(e);t;){var i=ai(t).transform;if(i&&i!==`none`){n=!0;break}if(t===r)break;t=t.parentElement}return{fixedContainer:t||r,hasTransform:n}}function Fr(e,t){return t===void 0&&(t=e.length>9),`${t?`matrix3d`:`matrix`}(${je(e,!t).join(`,`)})`}function Ir(e){var t=e.clientWidth,n=e.clientHeight;if(!e)return{x:0,y:0,width:0,height:0,clientWidth:t,clientHeight:n};var r=e.viewBox,i=r&&r.baseVal||{x:0,y:0,width:0,height:0};return{x:i.x,y:i.y,width:i.width||t,height:i.height||n,clientWidth:t,clientHeight:n}}function Lr(e,t){var n,r=Ir(e),i=r.width,a=r.height,o=r.clientWidth,s=r.clientHeight,c=o/i,l=s/a,u=e.preserveAspectRatio.baseVal,d=u.align,f=u.meetOrSlice,p=[0,0],m=[c,l],h=[0,0];if(d!==1){var g=(d-2)%3,_=Math.floor((d-2)/3);p[0]=i*g/2,p[1]=a*_/2;var v=f===2?Math.max(l,c):Math.min(c,l);m[0]=v,m[1]=v,h[0]=(o-i)/2*g,h[1]=(s-a)/2*_}var y=Be(m,t);return n=J(h,2),y[t*(t-1)]=n[0],y[t*(t-1)+1]=n[1],Er(y,t,p)}function Rr(e,t,n){return Me(e,De(t,n),n)}function zr(e,t,n,r){return[[0,0],[t,0],[0,n],[t,n]].map(function(t){return Rr(e,t,r)})}function Br(e){var t=e.map(function(e){return e[0]}),n=e.map(function(e){return e[1]}),r=Math.min.apply(Math,Y([],J(t),!1)),i=Math.min.apply(Math,Y([],J(n),!1)),a=Math.max.apply(Math,Y([],J(t),!1)),o=Math.max.apply(Math,Y([],J(n),!1));return{left:r,top:i,right:a,bottom:o,width:a-r,height:o-i}}function Vr(e,t,n,r){return Br(zr(e,t,n,r))}function Hr(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ur(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=B(e,t));var i=function(e,t){return Hr([t[0]-e[0],t[1]-e[1]])}(e,t);return{transform:`translateY(-50%) translate(${e[0]}px, ${e[1]}px) rotate(${r}rad) scaleY(${n})`,width:`${i}px`}}function Wr(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n.length;return{transform:`translateZ(0px) translate(${n.reduce(function(e,t){return e+t[0]},0)/i}px, ${n.reduce(function(e,t){return e+t[1]},0)/i}px) rotate(${e}rad) scale(${t})`}}function Gr(e,t){var n=e[t];return D(n)?q(q({},e),n):e}function Kr(e){var t=e&&!E(e.offsetWidth),n=0,r=0,i=0,a=0,o=0,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=1/0,h=1/0,g=1/0,_=1/0,v=0,y=0,b=!1;if(e)if(!t&&e.ownerSVGElement){var x=e.getBBox();b=!0,o=n=x.width,s=r=x.height,c=n,l=r,i=n,a=r}else{var S=In(e),C=e.style,w=S(`boxSizing`)===`border-box`,T=parseFloat(S(`borderLeftWidth`))||0,D=parseFloat(S(`borderRightWidth`))||0,O=parseFloat(S(`borderTopWidth`))||0,k=parseFloat(S(`borderBottomWidth`))||0,A=(parseFloat(S(`paddingLeft`))||0)+(parseFloat(S(`paddingRight`))||0),j=(parseFloat(S(`paddingTop`))||0)+(parseFloat(S(`paddingBottom`))||0),M=A+(T+D),N=j+(O+k),ee=S(`position`),P=0,te=0;if(`clientLeft`in e){var ne=null;if(ne=ee===`absolute`?Ar(e,ve(e)).offsetParent:e.parentElement){var F=In(ne);P=parseFloat(F(`width`)),te=parseFloat(F(`height`))}}u=Math.max(A,oe(S(`minWidth`),P)||0),d=Math.max(j,oe(S(`minHeight`),te)||0),m=oe(S(`maxWidth`),P),h=oe(S(`maxHeight`),te),isNaN(m)&&(m=1/0),isNaN(h)&&(h=1/0),v=oe(C.width,0)||0,y=oe(C.height,0)||0,o=parseFloat(S(`width`))||0,s=parseFloat(S(`height`))||0,n=c=$(o-v)<1?R(u,v||o,m):o,r=l=$(s-y)<1?R(d,y||s,h):s,i=c,a=l,w?(g=m,_=h,f=u,p=d,c=n-M,l=r-N):(g=m+M,_=h+N,f=u+M,p=d+N,n=c+M,r=l+N),i=c+A,a=l+j}return{svg:b,offsetWidth:n,offsetHeight:r,clientWidth:i,clientHeight:a,contentWidth:c,contentHeight:l,inlineCSSWidth:v,inlineCSSHeight:y,cssWidth:o,cssHeight:s,minWidth:u,minHeight:d,maxWidth:m,maxHeight:h,minOffsetWidth:f,minOffsetHeight:p,maxOffsetWidth:g,maxOffsetHeight:_}}function qr(e,t){var n=e===ve(e)||e===_e(e),r={clientLeft:e.clientLeft,clientTop:e.clientTop,clientWidth:e.clientWidth,clientHeight:e.clientHeight,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,overflow:!1};return n&&(r.clientHeight=Math.max(t.height,r.clientHeight),r.scrollHeight=Math.max(t.height,r.scrollHeight)),r.overflow=In(e)(`overflow`)!==`visible`,q(q({},t),r)}function Jr(e,t,n,r){var i=e.left,a=e.right,o=e.top,s=e.bottom,c=t.top,l=t.left,u={left:l+i,top:c+o,right:l+a,bottom:c+s,width:a-i,height:s-o};return n&&r?qr(n,u):u}function Yr(e,t){var n=0,r=0,i=0,a=0;if(e){var o=e.getBoundingClientRect();n=o.left,r=o.top,i=o.width,a=o.height}var s={left:n,top:r,width:i,height:a,right:n+i,bottom:r+a};return e&&t?qr(e,s):s}function Xr(e,t,n,r){return e||(t?[0,0]:Zr(n.target,r))}function Zr(e,t){if(e){var n=e.getAttribute(`data-rotation`)||``,r=e.getAttribute(`data-direction`);if(t.deg=n,r){var i=[0,0];return r.indexOf(`w`)>-1&&(i[0]=-1),r.indexOf(`e`)>-1&&(i[0]=1),r.indexOf(`n`)>-1&&(i[1]=-1),r.indexOf(`s`)>-1&&(i[1]=1),i}}}function Qr(e,t){return[W(t,e[0]),W(t,e[1]),W(t,e[2]),W(t,e[3])]}function $r(e){var t=e.left,n=e.top;return Qr([e.pos1,e.pos2,e.pos3,e.pos4],[t,n])}function ei(e,t){e[t?`controlAbles`:`targetAbles`].forEach(function(t){t.unset&&t.unset(e)})}function ti(e,t){var n=t?`controlGesto`:`targetGesto`,r=e[n];!1===r?.isIdle()&&ei(e,t),r?.unset(),e[n]=null}function ni(e,t){if(t){var n=wn(t);n.nextStyle=q(q({},n.nextStyle),e)}return{style:e,cssText:L(e).map(function(t){return`${n=t,r=`-`,r===void 0&&(r=`-`),n.replace(/([a-z])([A-Z])/g,function(e,t,n){return``+t+r+n.toLowerCase()})}: ${e[t]};`;var n,r}).join(``)}}function Z(e,t,n,r){var i=t.datas;i.datas||={};var a=q(q({},n),{target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,moveable:e,datas:i.datas,isRequest:t.isRequest,isRequestChild:t.isRequestChild,isFirstDrag:!!t.isFirstDrag,isTrusted:!1!==t.isTrusted,stopAble:function(){i.isEventStart=!1},stopDrag:function(){var e;(e=t.stop)==null||e.call(t)}});return i.isStartEvent?r||(i.lastEvent=a):i.isStartEvent=!0,a}function ri(e,t,n){var r=t.datas,i=`isDrag`in n?n.isDrag:t.isDrag;return r.datas||={},q(q({isDrag:i},n),{moveable:e,target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,lastEvent:r.lastEvent,isDouble:t.isDouble,datas:r.datas,isFirstDrag:!!t.isFirstDrag})}function ii(e,t,n){e._emitter.on(t,n)}function Q(e,t,n,r,i){return e.triggerEvent(t,n,r,i)}function ai(e,t){return ye(e).getComputedStyle(e,t)}function oi(e,t,n){var r={},i={};return e.filter(function(e){var a=e.name;if(r[a]||!t.some(function(t){return e[t]}))return!1;if(!n&&e.ableGroup){if(i[e.ableGroup])return!1;i[e.ableGroup]=!0}return r[a]=!0,!0})}function si(e,t){return e===t||e==null&&t==null}function ci(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.length-1,r=0;r<n;++r){var i=e[r];if(!E(i))return i}return e[n]}function li(e){return e.reduce(function(e,t){return e.concat(t)},[])}function ui(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.sort(function(e,t){return $(t)-$(e)}),e[0]}function di(e,t,n){return Me(Ee(e,n),De(t,n),n)}function fi(e,t){var n,r=e.is3d?4:3;return n=J(di(e.rootMatrix,[t.distX,t.distY],r),2),t.distX=n[0],t.distY=n[1],t}function pi(e,t,n,r){if(!n[0]&&!n[1])return t;var i=Rr(e,[xr(n[0]||1),0],r),a=Rr(e,[0,xr(n[1]||1)],r);return W(t,Rr(e,[n[0]/Hr(i),n[1]/Hr(a)],r))}function mi(e){return $(e)<=en?0:e}function hi(e){return function(t){if(!t.isDragging(e))return``;var n=function(e,t){var n,r=e.targetGesto,i=e.controlGesto;return r?.isFlag()&&(n=r.getEventData()[t]),!n&&i?.isFlag()&&(n=i.getEventData()[t]),n||{}}(t,e).deg;return n?X(`view-control-rotation${n}`):``}}function gi(e,t){return t===void 0&&(t=[e]),function(n,r){if(r.isRequest)return!!t.some(function(e){return r.requestAble===e})&&r.parentDirection;var i=r.inputEvent.target;return fe(i,X(`direction`))&&(!e||fe(i,X(e)))}}function _i(e,t){return e?xe(e)?e:k(e)?t?document.querySelector(e):e:j(e)?e():be(e)?e:`current`in e?e.current:e:null}function vi(e,t){return e?(n=e,n&&D(n)&&!xe(n)&&(O(n)||`length`in n)?[].slice.call(e):[e]).reduce(function(e,n){return k(n)&&t?Y(Y([],J(e),!1),J([].slice.call(document.querySelectorAll(n))),!1):(O(n)?e.push(vi(n,t)):e.push(_i(n,t)),e)},[]):[];var n}function yi(e,t,n,r){var i,a=n.ratio,o=n.startOffsetWidth,s=n.startOffsetHeight,c=0,l=0,u=r.distX,d=r.distY,f=r.pinchScale,p=r.parentDistance,m=r.parentDist,h=r.parentScale,g=n.fixedDirection,_=[0,1].map(function(t){return $(e[t]-g[t])}),v=[0,1].map(function(e){var t=_[e];return t!==0&&(t=2/t),t});if(m)c=m[0],l=m[1],t&&(c?l||=c/a:c=l*a);else if(A(f))c=(f-1)*o,l=(f-1)*s;else if(h)c=(h[0]-1)*o,l=(h[1]-1)*s;else if(p){var y=o*_[0],b=s*_[1],x=Hr([y,b]);c=p/x*y*v[0],l=p/x*b*v[1]}else{var S=gn({datas:n,distX:u,distY:d});S=v.map(function(e,t){return S[t]*e}),i=J(function(e,t,n,r,i){var a=J(e,2),o=a[0],s=a[1],c=0,l=0;if(i&&o&&s){var u=B([0,0],t),d=B([0,0],r),f=Hr(t),p=Math.cos(u-d)*f;if(r[0])if(r[1]){var m=r[0]*o,h=r[1]*s,g=Math.atan2(m+t[0],h+t[1]),_=Math.atan2(m,h);g<0&&(g+=2*Math.PI),_<0&&(_+=2*Math.PI);var v=0;(v=$(g-_)<Math.PI/2||$(g-_)>Math.PI/2*3?g-_:g-(_+=Math.PI))>2*Math.PI?v-=2*Math.PI:v>Math.PI?v=2*Math.PI-v:v<-Math.PI&&(v=-2*Math.PI-v);var y=Hr([m+t[0],h+t[1]])*Math.cos(v);c=y*Math.sin(_)-m,l=y*Math.cos(_)-h,r[0]<0&&(c*=-1),r[1]<0&&(l*=-1)}else l=(c=p)/n;else c=(l=p)*n}else c=r[0]*t[0],l=r[1]*t[1];return[c,l]}([o,s],S,a,e,t),2),c=i[0],l=i[1]}return{distWidth:c,distHeight:l}}function bi(e,t){if(t){if(e===`left`)return{x:`0%`,y:`50%`};if(e===`top`||e===`center`)return{x:`50%`,y:`50%`};if(e===`right`)return{x:`100%`,y:`50%`};if(e===`bottom`)return{x:`50%`,y:`100%`};var n=J(e.split(` `),2),r=n[0],i=n[1],a=bi(r||``),o=bi(i||``),s=q(q({},a),o),c={x:`50%`,y:`50%`};return s.x&&(c.x=s.x),s.y&&(c.y=s.y),s.value&&(s.x&&!s.y&&(c.y=s.value),!s.x&&s.y&&(c.x=s.value)),c}return e===`left`?{x:`0%`}:e===`right`?{x:`100%`}:e===`top`?{y:`0%`}:e===`bottom`?{y:`100%`}:e?e===`center`?{value:`50%`}:{value:e}:{}}function xi(e,t,n){var r=bi(e,!0),i=r.x,a=r.y;return[oe(i,t)||0,oe(a,n)||0]}function Si(e,t,n){var r=e.map(function(e){return G(e,t)}),i=r.map(function(e){return function(e,t){return Me(ze(t,3),De(e,3))}(e,n)});return{prev:r,next:i,result:i.map(function(e){return W(e,t)})}}function Ci(e,t){return e.length===t.length&&e.every(function(e,n){var r=t[n],i=O(e),a=O(r);return i&&a?Ci(e,r):!i&&!a&&e===r})}function wi(e,t,n,r,i){var a=e._store,o=a[t];if(!(t in a)){if(i==null)return a[t]=n,n;a[t]=i,o=i}return o===n||r(o)===r(n)?o:(a[t]=n,n)}function Ti(e){return e>=0?1:-1}function $(e){return Math.abs(e)}function Ei(e){return A(e)?{top:e,left:e,right:e,bottom:e}:{left:e.left||0,top:e.top||0,right:e.right||0,bottom:e.bottom||0}}Pt(`pinchable`,{props:[`pinchable`],events:[`pinchStart`,`pinch`,`pinchEnd`,`pinchGroupStart`,`pinchGroup`,`pinchGroupEnd`],dragStart:function(){return!0},pinchStart:function(e,t){var n=t.datas,r=t.targets,i=t.angle,a=t.originalDatas,o=e.props,s=o.pinchable,c=o.ables;if(!s)return!1;var l=`onPinch${r?`Group`:``}Start`,u=`drag${r?`Group`:``}ControlStart`,d=(!0===s?e.controlAbles:c.filter(function(e){return s.indexOf(e.name)>-1})).filter(function(e){return e.canPinch&&e[u]}),f=Z(e,t,{});r&&(f.targets=r),n.isPinch=!1!==Q(e,l,f),n.ables=d;var p=n.isPinch;return!!p&&(d.forEach(function(n){if(a[n.name]=a[n.name]||{},n[u]){var r=q(q({},t),{datas:a[n.name],parentRotate:i,isPinch:!0});n[u](e,r)}}),e.state.snapRenderInfo={request:t.isRequest,direction:[0,0]},p)},pinch:function(e,t){var n=t.datas,r=t.scale,i=t.distance,a=t.originalDatas,o=t.inputEvent,s=t.targets,c=t.angle;if(n.isPinch){var l=i*(1-1/r),u=Z(e,t,{});s&&(u.targets=s),Q(e,`onPinch${s?`Group`:``}`,u);var d=n.ables,f=`drag${s?`Group`:``}Control`;return d.forEach(function(n){n[f]&&n[f](e,q(q({},t),{datas:a[n.name],inputEvent:o,resolveMatrix:!0,pinchScale:r,parentDistance:l,parentRotate:c,isPinch:!0}))}),u}},pinchEnd:function(e,t){var n=t.datas,r=t.isPinch,i=t.inputEvent,a=t.targets,o=t.originalDatas;if(n.isPinch){var s=`onPinch${a?`Group`:``}End`,c=ri(e,t,{isDrag:r});a&&(c.targets=a),Q(e,s,c);var l=n.ables,u=`drag${a?`Group`:``}ControlEnd`;return l.forEach(function(n){n[u]&&n[u](e,q(q({},t),{isDrag:r,datas:o[n.name],inputEvent:i,isPinch:!0}))}),r}},pinchGroupStart:function(e,t){return this.pinchStart(e,q(q({},t),{targets:e.props.targets}))},pinchGroup:function(e,t){return this.pinch(e,q(q({},t),{targets:e.props.targets}))},pinchGroupEnd:function(e,t){return this.pinchEnd(e,q(q({},t),{targets:e.props.targets}))}}),gi(`scalable`);var Di=X(`area-pieces`),Oi=X(`area-piece`),ki=X(`avoid`),Ai=X(`view-dragging`);function ji(e){var t=e.areaElement;if(t){var n=e.state,r=n.width,i=n.height;me(t,ki),t.style.cssText+=`left: 0px; top: 0px; width: ${r}px; height: ${i}px`}}function Mi(e){return e.createElement(`div`,{key:`area_pieces`,className:Di},e.createElement(`div`,{className:Oi}),e.createElement(`div`,{className:Oi}),e.createElement(`div`,{className:Oi}),e.createElement(`div`,{className:Oi}))}var Ni={name:`dragArea`,props:[`dragArea`,`passDragArea`],events:[`click`,`clickGroup`],render:function(e,t){var n=e.props,r=n.target,i=n.dragArea,a=n.groupable,o=n.passDragArea,s=e.getState(),c=s.width,l=s.height,u=s.renderPoses,d=o?X(`area`,`pass`):X(`area`);if(a)return[t.createElement(`div`,{key:`area`,ref:_(e,`areaElement`),className:d}),Mi(t)];if(!r||!i)return[];var f=He([0,0],[c,0],[0,l],[c,l],u[0],u[1],u[2],u[3]),p=f.length?Fr(f,!0):`none`;return[t.createElement(`div`,{key:`area`,ref:_(e,`areaElement`),className:d,style:{top:`0px`,left:`0px`,width:`${c}px`,height:`${l}px`,transformOrigin:`0 0`,transform:p}}),Mi(t)]},dragStart:function(e,t){var n=t.datas,r=t.clientX,i=t.clientY;if(!t.inputEvent)return!1;n.isDragArea=!1;var a=e.areaElement,o=e.state,s=o.moveableClientRect,c=o.renderPoses,l=o.rootMatrix,u=o.is3d,d=s.left,f=s.top,p=Br(c),m=p.left,h=p.top,g=p.width,_=p.height,v=J(di(l,[r-d,i-f],u?4:3),2),y=v[0],b=v[1],x=[{left:m,top:h,width:g,height:(b-=h)-10},{left:m,top:h,width:(y-=m)-10,height:_},{left:m,top:h+b+10,width:g,height:_-b-10},{left:m+y+10,top:h,width:g-y-10,height:_}],S=[].slice.call(a.nextElementSibling.children);x.forEach(function(e,t){S[t].style.cssText=`left: ${e.left}px;top: ${e.top}px; width: ${e.width}px; height: ${e.height}px;`}),pe(a,ki),o.disableNativeEvent=!0},drag:function(e,t){var n=t.datas,r=t.inputEvent;if(this.enableNativeEvent(e),!r)return!1;n.isDragArea||(n.isDragArea=!0,ji(e))},dragEnd:function(e,t){this.enableNativeEvent(e);var n=t.inputEvent,r=t.datas;if(!n)return!1;r.isDragArea||ji(e)},dragGroupStart:function(e,t){return this.dragStart(e,t)},dragGroup:function(e,t){return this.drag(e,t)},dragGroupEnd:function(e,t){return this.dragEnd(e,t)},unset:function(e){ji(e),e.state.disableNativeEvent=!1},enableNativeEvent:function(e){var t=e.state;t.disableNativeEvent&&ie(function(){t.disableNativeEvent=!1})}},Pi=(Pt(`origin`,{props:[`origin`,`svgOrigin`],render:function(e,t){var n,r=e.props,i=r.zoom,a=r.svgOrigin,o=r.groupable,s=e.getState(),c=s.beforeOrigin,l=s.rotation,u=s.svg,d=s.allMatrix,f=s.is3d,p=s.left,m=s.top,h=s.offsetWidth,g=s.offsetHeight;if(!o&&u&&a){var _=J(xi(a,h,g),2);n=Wr(l,i,G(Rr(d,[_[0],_[1]],f?4:3),[p,m]))}else n=Wr(l,i,c);return[t.createElement(`div`,{className:X(`control`,`origin`),style:n,key:`beforeOrigin`})]}}),{name:``,props:`target.dragTargetSelf.dragTarget.dragContainer.container.warpSelf.rootContainer.useResizeObserver.useMutationObserver.zoom.dragFocusedInput.transformOrigin.ables.className.pinchThreshold.pinchOutside.triggerAblesSimultaneously.checkInput.cspNonce.translateZ.hideDefaultLines.props.flushSync.stopPropagation.preventClickEventOnDrag.preventClickDefault.viewContainer.persistData.useAccuratePosition.firstRenderState.linePadding.controlPadding.preventDefault.preventRightClick.preventWheelClick.requestStyles`.split(`.`),events:[`changeTargets`]});Pt(`padding`,{props:[`padding`],render:function(e,t){var n=e.props;if(n.dragArea)return[];var r=Ei(n.padding||{}),i=r.left,a=r.top,o=r.right,s=r.bottom,c=e.getState(),l=c.renderPoses,u=[c.pos1,c.pos2,c.pos3,c.pos4],d=[];return i>0&&d.push([0,2]),a>0&&d.push([0,1]),o>0&&d.push([1,3]),s>0&&d.push([2,3]),d.map(function(e,n){var r=J(e,2),i=r[0],a=r[1],o=He([0,0],[100,0],[0,100],[100,100],u[i],u[a],l[i],l[a]);if(o.length)return t.createElement(`div`,{key:`padding${n}`,className:X(`padding`),style:{transform:Fr(o,!0)}})})}});var Fi={isPinch:!0,name:`beforeRenderable`,props:[],events:[`beforeRenderStart`,`beforeRender`,`beforeRenderEnd`,`beforeRenderGroupStart`,`beforeRenderGroup`,`beforeRenderGroupEnd`],dragRelation:`weak`,setTransform:function(e,t){var n=e.state,r=n.is3d,i=n.targetMatrix,a=n.inlineTransform,o=r?`matrix3d(${i.join(`,`)})`:`matrix(${je(i,!0)})`,s=a&&a!==`none`?a:o;t.datas.startTransforms=function(e,t){var n=K(t?4:3);return e===`matrix${t?`3d`:``}(${n.join(`,`)})`||e===`matrix(1,0,0,1,0,0)`}(s,r)?[]:P(s)},resetStyle:function(e){var t=e.datas;t.nextStyle={},t.nextTransforms=e.datas.startTransforms,t.nextTransformAppendedIndexes=[]},fillDragStartParams:function(e,t){return Z(e,t,{setTransform:function(e){t.datas.startTransforms=O(e)?e:P(e)},isPinch:!!t.isPinch})},fillDragParams:function(e,t){return Z(e,t,{isPinch:!!t.isPinch})},dragStart:function(e,t){this.setTransform(e,t),this.resetStyle(t),Q(e,`onBeforeRenderStart`,this.fillDragStartParams(e,t))},drag:function(e,t){t.datas.startTransforms||this.setTransform(e,t),this.resetStyle(t),Q(e,`onBeforeRender`,Z(e,t,{isPinch:!!t.isPinch}))},dragEnd:function(e,t){t.datas.startTransforms||(this.setTransform(e,t),this.resetStyle(t)),Q(e,`onBeforeRenderEnd`,Z(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag}))},dragGroupStart:function(e,t){var n=this;this.dragStart(e,t);var r=Ln(e,`beforeRenderable`,t),i=e.moveables,a=r.map(function(e,t){var r=i[t];return n.setTransform(r,e),n.resetStyle(e),n.fillDragStartParams(r,e)});Q(e,`onBeforeRenderGroupStart`,Z(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,setTransform:function(){},events:a}))},dragGroup:function(e,t){var n=this;this.drag(e,t);var r=Ln(e,`beforeRenderable`,t),i=e.moveables,a=r.map(function(e,t){var r=i[t];return n.resetStyle(e),n.fillDragParams(r,e)});Q(e,`onBeforeRenderGroup`,Z(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,events:a}))},dragGroupEnd:function(e,t){this.dragEnd(e,t),Q(e,`onBeforeRenderGroupEnd`,Z(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)}},Ii={name:`renderable`,props:[],events:[`renderStart`,`render`,`renderEnd`,`renderGroupStart`,`renderGroup`,`renderGroupEnd`],dragRelation:`weak`,dragStart:function(e,t){Q(e,`onRenderStart`,Z(e,t,{isPinch:!!t.isPinch}))},drag:function(e,t){Q(e,`onRender`,this.fillDragParams(e,t))},dragAfter:function(e,t){return this.drag(e,t)},dragEnd:function(e,t){Q(e,`onRenderEnd`,this.fillDragEndParams(e,t))},dragGroupStart:function(e,t){Q(e,`onRenderGroupStart`,Z(e,t,{isPinch:!!t.isPinch,targets:e.props.targets}))},dragGroup:function(e,t){var n=this,r=Ln(e,`beforeRenderable`,t),i=e.moveables,a=r.map(function(e,t){var r=i[t];return n.fillDragParams(r,e)});Q(e,`onRenderGroup`,Z(e,t,q(q({isPinch:!!t.isPinch,targets:e.props.targets,transform:En(t),transformObject:{}},ni(Dn(t))),{events:a})))},dragGroupEnd:function(e,t){var n=this,r=Ln(e,`beforeRenderable`,t),i=e.moveables,a=r.map(function(e,t){var r=i[t];return n.fillDragEndParams(r,e)});Q(e,`onRenderGroupEnd`,Z(e,t,q({isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets,events:a,transformObject:{},transform:En(t)},ni(Dn(t)))))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlAfter:function(e,t){return this.dragAfter(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)},fillDragParams:function(e,t){var n={};return Ke(Tn(t)||[]).forEach(function(e){n[e.name]=e.functionValue}),Z(e,t,q({isPinch:!!t.isPinch,transformObject:n,transform:En(t)},ni(Dn(t))))},fillDragEndParams:function(e,t){var n={};return Ke(Tn(t)||[]).forEach(function(e){n[e.name]=e.functionValue}),Z(e,t,q({isPinch:!!t.isPinch,isDrag:t.isDrag,transformObject:n,transform:En(t)},ni(Dn(t))))}};function Li(e,t,n,r,i,a,o){a.clientDistX=a.distX,a.clientDistY=a.distY;var s=i===`Start`,c=i===`End`,l=i===`After`,u=e.state.target,d=a.isRequest,f=r.indexOf(`Control`)>-1;if(!u||s&&f&&!d&&e.areaElement===a.inputEvent.target)return!1;var p=Y([],J(t),!1);if(d){var m=a.requestAble;p.some(function(e){return e.name===m})||p.push.apply(p,Y([],J(e.props.ables.filter(function(e){return e.name===m})),!1))}if(!p.length||p.every(function(e){return e.dragRelation}))return!1;var h,g=a.inputEvent;c&&g&&(h=document.elementFromPoint(a.clientX,a.clientY)||g.target);var _=!1,v=function(){var e;_=!0,(e=a.stop)==null||e.call(a)},y=s&&(!e.targetGesto||!e.controlGesto||!e.targetGesto.isFlag()||!e.controlGesto.isFlag());y&&e.updateRect(i,!0,!1);var b=a.datas,x=f?`controlGesto`:`targetGesto`,S=e[x],C=function(t,n,r){if(!(n in t)||S!==e[x])return!1;var i=t.name,o=b[i]||(b[i]={});if(s&&(o.isEventStart=!r||!t[r]||t[r](e,a)),!o.isEventStart)return!1;var c=t[n](e,q(q({},a),{stop:v,datas:o,originalDatas:b,inputTarget:h}));return e._emitter.off(),s&&!1===c&&(o.isEventStart=!1),c};y&&p.forEach(function(t){t.unset&&t.unset(e)}),C(Fi,`drag${r}${i}`);var w=0,T=0;n.forEach(function(t){if(_)return!1;var n=`${t}${r}${i}`,o=`${t}${r}Condition`;i!==``||d||fi(e.state,a);var c=p.filter(function(e){return e[n]}),l=(c=c.filter(function(e,t){return e.name&&c.indexOf(e)===t})).filter(function(e){return C(e,n,o)}).length;_&&++w,l&&++T,!_&&s&&c.length&&!l&&(w+=+!!c.filter(function(e){return!!b[e.name].isEventStart&&e.dragRelation!==`strong`}).length)}),l&&!T||C(Ii,`drag${r}${i}`);var E=S!==e[x]||w===n.length;return(c||_||E)&&(e.state.gestos={},e.moveables&&e.moveables.forEach(function(e){e.state.gestos={}}),p.forEach(function(t){t.unset&&t.unset(e)})),s&&!E&&!d&&T&&e.props.preventDefault&&a?.preventDefault(),!e.isUnmounted&&!E&&((!s&&T&&!o||c)&&(e.props.flushSync||wr)(function(){e.updateRect(c?i:``,!0,!1),e.forceUpdate()}),s||c||l||!T||o||Li(e,t,n,r,i+`After`,a),!0)}function Ri(e,t){return function(n,r){r===void 0&&(r=n.inputEvent.target);var i=r,a=e.areaElement,o=e._dragTarget;return!(!o||!t&&e.controlGesto?.isFlag())&&(i===o||o.contains(i)||i===a||!e.isMoveableElement(i)&&!e.controlBox.contains(i)||fe(i,`moveable-area`)||fe(i,`moveable-padding`)||fe(i,`moveable-edgeDraggable`))}}function zi(e,t,n){var r=e.controlBox,i=[],a=e.props,o=a.dragArea,s=e.state.target,c=a.dragTarget;i.push(r),o&&!c||i.push(t),!o&&c&&s&&t!==s&&a.dragTargetSelf&&i.push(s);var l=Ri(e);return Vi(e,i,`targetAbles`,n,{dragStart:l,pinchStart:l})}function Bi(e,t){var n=e.controlBox,r=[];r.push(n);var i=Ri(e,!0),a=function(e,t){return t===void 0&&(t=e.inputEvent.target),t===n||!i(e,t)};return Vi(e,r,`controlAbles`,t,{dragStart:a,pinchStart:a})}function Vi(e,t,n,r,i){i===void 0&&(i={});var a=n===`targetAbles`,o=e.props,s=o.pinchOutside,c=o.pinchThreshold,l=o.preventClickEventOnDrag,u=o.preventClickDefault,d=o.checkInput,f=o.dragFocusedInput,p=o.preventDefault,m=p===void 0||p,h=o.preventRightClick,g=h===void 0||h,_=o.preventWheelClick,v=_===void 0||_,y=o.dragContainer,b=new Et(t,{preventDefault:m,preventRightClick:g,preventWheelClick:v,container:_i(y,!0)||ye(e.getControlBoxElement()),pinchThreshold:c,pinchOutside:s,preventClickEventOnDrag:!!a&&l,preventClickEventOnDragStart:!!a&&u,preventClickEventByCondition:a?null:function(t){return e.controlBox.contains(t.target)},checkInput:!!a&&d,dragFocusedInput:f}),x=r===`Control`;return[`drag`,`pinch`].forEach(function(t){[`Start`,``,`End`].forEach(function(a){b.on(`${t}${a}`,function(o){var s,c=o.eventType,l=t===`drag`&&o.isPinch;if(!i[c]||i[c](o)){if(!l){var u=t===`drag`?[t]:[`drag`,t];Li(e,Y([],J(e[n]),!1),u,r,a,o)?(e.props.stopPropagation||a===`Start`&&x)&&((s=o?.inputEvent)==null||s.stopPropagation()):o.stop()}}else o.stop()})})}),b}var Hi=function(){function e(e,t,n){var r=this;this.target=e,this.moveable=t,this.eventName=n,this.ables=[],this._onEvent=function(e){var t=r.eventName,n=r.moveable;n.state.disableNativeEvent||r.ables.forEach(function(r){r[t](n,{inputEvent:e})})},e.addEventListener(n.toLowerCase(),this._onEvent)}return e.prototype.setAbles=function(e){this.ables=e},e.prototype.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this._onEvent),this.target=null,this.moveable=null},e}();function Ui(e,t,n,r){n===void 0&&(n=t);var i=jn(e,t),a=i.matrixes,o=i.is3d,s=i.targetMatrix,c=i.transformOrigin,l=i.targetOrigin,u=i.offsetContainer,d=i.hasFixed,f=i.zoom,p=function(e,t){if(Pn){var n=I(Pn,function(n){return n[0][0]==e&&n[0][1]==t});if(n)return n[1]}var r=jn(e,t,!0);return Pn&&Pn.push([[e,t],r]),r}(u,n),m=p.matrixes,h=p.is3d,g=p.offsetContainer,_=p.zoom,v=r||h||o,y=v?4:3,b=e.tagName.toLowerCase()!==`svg`&&`ownerSVGElement`in e,x=s,S=K(y),C=K(y),w=K(y),T=K(y),E=a.length,D=m.map(function(e){return q(q({},e),{matrix:e.matrix?Y([],J(e.matrix),!1):void 0})}).reverse();a.reverse(),!o&&v&&(x=Oe(x,3,4),Nr(a)),!h&&v&&Nr(D),D.forEach(function(e){C=U(C,e.matrix,y)});var O=n||ve(e),k=D[0]?.target||Ar(O,O,!0).offsetParent,A=D.slice(1).reduce(function(e,t){return U(e,t.matrix,y)},K(y));a.forEach(function(e,t){if(E-2===t&&(w=S.slice()),E-1===t&&(T=S.slice()),!e.matrix){var n=a[t+1];e.matrix=Ve(function(e,t,n,r,i){var a,o=e.target,s=e.origin,c=t.matrix,l=Kr(o),u=l.offsetWidth,d=l.offsetHeight,f=n.getBoundingClientRect(),p=[0,0];n===ve(n)&&(p=Mr(o,!0));for(var m=o.getBoundingClientRect(),h=m.left-f.left+n.scrollLeft-(n.clientLeft||0)+p[0],g=m.top-f.top+n.scrollTop-(n.clientTop||0)+p[1],_=m.width,v=m.height,y=ke(r,i,c),b=Vr(y,u,d,r),x=b.left,S=b.top,C=b.width,w=b.height,T=Rr(y,s,r),E=G(T,[x,S]),D=[h+E[0]*_/C,g+E[1]*v/w],O=[0,0],k=0;++k<10;){var A=Ee(i,r);a=J(G(Rr(A,D,r),Rr(A,T,r)),2),O[0]=a[0],O[1]=a[1];var j=Vr(ke(r,i,Ve(O,r),c),u,d,r),M=j.left-h,N=j.top-g;if($(M)<2&&$(N)<2)break;D[0]-=M,D[1]-=N}return O.map(function(e){return Math.round(e)})}(e,n,k,y,U(A,S,y)),y)}S=U(S,e.matrix,y)});var j=!b&&o;x||=K(j?4:3);var M=Fr(b&&x.length===16?Oe(x,4,3):x,j),N=C;return C=Te(C,y,y),{hasZoom:f!==1||_!==1,hasFixed:d,matrixes:a,rootMatrix:C,originalRootMatrix:N,beforeMatrix:w,offsetMatrix:T,allMatrix:S,targetMatrix:x,targetTransform:M,inlineTransform:e.style.transform,transformOrigin:c,targetOrigin:l,is3d:v,offsetContainer:u,offsetRootContainer:g}}function Wi(e,t,n,r){n===void 0&&(n=t);var i,a,o=0,s=0,c=0,l={},u=Kr(e);if(e&&(o=u.offsetWidth,s=u.offsetHeight),e){var d=Ui(e,t,n,r),f=ln(d.allMatrix,d.transformOrigin,o,s);l=q(q({},d),f);var p=ln(d.allMatrix,[50,50],100,100);i=[p.pos1,p.pos2],c=B((a=p.direction)>0?i[0]:i[1],a>0?i[1]:i[0])}var m=r?4:3;return q(q(q({hasZoom:!1,width:o,height:s,rotation:c},u),{originalRootMatrix:K(m),rootMatrix:K(m),beforeMatrix:K(m),offsetMatrix:K(m),allMatrix:K(m),targetMatrix:K(m),targetTransform:``,inlineTransform:``,transformOrigin:[0,0],targetOrigin:[0,0],is3d:!!r,left:0,top:0,right:0,bottom:0,origin:[0,0],pos1:[0,0],pos2:[0,0],pos3:[0,0],pos4:[0,0],direction:1,hasFixed:!1,offsetContainer:null,offsetRootContainer:null,matrixes:[]}),l)}function Gi(e,t,n,r,i,a){a===void 0&&(a=[]);var o=1,s=[0,0],c={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},l={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},u={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},d={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},f=[0,0],p={},m=Wi(t,n,i,!0);if(t){var h=In(t);a.forEach(function(e){p[e]=h(e)});var g=m.is3d?4:3,_=ln(m.offsetMatrix,W(m.transformOrigin,function(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var n=[],r=e[t*t-1],i=0;i<t-1;++i)n[i]=e[t*(t-1)+i]/r;return n[t-1]=0,n}(m.targetMatrix,g)),m.width,m.height);o=_.direction,s=W(_.origin,[_.left-m.left,_.top-m.top]),d=Yr(m.offsetRootContainer);var v=Ar(r,r,!0).offsetParent||m.offsetRootContainer;if(m.hasZoom){var y=ln(U(m.originalRootMatrix,m.allMatrix),m.transformOrigin,m.width,m.height),b=ln(m.originalRootMatrix,Or(In(v)(`transformOrigin`)).map(function(e){return parseFloat(e)}),v.offsetWidth,v.offsetHeight);if(c=Jr(y,d),u=Jr(b,d,v,!0),e){var x=y.left,S=y.top;l=Jr({left:x,top:S,bottom:S,right:S},d)}}else{c=Yr(t),u=function(e){var t=Nn?.get(e);if(t)return t;var n=Yr(e,!0);return Nn&&Nn.set(e,n),n}(v),e&&(l=Yr(e));var C=u.left,w=u.top,T=u.clientLeft,E=u.clientTop,D=[c.left-C,c.top-w];f=G(di(m.rootMatrix,D,4),[T+m.left,E+m.top])}}return q({targetClientRect:c,containerClientRect:u,moveableClientRect:l,rootContainerClientRect:d,beforeDirection:o,beforeOrigin:s,originalBeforeOrigin:s,target:t,style:p,offsetDelta:f},m)}function Ki(e){var t=e.pos1,n=e.pos2,r=e.pos3,i=e.pos4;if(!(t&&n&&r&&i))return null;var a=lt([t,n,r,i]),o=[a.minX,a.minY],s=G(e.origin,o);return t=G(t,o),n=G(n,o),r=G(r,o),i=G(i,o),q(q({},e),{left:e.left,top:e.top,posDelta:o,pos1:t,pos2:n,pos3:r,pos4:i,origin:s,beforeOrigin:s,isPersisted:!0})}var qi=function(e){function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state=q({container:null,gestos:{},renderLines:[[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]]],renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1,posDelta:[0,0]},Gi(null)),t.renderState={},t.enabledAbles=[],t.targetAbles=[],t.controlAbles=[],t.rotation=0,t.scale=[1,1],t.isMoveableMounted=!1,t.isUnmounted=!1,t.events={mouseEnter:null,mouseLeave:null},t._emitter=new at,t._prevOriginalDragTarget=null,t._originalDragTarget=null,t._prevDragTarget=null,t._dragTarget=null,t._prevPropTarget=null,t._propTarget=null,t._prevDragArea=!1,t._isPropTargetChanged=!1,t._hasFirstTarget=!1,t._reiszeObserver=null,t._observerId=0,t._mutationObserver=null,t._rootContainer=null,t._viewContainer=null,t._viewClassNames=[],t._store={},t.checkUpdateRect=function(){if(!t.isDragging()){var e=t.props.parentMoveable;e?e.checkUpdateRect():(ae(t._observerId),t._observerId=ie(function(){t.isDragging()||t.updateRect()}))}},t._onPreventClick=function(e){e.stopPropagation(),e.preventDefault()},t}return Nt(n,e),n.prototype.render=function(){var e=this.props,n=this.getState(),r=e.parentPosition,i=e.className,a=e.target,o=e.zoom,s=e.cspNonce,c=e.translateZ,l=e.cssStyled,u=e.groupable,d=e.linePadding,f=e.controlPadding;this._checkUpdateRootContainer(),this.checkUpdate(),this.updateRenderPoses();var p=J(r||[0,0],2),m=p[0],h=p[1],g=n.left,v=n.top,y=n.target,b=n.direction,x=n.hasFixed,S=n.offsetDelta,C=e.targets,w=this.isDragging(),T={};this.getEnabledAbles().forEach(function(e){T[`data-able-${e.name.toLowerCase()}`]=!0});var E=this._getAbleClassName(),D=C&&C.length&&(y||u)||a||!this._hasFirstTarget&&this.state.isPersisted,O=this.controlBox||this.props.firstRenderState||this.props.persistData,k=[g-m,v-h];!u&&e.useAccuratePosition&&(k[0]+=S[0],k[1]+=S[1]);var A={position:x?`fixed`:`absolute`,display:D?`block`:`none`,visibility:O?`visible`:`hidden`,transform:`translate3d(${k[0]}px, ${k[1]}px, ${c})`,"--zoom":o,"--zoompx":`${o}px`};return d&&(A[`--moveable-line-padding`]=d),f&&(A[`--moveable-control-padding`]=f),t.createElement(l,q({cspNonce:s,ref:_(this,`controlBox`),className:`${X(`control-box`,b===-1?`reverse`:``,w?`dragging`:``)} ${E} ${i}`},T,{onClick:this._onPreventClick,style:A}),this.renderAbles(),this._renderLines())},n.prototype.componentDidMount=function(){this.isMoveableMounted=!0,this.isUnmounted=!1;var e=this.props,t=e.parentMoveable,n=e.container;this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(this.props),n||t||this.state.isPersisted||(this.updateRect(``,!1,!1),this.forceUpdate())},n.prototype.componentDidUpdate=function(e){this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateNativeEvents(),this._updateTargets(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(e)},n.prototype.componentWillUnmount=function(){var e,t;this.isMoveableMounted=!1,this.isUnmounted=!0,this._emitter.off(),(e=this._reiszeObserver)==null||e.disconnect(),(t=this._mutationObserver)==null||t.disconnect(),this._viewContainer&&this._changeAbleViewClassNames([]),ti(this,!1),ti(this,!0);var n=this.events;for(var r in n){var i=n[r];i&&i.destroy()}},n.prototype.getTargets=function(){var e=this.props.target;return e?[e]:[]},n.prototype.getAble=function(e){return I(this.props.ables||[],function(t){return t.name===e})},n.prototype.getContainer=function(){var e=this.props,t=e.parentMoveable,n=e.wrapperMoveable;return e.container||n&&n.getContainer()||t&&t.getContainer()||this.controlBox.parentElement},n.prototype.getControlBoxElement=function(){return this.controlBox},n.prototype.getDragElement=function(){return this._dragTarget},n.prototype.isMoveableElement=function(e){return e&&(e.getAttribute?.call(e,`class`)||``).indexOf(Zt)>-1},n.prototype.dragStart=function(e,t){t===void 0&&(t=e.target);var n=this.targetGesto,r=this.controlGesto;return n&&Ri(this)({inputEvent:e},t)?n.isFlag()||n.triggerDragStart(e):r&&this.isMoveableElement(t)&&(r.isFlag()||r.triggerDragStart(e)),this},n.prototype.hitTest=function(e){var t,n=this.state,r=n.target,i=n.pos1,a=n.pos2,o=n.pos3,s=n.pos4,c=n.targetClientRect;if(!r)return 0;if(xe(e)){var l=e.getBoundingClientRect();t={left:l.left,top:l.top,width:l.width,height:l.height}}else t=q({width:0,height:0},e);var u=t.left,d=t.top,f=t.width,p=t.height,m=ct([i,a,s,o],c),h=st(ht(m,[[u,d],[u+f,d],[u+f,d+p],[u,d+p]])),g=st(m);return h&&g?Math.min(100,h/g*100):0},n.prototype.isInside=function(e,t){var n=this.state,r=n.target,i=n.pos1,a=n.pos2,o=n.pos3,s=n.pos4,c=n.targetClientRect;return!!r&&ut([e,t],ct([i,a,s,o],c))},n.prototype.updateRect=function(e,t,n){n===void 0&&(n=!0);var r=this.props,i=!r.parentPosition&&!r.wrapperMoveable;i&&Fn(!0);var a=r.parentMoveable,o=this.state.target||r.target,s=this.getContainer(),c=a?a._rootContainer:this._rootContainer,l=Gi(this.controlBox,o,s,s,c||s,this._getRequestStyles());if(!o&&this._hasFirstTarget&&r.persistData){var u=Ki(r.persistData);for(var d in u)l[d]=u[d]}i&&Fn(),this.updateState(l,!a&&n)},n.prototype.isDragging=function(e){var t=this.targetGesto,n=this.controlGesto;return t?.isFlag()?!e||!!t.getEventData()[e]?.isEventStart:!!n?.isFlag()&&(!e||!!n.getEventData()[e]?.isEventStart)},n.prototype.updateTarget=function(e){this.updateRect(e,!0)},n.prototype.getRect=function(){var e=this.state,t=$r(this.state),n=J(t,4),r=n[0],i=n[1],a=n[2],o=n[3],s=Br(t),c=e.width,l=e.height,u=s.width,d=s.height,f=s.left,p=s.top,m=[e.left,e.top],h=W(m,e.origin);return{width:u,height:d,left:f,top:p,pos1:r,pos2:i,pos3:a,pos4:o,offsetWidth:c,offsetHeight:l,beforeOrigin:W(m,e.beforeOrigin),origin:h,transformOrigin:e.transformOrigin,rotation:this.getRotation()}},n.prototype.getManager=function(){return this},n.prototype.stopDrag=function(e){var t;e&&e!==`target`||(!1===(t=this.targetGesto)?.isIdle()&&ei(this,!1),t?.stop()),e&&e!==`control`||(!1===(t=this.controlGesto)?.isIdle()&&ei(this,!0),t?.stop())},n.prototype.getRotation=function(){var e=this.state;return function(e,t,n){var r=B(e,t)/Math.PI*180;return(r=n>=0?r:180-r)>=0?r:360+r}(e.pos1,e.pos2,e.direction)},n.prototype.request=function(e,t,n){t===void 0&&(t={});var r=this,i=r.props,a=i.parentMoveable||i.wrapperMoveable||r,o=a.props.ables,s=i.groupable,c=I(o,function(t){return t.name===e});if(this.isDragging()||!c||!c.request)return{request:function(){return this},requestEnd:function(){return this}};var l=c.request(r),u=n||t.isInstant,d=l.isControl?`controlAbles`:`targetAbles`,f=`${s?`Group`:``}${l.isControl?`Control`:``}`,p=Y([],J(a[d]),!1),m={request:function(t){return Li(r,p,[`drag`],f,``,q(q({},l.request(t)),{requestAble:e,isRequest:!0}),u),m},requestEnd:function(){return Li(r,p,[`drag`],f,`End`,q(q({},l.requestEnd()),{requestAble:e,isRequest:!0}),u),m}};return Li(r,p,[`drag`],f,`Start`,q(q({},l.requestStart(t)),{requestAble:e,isRequest:!0}),u),u?m.request(t).requestEnd():m},n.prototype.getMoveables=function(){return[this]},n.prototype.destroy=function(){this.componentWillUnmount()},n.prototype.updateRenderPoses=function(){var e=this.getState(),t=this.props,n=t.padding,r=e.originalBeforeOrigin,i=e.transformOrigin,a=e.allMatrix,o=e.is3d,s=e.pos1,c=e.pos2,l=e.pos3,u=e.pos4,d=e.left,f=e.top,p=e.isPersisted,m=t.zoom||1;if(!n&&m<=1)return e.renderPoses=[s,c,l,u],void(e.renderLines=[[s,c],[c,u],[u,l],[l,s]]);var h=Ei(n||{}),g=h.left,_=h.top,v=h.bottom,y=h.right,b=o?4:3,x=ke(b,Ve((p?i:this.controlBox&&t.groupable?r:W(r,[d,f])).map(function(e){return-e}),b),a,Ve(i,b)),S=pi(x,s,[-g,-_],b),C=pi(x,c,[y,-_],b),w=pi(x,l,[-g,v],b),T=pi(x,u,[y,v],b);if(e.renderPoses=[S,C,w,T],e.renderLines=[[S,C],[C,T],[T,w],[w,S]],m){var E=m/2;e.renderLines=[[pi(x,s,[-g-E,-_],b),pi(x,c,[y+E,-_],b)],[pi(x,c,[y,-_-E],b),pi(x,u,[y,v+E],b)],[pi(x,u,[y+E,v],b),pi(x,l,[-g-E,v],b)],[pi(x,l,[-g,v+E],b),pi(x,s,[-g,-_-E],b)]]}},n.prototype.checkUpdate=function(){this._isPropTargetChanged=!1;var e=this.props,t=e.target,n=e.container,r=e.parentMoveable,i=this.state,a=i.target,o=i.container;if(a||t){this.updateAbles();var s=!si(a,t);if(s||!si(o,n)){var c=n||this.controlBox;c&&this.unsetAbles(),this.updateState({target:t,container:n}),!r&&c&&this.updateRect(`End`,!1,!1),this._isPropTargetChanged=s}}},n.prototype.waitToChangeTarget=function(){return new Promise(function(){})},n.prototype.triggerEvent=function(e,t){var n=this.props;if(this._emitter.trigger(e,t),n.parentMoveable&&t.isRequest&&!t.isRequestChild)return n.parentMoveable.triggerEvent(e,t,!0);var r=n[e];return r&&r(t)},n.prototype.useCSS=function(e,t){var n=this.props.customStyledMap,r=e+t;return n[r]||(n[r]=jt(e,t)),n[r]},n.prototype.getState=function(){var e=this.props;(e.target||e.targets?.length)&&(this._hasFirstTarget=!0);var t=this.controlBox,n=e.persistData,r=e.firstRenderState;if(r&&!t)return r;if(!this._hasFirstTarget&&n){var i=Ki(n);if(i)return this.updateState(i,!1),this.state}return this.state.isPersisted=!1,this.state},n.prototype.updateSelectors=function(){},n.prototype.unsetAbles=function(){var e=this;this.targetAbles.forEach(function(t){t.unset&&t.unset(e)})},n.prototype.updateAbles=function(e,t){e===void 0&&(e=this.props.ables),t===void 0&&(t=``);var n=this.props.triggerAblesSimultaneously,r=this.getEnabledAbles(e),i=`drag${t}Start`,a=`pinch${t}Start`,o=`drag${t}ControlStart`,s=oi(r,[i,a],n),c=oi(r,[o],n);this.enabledAbles=r,this.targetAbles=s,this.controlAbles=c},n.prototype.updateState=function(e,t){if(t){if(this.isUnmounted)return;this.setState(e)}else{var n=this.state;for(var r in e)n[r]=e[r]}},n.prototype.getEnabledAbles=function(e){e===void 0&&(e=this.props.ables);var t=this.props;return e.filter(function(e){return e&&(e.always&&!1!==t[e.name]||t[e.name])})},n.prototype.renderAbles=function(){var e,n,r,i,a=this,o=this.props.triggerAblesSimultaneously,s={createElement:t.createElement};return this.renderState={},(e=li(oi(this.getEnabledAbles(),[`render`],o).map(function(e){return(0,e.render)(a,s)||[]})).filter(function(e){return e}),n=function(e){return e.key},r=[],i={},e.forEach(function(t,a){var o=n(t,a,e),s=i[o];s||(s=[],i[o]=s,r.push(s)),s.push(t)}),r).map(function(e){return e[0]})},n.prototype.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},n.prototype._getRequestStyles=function(){return this.getEnabledAbles().reduce(function(e,t){var n=t.requestStyle?.call(t)??[];return Y(Y([],J(e),!1),J(n),!1)},Y([],J(this.props.requestStyles||[]),!1))},n.prototype._updateObserver=function(e){this._updateResizeObserver(e),this._updateMutationObserver(e)},n.prototype._updateEvents=function(){var e=this.targetAbles.length,t=this.controlAbles.length,n=this._dragTarget;(!e&&this.targetGesto||this._isTargetChanged(!0))&&(ti(this,!1),this.updateState({gestos:{}})),t||ti(this,!0),n&&e&&!this.targetGesto&&(this.targetGesto=zi(this,n,``)),!this.controlGesto&&t&&(this.controlGesto=Bi(this,`Control`))},n.prototype._updateTargets=function(){var e=this.props;this._prevPropTarget=this._propTarget,this._prevDragTarget=this._dragTarget,this._prevOriginalDragTarget=this._originalDragTarget,this._prevDragArea=e.dragArea,this._propTarget=e.target,this._originalDragTarget=e.dragTarget||e.target,this._dragTarget=_i(this._originalDragTarget,!0)},n.prototype._renderLines=function(){var e=this.props,n=e.zoom,r=e.hideDefaultLines,i=e.hideChildMoveableDefaultLines,a=e.parentMoveable;if(r||a&&i)return[];var o=this.getState(),s={createElement:t.createElement};return o.renderLines.map(function(e,t){return Hn(s,``,e[0],e[1],n,`render-line-${t}`)})},n.prototype._isTargetChanged=function(e){var t=this.props,n=t.dragTarget||t.target,r=this._prevOriginalDragTarget,i=this._prevDragArea,a=t.dragArea;return!a&&r!==n||(e||a)&&i!==a||this._prevPropTarget!=this._propTarget},n.prototype._updateNativeEvents=function(){var e=this,t=this.props.dragArea?this.areaElement:this.state.target,n=this.events,r=L(n);if(this._isTargetChanged())for(var i in n){var a=n[i];a&&a.destroy(),n[i]=null}if(t){var o=this.enabledAbles;r.forEach(function(r){var i=oi(o,[r]),a=i.length>0,s=n[r];a?(s||(s=new Hi(t,e,r),n[r]=s),s.setAbles(i)):s&&(s.destroy(),n[r]=null)})}},n.prototype._checkUpdateRootContainer=function(){var e=this.props.rootContainer;!this._rootContainer&&e&&(this._rootContainer=_i(e,!0))},n.prototype._checkUpdateViewContainer=function(){var e=this.props.viewContainer;!this._viewContainer&&e&&(this._viewContainer=_i(e,!0)),this._viewContainer&&this._changeAbleViewClassNames(Y(Y([],J(this._getAbleViewClassNames()),!1),[this.isDragging()?Ai:``],!1))},n.prototype._changeAbleViewClassNames=function(e){var t,n,r,i,a=this._viewContainer,o=(t=e.filter(Boolean),n=function(e){return e},r=[],i=[],t.forEach(function(e,a){var o=n(e,a,t),s=i.indexOf(o),c=r[s]||[];s===-1&&(i.push(o),r.push(c)),c.push(e)}),r).map(function(e){return J(e,1)[0]}),s=this._viewClassNames,c=Qe(s,o),l=c.removed,u=c.added;l.forEach(function(e){me(a,s[e])}),u.forEach(function(e){pe(a,o[e])}),this._viewClassNames=o},n.prototype._getAbleViewClassNames=function(){var e=this;return(this.getEnabledAbles().map(function(t){return t.viewClassName?.call(t,e)||``}).join(` `)+` ${this._getAbleClassName(`-view`)}`).split(/\s+/g)},n.prototype._getAbleClassName=function(e){var t=this;e===void 0&&(e=``);var n=this.getEnabledAbles(),r=this.targetGesto,i=this.controlGesto,a=r?.isFlag()?r.getEventData():{},o=i?.isFlag()?i.getEventData():{};return n.map(function(n){var r=n.name,i=n.className?.call(n,t)||``;return(a[r]?.isEventStart||o[r]?.isEventStart)&&(i+=` ${X(`${r}${e}-dragging`)}`),i.trim()}).filter(Boolean).join(` `)},n.prototype._updateResizeObserver=function(e){var t,n=this.props,r=n.target,i=ye(this.getControlBoxElement());if(i.ResizeObserver&&r&&n.useResizeObserver){if(e.target!==r||!this._reiszeObserver){var a=new i.ResizeObserver(this.checkUpdateRect);a.observe(r,{box:`border-box`}),this._reiszeObserver=a}}else(t=this._reiszeObserver)==null||t.disconnect()},n.prototype._updateMutationObserver=function(e){var t,n=this,r=this.props,i=r.target,a=ye(this.getControlBoxElement());if(a.MutationObserver&&i&&r.useMutationObserver){if(e.target!==i||!this._mutationObserver){var o=new a.MutationObserver(function(e){var t,r;try{for(var i=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}(e),a=i.next();!a.done;a=i.next()){var o=a.value;o.type===`attributes`&&o.attributeName===`style`&&n.checkUpdateRect()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}});o.observe(i,{attributes:!0}),this._mutationObserver=o}}else(t=this._mutationObserver)==null||t.disconnect()},n.defaultProps={dragTargetSelf:!1,target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,parentMoveable:null,wrapperMoveable:null,isWrapperMounted:!1,parentPosition:null,warpSelf:!1,svgOrigin:``,dragContainer:null,useResizeObserver:!1,useMutationObserver:!1,preventDefault:!0,preventRightClick:!0,preventWheelClick:!0,linePadding:0,controlPadding:0,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:``,className:``,zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,dragFocusedInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:``,translateZ:0,cssStyled:null,customStyledMap:{},props:{},stopPropagation:!1,preventClickDefault:!1,preventClickEventOnDrag:!0,flushSync:wr,firstRenderState:null,persistData:null,viewContainer:null,requestStyles:[],useAccuratePosition:!1},n}(t.PureComponent),Ji={name:`groupable`,props:[`defaultGroupRotate`,`useDefaultGroupRotate`,`defaultGroupOrigin`,`groupable`,`groupableProps`,`targetGroups`,`hideChildMoveableDefaultLines`],events:[],render:function(e,t){var n=e.props,r=n.targets||[],i=e.getState(),a=i.left,o=i.top,s=i.isPersisted,c=n.zoom||1,l=e.renderGroupRects,u=n.persistData?.children||[];s?r=u.map(function(){return null}):u=[];var d=wi(e,`parentPosition`,[a,o],function(e){return e.join(`,`)}),f=wi(e,`requestStyles`,e.getRequestChildStyles(),function(e){return e.join(`,`)});return e.moveables=e.moveables.slice(0,r.length),Y(Y([],J(r.map(function(r,i){return t.createElement(qi,{key:`moveable`+i,ref:v(e,`moveables`,i),target:r,origin:!1,requestStyles:f,cssStyled:n.cssStyled,customStyledMap:n.customStyledMap,useResizeObserver:n.useResizeObserver,useMutationObserver:n.useMutationObserver,hideChildMoveableDefaultLines:n.hideChildMoveableDefaultLines,parentMoveable:e,parentPosition:[a,o],persistData:u[i],zoom:c})})),!1),J(li(l.map(function(e,n){var r=[e.pos1,e.pos2,e.pos3,e.pos4];return[[0,1],[1,3],[3,2],[2,0]].map(function(e,i){var a=J(e,2),o=a[0],s=a[1];return Hn(t,``,G(r[o],d),G(r[s],d),c,`group-rect-${n}-${i}`)})}))),!1)}};Pt(`clickable`,{props:[`clickable`],events:[`click`,`clickGroup`],always:!0,dragRelation:`weak`,dragStart:function(){},dragControlStart:function(){},dragGroupStart:function(e,t){t.datas.inputTarget=t.inputEvent&&t.inputEvent.target},dragEnd:function(e,t){var n=e.props.target,r=t.inputEvent,i=t.inputTarget,a=!e.isMoveableElement(i)&&e.controlBox.contains(i);if(r&&i&&!t.isDrag&&!e.isMoveableElement(i)&&!a){var o=n.contains(i);Q(e,`onClick`,Z(e,t,{isDouble:t.isDouble,inputTarget:i,isTarget:n===i,moveableTarget:e.props.target,containsTarget:o}))}},dragGroupEnd:function(e,t){var n=t.inputEvent,r=t.inputTarget;if(n&&r&&!t.isDrag&&!e.isMoveableElement(r)&&t.datas.inputTarget!==r){var i=e.props.targets,a=i.indexOf(r),o=a>-1,s=!1;a===-1&&(s=(a=re(i,function(e){return e.contains(r)}))>-1),Q(e,`onClickGroup`,Z(e,t,{isDouble:t.isDouble,targets:i,inputTarget:r,targetIndex:a,isTarget:o,containsTarget:s,moveableTarget:i[a]}))}},dragControlEnd:function(e,t){this.dragEnd(e,t)},dragGroupControlEnd:function(e,t){this.dragEnd(e,t)}});function Yi(e){var t=e.originalDatas.draggable;return t||=(e.originalDatas.draggable={},e.originalDatas.draggable),q(q({},e),{datas:t})}Pt(`edgeDraggable`,{css:[`.edge.edgeDraggable.line {
|
|
154
|
-
cursor: move;
|
|
155
|
-
}`],render:function(e,t){var n=e.props,r=n.edgeDraggable;return r?Un(t,`edgeDraggable`,r,e.getState().renderPoses,n.zoom):[]},dragCondition:function(e,t){var n=e.props,r=t.inputEvent?.target;return!(!n.edgeDraggable||!r)&&!n.draggable&&fe(r,X(`direction`))&&fe(r,X(`edge`))&&fe(r,X(`edgeDraggable`))},dragStart:function(e,t){return gr.dragStart(e,Yi(t))},drag:function(e,t){return gr.drag(e,Yi(t))},dragEnd:function(e,t){return gr.dragEnd(e,Yi(t))},dragGroupCondition:function(e,t){var n=e.props,r=t.inputEvent?.target;return!(!n.edgeDraggable||!r)&&!n.draggable&&fe(r,X(`direction`))&&fe(r,X(`line`))},dragGroupStart:function(e,t){return gr.dragGroupStart(e,Yi(t))},dragGroup:function(e,t){return gr.dragGroup(e,Yi(t))},dragGroupEnd:function(e,t){return gr.dragGroupEnd(e,Yi(t))},unset:function(e){return gr.unset(e)}});var Xi={name:`individualGroupable`,props:[`individualGroupable`,`individualGroupableProps`],events:[]};function Zi(e,t){var n=J(e,3),r=n[0],i=n[1],a=n[2];return(r*t[0]+i*t[1]+a)/Math.sqrt(r*r+i*i)}function Qi(e,t){var n=J(e,2),r=n[0],i=n[1];return-r*t[0]-i*t[1]}function $i(e,t){return Math.max.apply(Math,Y([],J(e.map(function(e){var n=J(e,4),r=n[0],i=n[1],a=n[2],o=n[3];return Math.max(r[t],i[t],a[t],o[t])})),!1))}function ea(e,t){return Math.min.apply(Math,Y([],J(e.map(function(e){var n=J(e,4),r=n[0],i=n[1],a=n[2],o=n[3];return Math.min(r[t],i[t],a[t],o[t])})),!1))}function ta(e,t){var n=t.map(function(t){if(O(t)){var n=ta(e,t),r=n.length;return r>1?n:r===1?n[0]:null}var i=I(e,function(e){return e.manager.props.target===t});return i?(i.finded=!0,i.manager):null}).filter(Boolean);return n.length===1&&O(n[0])?n[0]:n}var na=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.differ=new rt,t.moveables=[],t.transformOrigin=`50% 50%`,t.renderGroupRects=[],t._targetGroups=[],t._hasFirstTargets=!1,t}return Nt(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t.prototype.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},t.prototype.getTargets=function(){return this.props.targets},t.prototype.updateRect=function(e,t,n){n===void 0&&(n=!0);var r=this.state;if(this.controlBox&&!r.isPersisted){Fn(!0),this.moveables.forEach(function(t){t.updateRect(e,!1,!1)});var i=this.props,a=this.moveables,o=r.target||i.target,s=a.map(function(e){return{finded:!1,manager:e}}),c=this.props.targetGroups||[],l=ta(s,c),u=i.useDefaultGroupRotate;l.push.apply(l,Y([],J(s.filter(function(e){return!e.finded}).map(function(e){return e.manager})),!1));var d=[],f=!t||e!==``&&i.updateGroup,p=i.defaultGroupRotate||0;if(!this._hasFirstTargets){var m=i.persistData?.rotation;m!=null&&(p=m)}var h=function e(t,n,r){var i=t.map(function(t){if(O(t)){var r=e(t,n),i=[r.pos1,r.pos2,r.pos3,r.pos4];return d.push(r),{poses:i,rotation:r.rotation}}return{poses:$r(t.state),rotation:t.getRotation()}}),a=i.map(function(e){return e.rotation}),o=0,s=a[0],c=a.every(function(e){return Math.abs(s-e)<.1});return o=f?!u&&c?s:p:u||r||!c?n:s,function(e,t){var n,r,i,a=[0,0],o=[0,0],s=[0,0],c=[0,0],l=0,u=0;if(!e.length)return{pos1:a,pos2:o,pos3:s,pos4:c,minX:0,minY:0,maxX:0,maxY:0,width:l,height:u,rotation:t};var d=V(t,en);if(d%90){var f=d/180*Math.PI,p=Math.tan(f),m=-1/p,h=[tn,nn],g=[[0,0],[0,0]],_=[tn,nn],v=[[0,0],[0,0]];e.forEach(function(e){e.forEach(function(e){var t=Zi([-p,1,0],e),n=Zi([-m,1,0],e);h[0]>t&&(g[0]=e,h[0]=t),h[1]<t&&(g[1]=e,h[1]=t),_[0]>n&&(v[0]=e,_[0]=n),_[1]<n&&(v[1]=e,_[1]=n)})});var y=J(g,2),b=y[0],x=y[1],S=J(v,2),C=S[0],w=S[1],T=[-p,1,Qi([-p,1],b)],E=[-p,1,Qi([-p,1],x)],D=[-m,1,Qi([-m,1],C)],O=[-m,1,Qi([-m,1],w)];n=J([[T,D],[T,O],[E,D],[E,O]].map(function(e){var t=J(e,2);return ft(t[0],t[1])[0]}),4),a=n[0],o=n[1],s=n[2],c=n[3],l=_[1]-_[0],u=h[1]-h[0]}else{var k=ea(e,0),A=ea(e,1),j=$i(e,0),M=$i(e,1);a=[k,A],o=[j,A],s=[k,M],c=[j,M],l=j-k,u=M-A,d%180&&(a=(r=J([s,a,c,o],4))[0],o=r[1],s=r[2],c=r[3],l=M-A,u=j-k)}d%360>180&&(a=(i=J([c,s,o,a],4))[0],o=i[1],s=i[2],c=i[3]);var N=lt([a,o,s,c]);return{pos1:a,pos2:o,pos3:s,pos4:c,width:l,height:u,minX:N.minX,minY:N.minY,maxX:N.maxX,maxY:N.maxY,rotation:t}}(i.map(function(e){return e.poses}),o)}(l,this.rotation,!0);f&&(this.rotation=h.rotation,this.transformOrigin=i.defaultGroupOrigin||`50% 50%`,this.scale=[1,1]),this._targetGroups=c,this.renderGroupRects=d;var g=this.transformOrigin,_=this.rotation,v=this.scale,y=h.width,b=h.height,x=h.minX,S=h.minY,C=lt(Si([[0,0],[y,0],[0,b],[y,b]],xi(g,y,b),this.rotation/180*Math.PI).result),w=C.minX,T=C.minY,E=` rotate(${_}deg) scale(${Ti(v[0])}, ${Ti(v[1])})`,D=`translate(${-w}px, ${-T}px)${E}`;this.controlBox.style.transform=`translate3d(${x}px, ${S}px, ${this.props.translateZ||0})`,o.style.cssText+=`left:0px;top:0px;transform-origin:${g};width:${y}px;height:${b}px;transform: ${D}`,r.width=y,r.height=b;var k=this.getContainer(),A=Gi(this.controlBox,o,this.controlBox,this.getContainer(),this._rootContainer||k,[]),j=[A.left,A.top],M=J($r(A),4),N=M[0],ee=M[1],P=M[2],te=M[3],ne=lt([N,ee,P,te]),F=[ne.minX,ne.minY],re=Ti(v[0]*v[1]);A.pos1=G(N,F),A.pos2=G(ee,F),A.pos3=G(P,F),A.pos4=G(te,F),A.left=x-A.left+F[0],A.top=S-A.top+F[1],A.origin=G(W(j,A.origin),F),A.beforeOrigin=G(W(j,A.beforeOrigin),F),A.originalBeforeOrigin=W(j,A.originalBeforeOrigin),A.transformOrigin=G(W(j,A.transformOrigin),F),o.style.transform=`translate(${-w-F[0]}px, ${-T-F[1]}px)`+E,Fn(),this.updateState(q(q({},A),{posDelta:F,direction:re,beforeDirection:re}),n)}},t.prototype.getRect=function(){return q(q({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(e){return e.getRect()})})},t.prototype.triggerEvent=function(t,n,r){if(r||t.indexOf(`Group`)>-1)return e.prototype.triggerEvent.call(this,t,n);this._emitter.trigger(t,n)},t.prototype.getRequestChildStyles=function(){return this.getEnabledAbles().reduce(function(e,t){var n=t.requestChildStyle?.call(t)??[];return Y(Y([],J(e),!1),J(n),!1)},[])},t.prototype.getMoveables=function(){return Y([],J(this.moveables),!1)},t.prototype.updateAbles=function(){e.prototype.updateAbles.call(this,Y(Y([],J(this.props.ables),!1),[Ji],!1),`Group`)},t.prototype._updateTargets=function(){e.prototype._updateTargets.call(this),this._originalDragTarget=this.props.dragTarget||this.areaElement,this._dragTarget=_i(this._originalDragTarget,!0)},t.prototype._updateEvents=function(){var e=this.state,t=this.props,n=this._prevDragTarget,r=t.dragTarget||this.areaElement,i=t.targets,a=this.differ.update(i),o=a.added,s=a.changed,c=a.removed,l=o.length||c.length;(l||this._prevOriginalDragTarget!==this._originalDragTarget)&&(ti(this,!1),ti(this,!0),this.updateState({gestos:{}})),n!==r&&(e.target=null),e.target||(e.target=this.areaElement,this.controlBox.style.display=`block`),e.target&&(this.targetGesto||=zi(this,this._dragTarget,`Group`),this.controlGesto||=Bi(this,`GroupControl`));var u=!si(e.container,t.container);u&&(e.container=t.container),(u||l||this.transformOrigin!==(t.defaultGroupOrigin||`50% 50%`)||s.length||i.length&&!Ci(this._targetGroups,t.targetGroups||[]))&&(this.updateRect(),this._hasFirstTargets=!0),this._isPropTargetChanged=!!l},t.prototype._updateObserver=function(){},t.defaultProps=q(q({},qi.defaultProps),{transformOrigin:[`50%`,`50%`],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:`50% 50%`}),t}(qi),ra=function(e){function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.moveables=[],t}return Nt(n,e),n.prototype.render=function(){var e=this,n=this.props,r=n.cspNonce,i=n.cssStyled,a=n.persistData,o=n.targets||[],s=o.length,c=this.isUnmounted||!s,l=a?.children??[];return c&&!s&&l.length?o=l.map(function(){return null}):c||(l=[]),t.createElement(i,{cspNonce:r,ref:_(this,`controlBox`),className:X(`control-box`)},o.map(function(r,i){var a=n.individualGroupableProps?.call(n,r,i)??{};return t.createElement(qi,q({key:`moveable`+i,ref:v(e,`moveables`,i)},n,a,{target:r,wrapperMoveable:e,isWrapperMounted:e.isMoveableMounted,persistData:l[i]}))}))},n.prototype.componentDidMount=function(){},n.prototype.componentDidUpdate=function(){},n.prototype.getTargets=function(){return this.props.targets},n.prototype.updateRect=function(e,t,n){n===void 0&&(n=!0),Fn(!0),this.moveables.forEach(function(r){r.updateRect(e,t,n)}),Fn()},n.prototype.getRect=function(){return q(q({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(e){return e.getRect()})})},n.prototype.request=function(e,t,n){t===void 0&&(t={});var r=this.moveables.map(function(n){return n.request(e,q(q({},t),{isInstant:!1}),!1)}),i={request:function(e){return r.forEach(function(t){return t.request(e)}),this},requestEnd:function(){return r.forEach(function(e){return e.requestEnd()}),this}};return n||t.isInstant?i.request(t).requestEnd():i},n.prototype.dragStart=function(e,t){t===void 0&&(t=e.target);var n=t,r=I(this.moveables,function(e){var t=e.getTargets()[0],r=e.getControlBoxElement(),i=e.getDragElement();return!(!t||!i)&&(i===n||i.contains(n)||i!==t&&t===n||t.contains(n)||r===n||r.contains(n))});return r&&r.dragStart(e,t),this},n.prototype.hitTest=function(){return 0},n.prototype.isInside=function(){return!1},n.prototype.isDragging=function(){return!1},n.prototype.getDragElement=function(){return null},n.prototype.getMoveables=function(){return Y([],J(this.moveables),!1)},n.prototype.updateRenderPoses=function(){},n.prototype.checkUpdate=function(){},n.prototype.triggerEvent=function(){},n.prototype.updateAbles=function(){},n.prototype._updateEvents=function(){},n.prototype._updateObserver=function(){},n}(qi);function ia(e,t){var n=[];return e.forEach(function(e){e&&(k(e)?t[e]&&n.push.apply(n,Y([],J(t[e]),!1)):O(e)?n.push.apply(n,Y([],J(ia(e,t)),!1)):n.push(e))}),n}function aa(e,t){var n=[];return e.forEach(function(e){e&&(k(e)?t[e]&&n.push.apply(n,Y([],J(t[e]),!1)):O(e)?n.push(aa(e,t)):n.push(e))}),n}function oa(e,t){return e.length!==t.length||e.some(function(e,n){var r=t[n];return!(!e&&!r)&&e!=r&&(!O(e)||!O(r)||oa(e,r))})}var sa=function(e){function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.refTargets=[],t.selectorMap={},t._differ=new rt,t._elementTargets=[],t._tmpRefTargets=[],t._tmpSelectorMap={},t._onChangeTargets=null,t}var r,i;return Nt(n,e),n.makeStyled=function(){var e={};this.getTotalAbles().forEach(function(t){var n=t.css;n&&n.forEach(function(t){e[t]=!0})});var t=L(e).join(`
|
|
156
|
-
`);this.defaultStyled=jt(`div`,function(e,t){return t.replace(/([^}{]*){/gm,function(t,n){return n.replace(/\.([^{,\s\d.]+)/g,`.`+e+`$1`)+`{`})}(Zt,Qt+t))},n.getTotalAbles=function(){return Y([Pi,Ji,Xi,Ni],J(this.defaultAbles),!1)},n.prototype.render=function(){var e=this.constructor;e.defaultStyled||e.makeStyled();var n=this.props,r=n.ables,i=n.props,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(n,[`ables`,`props`]),o=J(this._updateRefs(!0),2),s=o[0],c=o[1],l=ia(s,c),u=l.length>1,d=Y(Y([],J(e.getTotalAbles()),!1),J(r||[]),!1),f=q(q(q({},a),i||{}),{ables:d,cssStyled:e.defaultStyled,customStyledMap:e.customStyledMap});this._elementTargets=l;var p=null,m=this.moveable;if(a.persistData?.children&&(u=!0),a.individualGroupable)return t.createElement(ra,q({key:`individual-group`,ref:_(this,`moveable`)},f,{target:null,targets:l}));if(u){var h=aa(s,c);if(m&&!m.props.groupable&&!m.props.individualGroupable){var g=m.props.target;g&&l.indexOf(g)>-1&&(p=q({},m.state))}return t.createElement(na,q({key:`group`,ref:_(this,`moveable`)},f,a.groupableProps??{},{target:null,targets:l,targetGroups:h,firstRenderState:p}))}var v=l[0];if(m&&(m.props.groupable||m.props.individualGroupable)){var y=I(m.moveables||[],function(e){return e.props.target===v});y&&(p=q({},y.state))}return t.createElement(qi,q({key:`single`,ref:_(this,`moveable`)},f,{target:v,firstRenderState:p}))},n.prototype.componentDidMount=function(){this._checkChangeTargets()},n.prototype.componentDidUpdate=function(){this._checkChangeTargets()},n.prototype.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},n.prototype.getTargets=function(){return this.moveable?.getTargets()??[]},n.prototype.updateSelectors=function(){this.selectorMap={},this._updateRefs(),this.forceUpdate()},n.prototype.waitToChangeTarget=function(){var e,t=this;return this._onChangeTargets=function(){t._onChangeTargets=null,e()},new Promise(function(t){e=t})},n.prototype.waitToChangeTargets=function(){return this.waitToChangeTarget()},n.prototype.getManager=function(){return this.moveable},n.prototype.getMoveables=function(){return this.moveable.getMoveables()},n.prototype.getDragElement=function(){return this.moveable.getDragElement()},n.prototype._updateRefs=function(e){var t=this.refTargets,n=vi(this.props.target||this.props.targets),r=typeof document<`u`,i=oa(t,n),a=this.selectorMap,o={};return this.refTargets.forEach(function e(t){k(t)?a[t]?o[t]=a[t]:r&&(i=!0,o[t]=[].slice.call(document.querySelectorAll(t))):O(t)&&t.forEach(e)}),this._tmpRefTargets=n,this._tmpSelectorMap=o,[n,o,!e&&i]},n.prototype._checkChangeTargets=function(){var e,t,n;this.refTargets=this._tmpRefTargets,this.selectorMap=this._tmpSelectorMap;var r=this._differ.update(this._elementTargets),i=r.added,a=r.removed;(i.length||a.length)&&((t=(e=this.props).onChangeTargets)==null||t.call(e,{moveable:this.moveable,targets:this._elementTargets}),(n=this._onChangeTargets)==null||n.call(this));var o=J(this._updateRefs(),3),s=o[0],c=o[1],l=o[2];this.refTargets=s,this.selectorMap=c,l&&this.forceUpdate()},n.defaultAbles=[],n.customStyledMap={},n.defaultStyled=null,function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([(r=on,i===void 0&&(i={}),function(e,t){r.forEach(function(n){var r=i[n]||n;r in e||(e[r]=function(){for(var e,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=(e=this[t])[n].apply(e,r);return a===this[t]?this:a})})})],n.prototype,`moveable`,void 0),n}(t.PureComponent),ca,la,ua=(ca=[gr,yr],la=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return Nt(t,e),t}(sa),la.defaultAbles=ca,la);exports.default=ua;
|