reactjs-tiptap-editor 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{ActionMenuButton-htJNI0Fa.js → ActionMenuButton-Cc0vy5hy.js} +10 -13
- package/lib/ActionMenuButton-t7e5GCJp.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +23 -25
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +5 -6
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +5 -6
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +11 -12
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +3 -3
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +9 -10
- package/lib/CodeBlock.cjs +39 -39
- package/lib/CodeBlock.js +837 -946
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +8 -9
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +18 -19
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +5 -6
- package/lib/{Drawer-1211urKj.js → Drawer-C6WTtcd0.js} +16 -17
- package/lib/Drawer-DRdsK4f_.cjs +1 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +15 -16
- package/lib/{Excalidraw-Du3hBR8t.js → Excalidraw-DjO5sCC_.js} +31 -32
- package/lib/Excalidraw-gJ99kWdS.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +2 -2
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +17 -18
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +5 -6
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +5 -5
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +15 -15
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +7 -8
- package/lib/History.cjs +1 -1
- package/lib/History.js +8 -10
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +5 -6
- package/lib/Icon-DHNSWrSX.cjs +1 -0
- package/lib/{Icon-C-qYUAS1.js → Icon-prdLEHMN.js} +3 -4
- package/lib/{Iframe-DTYTLQE6.js → Iframe-CERKUXQh.js} +13 -14
- package/lib/Iframe-CvymVtpM.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +48 -49
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +22 -23
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.js +10 -11
- package/lib/{Indent-jOPn3eUM.js → Indent-BfEOOT5B.js} +24 -25
- package/lib/Indent-CE6kk62r.cjs +1 -0
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +10 -11
- package/lib/{Katex-CERSrcTP.js → Katex-5KNTSK8T.js} +21 -22
- package/lib/Katex-CJ2Fmvut.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +14 -15
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-B5SdhOfa.js → LinkEditBlock-CFkyS2Ze.js} +55 -56
- package/lib/{LinkEditBlock-DaxljgJC.cjs → LinkEditBlock-D6z0Yohc.cjs} +2 -2
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.js +138 -132
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +20 -20
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +22 -24
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +5 -6
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +18 -19
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +13 -13
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +5 -6
- package/lib/{Table-39OkCQbu.js → Table-CWbY_hqo.js} +7 -8
- package/lib/Table-D9pRzwFU.cjs +9 -0
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +13 -14
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +17 -19
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +17 -19
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +5 -6
- package/lib/{Twitter-D7PhLycr.js → Twitter-BV7HA-MO.js} +566 -525
- package/lib/Twitter-D7NK3MZe.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +24 -25
- package/lib/bubble.cjs +4 -4
- package/lib/bubble.js +433 -423
- package/lib/{button-Crm67hfl.js → button-0963_Pa8.js} +3 -4
- package/lib/button-Bxfjx9_Y.cjs +1 -0
- package/lib/{checkbox-DViVmgJ6.js → checkbox-D4p6-UMt.js} +1 -1
- package/lib/{checkbox-NQC2MdGT.cjs → checkbox-Q6FcMQW5.cjs} +1 -1
- package/lib/{dialog-Ce9Cjfft.js → dialog-B-9_Z5j2.js} +1 -1
- package/lib/{dialog-DaHBd2zw.cjs → dialog-D-oYxagG.cjs} +1 -1
- package/lib/{dropdown-menu-CQykJhBs.js → dropdown-menu-par18QL5.js} +1 -1
- package/lib/{dropdown-menu-CSCDQtq0.cjs → dropdown-menu-r8XibZQU.cjs} +1 -1
- package/lib/extensions/Mention/Mention.d.ts +3 -1
- package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +7 -1
- package/lib/{index-DCJheRBq.cjs → index--nUS7Y66.cjs} +1 -1
- package/lib/{index-DLqogznp.cjs → index-BBNITgNi.cjs} +7 -7
- package/lib/index-BFXkgG1P.cjs +7 -0
- package/lib/{index-prphFVsp.js → index-BQ6ZdLsu.js} +1 -1
- package/lib/{index-DylewabB.cjs → index-BZ6DfR2r.cjs} +1 -1
- package/lib/{index-D-FhWysc.js → index-BimeTI7q.js} +1 -1
- package/lib/{index-TMqmkmT6.cjs → index-CApXPpjF.cjs} +1 -1
- package/lib/{index-nFjllrEl.js → index-CbIQPoF6.js} +19 -18
- package/lib/{index-BeUrdBxf.js → index-EKFybgpP.js} +1 -1
- package/lib/{index-DuZCJJSp.js → index-pgx8gyoC.js} +1118 -504
- package/lib/index.cjs +2 -2
- package/lib/index.js +8 -9
- package/lib/{input-tU3H__39.cjs → input-CZUkD6wF.cjs} +1 -1
- package/lib/{input-DfqFAyKo.js → input-cclJoUeC.js} +1 -1
- package/lib/{isNumber-CTm1pIvN.js → isNumber-8HKEgTkA.js} +1 -1
- package/lib/{isNumber-C2saEiG2.cjs → isNumber-Bv1Qhmw8.cjs} +1 -1
- package/lib/label-CFaBdRGz.cjs +1 -0
- package/lib/label-aveW7pdK.js +18 -0
- package/lib/{popover-CZWSQZ0q.cjs → popover-BWYZO_fD.cjs} +1 -1
- package/lib/{popover-CoepUobG.js → popover-D5YZPv2r.js} +1 -1
- package/lib/{separator-DCQD8P6s.cjs → separator-B978cwAm.cjs} +1 -1
- package/lib/{separator-6SnwzytZ.js → separator-BHjFVmZr.js} +18 -18
- package/lib/{store-726Zjszt.cjs → store-BsBiawfz.cjs} +1 -1
- package/lib/{store-ibARMQ3h.js → store-BsMMRKFd.js} +1 -1
- package/lib/style.css +1 -1
- package/lib/{tabs-DrkJL_C2.js → tabs-Bj8EvAkY.js} +1 -1
- package/lib/{tabs-B_ArrG09.cjs → tabs-CUMyiV80.cjs} +1 -1
- package/lib/{textarea-CmZVZKOo.cjs → textarea-BKb7LDw1.cjs} +1 -1
- package/lib/{textarea-CIs52G8B.js → textarea-CClyW-74.js} +1 -1
- package/lib/{throttle-CGM5M2yG.js → throttle-BIkZV3Y_.js} +1 -1
- package/lib/{throttle-DXN-aiH5.cjs → throttle-BM3Bmbf_.cjs} +1 -1
- package/lib/{updatePosition-DpMKxYdN.js → updatePosition-GLTrgcib.js} +1 -1
- package/lib/{updatePosition-C17CDdjq.cjs → updatePosition-u2mTh3mG.cjs} +1 -1
- package/lib/useButtonProps-B0riSJs9.cjs +1 -0
- package/lib/{useButtonProps-D0SrPzuG.js → useButtonProps-StwAz7Ha.js} +35 -47
- package/package.json +58 -54
- package/lib/ActionMenuButton-DYT5chmX.cjs +0 -1
- package/lib/Drawer-DUFUd5BW.cjs +0 -1
- package/lib/Excalidraw-CajgZDjU.cjs +0 -1
- package/lib/Icon-BjR_or8V.cjs +0 -1
- package/lib/Iframe-CM6mRQmv.cjs +0 -1
- package/lib/Indent-BmhiEb0S.cjs +0 -1
- package/lib/Katex-CUd3LxLh.cjs +0 -4
- package/lib/Table-3VstSlg4.cjs +0 -9
- package/lib/Twitter-DuHPeVW1.cjs +0 -1
- package/lib/button-xNppt_aK.cjs +0 -1
- package/lib/index-BQ17A_37.js +0 -393
- package/lib/index-CNzHZDls.cjs +0 -7
- package/lib/index-DmOTQudI.cjs +0 -1
- package/lib/label-DC33TZy_.js +0 -19
- package/lib/label-DkDE77kc.cjs +0 -1
- package/lib/toggle-DVCNvcqp.cjs +0 -1
- package/lib/toggle-xchtz-Kf.js +0 -92
- package/lib/tooltip-BTFcHrd9.js +0 -24
- package/lib/tooltip-DFjcKu9a.cjs +0 -1
- package/lib/useButtonProps-bei1vI37.cjs +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactjs-tiptap-editor",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.8",
|
|
5
5
|
"packageManager": "pnpm@8.15.9",
|
|
6
6
|
"description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
"types": "./lib/index.d.ts",
|
|
34
34
|
"pnpm": {
|
|
35
35
|
"overrides": {
|
|
36
|
+
"@excalidraw/excalidraw>nanoid": "3.3.11",
|
|
37
|
+
"@excalidraw/mermaid-to-excalidraw": "2.0.0",
|
|
38
|
+
"@excalidraw/mermaid-to-excalidraw>nanoid": "5.1.6",
|
|
39
|
+
"esbuild": "0.25.12",
|
|
36
40
|
"prosemirror-view": "1.41.1"
|
|
37
41
|
}
|
|
38
42
|
},
|
|
@@ -705,7 +709,7 @@
|
|
|
705
709
|
"dependencies": {
|
|
706
710
|
"@excalidraw/excalidraw": "^0.18.0",
|
|
707
711
|
"@floating-ui/dom": "^1.7.4",
|
|
708
|
-
"@hocuspocus/provider": "^3.4.
|
|
712
|
+
"@hocuspocus/provider": "^3.4.3",
|
|
709
713
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
710
714
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
711
715
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
@@ -720,44 +724,44 @@
|
|
|
720
724
|
"@radix-ui/react-toast": "^1.2.15",
|
|
721
725
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
722
726
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
723
|
-
"@tiptap/core": "^3.
|
|
724
|
-
"@tiptap/extension-blockquote": "^3.
|
|
725
|
-
"@tiptap/extension-bold": "^3.
|
|
726
|
-
"@tiptap/extension-bullet-list": "^3.
|
|
727
|
-
"@tiptap/extension-code": "^3.
|
|
728
|
-
"@tiptap/extension-collaboration": "^3.
|
|
729
|
-
"@tiptap/extension-collaboration-caret": "^3.
|
|
730
|
-
"@tiptap/extension-document": "^3.
|
|
731
|
-
"@tiptap/extension-drag-handle": "^3.
|
|
732
|
-
"@tiptap/extension-drag-handle-react": "^3.
|
|
733
|
-
"@tiptap/extension-emoji": "^3.
|
|
734
|
-
"@tiptap/extension-hard-break": "^3.
|
|
735
|
-
"@tiptap/extension-heading": "^3.
|
|
736
|
-
"@tiptap/extension-highlight": "^2.
|
|
737
|
-
"@tiptap/extension-horizontal-rule": "^3.
|
|
738
|
-
"@tiptap/extension-image": "^3.
|
|
739
|
-
"@tiptap/extension-italic": "^3.
|
|
740
|
-
"@tiptap/extension-link": "^3.
|
|
741
|
-
"@tiptap/extension-list": "^3.
|
|
742
|
-
"@tiptap/extension-list-item": "^3.
|
|
743
|
-
"@tiptap/extension-mention": "^3.
|
|
744
|
-
"@tiptap/extension-node-range": "^3.
|
|
745
|
-
"@tiptap/extension-ordered-list": "^3.
|
|
746
|
-
"@tiptap/extension-paragraph": "^3.
|
|
747
|
-
"@tiptap/extension-strike": "^3.
|
|
748
|
-
"@tiptap/extension-subscript": "^3.
|
|
749
|
-
"@tiptap/extension-superscript": "^3.
|
|
750
|
-
"@tiptap/extension-table": "^3.
|
|
751
|
-
"@tiptap/extension-task-item": "^3.
|
|
752
|
-
"@tiptap/extension-task-list": "^3.
|
|
753
|
-
"@tiptap/extension-text": "^3.
|
|
754
|
-
"@tiptap/extension-text-align": "^3.
|
|
755
|
-
"@tiptap/extension-text-style": "^3.
|
|
756
|
-
"@tiptap/extension-underline": "^3.
|
|
757
|
-
"@tiptap/extensions": "^3.
|
|
758
|
-
"@tiptap/pm": "^3.
|
|
759
|
-
"@tiptap/react": "^3.
|
|
760
|
-
"@tiptap/suggestion": "^3.
|
|
727
|
+
"@tiptap/core": "^3.14.0",
|
|
728
|
+
"@tiptap/extension-blockquote": "^3.14.0",
|
|
729
|
+
"@tiptap/extension-bold": "^3.14.0",
|
|
730
|
+
"@tiptap/extension-bullet-list": "^3.14.0",
|
|
731
|
+
"@tiptap/extension-code": "^3.14.0",
|
|
732
|
+
"@tiptap/extension-collaboration": "^3.14.0",
|
|
733
|
+
"@tiptap/extension-collaboration-caret": "^3.14.0",
|
|
734
|
+
"@tiptap/extension-document": "^3.14.0",
|
|
735
|
+
"@tiptap/extension-drag-handle": "^3.14.0",
|
|
736
|
+
"@tiptap/extension-drag-handle-react": "^3.14.0",
|
|
737
|
+
"@tiptap/extension-emoji": "^3.14.0",
|
|
738
|
+
"@tiptap/extension-hard-break": "^3.14.0",
|
|
739
|
+
"@tiptap/extension-heading": "^3.14.0",
|
|
740
|
+
"@tiptap/extension-highlight": "^2.27.1",
|
|
741
|
+
"@tiptap/extension-horizontal-rule": "^3.14.0",
|
|
742
|
+
"@tiptap/extension-image": "^3.14.0",
|
|
743
|
+
"@tiptap/extension-italic": "^3.14.0",
|
|
744
|
+
"@tiptap/extension-link": "^3.14.0",
|
|
745
|
+
"@tiptap/extension-list": "^3.14.0",
|
|
746
|
+
"@tiptap/extension-list-item": "^3.14.0",
|
|
747
|
+
"@tiptap/extension-mention": "^3.14.0",
|
|
748
|
+
"@tiptap/extension-node-range": "^3.14.0",
|
|
749
|
+
"@tiptap/extension-ordered-list": "^3.14.0",
|
|
750
|
+
"@tiptap/extension-paragraph": "^3.14.0",
|
|
751
|
+
"@tiptap/extension-strike": "^3.14.0",
|
|
752
|
+
"@tiptap/extension-subscript": "^3.14.0",
|
|
753
|
+
"@tiptap/extension-superscript": "^3.14.0",
|
|
754
|
+
"@tiptap/extension-table": "^3.14.0",
|
|
755
|
+
"@tiptap/extension-task-item": "^3.14.0",
|
|
756
|
+
"@tiptap/extension-task-list": "^3.14.0",
|
|
757
|
+
"@tiptap/extension-text": "^3.14.0",
|
|
758
|
+
"@tiptap/extension-text-align": "^3.14.0",
|
|
759
|
+
"@tiptap/extension-text-style": "^3.14.0",
|
|
760
|
+
"@tiptap/extension-underline": "^3.14.0",
|
|
761
|
+
"@tiptap/extensions": "^3.14.0",
|
|
762
|
+
"@tiptap/pm": "^3.14.0",
|
|
763
|
+
"@tiptap/react": "^3.14.0",
|
|
764
|
+
"@tiptap/suggestion": "^3.14.0",
|
|
761
765
|
"@tiptap/y-tiptap": "^3.0.1",
|
|
762
766
|
"class-variance-authority": "^0.7.1",
|
|
763
767
|
"clsx": "^2.1.1",
|
|
@@ -765,35 +769,35 @@
|
|
|
765
769
|
"docx": "^9.5.1",
|
|
766
770
|
"easydrawer": "^0.0.15",
|
|
767
771
|
"frimousse": "^0.3.0",
|
|
768
|
-
"katex": "^0.16.
|
|
769
|
-
"lodash-es": "^4.17.
|
|
772
|
+
"katex": "^0.16.27",
|
|
773
|
+
"lodash-es": "^4.17.22",
|
|
770
774
|
"lucide-react": "^0.427.0",
|
|
771
|
-
"mermaid": "^11.12.
|
|
775
|
+
"mermaid": "^11.12.2",
|
|
772
776
|
"prism-code-editor-lightweight": "^0.0.3",
|
|
773
777
|
"prosemirror-docx": "^0.2.1",
|
|
774
778
|
"re-resizable": "^6.11.2",
|
|
775
779
|
"react-colorful": "^5.6.1",
|
|
776
780
|
"react-image-crop": "^11.0.10",
|
|
777
|
-
"react-tweet": "^3.
|
|
781
|
+
"react-tweet": "^3.3.0",
|
|
778
782
|
"reactjs-signal": "^2.0.1",
|
|
779
783
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
780
784
|
"svg64": "^2.0.0",
|
|
781
|
-
"y-protocols": "^1.0.
|
|
782
|
-
"yjs": "^13.6.
|
|
785
|
+
"y-protocols": "^1.0.7",
|
|
786
|
+
"yjs": "^13.6.28"
|
|
783
787
|
},
|
|
784
788
|
"devDependencies": {
|
|
785
789
|
"@hunghg255/eslint-config": "^1.0.1",
|
|
786
790
|
"@types/deep-equal": "^1.0.4",
|
|
787
791
|
"@types/katex": "^0.16.7",
|
|
788
792
|
"@types/lodash-es": "^4.17.12",
|
|
789
|
-
"@types/node": "^24.10.
|
|
793
|
+
"@types/node": "^24.10.4",
|
|
790
794
|
"@types/react": "^19.2.7",
|
|
791
795
|
"@types/react-dom": "^19.2.3",
|
|
792
|
-
"@vitejs/plugin-react": "^5.1.
|
|
793
|
-
"autoprefixer": "^10.4.
|
|
796
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
797
|
+
"autoprefixer": "^10.4.23",
|
|
794
798
|
"bumpp": "^10.3.2",
|
|
795
799
|
"contributorkit": "^0.0.4",
|
|
796
|
-
"eslint": "^9.39.
|
|
800
|
+
"eslint": "^9.39.2",
|
|
797
801
|
"eslint-plugin-tailwindcss": "^3.18.2",
|
|
798
802
|
"esno": "^4.8.0",
|
|
799
803
|
"execa": "^9.6.1",
|
|
@@ -804,11 +808,11 @@
|
|
|
804
808
|
"postcss": "^8.5.6",
|
|
805
809
|
"postcss-replace": "^2.0.1",
|
|
806
810
|
"postcss-scss": "^4.0.9",
|
|
807
|
-
"react": "^19.2.
|
|
808
|
-
"react-dom": "^19.2.
|
|
809
|
-
"sass": "^1.
|
|
811
|
+
"react": "^19.2.3",
|
|
812
|
+
"react-dom": "^19.2.3",
|
|
813
|
+
"sass": "^1.97.1",
|
|
810
814
|
"tailwind-merge": "^2.6.0",
|
|
811
|
-
"tailwindcss": "^3.4.
|
|
815
|
+
"tailwindcss": "^3.4.19",
|
|
812
816
|
"typescript": "^5.9.3",
|
|
813
817
|
"unplugin-dts": "1.0.0-beta.6",
|
|
814
818
|
"verify-commit-msg": "^0.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),s=require("@radix-ui/react-slot");require("./index-CNzHZDls.cjs");const d=require("./useButtonProps-bei1vI37.cjs"),u=require("./button-xNppt_aK.cjs"),m=require("./index-DmOTQudI.cjs"),c=require("./tooltip-DFjcKu9a.cjs"),f=a.forwardRef(({asChild:h=!1,tooltip:i,...t},r)=>{var x;const n=m.icons[t.icon],l=h?s.Slot:u.Button;return e.jsxs(c.Tooltip,{children:[e.jsx(c.TooltipTrigger,{asChild:!0,children:e.jsx(l,{className:"richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0","data-state":t!=null&&t.dataState?"on":"off",disabled:t==null?void 0:t.disabled,ref:r,variant:"ghost",...t,children:e.jsxs("div",{className:"richtext-flex richtext-h-full richtext-items-center richtext-font-normal",children:[(t==null?void 0:t.title)&&e.jsx("div",{className:"richtext-grow richtext-truncate richtext-text-left richtext-text-sm",children:t==null?void 0:t.title}),n&&e.jsx(n,{className:"richtext-ml-1 richtext-size-3 richtext-shrink-0 richtext-text-zinc-500"})]})})}),i&&e.jsx(c.TooltipContent,{children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[i&&e.jsx("div",{children:i}),e.jsx("div",{className:"richtext-flex",children:!!((x=t==null?void 0:t.shortcutKeys)!=null&&x.length)&&e.jsx("span",{children:d.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})});exports.ActionMenuButton=f;
|
package/lib/Drawer-DUFUd5BW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const I=require("./index-DLqogznp.cjs"),G=require("./throttle-DXN-aiH5.cjs"),e=require("react/jsx-runtime"),g=require("react"),B=require("./index-FSRjMsxW.cjs"),F=require("./useButtonProps-bei1vI37.cjs"),d=require("easydrawer"),Z=require("./shortId-Bfj8TyNr.cjs"),J=require("./toggle-DVCNvcqp.cjs"),P=require("./dialog-DaHBd2zw.cjs"),m=require("./index-CNzHZDls.cjs"),ee=require("./file-i7e4nQY2.cjs"),te=require("./button-xNppt_aK.cjs"),W={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function oe({editor:t,node:o,updateAttributes:r,getPos:s,selected:f}){const[M,H]=g.useState({width:B.IMAGE_MAX_SIZE,height:B.IMAGE_MAX_SIZE}),[w,h]=g.useState({width:0,height:0}),[L]=g.useState([W.TOP_LEFT,W.TOP_RIGHT,W.BOTTOM_LEFT,W.BOTTOM_RIGHT]),[j,_]=g.useState(!1),[a,c]=g.useState({x:0,y:0,w:0,h:0,dir:""}),{align:T}=o==null?void 0:o.attrs,C=g.useMemo(()=>{const{src:u,alt:y,width:S,height:N}=o==null?void 0:o.attrs,z=I.isNumber(S)?`${S}px`:S,v=I.isNumber(N)?`${N}px`:N;return{src:u||void 0,alt:y||void 0,style:{width:z||void 0,height:v||void 0}}},[o==null?void 0:o.attrs]),n=g.useMemo(()=>{const{style:{width:u}}=C;return{width:u==="100%"?u:void 0}},[C]);function O(u){h({width:u.target.width,height:u.target.height})}function A(){t.commands.setNodeSelection(s())}const D=g.useCallback(G.throttle(()=>{const{width:u}=getComputedStyle(t.view.dom);H(y=>({...y,width:Number.parseInt(u,10)}))},B.IMAGE_THROTTLE_WAIT_TIME),[t]);function V(u,y){u.preventDefault(),u.stopPropagation();const S=w.width,N=w.height,z=S/N;let v=Number(o.attrs.width),E=Number(o.attrs.height);const b=M.width;v&&!E?(v=v>b?b:v,E=Math.round(v/z)):E&&!v?(v=Math.round(E*z),v=v>b?b:v):!v&&!E?(v=S>b?b:S,E=Math.round(v/z)):v=v>b?b:v,_(!0),c({x:u.clientX,y:u.clientY,w:v,h:E,dir:y})}const x=g.useCallback(G.throttle(u=>{if(u.preventDefault(),u.stopPropagation(),!j)return;const{x:y,w:S,dir:N}=a,z=(u.clientX-y)*(/l/.test(N)?-1:1),{width:v,height:E}=o==null?void 0:o.attrs,b=v/E,U=F.clamp(S+z,B.IMAGE_MIN_SIZE,M.width),Y=Math.round(U/b);r({width:U,height:Y})},B.IMAGE_THROTTLE_WAIT_TIME),[j,a,M,r,o==null?void 0:o.attrs]),i=g.useCallback(u=>{u.preventDefault(),u.stopPropagation(),j&&(c({x:0,y:0,w:0,h:0,dir:""}),_(!1),A())},[j,A]),p=g.useCallback(()=>{document==null||document.addEventListener("mousemove",x,!0),document==null||document.addEventListener("mouseup",i,!0)},[x,i]),k=g.useCallback(()=>{document==null||document.removeEventListener("mousemove",x,!0),document==null||document.removeEventListener("mouseup",i,!0)},[x,i]);g.useEffect(()=>(j?p():k(),()=>{k()}),[j,p,k]);const q=g.useMemo(()=>new ResizeObserver(()=>D()),[D]);return g.useEffect(()=>(q.observe(t.view.dom),()=>{q.disconnect()}),[t.view.dom,q]),e.jsx(I.NodeViewWrapper,{className:"image-view",style:{...n,width:"100%",textAlign:T},children:e.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:{...n,background:"#fff"},className:`image-view__body ${f?"image-view__body--focused":""} ${j?"image-view__body--resizing":""}`,children:[e.jsx("img",{alt:C.alt,className:"image-view__body__image block",height:"auto",onClick:A,onLoad:O,src:C.src,style:C.style}),t.view.editable&&(f||j)&&e.jsx("div",{className:"image-resizer",children:L==null?void 0:L.map(u=>e.jsx("span",{className:`image-resizer__handler image-resizer__handler--${u}`,onMouseDown:y=>V(y,u)},`image-dir-${u}`))})]})})}const re="_wrapper_rraz2_1",le="_tool_rraz2_17",ne="_active_rraz2_37",se="_pen_rraz2_41",ie="_line_rraz2_48",ae="_options_rraz2_56",ce="_colorWrap_rraz2_66",he="_color_rraz2_66",ue="_colorActive_rraz2_83",l={wrapper:re,tool:le,active:ne,pen:se,line:ie,options:ae,colorWrap:ce,color:he,colorActive:ue};function de(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{color:"currentColor",d:"M2 9.2v3.6M12.8 2H9.2M7.5 20H9M20 7.5V9M2.133 4.699c.155-.727.415-1.274.854-1.712c.426-.426.954-.684 1.652-.84m15.228 2.552c-.155-.727-.415-1.274-.854-1.712c-.417-.417-.932-.673-1.608-.83M4.64 19.853c-.698-.156-1.226-.414-1.652-.84c-.43-.43-.69-.965-.845-1.673m11.638 3.626c-1.812.125-3.607-8.326-2.374-9.559s9.684.561 9.559 2.373c-.087 1.187-2.095 1.656-2.037 2.711c.018.309.408.59 1.188 1.154c.543.39 1.096.77 1.629 1.175a.66.66 0 0 1 .234.687a3.35 3.35 0 0 1-2.472 2.473a.66.66 0 0 1-.688-.235c-.404-.533-.784-1.086-1.175-1.628c-.563-.78-.844-1.17-1.153-1.188c-1.055-.059-1.524 1.95-2.71 2.037",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}function ge(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M20.06 18a4 4 0 0 1-.2-.89c-.67.7-1.48 1.05-2.41 1.05c-.83 0-1.52-.24-2.05-.71c-.53-.45-.8-1.06-.8-1.79c0-.88.33-1.56 1-2.05s1.61-.73 2.83-.73h1.4v-.64q0-.735-.45-1.17c-.3-.29-.75-.43-1.33-.43c-.52 0-.95.12-1.3.36c-.35.25-.52.54-.52.89h-1.46c0-.43.15-.84.45-1.24c.28-.4.71-.71 1.22-.94c.51-.21 1.06-.35 1.69-.35c.98 0 1.74.24 2.29.73s.84 1.16.86 2.02V16c0 .8.1 1.42.3 1.88V18zm-2.4-1.12c.45 0 .88-.11 1.29-.32c.4-.21.7-.49.88-.83v-1.57H18.7c-1.77 0-2.66.47-2.66 1.41c0 .43.15.73.46.96c.3.23.68.35 1.16.35m-12.2-3.17h4.07L7.5 8.29zM6.64 6h1.72l4.71 12h-1.93l-.97-2.57H4.82L3.86 18H1.93z",fill:"currentColor"})})}function me(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M3 21v-4.25L16.2 3.575q.3-.275.663-.425t.762-.15t.775.15t.65.45L20.425 5q.3.275.438.65T21 6.4q0 .4-.137.763t-.438.662L7.25 21zM17.6 7.8L19 6.4L17.6 5l-1.4 1.4z",fill:"currentColor"})})}function xe(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 256 256",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M253.66 106.34a8 8 0 0 0-11.32 0L192 156.69L107.31 72l50.35-50.34a8 8 0 1 0-11.32-11.32L96 60.69a16 16 0 0 0-2.82 18.81L72 100.69a16 16 0 0 0 0 22.62l4.69 4.69l-58.35 58.34a8 8 0 0 0 3.13 13.25l72 24A7.9 7.9 0 0 0 96 224a8 8 0 0 0 5.66-2.34L136 187.31l4.69 4.69a16 16 0 0 0 22.62 0l21.19-21.18a16 16 0 0 0 18.81-2.82l50.35-50.34a8 8 0 0 0 0-11.32M93.84 206.85l-55-18.35L88 139.31L124.69 176ZM152 180.69L83.31 112L104 91.31L172.69 160Z",fill:"currentColor"})})}function pe(t){return e.jsxs("svg",{height:"1em",viewBox:"0 0 16 16",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:[e.jsx("path",{d:"m2.648 9.937l7.29-7.288a2.21 2.21 0 0 1 3.124 0l2.29 2.288a2.21 2.21 0 0 1 0 3.126L10.413 13H12.5a.5.5 0 0 1 0 1H4.501a2.2 2.2 0 0 1-1.563-.647l.707-.707c.227.226.535.354.856.354h4.005a1.2 1.2 0 0 0 .848-.354l1.292-1.293l-4-4l-3.29 3.291a1.21 1.21 0 0 0 0 1.712l.29.29l-.708.707l-.29-.29a2.21 2.21 0 0 1 0-3.126M8 6h6.89a1.2 1.2 0 0 0-.246-.356L14 5H9zm2-2h3l-.645-.644a1.21 1.21 0 0 0-1.71 0zm4.89 3H7.708l1 1H14l.644-.644A1.2 1.2 0 0 0 14.891 7zM9.708 9l1.646 1.646L13 9z",fill:"currentColor"}),e.jsx("path",{d:"M14 11.5a.5.5 0 1 1-1 0a.5.5 0 0 1 1 0m1.5-.5a.5.5 0 1 0 0-1a.5.5 0 0 0 0 1m-1 2a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1z",fill:"currentColor"})]})}function we(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M3 3h18v18H3zm2 2v14h14V5z",fill:"currentColor"})})}function ve(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M2 20V4h20v16zm2-2h16V6H4zm0 0V6z",fill:"currentColor"})})}function Ce(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8",fill:"currentColor"})})}function fe(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M10.363 3.591L2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function Te(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"m6.8 21l-5.2-9l5.2-9h10.4l5.2 9l-5.2 9zm1.15-2h8.1l4.025-7l-4.025-7h-8.1L3.9 12zM12 12",fill:"currentColor"})})}function je(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsxs("g",{fill:"none",fillRule:"evenodd",children:[e.jsx("path",{d:"m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.003-.011l.018-.43l-.003-.012l-.01-.01z"}),e.jsx("path",{d:"M10.586 2.807a2 2 0 0 1 2.828 0l7.778 7.779a2 2 0 0 1 0 2.828l-7.778 7.778a2 2 0 0 1-2.828 0l-7.778-7.778a2 2 0 0 1 0-2.828zM12 4.222L4.222 12L12 19.778L19.778 12z",fill:"currentColor"})]})})}function be(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z",fill:"currentColor"})})}function Me(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{clipRule:"evenodd",d:"M7.53 3.47a.75.75 0 0 1 0 1.06L5.81 6.25H15a5.75 5.75 0 0 1 0 11.5H8a.75.75 0 0 1 0-1.5h7a4.25 4.25 0 0 0 0-8.5H5.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 0",fill:"currentColor",fillRule:"evenodd"})})}function ye(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{clipRule:"evenodd",d:"M16.47 3.47a.75.75 0 0 1 1.06 0l3 3a.75.75 0 0 1 0 1.06l-3 3a.75.75 0 1 1-1.06-1.06l1.72-1.72H9a4.25 4.25 0 0 0 0 8.5h7a.75.75 0 0 1 0 1.5H9a5.75 5.75 0 0 1 0-11.5h9.19l-1.72-1.72a.75.75 0 0 1 0-1.06",fill:"currentColor",fillRule:"evenodd"})})}function Se(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M7 21q-.825 0-1.412-.587T5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413T17 21zm2-4h2V8H9zm4 0h2V8h-2z",fill:"currentColor"})})}function Ee(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 256 256",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M211.81 83.79a28 28 0 0 1-33.12 4.83l-90.07 90.07a28 28 0 1 1-44.43-6.48a28 28 0 0 1 33.12-4.83l90.07-90.07a28 28 0 1 1 44.43 6.48",fill:"currentColor"})})}function He(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M12 20.325q-.35 0-.712-.125t-.638-.4l-1.725-1.575q-2.65-2.425-4.788-4.812T2 8.15Q2 5.8 3.575 4.225T7.5 2.65q1.325 0 2.5.562t2 1.538q.825-.975 2-1.537t2.5-.563q2.35 0 3.925 1.575T22 8.15q0 2.875-2.125 5.275T15.05 18.25l-1.7 1.55q-.275.275-.637.4t-.713.125M11.05 6.75q-.725-1.025-1.55-1.563t-2-.537q-1.5 0-2.5 1t-1 2.5q0 1.3.925 2.763t2.213 2.837t2.65 2.575T12 18.3q.85-.775 2.213-1.975t2.65-2.575t2.212-2.837T20 8.15q0-1.5-1-2.5t-2.5-1q-1.175 0-2 .538T12.95 6.75q-.175.25-.425.375T12 7.25t-.525-.125t-.425-.375m.95 4.725",fill:"currentColor"})})}function Le(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"m7.625 6.4l2.8-3.625q.3-.4.713-.587T12 2t.863.188t.712.587l2.8 3.625l4.25 1.425q.65.2 1.025.738t.375 1.187q0 .3-.088.6t-.287.575l-2.75 3.9l.1 4.1q.025.875-.575 1.475t-1.4.6q-.05 0-.55-.075L12 19.675l-4.475 1.25q-.125.05-.275.063T6.975 21q-.8 0-1.4-.6T5 18.925l.1-4.125l-2.725-3.875q-.2-.275-.288-.575T2 9.75q0-.625.363-1.162t1.012-.763zM8.85 8.125L4 9.725L7.1 14.2L7 18.975l5-1.375l5 1.4l-.1-4.8L20 9.775l-4.85-1.65L12 4zM12 11.5",fill:"currentColor"})})}function ke(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M12.01 6c2.61 0 4.89 1.86 5.4 4.43l.3 1.5l1.52.11c1.56.11 2.78 1.41 2.78 2.96c0 1.65-1.35 3-3 3h-13c-2.21 0-4-1.79-4-4c0-2.05 1.53-3.76 3.56-3.97l1.07-.11l.5-.95A5.46 5.46 0 0 1 12.01 6m0-2C9.12 4 6.6 5.64 5.35 8.04C2.35 8.36.01 10.91.01 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.64-4.96C18.68 6.59 15.65 4 12.01 4",fill:"currentColor"})})}function Ne(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M5.586 6.45A2 2 0 0 1 7.509 5h11.84a2 2 0 0 1 1.923 2.55l-2.858 10A2 2 0 0 1 16.491 19H4.651a2 2 0 0 1-1.923-2.55z",fill:"none",stroke:"currentColor",strokeWidth:"2"})})}const ze=[d.Color4.blackHighlight,d.Color4.ofRGBA(166/255,81/255,167/255,.3),d.Color4.ofRGBA(247/255,78/255,158/255,.3),d.Color4.ofRGBA(166/255,83/255,88/255,.3),d.Color4.ofRGBA(246/255,130/255,28/255,.3),d.Color4.ofRGBA(166/255,198/255,0,.3),d.Color4.ofRGBA(98/255,186/255,70/255,.3)],X=[d.Color4.black,d.Color4.fromHex("#007AFF"),d.Color4.fromHex("#A651A7"),d.Color4.fromHex("#F74E9E"),d.Color4.fromHex("#FF5358"),d.Color4.fromHex("#F6821C"),d.Color4.fromHex("#FFC600"),d.Color4.fromHex("#62BA46"),d.Color4.fromHex("#E6BFE8"),d.Color4.fromHex("#FEA3D2"),d.Color4.fromHex("#FFA0A3"),d.Color4.fromHex("#FBC276"),d.Color4.fromHex("#FFFB85"),d.Color4.fromHex("#AADC99")];function _e({onChange:t}){const[o,r]=g.useState(d.Color4.blackHighlight);return e.jsx("div",{className:l.colorWrap,children:ze.map((s,f)=>e.jsx("button",{style:{backgroundColor:s.toHexString()},className:m.cn(l.color,{[l.colorActive]:o.toHexString()===s.toHexString()}),onClick:()=>{r(s),t(s)}},f))})}function $({onChange:t}){const[o,r]=g.useState(d.Color4.black);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:l.colorWrap,children:X.slice(0,7).map((s,f)=>e.jsx("button",{style:{backgroundColor:s.toHexString()},className:m.cn(l.color,{[l.colorActive]:o.toHexString()===s.toHexString()}),onClick:()=>{r(s),t(s)}},f))}),e.jsx("div",{className:l.colorWrap,children:X.slice(7).map((s,f)=>e.jsx("button",{style:{backgroundColor:s.toHexString()},className:m.cn(l.color,{[l.colorActive]:o.toHexString()===s.toHexString()}),onClick:()=>{r(s),t(s)}},f))})]})}function Ae({setColorPen:t,setThicknessPen:o}){const[r,s]=g.useState(2);return e.jsxs("div",{className:l.options,children:[e.jsx("div",{children:e.jsx($,{onChange:f=>t(f)})}),e.jsx("div",{className:l.line}),e.jsx("div",{children:e.jsx("input",{max:10,min:1,step:.1,type:"range",value:r,onChange:f=>{o(Number.parseFloat(f.target.value)),s(Number.parseFloat(f.target.value))}})})]})}function qe({setColorHighlight:t}){return e.jsx("div",{className:l.options,children:e.jsx(_e,{onChange:o=>t(o)})})}function Be({changeColorShape:t,changeBorderColorShape:o,onThicknessChange:r}){return e.jsxs("div",{className:l.options,children:[e.jsx("div",{children:e.jsx($,{onChange:s=>t(s)})}),e.jsx("div",{className:l.line}),e.jsx("div",{children:e.jsx($,{onChange:s=>o(s)})}),e.jsx("div",{className:l.line}),e.jsx("div",{children:e.jsx("input",{defaultValue:0,max:20,min:0,step:1,type:"range",onChange:s=>{r(Number.parseFloat(s.target.value))}})})]})}function K(t){const{setColorPen:o,refEditor:r,setThicknessPen:s,setColorHighlight:f,changeBorderColorShape:M,onUndo:H,changeColorShape:w,changeShape:h,onThicknessChange:L,onRedo:j,onClear:_}=t,[a,c]=g.useState(null),[T,C]=g.useState(0);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:l.wrapper,children:[e.jsxs("div",{className:l.pen,children:[e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="select"}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();if(a==="select"){c(null),n[0].setEnabled(!1);return}c("select"),n[0].setEnabled(!0)},children:e.jsx(de,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="text"}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();if(r.current.toolController.setToolEnabled(n[1]),a==="text"){n[1].setEnabled(!1),c(null);return}c("text"),n[1].setEnabled(!0)},children:e.jsx(ge,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="pencil"}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();if(a==="pencil"){c(null),n[2].setEnabled(!1);return}c("pencil"),n[2].setEnabled(!0)},children:e.jsx(me,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="highlighter"}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();if(a==="highlighter"){c(null),n[3].setEnabled(!1);return}c("highlighter"),n[3].setEnabled(!0)},children:e.jsx(xe,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="eraser"}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();if(a==="eraser"){c(null),n[4].setEnabled(!1);return}c("eraser"),n[4].setEnabled(!0)},children:e.jsx(pe,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===0}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(0),C(0)},children:e.jsx(we,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===1}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(1),C(1)},children:e.jsx(ve,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===2}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(2),C(2)},children:e.jsx(Ce,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===3}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(3),C(3)},children:e.jsx(fe,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===4}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(4),C(4)},children:e.jsx(Te,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===5}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(5),C(5)},children:e.jsx(je,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===6}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(6),C(6)},children:e.jsx(be,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===7}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(7),C(7)},children:e.jsx(Ee,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===8}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(8),C(8)},children:e.jsx(He,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===9}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(9),C(9)},children:e.jsx(Le,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===10}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(10),C(10)},children:e.jsx(ke,{})}),e.jsx("button",{className:m.cn(l.tool,{[l.active]:a==="shapes"&&T===11}),onClick:()=>{const n=r.current.toolController.getPrimaryTools();r.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(11),C(11)},children:e.jsx(Ne,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:m.cn(l.tool),onClick:H,children:e.jsx(Me,{})}),e.jsx("button",{className:m.cn(l.tool),onClick:j,children:e.jsx(ye,{})}),e.jsx("button",{className:m.cn(l.tool),onClick:_,children:e.jsx(Se,{})})]}),e.jsxs("div",{className:l.optionsWrap,children:[a==="pencil"&&e.jsx(Ae,{setColorPen:o,setThicknessPen:s}),a==="highlighter"&&e.jsx(qe,{setColorHighlight:f}),a==="shapes"&&e.jsx(Be,{changeBorderColorShape:M,changeColorShape:w,changeShape:h,onThicknessChange:L})]})]})})}let R=!1;function Pe(){const t=F.useEditorInstance(),o=F.useButtonProps(Q.name),{isActive:r=void 0,upload:s}=(o==null?void 0:o.componentProps)??{},{editorDisabled:f}=F.useToggleActive(r),[M,H]=g.useState(!1),w=g.useRef(null),h=g.useRef(null),L=()=>{(async()=>{const i=document.querySelector("#easydrawer");i&&(w.current=new d.Editor(i,{wheelEventsEnabled:!1,disableZoom:!0}),h.current=d.makeDropdownToolbar(w.current),h.current.addDefaultToolWidgets())})()};g.useEffect(()=>{M&&setTimeout(()=>{L()},200)},[M]);const j=async()=>{if(w.current){const x=w.current.toSVG(),i=x.outerHTML,p=`drawer-${Z.shortId()}.svg`;let k=Z.i(x.outerHTML);if(s){const q=ee.dataURLtoFile(k,p);k=await s(q)}t==null||t.chain().focus().setDrawer({type:"drawer",src:k,alt:encodeURIComponent(i),width:426,height:212},!!i).run()}H(!1)},_=x=>{const i=w.current.toolController.getPrimaryTools()[2],p=h.current.getWidgetById("pen-1");i&&p&&(i.setColor(x),p.serializeState())},a=x=>{const i=w.current.toolController.getPrimaryTools()[2],p=h.current.getWidgetById("pen-1");i&&p&&(i.setThickness(x),p.serializeState())},c=x=>{const i=w.current.toolController.getPrimaryTools()[3],p=h.current.getWidgetById("pen-2");i&&p&&(i.setColor(x),p.serializeState())},T=x=>{const i=h.current.getWidgetById("shape");i&&i.setShapeType(x)},C=x=>{const i=w.current.toolController.getPrimaryTools()[5],p=h.current.getWidgetById("shape");i&&p&&(i.setColor(x),p.serializeState())},n=x=>{const i=w.current.toolController.getPrimaryTools()[5],p=h.current.getWidgetById("shape");i&&p&&(i.setThickness(x),p.serializeState())},O=x=>{const i=w.current.toolController.getPrimaryTools()[5],p=h.current.getWidgetById("shape");i&&p&&(i.setBorderColor(x),p.serializeState())},A=()=>{if(R){for(;w.current.history.redoStackSize>0;)w.current.history.redo();R=!1;return}w.current.history.undo()},D=()=>{R||w.current.history.redo()},V=()=>{if(!R){for(;w.current.history.undoStackSize>0;)A();R=!0}};return o?e.jsxs(P.Dialog,{onOpenChange:H,open:M,children:[e.jsx(P.DialogTrigger,{asChild:!0,children:e.jsx(J.ActionButton,{disabled:f,action:()=>{f||H(!0)},icon:"PencilRuler",tooltip:"Drawer"})}),e.jsxs(P.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[e.jsx(P.DialogTitle,{children:"Drawer"}),e.jsxs("div",{style:{height:"600px",width:"100%",borderWidth:1,background:"white",position:"relative"},children:[e.jsx("div",{className:"richtext-size-full",id:"easydrawer"}),e.jsx(K,{changeBorderColorShape:O,changeColorShape:C,changeShape:T,onClear:V,onRedo:D,onThicknessChange:n,onUndo:A,refEditor:w,setColorHighlight:c,setColorPen:_,setThicknessPen:a})]}),e.jsx(P.DialogFooter,{children:e.jsx(te.Button,{onClick:j,type:"button",children:"Save changes"})})]})]}):e.jsx(e.Fragment,{})}const Q=G.index_default.extend({name:"richTextDrawer",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",draggable:!1,selectable:!0,atom:!0,HTMLAttributes:{class:"drawer"},button:({t:o,extension:r})=>{var s;return{componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,icon:"PencilRuler",tooltip:o("editor.drawer.tooltip"),upload:(s=r==null?void 0:r.options)==null?void 0:s.upload}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:o=>{const r=o.querySelector("img"),s=r==null?void 0:r.getAttribute("width");return s?Number.parseInt(s,10):320},renderHTML:o=>({width:o.width})},height:{default:null,parseHTML:o=>{const r=o.querySelector("img"),s=r==null?void 0:r.getAttribute("height");return s?Number.parseInt(s,10):212},renderHTML:o=>({height:o.height})},align:{default:"center",parseHTML:o=>o.getAttribute("align"),renderHTML:o=>({align:o.align})}}},addNodeView(){return I.ReactNodeViewRenderer(oe)},addCommands(){return{setDrawer:(t,o)=>({commands:r,editor:s})=>o?r.insertContent({type:this.name,attrs:t}):r.insertContentAt(s.state.selection.anchor,{type:this.name,attrs:t}),setAlignImageDrawer:t=>({commands:o})=>o.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:t}){const{align:o}=t;return["div",{style:o?`text-align: ${o};`:"",class:"imageDrawer"},["img",I.mergeAttributes(this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageDrawer]",getAttrs:t=>{const o=t.querySelector("img"),r=o==null?void 0:o.getAttribute("width"),s=o==null?void 0:o.getAttribute("height");return{src:o==null?void 0:o.getAttribute("src"),alt:o==null?void 0:o.getAttribute("alt"),width:r?Number.parseInt(r,10):null,height:s?Number.parseInt(s,10):null,align:(o==null?void 0:o.getAttribute("align"))||t.style.textAlign||null}}}]}});exports.ControlDrawer=K;exports.Drawer=Q;exports.RichTextDrawer=Pe;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var B=Object.create;var H=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var F=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of V(t))!X.call(e,a)&&a!==r&&H(e,a,{get:()=>t[a],enumerable:!(n=$(t,a))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?B(U(e)):{},F(t||!e||!e.__esModule?H(r,"default",{value:e,enumerable:!0}):r,e));const E=require("./index-DLqogznp.cjs"),s=require("react/jsx-runtime"),i=require("react"),C=require("./toggle-DVCNvcqp.cjs"),A=require("./dialog-DaHBd2zw.cjs"),T=require("./useButtonProps-bei1vI37.cjs"),G=require("re-resizable"),Y=require("./index-CNzHZDls.cjs"),I=require("./dom-dataset-BqoJhJXt.cjs"),J=require("./button-xNppt_aK.cjs");function K(e){return e=e||new Map,{all:e,on(t,r){const n=e.get(t);n?n.push(r):e.set(t,[r])},off(t,r){const n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit(t,r){let n=e.get(t);n&&[...n].map(a=>{a(r)}),n=e.get("*"),n&&[...n].map(a=>{a(t,r)})}}}let O;function W(){try{return O||(O=K()),O}catch{throw new Error("Error EventEmitter")}}const R="OPEN_EXCALIDRAW_SETTING_MODAL";function Q(e,t){W().on(e,t)}function ee(e,t){W().off(e,t)}function te(e){W().emit(R,e)}function re(){const e=T.useEditorInstance(),t=T.useButtonProps(L.name),r=T.useExtension(L.name),{tooltipOptions:n={},isActive:a=void 0}=(t==null?void 0:t.componentProps)??{},{editorDisabled:f}=T.useToggleActive(a),u=i.useMemo(()=>(r==null?void 0:r.options)||{},[r]),[c,_]=i.useState(null),[x,M]=i.useState({}),[b,y]=i.useState({elements:[],appState:{isLoading:!1},files:null}),[d,h]=i.useState(!1),[v,j]=i.useState(!0),[m,N]=i.useState(null),o=i.useCallback(p=>{p&&import("@excalidraw/excalidraw").then(g=>{_(g.Excalidraw)}).catch(N).finally(()=>j(!1))},[j]),l=i.useCallback(p=>{setTimeout(()=>{p.refresh()})},[]),w=i.useCallback((p,g,z)=>{M({elements:p,appState:{isLoading:!1},files:z})},[]),D=i.useCallback(()=>{if(!c){h(!1);return}e.chain().focus().setExcalidraw({data:x}).run(),h(!1)},[c,e,x,h]);return i.useEffect(()=>{const p=g=>{(g==null?void 0:g.editor)===e&&(h(!0),g&&y(g.data))};return Q(R,p),()=>{ee(R,p)}},[e,h]),i.useEffect(()=>{!v&&c&&d&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},400)},[v,c,d]),s.jsxs(A.Dialog,{onOpenChange:h,open:d,children:[s.jsx(A.DialogTrigger,{asChild:!0,children:s.jsx(C.ActionButton,{disabled:f,icon:"Excalidraw",tooltip:"Excalidraw",tooltipOptions:n,action:()=>{f||h(!0)}})}),s.jsxs(A.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[s.jsx(A.DialogTitle,{children:"Excalidraw"}),s.jsxs("div",{style:{height:"100%",borderWidth:1},children:[v&&s.jsx("p",{children:"Loading..."}),m&&s.jsx("p",{children:m&&m.message||"Error"}),s.jsx("div",{ref:o,style:{width:"100%",height:600},children:!v&&!m&&c?s.jsx(c,{initialData:b,langCode:"en",onChange:w,ref:l,...u.excalidrawProps}):null})]}),s.jsx(A.DialogFooter,{children:s.jsx(J.Button,{disabled:!c,onClick:D,type:"button",children:"Save changes"})})]})]})}const ne="_wrap_dra8y_1",se="_renderWrap_dra8y_7",ie="_handlerWrap_dra8y_30",ae="_disabled_dra8y_40",S={wrap:ne,renderWrap:se,handlerWrap:ie,disabled:ae},oe=10,ce=200,k=15,P={width:"100%",height:"100%",maxWidth:"100%"};function de({editor:e,node:t,updateAttributes:r}){const n=i.useRef(null),a=Y.useEditableEditor(),f=e.isActive(L.name),{data:u,width:c,height:_}=t.attrs,[x,M]=i.useState(null),[b,y]=i.useState(!0),[d,h]=i.useState(null),[v,j]=i.useState(100),m=i.useCallback(o=>()=>{j(l=>T.clamp(o==="minus"?l-k:l+k,oe,ce))},[]);i.useEffect(()=>{let o=!1;return import("@excalidraw/excalidraw").then(l=>{o||(n.current=l.exportToSvg)}).catch(l=>!o&&h(l)).finally(()=>!o&&y(!1)),()=>{o=!0}},[u]),i.useEffect(()=>{let o=!1;return(async()=>{if(!n.current||o||b||d||!u)return;const w=await n.current(u);o||(w.setAttribute("width","100%"),w.setAttribute("height","100%"),w.setAttribute("display","block"),M(w))})(),()=>{o=!0}},[u,b,d]);const N=o=>{r({width:o.width,height:o.height})};return s.jsx(E.NodeViewWrapper,{className:E.clsx(S.wrap,{[S.active]:f,[S.disabled]:!a}),children:s.jsx(G.Resizable,{size:{width:Number.parseInt(c),height:Number.parseInt(_)},onResizeStop:(o,l,w,D)=>{N({width:Number.parseInt(c)+D.width,height:Number.parseInt(_)+D.height})},children:s.jsxs("div",{className:E.clsx(S.renderWrap,"render-wrapper"),style:{...P,overflow:"hidden"},children:[d&&s.jsx("div",{style:P,children:s.jsx("p",{children:d.message||d})}),b&&s.jsx("p",{children:"Loading..."}),!b&&!d&&x&&s.jsx("div",{dangerouslySetInnerHTML:{__html:(x==null?void 0:x.outerHTML)??""},style:{height:"100%",maxHeight:"100%",padding:24,overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",transform:`scale(${v/100})`,transition:"all ease-in-out .3s"}}),s.jsxs("div",{className:S.handlerWrap,children:[s.jsx(C.ActionButton,{action:m("minus"),disabled:!a,icon:"ZoomOut",tooltip:"Zoom Out"}),s.jsx(C.ActionButton,{action:m("plus"),disabled:!a,icon:"ZoomIn",tooltip:"Zoom In"})]})]})})})}const Z={elements:[]},L=E.Node3.create({name:"excalidraw",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addAttributes(){return{defaultShowPicker:{default:!1},createUser:{default:null},width:{default:"100%",parseHTML:I.getDatasetAttribute("width")},height:{default:240,parseHTML:I.getDatasetAttribute("height")},data:{default:Z,parseHTML:I.getDatasetAttribute("data",!0)}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"excalidraw"},excalidrawProps:{},button:()=>({componentProps:{}})}},parseHTML(){return[{tag:"div[class=excalidraw]"}]},renderHTML({HTMLAttributes:e,node:t}){return["div",E.mergeAttributes(this.options.HTMLAttributes,e,I.nodeAttrsToDataset(t))]},addCommands(){return{setExcalidraw:e=>({tr:t,commands:r,chain:n})=>{var a,f,u;return e=e||{},e.data=e.data||Z,((u=(f=(a=t.selection)==null?void 0:a.node)==null?void 0:f.type)==null?void 0:u.name)==this.name?r.updateAttributes(this.name,e):n().insertContent({type:this.name,attrs:e}).run()}}},addNodeView(){return E.ReactNodeViewRenderer(de)},addInputRules(){return[E.nodeInputRule({find:/^\$excalidraw\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]}});exports.Excalidraw=L;exports.RichTextExcalidraw=re;exports.triggerOpenExcalidrawSettingModal=te;
|
package/lib/Icon-BjR_or8V.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime");require("react");require("./index-CNzHZDls.cjs");const t=require("./index-DmOTQudI.cjs");function i(n){const e=t.icons[n.name];return e?c.jsx(e,{onClick:n==null?void 0:n.onClick,className:`richtext-w-4 richtext-h-4 ${(n==null?void 0:n.className)||""}`}):null}exports.IconComponent=i;
|
package/lib/Iframe-CM6mRQmv.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("./index-DLqogznp.cjs"),s=require("react/jsx-runtime"),b=require("react"),y=require("re-resizable"),h=require("./dom-dataset-BqoJhJXt.cjs"),S=require("./toggle-DVCNvcqp.cjs"),I=require("./index-CNzHZDls.cjs"),g=require("./useButtonProps-bei1vI37.cjs"),P=require("./input-tU3H__39.cjs"),R=require("./button-xNppt_aK.cjs"),m={youtube:{example:"https://www.youtube.com/watch?v=I4sMhHbHYXM",src:"https://www.youtube.com/embed/I4sMhHbHYXM",srcPrefix:"https://www.youtube.com/embed",linkRule:[/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\s/]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[&?]v=)|youtu\.be\/)([\w-]{11})/]},youku:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html?spm=a2h0c.8166622.PhoneSokuUgc_4.dtitle",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"https://player.youku.com/embed",linkRule:[String.raw`v.youku.com\/v_show\/id_\w+\=*`],idRule:String.raw`id_\w+\=*`},bilibili:{example:"https://www.bilibili.com/video/BV1EJ411u7DN",src:"https://player.bilibili.com/player.html?bvid=BV1EJ411u7DN",srcPrefix:"https://player.bilibili.com/player.html?bvid",linkRule:[String.raw`www.bilibili.com\/video\/\w+`]},qqvideo:{example:"https://v.qq.com/x/cover/mzc0020006aw1mn/u0033nvzb5v.html",src:"https://v.qq.com/txp/iframe/player.html?vid=u0033nvzb5v",srcPrefix:"https://v.qq.com/txp/iframe/player.html?vid",linkRule:[String.raw`v.qq.com\/x\/cover\/\w+\/\w+`]},amap:{example:"https://ditu.amap.com/",src:"https://www.amap.com/place/B000A45467",srcPrefix:"",linkRule:[String.raw`\.amap\.com`]},baidu_map:{example:"https://j.map.baidu.com/15/fo",src:"https://j.map.baidu.com/15/fo",srcPrefix:"",linkRule:[String.raw`map\.baidu\.com`]},modao:{example:"https://free.modao.cc/app/2cd26580a6717a147454df7470e7ec464093cba3/embed/v2#screen=sk71k6d1dfxulzx",src:"https://free.modao.cc/app/6UkpAxcGE3nPz52GLqhnOZgC7MATBSy/embed/v2",srcPrefix:"",linkRule:[String.raw`https:\/\/\w+.modao.cc\/app\/\w+\/embed\/v2`],tips:"Modao > More > Share > Embed > COPY"},lanhu:{example:"https://lanhuapp.com/link/#/invite?sid=evP7L",src:"https://lanhuapp.com/url/evP7L",srcPrefix:"",linkRule:[String.raw`https:\/\/lanhuapp.com\/url\/\w+`],tips:"Lanhu > Project > Share > Copy Link"},figma:{example:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",src:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",srcPrefix:"https://www.figma.com/embed?embed_host=share&url",linkRule:[String.raw`https:\/\/www.figma.com\/file\/\w+`]},canva:{example:"https://www.canva.cn/design/DAD61-t29UI/view",src:"https://www.canva.cn/design/DAD61-t29UI/view",srcPrefix:"",linkRule:[String.raw`https:\/\/www.canva.cn\/design\/.+\/view`]},processon:{example:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",src:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",srcPrefix:"",linkRule:[String.raw`https:\/\/www.processon.com\/embed\/\w+`]},codepen:{example:"https://codepen.io/mekery/embed/YzyrKOJ",src:"https://codepen.io/mekery/embed/YzyrKOJ",srcPrefix:"",linkRule:[String.raw`https:\/\/codepen.io\/.+\/embed\/\w+`]},jinshuju:{example:"https://jinshuju.net/f/q9YvVf",src:"https://jinshuju.net/f/q9YvVf",srcPrefix:"",linkRule:[String.raw`https:\/\/jinshuju.net\/f\/\w+`]},iframe:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"",linkRule:[".+"]},googlemaps:{example:"https://goo.gl/maps/8Ys8b4K1ZJY2",src:"https://www.google.com/maps/embed?pb=https://goo.gl/maps/8Ys8b4K1ZJY2",srcPrefix:"",linkRule:[String.raw`https:\/\/goo.gl\/maps\/\w+`]}};function j(e){const t=m.youtube,i=e.matchedUrl;e.validLink=!0;const r=i.split("="),n=r.length;if(n>0){const c=r[n-1];e.src=`${t.srcPrefix}/${c}`,e.validId=!0}return e}function M(e){const t=m.youku,i=e.matchedUrl,r=t.idRule,n=new RegExp(r),c=i.match(n);if(c&&c.length>0){const o=c[0].slice(3);e.validId=!0,e.src=`${t.srcPrefix}/${o}`}else e.validId=!1;return e}function q(e){const t=m.bilibili,r=e.matchedUrl.split("/"),n=r.length;if(n>0){const c=r[n-1];e.src=`${t.srcPrefix}=${c}`,e.validId=!0}return e}function N(e){const t=m.qqvideo,r=e.matchedUrl.split("/"),n=r.length;if(n>0){const c=r[n-1];e.src=`${t.srcPrefix}=${c}`,e.validId=!0}return e}function U(e,t){return t.src=e,t.validId=!0,t}function A(e,t){return t.src=e,t.validId=!0,t}function D(e,t){return t.src=e,t.validId=!0,t.originalLink=e,t}function L(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function $(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function _(e){const t=m.figma;return e.src=`${t.srcPrefix}=${encodeURIComponent(e.matchedUrl)}`,e.validId=!0,e.originalLink=e.matchedUrl,e}function T(e,t){return t.src=`${t.matchedUrl}?embed`,t.validId=!0,t.originalLink=e,t}function z(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function Y(e){return e.src=`${e.matchedUrl}`,e.validId=!0,e.originalLink=e.src,e}function C(e,t){return t.src=`${t.matchedUrl}?background=white&banner=show&embedded=true`,t.validId=!0,t.originalLink=e,t}function E(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function H(e,t,i){if(e==="googlemaps")return i.validLink=!0,i.matchedUrl=t,i;const n=m[e].linkRule;for(const c of n){const o=new RegExp(c),a=t.match(o);if(a&&a.length>0)return i.validLink=!0,i.matchedUrl=e==="youtube"?a[1]:a[0],i}return i}function B(e){var i,r;let t="iframe";return((i=e.includes)!=null&&i.call(e,"youtube")||(r=e.includes)!=null&&r.call(e,"youtu.be"))&&(t="youtube"),e.includes("youku")&&(t="youku"),e.includes("bilibili")&&(t="bilibili"),e.includes("qq")&&(t="qqvideo"),e.includes("amap")&&(t="amap"),e.includes("map.baidu")&&(t="baidu_map"),(e.includes("google.com/maps")||e.includes("maps.app.goo.gl"))&&(t="googlemaps"),e.includes("modao")&&(t="modao"),e.includes("lanhuapp")&&(t="lanhu"),e.includes("figma")&&(t="figma"),e.includes("canva")&&(t="canva"),e.includes("processon")&&(t="processon"),e.includes("codepen")&&(t="codepen"),e.includes("jinshuju")&&(t="jinshuju"),e.includes("iframe")&&(t="iframe"),t}function x(e){let t={validLink:!1,validId:!1,matchedUrl:"",originalLink:e,src:""};const i=B(e);if(t=H(i,e,t),!t.validLink)return t;switch(i){case"youtube":return j(t);case"youku":return M(t);case"bilibili":return q(t);case"qqvideo":return N(t);case"amap":return U(e,t);case"baidu_map":return A(e,t);case"googlemaps":return D(e,t);case"modao":return L(t);case"lanhu":return $(t);case"figma":return _(t);case"canva":return T(e,t);case"processon":return z(e,t);case"codepen":return Y(t);case"jinshuju":return C(e,t);case"iframe":return E(e,t);default:return e}}const V="_wrap_5y04w_1",K="_innerWrap_5y04w_15",v={wrap:V,innerWrap:K};function O({editor:e,node:t,updateAttributes:i}){const r=I.useEditableEditor(),{src:n,width:c,height:o}=t.attrs,[a,p]=b.useState("");function l(){if(!a)return;const d=x(a);e.chain().updateAttributes(f.name,{src:(d==null?void 0:d.src)||a}).setNodeSelection(e.state.selection.from).focus().run()}const k=b.useCallback(d=>{i({width:d.width,height:d.height})},[i]);return s.jsxs(u.NodeViewWrapper,{children:[!n&&s.jsxs("div",{className:"richtext-mx-auto richtext-my-[12px] richtext-flex richtext-max-w-[600px] richtext-items-center richtext-justify-center richtext-gap-[10px] richtext-rounded-[12px] richtext-border richtext-border-solid richtext-border-border richtext-p-[10px]",children:[s.jsx(P.Input,{autoFocus:!0,className:"richtext-flex-1",onInput:d=>p(d.target.value),placeholder:"Enter link",type:"url",value:a}),s.jsx(R.Button,{className:"richtext-w-[60px]",onClick:l,children:"OK"})]}),n&&s.jsx(y.Resizable,{size:{width:Number.parseInt(c),height:Number.parseInt(o)},onResizeStop:(d,J,W,w)=>{k({width:Number.parseInt(c)+w.width,height:Number.parseInt(o)+w.height})},children:s.jsx("div",{className:u.clsx(v.wrap,"render-wrapper"),children:s.jsx("div",{className:v.innerWrap,style:{pointerEvents:r?"none":"auto"},children:s.jsx("iframe",{className:"richtext-my-[12px] ",src:n})})})})]})}function X(){const e=g.useButtonProps(f.name),{icon:t=void 0,tooltip:i=void 0,shortcutKeys:r=void 0,tooltipOptions:n={},action:c=void 0,isActive:o=void 0}=(e==null?void 0:e.componentProps)??{},{editorDisabled:a,update:p}=g.useToggleActive(o),l=()=>{a||c&&(c(),p())};return e?s.jsx(S.ActionButton,{action:l,disabled:a,icon:t,shortcutKeys:r,tooltip:i,tooltipOptions:n}):s.jsx(s.Fragment,{})}const f=u.Node3.create({name:"iframe",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"iframe"},button:({editor:t,extension:i,t:r})=>({componentProps:{action:n=>t.commands.setIframe(n),upload:i.options.upload,icon:"Iframe",tooltip:r("editor.iframe.tooltip")}})}},addAttributes(){return{width:{default:600,parseHTML:h.getDatasetAttribute("width")},height:{default:300,parseHTML:h.getDatasetAttribute("height")},src:{default:null,parseHTML:h.getDatasetAttribute("src")},defaultShowPicker:{default:!1},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes:e}){return["iframe",u.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setIframe:e=>({tr:t,commands:i,chain:r})=>{var c,o,a;if(((a=(o=(c=t.selection)==null?void 0:c.node)==null?void 0:o.type)==null?void 0:a.name)==this.name)return i.updateAttributes(this.name,e);const n=e||{url:""};return r().insertContent({type:this.name,attrs:n}).run()}}},addInputRules(){return[u.nodeInputRule({find:/^\$iframe\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]},addNodeView(){return u.ReactNodeViewRenderer(O)}});exports.Iframe=f;exports.RichTextIframe=X;exports.getServiceSrc=x;
|
package/lib/Indent-BmhiEb0S.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("./index-DLqogznp.cjs"),m=require("@tiptap/pm/state"),c=require("react/jsx-runtime"),l=require("./toggle-DVCNvcqp.cjs");require("react");require("./index-CNzHZDls.cjs");const p=require("./useButtonProps-bei1vI37.cjs");var a=(t=>(t[t.max=7]="max",t[t.min=0]="min",t[t.more=1]="more",t[t.less=-1]="less",t))(a||{});function T(t,e,n){return t<e?e:t>n?n:t}function g(t,e,n,o){const{doc:s,selection:r}=t;if(!s||!r||!(r instanceof m.TextSelection||r instanceof m.AllSelection))return t;const{from:i,to:u}=r;return s.nodesBetween(i,u,(d,I)=>{const b=d.type;return n.includes(b.name)?(t=y(t,I,e),!1):!h.isList(d.type.name,o.extensionManager.extensions)}),t}function y(t,e,n){if(!t.doc)return t;const o=t.doc.nodeAt(e);if(!o)return t;const i=T((o.attrs.indent||0)+n,0,7);if(i===o.attrs.indent)return t;const u={...o.attrs,indent:i};return t.setNodeMarkup(e,o.type,u,o.marks)}function f({delta:t,types:e}){return({state:n,dispatch:o,editor:s})=>{const{selection:r}=n;let{tr:i}=n;return i=i.setSelection(r),i=g(i,t,e,s),i.docChanged?(o&&o(i),!0):!1}}function A(){const t=p.useButtonProps(x.name),{indent:e,outdent:n}=(t==null?void 0:t.componentProps)??{},{editorDisabled:o}=p.useToggleActive(),s=()=>{o||e!=null&&e.action&&(e==null||e.action())},r=()=>{o||n!=null&&n.action&&(n==null||n.action())};return t?c.jsxs(c.Fragment,{children:[c.jsx(l.ActionButton,{action:s,disabled:o,icon:e==null?void 0:e.icon,shortcutKeys:e==null?void 0:e.shortcutKeys,tooltip:e==null?void 0:e.tooltip}),c.jsx(l.ActionButton,{action:r,disabled:o,icon:n==null?void 0:n.icon,shortcutKeys:n==null?void 0:n.shortcutKeys,tooltip:n==null?void 0:n.tooltip})]}):c.jsx(c.Fragment,{})}const x=h.Extension.create({name:"richtextIndentOutdent",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","blockquote"],minIndent:a.min,maxIndent:a.max,button({editor:e,t:n,extension:o}){var s,r;return{componentProps:{indent:{action:()=>{e.commands.indent()},shortcutKeys:((s=o.options.shortcutKeys)==null?void 0:s[0])??["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")},outdent:{action:()=>{e.commands.outdent()},shortcutKeys:((r=o.options.shortcutKeys)==null?void 0:r[1])??["Shift","Tab"],icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:t=>{const e=t.dataset.indent;return(e?Number.parseInt(e,10):0)||0},renderHTML:t=>t.indent?{"data-indent":t.indent}:{}}}}]},addCommands(){return{indent:()=>f({delta:a.more,types:this.options.types}),outdent:()=>f({delta:a.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});exports.Indent=x;exports.IndentProps=a;exports.RichTextIndent=A;exports.setNodeIndentMarkup=y;
|
package/lib/Katex-CUd3LxLh.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const Fr=require("./index-DLqogznp.cjs"),er=require("react/jsx-runtime"),ur=require("react"),Ja=require("katex"),qo=require("./toggle-DVCNvcqp.cjs");require("./index-CNzHZDls.cjs");const Dr=require("./dialog-DaHBd2zw.cjs"),wo=require("./textarea-CmZVZKOo.cjs"),oe=require("./useButtonProps-bei1vI37.cjs"),Br=require("./_commonjsHelpers-BTDuMlIz.cjs"),Po=require("./index-FSRjMsxW.cjs"),Io=require("./button-xNppt_aK.cjs");var ie,sn;function Ya(){if(sn)return ie;sn=1;var r=Object.prototype.toString;return ie=function(n){var o=r.call(n),t=o==="[object Arguments]";return t||(t=o!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&r.call(n.callee)==="[object Function]"),t},ie}var ue,ln;function $o(){if(ln)return ue;ln=1;var r;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Ya(),t=Object.prototype.propertyIsEnumerable,f=!t.call({toString:null},"toString"),i=t.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(y){var h=y.constructor;return h&&h.prototype===y},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},v=(function(){if(typeof window>"u")return!1;for(var y in window)try{if(!c["$"+y]&&e.call(window,y)&&window[y]!==null&&typeof window[y]=="object")try{u(window[y])}catch{return!0}}catch{return!0}return!1})(),p=function(y){if(typeof window>"u"||!v)return u(y);try{return u(y)}catch{return!1}};r=function(h){var m=h!==null&&typeof h=="object",B=n.call(h)==="[object Function]",q=o(h),w=m&&n.call(h)==="[object String]",O=[];if(!m&&!B&&!q)throw new TypeError("Object.keys called on a non-object");var b=i&&B;if(w&&h.length>0&&!e.call(h,0))for(var T=0;T<h.length;++T)O.push(String(T));if(q&&h.length>0)for(var X=0;X<h.length;++X)O.push(String(X));else for(var G in h)!(b&&G==="prototype")&&e.call(h,G)&&O.push(String(G));if(f)for(var F=p(h),C=0;C<a.length;++C)!(F&&a[C]==="constructor")&&e.call(h,a[C])&&O.push(a[C]);return O}}return ue=r,ue}var fe,cn;function Lt(){if(cn)return fe;cn=1;var r=Array.prototype.slice,e=Ya(),n=Object.keys,o=n?function(i){return n(i)}:$o(),t=Object.keys;return o.shim=function(){if(Object.keys){var i=(function(){var a=Object.keys(arguments);return a&&a.length===arguments.length})(1,2);i||(Object.keys=function(u){return e(u)?t(r.call(u)):t(u)})}else Object.keys=o;return Object.keys||o},fe=o,fe}var se,pn;function Vr(){if(pn)return se;pn=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return se=r,se}var le,yn;function Ht(){return yn||(yn=1,le=SyntaxError),le}var ce,vn;function nr(){return vn||(vn=1,ce=TypeError),ce}var pe,gn;function Ro(){return gn||(gn=1,pe=Object.getOwnPropertyDescriptor),pe}var ye,hn;function qr(){if(hn)return ye;hn=1;var r=Ro();if(r)try{r([],"length")}catch{r=null}return ye=r,ye}var ve,dn;function Gt(){if(dn)return ve;dn=1;var r=Vr(),e=Ht(),n=nr(),o=qr();return ve=function(f,i,a){if(!f||typeof f!="object"&&typeof f!="function")throw new n("`obj` must be an object or a function`");if(typeof i!="string"&&typeof i!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,y=!!o&&o(f,i);if(r)r(f,i,{configurable:v===null&&y?y.configurable:!v,enumerable:u===null&&y?y.enumerable:!u,value:a,writable:c===null&&y?y.writable:!c});else if(p||!u&&!c&&!v)f[i]=a;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ve}var ge,mn;function Ut(){if(mn)return ge;mn=1;var r=Vr(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},ge=e,ge}var he,Sn;function wr(){if(Sn)return he;Sn=1;var r=Lt(),e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,t=Gt(),f=function(c){return typeof c=="function"&&n.call(c)==="[object Function]"},i=Ut()(),a=function(c,v,p,y){if(v in c){if(y===!0){if(c[v]===p)return}else if(!f(y)||!y())return}i?t(c,v,p,!0):t(c,v,p)},u=function(c,v){var p=arguments.length>2?arguments[2]:{},y=r(v);e&&(y=o.call(y,Object.getOwnPropertySymbols(v)));for(var h=0;h<y.length;h+=1)a(c,y[h],v[y[h]],p[y[h]])};return u.supportsDescriptors=!!i,he=u,he}var de={exports:{}},me,bn;function zt(){return bn||(bn=1,me=Object),me}var Se,An;function Xa(){return An||(An=1,Se=Error),Se}var be,On;function xo(){return On||(On=1,be=EvalError),be}var Ae,qn;function Eo(){return qn||(qn=1,Ae=RangeError),Ae}var Oe,wn;function Bo(){return wn||(wn=1,Oe=ReferenceError),Oe}var qe,Pn;function jo(){return Pn||(Pn=1,qe=URIError),qe}var we,In;function To(){return In||(In=1,we=Math.abs),we}var Pe,$n;function Mo(){return $n||($n=1,Pe=Math.floor),Pe}var Ie,Rn;function Do(){return Rn||(Rn=1,Ie=Math.max),Ie}var $e,xn;function Co(){return xn||(xn=1,$e=Math.min),$e}var Re,En;function Fo(){return En||(En=1,Re=Math.pow),Re}var xe,Bn;function _o(){return Bn||(Bn=1,xe=Math.round),xe}var Ee,jn;function No(){return jn||(jn=1,Ee=Number.isNaN||function(e){return e!==e}),Ee}var Be,Tn;function Wo(){if(Tn)return Be;Tn=1;var r=No();return Be=function(n){return r(n)||n===0?n:n<0?-1:1},Be}var je,Mn;function Kr(){return Mn||(Mn=1,je=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var t=42;e[n]=t;for(var f in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==t||a.enumerable!==!0)return!1}return!0}),je}var Te,Dn;function Vt(){if(Dn)return Te;Dn=1;var r=typeof Symbol<"u"&&Symbol,e=Kr();return Te=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Te}var Me,Cn;function Qa(){return Cn||(Cn=1,Me=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Me}var De,Fn;function Za(){if(Fn)return De;Fn=1;var r=zt();return De=r.getPrototypeOf||null,De}var Ce,_n;function ko(){if(_n)return Ce;_n=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,o="[object Function]",t=function(u,c){for(var v=[],p=0;p<u.length;p+=1)v[p]=u[p];for(var y=0;y<c.length;y+=1)v[y+u.length]=c[y];return v},f=function(u,c){for(var v=[],p=c,y=0;p<u.length;p+=1,y+=1)v[y]=u[p];return v},i=function(a,u){for(var c="",v=0;v<a.length;v+=1)c+=a[v],v+1<a.length&&(c+=u);return c};return Ce=function(u){var c=this;if(typeof c!="function"||e.apply(c)!==o)throw new TypeError(r+c);for(var v=f(arguments,1),p,y=function(){if(this instanceof p){var w=c.apply(this,t(v,arguments));return Object(w)===w?w:this}return c.apply(u,t(v,arguments))},h=n(0,c.length-v.length),m=[],B=0;B<h;B++)m[B]="$"+B;if(p=Function("binder","return function ("+i(m,",")+"){ return binder.apply(this,arguments); }")(y),c.prototype){var q=function(){};q.prototype=c.prototype,p.prototype=new q,q.prototype=null}return p},Ce}var Fe,Nn;function _r(){if(Nn)return Fe;Nn=1;var r=ko();return Fe=Function.prototype.bind||r,Fe}var _e,Wn;function Kt(){return Wn||(Wn=1,_e=Function.prototype.call),_e}var Ne,kn;function Jt(){return kn||(kn=1,Ne=Function.prototype.apply),Ne}var We,Ln;function Lo(){return Ln||(Ln=1,We=typeof Reflect<"u"&&Reflect&&Reflect.apply),We}var ke,Hn;function ro(){if(Hn)return ke;Hn=1;var r=_r(),e=Jt(),n=Kt(),o=Lo();return ke=o||r.call(n,e),ke}var Le,Gn;function Yt(){if(Gn)return Le;Gn=1;var r=_r(),e=nr(),n=Kt(),o=ro();return Le=function(f){if(f.length<1||typeof f[0]!="function")throw new e("a function is required");return o(r,n,f)},Le}var He,Un;function Ho(){if(Un)return He;Un=1;var r=Yt(),e=qr(),n;try{n=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var o=!!n&&e&&e(Object.prototype,"__proto__"),t=Object,f=t.getPrototypeOf;return He=o&&typeof o.get=="function"?r([o.get]):typeof f=="function"?function(a){return f(a==null?a:t(a))}:!1,He}var Ge,zn;function Xt(){if(zn)return Ge;zn=1;var r=Qa(),e=Za(),n=Ho();return Ge=r?function(t){return r(t)}:e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return e(t)}:n?function(t){return n(t)}:null,Ge}var Ue,Vn;function Qt(){if(Vn)return Ue;Vn=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=_r();return Ue=n.call(r,e),Ue}var ze,Kn;function yr(){if(Kn)return ze;Kn=1;var r,e=zt(),n=Xa(),o=xo(),t=Eo(),f=Bo(),i=Ht(),a=nr(),u=jo(),c=To(),v=Mo(),p=Do(),y=Co(),h=Fo(),m=_o(),B=Wo(),q=Function,w=function(M){try{return q('"use strict"; return ('+M+").constructor;")()}catch{}},O=qr(),b=Vr(),T=function(){throw new a},X=O?(function(){try{return arguments.callee,T}catch{try{return O(arguments,"callee").get}catch{return T}}})():T,G=Vt()(),F=Xt(),C=Za(),P=Qa(),_=Jt(),L=Kt(),N={},H=typeof Uint8Array>"u"||!F?r:F(Uint8Array),V={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":G&&F?F([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":q,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":G&&F?F(F([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!G||!F?r:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":O,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":t,"%ReferenceError%":f,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!G||!F?r:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":G&&F?F(""[Symbol.iterator]()):r,"%Symbol%":G?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":X,"%TypedArray%":H,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":_,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":v,"%Math.max%":p,"%Math.min%":y,"%Math.pow%":h,"%Math.round%":m,"%Math.sign%":B,"%Reflect.getPrototypeOf%":P};if(F)try{null.error}catch(M){var fr=F(F(M));V["%Error.prototype%"]=fr}var Ir=function M(A){var I;if(A==="%AsyncFunction%")I=w("async function () {}");else if(A==="%GeneratorFunction%")I=w("function* () {}");else if(A==="%AsyncGeneratorFunction%")I=w("async function* () {}");else if(A==="%AsyncGenerator%"){var S=M("%AsyncGeneratorFunction%");S&&(I=S.prototype)}else if(A==="%AsyncIteratorPrototype%"){var x=M("%AsyncGenerator%");x&&F&&(I=F(x.prototype))}return V[A]=I,I},Sr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ar=_r(),U=Qt(),br=ar.call(L,Array.prototype.concat),$r=ar.call(_,Array.prototype.splice),Ar=ar.call(L,String.prototype.replace),vr=ar.call(L,String.prototype.slice),g=ar.call(L,RegExp.prototype.exec),d=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,$=function(A){var I=vr(A,0,1),S=vr(A,-1);if(I==="%"&&S!=="%")throw new i("invalid intrinsic syntax, expected closing `%`");if(S==="%"&&I!=="%")throw new i("invalid intrinsic syntax, expected opening `%`");var x=[];return Ar(A,d,function(z,K,J,Y){x[x.length]=J?Ar(Y,R,"$1"):K||z}),x},j=function(A,I){var S=A,x;if(U(Sr,S)&&(x=Sr[S],S="%"+x[0]+"%"),U(V,S)){var z=V[S];if(z===N&&(z=Ir(S)),typeof z>"u"&&!I)throw new a("intrinsic "+A+" exists, but is not available. Please file an issue!");return{alias:x,name:S,value:z}}throw new i("intrinsic "+A+" does not exist!")};return ze=function(A,I){if(typeof A!="string"||A.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new a('"allowMissing" argument must be a boolean');if(g(/^%?[^%]*%?$/,A)===null)throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var S=$(A),x=S.length>0?S[0]:"",z=j("%"+x+"%",I),K=z.name,J=z.value,Y=!1,Z=z.alias;Z&&(x=Z[0],$r(S,br([0,1],Z)));for(var sr=1,or=!0;sr<S.length;sr+=1){var rr=S[sr],lr=vr(rr,0,1),cr=vr(rr,-1);if((lr==='"'||lr==="'"||lr==="`"||cr==='"'||cr==="'"||cr==="`")&&lr!==cr)throw new i("property names with quotes must have matching quotes");if((rr==="constructor"||!or)&&(Y=!0),x+="."+rr,K="%"+x+"%",U(V,K))J=V[K];else if(J!=null){if(!(rr in J)){if(!I)throw new a("base intrinsic for "+A+" exists, but the property is not available.");return}if(O&&sr+1>=S.length){var pr=O(J,rr);or=!!pr,or&&"get"in pr&&!("originalValue"in pr.get)?J=pr.get:J=J[rr]}else or=U(J,rr),J=J[rr];or&&!Y&&(V[K]=J)}}return J},ze}var Ve,Jn;function Go(){if(Jn)return Ve;Jn=1;var r=yr(),e=Gt(),n=Ut()(),o=qr(),t=nr(),f=r("%Math.floor%");return Ve=function(a,u){if(typeof a!="function")throw new t("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||f(u)!==u)throw new t("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],v=!0,p=!0;if("length"in a&&o){var y=o(a,"length");y&&!y.configurable&&(v=!1),y&&!y.writable&&(p=!1)}return(v||p||!c)&&(n?e(a,"length",u,!0,!0):e(a,"length",u)),a},Ve}var Ke,Yn;function Uo(){if(Yn)return Ke;Yn=1;var r=_r(),e=Jt(),n=ro();return Ke=function(){return n(r,e,arguments)},Ke}var Xn;function jr(){return Xn||(Xn=1,(function(r){var e=Go(),n=Vr(),o=Yt(),t=Uo();r.exports=function(i){var a=o(arguments),u=i.length-(arguments.length-1);return e(a,1+(u>0?u:0),!0)},n?n(r.exports,"apply",{value:t}):r.exports.apply=t})(de)),de.exports}var Je,Qn;function Q(){if(Qn)return Je;Qn=1;var r=yr(),e=Yt(),n=e([r("%String.prototype.indexOf%")]);return Je=function(t,f){var i=r(t,!!f);return typeof i=="function"&&n(t,".prototype.")>-1?e([i]):i},Je}var Ye,Zn;function eo(){if(Zn)return Ye;Zn=1;var r=Lt(),e=Kr()(),n=Q(),o=zt(),t=n("Array.prototype.push"),f=n("Object.prototype.propertyIsEnumerable"),i=e?o.getOwnPropertySymbols:null;return Ye=function(u,c){if(u==null)throw new TypeError("target must be an object");var v=o(u);if(arguments.length===1)return v;for(var p=1;p<arguments.length;++p){var y=o(arguments[p]),h=r(y),m=e&&(o.getOwnPropertySymbols||i);if(m)for(var B=m(y),q=0;q<B.length;++q){var w=B[q];f(y,w)&&t(h,w)}for(var O=0;O<h.length;++O){var b=h[O];if(f(y,b)){var T=y[b];v[b]=T}}}return v},Ye}var Xe,ra;function to(){if(ra)return Xe;ra=1;var r=eo(),e=function(){if(!Object.assign)return!1;for(var o="abcdefghijklmnopqrst",t=o.split(""),f={},i=0;i<t.length;++i)f[t[i]]=t[i];var a=Object.assign({},f),u="";for(var c in a)u+=c;return o!==u},n=function(){if(!Object.assign||!Object.preventExtensions)return!1;var o=Object.preventExtensions({1:2});try{Object.assign(o,"xy")}catch{return o[1]==="y"}return!1};return Xe=function(){return!Object.assign||e()||n()?r:Object.assign},Xe}var Qe,ea;function zo(){if(ea)return Qe;ea=1;var r=wr(),e=to();return Qe=function(){var o=e();return r(Object,{assign:o},{assign:function(){return Object.assign!==o}}),o},Qe}var Ze,ta;function Vo(){if(ta)return Ze;ta=1;var r=wr(),e=jr(),n=eo(),o=to(),t=zo(),f=e.apply(o()),i=function(u,c){return f(Object,arguments)};return r(i,{getPolyfill:o,implementation:n,shim:t}),Ze=i,Ze}var rt,na;function no(){if(na)return rt;na=1;var r=yr(),e=jr(),n=e(r("String.prototype.indexOf"));return rt=function(t,f){var i=r(t,!!f);return typeof i=="function"&&n(t,".prototype.")>-1?e(i):i},rt}var et,aa;function Ko(){if(aa)return et;aa=1;var r=function(){return typeof(function(){}).name=="string"},e=Object.getOwnPropertyDescriptor;if(e)try{e([],"length")}catch{e=null}r.functionsHaveConfigurableNames=function(){if(!r()||!e)return!1;var t=e(function(){},"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;return r.boundFunctionsHaveNames=function(){return r()&&typeof n=="function"&&(function(){}).bind().name!==""},et=r,et}var tt,oa;function Jo(){if(oa)return tt;oa=1;var r=Gt(),e=Ut()(),n=Ko().functionsHaveConfigurableNames(),o=nr();return tt=function(f,i){if(typeof f!="function")throw new o("`fn` is not a function");var a=arguments.length>2&&!!arguments[2];return(!a||n)&&(e?r(f,"name",i,!0,!0):r(f,"name",i)),f},tt}var nt,ia;function ao(){if(ia)return nt;ia=1;var r=Jo(),e=nr(),n=Object;return nt=r(function(){if(this==null||this!==n(this))throw new e("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),nt}var at,ua;function oo(){if(ua)return at;ua=1;var r=ao(),e=wr().supportsDescriptors,n=Object.getOwnPropertyDescriptor;return at=function(){if(e&&/a/mig.flags==="gim"){var t=n(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var f="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){f+="d"}}),Object.defineProperty(i,"sticky",{get:function(){f+="y"}}),t.get.call(i),f==="dy")return t.get}}return r},at}var ot,fa;function Yo(){if(fa)return ot;fa=1;var r=wr().supportsDescriptors,e=oo(),n=qr(),o=Object.defineProperty,t=Xa(),f=Xt(),i=/a/;return ot=function(){if(!r||!f)throw new t("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=e(),c=f(i),v=n(c,"flags");return(!v||v.get!==u)&&o(c,"flags",{configurable:!0,enumerable:!1,get:u}),u},ot}var it,sa;function Xo(){if(sa)return it;sa=1;var r=wr(),e=jr(),n=ao(),o=oo(),t=Yo(),f=e(o());return r(f,{getPolyfill:o,implementation:n,shim:t}),it=f,it}var Cr={exports:{}},ut,la;function Pr(){if(la)return ut;la=1;var r=Kr();return ut=function(){return r()&&!!Symbol.toStringTag},ut}var ft,ca;function io(){if(ca)return ft;ca=1;var r=Pr()(),e=Q(),n=e("Object.prototype.toString"),o=function(a){return r&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:n(a)==="[object Arguments]"},t=function(a){return o(a)?!0:a!==null&&typeof a=="object"&&"length"in a&&typeof a.length=="number"&&a.length>=0&&n(a)!=="[object Array]"&&"callee"in a&&n(a.callee)==="[object Function]"},f=(function(){return o(arguments)})();return o.isLegacyArguments=t,ft=f?o:t,ft}const Qo={},Zo=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),ri=Br.getAugmentedNamespace(Zo);var st,pa;function Jr(){if(pa)return st;pa=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=r&&e&&typeof e.get=="function"?e.get:null,o=r&&Map.prototype.forEach,t=typeof Set=="function"&&Set.prototype,f=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=t&&f&&typeof f.get=="function"?f.get:null,a=t&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,c=u?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,p=v?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,h=y?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,B=Object.prototype.toString,q=Function.prototype.toString,w=String.prototype.match,O=String.prototype.slice,b=String.prototype.replace,T=String.prototype.toUpperCase,X=String.prototype.toLowerCase,G=RegExp.prototype.test,F=Array.prototype.concat,C=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,V=typeof Symbol=="function"&&typeof Symbol.iterator=="object",fr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===V||!0)?Symbol.toStringTag:null,Ir=Object.prototype.propertyIsEnumerable,Sr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function ar(s,l){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||G.call(/e/,l))return l;var D=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var W=s<0?-_(-s):_(s);if(W!==s){var k=String(W),E=O.call(l,k.length+1);return b.call(k,D,"$&_")+"."+b.call(b.call(E,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(l,D,"$&_")}var U=ri,br=U.custom,$r=z(br)?br:null,Ar={__proto__:null,double:'"',single:"'"},vr={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};st=function s(l,D,W,k){var E=D||{};if(Y(E,"quoteStyle")&&!Y(Ar,E.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(E,"maxStringLength")&&(typeof E.maxStringLength=="number"?E.maxStringLength<0&&E.maxStringLength!==1/0:E.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var dr=Y(E,"customInspect")?E.customInspect:!0;if(typeof dr!="boolean"&&dr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(E,"indent")&&E.indent!==null&&E.indent!==" "&&!(parseInt(E.indent,10)===E.indent&&E.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(E,"numericSeparator")&&typeof E.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Or=E.numericSeparator;if(typeof l>"u")return"undefined";if(l===null)return"null";if(typeof l=="boolean")return l?"true":"false";if(typeof l=="string")return Rr(l,E);if(typeof l=="number"){if(l===0)return 1/0/l>0?"0":"-0";var tr=String(l);return Or?ar(l,tr):tr}if(typeof l=="bigint"){var mr=String(l)+"n";return Or?ar(l,mr):mr}var Qr=typeof E.depth>"u"?5:E.depth;if(typeof W>"u"&&(W=0),W>=Qr&&Qr>0&&typeof l=="object")return $(l)?"[Array]":"[Object]";var xr=bo(E,W);if(typeof k>"u")k=[];else if(or(k,l)>=0)return"[Circular]";function ir(Er,Lr,Oo){if(Lr&&(k=P.call(k),k.push(Lr)),Oo){var fn={depth:E.depth};return Y(E,"quoteStyle")&&(fn.quoteStyle=E.quoteStyle),s(Er,fn,W+1,k)}return s(Er,E,W+1,k)}if(typeof l=="function"&&!M(l)){var rn=sr(l),en=Wr(l,ir);return"[Function"+(rn?": "+rn:" (anonymous)")+"]"+(en.length>0?" { "+C.call(en,", ")+" }":"")}if(z(l)){var tn=V?b.call(String(l),/^(Symbol\(.*\))_[^)]*$/,"$1"):H.call(l);return typeof l=="object"&&!V?hr(tn):tn}if(gr(l)){for(var Mr="<"+X.call(String(l.nodeName)),Zr=l.attributes||[],kr=0;kr<Zr.length;kr++)Mr+=" "+Zr[kr].name+"="+g(d(Zr[kr].value),"double",E);return Mr+=">",l.childNodes&&l.childNodes.length&&(Mr+="..."),Mr+="</"+X.call(String(l.nodeName))+">",Mr}if($(l)){if(l.length===0)return"[]";var re=Wr(l,ir);return xr&&!So(re)?"["+Xr(re,xr)+"]":"[ "+C.call(re,", ")+" ]"}if(A(l)){var ee=Wr(l,ir);return!("cause"in Error.prototype)&&"cause"in l&&!Ir.call(l,"cause")?"{ ["+String(l)+"] "+C.call(F.call("[cause]: "+ir(l.cause),ee),", ")+" }":ee.length===0?"["+String(l)+"]":"{ ["+String(l)+"] "+C.call(ee,", ")+" }"}if(typeof l=="object"&&dr){if($r&&typeof l[$r]=="function"&&U)return U(l,{depth:Qr-W});if(dr!=="symbol"&&typeof l.inspect=="function")return l.inspect()}if(rr(l)){var nn=[];return o&&o.call(l,function(Er,Lr){nn.push(ir(Lr,l,!0)+" => "+ir(Er,l))}),Zt("Map",n.call(l),nn,xr)}if(pr(l)){var an=[];return a&&a.call(l,function(Er){an.push(ir(Er,l))}),Zt("Set",i.call(l),an,xr)}if(lr(l))return Yr("WeakMap");if(Nr(l))return Yr("WeakSet");if(cr(l))return Yr("WeakRef");if(S(l))return hr(ir(Number(l)));if(K(l))return hr(ir(L.call(l)));if(x(l))return hr(m.call(l));if(I(l))return hr(ir(String(l)));if(typeof window<"u"&&l===window)return"{ [object Window] }";if(typeof globalThis<"u"&&l===globalThis||typeof Br.commonjsGlobal<"u"&&l===Br.commonjsGlobal)return"{ [object globalThis] }";if(!j(l)&&!M(l)){var te=Wr(l,ir),on=Sr?Sr(l)===Object.prototype:l instanceof Object||l.constructor===Object,ne=l instanceof Object?"":"null prototype",un=!on&&fr&&Object(l)===l&&fr in l?O.call(Z(l),8,-1):ne?"Object":"",Ao=on||typeof l.constructor!="function"?"":l.constructor.name?l.constructor.name+" ":"",ae=Ao+(un||ne?"["+C.call(F.call([],un||[],ne||[]),": ")+"] ":"");return te.length===0?ae+"{}":xr?ae+"{"+Xr(te,xr)+"}":ae+"{ "+C.call(te,", ")+" }"}return String(l)};function g(s,l,D){var W=D.quoteStyle||l,k=Ar[W];return k+s+k}function d(s){return b.call(String(s),/"/g,""")}function R(s){return!fr||!(typeof s=="object"&&(fr in s||typeof s[fr]<"u"))}function $(s){return Z(s)==="[object Array]"&&R(s)}function j(s){return Z(s)==="[object Date]"&&R(s)}function M(s){return Z(s)==="[object RegExp]"&&R(s)}function A(s){return Z(s)==="[object Error]"&&R(s)}function I(s){return Z(s)==="[object String]"&&R(s)}function S(s){return Z(s)==="[object Number]"&&R(s)}function x(s){return Z(s)==="[object Boolean]"&&R(s)}function z(s){if(V)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!H)return!1;try{return H.call(s),!0}catch{}return!1}function K(s){if(!s||typeof s!="object"||!L)return!1;try{return L.call(s),!0}catch{}return!1}var J=Object.prototype.hasOwnProperty||function(s){return s in this};function Y(s,l){return J.call(s,l)}function Z(s){return B.call(s)}function sr(s){if(s.name)return s.name;var l=w.call(q.call(s),/^function\s*([\w$]+)/);return l?l[1]:null}function or(s,l){if(s.indexOf)return s.indexOf(l);for(var D=0,W=s.length;D<W;D++)if(s[D]===l)return D;return-1}function rr(s){if(!n||!s||typeof s!="object")return!1;try{n.call(s);try{i.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function lr(s){if(!c||!s||typeof s!="object")return!1;try{c.call(s,c);try{p.call(s,p)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function cr(s){if(!h||!s||typeof s!="object")return!1;try{return h.call(s),!0}catch{}return!1}function pr(s){if(!i||!s||typeof s!="object")return!1;try{i.call(s);try{n.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function Nr(s){if(!p||!s||typeof s!="object")return!1;try{p.call(s,p);try{c.call(s,c)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function gr(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function Rr(s,l){if(s.length>l.maxStringLength){var D=s.length-l.maxStringLength,W="... "+D+" more character"+(D>1?"s":"");return Rr(O.call(s,0,l.maxStringLength),l)+W}var k=vr[l.quoteStyle||"single"];k.lastIndex=0;var E=b.call(b.call(s,k,"\\$1"),/[\x00-\x1f]/g,Tr);return g(E,"single",l)}function Tr(s){var l=s.charCodeAt(0),D={8:"b",9:"t",10:"n",12:"f",13:"r"}[l];return D?"\\"+D:"\\x"+(l<16?"0":"")+T.call(l.toString(16))}function hr(s){return"Object("+s+")"}function Yr(s){return s+" { ? }"}function Zt(s,l,D,W){var k=W?Xr(D,W):C.call(D,", ");return s+" ("+l+") {"+k+"}"}function So(s){for(var l=0;l<s.length;l++)if(or(s[l],`
|
|
2
|
-
`)>=0)return!1;return!0}function bo(s,l){var D;if(s.indent===" ")D=" ";else if(typeof s.indent=="number"&&s.indent>0)D=C.call(Array(s.indent+1)," ");else return null;return{base:D,prev:C.call(Array(l+1),D)}}function Xr(s,l){if(s.length===0)return"";var D=`
|
|
3
|
-
`+l.prev+l.base;return D+C.call(s,","+D)+`
|
|
4
|
-
`+l.prev}function Wr(s,l){var D=$(s),W=[];if(D){W.length=s.length;for(var k=0;k<s.length;k++)W[k]=Y(s,k)?l(s[k],s):""}var E=typeof N=="function"?N(s):[],dr;if(V){dr={};for(var Or=0;Or<E.length;Or++)dr["$"+E[Or]]=E[Or]}for(var tr in s)Y(s,tr)&&(D&&String(Number(tr))===tr&&tr<s.length||V&&dr["$"+tr]instanceof Symbol||(G.call(/[^\w$]/,tr)?W.push(l(tr,s)+": "+l(s[tr],s)):W.push(tr+": "+l(s[tr],s))));if(typeof N=="function")for(var mr=0;mr<E.length;mr++)Ir.call(s,E[mr])&&W.push("["+l(E[mr])+"]: "+l(s[E[mr]],s));return W}return st}var lt,ya;function ei(){if(ya)return lt;ya=1;var r=Jr(),e=nr(),n=function(a,u,c){for(var v=a,p;(p=v.next)!=null;v=p)if(p.key===u)return v.next=p.next,c||(p.next=a.next,a.next=p),p},o=function(a,u){if(a){var c=n(a,u);return c&&c.value}},t=function(a,u,c){var v=n(a,u);v?v.value=c:a.next={key:u,next:a.next,value:c}},f=function(a,u){return a?!!n(a,u):!1},i=function(a,u){if(a)return n(a,u,!0)};return lt=function(){var u,c={assert:function(v){if(!c.has(v))throw new e("Side channel does not contain "+r(v))},delete:function(v){var p=u&&u.next,y=i(u,v);return y&&p&&p===y&&(u=void 0),!!y},get:function(v){return o(u,v)},has:function(v){return f(u,v)},set:function(v,p){u||(u={next:void 0}),t(u,v,p)}};return c},lt}var ct,va;function uo(){if(va)return ct;va=1;var r=yr(),e=Q(),n=Jr(),o=nr(),t=r("%Map%",!0),f=e("Map.prototype.get",!0),i=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return ct=!!t&&function(){var p,y={assert:function(h){if(!y.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(p){var m=u(p,h);return c(p)===0&&(p=void 0),m}return!1},get:function(h){if(p)return f(p,h)},has:function(h){return p?a(p,h):!1},set:function(h,m){p||(p=new t),i(p,h,m)}};return y},ct}var pt,ga;function ti(){if(ga)return pt;ga=1;var r=yr(),e=Q(),n=Jr(),o=uo(),t=nr(),f=r("%WeakMap%",!0),i=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return pt=f?function(){var p,y,h={assert:function(m){if(!h.has(m))throw new t("Side channel does not contain "+n(m))},delete:function(m){if(f&&m&&(typeof m=="object"||typeof m=="function")){if(p)return c(p,m)}else if(o&&y)return y.delete(m);return!1},get:function(m){return f&&m&&(typeof m=="object"||typeof m=="function")&&p?i(p,m):y&&y.get(m)},has:function(m){return f&&m&&(typeof m=="object"||typeof m=="function")&&p?u(p,m):!!y&&y.has(m)},set:function(m,B){f&&m&&(typeof m=="object"||typeof m=="function")?(p||(p=new f),a(p,m,B)):o&&(y||(y=o()),y.set(m,B))}};return h}:o,pt}var yt,ha;function fo(){if(ha)return yt;ha=1;var r=nr(),e=Jr(),n=ei(),o=uo(),t=ti(),f=t||o||n;return yt=function(){var a,u={assert:function(c){if(!u.has(c))throw new r("Side channel does not contain "+e(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,v){a||(a=f()),a.set(c,v)}};return u},yt}var vt,da;function ni(){if(da)return vt;da=1;var r=Qt(),e=fo()(),n=nr(),o={assert:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");if(e.assert(t),!o.has(t,f))throw new n("`"+f+"` is not present on `O`")},get:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var i=e.get(t);return i&&i["$"+f]},has:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var i=e.get(t);return!!i&&r(i,"$"+f)},set:function(t,f,i){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var a=e.get(t);a||(a={},e.set(t,a)),a["$"+f]=i}};return Object.freeze&&Object.freeze(o),vt=o,vt}var gt,ma;function ai(){if(ma)return gt;ma=1;var r=ni(),e=Ht(),n=typeof StopIteration=="object"?StopIteration:null;return gt=function(t){if(!n)throw new e("this environment lacks StopIteration");r.set(t,"[[Done]]",!1);var f={next:function(){var a=r.get(this,"[[Iterator]]"),u=!!r.get(a,"[[Done]]");try{return{done:u,value:u?void 0:a.next()}}catch(c){if(r.set(a,"[[Done]]",!0),c!==n)throw c;return{done:!0,value:void 0}}}};return r.set(f,"[[Iterator]]",t),f},gt}var ht,Sa;function so(){if(Sa)return ht;Sa=1;var r={}.toString;return ht=Array.isArray||function(e){return r.call(e)=="[object Array]"},ht}var dt,ba;function lo(){if(ba)return dt;ba=1;var r=Q(),e=r("String.prototype.valueOf"),n=function(a){try{return e(a),!0}catch{return!1}},o=r("Object.prototype.toString"),t="[object String]",f=Pr()();return dt=function(a){return typeof a=="string"?!0:!a||typeof a!="object"?!1:f?n(a):o(a)===t},dt}var mt,Aa;function co(){if(Aa)return mt;Aa=1;var r=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;r||(n=function(i){return!1});var o=r?Map.prototype.has:null,t=e?Set.prototype.has:null;return!n&&!o&&(n=function(i){return!1}),mt=n||function(i){if(!i||typeof i!="object")return!1;try{if(o.call(i),t)try{t.call(i)}catch{return!0}return i instanceof r}catch{}return!1},mt}var St,Oa;function po(){if(Oa)return St;Oa=1;var r=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;e||(n=function(i){return!1});var o=r?Map.prototype.has:null,t=e?Set.prototype.has:null;return!n&&!t&&(n=function(i){return!1}),St=n||function(i){if(!i||typeof i!="object")return!1;try{if(t.call(i),o)try{o.call(i)}catch{return!0}return i instanceof e}catch{}return!1},St}var qa;function oi(){if(qa)return Cr.exports;qa=1;var r=io(),e=ai();if(Vt()()||Kr()()){var n=Symbol.iterator;Cr.exports=function(P){if(P!=null&&typeof P[n]<"u")return P[n]();if(r(P))return Array.prototype[n].call(P)}}else{var o=so(),t=lo(),f=yr(),i=f("%Map%",!0),a=f("%Set%",!0),u=no(),c=u("Array.prototype.push"),v=u("String.prototype.charCodeAt"),p=u("String.prototype.slice"),y=function(P,_){var L=P.length;if(_+1>=L)return _+1;var N=v(P,_);if(N<55296||N>56319)return _+1;var H=v(P,_+1);return H<56320||H>57343?_+1:_+2},h=function(P){var _=0;return{next:function(){var N=_>=P.length,H;return N||(H=P[_],_+=1),{done:N,value:H}}}},m=function(P,_){if(o(P)||r(P))return h(P);if(t(P)){var L=0;return{next:function(){var H=y(P,L),V=p(P,L,H);return L=H,{done:H>P.length,value:V}}}}if(_&&typeof P["_es6-shim iterator_"]<"u")return P["_es6-shim iterator_"]()};if(!i&&!a)Cr.exports=function(P){if(P!=null)return m(P,!0)};else{var B=co(),q=po(),w=u("Map.prototype.forEach",!0),O=u("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var b=u("Map.prototype.iterator",!0),T=u("Set.prototype.iterator",!0);var X=u("Map.prototype.@@iterator",!0)||u("Map.prototype._es6-shim iterator_",!0),G=u("Set.prototype.@@iterator",!0)||u("Set.prototype._es6-shim iterator_",!0),F=function(P){if(B(P)){if(b)return e(b(P));if(X)return X(P);if(w){var _=[];return w(P,function(N,H){c(_,[H,N])}),h(_)}}if(q(P)){if(T)return e(T(P));if(G)return G(P);if(O){var L=[];return O(P,function(N){c(L,N)}),h(L)}}};Cr.exports=function(P){return F(P)||m(P)}}}return Cr.exports}var bt,wa;function yo(){if(wa)return bt;wa=1;var r=function(e){return e!==e};return bt=function(n,o){return n===0&&o===0?1/n===1/o:!!(n===o||r(n)&&r(o))},bt}var At,Pa;function vo(){if(Pa)return At;Pa=1;var r=yo();return At=function(){return typeof Object.is=="function"?Object.is:r},At}var Ot,Ia;function ii(){if(Ia)return Ot;Ia=1;var r=vo(),e=wr();return Ot=function(){var o=r();return e(Object,{is:o},{is:function(){return Object.is!==o}}),o},Ot}var qt,$a;function ui(){if($a)return qt;$a=1;var r=wr(),e=jr(),n=yo(),o=vo(),t=ii(),f=e(o(),Object);return r(f,{getPolyfill:o,implementation:n,shim:t}),qt=f,qt}var wt,Ra;function go(){if(Ra)return wt;Ra=1;var r=jr(),e=Q(),n=yr(),o=n("%ArrayBuffer%",!0),t=e("ArrayBuffer.prototype.byteLength",!0),f=e("Object.prototype.toString"),i=!!o&&!t&&new o(0).slice,a=!!i&&r(i);return wt=t||a?function(c){if(!c||typeof c!="object")return!1;try{return t?t(c):a(c,0),!0}catch{return!1}}:o?function(c){return f(c)==="[object ArrayBuffer]"}:function(c){return!1},wt}var Pt,xa;function fi(){if(xa)return Pt;xa=1;var r=Q(),e=r("Date.prototype.getDay"),n=function(a){try{return e(a),!0}catch{return!1}},o=r("Object.prototype.toString"),t="[object Date]",f=Pr()();return Pt=function(a){return typeof a!="object"||a===null?!1:f?n(a):o(a)===t},Pt}var It,Ea;function ho(){if(Ea)return It;Ea=1;var r=Q(),e=Pr()(),n=Qt(),o=qr(),t;if(e){var f=r("RegExp.prototype.exec"),i={},a=function(){throw i},u={toString:a,valueOf:a};typeof Symbol.toPrimitive=="symbol"&&(u[Symbol.toPrimitive]=a),t=function(y){if(!y||typeof y!="object")return!1;var h=o(y,"lastIndex"),m=h&&n(h,"value");if(!m)return!1;try{f(y,u)}catch(B){return B===i}}}else{var c=r("Object.prototype.toString"),v="[object RegExp]";t=function(y){return!y||typeof y!="object"&&typeof y!="function"?!1:c(y)===v}}return It=t,It}var $t,Ba;function si(){if(Ba)return $t;Ba=1;var r=Q(),e=r("SharedArrayBuffer.prototype.byteLength",!0);return $t=e?function(o){if(!o||typeof o!="object")return!1;try{return e(o),!0}catch{return!1}}:function(o){return!1},$t}var Rt,ja;function li(){if(ja)return Rt;ja=1;var r=Q(),e=r("Number.prototype.toString"),n=function(a){try{return e(a),!0}catch{return!1}},o=r("Object.prototype.toString"),t="[object Number]",f=Pr()();return Rt=function(a){return typeof a=="number"?!0:!a||typeof a!="object"?!1:f?n(a):o(a)===t},Rt}var xt,Ta;function ci(){if(Ta)return xt;Ta=1;var r=Q(),e=r("Boolean.prototype.toString"),n=r("Object.prototype.toString"),o=function(a){try{return e(a),!0}catch{return!1}},t="[object Boolean]",f=Pr()();return xt=function(a){return typeof a=="boolean"?!0:a===null||typeof a!="object"?!1:f?o(a):n(a)===t},xt}var Hr={exports:{}},Et,Ma;function pi(){if(Ma)return Et;Ma=1;var r=Q(),e=ho(),n=r("RegExp.prototype.exec"),o=nr();return Et=function(f){if(!e(f))throw new o("`regex` must be a RegExp");return function(a){return n(f,a)!==null}},Et}var Da;function yi(){if(Da)return Hr.exports;Da=1;var r=Q(),e=r("Object.prototype.toString"),n=Vt()(),o=pi();if(n){var t=r("Symbol.prototype.toString"),f=o(/^Symbol\(.*\)$/),i=function(u){return typeof u.valueOf()!="symbol"?!1:f(t(u))};Hr.exports=function(u){if(typeof u=="symbol")return!0;if(!u||typeof u!="object"||e(u)!=="[object Symbol]")return!1;try{return i(u)}catch{return!1}}}else Hr.exports=function(u){return!1};return Hr.exports}var Gr={exports:{}},Bt,Ca;function vi(){if(Ca)return Bt;Ca=1;var r=typeof BigInt<"u"&&BigInt;return Bt=function(){return typeof r=="function"&&typeof BigInt=="function"&&typeof r(42)=="bigint"&&typeof BigInt(42)=="bigint"},Bt}var Fa;function gi(){if(Fa)return Gr.exports;Fa=1;var r=vi()();if(r){var e=BigInt.prototype.valueOf,n=function(t){try{return e.call(t),!0}catch{}return!1};Gr.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:n(t)}}else Gr.exports=function(t){return!1};return Gr.exports}var jt,_a;function hi(){if(_a)return jt;_a=1;var r=lo(),e=li(),n=ci(),o=yi(),t=gi();return jt=function(i){if(i==null||typeof i!="object"&&typeof i!="function")return null;if(r(i))return"String";if(e(i))return"Number";if(n(i))return"Boolean";if(o(i))return"Symbol";if(t(i))return"BigInt"},jt}var Tt,Na;function di(){if(Na)return Tt;Na=1;var r=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,e=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,n;r||(n=function(i){return!1});var o=r?r.prototype.has:null,t=e?e.prototype.has:null;return!n&&!o&&(n=function(i){return!1}),Tt=n||function(i){if(!i||typeof i!="object")return!1;try{if(o.call(i,o),t)try{t.call(i,t)}catch{return!0}return i instanceof r}catch{}return!1},Tt}var Ur={exports:{}},Wa;function mi(){if(Wa)return Ur.exports;Wa=1;var r=yr(),e=Q(),n=r("%WeakSet%",!0),o=e("WeakSet.prototype.has",!0);if(o){var t=e("WeakMap.prototype.has",!0);Ur.exports=function(i){if(!i||typeof i!="object")return!1;try{if(o(i,o),t)try{t(i,t)}catch{return!0}return i instanceof n}catch{}return!1}}else Ur.exports=function(i){return!1};return Ur.exports}var Mt,ka;function Si(){if(ka)return Mt;ka=1;var r=co(),e=po(),n=di(),o=mi();return Mt=function(f){if(f&&typeof f=="object"){if(r(f))return"Map";if(e(f))return"Set";if(n(f))return"WeakMap";if(o(f))return"WeakSet"}return!1},Mt}var Dt,La;function bi(){if(La)return Dt;La=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,o;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw o}}),o={},e(function(){throw 42},null,n)}catch(O){O!==o&&(e=null)}else e=null;var t=/^\s*class\b/,f=function(b){try{var T=r.call(b);return t.test(T)}catch{return!1}},i=function(b){try{return f(b)?!1:(r.call(b),!0)}catch{return!1}},a=Object.prototype.toString,u="[object Object]",c="[object Function]",v="[object GeneratorFunction]",p="[object HTMLAllCollection]",y="[object HTML document.all class]",h="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,B=!(0 in[,]),q=function(){return!1};if(typeof document=="object"){var w=document.all;a.call(w)===a.call(document.all)&&(q=function(b){if((B||!b)&&(typeof b>"u"||typeof b=="object"))try{var T=a.call(b);return(T===p||T===y||T===h||T===u)&&b("")==null}catch{}return!1})}return Dt=e?function(b){if(q(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{e(b,null,n)}catch(T){if(T!==o)return!1}return!f(b)&&i(b)}:function(b){if(q(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(m)return i(b);if(f(b))return!1;var T=a.call(b);return T!==c&&T!==v&&!/^\[object HTML/.test(T)?!1:i(b)},Dt}var Ct,Ha;function Ai(){if(Ha)return Ct;Ha=1;var r=bi(),e=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=function(u,c,v){for(var p=0,y=u.length;p<y;p++)n.call(u,p)&&(v==null?c(u[p],p,u):c.call(v,u[p],p,u))},t=function(u,c,v){for(var p=0,y=u.length;p<y;p++)v==null?c(u.charAt(p),p,u):c.call(v,u.charAt(p),p,u)},f=function(u,c,v){for(var p in u)n.call(u,p)&&(v==null?c(u[p],p,u):c.call(v,u[p],p,u))};function i(a){return e.call(a)==="[object Array]"}return Ct=function(u,c,v){if(!r(c))throw new TypeError("iterator must be a function");var p;arguments.length>=3&&(p=v),i(u)?o(u,c,p):typeof u=="string"?t(u,c,p):f(u,c,p)},Ct}var Ft,Ga;function Oi(){return Ga||(Ga=1,Ft=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ft}var _t,Ua;function qi(){if(Ua)return _t;Ua=1;var r=Oi(),e=typeof globalThis>"u"?Br.commonjsGlobal:globalThis;return _t=function(){for(var o=[],t=0;t<r.length;t++)typeof e[r[t]]=="function"&&(o[o.length]=r[t]);return o},_t}var Nt,za;function wi(){if(za)return Nt;za=1;var r=Ai(),e=qi(),n=jr(),o=Q(),t=qr(),f=Xt(),i=o("Object.prototype.toString"),a=Pr()(),u=typeof globalThis>"u"?Br.commonjsGlobal:globalThis,c=e(),v=o("String.prototype.slice"),p=o("Array.prototype.indexOf",!0)||function(q,w){for(var O=0;O<q.length;O+=1)if(q[O]===w)return O;return-1},y={__proto__:null};a&&t&&f?r(c,function(B){var q=new u[B];if(Symbol.toStringTag in q&&f){var w=f(q),O=t(w,Symbol.toStringTag);if(!O&&w){var b=f(w);O=t(b,Symbol.toStringTag)}y["$"+B]=n(O.get)}}):r(c,function(B){var q=new u[B],w=q.slice||q.set;w&&(y["$"+B]=n(w))});var h=function(q){var w=!1;return r(y,function(O,b){if(!w)try{"$"+O(q)===b&&(w=v(b,1))}catch{}}),w},m=function(q){var w=!1;return r(y,function(O,b){if(!w)try{O(q),w=v(b,1)}catch{}}),w};return Nt=function(q){if(!q||typeof q!="object")return!1;if(!a){var w=v(i(q),8,-1);return p(c,w)>-1?w:w!=="Object"?!1:m(q)}return t?h(q):null},Nt}var Wt,Va;function Pi(){if(Va)return Wt;Va=1;var r=Q(),e=r("ArrayBuffer.prototype.byteLength",!0),n=go();return Wt=function(t){return n(t)?e?e(t):t.byteLength:NaN},Wt}var kt,Ka;function Ii(){if(Ka)return kt;Ka=1;var r=Vo(),e=no(),n=Xo(),o=yr(),t=oi(),f=fo(),i=ui(),a=io(),u=so(),c=go(),v=fi(),p=ho(),y=si(),h=Lt(),m=hi(),B=Si(),q=wi(),w=Pi(),O=e("SharedArrayBuffer.prototype.byteLength",!0),b=e("Date.prototype.getTime"),T=Object.getPrototypeOf,X=e("Object.prototype.toString"),G=o("%Set%",!0),F=e("Map.prototype.has",!0),C=e("Map.prototype.get",!0),P=e("Map.prototype.size",!0),_=e("Set.prototype.add",!0),L=e("Set.prototype.delete",!0),N=e("Set.prototype.has",!0),H=e("Set.prototype.size",!0);function V(g,d,R,$){for(var j=t(g),M;(M=j.next())&&!M.done;)if(U(d,M.value,R,$))return L(g,M.value),!0;return!1}function fr(g){if(typeof g>"u")return null;if(typeof g!="object")return typeof g=="symbol"?!1:typeof g=="string"||typeof g=="number"?+g==+g:!0}function Ir(g,d,R,$,j,M){var A=fr(R);if(A!=null)return A;var I=C(d,A),S=r({},j,{strict:!1});return typeof I>"u"&&!F(d,A)||!U($,I,S,M)?!1:!F(g,A)&&U($,I,S,M)}function Sr(g,d,R){var $=fr(R);return $??(N(d,$)&&!N(g,$))}function ar(g,d,R,$,j,M){for(var A=t(g),I,S;(I=A.next())&&!I.done;)if(S=I.value,U(R,S,j,M)&&U($,C(d,S),j,M))return L(g,S),!0;return!1}function U(g,d,R,$){var j=R||{};if(j.strict?i(g,d):g===d)return!0;var M=m(g),A=m(d);if(M!==A)return!1;if(!g||!d||typeof g!="object"&&typeof d!="object")return j.strict?i(g,d):g==d;var I=$.has(g),S=$.has(d),x;if(I&&S){if($.get(g)===$.get(d))return!0}else x={};return I||$.set(g,x),S||$.set(d,x),vr(g,d,j,$)}function br(g){return!g||typeof g!="object"||typeof g.length!="number"||typeof g.copy!="function"||typeof g.slice!="function"||g.length>0&&typeof g[0]!="number"?!1:!!(g.constructor&&g.constructor.isBuffer&&g.constructor.isBuffer(g))}function $r(g,d,R,$){if(H(g)!==H(d))return!1;for(var j=t(g),M=t(d),A,I,S;(A=j.next())&&!A.done;)if(A.value&&typeof A.value=="object")S||(S=new G),_(S,A.value);else if(!N(d,A.value)){if(R.strict||!Sr(g,d,A.value))return!1;S||(S=new G),_(S,A.value)}if(S){for(;(I=M.next())&&!I.done;)if(I.value&&typeof I.value=="object"){if(!V(S,I.value,R.strict,$))return!1}else if(!R.strict&&!N(g,I.value)&&!V(S,I.value,R.strict,$))return!1;return H(S)===0}return!0}function Ar(g,d,R,$){if(P(g)!==P(d))return!1;for(var j=t(g),M=t(d),A,I,S,x,z,K;(A=j.next())&&!A.done;)if(x=A.value[0],z=A.value[1],x&&typeof x=="object")S||(S=new G),_(S,x);else if(K=C(d,x),typeof K>"u"&&!F(d,x)||!U(z,K,R,$)){if(R.strict||!Ir(g,d,x,z,R,$))return!1;S||(S=new G),_(S,x)}if(S){for(;(I=M.next())&&!I.done;)if(x=I.value[0],K=I.value[1],x&&typeof x=="object"){if(!ar(S,g,x,K,R,$))return!1}else if(!R.strict&&(!g.has(x)||!U(C(g,x),K,R,$))&&!ar(S,g,x,K,r({},R,{strict:!1}),$))return!1;return H(S)===0}return!0}function vr(g,d,R,$){var j,M;if(typeof g!=typeof d||g==null||d==null||X(g)!==X(d)||a(g)!==a(d))return!1;var A=u(g),I=u(d);if(A!==I)return!1;var S=g instanceof Error,x=d instanceof Error;if(S!==x||(S||x)&&(g.name!==d.name||g.message!==d.message))return!1;var z=p(g),K=p(d);if(z!==K||(z||K)&&(g.source!==d.source||n(g)!==n(d)))return!1;var J=v(g),Y=v(d);if(J!==Y||(J||Y)&&b(g)!==b(d)||R.strict&&T&&T(g)!==T(d))return!1;var Z=q(g),sr=q(d);if(Z!==sr)return!1;if(Z||sr){if(g.length!==d.length)return!1;for(j=0;j<g.length;j++)if(g[j]!==d[j])return!1;return!0}var or=br(g),rr=br(d);if(or!==rr)return!1;if(or||rr){if(g.length!==d.length)return!1;for(j=0;j<g.length;j++)if(g[j]!==d[j])return!1;return!0}var lr=c(g),cr=c(d);if(lr!==cr)return!1;if(lr||cr)return w(g)!==w(d)?!1:typeof Uint8Array=="function"&&U(new Uint8Array(g),new Uint8Array(d),R,$);var pr=y(g),Nr=y(d);if(pr!==Nr)return!1;if(pr||Nr)return O(g)!==O(d)?!1:typeof Uint8Array=="function"&&U(new Uint8Array(g),new Uint8Array(d),R,$);if(typeof g!=typeof d)return!1;var gr=h(g),Rr=h(d);if(gr.length!==Rr.length)return!1;for(gr.sort(),Rr.sort(),j=gr.length-1;j>=0;j--)if(gr[j]!=Rr[j])return!1;for(j=gr.length-1;j>=0;j--)if(M=gr[j],!U(g[M],d[M],R,$))return!1;var Tr=B(g),hr=B(d);return Tr!==hr?!1:Tr==="Set"||hr==="Set"?$r(g,d,R,$):Tr==="Map"?Ar(g,d,R,$):!0}return kt=function(d,R,$){return U(d,R,$,f())},kt}var $i=Ii();const Ri=Br.getDefaultExportFromCjs($i);function xi(r){return r}function mo(r,e,n,o){const t=xi,[f,i]=ur.useState(t(n)),a=ur.useRef(f);return ur.useEffect(()=>{const u=()=>{const c={...n,...r.getAttributes(e)};Object.keys(c).forEach(p=>{(c[p]===null||c[p]===void 0)&&(c[p]=n?n[p]:null)});const v=t(c);Ri(a.current,v)||(i(v),a.current=v)};return r.on("selectionUpdate",u),r.on("transaction",u),()=>{r.off("selectionUpdate",u),r.off("transaction",u)}},[r,n,e,t]),f}function Ei({node:r}){const{text:e}=r.attrs,n=ur.useMemo(()=>{try{return Ja.renderToString(`${e}`)}catch{return e}},[e]),o=ur.useMemo(()=>e.trim()?er.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:n}}):er.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[e,n]);return er.jsx(Fr.NodeViewWrapper,{as:"span",style:{display:"inline-block"},children:o})}function Bi(){const{t:r}=Po.useLocale(),[e,n]=ur.useState(!1),o=oe.useButtonProps(zr.name),{icon:t=void 0,tooltip:f=void 0,tooltipOptions:i={},isActive:a=void 0}=(o==null?void 0:o.componentProps)??{},{editorDisabled:u}=oe.useToggleActive(a),c=oe.useEditorInstance(),v=mo(c,zr.name,{text:"",defaultShowPicker:!1}),{text:p,defaultShowPicker:y}=v,[h,m]=ur.useState(p||""),B=ur.useCallback(()=>{c.chain().focus().setKatex({text:h}).run(),m(""),n(!1)},[c,h]);ur.useEffect(()=>{y&&c.chain().updateAttributes(zr.name,{defaultShowPicker:!1}).focus().run()},[c,y]);const q=ur.useMemo(()=>{try{return Ja.renderToString(`${h}`)}catch{return h}},[h]),w=ur.useMemo(()=>`${h}`.trim()?q:null,[h,q]);return er.jsxs(Dr.Dialog,{onOpenChange:n,open:e,children:[er.jsx(Dr.DialogTrigger,{asChild:!0,disabled:u,children:er.jsx(qo.ActionButton,{disabled:u,icon:t,tooltip:f,tooltipOptions:i,action:()=>{u||n(!0)}})}),er.jsxs(Dr.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[er.jsx(Dr.DialogTitle,{children:r("editor.formula.dialog.text")}),er.jsx("div",{style:{height:"100%",border:"1px solid hsl(var(--border))"},children:er.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[er.jsx(wo.Textarea,{autoFocus:!0,className:"richtext-flex-1",onChange:O=>m(O.target.value),placeholder:"Text",required:!0,rows:10,value:h,style:{color:"hsl(var(--foreground))"}}),er.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",dangerouslySetInnerHTML:{__html:w||""},style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"}})]})}),er.jsx(Dr.DialogFooter,{children:er.jsx(Io.Button,{onClick:B,type:"button",children:"Save changes"})})]})]})}function ji(r){return e=>e.getAttribute(r)}const zr=Fr.Node3.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({t:r})=>({componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:r("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:ji("text")},defaultShowPicker:{default:!1}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:r}){return["span",Fr.mergeAttributes(this.options&&this.options.HTMLAttributes||{},r)]},addCommands(){return{setKatex:r=>({commands:e})=>e.insertContent({type:this.name,attrs:r})}},addInputRules(){return[Fr.nodeInputRule({find:/^\$katex\$$/,type:this.type,getAttributes:()=>({defaultShowPicker:!0})})]},addNodeView(){return Fr.ReactNodeViewRenderer(Ei)}});exports.Katex=zr;exports.RichTextKatex=Bi;exports.useAttributes=mo;
|